@acorex-platform/module-location-management-client 0.0.30 → 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 (38) 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/fesm2022/acorex-platform-module-location-management-client.mjs +1 -1
  30. package/fesm2022/acorex-platform-module-location-management-client.mjs.map +1 -1
  31. package/package.json +29 -1
  32. package/types/acorex-platform-module-location-management-client-contracts-entities-geographic-region.d.ts +5 -0
  33. package/types/acorex-platform-module-location-management-client-contracts-entities-location-assignment.d.ts +5 -0
  34. package/types/acorex-platform-module-location-management-client-contracts-entities-location-role.d.ts +5 -0
  35. package/types/acorex-platform-module-location-management-client-contracts-entities-location-type.d.ts +5 -0
  36. package/types/acorex-platform-module-location-management-client-contracts-entities-location.d.ts +5 -0
  37. package/types/acorex-platform-module-location-management-client-contracts-entity-catalog.d.ts +10 -0
  38. package/types/acorex-platform-module-location-management-client-local-entities.d.ts +12 -0
@@ -0,0 +1,1154 @@
1
+ import { AXPSystemActionType, AXPWidgetsCatalog, AXPRegionalSetting } from '@acorex-platform/framework-shared/core';
2
+ import { entityMasterCreateAction, entityMasterBulkDeleteAction, entityMasterDeleteAction, entityMasterViewAction, AXPEntityCommandScope, entityDetailsEditAction, entityOverrideDetailsViewAction, 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
+ import { l as locationAssignmentLocationConditions } from './acorex-platform-module-location-management-client-contracts-entity-catalog-location-assignment.utils-CfwbSQiM.mjs';
5
+
6
+ //#region ---- Command keys ----
7
+ const ASSIGN_EXISTING_LOCATION = `${RootConfig.module.name}.${RootConfig.entities.locationAssignment.name}:AssignExistingLocation`;
8
+ const CREATE_WITH_NEW_LOCATION = `${RootConfig.module.name}.${RootConfig.entities.locationAssignment.name}:CreateWithNewLocation`;
9
+ //#endregion
10
+ //#region ---- Location assignment related-entity actions ----
11
+ const assigneeProcessOptions = () => ({
12
+ process: {
13
+ redirect: false,
14
+ canCreateNewOne: true,
15
+ data: {
16
+ 'ownerRef.type': '{{ host.entity() }}',
17
+ 'ownerRef.id': '{{ host.eval("id") }}',
18
+ 'ownerRef.title': '{{ host.eval("party.title") }}',
19
+ },
20
+ },
21
+ });
22
+ /** Read-only assignments list on Location detail (no create/update/delete). */
23
+ function locationAssignmentReadOnlyRelatedActions() {
24
+ return [
25
+ { ...entityMasterCreateAction(), hidden: true },
26
+ { ...entityMasterBulkDeleteAction(), hidden: true },
27
+ { ...entityMasterDeleteAction(), hidden: true },
28
+ { ...entityMasterViewAction(), hidden: true },
29
+ ];
30
+ }
31
+ function locationAssignmentPartyCreateAction() {
32
+ const assigneeOptions = assigneeProcessOptions();
33
+ return {
34
+ name: 'Create',
35
+ title: '@general:actions.create.title',
36
+ command: { name: 'Entity:Create' },
37
+ icon: 'fa-light fa-plus',
38
+ priority: 'primary',
39
+ type: AXPSystemActionType.Create,
40
+ scope: AXPEntityCommandScope.TypeLevel,
41
+ items: [
42
+ {
43
+ name: 'AssignExistingLocation',
44
+ title: '@location-management:location-assignments.actions.assign-existing-location.title',
45
+ command: { name: ASSIGN_EXISTING_LOCATION, options: assigneeOptions },
46
+ icon: 'fa-light fa-map-marker-alt',
47
+ priority: 'primary',
48
+ type: AXPSystemActionType.Create,
49
+ scope: AXPEntityCommandScope.TypeLevel,
50
+ },
51
+ {
52
+ name: 'CreateWithNewLocation',
53
+ title: '@location-management:location-assignments.actions.create-with-new-location.title',
54
+ command: { name: CREATE_WITH_NEW_LOCATION, options: assigneeOptions },
55
+ icon: 'fa-light fa-location-plus',
56
+ priority: 'primary',
57
+ type: AXPSystemActionType.Create,
58
+ scope: AXPEntityCommandScope.TypeLevel,
59
+ },
60
+ ],
61
+ };
62
+ }
63
+ /**
64
+ * Actions for LocationAssignment when shown from Party/Customer/Supplier.
65
+ * Create menu: assign existing location or create new location with assignee prefilled.
66
+ */
67
+ function locationAssignmentDetailsCrudActionsForPartyContext(_partyIdContextPath = 'id') {
68
+ return [
69
+ { ...entityMasterCreateAction(), hidden: true },
70
+ locationAssignmentPartyCreateAction(),
71
+ entityDetailsEditAction(),
72
+ entityOverrideDetailsViewAction(),
73
+ ];
74
+ }
75
+ //#endregion
76
+
77
+ async function locationFactory() {
78
+ const entityDef = {
79
+ module: RootConfig.module.name,
80
+ name: RootConfig.entities.location.name,
81
+ icon: 'fa-solid fa-location-dot',
82
+ title: RootConfig.entities.location.title,
83
+ formats: {
84
+ individual: RootConfig.entities.location.title,
85
+ plural: RootConfig.entities.location.titlePlural,
86
+ searchResult: {
87
+ title: '{{ title }}',
88
+ description: '{{ fullAddress }}',
89
+ },
90
+ },
91
+ plugins: [
92
+ { name: 'archive' },
93
+ {
94
+ name: 'computed-property',
95
+ options: {
96
+ fields: [
97
+ {
98
+ name: 'fullAddress',
99
+ title: '@general:terms.geography.address',
100
+ value: '{{ address.format({ street1: context.eval("street1"), street2: context.eval("street2"), country: context.eval("country"), state: context.eval("state"), city: context.eval("city"), postalCode: context.eval("postalCode") }) }}',
101
+ group: {
102
+ id: 'address',
103
+ title: '@location-management:locations.entities.location.groups.address-details',
104
+ },
105
+ visible: false,
106
+ recompute: { middleware: true },
107
+ showAs: { type: AXPWidgetsCatalog.text },
108
+ },
109
+ ],
110
+ },
111
+ },
112
+ ],
113
+ groups: [
114
+ {
115
+ id: 'basic-info',
116
+ title: '@general:terms.interface.basic-info',
117
+ },
118
+ {
119
+ id: 'address',
120
+ title: '@location-management:locations.entities.location.groups.address-details',
121
+ },
122
+ {
123
+ id: 'geographic',
124
+ title: '@general:terms.interface.geographic-details',
125
+ },
126
+ {
127
+ id: 'additional',
128
+ title: '@general:terms.interface.additional-info',
129
+ },
130
+ ],
131
+ properties: [
132
+ {
133
+ name: 'code',
134
+ title: '@location-management:locations.entities.location.fields.code',
135
+ groupId: 'basic-info',
136
+ options: {
137
+ sort: {
138
+ enabled: true,
139
+ },
140
+ filter: {
141
+ advance: {
142
+ enabled: true,
143
+ },
144
+ inline: {
145
+ enabled: true,
146
+ },
147
+ },
148
+ },
149
+ schema: {
150
+ dataType: 'string',
151
+ interface: {
152
+ type: AXPWidgetsCatalog.text,
153
+ options: {
154
+ placeholder: 'Optional location code',
155
+ },
156
+ },
157
+ },
158
+ },
159
+ {
160
+ name: 'title',
161
+ title: '@general:terms.common.title',
162
+ groupId: 'basic-info',
163
+ options: {
164
+ sort: {
165
+ enabled: true,
166
+ },
167
+ filter: {
168
+ advance: {
169
+ enabled: true,
170
+ },
171
+ inline: {
172
+ enabled: true,
173
+ },
174
+ },
175
+ },
176
+ schema: {
177
+ dataType: 'string',
178
+ interface: {
179
+ type: AXPWidgetsCatalog.text,
180
+ options: {
181
+ placeholder: 'Enter location name',
182
+ },
183
+ },
184
+ },
185
+ validations: [
186
+ {
187
+ rule: 'required',
188
+ },
189
+ ],
190
+ },
191
+ {
192
+ name: 'locationTypeId',
193
+ title: '@location-management:locations.entities.location.fields.location-type',
194
+ groupId: 'basic-info',
195
+ options: {
196
+ sort: {
197
+ enabled: true,
198
+ },
199
+ filter: {
200
+ advance: {
201
+ enabled: true,
202
+ },
203
+ inline: {
204
+ enabled: true,
205
+ },
206
+ },
207
+ },
208
+ schema: {
209
+ dataType: 'object',
210
+ interface: {
211
+ type: AXPWidgetsCatalog.lookup,
212
+ options: {
213
+ entity: `${RootConfig.module.name}.${RootConfig.entities.locationType.name}`,
214
+ look: 'select',
215
+ expose: [
216
+ { source: 'id', target: 'locationType.id' },
217
+ { source: 'title', target: 'locationType.title' },
218
+ ],
219
+ },
220
+ },
221
+ },
222
+ validations: [
223
+ {
224
+ rule: 'required',
225
+ },
226
+ ],
227
+ },
228
+ {
229
+ name: 'street1',
230
+ title: '@location-management:locations.entities.location.fields.street1',
231
+ groupId: 'address',
232
+ options: {
233
+ sort: {
234
+ enabled: true,
235
+ },
236
+ filter: {
237
+ advance: {
238
+ enabled: true,
239
+ },
240
+ inline: {
241
+ enabled: true,
242
+ },
243
+ },
244
+ },
245
+ schema: {
246
+ dataType: 'string',
247
+ interface: {
248
+ type: AXPWidgetsCatalog.text,
249
+ options: {
250
+ placeholder: 'Enter street address',
251
+ },
252
+ },
253
+ },
254
+ validations: [
255
+ {
256
+ rule: 'required',
257
+ },
258
+ ],
259
+ },
260
+ {
261
+ name: 'street2',
262
+ title: '@location-management:locations.entities.location.fields.street2',
263
+ groupId: 'address',
264
+ options: {
265
+ filter: {
266
+ advance: {
267
+ enabled: true,
268
+ },
269
+ },
270
+ },
271
+ schema: {
272
+ dataType: 'string',
273
+ interface: {
274
+ type: AXPWidgetsCatalog.text,
275
+ options: {
276
+ placeholder: 'Apartment, suite, etc.',
277
+ },
278
+ },
279
+ },
280
+ },
281
+ {
282
+ name: 'countryId',
283
+ title: '@location-management:locations.entities.location.fields.country',
284
+ groupId: 'address',
285
+ options: {
286
+ sort: {
287
+ enabled: true,
288
+ },
289
+ filter: {
290
+ advance: {
291
+ enabled: true,
292
+ },
293
+ inline: {
294
+ enabled: true,
295
+ },
296
+ },
297
+ },
298
+ schema: {
299
+ dataType: 'object',
300
+ interface: {
301
+ type: AXPWidgetsCatalog.lookup,
302
+ options: {
303
+ entity: `${RootConfig.module.name}.${RootConfig.entities.geographicRegion.name}`,
304
+ look: 'select',
305
+ allowCreate: 'quick',
306
+ create: {
307
+ enable: true,
308
+ },
309
+ expose: [
310
+ { source: 'id', target: 'country.id' },
311
+ { source: 'title', target: 'country.title' },
312
+ ],
313
+ filter: {
314
+ logic: 'and',
315
+ filters: [
316
+ { field: 'type.code', operator: { type: 'equal' }, value: 'country' },
317
+ ],
318
+ },
319
+ },
320
+ },
321
+ },
322
+ },
323
+ {
324
+ name: 'stateId',
325
+ title: '@location-management:locations.entities.location.fields.state',
326
+ groupId: 'address',
327
+ options: {
328
+ filter: {
329
+ advance: {
330
+ enabled: true,
331
+ },
332
+ inline: {
333
+ enabled: true,
334
+ },
335
+ },
336
+ },
337
+ schema: {
338
+ dataType: 'object',
339
+ interface: {
340
+ type: AXPWidgetsCatalog.lookup,
341
+ options: {
342
+ look: 'select',
343
+ entity: `${RootConfig.module.name}.${RootConfig.entities.geographicRegion.name}`,
344
+ allowCreate: 'quick',
345
+ disabled: '{{ !context.eval("countryId") }}',
346
+ create: {
347
+ enable: true,
348
+ context: {
349
+ parentId: '{{ context.eval("countryId") }}',
350
+ type: { code: 'state' },
351
+ },
352
+ },
353
+ expose: [
354
+ { source: 'id', target: 'state.id' },
355
+ { source: 'title', target: 'state.title' },
356
+ ],
357
+ filter: {
358
+ logic: 'and',
359
+ filters: [
360
+ {
361
+ field: 'parentId',
362
+ operator: {
363
+ type: 'equal',
364
+ },
365
+ value: '{{ context.eval("countryId") }}',
366
+ },
367
+ {
368
+ field: 'type.code',
369
+ operator: {
370
+ type: 'equal',
371
+ },
372
+ value: 'state',
373
+ },
374
+ ],
375
+ },
376
+ },
377
+ triggers: [
378
+ {
379
+ event: "{{ events.context('countryId') }}",
380
+ action: `{{ widget.setValue(null); context.set('state.title', null); context.set('cityId', null); context.set('city.id', null); context.set('city.title', null); widget.refresh(); }}`,
381
+ },
382
+ ],
383
+ },
384
+ },
385
+ },
386
+ {
387
+ name: 'cityId',
388
+ title: '@location-management:locations.entities.location.fields.city',
389
+ groupId: 'address',
390
+ options: {
391
+ filter: {
392
+ advance: {
393
+ enabled: true,
394
+ },
395
+ inline: {
396
+ enabled: true,
397
+ },
398
+ },
399
+ },
400
+ schema: {
401
+ dataType: 'object',
402
+ interface: {
403
+ type: AXPWidgetsCatalog.lookup,
404
+ options: {
405
+ look: 'select',
406
+ entity: `${RootConfig.module.name}.${RootConfig.entities.geographicRegion.name}`,
407
+ allowCreate: 'quick',
408
+ disabled: '{{ !context.eval("stateId") }}',
409
+ create: {
410
+ enable: true,
411
+ context: {
412
+ parentId: '{{ context.eval("stateId") }}',
413
+ type: { code: 'city' },
414
+ },
415
+ },
416
+ expose: [
417
+ { source: 'id', target: 'city.id' },
418
+ { source: 'title', target: 'city.title' },
419
+ ],
420
+ filter: {
421
+ logic: 'and',
422
+ filters: [
423
+ {
424
+ field: 'parentId',
425
+ operator: {
426
+ type: 'equal',
427
+ },
428
+ value: '{{ context.eval("stateId") }}',
429
+ },
430
+ {
431
+ field: 'type.code',
432
+ operator: {
433
+ type: 'equal',
434
+ },
435
+ value: 'city',
436
+ },
437
+ ],
438
+ },
439
+ },
440
+ triggers: [
441
+ {
442
+ event: "{{ events.context('stateId') }}",
443
+ action: `{{ widget.setValue(null); context.set('city.title', null); widget.refresh(); }}`,
444
+ },
445
+ {
446
+ event: "{{ events.context('countryId') }}",
447
+ action: `{{ widget.setValue(null); context.set('city.title', null); widget.refresh(); }}`,
448
+ },
449
+ ],
450
+ },
451
+ },
452
+ },
453
+ {
454
+ name: 'postalCode',
455
+ title: '@location-management:locations.entities.location.fields.postal-code',
456
+ groupId: 'address',
457
+ options: {
458
+ filter: {
459
+ advance: {
460
+ enabled: true,
461
+ },
462
+ inline: {
463
+ enabled: true,
464
+ },
465
+ },
466
+ },
467
+ schema: {
468
+ dataType: 'string',
469
+ interface: {
470
+ type: AXPWidgetsCatalog.text,
471
+ options: {
472
+ placeholder: 'Postal/ZIP code',
473
+ },
474
+ },
475
+ },
476
+ validations: [
477
+ {
478
+ rule: 'required',
479
+ },
480
+ ],
481
+ },
482
+ {
483
+ name: 'hasCoordinates',
484
+ title: '@location-management:locations.entities.location.fields.coordinates',
485
+ groupId: 'geographic',
486
+ schema: {
487
+ dataType: 'boolean',
488
+ defaultValue: false,
489
+ interface: {
490
+ type: AXPWidgetsCatalog.toggle,
491
+ },
492
+ },
493
+ },
494
+ {
495
+ name: 'coordinates',
496
+ title: '@location-management:locations.entities.location.fields.coordinates',
497
+ groupId: 'geographic',
498
+ schema: {
499
+ dataType: 'string',
500
+ visible: '{{ context.eval("hasCoordinates") == true || !!context.eval("coordinates") }}',
501
+ interface: {
502
+ type: AXPWidgetsCatalog.map,
503
+ options: {
504
+ hasDraw: true,
505
+ maxPolygon: 0,
506
+ fitToDraw: true,
507
+ },
508
+ triggers: [
509
+ {
510
+ event: "{{ events.context('hasCoordinates') }}",
511
+ action: `{{ widget.clear() }}`,
512
+ },
513
+ ],
514
+ },
515
+ },
516
+ },
517
+ {
518
+ name: 'timezone',
519
+ title: '@location-management:locations.entities.location.fields.timezone',
520
+ groupId: 'geographic',
521
+ options: {
522
+ filter: {
523
+ advance: {
524
+ enabled: true,
525
+ },
526
+ },
527
+ },
528
+ schema: {
529
+ dataType: 'string',
530
+ defaultValue: `{{ settings.get('${AXPRegionalSetting.TimeZone}') }}`,
531
+ interface: {
532
+ type: AXPWidgetsCatalog.lookup,
533
+ options: {
534
+ entity: 'LocaleManagement.Timezones',
535
+ look: 'select',
536
+ allowSearch: true,
537
+ valueField: 'code',
538
+ textField: 'title',
539
+ placeholder: 'e.g., America/New_York',
540
+ filter: {
541
+ logic: 'and',
542
+ filters: [{ field: 'isActive', operator: { type: 'equal' }, value: true }],
543
+ },
544
+ },
545
+ },
546
+ },
547
+ },
548
+ {
549
+ name: 'parentLocationId',
550
+ title: '@location-management:locations.entities.location.fields.parent-location',
551
+ groupId: 'basic-info',
552
+ options: {
553
+ filter: {
554
+ advance: {
555
+ enabled: true,
556
+ },
557
+ inline: {
558
+ enabled: true,
559
+ },
560
+ },
561
+ },
562
+ schema: {
563
+ dataType: 'object',
564
+ interface: {
565
+ type: AXPWidgetsCatalog.lookup,
566
+ options: {
567
+ entity: `${RootConfig.module.name}.${RootConfig.entities.location.name}`,
568
+ expose: [
569
+ { source: 'id', target: 'parentLocation.id' },
570
+ { source: 'title', target: 'parentLocation.title' },
571
+ ],
572
+ },
573
+ },
574
+ },
575
+ },
576
+ {
577
+ name: 'description',
578
+ title: '@general:terms.common.description',
579
+ groupId: 'basic-info',
580
+ options: {
581
+ filter: {
582
+ advance: {
583
+ enabled: true,
584
+ },
585
+ },
586
+ },
587
+ schema: {
588
+ dataType: 'string',
589
+ interface: {
590
+ type: AXPWidgetsCatalog.largeText,
591
+ options: {
592
+ rows: 3,
593
+ },
594
+ },
595
+ },
596
+ },
597
+ ],
598
+ columns: [
599
+ { name: 'code' },
600
+ { name: 'title' },
601
+ { name: 'locationTypeId', options: { dataPath: 'locationType.title' } },
602
+ { name: 'street1' },
603
+ { name: 'postalCode' },
604
+ { name: 'cityId', options: { dataPath: 'city.title' } },
605
+ { name: 'stateId', options: { dataPath: 'state.title' } },
606
+ { name: 'countryId', options: { dataPath: 'country.title' } },
607
+ ],
608
+ relatedEntities: [
609
+ {
610
+ entity: `${RootConfig.module.name}.${RootConfig.entities.locationAssignment.name}`,
611
+ title: '@location-management:locations.entities.location.related-entities.assignments.title',
612
+ icon: RootConfig.entities.locationAssignment.icon,
613
+ columns: [
614
+ { name: 'ownerRef.id', options: { dataPath: 'ownerRef.title' } },
615
+ { name: 'roleId', options: { dataPath: 'role.title' } },
616
+ { name: 'personId', options: { dataPath: 'person.fullName' } },
617
+ { name: 'person.phones' },
618
+ { name: 'notes' },
619
+ ],
620
+ conditions: locationAssignmentLocationConditions('id'),
621
+ actions: [...locationAssignmentReadOnlyRelatedActions()],
622
+ layout: { type: 'page-list', position: 'after', order: 1 },
623
+ },
624
+ ],
625
+ interfaces: {
626
+ master: {
627
+ create: {
628
+ sections: [
629
+ {
630
+ id: 'basic-info',
631
+ },
632
+ {
633
+ id: 'address',
634
+ },
635
+ {
636
+ id: 'geographic',
637
+ },
638
+ {
639
+ id: 'additional',
640
+ },
641
+ ],
642
+ properties: [
643
+ {
644
+ name: 'code',
645
+ },
646
+ {
647
+ name: 'title',
648
+ },
649
+ {
650
+ name: 'locationTypeId',
651
+ layout: {
652
+ positions: {
653
+ sm: {
654
+ colSpan: 12,
655
+ },
656
+ md: {
657
+ colSpan: 6,
658
+ },
659
+ },
660
+ },
661
+ },
662
+ {
663
+ name: 'street1',
664
+ layout: {
665
+ positions: {
666
+ sm: {
667
+ colSpan: 12,
668
+ },
669
+ },
670
+ },
671
+ },
672
+ {
673
+ name: 'street2',
674
+ layout: {
675
+ positions: {
676
+ sm: {
677
+ colSpan: 12,
678
+ },
679
+ },
680
+ },
681
+ },
682
+ {
683
+ name: 'countryId',
684
+ layout: {
685
+ positions: {
686
+ sm: {
687
+ colSpan: 12,
688
+ },
689
+ md: {
690
+ colSpan: 4,
691
+ },
692
+ },
693
+ },
694
+ },
695
+ {
696
+ name: 'stateId',
697
+ layout: {
698
+ positions: {
699
+ sm: {
700
+ colSpan: 12,
701
+ },
702
+ md: {
703
+ colSpan: 4,
704
+ },
705
+ },
706
+ },
707
+ },
708
+ {
709
+ name: 'cityId',
710
+ layout: {
711
+ positions: {
712
+ sm: {
713
+ colSpan: 12,
714
+ },
715
+ md: {
716
+ colSpan: 4,
717
+ },
718
+ },
719
+ },
720
+ },
721
+ {
722
+ name: 'postalCode',
723
+ layout: {
724
+ positions: {
725
+ sm: {
726
+ colSpan: 12,
727
+ },
728
+ md: {
729
+ colSpan: 4,
730
+ },
731
+ },
732
+ },
733
+ },
734
+ {
735
+ name: 'hasCoordinates',
736
+ layout: {
737
+ positions: {
738
+ sm: {
739
+ colSpan: 6,
740
+ },
741
+ },
742
+ },
743
+ },
744
+ {
745
+ name: 'coordinates',
746
+ layout: {
747
+ label: {
748
+ visible: false,
749
+ },
750
+ positions: {
751
+ sm: {
752
+ colSpan: 12,
753
+ },
754
+ },
755
+ },
756
+ },
757
+ {
758
+ name: 'timezone',
759
+ layout: {
760
+ positions: {
761
+ sm: {
762
+ colSpan: 12,
763
+ colStart: 1,
764
+ },
765
+ md: {
766
+ colSpan: 4,
767
+ colStart: 1,
768
+ },
769
+ },
770
+ },
771
+ },
772
+ {
773
+ name: 'parentLocationId',
774
+ layout: {
775
+ positions: {
776
+ sm: {
777
+ colSpan: 12,
778
+ },
779
+ md: {
780
+ colSpan: 6,
781
+ },
782
+ },
783
+ },
784
+ },
785
+ {
786
+ name: 'description',
787
+ },
788
+ ],
789
+ },
790
+ update: {
791
+ sections: [
792
+ {
793
+ id: 'basic-info',
794
+ },
795
+ {
796
+ id: 'address',
797
+ },
798
+ {
799
+ id: 'geographic',
800
+ },
801
+ {
802
+ id: 'additional',
803
+ },
804
+ {
805
+ id: 'settings',
806
+ },
807
+ ],
808
+ properties: [
809
+ {
810
+ name: 'code',
811
+ },
812
+ {
813
+ name: 'title',
814
+ },
815
+ {
816
+ name: 'locationTypeId',
817
+ layout: {
818
+ positions: {
819
+ sm: {
820
+ colSpan: 12,
821
+ },
822
+ md: {
823
+ colSpan: 6,
824
+ },
825
+ },
826
+ },
827
+ },
828
+ {
829
+ name: 'description',
830
+ },
831
+ {
832
+ name: 'parentLocationId',
833
+ layout: {
834
+ positions: {
835
+ sm: {
836
+ colSpan: 12,
837
+ },
838
+ md: {
839
+ colSpan: 6,
840
+ },
841
+ },
842
+ },
843
+ },
844
+ {
845
+ name: 'street1',
846
+ layout: {
847
+ positions: {
848
+ sm: {
849
+ colSpan: 12,
850
+ },
851
+ },
852
+ },
853
+ },
854
+ {
855
+ name: 'street2',
856
+ layout: {
857
+ positions: {
858
+ sm: {
859
+ colSpan: 12,
860
+ },
861
+ },
862
+ },
863
+ },
864
+ {
865
+ name: 'cityId',
866
+ layout: {
867
+ positions: {
868
+ sm: {
869
+ colSpan: 12,
870
+ },
871
+ md: {
872
+ colSpan: 4,
873
+ },
874
+ },
875
+ },
876
+ },
877
+ {
878
+ name: 'stateId',
879
+ layout: {
880
+ positions: {
881
+ sm: {
882
+ colSpan: 12,
883
+ },
884
+ md: {
885
+ colSpan: 4,
886
+ },
887
+ },
888
+ },
889
+ },
890
+ {
891
+ name: 'countryId',
892
+ layout: {
893
+ positions: {
894
+ sm: {
895
+ colSpan: 12,
896
+ },
897
+ md: {
898
+ colSpan: 4,
899
+ },
900
+ },
901
+ },
902
+ },
903
+ {
904
+ name: 'postalCode',
905
+ layout: {
906
+ positions: {
907
+ sm: {
908
+ colSpan: 12,
909
+ },
910
+ md: {
911
+ colSpan: 4,
912
+ },
913
+ },
914
+ },
915
+ },
916
+ {
917
+ name: 'hasCoordinates',
918
+ layout: {
919
+ positions: {
920
+ sm: {
921
+ colSpan: 6,
922
+ },
923
+ },
924
+ },
925
+ },
926
+ {
927
+ name: 'coordinates',
928
+ layout: {
929
+ label: {
930
+ visible: false,
931
+ },
932
+ positions: {
933
+ sm: {
934
+ colSpan: 12,
935
+ },
936
+ },
937
+ },
938
+ },
939
+ {
940
+ name: 'timezone',
941
+ layout: {
942
+ positions: {
943
+ sm: {
944
+ colSpan: 12,
945
+ colStart: 1,
946
+ },
947
+ md: {
948
+ colSpan: 4,
949
+ colStart: 1,
950
+ },
951
+ },
952
+ },
953
+ },
954
+ ],
955
+ },
956
+ single: {
957
+ title: '{{title}}',
958
+ description: '{{ fullAddress }}',
959
+ sections: [
960
+ {
961
+ id: 'basic-info',
962
+ layout: {
963
+ positions: {
964
+ lg: {
965
+ colSpan: 12,
966
+ },
967
+ },
968
+ },
969
+ },
970
+ {
971
+ id: 'address',
972
+ layout: {
973
+ positions: {
974
+ lg: {
975
+ colSpan: 12,
976
+ },
977
+ },
978
+ },
979
+ },
980
+ {
981
+ id: 'geographic',
982
+ layout: {
983
+ positions: {
984
+ lg: {
985
+ colSpan: 12,
986
+ },
987
+ },
988
+ },
989
+ },
990
+ {
991
+ id: 'additional',
992
+ layout: {
993
+ positions: {
994
+ lg: {
995
+ colSpan: 12,
996
+ },
997
+ },
998
+ },
999
+ },
1000
+ ],
1001
+ properties: [
1002
+ {
1003
+ name: 'code',
1004
+ },
1005
+ {
1006
+ name: 'title',
1007
+ },
1008
+ {
1009
+ name: 'locationTypeId',
1010
+ layout: {
1011
+ positions: {
1012
+ lg: {
1013
+ colSpan: 6,
1014
+ order: 3,
1015
+ },
1016
+ },
1017
+ },
1018
+ },
1019
+ {
1020
+ name: 'description',
1021
+ },
1022
+ {
1023
+ name: 'parentLocationId',
1024
+ layout: {
1025
+ positions: {
1026
+ lg: {
1027
+ colSpan: 6,
1028
+ order: 11,
1029
+ },
1030
+ },
1031
+ },
1032
+ },
1033
+ {
1034
+ name: 'street1',
1035
+ layout: {
1036
+ positions: {
1037
+ lg: {
1038
+ colSpan: 12,
1039
+ order: 4,
1040
+ },
1041
+ },
1042
+ },
1043
+ },
1044
+ {
1045
+ name: 'street2',
1046
+ layout: {
1047
+ positions: {
1048
+ lg: {
1049
+ colSpan: 12,
1050
+ order: 5,
1051
+ },
1052
+ },
1053
+ },
1054
+ },
1055
+ {
1056
+ name: 'cityId',
1057
+ layout: {
1058
+ positions: {
1059
+ lg: {
1060
+ colSpan: 4,
1061
+ order: 6,
1062
+ },
1063
+ },
1064
+ },
1065
+ },
1066
+ {
1067
+ name: 'stateId',
1068
+ layout: {
1069
+ positions: {
1070
+ lg: {
1071
+ colSpan: 4,
1072
+ order: 7,
1073
+ },
1074
+ },
1075
+ },
1076
+ },
1077
+ {
1078
+ name: 'countryId',
1079
+ layout: {
1080
+ positions: {
1081
+ lg: {
1082
+ colSpan: 4,
1083
+ order: 8,
1084
+ },
1085
+ },
1086
+ },
1087
+ },
1088
+ {
1089
+ name: 'postalCode',
1090
+ layout: {
1091
+ positions: {
1092
+ lg: {
1093
+ colSpan: 4,
1094
+ order: 9,
1095
+ },
1096
+ },
1097
+ },
1098
+ },
1099
+ {
1100
+ name: 'hasCoordinates',
1101
+ layout: {
1102
+ positions: {
1103
+ lg: {
1104
+ colSpan: 6,
1105
+ order: 10,
1106
+ },
1107
+ },
1108
+ },
1109
+ },
1110
+ {
1111
+ name: 'coordinates',
1112
+ layout: {
1113
+ label: {
1114
+ visible: false,
1115
+ },
1116
+ positions: {
1117
+ lg: {
1118
+ colSpan: 12,
1119
+ order: 11,
1120
+ },
1121
+ },
1122
+ },
1123
+ },
1124
+ {
1125
+ name: 'timezone',
1126
+ layout: {
1127
+ positions: {
1128
+ lg: {
1129
+ colSpan: 4,
1130
+ colStart: 1,
1131
+ order: 12,
1132
+ },
1133
+ },
1134
+ },
1135
+ },
1136
+ ],
1137
+ actions: [...entityMasterRecordActions()],
1138
+ },
1139
+ list: {
1140
+ actions: [...entityMasterCrudActions()],
1141
+ views: [
1142
+ createAllQueryView({
1143
+ sorts: [{ name: 'title', dir: 'asc' }],
1144
+ }),
1145
+ ],
1146
+ },
1147
+ },
1148
+ },
1149
+ };
1150
+ return entityDef;
1151
+ }
1152
+
1153
+ export { locationFactory };
1154
+ //# sourceMappingURL=acorex-platform-module-location-management-client-contracts-entity-catalog-location.entity-CmnVKTG-.mjs.map