@acorex/platform 21.0.0-next.76 → 21.0.0-next.79
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/fesm2022/{acorex-platform-common-common-settings.provider-ChoT4m4k.mjs → acorex-platform-common-common-settings.provider-Ytey9uhY.mjs} +1 -42
- package/fesm2022/acorex-platform-common-common-settings.provider-Ytey9uhY.mjs.map +1 -0
- package/fesm2022/acorex-platform-common.mjs +580 -1445
- package/fesm2022/acorex-platform-common.mjs.map +1 -1
- package/fesm2022/acorex-platform-contracts.mjs +1 -1330
- package/fesm2022/acorex-platform-contracts.mjs.map +1 -1
- package/fesm2022/acorex-platform-core.mjs +5 -208
- package/fesm2022/acorex-platform-core.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-components.mjs.map +1 -1
- package/fesm2022/{acorex-platform-layout-entity-attachments-page.component-B0EkdqvH.mjs → acorex-platform-layout-entity-attachments-page.component-CwG6n_Yb.mjs} +3 -3
- package/fesm2022/{acorex-platform-layout-entity-attachments-page.component-B0EkdqvH.mjs.map → acorex-platform-layout-entity-attachments-page.component-CwG6n_Yb.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-layout-entity-file-list-popup.component-_yrP5SQe.mjs → acorex-platform-layout-entity-file-list-popup.component--IeMZLIr.mjs} +4 -4
- package/fesm2022/{acorex-platform-layout-entity-file-list-popup.component-_yrP5SQe.mjs.map → acorex-platform-layout-entity-file-list-popup.component--IeMZLIr.mjs.map} +1 -1
- package/fesm2022/acorex-platform-layout-entity.mjs +694 -733
- package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-views.mjs +171 -372
- package/fesm2022/acorex-platform-layout-views.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-widget-core.mjs +103 -3
- package/fesm2022/acorex-platform-layout-widget-core.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-widgets-repeater-widget-column.component-J0zcGKBX.mjs +116 -0
- package/fesm2022/acorex-platform-layout-widgets-repeater-widget-column.component-J0zcGKBX.mjs.map +1 -0
- package/fesm2022/acorex-platform-layout-widgets.mjs +6 -11
- package/fesm2022/acorex-platform-layout-widgets.mjs.map +1 -1
- package/fesm2022/{acorex-platform-themes-default-entity-master-single-view.component-DrUwqKKA.mjs → acorex-platform-themes-default-entity-master-single-view.component-Br9p5aXT.mjs} +3 -2
- package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-Br9p5aXT.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default.mjs +52 -643
- package/fesm2022/acorex-platform-themes-default.mjs.map +1 -1
- package/fesm2022/acorex-platform-workflow.mjs +8 -5
- package/fesm2022/acorex-platform-workflow.mjs.map +1 -1
- package/package.json +1 -1
- package/types/acorex-platform-common.d.ts +1056 -337
- package/types/acorex-platform-contracts.d.ts +4 -1679
- package/types/acorex-platform-core.d.ts +181 -92
- package/types/acorex-platform-layout-components.d.ts +1 -2
- package/types/acorex-platform-layout-entity.d.ts +221 -99
- package/types/acorex-platform-layout-views.d.ts +5 -39
- package/types/acorex-platform-layout-widget-core.d.ts +3 -2
- package/types/acorex-platform-layout-widgets.d.ts +4 -11
- package/types/acorex-platform-themes-default.d.ts +57 -120
- package/types/acorex-platform-workflow.d.ts +18 -5
- package/fesm2022/acorex-platform-common-common-settings.provider-ChoT4m4k.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-repeater-widget-column.component-CFyfix31.mjs +0 -513
- package/fesm2022/acorex-platform-layout-widgets-repeater-widget-column.component-CFyfix31.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-DrUwqKKA.mjs.map +0 -1
|
@@ -1,962 +1,3 @@
|
|
|
1
|
-
//#region ---- CDK / component shims (pure contracts, no @acorex/cdk) ----
|
|
2
|
-
//#endregion
|
|
3
|
-
|
|
4
|
-
//#region ---- Mock data shims (no @acorex/core, no @acorex/platform/core) ----
|
|
5
|
-
/**
|
|
6
|
-
* Builds a locale map for mock seed data (`en-US` + `fa-IR`).
|
|
7
|
-
* Standalone copy for connectivity mocks — no dependency on @acorex/core/translation.
|
|
8
|
-
*/
|
|
9
|
-
function createMultiLanguageString(enUS, faIR) {
|
|
10
|
-
return {
|
|
11
|
-
'en-US': enUS,
|
|
12
|
-
'fa-IR': faIR ?? enUS,
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Resolves {@link AXPMultiLanguageString} to a plain string for the given locale.
|
|
17
|
-
* Standalone copy for connectivity mocks — no dependency on @acorex/core/translation.
|
|
18
|
-
*/
|
|
19
|
-
function resolveMultiLanguageString(value, locale) {
|
|
20
|
-
if (value == null || value === '') {
|
|
21
|
-
return '';
|
|
22
|
-
}
|
|
23
|
-
if (typeof value === 'string') {
|
|
24
|
-
return value;
|
|
25
|
-
}
|
|
26
|
-
const direct = value[locale];
|
|
27
|
-
if (typeof direct === 'string' && direct.length > 0) {
|
|
28
|
-
return direct;
|
|
29
|
-
}
|
|
30
|
-
const enUS = value['en-US'];
|
|
31
|
-
if (typeof enUS === 'string' && enUS.length > 0) {
|
|
32
|
-
return enUS;
|
|
33
|
-
}
|
|
34
|
-
for (const entry of Object.values(value)) {
|
|
35
|
-
if (typeof entry === 'string' && entry.length > 0) {
|
|
36
|
-
return entry;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
return '';
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* Lightweight data helpers for mock seed files.
|
|
43
|
-
* Standalone copy for connectivity mocks — no dependency on @acorex/platform/core.
|
|
44
|
-
*/
|
|
45
|
-
class AXPDataGenerator {
|
|
46
|
-
static uuid() {
|
|
47
|
-
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (char) => {
|
|
48
|
-
const random = (Math.random() * 16) | 0;
|
|
49
|
-
const value = char === 'x' ? random : (random & 0x3) | 0x8;
|
|
50
|
-
return value.toString(16);
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
static number(...args) {
|
|
54
|
-
let min = 0;
|
|
55
|
-
let max = 100;
|
|
56
|
-
if (args.length === 1)
|
|
57
|
-
max = args[0];
|
|
58
|
-
if (args.length === 2) {
|
|
59
|
-
min = args[0];
|
|
60
|
-
max = args[1];
|
|
61
|
-
}
|
|
62
|
-
return Math.floor(Math.random() * (max - min + 1)) + min;
|
|
63
|
-
}
|
|
64
|
-
static date(...args) {
|
|
65
|
-
let start = new Date(2000, 0, 1);
|
|
66
|
-
let end = new Date();
|
|
67
|
-
if (args.length === 1) {
|
|
68
|
-
start = args[0];
|
|
69
|
-
}
|
|
70
|
-
else if (args.length === 2) {
|
|
71
|
-
start = args[0];
|
|
72
|
-
end = args[1];
|
|
73
|
-
}
|
|
74
|
-
const startTime = start.getTime();
|
|
75
|
-
const endTime = end.getTime();
|
|
76
|
-
return new Date(startTime + Math.random() * (endTime - startTime));
|
|
77
|
-
}
|
|
78
|
-
static array(length = 5, generator) {
|
|
79
|
-
return Array.from({ length }, generator);
|
|
80
|
-
}
|
|
81
|
-
static pick(...args) {
|
|
82
|
-
if (args.length < 1) {
|
|
83
|
-
throw new Error('Invalid parameters');
|
|
84
|
-
}
|
|
85
|
-
const items = args[0];
|
|
86
|
-
const count = args[1] ?? 1;
|
|
87
|
-
if (count < 1) {
|
|
88
|
-
throw new Error('Count must be at least 1');
|
|
89
|
-
}
|
|
90
|
-
if (count >= items.length) {
|
|
91
|
-
return [...items].sort(() => Math.random() - 0.5);
|
|
92
|
-
}
|
|
93
|
-
const shuffled = items.slice();
|
|
94
|
-
for (let i = shuffled.length - 1; i > 0; i -= 1) {
|
|
95
|
-
const j = Math.floor(Math.random() * (i + 1));
|
|
96
|
-
[shuffled[i], shuffled[j]] = [shuffled[j], shuffled[i]];
|
|
97
|
-
}
|
|
98
|
-
return count === 1 ? shuffled.slice(0, count)[0] : shuffled.slice(0, count);
|
|
99
|
-
}
|
|
100
|
-
static string(length = 10) {
|
|
101
|
-
const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
|
|
102
|
-
return Array.from({ length }, () => chars.charAt(Math.floor(Math.random() * chars.length))).join('');
|
|
103
|
-
}
|
|
104
|
-
static boolean() {
|
|
105
|
-
return Math.random() >= 0.5;
|
|
106
|
-
}
|
|
107
|
-
static item(array = []) {
|
|
108
|
-
return array.length > 0 ? array[Math.floor(Math.random() * array.length)] : undefined;
|
|
109
|
-
}
|
|
110
|
-
static color(format = 'hex') {
|
|
111
|
-
const h = Math.floor(Math.random() * 360);
|
|
112
|
-
const s = Math.floor(Math.random() * 20) + 60;
|
|
113
|
-
const l = Math.floor(Math.random() * 20) + 40;
|
|
114
|
-
if (format === 'hsl') {
|
|
115
|
-
return `hsl(${h}, ${s}%, ${l}%)`;
|
|
116
|
-
}
|
|
117
|
-
const { r, g, b } = this.hslToRgb(h, s / 100, l / 100);
|
|
118
|
-
if (format === 'rgb') {
|
|
119
|
-
return `rgb(${r}, ${g}, ${b})`;
|
|
120
|
-
}
|
|
121
|
-
const toHex = (val) => val.toString(16).padStart(2, '0');
|
|
122
|
-
return `#${toHex(r)}${toHex(g)}${toHex(b)}`;
|
|
123
|
-
}
|
|
124
|
-
static hslToRgb(h, s, l) {
|
|
125
|
-
const c = (1 - Math.abs(2 * l - 1)) * s;
|
|
126
|
-
const x = c * (1 - Math.abs(((h / 60) % 2) - 1));
|
|
127
|
-
const m = l - c / 2;
|
|
128
|
-
let r = 0;
|
|
129
|
-
let g = 0;
|
|
130
|
-
let b = 0;
|
|
131
|
-
if (h < 60)
|
|
132
|
-
[r, g, b] = [c, x, 0];
|
|
133
|
-
else if (h < 120)
|
|
134
|
-
[r, g, b] = [x, c, 0];
|
|
135
|
-
else if (h < 180)
|
|
136
|
-
[r, g, b] = [0, c, x];
|
|
137
|
-
else if (h < 240)
|
|
138
|
-
[r, g, b] = [0, x, c];
|
|
139
|
-
else if (h < 300)
|
|
140
|
-
[r, g, b] = [x, 0, c];
|
|
141
|
-
else
|
|
142
|
-
[r, g, b] = [c, 0, x];
|
|
143
|
-
return {
|
|
144
|
-
r: Math.round((r + m) * 255),
|
|
145
|
-
g: Math.round((g + m) * 255),
|
|
146
|
-
b: Math.round((b + m) * 255),
|
|
147
|
-
};
|
|
148
|
-
}
|
|
149
|
-
static alphanumeric(length = 10) {
|
|
150
|
-
const chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';
|
|
151
|
-
return Array.from({ length }, () => chars.charAt(Math.floor(Math.random() * chars.length))).join('');
|
|
152
|
-
}
|
|
153
|
-
static alphabet(length = 10) {
|
|
154
|
-
const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';
|
|
155
|
-
return Array.from({ length }, () => chars.charAt(Math.floor(Math.random() * chars.length))).join('');
|
|
156
|
-
}
|
|
157
|
-
static phone() {
|
|
158
|
-
const areaCode = this.number(100, 999);
|
|
159
|
-
const exchangeCode = this.number(100, 999);
|
|
160
|
-
const lineNumber = this.number(1000, 9999);
|
|
161
|
-
return `${areaCode}-${exchangeCode}-${lineNumber}`;
|
|
162
|
-
}
|
|
163
|
-
static firstName() {
|
|
164
|
-
const firstNames = ['John', 'Allen', 'Jak', 'Rose', 'Kate', 'Liam', 'Olivia', 'Noah', 'Emma', 'Ava'];
|
|
165
|
-
return this.pick(firstNames);
|
|
166
|
-
}
|
|
167
|
-
static lastName() {
|
|
168
|
-
const lastNames = ['Gates', 'Jonsen', 'Smith', 'Ford', 'Jakson', 'Brown', 'Johnson', 'Williams', 'Jones', 'Garcia'];
|
|
169
|
-
return this.pick(lastNames);
|
|
170
|
-
}
|
|
171
|
-
static email(...args) {
|
|
172
|
-
const domains = ['gmail.com', 'yahoo.com', 'outlook.com', 'example.com'];
|
|
173
|
-
const domain = this.pick(domains);
|
|
174
|
-
const separator = this.pick(['.', '_', '']);
|
|
175
|
-
const randomSuffix = this.boolean() ? this.number(1, 99).toString() : '';
|
|
176
|
-
if (args.length === 2) {
|
|
177
|
-
const firstName = args[0].toLowerCase();
|
|
178
|
-
const lastName = args[1].toLowerCase();
|
|
179
|
-
return `${firstName}${separator}${lastName}${randomSuffix}@${domain}`;
|
|
180
|
-
}
|
|
181
|
-
const firstName = this.firstName().toLowerCase();
|
|
182
|
-
const lastName = this.lastName().toLowerCase();
|
|
183
|
-
return `${firstName}${separator}${lastName}${randomSuffix}@${domain}`;
|
|
184
|
-
}
|
|
185
|
-
static country() {
|
|
186
|
-
const countries = ['USA', 'Canada', 'Mexico', 'Germany', 'France', 'Japan', 'Australia'];
|
|
187
|
-
return this.pick(countries);
|
|
188
|
-
}
|
|
189
|
-
static city() {
|
|
190
|
-
const cities = ['Los Angeles', 'Toronto', 'Vancouver', 'Berlin', 'Paris', 'Tokyo', 'Sydney'];
|
|
191
|
-
return this.pick(cities);
|
|
192
|
-
}
|
|
193
|
-
static state() {
|
|
194
|
-
const states = ['NY', 'CA', 'TX', 'ON', 'BC', 'NSW', 'BER', 'IDF', 'TYO'];
|
|
195
|
-
return this.pick(states);
|
|
196
|
-
}
|
|
197
|
-
static address() {
|
|
198
|
-
const streets = ['Main St', 'High St', 'Maple Ave', 'Oak St', 'Pine St', 'Cedar St'];
|
|
199
|
-
const streetNumber = this.number(100, 9999);
|
|
200
|
-
const street = this.pick(streets);
|
|
201
|
-
const city = this.city();
|
|
202
|
-
const state = this.state();
|
|
203
|
-
const zip = this.number(10000, 99999);
|
|
204
|
-
const country = this.country();
|
|
205
|
-
return `${streetNumber} ${street}, ${city}, ${state} ${zip}, ${country}`;
|
|
206
|
-
}
|
|
207
|
-
static avatar() {
|
|
208
|
-
return `https://avatar.iran.liara.run/public/${this.pick([35, 22, 16, 6, 31])}`;
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
//#endregion
|
|
212
|
-
|
|
213
|
-
//#region ---- Core contract types (no Angular / no @acorex/*) ----
|
|
214
|
-
var AXPSystemActionType;
|
|
215
|
-
(function (AXPSystemActionType) {
|
|
216
|
-
AXPSystemActionType["View"] = "view";
|
|
217
|
-
AXPSystemActionType["Create"] = "create";
|
|
218
|
-
AXPSystemActionType["Update"] = "update";
|
|
219
|
-
AXPSystemActionType["Delete"] = "delete";
|
|
220
|
-
AXPSystemActionType["Approve"] = "approve";
|
|
221
|
-
AXPSystemActionType["Reject"] = "reject";
|
|
222
|
-
AXPSystemActionType["Submit"] = "submit";
|
|
223
|
-
AXPSystemActionType["Export"] = "export";
|
|
224
|
-
AXPSystemActionType["Import"] = "import";
|
|
225
|
-
AXPSystemActionType["Print"] = "print";
|
|
226
|
-
AXPSystemActionType["Assign"] = "assign";
|
|
227
|
-
AXPSystemActionType["Lock"] = "lock";
|
|
228
|
-
AXPSystemActionType["Unlock"] = "unlock";
|
|
229
|
-
AXPSystemActionType["Share"] = "share";
|
|
230
|
-
AXPSystemActionType["Configure"] = "configure";
|
|
231
|
-
AXPSystemActionType["Reorder"] = "reorder";
|
|
232
|
-
AXPSystemActionType["Preview"] = "preview";
|
|
233
|
-
AXPSystemActionType["Duplicate"] = "duplicate";
|
|
234
|
-
AXPSystemActionType["Archive"] = "archive";
|
|
235
|
-
AXPSystemActionType["Publish"] = "publish";
|
|
236
|
-
AXPSystemActionType["Unpublish"] = "unpublish";
|
|
237
|
-
AXPSystemActionType["Upload"] = "upload";
|
|
238
|
-
AXPSystemActionType["Download"] = "download";
|
|
239
|
-
AXPSystemActionType["Copy"] = "copy";
|
|
240
|
-
AXPSystemActionType["Move"] = "move";
|
|
241
|
-
AXPSystemActionType["Rename"] = "rename";
|
|
242
|
-
AXPSystemActionType["Restore"] = "restore";
|
|
243
|
-
AXPSystemActionType["Manage"] = "manage";
|
|
244
|
-
AXPSystemActionType["Info"] = "info";
|
|
245
|
-
AXPSystemActionType["Confirm"] = "confirm";
|
|
246
|
-
AXPSystemActionType["Design"] = "design";
|
|
247
|
-
AXPSystemActionType["VersionHistory"] = "version-history";
|
|
248
|
-
AXPSystemActionType["Compare"] = "compare";
|
|
249
|
-
AXPSystemActionType["Comments"] = "comments";
|
|
250
|
-
AXPSystemActionType["Sign"] = "sign";
|
|
251
|
-
AXPSystemActionType["Setup"] = "setup";
|
|
252
|
-
AXPSystemActionType["Send"] = "send";
|
|
253
|
-
AXPSystemActionType["Report"] = "report";
|
|
254
|
-
AXPSystemActionType["Sent"] = "sent";
|
|
255
|
-
AXPSystemActionType["Review"] = "review";
|
|
256
|
-
AXPSystemActionType["Generate"] = "generate";
|
|
257
|
-
AXPSystemActionType["Refresh"] = "refresh";
|
|
258
|
-
AXPSystemActionType["Reload"] = "reload";
|
|
259
|
-
AXPSystemActionType["Search"] = "search";
|
|
260
|
-
AXPSystemActionType["Filter"] = "filter";
|
|
261
|
-
AXPSystemActionType["Sort"] = "sort";
|
|
262
|
-
AXPSystemActionType["Start"] = "start";
|
|
263
|
-
AXPSystemActionType["Stop"] = "stop";
|
|
264
|
-
AXPSystemActionType["Pause"] = "pause";
|
|
265
|
-
AXPSystemActionType["Cancel"] = "cancel";
|
|
266
|
-
AXPSystemActionType["Close"] = "close";
|
|
267
|
-
AXPSystemActionType["Complete"] = "complete";
|
|
268
|
-
AXPSystemActionType["Save"] = "save";
|
|
269
|
-
AXPSystemActionType["SaveAs"] = "save-as";
|
|
270
|
-
AXPSystemActionType["Sync"] = "sync";
|
|
271
|
-
AXPSystemActionType["Reset"] = "reset";
|
|
272
|
-
AXPSystemActionType["Clear"] = "clear";
|
|
273
|
-
AXPSystemActionType["Distribution"] = "distribution";
|
|
274
|
-
})(AXPSystemActionType || (AXPSystemActionType = {}));
|
|
275
|
-
//#endregion
|
|
276
|
-
|
|
277
|
-
//#region ---- Category & entity operation types ----
|
|
278
|
-
//#endregion
|
|
279
|
-
|
|
280
|
-
//#region ---- Property types ----
|
|
281
|
-
//#endregion
|
|
282
|
-
|
|
283
|
-
//#region ---- Filter types ----
|
|
284
|
-
//#endregion
|
|
285
|
-
|
|
286
|
-
//#region ---- Entity model & DTO types ----
|
|
287
|
-
//#endregion
|
|
288
|
-
|
|
289
|
-
var AXPRelationshipKind;
|
|
290
|
-
(function (AXPRelationshipKind) {
|
|
291
|
-
AXPRelationshipKind[AXPRelationshipKind["Association"] = 0] = "Association";
|
|
292
|
-
AXPRelationshipKind[AXPRelationshipKind["Composition"] = 1] = "Composition";
|
|
293
|
-
AXPRelationshipKind[AXPRelationshipKind["Aggregation"] = 2] = "Aggregation";
|
|
294
|
-
})(AXPRelationshipKind || (AXPRelationshipKind = {}));
|
|
295
|
-
var AXPRelationshipCardinality;
|
|
296
|
-
(function (AXPRelationshipCardinality) {
|
|
297
|
-
AXPRelationshipCardinality[AXPRelationshipCardinality["OneToOne"] = 0] = "OneToOne";
|
|
298
|
-
AXPRelationshipCardinality[AXPRelationshipCardinality["OneToMany"] = 1] = "OneToMany";
|
|
299
|
-
AXPRelationshipCardinality[AXPRelationshipCardinality["ManyToMany"] = 2] = "ManyToMany";
|
|
300
|
-
})(AXPRelationshipCardinality || (AXPRelationshipCardinality = {}));
|
|
301
|
-
var AXPEntityCommandScope;
|
|
302
|
-
(function (AXPEntityCommandScope) {
|
|
303
|
-
AXPEntityCommandScope["TypeLevel"] = "typeLevel";
|
|
304
|
-
AXPEntityCommandScope["Selected"] = "selected";
|
|
305
|
-
AXPEntityCommandScope["Individual"] = "individual";
|
|
306
|
-
AXPEntityCommandScope["Section"] = "section";
|
|
307
|
-
})(AXPEntityCommandScope || (AXPEntityCommandScope = {}));
|
|
308
|
-
var AXPEntityQueryType;
|
|
309
|
-
(function (AXPEntityQueryType) {
|
|
310
|
-
AXPEntityQueryType["Single"] = "single";
|
|
311
|
-
AXPEntityQueryType["List"] = "list";
|
|
312
|
-
})(AXPEntityQueryType || (AXPEntityQueryType = {}));
|
|
313
|
-
/** Whether the card field is shown as a header badge (not in the card body). */
|
|
314
|
-
function isCardFieldBadgeDisplay(display) {
|
|
315
|
-
if (display === 'badge') {
|
|
316
|
-
return true;
|
|
317
|
-
}
|
|
318
|
-
return typeof display === 'object' && display !== null && display.type === 'badge';
|
|
319
|
-
}
|
|
320
|
-
/** Resolves static badge color config from {@link AXPCardField.display} and legacy {@link AXPCardField.badgeColor}. */
|
|
321
|
-
function resolveCardFieldBadgeColor(field) {
|
|
322
|
-
if (typeof field.display === 'object' && field.display.type === 'badge') {
|
|
323
|
-
return field.display.options?.color ?? field.badgeColor;
|
|
324
|
-
}
|
|
325
|
-
if (field.display === 'badge') {
|
|
326
|
-
return field.badgeColor;
|
|
327
|
-
}
|
|
328
|
-
return undefined;
|
|
329
|
-
}
|
|
330
|
-
function kebabCase(value) {
|
|
331
|
-
return value
|
|
332
|
-
.replace(/([a-z0-9])([A-Z])/g, '$1-$2')
|
|
333
|
-
.replace(/([A-Z])([A-Z][a-z])/g, '$1-$2')
|
|
334
|
-
.replace(/[\s_]+/g, '-')
|
|
335
|
-
.replace(/-+/g, '-')
|
|
336
|
-
.toLowerCase();
|
|
337
|
-
}
|
|
338
|
-
function getEntityInfo(entity) {
|
|
339
|
-
return {
|
|
340
|
-
source: `${entity.module}.${entity.name}`,
|
|
341
|
-
module: {
|
|
342
|
-
route: kebabCase(entity.module),
|
|
343
|
-
},
|
|
344
|
-
entity: {
|
|
345
|
-
route: kebabCase(entity.name),
|
|
346
|
-
},
|
|
347
|
-
};
|
|
348
|
-
}
|
|
349
|
-
function createQueryView(name, title, fixed, params = {
|
|
350
|
-
columns: [],
|
|
351
|
-
conditions: [],
|
|
352
|
-
sorts: [],
|
|
353
|
-
}) {
|
|
354
|
-
params = Object.assign({ columns: [], sorts: [], conditions: [] }, params);
|
|
355
|
-
return {
|
|
356
|
-
name,
|
|
357
|
-
title,
|
|
358
|
-
fixed,
|
|
359
|
-
columns: params.columns ?? [],
|
|
360
|
-
conditions: params.conditions ?? [],
|
|
361
|
-
sorts: params.sorts ?? [],
|
|
362
|
-
};
|
|
363
|
-
}
|
|
364
|
-
function createAllQueryView(params = {
|
|
365
|
-
columns: [],
|
|
366
|
-
sorts: [],
|
|
367
|
-
conditions: [],
|
|
368
|
-
}) {
|
|
369
|
-
params = Object.assign({ columns: [], sorts: [], conditions: [] }, params);
|
|
370
|
-
return createQueryView('all', '@general:terms.interface.selection.all-items', true, {
|
|
371
|
-
columns: params.columns ?? [],
|
|
372
|
-
conditions: params.conditions ?? [],
|
|
373
|
-
sorts: params.sorts ?? [],
|
|
374
|
-
});
|
|
375
|
-
}
|
|
376
|
-
/** Resolves master list layouts that are currently enabled. */
|
|
377
|
-
function resolveEnabledMasterListLayouts(layouts) {
|
|
378
|
-
if (!layouts) {
|
|
379
|
-
return ['table'];
|
|
380
|
-
}
|
|
381
|
-
const enabled = [];
|
|
382
|
-
if (layouts.table?.enabled !== false) {
|
|
383
|
-
enabled.push('table');
|
|
384
|
-
}
|
|
385
|
-
if (layouts.card && layouts.card.enabled !== false) {
|
|
386
|
-
enabled.push('card');
|
|
387
|
-
}
|
|
388
|
-
return enabled.length > 0 ? enabled : ['table'];
|
|
389
|
-
}
|
|
390
|
-
/** First enabled layout; used as the default when no user preference is stored. */
|
|
391
|
-
function resolveDefaultMasterListLayout(layouts) {
|
|
392
|
-
return resolveEnabledMasterListLayouts(layouts)[0];
|
|
393
|
-
}
|
|
394
|
-
// new version
|
|
395
|
-
var AXPEntityType;
|
|
396
|
-
(function (AXPEntityType) {
|
|
397
|
-
AXPEntityType[AXPEntityType["Entity"] = 0] = "Entity";
|
|
398
|
-
AXPEntityType[AXPEntityType["AggregateRoot"] = 1] = "AggregateRoot";
|
|
399
|
-
AXPEntityType[AXPEntityType["ValueObject"] = 2] = "ValueObject";
|
|
400
|
-
})(AXPEntityType || (AXPEntityType = {}));
|
|
401
|
-
|
|
402
|
-
//#region ---- Entity action helpers (pure data, no Angular) ----
|
|
403
|
-
//#region Master
|
|
404
|
-
function entityMasterCreateAction() {
|
|
405
|
-
return {
|
|
406
|
-
title: '@general:actions.create.title',
|
|
407
|
-
command: {
|
|
408
|
-
name: 'Entity:Create',
|
|
409
|
-
},
|
|
410
|
-
priority: 'primary',
|
|
411
|
-
type: AXPSystemActionType.Create,
|
|
412
|
-
scope: AXPEntityCommandScope.TypeLevel,
|
|
413
|
-
};
|
|
414
|
-
}
|
|
415
|
-
function entityMasterEditAction() {
|
|
416
|
-
return {
|
|
417
|
-
title: '@general:actions.edit.title',
|
|
418
|
-
command: 'Entity:Update',
|
|
419
|
-
priority: 'secondary',
|
|
420
|
-
type: AXPSystemActionType.Update,
|
|
421
|
-
scope: AXPEntityCommandScope.Individual,
|
|
422
|
-
default: true,
|
|
423
|
-
};
|
|
424
|
-
}
|
|
425
|
-
function entityMasterBulkDeleteAction() {
|
|
426
|
-
return {
|
|
427
|
-
title: '@general:actions.delete-items.title',
|
|
428
|
-
command: 'delete-entity',
|
|
429
|
-
priority: 'primary',
|
|
430
|
-
type: AXPSystemActionType.Delete,
|
|
431
|
-
scope: AXPEntityCommandScope.Selected,
|
|
432
|
-
order: 100,
|
|
433
|
-
};
|
|
434
|
-
}
|
|
435
|
-
function entityMasterViewAction() {
|
|
436
|
-
return {
|
|
437
|
-
title: '@general:actions.view.title',
|
|
438
|
-
command: 'open-entity',
|
|
439
|
-
priority: 'secondary',
|
|
440
|
-
type: AXPSystemActionType.View,
|
|
441
|
-
scope: AXPEntityCommandScope.Individual,
|
|
442
|
-
default: true,
|
|
443
|
-
};
|
|
444
|
-
}
|
|
445
|
-
function entityMasterDeleteAction() {
|
|
446
|
-
return {
|
|
447
|
-
title: '@general:actions.delete.title',
|
|
448
|
-
command: 'delete-entity',
|
|
449
|
-
priority: 'secondary',
|
|
450
|
-
type: AXPSystemActionType.Delete,
|
|
451
|
-
scope: AXPEntityCommandScope.Individual,
|
|
452
|
-
order: 100,
|
|
453
|
-
shortcuts: ['ctrl+shift+delete'],
|
|
454
|
-
};
|
|
455
|
-
}
|
|
456
|
-
function entityMasterCrudActions(options) {
|
|
457
|
-
const opts = {
|
|
458
|
-
create: true,
|
|
459
|
-
delete: true,
|
|
460
|
-
view: true,
|
|
461
|
-
edit: false,
|
|
462
|
-
...options,
|
|
463
|
-
};
|
|
464
|
-
const actions = [];
|
|
465
|
-
if (opts.create) {
|
|
466
|
-
actions.push(entityMasterCreateAction());
|
|
467
|
-
}
|
|
468
|
-
if (opts.delete) {
|
|
469
|
-
actions.push(entityMasterBulkDeleteAction());
|
|
470
|
-
actions.push(entityMasterDeleteAction());
|
|
471
|
-
}
|
|
472
|
-
if (opts.view) {
|
|
473
|
-
actions.push(entityMasterViewAction());
|
|
474
|
-
}
|
|
475
|
-
if (opts.edit) {
|
|
476
|
-
actions.push(entityMasterEditAction());
|
|
477
|
-
}
|
|
478
|
-
return actions;
|
|
479
|
-
}
|
|
480
|
-
function entityMasterRecordActions() {
|
|
481
|
-
return [entityMasterDeleteAction()];
|
|
482
|
-
}
|
|
483
|
-
//#endregion
|
|
484
|
-
//#region Details
|
|
485
|
-
function entityDetailsCreateActions(parentId) {
|
|
486
|
-
return {
|
|
487
|
-
title: '@general:actions.create.title',
|
|
488
|
-
command: {
|
|
489
|
-
name: 'Entity:Create',
|
|
490
|
-
options: {
|
|
491
|
-
process: {
|
|
492
|
-
redirect: false,
|
|
493
|
-
canCreateNewOne: true,
|
|
494
|
-
data: {
|
|
495
|
-
[parentId]: '{{context.eval("id")}}',
|
|
496
|
-
},
|
|
497
|
-
},
|
|
498
|
-
},
|
|
499
|
-
},
|
|
500
|
-
priority: 'primary',
|
|
501
|
-
type: AXPSystemActionType.Create,
|
|
502
|
-
scope: AXPEntityCommandScope.TypeLevel,
|
|
503
|
-
};
|
|
504
|
-
}
|
|
505
|
-
function entityDetailsCreateActionsDeferredParent() {
|
|
506
|
-
return {
|
|
507
|
-
title: '@general:actions.create.title',
|
|
508
|
-
command: {
|
|
509
|
-
name: 'Entity:Create',
|
|
510
|
-
options: {
|
|
511
|
-
process: {
|
|
512
|
-
redirect: false,
|
|
513
|
-
canCreateNewOne: true,
|
|
514
|
-
data: {},
|
|
515
|
-
},
|
|
516
|
-
},
|
|
517
|
-
},
|
|
518
|
-
priority: 'primary',
|
|
519
|
-
type: AXPSystemActionType.Create,
|
|
520
|
-
scope: AXPEntityCommandScope.TypeLevel,
|
|
521
|
-
};
|
|
522
|
-
}
|
|
523
|
-
function mergeForeignKeyFieldIntoCreateActions(foreignKeyField, actions) {
|
|
524
|
-
if (!foreignKeyField || !actions?.length) {
|
|
525
|
-
return actions ?? [];
|
|
526
|
-
}
|
|
527
|
-
return actions.map((a) => {
|
|
528
|
-
const cmd = a.command;
|
|
529
|
-
if (typeof cmd !== 'object' ||
|
|
530
|
-
!cmd ||
|
|
531
|
-
cmd.name !== 'Entity:Create' ||
|
|
532
|
-
a.scope !== AXPEntityCommandScope.TypeLevel) {
|
|
533
|
-
return a;
|
|
534
|
-
}
|
|
535
|
-
const opts = (cmd.options ?? {});
|
|
536
|
-
const proc = (opts['process'] ?? {});
|
|
537
|
-
const data = { ...(proc['data'] ?? {}) };
|
|
538
|
-
if (data[foreignKeyField] === undefined || data[foreignKeyField] === null || data[foreignKeyField] === '') {
|
|
539
|
-
data[foreignKeyField] = '{{ context.eval("id") }}';
|
|
540
|
-
}
|
|
541
|
-
return {
|
|
542
|
-
...a,
|
|
543
|
-
command: {
|
|
544
|
-
...cmd,
|
|
545
|
-
options: { ...opts, process: { ...proc, data } },
|
|
546
|
-
},
|
|
547
|
-
};
|
|
548
|
-
});
|
|
549
|
-
}
|
|
550
|
-
function collectNestedCreateHiddenProperties(relatedEntity) {
|
|
551
|
-
const fk = relatedEntity.persistence?.foreignKeyField;
|
|
552
|
-
const merged = [...(relatedEntity.excludeProperties ?? [])];
|
|
553
|
-
if (fk) {
|
|
554
|
-
merged.push(fk);
|
|
555
|
-
}
|
|
556
|
-
const unique = [...new Set(merged)];
|
|
557
|
-
return unique.length ? unique : undefined;
|
|
558
|
-
}
|
|
559
|
-
function entityDetailsSimpleCondition(fk) {
|
|
560
|
-
return {
|
|
561
|
-
name: fk,
|
|
562
|
-
operator: { type: 'equal' },
|
|
563
|
-
value: '{{context.eval("id")}}',
|
|
564
|
-
};
|
|
565
|
-
}
|
|
566
|
-
function entityDetailsReferenceCondition(type) {
|
|
567
|
-
return [
|
|
568
|
-
{
|
|
569
|
-
name: 'reference.id',
|
|
570
|
-
operator: { type: 'equal' },
|
|
571
|
-
value: '{{context.eval("id")}}',
|
|
572
|
-
},
|
|
573
|
-
{
|
|
574
|
-
name: 'reference.type',
|
|
575
|
-
operator: { type: 'equal' },
|
|
576
|
-
value: type,
|
|
577
|
-
},
|
|
578
|
-
];
|
|
579
|
-
}
|
|
580
|
-
function entityDetailsEditAction() {
|
|
581
|
-
return {
|
|
582
|
-
title: '@general:actions.edit.title',
|
|
583
|
-
command: 'Entity:Update',
|
|
584
|
-
priority: 'secondary',
|
|
585
|
-
type: AXPSystemActionType.Update,
|
|
586
|
-
default: true,
|
|
587
|
-
scope: AXPEntityCommandScope.Individual,
|
|
588
|
-
};
|
|
589
|
-
}
|
|
590
|
-
function entityDetailsNewEditAction() {
|
|
591
|
-
return {
|
|
592
|
-
title: 'New Edit',
|
|
593
|
-
command: {
|
|
594
|
-
name: 'Entity:Update',
|
|
595
|
-
},
|
|
596
|
-
priority: 'secondary',
|
|
597
|
-
type: AXPSystemActionType.Update,
|
|
598
|
-
default: true,
|
|
599
|
-
scope: AXPEntityCommandScope.Individual,
|
|
600
|
-
};
|
|
601
|
-
}
|
|
602
|
-
function entityOverrideDetailsViewAction() {
|
|
603
|
-
return {
|
|
604
|
-
title: '@general:actions.view.title',
|
|
605
|
-
command: 'open-entity',
|
|
606
|
-
priority: 'secondary',
|
|
607
|
-
hidden: true,
|
|
608
|
-
type: AXPSystemActionType.View,
|
|
609
|
-
scope: AXPEntityCommandScope.Individual,
|
|
610
|
-
};
|
|
611
|
-
}
|
|
612
|
-
function entityDetailsCrudActions(parentId, options) {
|
|
613
|
-
const opts = {
|
|
614
|
-
create: true,
|
|
615
|
-
delete: true,
|
|
616
|
-
view: true,
|
|
617
|
-
edit: true,
|
|
618
|
-
...options,
|
|
619
|
-
};
|
|
620
|
-
const actions = [];
|
|
621
|
-
if (opts.create) {
|
|
622
|
-
if (parentId) {
|
|
623
|
-
actions.push(entityDetailsCreateActions(parentId));
|
|
624
|
-
}
|
|
625
|
-
else {
|
|
626
|
-
actions.push(entityDetailsCreateActionsDeferredParent());
|
|
627
|
-
}
|
|
628
|
-
}
|
|
629
|
-
if (opts.edit) {
|
|
630
|
-
actions.push(entityDetailsEditAction());
|
|
631
|
-
}
|
|
632
|
-
if (opts.view) {
|
|
633
|
-
actions.push(entityOverrideDetailsViewAction());
|
|
634
|
-
}
|
|
635
|
-
return actions;
|
|
636
|
-
}
|
|
637
|
-
function entityDetailsReferenceCreateActions(type) {
|
|
638
|
-
return [
|
|
639
|
-
{
|
|
640
|
-
title: '@general:actions.create.title',
|
|
641
|
-
command: {
|
|
642
|
-
name: 'Entity:Create',
|
|
643
|
-
options: {
|
|
644
|
-
process: {
|
|
645
|
-
redirect: false,
|
|
646
|
-
canCreateNewOne: true,
|
|
647
|
-
data: {
|
|
648
|
-
reference: {
|
|
649
|
-
id: '{{context.eval("id")}}',
|
|
650
|
-
type: type,
|
|
651
|
-
},
|
|
652
|
-
},
|
|
653
|
-
},
|
|
654
|
-
},
|
|
655
|
-
},
|
|
656
|
-
priority: 'primary',
|
|
657
|
-
type: AXPSystemActionType.Create,
|
|
658
|
-
scope: AXPEntityCommandScope.TypeLevel,
|
|
659
|
-
},
|
|
660
|
-
entityDetailsEditAction(),
|
|
661
|
-
entityOverrideDetailsViewAction(),
|
|
662
|
-
];
|
|
663
|
-
}
|
|
664
|
-
//#endregion
|
|
665
|
-
|
|
666
|
-
//#region ---- Entity datasource keys ----
|
|
667
|
-
/** Platform entity layout datasource registry names. */
|
|
668
|
-
const AXPEntityDataSourceKeys = {
|
|
669
|
-
Entities: 'entities',
|
|
670
|
-
};
|
|
671
|
-
//#endregion
|
|
672
|
-
|
|
673
|
-
//#region ---- Regional setting keys ----
|
|
674
|
-
/**
|
|
675
|
-
* Regional and locale-related setting keys used by platform widgets and components.
|
|
676
|
-
* Most values use the `LocaleManagement:Setting:Regional.*` prefix; definitions live in the locale-management module where applicable.
|
|
677
|
-
*/
|
|
678
|
-
var AXPRegionalSetting;
|
|
679
|
-
(function (AXPRegionalSetting) {
|
|
680
|
-
AXPRegionalSetting["LocaleProfile"] = "LocaleManagement:Setting:Regional.LocaleProfile";
|
|
681
|
-
AXPRegionalSetting["TimeZone"] = "LocaleManagement:Setting:Regional.TimeZone";
|
|
682
|
-
AXPRegionalSetting["Language"] = "LocaleManagement:Setting:Regional.Language";
|
|
683
|
-
AXPRegionalSetting["Country"] = "LocaleManagement:Setting:Regional.Country";
|
|
684
|
-
AXPRegionalSetting["Calendar"] = "LocaleManagement:Setting:Regional.Calendar";
|
|
685
|
-
/** User-selected holiday calendars shown on the task board and other calendar views. */
|
|
686
|
-
AXPRegionalSetting["CalendarEvents"] = "LocaleManagement:Setting:Regional.CalendarEvents";
|
|
687
|
-
AXPRegionalSetting["FirstDayOfWeek"] = "LocaleManagement:Setting:Regional.FirstDayOfWeek";
|
|
688
|
-
AXPRegionalSetting["WeekendDays"] = "LocaleManagement:Setting:Regional.WeekendDays";
|
|
689
|
-
AXPRegionalSetting["ShortDate"] = "LocaleManagement:Setting:Regional.ShortDate";
|
|
690
|
-
AXPRegionalSetting["MediumDate"] = "LocaleManagement:Setting:Regional.MediumDate";
|
|
691
|
-
AXPRegionalSetting["LongDate"] = "LocaleManagement:Setting:Regional.LongDate";
|
|
692
|
-
AXPRegionalSetting["ShortTime"] = "LocaleManagement:Setting:Regional.ShortTime";
|
|
693
|
-
AXPRegionalSetting["MediumTime"] = "LocaleManagement:Setting:Regional.MediumTime";
|
|
694
|
-
AXPRegionalSetting["LongTime"] = "LocaleManagement:Setting:Regional.LongTime";
|
|
695
|
-
AXPRegionalSetting["MeasurementUnits"] = "LocaleManagement:Setting:Regional.MeasurementUnits";
|
|
696
|
-
AXPRegionalSetting["TemperatureUnits"] = "LocaleManagement:Setting:Regional.TemperatureUnits";
|
|
697
|
-
AXPRegionalSetting["DistanceUnits"] = "LocaleManagement:Setting:Regional.DistanceUnits";
|
|
698
|
-
AXPRegionalSetting["WeightUnits"] = "LocaleManagement:Setting:Regional.WeightUnits";
|
|
699
|
-
AXPRegionalSetting["VolumeUnits"] = "LocaleManagement:Setting:Regional.VolumeUnits";
|
|
700
|
-
AXPRegionalSetting["SpeedUnits"] = "LocaleManagement:Setting:Regional.SpeedUnits";
|
|
701
|
-
AXPRegionalSetting["AreaUnits"] = "LocaleManagement:Setting:Regional.AreaUnits";
|
|
702
|
-
/** Default multi-language behavior for standard text field names; defined in locale-management `AXMRegionalSettingProvider`. */
|
|
703
|
-
AXPRegionalSetting["MultiLanguageSupport"] = "LocaleManagement:Setting:Regional.MultiLanguageSupport";
|
|
704
|
-
})(AXPRegionalSetting || (AXPRegionalSetting = {}));
|
|
705
|
-
//#endregion
|
|
706
|
-
|
|
707
|
-
//#region ---- Widget node types ----
|
|
708
|
-
//#endregion
|
|
709
|
-
|
|
710
|
-
const AXPWidgetsList = {
|
|
711
|
-
Editors: {
|
|
712
|
-
DocumentAttachment: 'document-attachment-editor',
|
|
713
|
-
TagEditor: 'tag-editor',
|
|
714
|
-
CheckBox: 'checkbox-editor',
|
|
715
|
-
ColorBox: 'color-editor',
|
|
716
|
-
ColorPalette: 'color-palette-editor',
|
|
717
|
-
DateTimeBox: 'date-time-editor',
|
|
718
|
-
AddressBox: 'address-editor',
|
|
719
|
-
Direction: 'direction',
|
|
720
|
-
LargeTextBox: 'large-text-editor',
|
|
721
|
-
NumberBox: 'number-editor',
|
|
722
|
-
UnitValueBox: 'number-unit-editor',
|
|
723
|
-
PasswordBox: 'password-editor',
|
|
724
|
-
QueryBuilder: 'query-builder-editor',
|
|
725
|
-
RichText: 'rich-text-editor',
|
|
726
|
-
SelectBox: 'select-editor',
|
|
727
|
-
SelectionList: 'selection-list-editor',
|
|
728
|
-
TextBox: 'text-editor',
|
|
729
|
-
InlineDataTable: 'table-editor',
|
|
730
|
-
ToggleSwitch: 'toggle-editor',
|
|
731
|
-
FileTypeExtension: 'file-type-extension',
|
|
732
|
-
MapBox: 'map',
|
|
733
|
-
MediaGallery: 'gallery',
|
|
734
|
-
SignatureBox: 'signature',
|
|
735
|
-
LookupBox: 'lookup-editor',
|
|
736
|
-
MultiSourceSelector: 'multi-source-selector-editor',
|
|
737
|
-
EntityCategory: 'entity-category-editor',
|
|
738
|
-
ContactBox: 'contact-editor',
|
|
739
|
-
MetaDataBox: 'meta-data-editor',
|
|
740
|
-
TemplateBox: 'template-box-editor',
|
|
741
|
-
TemplateContentEditor: 'template-content-editor',
|
|
742
|
-
TimeDuration: 'time-duration',
|
|
743
|
-
DocumentUploader: 'document-uploader',
|
|
744
|
-
MetaSelector: 'meta-selector-editor',
|
|
745
|
-
MetaDataForm: 'meta-data-form-editor',
|
|
746
|
-
ColumnFilterSelector: 'column-filter-selector-editor',
|
|
747
|
-
DataListFilter: 'data-list-filter-editor',
|
|
748
|
-
ListEditor: 'list-editor',
|
|
749
|
-
ConnectedListsEditor: 'connected-lists-editor',
|
|
750
|
-
SkillMatrix: 'skill-matrix-editor',
|
|
751
|
-
ResponsibilitiesMatrix: 'responsibilities-matrix-editor',
|
|
752
|
-
RiskMatrix: 'risk-matrix-editor',
|
|
753
|
-
ProgressBox: 'progress-bar-editor',
|
|
754
|
-
RatePicker: 'rate-picker-editor',
|
|
755
|
-
ActivityCommandConfigurator: 'activity-command-configurator',
|
|
756
|
-
WorkflowConfigurator: 'workflow-configurator',
|
|
757
|
-
},
|
|
758
|
-
Layouts: {
|
|
759
|
-
AlertBox: 'alert-box-layout',
|
|
760
|
-
BadgeLayout: 'badge-layout',
|
|
761
|
-
BlockLayout: 'block-layout',
|
|
762
|
-
RepeaterLayout: 'repeater-layout',
|
|
763
|
-
TextBlockLayout: 'text-block-layout',
|
|
764
|
-
FormField: 'form-field',
|
|
765
|
-
PanelLayout: 'panel-layout',
|
|
766
|
-
PageLayout: 'page-layout',
|
|
767
|
-
DocumentLayout: 'document-layout',
|
|
768
|
-
GridRowLayout: 'grid-row-layout',
|
|
769
|
-
GridItemLayout: 'grid-item-layout',
|
|
770
|
-
GridLayout: 'grid-layout',
|
|
771
|
-
FlexLayout: 'flex-layout',
|
|
772
|
-
FlexItemLayout: 'flex-item-layout',
|
|
773
|
-
AdvancedGridLayout: 'advanced-grid-layout',
|
|
774
|
-
AdvancedGridItemLayout: 'advanced-grid-item-layout',
|
|
775
|
-
FieldsetLayout: 'fieldset-layout',
|
|
776
|
-
TabsetLayout: 'tabset-layout',
|
|
777
|
-
TabsetItemLayout: 'tabset-item',
|
|
778
|
-
},
|
|
779
|
-
Actions: {
|
|
780
|
-
ActionButton: 'button-action',
|
|
781
|
-
},
|
|
782
|
-
Advanced: {
|
|
783
|
-
CodeEditor: 'code-editor',
|
|
784
|
-
JsonViewer: 'json-viewer',
|
|
785
|
-
OutcomeResultsViewer: 'outcome-results-viewer',
|
|
786
|
-
QRCode: 'qrcode',
|
|
787
|
-
schedulerPicker: 'scheduler-picker',
|
|
788
|
-
Signature: 'signature',
|
|
789
|
-
Map: 'map',
|
|
790
|
-
Gallery: 'gallery',
|
|
791
|
-
Image: 'image',
|
|
792
|
-
ImageMarker: 'image-marker',
|
|
793
|
-
Avatar: 'avatar',
|
|
794
|
-
Attachments: 'attachments',
|
|
795
|
-
DataList: 'data-list',
|
|
796
|
-
ListToolbar: 'list-toolbar',
|
|
797
|
-
CronJob: 'cron-job',
|
|
798
|
-
Status: 'status-widget',
|
|
799
|
-
WidgetFieldConfigurator: 'widget-field-configurator',
|
|
800
|
-
AnswersViewer: 'answers-viewer',
|
|
801
|
-
},
|
|
802
|
-
Templates: {
|
|
803
|
-
Designer: 'template-designer',
|
|
804
|
-
Template: 'template',
|
|
805
|
-
},
|
|
806
|
-
// Filters: {
|
|
807
|
-
// StringFilter: 'string-filter',
|
|
808
|
-
// SelectFilter: 'select-filter',
|
|
809
|
-
// NumberFilter: 'number-filter',
|
|
810
|
-
// DateTimeFilter: 'datetime-filter',
|
|
811
|
-
// BooleanFilter: 'boolean-filter',
|
|
812
|
-
// LookupFilter: 'lookup-filter',
|
|
813
|
-
// },
|
|
814
|
-
// PropertyEditors: {
|
|
815
|
-
// Spacing: 'spacing',
|
|
816
|
-
// GridOptions: 'grid-options',
|
|
817
|
-
// GridItemOptions: 'grid-item-options',
|
|
818
|
-
// FlexOptions: 'flex-options',
|
|
819
|
-
// FlexItemOptions: 'flex-item-options',
|
|
820
|
-
// Direction: 'direction',
|
|
821
|
-
// Border: 'border',
|
|
822
|
-
// AdvancedGridOptions: 'advanced-grid-options',
|
|
823
|
-
// },
|
|
824
|
-
// Validations: {
|
|
825
|
-
// RequiredValidation: 'required-validation',
|
|
826
|
-
// RegularExpressionValidation: 'regular-expression-validation',
|
|
827
|
-
// MinLengthValidation: 'min-length-validation',
|
|
828
|
-
// MaxLengthValidation: 'max-length-validation',
|
|
829
|
-
// LessThanValidation: 'less-than-validation',
|
|
830
|
-
// GreaterThanValidation: 'greater-than-validation',
|
|
831
|
-
// EqualValidation: 'equal-validation',
|
|
832
|
-
// CallbackValidation: 'callback-validation',
|
|
833
|
-
// BetweenValidation: 'between-validation',
|
|
834
|
-
// },
|
|
835
|
-
Entity: {
|
|
836
|
-
EntityList: 'entity-list',
|
|
837
|
-
SelectorStructure: 'selector-structure',
|
|
838
|
-
},
|
|
839
|
-
Providers: {
|
|
840
|
-
EntityDefinition: 'entity-definition-provider-editor',
|
|
841
|
-
},
|
|
842
|
-
ExpressionBuilders: {
|
|
843
|
-
ConditionBuilder: 'condition-builder-editor',
|
|
844
|
-
},
|
|
845
|
-
Theme: {
|
|
846
|
-
ThemeColorChooser: 'theme-color-chooser',
|
|
847
|
-
// ThemeModeChooser: 'theme-mode-chooser',
|
|
848
|
-
IconChooser: 'icon-chooser',
|
|
849
|
-
FontSizeChooser: 'font-size-chooser',
|
|
850
|
-
FontStyleChooser: 'font-style-chooser',
|
|
851
|
-
// MenuOrientationChooser: 'menu-orientation-chooser',
|
|
852
|
-
},
|
|
853
|
-
// Features: {
|
|
854
|
-
// Comment: 'comment',
|
|
855
|
-
// Permissions: 'permissions',
|
|
856
|
-
// },
|
|
857
|
-
};
|
|
858
|
-
|
|
859
|
-
//#region ---- Widget catalog (deprecated; prefer AXPWidgetsList) ----
|
|
860
|
-
const AXPWidgetsCatalog = {
|
|
861
|
-
timeDuration: 'time-duration',
|
|
862
|
-
timeDurationFilter: 'time-duration-filter',
|
|
863
|
-
checkbox: 'checkbox-editor',
|
|
864
|
-
color: 'color-editor',
|
|
865
|
-
connectedLists: 'connected-lists-editor',
|
|
866
|
-
contact: 'contact-editor',
|
|
867
|
-
dateTime: 'date-time-editor',
|
|
868
|
-
largeText: 'large-text-editor',
|
|
869
|
-
number: 'number-editor',
|
|
870
|
-
numberUnit: 'number-unit-editor',
|
|
871
|
-
password: 'password-editor',
|
|
872
|
-
richText: 'rich-text-editor',
|
|
873
|
-
select: 'select-editor',
|
|
874
|
-
selectionList: 'selection-list-editor',
|
|
875
|
-
text: 'text-editor',
|
|
876
|
-
table: 'table-editor',
|
|
877
|
-
toggle: 'toggle-editor',
|
|
878
|
-
blockLayout: 'block-layout',
|
|
879
|
-
pageLayout: 'page-layout',
|
|
880
|
-
repeaterLayout: 'repeater-layout',
|
|
881
|
-
textBlockLayout: 'text-block-layout',
|
|
882
|
-
alertBoxLayout: 'alert-box-layout',
|
|
883
|
-
badgeLayout: 'badge-layout',
|
|
884
|
-
attachments: 'attachments',
|
|
885
|
-
fileTypeExtension: 'file-type-extension',
|
|
886
|
-
map: 'map',
|
|
887
|
-
imageMarker: 'image-marker',
|
|
888
|
-
image: 'image',
|
|
889
|
-
gallery: 'gallery',
|
|
890
|
-
signature: 'signature',
|
|
891
|
-
buttonAction: 'button-action',
|
|
892
|
-
document: 'document-layout',
|
|
893
|
-
lookup: 'lookup-editor',
|
|
894
|
-
formField: 'form-field',
|
|
895
|
-
qrcode: 'qrcode',
|
|
896
|
-
schedulerPicker: 'scheduler-picker',
|
|
897
|
-
advancedGrid: 'advanced-grid-layout',
|
|
898
|
-
advancedGridItem: 'advanced-grid-item-layout',
|
|
899
|
-
grid: 'grid-layout',
|
|
900
|
-
gridItem: 'grid-item-layout',
|
|
901
|
-
template: 'template',
|
|
902
|
-
templateDesigner: 'template-designer',
|
|
903
|
-
cronJob: 'cron-job',
|
|
904
|
-
spacing: 'spacing',
|
|
905
|
-
direction: 'direction',
|
|
906
|
-
border: 'border',
|
|
907
|
-
flexLayout: 'flex-layout',
|
|
908
|
-
flexItem: 'flex-item-layout',
|
|
909
|
-
tableLayout: 'table-layout',
|
|
910
|
-
tableItem: 'table-item-layout',
|
|
911
|
-
avatar: 'avatar',
|
|
912
|
-
themeModeChooser: 'theme-mode-chooser',
|
|
913
|
-
menuOrientationChooser: 'menu-orientation-chooser',
|
|
914
|
-
fontStyleChooser: 'font-style-chooser',
|
|
915
|
-
fontSizeChooser: 'font-size-chooser',
|
|
916
|
-
iconChooser: 'icon-chooser',
|
|
917
|
-
icon: 'icon',
|
|
918
|
-
themeColorChooser: 'theme-color-chooser',
|
|
919
|
-
gridOptions: 'grid-options',
|
|
920
|
-
gridItemOptions: 'grid-item-options',
|
|
921
|
-
advancedGridOptions: 'advanced-grid-options',
|
|
922
|
-
stringFilter: 'string-filter',
|
|
923
|
-
numberFilter: 'number-filter',
|
|
924
|
-
dateTimeFilter: 'datetime-filter',
|
|
925
|
-
booleanFilter: 'boolean-filter',
|
|
926
|
-
lookupFilter: 'lookup-filter',
|
|
927
|
-
flexOptions: 'flex-options',
|
|
928
|
-
flexItemOptions: 'flex-item-options',
|
|
929
|
-
selectFilter: 'select-filter',
|
|
930
|
-
requiredValidation: 'required-validation',
|
|
931
|
-
regularExpressionValidation: 'regular-expression-validation',
|
|
932
|
-
minLengthValidation: 'min-length-validation',
|
|
933
|
-
maxLengthValidation: 'max-length-validation',
|
|
934
|
-
lessThanValidation: 'less-than-validation',
|
|
935
|
-
greaterThanValidation: 'greater-than-validation',
|
|
936
|
-
betweenValidation: 'between-validation',
|
|
937
|
-
equalValidation: 'equal-validation',
|
|
938
|
-
callbackValidation: 'callback-validation',
|
|
939
|
-
metaData: 'meta-data-editor',
|
|
940
|
-
templateEditor: 'template-box-editor',
|
|
941
|
-
templateContentEditor: 'template-content-editor',
|
|
942
|
-
panel: 'panel',
|
|
943
|
-
notification: 'notification',
|
|
944
|
-
comment: 'comment',
|
|
945
|
-
list: 'list-editor',
|
|
946
|
-
dataList: 'data-list',
|
|
947
|
-
listToolbar: 'list-toolbar',
|
|
948
|
-
entityList: 'entity-list',
|
|
949
|
-
pageComponent: 'page-component',
|
|
950
|
-
editorJs: 'editor-js-editor',
|
|
951
|
-
documentUploader: 'document-uploader',
|
|
952
|
-
stepWizard: 'step-wizard',
|
|
953
|
-
progressBar: 'progress-bar-editor',
|
|
954
|
-
rate: 'rate-picker-editor',
|
|
955
|
-
documentFileTypeFilter: 'document-file-type-filter',
|
|
956
|
-
entityDefinitionProvider: 'entity-definition-provider-editor',
|
|
957
|
-
};
|
|
958
|
-
//#endregion
|
|
959
|
-
|
|
960
1
|
//#region ---- Address Data Types ----
|
|
961
2
|
//#endregion
|
|
962
3
|
|
|
@@ -986,376 +27,6 @@ var AXPFileStorageStatus;
|
|
|
986
27
|
AXPFileStorageStatus["Error"] = "error";
|
|
987
28
|
})(AXPFileStorageStatus || (AXPFileStorageStatus = {}));
|
|
988
29
|
|
|
989
|
-
//#region ---- AI output contract types ----
|
|
990
|
-
//#endregion
|
|
991
|
-
|
|
992
|
-
//#region ---- Spreadsheet data types ----
|
|
993
|
-
//#endregion
|
|
994
|
-
|
|
995
|
-
//#region ---- System status types ----
|
|
996
|
-
/** Standard system status types used across the platform. */
|
|
997
|
-
var AXPSystemStatusType;
|
|
998
|
-
(function (AXPSystemStatusType) {
|
|
999
|
-
AXPSystemStatusType["Todo"] = "todo";
|
|
1000
|
-
AXPSystemStatusType["InProgress"] = "in-progress";
|
|
1001
|
-
AXPSystemStatusType["InReview"] = "in-review";
|
|
1002
|
-
AXPSystemStatusType["Open"] = "open";
|
|
1003
|
-
AXPSystemStatusType["Closed"] = "closed";
|
|
1004
|
-
AXPSystemStatusType["Blocked"] = "blocked";
|
|
1005
|
-
AXPSystemStatusType["Done"] = "done";
|
|
1006
|
-
AXPSystemStatusType["Cancelled"] = "cancelled";
|
|
1007
|
-
AXPSystemStatusType["Draft"] = "draft";
|
|
1008
|
-
AXPSystemStatusType["PendingReview"] = "pending-review";
|
|
1009
|
-
AXPSystemStatusType["WaitingSignOff"] = "waiting-sign-off";
|
|
1010
|
-
AXPSystemStatusType["WaitingApproval"] = "waiting-approval";
|
|
1011
|
-
AXPSystemStatusType["Approved"] = "approved";
|
|
1012
|
-
AXPSystemStatusType["Published"] = "published";
|
|
1013
|
-
AXPSystemStatusType["Archived"] = "archived";
|
|
1014
|
-
AXPSystemStatusType["Rejected"] = "rejected";
|
|
1015
|
-
AXPSystemStatusType["Active"] = "active";
|
|
1016
|
-
AXPSystemStatusType["Inactive"] = "inactive";
|
|
1017
|
-
AXPSystemStatusType["Pending"] = "pending";
|
|
1018
|
-
AXPSystemStatusType["Completed"] = "completed";
|
|
1019
|
-
AXPSystemStatusType["Suspended"] = "suspended";
|
|
1020
|
-
AXPSystemStatusType["Failed"] = "failed";
|
|
1021
|
-
AXPSystemStatusType["Review"] = "review";
|
|
1022
|
-
AXPSystemStatusType["Expired"] = "expired";
|
|
1023
|
-
})(AXPSystemStatusType || (AXPSystemStatusType = {}));
|
|
1024
|
-
//#endregion
|
|
1025
|
-
|
|
1026
|
-
/**
|
|
1027
|
-
* Status Definition Types
|
|
1028
|
-
* Defines the structure for status definitions and their transitions
|
|
1029
|
-
*/
|
|
1030
|
-
/**
|
|
1031
|
-
* Abstract class for status providers
|
|
1032
|
-
* Similar to AXPTaskBadgeProvider pattern
|
|
1033
|
-
*/
|
|
1034
|
-
class AXPStatusProvider {
|
|
1035
|
-
}
|
|
1036
|
-
//#endregion
|
|
1037
|
-
|
|
1038
|
-
const i18n = (key) => `@general:statuses.${key}`;
|
|
1039
|
-
/**
|
|
1040
|
-
* Standard system status definitions
|
|
1041
|
-
* Provides consistent status definitions across the platform
|
|
1042
|
-
* Uses AXPStatusDefinition interface from status-definition.types.ts
|
|
1043
|
-
*/
|
|
1044
|
-
const AXPSystemStatuses = Object.freeze({
|
|
1045
|
-
Open: {
|
|
1046
|
-
name: AXPSystemStatusType.Open,
|
|
1047
|
-
title: i18n('open.title'),
|
|
1048
|
-
icon: 'fa-light fa-circle',
|
|
1049
|
-
color: 'secondary',
|
|
1050
|
-
description: i18n('open.description'),
|
|
1051
|
-
order: 1,
|
|
1052
|
-
isInitial: true,
|
|
1053
|
-
isFinal: false,
|
|
1054
|
-
},
|
|
1055
|
-
Closed: {
|
|
1056
|
-
name: AXPSystemStatusType.Closed,
|
|
1057
|
-
title: i18n('closed.title'),
|
|
1058
|
-
icon: 'fa-light fa-circle',
|
|
1059
|
-
color: 'danger',
|
|
1060
|
-
description: i18n('closed.description'),
|
|
1061
|
-
order: 2,
|
|
1062
|
-
isInitial: false,
|
|
1063
|
-
isFinal: true,
|
|
1064
|
-
},
|
|
1065
|
-
Todo: {
|
|
1066
|
-
name: AXPSystemStatusType.Todo,
|
|
1067
|
-
title: i18n('todo.title'),
|
|
1068
|
-
icon: 'fa-light fa-circle',
|
|
1069
|
-
color: 'secondary',
|
|
1070
|
-
description: i18n('todo.description'),
|
|
1071
|
-
order: 1,
|
|
1072
|
-
isInitial: true,
|
|
1073
|
-
isFinal: false,
|
|
1074
|
-
},
|
|
1075
|
-
InProgress: {
|
|
1076
|
-
name: AXPSystemStatusType.InProgress,
|
|
1077
|
-
title: i18n('in-progress.title'),
|
|
1078
|
-
icon: 'fa-light fa-play',
|
|
1079
|
-
color: 'info',
|
|
1080
|
-
description: i18n('in-progress.description'),
|
|
1081
|
-
order: 2,
|
|
1082
|
-
isInitial: false,
|
|
1083
|
-
isFinal: false,
|
|
1084
|
-
},
|
|
1085
|
-
InReview: {
|
|
1086
|
-
name: AXPSystemStatusType.InReview,
|
|
1087
|
-
title: i18n('in-review.title'),
|
|
1088
|
-
icon: 'fa-light fa-eye',
|
|
1089
|
-
color: 'info',
|
|
1090
|
-
description: i18n('in-review.description'),
|
|
1091
|
-
order: 3,
|
|
1092
|
-
isInitial: false,
|
|
1093
|
-
isFinal: false,
|
|
1094
|
-
},
|
|
1095
|
-
Blocked: {
|
|
1096
|
-
name: AXPSystemStatusType.Blocked,
|
|
1097
|
-
title: i18n('blocked.title'),
|
|
1098
|
-
icon: 'fa-light fa-ban',
|
|
1099
|
-
color: 'danger',
|
|
1100
|
-
description: i18n('blocked.description'),
|
|
1101
|
-
order: 4,
|
|
1102
|
-
isInitial: false,
|
|
1103
|
-
isFinal: false,
|
|
1104
|
-
},
|
|
1105
|
-
Done: {
|
|
1106
|
-
name: AXPSystemStatusType.Done,
|
|
1107
|
-
title: i18n('done.title'),
|
|
1108
|
-
icon: 'fa-light fa-check-circle',
|
|
1109
|
-
color: 'success',
|
|
1110
|
-
description: i18n('done.description'),
|
|
1111
|
-
order: 5,
|
|
1112
|
-
isInitial: false,
|
|
1113
|
-
isFinal: true,
|
|
1114
|
-
},
|
|
1115
|
-
Cancelled: {
|
|
1116
|
-
name: AXPSystemStatusType.Cancelled,
|
|
1117
|
-
title: i18n('cancelled.title'),
|
|
1118
|
-
icon: 'fa-light fa-times-circle',
|
|
1119
|
-
color: 'neutral',
|
|
1120
|
-
description: i18n('cancelled.description'),
|
|
1121
|
-
order: 6,
|
|
1122
|
-
isInitial: false,
|
|
1123
|
-
isFinal: true,
|
|
1124
|
-
},
|
|
1125
|
-
Draft: {
|
|
1126
|
-
name: AXPSystemStatusType.Draft,
|
|
1127
|
-
title: i18n('draft.title'),
|
|
1128
|
-
icon: 'fa-light fa-file-pen',
|
|
1129
|
-
color: 'neutral',
|
|
1130
|
-
description: i18n('draft.description'),
|
|
1131
|
-
order: 1,
|
|
1132
|
-
isInitial: true,
|
|
1133
|
-
isFinal: false,
|
|
1134
|
-
},
|
|
1135
|
-
PendingReview: {
|
|
1136
|
-
name: AXPSystemStatusType.PendingReview,
|
|
1137
|
-
title: i18n('pending-review.title'),
|
|
1138
|
-
icon: 'fa-light fa-clock',
|
|
1139
|
-
color: 'warning',
|
|
1140
|
-
description: i18n('pending-review.description'),
|
|
1141
|
-
order: 2,
|
|
1142
|
-
isInitial: false,
|
|
1143
|
-
isFinal: false,
|
|
1144
|
-
},
|
|
1145
|
-
WaitingSignOff: {
|
|
1146
|
-
name: AXPSystemStatusType.WaitingSignOff,
|
|
1147
|
-
title: i18n('waiting-sign-off.title'),
|
|
1148
|
-
icon: 'fa-light fa-clock',
|
|
1149
|
-
color: 'warning',
|
|
1150
|
-
description: i18n('waiting-sign-off.description'),
|
|
1151
|
-
order: 3,
|
|
1152
|
-
isInitial: false,
|
|
1153
|
-
isFinal: false,
|
|
1154
|
-
},
|
|
1155
|
-
WaitingApproval: {
|
|
1156
|
-
name: AXPSystemStatusType.WaitingApproval,
|
|
1157
|
-
title: i18n('waiting-approval.title'),
|
|
1158
|
-
icon: 'fa-light fa-clock',
|
|
1159
|
-
color: 'warning',
|
|
1160
|
-
description: i18n('waiting-approval.description'),
|
|
1161
|
-
order: 1,
|
|
1162
|
-
isInitial: true,
|
|
1163
|
-
isFinal: false,
|
|
1164
|
-
},
|
|
1165
|
-
Approved: {
|
|
1166
|
-
name: AXPSystemStatusType.Approved,
|
|
1167
|
-
title: i18n('approved.title'),
|
|
1168
|
-
icon: 'fa-light fa-check-circle',
|
|
1169
|
-
color: 'success',
|
|
1170
|
-
description: i18n('approved.description'),
|
|
1171
|
-
order: 3,
|
|
1172
|
-
isInitial: false,
|
|
1173
|
-
isFinal: false,
|
|
1174
|
-
},
|
|
1175
|
-
Published: {
|
|
1176
|
-
name: AXPSystemStatusType.Published,
|
|
1177
|
-
title: i18n('published.title'),
|
|
1178
|
-
icon: 'fa-light fa-globe',
|
|
1179
|
-
color: 'primary',
|
|
1180
|
-
description: i18n('published.description'),
|
|
1181
|
-
order: 4,
|
|
1182
|
-
isInitial: false,
|
|
1183
|
-
isFinal: false,
|
|
1184
|
-
},
|
|
1185
|
-
Archived: {
|
|
1186
|
-
name: AXPSystemStatusType.Archived,
|
|
1187
|
-
title: i18n('archived.title'),
|
|
1188
|
-
icon: 'fa-light fa-archive',
|
|
1189
|
-
color: 'danger',
|
|
1190
|
-
description: i18n('archived.description'),
|
|
1191
|
-
order: 5,
|
|
1192
|
-
isInitial: false,
|
|
1193
|
-
isFinal: true,
|
|
1194
|
-
},
|
|
1195
|
-
Rejected: {
|
|
1196
|
-
name: AXPSystemStatusType.Rejected,
|
|
1197
|
-
title: i18n('rejected.title'),
|
|
1198
|
-
icon: 'fa-light fa-times-circle',
|
|
1199
|
-
color: 'danger',
|
|
1200
|
-
description: i18n('rejected.description'),
|
|
1201
|
-
order: 6,
|
|
1202
|
-
isInitial: false,
|
|
1203
|
-
isFinal: true,
|
|
1204
|
-
},
|
|
1205
|
-
Active: {
|
|
1206
|
-
name: AXPSystemStatusType.Active,
|
|
1207
|
-
title: i18n('active.title'),
|
|
1208
|
-
icon: 'fa-light fa-check-circle',
|
|
1209
|
-
color: 'success',
|
|
1210
|
-
description: i18n('active.description'),
|
|
1211
|
-
order: 1,
|
|
1212
|
-
isInitial: false,
|
|
1213
|
-
isFinal: false,
|
|
1214
|
-
},
|
|
1215
|
-
Inactive: {
|
|
1216
|
-
name: AXPSystemStatusType.Inactive,
|
|
1217
|
-
title: i18n('inactive.title'),
|
|
1218
|
-
icon: 'fa-light fa-circle',
|
|
1219
|
-
color: 'secondary',
|
|
1220
|
-
description: i18n('inactive.description'),
|
|
1221
|
-
order: 2,
|
|
1222
|
-
isInitial: false,
|
|
1223
|
-
isFinal: false,
|
|
1224
|
-
},
|
|
1225
|
-
Pending: {
|
|
1226
|
-
name: AXPSystemStatusType.Pending,
|
|
1227
|
-
title: i18n('pending.title'),
|
|
1228
|
-
icon: 'fa-light fa-clock',
|
|
1229
|
-
color: 'warning',
|
|
1230
|
-
description: i18n('pending.description'),
|
|
1231
|
-
order: 1,
|
|
1232
|
-
isInitial: true,
|
|
1233
|
-
isFinal: false,
|
|
1234
|
-
},
|
|
1235
|
-
Completed: {
|
|
1236
|
-
name: AXPSystemStatusType.Completed,
|
|
1237
|
-
title: i18n('completed.title'),
|
|
1238
|
-
icon: 'fa-light fa-check-circle',
|
|
1239
|
-
color: 'success',
|
|
1240
|
-
description: i18n('completed.description'),
|
|
1241
|
-
order: 10,
|
|
1242
|
-
isInitial: false,
|
|
1243
|
-
isFinal: true,
|
|
1244
|
-
},
|
|
1245
|
-
Suspended: {
|
|
1246
|
-
name: AXPSystemStatusType.Suspended,
|
|
1247
|
-
title: i18n('suspended.title'),
|
|
1248
|
-
icon: 'fa-light fa-pause-circle',
|
|
1249
|
-
color: 'neutral',
|
|
1250
|
-
description: i18n('suspended.description'),
|
|
1251
|
-
order: 5,
|
|
1252
|
-
isInitial: false,
|
|
1253
|
-
isFinal: false,
|
|
1254
|
-
},
|
|
1255
|
-
Failed: {
|
|
1256
|
-
name: AXPSystemStatusType.Failed,
|
|
1257
|
-
title: i18n('failed.title'),
|
|
1258
|
-
icon: 'fa-light fa-xmark-circle',
|
|
1259
|
-
color: 'danger',
|
|
1260
|
-
description: i18n('failed.description'),
|
|
1261
|
-
order: 10,
|
|
1262
|
-
isInitial: false,
|
|
1263
|
-
isFinal: true,
|
|
1264
|
-
},
|
|
1265
|
-
Review: {
|
|
1266
|
-
name: AXPSystemStatusType.Review,
|
|
1267
|
-
title: i18n('review.title'),
|
|
1268
|
-
icon: 'fa-light fa-eye',
|
|
1269
|
-
color: 'info',
|
|
1270
|
-
description: i18n('review.description'),
|
|
1271
|
-
order: 3,
|
|
1272
|
-
},
|
|
1273
|
-
Expired: {
|
|
1274
|
-
name: AXPSystemStatusType.Expired,
|
|
1275
|
-
title: i18n('expired.title'),
|
|
1276
|
-
icon: 'fa-light fa-clock',
|
|
1277
|
-
color: 'danger',
|
|
1278
|
-
description: i18n('expired.description'),
|
|
1279
|
-
order: 10,
|
|
1280
|
-
isInitial: false,
|
|
1281
|
-
isFinal: true,
|
|
1282
|
-
},
|
|
1283
|
-
});
|
|
1284
|
-
/**
|
|
1285
|
-
* Get system status definition by type
|
|
1286
|
-
* @param type - Status type
|
|
1287
|
-
* @returns System status definition or undefined
|
|
1288
|
-
*/
|
|
1289
|
-
function getSystemStatus(type) {
|
|
1290
|
-
return Object.values(AXPSystemStatuses).find(status => status.name === type);
|
|
1291
|
-
}
|
|
1292
|
-
/**
|
|
1293
|
-
* Resolves the visual appearance (color and icon) for status
|
|
1294
|
-
* using the system statuses from the core module.
|
|
1295
|
-
* @param statusType - Status type string
|
|
1296
|
-
* @returns Color and icon for the status
|
|
1297
|
-
*/
|
|
1298
|
-
function resolveStatusLook(statusType) {
|
|
1299
|
-
const systemStatusType = statusType;
|
|
1300
|
-
if (systemStatusType) {
|
|
1301
|
-
const systemStatus = getSystemStatus(systemStatusType);
|
|
1302
|
-
if (systemStatus) {
|
|
1303
|
-
return {
|
|
1304
|
-
color: systemStatus.color,
|
|
1305
|
-
icon: systemStatus.icon || ''
|
|
1306
|
-
};
|
|
1307
|
-
}
|
|
1308
|
-
}
|
|
1309
|
-
return {
|
|
1310
|
-
color: 'secondary',
|
|
1311
|
-
icon: ''
|
|
1312
|
-
};
|
|
1313
|
-
}
|
|
1314
|
-
/**
|
|
1315
|
-
* Resolves the complete status information (title, description, icon, color) for a status
|
|
1316
|
-
* using the system statuses from the core module.
|
|
1317
|
-
* @param statusType - Status type string
|
|
1318
|
-
* @returns Complete status information as AXPStatusDefinition
|
|
1319
|
-
*/
|
|
1320
|
-
function getStatusInfo(statusType) {
|
|
1321
|
-
const systemStatusType = statusType;
|
|
1322
|
-
if (systemStatusType) {
|
|
1323
|
-
const systemStatus = getSystemStatus(systemStatusType);
|
|
1324
|
-
if (systemStatus) {
|
|
1325
|
-
return systemStatus;
|
|
1326
|
-
}
|
|
1327
|
-
}
|
|
1328
|
-
return {
|
|
1329
|
-
name: statusType,
|
|
1330
|
-
title: statusType,
|
|
1331
|
-
description: `Status: ${statusType}`,
|
|
1332
|
-
icon: '',
|
|
1333
|
-
color: 'secondary'
|
|
1334
|
-
};
|
|
1335
|
-
}
|
|
1336
|
-
/**
|
|
1337
|
-
* Get system status definition directly (no conversion needed since it's already AXPStatusDefinition)
|
|
1338
|
-
* @param statusType - Status type
|
|
1339
|
-
* @param overrides - Optional overrides for the status definition
|
|
1340
|
-
* @returns AXPStatusDefinition
|
|
1341
|
-
*/
|
|
1342
|
-
function systemStatusToDefinition(statusType, overrides) {
|
|
1343
|
-
const systemStatus = getSystemStatus(statusType);
|
|
1344
|
-
if (!systemStatus) {
|
|
1345
|
-
throw new Error(`System status ${statusType} not found`);
|
|
1346
|
-
}
|
|
1347
|
-
return {
|
|
1348
|
-
...systemStatus,
|
|
1349
|
-
...overrides,
|
|
1350
|
-
};
|
|
1351
|
-
}
|
|
1352
|
-
|
|
1353
|
-
//#region ---- Multi-source reference ----
|
|
1354
|
-
//#endregion
|
|
1355
|
-
|
|
1356
|
-
//#region ---- Logo config ----
|
|
1357
|
-
//#endregion
|
|
1358
|
-
|
|
1359
30
|
//#region ---- Contracts barrel ----
|
|
1360
31
|
//#endregion
|
|
1361
32
|
|
|
@@ -1363,5 +34,5 @@ function systemStatusToDefinition(statusType, overrides) {
|
|
|
1363
34
|
* Generated bundle index. Do not edit.
|
|
1364
35
|
*/
|
|
1365
36
|
|
|
1366
|
-
export {
|
|
37
|
+
export { AXPFileStorageStatus, AXP_PREVIEW_WIDGET_FIELD_COMMAND_KEY };
|
|
1367
38
|
//# sourceMappingURL=acorex-platform-contracts.mjs.map
|