@acorex/connectivity 18.2.0 → 18.2.2

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.
Files changed (76) hide show
  1. package/esm2022/mock/lib/conversation/chat/chat.mock.data.mjs +42 -0
  2. package/esm2022/mock/lib/conversation/chat/chat.mock.service.mjs +14 -0
  3. package/esm2022/mock/lib/conversation/chat/chat.seeder.mjs +19 -0
  4. package/esm2022/mock/lib/conversation/chat/index.mjs +3 -0
  5. package/esm2022/mock/lib/conversation/comments/comment.mock.data.mjs +73 -0
  6. package/esm2022/mock/lib/conversation/comments/comment.mock.service.mjs +78 -0
  7. package/esm2022/mock/lib/conversation/comments/comment.seeder.mjs +19 -0
  8. package/esm2022/mock/lib/conversation/comments/index.mjs +4 -0
  9. package/esm2022/mock/lib/conversation/conversation.module.mjs +78 -0
  10. package/esm2022/mock/lib/form-management/datasource-provider.mock.service.mjs +37 -0
  11. package/esm2022/mock/lib/form-management/form-management-mock.module.mjs +31 -0
  12. package/esm2022/mock/lib/localization-management/culture/culture.mock.data.mjs +16 -0
  13. package/esm2022/mock/lib/localization-management/culture/culture.seeder.mjs +19 -0
  14. package/esm2022/mock/lib/localization-management/culture/index.mjs +3 -0
  15. package/esm2022/mock/lib/localization-management/index.mjs +4 -0
  16. package/esm2022/mock/lib/localization-management/languages/index.mjs +3 -0
  17. package/esm2022/mock/lib/localization-management/languages/language.mock.data.mjs +14 -0
  18. package/esm2022/mock/lib/localization-management/languages/language.seeder.mjs +19 -0
  19. package/esm2022/mock/lib/localization-management/time-zone/index.mjs +3 -0
  20. package/esm2022/mock/lib/localization-management/time-zone/time-zone.mock.data.mjs +31 -0
  21. package/esm2022/mock/lib/localization-management/time-zone/time-zone.seeder.mjs +19 -0
  22. package/esm2022/mock/lib/mock.module.mjs +44 -21
  23. package/esm2022/mock/lib/platform-management/country/country.mock.data.mjs +76 -0
  24. package/esm2022/mock/lib/platform-management/country/country.seeder.mjs +19 -0
  25. package/esm2022/mock/lib/platform-management/country/index.mjs +3 -0
  26. package/esm2022/mock/lib/platform-management/currency/currency.mock.data.mjs +22 -0
  27. package/esm2022/mock/lib/platform-management/currency/currency.seeder.mjs +19 -0
  28. package/esm2022/mock/lib/platform-management/currency/index.mjs +3 -0
  29. package/esm2022/mock/lib/platform-management/index.mjs +3 -2
  30. package/esm2022/mock/lib/text-template-management/category.seeder.mjs +3 -3
  31. package/esm2022/mock/lib/text-template-management/template.seeder.mjs +3 -3
  32. package/esm2022/mock/lib/text-template-management/text-template-management.mock.data.mjs +28 -28
  33. package/fesm2022/acorex-connectivity-mock.mjs +517 -148
  34. package/fesm2022/acorex-connectivity-mock.mjs.map +1 -1
  35. package/mock/lib/conversation/chat/chat.mock.data.d.ts +4 -0
  36. package/mock/lib/conversation/chat/chat.mock.service.d.ts +5 -0
  37. package/mock/lib/conversation/chat/chat.seeder.d.ts +8 -0
  38. package/mock/lib/conversation/chat/index.d.ts +2 -0
  39. package/mock/lib/conversation/comments/comment.mock.service.d.ts +6 -0
  40. package/mock/lib/conversation/conversation.module.d.ts +7 -0
  41. package/mock/lib/form-management/datasource-provider.mock.service.d.ts +4 -0
  42. package/mock/lib/form-management/form-management-mock.module.d.ts +6 -0
  43. package/mock/lib/localization-management/culture/culture.mock.data.d.ts +31 -0
  44. package/mock/lib/localization-management/culture/culture.seeder.d.ts +8 -0
  45. package/mock/lib/localization-management/culture/index.d.ts +2 -0
  46. package/mock/lib/localization-management/index.d.ts +3 -0
  47. package/mock/lib/localization-management/languages/index.d.ts +2 -0
  48. package/mock/lib/localization-management/time-zone/index.d.ts +2 -0
  49. package/mock/lib/localization-management/time-zone/time-zone.mock.data.d.ts +9 -0
  50. package/mock/lib/localization-management/time-zone/time-zone.seeder.d.ts +8 -0
  51. package/mock/lib/mock.module.d.ts +3 -1
  52. package/mock/lib/platform-management/country/country.mock.data.d.ts +18 -0
  53. package/mock/lib/platform-management/country/country.seeder.d.ts +8 -0
  54. package/mock/lib/platform-management/country/index.d.ts +2 -0
  55. package/mock/lib/platform-management/currency/currency.mock.data.d.ts +6 -0
  56. package/mock/lib/platform-management/currency/currency.seeder.d.ts +8 -0
  57. package/mock/lib/platform-management/currency/index.d.ts +2 -0
  58. package/mock/lib/platform-management/index.d.ts +2 -1
  59. package/mock/lib/text-template-management/text-template-management.mock.data.d.ts +2 -2
  60. package/package.json +1 -1
  61. package/esm2022/mock/lib/comments/comment.mock.data.mjs +0 -73
  62. package/esm2022/mock/lib/comments/comment.mock.service.mjs +0 -77
  63. package/esm2022/mock/lib/comments/comment.seeder.mjs +0 -18
  64. package/esm2022/mock/lib/comments/index.mjs +0 -4
  65. package/esm2022/mock/lib/form-management/designer-connector.mock.service.mjs +0 -56
  66. package/esm2022/mock/lib/platform-management/languages/index.mjs +0 -3
  67. package/esm2022/mock/lib/platform-management/languages/language.seeder.mjs +0 -18
  68. package/esm2022/mock/lib/platform-management/languages/lanuage.mock.data.mjs +0 -14
  69. package/mock/lib/comments/comment.mock.service.d.ts +0 -7
  70. package/mock/lib/form-management/designer-connector.mock.service.d.ts +0 -8
  71. package/mock/lib/platform-management/languages/index.d.ts +0 -2
  72. /package/mock/lib/{comments → conversation/comments}/comment.mock.data.d.ts +0 -0
  73. /package/mock/lib/{comments → conversation/comments}/comment.seeder.d.ts +0 -0
  74. /package/mock/lib/{comments → conversation/comments}/index.d.ts +0 -0
  75. /package/mock/lib/{platform-management/languages/lanuage.mock.data.d.ts → localization-management/languages/language.mock.data.d.ts} +0 -0
  76. /package/mock/lib/{platform-management → localization-management}/languages/language.seeder.d.ts +0 -0
@@ -1,14 +1,17 @@
1
- import { AXMCommentService } from '@acorex/modules/conversation';
2
1
  import { AXMNotificationService } from '@acorex/modules/notification-management';
3
- import { AXPDataGenerator, AXPDexieEntityStorageService, AXPEntityStorageService, AXP_DATA_SEEDER_TOKEN } from '@acorex/platform/common';
4
- import { AXPDesignerConnectorAbstract } from '@acorex/platform/layout/designer';
2
+ import { AXPDataGenerator, AXPDexieEntityStorageService, AXP_DATA_SEEDER_TOKEN, AXPEntityStorageService } from '@acorex/platform/common';
5
3
  import * as i0 from '@angular/core';
6
4
  import { inject, Injectable, NgModule } from '@angular/core';
7
5
  import { APPLICATION_SOURCE_NAME, MODULE_SOURCE_NAME, ENTITY_SOURCE_NAME, FEATURE_SOURCE_NAME, PERMISSION_SOURCE_NAME, PROPERTY_SOURCE_NAME } from '@acorex/modules/application-management';
8
- import { AXPCommentServiceImpl } from '@acorex/modules/platform-management';
6
+ import { AXMCommentService } from '@acorex/modules/backend';
7
+ import * as i1 from '@acorex/modules/conversation';
8
+ import { AXMConverstionModuleConst, AXMChatServiceImpl, AXMCommentServiceImpl, AXMChatModule, AXMChatService } from '@acorex/modules/conversation';
9
9
  import { AXPSessionService } from '@acorex/platform/auth';
10
+ import { AXP_WIDGET_DATASOURCE_PROVIDER } from '@acorex/platform/layout/builder';
10
11
  import { convertArrayToDataSource } from '@acorex/components/common';
11
- import { CATEGORY_SOURCE_NAME, TEMPLATE_SOURCE_NAME } from '@acorex/modules/template-management';
12
+ import { LANGUAGE_SOURCE_NAME, CULTURE_SOURCE_NAME, TIMEZONE_SOURCE_NAME } from '@acorex/modules/localization-management';
13
+ import { CURRENCY_SOURCE_NAME, COUNTRY_SOURCE_NAME } from '@acorex/modules/platform-management';
14
+ import { AXMTextTemplateManagementModuleConst } from '@acorex/modules/text-template-management';
12
15
 
13
16
  const APPLICATIONS = Array.from({ length: 5 }).map((_, i) => {
14
17
  const source = ['appOne', 'appTwo', 'appThree', 'myCoolApp', 'awesomeApp', 'superApp'];
@@ -139,6 +142,74 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
139
142
  type: Injectable
140
143
  }] });
141
144
 
145
+ const generateChatUser = () => ({
146
+ id: AXPDataGenerator.uuid(),
147
+ userName: AXPDataGenerator.firstName().toLowerCase(),
148
+ firstName: AXPDataGenerator.firstName(),
149
+ lastName: AXPDataGenerator.lastName(),
150
+ picture: null, // Can replace with a mock image URL if needed
151
+ });
152
+ const generateChatMessage = () => ({
153
+ content: `${AXPDataGenerator.pick([
154
+ 'Hello!',
155
+ 'How are you?',
156
+ 'Can we schedule a meeting?',
157
+ 'Looking forward to your response.',
158
+ 'This is a test message.',
159
+ 'Let’s catch up soon!',
160
+ 'Good job on this!',
161
+ 'Here is the update you requested.',
162
+ ])}`,
163
+ contentType: AXPDataGenerator.pick(['text', 'image', 'video']),
164
+ hasSeen: AXPDataGenerator.boolean(),
165
+ createdAt: AXPDataGenerator.date(new Date(2021), new Date()),
166
+ createdBy: generateChatUser(),
167
+ });
168
+ const CHAT = Array.from({ length: 10 }).map(() => {
169
+ const roomMembersCount = AXPDataGenerator.number(2, 10);
170
+ const roomMembers = Array.from({ length: roomMembersCount }).map(() => generateChatUser());
171
+ return {
172
+ id: AXPDataGenerator.uuid(),
173
+ title: AXPDataGenerator.pick([
174
+ 'General Discussion',
175
+ 'Project Alpha',
176
+ 'Team Meeting',
177
+ 'Client Communication',
178
+ 'Random Chat',
179
+ ]),
180
+ lastMessage: generateChatMessage(),
181
+ roomMembers,
182
+ unreadCount: AXPDataGenerator.number(0, 20),
183
+ };
184
+ });
185
+
186
+ class AXPChatDataSeeder {
187
+ constructor() {
188
+ this.storageService = inject(AXPDexieEntityStorageService);
189
+ }
190
+ async seed() {
191
+ await this.storageService.initial(`${AXMConverstionModuleConst.moduleName}.${AXMConverstionModuleConst.chatName}`, CHAT);
192
+ }
193
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPChatDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
194
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPChatDataSeeder }); }
195
+ }
196
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPChatDataSeeder, decorators: [{
197
+ type: Injectable
198
+ }] });
199
+
200
+ class AXMChatMockService extends AXMChatServiceImpl {
201
+ async getTotalUnread() {
202
+ const chatList = await super.storageService.getAll(`${AXMConverstionModuleConst.moduleName}.${AXMConverstionModuleConst.chatName}`);
203
+ const totalUnread = chatList.reduce((acc, curr) => (acc += curr.unreadCount > 0), 0);
204
+ return totalUnread;
205
+ }
206
+ async markChatAsRead(roomId) {
207
+ const oldChat = await super.getOne(roomId);
208
+ await super.updateOne(roomId, { ...oldChat, unreadCount: 0 });
209
+ return;
210
+ }
211
+ }
212
+
142
213
  // import { AXPDataGenerator, AXPEntityStorageService } from '@acorex/platform/common';
143
214
  // import {
144
215
  // AXPComment,
@@ -216,7 +287,7 @@ class AXPCommentDataSeeder {
216
287
  this.storageService = inject(AXPDexieEntityStorageService);
217
288
  }
218
289
  async seed() {
219
- await this.storageService.initial('comments', COMMENTS);
290
+ await this.storageService.initial(`${AXMConverstionModuleConst.moduleName}.${AXMConverstionModuleConst.commentName}`, COMMENTS);
220
291
  }
221
292
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPCommentDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
222
293
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPCommentDataSeeder }); }
@@ -225,7 +296,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
225
296
  type: Injectable
226
297
  }] });
227
298
 
228
- class AXMCommentMockService extends AXPCommentServiceImpl {
299
+ class AXMCommentMockService extends AXMCommentServiceImpl {
229
300
  constructor() {
230
301
  super(...arguments);
231
302
  this.sessionService = inject(AXPSessionService);
@@ -268,6 +339,7 @@ class AXMCommentMockService extends AXPCommentServiceImpl {
268
339
  return 'done';
269
340
  }
270
341
  async like(payload) {
342
+ debugger;
271
343
  const comment = await super.getOne(payload.messageId);
272
344
  if (comment) {
273
345
  const isLiked = !comment.isLiked;
@@ -298,59 +370,390 @@ class AXMCommentMockService extends AXPCommentServiceImpl {
298
370
  }
299
371
  }
300
372
 
301
- class AXPMockDesignerConnector extends AXPDesignerConnectorAbstract {
302
- //#region DataSources Management
303
- async getDataSourcesNames() {
304
- return [
373
+ class AXCConversationMockModule {
374
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXCConversationMockModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
375
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.0", ngImport: i0, type: AXCConversationMockModule, imports: [i1.AXMChatModule] }); }
376
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXCConversationMockModule, providers: [
305
377
  {
306
- id: "countries",
307
- title: "Countries"
378
+ provide: AXP_DATA_SEEDER_TOKEN,
379
+ useClass: AXPChatDataSeeder,
380
+ multi: true,
308
381
  },
309
382
  {
310
- id: "users",
311
- title: "Users"
312
- }
313
- ];
314
- }
315
- async getDataSource(name) {
316
- switch (name) {
317
- case 'countries':
318
- return {
319
- columns: [
383
+ provide: AXP_DATA_SEEDER_TOKEN,
384
+ useClass: AXPCommentDataSeeder,
385
+ multi: true,
386
+ },
387
+ {
388
+ provide: AXMCommentService,
389
+ useClass: AXMCommentMockService,
390
+ },
391
+ // {
392
+ // provide: AXMChatService,
393
+ // useClass: AXMChatMockService,
394
+ // },
395
+ ], imports: [AXMChatModule.forRoot({
396
+ provider: [
397
+ {
398
+ provide: AXMChatService,
399
+ useClass: AXMChatMockService,
400
+ },
401
+ ],
402
+ })] }); }
403
+ }
404
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXCConversationMockModule, decorators: [{
405
+ type: NgModule,
406
+ args: [{
407
+ imports: [
408
+ AXMChatModule.forRoot({
409
+ provider: [
410
+ {
411
+ provide: AXMChatService,
412
+ useClass: AXMChatMockService,
413
+ },
414
+ ],
415
+ }),
416
+ ],
417
+ exports: [],
418
+ declarations: [],
419
+ providers: [
320
420
  {
321
- name: 'id',
322
- title: 'Id',
421
+ provide: AXP_DATA_SEEDER_TOKEN,
422
+ useClass: AXPChatDataSeeder,
423
+ multi: true,
323
424
  },
324
425
  {
325
- name: 'title',
326
- title: 'Title',
327
- }
328
- ],
329
- name: "countries",
330
- source: convertArrayToDataSource([
426
+ provide: AXP_DATA_SEEDER_TOKEN,
427
+ useClass: AXPCommentDataSeeder,
428
+ multi: true,
429
+ },
331
430
  {
332
- id: "1",
333
- title: "Iran"
431
+ provide: AXMCommentService,
432
+ useClass: AXMCommentMockService,
334
433
  },
434
+ // {
435
+ // provide: AXMChatService,
436
+ // useClass: AXMChatMockService,
437
+ // },
438
+ ],
439
+ }]
440
+ }] });
441
+
442
+ class AXPMockWidgetDataSourceProvider {
443
+ async items() {
444
+ return [
445
+ {
446
+ name: 'mock.users',
447
+ title: 'Users',
448
+ columns: [],
449
+ samples: [
450
+ {
451
+ id: '2',
452
+ title: 'Alex Jakson',
453
+ },
454
+ {
455
+ id: '3',
456
+ title: 'Emma Smith',
457
+ },
458
+ ],
459
+ source: () => convertArrayToDataSource([
460
+ {
461
+ id: '1',
462
+ title: 'Arash Oshnoudi',
463
+ },
464
+ {
465
+ id: '2',
466
+ title: 'Alex Smith',
467
+ },
468
+ {
469
+ id: '3',
470
+ title: 'Emma Jakson',
471
+ },
472
+ ]),
473
+ },
474
+ ];
475
+ }
476
+ }
477
+
478
+ class AXCFormManagementMockModule {
479
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXCFormManagementMockModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
480
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.0", ngImport: i0, type: AXCFormManagementMockModule }); }
481
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXCFormManagementMockModule, providers: [
482
+ {
483
+ provide: AXP_WIDGET_DATASOURCE_PROVIDER,
484
+ useClass: AXPMockWidgetDataSourceProvider,
485
+ multi: true,
486
+ },
487
+ ] }); }
488
+ }
489
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXCFormManagementMockModule, decorators: [{
490
+ type: NgModule,
491
+ args: [{
492
+ imports: [],
493
+ exports: [],
494
+ declarations: [],
495
+ providers: [
335
496
  {
336
- id: "2",
337
- title: "Usa"
497
+ provide: AXP_WIDGET_DATASOURCE_PROVIDER,
498
+ useClass: AXPMockWidgetDataSourceProvider,
499
+ multi: true,
338
500
  },
339
- ])
340
- };
341
- default:
342
- return undefined;
343
- }
501
+ ],
502
+ }]
503
+ }] });
504
+
505
+ const LANGUAGES = [
506
+ {
507
+ id: AXPDataGenerator.uuid(),
508
+ title: 'English',
509
+ code: 'en'
510
+ },
511
+ {
512
+ id: AXPDataGenerator.uuid(),
513
+ title: 'Persian',
514
+ code: 'fa'
515
+ }
516
+ ];
517
+
518
+ class AXPLanguageDataSeeder {
519
+ constructor() {
520
+ this.storageService = inject(AXPDexieEntityStorageService);
521
+ }
522
+ async seed() {
523
+ await this.storageService.initial(LANGUAGE_SOURCE_NAME, LANGUAGES);
524
+ }
525
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPLanguageDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
526
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPLanguageDataSeeder }); }
527
+ }
528
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPLanguageDataSeeder, decorators: [{
529
+ type: Injectable
530
+ }] });
531
+
532
+ const names = ['key', 'counter', 'logo', 'tenant'];
533
+ const data = [
534
+ ['key1', 'string'],
535
+ ['sequence', 'integer'],
536
+ ['appLogo', 'function'],
537
+ ['CompanyName', 'function'],
538
+ ];
539
+ const GLOBAL_VARIABLES = Array.from({ length: 4 }).map((element, i) => {
540
+ return {
541
+ id: AXPDataGenerator.uuid(),
542
+ name: names[i],
543
+ title: names[i],
544
+ dataType: data[i][1],
545
+ dataValue: data[i][0],
546
+ };
547
+ });
548
+
549
+ class AXPGlobalVariablesDataSeeder {
550
+ constructor() {
551
+ this.storageService = inject(AXPDexieEntityStorageService);
552
+ }
553
+ async seed() {
554
+ await this.storageService.initial('globalVariable', GLOBAL_VARIABLES);
555
+ }
556
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPGlobalVariablesDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
557
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPGlobalVariablesDataSeeder }); }
558
+ }
559
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPGlobalVariablesDataSeeder, decorators: [{
560
+ type: Injectable
561
+ }] });
562
+
563
+ const Currencies = [
564
+ {
565
+ id: AXPDataGenerator.uuid(),
566
+ code: 'AFN',
567
+ title: 'Afghan afghani',
568
+ symbol: '؋',
569
+ },
570
+ {
571
+ id: AXPDataGenerator.uuid(),
572
+ code: 'EUR',
573
+ title: 'Euro',
574
+ symbol: '€',
575
+ },
576
+ {
577
+ id: AXPDataGenerator.uuid(),
578
+ code: 'JPY',
579
+ title: 'Japanese Yen',
580
+ symbol: '¥',
581
+ },
582
+ ];
583
+
584
+ class AXPCurrencyDataSeeder {
585
+ constructor() {
586
+ this.storageService = inject(AXPDexieEntityStorageService);
587
+ }
588
+ async seed() {
589
+ await this.storageService.initial(CURRENCY_SOURCE_NAME, Currencies);
590
+ }
591
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPCurrencyDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
592
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPCurrencyDataSeeder }); }
593
+ }
594
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPCurrencyDataSeeder, decorators: [{
595
+ type: Injectable
596
+ }] });
597
+
598
+ const COUNTRIES = [
599
+ {
600
+ id: AXPDataGenerator.uuid(),
601
+ title: 'Afghanistan',
602
+ iso2: 'AF',
603
+ iso3: 'AFG',
604
+ numericCode: '004',
605
+ phoneCode: '93',
606
+ capital: 'Kabul',
607
+ tld: '.af',
608
+ nativeName: 'افغانستان',
609
+ region: 'Asia',
610
+ subregion: 'Southern Asia',
611
+ nationality: 'Afghan',
612
+ geo: {
613
+ latitude: '33.00000000',
614
+ longitude: '65.00000000',
615
+ },
616
+ },
617
+ {
618
+ id: AXPDataGenerator.uuid(),
619
+ title: 'United States',
620
+ iso2: 'US',
621
+ iso3: 'USA',
622
+ numericCode: '840',
623
+ phoneCode: '1',
624
+ capital: 'Washington, D.C.',
625
+ tld: '.us',
626
+ nativeName: 'United States',
627
+ region: 'Americas',
628
+ subregion: 'Northern America',
629
+ nationality: 'American',
630
+ geo: {
631
+ latitude: '37.0902',
632
+ longitude: '-95.7129',
633
+ },
634
+ },
635
+ {
636
+ id: AXPDataGenerator.uuid(),
637
+ title: 'France',
638
+ iso2: 'FR',
639
+ iso3: 'FRA',
640
+ numericCode: '250',
641
+ phoneCode: '33',
642
+ capital: 'Paris',
643
+ tld: '.fr',
644
+ nativeName: 'France',
645
+ region: 'Europe',
646
+ subregion: 'Western Europe',
647
+ nationality: 'French',
648
+ geo: {
649
+ latitude: '46.6034',
650
+ longitude: '1.8883',
651
+ },
652
+ },
653
+ {
654
+ id: AXPDataGenerator.uuid(),
655
+ title: 'Japan',
656
+ iso2: 'JP',
657
+ iso3: 'JPN',
658
+ numericCode: '392',
659
+ phoneCode: '81',
660
+ capital: 'Tokyo',
661
+ tld: '.jp',
662
+ nativeName: '日本',
663
+ region: 'Asia',
664
+ subregion: 'Eastern Asia',
665
+ nationality: 'Japanese',
666
+ geo: {
667
+ latitude: '36.2048',
668
+ longitude: '138.2529',
669
+ },
670
+ },
671
+ ];
672
+
673
+ class AXPCountryDataSeeder {
674
+ constructor() {
675
+ this.storageService = inject(AXPDexieEntityStorageService);
676
+ }
677
+ async seed() {
678
+ await this.storageService.initial(COUNTRY_SOURCE_NAME, COUNTRIES);
344
679
  }
345
- //#endregion
346
- //#region Save and load Widgets
347
- save() {
348
- throw new Error("Method not implemented.");
680
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPCountryDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
681
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPCountryDataSeeder }); }
682
+ }
683
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPCountryDataSeeder, decorators: [{
684
+ type: Injectable
685
+ }] });
686
+
687
+ const CULTURES = [
688
+ {
689
+ id: AXPDataGenerator.uuid(),
690
+ name: 'English (United States)',
691
+ title: 'English (United States)',
692
+ language: LANGUAGES[0],
693
+ country: COUNTRIES[0], // Assuming 'unitedStates' is defined as in previous examples
694
+ locale: 'en-US', //TODO need define in backend Getter just
695
+ dateFormat: 'MM/DD/YYYY',
696
+ timeFormat: 'hh:mm:ss A',
697
+ },
698
+ ];
699
+
700
+ class AXPCultureDataSeeder {
701
+ constructor() {
702
+ this.storageService = inject(AXPDexieEntityStorageService);
349
703
  }
350
- load(id) {
351
- throw new Error("Method not implemented.");
704
+ async seed() {
705
+ await this.storageService.initial(CULTURE_SOURCE_NAME, CULTURES);
352
706
  }
707
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPCultureDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
708
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPCultureDataSeeder }); }
353
709
  }
710
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPCultureDataSeeder, decorators: [{
711
+ type: Injectable
712
+ }] });
713
+
714
+ const TIME_ZONES = [
715
+ {
716
+ id: AXPDataGenerator.uuid(),
717
+ name: 'Asia/Kabul',
718
+ title: 'Asia/Kabul',
719
+ gmtOffset: 16200,
720
+ gmtOffsetName: 'UTC+04:30',
721
+ abbreviation: 'AFT',
722
+ tzName: 'Afghanistan Time',
723
+ },
724
+ {
725
+ id: AXPDataGenerator.uuid(),
726
+ name: 'America/New_York',
727
+ title: 'America/New_York',
728
+ gmtOffset: -18000, // -5 hours in seconds
729
+ gmtOffsetName: 'UTC-05:00',
730
+ abbreviation: 'EST',
731
+ tzName: 'Eastern Standard Time',
732
+ },
733
+ {
734
+ id: AXPDataGenerator.uuid(),
735
+ name: 'Europe/Amsterdam',
736
+ title: 'Europe/Amsterdam',
737
+ gmtOffset: 3600, // 1 hour in seconds
738
+ gmtOffsetName: 'UTC+01:00',
739
+ abbreviation: 'CET',
740
+ tzName: 'Central European Time',
741
+ },
742
+ ];
743
+
744
+ class AXPTimeZoneDataSeeder {
745
+ constructor() {
746
+ this.storageService = inject(AXPDexieEntityStorageService);
747
+ }
748
+ async seed() {
749
+ await this.storageService.initial(TIMEZONE_SOURCE_NAME, TIME_ZONES);
750
+ }
751
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPTimeZoneDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
752
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPTimeZoneDataSeeder }); }
753
+ }
754
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPTimeZoneDataSeeder, decorators: [{
755
+ type: Injectable
756
+ }] });
354
757
 
355
758
  class AXMMockNotificationService {
356
759
  constructor() {
@@ -424,75 +827,17 @@ function generateNotification() {
424
827
  };
425
828
  }
426
829
 
427
- const names = ['key', 'counter', 'logo', 'tenant'];
428
- const data = [
429
- ['key1', 'string'],
430
- ['sequence', 'integer'],
431
- ['appLogo', 'function'],
432
- ['CompanyName', 'function'],
433
- ];
434
- const GLOBAL_VARIABLES = Array.from({ length: 4 }).map((element, i) => {
435
- return {
436
- id: AXPDataGenerator.uuid(),
437
- name: names[i],
438
- title: names[i],
439
- dataType: data[i][1],
440
- dataValue: data[i][0],
441
- };
442
- });
443
-
444
- class AXPGlobalVariablesDataSeeder {
445
- constructor() {
446
- this.storageService = inject(AXPDexieEntityStorageService);
447
- }
448
- async seed() {
449
- await this.storageService.initial('globalVariable', GLOBAL_VARIABLES);
450
- }
451
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPGlobalVariablesDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
452
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPGlobalVariablesDataSeeder }); }
453
- }
454
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPGlobalVariablesDataSeeder, decorators: [{
455
- type: Injectable
456
- }] });
457
-
458
- const LANGUAGES = [
459
- {
460
- id: AXPDataGenerator.uuid(),
461
- title: 'English',
462
- code: 'en'
463
- },
464
- {
465
- id: AXPDataGenerator.uuid(),
466
- title: 'Persian',
467
- code: 'fa'
468
- }
469
- ];
470
-
471
- class AXPLanguageDataSeeder {
472
- constructor() {
473
- this.storageService = inject(AXPDexieEntityStorageService);
474
- }
475
- async seed() {
476
- await this.storageService.initial('language', LANGUAGES);
477
- }
478
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPLanguageDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
479
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPLanguageDataSeeder }); }
480
- }
481
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPLanguageDataSeeder, decorators: [{
482
- type: Injectable
483
- }] });
484
-
485
830
  const TEXT_TEMPLATE_CATEGORY = [
486
831
  {
487
832
  id: AXPDataGenerator.uuid(),
488
833
  name: 'security',
489
- title: 'Security'
834
+ title: 'Security',
490
835
  },
491
836
  {
492
837
  id: AXPDataGenerator.uuid(),
493
838
  name: 'marketing',
494
- title: 'Marketing'
495
- }
839
+ title: 'Marketing',
840
+ },
496
841
  ];
497
842
  const TEXT_TEMPLATES = [
498
843
  {
@@ -518,14 +863,14 @@ const TEXT_TEMPLATES = [
518
863
  `,
519
864
  category: TEXT_TEMPLATE_CATEGORY[0],
520
865
  type: 'template',
521
- templateVariables: [
522
- {
523
- name: 'user_name',
524
- title: 'User Name',
525
- type: 'string',
526
- required: true,
527
- },
528
- ],
866
+ // templateVariables: [
867
+ // {
868
+ // name: 'user_name',
869
+ // title: 'User Name',
870
+ // type: 'string',
871
+ // required: true,
872
+ // },
873
+ // ],
529
874
  },
530
875
  {
531
876
  id: AXPDataGenerator.uuid(),
@@ -554,14 +899,14 @@ const TEXT_TEMPLATES = [
554
899
  `,
555
900
  category: TEXT_TEMPLATE_CATEGORY[0],
556
901
  type: 'template',
557
- templateVariables: [
558
- {
559
- name: 'user_name',
560
- title: 'User Name',
561
- type: 'string',
562
- required: true,
563
- },
564
- ],
902
+ // templateVariables: [
903
+ // {
904
+ // name: 'user_name',
905
+ // title: 'User Name',
906
+ // type: 'string',
907
+ // required: true,
908
+ // },
909
+ // ],
565
910
  },
566
911
  {
567
912
  id: AXPDataGenerator.uuid(),
@@ -588,14 +933,14 @@ const TEXT_TEMPLATES = [
588
933
  `,
589
934
  category: TEXT_TEMPLATE_CATEGORY[1],
590
935
  type: 'template',
591
- templateVariables: [
592
- {
593
- name: 'user_name',
594
- title: 'User Name',
595
- type: 'string',
596
- required: true,
597
- },
598
- ],
936
+ // templateVariables: [
937
+ // {
938
+ // name: 'user_name',
939
+ // title: 'User Name',
940
+ // type: 'string',
941
+ // required: true,
942
+ // },
943
+ // ],
599
944
  },
600
945
  ];
601
946
 
@@ -604,7 +949,7 @@ class AXPTextTemplateCategoryDataSeeder {
604
949
  this.storageService = inject(AXPDexieEntityStorageService);
605
950
  }
606
951
  async seed() {
607
- await this.storageService.initial(CATEGORY_SOURCE_NAME, TEXT_TEMPLATE_CATEGORY);
952
+ await this.storageService.initial(`${AXMTextTemplateManagementModuleConst.moduleName}.${AXMTextTemplateManagementModuleConst.categoryEntity}`, TEXT_TEMPLATE_CATEGORY);
608
953
  }
609
954
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPTextTemplateCategoryDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
610
955
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPTextTemplateCategoryDataSeeder }); }
@@ -618,7 +963,7 @@ class AXPTextTemplateDataSeeder {
618
963
  this.storageService = inject(AXPDexieEntityStorageService);
619
964
  }
620
965
  async seed() {
621
- await this.storageService.initial(TEMPLATE_SOURCE_NAME, TEXT_TEMPLATES);
966
+ await this.storageService.initial(`${AXMTextTemplateManagementModuleConst.moduleName}.${AXMTextTemplateManagementModuleConst.templateEntity}`, TEXT_TEMPLATES);
622
967
  }
623
968
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPTextTemplateDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
624
969
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPTextTemplateDataSeeder }); }
@@ -629,17 +974,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
629
974
 
630
975
  class AXCMockModule {
631
976
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXCMockModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
632
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.0", ngImport: i0, type: AXCMockModule }); }
977
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.0", ngImport: i0, type: AXCMockModule, imports: [AXCFormManagementMockModule, AXCConversationMockModule] }); }
633
978
  static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXCMockModule, providers: [
634
979
  AXPDexieEntityStorageService,
635
980
  {
636
981
  provide: AXMNotificationService,
637
982
  useClass: AXMMockNotificationService,
638
983
  },
639
- {
640
- provide: AXPDesignerConnectorAbstract,
641
- useClass: AXPMockDesignerConnector,
642
- },
643
984
  {
644
985
  provide: AXPEntityStorageService,
645
986
  useClass: AXPDexieEntityStorageService,
@@ -670,15 +1011,31 @@ class AXCMockModule {
670
1011
  multi: true,
671
1012
  },
672
1013
  {
673
- provide: AXMCommentService,
674
- useClass: AXMCommentMockService,
1014
+ provide: AXP_DATA_SEEDER_TOKEN,
1015
+ useClass: AXPCurrencyDataSeeder,
1016
+ multi: true,
675
1017
  },
676
- ] }); }
1018
+ {
1019
+ provide: AXP_DATA_SEEDER_TOKEN,
1020
+ useClass: AXPTimeZoneDataSeeder,
1021
+ multi: true,
1022
+ },
1023
+ {
1024
+ provide: AXP_DATA_SEEDER_TOKEN,
1025
+ useClass: AXPCountryDataSeeder,
1026
+ multi: true,
1027
+ },
1028
+ {
1029
+ provide: AXP_DATA_SEEDER_TOKEN,
1030
+ useClass: AXPCultureDataSeeder,
1031
+ multi: true,
1032
+ },
1033
+ ], imports: [AXCFormManagementMockModule, AXCConversationMockModule] }); }
677
1034
  }
678
1035
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXCMockModule, decorators: [{
679
1036
  type: NgModule,
680
1037
  args: [{
681
- imports: [],
1038
+ imports: [AXCFormManagementMockModule, AXCConversationMockModule],
682
1039
  exports: [],
683
1040
  declarations: [],
684
1041
  providers: [
@@ -687,10 +1044,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
687
1044
  provide: AXMNotificationService,
688
1045
  useClass: AXMMockNotificationService,
689
1046
  },
690
- {
691
- provide: AXPDesignerConnectorAbstract,
692
- useClass: AXPMockDesignerConnector,
693
- },
694
1047
  {
695
1048
  provide: AXPEntityStorageService,
696
1049
  useClass: AXPDexieEntityStorageService,
@@ -721,8 +1074,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
721
1074
  multi: true,
722
1075
  },
723
1076
  {
724
- provide: AXMCommentService,
725
- useClass: AXMCommentMockService,
1077
+ provide: AXP_DATA_SEEDER_TOKEN,
1078
+ useClass: AXPCurrencyDataSeeder,
1079
+ multi: true,
1080
+ },
1081
+ {
1082
+ provide: AXP_DATA_SEEDER_TOKEN,
1083
+ useClass: AXPTimeZoneDataSeeder,
1084
+ multi: true,
1085
+ },
1086
+ {
1087
+ provide: AXP_DATA_SEEDER_TOKEN,
1088
+ useClass: AXPCountryDataSeeder,
1089
+ multi: true,
1090
+ },
1091
+ {
1092
+ provide: AXP_DATA_SEEDER_TOKEN,
1093
+ useClass: AXPCultureDataSeeder,
1094
+ multi: true,
726
1095
  },
727
1096
  ],
728
1097
  }]