@decaf-ts/ui-decorators 0.6.18 → 0.6.19
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/dist/ui-decorators.cjs +1 -1
- package/dist/ui-decorators.cjs.map +1 -1
- package/dist/ui-decorators.js +1 -1
- package/dist/ui-decorators.js.map +1 -1
- package/lib/esm/index.d.ts +3 -0
- package/lib/esm/index.js +5 -0
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/model/decorators.js +19 -13
- package/lib/esm/model/decorators.js.map +1 -1
- package/lib/esm/overrides/ModelBuilderExtensions.d.ts +16 -0
- package/lib/esm/overrides/ModelBuilderExtensions.js +32 -0
- package/lib/esm/overrides/ModelBuilderExtensions.js.map +1 -0
- package/lib/esm/overrides/index.d.ts +5 -0
- package/lib/esm/overrides/index.js +6 -0
- package/lib/esm/overrides/index.js.map +1 -0
- package/lib/esm/ui/DecafComponent.d.ts +4 -36
- package/lib/esm/ui/DecafComponent.js +2 -14
- package/lib/esm/ui/DecafComponent.js.map +1 -1
- package/lib/esm/ui/types.d.ts +0 -12
- package/lib/index.cjs +6 -1
- package/lib/index.d.ts +3 -0
- package/lib/index.js.map +1 -1
- package/lib/model/decorators.cjs +19 -13
- package/lib/model/decorators.js.map +1 -1
- package/lib/overrides/ModelBuilderExtensions.cjs +34 -0
- package/lib/overrides/ModelBuilderExtensions.d.ts +16 -0
- package/lib/overrides/ModelBuilderExtensions.js.map +1 -0
- package/lib/overrides/index.cjs +22 -0
- package/lib/overrides/index.d.ts +5 -0
- package/lib/overrides/index.js.map +1 -0
- package/lib/ui/DecafComponent.cjs +2 -14
- package/lib/ui/DecafComponent.d.ts +4 -36
- package/lib/ui/DecafComponent.js.map +1 -1
- package/lib/ui/types.d.ts +0 -12
- package/package.json +1 -5
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/overrides/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,4CAAyC"}
|
|
@@ -6,7 +6,8 @@ import { DecafEventHandler } from "./DecafEventHandler";
|
|
|
6
6
|
import { DecafTranslateService } from "./DecafTranslateService";
|
|
7
7
|
type PrimaryKeyType = string | number | bigint;
|
|
8
8
|
/**
|
|
9
|
-
* Base class for all Decaf UI components
|
|
9
|
+
* @description Base class for all Decaf UI components
|
|
10
|
+
* @summary Base class for all Decaf UI components, providing common state management,
|
|
10
11
|
* logging, localization, navigation hooks, CRUD context metadata, and
|
|
11
12
|
* repository integration used by higher-level decorators and renderers.
|
|
12
13
|
*/
|
|
@@ -17,7 +18,6 @@ export declare abstract class DecafComponent<M extends Model> extends LoggedClas
|
|
|
17
18
|
* as a Model instance, a model constructor, or a string representing the model's registered name.
|
|
18
19
|
* When set, this property provides the component with access to the model's schema, validation rules,
|
|
19
20
|
* and metadata needed for rendering and data operations.
|
|
20
|
-
* @type {M | Model | string | undefined}
|
|
21
21
|
*/
|
|
22
22
|
model: M | Model | string | undefined;
|
|
23
23
|
/**
|
|
@@ -26,21 +26,18 @@ export declare abstract class DecafComponent<M extends Model> extends LoggedClas
|
|
|
26
26
|
* manipulated by the component. This identifier is used for CRUD operations that target
|
|
27
27
|
* specific records, such as read, update, and delete operations. The value corresponds to
|
|
28
28
|
* the field designated as the primary key in the model definition.
|
|
29
|
-
* @type {PrimaryKeyType | PrimaryKeyType[]}
|
|
30
29
|
*/
|
|
31
30
|
modelId?: PrimaryKeyType | PrimaryKeyType[];
|
|
32
31
|
/**
|
|
33
32
|
* @description Pre-built filtering expression applied to repository queries.
|
|
34
33
|
* @summary Supply a custom `AttributeOption` to control how records are constrained. When omitted,
|
|
35
34
|
* the directive derives a condition from `filterBy` or `pk`, comparing it against `modelId`.
|
|
36
|
-
* @type {any}
|
|
37
35
|
*/
|
|
38
36
|
filter: any;
|
|
39
37
|
/**
|
|
40
38
|
* @description Model field used when generating the default condition.
|
|
41
39
|
* @summary Indicates which key should be compared to `modelId` when `filter` is not provided.
|
|
42
40
|
* Defaults to the configured primary key so overrides are only needed for custom lookups.
|
|
43
|
-
* @type {string}
|
|
44
41
|
*/
|
|
45
42
|
filterBy: string;
|
|
46
43
|
/**
|
|
@@ -59,7 +56,6 @@ export declare abstract class DecafComponent<M extends Model> extends LoggedClas
|
|
|
59
56
|
* in the application. This service enables navigation to different views and operations,
|
|
60
57
|
* handles route parameters, and manages the browser's navigation history.
|
|
61
58
|
* @protected
|
|
62
|
-
* @type {Router}
|
|
63
59
|
*/
|
|
64
60
|
router?: any;
|
|
65
61
|
/**
|
|
@@ -68,7 +64,6 @@ export declare abstract class DecafComponent<M extends Model> extends LoggedClas
|
|
|
68
64
|
* instance. This name can be used for debugging purposes, logging, or to identify specific
|
|
69
65
|
* component instances within a larger application structure. It serves as a human-readable
|
|
70
66
|
* identifier that helps distinguish between multiple instances of the same component type.
|
|
71
|
-
* @type {string}
|
|
72
67
|
*/
|
|
73
68
|
name: string;
|
|
74
69
|
/**
|
|
@@ -77,7 +72,6 @@ export declare abstract class DecafComponent<M extends Model> extends LoggedClas
|
|
|
77
72
|
* This property establishes a parent-child relationship between components, allowing for
|
|
78
73
|
* proper nesting and organization of components within a layout. It can be used to track
|
|
79
74
|
* component dependencies and establish component hierarchies for rendering and event propagation.
|
|
80
|
-
* @type {string | undefined}
|
|
81
75
|
*/
|
|
82
76
|
childOf: string | undefined;
|
|
83
77
|
/**
|
|
@@ -85,7 +79,6 @@ export declare abstract class DecafComponent<M extends Model> extends LoggedClas
|
|
|
85
79
|
* @summary A unique identifier automatically generated for each component instance.
|
|
86
80
|
* This UID is used for DOM element identification, component tracking, and debugging purposes.
|
|
87
81
|
* By default, it generates a random 16-character value, but it can be explicitly set via input.
|
|
88
|
-
* @type {string}
|
|
89
82
|
*/
|
|
90
83
|
uid?: PrimaryKeyType;
|
|
91
84
|
/**
|
|
@@ -93,7 +86,6 @@ export declare abstract class DecafComponent<M extends Model> extends LoggedClas
|
|
|
93
86
|
* @summary Specifies which field in the model should be used as the primary key.
|
|
94
87
|
* This is typically used for identifying unique records in operations like update and delete.
|
|
95
88
|
* If not explicitly set, it defaults to the repository's configured primary key or 'id'.
|
|
96
|
-
* @type {string}
|
|
97
89
|
1 */
|
|
98
90
|
pk: string;
|
|
99
91
|
/**
|
|
@@ -102,7 +94,6 @@ export declare abstract class DecafComponent<M extends Model> extends LoggedClas
|
|
|
102
94
|
* Used to translate button labels, validation messages, and other text content based
|
|
103
95
|
* on the current locale setting, enabling multilingual support throughout the application.
|
|
104
96
|
* @protected
|
|
105
|
-
* @type {DecafTranslateService}
|
|
106
97
|
*/
|
|
107
98
|
translateService: DecafTranslateService;
|
|
108
99
|
/**
|
|
@@ -117,20 +108,15 @@ export declare abstract class DecafComponent<M extends Model> extends LoggedClas
|
|
|
117
108
|
/**
|
|
118
109
|
* @description Controls field visibility based on CRUD operations.
|
|
119
110
|
* @summary Can be a boolean or an array of operation keys where the field should be hidden.
|
|
120
|
-
* @type {boolean | CrudOperationKeys[]}
|
|
121
111
|
*/
|
|
122
112
|
hidden?: boolean | CrudOperationKeys[];
|
|
123
113
|
/**
|
|
124
114
|
* @description Label for the file upload field.
|
|
125
115
|
* @summary Provides a user-friendly label for the file upload input.
|
|
126
|
-
*
|
|
127
|
-
* @type {string | undefined}
|
|
128
116
|
*/
|
|
129
117
|
label?: string;
|
|
130
118
|
/**
|
|
131
119
|
* @description Whether the field is read-only.
|
|
132
|
-
* @type {boolean}
|
|
133
|
-
* @public
|
|
134
120
|
*/
|
|
135
121
|
readonly?: boolean;
|
|
136
122
|
/**
|
|
@@ -140,8 +126,6 @@ export declare abstract class DecafComponent<M extends Model> extends LoggedClas
|
|
|
140
126
|
* controls whether the component should respond to dark mode changes and apply the
|
|
141
127
|
* dark palette class to its DOM element. By default, dark mode support is disabled.
|
|
142
128
|
* @protected
|
|
143
|
-
* @type {boolean}
|
|
144
|
-
* @default false
|
|
145
129
|
*/
|
|
146
130
|
protected enableDarkMode: boolean;
|
|
147
131
|
/**
|
|
@@ -151,8 +135,6 @@ export declare abstract class DecafComponent<M extends Model> extends LoggedClas
|
|
|
151
135
|
* controls whether the component should respond to dark mode changes and apply the
|
|
152
136
|
* dark palette class to its DOM element. By default, dark mode support is disabled.
|
|
153
137
|
* @protected
|
|
154
|
-
* @type {boolean}
|
|
155
|
-
* @default false
|
|
156
138
|
*/
|
|
157
139
|
protected isDarkMode: boolean;
|
|
158
140
|
/**
|
|
@@ -161,7 +143,6 @@ export declare abstract class DecafComponent<M extends Model> extends LoggedClas
|
|
|
161
143
|
* and formatting data according to regional conventions. This property can be set to override
|
|
162
144
|
* the default application locale for this specific component instance, enabling per-component
|
|
163
145
|
* localization when needed.
|
|
164
|
-
* @type {string | undefined}
|
|
165
146
|
*/
|
|
166
147
|
locale?: string;
|
|
167
148
|
/**
|
|
@@ -171,8 +152,6 @@ export declare abstract class DecafComponent<M extends Model> extends LoggedClas
|
|
|
171
152
|
* and other properties needed to render list items correctly. The tag property
|
|
172
153
|
* identifies which component should be used to render each item in a list.
|
|
173
154
|
* Additional properties can be included to customize the rendering behavior.
|
|
174
|
-
* @type {Record<string, unknown>}
|
|
175
|
-
* @default {tag: ""}
|
|
176
155
|
*/
|
|
177
156
|
item: Record<string, unknown>;
|
|
178
157
|
/**
|
|
@@ -182,8 +161,6 @@ export declare abstract class DecafComponent<M extends Model> extends LoggedClas
|
|
|
182
161
|
* requiring explicit input bindings for every possible configuration option. Properties from
|
|
183
162
|
* this object are parsed and applied to the component instance through the parseProps method,
|
|
184
163
|
* enabling customizable component behavior based on external configuration.
|
|
185
|
-
* @type {Record<string, unknown>}
|
|
186
|
-
* @default {}
|
|
187
164
|
*/
|
|
188
165
|
props: Record<string, unknown>;
|
|
189
166
|
/**
|
|
@@ -192,16 +169,12 @@ export declare abstract class DecafComponent<M extends Model> extends LoggedClas
|
|
|
192
169
|
* This is often used as a prefix for constructing navigation URLs when transitioning between
|
|
193
170
|
* different operations or views. The route helps establish the component's position in the
|
|
194
171
|
* application's routing hierarchy.
|
|
195
|
-
* @type {string}
|
|
196
172
|
*/
|
|
197
173
|
route?: string;
|
|
198
174
|
/**
|
|
199
175
|
* @description Controls whether borders are displayed around the component.
|
|
200
176
|
* @summary Boolean flag that determines if the component should be visually outlined with borders.
|
|
201
177
|
* When true, borders are shown to visually separate the component from surrounding content.
|
|
202
|
-
*
|
|
203
|
-
* @type {boolean}
|
|
204
|
-
* @default false
|
|
205
178
|
*/
|
|
206
179
|
borders: boolean;
|
|
207
180
|
/**
|
|
@@ -209,7 +182,6 @@ export declare abstract class DecafComponent<M extends Model> extends LoggedClas
|
|
|
209
182
|
* @summary Stores the component's name which is used as a key for logging contexts
|
|
210
183
|
* and as a base for locale resolution.
|
|
211
184
|
* @protected
|
|
212
|
-
* @type {string | undefined}
|
|
213
185
|
*/
|
|
214
186
|
protected componentName?: string;
|
|
215
187
|
/**
|
|
@@ -218,14 +190,11 @@ export declare abstract class DecafComponent<M extends Model> extends LoggedClas
|
|
|
218
190
|
* If not explicitly provided, it defaults to the component's name. This key is used to
|
|
219
191
|
* load appropriate translation resources and locale-specific configurations.
|
|
220
192
|
* @protected
|
|
221
|
-
* @type {string | undefined}
|
|
222
193
|
*/
|
|
223
194
|
protected localeRoot?: string;
|
|
224
195
|
/**
|
|
225
196
|
* @description Current value of the component.
|
|
226
197
|
* @summary Can be a string, number, date, or array of string or objects.
|
|
227
|
-
* @type {any}
|
|
228
|
-
* @public
|
|
229
198
|
*/
|
|
230
199
|
value?: any;
|
|
231
200
|
/**
|
|
@@ -255,7 +224,7 @@ export declare abstract class DecafComponent<M extends Model> extends LoggedClas
|
|
|
255
224
|
* This is an instance of the DecafRepository class, initialized lazily in the repository getter.
|
|
256
225
|
* The repository is used to perform CRUD (Create, Read, Update, Delete) operations on the
|
|
257
226
|
* data model and provides methods for querying and filtering data based on specific criteria.
|
|
258
|
-
*
|
|
227
|
+
*
|
|
259
228
|
* @protected
|
|
260
229
|
*/
|
|
261
230
|
protected _repository?: IRepository<M>;
|
|
@@ -264,13 +233,12 @@ export declare abstract class DecafComponent<M extends Model> extends LoggedClas
|
|
|
264
233
|
* @summary Tracks whether the component has completed its initialization process.
|
|
265
234
|
* This flag is used to prevent duplicate initialization and to determine if
|
|
266
235
|
* certain operations that require initialization can be performed.
|
|
267
|
-
* @type {boolean}
|
|
268
236
|
* @default false
|
|
269
237
|
*/
|
|
270
238
|
protected initialized: boolean;
|
|
271
239
|
protected events: UIEventProperty;
|
|
272
240
|
protected handlers: UIEventProperty;
|
|
273
|
-
constructor();
|
|
241
|
+
protected constructor();
|
|
274
242
|
get repository(): IRepository<M>;
|
|
275
243
|
set repository(repository: IRepository<M>);
|
|
276
244
|
render(...args: unknown[]): Promise<any>;
|
|
@@ -2,7 +2,8 @@ import { LoggedClass } from "@decaf-ts/logging";
|
|
|
2
2
|
import { OperationKeys } from "@decaf-ts/db-decorators";
|
|
3
3
|
import { isClassConstructor } from "./utils.js";
|
|
4
4
|
/**
|
|
5
|
-
* Base class for all Decaf UI components
|
|
5
|
+
* @description Base class for all Decaf UI components
|
|
6
|
+
* @summary Base class for all Decaf UI components, providing common state management,
|
|
6
7
|
* logging, localization, navigation hooks, CRUD context metadata, and
|
|
7
8
|
* repository integration used by higher-level decorators and renderers.
|
|
8
9
|
*/
|
|
@@ -16,8 +17,6 @@ export class DecafComponent extends LoggedClass {
|
|
|
16
17
|
* controls whether the component should respond to dark mode changes and apply the
|
|
17
18
|
* dark palette class to its DOM element. By default, dark mode support is disabled.
|
|
18
19
|
* @protected
|
|
19
|
-
* @type {boolean}
|
|
20
|
-
* @default false
|
|
21
20
|
*/
|
|
22
21
|
this.enableDarkMode = true;
|
|
23
22
|
/**
|
|
@@ -27,8 +26,6 @@ export class DecafComponent extends LoggedClass {
|
|
|
27
26
|
* controls whether the component should respond to dark mode changes and apply the
|
|
28
27
|
* dark palette class to its DOM element. By default, dark mode support is disabled.
|
|
29
28
|
* @protected
|
|
30
|
-
* @type {boolean}
|
|
31
|
-
* @default false
|
|
32
29
|
*/
|
|
33
30
|
this.isDarkMode = false;
|
|
34
31
|
/**
|
|
@@ -38,8 +35,6 @@ export class DecafComponent extends LoggedClass {
|
|
|
38
35
|
* and other properties needed to render list items correctly. The tag property
|
|
39
36
|
* identifies which component should be used to render each item in a list.
|
|
40
37
|
* Additional properties can be included to customize the rendering behavior.
|
|
41
|
-
* @type {Record<string, unknown>}
|
|
42
|
-
* @default {tag: ""}
|
|
43
38
|
*/
|
|
44
39
|
this.item = { tag: "" };
|
|
45
40
|
/**
|
|
@@ -49,8 +44,6 @@ export class DecafComponent extends LoggedClass {
|
|
|
49
44
|
* requiring explicit input bindings for every possible configuration option. Properties from
|
|
50
45
|
* this object are parsed and applied to the component instance through the parseProps method,
|
|
51
46
|
* enabling customizable component behavior based on external configuration.
|
|
52
|
-
* @type {Record<string, unknown>}
|
|
53
|
-
* @default {}
|
|
54
47
|
*/
|
|
55
48
|
this.props = {};
|
|
56
49
|
/**
|
|
@@ -59,16 +52,12 @@ export class DecafComponent extends LoggedClass {
|
|
|
59
52
|
* This is often used as a prefix for constructing navigation URLs when transitioning between
|
|
60
53
|
* different operations or views. The route helps establish the component's position in the
|
|
61
54
|
* application's routing hierarchy.
|
|
62
|
-
* @type {string}
|
|
63
55
|
*/
|
|
64
56
|
this.route = "";
|
|
65
57
|
/**
|
|
66
58
|
* @description Controls whether borders are displayed around the component.
|
|
67
59
|
* @summary Boolean flag that determines if the component should be visually outlined with borders.
|
|
68
60
|
* When true, borders are shown to visually separate the component from surrounding content.
|
|
69
|
-
*
|
|
70
|
-
* @type {boolean}
|
|
71
|
-
* @default false
|
|
72
61
|
*/
|
|
73
62
|
this.borders = false;
|
|
74
63
|
/**
|
|
@@ -86,7 +75,6 @@ export class DecafComponent extends LoggedClass {
|
|
|
86
75
|
* @summary Tracks whether the component has completed its initialization process.
|
|
87
76
|
* This flag is used to prevent duplicate initialization and to determine if
|
|
88
77
|
* certain operations that require initialization can be performed.
|
|
89
|
-
* @type {boolean}
|
|
90
78
|
* @default false
|
|
91
79
|
*/
|
|
92
80
|
this.initialized = false;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DecafComponent.js","sourceRoot":"","sources":["../../../src/ui/DecafComponent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGhD,OAAO,EAAe,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAGrE,OAAO,EAAE,kBAAkB,EAAE,mBAAgB;AAI7C
|
|
1
|
+
{"version":3,"file":"DecafComponent.js","sourceRoot":"","sources":["../../../src/ui/DecafComponent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGhD,OAAO,EAAe,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAGrE,OAAO,EAAE,kBAAkB,EAAE,mBAAgB;AAI7C;;;;;GAKG;AACH,MAAM,OAAgB,cAAgC,SAAQ,WAAW;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,aAAa,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,G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mB,CAAC;gBACvD,IAAI,EAAE,EAAE,CAAC;oBACP,MAAM,CAAC,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"}
|
package/lib/esm/ui/types.d.ts
CHANGED
|
@@ -166,15 +166,7 @@ export type UILayoutMetadata = {
|
|
|
166
166
|
* @memberOf module:ui-decorators
|
|
167
167
|
*/
|
|
168
168
|
export type UIClassMetadata = UILayoutMetadata | UIModelMetadata | UIHandlerMetadata | UIListModelMetadata;
|
|
169
|
-
/**
|
|
170
|
-
* @typedef UILayoutCol
|
|
171
|
-
* @memberOf module:ui-decorators
|
|
172
|
-
*/
|
|
173
169
|
export type UILayoutCol = number | typeof ElementSizes.half | typeof ElementSizes.full | typeof ElementSizes.auto | typeof ElementSizes.expand;
|
|
174
|
-
/**
|
|
175
|
-
* @typedef UIListItemPosition
|
|
176
|
-
* @memberOf module:ui-decorators
|
|
177
|
-
*/
|
|
178
170
|
export type UIListItemPosition = "title" | "description" | "info" | "subinfo";
|
|
179
171
|
export type UIFunctionLike = (...args: any[]) => any | Promise<any>;
|
|
180
172
|
export type UIEventName = keyof Pick<DecafEventHandler, "render" | "initialize" | "handleClick" | "refresh">;
|
|
@@ -193,8 +185,4 @@ export type UILayoutPropMetadata = {
|
|
|
193
185
|
row: number | string[];
|
|
194
186
|
};
|
|
195
187
|
};
|
|
196
|
-
/**
|
|
197
|
-
* @typedef UIMediaBreakPoints
|
|
198
|
-
* @memberOf module:ui-decorators
|
|
199
|
-
*/
|
|
200
188
|
export type UIMediaBreakPointsType = UIMediaBreakPoints.SMALL | UIMediaBreakPoints.MEDIUM | UIMediaBreakPoints.LARGE | UIMediaBreakPoints.XLARGE;
|
package/lib/index.cjs
CHANGED
|
@@ -21,7 +21,10 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
21
21
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
22
22
|
};
|
|
23
23
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
|
-
exports.VERSION = void 0;
|
|
24
|
+
exports.PACKAGE_NAME = exports.VERSION = void 0;
|
|
25
|
+
require("./overrides/index.cjs");
|
|
26
|
+
const decoration_1 = require("@decaf-ts/decoration");
|
|
27
|
+
__exportStar(require("./overrides/index.cjs"), exports);
|
|
25
28
|
__exportStar(require("./model/index.cjs"), exports);
|
|
26
29
|
__exportStar(require("./ui/index.cjs"), exports);
|
|
27
30
|
/**
|
|
@@ -31,4 +34,6 @@ __exportStar(require("./ui/index.cjs"), exports);
|
|
|
31
34
|
* @memberOf module:ui-decorators
|
|
32
35
|
*/
|
|
33
36
|
exports.VERSION = "0.6.18";
|
|
37
|
+
exports.PACKAGE_NAME = "@decaf-ts/ui-decorators";
|
|
38
|
+
decoration_1.Metadata.registerLibrary(exports.PACKAGE_NAME, exports.VERSION);
|
|
34
39
|
//# sourceMappingURL=index.js.map
|
package/lib/index.d.ts
CHANGED
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
* rendering, component definition, and UI state management.
|
|
6
6
|
* @module ui-decorators
|
|
7
7
|
*/
|
|
8
|
+
import "./overrides";
|
|
9
|
+
export * from "./overrides";
|
|
8
10
|
export * from "./model";
|
|
9
11
|
export * from "./ui";
|
|
10
12
|
/**
|
|
@@ -14,3 +16,4 @@ export * from "./ui";
|
|
|
14
16
|
* @memberOf module:ui-decorators
|
|
15
17
|
*/
|
|
16
18
|
export declare const VERSION = "0.6.18";
|
|
19
|
+
export declare const PACKAGE_NAME = "@decaf-ts/ui-decorators";
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;;;;;;;;;;;;;;AAEH,oDAAwB;AACxB,iDAAqB;AAErB;;;;;GAKG;AACU,QAAA,OAAO,GAAG,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;;;;;;;;;;;;;;AAEH,iCAAqB;AACrB,qDAAgD;AAChD,wDAA4B;AAC5B,oDAAwB;AACxB,iDAAqB;AAErB;;;;;GAKG;AACU,QAAA,OAAO,GAAG,aAAa,CAAC;AAExB,QAAA,YAAY,GAAG,aAAa,CAAC;AAE1C,qBAAQ,CAAC,eAAe,CAAC,oBAAY,EAAE,eAAO,CAAC,CAAC"}
|
package/lib/model/decorators.cjs
CHANGED
|
@@ -274,20 +274,26 @@ function uihandlers(props) {
|
|
|
274
274
|
* RenderingEngine->>System: renders grid layout with specified dimensions
|
|
275
275
|
*/
|
|
276
276
|
function uilayout(tag, colsMode = 1, rows = 1, props = {}) {
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
277
|
+
const layoutConfig = typeof colsMode === "boolean"
|
|
278
|
+
? {
|
|
279
|
+
flexMode: colsMode,
|
|
280
|
+
cols: 1,
|
|
281
|
+
}
|
|
282
|
+
: {
|
|
283
|
+
flexMode: false,
|
|
284
|
+
cols: colsMode,
|
|
285
|
+
};
|
|
286
|
+
const layoutProps = Object.assign({}, layoutConfig, { rows }, Object.assign({ breakpoint: constants_2.UIMediaBreakPoints.LARGE }, props));
|
|
287
|
+
const layoutMeta = {
|
|
288
|
+
props: {
|
|
289
|
+
cols: layoutConfig.cols,
|
|
288
290
|
rows,
|
|
289
|
-
|
|
290
|
-
}
|
|
291
|
+
props: Object.assign({ breakpoint: constants_2.UIMediaBreakPoints.LARGE }, props),
|
|
292
|
+
},
|
|
293
|
+
};
|
|
294
|
+
return (original, propertyKey) => {
|
|
295
|
+
(0, decoration_1.metadata)(decoration_1.Metadata.key(constants_1.UIKeys.REFLECT, constants_1.UIKeys.UILAYOUT), layoutMeta)(original);
|
|
296
|
+
return uimodel(tag, layoutProps)(original, propertyKey);
|
|
291
297
|
};
|
|
292
298
|
}
|
|
293
299
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decorators.js","sourceRoot":"","sources":["../../src/model/decorators.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"decorators.js","sourceRoot":"","sources":["../../src/model/decorators.ts"],"names":[],"mappings":";;AAsDA,0BAYC;AAkCD,gCAIC;AA+CD,kCAcC;AAuDD,gCAUC;AA4DD,4BAiCC;AAkFD,wCAiBC;AAtaD,qDAAyC;AAOzC,qDAAqD;AAErD,qDAAiE;AAEjE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,SAAgB,OAAO,CAAC,GAAY,EAAE,KAA2B;IAC/D,6DAA6D;IAC7D,OAAO,CAAC,QAAa,EAAE,WAAiB,EAAE,EAAE;QAC1C,MAAM,IAAI,GAAoB;YAC5B,GAAG,EAAE,GAAG,IAAI,QAAQ,CAAC,IAAI;YACzB,KAAK,EAAE,KAAK;SACb,CAAC;QACF,OAAO,IAAA,qBAAQ,EACb,qBAAQ,CAAC,GAAG,CAAC,kBAAM,CAAC,OAAO,EAAE,kBAAM,CAAC,OAAO,CAAC,EAC5C,IAAI,CACL,CAAC,QAAQ,CAAC,CAAC;IACd,CAAC,CAAC;AACJ,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,SAAgB,UAAU,CAAC,MAAc;IACvC,OAAO,IAAA,kBAAK,EACV,IAAA,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D,OAAO,OAAO,CAAC,GAAG,EAAE;QAClB,KAAK;QACL,SAAS;QACT,UAAU;QACV,KAAK;KACN,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
require("@decaf-ts/decorator-validation");
|
|
4
|
+
const decorator_validation_1 = require("@decaf-ts/decorator-validation");
|
|
5
|
+
const decorators_1 = require("./../model/decorators.cjs");
|
|
6
|
+
const prototype = decorator_validation_1.ModelBuilder.prototype;
|
|
7
|
+
if (!prototype.decorateClass) {
|
|
8
|
+
prototype.decorateClass = function (decorator) {
|
|
9
|
+
if (!this._classDecorators) {
|
|
10
|
+
this._classDecorators = [];
|
|
11
|
+
}
|
|
12
|
+
this._classDecorators.push(decorator);
|
|
13
|
+
return this;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
prototype.uimodel = function (tag, props) {
|
|
17
|
+
return this.decorateClass((0, decorators_1.uimodel)(tag, props));
|
|
18
|
+
};
|
|
19
|
+
prototype.renderedBy = function (engine) {
|
|
20
|
+
return this.decorateClass((0, decorators_1.renderedBy)(engine));
|
|
21
|
+
};
|
|
22
|
+
prototype.uilistmodel = function (name, props) {
|
|
23
|
+
return this.decorateClass((0, decorators_1.uilistmodel)(name, props));
|
|
24
|
+
};
|
|
25
|
+
prototype.uihandlers = function (props) {
|
|
26
|
+
return this.decorateClass((0, decorators_1.uihandlers)(props));
|
|
27
|
+
};
|
|
28
|
+
prototype.uilayout = function (tag, colsMode, rows, props) {
|
|
29
|
+
return this.decorateClass((0, decorators_1.uilayout)(tag, colsMode, rows, props));
|
|
30
|
+
};
|
|
31
|
+
prototype.uisteppedmodel = function (tag, pages, paginated, props) {
|
|
32
|
+
return this.decorateClass((0, decorators_1.uisteppedmodel)(tag, pages, paginated, props));
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=ModelBuilderExtensions.js.map
|
|
@@ -0,0 +1,16 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
/**
|
|
18
|
+
* @description UI overrides exports
|
|
19
|
+
* @module ui-decorators/overrides
|
|
20
|
+
*/
|
|
21
|
+
__exportStar(require("./ModelBuilderExtensions.cjs"), exports);
|
|
22
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/overrides/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;;GAGG;AACH,+DAAyC"}
|
|
@@ -5,7 +5,8 @@ const logging_1 = require("@decaf-ts/logging");
|
|
|
5
5
|
const db_decorators_1 = require("@decaf-ts/db-decorators");
|
|
6
6
|
const utils_1 = require("./utils.cjs");
|
|
7
7
|
/**
|
|
8
|
-
* Base class for all Decaf UI components
|
|
8
|
+
* @description Base class for all Decaf UI components
|
|
9
|
+
* @summary Base class for all Decaf UI components, providing common state management,
|
|
9
10
|
* logging, localization, navigation hooks, CRUD context metadata, and
|
|
10
11
|
* repository integration used by higher-level decorators and renderers.
|
|
11
12
|
*/
|
|
@@ -19,8 +20,6 @@ class DecafComponent extends logging_1.LoggedClass {
|
|
|
19
20
|
* controls whether the component should respond to dark mode changes and apply the
|
|
20
21
|
* dark palette class to its DOM element. By default, dark mode support is disabled.
|
|
21
22
|
* @protected
|
|
22
|
-
* @type {boolean}
|
|
23
|
-
* @default false
|
|
24
23
|
*/
|
|
25
24
|
this.enableDarkMode = true;
|
|
26
25
|
/**
|
|
@@ -30,8 +29,6 @@ class DecafComponent extends logging_1.LoggedClass {
|
|
|
30
29
|
* controls whether the component should respond to dark mode changes and apply the
|
|
31
30
|
* dark palette class to its DOM element. By default, dark mode support is disabled.
|
|
32
31
|
* @protected
|
|
33
|
-
* @type {boolean}
|
|
34
|
-
* @default false
|
|
35
32
|
*/
|
|
36
33
|
this.isDarkMode = false;
|
|
37
34
|
/**
|
|
@@ -41,8 +38,6 @@ class DecafComponent extends logging_1.LoggedClass {
|
|
|
41
38
|
* and other properties needed to render list items correctly. The tag property
|
|
42
39
|
* identifies which component should be used to render each item in a list.
|
|
43
40
|
* Additional properties can be included to customize the rendering behavior.
|
|
44
|
-
* @type {Record<string, unknown>}
|
|
45
|
-
* @default {tag: ""}
|
|
46
41
|
*/
|
|
47
42
|
this.item = { tag: "" };
|
|
48
43
|
/**
|
|
@@ -52,8 +47,6 @@ class DecafComponent extends logging_1.LoggedClass {
|
|
|
52
47
|
* requiring explicit input bindings for every possible configuration option. Properties from
|
|
53
48
|
* this object are parsed and applied to the component instance through the parseProps method,
|
|
54
49
|
* enabling customizable component behavior based on external configuration.
|
|
55
|
-
* @type {Record<string, unknown>}
|
|
56
|
-
* @default {}
|
|
57
50
|
*/
|
|
58
51
|
this.props = {};
|
|
59
52
|
/**
|
|
@@ -62,16 +55,12 @@ class DecafComponent extends logging_1.LoggedClass {
|
|
|
62
55
|
* This is often used as a prefix for constructing navigation URLs when transitioning between
|
|
63
56
|
* different operations or views. The route helps establish the component's position in the
|
|
64
57
|
* application's routing hierarchy.
|
|
65
|
-
* @type {string}
|
|
66
58
|
*/
|
|
67
59
|
this.route = "";
|
|
68
60
|
/**
|
|
69
61
|
* @description Controls whether borders are displayed around the component.
|
|
70
62
|
* @summary Boolean flag that determines if the component should be visually outlined with borders.
|
|
71
63
|
* When true, borders are shown to visually separate the component from surrounding content.
|
|
72
|
-
*
|
|
73
|
-
* @type {boolean}
|
|
74
|
-
* @default false
|
|
75
64
|
*/
|
|
76
65
|
this.borders = false;
|
|
77
66
|
/**
|
|
@@ -89,7 +78,6 @@ class DecafComponent extends logging_1.LoggedClass {
|
|
|
89
78
|
* @summary Tracks whether the component has completed its initialization process.
|
|
90
79
|
* This flag is used to prevent duplicate initialization and to determine if
|
|
91
80
|
* certain operations that require initialization can be performed.
|
|
92
|
-
* @type {boolean}
|
|
93
81
|
* @default false
|
|
94
82
|
*/
|
|
95
83
|
this.initialized = false;
|