@acorex/connectivity 19.2.7 → 19.2.9

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.
@@ -2,7 +2,7 @@ import { APPLICATION_SOURCE_NAME, MODULE_SOURCE_NAME, ENTITY_SOURCE_NAME, FEATUR
2
2
  import { RootConfig as RootConfig$1, AXMNotificationEntityService } from '@acorex/modules/notification-management';
3
3
  import * as i1$1 from '@acorex/platform/auth';
4
4
  import { AXPSessionService, AXPAuthModule } from '@acorex/platform/auth';
5
- import { AXPDataGenerator, AXPDexieEntityStorageService, AXP_DATA_SEEDER_TOKEN, AXPEntityStorageService, AXPFileStorageStatus, AXPFileStorageService, AXP_SEARCH_PROVIDER } from '@acorex/platform/common';
5
+ import { AXPDataGenerator, AXPDexieEntityStorageService, AXP_DATA_SEEDER_TOKEN, AXPEntityStorageService, AXPRegionalService, AXPFileStorageStatus, AXPFileStorageService, AXP_SEARCH_PROVIDER } from '@acorex/platform/common';
6
6
  import * as i0 from '@angular/core';
7
7
  import { inject, Injectable, NgModule } from '@angular/core';
8
8
  import { AXPEntityDefinitionRegistryService } from '@acorex/platform/layout/entity';
@@ -12,11 +12,13 @@ import Dexie from 'dexie';
12
12
  import { AXP_WIDGET_DATASOURCE_PROVIDER } from '@acorex/platform/layout/builder';
13
13
  import { convertArrayToDataSource } from '@acorex/components/common';
14
14
  import { RootConfig } from '@acorex/modules/form-template-management';
15
- import { RootConfig as RootConfig$2 } from '@acorex/modules/platform-management';
15
+ import { AXMOrganizationNodeType, RootConfig as RootConfig$2 } from '@acorex/modules/organization-management';
16
+ import { RootConfig as RootConfig$3 } from '@acorex/modules/platform-management';
17
+ import { AXTranslationService } from '@acorex/core/translation';
18
+ import { firstValueFrom } from 'rxjs';
16
19
  import { AXFileService } from '@acorex/core/file';
17
- import { RootConfig as RootConfig$3 } from '@acorex/modules/scheduler-job-management';
18
- import { RootConfig as RootConfig$4 } from '@acorex/modules/text-template-management';
19
- import { AXMOrganizationNodeType, RootConfig as RootConfig$5 } from '@acorex/modules/organization-management';
20
+ import { RootConfig as RootConfig$4 } from '@acorex/modules/scheduler-job-management';
21
+ import { RootConfig as RootConfig$5 } from '@acorex/modules/text-template-management';
20
22
 
21
23
  const APPLICATIONS = Array.from({ length: 5 }).map((_, i) => {
22
24
  const source = ['appOne', 'appTwo', 'appThree', 'myCoolApp', 'awesomeApp', 'superApp'];
@@ -592,6 +594,8 @@ class AXPMockWidgetDataSourceProvider {
592
594
  {
593
595
  name: 'mock.users',
594
596
  title: 'Users',
597
+ valueField: 'id',
598
+ textField: 'title',
595
599
  columns: [
596
600
  {
597
601
  name: 'id',
@@ -871,6 +875,372 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
871
875
  type: Injectable
872
876
  }] });
873
877
 
878
+ const SOFTWARE_COMPANY_ORGANIZATION = {
879
+ id: '1',
880
+ title: 'Tech Innovators Inc.',
881
+ subtitle: 'Software Development Company',
882
+ description: 'A leading software company specializing in SaaS solutions.',
883
+ icon: 'fa-building',
884
+ type: AXMOrganizationNodeType.Company, // Updated type here
885
+ isExpanded: true,
886
+ children: [
887
+ {
888
+ id: '2',
889
+ title: 'United States',
890
+ subtitle: 'Country Headquarters',
891
+ description: 'Main operations in the US.',
892
+ icon: 'fa-flag-usa',
893
+ type: AXMOrganizationNodeType.Country, // Updated type here
894
+ parentId: '1',
895
+ entity: {
896
+ id: 'US',
897
+ source: "Country"
898
+ },
899
+ isExpanded: true,
900
+ children: [
901
+ {
902
+ id: '3',
903
+ title: 'San Francisco Office',
904
+ subtitle: 'Head Office & Development Hub',
905
+ description: 'Main engineering and corporate hub.',
906
+ icon: 'fa-city',
907
+ type: AXMOrganizationNodeType.City, // Updated type here
908
+ parentId: '2',
909
+ isExpanded: true,
910
+ children: [
911
+ {
912
+ id: '4',
913
+ title: 'Engineering Division',
914
+ subtitle: 'Software Development',
915
+ description: 'Responsible for product development.',
916
+ icon: 'fa-code',
917
+ type: AXMOrganizationNodeType.Division, // Updated type here
918
+ parentId: '3',
919
+ isExpanded: true,
920
+ children: [
921
+ {
922
+ id: '5',
923
+ title: 'Backend Team',
924
+ subtitle: 'Handles backend systems',
925
+ description: 'Develops APIs and database architecture.',
926
+ icon: 'fa-database',
927
+ type: AXMOrganizationNodeType.Department, // Updated type here
928
+ parentId: '4',
929
+ children: [
930
+ {
931
+ id: '6',
932
+ title: 'Backend Developer',
933
+ subtitle: 'Software Engineer',
934
+ description: 'Builds and maintains backend services.',
935
+ icon: 'fa-server',
936
+ type: AXMOrganizationNodeType.Position, // Updated type here
937
+ parentId: '5',
938
+ children: [
939
+ { id: '6-1', title: 'Jane Smith', subtitle: 'Backend Developer', description: 'Expert in Node.js and database architecture.', icon: 'fa-user', type: AXMOrganizationNodeType.Employee, parentId: '6' },
940
+ { id: '6-2', title: 'Michael Johnson', subtitle: 'Backend Developer', description: 'Specializes in API development and microservices.', icon: 'fa-user', type: AXMOrganizationNodeType.Employee, parentId: '6' }
941
+ ]
942
+ }
943
+ ]
944
+ },
945
+ {
946
+ id: '8',
947
+ title: 'Frontend Team',
948
+ subtitle: 'Handles frontend applications',
949
+ description: 'Develops UI/UX for web and mobile apps.',
950
+ icon: 'fa-paint-brush',
951
+ type: AXMOrganizationNodeType.Department, // Updated type here
952
+ parentId: '4',
953
+ children: [
954
+ {
955
+ id: '9',
956
+ title: 'Frontend Developer',
957
+ subtitle: 'Software Engineer',
958
+ description: 'Works on UI/UX and frontend logic.',
959
+ icon: 'fa-laptop-code',
960
+ type: AXMOrganizationNodeType.Position, // Updated type here
961
+ parentId: '8',
962
+ children: [
963
+ { id: '9-1', title: 'Emma Davis', subtitle: 'Frontend Developer', description: 'Expert in React and modern UI frameworks.', icon: 'fa-user', type: AXMOrganizationNodeType.Employee, parentId: '9' }
964
+ ]
965
+ }
966
+ ]
967
+ }
968
+ ]
969
+ }
970
+ ]
971
+ },
972
+ {
973
+ id: '10',
974
+ title: 'New York Office',
975
+ subtitle: 'East Coast Operations',
976
+ description: 'Handles business development and sales.',
977
+ icon: 'fa-city',
978
+ type: AXMOrganizationNodeType.City, // Updated type here
979
+ parentId: '2',
980
+ isExpanded: true,
981
+ children: [
982
+ {
983
+ id: '12',
984
+ title: 'Sales Division',
985
+ subtitle: 'Business Growth and Partnerships',
986
+ description: 'Responsible for client acquisitions and revenue growth.',
987
+ icon: 'fa-handshake',
988
+ type: AXMOrganizationNodeType.Division, // Updated type here
989
+ parentId: '10',
990
+ children: [
991
+ {
992
+ id: '13',
993
+ title: 'Sales Manager',
994
+ subtitle: 'Leads the sales team',
995
+ description: 'Manages key partnerships and sales strategies.',
996
+ icon: 'fa-chart-line',
997
+ type: AXMOrganizationNodeType.Position, // Updated type here
998
+ parentId: '12',
999
+ children: [
1000
+ { id: '13-1', title: 'Robert Wilson', subtitle: 'Senior Sales Executive', description: 'Focuses on enterprise client relationships.', icon: 'fa-user', type: AXMOrganizationNodeType.Employee, parentId: '13' },
1001
+ { id: '13-2', title: 'Lisa Brown', subtitle: 'Sales Representative', description: 'Handles client negotiations and sales leads.', icon: 'fa-user', type: AXMOrganizationNodeType.Employee, parentId: '13' }
1002
+ ]
1003
+ }
1004
+ ]
1005
+ }
1006
+ ]
1007
+ }
1008
+ ]
1009
+ },
1010
+ {
1011
+ id: '14',
1012
+ title: 'India',
1013
+ subtitle: 'Regional Office',
1014
+ description: 'Call Center & Customer Support Operations.',
1015
+ icon: 'fa-flag',
1016
+ type: AXMOrganizationNodeType.Country, // Updated type here
1017
+ parentId: '1',
1018
+ entity: {
1019
+ id: 'IN',
1020
+ source: "Country"
1021
+ },
1022
+ isExpanded: true,
1023
+ children: [
1024
+ {
1025
+ id: '15',
1026
+ title: 'Bangalore Office',
1027
+ subtitle: 'Support & Call Center Hub',
1028
+ description: 'Handles customer support and service inquiries.',
1029
+ icon: 'fa-phone',
1030
+ type: AXMOrganizationNodeType.City, // Updated type here
1031
+ parentId: '14',
1032
+ isExpanded: true,
1033
+ children: [
1034
+ {
1035
+ id: '16',
1036
+ title: 'Customer Support Division',
1037
+ subtitle: 'Technical Support',
1038
+ description: 'Responsible for customer service and tech support.',
1039
+ icon: 'fa-headset',
1040
+ type: AXMOrganizationNodeType.Division, // Updated type here
1041
+ parentId: '15',
1042
+ children: [
1043
+ {
1044
+ id: '17',
1045
+ title: 'Call Center Representative',
1046
+ subtitle: 'Support Agent',
1047
+ description: 'Answers customer questions and resolves issues.',
1048
+ icon: 'fa-user-headset',
1049
+ type: AXMOrganizationNodeType.Position, // Updated type here
1050
+ parentId: '16',
1051
+ children: [
1052
+ { id: '17-1', title: 'Rahul Sharma', subtitle: 'Call Center Representative', description: 'Provides top-notch customer support.', icon: 'fa-user', type: AXMOrganizationNodeType.Employee, parentId: '17' },
1053
+ { id: '17-2', title: 'Priya Kapoor', subtitle: 'Call Center Representative', description: 'Handles inquiries and customer escalations.', icon: 'fa-user', type: AXMOrganizationNodeType.Employee, parentId: '17' },
1054
+ { id: '17-3', title: 'Amit Verma', subtitle: 'Call Center Supervisor', description: 'Manages a team of call center representatives.', icon: 'fa-user-tie', type: AXMOrganizationNodeType.Employee, parentId: '17' },
1055
+ { id: '17-4', title: 'Neha Mehta', subtitle: 'Quality Analyst', description: 'Monitors and evaluates customer interactions.', icon: 'fa-user-check', type: AXMOrganizationNodeType.Employee, parentId: '17' },
1056
+ { id: '17-5', title: 'Vikram Singh', subtitle: 'Technical Support Specialist', description: 'Provides assistance with technical issues.', icon: 'fa-user-cog', type: AXMOrganizationNodeType.Employee, parentId: '17' }
1057
+ ]
1058
+ }
1059
+ ]
1060
+ }
1061
+ ]
1062
+ }
1063
+ ]
1064
+ }
1065
+ ]
1066
+ };
1067
+
1068
+ class AXCOrganizationManagementDataSeeder {
1069
+ constructor() {
1070
+ this.storageService = inject(AXPDexieEntityStorageService);
1071
+ }
1072
+ async seed() {
1073
+ const uuid = AXPDataGenerator.uuid;
1074
+ // Departments
1075
+ await this.storageService.initial(RootConfig$2.entities.department.source, [
1076
+ {
1077
+ id: uuid(),
1078
+ title: 'Engineering Division',
1079
+ description: 'A department focused on engineering projects and development.',
1080
+ },
1081
+ {
1082
+ id: uuid(),
1083
+ title: 'Sales Division',
1084
+ description: 'A department dedicated to driving sales and customer engagement.',
1085
+ },
1086
+ {
1087
+ id: uuid(),
1088
+ title: 'Customer Support Division',
1089
+ description: 'A department committed to delivering excellent customer service.',
1090
+ },
1091
+ ]);
1092
+ // Divisions
1093
+ await this.storageService.initial(RootConfig$2.entities.division.source, [
1094
+ {
1095
+ id: uuid(),
1096
+ title: 'Software Development',
1097
+ description: 'A division within the Engineering Department responsible for developing software solutions.',
1098
+ },
1099
+ {
1100
+ id: uuid(),
1101
+ title: 'Business Development',
1102
+ description: 'A division within the Sales Department focused on expanding business opportunities.',
1103
+ },
1104
+ {
1105
+ id: uuid(),
1106
+ title: 'Technical Support',
1107
+ description: 'A division within the Customer Support Department that handles technical assistance.',
1108
+ },
1109
+ ]);
1110
+ // Branches
1111
+ await this.storageService.initial(RootConfig$2.entities.branch.source, [
1112
+ {
1113
+ id: uuid(),
1114
+ title: 'San Francisco Office',
1115
+ description: 'A branch office located in San Francisco, serving as a hub for West Coast operations.',
1116
+ },
1117
+ {
1118
+ id: uuid(),
1119
+ title: 'New York Office',
1120
+ description: 'A branch office located in New York, catering to our East Coast clients.',
1121
+ },
1122
+ {
1123
+ id: uuid(),
1124
+ title: 'Bangalore Office',
1125
+ description: 'A branch office in Bangalore supporting our international operations.',
1126
+ },
1127
+ ]);
1128
+ // Positions
1129
+ await this.storageService.initial(RootConfig$2.entities.position.source, [
1130
+ {
1131
+ id: uuid(),
1132
+ title: 'Backend Developer',
1133
+ description: 'A role responsible for server-side logic and integration with databases.',
1134
+ },
1135
+ {
1136
+ id: uuid(),
1137
+ title: 'Frontend Developer',
1138
+ description: 'A role focused on crafting engaging user interfaces and client-side features.',
1139
+ },
1140
+ {
1141
+ id: uuid(),
1142
+ title: 'Sales Manager',
1143
+ description: 'A leadership position overseeing sales strategies and team performance.',
1144
+ },
1145
+ {
1146
+ id: uuid(),
1147
+ title: 'Sales Representative',
1148
+ description: 'A role tasked with building client relationships and closing sales deals.',
1149
+ },
1150
+ {
1151
+ id: uuid(),
1152
+ title: 'Call Center Representative',
1153
+ description: 'A position dedicated to managing inbound and outbound customer calls.',
1154
+ },
1155
+ {
1156
+ id: uuid(),
1157
+ title: 'Technical Support Specialist',
1158
+ description: 'A role providing specialized technical assistance and problem resolution.',
1159
+ },
1160
+ ]);
1161
+ // Employment Types
1162
+ await this.storageService.initial(RootConfig$2.entities.employmentType.source, [
1163
+ {
1164
+ id: uuid(),
1165
+ title: 'Full-Time',
1166
+ description: 'An employment category for full-time engagements.',
1167
+ },
1168
+ {
1169
+ id: uuid(),
1170
+ title: 'Part-Time',
1171
+ description: 'An employment category for part-time work schedules.',
1172
+ },
1173
+ {
1174
+ id: uuid(),
1175
+ title: 'Contract',
1176
+ description: 'An employment type based on fixed-term contractual agreements.',
1177
+ },
1178
+ {
1179
+ id: uuid(),
1180
+ title: 'Internship',
1181
+ description: 'An employment type designed for internship programs.',
1182
+ },
1183
+ {
1184
+ id: uuid(),
1185
+ title: 'Freelance',
1186
+ description: 'An employment type for freelance and project-based work.',
1187
+ },
1188
+ ]);
1189
+ // Employees
1190
+ await this.storageService.initial(RootConfig$2.entities.employee.source, [
1191
+ { id: uuid(), firstname: 'Jane', lastname: 'Smith', birthDate: new Date('1985-02-15'), employeeID: 'EMP002' },
1192
+ { id: uuid(), firstname: 'Michael', lastname: 'Johnson', birthDate: new Date('1978-03-22'), employeeID: 'EMP003' },
1193
+ { id: uuid(), firstname: 'Emma', lastname: 'Davis', birthDate: new Date('1992-04-10'), employeeID: 'EMP004' },
1194
+ { id: uuid(), firstname: 'Robert', lastname: 'Wilson', birthDate: new Date('1980-09-18'), employeeID: 'EMP009' },
1195
+ { id: uuid(), firstname: 'Lisa', lastname: 'Brown', birthDate: new Date('1987-10-29'), employeeID: 'EMP010' },
1196
+ { id: uuid(), firstname: 'Rahul', lastname: 'Sharma', birthDate: new Date('1982-07-14'), employeeID: 'EMP007' },
1197
+ { id: uuid(), firstname: 'Priya', lastname: 'Kapoor', birthDate: new Date('1982-07-14'), employeeID: 'EMP007' },
1198
+ { id: uuid(), firstname: 'Amit', lastname: 'Verma', birthDate: new Date('1982-07-14'), employeeID: 'EMP007' },
1199
+ { id: uuid(), firstname: 'Vikram', lastname: 'Singh', birthDate: new Date('1982-07-14'), employeeID: 'EMP007' },
1200
+ ]);
1201
+ // Store Chart Data
1202
+ await this.storageService.initial(RootConfig$2.entities.chart.source, [
1203
+ {
1204
+ id: uuid(),
1205
+ version: '1.0',
1206
+ data: SOFTWARE_COMPANY_ORGANIZATION,
1207
+ },
1208
+ ]);
1209
+ }
1210
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXCOrganizationManagementDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1211
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXCOrganizationManagementDataSeeder }); }
1212
+ }
1213
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXCOrganizationManagementDataSeeder, decorators: [{
1214
+ type: Injectable
1215
+ }] });
1216
+
1217
+ class AXCFOrganizationManagementMockModule {
1218
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXCFOrganizationManagementMockModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1219
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.3", ngImport: i0, type: AXCFOrganizationManagementMockModule }); }
1220
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXCFOrganizationManagementMockModule, providers: [
1221
+ {
1222
+ provide: AXP_DATA_SEEDER_TOKEN,
1223
+ useClass: AXCOrganizationManagementDataSeeder,
1224
+ multi: true,
1225
+ },
1226
+ ] }); }
1227
+ }
1228
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXCFOrganizationManagementMockModule, decorators: [{
1229
+ type: NgModule,
1230
+ args: [{
1231
+ imports: [],
1232
+ exports: [],
1233
+ declarations: [],
1234
+ providers: [
1235
+ {
1236
+ provide: AXP_DATA_SEEDER_TOKEN,
1237
+ useClass: AXCOrganizationManagementDataSeeder,
1238
+ multi: true,
1239
+ },
1240
+ ],
1241
+ }]
1242
+ }] });
1243
+
874
1244
  const titles = [
875
1245
  'Term and Condition Bank App',
876
1246
  'Term and Condition Social App',
@@ -955,7 +1325,7 @@ class AXCAppTermDataSeeder {
955
1325
  this.storageService = inject(AXPDexieEntityStorageService);
956
1326
  }
957
1327
  async seed() {
958
- await this.storageService.initial(`${RootConfig$2.module.name}.${RootConfig$2.entities.appTerm.name}`, APP_TERMS);
1328
+ await this.storageService.initial(`${RootConfig$3.module.name}.${RootConfig$3.entities.appTerm.name}`, APP_TERMS);
959
1329
  }
960
1330
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXCAppTermDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
961
1331
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXCAppTermDataSeeder }); }
@@ -990,7 +1360,7 @@ class AXCAppVersionDataSeeder {
990
1360
  this.storageService = inject(AXPDexieEntityStorageService);
991
1361
  }
992
1362
  async seed() {
993
- await this.storageService.initial(`${RootConfig$2.module.name}.${RootConfig$2.entities.appVersion.name}`, APP_VERSIONS);
1363
+ await this.storageService.initial(`${RootConfig$3.module.name}.${RootConfig$3.entities.appVersion.name}`, APP_VERSIONS);
994
1364
  }
995
1365
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXCAppVersionDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
996
1366
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXCAppVersionDataSeeder }); }
@@ -1020,15 +1390,109 @@ class AXCGlobalVariablesDataSeeder {
1020
1390
  constructor() {
1021
1391
  this.storageService = inject(AXPDexieEntityStorageService);
1022
1392
  }
1023
- async seed() {
1024
- await this.storageService.initial(`${RootConfig$2.module.name}.${RootConfig$2.entities.globalVariable.name}`, GLOBAL_VARIABLES);
1393
+ async seed() {
1394
+ await this.storageService.initial(`${RootConfig$3.module.name}.${RootConfig$3.entities.globalVariable.name}`, GLOBAL_VARIABLES);
1395
+ }
1396
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXCGlobalVariablesDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1397
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXCGlobalVariablesDataSeeder }); }
1398
+ }
1399
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXCGlobalVariablesDataSeeder, decorators: [{
1400
+ type: Injectable
1401
+ }] });
1402
+
1403
+ class AXCRegionalServiceImpl extends AXPRegionalService {
1404
+ constructor() {
1405
+ super(...arguments);
1406
+ this.languageService = inject(AXTranslationService);
1407
+ }
1408
+ async getCountries() {
1409
+ const lang = await firstValueFrom(this.languageService.langChanges$);
1410
+ const { countries } = await import('./acorex-connectivity-mock-countries-DHRrtbwM.mjs');
1411
+ return countries.map((country) => {
1412
+ if (lang == country.regional) {
1413
+ return {
1414
+ ...country,
1415
+ title: country.native,
1416
+ };
1417
+ }
1418
+ else {
1419
+ return country;
1420
+ }
1421
+ });
1422
+ }
1423
+ async getProvinces(countryCode) {
1424
+ const lang = await firstValueFrom(this.languageService.langChanges$);
1425
+ const country = await this.getCountries();
1426
+ const data = country
1427
+ .filter((c) => !countryCode || c.code === countryCode)
1428
+ .flatMap((c) => c.provinces?.map((province) => {
1429
+ if (lang == c.regional) {
1430
+ return {
1431
+ ...province,
1432
+ title: province.native,
1433
+ };
1434
+ }
1435
+ else {
1436
+ return province;
1437
+ }
1438
+ }) ?? []);
1439
+ return data;
1440
+ }
1441
+ async getCities(filter = {}) {
1442
+ const { countryId, provinceId } = filter;
1443
+ const countries = await this.getCountries();
1444
+ const lang = await firstValueFrom(this.languageService.langChanges$);
1445
+ const filteredCountries = countryId ? countries.filter((c) => c.code === countryId) : countries;
1446
+ const provinces = filteredCountries.flatMap((c) => c.provinces ?? []);
1447
+ const filteredProvinces = provinceId ? provinces.filter((p) => p.code === provinceId) : provinces;
1448
+ filteredProvinces.forEach((province) => {
1449
+ province.cities = province.cities?.map((city) => {
1450
+ const country = countries.find((c) => c.provinces?.some((p) => p.code === province.code));
1451
+ if (country && lang == country.regional) {
1452
+ return {
1453
+ ...city,
1454
+ title: city.native,
1455
+ };
1456
+ }
1457
+ else {
1458
+ return city;
1459
+ }
1460
+ });
1461
+ });
1462
+ return filteredProvinces.flatMap((p) => p.cities ?? []);
1463
+ }
1464
+ async getCurrencies() {
1465
+ const { currencies } = await import('./acorex-connectivity-mock-currencies-B-x3Mxql.mjs');
1466
+ return currencies;
1467
+ }
1468
+ async getRegionalFormats() {
1469
+ const { regionalFormats } = await import('./acorex-connectivity-mock-regional-formats-BDoMreUD.mjs');
1470
+ return regionalFormats;
1471
+ }
1472
+ async getLanguages() {
1473
+ return (await this.getRegionalFormats()).map((c) => ({ code: c.locale, title: c.title }));
1474
+ }
1475
+ async getAvailableLanguages() {
1476
+ return (await this.getLanguages()).filter((c) => ['fa-IR', 'en-US'].some((e) => e == c.code));
1477
+ }
1478
+ async getTimeZones() {
1479
+ const { timeZones } = await import('./acorex-connectivity-mock-timezones-D-kAWkRu.mjs');
1480
+ return timeZones;
1481
+ }
1482
+ async getBrowserTimeZoneCode() {
1483
+ const { timeZones } = await import('./acorex-connectivity-mock-timezones-D-kAWkRu.mjs');
1484
+ const now = new Date();
1485
+ // Calculate offset in hours and minutes
1486
+ const offsetMinutes = now.getTimezoneOffset();
1487
+ const offsetHours = Math.floor(-offsetMinutes / 60);
1488
+ const offsetRemainder = Math.abs(offsetMinutes % 60);
1489
+ // Format the offset properly
1490
+ const formattedOffset = `UTC${offsetHours >= 0 ? '+' : ''}${offsetHours}${offsetRemainder ? `:${offsetRemainder.toString().padStart(2, '0')}` : ''}`;
1491
+ // Find matching time zone
1492
+ const matchedZone = timeZones.find((zone) => zone.code === formattedOffset);
1493
+ return matchedZone ? matchedZone.code : 'UTC';
1025
1494
  }
1026
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXCGlobalVariablesDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1027
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXCGlobalVariablesDataSeeder }); }
1028
1495
  }
1029
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXCGlobalVariablesDataSeeder, decorators: [{
1030
- type: Injectable
1031
- }] });
1032
1496
 
1033
1497
  class FileStorageDatabase extends Dexie {
1034
1498
  constructor() {
@@ -1178,7 +1642,7 @@ class AXCSchedulerJobDataSeeder {
1178
1642
  this.storageService = inject(AXPDexieEntityStorageService);
1179
1643
  }
1180
1644
  async seed() {
1181
- await this.storageService.initial(`${RootConfig$3.module.name}.${RootConfig$3.entities.schedulerJob.name}`, SCHEDULER_JOB);
1645
+ await this.storageService.initial(`${RootConfig$4.module.name}.${RootConfig$4.entities.schedulerJob.name}`, SCHEDULER_JOB);
1182
1646
  }
1183
1647
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXCSchedulerJobDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1184
1648
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXCSchedulerJobDataSeeder }); }
@@ -1309,7 +1773,7 @@ class AXCTextTemplateCategoryDataSeeder {
1309
1773
  this.storageService = inject(AXPDexieEntityStorageService);
1310
1774
  }
1311
1775
  async seed() {
1312
- await this.storageService.initial(`${RootConfig$4.module.name}.${RootConfig$4.entities.category.name}`, TEXT_TEMPLATE_CATEGORY);
1776
+ await this.storageService.initial(`${RootConfig$5.module.name}.${RootConfig$5.entities.category.name}`, TEXT_TEMPLATE_CATEGORY);
1313
1777
  }
1314
1778
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXCTextTemplateCategoryDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1315
1779
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXCTextTemplateCategoryDataSeeder }); }
@@ -1323,7 +1787,7 @@ class AXCTextTemplateDataSeeder {
1323
1787
  this.storageService = inject(AXPDexieEntityStorageService);
1324
1788
  }
1325
1789
  async seed() {
1326
- await this.storageService.initial(`${RootConfig$4.module.name}.${RootConfig$4.entities.template.name}`, TEXT_TEMPLATES);
1790
+ await this.storageService.initial(`${RootConfig$5.module.name}.${RootConfig$5.entities.template.name}`, TEXT_TEMPLATES);
1327
1791
  }
1328
1792
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXCTextTemplateDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1329
1793
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXCTextTemplateDataSeeder }); }
@@ -1332,284 +1796,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
1332
1796
  type: Injectable
1333
1797
  }] });
1334
1798
 
1335
- const SOFTWARE_COMPANY_ORGANIZATION = {
1336
- id: '1',
1337
- title: 'Tech Innovators Inc.',
1338
- subtitle: 'Software Development Company',
1339
- description: 'A leading software company specializing in SaaS solutions.',
1340
- icon: 'fa-building',
1341
- type: AXMOrganizationNodeType.Company, // Updated type here
1342
- isExpanded: true,
1343
- children: [
1344
- {
1345
- id: '2',
1346
- title: 'United States',
1347
- subtitle: 'Country Headquarters',
1348
- description: 'Main operations in the US.',
1349
- icon: 'fa-flag-usa',
1350
- type: AXMOrganizationNodeType.Country, // Updated type here
1351
- parentId: '1',
1352
- isExpanded: true,
1353
- children: [
1354
- {
1355
- id: '3',
1356
- title: 'San Francisco Office',
1357
- subtitle: 'Head Office & Development Hub',
1358
- description: 'Main engineering and corporate hub.',
1359
- icon: 'fa-city',
1360
- type: AXMOrganizationNodeType.City, // Updated type here
1361
- parentId: '2',
1362
- isExpanded: true,
1363
- children: [
1364
- {
1365
- id: '4',
1366
- title: 'Engineering Division',
1367
- subtitle: 'Software Development',
1368
- description: 'Responsible for product development.',
1369
- icon: 'fa-code',
1370
- type: AXMOrganizationNodeType.Division, // Updated type here
1371
- parentId: '3',
1372
- isExpanded: true,
1373
- children: [
1374
- {
1375
- id: '5',
1376
- title: 'Backend Team',
1377
- subtitle: 'Handles backend systems',
1378
- description: 'Develops APIs and database architecture.',
1379
- icon: 'fa-database',
1380
- type: AXMOrganizationNodeType.Department, // Updated type here
1381
- parentId: '4',
1382
- children: [
1383
- {
1384
- id: '6',
1385
- title: 'Backend Developer',
1386
- subtitle: 'Software Engineer',
1387
- description: 'Builds and maintains backend services.',
1388
- icon: 'fa-server',
1389
- type: AXMOrganizationNodeType.Position, // Updated type here
1390
- parentId: '5',
1391
- children: [
1392
- { id: '6-1', title: 'Jane Smith', subtitle: 'Backend Developer', description: 'Expert in Node.js and database architecture.', icon: 'fa-user', type: AXMOrganizationNodeType.Employee, parentId: '6' },
1393
- { id: '6-2', title: 'Michael Johnson', subtitle: 'Backend Developer', description: 'Specializes in API development and microservices.', icon: 'fa-user', type: AXMOrganizationNodeType.Employee, parentId: '6' }
1394
- ]
1395
- }
1396
- ]
1397
- },
1398
- {
1399
- id: '8',
1400
- title: 'Frontend Team',
1401
- subtitle: 'Handles frontend applications',
1402
- description: 'Develops UI/UX for web and mobile apps.',
1403
- icon: 'fa-paint-brush',
1404
- type: AXMOrganizationNodeType.Department, // Updated type here
1405
- parentId: '4',
1406
- children: [
1407
- {
1408
- id: '9',
1409
- title: 'Frontend Developer',
1410
- subtitle: 'Software Engineer',
1411
- description: 'Works on UI/UX and frontend logic.',
1412
- icon: 'fa-laptop-code',
1413
- type: AXMOrganizationNodeType.Position, // Updated type here
1414
- parentId: '8',
1415
- children: [
1416
- { id: '9-1', title: 'Emma Davis', subtitle: 'Frontend Developer', description: 'Expert in React and modern UI frameworks.', icon: 'fa-user', type: AXMOrganizationNodeType.Employee, parentId: '9' }
1417
- ]
1418
- }
1419
- ]
1420
- }
1421
- ]
1422
- }
1423
- ]
1424
- },
1425
- {
1426
- id: '10',
1427
- title: 'New York Office',
1428
- subtitle: 'East Coast Operations',
1429
- description: 'Handles business development and sales.',
1430
- icon: 'fa-city',
1431
- type: AXMOrganizationNodeType.City, // Updated type here
1432
- parentId: '2',
1433
- isExpanded: true,
1434
- children: [
1435
- {
1436
- id: '12',
1437
- title: 'Sales Division',
1438
- subtitle: 'Business Growth and Partnerships',
1439
- description: 'Responsible for client acquisitions and revenue growth.',
1440
- icon: 'fa-handshake',
1441
- type: AXMOrganizationNodeType.Division, // Updated type here
1442
- parentId: '10',
1443
- children: [
1444
- {
1445
- id: '13',
1446
- title: 'Sales Manager',
1447
- subtitle: 'Leads the sales team',
1448
- description: 'Manages key partnerships and sales strategies.',
1449
- icon: 'fa-chart-line',
1450
- type: AXMOrganizationNodeType.Position, // Updated type here
1451
- parentId: '12',
1452
- children: [
1453
- { id: '13-1', title: 'Robert Wilson', subtitle: 'Senior Sales Executive', description: 'Focuses on enterprise client relationships.', icon: 'fa-user', type: AXMOrganizationNodeType.Employee, parentId: '13' },
1454
- { id: '13-2', title: 'Lisa Brown', subtitle: 'Sales Representative', description: 'Handles client negotiations and sales leads.', icon: 'fa-user', type: AXMOrganizationNodeType.Employee, parentId: '13' }
1455
- ]
1456
- }
1457
- ]
1458
- }
1459
- ]
1460
- }
1461
- ]
1462
- },
1463
- {
1464
- id: '14',
1465
- title: 'India',
1466
- subtitle: 'Regional Office',
1467
- description: 'Call Center & Customer Support Operations.',
1468
- icon: 'fa-flag',
1469
- type: AXMOrganizationNodeType.Country, // Updated type here
1470
- parentId: '1',
1471
- isExpanded: true,
1472
- children: [
1473
- {
1474
- id: '15',
1475
- title: 'Bangalore Office',
1476
- subtitle: 'Support & Call Center Hub',
1477
- description: 'Handles customer support and service inquiries.',
1478
- icon: 'fa-phone',
1479
- type: AXMOrganizationNodeType.City, // Updated type here
1480
- parentId: '14',
1481
- isExpanded: true,
1482
- children: [
1483
- {
1484
- id: '16',
1485
- title: 'Customer Support Division',
1486
- subtitle: 'Technical Support',
1487
- description: 'Responsible for customer service and tech support.',
1488
- icon: 'fa-headset',
1489
- type: AXMOrganizationNodeType.Division, // Updated type here
1490
- parentId: '15',
1491
- children: [
1492
- {
1493
- id: '17',
1494
- title: 'Call Center Representative',
1495
- subtitle: 'Support Agent',
1496
- description: 'Answers customer questions and resolves issues.',
1497
- icon: 'fa-user-headset',
1498
- type: AXMOrganizationNodeType.Position, // Updated type here
1499
- parentId: '16',
1500
- children: [
1501
- { id: '17-1', title: 'Rahul Sharma', subtitle: 'Call Center Representative', description: 'Provides top-notch customer support.', icon: 'fa-user', type: AXMOrganizationNodeType.Employee, parentId: '17' },
1502
- { id: '17-2', title: 'Priya Kapoor', subtitle: 'Call Center Representative', description: 'Handles inquiries and customer escalations.', icon: 'fa-user', type: AXMOrganizationNodeType.Employee, parentId: '17' },
1503
- { id: '17-3', title: 'Amit Verma', subtitle: 'Call Center Supervisor', description: 'Manages a team of call center representatives.', icon: 'fa-user-tie', type: AXMOrganizationNodeType.Employee, parentId: '17' },
1504
- { id: '17-4', title: 'Neha Mehta', subtitle: 'Quality Analyst', description: 'Monitors and evaluates customer interactions.', icon: 'fa-user-check', type: AXMOrganizationNodeType.Employee, parentId: '17' },
1505
- { id: '17-5', title: 'Vikram Singh', subtitle: 'Technical Support Specialist', description: 'Provides assistance with technical issues.', icon: 'fa-user-cog', type: AXMOrganizationNodeType.Employee, parentId: '17' }
1506
- ]
1507
- }
1508
- ]
1509
- }
1510
- ]
1511
- }
1512
- ]
1513
- }
1514
- ]
1515
- };
1516
-
1517
- class AXCOrganizationManagementDataSeeder {
1518
- constructor() {
1519
- this.storageService = inject(AXPDexieEntityStorageService);
1520
- }
1521
- async seed() {
1522
- const uuid = AXPDataGenerator.uuid;
1523
- // Departments
1524
- await this.storageService.initial(RootConfig$5.entities.department.source, [
1525
- { id: uuid(), title: 'Engineering Division' }, // Corresponding to "Engineering Division"
1526
- { id: uuid(), title: 'Sales Division' }, // Corresponding to "Sales Division"
1527
- { id: uuid(), title: 'Customer Support Division' }, // Corresponding to "Customer Support Division"
1528
- ]);
1529
- // Divisions
1530
- await this.storageService.initial(RootConfig$5.entities.division.source, [
1531
- { id: uuid(), title: 'Software Development' }, // Corresponding to "Engineering Division"
1532
- { id: uuid(), title: 'Business Development' }, // Corresponding to "Sales Division"
1533
- { id: uuid(), title: 'Technical Support' }, // Corresponding to "Customer Support Division"
1534
- ]);
1535
- // Branches
1536
- await this.storageService.initial(RootConfig$5.entities.branch.source, [
1537
- { id: uuid(), title: 'San Francisco Office' }, // Corresponding to "San Francisco Office"
1538
- { id: uuid(), title: 'New York Office' }, // Corresponding to "New York Office"
1539
- { id: uuid(), title: 'Bangalore Office' }, // Corresponding to "Bangalore Office"
1540
- ]);
1541
- // Positions
1542
- await this.storageService.initial(RootConfig$5.entities.position.source, [
1543
- { id: uuid(), title: 'Backend Developer' }, // Corresponding to "Backend Developer"
1544
- { id: uuid(), title: 'Frontend Developer' }, // Corresponding to "Frontend Developer"
1545
- { id: uuid(), title: 'Sales Manager' }, // Corresponding to "Sales Manager"
1546
- { id: uuid(), title: 'Sales Representative' }, // Corresponding to "Sales Representative"
1547
- { id: uuid(), title: 'Call Center Representative' }, // Corresponding to "Call Center Representative"
1548
- { id: uuid(), title: 'Technical Support Specialist' }, // Corresponding to "Technical Support Specialist"
1549
- ]);
1550
- // Employment Types
1551
- await this.storageService.initial(RootConfig$5.entities.employmentType.source, [
1552
- { id: uuid(), title: 'Full-Time' },
1553
- { id: uuid(), title: 'Part-Time' },
1554
- { id: uuid(), title: 'Contract' },
1555
- { id: uuid(), title: 'Internship' },
1556
- { id: uuid(), title: 'Freelance' },
1557
- ]);
1558
- // Employees
1559
- const employees = await this.storageService.initial(RootConfig$5.entities.employee.source, [
1560
- { id: uuid(), firstname: 'Jane', lastname: 'Smith', birthDate: new Date('1985-02-15'), employeeID: 'EMP002' }, // Corresponding to "Jane Smith"
1561
- { id: uuid(), firstname: 'Michael', lastname: 'Johnson', birthDate: new Date('1978-03-22'), employeeID: 'EMP003' }, // Corresponding to "Michael Johnson"
1562
- { id: uuid(), firstname: 'Emma', lastname: 'Davis', birthDate: new Date('1992-04-10'), employeeID: 'EMP004' }, // Corresponding to "Emma Davis"
1563
- { id: uuid(), firstname: 'Robert', lastname: 'Wilson', birthDate: new Date('1980-09-18'), employeeID: 'EMP009' }, // Corresponding to "Robert Wilson"
1564
- { id: uuid(), firstname: 'Lisa', lastname: 'Brown', birthDate: new Date('1987-10-29'), employeeID: 'EMP010' }, // Corresponding to "Lisa Brown"
1565
- { id: uuid(), firstname: 'Rahul', lastname: 'Sharma', birthDate: new Date('1982-07-14'), employeeID: 'EMP007' }, // Corresponding to "Rahul Sharma"
1566
- { id: uuid(), firstname: 'Priya', lastname: 'Kapoor', birthDate: new Date('1982-07-14'), employeeID: 'EMP007' }, // Corresponding to "Priya Kapoor"
1567
- { id: uuid(), firstname: 'Amit', lastname: 'Verma', birthDate: new Date('1982-07-14'), employeeID: 'EMP007' }, // Corresponding to "Amit Verma"
1568
- { id: uuid(), firstname: 'Vikram', lastname: 'Singh', birthDate: new Date('1982-07-14'), employeeID: 'EMP007' }, // Corresponding to "Vikram Singh"
1569
- ]);
1570
- // Store Chart Data
1571
- await this.storageService.initial(RootConfig$5.entities.chart.source, [
1572
- {
1573
- id: uuid(),
1574
- version: '1.0',
1575
- data: SOFTWARE_COMPANY_ORGANIZATION,
1576
- },
1577
- ]);
1578
- }
1579
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXCOrganizationManagementDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1580
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXCOrganizationManagementDataSeeder }); }
1581
- }
1582
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXCOrganizationManagementDataSeeder, decorators: [{
1583
- type: Injectable
1584
- }] });
1585
-
1586
- class AXCFOrganizationManagementMockModule {
1587
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXCFOrganizationManagementMockModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1588
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.3", ngImport: i0, type: AXCFOrganizationManagementMockModule }); }
1589
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXCFOrganizationManagementMockModule, providers: [
1590
- {
1591
- provide: AXP_DATA_SEEDER_TOKEN,
1592
- useClass: AXCOrganizationManagementDataSeeder,
1593
- multi: true,
1594
- },
1595
- ] }); }
1596
- }
1597
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXCFOrganizationManagementMockModule, decorators: [{
1598
- type: NgModule,
1599
- args: [{
1600
- imports: [],
1601
- exports: [],
1602
- declarations: [],
1603
- providers: [
1604
- {
1605
- provide: AXP_DATA_SEEDER_TOKEN,
1606
- useClass: AXCOrganizationManagementDataSeeder,
1607
- multi: true,
1608
- },
1609
- ],
1610
- }]
1611
- }] });
1612
-
1613
1799
  class AXCMockModule {
1614
1800
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXCMockModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1615
1801
  static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.3", ngImport: i0, type: AXCMockModule, imports: [i1$1.AXPAuthModule, AXCFormTemplateManagementMockModule,
@@ -1678,6 +1864,10 @@ class AXCMockModule {
1678
1864
  provide: AXPFileStorageService,
1679
1865
  useClass: AXCFileStorageService,
1680
1866
  },
1867
+ {
1868
+ provide: AXPRegionalService,
1869
+ useClass: AXCRegionalServiceImpl,
1870
+ },
1681
1871
  {
1682
1872
  provide: AXP_SEARCH_PROVIDER,
1683
1873
  useClass: EntitySearchProvider,
@@ -1766,6 +1956,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
1766
1956
  provide: AXPFileStorageService,
1767
1957
  useClass: AXCFileStorageService,
1768
1958
  },
1959
+ {
1960
+ provide: AXPRegionalService,
1961
+ useClass: AXCRegionalServiceImpl,
1962
+ },
1769
1963
  {
1770
1964
  provide: AXP_SEARCH_PROVIDER,
1771
1965
  useClass: EntitySearchProvider,