@acorex/connectivity 19.2.8 → 19.2.10

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 }); }
@@ -1021,7 +1391,7 @@ class AXCGlobalVariablesDataSeeder {
1021
1391
  this.storageService = inject(AXPDexieEntityStorageService);
1022
1392
  }
1023
1393
  async seed() {
1024
- await this.storageService.initial(`${RootConfig$2.module.name}.${RootConfig$2.entities.globalVariable.name}`, GLOBAL_VARIABLES);
1394
+ await this.storageService.initial(`${RootConfig$3.module.name}.${RootConfig$3.entities.globalVariable.name}`, GLOBAL_VARIABLES);
1025
1395
  }
1026
1396
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXCGlobalVariablesDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1027
1397
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXCGlobalVariablesDataSeeder }); }
@@ -1030,6 +1400,100 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
1030
1400
  type: Injectable
1031
1401
  }] });
1032
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';
1494
+ }
1495
+ }
1496
+
1033
1497
  class FileStorageDatabase extends Dexie {
1034
1498
  constructor() {
1035
1499
  super('FileStorageDatabase');
@@ -1141,553 +1605,195 @@ class AXCFileStorageService {
1141
1605
  }
1142
1606
  // Semi-background cleanup job
1143
1607
  constructor() {
1144
- this.fileService = inject(AXFileService);
1145
- setInterval(() => {
1146
- this.cleanupMarkedFiles(5 * 60 * 1000) // Grace period: 5 minutes in milliseconds
1147
- .catch((error) => console.error('Error during cleanup:', error));
1148
- this.cleanupTemporaryFiles() // Ensure temporary files are cleaned
1149
- .catch((error) => console.error('Error during cleanup:', error));
1150
- }, 5 * 60 * 1000); // Runs every 5 minutes
1151
- }
1152
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXCFileStorageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1153
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXCFileStorageService }); }
1154
- }
1155
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXCFileStorageService, decorators: [{
1156
- type: Injectable
1157
- }], ctorParameters: () => [] });
1158
-
1159
- const SCHEDULER_JOB = [
1160
- {
1161
- id: AXPDataGenerator.uuid(),
1162
- name: 'backup',
1163
- title: 'Backup Data',
1164
- process: 'backup',
1165
- trigger: '00*1*?*',
1166
- },
1167
- {
1168
- id: AXPDataGenerator.uuid(),
1169
- name: 'cancelOrder',
1170
- title: 'Auto Cancel Ecommerce Orders',
1171
- process: 'cancelOrder',
1172
- trigger: '0*1/2?***',
1173
- },
1174
- ];
1175
-
1176
- class AXCSchedulerJobDataSeeder {
1177
- constructor() {
1178
- this.storageService = inject(AXPDexieEntityStorageService);
1179
- }
1180
- async seed() {
1181
- await this.storageService.initial(`${RootConfig$3.module.name}.${RootConfig$3.entities.schedulerJob.name}`, SCHEDULER_JOB);
1182
- }
1183
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXCSchedulerJobDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1184
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXCSchedulerJobDataSeeder }); }
1185
- }
1186
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXCSchedulerJobDataSeeder, decorators: [{
1187
- type: Injectable
1188
- }] });
1189
-
1190
- const TEXT_TEMPLATE_CATEGORY = [
1191
- {
1192
- id: AXPDataGenerator.uuid(),
1193
- name: 'security',
1194
- title: 'Security',
1195
- },
1196
- {
1197
- id: AXPDataGenerator.uuid(),
1198
- name: 'marketing',
1199
- title: 'Marketing',
1200
- },
1201
- ];
1202
- const TEXT_TEMPLATES = [
1203
- {
1204
- id: AXPDataGenerator.uuid(),
1205
- name: 'RestPassword',
1206
- title: 'Rest Password',
1207
- content: `
1208
- <tr>
1209
- <td>
1210
- <p>Hi {{user_name}},</p>
1211
- <p>We received a request to reset your password for your account. If you didn’t make this request, you can ignore this email. Otherwise, you can reset your password using the link below:</p>
1212
- <p style="text-align: center; margin: 20px 0;">
1213
- <a href="{{Reset Password Link}}" style="background-color: #007bff; color: #ffffff; padding: 10px 20px; text-decoration: none; border-radius: 5px;">Reset Password</a>
1214
- </p>
1215
- <p style="font-size: 12px; color: #666666;">*This link will expire in {{Expiration Time}}*</p>
1216
- <p>If the link above doesn’t work, copy and paste the following URL into your browser:</p>
1217
- <p style="color: #007bff;">{{Reset Password URL}}</p>
1218
- <p>For your security, please make sure to keep your new password safe and avoid using it for other sites.</p>
1219
- <p>If you have any questions, feel free to reach out to our support team at <a href="mailto:{{Support Email}}">{{Support Email}}</a>.</p>
1220
- <p>Best regards,<br>{{Company Name}} Support Team</p>
1221
- </td>
1222
- </tr>
1223
- `,
1224
- category: TEXT_TEMPLATE_CATEGORY[0],
1225
- type: 'template',
1226
- // templateVariables: [
1227
- // {
1228
- // name: 'user_name',
1229
- // title: 'User Name',
1230
- // type: 'string',
1231
- // required: true,
1232
- // },
1233
- // ],
1234
- },
1235
- {
1236
- id: AXPDataGenerator.uuid(),
1237
- name: 'NewDevice',
1238
- title: 'New Device Login',
1239
- content: `
1240
- <tr>
1241
- <td>
1242
- <p>Hi {{User's Name}},</p>
1243
- <p>We detected a login to your account from a new device. If this was you, there’s nothing you need to do. If you didn’t sign in from a new device, please review your account for any unauthorized activity.</p>
1244
- <p style="font-weight: bold;">Device Information:</p>
1245
- <ul>
1246
- <li><strong>Device:</strong> {{Device Type}}</li>
1247
- <li><strong>Location:</strong> {{Location, e.g., City, Country}}</li>
1248
- <li><strong>Date & Time:</strong> {{Date and Time}}</li>
1249
- <li><strong>IP Address:</strong> {{IP Address}}</li>
1250
- </ul>
1251
- <p>If you have any concerns, please secure your account by resetting your password and enabling two-factor authentication.</p>
1252
- <p style="text-align: center; margin: 20px 0;">
1253
- <a href="https://example.com/security-settings" style="background-color: #007bff; color: #ffffff; padding: 10px 20px; text-decoration: none; border-radius: 5px;">Review Account Security</a>
1254
- </p>
1255
- <p>Thank you for helping us keep your account safe.</p>
1256
- <p>Best regards,<br>{{Your Company Name}} Security Team</p>
1257
- </td>
1258
- </tr>
1259
- `,
1260
- category: TEXT_TEMPLATE_CATEGORY[0],
1261
- type: 'template',
1262
- // templateVariables: [
1263
- // {
1264
- // name: 'user_name',
1265
- // title: 'User Name',
1266
- // type: 'string',
1267
- // required: true,
1268
- // },
1269
- // ],
1270
- },
1271
- {
1272
- id: AXPDataGenerator.uuid(),
1273
- name: 'offer',
1274
- title: 'Offer',
1275
- content: `
1276
- <tr>
1277
- <td>
1278
- <p>Hi {{user_name}},</p>
1279
- <p>We're excited to bring you an exclusive offer! For a limited time, you can enjoy {{Discount Percentage}}% off on {{Product or Service Name}}. Don’t miss out on this amazing deal!</p>
1280
- <p style="font-weight: bold;">Offer Details:</p>
1281
- <ul>
1282
- <li><strong>Discount:</strong> {{Discount Percentage}}%</li>
1283
- <li><strong>Valid Until:</strong> {{Expiration Date}}</li>
1284
- <li><strong>Promo Code:</strong> <span style="color: #007bff;">{{Promo Code}}</span></li>
1285
- </ul>
1286
- <p style="text-align: center; margin: 20px 0;">
1287
- <a href="{{Offer Link}}" style="background-color: #ff9800; color: #ffffff; padding: 10px 20px; text-decoration: none; border-radius: 5px;">Redeem Offer</a>
1288
- </p>
1289
- <p>Thank you for being a valued customer. We hope you enjoy this special offer!</p>
1290
- <p>Best regards,<br>{{Company Name}} Team</p>
1291
- </td>
1292
- </tr>
1293
- `,
1294
- category: TEXT_TEMPLATE_CATEGORY[1],
1295
- type: 'template',
1296
- // templateVariables: [
1297
- // {
1298
- // name: 'user_name',
1299
- // title: 'User Name',
1300
- // type: 'string',
1301
- // required: true,
1302
- // },
1303
- // ],
1304
- },
1305
- ];
1306
-
1307
- class AXCTextTemplateCategoryDataSeeder {
1308
- constructor() {
1309
- this.storageService = inject(AXPDexieEntityStorageService);
1310
- }
1311
- async seed() {
1312
- await this.storageService.initial(`${RootConfig$4.module.name}.${RootConfig$4.entities.category.name}`, TEXT_TEMPLATE_CATEGORY);
1608
+ this.fileService = inject(AXFileService);
1609
+ setInterval(() => {
1610
+ this.cleanupMarkedFiles(5 * 60 * 1000) // Grace period: 5 minutes in milliseconds
1611
+ .catch((error) => console.error('Error during cleanup:', error));
1612
+ this.cleanupTemporaryFiles() // Ensure temporary files are cleaned
1613
+ .catch((error) => console.error('Error during cleanup:', error));
1614
+ }, 5 * 60 * 1000); // Runs every 5 minutes
1313
1615
  }
1314
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXCTextTemplateCategoryDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1315
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXCTextTemplateCategoryDataSeeder }); }
1616
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXCFileStorageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1617
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXCFileStorageService }); }
1316
1618
  }
1317
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXCTextTemplateCategoryDataSeeder, decorators: [{
1619
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXCFileStorageService, decorators: [{
1318
1620
  type: Injectable
1319
- }] });
1621
+ }], ctorParameters: () => [] });
1320
1622
 
1321
- class AXCTextTemplateDataSeeder {
1623
+ const SCHEDULER_JOB = [
1624
+ {
1625
+ id: AXPDataGenerator.uuid(),
1626
+ name: 'backup',
1627
+ title: 'Backup Data',
1628
+ process: 'backup',
1629
+ trigger: '00*1*?*',
1630
+ },
1631
+ {
1632
+ id: AXPDataGenerator.uuid(),
1633
+ name: 'cancelOrder',
1634
+ title: 'Auto Cancel Ecommerce Orders',
1635
+ process: 'cancelOrder',
1636
+ trigger: '0*1/2?***',
1637
+ },
1638
+ ];
1639
+
1640
+ class AXCSchedulerJobDataSeeder {
1322
1641
  constructor() {
1323
1642
  this.storageService = inject(AXPDexieEntityStorageService);
1324
1643
  }
1325
1644
  async seed() {
1326
- await this.storageService.initial(`${RootConfig$4.module.name}.${RootConfig$4.entities.template.name}`, TEXT_TEMPLATES);
1645
+ await this.storageService.initial(`${RootConfig$4.module.name}.${RootConfig$4.entities.schedulerJob.name}`, SCHEDULER_JOB);
1327
1646
  }
1328
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXCTextTemplateDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1329
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXCTextTemplateDataSeeder }); }
1647
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXCSchedulerJobDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1648
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXCSchedulerJobDataSeeder }); }
1330
1649
  }
1331
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXCTextTemplateDataSeeder, decorators: [{
1650
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXCSchedulerJobDataSeeder, decorators: [{
1332
1651
  type: Injectable
1333
1652
  }] });
1334
1653
 
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
- };
1654
+ const TEXT_TEMPLATE_CATEGORY = [
1655
+ {
1656
+ id: AXPDataGenerator.uuid(),
1657
+ name: 'security',
1658
+ title: 'Security',
1659
+ },
1660
+ {
1661
+ id: AXPDataGenerator.uuid(),
1662
+ name: 'marketing',
1663
+ title: 'Marketing',
1664
+ },
1665
+ ];
1666
+ const TEXT_TEMPLATES = [
1667
+ {
1668
+ id: AXPDataGenerator.uuid(),
1669
+ name: 'RestPassword',
1670
+ title: 'Rest Password',
1671
+ content: `
1672
+ <tr>
1673
+ <td>
1674
+ <p>Hi {{user_name}},</p>
1675
+ <p>We received a request to reset your password for your account. If you didn’t make this request, you can ignore this email. Otherwise, you can reset your password using the link below:</p>
1676
+ <p style="text-align: center; margin: 20px 0;">
1677
+ <a href="{{Reset Password Link}}" style="background-color: #007bff; color: #ffffff; padding: 10px 20px; text-decoration: none; border-radius: 5px;">Reset Password</a>
1678
+ </p>
1679
+ <p style="font-size: 12px; color: #666666;">*This link will expire in {{Expiration Time}}*</p>
1680
+ <p>If the link above doesn’t work, copy and paste the following URL into your browser:</p>
1681
+ <p style="color: #007bff;">{{Reset Password URL}}</p>
1682
+ <p>For your security, please make sure to keep your new password safe and avoid using it for other sites.</p>
1683
+ <p>If you have any questions, feel free to reach out to our support team at <a href="mailto:{{Support Email}}">{{Support Email}}</a>.</p>
1684
+ <p>Best regards,<br>{{Company Name}} Support Team</p>
1685
+ </td>
1686
+ </tr>
1687
+ `,
1688
+ category: TEXT_TEMPLATE_CATEGORY[0],
1689
+ type: 'template',
1690
+ // templateVariables: [
1691
+ // {
1692
+ // name: 'user_name',
1693
+ // title: 'User Name',
1694
+ // type: 'string',
1695
+ // required: true,
1696
+ // },
1697
+ // ],
1698
+ },
1699
+ {
1700
+ id: AXPDataGenerator.uuid(),
1701
+ name: 'NewDevice',
1702
+ title: 'New Device Login',
1703
+ content: `
1704
+ <tr>
1705
+ <td>
1706
+ <p>Hi {{User's Name}},</p>
1707
+ <p>We detected a login to your account from a new device. If this was you, there’s nothing you need to do. If you didn’t sign in from a new device, please review your account for any unauthorized activity.</p>
1708
+ <p style="font-weight: bold;">Device Information:</p>
1709
+ <ul>
1710
+ <li><strong>Device:</strong> {{Device Type}}</li>
1711
+ <li><strong>Location:</strong> {{Location, e.g., City, Country}}</li>
1712
+ <li><strong>Date & Time:</strong> {{Date and Time}}</li>
1713
+ <li><strong>IP Address:</strong> {{IP Address}}</li>
1714
+ </ul>
1715
+ <p>If you have any concerns, please secure your account by resetting your password and enabling two-factor authentication.</p>
1716
+ <p style="text-align: center; margin: 20px 0;">
1717
+ <a href="https://example.com/security-settings" style="background-color: #007bff; color: #ffffff; padding: 10px 20px; text-decoration: none; border-radius: 5px;">Review Account Security</a>
1718
+ </p>
1719
+ <p>Thank you for helping us keep your account safe.</p>
1720
+ <p>Best regards,<br>{{Your Company Name}} Security Team</p>
1721
+ </td>
1722
+ </tr>
1723
+ `,
1724
+ category: TEXT_TEMPLATE_CATEGORY[0],
1725
+ type: 'template',
1726
+ // templateVariables: [
1727
+ // {
1728
+ // name: 'user_name',
1729
+ // title: 'User Name',
1730
+ // type: 'string',
1731
+ // required: true,
1732
+ // },
1733
+ // ],
1734
+ },
1735
+ {
1736
+ id: AXPDataGenerator.uuid(),
1737
+ name: 'offer',
1738
+ title: 'Offer',
1739
+ content: `
1740
+ <tr>
1741
+ <td>
1742
+ <p>Hi {{user_name}},</p>
1743
+ <p>We're excited to bring you an exclusive offer! For a limited time, you can enjoy {{Discount Percentage}}% off on {{Product or Service Name}}. Don’t miss out on this amazing deal!</p>
1744
+ <p style="font-weight: bold;">Offer Details:</p>
1745
+ <ul>
1746
+ <li><strong>Discount:</strong> {{Discount Percentage}}%</li>
1747
+ <li><strong>Valid Until:</strong> {{Expiration Date}}</li>
1748
+ <li><strong>Promo Code:</strong> <span style="color: #007bff;">{{Promo Code}}</span></li>
1749
+ </ul>
1750
+ <p style="text-align: center; margin: 20px 0;">
1751
+ <a href="{{Offer Link}}" style="background-color: #ff9800; color: #ffffff; padding: 10px 20px; text-decoration: none; border-radius: 5px;">Redeem Offer</a>
1752
+ </p>
1753
+ <p>Thank you for being a valued customer. We hope you enjoy this special offer!</p>
1754
+ <p>Best regards,<br>{{Company Name}} Team</p>
1755
+ </td>
1756
+ </tr>
1757
+ `,
1758
+ category: TEXT_TEMPLATE_CATEGORY[1],
1759
+ type: 'template',
1760
+ // templateVariables: [
1761
+ // {
1762
+ // name: 'user_name',
1763
+ // title: 'User Name',
1764
+ // type: 'string',
1765
+ // required: true,
1766
+ // },
1767
+ // ],
1768
+ },
1769
+ ];
1516
1770
 
1517
- class AXCOrganizationManagementDataSeeder {
1771
+ class AXCTextTemplateCategoryDataSeeder {
1518
1772
  constructor() {
1519
1773
  this.storageService = inject(AXPDexieEntityStorageService);
1520
1774
  }
1521
1775
  async seed() {
1522
- const uuid = AXPDataGenerator.uuid;
1523
- // Departments
1524
- await this.storageService.initial(RootConfig$5.entities.department.source, [
1525
- {
1526
- id: uuid(),
1527
- title: 'Engineering Division',
1528
- description: 'A department focused on engineering projects and development.',
1529
- },
1530
- {
1531
- id: uuid(),
1532
- title: 'Sales Division',
1533
- description: 'A department dedicated to driving sales and customer engagement.',
1534
- },
1535
- {
1536
- id: uuid(),
1537
- title: 'Customer Support Division',
1538
- description: 'A department committed to delivering excellent customer service.',
1539
- },
1540
- ]);
1541
- // Divisions
1542
- await this.storageService.initial(RootConfig$5.entities.division.source, [
1543
- {
1544
- id: uuid(),
1545
- title: 'Software Development',
1546
- description: 'A division within the Engineering Department responsible for developing software solutions.',
1547
- },
1548
- {
1549
- id: uuid(),
1550
- title: 'Business Development',
1551
- description: 'A division within the Sales Department focused on expanding business opportunities.',
1552
- },
1553
- {
1554
- id: uuid(),
1555
- title: 'Technical Support',
1556
- description: 'A division within the Customer Support Department that handles technical assistance.',
1557
- },
1558
- ]);
1559
- // Branches
1560
- await this.storageService.initial(RootConfig$5.entities.branch.source, [
1561
- {
1562
- id: uuid(),
1563
- title: 'San Francisco Office',
1564
- description: 'A branch office located in San Francisco, serving as a hub for West Coast operations.',
1565
- },
1566
- {
1567
- id: uuid(),
1568
- title: 'New York Office',
1569
- description: 'A branch office located in New York, catering to our East Coast clients.',
1570
- },
1571
- {
1572
- id: uuid(),
1573
- title: 'Bangalore Office',
1574
- description: 'A branch office in Bangalore supporting our international operations.',
1575
- },
1576
- ]);
1577
- // Positions
1578
- await this.storageService.initial(RootConfig$5.entities.position.source, [
1579
- {
1580
- id: uuid(),
1581
- title: 'Backend Developer',
1582
- description: 'A role responsible for server-side logic and integration with databases.',
1583
- },
1584
- {
1585
- id: uuid(),
1586
- title: 'Frontend Developer',
1587
- description: 'A role focused on crafting engaging user interfaces and client-side features.',
1588
- },
1589
- {
1590
- id: uuid(),
1591
- title: 'Sales Manager',
1592
- description: 'A leadership position overseeing sales strategies and team performance.',
1593
- },
1594
- {
1595
- id: uuid(),
1596
- title: 'Sales Representative',
1597
- description: 'A role tasked with building client relationships and closing sales deals.',
1598
- },
1599
- {
1600
- id: uuid(),
1601
- title: 'Call Center Representative',
1602
- description: 'A position dedicated to managing inbound and outbound customer calls.',
1603
- },
1604
- {
1605
- id: uuid(),
1606
- title: 'Technical Support Specialist',
1607
- description: 'A role providing specialized technical assistance and problem resolution.',
1608
- },
1609
- ]);
1610
- // Employment Types
1611
- await this.storageService.initial(RootConfig$5.entities.employmentType.source, [
1612
- {
1613
- id: uuid(),
1614
- title: 'Full-Time',
1615
- description: 'An employment category for full-time engagements.',
1616
- },
1617
- {
1618
- id: uuid(),
1619
- title: 'Part-Time',
1620
- description: 'An employment category for part-time work schedules.',
1621
- },
1622
- {
1623
- id: uuid(),
1624
- title: 'Contract',
1625
- description: 'An employment type based on fixed-term contractual agreements.',
1626
- },
1627
- {
1628
- id: uuid(),
1629
- title: 'Internship',
1630
- description: 'An employment type designed for internship programs.',
1631
- },
1632
- {
1633
- id: uuid(),
1634
- title: 'Freelance',
1635
- description: 'An employment type for freelance and project-based work.',
1636
- },
1637
- ]);
1638
- // Employees
1639
- await this.storageService.initial(RootConfig$5.entities.employee.source, [
1640
- { id: uuid(), firstname: 'Jane', lastname: 'Smith', birthDate: new Date('1985-02-15'), employeeID: 'EMP002' },
1641
- { id: uuid(), firstname: 'Michael', lastname: 'Johnson', birthDate: new Date('1978-03-22'), employeeID: 'EMP003' },
1642
- { id: uuid(), firstname: 'Emma', lastname: 'Davis', birthDate: new Date('1992-04-10'), employeeID: 'EMP004' },
1643
- { id: uuid(), firstname: 'Robert', lastname: 'Wilson', birthDate: new Date('1980-09-18'), employeeID: 'EMP009' },
1644
- { id: uuid(), firstname: 'Lisa', lastname: 'Brown', birthDate: new Date('1987-10-29'), employeeID: 'EMP010' },
1645
- { id: uuid(), firstname: 'Rahul', lastname: 'Sharma', birthDate: new Date('1982-07-14'), employeeID: 'EMP007' },
1646
- { id: uuid(), firstname: 'Priya', lastname: 'Kapoor', birthDate: new Date('1982-07-14'), employeeID: 'EMP007' },
1647
- { id: uuid(), firstname: 'Amit', lastname: 'Verma', birthDate: new Date('1982-07-14'), employeeID: 'EMP007' },
1648
- { id: uuid(), firstname: 'Vikram', lastname: 'Singh', birthDate: new Date('1982-07-14'), employeeID: 'EMP007' },
1649
- ]);
1650
- // Store Chart Data
1651
- await this.storageService.initial(RootConfig$5.entities.chart.source, [
1652
- {
1653
- id: uuid(),
1654
- version: '1.0',
1655
- data: SOFTWARE_COMPANY_ORGANIZATION,
1656
- },
1657
- ]);
1776
+ await this.storageService.initial(`${RootConfig$5.module.name}.${RootConfig$5.entities.category.name}`, TEXT_TEMPLATE_CATEGORY);
1658
1777
  }
1659
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXCOrganizationManagementDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1660
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXCOrganizationManagementDataSeeder }); }
1778
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXCTextTemplateCategoryDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1779
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXCTextTemplateCategoryDataSeeder }); }
1661
1780
  }
1662
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXCOrganizationManagementDataSeeder, decorators: [{
1781
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXCTextTemplateCategoryDataSeeder, decorators: [{
1663
1782
  type: Injectable
1664
1783
  }] });
1665
1784
 
1666
- class AXCFOrganizationManagementMockModule {
1667
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXCFOrganizationManagementMockModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1668
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.3", ngImport: i0, type: AXCFOrganizationManagementMockModule }); }
1669
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXCFOrganizationManagementMockModule, providers: [
1670
- {
1671
- provide: AXP_DATA_SEEDER_TOKEN,
1672
- useClass: AXCOrganizationManagementDataSeeder,
1673
- multi: true,
1674
- },
1675
- ] }); }
1785
+ class AXCTextTemplateDataSeeder {
1786
+ constructor() {
1787
+ this.storageService = inject(AXPDexieEntityStorageService);
1788
+ }
1789
+ async seed() {
1790
+ await this.storageService.initial(`${RootConfig$5.module.name}.${RootConfig$5.entities.template.name}`, TEXT_TEMPLATES);
1791
+ }
1792
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXCTextTemplateDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1793
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXCTextTemplateDataSeeder }); }
1676
1794
  }
1677
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXCFOrganizationManagementMockModule, decorators: [{
1678
- type: NgModule,
1679
- args: [{
1680
- imports: [],
1681
- exports: [],
1682
- declarations: [],
1683
- providers: [
1684
- {
1685
- provide: AXP_DATA_SEEDER_TOKEN,
1686
- useClass: AXCOrganizationManagementDataSeeder,
1687
- multi: true,
1688
- },
1689
- ],
1690
- }]
1795
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXCTextTemplateDataSeeder, decorators: [{
1796
+ type: Injectable
1691
1797
  }] });
1692
1798
 
1693
1799
  class AXCMockModule {
@@ -1758,6 +1864,10 @@ class AXCMockModule {
1758
1864
  provide: AXPFileStorageService,
1759
1865
  useClass: AXCFileStorageService,
1760
1866
  },
1867
+ {
1868
+ provide: AXPRegionalService,
1869
+ useClass: AXCRegionalServiceImpl,
1870
+ },
1761
1871
  {
1762
1872
  provide: AXP_SEARCH_PROVIDER,
1763
1873
  useClass: EntitySearchProvider,
@@ -1846,6 +1956,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
1846
1956
  provide: AXPFileStorageService,
1847
1957
  useClass: AXCFileStorageService,
1848
1958
  },
1959
+ {
1960
+ provide: AXPRegionalService,
1961
+ useClass: AXCRegionalServiceImpl,
1962
+ },
1849
1963
  {
1850
1964
  provide: AXP_SEARCH_PROVIDER,
1851
1965
  useClass: EntitySearchProvider,