@acorex/connectivity 19.4.3 → 19.4.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/acorex-connectivity-mock.mjs +610 -640
- package/fesm2022/acorex-connectivity-mock.mjs.map +1 -1
- package/mock/lib/conversation/index.d.ts +2 -0
- package/mock/lib/conversation/message/index.d.ts +2 -0
- package/mock/lib/conversation/message/message.mock.data.d.ts +12 -0
- package/mock/lib/conversation/message/message.seeder.d.ts +8 -0
- package/mock/lib/conversation/room/index.d.ts +2 -0
- package/mock/lib/conversation/room/room.mock.data.d.ts +3 -0
- package/mock/lib/conversation/room/room.seeder.d.ts +8 -0
- package/mock/lib/document-management/folder/folder.service.d.ts +12 -0
- package/mock/lib/mock.module.d.ts +2 -3
- package/package.json +1 -1
- package/mock/lib/conversation/chat/chat.mock.data.d.ts +0 -4
- package/mock/lib/conversation/chat/chat.mock.service.d.ts +0 -8
- package/mock/lib/conversation/chat/chat.seeder.d.ts +0 -8
- package/mock/lib/conversation/chat/index.d.ts +0 -2
- package/mock/lib/conversation/comments/comment.mock.data.d.ts +0 -9
- package/mock/lib/conversation/comments/comment.mock.service.d.ts +0 -9
- package/mock/lib/conversation/comments/comment.seeder.d.ts +0 -8
- package/mock/lib/conversation/comments/index.d.ts +0 -3
- package/mock/lib/conversation/conversation.module.d.ts +0 -7
@@ -1,32 +1,31 @@
|
|
1
|
-
import * as i1
|
1
|
+
import * as i1 from '@acorex/platform/core';
|
2
2
|
import { AXPDataGenerator, applySortArray, applyFilterArray } from '@acorex/platform/core';
|
3
3
|
import Dexie from 'dexie';
|
4
4
|
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';
|
5
|
-
import { RootConfig as RootConfig$
|
6
|
-
import { AXPMyNotificationDashboardWidget, RootConfig as RootConfig$
|
7
|
-
import { RootConfig as RootConfig$
|
5
|
+
import { RootConfig as RootConfig$2, AXMFolderServiceImpl, AXMDocumentServiceImpl, AXMFolderService, AXMDocumentService } from '@acorex/modules/document-management';
|
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';
|
8
8
|
import * as i2 from '@acorex/platform/auth';
|
9
9
|
import { AXPSessionService, AXPAuthModule, AXP_TENANT_LOADER, AXP_APPLICATION_LOADER, AXP_PERMISSION_LOADER, AXP_FEATURE_LOADER } from '@acorex/platform/auth';
|
10
10
|
import { AXPRegionalService, AXPFileStorageStatus, AXPFileStorageService, AXP_SEARCH_PROVIDER } from '@acorex/platform/common';
|
11
11
|
import { AXPEntityDefinitionRegistryService, AXP_DATA_SEEDER_TOKEN, AXPEntityStorageService, AXPDataSeederService } from '@acorex/platform/layout/entity';
|
12
12
|
import * as i0 from '@angular/core';
|
13
13
|
import { inject, Injectable, NgModule } from '@angular/core';
|
14
|
-
import {
|
15
|
-
import
|
16
|
-
import {
|
17
|
-
import {
|
18
|
-
import { RootConfig as RootConfig$
|
19
|
-
import { RootConfig as RootConfig$
|
20
|
-
import { AXMOrganizationNodeType, RootConfig as RootConfig$
|
21
|
-
import { RootConfig as RootConfig$
|
14
|
+
import { of, delay, firstValueFrom } from 'rxjs';
|
15
|
+
import { AXMPermissionsKeys, AXMFormTemplateTypes, RootConfig as RootConfig$3 } from '@acorex/modules/form-template-management';
|
16
|
+
import { RootConfig } from '@acorex/modules/conversation';
|
17
|
+
import { AXPBarChartWidget, AXPClockCalendarWidget, AXPWeatherWidget, AXPStickyNoteWidget, AXPDonutChartWidget, AXPGaugeChartWidget, AXPLineChartWidget, AXPTaskListWidget, RootConfig as RootConfig$1 } from '@acorex/modules/dashboard-management';
|
18
|
+
import { RootConfig as RootConfig$4 } from '@acorex/modules/issue-management';
|
19
|
+
import { RootConfig as RootConfig$5 } from '@acorex/modules/log-management';
|
20
|
+
import { AXMOrganizationNodeType, RootConfig as RootConfig$8 } from '@acorex/modules/organization-management';
|
21
|
+
import { RootConfig as RootConfig$9 } from '@acorex/modules/platform-management';
|
22
22
|
import { AXTranslationService } from '@acorex/core/translation';
|
23
|
-
import { firstValueFrom, of, delay } from 'rxjs';
|
24
23
|
import { AXFileService } from '@acorex/core/file';
|
25
|
-
import { RootConfig as RootConfig$
|
26
|
-
import { RootConfig as RootConfig$
|
24
|
+
import { RootConfig as RootConfig$a } from '@acorex/modules/project-management';
|
25
|
+
import { RootConfig as RootConfig$b } from '@acorex/modules/scheduler-job-management';
|
27
26
|
import { convertArrayToDataSource } from '@acorex/cdk/common';
|
28
|
-
import { RootConfig as RootConfig$
|
29
|
-
import { RootConfig as RootConfig$
|
27
|
+
import { RootConfig as RootConfig$c } from '@acorex/modules/text-template-management';
|
28
|
+
import { RootConfig as RootConfig$d } from '@acorex/modules/training-management';
|
30
29
|
|
31
30
|
class AXPDexieEntityStorageService extends Dexie {
|
32
31
|
constructor() {
|
@@ -377,6 +376,112 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImpo
|
|
377
376
|
}]
|
378
377
|
}] });
|
379
378
|
|
379
|
+
class MockApplicationLoader {
|
380
|
+
getList(context) {
|
381
|
+
const demo_app = {
|
382
|
+
id: '1',
|
383
|
+
name: 'demo',
|
384
|
+
title: 'DEMO Application',
|
385
|
+
version: '1.0.0',
|
386
|
+
editionName: 'Standard',
|
387
|
+
};
|
388
|
+
const console_app = {
|
389
|
+
id: '1',
|
390
|
+
name: 'platform',
|
391
|
+
title: 'Platform Console',
|
392
|
+
version: '1.0.0',
|
393
|
+
editionName: 'Standard',
|
394
|
+
};
|
395
|
+
if (context.user?.name == 'root' && context.tenant?.id == '99') {
|
396
|
+
return of([demo_app, console_app]).pipe(delay(500));
|
397
|
+
}
|
398
|
+
else {
|
399
|
+
return of([demo_app]).pipe(delay(500));
|
400
|
+
}
|
401
|
+
}
|
402
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: MockApplicationLoader, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
403
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: MockApplicationLoader }); }
|
404
|
+
}
|
405
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: MockApplicationLoader, decorators: [{
|
406
|
+
type: Injectable
|
407
|
+
}] });
|
408
|
+
|
409
|
+
class MockFeatureLoader {
|
410
|
+
constructor() {
|
411
|
+
this.list = [
|
412
|
+
{
|
413
|
+
name: 'entity-comment',
|
414
|
+
title: 'Feature Title',
|
415
|
+
value: true,
|
416
|
+
},
|
417
|
+
{
|
418
|
+
name: 'axp-entity-list-advance-filter',
|
419
|
+
title: 'Filters',
|
420
|
+
value: true,
|
421
|
+
},
|
422
|
+
];
|
423
|
+
}
|
424
|
+
getList() {
|
425
|
+
return of(this.list).pipe(delay(0));
|
426
|
+
}
|
427
|
+
}
|
428
|
+
|
429
|
+
class MockPermissionLoader {
|
430
|
+
constructor() {
|
431
|
+
this.userPermissions = [
|
432
|
+
AXMPermissionsKeys.FormTemplate.Management,
|
433
|
+
AXMPermissionsKeys.FormTemplate.Categories.Management,
|
434
|
+
AXMPermissionsKeys.FormTemplate.Templates.Management
|
435
|
+
];
|
436
|
+
this.adminPermissions = [...this.userPermissions, ...['admin', 'demo.admin.settings']];
|
437
|
+
this.rootPermissions = [...this.adminPermissions, ...['platform', 'platform.reports',
|
438
|
+
'document-management:manage', 'document-management:document-type:manage',
|
439
|
+
'document-management:driver:manage']];
|
440
|
+
}
|
441
|
+
getList(context) {
|
442
|
+
if (context.user?.name == 'root') {
|
443
|
+
return of(this.rootPermissions);
|
444
|
+
}
|
445
|
+
else if (context.user?.name == 'admin') {
|
446
|
+
return of(this.adminPermissions);
|
447
|
+
}
|
448
|
+
else {
|
449
|
+
return of(this.userPermissions);
|
450
|
+
}
|
451
|
+
}
|
452
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: MockPermissionLoader, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
453
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: MockPermissionLoader }); }
|
454
|
+
}
|
455
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: MockPermissionLoader, decorators: [{
|
456
|
+
type: Injectable
|
457
|
+
}] });
|
458
|
+
|
459
|
+
class MockTenantLoader {
|
460
|
+
getList(context) {
|
461
|
+
const acorex_tenant = {
|
462
|
+
id: '99',
|
463
|
+
name: 'acorex-tenant',
|
464
|
+
title: 'ACoreX Platform Tenant',
|
465
|
+
};
|
466
|
+
const demo_tenant = {
|
467
|
+
id: '1',
|
468
|
+
name: 'demo-tenant',
|
469
|
+
title: 'DEMO Tenant',
|
470
|
+
};
|
471
|
+
if (context.user?.name == 'root') {
|
472
|
+
return of([demo_tenant, acorex_tenant]).pipe(delay(500));
|
473
|
+
}
|
474
|
+
else {
|
475
|
+
return of([demo_tenant]).pipe(delay(500));
|
476
|
+
}
|
477
|
+
}
|
478
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: MockTenantLoader, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
479
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: MockTenantLoader }); }
|
480
|
+
}
|
481
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: MockTenantLoader, decorators: [{
|
482
|
+
type: Injectable
|
483
|
+
}] });
|
484
|
+
|
380
485
|
const tenantsMock = [
|
381
486
|
{
|
382
487
|
id: '99',
|
@@ -572,6 +677,175 @@ const mockUsers = [
|
|
572
677
|
},
|
573
678
|
];
|
574
679
|
|
680
|
+
// Helper function to get a specific user by index (with fallback)
|
681
|
+
function getUserByIndex(index) {
|
682
|
+
const user = mockUsers[index % mockUsers.length];
|
683
|
+
return {
|
684
|
+
id: user.id,
|
685
|
+
type: 'user',
|
686
|
+
};
|
687
|
+
}
|
688
|
+
// Generate an array of rooms
|
689
|
+
const ROOMS = Array.from({ length: 15 }).map((_, index) => {
|
690
|
+
const roomTypes = ['personal', 'group', 'channel', 'support'];
|
691
|
+
const roomNames = [
|
692
|
+
'General Discussion',
|
693
|
+
'Product Team',
|
694
|
+
'Design Team',
|
695
|
+
'Engineering Team',
|
696
|
+
'Marketing Team',
|
697
|
+
'Sales Team',
|
698
|
+
'Customer Support',
|
699
|
+
'Project Alpha',
|
700
|
+
'Project Beta',
|
701
|
+
'Announcements',
|
702
|
+
'Off-topic',
|
703
|
+
'Random',
|
704
|
+
];
|
705
|
+
// Get a subset of users for each room (2-5 members)
|
706
|
+
const memberCount = AXPDataGenerator.number(2, 5);
|
707
|
+
const members = Array.from({ length: memberCount }).map((_, i) => getUserByIndex(index * memberCount + i));
|
708
|
+
return {
|
709
|
+
id: AXPDataGenerator.uuid(),
|
710
|
+
title: AXPDataGenerator.pick(roomNames),
|
711
|
+
topic: AXPDataGenerator.pick(roomTypes),
|
712
|
+
members,
|
713
|
+
createdAt: AXPDataGenerator.date(new Date(2023, 0, 1), new Date()),
|
714
|
+
updatedAt: AXPDataGenerator.date(new Date(2023, 0, 1), new Date()),
|
715
|
+
createdBy: members[0].id,
|
716
|
+
};
|
717
|
+
});
|
718
|
+
// Export room IDs for use in message mock data
|
719
|
+
const ROOM_IDS = ROOMS.map((room) => room.id);
|
720
|
+
|
721
|
+
// Helper function to get a random user from mockUsers
|
722
|
+
function getRandomUser() {
|
723
|
+
const randomIndex = Math.floor(Math.random() * mockUsers.length);
|
724
|
+
const user = mockUsers[randomIndex];
|
725
|
+
return {
|
726
|
+
id: user.id,
|
727
|
+
type: 'user',
|
728
|
+
};
|
729
|
+
}
|
730
|
+
// Content samples for different message types
|
731
|
+
const contentSamples = {
|
732
|
+
text: [
|
733
|
+
'Hello there!',
|
734
|
+
'How are you doing today?',
|
735
|
+
'I have a question about the project.',
|
736
|
+
"Let's schedule a meeting to discuss the details.",
|
737
|
+
'Thank you for your feedback!',
|
738
|
+
"I'll take care of this task.",
|
739
|
+
"I've completed the task you assigned.",
|
740
|
+
'Do you have time to review my work?',
|
741
|
+
'I need some help with this issue.',
|
742
|
+
'This looks great, thanks for sharing!',
|
743
|
+
'When can we meet to discuss the proposal?',
|
744
|
+
'The latest update is now available.',
|
745
|
+
'Please check your email for more information.',
|
746
|
+
'I think we should revise the timeline.',
|
747
|
+
'Great work on the presentation yesterday!',
|
748
|
+
],
|
749
|
+
image: [
|
750
|
+
'https://picsum.photos/300/200',
|
751
|
+
'https://picsum.photos/200/300',
|
752
|
+
'https://picsum.photos/400/300',
|
753
|
+
'https://picsum.photos/500/300',
|
754
|
+
'https://picsum.photos/300/400',
|
755
|
+
'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8BQDwAEhQGAhKmMIQAAAABJRU5ErkJggg==',
|
756
|
+
],
|
757
|
+
file: [
|
758
|
+
'data:application/pdf;base64,JVBERi0xLjUKJbXtrvsKNCAwIG9iago8PCAvTGVuZ3RoIDUgMCBSCiAgIC9GaWx0ZXIgL0ZsYXRlRGVjb2RlCj4+CnN0cmVhbQp4nDPQM1Qo5ypUMFAw',
|
759
|
+
'data:application/msword;base64,0M8R4KGxGuEAAAAAAAAAAAAAAAAAAAAAPgADAP7/CQAGAAAAAAAAAAAAAAABAAAAAgAAAAAAAAAAEAAAAQAAAAEAAAD+////AAAAAAAAAAD',
|
760
|
+
'quarterly_report.xlsx',
|
761
|
+
'project_specs.docx',
|
762
|
+
'meeting_notes.pdf',
|
763
|
+
'budget_2023.xlsx',
|
764
|
+
'presentation.pptx',
|
765
|
+
],
|
766
|
+
video: [
|
767
|
+
'https://www.pexels.com/download/video/5495322/?fps=29.97&h=540&w=960',
|
768
|
+
'https://www.pexels.com/download/video/3045163/?fps=29.97&h=540&w=960',
|
769
|
+
'https://www.pexels.com/download/video/3194277/?fps=29.97&h=540&w=960',
|
770
|
+
'data:video/mp4;base64,AAAAIGZ0eXBtcDQyAAAAAG1wNDJtcDQxaXNvbWF2YzEAAAxZbW9vdgAAAGxtdmhkAAAAANLEv5TS',
|
771
|
+
'product_demo.mp4',
|
772
|
+
'team_celebration.mp4',
|
773
|
+
],
|
774
|
+
link: [
|
775
|
+
'https://www.example.com/documents/project-overview',
|
776
|
+
'https://drive.google.com/file/d/1Abc123DefG/view',
|
777
|
+
'https://www.youtube.com/watch?v=dQw4w9WgXcQ',
|
778
|
+
'https://github.com/acorex/platform',
|
779
|
+
'https://actions.google.com/sounds/v1/alarms/digital_watch_alarm_long.ogg',
|
780
|
+
'https://actions.google.com/sounds/v1/ambiences/kids_playing.ogg',
|
781
|
+
'https://www.example.com/audio/company_podcast.mp3',
|
782
|
+
],
|
783
|
+
};
|
784
|
+
// Generate an array of messages
|
785
|
+
const MESSAGES = Array.from({ length: 100 }).map(() => {
|
786
|
+
// Select a content type
|
787
|
+
const contentType = AXPDataGenerator.pick([
|
788
|
+
'text',
|
789
|
+
'image',
|
790
|
+
'file',
|
791
|
+
'video',
|
792
|
+
'link',
|
793
|
+
]);
|
794
|
+
// Get content samples for the selected type
|
795
|
+
const typeSamples = contentSamples[contentType];
|
796
|
+
// Use a roomId from the actual room data
|
797
|
+
const roomId = AXPDataGenerator.pick(ROOM_IDS);
|
798
|
+
// 20% chance to be a reply
|
799
|
+
const isReply = Math.random() < 0.2;
|
800
|
+
return {
|
801
|
+
id: AXPDataGenerator.uuid(),
|
802
|
+
roomId,
|
803
|
+
message: {
|
804
|
+
content: AXPDataGenerator.pick(typeSamples),
|
805
|
+
contentType: contentType,
|
806
|
+
},
|
807
|
+
author: getRandomUser(),
|
808
|
+
replyId: isReply ? AXPDataGenerator.uuid() : null,
|
809
|
+
reactions: Array.from({ length: AXPDataGenerator.number(0, 5) }).map(() => ({
|
810
|
+
author: getRandomUser(),
|
811
|
+
type: AXPDataGenerator.pick(['like', 'love', 'laugh', 'angry', 'sad']),
|
812
|
+
})),
|
813
|
+
seen: Array.from({ length: AXPDataGenerator.number(0, 3) }).map(() => ({
|
814
|
+
author: getRandomUser(),
|
815
|
+
type: AXPDataGenerator.pick(['delivered', 'read']),
|
816
|
+
})),
|
817
|
+
createdAt: AXPDataGenerator.date(new Date(2023, 0, 1), new Date()),
|
818
|
+
};
|
819
|
+
});
|
820
|
+
|
821
|
+
class AXPMessageDataSeeder {
|
822
|
+
constructor() {
|
823
|
+
this.storageService = inject(AXPDexieEntityStorageService);
|
824
|
+
}
|
825
|
+
async seed() {
|
826
|
+
await this.storageService.initial(`${RootConfig.module.name}.${RootConfig.entities.message.name}`, MESSAGES);
|
827
|
+
}
|
828
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXPMessageDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
829
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXPMessageDataSeeder }); }
|
830
|
+
}
|
831
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXPMessageDataSeeder, decorators: [{
|
832
|
+
type: Injectable
|
833
|
+
}] });
|
834
|
+
|
835
|
+
class AXPRoomDataSeeder {
|
836
|
+
constructor() {
|
837
|
+
this.storageService = inject(AXPDexieEntityStorageService);
|
838
|
+
}
|
839
|
+
async seed() {
|
840
|
+
await this.storageService.initial(`${RootConfig.module.name}.${RootConfig.entities.room.name}`, ROOMS);
|
841
|
+
}
|
842
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXPRoomDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
843
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXPRoomDataSeeder }); }
|
844
|
+
}
|
845
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXPRoomDataSeeder, decorators: [{
|
846
|
+
type: Injectable
|
847
|
+
}] });
|
848
|
+
|
575
849
|
// Widget types that can be used for generating mock data
|
576
850
|
const widgetTypes = [
|
577
851
|
'bar-chart',
|
@@ -1197,7 +1471,7 @@ class AXPDashboardDataSeeder {
|
|
1197
1471
|
this.storageService = inject(AXPDexieEntityStorageService);
|
1198
1472
|
}
|
1199
1473
|
async seed() {
|
1200
|
-
await this.storageService.initial(`${RootConfig.module.name}.${RootConfig.entities.dashboard.name}`, DASHBOARDS);
|
1474
|
+
await this.storageService.initial(`${RootConfig$1.module.name}.${RootConfig$1.entities.dashboard.name}`, DASHBOARDS);
|
1201
1475
|
}
|
1202
1476
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXPDashboardDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
1203
1477
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXPDashboardDataSeeder }); }
|
@@ -1206,343 +1480,37 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImpo
|
|
1206
1480
|
type: Injectable
|
1207
1481
|
}] });
|
1208
1482
|
|
1209
|
-
const
|
1210
|
-
|
1211
|
-
|
1212
|
-
|
1213
|
-
|
1214
|
-
|
1215
|
-
|
1216
|
-
|
1217
|
-
|
1218
|
-
|
1219
|
-
|
1220
|
-
|
1221
|
-
|
1222
|
-
|
1223
|
-
|
1224
|
-
|
1225
|
-
|
1226
|
-
|
1227
|
-
|
1228
|
-
|
1229
|
-
|
1230
|
-
|
1231
|
-
|
1232
|
-
|
1233
|
-
const roomMembersCount = AXPDataGenerator.number(2, 10);
|
1234
|
-
const roomMembers = Array.from({ length: roomMembersCount }).map(() => generateChatUser());
|
1235
|
-
return {
|
1236
|
-
id: AXPDataGenerator.uuid(),
|
1237
|
-
title: AXPDataGenerator.pick([
|
1238
|
-
'General Discussion',
|
1239
|
-
'Project Alpha',
|
1240
|
-
'Team Meeting',
|
1241
|
-
'Client Communication',
|
1242
|
-
'Random Chat',
|
1243
|
-
]),
|
1244
|
-
lastMessage: generateChatMessage(),
|
1245
|
-
roomMembers,
|
1246
|
-
unreadCount: AXPDataGenerator.number(0, 20),
|
1247
|
-
};
|
1248
|
-
});
|
1249
|
-
|
1250
|
-
class AXPChatDataSeeder {
|
1251
|
-
constructor() {
|
1252
|
-
this.storageService = inject(AXPDexieEntityStorageService);
|
1253
|
-
}
|
1254
|
-
async seed() {
|
1255
|
-
await this.storageService.initial(`${AXMConverstionModuleConst.moduleName}.${AXMConverstionModuleConst.chatName}`, CHAT);
|
1256
|
-
}
|
1257
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXPChatDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
1258
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXPChatDataSeeder }); }
|
1259
|
-
}
|
1260
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXPChatDataSeeder, decorators: [{
|
1261
|
-
type: Injectable
|
1262
|
-
}] });
|
1263
|
-
|
1264
|
-
class AXMChatMockService extends AXMChatServiceImpl {
|
1265
|
-
async getTotalUnread() {
|
1266
|
-
const chatList = await super.storageService.getAll(`${AXMConverstionModuleConst.moduleName}.${AXMConverstionModuleConst.chatName}`);
|
1267
|
-
const totalUnread = chatList.reduce((acc, curr) => (acc += curr.unreadCount > 0), 0);
|
1268
|
-
return totalUnread;
|
1269
|
-
}
|
1270
|
-
async markChatAsRead(roomId) {
|
1271
|
-
const oldChat = await super.getOne(roomId);
|
1272
|
-
await super.updateOne(roomId, { ...oldChat, unreadCount: 0 });
|
1273
|
-
return;
|
1274
|
-
}
|
1275
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXMChatMockService, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
1276
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXMChatMockService }); }
|
1277
|
-
}
|
1278
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXMChatMockService, decorators: [{
|
1279
|
-
type: Injectable
|
1280
|
-
}] });
|
1281
|
-
|
1282
|
-
// import { AXPDataGenerator, AXPEntityStorageService } from '@acorex/platform/common';
|
1283
|
-
// import {
|
1284
|
-
// AXPComment,
|
1285
|
-
// AXPCommentCreateRequest,
|
1286
|
-
// AXPCommentDeleteRequest,
|
1287
|
-
// AXPCommentGetRequest,
|
1288
|
-
// AXPCommentLikeRequest,
|
1289
|
-
// AXPCommentResponse,
|
1290
|
-
// AXPCommentUpdateRequest,
|
1291
|
-
// } from '@acorex/platform/themes/shared';
|
1292
|
-
// import { inject, Injectable } from '@angular/core';
|
1293
|
-
const generateUser = () => ({
|
1294
|
-
userName: AXPDataGenerator.firstName().toLowerCase(),
|
1295
|
-
firstName: AXPDataGenerator.firstName(),
|
1296
|
-
lastName: AXPDataGenerator.lastName(),
|
1297
|
-
picture: null,
|
1298
|
-
id: AXPDataGenerator.uuid(),
|
1299
|
-
});
|
1300
|
-
const COMMENTS = Array.from({ length: 10 }).map(() => {
|
1301
|
-
const contentSource = [
|
1302
|
-
'This is a comment.',
|
1303
|
-
'I really like this!',
|
1304
|
-
'Could you clarify your point?',
|
1305
|
-
'Great job on this!',
|
1306
|
-
'I have some suggestions.',
|
1307
|
-
'This is quite insightful.',
|
1308
|
-
'Thanks for sharing!',
|
1309
|
-
'I disagree with this perspective.',
|
1310
|
-
'Interesting take!',
|
1311
|
-
'What do you think about this?',
|
1312
|
-
];
|
1313
|
-
const repliesCount = AXPDataGenerator.number(0, 3);
|
1314
|
-
return {
|
1315
|
-
id: AXPDataGenerator.uuid(),
|
1316
|
-
content: `<p>${AXPDataGenerator.pick(contentSource)}</p>`,
|
1317
|
-
contentType: AXPDataGenerator.pick(['text', 'image', 'video']),
|
1318
|
-
memberId: AXPDataGenerator.uuid(),
|
1319
|
-
memberType: AXPDataGenerator.pick(['user', 'admin']),
|
1320
|
-
roomId: AXPDataGenerator.uuid(),
|
1321
|
-
isPrivate: AXPDataGenerator.boolean(),
|
1322
|
-
replyId: null,
|
1323
|
-
messageVisibles: [], // Ensure AXPCommentVisibleMessage[] type is defined
|
1324
|
-
messageStatuses: [], // Ensure AXPCommentStatusMessage[] type is defined
|
1325
|
-
messageHistories: [], // Ensure AXPCommentHistoryMessage[] type is defined
|
1326
|
-
replies: Array.from({ length: repliesCount }).map(() => ({
|
1327
|
-
id: AXPDataGenerator.uuid(),
|
1328
|
-
content: `<p>${AXPDataGenerator.pick(contentSource)}</p>`,
|
1329
|
-
contentType: 'text',
|
1330
|
-
memberId: AXPDataGenerator.uuid(),
|
1331
|
-
memberType: AXPDataGenerator.pick(['user', 'admin']),
|
1332
|
-
roomId: AXPDataGenerator.uuid(),
|
1333
|
-
isPrivate: AXPDataGenerator.boolean(),
|
1334
|
-
replyId: AXPDataGenerator.uuid(),
|
1335
|
-
messageVisibles: [],
|
1336
|
-
messageStatuses: [],
|
1337
|
-
messageHistories: [],
|
1338
|
-
isArchived: AXPDataGenerator.boolean(),
|
1339
|
-
isLiked: AXPDataGenerator.boolean(),
|
1340
|
-
reactionsCount: AXPDataGenerator.number(0, 10),
|
1341
|
-
repliesCount: 0,
|
1342
|
-
user: generateUser(), // Ensure AXPCommentUserDetails type is defined
|
1343
|
-
replies: [], // Add an empty replies array here to match the AXPComment type
|
1344
|
-
})),
|
1345
|
-
isArchived: AXPDataGenerator.boolean(),
|
1346
|
-
isLiked: AXPDataGenerator.boolean(),
|
1347
|
-
reactionsCount: AXPDataGenerator.number(0, 100),
|
1348
|
-
repliesCount,
|
1349
|
-
user: generateUser(), // Ensure AXPCommentUserDetails type is defined
|
1350
|
-
createdAt: AXPDataGenerator.date(new Date(2021), new Date()),
|
1351
|
-
};
|
1352
|
-
});
|
1353
|
-
|
1354
|
-
class AXPCommentDataSeeder {
|
1355
|
-
constructor() {
|
1356
|
-
this.storageService = inject(AXPDexieEntityStorageService);
|
1357
|
-
}
|
1358
|
-
async seed() {
|
1359
|
-
await this.storageService.initial(`${AXMConverstionModuleConst.moduleName}.${AXMConverstionModuleConst.commentName}`, COMMENTS);
|
1360
|
-
}
|
1361
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXPCommentDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
1362
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXPCommentDataSeeder }); }
|
1363
|
-
}
|
1364
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXPCommentDataSeeder, decorators: [{
|
1365
|
-
type: Injectable
|
1366
|
-
}] });
|
1367
|
-
|
1368
|
-
class AXMCommentMockService extends AXMCommentServiceImpl {
|
1369
|
-
constructor() {
|
1370
|
-
super(...arguments);
|
1371
|
-
this.sessionService = inject(AXPSessionService);
|
1372
|
-
}
|
1373
|
-
async insertOne(request) {
|
1374
|
-
const fullPayload = {
|
1375
|
-
...request,
|
1376
|
-
memberId: AXPDataGenerator.uuid(),
|
1377
|
-
memberType: AXPDataGenerator.pick(['user', 'admin']),
|
1378
|
-
roomId: AXPDataGenerator.uuid(),
|
1379
|
-
messageVisibles: [],
|
1380
|
-
messageStatuses: [],
|
1381
|
-
messageHistories: [],
|
1382
|
-
replies: [],
|
1383
|
-
isArchived: false,
|
1384
|
-
isLiked: false,
|
1385
|
-
reactionsCount: 0,
|
1386
|
-
repliesCount: 0,
|
1387
|
-
user: {
|
1388
|
-
userName: this.sessionService.user?.name ?? AXPDataGenerator.firstName().toLowerCase(),
|
1389
|
-
firstName: this.sessionService.user?.name ?? AXPDataGenerator.firstName(),
|
1390
|
-
lastName: this.sessionService.user?.name ?? AXPDataGenerator.lastName(),
|
1391
|
-
picture: this.sessionService.user?.avatar ?? null,
|
1392
|
-
id: this.sessionService.user?.id ?? AXPDataGenerator.uuid(),
|
1393
|
-
},
|
1394
|
-
createdAt: new Date(),
|
1395
|
-
id: AXPDataGenerator.uuid(),
|
1396
|
-
};
|
1397
|
-
if (request.replyId) {
|
1398
|
-
const message = await super.getOne(request.replyId);
|
1399
|
-
await super.updateOne(request.replyId, {
|
1400
|
-
...message,
|
1401
|
-
replies: [...message.replies, fullPayload],
|
1402
|
-
});
|
1403
|
-
}
|
1404
|
-
else {
|
1405
|
-
await super.insertOne(fullPayload);
|
1406
|
-
//await super.storageService.insertOne('comments', fullPayload);
|
1407
|
-
}
|
1408
|
-
return 'done';
|
1409
|
-
}
|
1410
|
-
async like(payload) {
|
1411
|
-
const comment = await super.getOne(payload.messageId);
|
1412
|
-
if (comment) {
|
1413
|
-
const isLiked = !comment.isLiked;
|
1414
|
-
const reactionsCount = isLiked ? comment.reactionsCount + 1 : comment.reactionsCount - 1;
|
1415
|
-
await super.updateOne(payload.messageId, { ...comment, isLiked, reactionsCount });
|
1416
|
-
}
|
1417
|
-
else {
|
1418
|
-
const allComments = await super.query({
|
1419
|
-
skip: 0,
|
1420
|
-
take: 9999,
|
1421
|
-
});
|
1422
|
-
const commentWithReply = allComments.items.find((comment) => comment?.replies?.some((reply) => reply.id === payload.messageId));
|
1423
|
-
if (commentWithReply) {
|
1424
|
-
commentWithReply.replies = commentWithReply.replies.map((reply) => reply.id === payload.messageId
|
1425
|
-
? {
|
1426
|
-
...reply,
|
1427
|
-
isLiked: !reply.isLiked,
|
1428
|
-
reactionsCount: reply.isLiked ? reply.reactionsCount - 1 : reply.reactionsCount + 1,
|
1429
|
-
}
|
1430
|
-
: reply);
|
1431
|
-
await super.updateOne(commentWithReply.id, commentWithReply);
|
1432
|
-
}
|
1433
|
-
else {
|
1434
|
-
throw new Error('No comment with this ID found.');
|
1483
|
+
const checkbox$2 = '{"type":"document-layout","children":[{"type":"page-layout","children":[{"type":"checkbox-editor","name":"checkbox-editor1","options":{"label":"i accept","readonly":false,"disabled":false},"defaultValue":false,"path":"accept-check-box"}],"name":"page-layout1"}],"name":"document"}';
|
1484
|
+
const color = '{"type":"document-layout","children":[{"type":"page-layout","children":[{"type":"block-layout","name":"block-layout1","options":{"flexDirection":{"id":"ax-flex-row"},"flexJustifyContent":{"id":"ax-justify-normal"},"flexAlignItems":{"id":"ax-items-start"},"gap":2,"flexWrap":{"id":"ax-flex-nowrap"},"spacing":{"margin":"0px 0px 0px 0px","padding":"0px 0px 0px 0px"},"border":{"width":"0px","radius":"0px","color":"#000000","style":"none"},"flexOptions":{"gap":"0px","flexDirection":"row","flexWrap":"nowrap","justifyContent":"flex-start","alignItems":"flex-start"}}},"children":[{"type":"color-editor","name":"color-editor1","options":{"readonly":false,"disabled":false,"validations":{"required":{"rule":"required","message":"This field is required."}},"placeholder":"pick color"},"path":"color-box"}]}],"name":"page-layout1"}],"name":"document"}';
|
1485
|
+
const titleInterface$1 = `{
|
1486
|
+
"type": "document-layout",
|
1487
|
+
"children": [
|
1488
|
+
{
|
1489
|
+
"type": "page-layout",
|
1490
|
+
"children": [
|
1491
|
+
{
|
1492
|
+
"type": "title-editor",
|
1493
|
+
"name": "title-editor1",
|
1494
|
+
"meta": {
|
1495
|
+
"header": true
|
1496
|
+
},
|
1497
|
+
"options": {
|
1498
|
+
"multiple": false,
|
1499
|
+
"disabled": false,
|
1500
|
+
"hasClearButton": false,
|
1501
|
+
"validations": {
|
1502
|
+
"regex": null,
|
1503
|
+
"required": {
|
1504
|
+
"rule": "required",
|
1505
|
+
"message": "This field is required."
|
1506
|
+
}
|
1435
1507
|
}
|
1508
|
+
},
|
1509
|
+
"defaultValue": "",
|
1510
|
+
"path": "title"
|
1436
1511
|
}
|
1437
|
-
|
1438
|
-
|
1439
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXMCommentMockService, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
1440
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXMCommentMockService }); }
|
1441
|
-
}
|
1442
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXMCommentMockService, decorators: [{
|
1443
|
-
type: Injectable
|
1444
|
-
}] });
|
1445
|
-
|
1446
|
-
class AXCConversationMockModule {
|
1447
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXCConversationMockModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
1448
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.10", ngImport: i0, type: AXCConversationMockModule, imports: [i1.AXMChatModule] }); }
|
1449
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXCConversationMockModule, providers: [
|
1450
|
-
{
|
1451
|
-
provide: AXP_DATA_SEEDER_TOKEN,
|
1452
|
-
useClass: AXPChatDataSeeder,
|
1453
|
-
multi: true,
|
1454
|
-
},
|
1455
|
-
{
|
1456
|
-
provide: AXP_DATA_SEEDER_TOKEN,
|
1457
|
-
useClass: AXPCommentDataSeeder,
|
1458
|
-
multi: true,
|
1459
|
-
},
|
1460
|
-
// {
|
1461
|
-
// provide: AXMCommentService,
|
1462
|
-
// useClass: AXMCommentMockService,
|
1463
|
-
// },
|
1464
|
-
// {
|
1465
|
-
// provide: AXMChatService,
|
1466
|
-
// useClass: AXMChatMockService,
|
1467
|
-
// },
|
1468
|
-
], imports: [AXMChatModule.forRoot({
|
1469
|
-
provider: [
|
1470
|
-
{
|
1471
|
-
provide: AXMChatService,
|
1472
|
-
useClass: AXMChatMockService,
|
1473
|
-
},
|
1474
|
-
],
|
1475
|
-
})] }); }
|
1476
|
-
}
|
1477
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXCConversationMockModule, decorators: [{
|
1478
|
-
type: NgModule,
|
1479
|
-
args: [{
|
1480
|
-
imports: [
|
1481
|
-
AXMChatModule.forRoot({
|
1482
|
-
provider: [
|
1483
|
-
{
|
1484
|
-
provide: AXMChatService,
|
1485
|
-
useClass: AXMChatMockService,
|
1486
|
-
},
|
1487
|
-
],
|
1488
|
-
}),
|
1489
|
-
],
|
1490
|
-
exports: [],
|
1491
|
-
declarations: [],
|
1492
|
-
providers: [
|
1493
|
-
{
|
1494
|
-
provide: AXP_DATA_SEEDER_TOKEN,
|
1495
|
-
useClass: AXPChatDataSeeder,
|
1496
|
-
multi: true,
|
1497
|
-
},
|
1498
|
-
{
|
1499
|
-
provide: AXP_DATA_SEEDER_TOKEN,
|
1500
|
-
useClass: AXPCommentDataSeeder,
|
1501
|
-
multi: true,
|
1502
|
-
},
|
1503
|
-
// {
|
1504
|
-
// provide: AXMCommentService,
|
1505
|
-
// useClass: AXMCommentMockService,
|
1506
|
-
// },
|
1507
|
-
// {
|
1508
|
-
// provide: AXMChatService,
|
1509
|
-
// useClass: AXMChatMockService,
|
1510
|
-
// },
|
1511
|
-
],
|
1512
|
-
}]
|
1513
|
-
}] });
|
1514
|
-
|
1515
|
-
const checkbox$2 = '{"type":"document-layout","children":[{"type":"page-layout","children":[{"type":"checkbox-editor","name":"checkbox-editor1","options":{"label":"i accept","readonly":false,"disabled":false},"defaultValue":false,"path":"accept-check-box"}],"name":"page-layout1"}],"name":"document"}';
|
1516
|
-
const color = '{"type":"document-layout","children":[{"type":"page-layout","children":[{"type":"block-layout","name":"block-layout1","options":{"flexDirection":{"id":"ax-flex-row"},"flexJustifyContent":{"id":"ax-justify-normal"},"flexAlignItems":{"id":"ax-items-start"},"gap":2,"flexWrap":{"id":"ax-flex-nowrap"},"spacing":{"margin":"0px 0px 0px 0px","padding":"0px 0px 0px 0px"},"border":{"width":"0px","radius":"0px","color":"#000000","style":"none"},"flexOptions":{"gap":"0px","flexDirection":"row","flexWrap":"nowrap","justifyContent":"flex-start","alignItems":"flex-start"}}},"children":[{"type":"color-editor","name":"color-editor1","options":{"readonly":false,"disabled":false,"validations":{"required":{"rule":"required","message":"This field is required."}},"placeholder":"pick color"},"path":"color-box"}]}],"name":"page-layout1"}],"name":"document"}';
|
1517
|
-
const titleInterface$1 = `{
|
1518
|
-
"type": "document-layout",
|
1519
|
-
"children": [
|
1520
|
-
{
|
1521
|
-
"type": "page-layout",
|
1522
|
-
"children": [
|
1523
|
-
{
|
1524
|
-
"type": "title-editor",
|
1525
|
-
"name": "title-editor1",
|
1526
|
-
"meta": {
|
1527
|
-
"header": true
|
1528
|
-
},
|
1529
|
-
"options": {
|
1530
|
-
"multiple": false,
|
1531
|
-
"disabled": false,
|
1532
|
-
"hasClearButton": false,
|
1533
|
-
"validations": {
|
1534
|
-
"regex": null,
|
1535
|
-
"required": {
|
1536
|
-
"rule": "required",
|
1537
|
-
"message": "This field is required."
|
1538
|
-
}
|
1539
|
-
}
|
1540
|
-
},
|
1541
|
-
"defaultValue": "",
|
1542
|
-
"path": "title"
|
1543
|
-
}
|
1544
|
-
],
|
1545
|
-
"name": "page-layout1"
|
1512
|
+
],
|
1513
|
+
"name": "page-layout1"
|
1546
1514
|
}
|
1547
1515
|
],
|
1548
1516
|
"name": "document"
|
@@ -1694,7 +1662,7 @@ class AXCDocumentTypeDataSeeder {
|
|
1694
1662
|
this.storageService = inject(AXPDexieEntityStorageService);
|
1695
1663
|
}
|
1696
1664
|
async seed() {
|
1697
|
-
await this.storageService.initial(`${RootConfig$
|
1665
|
+
await this.storageService.initial(`${RootConfig$2.module.name}.${RootConfig$2.entities.documentType.name}`, DOCUMENT_TYPES);
|
1698
1666
|
}
|
1699
1667
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXCDocumentTypeDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
1700
1668
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXCDocumentTypeDataSeeder }); }
|
@@ -1734,9 +1702,14 @@ class AXMFolderMockService extends AXMFolderServiceImpl {
|
|
1734
1702
|
}
|
1735
1703
|
}
|
1736
1704
|
async insertOne(request) {
|
1737
|
-
|
1738
|
-
const
|
1705
|
+
// Set default value for inherit if not provided
|
1706
|
+
const requestWithInherit = {
|
1739
1707
|
...request,
|
1708
|
+
inherit: request.inherit !== undefined ? request.inherit : 'Extends'
|
1709
|
+
};
|
1710
|
+
const newId = await super.insertOne(requestWithInherit);
|
1711
|
+
const folderData = {
|
1712
|
+
...requestWithInherit,
|
1740
1713
|
id: newId,
|
1741
1714
|
};
|
1742
1715
|
await this.updateParentFolders(folderData);
|
@@ -1762,7 +1735,7 @@ class AXMFolderMockService extends AXMFolderServiceImpl {
|
|
1762
1735
|
const path = [];
|
1763
1736
|
let currentId = folderId;
|
1764
1737
|
while (currentId) {
|
1765
|
-
const folder = await
|
1738
|
+
const folder = await super.getOne(currentId);
|
1766
1739
|
if (!folder) {
|
1767
1740
|
// Folder not found in persisted storage
|
1768
1741
|
break;
|
@@ -1776,13 +1749,94 @@ class AXMFolderMockService extends AXMFolderServiceImpl {
|
|
1776
1749
|
}
|
1777
1750
|
return path.reverse();
|
1778
1751
|
}
|
1752
|
+
/**
|
1753
|
+
* Finds the first non-inheriting folder in the hierarchy
|
1754
|
+
* @param folderId ID of the starting folder
|
1755
|
+
* @returns The first folder with inherit='None' or the root folder
|
1756
|
+
*/
|
1757
|
+
async getInheritanceSource(folderId) {
|
1758
|
+
let currentId = folderId;
|
1759
|
+
while (currentId) {
|
1760
|
+
const folder = await super.getOne(currentId);
|
1761
|
+
if (!folder) {
|
1762
|
+
break;
|
1763
|
+
}
|
1764
|
+
// If this folder doesn't inherit or has no parent, it's the source
|
1765
|
+
if (folder.inherit === 'None' || !folder.parentId) {
|
1766
|
+
return folder;
|
1767
|
+
}
|
1768
|
+
currentId = folder.parentId;
|
1769
|
+
}
|
1770
|
+
// If we couldn't find a non-inheriting folder, return the last folder we found
|
1771
|
+
const fallbackFolder = await super.getOne(folderId);
|
1772
|
+
return fallbackFolder;
|
1773
|
+
}
|
1774
|
+
/**
|
1775
|
+
* Gets all properties that should be inherited from parent folders
|
1776
|
+
* @param folderId ID of the starting folder
|
1777
|
+
* @returns Object containing inherited properties
|
1778
|
+
*/
|
1779
|
+
async getInheritedProperties(folderId) {
|
1780
|
+
const sourceFolder = await this.getInheritanceSource(folderId);
|
1781
|
+
if (!sourceFolder) {
|
1782
|
+
return {};
|
1783
|
+
}
|
1784
|
+
// Define which specific properties should be inherited
|
1785
|
+
const inheritableProps = {};
|
1786
|
+
// Inherit tenantId
|
1787
|
+
if (sourceFolder.tenantId) {
|
1788
|
+
inheritableProps.tenantId = sourceFolder.tenantId;
|
1789
|
+
}
|
1790
|
+
// Inherit userId
|
1791
|
+
if (sourceFolder.userId) {
|
1792
|
+
inheritableProps.userId = sourceFolder.userId;
|
1793
|
+
}
|
1794
|
+
// Inherit documentTypes
|
1795
|
+
if (sourceFolder.documentTypes && sourceFolder.documentTypes.length > 0) {
|
1796
|
+
inheritableProps.documentTypes = [...sourceFolder.documentTypes];
|
1797
|
+
}
|
1798
|
+
return inheritableProps;
|
1799
|
+
}
|
1779
1800
|
async getOne(id) {
|
1780
1801
|
const folder = await super.getOne(id);
|
1781
1802
|
if (folder) {
|
1803
|
+
// Calculate node count
|
1782
1804
|
folder.nodeCount = (folder.folders?.length ?? 0) + (folder.documents?.length ?? 0);
|
1783
1805
|
folder.folders?.forEach((f) => {
|
1784
1806
|
f.nodeCount = (f.folders?.length ?? 0) + (f.documents?.length ?? 0);
|
1785
1807
|
});
|
1808
|
+
// Apply inherited properties if this folder inherits from parents
|
1809
|
+
if ((folder.inherit === 'Inherited' || folder.inherit === 'Extends') && folder.parentId) {
|
1810
|
+
const inheritedProps = await this.getInheritedProperties(folder.id);
|
1811
|
+
// Apply tenantId if not defined
|
1812
|
+
if (!folder.tenantId && inheritedProps.tenantId) {
|
1813
|
+
folder.tenantId = inheritedProps.tenantId;
|
1814
|
+
}
|
1815
|
+
// Apply userId if not defined
|
1816
|
+
if (!folder.userId && inheritedProps.userId) {
|
1817
|
+
folder.userId = inheritedProps.userId;
|
1818
|
+
}
|
1819
|
+
// Handle documentTypes based on inheritance type
|
1820
|
+
if (inheritedProps.documentTypes) {
|
1821
|
+
if (!folder.documentTypes) {
|
1822
|
+
// If no document types exist, use parent's
|
1823
|
+
folder.documentTypes = [...inheritedProps.documentTypes];
|
1824
|
+
}
|
1825
|
+
else if (folder.inherit === 'Extends') {
|
1826
|
+
// Merge mode: combine both lists, avoiding duplicates
|
1827
|
+
const existingTypeIds = new Set(folder.documentTypes.map(dt => dt.id));
|
1828
|
+
const parentTypesToAdd = inheritedProps.documentTypes.filter(dt => !existingTypeIds.has(dt.id));
|
1829
|
+
folder.documentTypes = [...folder.documentTypes, ...parentTypesToAdd];
|
1830
|
+
}
|
1831
|
+
else if (folder.inherit === 'Inherited') {
|
1832
|
+
// Extends mode: child types take precedence but keep parent types where no override exists
|
1833
|
+
// (Same implementation as Merge for now - both prevent duplicates)
|
1834
|
+
const existingTypeIds = new Set(folder.documentTypes.map(dt => dt.id));
|
1835
|
+
const parentTypesToAdd = inheritedProps.documentTypes.filter(dt => !existingTypeIds.has(dt.id));
|
1836
|
+
folder.documentTypes = [...folder.documentTypes, ...parentTypesToAdd];
|
1837
|
+
}
|
1838
|
+
}
|
1839
|
+
}
|
1786
1840
|
}
|
1787
1841
|
return folder;
|
1788
1842
|
}
|
@@ -1943,6 +1997,11 @@ const allFiles = [];
|
|
1943
1997
|
function getRandomSize() {
|
1944
1998
|
return AXPDataGenerator.number(500 * 1024, 10 * 1024 * 1024);
|
1945
1999
|
}
|
2000
|
+
// Helper function to get random inheritance type
|
2001
|
+
function getRandomInheritanceType() {
|
2002
|
+
const types = ['Inherited', 'Extends', 'None'];
|
2003
|
+
return types[Math.floor(Math.random() * types.length)];
|
2004
|
+
}
|
1946
2005
|
// Section: Root Folder Setup
|
1947
2006
|
const rootFolder = {
|
1948
2007
|
id: AXPDataGenerator.uuid(),
|
@@ -1961,7 +2020,7 @@ const rootFolder = {
|
|
1961
2020
|
folders: [],
|
1962
2021
|
documents: [],
|
1963
2022
|
documentTypes: [allTypes[1]],
|
1964
|
-
inherit:
|
2023
|
+
inherit: 'None', // Root folder doesn't inherit
|
1965
2024
|
};
|
1966
2025
|
// Section: Tenant Folders
|
1967
2026
|
const rootTenantsFolder = {
|
@@ -1980,7 +2039,7 @@ const rootTenantsFolder = {
|
|
1980
2039
|
updatedBy: 'system',
|
1981
2040
|
folders: [],
|
1982
2041
|
documents: [],
|
1983
|
-
inherit:
|
2042
|
+
inherit: 'None', // Organization level folder - no inheritance
|
1984
2043
|
};
|
1985
2044
|
allFolders.push(rootTenantsFolder);
|
1986
2045
|
rootFolder.folders?.push(rootTenantsFolder);
|
@@ -2002,7 +2061,7 @@ const mainTenantFolder = {
|
|
2002
2061
|
folders: [],
|
2003
2062
|
documents: [],
|
2004
2063
|
documentTypes: [allTypes[1]],
|
2005
|
-
inherit:
|
2064
|
+
inherit: 'Inherited', // This tenant folder inherits and merges with parent
|
2006
2065
|
};
|
2007
2066
|
// Section: Sample File Types
|
2008
2067
|
const sampleFileTypes = [
|
@@ -2110,7 +2169,7 @@ const rootUsersFolder = {
|
|
2110
2169
|
tenantId: tenantId,
|
2111
2170
|
folders: [],
|
2112
2171
|
documents: [],
|
2113
|
-
inherit:
|
2172
|
+
inherit: 'Extends', // User folders extend parent permissions
|
2114
2173
|
};
|
2115
2174
|
// Section: User Specific Folders and Files
|
2116
2175
|
mockUsers.forEach((user) => {
|
@@ -2133,7 +2192,7 @@ mockUsers.forEach((user) => {
|
|
2133
2192
|
folders: [],
|
2134
2193
|
documents: [],
|
2135
2194
|
documentTypes: [allTypes[1]],
|
2136
|
-
inherit:
|
2195
|
+
inherit: getRandomInheritanceType(),
|
2137
2196
|
};
|
2138
2197
|
commonFilesForUser.forEach((fileName) => {
|
2139
2198
|
const [name, extension] = fileName.split('.');
|
@@ -2182,7 +2241,7 @@ sites.forEach((site) => {
|
|
2182
2241
|
folders: [],
|
2183
2242
|
documents: [],
|
2184
2243
|
documentTypes: [allTypes[1]],
|
2185
|
-
inherit:
|
2244
|
+
inherit: getRandomInheritanceType(),
|
2186
2245
|
};
|
2187
2246
|
const safetyRoles = ['Safety Officer', 'Site Supervisor', 'WHS Representative'];
|
2188
2247
|
safetyRoles.forEach((role) => {
|
@@ -2206,7 +2265,7 @@ sites.forEach((site) => {
|
|
2206
2265
|
folders: [],
|
2207
2266
|
documents: [],
|
2208
2267
|
documentTypes: [allTypes[1]],
|
2209
|
-
inherit:
|
2268
|
+
inherit: getRandomInheritanceType(),
|
2210
2269
|
};
|
2211
2270
|
sampleFileTypes.forEach((fileType) => {
|
2212
2271
|
fileType.titles.forEach((title) => {
|
@@ -2255,7 +2314,7 @@ sites.forEach((site) => {
|
|
2255
2314
|
folders: [],
|
2256
2315
|
documents: [],
|
2257
2316
|
documentTypes: [allTypes[0]],
|
2258
|
-
inherit:
|
2317
|
+
inherit: getRandomInheritanceType(),
|
2259
2318
|
};
|
2260
2319
|
dept.commonFiles.forEach((fileName) => {
|
2261
2320
|
const [name, extension] = fileName.split('.');
|
@@ -2297,7 +2356,7 @@ sites.forEach((site) => {
|
|
2297
2356
|
folders: [],
|
2298
2357
|
documents: [],
|
2299
2358
|
documentTypes: [allTypes[1]],
|
2300
|
-
inherit:
|
2359
|
+
inherit: getRandomInheritanceType(),
|
2301
2360
|
};
|
2302
2361
|
sampleFileTypes.forEach((fileType) => {
|
2303
2362
|
fileType.titles.forEach((title) => {
|
@@ -2343,8 +2402,8 @@ class AXCFolderDataSeeder {
|
|
2343
2402
|
this.storageService = inject(AXPDexieEntityStorageService);
|
2344
2403
|
}
|
2345
2404
|
async seed() {
|
2346
|
-
await this.storageService.initial(`${RootConfig$
|
2347
|
-
await this.storageService.initial(`${RootConfig$
|
2405
|
+
await this.storageService.initial(`${RootConfig$2.module.name}.${RootConfig$2.entities.folder.name}`, FOLDER_MOCK_DATA);
|
2406
|
+
await this.storageService.initial(`${RootConfig$2.module.name}.${RootConfig$2.entities.document.name}`, FILE_MOCK_DATA);
|
2348
2407
|
}
|
2349
2408
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXCFolderDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
2350
2409
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXCFolderDataSeeder }); }
|
@@ -2495,8 +2554,8 @@ class AXPFormTemplateCategoryDataSeeder {
|
|
2495
2554
|
this.storageService = inject(AXPDexieEntityStorageService);
|
2496
2555
|
}
|
2497
2556
|
async seed() {
|
2498
|
-
await this.storageService.initial(`${RootConfig$
|
2499
|
-
await this.storageService.initial(`${RootConfig$
|
2557
|
+
await this.storageService.initial(`${RootConfig$3.module.name}.${RootConfig$3.entities.category.name}`, TEMPLATE_CATEGORIES);
|
2558
|
+
await this.storageService.initial(`${RootConfig$3.module.name}.${RootConfig$3.entities.template.name}`, TEMPLATE_FORM_TEMPLATES);
|
2500
2559
|
}
|
2501
2560
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXPFormTemplateCategoryDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
2502
2561
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXPFormTemplateCategoryDataSeeder }); }
|
@@ -2613,7 +2672,7 @@ class AXPIssueTypeDataSeeder {
|
|
2613
2672
|
this.storageService = inject(AXPDexieEntityStorageService);
|
2614
2673
|
}
|
2615
2674
|
async seed() {
|
2616
|
-
await this.storageService.initial(`${RootConfig$
|
2675
|
+
await this.storageService.initial(`${RootConfig$4.module.name}.${RootConfig$4.entities.issueType.name}`, ISSUE_TYPES);
|
2617
2676
|
}
|
2618
2677
|
}
|
2619
2678
|
|
@@ -2683,7 +2742,7 @@ class AXMLogDataSeeder {
|
|
2683
2742
|
this.storageService = inject(AXPDexieEntityStorageService);
|
2684
2743
|
}
|
2685
2744
|
async seed() {
|
2686
|
-
await this.storageService.initial(`${RootConfig$
|
2745
|
+
await this.storageService.initial(`${RootConfig$5.module.name}.${RootConfig$5.entities.axpLog.name}`, projectMock$1);
|
2687
2746
|
}
|
2688
2747
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXMLogDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
2689
2748
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXMLogDataSeeder }); }
|
@@ -2700,7 +2759,7 @@ class MOCKStrategy {
|
|
2700
2759
|
return 'user-pass';
|
2701
2760
|
}
|
2702
2761
|
async signin(credentials) {
|
2703
|
-
const entityRef = await this.entityRegistery.resolve(RootConfig$
|
2762
|
+
const entityRef = await this.entityRegistery.resolve(RootConfig$6.module.name, RootConfig$6.entities.users.name);
|
2704
2763
|
const accessToken = 'access_token';
|
2705
2764
|
const refreshToken = 'refresh_token';
|
2706
2765
|
try {
|
@@ -2869,7 +2928,7 @@ class AXCNotificationTemplateDataSeeder {
|
|
2869
2928
|
this.storageService = inject(AXPDexieEntityStorageService);
|
2870
2929
|
}
|
2871
2930
|
async seed() {
|
2872
|
-
await this.storageService.initial(`${RootConfig$
|
2931
|
+
await this.storageService.initial(`${RootConfig$7.module.name}.${RootConfig$7.entities.template.name}`, NOTIFICATION_TEMPLATES);
|
2873
2932
|
}
|
2874
2933
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXCNotificationTemplateDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
2875
2934
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXCNotificationTemplateDataSeeder }); }
|
@@ -4025,7 +4084,7 @@ class AXCOrganizationManagementDataSeeder {
|
|
4025
4084
|
async seed() {
|
4026
4085
|
const uuid = AXPDataGenerator.uuid;
|
4027
4086
|
// Departments
|
4028
|
-
await this.storageService.initial(RootConfig$
|
4087
|
+
await this.storageService.initial(RootConfig$8.entities.department.source, [
|
4029
4088
|
{
|
4030
4089
|
id: uuid(),
|
4031
4090
|
title: 'Software Development',
|
@@ -4084,7 +4143,7 @@ class AXCOrganizationManagementDataSeeder {
|
|
4084
4143
|
},
|
4085
4144
|
]);
|
4086
4145
|
// Divisions
|
4087
|
-
await this.storageService.initial(RootConfig$
|
4146
|
+
await this.storageService.initial(RootConfig$8.entities.division.source, [
|
4088
4147
|
{
|
4089
4148
|
id: uuid(),
|
4090
4149
|
title: 'Technology Division',
|
@@ -4129,7 +4188,7 @@ class AXCOrganizationManagementDataSeeder {
|
|
4129
4188
|
},
|
4130
4189
|
]);
|
4131
4190
|
// Branches
|
4132
|
-
await this.storageService.initial(RootConfig$
|
4191
|
+
await this.storageService.initial(RootConfig$8.entities.branch.source, [
|
4133
4192
|
{
|
4134
4193
|
id: uuid(),
|
4135
4194
|
title: 'Headquarters',
|
@@ -4177,15 +4236,15 @@ class AXCOrganizationManagementDataSeeder {
|
|
4177
4236
|
},
|
4178
4237
|
]);
|
4179
4238
|
// Positions Category
|
4180
|
-
await this.storageService.initial(RootConfig$
|
4239
|
+
await this.storageService.initial(RootConfig$8.entities.positionCategory.source, POSITIONS_CATEGORY_MOCK);
|
4181
4240
|
// Positions
|
4182
|
-
await this.storageService.initial(RootConfig$
|
4241
|
+
await this.storageService.initial(RootConfig$8.entities.position.source, POSITIONS_MOCK);
|
4183
4242
|
// Role Category
|
4184
|
-
await this.storageService.initial(RootConfig$
|
4243
|
+
await this.storageService.initial(RootConfig$8.entities.roleCategory.source, ROLES_CATEGORY_MOCK);
|
4185
4244
|
// Role
|
4186
|
-
await this.storageService.initial(RootConfig$
|
4245
|
+
await this.storageService.initial(RootConfig$8.entities.role.source, ROLES_MOCK);
|
4187
4246
|
// Employment Types
|
4188
|
-
await this.storageService.initial(RootConfig$
|
4247
|
+
await this.storageService.initial(RootConfig$8.entities.employmentType.source, [
|
4189
4248
|
{
|
4190
4249
|
id: uuid(),
|
4191
4250
|
title: 'Full-Time',
|
@@ -4213,7 +4272,7 @@ class AXCOrganizationManagementDataSeeder {
|
|
4213
4272
|
},
|
4214
4273
|
]);
|
4215
4274
|
// Teams
|
4216
|
-
await this.storageService.initial(RootConfig$
|
4275
|
+
await this.storageService.initial(RootConfig$8.entities.team.source, [
|
4217
4276
|
{
|
4218
4277
|
id: uuid(),
|
4219
4278
|
title: 'Backend Development Team',
|
@@ -4260,7 +4319,7 @@ class AXCOrganizationManagementDataSeeder {
|
|
4260
4319
|
},
|
4261
4320
|
]);
|
4262
4321
|
// Employees
|
4263
|
-
await this.storageService.initial(RootConfig$
|
4322
|
+
await this.storageService.initial(RootConfig$8.entities.employee.source, [
|
4264
4323
|
{
|
4265
4324
|
id: uuid(),
|
4266
4325
|
firstname: 'Jane',
|
@@ -4383,7 +4442,7 @@ class AXCOrganizationManagementDataSeeder {
|
|
4383
4442
|
},
|
4384
4443
|
]);
|
4385
4444
|
// Store Chart Data
|
4386
|
-
await this.storageService.initial(RootConfig$
|
4445
|
+
await this.storageService.initial(RootConfig$8.entities.chart.source, [
|
4387
4446
|
{
|
4388
4447
|
id: uuid(),
|
4389
4448
|
version: '1.0',
|
@@ -4391,13 +4450,13 @@ class AXCOrganizationManagementDataSeeder {
|
|
4391
4450
|
},
|
4392
4451
|
]);
|
4393
4452
|
// Skill Category
|
4394
|
-
await this.storageService.initial(RootConfig$
|
4453
|
+
await this.storageService.initial(RootConfig$8.entities.skillCategory.source, SKILLS_CATEGORY_MOCK);
|
4395
4454
|
// Skill
|
4396
|
-
await this.storageService.initial(RootConfig$
|
4455
|
+
await this.storageService.initial(RootConfig$8.entities.skill.source, SKILLS_MOCK);
|
4397
4456
|
// Responsibility Category
|
4398
|
-
await this.storageService.initial(RootConfig$
|
4457
|
+
await this.storageService.initial(RootConfig$8.entities.responsibilityCategory.source, RESPONSIBILITIES_CATEGORY_MOCK);
|
4399
4458
|
// Responsibility
|
4400
|
-
await this.storageService.initial(RootConfig$
|
4459
|
+
await this.storageService.initial(RootConfig$8.entities.responsibility.source, RESPONSIBILITIES_MOCK);
|
4401
4460
|
}
|
4402
4461
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXCOrganizationManagementDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
4403
4462
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXCOrganizationManagementDataSeeder }); }
|
@@ -4473,7 +4532,7 @@ class AXCAppTermDataSeeder {
|
|
4473
4532
|
this.storageService = inject(AXPDexieEntityStorageService);
|
4474
4533
|
}
|
4475
4534
|
async seed() {
|
4476
|
-
await this.storageService.initial(`${RootConfig$
|
4535
|
+
await this.storageService.initial(`${RootConfig$9.module.name}.${RootConfig$9.entities.appTerm.name}`, APP_TERMS);
|
4477
4536
|
}
|
4478
4537
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXCAppTermDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
4479
4538
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXCAppTermDataSeeder }); }
|
@@ -4508,7 +4567,7 @@ class AXCAppVersionDataSeeder {
|
|
4508
4567
|
this.storageService = inject(AXPDexieEntityStorageService);
|
4509
4568
|
}
|
4510
4569
|
async seed() {
|
4511
|
-
await this.storageService.initial(`${RootConfig$
|
4570
|
+
await this.storageService.initial(`${RootConfig$9.module.name}.${RootConfig$9.entities.appVersion.name}`, APP_VERSIONS);
|
4512
4571
|
}
|
4513
4572
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXCAppVersionDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
4514
4573
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXCAppVersionDataSeeder }); }
|
@@ -4539,7 +4598,7 @@ class AXCGlobalVariablesDataSeeder {
|
|
4539
4598
|
this.storageService = inject(AXPDexieEntityStorageService);
|
4540
4599
|
}
|
4541
4600
|
async seed() {
|
4542
|
-
await this.storageService.initial(`${RootConfig$
|
4601
|
+
await this.storageService.initial(`${RootConfig$9.module.name}.${RootConfig$9.entities.globalVariable.name}`, GLOBAL_VARIABLES);
|
4543
4602
|
}
|
4544
4603
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXCGlobalVariablesDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
4545
4604
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXCGlobalVariablesDataSeeder }); }
|
@@ -4873,8 +4932,8 @@ class AXCMetaDataDefinitionDataSeeder {
|
|
4873
4932
|
this.storageService = inject(AXPDexieEntityStorageService);
|
4874
4933
|
}
|
4875
4934
|
async seed() {
|
4876
|
-
await this.storageService.initial(`${RootConfig$
|
4877
|
-
await this.storageService.initial(`${RootConfig$
|
4935
|
+
await this.storageService.initial(`${RootConfig$9.module.name}.${RootConfig$9.entities.metaDataDefinitionCategory.name}`, METADATA_CATEGORY_MOCK);
|
4936
|
+
await this.storageService.initial(`${RootConfig$9.module.name}.${RootConfig$9.entities.metaDataDefinition.name}`, METADATA_MOCK);
|
4878
4937
|
}
|
4879
4938
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXCMetaDataDefinitionDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
4880
4939
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXCMetaDataDefinitionDataSeeder }); }
|
@@ -4912,7 +4971,7 @@ class AXCProjectclientDataSeeder {
|
|
4912
4971
|
this.storageService = inject(AXPDexieEntityStorageService);
|
4913
4972
|
}
|
4914
4973
|
async seed() {
|
4915
|
-
await this.storageService.initial(`${RootConfig$
|
4974
|
+
await this.storageService.initial(`${RootConfig$a.module.name}.${RootConfig$a.entities.client.name}`, ClientMock);
|
4916
4975
|
}
|
4917
4976
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXCProjectclientDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
4918
4977
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXCProjectclientDataSeeder }); }
|
@@ -5014,7 +5073,7 @@ class AXCProjectMemberDataSeeder {
|
|
5014
5073
|
this.storageService = inject(AXPDexieEntityStorageService);
|
5015
5074
|
}
|
5016
5075
|
async seed() {
|
5017
|
-
await this.storageService.initial(`${RootConfig$
|
5076
|
+
await this.storageService.initial(`${RootConfig$a.module.name}.${RootConfig$a.entities.projectMemeber.name}`, projectMemberMock);
|
5018
5077
|
}
|
5019
5078
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXCProjectMemberDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
5020
5079
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXCProjectMemberDataSeeder }); }
|
@@ -5028,8 +5087,8 @@ class AXCProjectRoleMemberDataSeeder {
|
|
5028
5087
|
this.storageService = inject(AXPDexieEntityStorageService);
|
5029
5088
|
}
|
5030
5089
|
async seed() {
|
5031
|
-
await this.storageService.initial(`${RootConfig$
|
5032
|
-
await this.storageService.initial(`${RootConfig$
|
5090
|
+
await this.storageService.initial(`${RootConfig$a.module.name}.${RootConfig$a.entities.projectType.name}`, projectTypeMock);
|
5091
|
+
await this.storageService.initial(`${RootConfig$a.module.name}.${RootConfig$a.entities.projectRoleMember.name}`, projectRoleMemberMock);
|
5033
5092
|
}
|
5034
5093
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXCProjectRoleMemberDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
5035
5094
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXCProjectRoleMemberDataSeeder }); }
|
@@ -5043,7 +5102,7 @@ class AXCProjectDataSeeder {
|
|
5043
5102
|
this.storageService = inject(AXPDexieEntityStorageService);
|
5044
5103
|
}
|
5045
5104
|
async seed() {
|
5046
|
-
await this.storageService.initial(`${RootConfig$
|
5105
|
+
await this.storageService.initial(`${RootConfig$a.module.name}.${RootConfig$a.entities.project.name}`, projectMock);
|
5047
5106
|
}
|
5048
5107
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXCProjectDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
5049
5108
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXCProjectDataSeeder }); }
|
@@ -5087,7 +5146,7 @@ class AXCsprintDataSeeder {
|
|
5087
5146
|
this.storageService = inject(AXPDexieEntityStorageService);
|
5088
5147
|
}
|
5089
5148
|
async seed() {
|
5090
|
-
await this.storageService.initial(`${RootConfig$
|
5149
|
+
await this.storageService.initial(`${RootConfig$a.module.name}.${RootConfig$a.entities.sprint.name}`, sprintMock);
|
5091
5150
|
}
|
5092
5151
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXCsprintDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
5093
5152
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXCsprintDataSeeder }); }
|
@@ -5125,7 +5184,7 @@ class AXCTaskTypeDataSeeder {
|
|
5125
5184
|
this.storageService = inject(AXPDexieEntityStorageService);
|
5126
5185
|
}
|
5127
5186
|
async seed() {
|
5128
|
-
await this.storageService.initial(`${RootConfig$
|
5187
|
+
await this.storageService.initial(`${RootConfig$a.module.name}.${RootConfig$a.entities.taskType.name}`, taskTypeMock);
|
5129
5188
|
}
|
5130
5189
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXCTaskTypeDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
5131
5190
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXCTaskTypeDataSeeder }); }
|
@@ -5194,7 +5253,7 @@ class AXCTaskDataSeeder {
|
|
5194
5253
|
this.storageService = inject(AXPDexieEntityStorageService);
|
5195
5254
|
}
|
5196
5255
|
async seed() {
|
5197
|
-
await this.storageService.initial(`${RootConfig$
|
5256
|
+
await this.storageService.initial(`${RootConfig$a.module.name}.${RootConfig$a.entities.task.name}`, taskMock);
|
5198
5257
|
}
|
5199
5258
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXCTaskDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
5200
5259
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXCTaskDataSeeder }); }
|
@@ -5208,7 +5267,7 @@ class AXCWorkSiteSeeder {
|
|
5208
5267
|
this.storageService = inject(AXPDexieEntityStorageService);
|
5209
5268
|
}
|
5210
5269
|
async seed() {
|
5211
|
-
await this.storageService.initial(`${RootConfig$
|
5270
|
+
await this.storageService.initial(`${RootConfig$a.module.name}.${RootConfig$a.entities.workSite.name}`, workSiteMock);
|
5212
5271
|
}
|
5213
5272
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXCWorkSiteSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
5214
5273
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXCWorkSiteSeeder }); }
|
@@ -5239,7 +5298,7 @@ class AXCSchedulerJobDataSeeder {
|
|
5239
5298
|
this.storageService = inject(AXPDexieEntityStorageService);
|
5240
5299
|
}
|
5241
5300
|
async seed() {
|
5242
|
-
await this.storageService.initial(`${RootConfig$
|
5301
|
+
await this.storageService.initial(`${RootConfig$b.module.name}.${RootConfig$b.entities.schedulerJob.name}`, SCHEDULER_JOB);
|
5243
5302
|
}
|
5244
5303
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXCSchedulerJobDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
5245
5304
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXCSchedulerJobDataSeeder }); }
|
@@ -5357,7 +5416,7 @@ class AXPSecurityManagementRoleDataSeeder {
|
|
5357
5416
|
...role,
|
5358
5417
|
// permissions: this.getRandomPermissions(permissionKeys, 2, 5), // Get 2-5 random permissions
|
5359
5418
|
}));
|
5360
|
-
await this.storageService.initial(`${RootConfig$
|
5419
|
+
await this.storageService.initial(`${RootConfig$6.module.name}.${RootConfig$6.entities.roles.name}`, roles);
|
5361
5420
|
}
|
5362
5421
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXPSecurityManagementRoleDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
5363
5422
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXPSecurityManagementRoleDataSeeder }); }
|
@@ -5371,7 +5430,7 @@ class AXPSecurityManagementUserDataSeeder {
|
|
5371
5430
|
this.storageService = inject(AXPDexieEntityStorageService);
|
5372
5431
|
}
|
5373
5432
|
async seed() {
|
5374
|
-
await this.storageService.initial(`${RootConfig$
|
5433
|
+
await this.storageService.initial(`${RootConfig$6.module.name}.${RootConfig$6.entities.users.name}`, this.generateUsers());
|
5375
5434
|
}
|
5376
5435
|
generateUsers() {
|
5377
5436
|
return mockUsers.map((user) => ({
|
@@ -5420,7 +5479,7 @@ class AXPSecurityManagementDeviceSessionDataSeeder {
|
|
5420
5479
|
this.sessionService = inject(AXPSessionService);
|
5421
5480
|
}
|
5422
5481
|
async seed() {
|
5423
|
-
await this.storageService.initial(`${RootConfig$
|
5482
|
+
await this.storageService.initial(`${RootConfig$6.module.name}.${RootConfig$6.entities.deviceSessions.name}`, this.generateDeviceSessions());
|
5424
5483
|
}
|
5425
5484
|
generateDeviceSessions() {
|
5426
5485
|
const deviceSessions = [];
|
@@ -5641,7 +5700,7 @@ class AXCTextTemplateCategoryDataSeeder {
|
|
5641
5700
|
this.storageService = inject(AXPDexieEntityStorageService);
|
5642
5701
|
}
|
5643
5702
|
async seed() {
|
5644
|
-
await this.storageService.initial(`${RootConfig$
|
5703
|
+
await this.storageService.initial(`${RootConfig$c.module.name}.${RootConfig$c.entities.category.name}`, TEXT_TEMPLATE_CATEGORY);
|
5645
5704
|
}
|
5646
5705
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXCTextTemplateCategoryDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
5647
5706
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXCTextTemplateCategoryDataSeeder }); }
|
@@ -5655,7 +5714,7 @@ class AXCTextTemplateDataSeeder {
|
|
5655
5714
|
this.storageService = inject(AXPDexieEntityStorageService);
|
5656
5715
|
}
|
5657
5716
|
async seed() {
|
5658
|
-
await this.storageService.initial(`${RootConfig$
|
5717
|
+
await this.storageService.initial(`${RootConfig$c.module.name}.${RootConfig$c.entities.template.name}`, TEXT_TEMPLATES);
|
5659
5718
|
}
|
5660
5719
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXCTextTemplateDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
5661
5720
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXCTextTemplateDataSeeder }); }
|
@@ -5664,112 +5723,98 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImpo
|
|
5664
5723
|
type: Injectable
|
5665
5724
|
}] });
|
5666
5725
|
|
5667
|
-
|
5668
|
-
|
5669
|
-
|
5670
|
-
|
5671
|
-
|
5672
|
-
|
5673
|
-
|
5674
|
-
|
5675
|
-
|
5676
|
-
|
5677
|
-
|
5678
|
-
|
5679
|
-
|
5680
|
-
|
5681
|
-
|
5682
|
-
|
5683
|
-
|
5684
|
-
|
5726
|
+
const companyInterface = '{"type":"document-layout","children":[{"type":"page-layout","children":[{"type":"select-editor","name":"select-editor1"}],"name":"page-layout1"}],"name":"document"}';
|
5727
|
+
const trainingTypeMockData = [
|
5728
|
+
{
|
5729
|
+
id: AXPDataGenerator.uuid(),
|
5730
|
+
title: 'Online Training',
|
5731
|
+
description: 'Virtual instructor-led training sessions conducted remotely',
|
5732
|
+
metaTags: [
|
5733
|
+
{
|
5734
|
+
name: 'company',
|
5735
|
+
title: 'Company',
|
5736
|
+
interface: companyInterface,
|
5737
|
+
},
|
5738
|
+
],
|
5739
|
+
},
|
5740
|
+
{
|
5741
|
+
id: AXPDataGenerator.uuid(),
|
5742
|
+
title: 'Classroom Training',
|
5743
|
+
description: 'Traditional in-person training sessions in a classroom setting',
|
5744
|
+
},
|
5745
|
+
{
|
5746
|
+
id: AXPDataGenerator.uuid(),
|
5747
|
+
title: 'Workshop',
|
5748
|
+
description: 'Hands-on practical training sessions in small groups',
|
5749
|
+
},
|
5750
|
+
{
|
5751
|
+
id: AXPDataGenerator.uuid(),
|
5752
|
+
title: 'Self-paced Learning',
|
5753
|
+
description: 'Independent learning through online modules and materials',
|
5754
|
+
},
|
5755
|
+
{
|
5756
|
+
id: AXPDataGenerator.uuid(),
|
5757
|
+
title: 'Blended Learning',
|
5758
|
+
description: 'Combination of online and classroom training methods',
|
5685
5759
|
}
|
5686
|
-
|
5687
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: MockTenantLoader }); }
|
5688
|
-
}
|
5689
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: MockTenantLoader, decorators: [{
|
5690
|
-
type: Injectable
|
5691
|
-
}] });
|
5760
|
+
];
|
5692
5761
|
|
5693
|
-
|
5694
|
-
|
5695
|
-
|
5696
|
-
|
5697
|
-
|
5698
|
-
|
5699
|
-
|
5700
|
-
|
5701
|
-
|
5702
|
-
|
5703
|
-
|
5704
|
-
|
5705
|
-
|
5706
|
-
|
5707
|
-
|
5708
|
-
|
5709
|
-
|
5710
|
-
|
5711
|
-
|
5712
|
-
|
5713
|
-
|
5714
|
-
|
5762
|
+
const certificateMock = [
|
5763
|
+
{
|
5764
|
+
id: AXPDataGenerator.uuid(),
|
5765
|
+
title: 'Programming Fundamentals Certificate',
|
5766
|
+
description: 'Certificate for completing Programming Fundamentals course',
|
5767
|
+
issueDate: new Date(),
|
5768
|
+
expireDate: new Date(new Date().setFullYear(new Date().getFullYear() + 3)), // Valid for 3 years
|
5769
|
+
status: 'Active',
|
5770
|
+
certificateNumber: 'CERT-2023-001',
|
5771
|
+
grade: 'A',
|
5772
|
+
score: 95,
|
5773
|
+
trainingTypeId: trainingTypeMockData[0].id,
|
5774
|
+
trainingType: trainingTypeMockData[0],
|
5775
|
+
},
|
5776
|
+
{
|
5777
|
+
id: AXPDataGenerator.uuid(),
|
5778
|
+
title: 'Leadership Skills Certificate',
|
5779
|
+
description: 'Certificate for completing Leadership Development Program',
|
5780
|
+
issueDate: new Date(),
|
5781
|
+
expireDate: new Date(new Date().setFullYear(new Date().getFullYear() + 1)), // Valid for 1 year
|
5782
|
+
status: 'Active',
|
5783
|
+
certificateNumber: 'CERT-2023-002',
|
5784
|
+
grade: 'B+',
|
5785
|
+
score: 88,
|
5786
|
+
trainingTypeId: trainingTypeMockData[1].id,
|
5787
|
+
trainingType: trainingTypeMockData[1],
|
5788
|
+
},
|
5789
|
+
{
|
5790
|
+
id: AXPDataGenerator.uuid(),
|
5791
|
+
title: 'UI/UX Design Certificate',
|
5792
|
+
description: 'Certificate for completing Design Principles course',
|
5793
|
+
issueDate: new Date(),
|
5794
|
+
expireDate: new Date(new Date().setFullYear(new Date().getFullYear() + 2)), // Valid for 2 years
|
5795
|
+
status: 'Active',
|
5796
|
+
certificateNumber: 'CERT-2023-003',
|
5797
|
+
grade: 'A-',
|
5798
|
+
score: 92,
|
5799
|
+
trainingTypeId: trainingTypeMockData[2].id,
|
5800
|
+
trainingType: trainingTypeMockData[2],
|
5715
5801
|
}
|
5716
|
-
|
5717
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: MockApplicationLoader }); }
|
5718
|
-
}
|
5719
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: MockApplicationLoader, decorators: [{
|
5720
|
-
type: Injectable
|
5721
|
-
}] });
|
5802
|
+
];
|
5722
5803
|
|
5723
|
-
class
|
5804
|
+
class AXCCertificateDataSeeder {
|
5724
5805
|
constructor() {
|
5725
|
-
this.
|
5726
|
-
AXMPermissionsKeys.FormTemplate.Management,
|
5727
|
-
AXMPermissionsKeys.FormTemplate.Categories.Management,
|
5728
|
-
AXMPermissionsKeys.FormTemplate.Templates.Management
|
5729
|
-
];
|
5730
|
-
this.adminPermissions = [...this.userPermissions, ...['admin', 'demo.admin.settings']];
|
5731
|
-
this.rootPermissions = [...this.adminPermissions, ...['platform', 'platform.reports',
|
5732
|
-
'document-management:manage', 'document-management:document-type:manage',
|
5733
|
-
'document-management:driver:manage']];
|
5806
|
+
this.storageService = inject(AXPDexieEntityStorageService);
|
5734
5807
|
}
|
5735
|
-
|
5736
|
-
|
5737
|
-
return of(this.rootPermissions);
|
5738
|
-
}
|
5739
|
-
else if (context.user?.name == 'admin') {
|
5740
|
-
return of(this.adminPermissions);
|
5741
|
-
}
|
5742
|
-
else {
|
5743
|
-
return of(this.userPermissions);
|
5744
|
-
}
|
5808
|
+
async seed() {
|
5809
|
+
await this.storageService.initial(`${RootConfig$d.module.name}.${RootConfig$d.entities.certificate.name}`, certificateMock);
|
5745
5810
|
}
|
5746
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type:
|
5747
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type:
|
5811
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXCCertificateDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
5812
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXCCertificateDataSeeder }); }
|
5748
5813
|
}
|
5749
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type:
|
5814
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXCCertificateDataSeeder, decorators: [{
|
5750
5815
|
type: Injectable
|
5751
5816
|
}] });
|
5752
5817
|
|
5753
|
-
class MockFeatureLoader {
|
5754
|
-
constructor() {
|
5755
|
-
this.list = [
|
5756
|
-
{
|
5757
|
-
name: 'entity-comment',
|
5758
|
-
title: 'Feature Title',
|
5759
|
-
value: true,
|
5760
|
-
},
|
5761
|
-
{
|
5762
|
-
name: 'axp-entity-list-advance-filter',
|
5763
|
-
title: 'Filters',
|
5764
|
-
value: true,
|
5765
|
-
},
|
5766
|
-
];
|
5767
|
-
}
|
5768
|
-
getList() {
|
5769
|
-
return of(this.list).pipe(delay(0));
|
5770
|
-
}
|
5771
|
-
}
|
5772
|
-
|
5773
5818
|
const periodMock = [
|
5774
5819
|
{
|
5775
5820
|
id: AXPDataGenerator.uuid(),
|
@@ -5928,10 +5973,10 @@ class AXCCourseDataSeeder {
|
|
5928
5973
|
this.storageService = inject(AXPDexieEntityStorageService);
|
5929
5974
|
}
|
5930
5975
|
async seed() {
|
5931
|
-
await this.storageService.initial(`${RootConfig$
|
5932
|
-
await this.storageService.initial(`${RootConfig$
|
5933
|
-
await this.storageService.initial(`${RootConfig$
|
5934
|
-
await this.storageService.initial(`${RootConfig$
|
5976
|
+
await this.storageService.initial(`${RootConfig$d.module.name}.${RootConfig$d.entities.course.name}`, courseMock);
|
5977
|
+
await this.storageService.initial(`${RootConfig$d.module.name}.${RootConfig$d.entities.courseType.name}`, courseTypeMock);
|
5978
|
+
await this.storageService.initial(`${RootConfig$d.module.name}.${RootConfig$d.entities.courseLocation.name}`, courseLocationMock);
|
5979
|
+
await this.storageService.initial(`${RootConfig$d.module.name}.${RootConfig$d.entities.coursePeriod.name}`, coursePeriodMockData);
|
5935
5980
|
}
|
5936
5981
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXCCourseDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
5937
5982
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXCCourseDataSeeder }); }
|
@@ -5940,112 +5985,34 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImpo
|
|
5940
5985
|
type: Injectable
|
5941
5986
|
}] });
|
5942
5987
|
|
5943
|
-
class
|
5988
|
+
class AXCLocationDataSeeder {
|
5944
5989
|
constructor() {
|
5945
5990
|
this.storageService = inject(AXPDexieEntityStorageService);
|
5946
5991
|
}
|
5947
5992
|
async seed() {
|
5948
|
-
await this.storageService.initial(`${RootConfig$
|
5993
|
+
await this.storageService.initial(`${RootConfig$d.module.name}.${RootConfig$d.entities.location.name}`, locationMockData);
|
5949
5994
|
}
|
5950
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type:
|
5951
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type:
|
5995
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXCLocationDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
5996
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXCLocationDataSeeder }); }
|
5952
5997
|
}
|
5953
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type:
|
5998
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXCLocationDataSeeder, decorators: [{
|
5954
5999
|
type: Injectable
|
5955
6000
|
}] });
|
5956
6001
|
|
5957
|
-
|
5958
|
-
const trainingTypeMockData = [
|
5959
|
-
{
|
5960
|
-
id: AXPDataGenerator.uuid(),
|
5961
|
-
title: 'Online Training',
|
5962
|
-
description: 'Virtual instructor-led training sessions conducted remotely',
|
5963
|
-
metaTags: [
|
5964
|
-
{
|
5965
|
-
name: 'company',
|
5966
|
-
title: 'Company',
|
5967
|
-
interface: companyInterface,
|
5968
|
-
},
|
5969
|
-
],
|
5970
|
-
},
|
5971
|
-
{
|
5972
|
-
id: AXPDataGenerator.uuid(),
|
5973
|
-
title: 'Classroom Training',
|
5974
|
-
description: 'Traditional in-person training sessions in a classroom setting',
|
5975
|
-
},
|
5976
|
-
{
|
5977
|
-
id: AXPDataGenerator.uuid(),
|
5978
|
-
title: 'Workshop',
|
5979
|
-
description: 'Hands-on practical training sessions in small groups',
|
5980
|
-
},
|
5981
|
-
{
|
5982
|
-
id: AXPDataGenerator.uuid(),
|
5983
|
-
title: 'Self-paced Learning',
|
5984
|
-
description: 'Independent learning through online modules and materials',
|
5985
|
-
},
|
5986
|
-
{
|
5987
|
-
id: AXPDataGenerator.uuid(),
|
5988
|
-
title: 'Blended Learning',
|
5989
|
-
description: 'Combination of online and classroom training methods',
|
5990
|
-
}
|
5991
|
-
];
|
5992
|
-
|
5993
|
-
class AXCTrainigTypeDataSeeder {
|
6002
|
+
class AXCPeriodDataSeeder {
|
5994
6003
|
constructor() {
|
5995
6004
|
this.storageService = inject(AXPDexieEntityStorageService);
|
5996
6005
|
}
|
5997
6006
|
async seed() {
|
5998
|
-
await this.storageService.initial(`${RootConfig$
|
6007
|
+
await this.storageService.initial(`${RootConfig$d.module.name}.${RootConfig$d.entities.period.name}`, periodMock);
|
5999
6008
|
}
|
6000
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type:
|
6001
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type:
|
6009
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXCPeriodDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
6010
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXCPeriodDataSeeder }); }
|
6002
6011
|
}
|
6003
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type:
|
6012
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXCPeriodDataSeeder, decorators: [{
|
6004
6013
|
type: Injectable
|
6005
6014
|
}] });
|
6006
6015
|
|
6007
|
-
const certificateMock = [
|
6008
|
-
{
|
6009
|
-
id: AXPDataGenerator.uuid(),
|
6010
|
-
title: 'Programming Fundamentals Certificate',
|
6011
|
-
description: 'Certificate for completing Programming Fundamentals course',
|
6012
|
-
issueDate: new Date(),
|
6013
|
-
expireDate: new Date(new Date().setFullYear(new Date().getFullYear() + 3)), // Valid for 3 years
|
6014
|
-
status: 'Active',
|
6015
|
-
certificateNumber: 'CERT-2023-001',
|
6016
|
-
grade: 'A',
|
6017
|
-
score: 95,
|
6018
|
-
trainingTypeId: trainingTypeMockData[0].id,
|
6019
|
-
trainingType: trainingTypeMockData[0],
|
6020
|
-
},
|
6021
|
-
{
|
6022
|
-
id: AXPDataGenerator.uuid(),
|
6023
|
-
title: 'Leadership Skills Certificate',
|
6024
|
-
description: 'Certificate for completing Leadership Development Program',
|
6025
|
-
issueDate: new Date(),
|
6026
|
-
expireDate: new Date(new Date().setFullYear(new Date().getFullYear() + 1)), // Valid for 1 year
|
6027
|
-
status: 'Active',
|
6028
|
-
certificateNumber: 'CERT-2023-002',
|
6029
|
-
grade: 'B+',
|
6030
|
-
score: 88,
|
6031
|
-
trainingTypeId: trainingTypeMockData[1].id,
|
6032
|
-
trainingType: trainingTypeMockData[1],
|
6033
|
-
},
|
6034
|
-
{
|
6035
|
-
id: AXPDataGenerator.uuid(),
|
6036
|
-
title: 'UI/UX Design Certificate',
|
6037
|
-
description: 'Certificate for completing Design Principles course',
|
6038
|
-
issueDate: new Date(),
|
6039
|
-
expireDate: new Date(new Date().setFullYear(new Date().getFullYear() + 2)), // Valid for 2 years
|
6040
|
-
status: 'Active',
|
6041
|
-
certificateNumber: 'CERT-2023-003',
|
6042
|
-
grade: 'A-',
|
6043
|
-
score: 92,
|
6044
|
-
trainingTypeId: trainingTypeMockData[2].id,
|
6045
|
-
trainingType: trainingTypeMockData[2],
|
6046
|
-
}
|
6047
|
-
];
|
6048
|
-
|
6049
6016
|
const trainingMock = [
|
6050
6017
|
{
|
6051
6018
|
id: AXPDataGenerator.uuid(),
|
@@ -6066,34 +6033,6 @@ const trainingMock = [
|
|
6066
6033
|
}
|
6067
6034
|
];
|
6068
6035
|
|
6069
|
-
class AXCTrainingDataSeeder {
|
6070
|
-
constructor() {
|
6071
|
-
this.storageService = inject(AXPDexieEntityStorageService);
|
6072
|
-
}
|
6073
|
-
async seed() {
|
6074
|
-
await this.storageService.initial(`${RootConfig$c.module.name}.${RootConfig$c.entities.training.name}`, trainingMock);
|
6075
|
-
}
|
6076
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXCTrainingDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
6077
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXCTrainingDataSeeder }); }
|
6078
|
-
}
|
6079
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXCTrainingDataSeeder, decorators: [{
|
6080
|
-
type: Injectable
|
6081
|
-
}] });
|
6082
|
-
|
6083
|
-
class AXCCertificateDataSeeder {
|
6084
|
-
constructor() {
|
6085
|
-
this.storageService = inject(AXPDexieEntityStorageService);
|
6086
|
-
}
|
6087
|
-
async seed() {
|
6088
|
-
await this.storageService.initial(`${RootConfig$c.module.name}.${RootConfig$c.entities.certificate.name}`, certificateMock);
|
6089
|
-
}
|
6090
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXCCertificateDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
6091
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXCCertificateDataSeeder }); }
|
6092
|
-
}
|
6093
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXCCertificateDataSeeder, decorators: [{
|
6094
|
-
type: Injectable
|
6095
|
-
}] });
|
6096
|
-
|
6097
6036
|
const facilitatorTypeMock = [
|
6098
6037
|
{
|
6099
6038
|
id: AXPDataGenerator.uuid(),
|
@@ -6132,8 +6071,8 @@ class AXCTrainingFacilitatorDataSeeder {
|
|
6132
6071
|
this.storageService = inject(AXPDexieEntityStorageService);
|
6133
6072
|
}
|
6134
6073
|
async seed() {
|
6135
|
-
await this.storageService.initial(`${RootConfig$
|
6136
|
-
await this.storageService.initial(`${RootConfig$
|
6074
|
+
await this.storageService.initial(`${RootConfig$d.module.name}.${RootConfig$d.entities.facilitatorType.name}`, facilitatorTypeMock);
|
6075
|
+
await this.storageService.initial(`${RootConfig$d.module.name}.${RootConfig$d.entities.trainingFacilitator.name}`, trainingFacilitatorMock);
|
6137
6076
|
}
|
6138
6077
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXCTrainingFacilitatorDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
6139
6078
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXCTrainingFacilitatorDataSeeder }); }
|
@@ -6166,7 +6105,7 @@ class AXCTrainingParticipantDataSeeder {
|
|
6166
6105
|
this.storageService = inject(AXPDexieEntityStorageService);
|
6167
6106
|
}
|
6168
6107
|
async seed() {
|
6169
|
-
await this.storageService.initial(`${RootConfig$
|
6108
|
+
await this.storageService.initial(`${RootConfig$d.module.name}.${RootConfig$d.entities.trainingParticipant.name}`, trainingParticipantMockData);
|
6170
6109
|
}
|
6171
6110
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXCTrainingParticipantDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
6172
6111
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXCTrainingParticipantDataSeeder }); }
|
@@ -6175,17 +6114,31 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImpo
|
|
6175
6114
|
type: Injectable
|
6176
6115
|
}] });
|
6177
6116
|
|
6178
|
-
class
|
6117
|
+
class AXCTrainigTypeDataSeeder {
|
6179
6118
|
constructor() {
|
6180
6119
|
this.storageService = inject(AXPDexieEntityStorageService);
|
6181
6120
|
}
|
6182
6121
|
async seed() {
|
6183
|
-
await this.storageService.initial(`${RootConfig$
|
6122
|
+
await this.storageService.initial(`${RootConfig$d.module.name}.${RootConfig$d.entities.trainingType.name}`, trainingTypeMockData);
|
6184
6123
|
}
|
6185
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type:
|
6186
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type:
|
6124
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXCTrainigTypeDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
6125
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXCTrainigTypeDataSeeder }); }
|
6187
6126
|
}
|
6188
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type:
|
6127
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXCTrainigTypeDataSeeder, decorators: [{
|
6128
|
+
type: Injectable
|
6129
|
+
}] });
|
6130
|
+
|
6131
|
+
class AXCTrainingDataSeeder {
|
6132
|
+
constructor() {
|
6133
|
+
this.storageService = inject(AXPDexieEntityStorageService);
|
6134
|
+
}
|
6135
|
+
async seed() {
|
6136
|
+
await this.storageService.initial(`${RootConfig$d.module.name}.${RootConfig$d.entities.training.name}`, trainingMock);
|
6137
|
+
}
|
6138
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXCTrainingDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
6139
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXCTrainingDataSeeder }); }
|
6140
|
+
}
|
6141
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXCTrainingDataSeeder, decorators: [{
|
6189
6142
|
type: Injectable
|
6190
6143
|
}] });
|
6191
6144
|
|
@@ -6198,13 +6151,12 @@ class AXCMockModule {
|
|
6198
6151
|
priority: 200,
|
6199
6152
|
run: async () => {
|
6200
6153
|
await seederService.seed();
|
6201
|
-
}
|
6154
|
+
},
|
6202
6155
|
});
|
6203
6156
|
}
|
6204
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXCMockModule, deps: [{ token: i1
|
6157
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXCMockModule, deps: [{ token: i1.AXPAppStartUpService }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.NgModule }); }
|
6205
6158
|
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.10", ngImport: i0, type: AXCMockModule, imports: [i2.AXPAuthModule, AXCFormTemplateManagementMockModule,
|
6206
|
-
AXCFOrganizationManagementMockModule
|
6207
|
-
AXCConversationMockModule] }); }
|
6159
|
+
AXCFOrganizationManagementMockModule] }); }
|
6208
6160
|
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXCMockModule, providers: [
|
6209
6161
|
AXPDexieEntityStorageService,
|
6210
6162
|
{
|
@@ -6409,6 +6361,16 @@ class AXCMockModule {
|
|
6409
6361
|
useClass: AXCLocationDataSeeder,
|
6410
6362
|
multi: true,
|
6411
6363
|
},
|
6364
|
+
{
|
6365
|
+
provide: AXP_DATA_SEEDER_TOKEN,
|
6366
|
+
useClass: AXPRoomDataSeeder,
|
6367
|
+
multi: true,
|
6368
|
+
},
|
6369
|
+
{
|
6370
|
+
provide: AXP_DATA_SEEDER_TOKEN,
|
6371
|
+
useClass: AXPMessageDataSeeder,
|
6372
|
+
multi: true,
|
6373
|
+
},
|
6412
6374
|
{
|
6413
6375
|
provide: AXP_TENANT_LOADER,
|
6414
6376
|
useClass: MockTenantLoader,
|
@@ -6429,8 +6391,7 @@ class AXCMockModule {
|
|
6429
6391
|
strategies: [MOCKStrategy],
|
6430
6392
|
}),
|
6431
6393
|
AXCFormTemplateManagementMockModule,
|
6432
|
-
AXCFOrganizationManagementMockModule
|
6433
|
-
AXCConversationMockModule] }); }
|
6394
|
+
AXCFOrganizationManagementMockModule] }); }
|
6434
6395
|
}
|
6435
6396
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXCMockModule, decorators: [{
|
6436
6397
|
type: NgModule,
|
@@ -6441,7 +6402,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImpo
|
|
6441
6402
|
}),
|
6442
6403
|
AXCFormTemplateManagementMockModule,
|
6443
6404
|
AXCFOrganizationManagementMockModule,
|
6444
|
-
AXCConversationMockModule,
|
6445
6405
|
],
|
6446
6406
|
exports: [],
|
6447
6407
|
declarations: [],
|
@@ -6649,6 +6609,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImpo
|
|
6649
6609
|
useClass: AXCLocationDataSeeder,
|
6650
6610
|
multi: true,
|
6651
6611
|
},
|
6612
|
+
{
|
6613
|
+
provide: AXP_DATA_SEEDER_TOKEN,
|
6614
|
+
useClass: AXPRoomDataSeeder,
|
6615
|
+
multi: true,
|
6616
|
+
},
|
6617
|
+
{
|
6618
|
+
provide: AXP_DATA_SEEDER_TOKEN,
|
6619
|
+
useClass: AXPMessageDataSeeder,
|
6620
|
+
multi: true,
|
6621
|
+
},
|
6652
6622
|
{
|
6653
6623
|
provide: AXP_TENANT_LOADER,
|
6654
6624
|
useClass: MockTenantLoader,
|
@@ -6667,7 +6637,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImpo
|
|
6667
6637
|
},
|
6668
6638
|
],
|
6669
6639
|
}]
|
6670
|
-
}], ctorParameters: () => [{ type: i1
|
6640
|
+
}], ctorParameters: () => [{ type: i1.AXPAppStartUpService }, { type: i0.Injector }] });
|
6671
6641
|
|
6672
6642
|
/**
|
6673
6643
|
* Generated bundle index. Do not edit.
|