@acorex-platform/module-location-management-client 0.0.32 → 0.0.33

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 (36) hide show
  1. package/fesm2022/acorex-platform-module-location-management-client-contracts-entities-geographic-region.mjs +782 -0
  2. package/fesm2022/acorex-platform-module-location-management-client-contracts-entities-geographic-region.mjs.map +1 -0
  3. package/fesm2022/acorex-platform-module-location-management-client-contracts-entities-location-assignment.mjs +400 -0
  4. package/fesm2022/acorex-platform-module-location-management-client-contracts-entities-location-assignment.mjs.map +1 -0
  5. package/fesm2022/acorex-platform-module-location-management-client-contracts-entities-location-role.mjs +156 -0
  6. package/fesm2022/acorex-platform-module-location-management-client-contracts-entities-location-role.mjs.map +1 -0
  7. package/fesm2022/acorex-platform-module-location-management-client-contracts-entities-location-type.mjs +288 -0
  8. package/fesm2022/acorex-platform-module-location-management-client-contracts-entities-location-type.mjs.map +1 -0
  9. package/fesm2022/acorex-platform-module-location-management-client-contracts-entities-location.mjs +1356 -0
  10. package/fesm2022/acorex-platform-module-location-management-client-contracts-entities-location.mjs.map +1 -0
  11. package/fesm2022/acorex-platform-module-location-management-client-contracts-entity-catalog-acorex-platform-module-location-management-client-contracts-entity-catalog-B1rJccHr.mjs +70 -0
  12. package/fesm2022/acorex-platform-module-location-management-client-contracts-entity-catalog-acorex-platform-module-location-management-client-contracts-entity-catalog-B1rJccHr.mjs.map +1 -0
  13. package/fesm2022/acorex-platform-module-location-management-client-contracts-entity-catalog-geographic-region.entity-CUhM4K8a.mjs +735 -0
  14. package/fesm2022/acorex-platform-module-location-management-client-contracts-entity-catalog-geographic-region.entity-CUhM4K8a.mjs.map +1 -0
  15. package/fesm2022/acorex-platform-module-location-management-client-contracts-entity-catalog-location-assignment.entity-Cw46YCj9.mjs +198 -0
  16. package/fesm2022/acorex-platform-module-location-management-client-contracts-entity-catalog-location-assignment.entity-Cw46YCj9.mjs.map +1 -0
  17. package/fesm2022/acorex-platform-module-location-management-client-contracts-entity-catalog-location-assignment.utils-CfwbSQiM.mjs +160 -0
  18. package/fesm2022/acorex-platform-module-location-management-client-contracts-entity-catalog-location-assignment.utils-CfwbSQiM.mjs.map +1 -0
  19. package/fesm2022/acorex-platform-module-location-management-client-contracts-entity-catalog-location-role.entity-CEtJEhCf.mjs +109 -0
  20. package/fesm2022/acorex-platform-module-location-management-client-contracts-entity-catalog-location-role.entity-CEtJEhCf.mjs.map +1 -0
  21. package/fesm2022/acorex-platform-module-location-management-client-contracts-entity-catalog-location-type.entity-BXuQ_A7h.mjs +241 -0
  22. package/fesm2022/acorex-platform-module-location-management-client-contracts-entity-catalog-location-type.entity-BXuQ_A7h.mjs.map +1 -0
  23. package/fesm2022/acorex-platform-module-location-management-client-contracts-entity-catalog-location.entity-CmnVKTG-.mjs +1154 -0
  24. package/fesm2022/acorex-platform-module-location-management-client-contracts-entity-catalog-location.entity-CmnVKTG-.mjs.map +1 -0
  25. package/fesm2022/acorex-platform-module-location-management-client-contracts-entity-catalog.mjs +2 -0
  26. package/fesm2022/acorex-platform-module-location-management-client-contracts-entity-catalog.mjs.map +1 -0
  27. package/fesm2022/acorex-platform-module-location-management-client-local-entities.mjs +33 -0
  28. package/fesm2022/acorex-platform-module-location-management-client-local-entities.mjs.map +1 -0
  29. package/package.json +29 -1
  30. package/types/acorex-platform-module-location-management-client-contracts-entities-geographic-region.d.ts +5 -0
  31. package/types/acorex-platform-module-location-management-client-contracts-entities-location-assignment.d.ts +5 -0
  32. package/types/acorex-platform-module-location-management-client-contracts-entities-location-role.d.ts +5 -0
  33. package/types/acorex-platform-module-location-management-client-contracts-entities-location-type.d.ts +5 -0
  34. package/types/acorex-platform-module-location-management-client-contracts-entities-location.d.ts +5 -0
  35. package/types/acorex-platform-module-location-management-client-contracts-entity-catalog.d.ts +10 -0
  36. package/types/acorex-platform-module-location-management-client-local-entities.d.ts +12 -0
@@ -0,0 +1,782 @@
1
+ import { AXPWidgetsCatalog, AXPRegionalSetting } from '@acorex-platform/framework-shared/core';
2
+ import { createAllQueryView, entityMasterCrudActions, entityMasterRecordActions } from '@acorex-platform/framework-shared/entity';
3
+
4
+ const config = {
5
+ i18n: 'location-management',
6
+ };
7
+ const RootConfig = {
8
+ config,
9
+ module: {
10
+ name: 'LocationManagement',
11
+ title: '@location-management:module.title',
12
+ icon: 'fa-light fa-map-marker-alt',
13
+ },
14
+ entities: {
15
+ location: {
16
+ name: 'Location',
17
+ title: '@location-management:locations.entities.location.title',
18
+ titlePlural: '@location-management:locations.entities.location.plural',
19
+ icon: 'fa-light fa-map-marker-alt',
20
+ },
21
+ locationType: {
22
+ name: 'LocationType',
23
+ title: '@location-management:location-types.entities.location-type.title',
24
+ titlePlural: '@location-management:location-types.entities.location-type.plural',
25
+ icon: 'fa-light fa-tags',
26
+ },
27
+ locationRole: {
28
+ name: 'LocationRole',
29
+ title: '@location-management:location-roles.entities.location-role.title',
30
+ titlePlural: '@location-management:location-roles.entities.location-role.plural',
31
+ icon: 'fa-light fa-map-pin',
32
+ },
33
+ geographicRegion: {
34
+ name: 'GeographicRegion',
35
+ title: '@location-management:geographic-regions.entities.geographic-region.title',
36
+ titlePlural: '@location-management:geographic-regions.entities.geographic-region.plural',
37
+ icon: 'fa-light fa-globe',
38
+ },
39
+ locationAssignment: {
40
+ name: 'LocationAssignment',
41
+ title: `@${config.i18n}:location-assignments.entities.location-assignment.title`,
42
+ titlePlural: `@${config.i18n}:location-assignments.entities.location-assignment.plural`,
43
+ icon: 'fa-light fa-building-user',
44
+ },
45
+ },
46
+ };
47
+
48
+ async function geographicRegionFactory() {
49
+ const entityDef = {
50
+ module: RootConfig.module.name,
51
+ name: RootConfig.entities.geographicRegion.name,
52
+ parentKey: 'parentId',
53
+ title: RootConfig.entities.geographicRegion.title,
54
+ icon: RootConfig.entities.geographicRegion.icon,
55
+ formats: {
56
+ individual: RootConfig.entities.geographicRegion.title,
57
+ plural: RootConfig.entities.geographicRegion.titlePlural,
58
+ searchResult: {
59
+ title: '{{ title }}',
60
+ description: '{{ context.eval("type") + (context.eval("parentId") ? " (Child)" : "") }}',
61
+ },
62
+ },
63
+ plugins: [{ name: 'archive' }],
64
+ groups: [
65
+ {
66
+ id: 'basic-info',
67
+ title: '@general:terms.interface.basic-info',
68
+ },
69
+ {
70
+ id: 'geographic-data',
71
+ title: '@general:terms.interface.geographic-details',
72
+ },
73
+ {
74
+ id: 'additional-info',
75
+ title: '@general:terms.interface.additional-info',
76
+ },
77
+ {
78
+ id: 'settings',
79
+ title: '@general:terms.interface.settings',
80
+ },
81
+ ],
82
+ properties: [
83
+ {
84
+ name: 'title',
85
+ title: '@general:terms.common.title',
86
+ groupId: 'basic-info',
87
+ options: {
88
+ sort: {
89
+ enabled: true,
90
+ },
91
+ filter: {
92
+ advance: {
93
+ enabled: true,
94
+ },
95
+ inline: {
96
+ enabled: true,
97
+ },
98
+ },
99
+ },
100
+ schema: {
101
+ dataType: 'string',
102
+ interface: {
103
+ type: AXPWidgetsCatalog.text,
104
+ options: {
105
+ multiLanguage: true,
106
+ placeholder: 'Enter region title',
107
+ },
108
+ },
109
+ },
110
+ validations: [
111
+ {
112
+ rule: 'required',
113
+ },
114
+ ],
115
+ },
116
+ {
117
+ name: 'code',
118
+ title: '@general:terms.common.code',
119
+ groupId: 'basic-info',
120
+ options: {
121
+ sort: {
122
+ enabled: true,
123
+ },
124
+ filter: {
125
+ advance: {
126
+ enabled: true,
127
+ },
128
+ inline: {
129
+ enabled: true,
130
+ },
131
+ },
132
+ },
133
+ schema: {
134
+ dataType: 'string',
135
+ interface: {
136
+ type: AXPWidgetsCatalog.text,
137
+ options: {
138
+ placeholder: 'Region code (e.g., CA, US)',
139
+ },
140
+ },
141
+ },
142
+ },
143
+ {
144
+ name: 'type',
145
+ title: '@location-management:geographic-regions.entities.geographic-region.fields.type',
146
+ groupId: 'basic-info',
147
+ options: {
148
+ sort: {
149
+ enabled: true,
150
+ },
151
+ filter: {
152
+ advance: {
153
+ enabled: true,
154
+ },
155
+ inline: {
156
+ enabled: true,
157
+ },
158
+ },
159
+ },
160
+ schema: {
161
+ dataType: 'string',
162
+ interface: {
163
+ type: AXPWidgetsCatalog.select,
164
+ options: {
165
+ valueField: 'code',
166
+ textField: 'title',
167
+ dataSource: [
168
+ { code: 'country', title: 'Country' },
169
+ { code: 'state', title: 'State/Province' },
170
+ { code: 'city', title: 'City' },
171
+ { code: 'district', title: 'District' },
172
+ { code: 'subdistrict', title: 'Subdistrict' },
173
+ { code: 'territory', title: 'Territory' },
174
+ ],
175
+ },
176
+ },
177
+ },
178
+ validations: [
179
+ {
180
+ rule: 'required',
181
+ },
182
+ ],
183
+ },
184
+ {
185
+ name: 'parentId',
186
+ title: '@location-management:geographic-regions.entities.geographic-region.fields.parent-region',
187
+ groupId: 'basic-info',
188
+ options: {
189
+ filter: {
190
+ advance: {
191
+ enabled: true,
192
+ },
193
+ inline: {
194
+ enabled: true,
195
+ },
196
+ },
197
+ },
198
+ schema: {
199
+ dataType: 'object',
200
+ interface: {
201
+ type: AXPWidgetsCatalog.lookup,
202
+ options: {
203
+ entity: `${RootConfig.module.name}.${RootConfig.entities.geographicRegion.name}`,
204
+ expose: [
205
+ { source: 'id', target: 'parentRegion.id' },
206
+ { source: 'name', target: 'parentRegion.name' },
207
+ { source: 'type', target: 'parentRegion.type' },
208
+ ],
209
+ },
210
+ },
211
+ },
212
+ },
213
+ {
214
+ name: 'coordinates',
215
+ title: '@location-management:geographic-regions.entities.geographic-region.fields.coordinates',
216
+ groupId: 'geographic-data',
217
+ options: {
218
+ filter: {
219
+ advance: {
220
+ enabled: false,
221
+ },
222
+ },
223
+ },
224
+ schema: {
225
+ dataType: 'string',
226
+ interface: {
227
+ type: AXPWidgetsCatalog.map,
228
+ options: {
229
+ hasDraw: true,
230
+ maxPolygon: 0,
231
+ fitToDraw: true,
232
+ },
233
+ },
234
+ },
235
+ },
236
+ {
237
+ name: 'timezone',
238
+ title: '@location-management:geographic-regions.entities.geographic-region.fields.timezone',
239
+ groupId: 'geographic-data',
240
+ options: {
241
+ filter: {
242
+ advance: {
243
+ enabled: true,
244
+ },
245
+ },
246
+ },
247
+ schema: {
248
+ dataType: 'string',
249
+ defaultValue: `{{ settings.get('${AXPRegionalSetting.TimeZone}') }}`,
250
+ interface: {
251
+ type: AXPWidgetsCatalog.lookup,
252
+ options: {
253
+ entity: 'LocaleManagement.Timezones',
254
+ look: 'select',
255
+ allowSearch: true,
256
+ valueField: 'code',
257
+ textField: 'title',
258
+ placeholder: 'e.g., America/New_York',
259
+ filter: {
260
+ logic: 'and',
261
+ filters: [{ field: 'isActive', operator: { type: 'equal' }, value: true }],
262
+ },
263
+ },
264
+ },
265
+ },
266
+ },
267
+ {
268
+ name: 'population',
269
+ title: '@location-management:geographic-regions.entities.geographic-region.fields.population',
270
+ groupId: 'additional-info',
271
+ options: {
272
+ filter: {
273
+ advance: {
274
+ enabled: true,
275
+ },
276
+ },
277
+ },
278
+ schema: {
279
+ dataType: 'number',
280
+ interface: {
281
+ type: AXPWidgetsCatalog.number,
282
+ options: {
283
+ minValue: 0,
284
+ },
285
+ },
286
+ },
287
+ },
288
+ {
289
+ name: 'area',
290
+ title: '@location-management:geographic-regions.entities.geographic-region.fields.area',
291
+ groupId: 'additional-info',
292
+ options: {
293
+ filter: {
294
+ advance: {
295
+ enabled: true,
296
+ },
297
+ },
298
+ },
299
+ schema: {
300
+ dataType: 'number',
301
+ interface: {
302
+ type: AXPWidgetsCatalog.number,
303
+ options: {
304
+ minValue: 0,
305
+ placeholder: 'Area in square kilometers',
306
+ },
307
+ },
308
+ },
309
+ },
310
+ {
311
+ name: 'currencyId',
312
+ title: '@location-management:geographic-regions.entities.geographic-region.fields.currency',
313
+ groupId: 'additional-info',
314
+ options: {
315
+ sort: { enabled: false },
316
+ filter: {
317
+ advance: {
318
+ enabled: true,
319
+ },
320
+ inline: { enabled: false },
321
+ },
322
+ },
323
+ schema: {
324
+ dataType: 'string',
325
+ interface: {
326
+ type: AXPWidgetsCatalog.lookup,
327
+ options: {
328
+ entity: `${"FinancialCore"}.${"Currency"}`,
329
+ multiple: false,
330
+ look: 'select',
331
+ textField: 'code',
332
+ valueField: 'id',
333
+ expose: [
334
+ { source: 'id', target: 'currency.id' },
335
+ { source: 'code', target: 'currency.code' },
336
+ { source: 'title', target: 'currency.title' },
337
+ { source: 'symbol', target: 'currency.symbol' },
338
+ ],
339
+ },
340
+ },
341
+ },
342
+ },
343
+ ],
344
+ columns: [
345
+ { name: 'title', options: { width: '400px', order: 1 } },
346
+ { name: 'code', options: { width: '150px', order: 2 } },
347
+ { name: 'type', options: { width: '150px', dataPath: 'type.title', order: 3 } },
348
+ { name: 'currencyId', options: { width: '150px', dataPath: 'currency.code', order: 4 } },
349
+ ],
350
+ interfaces: {
351
+ master: {
352
+ create: {
353
+ sections: [
354
+ {
355
+ id: 'basic-info',
356
+ },
357
+ {
358
+ id: 'geographic-data',
359
+ },
360
+ {
361
+ id: 'additional-info',
362
+ },
363
+ {
364
+ id: 'settings',
365
+ },
366
+ ],
367
+ properties: [
368
+ {
369
+ name: 'title',
370
+ layout: {
371
+ positions: {
372
+ sm: {
373
+ colSpan: 12,
374
+ },
375
+ md: {
376
+ colSpan: 6,
377
+ },
378
+ },
379
+ },
380
+ },
381
+ {
382
+ name: 'code',
383
+ layout: {
384
+ positions: {
385
+ sm: {
386
+ colSpan: 12,
387
+ },
388
+ md: {
389
+ colSpan: 6,
390
+ },
391
+ },
392
+ },
393
+ },
394
+ {
395
+ name: 'type',
396
+ layout: {
397
+ positions: {
398
+ sm: {
399
+ colSpan: 12,
400
+ },
401
+ md: {
402
+ colSpan: 6,
403
+ },
404
+ },
405
+ },
406
+ },
407
+ {
408
+ name: 'parentId',
409
+ layout: {
410
+ positions: {
411
+ sm: {
412
+ colSpan: 12,
413
+ },
414
+ md: {
415
+ colSpan: 6,
416
+ },
417
+ },
418
+ },
419
+ },
420
+ {
421
+ name: 'coordinates',
422
+ layout: {
423
+ positions: {
424
+ sm: {
425
+ colSpan: 12,
426
+ },
427
+ },
428
+ },
429
+ },
430
+ {
431
+ name: 'timezone',
432
+ layout: {
433
+ positions: {
434
+ sm: {
435
+ colSpan: 12,
436
+ },
437
+ md: {
438
+ colSpan: 4,
439
+ },
440
+ },
441
+ },
442
+ },
443
+ {
444
+ name: 'population',
445
+ layout: {
446
+ positions: {
447
+ sm: {
448
+ colSpan: 12,
449
+ },
450
+ md: {
451
+ colSpan: 4,
452
+ },
453
+ },
454
+ },
455
+ },
456
+ {
457
+ name: 'area',
458
+ layout: {
459
+ positions: {
460
+ sm: {
461
+ colSpan: 12,
462
+ },
463
+ md: {
464
+ colSpan: 4,
465
+ },
466
+ },
467
+ },
468
+ },
469
+ {
470
+ name: 'currencyId',
471
+ layout: {
472
+ positions: {
473
+ sm: {
474
+ colSpan: 12,
475
+ },
476
+ md: {
477
+ colSpan: 4,
478
+ },
479
+ },
480
+ },
481
+ },
482
+ ],
483
+ },
484
+ update: {
485
+ sections: [
486
+ {
487
+ id: 'basic-info',
488
+ },
489
+ {
490
+ id: 'geographic-data',
491
+ },
492
+ {
493
+ id: 'additional-info',
494
+ },
495
+ {
496
+ id: 'settings',
497
+ },
498
+ ],
499
+ properties: [
500
+ {
501
+ name: 'title',
502
+ layout: {
503
+ positions: {
504
+ sm: {
505
+ colSpan: 12,
506
+ },
507
+ md: {
508
+ colSpan: 6,
509
+ },
510
+ },
511
+ },
512
+ },
513
+ {
514
+ name: 'code',
515
+ layout: {
516
+ positions: {
517
+ sm: {
518
+ colSpan: 12,
519
+ },
520
+ md: {
521
+ colSpan: 6,
522
+ },
523
+ },
524
+ },
525
+ },
526
+ {
527
+ name: 'type',
528
+ layout: {
529
+ positions: {
530
+ sm: {
531
+ colSpan: 12,
532
+ },
533
+ md: {
534
+ colSpan: 6,
535
+ },
536
+ },
537
+ },
538
+ },
539
+ {
540
+ name: 'parentId',
541
+ layout: {
542
+ positions: {
543
+ sm: {
544
+ colSpan: 12,
545
+ },
546
+ md: {
547
+ colSpan: 6,
548
+ },
549
+ },
550
+ },
551
+ },
552
+ {
553
+ name: 'coordinates',
554
+ layout: {
555
+ positions: {
556
+ sm: {
557
+ colSpan: 12,
558
+ },
559
+ },
560
+ },
561
+ },
562
+ {
563
+ name: 'timezone',
564
+ layout: {
565
+ positions: {
566
+ sm: {
567
+ colSpan: 12,
568
+ },
569
+ md: {
570
+ colSpan: 4,
571
+ },
572
+ },
573
+ },
574
+ },
575
+ {
576
+ name: 'population',
577
+ layout: {
578
+ positions: {
579
+ sm: {
580
+ colSpan: 12,
581
+ },
582
+ md: {
583
+ colSpan: 4,
584
+ },
585
+ },
586
+ },
587
+ },
588
+ {
589
+ name: 'area',
590
+ layout: {
591
+ positions: {
592
+ sm: {
593
+ colSpan: 12,
594
+ },
595
+ md: {
596
+ colSpan: 4,
597
+ },
598
+ },
599
+ },
600
+ },
601
+ {
602
+ name: 'currencyId',
603
+ layout: {
604
+ positions: {
605
+ sm: {
606
+ colSpan: 12,
607
+ },
608
+ md: {
609
+ colSpan: 4,
610
+ },
611
+ },
612
+ },
613
+ },
614
+ ],
615
+ },
616
+ single: {
617
+ title: '{{title}}',
618
+ sections: [
619
+ {
620
+ id: 'basic-info',
621
+ layout: {
622
+ positions: {
623
+ lg: {
624
+ colSpan: 12,
625
+ },
626
+ },
627
+ },
628
+ },
629
+ {
630
+ id: 'geographic-data',
631
+ layout: {
632
+ positions: {
633
+ lg: {
634
+ colSpan: 12,
635
+ },
636
+ },
637
+ },
638
+ },
639
+ {
640
+ id: 'additional-info',
641
+ layout: {
642
+ positions: {
643
+ lg: {
644
+ colSpan: 12,
645
+ },
646
+ },
647
+ },
648
+ },
649
+ {
650
+ id: 'settings',
651
+ layout: {
652
+ positions: {
653
+ lg: {
654
+ colSpan: 12,
655
+ },
656
+ },
657
+ },
658
+ },
659
+ ],
660
+ properties: [
661
+ {
662
+ name: 'title',
663
+ layout: {
664
+ positions: {
665
+ lg: {
666
+ colSpan: 6,
667
+ order: 1,
668
+ },
669
+ },
670
+ },
671
+ },
672
+ {
673
+ name: 'code',
674
+ layout: {
675
+ positions: {
676
+ lg: {
677
+ colSpan: 6,
678
+ order: 2,
679
+ },
680
+ },
681
+ },
682
+ },
683
+ {
684
+ name: 'type',
685
+ layout: {
686
+ positions: {
687
+ lg: {
688
+ colSpan: 6,
689
+ order: 3,
690
+ },
691
+ },
692
+ },
693
+ },
694
+ {
695
+ name: 'parentId',
696
+ layout: {
697
+ positions: {
698
+ lg: {
699
+ colSpan: 6,
700
+ order: 4,
701
+ },
702
+ },
703
+ },
704
+ },
705
+ {
706
+ name: 'coordinates',
707
+ layout: {
708
+ positions: {
709
+ lg: {
710
+ colSpan: 12,
711
+ order: 5,
712
+ },
713
+ },
714
+ },
715
+ },
716
+ {
717
+ name: 'timezone',
718
+ layout: {
719
+ positions: {
720
+ lg: {
721
+ colSpan: 4,
722
+ order: 6,
723
+ },
724
+ },
725
+ },
726
+ },
727
+ {
728
+ name: 'population',
729
+ layout: {
730
+ positions: {
731
+ lg: {
732
+ colSpan: 4,
733
+ order: 7,
734
+ },
735
+ },
736
+ },
737
+ },
738
+ {
739
+ name: 'area',
740
+ layout: {
741
+ positions: {
742
+ lg: {
743
+ colSpan: 4,
744
+ order: 8,
745
+ },
746
+ },
747
+ },
748
+ },
749
+ {
750
+ name: 'currencyId',
751
+ layout: {
752
+ positions: {
753
+ lg: {
754
+ colSpan: 4,
755
+ order: 9,
756
+ },
757
+ },
758
+ },
759
+ },
760
+ ],
761
+ actions: [...entityMasterRecordActions()],
762
+ },
763
+ list: {
764
+ actions: [...entityMasterCrudActions()],
765
+ views: [
766
+ createAllQueryView({
767
+ sorts: [{ name: 'title', dir: 'asc' }],
768
+ }),
769
+ ],
770
+ },
771
+ },
772
+ },
773
+ };
774
+ return entityDef;
775
+ }
776
+
777
+ /**
778
+ * Generated bundle index. Do not edit.
779
+ */
780
+
781
+ export { geographicRegionFactory };
782
+ //# sourceMappingURL=acorex-platform-module-location-management-client-contracts-entities-geographic-region.mjs.map