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

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