@acorex/connectivity 19.4.14 → 20.0.0-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api/index.d.ts +196 -3
- package/fesm2022/acorex-connectivity-api.mjs +22 -22
- package/fesm2022/acorex-connectivity-api.mjs.map +1 -1
- package/fesm2022/acorex-connectivity-mock-countries-DHRrtbwM.mjs.map +1 -1
- package/fesm2022/acorex-connectivity-mock-currencies-B-x3Mxql.mjs.map +1 -1
- package/fesm2022/acorex-connectivity-mock-profiles-MJ9xFTtp.mjs.map +1 -1
- package/fesm2022/acorex-connectivity-mock-timezones-CnNQ6EXw.mjs +44 -0
- package/fesm2022/acorex-connectivity-mock-timezones-CnNQ6EXw.mjs.map +1 -0
- package/fesm2022/acorex-connectivity-mock.mjs +725 -311
- package/fesm2022/acorex-connectivity-mock.mjs.map +1 -1
- package/fesm2022/acorex-connectivity.mjs.map +1 -1
- package/index.d.ts +2 -2
- package/mock/index.d.ts +83 -4
- package/package.json +1 -1
- package/api/lib/api-storage.service.d.ts +0 -33
- package/api/lib/api.module.d.ts +0 -8
- package/api/lib/auth/oidc/application.loader.d.ts +0 -16
- package/api/lib/auth/oidc/configuration.service.d.ts +0 -60
- package/api/lib/auth/oidc/feature.loader.d.ts +0 -6
- package/api/lib/auth/oidc/index.d.ts +0 -6
- package/api/lib/auth/oidc/oidc.strategy.d.ts +0 -50
- package/api/lib/auth/oidc/permission.loader.d.ts +0 -14
- package/api/lib/auth/oidc/tenant.loader.d.ts +0 -16
- package/fesm2022/acorex-connectivity-mock-timezones-D-kAWkRu.mjs +0 -15
- package/fesm2022/acorex-connectivity-mock-timezones-D-kAWkRu.mjs.map +0 -1
- package/mock/lib/application-management/application-management-mock-data.d.ts +0 -67
- package/mock/lib/application-management/application.seeder.d.ts +0 -8
- package/mock/lib/application-management/index.d.ts +0 -2
- package/mock/lib/application-management/mock-module-designer.service.d.ts +0 -43
- package/mock/lib/auth/application.loader.d.ts +0 -8
- package/mock/lib/auth/feature.loader.d.ts +0 -6
- package/mock/lib/auth/permission.loader.d.ts +0 -11
- package/mock/lib/auth/tenant.loader.d.ts +0 -8
- package/mock/lib/conversation/index.d.ts +0 -2
- package/mock/lib/conversation/message/index.d.ts +0 -2
- package/mock/lib/conversation/message/message.mock.data.d.ts +0 -12
- package/mock/lib/conversation/message/message.seeder.d.ts +0 -8
- package/mock/lib/conversation/room/index.d.ts +0 -2
- package/mock/lib/conversation/room/room.mock.data.d.ts +0 -3
- package/mock/lib/conversation/room/room.seeder.d.ts +0 -8
- package/mock/lib/dashboard-management/dashboard.mock.data.d.ts +0 -3
- package/mock/lib/dashboard-management/dashboard.seeder.d.ts +0 -8
- package/mock/lib/dashboard-management/index.d.ts +0 -2
- package/mock/lib/dexie-storage.service.d.ts +0 -16
- package/mock/lib/document-management/document-type/document-type.mock.d.ts +0 -2
- package/mock/lib/document-management/document-type/document-type.seeder.d.ts +0 -8
- package/mock/lib/document-management/file/file.service.d.ts +0 -19
- package/mock/lib/document-management/folder/folder.mock.data.d.ts +0 -3
- package/mock/lib/document-management/folder/folder.seeder.d.ts +0 -8
- package/mock/lib/document-management/folder/folder.service.d.ts +0 -35
- package/mock/lib/document-management/folder/index.d.ts +0 -1
- package/mock/lib/entity-search.provider.d.ts +0 -5
- package/mock/lib/form-template-management/data.seeder.d.ts +0 -8
- package/mock/lib/form-template-management/form-template-management-mock.module.d.ts +0 -6
- package/mock/lib/form-template-management/mock.data.d.ts +0 -3
- package/mock/lib/issue-management/issue-type/data.seeder.d.ts +0 -5
- package/mock/lib/issue-management/issue-type/mock.data.d.ts +0 -2
- package/mock/lib/log-management/log/log.mock.d.ts +0 -2
- package/mock/lib/log-management/log/log.seeder.d.ts +0 -8
- package/mock/lib/mock.module.d.ts +0 -12
- package/mock/lib/mock.strategy.d.ts +0 -16
- package/mock/lib/notification-management/notification/notification.mock.service.d.ts +0 -12
- package/mock/lib/notification-management/notification-management.mock.data.d.ts +0 -2
- package/mock/lib/notification-management/template.seeder.d.ts +0 -8
- package/mock/lib/organization-management/org-chart.mock.d.ts +0 -3
- package/mock/lib/organization-management/organization-management-mock.module.d.ts +0 -6
- package/mock/lib/organization-management/organization-management.seeder.d.ts +0 -8
- package/mock/lib/organization-management/position.data.d.ts +0 -3
- package/mock/lib/organization-management/responsibility.data.d.ts +0 -3
- package/mock/lib/organization-management/role.data.d.ts +0 -3
- package/mock/lib/organization-management/skill.data.d.ts +0 -3
- package/mock/lib/platform-management/app-term/app-term.mock.data.d.ts +0 -2
- package/mock/lib/platform-management/app-term/app-term.seeder.d.ts +0 -8
- package/mock/lib/platform-management/app-term/index.d.ts +0 -1
- package/mock/lib/platform-management/app-version/app-version.mock.data.d.ts +0 -2
- package/mock/lib/platform-management/app-version/app-version.seeder.d.ts +0 -8
- package/mock/lib/platform-management/app-version/index.d.ts +0 -1
- package/mock/lib/platform-management/common/data/countries.d.ts +0 -2
- package/mock/lib/platform-management/common/data/currencies.d.ts +0 -2
- package/mock/lib/platform-management/common/data/profiles.d.ts +0 -2
- package/mock/lib/platform-management/common/data/timezones.d.ts +0 -2
- package/mock/lib/platform-management/common/regional-util.service.d.ts +0 -17
- package/mock/lib/platform-management/file-storage/file-storage-service.d.ts +0 -18
- package/mock/lib/platform-management/file-storage/index.d.ts +0 -1
- package/mock/lib/platform-management/global-variables/global-variable.seeder.d.ts +0 -8
- package/mock/lib/platform-management/global-variables/global-variables.mock.data.d.ts +0 -7
- package/mock/lib/platform-management/global-variables/index.d.ts +0 -2
- package/mock/lib/platform-management/index.d.ts +0 -3
- package/mock/lib/platform-management/metadata/metadata.mock.d.ts +0 -3
- package/mock/lib/platform-management/metadata/metadata.seeder.d.ts +0 -8
- package/mock/lib/project-management/client/client.mock.d.ts +0 -7
- package/mock/lib/project-management/client/client.seeder.d.ts +0 -8
- package/mock/lib/project-management/project/project.mock.d.ts +0 -22
- package/mock/lib/project-management/project/project.seeder.d.ts +0 -8
- package/mock/lib/project-management/project-member/project-member.mock.d.ts +0 -9
- package/mock/lib/project-management/project-member/project.member.seeder.d.ts +0 -8
- package/mock/lib/project-management/project-role-member/project-role-member.mock.d.ts +0 -9
- package/mock/lib/project-management/project-role-member/project-role-member.seeder.d.ts +0 -8
- package/mock/lib/project-management/project-type/project-type.mock.d.ts +0 -4
- package/mock/lib/project-management/sprint/sprint.mock.d.ts +0 -9
- package/mock/lib/project-management/sprint/sprint.seeder.d.ts +0 -8
- package/mock/lib/project-management/task/task.mock.d.ts +0 -45
- package/mock/lib/project-management/task/task.seeder.d.ts +0 -8
- package/mock/lib/project-management/task-type/task-type-seeder.d.ts +0 -8
- package/mock/lib/project-management/task-type/task-type.mock.d.ts +0 -10
- package/mock/lib/project-management/worksite/worksite.mock.d.ts +0 -15
- package/mock/lib/project-management/worksite/worksite.seeder.d.ts +0 -8
- package/mock/lib/scheduler-job-management/index.d.ts +0 -1
- package/mock/lib/scheduler-job-management/scheduler-job-management.mock.data.d.ts +0 -7
- package/mock/lib/scheduler-job-management/scheduler-job.seeder.d.ts +0 -8
- package/mock/lib/security-management/datasource-provider.mock.service.d.ts +0 -4
- package/mock/lib/security-management/device-session.service.d.ts +0 -6
- package/mock/lib/security-management/device-sessions.seeder.d.ts +0 -10
- package/mock/lib/security-management/index.d.ts +0 -3
- package/mock/lib/security-management/mock-data.d.ts +0 -32
- package/mock/lib/security-management/role.seeder.d.ts +0 -8
- package/mock/lib/security-management/user.seeder.d.ts +0 -9
- package/mock/lib/text-template-management/category.seeder.d.ts +0 -8
- package/mock/lib/text-template-management/index.d.ts +0 -3
- package/mock/lib/text-template-management/template.seeder.d.ts +0 -8
- package/mock/lib/text-template-management/text-template-management.mock.data.d.ts +0 -7
- package/mock/lib/training-management/certificate/certificate.mock.d.ts +0 -27
- package/mock/lib/training-management/certificate/certificate.seeder.d.ts +0 -8
- package/mock/lib/training-management/course/course.mock.d.ts +0 -71
- package/mock/lib/training-management/course/course.seeder.d.ts +0 -8
- package/mock/lib/training-management/facilitator-type/facilitator-type.mock.d.ts +0 -6
- package/mock/lib/training-management/location/location.mock.d.ts +0 -7
- package/mock/lib/training-management/location/location.seeder.d.ts +0 -8
- package/mock/lib/training-management/period/period.mock.d.ts +0 -6
- package/mock/lib/training-management/period/period.seeder.d.ts +0 -8
- package/mock/lib/training-management/training/training.mock.d.ts +0 -74
- package/mock/lib/training-management/training/training.seeder.d.ts +0 -8
- package/mock/lib/training-management/training-facilitator/training-facilitator.mock.d.ts +0 -87
- package/mock/lib/training-management/training-facilitator/training-facilitator.seeder.d.ts +0 -8
- package/mock/lib/training-management/training-participant/training-participant.mock.d.ts +0 -81
- package/mock/lib/training-management/training-participant/training-participant.seeder.d.ts +0 -8
- package/mock/lib/training-management/training-type/training-type.mock.d.ts +0 -15
- package/mock/lib/training-management/training-type/training-type.seeder.d.ts +0 -8
@@ -1,24 +1,25 @@
|
|
1
1
|
import * as i1 from '@acorex/platform/core';
|
2
|
-
import { AXPDataGenerator, applySortArray, applyFilterArray } from '@acorex/platform/core';
|
2
|
+
import { AXPSystemActionType, extractTextFromHtml, AXPDataGenerator, applySortArray, applyFilterArray, AXPActivityLogProvider, AXP_ACTIVITY_LOG_PROVIDER } from '@acorex/platform/core';
|
3
3
|
import Dexie from 'dexie';
|
4
|
-
import {
|
5
|
-
import {
|
6
|
-
import { AXPMyNotificationDashboardWidget, RootConfig as RootConfig$7, AXMNotificationEntityService } from '@acorex/modules/notification-management';
|
7
|
-
import { RootConfig as RootConfig$6, AXMDeviceSessionsServiceImpl, AXMSessionStatusTypes, AXMDeviceSessionsService } from '@acorex/modules/security-management';
|
4
|
+
import { transform, isEqual } from 'lodash';
|
5
|
+
import { AXPEntityDefinitionRegistryService, AXPEntityStorageService, AXP_DATA_SEEDER_TOKEN, AXPDataSeederService } from '@acorex/platform/layout/entity';
|
8
6
|
import * as i2 from '@acorex/platform/auth';
|
9
7
|
import { AXPSessionService, AXPAuthModule, AXP_TENANT_LOADER, AXP_APPLICATION_LOADER, AXP_PERMISSION_LOADER, AXP_FEATURE_LOADER } from '@acorex/platform/auth';
|
10
|
-
import { AXPRegionalService, AXPFileStorageStatus, AXPFileStorageService, AXP_SEARCH_PROVIDER } from '@acorex/platform/common';
|
11
|
-
import { AXPEntityDefinitionRegistryService, AXP_DATA_SEEDER_TOKEN, AXPEntityStorageService, AXPDataSeederService } from '@acorex/platform/layout/entity';
|
12
8
|
import * as i0 from '@angular/core';
|
13
9
|
import { inject, Injectable, NgModule } from '@angular/core';
|
10
|
+
import { AXPLockService, AXPRegionalService, AXPFileStorageStatus, AXPFileStorageService, AXP_SEARCH_PROVIDER } from '@acorex/platform/common';
|
11
|
+
import { APPLICATION_SOURCE_NAME, MODULE_SOURCE_NAME, ENTITY_SOURCE_NAME, FEATURE_SOURCE_NAME, PERMISSION_SOURCE_NAME, PROPERTY_SOURCE_NAME, AXPModuleDesignerService } from '@acorex/modules/application-management';
|
12
|
+
import { RootConfig as RootConfig$2, AXMFolderServiceImpl, AXMDocumentServiceImpl, AXMFolderService, AXMDocumentService } from '@acorex/modules/document-management';
|
13
|
+
import { AXPMyNotificationDashboardWidget, RootConfig as RootConfig$7, AXMNotificationEntityService } from '@acorex/modules/notification-management';
|
14
|
+
import { RootConfig as RootConfig$6, AXMDeviceSessionsServiceImpl, AXMSessionStatusTypes, AXMDeviceSessionsService } from '@acorex/modules/security-management';
|
14
15
|
import { of, delay, firstValueFrom } from 'rxjs';
|
15
16
|
import { AXMPermissionsKeys, AXMFormTemplateTypes, RootConfig as RootConfig$3 } from '@acorex/modules/form-template-management';
|
16
17
|
import { RootConfig } from '@acorex/modules/conversation';
|
17
|
-
import { AXPBarChartWidget,
|
18
|
+
import { AXPBarChartWidget, AXPStickyNoteWidget, AXPDonutChartWidget, AXPGaugeChartWidget, AXPLineChartWidget, AXPTaskListWidget, RootConfig as RootConfig$1 } from '@acorex/modules/dashboard-management';
|
18
19
|
import { RootConfig as RootConfig$4 } from '@acorex/modules/issue-management';
|
19
20
|
import { RootConfig as RootConfig$5 } from '@acorex/modules/log-management';
|
20
21
|
import { AXMOrganizationNodeType, RootConfig as RootConfig$8 } from '@acorex/modules/organization-management';
|
21
|
-
import { RootConfig as RootConfig$9 } from '@acorex/modules/platform-management';
|
22
|
+
import { RootConfig as RootConfig$9, AXMMetaDataDefinitionCategoryServiceImpl, AXMMetaDataDefinitionService, AXMMetaDataDefinitionCategoryService } from '@acorex/modules/platform-management';
|
22
23
|
import { AXTranslationService } from '@acorex/core/translation';
|
23
24
|
import { AXFileService } from '@acorex/core/file';
|
24
25
|
import { RootConfig as RootConfig$a } from '@acorex/modules/project-management';
|
@@ -26,10 +27,14 @@ import { RootConfig as RootConfig$b } from '@acorex/modules/scheduler-job-manage
|
|
26
27
|
import { convertArrayToDataSource } from '@acorex/cdk/common';
|
27
28
|
import { RootConfig as RootConfig$c } from '@acorex/modules/text-template-management';
|
28
29
|
import { RootConfig as RootConfig$d } from '@acorex/modules/training-management';
|
30
|
+
import { AXSafePipe } from '@acorex/core/pipes';
|
29
31
|
|
30
32
|
class AXPDexieEntityStorageService extends Dexie {
|
31
33
|
constructor() {
|
32
34
|
super('ACoreXPlatform');
|
35
|
+
this.sessionService = inject(AXPSessionService);
|
36
|
+
this.entityRegistryService = inject(AXPEntityDefinitionRegistryService);
|
37
|
+
this.lockService = inject(AXPLockService);
|
33
38
|
this.version(1).stores({
|
34
39
|
'entity-store': '++id, entityName, [entityName+id]',
|
35
40
|
});
|
@@ -37,6 +42,153 @@ class AXPDexieEntityStorageService extends Dexie {
|
|
37
42
|
get dbName() {
|
38
43
|
return 'ACoreXPlatform';
|
39
44
|
}
|
45
|
+
// Detect changes between two objects
|
46
|
+
detectChanges(oldObj, newObj) {
|
47
|
+
return transform(newObj, (result, value, key) => {
|
48
|
+
if (!isEqual(value, oldObj[key])) {
|
49
|
+
if (Array.isArray(value) || Array.isArray(oldObj[key])) {
|
50
|
+
const oldArray = Array.isArray(oldObj[key]) ? oldObj[key] : [];
|
51
|
+
const newArray = Array.isArray(value) ? value : [];
|
52
|
+
// Check if array items have id property
|
53
|
+
const hasId = newArray.length > 0 && 'id' in newArray[0];
|
54
|
+
if (hasId) {
|
55
|
+
// Compare by id for objects with id
|
56
|
+
const added = newArray.filter(item => !oldArray.some(oldItem => oldItem.id === item.id));
|
57
|
+
const removed = oldArray.filter(item => !newArray.some(newItem => newItem.id === item.id));
|
58
|
+
result[key] = {
|
59
|
+
oldValue: oldObj[key],
|
60
|
+
newValue: value,
|
61
|
+
added,
|
62
|
+
removed
|
63
|
+
};
|
64
|
+
}
|
65
|
+
else {
|
66
|
+
// For primitive arrays or objects without id, use deep comparison
|
67
|
+
const added = newArray.filter(item => !oldArray.some(oldItem => isEqual(item, oldItem)));
|
68
|
+
const removed = oldArray.filter(item => !newArray.some(newItem => isEqual(item, newItem)));
|
69
|
+
result[key] = {
|
70
|
+
oldValue: oldObj[key],
|
71
|
+
newValue: value,
|
72
|
+
added,
|
73
|
+
removed
|
74
|
+
};
|
75
|
+
}
|
76
|
+
}
|
77
|
+
else {
|
78
|
+
result[key] = {
|
79
|
+
oldValue: oldObj[key],
|
80
|
+
newValue: value
|
81
|
+
};
|
82
|
+
}
|
83
|
+
}
|
84
|
+
});
|
85
|
+
}
|
86
|
+
// Track entity history in the same entity-store table with -history suffix
|
87
|
+
async addToHistory(entityName, entity, changeType, changes) {
|
88
|
+
const historyEntityName = `${entityName}-history`;
|
89
|
+
const [moduleName, entityModuleName] = entityName.split('.');
|
90
|
+
const entityConfig = await this.entityRegistryService.resolve(moduleName, entityModuleName);
|
91
|
+
let title = '';
|
92
|
+
let actions = [];
|
93
|
+
switch (changeType) {
|
94
|
+
case 'create':
|
95
|
+
title = `"${entityConfig?.title}"`;
|
96
|
+
break;
|
97
|
+
case 'update':
|
98
|
+
title = `"${entityConfig?.title}"`;
|
99
|
+
break;
|
100
|
+
case 'delete':
|
101
|
+
title = `"${entityConfig?.title}"`;
|
102
|
+
break;
|
103
|
+
}
|
104
|
+
// Transform changes and build title
|
105
|
+
let transformedChanges = {};
|
106
|
+
if (changeType === 'update' && changes && entityConfig) {
|
107
|
+
for (const [key, value] of Object.entries(changes)) {
|
108
|
+
const property = entityConfig.properties.find(p => p.name === key);
|
109
|
+
if (property && property.schema.interface) {
|
110
|
+
const widgetType = property.schema.interface.type;
|
111
|
+
// Handle different widget types
|
112
|
+
switch (widgetType) {
|
113
|
+
case 'file-uploader':
|
114
|
+
if (value.added?.length) {
|
115
|
+
actions.push({
|
116
|
+
type: AXPSystemActionType.Upload,
|
117
|
+
description: `"${value.added?.map(item => item.name).join(', ')}"`
|
118
|
+
});
|
119
|
+
}
|
120
|
+
if (value.removed?.length) {
|
121
|
+
actions.push({
|
122
|
+
type: AXPSystemActionType.Delete,
|
123
|
+
description: `"${value.removed?.map(item => item.name).join(', ')}"`
|
124
|
+
});
|
125
|
+
}
|
126
|
+
transformedChanges[key] = {
|
127
|
+
...value,
|
128
|
+
title: property.title,
|
129
|
+
};
|
130
|
+
break;
|
131
|
+
case 'large-text-editor':
|
132
|
+
case 'rich-text-editor':
|
133
|
+
const safeValue = extractTextFromHtml(value.newValue);
|
134
|
+
actions.push({
|
135
|
+
type: AXPSystemActionType.Update,
|
136
|
+
description: `${property.title} to "${safeValue.length > 100 ? safeValue.slice(0, 30) + '...' : safeValue}"`
|
137
|
+
});
|
138
|
+
transformedChanges[key] = {
|
139
|
+
...value,
|
140
|
+
title: property.title,
|
141
|
+
};
|
142
|
+
break;
|
143
|
+
case 'text-editor':
|
144
|
+
actions.push({
|
145
|
+
type: AXPSystemActionType.Update,
|
146
|
+
description: `${property.title} to "${value.newValue.length > 100 ? value.newValue.slice(0, 30) + '...' : value.newValue}"`
|
147
|
+
});
|
148
|
+
transformedChanges[key] = {
|
149
|
+
...value,
|
150
|
+
title: property.title,
|
151
|
+
};
|
152
|
+
break;
|
153
|
+
default:
|
154
|
+
//TODO @ a.b not working
|
155
|
+
actions.push({
|
156
|
+
type: AXPSystemActionType.Update,
|
157
|
+
description: `${property.title}`
|
158
|
+
});
|
159
|
+
transformedChanges[key] = {
|
160
|
+
...value,
|
161
|
+
title: property.title,
|
162
|
+
};
|
163
|
+
}
|
164
|
+
}
|
165
|
+
}
|
166
|
+
}
|
167
|
+
const nowDate = new Date();
|
168
|
+
const data = {
|
169
|
+
id: AXPDataGenerator.uuid(),
|
170
|
+
title: title || nowDate.toISOString(),
|
171
|
+
date: nowDate,
|
172
|
+
user: {
|
173
|
+
id: this.sessionService.user?.id ?? 'system',
|
174
|
+
name: this.sessionService.user?.name ?? 'System',
|
175
|
+
title: this.sessionService.user?.title ?? 'System',
|
176
|
+
},
|
177
|
+
reference: {
|
178
|
+
id: entity.id,
|
179
|
+
type: entityName,
|
180
|
+
},
|
181
|
+
changeType: changeType,
|
182
|
+
changes: actions,
|
183
|
+
data: { ...entity }
|
184
|
+
};
|
185
|
+
// Add history record
|
186
|
+
await this.table('entity-store').add({
|
187
|
+
...data,
|
188
|
+
entityName: historyEntityName,
|
189
|
+
isCurrent: true
|
190
|
+
});
|
191
|
+
}
|
40
192
|
async initial(entityName, collection) {
|
41
193
|
const exists = await this.table('entity-store').where({ entityName }).count();
|
42
194
|
if (exists === 0) {
|
@@ -48,15 +200,41 @@ class AXPDexieEntityStorageService extends Dexie {
|
|
48
200
|
return await this.table('entity-store').where({ entityName, id: id }).first();
|
49
201
|
}
|
50
202
|
async updateOne(entityName, id, keyValue) {
|
203
|
+
// Check if the entity is locked before applying any modifications
|
204
|
+
const lock = await this.lockService.check({
|
205
|
+
refId: id,
|
206
|
+
refType: entityName,
|
207
|
+
});
|
208
|
+
if (lock) {
|
209
|
+
const lockRecord = await this.lockService.getInfo({
|
210
|
+
refId: id,
|
211
|
+
refType: entityName,
|
212
|
+
});
|
213
|
+
if (lockRecord && this.sessionService.user && lockRecord.lockedBy.id !== this.sessionService.user.id) {
|
214
|
+
throw new Error('This record is locked and cannot be edited.');
|
215
|
+
}
|
216
|
+
}
|
217
|
+
// Get the old entity first
|
218
|
+
const oldEntity = await this.getOne(entityName, id);
|
219
|
+
// Apply updates
|
51
220
|
await this.table('entity-store').where({ entityName, id: id }).modify(keyValue);
|
52
|
-
|
221
|
+
// Get updated entity
|
222
|
+
const newEntity = await this.getOne(entityName, id);
|
223
|
+
// Detect what fields changed
|
224
|
+
const changes = this.detectChanges(oldEntity, newEntity);
|
225
|
+
// Add to history with changes
|
226
|
+
await this.addToHistory(entityName, newEntity, 'update', changes);
|
227
|
+
return newEntity;
|
53
228
|
}
|
54
229
|
async deleteOne(entityName, id) {
|
230
|
+
const entity = await this.getOne(entityName, id);
|
55
231
|
await this.table('entity-store').where({ entityName, id: id }).delete();
|
232
|
+
await this.addToHistory(entityName, entity, 'delete');
|
56
233
|
}
|
57
234
|
async insertOne(entityName, entity) {
|
58
235
|
const uuid = AXPDataGenerator.uuid();
|
59
236
|
await this.table('entity-store').add({ ...entity, id: uuid, entityName });
|
237
|
+
await this.addToHistory(entityName, { ...entity, id: uuid }, 'create');
|
60
238
|
return uuid;
|
61
239
|
}
|
62
240
|
async getAll(entityName) {
|
@@ -73,87 +251,12 @@ class AXPDexieEntityStorageService extends Dexie {
|
|
73
251
|
items: result.slice(request.skip, (request.skip ?? 0) + (request.take ?? 0)),
|
74
252
|
});
|
75
253
|
}
|
254
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXPDexieEntityStorageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
255
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXPDexieEntityStorageService }); }
|
76
256
|
}
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
// super('ACoreXPlatform');
|
81
|
-
// // Initial empty version
|
82
|
-
// //this.version(1).stores({});
|
83
|
-
// }
|
84
|
-
// // Function to change the schema dynamically
|
85
|
-
// private async changeSchema(schemaChanges: { [tableName: string]: string | null }): Promise<void> {
|
86
|
-
// // Acquire schema update lock to ensure no other operations are performed while schema is changing
|
87
|
-
// this.schemaUpdateLock = this.schemaUpdateLock.then(async () => {
|
88
|
-
// console.log('Attempting schema change with:', schemaChanges);
|
89
|
-
// try {
|
90
|
-
// this.close();
|
91
|
-
// const newDb = new Dexie(this.name);
|
92
|
-
// // Extract current schema in Dexie format
|
93
|
-
// const currentSchema = this.tables.reduce((result, { name, schema }) => {
|
94
|
-
// result[name] = [schema.primKey.src, ...schema.indexes.map((idx) => idx.src)].join(',');
|
95
|
-
// return result;
|
96
|
-
// }, {} as { [tableName: string]: string });
|
97
|
-
// console.log('Current Schema:', currentSchema);
|
98
|
-
// // Define current schema version
|
99
|
-
// newDb.version(this.verno + 10).stores(currentSchema);
|
100
|
-
// // Define new schema version with schema changes
|
101
|
-
// const nextVersion = this.verno + 1;
|
102
|
-
// newDb.version(nextVersion).stores(schemaChanges);
|
103
|
-
// await newDb.open();
|
104
|
-
// // Reassign updated db instance
|
105
|
-
// Object.assign(this, newDb);
|
106
|
-
// console.log(`Schema updated. Current version: ${this.verno}`);
|
107
|
-
// } catch (error) {
|
108
|
-
// console.error('Error during schema change:', error);
|
109
|
-
// throw error;
|
110
|
-
// }
|
111
|
-
// });
|
112
|
-
// // Wait for schema change lock to complete
|
113
|
-
// await this.schemaUpdateLock;
|
114
|
-
// }
|
115
|
-
// private async ensureInitialized(entityName: string): Promise<void> {
|
116
|
-
// if (this.tables.findIndex((table) => table.name === entityName) == -1) {
|
117
|
-
// const schemaChanges: { [tableName: string]: string } = {};
|
118
|
-
// schemaChanges[entityName] = '++id';
|
119
|
-
// await this.changeSchema(schemaChanges);
|
120
|
-
// }
|
121
|
-
// }
|
122
|
-
// get dbName(): string {
|
123
|
-
// return 'ACoreXPlatform';
|
124
|
-
// }
|
125
|
-
// private async getTable<T>(entityName: string) {
|
126
|
-
// await this.ensureInitialized(entityName);
|
127
|
-
// return this.table<T, number>(entityName);
|
128
|
-
// }
|
129
|
-
// async initial<T = any>(entityName: string, collection: T[]): Promise<void> {
|
130
|
-
// const table = await this.getTable<T>(entityName);
|
131
|
-
// const exists = await table.count();
|
132
|
-
// if (exists === 0) {
|
133
|
-
// await table.bulkAdd(collection);
|
134
|
-
// }
|
135
|
-
// }
|
136
|
-
// async getOne<T = any>(entityName: string, id: string): Promise<T> {
|
137
|
-
// const table = await this.getTable<T>(entityName);
|
138
|
-
// return (await table.where({ id: parseInt(id) }).first()) as T;
|
139
|
-
// }
|
140
|
-
// async updateOne(entityName: string, id: string, keyValue: { [key: string]: any }): Promise<void> {
|
141
|
-
// const table = await this.getTable(entityName);
|
142
|
-
// await table.update(parseInt(id), keyValue);
|
143
|
-
// }
|
144
|
-
// async deleteOne(entityName: string, id: string): Promise<void> {
|
145
|
-
// const table = await this.getTable(entityName);
|
146
|
-
// await table.delete(parseInt(id));
|
147
|
-
// }
|
148
|
-
// async insertOne<T = any>(entityName: string, entity: T): Promise<void> {
|
149
|
-
// const table = await this.getTable<T>(entityName);
|
150
|
-
// await table.add(entity);
|
151
|
-
// }
|
152
|
-
// async getAll<T = any>(entityName: string): Promise<T[]> {
|
153
|
-
// const table = await this.getTable<T>(entityName);
|
154
|
-
// return await table.toArray();
|
155
|
-
// }
|
156
|
-
// }
|
257
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXPDexieEntityStorageService, decorators: [{
|
258
|
+
type: Injectable
|
259
|
+
}], ctorParameters: () => [] });
|
157
260
|
|
158
261
|
const APPLICATIONS = Array.from({ length: 5 }).map((_, i) => {
|
159
262
|
const source = ['appOne', 'appTwo', 'appThree', 'myCoolApp', 'awesomeApp', 'superApp'];
|
@@ -265,7 +368,7 @@ const PROPERTIES = Array.from({ length: 10 }).map((_, i) => {
|
|
265
368
|
|
266
369
|
class AXCApplicationTemplateDataSeeder {
|
267
370
|
constructor() {
|
268
|
-
this.storageService = inject(
|
371
|
+
this.storageService = inject(AXPEntityStorageService);
|
269
372
|
}
|
270
373
|
async seed() {
|
271
374
|
const applications = this.storageService.initial(APPLICATION_SOURCE_NAME, APPLICATIONS);
|
@@ -277,10 +380,10 @@ class AXCApplicationTemplateDataSeeder {
|
|
277
380
|
const properties = this.storageService.initial(PROPERTY_SOURCE_NAME, PROPERTIES);
|
278
381
|
await Promise.all([applications, modules, entities, features, permissions, editions, properties]);
|
279
382
|
}
|
280
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
281
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
383
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXCApplicationTemplateDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
384
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXCApplicationTemplateDataSeeder }); }
|
282
385
|
}
|
283
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
386
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXCApplicationTemplateDataSeeder, decorators: [{
|
284
387
|
type: Injectable
|
285
388
|
}] });
|
286
389
|
|
@@ -366,10 +469,10 @@ class AXCModuleDesignerService {
|
|
366
469
|
async createPermission(payload) { }
|
367
470
|
async updatePermission(payload) { }
|
368
471
|
async deletePermission(permissionId) { }
|
369
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
370
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
472
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXCModuleDesignerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
473
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXCModuleDesignerService, providedIn: 'root' }); }
|
371
474
|
}
|
372
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
475
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXCModuleDesignerService, decorators: [{
|
373
476
|
type: Injectable,
|
374
477
|
args: [{
|
375
478
|
providedIn: 'root',
|
@@ -399,10 +502,10 @@ class MockApplicationLoader {
|
|
399
502
|
return of([demo_app]).pipe(delay(500));
|
400
503
|
}
|
401
504
|
}
|
402
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
403
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
505
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: MockApplicationLoader, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
506
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: MockApplicationLoader }); }
|
404
507
|
}
|
405
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
508
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: MockApplicationLoader, decorators: [{
|
406
509
|
type: Injectable
|
407
510
|
}] });
|
408
511
|
|
@@ -449,10 +552,10 @@ class MockPermissionLoader {
|
|
449
552
|
return of(this.userPermissions);
|
450
553
|
}
|
451
554
|
}
|
452
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
453
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
555
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: MockPermissionLoader, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
556
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: MockPermissionLoader }); }
|
454
557
|
}
|
455
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
558
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: MockPermissionLoader, decorators: [{
|
456
559
|
type: Injectable
|
457
560
|
}] });
|
458
561
|
|
@@ -475,10 +578,10 @@ class MockTenantLoader {
|
|
475
578
|
return of([demo_tenant]).pipe(delay(500));
|
476
579
|
}
|
477
580
|
}
|
478
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
479
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
581
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: MockTenantLoader, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
582
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: MockTenantLoader }); }
|
480
583
|
}
|
481
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
584
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: MockTenantLoader, decorators: [{
|
482
585
|
type: Injectable
|
483
586
|
}] });
|
484
587
|
|
@@ -820,29 +923,29 @@ const MESSAGES = Array.from({ length: 100 }).map(() => {
|
|
820
923
|
|
821
924
|
class AXPMessageDataSeeder {
|
822
925
|
constructor() {
|
823
|
-
this.storageService = inject(
|
926
|
+
this.storageService = inject(AXPEntityStorageService);
|
824
927
|
}
|
825
928
|
async seed() {
|
826
929
|
await this.storageService.initial(`${RootConfig.module.name}.${RootConfig.entities.message.name}`, MESSAGES);
|
827
930
|
}
|
828
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
829
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
931
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXPMessageDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
932
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXPMessageDataSeeder }); }
|
830
933
|
}
|
831
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
934
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXPMessageDataSeeder, decorators: [{
|
832
935
|
type: Injectable
|
833
936
|
}] });
|
834
937
|
|
835
938
|
class AXPRoomDataSeeder {
|
836
939
|
constructor() {
|
837
|
-
this.storageService = inject(
|
940
|
+
this.storageService = inject(AXPEntityStorageService);
|
838
941
|
}
|
839
942
|
async seed() {
|
840
943
|
await this.storageService.initial(`${RootConfig.module.name}.${RootConfig.entities.room.name}`, ROOMS);
|
841
944
|
}
|
842
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
843
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
945
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXPRoomDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
946
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXPRoomDataSeeder }); }
|
844
947
|
}
|
845
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
948
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXPRoomDataSeeder, decorators: [{
|
846
949
|
type: Injectable
|
847
950
|
}] });
|
848
951
|
|
@@ -853,8 +956,9 @@ const widgetTypes = [
|
|
853
956
|
'gauge-chart',
|
854
957
|
'line-chart',
|
855
958
|
'map',
|
856
|
-
'clock
|
857
|
-
'weather',
|
959
|
+
'analog-clock',
|
960
|
+
'minimal-weather',
|
961
|
+
'advanced-weather',
|
858
962
|
'sticky-note',
|
859
963
|
'notification',
|
860
964
|
'task-list',
|
@@ -898,51 +1002,105 @@ function generateBarChartWidget() {
|
|
898
1002
|
},
|
899
1003
|
};
|
900
1004
|
}
|
901
|
-
// Generate clock
|
902
|
-
function
|
1005
|
+
// Generate analog clock widget
|
1006
|
+
function generateAnalogClockWidget() {
|
903
1007
|
const uniqueId = AXPDataGenerator.uuid();
|
904
1008
|
return {
|
905
1009
|
config: {
|
906
1010
|
id: AXPDataGenerator.uuid(),
|
907
|
-
|
1011
|
+
width: 2,
|
1012
|
+
height: 3,
|
1013
|
+
minWidth: 2,
|
1014
|
+
minHeight: 2,
|
1015
|
+
maxWidth: 4,
|
1016
|
+
maxHeight: 4,
|
908
1017
|
},
|
909
1018
|
node: {
|
910
|
-
name: `clock
|
911
|
-
path: `clock
|
912
|
-
type: 'clock
|
913
|
-
defaultValue: JSON.stringify({
|
914
|
-
showDigital: true,
|
915
|
-
showAnalog: true,
|
916
|
-
showDate: true,
|
917
|
-
use24Hour: AXPDataGenerator.boolean(),
|
918
|
-
digitalClockSize: 3,
|
919
|
-
analogClockSize: 200,
|
920
|
-
bgColor: '#ffffff',
|
921
|
-
accentColor: AXPDataGenerator.color(),
|
922
|
-
}),
|
1019
|
+
name: `analog-clock-${uniqueId}`,
|
1020
|
+
path: `analog-clock-${uniqueId}`,
|
1021
|
+
type: 'analog-clock',
|
923
1022
|
options: {
|
924
|
-
|
1023
|
+
timezone: {
|
1024
|
+
code: AXPDataGenerator.pick(['UTC', 'America/New_York', 'Europe/London', 'Asia/Tokyo', 'Australia/Sydney']),
|
1025
|
+
title: AXPDataGenerator.pick([
|
1026
|
+
'UTC',
|
1027
|
+
'Eastern Time',
|
1028
|
+
'Greenwich Mean Time',
|
1029
|
+
'Japan Standard Time',
|
1030
|
+
'Australian Eastern Time',
|
1031
|
+
]),
|
1032
|
+
iana: AXPDataGenerator.pick(['UTC', 'America/New_York', 'Europe/London', 'Asia/Tokyo', 'Australia/Sydney']),
|
1033
|
+
abbr: AXPDataGenerator.pick(['UTC', 'EST', 'GMT', 'JST', 'AEST']),
|
1034
|
+
},
|
1035
|
+
others: AXPDataGenerator.pick([
|
1036
|
+
[],
|
1037
|
+
[
|
1038
|
+
{
|
1039
|
+
code: 'America/Los_Angeles',
|
1040
|
+
title: 'Pacific Time',
|
1041
|
+
iana: 'America/Los_Angeles',
|
1042
|
+
abbr: 'PST',
|
1043
|
+
},
|
1044
|
+
],
|
1045
|
+
[
|
1046
|
+
{
|
1047
|
+
code: 'Europe/Paris',
|
1048
|
+
title: 'Central European Time',
|
1049
|
+
iana: 'Europe/Paris',
|
1050
|
+
abbr: 'CET',
|
1051
|
+
},
|
1052
|
+
],
|
1053
|
+
]),
|
925
1054
|
},
|
926
1055
|
},
|
927
1056
|
};
|
928
1057
|
}
|
929
|
-
// Generate weather widget
|
930
|
-
function
|
1058
|
+
// Generate minimal weather widget
|
1059
|
+
function generateMinimalWeatherWidget() {
|
931
1060
|
const uniqueId = AXPDataGenerator.uuid();
|
932
1061
|
return {
|
933
1062
|
config: {
|
934
1063
|
id: AXPDataGenerator.uuid(),
|
935
|
-
|
1064
|
+
width: 2,
|
1065
|
+
height: 2,
|
1066
|
+
minWidth: 1,
|
1067
|
+
minHeight: 2,
|
1068
|
+
maxWidth: 4,
|
1069
|
+
maxHeight: 5,
|
936
1070
|
},
|
937
1071
|
node: {
|
938
|
-
name: `weather-${uniqueId}`,
|
939
|
-
path: `weather-${uniqueId}`,
|
940
|
-
type: 'weather',
|
1072
|
+
name: `minimal-weather-${uniqueId}`,
|
1073
|
+
path: `minimal-weather-${uniqueId}`,
|
1074
|
+
type: 'minimal-weather',
|
941
1075
|
options: {
|
942
1076
|
city: AXPDataGenerator.city(),
|
1077
|
+
temperatureUnit: AXPDataGenerator.pick(['°C', '°F']),
|
943
1078
|
},
|
944
|
-
|
945
|
-
|
1079
|
+
},
|
1080
|
+
};
|
1081
|
+
}
|
1082
|
+
// Generate advanced weather widget
|
1083
|
+
function generateAdvancedWeatherWidget() {
|
1084
|
+
const uniqueId = AXPDataGenerator.uuid();
|
1085
|
+
return {
|
1086
|
+
config: {
|
1087
|
+
id: AXPDataGenerator.uuid(),
|
1088
|
+
width: 3,
|
1089
|
+
height: 5,
|
1090
|
+
minWidth: 3,
|
1091
|
+
minHeight: 5,
|
1092
|
+
maxWidth: 5,
|
1093
|
+
maxHeight: 7,
|
1094
|
+
},
|
1095
|
+
node: {
|
1096
|
+
name: `advanced-weather-${uniqueId}`,
|
1097
|
+
path: `advanced-weather-${uniqueId}`,
|
1098
|
+
type: 'advanced-weather',
|
1099
|
+
options: {
|
1100
|
+
city: AXPDataGenerator.city(),
|
1101
|
+
temperatureUnit: AXPDataGenerator.pick(['°C', '°F']),
|
1102
|
+
forecastHours: AXPDataGenerator.number(1, 8),
|
1103
|
+
forecastDays: AXPDataGenerator.number(1, 2),
|
946
1104
|
},
|
947
1105
|
},
|
948
1106
|
};
|
@@ -1323,10 +1481,12 @@ function getWidgetGenerator(type) {
|
|
1323
1481
|
return generateGaugeChartWidget;
|
1324
1482
|
case 'line-chart':
|
1325
1483
|
return generateLineChartWidget;
|
1326
|
-
case 'clock
|
1327
|
-
return
|
1328
|
-
case 'weather':
|
1329
|
-
return
|
1484
|
+
case 'analog-clock':
|
1485
|
+
return generateAnalogClockWidget;
|
1486
|
+
case 'minimal-weather':
|
1487
|
+
return generateMinimalWeatherWidget;
|
1488
|
+
case 'advanced-weather':
|
1489
|
+
return generateAdvancedWeatherWidget;
|
1330
1490
|
case 'sticky-note':
|
1331
1491
|
return generateStickyNoteWidget;
|
1332
1492
|
case 'notification':
|
@@ -1421,8 +1581,9 @@ function generateChartsDashboard(user) {
|
|
1421
1581
|
// Generate a Utility Dashboard with utility widgets
|
1422
1582
|
function generateUtilityDashboard() {
|
1423
1583
|
const utilityWidgets = [
|
1424
|
-
|
1425
|
-
|
1584
|
+
generateAnalogClockWidget(),
|
1585
|
+
generateMinimalWeatherWidget(),
|
1586
|
+
generateAdvancedWeatherWidget(),
|
1426
1587
|
generateStickyNoteWidget(),
|
1427
1588
|
generateNotificationWidget(),
|
1428
1589
|
generateTaskListWidget(),
|
@@ -1468,15 +1629,15 @@ const DASHBOARDS = [
|
|
1468
1629
|
|
1469
1630
|
class AXPDashboardDataSeeder {
|
1470
1631
|
constructor() {
|
1471
|
-
this.storageService = inject(
|
1632
|
+
this.storageService = inject(AXPEntityStorageService);
|
1472
1633
|
}
|
1473
1634
|
async seed() {
|
1474
1635
|
await this.storageService.initial(`${RootConfig$1.module.name}.${RootConfig$1.entities.dashboard.name}`, DASHBOARDS);
|
1475
1636
|
}
|
1476
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
1477
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
1637
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXPDashboardDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
1638
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXPDashboardDataSeeder }); }
|
1478
1639
|
}
|
1479
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
1640
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXPDashboardDataSeeder, decorators: [{
|
1480
1641
|
type: Injectable
|
1481
1642
|
}] });
|
1482
1643
|
|
@@ -1659,19 +1820,19 @@ const DOCUMENT_TYPES = [
|
|
1659
1820
|
|
1660
1821
|
class AXCDocumentTypeDataSeeder {
|
1661
1822
|
constructor() {
|
1662
|
-
this.storageService = inject(
|
1823
|
+
this.storageService = inject(AXPEntityStorageService);
|
1663
1824
|
}
|
1664
1825
|
async seed() {
|
1665
1826
|
await this.storageService.initial(`${RootConfig$2.module.name}.${RootConfig$2.entities.documentType.name}`, DOCUMENT_TYPES);
|
1666
1827
|
}
|
1667
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
1668
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
1828
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXCDocumentTypeDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
1829
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXCDocumentTypeDataSeeder }); }
|
1669
1830
|
}
|
1670
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
1831
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXCDocumentTypeDataSeeder, decorators: [{
|
1671
1832
|
type: Injectable
|
1672
1833
|
}] });
|
1673
1834
|
|
1674
|
-
class
|
1835
|
+
class AXCFolderMockService extends AXMFolderServiceImpl {
|
1675
1836
|
async updateParentFolders(folder) {
|
1676
1837
|
if (folder.parentId) {
|
1677
1838
|
const parent = await this.getOne(folder.parentId);
|
@@ -1885,7 +2046,7 @@ class AXMFolderMockService extends AXMFolderServiceImpl {
|
|
1885
2046
|
class AXMFileMockService extends AXMDocumentServiceImpl {
|
1886
2047
|
constructor() {
|
1887
2048
|
super();
|
1888
|
-
this.folderService = new
|
2049
|
+
this.folderService = new AXCFolderMockService();
|
1889
2050
|
}
|
1890
2051
|
async updateParentFolder(file) {
|
1891
2052
|
if (!file.parentId) {
|
@@ -2399,16 +2560,16 @@ const FILE_MOCK_DATA = allFiles;
|
|
2399
2560
|
|
2400
2561
|
class AXCFolderDataSeeder {
|
2401
2562
|
constructor() {
|
2402
|
-
this.storageService = inject(
|
2563
|
+
this.storageService = inject(AXPEntityStorageService);
|
2403
2564
|
}
|
2404
2565
|
async seed() {
|
2405
2566
|
await this.storageService.initial(`${RootConfig$2.module.name}.${RootConfig$2.entities.folder.name}`, FOLDER_MOCK_DATA);
|
2406
2567
|
await this.storageService.initial(`${RootConfig$2.module.name}.${RootConfig$2.entities.document.name}`, FILE_MOCK_DATA);
|
2407
2568
|
}
|
2408
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
2409
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
2569
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXCFolderDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
2570
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXCFolderDataSeeder }); }
|
2410
2571
|
}
|
2411
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
2572
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXCFolderDataSeeder, decorators: [{
|
2412
2573
|
type: Injectable
|
2413
2574
|
}] });
|
2414
2575
|
|
@@ -2551,23 +2712,23 @@ const TEMPLATE_FORM_TEMPLATES = generateTemplates();
|
|
2551
2712
|
|
2552
2713
|
class AXPFormTemplateCategoryDataSeeder {
|
2553
2714
|
constructor() {
|
2554
|
-
this.storageService = inject(
|
2715
|
+
this.storageService = inject(AXPEntityStorageService);
|
2555
2716
|
}
|
2556
2717
|
async seed() {
|
2557
2718
|
await this.storageService.initial(`${RootConfig$3.module.name}.${RootConfig$3.entities.category.name}`, TEMPLATE_CATEGORIES);
|
2558
2719
|
await this.storageService.initial(`${RootConfig$3.module.name}.${RootConfig$3.entities.template.name}`, TEMPLATE_FORM_TEMPLATES);
|
2559
2720
|
}
|
2560
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
2561
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
2721
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXPFormTemplateCategoryDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
2722
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXPFormTemplateCategoryDataSeeder }); }
|
2562
2723
|
}
|
2563
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
2724
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXPFormTemplateCategoryDataSeeder, decorators: [{
|
2564
2725
|
type: Injectable
|
2565
2726
|
}] });
|
2566
2727
|
|
2567
2728
|
class AXCFormTemplateManagementMockModule {
|
2568
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
2569
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
2570
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
2729
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXCFormTemplateManagementMockModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
2730
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0.4", ngImport: i0, type: AXCFormTemplateManagementMockModule }); }
|
2731
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXCFormTemplateManagementMockModule, providers: [
|
2571
2732
|
// {
|
2572
2733
|
// provide: AXP_WIDGET_DATASOURCE_PROVIDER,
|
2573
2734
|
// useClass: AXPMockWidgetDataSourceProvider,
|
@@ -2580,7 +2741,7 @@ class AXCFormTemplateManagementMockModule {
|
|
2580
2741
|
},
|
2581
2742
|
] }); }
|
2582
2743
|
}
|
2583
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
2744
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXCFormTemplateManagementMockModule, decorators: [{
|
2584
2745
|
type: NgModule,
|
2585
2746
|
args: [{
|
2586
2747
|
imports: [],
|
@@ -2669,12 +2830,17 @@ const ISSUE_TYPES = generateIssueTypes();
|
|
2669
2830
|
|
2670
2831
|
class AXPIssueTypeDataSeeder {
|
2671
2832
|
constructor() {
|
2672
|
-
this.storageService = inject(
|
2833
|
+
this.storageService = inject(AXPEntityStorageService);
|
2673
2834
|
}
|
2674
2835
|
async seed() {
|
2675
2836
|
await this.storageService.initial(`${RootConfig$4.module.name}.${RootConfig$4.entities.issueType.name}`, ISSUE_TYPES);
|
2676
2837
|
}
|
2838
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXPIssueTypeDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
2839
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXPIssueTypeDataSeeder }); }
|
2677
2840
|
}
|
2841
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXPIssueTypeDataSeeder, decorators: [{
|
2842
|
+
type: Injectable
|
2843
|
+
}] });
|
2678
2844
|
|
2679
2845
|
const projectMock$1 = [
|
2680
2846
|
{
|
@@ -2739,15 +2905,15 @@ const projectMock$1 = [
|
|
2739
2905
|
|
2740
2906
|
class AXMLogDataSeeder {
|
2741
2907
|
constructor() {
|
2742
|
-
this.storageService = inject(
|
2908
|
+
this.storageService = inject(AXPEntityStorageService);
|
2743
2909
|
}
|
2744
2910
|
async seed() {
|
2745
2911
|
await this.storageService.initial(`${RootConfig$5.module.name}.${RootConfig$5.entities.axpLog.name}`, projectMock$1);
|
2746
2912
|
}
|
2747
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
2748
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
2913
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXMLogDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
2914
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXMLogDataSeeder }); }
|
2749
2915
|
}
|
2750
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
2916
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXMLogDataSeeder, decorators: [{
|
2751
2917
|
type: Injectable
|
2752
2918
|
}] });
|
2753
2919
|
|
@@ -2831,10 +2997,10 @@ class MOCKStrategy {
|
|
2831
2997
|
},
|
2832
2998
|
};
|
2833
2999
|
}
|
2834
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
2835
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
3000
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: MOCKStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
3001
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: MOCKStrategy }); }
|
2836
3002
|
}
|
2837
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
3003
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: MOCKStrategy, decorators: [{
|
2838
3004
|
type: Injectable
|
2839
3005
|
}], ctorParameters: () => [] });
|
2840
3006
|
|
@@ -2867,10 +3033,10 @@ class AXMMockNotificationService {
|
|
2867
3033
|
const notification = payload || generateNotification();
|
2868
3034
|
await this.storageService.insertOne(this.name, notification);
|
2869
3035
|
}
|
2870
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
2871
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
3036
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXMMockNotificationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
3037
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXMMockNotificationService, providedIn: 'root' }); }
|
2872
3038
|
}
|
2873
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
3039
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXMMockNotificationService, decorators: [{
|
2874
3040
|
type: Injectable,
|
2875
3041
|
args: [{
|
2876
3042
|
providedIn: 'root',
|
@@ -2925,15 +3091,15 @@ const NOTIFICATION_TEMPLATES = [
|
|
2925
3091
|
|
2926
3092
|
class AXCNotificationTemplateDataSeeder {
|
2927
3093
|
constructor() {
|
2928
|
-
this.storageService = inject(
|
3094
|
+
this.storageService = inject(AXPEntityStorageService);
|
2929
3095
|
}
|
2930
3096
|
async seed() {
|
2931
3097
|
await this.storageService.initial(`${RootConfig$7.module.name}.${RootConfig$7.entities.template.name}`, NOTIFICATION_TEMPLATES);
|
2932
3098
|
}
|
2933
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
2934
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
3099
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXCNotificationTemplateDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
3100
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXCNotificationTemplateDataSeeder }); }
|
2935
3101
|
}
|
2936
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
3102
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXCNotificationTemplateDataSeeder, decorators: [{
|
2937
3103
|
type: Injectable
|
2938
3104
|
}] });
|
2939
3105
|
|
@@ -4079,7 +4245,7 @@ const ROLES_MOCK = generateRole();
|
|
4079
4245
|
|
4080
4246
|
class AXCOrganizationManagementDataSeeder {
|
4081
4247
|
constructor() {
|
4082
|
-
this.storageService = inject(
|
4248
|
+
this.storageService = inject(AXPEntityStorageService);
|
4083
4249
|
}
|
4084
4250
|
async seed() {
|
4085
4251
|
const uuid = AXPDataGenerator.uuid;
|
@@ -4458,17 +4624,17 @@ class AXCOrganizationManagementDataSeeder {
|
|
4458
4624
|
// Responsibility
|
4459
4625
|
await this.storageService.initial(RootConfig$8.entities.responsibility.source, RESPONSIBILITIES_MOCK);
|
4460
4626
|
}
|
4461
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
4462
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
4627
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXCOrganizationManagementDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
4628
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXCOrganizationManagementDataSeeder }); }
|
4463
4629
|
}
|
4464
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
4630
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXCOrganizationManagementDataSeeder, decorators: [{
|
4465
4631
|
type: Injectable
|
4466
4632
|
}] });
|
4467
4633
|
|
4468
4634
|
class AXCFOrganizationManagementMockModule {
|
4469
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
4470
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
4471
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
4635
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXCFOrganizationManagementMockModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
4636
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0.4", ngImport: i0, type: AXCFOrganizationManagementMockModule }); }
|
4637
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXCFOrganizationManagementMockModule, providers: [
|
4472
4638
|
{
|
4473
4639
|
provide: AXP_DATA_SEEDER_TOKEN,
|
4474
4640
|
useClass: AXCOrganizationManagementDataSeeder,
|
@@ -4476,7 +4642,7 @@ class AXCFOrganizationManagementMockModule {
|
|
4476
4642
|
},
|
4477
4643
|
] }); }
|
4478
4644
|
}
|
4479
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
4645
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXCFOrganizationManagementMockModule, decorators: [{
|
4480
4646
|
type: NgModule,
|
4481
4647
|
args: [{
|
4482
4648
|
imports: [],
|
@@ -4529,15 +4695,15 @@ By using <b>[Your Banking App]</b>, you acknowledge that you have read, understo
|
|
4529
4695
|
|
4530
4696
|
class AXCAppTermDataSeeder {
|
4531
4697
|
constructor() {
|
4532
|
-
this.storageService = inject(
|
4698
|
+
this.storageService = inject(AXPEntityStorageService);
|
4533
4699
|
}
|
4534
4700
|
async seed() {
|
4535
4701
|
await this.storageService.initial(`${RootConfig$9.module.name}.${RootConfig$9.entities.appTerm.name}`, APP_TERMS);
|
4536
4702
|
}
|
4537
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
4538
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
4703
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXCAppTermDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
4704
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXCAppTermDataSeeder }); }
|
4539
4705
|
}
|
4540
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
4706
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXCAppTermDataSeeder, decorators: [{
|
4541
4707
|
type: Injectable
|
4542
4708
|
}] });
|
4543
4709
|
|
@@ -4564,15 +4730,15 @@ const APP_VERSIONS = Array.from({ length: 10 }).map((element, i) => {
|
|
4564
4730
|
|
4565
4731
|
class AXCAppVersionDataSeeder {
|
4566
4732
|
constructor() {
|
4567
|
-
this.storageService = inject(
|
4733
|
+
this.storageService = inject(AXPEntityStorageService);
|
4568
4734
|
}
|
4569
4735
|
async seed() {
|
4570
4736
|
await this.storageService.initial(`${RootConfig$9.module.name}.${RootConfig$9.entities.appVersion.name}`, APP_VERSIONS);
|
4571
4737
|
}
|
4572
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
4573
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
4738
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXCAppVersionDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
4739
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXCAppVersionDataSeeder }); }
|
4574
4740
|
}
|
4575
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
4741
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXCAppVersionDataSeeder, decorators: [{
|
4576
4742
|
type: Injectable
|
4577
4743
|
}] });
|
4578
4744
|
|
@@ -4595,15 +4761,15 @@ const GLOBAL_VARIABLES = Array.from({ length: 4 }).map((element, i) => {
|
|
4595
4761
|
|
4596
4762
|
class AXCGlobalVariablesDataSeeder {
|
4597
4763
|
constructor() {
|
4598
|
-
this.storageService = inject(
|
4764
|
+
this.storageService = inject(AXPEntityStorageService);
|
4599
4765
|
}
|
4600
4766
|
async seed() {
|
4601
4767
|
await this.storageService.initial(`${RootConfig$9.module.name}.${RootConfig$9.entities.globalVariable.name}`, GLOBAL_VARIABLES);
|
4602
4768
|
}
|
4603
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
4604
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
4769
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXCGlobalVariablesDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
4770
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXCGlobalVariablesDataSeeder }); }
|
4605
4771
|
}
|
4606
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
4772
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXCGlobalVariablesDataSeeder, decorators: [{
|
4607
4773
|
type: Injectable
|
4608
4774
|
}] });
|
4609
4775
|
|
@@ -4683,11 +4849,11 @@ class AXCRegionalServiceImpl extends AXPRegionalService {
|
|
4683
4849
|
return (await this.getLanguages()).filter((c) => ['fa-IR', 'en-US'].some((e) => e == c.code));
|
4684
4850
|
}
|
4685
4851
|
async getTimeZones() {
|
4686
|
-
const { timeZones } = await import('./acorex-connectivity-mock-timezones-
|
4852
|
+
const { timeZones } = await import('./acorex-connectivity-mock-timezones-CnNQ6EXw.mjs');
|
4687
4853
|
return timeZones;
|
4688
4854
|
}
|
4689
4855
|
async getBrowserTimeZoneCode() {
|
4690
|
-
const { timeZones } = await import('./acorex-connectivity-mock-timezones-
|
4856
|
+
const { timeZones } = await import('./acorex-connectivity-mock-timezones-CnNQ6EXw.mjs');
|
4691
4857
|
const now = new Date();
|
4692
4858
|
// Calculate offset in hours and minutes
|
4693
4859
|
const offsetMinutes = now.getTimezoneOffset();
|
@@ -4821,10 +4987,10 @@ class AXCFileStorageService {
|
|
4821
4987
|
.catch((error) => console.error('Error during cleanup:', error));
|
4822
4988
|
}, 5 * 60 * 1000); // Runs every 5 minutes
|
4823
4989
|
}
|
4824
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
4825
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
4990
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXCFileStorageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
4991
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXCFileStorageService }); }
|
4826
4992
|
}
|
4827
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
4993
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXCFileStorageService, decorators: [{
|
4828
4994
|
type: Injectable
|
4829
4995
|
}], ctorParameters: () => [] });
|
4830
4996
|
|
@@ -4929,16 +5095,16 @@ const METADATA_MOCK = [
|
|
4929
5095
|
|
4930
5096
|
class AXCMetaDataDefinitionDataSeeder {
|
4931
5097
|
constructor() {
|
4932
|
-
this.storageService = inject(
|
5098
|
+
this.storageService = inject(AXPEntityStorageService);
|
4933
5099
|
}
|
4934
5100
|
async seed() {
|
4935
5101
|
await this.storageService.initial(`${RootConfig$9.module.name}.${RootConfig$9.entities.metaDataDefinitionCategory.name}`, METADATA_CATEGORY_MOCK);
|
4936
5102
|
await this.storageService.initial(`${RootConfig$9.module.name}.${RootConfig$9.entities.metaDataDefinition.name}`, METADATA_MOCK);
|
4937
5103
|
}
|
4938
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
4939
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
5104
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXCMetaDataDefinitionDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
5105
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXCMetaDataDefinitionDataSeeder }); }
|
4940
5106
|
}
|
4941
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
5107
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXCMetaDataDefinitionDataSeeder, decorators: [{
|
4942
5108
|
type: Injectable
|
4943
5109
|
}] });
|
4944
5110
|
|
@@ -4968,15 +5134,15 @@ const ClientMock = [
|
|
4968
5134
|
|
4969
5135
|
class AXCProjectclientDataSeeder {
|
4970
5136
|
constructor() {
|
4971
|
-
this.storageService = inject(
|
5137
|
+
this.storageService = inject(AXPEntityStorageService);
|
4972
5138
|
}
|
4973
5139
|
async seed() {
|
4974
5140
|
await this.storageService.initial(`${RootConfig$a.module.name}.${RootConfig$a.entities.client.name}`, ClientMock);
|
4975
5141
|
}
|
4976
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
4977
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
5142
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXCProjectclientDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
5143
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXCProjectclientDataSeeder }); }
|
4978
5144
|
}
|
4979
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
5145
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXCProjectclientDataSeeder, decorators: [{
|
4980
5146
|
type: Injectable
|
4981
5147
|
}] });
|
4982
5148
|
|
@@ -5070,44 +5236,44 @@ const projectMemberMock = [
|
|
5070
5236
|
|
5071
5237
|
class AXCProjectMemberDataSeeder {
|
5072
5238
|
constructor() {
|
5073
|
-
this.storageService = inject(
|
5239
|
+
this.storageService = inject(AXPEntityStorageService);
|
5074
5240
|
}
|
5075
5241
|
async seed() {
|
5076
5242
|
await this.storageService.initial(`${RootConfig$a.module.name}.${RootConfig$a.entities.projectMemeber.name}`, projectMemberMock);
|
5077
5243
|
}
|
5078
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
5079
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
5244
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXCProjectMemberDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
5245
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXCProjectMemberDataSeeder }); }
|
5080
5246
|
}
|
5081
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
5247
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXCProjectMemberDataSeeder, decorators: [{
|
5082
5248
|
type: Injectable
|
5083
5249
|
}] });
|
5084
5250
|
|
5085
5251
|
class AXCProjectRoleMemberDataSeeder {
|
5086
5252
|
constructor() {
|
5087
|
-
this.storageService = inject(
|
5253
|
+
this.storageService = inject(AXPEntityStorageService);
|
5088
5254
|
}
|
5089
5255
|
async seed() {
|
5090
5256
|
await this.storageService.initial(`${RootConfig$a.module.name}.${RootConfig$a.entities.projectType.name}`, projectTypeMock);
|
5091
5257
|
await this.storageService.initial(`${RootConfig$a.module.name}.${RootConfig$a.entities.projectRoleMember.name}`, projectRoleMemberMock);
|
5092
5258
|
}
|
5093
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
5094
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
5259
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXCProjectRoleMemberDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
5260
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXCProjectRoleMemberDataSeeder }); }
|
5095
5261
|
}
|
5096
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
5262
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXCProjectRoleMemberDataSeeder, decorators: [{
|
5097
5263
|
type: Injectable
|
5098
5264
|
}] });
|
5099
5265
|
|
5100
5266
|
class AXCProjectDataSeeder {
|
5101
5267
|
constructor() {
|
5102
|
-
this.storageService = inject(
|
5268
|
+
this.storageService = inject(AXPEntityStorageService);
|
5103
5269
|
}
|
5104
5270
|
async seed() {
|
5105
5271
|
await this.storageService.initial(`${RootConfig$a.module.name}.${RootConfig$a.entities.project.name}`, projectMock);
|
5106
5272
|
}
|
5107
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
5108
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
5273
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXCProjectDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
5274
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXCProjectDataSeeder }); }
|
5109
5275
|
}
|
5110
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
5276
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXCProjectDataSeeder, decorators: [{
|
5111
5277
|
type: Injectable
|
5112
5278
|
}] });
|
5113
5279
|
|
@@ -5143,15 +5309,15 @@ const sprintMock = [
|
|
5143
5309
|
|
5144
5310
|
class AXCsprintDataSeeder {
|
5145
5311
|
constructor() {
|
5146
|
-
this.storageService = inject(
|
5312
|
+
this.storageService = inject(AXPEntityStorageService);
|
5147
5313
|
}
|
5148
5314
|
async seed() {
|
5149
5315
|
await this.storageService.initial(`${RootConfig$a.module.name}.${RootConfig$a.entities.sprint.name}`, sprintMock);
|
5150
5316
|
}
|
5151
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
5152
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
5317
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXCsprintDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
5318
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXCsprintDataSeeder }); }
|
5153
5319
|
}
|
5154
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
5320
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXCsprintDataSeeder, decorators: [{
|
5155
5321
|
type: Injectable
|
5156
5322
|
}] });
|
5157
5323
|
|
@@ -5181,15 +5347,15 @@ const taskTypeMock = [
|
|
5181
5347
|
|
5182
5348
|
class AXCTaskTypeDataSeeder {
|
5183
5349
|
constructor() {
|
5184
|
-
this.storageService = inject(
|
5350
|
+
this.storageService = inject(AXPEntityStorageService);
|
5185
5351
|
}
|
5186
5352
|
async seed() {
|
5187
5353
|
await this.storageService.initial(`${RootConfig$a.module.name}.${RootConfig$a.entities.taskType.name}`, taskTypeMock);
|
5188
5354
|
}
|
5189
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
5190
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
5355
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXCTaskTypeDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
5356
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXCTaskTypeDataSeeder }); }
|
5191
5357
|
}
|
5192
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
5358
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXCTaskTypeDataSeeder, decorators: [{
|
5193
5359
|
type: Injectable
|
5194
5360
|
}] });
|
5195
5361
|
|
@@ -5250,29 +5416,29 @@ const taskMock = [
|
|
5250
5416
|
|
5251
5417
|
class AXCTaskDataSeeder {
|
5252
5418
|
constructor() {
|
5253
|
-
this.storageService = inject(
|
5419
|
+
this.storageService = inject(AXPEntityStorageService);
|
5254
5420
|
}
|
5255
5421
|
async seed() {
|
5256
5422
|
await this.storageService.initial(`${RootConfig$a.module.name}.${RootConfig$a.entities.task.name}`, taskMock);
|
5257
5423
|
}
|
5258
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
5259
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
5424
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXCTaskDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
5425
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXCTaskDataSeeder }); }
|
5260
5426
|
}
|
5261
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
5427
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXCTaskDataSeeder, decorators: [{
|
5262
5428
|
type: Injectable
|
5263
5429
|
}] });
|
5264
5430
|
|
5265
5431
|
class AXCWorkSiteSeeder {
|
5266
5432
|
constructor() {
|
5267
|
-
this.storageService = inject(
|
5433
|
+
this.storageService = inject(AXPEntityStorageService);
|
5268
5434
|
}
|
5269
5435
|
async seed() {
|
5270
5436
|
await this.storageService.initial(`${RootConfig$a.module.name}.${RootConfig$a.entities.workSite.name}`, workSiteMock);
|
5271
5437
|
}
|
5272
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
5273
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
5438
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXCWorkSiteSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
5439
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXCWorkSiteSeeder }); }
|
5274
5440
|
}
|
5275
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
5441
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXCWorkSiteSeeder, decorators: [{
|
5276
5442
|
type: Injectable
|
5277
5443
|
}] });
|
5278
5444
|
|
@@ -5295,15 +5461,15 @@ const SCHEDULER_JOB = [
|
|
5295
5461
|
|
5296
5462
|
class AXCSchedulerJobDataSeeder {
|
5297
5463
|
constructor() {
|
5298
|
-
this.storageService = inject(
|
5464
|
+
this.storageService = inject(AXPEntityStorageService);
|
5299
5465
|
}
|
5300
5466
|
async seed() {
|
5301
5467
|
await this.storageService.initial(`${RootConfig$b.module.name}.${RootConfig$b.entities.schedulerJob.name}`, SCHEDULER_JOB);
|
5302
5468
|
}
|
5303
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
5304
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
5469
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXCSchedulerJobDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
5470
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXCSchedulerJobDataSeeder }); }
|
5305
5471
|
}
|
5306
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
5472
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXCSchedulerJobDataSeeder, decorators: [{
|
5307
5473
|
type: Injectable
|
5308
5474
|
}] });
|
5309
5475
|
|
@@ -5405,7 +5571,7 @@ class AXPSecurityManagementMockWidgetDataSourceProvider {
|
|
5405
5571
|
|
5406
5572
|
class AXPSecurityManagementRoleDataSeeder {
|
5407
5573
|
constructor() {
|
5408
|
-
this.storageService = inject(
|
5574
|
+
this.storageService = inject(AXPEntityStorageService);
|
5409
5575
|
}
|
5410
5576
|
// private permissionService = inject(AXPPermissionDefinitionProviderService);
|
5411
5577
|
async seed() {
|
@@ -5418,16 +5584,16 @@ class AXPSecurityManagementRoleDataSeeder {
|
|
5418
5584
|
}));
|
5419
5585
|
await this.storageService.initial(`${RootConfig$6.module.name}.${RootConfig$6.entities.roles.name}`, roles);
|
5420
5586
|
}
|
5421
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
5422
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
5587
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXPSecurityManagementRoleDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
5588
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXPSecurityManagementRoleDataSeeder }); }
|
5423
5589
|
}
|
5424
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
5590
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXPSecurityManagementRoleDataSeeder, decorators: [{
|
5425
5591
|
type: Injectable
|
5426
5592
|
}] });
|
5427
5593
|
|
5428
5594
|
class AXPSecurityManagementUserDataSeeder {
|
5429
5595
|
constructor() {
|
5430
|
-
this.storageService = inject(
|
5596
|
+
this.storageService = inject(AXPEntityStorageService);
|
5431
5597
|
}
|
5432
5598
|
async seed() {
|
5433
5599
|
await this.storageService.initial(`${RootConfig$6.module.name}.${RootConfig$6.entities.users.name}`, this.generateUsers());
|
@@ -5444,10 +5610,10 @@ class AXPSecurityManagementUserDataSeeder {
|
|
5444
5610
|
roles: user.roleIds,
|
5445
5611
|
}));
|
5446
5612
|
}
|
5447
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
5448
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
5613
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXPSecurityManagementUserDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
5614
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXPSecurityManagementUserDataSeeder }); }
|
5449
5615
|
}
|
5450
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
5616
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXPSecurityManagementUserDataSeeder, decorators: [{
|
5451
5617
|
type: Injectable
|
5452
5618
|
}] });
|
5453
5619
|
|
@@ -5475,7 +5641,7 @@ class AXCDeviceSessionService extends AXMDeviceSessionsServiceImpl {
|
|
5475
5641
|
|
5476
5642
|
class AXPSecurityManagementDeviceSessionDataSeeder {
|
5477
5643
|
constructor() {
|
5478
|
-
this.storageService = inject(
|
5644
|
+
this.storageService = inject(AXPEntityStorageService);
|
5479
5645
|
this.sessionService = inject(AXPSessionService);
|
5480
5646
|
}
|
5481
5647
|
async seed() {
|
@@ -5571,10 +5737,10 @@ class AXPSecurityManagementDeviceSessionDataSeeder {
|
|
5571
5737
|
}
|
5572
5738
|
return deviceSessions;
|
5573
5739
|
}
|
5574
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
5575
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
5740
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXPSecurityManagementDeviceSessionDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
5741
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXPSecurityManagementDeviceSessionDataSeeder }); }
|
5576
5742
|
}
|
5577
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
5743
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXPSecurityManagementDeviceSessionDataSeeder, decorators: [{
|
5578
5744
|
type: Injectable
|
5579
5745
|
}] });
|
5580
5746
|
|
@@ -5697,29 +5863,29 @@ const TEXT_TEMPLATES = [
|
|
5697
5863
|
|
5698
5864
|
class AXCTextTemplateCategoryDataSeeder {
|
5699
5865
|
constructor() {
|
5700
|
-
this.storageService = inject(
|
5866
|
+
this.storageService = inject(AXPEntityStorageService);
|
5701
5867
|
}
|
5702
5868
|
async seed() {
|
5703
5869
|
await this.storageService.initial(`${RootConfig$c.module.name}.${RootConfig$c.entities.category.name}`, TEXT_TEMPLATE_CATEGORY);
|
5704
5870
|
}
|
5705
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
5706
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
5871
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXCTextTemplateCategoryDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
5872
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXCTextTemplateCategoryDataSeeder }); }
|
5707
5873
|
}
|
5708
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
5874
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXCTextTemplateCategoryDataSeeder, decorators: [{
|
5709
5875
|
type: Injectable
|
5710
5876
|
}] });
|
5711
5877
|
|
5712
5878
|
class AXCTextTemplateDataSeeder {
|
5713
5879
|
constructor() {
|
5714
|
-
this.storageService = inject(
|
5880
|
+
this.storageService = inject(AXPEntityStorageService);
|
5715
5881
|
}
|
5716
5882
|
async seed() {
|
5717
5883
|
await this.storageService.initial(`${RootConfig$c.module.name}.${RootConfig$c.entities.template.name}`, TEXT_TEMPLATES);
|
5718
5884
|
}
|
5719
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
5720
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
5885
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXCTextTemplateDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
5886
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXCTextTemplateDataSeeder }); }
|
5721
5887
|
}
|
5722
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
5888
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXCTextTemplateDataSeeder, decorators: [{
|
5723
5889
|
type: Injectable
|
5724
5890
|
}] });
|
5725
5891
|
|
@@ -5803,15 +5969,15 @@ const certificateMock = [
|
|
5803
5969
|
|
5804
5970
|
class AXCCertificateDataSeeder {
|
5805
5971
|
constructor() {
|
5806
|
-
this.storageService = inject(
|
5972
|
+
this.storageService = inject(AXPEntityStorageService);
|
5807
5973
|
}
|
5808
5974
|
async seed() {
|
5809
5975
|
await this.storageService.initial(`${RootConfig$d.module.name}.${RootConfig$d.entities.certificate.name}`, certificateMock);
|
5810
5976
|
}
|
5811
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
5812
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
5977
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXCCertificateDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
5978
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXCCertificateDataSeeder }); }
|
5813
5979
|
}
|
5814
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
5980
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXCCertificateDataSeeder, decorators: [{
|
5815
5981
|
type: Injectable
|
5816
5982
|
}] });
|
5817
5983
|
|
@@ -5970,46 +6136,46 @@ const coursePeriodMockData = [
|
|
5970
6136
|
|
5971
6137
|
class AXCCourseDataSeeder {
|
5972
6138
|
constructor() {
|
5973
|
-
this.storageService = inject(
|
6139
|
+
this.storageService = inject(AXPEntityStorageService);
|
5974
6140
|
}
|
5975
6141
|
async seed() {
|
5976
|
-
await this.storageService.initial(`${RootConfig$d.module.name}.${RootConfig$d.entities.course.name}`, courseMock);
|
5977
6142
|
await this.storageService.initial(`${RootConfig$d.module.name}.${RootConfig$d.entities.courseType.name}`, courseTypeMock);
|
6143
|
+
await this.storageService.initial(`${RootConfig$d.module.name}.${RootConfig$d.entities.course.name}`, courseMock);
|
5978
6144
|
await this.storageService.initial(`${RootConfig$d.module.name}.${RootConfig$d.entities.courseLocation.name}`, courseLocationMock);
|
5979
6145
|
await this.storageService.initial(`${RootConfig$d.module.name}.${RootConfig$d.entities.coursePeriod.name}`, coursePeriodMockData);
|
5980
6146
|
}
|
5981
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
5982
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
6147
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXCCourseDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
6148
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXCCourseDataSeeder }); }
|
5983
6149
|
}
|
5984
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
6150
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXCCourseDataSeeder, decorators: [{
|
5985
6151
|
type: Injectable
|
5986
6152
|
}] });
|
5987
6153
|
|
5988
6154
|
class AXCLocationDataSeeder {
|
5989
6155
|
constructor() {
|
5990
|
-
this.storageService = inject(
|
6156
|
+
this.storageService = inject(AXPEntityStorageService);
|
5991
6157
|
}
|
5992
6158
|
async seed() {
|
5993
6159
|
await this.storageService.initial(`${RootConfig$d.module.name}.${RootConfig$d.entities.location.name}`, locationMockData);
|
5994
6160
|
}
|
5995
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
5996
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
6161
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXCLocationDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
6162
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXCLocationDataSeeder }); }
|
5997
6163
|
}
|
5998
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
6164
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXCLocationDataSeeder, decorators: [{
|
5999
6165
|
type: Injectable
|
6000
6166
|
}] });
|
6001
6167
|
|
6002
6168
|
class AXCPeriodDataSeeder {
|
6003
6169
|
constructor() {
|
6004
|
-
this.storageService = inject(
|
6170
|
+
this.storageService = inject(AXPEntityStorageService);
|
6005
6171
|
}
|
6006
6172
|
async seed() {
|
6007
6173
|
await this.storageService.initial(`${RootConfig$d.module.name}.${RootConfig$d.entities.period.name}`, periodMock);
|
6008
6174
|
}
|
6009
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
6010
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
6175
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXCPeriodDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
6176
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXCPeriodDataSeeder }); }
|
6011
6177
|
}
|
6012
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
6178
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXCPeriodDataSeeder, decorators: [{
|
6013
6179
|
type: Injectable
|
6014
6180
|
}] });
|
6015
6181
|
|
@@ -6068,16 +6234,15 @@ const trainingFacilitatorMock = [
|
|
6068
6234
|
|
6069
6235
|
class AXCTrainingFacilitatorDataSeeder {
|
6070
6236
|
constructor() {
|
6071
|
-
this.storageService = inject(
|
6237
|
+
this.storageService = inject(AXPEntityStorageService);
|
6072
6238
|
}
|
6073
6239
|
async seed() {
|
6074
|
-
await this.storageService.initial(`${RootConfig$d.module.name}.${RootConfig$d.entities.facilitatorType.name}`, facilitatorTypeMock);
|
6075
6240
|
await this.storageService.initial(`${RootConfig$d.module.name}.${RootConfig$d.entities.trainingFacilitator.name}`, trainingFacilitatorMock);
|
6076
6241
|
}
|
6077
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
6078
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
6242
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXCTrainingFacilitatorDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
6243
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXCTrainingFacilitatorDataSeeder }); }
|
6079
6244
|
}
|
6080
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
6245
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXCTrainingFacilitatorDataSeeder, decorators: [{
|
6081
6246
|
type: Injectable
|
6082
6247
|
}] });
|
6083
6248
|
|
@@ -6102,46 +6267,269 @@ const trainingParticipantMockData = [
|
|
6102
6267
|
|
6103
6268
|
class AXCTrainingParticipantDataSeeder {
|
6104
6269
|
constructor() {
|
6105
|
-
this.storageService = inject(
|
6270
|
+
this.storageService = inject(AXPEntityStorageService);
|
6106
6271
|
}
|
6107
6272
|
async seed() {
|
6108
6273
|
await this.storageService.initial(`${RootConfig$d.module.name}.${RootConfig$d.entities.trainingParticipant.name}`, trainingParticipantMockData);
|
6109
6274
|
}
|
6110
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
6111
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
6275
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXCTrainingParticipantDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
6276
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXCTrainingParticipantDataSeeder }); }
|
6112
6277
|
}
|
6113
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
6278
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXCTrainingParticipantDataSeeder, decorators: [{
|
6114
6279
|
type: Injectable
|
6115
6280
|
}] });
|
6116
6281
|
|
6117
6282
|
class AXCTrainigTypeDataSeeder {
|
6118
6283
|
constructor() {
|
6119
|
-
this.storageService = inject(
|
6284
|
+
this.storageService = inject(AXPEntityStorageService);
|
6120
6285
|
}
|
6121
6286
|
async seed() {
|
6122
6287
|
await this.storageService.initial(`${RootConfig$d.module.name}.${RootConfig$d.entities.trainingType.name}`, trainingTypeMockData);
|
6123
6288
|
}
|
6124
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
6125
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
6289
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXCTrainigTypeDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
6290
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXCTrainigTypeDataSeeder }); }
|
6126
6291
|
}
|
6127
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
6292
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXCTrainigTypeDataSeeder, decorators: [{
|
6128
6293
|
type: Injectable
|
6129
6294
|
}] });
|
6130
6295
|
|
6131
6296
|
class AXCTrainingDataSeeder {
|
6132
6297
|
constructor() {
|
6133
|
-
this.storageService = inject(
|
6298
|
+
this.storageService = inject(AXPEntityStorageService);
|
6134
6299
|
}
|
6135
6300
|
async seed() {
|
6136
6301
|
await this.storageService.initial(`${RootConfig$d.module.name}.${RootConfig$d.entities.training.name}`, trainingMock);
|
6137
6302
|
}
|
6138
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
6139
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
6303
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXCTrainingDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
6304
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXCTrainingDataSeeder }); }
|
6140
6305
|
}
|
6141
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
6306
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXCTrainingDataSeeder, decorators: [{
|
6142
6307
|
type: Injectable
|
6143
6308
|
}] });
|
6144
6309
|
|
6310
|
+
class AXCPActivityLogService extends AXPActivityLogProvider {
|
6311
|
+
constructor() {
|
6312
|
+
super(...arguments);
|
6313
|
+
this.storageService = inject(AXPEntityStorageService);
|
6314
|
+
}
|
6315
|
+
async getHistory(refId, refType, options) {
|
6316
|
+
// Get all history records for this entity
|
6317
|
+
let records = await this.storageService.query(`${refType}-history`, {
|
6318
|
+
filter: {
|
6319
|
+
logic: 'and',
|
6320
|
+
filters: [
|
6321
|
+
{
|
6322
|
+
field: 'reference.id',
|
6323
|
+
operator: {
|
6324
|
+
type: 'equal'
|
6325
|
+
},
|
6326
|
+
value: refId,
|
6327
|
+
},
|
6328
|
+
{
|
6329
|
+
field: 'reference.type',
|
6330
|
+
operator: {
|
6331
|
+
type: 'equal'
|
6332
|
+
},
|
6333
|
+
value: refType,
|
6334
|
+
}
|
6335
|
+
]
|
6336
|
+
},
|
6337
|
+
take: 1000,
|
6338
|
+
skip: 0,
|
6339
|
+
sort: [
|
6340
|
+
{
|
6341
|
+
field: 'date',
|
6342
|
+
dir: 'desc',
|
6343
|
+
},
|
6344
|
+
],
|
6345
|
+
});
|
6346
|
+
// Apply date filtering if specified
|
6347
|
+
if (options?.from || options?.to) {
|
6348
|
+
records.items = records.items.filter(r => {
|
6349
|
+
const recordDate = new Date(r.date);
|
6350
|
+
if (options.from && recordDate < options.from) {
|
6351
|
+
return false;
|
6352
|
+
}
|
6353
|
+
if (options.to && recordDate > options.to) {
|
6354
|
+
return false;
|
6355
|
+
}
|
6356
|
+
return true;
|
6357
|
+
});
|
6358
|
+
}
|
6359
|
+
// Sort by date descending (newest first)
|
6360
|
+
records.items.sort((a, b) => new Date(b.date).getTime() - new Date(a.date).getTime());
|
6361
|
+
// Apply pagination if specified
|
6362
|
+
if (options?.limit || options?.offset) {
|
6363
|
+
const offset = options?.offset || 0;
|
6364
|
+
const limit = options?.limit || records.items.length;
|
6365
|
+
records.items = records.items.slice(offset, offset + limit);
|
6366
|
+
}
|
6367
|
+
return records.items;
|
6368
|
+
}
|
6369
|
+
async getHistoryByIds(refId, refType, ids) {
|
6370
|
+
const all = await this.getHistory(refId, refType);
|
6371
|
+
return all.filter(r => ids.includes(r.id)).reverse();
|
6372
|
+
}
|
6373
|
+
}
|
6374
|
+
|
6375
|
+
class AXCMetaDataDefinitionCategoryMockService extends AXMMetaDataDefinitionCategoryServiceImpl {
|
6376
|
+
constructor() {
|
6377
|
+
super(...arguments);
|
6378
|
+
this.metaDataService = inject(AXMMetaDataDefinitionService);
|
6379
|
+
}
|
6380
|
+
async getAllWithItems() {
|
6381
|
+
const rootCategories = await this.query({
|
6382
|
+
take: 1000,
|
6383
|
+
skip: 0,
|
6384
|
+
filter: {
|
6385
|
+
logic: "and",
|
6386
|
+
filters: [{
|
6387
|
+
field: "parentId",
|
6388
|
+
operator: {
|
6389
|
+
type: "isNull"
|
6390
|
+
}
|
6391
|
+
}]
|
6392
|
+
}
|
6393
|
+
});
|
6394
|
+
const categories = await Promise.all(rootCategories.items.map(category => this.buildCategoryTree(category)));
|
6395
|
+
console.log(categories);
|
6396
|
+
return categories;
|
6397
|
+
}
|
6398
|
+
async buildCategoryTree(category) {
|
6399
|
+
const itemsResult = await this.metaDataService.query({
|
6400
|
+
filter: {
|
6401
|
+
logic: "and",
|
6402
|
+
filters: [{
|
6403
|
+
field: "categoryIds",
|
6404
|
+
operator: {
|
6405
|
+
type: 'contains'
|
6406
|
+
},
|
6407
|
+
value: category.id
|
6408
|
+
}]
|
6409
|
+
},
|
6410
|
+
take: 1000,
|
6411
|
+
skip: 0
|
6412
|
+
});
|
6413
|
+
const childCategoriesResult = await this.query({
|
6414
|
+
filter: {
|
6415
|
+
logic: "and",
|
6416
|
+
filters: [{
|
6417
|
+
field: "parentId",
|
6418
|
+
operator: {
|
6419
|
+
type: "equal"
|
6420
|
+
},
|
6421
|
+
value: category.id
|
6422
|
+
}]
|
6423
|
+
},
|
6424
|
+
take: 1000,
|
6425
|
+
skip: 0
|
6426
|
+
});
|
6427
|
+
const children = await Promise.all(childCategoriesResult.items.map(child => this.buildCategoryTree(child)));
|
6428
|
+
return {
|
6429
|
+
...category,
|
6430
|
+
items: itemsResult.items,
|
6431
|
+
categories: children,
|
6432
|
+
children: children
|
6433
|
+
};
|
6434
|
+
}
|
6435
|
+
}
|
6436
|
+
|
6437
|
+
class AXCLockService {
|
6438
|
+
constructor() {
|
6439
|
+
// Local Dexie database for storing lock information independent of AXPEntityStorageService
|
6440
|
+
//#region ---- Dexie In-Memory Lock Storage ----
|
6441
|
+
this.className = 'locks';
|
6442
|
+
//#endregion
|
6443
|
+
this.entityName = this.className;
|
6444
|
+
// Initialise a dedicated Dexie database for lock management to avoid any
|
6445
|
+
// dependency on the generic AXPEntityStorageService. Using a separate
|
6446
|
+
// database name ensures we don't conflict with the existing entity-store
|
6447
|
+
// schema while keeping things lightweight.
|
6448
|
+
this.db = new Dexie('ACoreXPlatformLocks');
|
6449
|
+
this.db.version(1).stores({ [this.className]: 'id, refId, refType, type' });
|
6450
|
+
}
|
6451
|
+
get lockTable() {
|
6452
|
+
return this.db[this.className];
|
6453
|
+
}
|
6454
|
+
lock(request) {
|
6455
|
+
//TODO locked by get info and save
|
6456
|
+
const entity = {
|
6457
|
+
id: AXPDataGenerator.uuid(),
|
6458
|
+
...request,
|
6459
|
+
lockedBy: {
|
6460
|
+
id: request.lockedBy.id,
|
6461
|
+
name: '',
|
6462
|
+
title: '',
|
6463
|
+
},
|
6464
|
+
};
|
6465
|
+
return this.lockTable.add(entity).then(() => entity);
|
6466
|
+
}
|
6467
|
+
async unlock(request) {
|
6468
|
+
const items = await this.getItems(request);
|
6469
|
+
if (items.length > 0) {
|
6470
|
+
//TODO may be don't have id and multi primary key like this!!!!!
|
6471
|
+
await this.lockTable.delete(items[0].id);
|
6472
|
+
}
|
6473
|
+
else {
|
6474
|
+
throw new Error('not found');
|
6475
|
+
}
|
6476
|
+
}
|
6477
|
+
async check(request) {
|
6478
|
+
return (await this.getItems(request)).length > 0;
|
6479
|
+
}
|
6480
|
+
async getInfo(request) {
|
6481
|
+
const items = await this.getItems(request);
|
6482
|
+
if (items.length > 0) {
|
6483
|
+
return items[0];
|
6484
|
+
}
|
6485
|
+
else {
|
6486
|
+
throw new Error('not found');
|
6487
|
+
}
|
6488
|
+
}
|
6489
|
+
async getItems(request) {
|
6490
|
+
const filters = [
|
6491
|
+
{
|
6492
|
+
field: 'refId',
|
6493
|
+
operator: {
|
6494
|
+
type: 'equal',
|
6495
|
+
},
|
6496
|
+
value: request.refId,
|
6497
|
+
},
|
6498
|
+
{
|
6499
|
+
field: 'refType',
|
6500
|
+
operator: {
|
6501
|
+
type: 'equal',
|
6502
|
+
},
|
6503
|
+
value: request.refType,
|
6504
|
+
},
|
6505
|
+
];
|
6506
|
+
// Add type filter only when it is provided in the request
|
6507
|
+
if (request.type !== undefined && request.type != null) {
|
6508
|
+
filters.push({
|
6509
|
+
field: 'type',
|
6510
|
+
operator: {
|
6511
|
+
type: 'equal',
|
6512
|
+
},
|
6513
|
+
value: request.type,
|
6514
|
+
});
|
6515
|
+
}
|
6516
|
+
// Build Dexie query dynamically
|
6517
|
+
let collection = this.lockTable.where(filters[0].field).equals(filters[0].value);
|
6518
|
+
if (filters.length > 1) {
|
6519
|
+
for (let i = 1; i < filters.length; i++) {
|
6520
|
+
const f = filters[i];
|
6521
|
+
collection = collection.and((item) => item[f.field] === f.value);
|
6522
|
+
}
|
6523
|
+
}
|
6524
|
+
return collection.toArray();
|
6525
|
+
}
|
6526
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXCLockService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
6527
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXCLockService }); }
|
6528
|
+
}
|
6529
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXCLockService, decorators: [{
|
6530
|
+
type: Injectable
|
6531
|
+
}], ctorParameters: () => [] });
|
6532
|
+
|
6145
6533
|
class AXCMockModule {
|
6146
6534
|
constructor(appInitService, injector) {
|
6147
6535
|
const seederService = injector.get(AXPDataSeederService);
|
@@ -6154,11 +6542,10 @@ class AXCMockModule {
|
|
6154
6542
|
},
|
6155
6543
|
});
|
6156
6544
|
}
|
6157
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
6158
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
6545
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXCMockModule, deps: [{ token: i1.AXPAppStartUpService }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.NgModule }); }
|
6546
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0.4", ngImport: i0, type: AXCMockModule, imports: [i2.AXPAuthModule, AXCFormTemplateManagementMockModule,
|
6159
6547
|
AXCFOrganizationManagementMockModule] }); }
|
6160
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
6161
|
-
AXPDexieEntityStorageService,
|
6548
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXCMockModule, providers: [
|
6162
6549
|
{
|
6163
6550
|
provide: AXMNotificationEntityService,
|
6164
6551
|
useClass: AXMMockNotificationService,
|
@@ -6251,6 +6638,11 @@ class AXCMockModule {
|
|
6251
6638
|
useClass: AXPDashboardDataSeeder,
|
6252
6639
|
multi: true,
|
6253
6640
|
},
|
6641
|
+
{
|
6642
|
+
provide: AXP_ACTIVITY_LOG_PROVIDER,
|
6643
|
+
useClass: AXCPActivityLogService,
|
6644
|
+
multi: true,
|
6645
|
+
},
|
6254
6646
|
{
|
6255
6647
|
provide: AXPModuleDesignerService,
|
6256
6648
|
useClass: AXCModuleDesignerService,
|
@@ -6265,17 +6657,25 @@ class AXCMockModule {
|
|
6265
6657
|
},
|
6266
6658
|
{
|
6267
6659
|
provide: AXMFolderService,
|
6268
|
-
useClass:
|
6660
|
+
useClass: AXCFolderMockService,
|
6269
6661
|
},
|
6270
6662
|
{
|
6271
6663
|
provide: AXMDocumentService,
|
6272
6664
|
useClass: AXMFileMockService,
|
6273
6665
|
},
|
6666
|
+
{
|
6667
|
+
provide: AXMMetaDataDefinitionCategoryService,
|
6668
|
+
useClass: AXCMetaDataDefinitionCategoryMockService,
|
6669
|
+
},
|
6274
6670
|
{
|
6275
6671
|
provide: AXP_SEARCH_PROVIDER,
|
6276
6672
|
useClass: EntitySearchProvider,
|
6277
6673
|
multi: true,
|
6278
6674
|
},
|
6675
|
+
{
|
6676
|
+
provide: AXPLockService,
|
6677
|
+
useClass: AXCLockService,
|
6678
|
+
},
|
6279
6679
|
{
|
6280
6680
|
provide: AXP_DATA_SEEDER_TOKEN,
|
6281
6681
|
useClass: AXMLogDataSeeder,
|
@@ -6387,13 +6787,14 @@ class AXCMockModule {
|
|
6387
6787
|
provide: AXP_FEATURE_LOADER,
|
6388
6788
|
useClass: MockFeatureLoader,
|
6389
6789
|
},
|
6790
|
+
AXSafePipe
|
6390
6791
|
], imports: [AXPAuthModule.forRoot({
|
6391
6792
|
strategies: [MOCKStrategy],
|
6392
6793
|
}),
|
6393
6794
|
AXCFormTemplateManagementMockModule,
|
6394
6795
|
AXCFOrganizationManagementMockModule] }); }
|
6395
6796
|
}
|
6396
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
6797
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXCMockModule, decorators: [{
|
6397
6798
|
type: NgModule,
|
6398
6799
|
args: [{
|
6399
6800
|
imports: [
|
@@ -6406,7 +6807,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImpo
|
|
6406
6807
|
exports: [],
|
6407
6808
|
declarations: [],
|
6408
6809
|
providers: [
|
6409
|
-
AXPDexieEntityStorageService,
|
6410
6810
|
{
|
6411
6811
|
provide: AXMNotificationEntityService,
|
6412
6812
|
useClass: AXMMockNotificationService,
|
@@ -6499,6 +6899,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImpo
|
|
6499
6899
|
useClass: AXPDashboardDataSeeder,
|
6500
6900
|
multi: true,
|
6501
6901
|
},
|
6902
|
+
{
|
6903
|
+
provide: AXP_ACTIVITY_LOG_PROVIDER,
|
6904
|
+
useClass: AXCPActivityLogService,
|
6905
|
+
multi: true,
|
6906
|
+
},
|
6502
6907
|
{
|
6503
6908
|
provide: AXPModuleDesignerService,
|
6504
6909
|
useClass: AXCModuleDesignerService,
|
@@ -6513,17 +6918,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImpo
|
|
6513
6918
|
},
|
6514
6919
|
{
|
6515
6920
|
provide: AXMFolderService,
|
6516
|
-
useClass:
|
6921
|
+
useClass: AXCFolderMockService,
|
6517
6922
|
},
|
6518
6923
|
{
|
6519
6924
|
provide: AXMDocumentService,
|
6520
6925
|
useClass: AXMFileMockService,
|
6521
6926
|
},
|
6927
|
+
{
|
6928
|
+
provide: AXMMetaDataDefinitionCategoryService,
|
6929
|
+
useClass: AXCMetaDataDefinitionCategoryMockService,
|
6930
|
+
},
|
6522
6931
|
{
|
6523
6932
|
provide: AXP_SEARCH_PROVIDER,
|
6524
6933
|
useClass: EntitySearchProvider,
|
6525
6934
|
multi: true,
|
6526
6935
|
},
|
6936
|
+
{
|
6937
|
+
provide: AXPLockService,
|
6938
|
+
useClass: AXCLockService,
|
6939
|
+
},
|
6527
6940
|
{
|
6528
6941
|
provide: AXP_DATA_SEEDER_TOKEN,
|
6529
6942
|
useClass: AXMLogDataSeeder,
|
@@ -6635,6 +7048,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImpo
|
|
6635
7048
|
provide: AXP_FEATURE_LOADER,
|
6636
7049
|
useClass: MockFeatureLoader,
|
6637
7050
|
},
|
7051
|
+
AXSafePipe
|
6638
7052
|
],
|
6639
7053
|
}]
|
6640
7054
|
}], ctorParameters: () => [{ type: i1.AXPAppStartUpService }, { type: i0.Injector }] });
|