@acorex-platform/module-location-management-client 0.0.15 → 0.0.21

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 (60) hide show
  1. package/fesm2022/acorex-platform-module-location-management-client-assign-existing-location-to-party.command-DECKrIBR.mjs +163 -0
  2. package/fesm2022/acorex-platform-module-location-management-client-assign-existing-location-to-party.command-DECKrIBR.mjs.map +1 -0
  3. package/fesm2022/acorex-platform-module-location-management-client-contracts.mjs +351 -0
  4. package/fesm2022/acorex-platform-module-location-management-client-contracts.mjs.map +1 -0
  5. package/fesm2022/acorex-platform-module-location-management-client-create-location-with-assignment.command-Cl6KfruM.mjs +200 -0
  6. package/fesm2022/acorex-platform-module-location-management-client-create-location-with-assignment.command-Cl6KfruM.mjs.map +1 -0
  7. package/fesm2022/acorex-platform-module-location-management-client.mjs +1701 -0
  8. package/fesm2022/acorex-platform-module-location-management-client.mjs.map +1 -0
  9. package/package.json +21 -5
  10. package/types/acorex-platform-module-location-management-client-contracts.d.ts +277 -0
  11. package/types/acorex-platform-module-location-management-client.d.ts +42 -0
  12. package/contracts/datasource.keys.d.ts +0 -6
  13. package/contracts/datasource.keys.js +0 -8
  14. package/contracts/entities/geographic-region/geographic-region.entity.d.ts +0 -2
  15. package/contracts/entities/geographic-region/geographic-region.entity.js +0 -725
  16. package/contracts/entities/geographic-region/geographic-region.types.d.ts +0 -27
  17. package/contracts/entities/geographic-region/geographic-region.types.js +0 -1
  18. package/contracts/entities/geographic-region/index.d.ts +0 -2
  19. package/contracts/entities/geographic-region/index.js +0 -2
  20. package/contracts/entities/index.d.ts +0 -5
  21. package/contracts/entities/index.js +0 -5
  22. package/contracts/entities/location/index.d.ts +0 -2
  23. package/contracts/entities/location/index.js +0 -2
  24. package/contracts/entities/location/location.entity.d.ts +0 -2
  25. package/contracts/entities/location/location.entity.js +0 -1075
  26. package/contracts/entities/location/location.types.d.ts +0 -30
  27. package/contracts/entities/location/location.types.js +0 -1
  28. package/contracts/entities/location-assignment/index.d.ts +0 -2
  29. package/contracts/entities/location-assignment/index.js +0 -2
  30. package/contracts/entities/location-assignment/location-assignment.entity.d.ts +0 -2
  31. package/contracts/entities/location-assignment/location-assignment.entity.js +0 -194
  32. package/contracts/entities/location-assignment/location-assignment.types.d.ts +0 -35
  33. package/contracts/entities/location-assignment/location-assignment.types.js +0 -2
  34. package/contracts/entities/location-role/index.d.ts +0 -2
  35. package/contracts/entities/location-role/index.js +0 -2
  36. package/contracts/entities/location-role/location-role.entity.d.ts +0 -2
  37. package/contracts/entities/location-role/location-role.entity.js +0 -143
  38. package/contracts/entities/location-role/location-role.types.d.ts +0 -6
  39. package/contracts/entities/location-role/location-role.types.js +0 -1
  40. package/contracts/entities/location-type/index.d.ts +0 -2
  41. package/contracts/entities/location-type/index.js +0 -2
  42. package/contracts/entities/location-type/location-type.entity.d.ts +0 -2
  43. package/contracts/entities/location-type/location-type.entity.js +0 -237
  44. package/contracts/entities/location-type/location-type.types.d.ts +0 -8
  45. package/contracts/entities/location-type/location-type.types.js +0 -1
  46. package/contracts/features.keys.d.ts +0 -1
  47. package/contracts/features.keys.js +0 -2
  48. package/contracts/index.d.ts +0 -8
  49. package/contracts/index.js +0 -10
  50. package/contracts/location-assignment.actions.d.ts +0 -8
  51. package/contracts/location-assignment.actions.js +0 -73
  52. package/contracts/location-assignment.utils.d.ts +0 -53
  53. package/contracts/location-assignment.utils.js +0 -145
  54. package/contracts/menu.keys.d.ts +0 -8
  55. package/contracts/menu.keys.js +0 -8
  56. package/contracts/package.json +0 -5
  57. package/contracts/permission.keys.d.ts +0 -33
  58. package/contracts/permission.keys.js +0 -42
  59. package/contracts/root-config.d.ts +0 -42
  60. package/contracts/root-config.js +0 -43
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acorex-platform-module-location-management-client.mjs","sources":["../../../../libs/modules/location-management/client/src/lib/manifest.ts","../../../../libs/modules/location-management/client/src/lib/permission-definition.provider.ts","../../../../libs/modules/location-management/client/src/lib/menu.provider.ts","../../../../libs/modules/location-management/client/src/lib/setting.provider.ts","../../../../libs/modules/location-management/client/src/lib/search-command.provider.ts","../../../../libs/modules/location-management/client/src/lib/feature-definition.provider.ts","../../../../libs/modules/location-management/client/src/lib/middlewares/location-assignment-location-hydrate.middleware.ts","../../../../libs/modules/location-management/client/src/lib/widgets/address/address-widget.config.ts","../../../../libs/modules/location-management/client/src/lib/widgets/address/address-widget.types.ts","../../../../libs/modules/location-management/client/src/lib/widgets/address/address.service.ts","../../../../libs/modules/location-management/client/src/lib/widgets/address/address-widget-edit.component.ts","../../../../libs/modules/location-management/client/src/lib/widgets/address/address-widget-view.component.ts","../../../../libs/modules/location-management/client/src/lib/widgets/address/address-widget-column.component.ts","../../../../libs/modules/location-management/client/src/lib/widget-definition.provider.ts","../../../../libs/modules/location-management/client/src/lib/location-management.module.ts","../../../../libs/modules/location-management/client/src/lib/features/shared/location-management.service.ts","../../../../libs/modules/location-management/client/src/acorex-platform-module-location-management-client.ts"],"sourcesContent":["//#region ---- Imports ----\n\nimport { AXPModuleManifest } from '@acorex-platform/framework-client/core';\nimport { RootConfig } from '@acorex-platform/module-location-management-client/contracts';\n\n//#endregion\n\n//#region ---- Manifest Definition ----\n\n/**\n * Location Management Module Manifest.\n * Defines module metadata, features, and provider references.\n */\nexport const LocationManagementManifest: AXPModuleManifest = {\n name: RootConfig.module.name,\n version: '1.0.0',\n title: RootConfig.module.title,\n icon: RootConfig.module.icon,\n i18n: RootConfig.config.i18n,\n type: 'platform',\n domain: 'platform',\n required: true,\n\n // Module dependencies (optional)\n};\n\n//#endregion\n\n","//#region ---- Imports ----\n\nimport {\n AXPPermissionDefinitionProvider,\n AXPPermissionDefinitionProviderContext,\n} from '@acorex-platform/framework-client/auth';\nimport {\n AXPCommonPermissionGroupKeys\n} from '@acorex-platform/module-common-client/contracts';\n\nimport { Injectable } from '@angular/core';\n\n//#endregion\n\n//#region ---- Permission Definition Provider ----\n\n/**\n * Ensures People & Organization root exists for location-management.\n */\n@Injectable()\nexport class AXMLocationManagementPermissionDefinitionProvider implements AXPPermissionDefinitionProvider {\n async define(context: AXPPermissionDefinitionProviderContext): Promise<void> {\n const groups = AXPCommonPermissionGroupKeys;\n const G = '@common:permission-groups';\n\n context.addGroup(groups.PeopleOrganization.Root, `${G}.people-organization.title`, `${G}.people-organization.description`, { order: 10 });\n }\n}\n\n//#endregion\n","//#region ---- Imports ----\n\nimport {\n AXPCommonMenuKeys\n} from '@acorex-platform/module-common-client/contracts';\nimport { AXPMenuProvider, AXPMenuProviderContext } from '@acorex-platform/framework-client/common';\nimport { AXPEntityService } from '@acorex-platform/framework-client/layout/entity';\nimport { Injectable, inject } from '@angular/core';\nimport {\n RootConfig,\n AXPPeopleOrganizationPermissionKeys\n} from '@acorex-platform/module-location-management-client/contracts';\nimport { AXPLocationManagementMenuKeys } from '@acorex-platform/module-location-management-client/contracts';\n\n//#endregion\n\n//#region ---- Menu Provider ----\n\n@Injectable()\nexport class AXMLocationManagementMenuProvider implements AXPMenuProvider {\n private entityService = inject(AXPEntityService);\n\n async provide(context: AXPMenuProviderContext): Promise<void> {\n const module = RootConfig.module;\n const keys = AXPPeopleOrganizationPermissionKeys;\n\n const contactsMenu = context.find(AXPCommonMenuKeys.Contacts);\n if (!contactsMenu.exists) {\n context.addItems([\n {\n name: AXPCommonMenuKeys.Contacts,\n priority: 8010,\n text: '@general:menus.contacts.title',\n icon: 'fa-light fa-address-book',\n type: 'menu',\n children: [],\n },\n ]);\n }\n\n context.find(AXPCommonMenuKeys.Contacts).addItems([\n {\n name: AXPLocationManagementMenuKeys.Locations,\n text: RootConfig.entities.location.titlePlural,\n path: this.entityService.createPath(module.name, RootConfig.entities.location.name),\n icon: RootConfig.entities.location.icon,\n priority: 40,\n policy: {\n features: [module.name],\n permissions: [keys.Setup],\n },\n },\n ]);\n\n context.find(AXPCommonMenuKeys.Region).addItems([\n {\n name: AXPLocationManagementMenuKeys.LocationTypes,\n text: '@location-management:location-types.menus.location-types.title',\n path: this.entityService.createPath(module.name, RootConfig.entities.locationType.name),\n icon: RootConfig.entities.locationType.icon,\n priority: 1,\n policy: {\n features: [module.name],\n permissions: [keys.Setup],\n },\n },\n {\n name: AXPLocationManagementMenuKeys.LocationRoles,\n text: '@location-management:location-roles.menus.location-roles.title',\n path: this.entityService.createPath(module.name, RootConfig.entities.locationRole.name),\n icon: RootConfig.entities.locationRole.icon,\n priority: 2,\n policy: {\n features: [module.name],\n permissions: [keys.Setup],\n },\n },\n {\n name: AXPLocationManagementMenuKeys.GeographicRegions,\n text: '@location-management:geographic-regions.menus.geographic-regions.title',\n path: this.entityService.createPath(module.name, RootConfig.entities.geographicRegion.name),\n icon: RootConfig.entities.geographicRegion.icon,\n priority: 3,\n policy: {\n features: [module.name],\n permissions: [keys.Setup],\n },\n },\n ]);\n }\n}\n\n//#endregion\n","import { AXPSettingDefinitionProvider, AXPSettingDefinitionProviderContext } from '@acorex-platform/framework-client/common';\n\nexport class AXMSettingProvider implements AXPSettingDefinitionProvider {\n async provide(context: AXPSettingDefinitionProviderContext): Promise<void> {\n // context\n // // Add Form Template Group\n // .addGroup('form-template', 'Form Template', 'Settings related to form templates.', RootConfig.module.icon)\n // // Start Interface Section\n // .addSection('interface', 'UI Interface', 'Customize the user interface for forms.')\n // .addSetting({\n // key: 'history-panel',\n // title: 'Show History Panel',\n // scope: 'U',\n // isInherited: true,\n // defaultValue: false,\n // widget: {\n // type: AXPWidgetsCatalog.toggle,\n // },\n // description: 'Enable or disable the history panel for forms.',\n // validationRules: [\n // {\n // rule: 'required',\n // },\n // ],\n // })\n // .endSection()\n // .endGroup();\n }\n}\n","import { AXPSearchCommandProvider, AXPSearchResult, createEntityCommandOptions } from '@acorex-platform/framework-client/common';\nimport { RootConfig } from '@acorex-platform/module-location-management-client/contracts';\n\nexport class AXMSearchCommandProvider extends AXPSearchCommandProvider {\n commands: AXPSearchResult[] = [\n {\n id: 'create-location-role',\n group: 'command',\n title: RootConfig.entities.locationRole.title,\n icon: RootConfig.entities.locationRole.icon,\n description: RootConfig.entities.locationRole.titlePlural,\n command: {\n name: 'Entity:Create',\n options: createEntityCommandOptions(\n `${RootConfig.module.name}.${RootConfig.entities.locationRole.name}`,\n {\n name: RootConfig.entities.locationRole.name,\n module: RootConfig.module.name,\n title: RootConfig.entities.locationRole.title,\n }\n ),\n },\n },\n {\n id: 'create-location-type',\n group: 'command',\n title: RootConfig.entities.locationType.title,\n icon: RootConfig.entities.locationType.icon,\n description: RootConfig.entities.locationType.titlePlural,\n command: {\n name: 'Entity:Create',\n options: createEntityCommandOptions(\n `${RootConfig.module.name}.${RootConfig.entities.locationType.name}`,\n {\n name: RootConfig.entities.locationType.name,\n module: RootConfig.module.name,\n title: RootConfig.entities.locationType.title,\n }\n ),\n },\n },\n {\n id: 'create-geographic-region',\n group: 'command',\n title: RootConfig.entities.geographicRegion.title,\n icon: RootConfig.entities.geographicRegion.icon,\n description: RootConfig.entities.geographicRegion.titlePlural,\n command: {\n name: 'Entity:Create',\n options: createEntityCommandOptions(\n `${RootConfig.module.name}.${RootConfig.entities.geographicRegion.name}`,\n {\n name: RootConfig.entities.geographicRegion.name,\n module: RootConfig.module.name,\n title: RootConfig.entities.geographicRegion.title,\n }\n ),\n },\n },\n ];\n}\n","//#region ---- Imports ----\n\nimport {\n AXPFeatureDefinitionProvider,\n AXPFeatureDefinitionProviderContext,\n} from '@acorex-platform/framework-client/core';\n\n//#endregion\n\n//#region ---- Feature Definition Provider ----\n\n/**\n * Location Management Feature Definition Provider.\n * Provides feature definitions for the Location Management module.\n */\nexport class AXMLocationManagementFeatureDefinitionProvider implements AXPFeatureDefinitionProvider {\n async provide(context: AXPFeatureDefinitionProviderContext): Promise<void> {\n // Management feature removed - module name is used directly as feature key\n }\n}\n\n//#endregion\n\n","import { AXPEntityStorageMiddleware } from '@acorex-platform/framework-client/layout/entity';\nimport { get, set } from 'lodash';\n\nimport {\n RootConfig,\n buildLocationAssignmentLocationSnapshot,\n buildLocationAssignmentPersonSnapshot,\n} from '@acorex-platform/module-location-management-client/contracts';\n\n//#region ---- LocationAssignment nested hydration ----\n\nconst LOCATION_ASSIGNMENT_ENTITY = `${RootConfig.module.name}.${RootConfig.entities.locationAssignment.name}`;\nconst LOCATION_ENTITY = `${RootConfig.module.name}.${RootConfig.entities.location.name}`;\nconst PERSON_ENTITY = 'PersonCore.Person';\n\n/**\n * Hydrates nested `location` and `person` on LocationAssignment rows so consumers\n * (e.g. party location lists) receive computed fields such as `fullAddress` and `fullName`.\n */\nexport const locationAssignmentLocationHydrateMiddleware: AXPEntityStorageMiddleware = {\n target: { ops: ['getOne', 'getAll', 'query'], order: 13 },\n execute: async (ctx, next) => {\n const backend = ctx.entities;\n\n await next();\n\n if (ctx.entityName !== LOCATION_ASSIGNMENT_ENTITY) {\n return;\n }\n\n try {\n const rows: Record<string, unknown>[] = Array.isArray(ctx.result)\n ? ctx.result\n : Array.isArray((ctx.result as { items?: unknown[] })?.items)\n ? ((ctx.result as { items: Record<string, unknown>[] }).items ?? [])\n : ctx.result\n ? [ctx.result as Record<string, unknown>]\n : [];\n\n if (!rows.length) {\n return;\n }\n\n const locationIds = Array.from(\n new Set(rows.map((row) => get(row, 'locationId')).filter((id) => id != null)),\n );\n const personIds = Array.from(\n new Set(rows.map((row) => get(row, 'personId')).filter((id) => id != null)),\n );\n\n const locationMap = new Map<unknown, Record<string, unknown>>();\n if (locationIds.length) {\n const locationResponse = await backend.query(LOCATION_ENTITY, {\n skip: 0,\n take: locationIds.length,\n filter: { field: 'id', operator: { type: 'in' }, value: locationIds },\n });\n\n for (const item of locationResponse?.items ?? []) {\n const record = item as unknown as Record<string, unknown>;\n locationMap.set(get(record, 'id'), record);\n }\n }\n\n const personMap = new Map<unknown, Record<string, unknown>>();\n if (personIds.length) {\n const personResponse = await backend.query(PERSON_ENTITY, {\n skip: 0,\n take: personIds.length,\n filter: { field: 'id', operator: { type: 'in' }, value: personIds },\n });\n\n for (const item of personResponse?.items ?? []) {\n const record = item as unknown as Record<string, unknown>;\n personMap.set(get(record, 'id'), record);\n }\n }\n\n for (const row of rows) {\n const locationId = get(row, 'locationId');\n if (locationId != null) {\n const location = locationMap.get(locationId);\n if (location) {\n set(row, 'location', buildLocationAssignmentLocationSnapshot(location, locationId as string));\n }\n }\n\n const personId = get(row, 'personId');\n if (personId != null) {\n const person = personMap.get(personId);\n if (person) {\n set(row, 'person', buildLocationAssignmentPersonSnapshot(person, personId as string));\n }\n }\n }\n } catch {\n // swallow to avoid breaking main flow\n }\n },\n};\n\n//#endregion\n","import { AXPWidgetConfig, AXPWidgetGroupEnum, createBooleanProperty, createSelectProperty } from '@acorex-platform/framework-shared/widget-core';\nimport { AXP_WIDGETS_EDITOR_CATEGORY, AXP_WIDGETS_EDITOR_SUB_COMPOSITE } from '@acorex-platform/framework-client/layout/widget-core';\nimport {\n AXP_BEHAVIOR_PROPERTY_GROUP,\n AXP_DATA_PATH_PROPERTY,\n AXP_DISABLED_PROPERTY,\n AXP_HAS_LABEL_PROPERTY,\n AXP_NAME_PROPERTY,\n AXP_PLACEHOLDER_PROPERTY,\n} from '@acorex-platform/framework-client/layout/widgets';\n\nexport const AXPAddressWidget: AXPWidgetConfig = {\n name: 'address-editor',\n title: '@platform-layout-widgets:widgets.address-editor.title',\n description: '@platform-layout-widgets:widgets.address-editor.description',\n categories: AXP_WIDGETS_EDITOR_CATEGORY,\n subCategory: AXP_WIDGETS_EDITOR_SUB_COMPOSITE,\n groups: [AXPWidgetGroupEnum.FormElement],\n icon: 'fa-light fa-location-dot',\n defaultFilterWidgetName: 'string-filter',\n type: 'editor',\n properties: [\n AXP_NAME_PROPERTY,\n AXP_DATA_PATH_PROPERTY,\n createSelectProperty({\n name: 'mode',\n title: 'Mode',\n group: AXP_BEHAVIOR_PROPERTY_GROUP,\n dataSource: [\n { id: 'simple', title: 'Single line' },\n { id: 'popup', title: 'Popup editor' },\n { id: 'expandable', title: 'Expandable panel' },\n ],\n defaultValue: { id: 'simple', title: 'Single line' },\n path: 'options.mode',\n }),\n createBooleanProperty({\n name: 'hasLabel',\n title: 'Has Label',\n group: AXP_BEHAVIOR_PROPERTY_GROUP,\n defaultValue: false,\n path: 'options.hasLabel',\n }),\n createBooleanProperty({\n name: 'hasMap',\n title: 'Has Map',\n group: AXP_BEHAVIOR_PROPERTY_GROUP,\n defaultValue: true,\n path: 'options.hasMap',\n }),\n AXP_DISABLED_PROPERTY,\n AXP_HAS_LABEL_PROPERTY,\n AXP_PLACEHOLDER_PROPERTY,\n ],\n components: {\n view: {\n component: () => import('./address-widget-view.component').then((c) => c.AXPAddressWidgetViewComponent),\n },\n edit: {\n component: () => import('./address-widget-edit.component').then((c) => c.AXPAddressWidgetEditComponent),\n },\n column: {\n component: () => import('./address-widget-column.component').then((c) => c.AXPAddressWidgetColumnComponent),\n },\n designer: {\n component: () => import('./address-widget-edit.component').then((c) => c.AXPAddressWidgetEditComponent),\n },\n },\n};\n\n","import type { AXPAddressMode } from '@acorex-platform/framework-shared/core';\n\n//#region ---- Widget Options Types ----\n\n/**\n * Address widget designer options\n */\nexport interface AXPAddressWidgetDesignerOptions {\n mode?: AXPAddressMode;\n placeholder?: string;\n labelEntity?: string;\n disabled?: boolean;\n hasLabel?: boolean;\n hasMap?: boolean;\n}\n\n/**\n * Address widget view options\n */\nexport interface AXPAddressWidgetViewOptions {\n mode?: AXPAddressMode;\n hasLabel?: boolean;\n hasMap?: boolean;\n}\n\n/**\n * Address widget edit options\n */\nexport interface AXPAddressWidgetEditOptions {\n mode?: AXPAddressMode;\n placeholder?: string;\n labelEntity?: string;\n disabled?: boolean;\n hasLabel?: boolean;\n hasMap?: boolean;\n}\n\n/**\n * Address widget column options\n */\nexport interface AXPAddressWidgetColumnOptions { }\n\n/**\n * Complete address widget options structure\n */\nexport interface AXPAddressWidgetOptions {\n designer: AXPAddressWidgetDesignerOptions;\n view: AXPAddressWidgetViewOptions;\n edit: AXPAddressWidgetEditOptions;\n print: AXPAddressWidgetViewOptions;\n column: AXPAddressWidgetColumnOptions;\n}\n\n//#endregion\n","import {\n AXPAddressData,\n AXPPlatformScope,\n extractValue,\n formatAddressData,\n resolveMultiLanguageString,\n type AXPMultiLanguageString,\n type AXPWidgetNode,\n} from '@acorex-platform/framework-shared/core';\nimport { AXPSettingsService } from '@acorex-platform/framework-client/common';\nimport { AXPLayoutBuilderService, IActionBuilder } from '@acorex-platform/framework-client/layout/builder';\nimport { AXPEntityService } from '@acorex-platform/framework-client/layout/entity';\n\nimport { AXTranslationService } from '@acorex/core/translation';\nimport { inject, Injectable } from '@angular/core';\nimport { defaultTo, get, isEmpty, isEqual, isNil } from 'lodash';\n\nconst TENANT_ORGANIZATION_ADDRESS_SETTINGS = {\n street1: 'OrganizationManagement:Setting:Organization.Street1',\n street2: 'OrganizationManagement:Setting:Organization.Street2',\n countryId: 'OrganizationManagement:Setting:Organization.CountryId',\n stateId: 'OrganizationManagement:Setting:Organization.StateId',\n cityId: 'OrganizationManagement:Setting:Organization.CityId',\n postalCode: 'OrganizationManagement:Setting:Organization.PostalCode',\n} as const;\n\nconst GEOGRAPHIC_REGION_ENTITY = 'LocationManagement.GeographicRegion';\n\ninterface AXPAddressGeographicDefaults extends Partial<AXPAddressData> {\n countryId?: string;\n stateId?: string;\n cityId?: string;\n}\n\nexport interface AXPAddressCollapsibleHeader {\n labelText: string | null;\n addressText: string;\n}\n\nexport interface AXPAddressFormContentOptions {\n hasLabel?: boolean;\n labelEntity?: string;\n hasMap: boolean;\n addressData?: Partial<AXPAddressData>;\n}\n\nexport interface AXPAddressWidgetRuntimeOptions {\n hasMap?: boolean;\n hasLabel?: boolean;\n labelEntity?: string;\n useGeographicDefaults?: boolean;\n}\n\n/** Transient flat lookup ids used in the address form context (same pattern as Location entity). */\nexport interface AXPAddressFormContext extends Partial<AXPAddressData> {\n countryId?: string;\n stateId?: string;\n cityId?: string;\n labelId?: string;\n showMap?: boolean;\n}\n\n//#region ---- Service ----\n\n@Injectable({ providedIn: 'root' })\nexport class AXPAddressWidgetService {\n //#region ---- Services & Dependencies ----\n\n private readonly layoutBuilder = inject(AXPLayoutBuilderService);\n private readonly translationService = inject(AXTranslationService);\n private readonly settingsService = inject(AXPSettingsService);\n private readonly entityService = inject(AXPEntityService);\n\n private geographicDefaultsCache: Promise<AXPAddressGeographicDefaults | null> | null = null;\n private readonly geographicTitleCache = new Map<string, string>();\n\n constructor() {\n this.settingsService.onChanged.subscribe((event) => {\n const settingKeys = Object.values(TENANT_ORGANIZATION_ADDRESS_SETTINGS);\n if (event.keys.some((key) => settingKeys.includes(key as (typeof settingKeys)[number]))) {\n this.invalidateGeographicDefaultsCache();\n }\n });\n }\n\n //#endregion\n\n //#region ---- Shared address form layout (dialog + inline renderer) ----\n\n /**\n * Builds the address form content (street1, street2, country, state, city, postalCode, label, map).\n * Used by both the dialog and the expandable inline layout via create().flex().build().\n */\n buildAddressFormContent(flex: any, options: AXPAddressFormContentOptions): void {\n const { hasLabel, labelEntity, hasMap, addressData } = options;\n const showLabel = !!hasLabel && !!labelEntity;\n\n flex.mode('edit').setDirection('column').setGap('12px');\n\n //#region ---- Row 1: label + show map ----\n\n if (showLabel || hasMap) {\n flex.grid((metaRow: any) => {\n metaRow.setColumns(12).setGap('12px');\n\n if (showLabel) {\n metaRow.formField('@location-management:locations.entities.location.fields.label', (field: any) => {\n field.path('labelId');\n field.layout(3);\n field.customWidget('lookup-editor', {\n entity: labelEntity,\n look: 'select',\n textField: 'title',\n valueField: 'id',\n hasClearButton: true,\n allowCreate: 'quick',\n create: {\n enable: true,\n title: '@location-management:locations.entities.location.fields.label-create-title',\n },\n expose: [\n { source: 'id', target: 'label.id' },\n { source: 'title', target: 'label.title' },\n ],\n validations: [{ rule: 'required', message: '@general:validation.messages.required' }],\n });\n });\n }\n\n if (hasMap) {\n metaRow.formField('@location-management:locations.entities.location.fields.show-map', (field: any) => {\n field.path('showMap');\n field.layout(3);\n field.toggleSwitch({\n defaultValue: !!(addressData?.coordinates),\n });\n });\n }\n });\n }\n\n //#endregion\n\n //#region ---- Row 2: street address + address line 2 ----\n\n flex.grid((streetRow: any) => {\n streetRow.setColumns(12).setGap('12px');\n\n streetRow\n .formField('@location-management:locations.entities.location.fields.street1', (field: any) => {\n field.path('street1');\n field.layout(6);\n field.textBox({\n validations: [{ rule: 'required', message: '@general:validation.messages.required' }],\n });\n })\n .formField('@location-management:locations.entities.location.fields.street2', (field: any) => {\n field.path('street2');\n field.layout(6);\n field.textBox({});\n });\n });\n\n //#endregion\n\n //#region ---- Row 3: postal code + country + state + city ----\n\n flex.grid((geoRow: any) => {\n geoRow.setColumns(12).setGap('12px');\n\n geoRow\n .formField('@location-management:locations.entities.location.fields.postal-code', (field: any) => {\n field.path('postalCode');\n field.layout(3);\n field.textBox({ placeholder: 'Enter postal code' });\n })\n .formField('@location-management:locations.entities.location.fields.country', (field: any) => {\n field.path('countryId');\n field.layout(3);\n field.customWidget('lookup-editor', {\n entity: 'LocationManagement.GeographicRegion',\n look: 'select',\n textField: 'title',\n valueField: 'id',\n hasClearButton: true,\n allowCreate: 'quick',\n create: {\n enable: true,\n },\n expose: [\n { source: 'id', target: 'country.id' },\n { source: 'title', target: 'country.title' },\n ],\n filter: {\n logic: 'and',\n filters: [{ field: 'type.code', operator: { type: 'equal' }, value: 'country' }],\n },\n });\n })\n .formField('@location-management:locations.entities.location.fields.state', (field: any) => {\n field.path('stateId');\n field.layout(3);\n field.customWidget('lookup-editor', {\n entity: 'LocationManagement.GeographicRegion',\n look: 'select',\n textField: 'title',\n valueField: 'id',\n hasClearButton: true,\n allowCreate: 'quick',\n disabled: '{{ !context.eval(\"countryId\") }}',\n create: {\n enable: true,\n context: {\n parentId: '{{ context.eval(\"countryId\") }}',\n type: { code: 'state' },\n },\n },\n expose: [\n { source: 'id', target: 'state.id' },\n { source: 'title', target: 'state.title' },\n ],\n filter: {\n logic: 'and',\n filters: [\n { field: 'parentId', operator: { type: 'equal' }, value: '{{ context.eval(\"countryId\") }}' },\n { field: 'type.code', operator: { type: 'equal' }, value: 'state' },\n ],\n },\n triggers: [\n {\n event: \"{{ events.context('countryId') }}\",\n action:\n \"{{ widget.setValue(null); context.set('state.title', null); context.set('cityId', null); context.set('city.id', null); context.set('city.title', null); widget.refresh(); }}\",\n },\n ],\n });\n })\n .formField('@location-management:locations.entities.location.fields.city', (field: any) => {\n field.path('cityId');\n field.layout(3);\n field.customWidget('lookup-editor', {\n entity: 'LocationManagement.GeographicRegion',\n look: 'select',\n textField: 'title',\n valueField: 'id',\n hasClearButton: true,\n allowCreate: 'quick',\n disabled: '{{ !context.eval(\"stateId\") }}',\n create: {\n enable: true,\n context: {\n parentId: '{{ context.eval(\"stateId\") }}',\n type: { code: 'city' },\n },\n },\n expose: [\n { source: 'id', target: 'city.id' },\n { source: 'title', target: 'city.title' },\n ],\n filter: {\n logic: 'and',\n filters: [\n { field: 'parentId', operator: { type: 'equal' }, value: '{{ context.eval(\"stateId\") }}' },\n { field: 'type.code', operator: { type: 'equal' }, value: 'city' },\n ],\n },\n triggers: [\n {\n event: \"{{ events.context('stateId') }}\",\n action: \"{{ widget.setValue(null); context.set('city.title', null); widget.refresh(); }}\",\n },\n {\n event: \"{{ events.context('countryId') }}\",\n action: \"{{ widget.setValue(null); context.set('city.title', null); widget.refresh(); }}\",\n },\n ],\n });\n });\n });\n\n //#endregion\n\n //#region ---- Map picker (when show map is enabled) ----\n\n if (hasMap) {\n flex.grid((mapRow: any) => {\n mapRow.setColumns(12).setGap('12px');\n mapRow.formField('@location-management:locations.entities.location.fields.coordinates', (field: any) => {\n field.path('coordinates');\n field.layout(12);\n field.visible('{{ context.eval(\"showMap\") }}');\n field.customWidget('map', { hasDraw: true, maxPolygon: 0 });\n });\n });\n }\n\n //#endregion\n }\n\n /**\n * Returns the address form layout node using layoutBuilder.create().flex().build() for use in axp-layout-renderer.\n */\n getAddressFormLayout(options: AXPAddressFormContentOptions): AXPWidgetNode {\n return this.layoutBuilder\n .create()\n .flex((flex) => this.buildAddressFormContent(flex, options))\n .build();\n }\n\n //#endregion\n\n //#region ---- Geographic Defaults Methods ----\n\n /** Loads geographic defaults from tenant organization address settings. */\n async getGeographicDefaults(): Promise<AXPAddressGeographicDefaults | null> {\n if (!this.geographicDefaultsCache) {\n this.geographicDefaultsCache = this.loadGeographicDefaultsFromSettings();\n }\n\n return this.geographicDefaultsCache;\n }\n\n private async loadGeographicDefaultsFromSettings(): Promise<AXPAddressGeographicDefaults | null> {\n const tenantScope = this.settingsService.scope(AXPPlatformScope.Tenant);\n const [countryId, stateId, cityId, street1, street2, postalCode] = await Promise.all([\n tenantScope.get<unknown>(TENANT_ORGANIZATION_ADDRESS_SETTINGS.countryId),\n tenantScope.get<unknown>(TENANT_ORGANIZATION_ADDRESS_SETTINGS.stateId),\n tenantScope.get<unknown>(TENANT_ORGANIZATION_ADDRESS_SETTINGS.cityId),\n tenantScope.get<string>(TENANT_ORGANIZATION_ADDRESS_SETTINGS.street1),\n tenantScope.get<string>(TENANT_ORGANIZATION_ADDRESS_SETTINGS.street2),\n tenantScope.get<string>(TENANT_ORGANIZATION_ADDRESS_SETTINGS.postalCode),\n ]);\n\n const resolvedCountry = this.resolveSettingLookupSnapshot(countryId);\n const resolvedState = this.resolveSettingLookupSnapshot(stateId);\n const resolvedCity = this.resolveSettingLookupSnapshot(cityId);\n const resolvedStreet1 = defaultTo(street1, '').trim();\n const resolvedStreet2 = defaultTo(street2, '').trim();\n const resolvedPostalCode = defaultTo(postalCode, '').trim();\n\n if (\n isEmpty(resolvedCountry?.id) &&\n isEmpty(resolvedState?.id) &&\n isEmpty(resolvedCity?.id) &&\n isEmpty(resolvedStreet1) &&\n isEmpty(resolvedStreet2) &&\n isEmpty(resolvedPostalCode)\n ) {\n return null;\n }\n\n return {\n street1: resolvedStreet1 || undefined,\n street2: resolvedStreet2 || undefined,\n postalCode: resolvedPostalCode || undefined,\n countryId: resolvedCountry?.id,\n stateId: resolvedState?.id,\n cityId: resolvedCity?.id,\n country: resolvedCountry,\n state: resolvedState,\n city: resolvedCity,\n };\n }\n\n /** Clears cached defaults (e.g. after tenant settings change). */\n invalidateGeographicDefaultsCache(): void {\n this.geographicDefaultsCache = null;\n }\n\n /**\n * Applies tenant/platform geographic defaults to empty address fields only.\n * Returns whether any field was updated.\n */\n async applyGeographicDefaultsIfNeeded(\n value: Partial<AXPAddressData>,\n options?: { enabled?: boolean },\n ): Promise<{ value: Partial<AXPAddressData>; applied: boolean }> {\n if (options?.enabled === false) {\n return { value, applied: false };\n }\n\n const defaults = await this.getGeographicDefaults();\n if (!defaults) {\n return { value, applied: false };\n }\n\n const merged = this.mergeGeographicDefaults(value, defaults);\n const enriched = await this.enrichGeographicLookupTitles(merged);\n const applied = !isEqual(this.snapshotGeographicFields(value), this.snapshotGeographicFields(enriched));\n return { value: enriched, applied };\n }\n\n /** Merges defaults into empty country/state/city (and optional street/postal) fields. */\n mergeGeographicDefaults(\n value: Partial<AXPAddressData>,\n defaults: AXPAddressGeographicDefaults,\n ): Partial<AXPAddressData> {\n const result: Partial<AXPAddressData> = { ...value };\n\n if (this.isLookupEmpty(result.country) && defaults.country?.id) {\n result.country = defaults.country;\n }\n\n if (this.isLookupEmpty(result.state) && defaults.state?.id) {\n result.state = defaults.state;\n }\n\n if (this.isLookupEmpty(result.city) && defaults.city?.id) {\n result.city = defaults.city;\n }\n\n if (!result.street1?.trim() && defaults.street1?.trim()) {\n result.street1 = defaults.street1;\n }\n\n if (!result.street2?.trim() && defaults.street2?.trim()) {\n result.street2 = defaults.street2;\n }\n\n if (!result.postalCode?.trim() && defaults.postalCode?.trim()) {\n result.postalCode = defaults.postalCode;\n }\n\n return result;\n }\n\n /** Ensures country/state/city snapshots include titles required for formatted address text. */\n async enrichGeographicLookupTitles<T extends Partial<AXPAddressData>>(value: T): Promise<T> {\n const [country, state, city] = await Promise.all([\n this.enrichLookupField(value.country),\n this.enrichLookupField(value.state),\n this.enrichLookupField(value.city),\n ]);\n\n if (country === value.country && state === value.state && city === value.city) {\n return value;\n }\n\n return { ...value, country, state, city };\n }\n\n //#endregion\n\n //#region ---- Geographic Cascade Methods ----\n\n /**\n * Builds layout context with flat lookup ids (countryId/stateId/cityId/labelId) required for cascade triggers.\n * Same pattern as LocationManagement.Location entity fields.\n */\n buildAddressFormContext(\n addressData: Partial<AXPAddressData>,\n options?: { hasMap?: boolean },\n ): AXPAddressFormContext {\n return {\n ...addressData,\n countryId: addressData.country?.id,\n stateId: addressData.state?.id,\n cityId: addressData.city?.id,\n labelId: addressData.label?.id,\n showMap: (options?.hasMap ?? false) && !!addressData.coordinates,\n };\n }\n\n /**\n * Clears dependent geographic fields when a parent selection changes.\n * Mirrors Location entity cascade: state depends on country, city depends on state.\n */\n applyGeographicCascade(\n previous: Partial<AXPAddressFormContext>,\n next: Partial<AXPAddressFormContext>,\n ): Partial<AXPAddressFormContext> {\n const result = { ...next };\n const previousCountryId = previous.countryId ?? previous.country?.id;\n const nextCountryId = result.countryId ?? result.country?.id;\n const previousStateId = previous.stateId ?? previous.state?.id;\n const nextStateId = result.stateId ?? result.state?.id;\n\n if (previousCountryId !== nextCountryId) {\n result.state = undefined;\n result.city = undefined;\n result.stateId = undefined;\n result.cityId = undefined;\n } else if (previousStateId !== nextStateId) {\n result.city = undefined;\n result.cityId = undefined;\n }\n\n return result;\n }\n\n //#endregion\n\n //#region ---- Address Formatting Methods ----\n\n /**\n * Formats address data into full address string\n * Format: [street1], [street2], [country] - [state], [city], [postalCode]\n * Uses titles from exposed fields, excludes coordinates\n */\n formatAddress(data: Partial<AXPAddressData>): string {\n return formatAddressData(data, this.translationService.getActiveLang() || 'en-US');\n }\n\n /**\n * Collapse header parts: label title (semibold in template) + full address.\n */\n async resolveCollapsibleHeader(\n value: Partial<AXPAddressData>,\n options: { placeholder: string },\n ): Promise<AXPAddressCollapsibleHeader> {\n const enriched = await this.enrichGeographicLookupTitles(value);\n const full = (enriched.full?.trim() || this.formatAddress(enriched)).trim();\n const addressText = full !== '' ? full : options.placeholder;\n const labelText = enriched.label?.title?.trim() || null;\n return { labelText, addressText };\n }\n\n //#endregion\n\n //#region ---- Dialog & UI Methods ----\n\n /**\n * Shows address details popup dialog using the shared address form layout.\n */\n async showAddressDetailsPopup(\n addressData: Partial<AXPAddressData>,\n options: AXPAddressWidgetRuntimeOptions = {},\n ): Promise<AXPAddressData | null> {\n const { hasMap = true, hasLabel, labelEntity, useGeographicDefaults = true } = options;\n const { value: addressWithDefaults } = await this.applyGeographicDefaultsIfNeeded(addressData, {\n enabled: useGeographicDefaults,\n });\n const initialContext = this.buildAddressFormContext(addressWithDefaults, { hasMap });\n const dialogTitle = await this.translationService.translateAsync('@general:terms.common.address');\n const ref = await this.layoutBuilder\n .create()\n .dialog((dialog) => {\n dialog\n .setTitle(dialogTitle)\n .setSize('lg')\n .setContext(initialContext)\n .content((layoutBuilder) => {\n layoutBuilder.flex((flex) =>\n this.buildAddressFormContent(flex, {\n hasLabel,\n labelEntity,\n hasMap,\n addressData: addressWithDefaults,\n }),\n );\n })\n .setActions((actions: IActionBuilder) => {\n actions.cancel('@general:actions.cancel.title').submit('@general:actions.apply.title');\n });\n })\n .show();\n\n if (ref.action() === 'cancel') {\n ref.close();\n return null;\n }\n\n const result = this.applyGeographicCascade(\n initialContext,\n this.normalizeAddressData(ref.context() as AXPAddressData),\n ) as AXPAddressData;\n ref.close();\n return result;\n }\n\n //#endregion\n\n //#region ---- Data Normalization Methods ----\n\n /**\n * Normalizes address data from various input formats\n */\n normalizeAddressData(value: Partial<AXPAddressData> | AXPAddressData | string | null | undefined): AXPAddressData {\n if (typeof value === 'object' && value !== null) {\n const contextValue = value as Partial<AXPAddressData> & { labelId?: string };\n\n return {\n street1: contextValue.street1 ?? '',\n street2: contextValue.street2,\n country: contextValue.country,\n state: contextValue.state,\n city: contextValue.city,\n postalCode: contextValue.postalCode,\n coordinates: contextValue.coordinates,\n full: contextValue.full ?? this.formatAddress(contextValue),\n label: this.resolveLabel(contextValue),\n };\n }\n\n // Simple string format\n return {\n street1: '',\n street2: '',\n country: undefined,\n state: undefined,\n city: undefined,\n postalCode: '',\n coordinates: undefined,\n full: value?.toString() || '',\n label: undefined,\n };\n }\n\n /** Resolves persisted label snapshot from lookup expose or transient labelId. */\n private resolveLabel(value: Partial<AXPAddressData> & { labelId?: string }): AXPAddressData['label'] {\n const exposed = value.label;\n if (exposed?.id) {\n return { id: exposed.id, title: exposed.title };\n }\n\n if (value.labelId) {\n return { id: value.labelId, title: exposed?.title };\n }\n\n return undefined;\n }\n\n private isLookupEmpty(value?: { id?: string }): boolean {\n return isNil(value?.id) || value.id === '';\n }\n\n private snapshotGeographicFields(value: Partial<AXPAddressData>): Partial<AXPAddressData> {\n return {\n street1: value.street1,\n street2: value.street2,\n postalCode: value.postalCode,\n country: value.country,\n state: value.state,\n city: value.city,\n };\n }\n\n private resolveSettingLookupSnapshot(\n value: unknown,\n ): { id?: string; title?: string } | undefined {\n if (isNil(value) || value === '') {\n return undefined;\n }\n\n if (typeof value === 'object') {\n const record = value as { id?: unknown; title?: unknown };\n const id = extractValue<string>(record.id ?? value);\n const title = extractValue<string>(record.title);\n if (!id?.trim()) {\n return undefined;\n }\n\n return {\n id: id.trim(),\n title: title?.trim() || undefined,\n };\n }\n\n const id = extractValue<string>(value);\n return id?.trim() ? { id: id.trim() } : undefined;\n }\n\n private async enrichLookupField(\n field?: { id?: string; title?: string | AXPMultiLanguageString },\n ): Promise<{ id?: string; title?: string } | undefined> {\n if (!field?.id) {\n return field as { id?: string; title?: string } | undefined;\n }\n\n const locale = this.translationService.getActiveLang() || 'en-US';\n const existing = resolveMultiLanguageString(field.title, locale).trim();\n if (existing) {\n return { id: field.id, title: existing };\n }\n\n const title = await this.resolveGeographicRegionTitle(field.id);\n return title ? { id: field.id, title } : { id: field.id };\n }\n\n private async resolveGeographicRegionTitle(id: string): Promise<string | undefined> {\n if (this.geographicTitleCache.has(id)) {\n const cached = this.geographicTitleCache.get(id);\n return cached || undefined;\n }\n\n try {\n const row = await this.entityService.withEntity(GEOGRAPHIC_REGION_ENTITY).data().byKey(id);\n const locale = this.translationService.getActiveLang() || 'en-US';\n const raw = get(row, 'title') as string | AXPMultiLanguageString | undefined;\n const normalized = resolveMultiLanguageString(raw, locale).trim();\n this.geographicTitleCache.set(id, normalized);\n return normalized || undefined;\n } catch {\n this.geographicTitleCache.set(id, '');\n return undefined;\n }\n }\n\n //#endregion\n}\n","import {\n AXPAddressData,\n AXPAddressMode,\n extractValue,\n} from '@acorex-platform/framework-shared/core';\nimport { AXValueChangedEvent } from '@acorex/cdk/common';\nimport { AXButtonModule } from '@acorex/components/button';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXFormModule } from '@acorex/components/form';\nimport { AXTextBoxModule } from '@acorex/components/text-box';\nimport { AXTranslationModule } from '@acorex/core/translation';\nimport { AXValidationModule } from '@acorex/core/validation';\nimport { AXPLayoutRendererComponent } from '@acorex-platform/framework-client/layout/builder';\n\nimport { AXPValueWidgetComponent } from '@acorex-platform/framework-client/layout/widget-core';\nimport { CommonModule } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n HostBinding,\n computed,\n effect,\n inject,\n signal,\n} from '@angular/core';\nimport { FormsModule } from '@angular/forms';\n\nimport { isEqual } from 'lodash';\nimport { AXPAddressWidgetService } from './address.service';\nimport { AXAccordionModule } from '@acorex/components/accordion';\n\n@Component({\n selector: 'axp-address-widget-edit',\n template: `\n @if (addressMode() === 'simple') {\n <div class=\"grid grid-cols-12 gap-4 auto-cols-max\">\n <ax-text-box\n [ngModel]=\"valueAsObject().full\"\n (onValueChanged)=\"handleValueChange($event)\"\n type=\"text\"\n name=\"full\"\n [placeholder]=\"placeholder()\"\n [ngClass]=\"generateClasses('value')\"\n [disabled]=\"disabled()\"\n >\n @for (validation of validationRules(); track $index) {\n <ax-validation-rule\n [rule]=\"validation.rule\"\n [message]=\"$safeNavigationMigration(validation.options?.message)\"\n [options]=\"validation.options\"\n ></ax-validation-rule>\n }\n </ax-text-box>\n </div>\n } @else if (addressMode() === 'expandable') {\n <div class=\"w-full\">\n <ax-accordion-group>\n <ax-accordion-item\n [headerTemplate]=\"collapseHeaderTemplate\"\n [isCollapsed]=\"collapsibleCollapsed()\"\n (isCollapsedChange)=\"onCollapsedChange($event)\"\n >\n <div class=\"pt-1\">\n @for (formKey of [layoutRendererGeneration()]; track formKey) {\n <axp-layout-renderer\n [layout]=\"addressFormLayout()\"\n [context]=\"collapsibleFormContext()\"\n (contextChange)=\"onCollapsibleFormContextChange($event)\"\n />\n }\n </div>\n </ax-accordion-item>\n </ax-accordion-group>\n </div>\n\n <ng-template #collapseHeaderTemplate>\n <div class=\"ax-accordion-header-container\">\n <div class=\"ax-accordion-header-start\">\n <span\n class=\"ax-accordion-header-icon fa-light fa-map-marker-alt\"\n ></span>\n <span>\n @if (collapsibleHeaderLabel()) {\n <span class=\"font-semibold\">{{\n collapsibleHeaderLabel()\n }}</span>\n @if (collapsibleHeaderAddress()) {\n <span> · {{ collapsibleHeaderAddress() }}</span>\n }\n } @else {\n {{ collapsibleHeaderAddress() }}\n }\n </span>\n </div>\n <div class=\"ax-accordion-header-end\">\n <span\n class=\"ax-icon ax-icon-chevron-left ax-accordion-arrow\"\n [class]=\"collapsibleCollapsed() ? '-rotation-90' : 'rotation-90'\"\n ></span>\n </div>\n </div>\n </ng-template>\n } @else {\n <div class=\"grid grid-cols-12 gap-4 auto-cols-max\">\n <div class=\"flex items-center gap-2 col-span-12\">\n <ax-text-box\n [ngModel]=\"formattedAddress()\"\n type=\"text\"\n [readonly]=\"true\"\n [placeholder]=\"placeholder()\"\n class=\"flex-1\"\n [disabled]=\"disabled()\"\n >\n <ax-prefix>\n <ax-icon icon=\"fa-light fa-map-marker-alt\" />\n </ax-prefix>\n <ax-suffix>\n <ax-button\n look=\"flat\"\n size=\"sm\"\n [disabled]=\"disabled()\"\n (onClick)=\"showDetailsPopup()\"\n >\n <ax-icon icon=\"fa-light fa-cog\" />\n </ax-button>\n </ax-suffix>\n </ax-text-box>\n </div>\n </div>\n }\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n CommonModule,\n FormsModule,\n AXFormModule,\n AXDecoratorModule,\n AXTextBoxModule,\n AXValidationModule,\n AXTranslationModule,\n AXButtonModule,\n AXAccordionModule,\n AXPLayoutRendererComponent,\n ],\n})\nexport class AXPAddressWidgetEditComponent extends AXPValueWidgetComponent<\n AXPAddressData | string\n> {\n private addressService = inject(AXPAddressWidgetService);\n\n /** Collapsible mode: true = panel collapsed (only full address visible), false = expanded (edit button visible) */\n protected collapsibleCollapsed = signal<boolean>(true);\n protected collapsibleHeaderLabel = signal<string | null>(null);\n protected collapsibleHeaderAddress = signal<string>('');\n\n /** Bumped on parent discard so the nested layout renderer remounts with reverted context. */\n protected layoutRendererGeneration = signal(0);\n\n private parentContextWasRestored = false;\n private geographicDefaultsInitialized = false;\n private suppressContextSync = false;\n /** Blocks ax-collapse from auto-collapsing while a new empty row is opening. */\n private blockAutoCollapseUntil = 0;\n\n /** Expand new repeater rows so users can enter values without clicking the header again. */\n #expandEmptyAddressEffect = effect(() => {\n if (this.addressMode() !== 'expandable') {\n return;\n }\n\n if (this.shouldKeepExpandedForEntry(this.valueAsObject())) {\n this.collapsibleCollapsed.set(false);\n this.blockAutoCollapseUntil = Date.now() + 300;\n }\n });\n\n #resetNestedFormOnDiscard = effect(() => {\n if (this.addressMode() !== 'expandable') {\n return;\n }\n\n const isRestored = this.contextService.changeEvent().state === 'restored';\n if (isRestored && !this.parentContextWasRestored) {\n this.layoutRendererGeneration.update((generation) => generation + 1);\n }\n this.parentContextWasRestored = isRestored;\n });\n\n #collapsibleHeaderEffect = effect(() => {\n const value = this.valueAsObject();\n this.formattedAddress();\n const placeholder = this.placeholder();\n\n void this.addressService\n .resolveCollapsibleHeader(value, { placeholder })\n .then((header) => {\n this.collapsibleHeaderLabel.set(header.labelText);\n this.collapsibleHeaderAddress.set(header.addressText);\n });\n });\n\n #applyGeographicDefaultsEffect = effect(() => {\n if (!this.useGeographicDefaults() || this.geographicDefaultsInitialized) {\n return;\n }\n\n const value = this.valueAsObject();\n\n void this.addressService\n .applyGeographicDefaultsIfNeeded(value, { enabled: true })\n .then(({ value: merged, applied }) => {\n this.geographicDefaultsInitialized = true;\n\n if (!applied) {\n return;\n }\n\n const normalized = this.addressService.normalizeAddressData(merged);\n normalized.full = this.addressService.formatAddress(normalized);\n this.commitAddressValue(normalized);\n });\n });\n\n protected addressMode = computed<AXPAddressMode>(\n () => (extractValue(this.options()['mode']) as AXPAddressMode) || 'simple',\n );\n\n protected placeholder = computed<string>(\n () => (this.options()['placeholder'] as string) || 'Enter address...',\n );\n\n protected labelEntity = computed<string | undefined>(\n () => this.options()['labelEntity'] as string | undefined,\n );\n protected useGeographicDefaults = computed<boolean>(\n () => (this.options()['useGeographicDefaults'] as boolean) ?? true,\n );\n protected disabled = computed<boolean>(\n () => (this.options()['disabled'] as boolean) ?? false,\n );\n protected hasLabel = computed<boolean>(\n () => (this.options()['hasLabel'] as boolean) ?? false,\n );\n protected hasMap = computed<boolean>(\n () => (this.options()['hasMap'] as boolean) ?? true,\n );\n\n private format = computed<'object' | 'string'>(() => {\n if (\n this.hasLabel() ||\n this.addressMode() === 'popup' ||\n this.addressMode() === 'expandable'\n ) {\n return 'object';\n }\n return 'string';\n });\n\n protected valueAsObject = computed(() => this.toObject(this.getValue()));\n\n protected formattedAddress = computed(() => {\n const value = this.valueAsObject();\n return value.full || this.addressService.formatAddress(value);\n });\n\n /** Layout node from create().flex().build() for inline renderer (expandable mode). */\n protected addressFormLayout = computed(() =>\n this.addressService.getAddressFormLayout({\n hasLabel: this.hasLabel(),\n labelEntity: this.labelEntity(),\n hasMap: this.hasMap(),\n }),\n );\n\n /** Context for inline address form (expandable); includes showMap for map toggle. */\n protected collapsibleFormContext = computed(() =>\n this.addressService.buildAddressFormContext(this.valueAsObject(), {\n hasMap: this.hasMap(),\n }),\n );\n\n protected onCollapsibleFormContextChange(\n ctx: Partial<AXPAddressData> | null | undefined,\n ): void {\n if (ctx == null || this.suppressContextSync) {\n return;\n }\n\n const previous = this.addressService.buildAddressFormContext(\n this.valueAsObject(),\n {\n hasMap: this.hasMap(),\n },\n );\n\n void (async () => {\n const normalized = this.addressService.normalizeAddressData(\n this.addressService.applyGeographicCascade(previous, ctx),\n );\n const enriched =\n await this.addressService.enrichGeographicLookupTitles(normalized);\n enriched.full = this.addressService.formatAddress(enriched);\n\n if (isEqual(enriched, this.valueAsObject())) {\n return;\n }\n\n this.commitAddressValue(enriched);\n })();\n }\n\n protected onCollapsedChange(collapsed: boolean): void {\n if (\n collapsed &&\n (Date.now() < this.blockAutoCollapseUntil ||\n this.shouldKeepExpandedForEntry(this.valueAsObject()))\n ) {\n return;\n }\n\n this.collapsibleCollapsed.set(collapsed);\n }\n\n protected async handleValueChange(e: AXValueChangedEvent) {\n const { name, value, isUserInteraction } = e;\n if (isUserInteraction) {\n const newValues = { ...this.valueAsObject(), [name as string]: value };\n this.setValue(this.setFormattedValue(newValues));\n }\n }\n\n protected async showDetailsPopup() {\n const currentValue = this.valueAsObject();\n const result = await this.addressService.showAddressDetailsPopup(\n currentValue,\n {\n hasMap: this.hasMap(),\n hasLabel: this.hasLabel(),\n labelEntity: this.labelEntity(),\n useGeographicDefaults: this.useGeographicDefaults(),\n },\n );\n\n if (result) {\n result.full = this.addressService.formatAddress(result);\n this.setValue(this.setFormattedValue(result));\n }\n }\n\n protected generateClasses(element: 'value' | 'label'): any {\n const isValue = element === 'value';\n const hasLabel = this.hasLabel();\n const baseClass = 'col-span-12';\n if (!hasLabel) {\n return baseClass;\n }\n return {\n [baseClass]: true,\n 'lg:col-span-7': isValue,\n 'lg:col-span-5': !isValue,\n };\n }\n\n private commitAddressValue(value: AXPAddressData): void {\n this.suppressContextSync = true;\n\n if (this.shouldKeepExpandedForEntry(value)) {\n this.blockAutoCollapseUntil = Date.now() + 300;\n this.collapsibleCollapsed.set(false);\n }\n\n this.setValue(this.setFormattedValue(value));\n window.setTimeout(() => {\n this.suppressContextSync = false;\n }, 50);\n }\n\n /** True while the row has no user-entered content (ignores geographic defaults). */\n private shouldKeepExpandedForEntry(value: AXPAddressData): boolean {\n return (\n !value.street1?.trim() &&\n !value.street2?.trim() &&\n !value.postalCode?.trim() &&\n !value.label?.id\n );\n }\n\n private toObject(\n item: AXPAddressData | string | null | undefined,\n ): AXPAddressData {\n return this.addressService.normalizeAddressData(item);\n }\n\n private setFormattedValue(item: AXPAddressData): string | AXPAddressData {\n if (this.format() === 'string') {\n return item.full;\n }\n return item;\n }\n\n @HostBinding('class')\n private get __class(): string {\n return 'block flex-1';\n }\n}\n","import { AXBadgeModule } from '@acorex/components/badge';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXPValueWidgetComponent } from '@acorex-platform/framework-client/layout/widget-core';\nimport { ChangeDetectionStrategy, Component, computed, inject } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { isEmpty, isNull } from 'lodash';\nimport { AXPAddressData } from '@acorex-platform/framework-shared/core';\nimport { AXPAddressWidgetService } from './address.service';\n\n@Component({\n selector: 'axp-address-widget-view',\n template: `\n @if (hasValue()) {\n <div class=\"flex gap-2 items-center\">\n <div class=\"flex gap-2 group items-center justify-center truncate\">\n <span class=\"truncate\">{{ formattedAddress() }}</span>\n </div>\n @if (hasLabel() && labelText()) {\n <div><ax-badge color=\"primary\" [look]=\"'twotone'\" [text]=\"labelText()\"></ax-badge></div>\n }\n </div>\n } @else {\n <span class=\"text-muted\">---</span>\n }\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [FormsModule, AXBadgeModule, AXDecoratorModule],\n})\nexport class AXPAddressWidgetViewComponent extends AXPValueWidgetComponent<AXPAddressData | string> {\n private addressService = inject(AXPAddressWidgetService);\n\n protected hasLabel = computed<boolean>(() => (this.options()['hasLabel'] as boolean) ?? false);\n\n protected internalValue = computed(() => this.addressService.normalizeAddressData(this.getValue()));\n\n protected labelText = computed(() => this.internalValue().label?.title?.trim() ?? '');\n\n protected formattedAddress = computed(() => {\n const value = this.internalValue();\n return value.full || this.addressService.formatAddress(value);\n });\n\n protected hasValue = computed(() => {\n const rawValue = this.getValue();\n if (isNull(rawValue)) return false;\n const value = this.addressService.normalizeAddressData(rawValue);\n return !isEmpty(value.full);\n });\n}\n\n","import { AXPClipBoardService } from '@acorex-platform/framework-client/common';\nimport { AXPColumnWidgetComponent } from '@acorex-platform/framework-client/layout/widget-core';\n\nimport { ChangeDetectionStrategy, Component, computed, inject } from '@angular/core';\nimport { isEmpty, isNull } from 'lodash';\nimport { AXPAddressData } from '@acorex-platform/framework-shared/core';\nimport { AXPAddressWidgetService } from './address.service';\n\n@Component({\n selector: 'axp-address-widget-column',\n template: `\n @if (hasValue()) {\n <div class=\"flex justify-start items-center gap-2 group w-fit\">\n <span class=\"truncate\" [title]=\"formattedAddress()\">{{ formattedAddress() }}</span>\n <i\n (click)=\"clipboard.copy('Address', formattedAddress())\"\n class=\"fa-solid fa-copy text-neutral-400 dark:hover:text-neutral-100 hover:text-neutral-900 group-hover:visible invisible\"\n ></i>\n </div>\n } @else {\n <span class=\"text-muted\">---</span>\n }\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n inputs: ['rawValue', 'rowData'],\n})\nexport class AXPAddressWidgetColumnComponent extends AXPColumnWidgetComponent<any> {\n protected clipboard = inject(AXPClipBoardService);\n private addressService = inject(AXPAddressWidgetService);\n\n protected normalizedValue = computed(() => {\n const raw = this.rawValue;\n if (!raw) return null;\n return this.addressService.normalizeAddressData(raw);\n });\n\n protected formattedAddress = computed(() => {\n const value = this.normalizedValue();\n if (!value) return '';\n return value.full || this.addressService.formatAddress(value);\n });\n\n protected hasValue = computed(() => {\n const value = this.normalizedValue();\n if (!value) return false;\n return !isEmpty(value.full);\n });\n}\n\n","//#region ---- Imports ----\n\nimport { AXPWidgetDefinitionProvider } from '@acorex-platform/framework-client/layout/widget-core';\nimport { Injectable } from '@angular/core';\nimport { AXPAddressWidget } from './widgets/address';\n\n//#endregion\n\n//#region ---- Location Management Widgets Provider ----\n\nconst LOCATION_WIDGETS = [AXPAddressWidget];\n\n/**\n * Provider for location-management widgets (Address editor).\n * The address widget lives here because its service depends on `@acorex-platform/framework-client/layout/entity`,\n * which would otherwise create a circular dependency with `@acorex-platform/framework-client/layout/widgets`.\n */\n@Injectable()\nexport class AXMLocationManagementWidgetsProvider implements AXPWidgetDefinitionProvider {\n getWidgets() {\n return LOCATION_WIDGETS;\n }\n}\n\n//#endregion\n","import { NgModule } from \"@angular/core\";\nimport { AXP_MODULE_MANIFEST_PROVIDER, AXP_FEATURE_DEFINITION_PROVIDER } from '@acorex-platform/framework-client/core';\nimport { AXP_ENTITY_STORAGE_MIDDLEWARE } from '@acorex-platform/framework-client/layout/entity';\nimport { LocationManagementManifest } from './manifest';\nimport { RootConfig } from '@acorex-platform/module-location-management-client/contracts';\nimport { AXP_MENU_PROVIDER, AXP_SETTING_DEFINITION_PROVIDER, AXP_SEARCH_PROVIDER } from '@acorex-platform/framework-client/common';\nimport { AXP_PERMISSION_DEFINITION_PROVIDER } from '@acorex-platform/framework-client/auth';\nimport { AXP_WIDGET_DEFINITION_PROVIDER, AXPWidgetCoreModule } from '@acorex-platform/framework-client/layout/widget-core';\n\nimport { CommonModule } from \"@angular/common\";\nimport { provideCommandSetups } from '@acorex-platform/framework-client/runtime';\nimport { AXMLocationManagementPermissionDefinitionProvider } from './permission-definition.provider';\nimport { AXMLocationManagementMenuProvider } from './menu.provider';\n\nimport { AXMSettingProvider } from './setting.provider';\nimport { AXMSearchCommandProvider } from './search-command.provider';\nimport { AXMLocationManagementFeatureDefinitionProvider } from './feature-definition.provider';\nimport { locationAssignmentLocationHydrateMiddleware } from './middlewares/location-assignment-location-hydrate.middleware';\nimport { AXMLocationManagementWidgetsProvider } from './widget-definition.provider';\n\n@NgModule({\n imports: [\n CommonModule,\n AXPWidgetCoreModule,\n ],\n exports: [],\n declarations: [],\n providers: [\n // Module Manifest Provider\n {\n provide: AXP_MODULE_MANIFEST_PROVIDER,\n useValue: LocationManagementManifest,\n multi: true,\n },\n // Provider references (now using tokens)\n {\n provide: AXP_PERMISSION_DEFINITION_PROVIDER,\n useClass: AXMLocationManagementPermissionDefinitionProvider,\n multi: true,\n },\n {\n provide: AXP_MENU_PROVIDER,\n useClass: AXMLocationManagementMenuProvider,\n multi: true,\n },\n \n {\n provide: AXP_ENTITY_STORAGE_MIDDLEWARE,\n multi: true,\n useValue: locationAssignmentLocationHydrateMiddleware,\n },\n {\n provide: AXP_SETTING_DEFINITION_PROVIDER,\n useClass: AXMSettingProvider,\n multi: true,\n },\n {\n provide: AXP_SEARCH_PROVIDER,\n useClass: AXMSearchCommandProvider,\n multi: true,\n },\n {\n provide: AXP_FEATURE_DEFINITION_PROVIDER,\n useClass: AXMLocationManagementFeatureDefinitionProvider,\n multi: true,\n },\n {\n provide: AXP_WIDGET_DEFINITION_PROVIDER,\n useClass: AXMLocationManagementWidgetsProvider,\n multi: true,\n },\n provideCommandSetups([\n {\n key: `${RootConfig.module.name}.${RootConfig.entities.locationAssignment.name}:AssignExistingLocation`,\n command: () =>\n import('./commands/assign-existing-location-to-party.command').then(\n (c) => c.AXMLocationAssignmentAssignExistingLocationCommand,\n ),\n },\n {\n key: `${RootConfig.module.name}.${RootConfig.entities.locationAssignment.name}:CreateWithNewLocation`,\n command: () =>\n import('./commands/create-location-with-assignment.command').then(\n (c) => c.AXMLocationAssignmentCreateWithNewLocationCommand,\n ),\n },\n ]),\n ]\n})\nexport class AXMLocationManagementModule { }\n","import { inject, Injectable } from '@angular/core';\nimport { AXTranslationService } from '@acorex/core/translation';\nimport { AXPGeoLocation } from '@acorex-platform/framework-client/common';\nimport { AXPEntityService } from '@acorex-platform/framework-client/layout/entity';\nimport {\n resolveMultiLanguageString,\n type AXPMultiLanguageString,\n} from '@acorex-platform/framework-shared/core';\nimport { RootConfig } from '@acorex-platform/module-location-management-client/contracts';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AXMLocationManagementService {\n private readonly entityService = inject(AXPEntityService);\n private readonly translationService = inject(AXTranslationService);\n private readonly geographicRegionDataAccessor = this.entityService\n .withEntity(RootConfig.module.name, RootConfig.entities.geographicRegion.name)\n .data<any, any>();\n\n async getCountries(): Promise<AXPGeoLocation[]> {\n const result = await this.geographicRegionDataAccessor.query({\n skip: 0,\n take: 1000,\n filter: { field: 'type', operator: { type: 'equal' }, value: 'country' },\n sort: [{ field: 'title', dir: 'asc' }],\n });\n\n return result.items.map((m: any) => this.toGeoLocation(m));\n }\n\n async getProvinces(countryId?: string): Promise<AXPGeoLocation[]> {\n const result = await this.geographicRegionDataAccessor.query({\n skip: 0,\n take: 1000,\n filter: { field: 'type', operator: { type: 'equal' }, value: 'state' },\n sort: [{ field: 'title', dir: 'asc' }],\n });\n\n return result.items.map((m: any) => this.toGeoLocation(m));\n }\n\n async getCities(filter?: { countryId?: string; provinceId?: string }): Promise<AXPGeoLocation[]> {\n const result = await this.geographicRegionDataAccessor.query({\n skip: 0,\n take: 1000,\n filter: { field: 'type', operator: { type: 'equal' }, value: 'city' },\n sort: [{ field: 'title', dir: 'asc' }],\n });\n\n return result.items.map((m: any) => this.toGeoLocation(m));\n }\n\n private toGeoLocation(row: {\n id?: string;\n code?: string;\n title?: string | AXPMultiLanguageString;\n timezone?: string | { code?: string };\n }): AXPGeoLocation {\n const locale = this.translationService.getActiveLang() || 'en-US';\n const timezone =\n typeof row.timezone === 'string' ? row.timezone : (row.timezone?.code ?? undefined);\n return {\n id: row.id!,\n code: row.code!,\n title: resolveMultiLanguageString(row.title, locale),\n timezone,\n };\n }\n}","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAKA;AAEA;AAEA;;;AAGG;AACI,MAAM,0BAA0B,GAAsB;AAC3D,IAAA,IAAI,EAAE,UAAU,CAAC,MAAM,CAAC,IAAI;AAC5B,IAAA,OAAO,EAAE,OAAO;AAChB,IAAA,KAAK,EAAE,UAAU,CAAC,MAAM,CAAC,KAAK;AAC9B,IAAA,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4B,EAAA,UAAA,EAAA,CAAA;kBAHxC,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;ACZD;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,12 +1,28 @@
1
1
  {
2
2
  "name": "@acorex-platform/module-location-management-client",
3
- "version": "0.0.15",
3
+ "version": "0.0.21",
4
4
  "sideEffects": false,
5
+ "peerDependencies": {
6
+ "@angular/common": "^21.0.0",
7
+ "@angular/core": "^21.0.0"
8
+ },
9
+ "dependencies": {
10
+ "tslib": "^2.3.0"
11
+ },
12
+ "module": "fesm2022/acorex-platform-module-location-management-client.mjs",
13
+ "typings": "types/acorex-platform-module-location-management-client.d.ts",
5
14
  "exports": {
6
- "./package.json": "./package.json",
15
+ "./package.json": {
16
+ "default": "./package.json"
17
+ },
18
+ ".": {
19
+ "types": "./types/acorex-platform-module-location-management-client.d.ts",
20
+ "default": "./fesm2022/acorex-platform-module-location-management-client.mjs"
21
+ },
7
22
  "./contracts": {
8
- "types": "./contracts/index.d.ts",
9
- "default": "./contracts/index.js"
23
+ "types": "./types/acorex-platform-module-location-management-client-contracts.d.ts",
24
+ "default": "./fesm2022/acorex-platform-module-location-management-client-contracts.mjs"
10
25
  }
11
- }
26
+ },
27
+ "type": "module"
12
28
  }
@@ -0,0 +1,277 @@
1
+ import { AXPEntityAction, AXPEntityProperty, AXPQueryFilter, AXPEntityModel } from '@acorex-platform/framework-shared/entity';
2
+ import { AXPMultiLanguageString, AXPEntityReference } from '@acorex-platform/framework-shared/core';
3
+
4
+ declare const AXMLocationManagementFeatureKeys: {};
5
+
6
+ /** Read-only assignments list on Location detail (no create/update/delete). */
7
+ declare function locationAssignmentReadOnlyRelatedActions(): AXPEntityAction[];
8
+ /**
9
+ * Actions for LocationAssignment when shown from Party/Customer/Supplier.
10
+ * Create menu: assign existing location or create new location with assignee prefilled.
11
+ */
12
+ declare function locationAssignmentDetailsCrudActionsForPartyContext(_partyIdContextPath?: string): AXPEntityAction[];
13
+
14
+ type LocationAssignmentLocationSnapshot = {
15
+ id: string;
16
+ title: string;
17
+ fullAddress?: string;
18
+ street1?: string;
19
+ street2?: string;
20
+ postalCode?: string;
21
+ city?: {
22
+ title: string;
23
+ };
24
+ state?: {
25
+ title: string;
26
+ };
27
+ country?: {
28
+ title: string;
29
+ };
30
+ };
31
+ type LocationAssignmentPersonSnapshot = {
32
+ id: string;
33
+ fullName?: string;
34
+ phones?: unknown[];
35
+ emails?: unknown[];
36
+ };
37
+ /** Canonical assignee type for party-scoped location assignment links. */
38
+ declare const LOCATION_ASSIGNMENT_PARTY_TYPE = "BusinessCore.Party";
39
+ /** Resolves assignee display title from host/process data (plain string or multi-language object). */
40
+ declare function resolveLocationAssignmentDisplayTitle(locale: string, ...candidates: unknown[]): string;
41
+ /** Builds a location snapshot for nested LocationAssignment display fields. */
42
+ declare function buildLocationAssignmentLocationSnapshot(locationRow: Record<string, unknown>, locationId: string): LocationAssignmentLocationSnapshot;
43
+ /** Builds a person snapshot for nested LocationAssignment site-contact fields. */
44
+ declare function buildLocationAssignmentPersonSnapshot(personRow: Record<string, unknown>, personId: string): LocationAssignmentPersonSnapshot;
45
+ /** Filters LocationAssignment rows for a location detail context. */
46
+ declare function locationAssignmentLocationConditions(locationIdContextPath?: string): AXPQueryFilter[];
47
+ /** Filters LocationAssignment rows for the current details-view host entity. */
48
+ declare function locationAssignmentPartyConditions(hostIdContextPath?: string): AXPQueryFilter[];
49
+ /** Assignee lookup omitted when injected from party/customer/supplier context. */
50
+ declare const LOCATION_ASSIGNMENT_REF_PROPERTY_NAMES: readonly ["ownerRef.id", "ownerRef.type"];
51
+ /** Location lookup omitted when injected from location detail context. */
52
+ declare const LOCATION_ASSIGNMENT_LOCATION_PROPERTY_NAMES: readonly ["locationId"];
53
+ type PropertyLayoutRef = {
54
+ name: string;
55
+ layout?: Record<string, unknown>;
56
+ };
57
+ declare function omitLocationAssignmentRefFromEditLayouts<T extends PropertyLayoutRef>(layouts: T[]): T[];
58
+ declare function omitLocationAssignmentLocationFromEditLayouts<T extends PropertyLayoutRef>(layouts: T[]): T[];
59
+ /** Polymorphic assignee lookup (AssessmentCase subjectRef pattern). */
60
+ declare function createLocationAssignmentOwnerRefLookupProperty(groupId: string, options?: {
61
+ readonly?: boolean;
62
+ }): AXPEntityProperty;
63
+ /** Hidden assignee type field; defaults to BusinessCore.Party. */
64
+ declare function createLocationAssignmentOwnerRefTypeProperty(groupId: string): AXPEntityProperty;
65
+
66
+ declare const AXPLocationManagementMenuKeys: {
67
+ readonly Root: "location-management:menu";
68
+ readonly Locations: "location-management:menu:locations";
69
+ readonly Divider1: "location-management:menu:divider-1";
70
+ readonly LocationTypes: "location-management:menu:location-types";
71
+ readonly LocationRoles: "location-management:menu:location-roles";
72
+ readonly GeographicRegions: "location-management:menu:geographic-regions";
73
+ };
74
+
75
+ /**
76
+ * People & Organization capabilities used by this module.
77
+ * Domain capability keys for this module. Root groups live in `AXPCommonPermissionGroupKeys` (common contracts).
78
+ */
79
+ declare const AXPPeopleOrganizationPermissionKeys: {
80
+ readonly Access: "PeopleOrganization:Permission:Access";
81
+ readonly ViewOrganization: "PeopleOrganization:Permission:ViewOrganization";
82
+ readonly MaintainOrganization: "PeopleOrganization:Permission:MaintainOrganization";
83
+ readonly MaintainTeams: "PeopleOrganization:Permission:MaintainTeams";
84
+ readonly MaintainEmployees: "PeopleOrganization:Permission:MaintainEmployees";
85
+ readonly ManageEmployeeActions: "PeopleOrganization:Permission:ManageEmployeeActions";
86
+ readonly MaintainPersons: "PeopleOrganization:Permission:MaintainPersons";
87
+ readonly MaintainAttendance: "PeopleOrganization:Permission:MaintainAttendance";
88
+ readonly ManageAttendanceActions: "PeopleOrganization:Permission:ManageAttendanceActions";
89
+ readonly DesignJobs: "PeopleOrganization:Permission:DesignJobs";
90
+ readonly Setup: "PeopleOrganization:Permission:Setup";
91
+ };
92
+ /**
93
+ * @deprecated Prefer {@link AXPPeopleOrganizationPermissionKeys}.
94
+ * Legacy nested shape kept so existing imports compile during migration.
95
+ */
96
+ declare const AXMLocationManagementPermissionsKeys: {
97
+ readonly LocationManagement: {
98
+ readonly Management: "PeopleOrganization:Permission:Setup";
99
+ readonly Locations: {
100
+ readonly Management: "PeopleOrganization:Permission:Setup";
101
+ readonly View: "PeopleOrganization:Permission:Setup";
102
+ readonly Edit: "PeopleOrganization:Permission:Setup";
103
+ readonly Delete: "PeopleOrganization:Permission:Setup";
104
+ readonly Create: "PeopleOrganization:Permission:Setup";
105
+ };
106
+ readonly LocationTypes: {
107
+ readonly Management: "PeopleOrganization:Permission:Setup";
108
+ readonly View: "PeopleOrganization:Permission:Setup";
109
+ readonly Edit: "PeopleOrganization:Permission:Setup";
110
+ readonly Delete: "PeopleOrganization:Permission:Setup";
111
+ readonly Create: "PeopleOrganization:Permission:Setup";
112
+ };
113
+ readonly LocationRoles: {
114
+ readonly Management: "PeopleOrganization:Permission:Setup";
115
+ readonly View: "PeopleOrganization:Permission:Setup";
116
+ readonly Edit: "PeopleOrganization:Permission:Setup";
117
+ readonly Delete: "PeopleOrganization:Permission:Setup";
118
+ readonly Create: "PeopleOrganization:Permission:Setup";
119
+ };
120
+ readonly GeographicRegions: {
121
+ readonly Management: "PeopleOrganization:Permission:Setup";
122
+ readonly View: "PeopleOrganization:Permission:Setup";
123
+ readonly Edit: "PeopleOrganization:Permission:Setup";
124
+ readonly Delete: "PeopleOrganization:Permission:Setup";
125
+ readonly Create: "PeopleOrganization:Permission:Setup";
126
+ };
127
+ };
128
+ };
129
+
130
+ declare const RootConfig: {
131
+ readonly config: {
132
+ i18n: string;
133
+ };
134
+ readonly module: {
135
+ readonly name: "LocationManagement";
136
+ readonly title: "@location-management:module.title";
137
+ readonly icon: "fa-light fa-map-marker-alt";
138
+ };
139
+ readonly entities: {
140
+ readonly location: {
141
+ readonly name: "Location";
142
+ readonly title: "@location-management:locations.entities.location.title";
143
+ readonly titlePlural: "@location-management:locations.entities.location.plural";
144
+ readonly icon: "fa-light fa-map-marker-alt";
145
+ };
146
+ readonly locationType: {
147
+ readonly name: "LocationType";
148
+ readonly title: "@location-management:location-types.entities.location-type.title";
149
+ readonly titlePlural: "@location-management:location-types.entities.location-type.plural";
150
+ readonly icon: "fa-light fa-tags";
151
+ };
152
+ readonly locationRole: {
153
+ readonly name: "LocationRole";
154
+ readonly title: "@location-management:location-roles.entities.location-role.title";
155
+ readonly titlePlural: "@location-management:location-roles.entities.location-role.plural";
156
+ readonly icon: "fa-light fa-map-pin";
157
+ };
158
+ readonly geographicRegion: {
159
+ readonly name: "GeographicRegion";
160
+ readonly title: "@location-management:geographic-regions.entities.geographic-region.title";
161
+ readonly titlePlural: "@location-management:geographic-regions.entities.geographic-region.plural";
162
+ readonly icon: "fa-light fa-globe";
163
+ };
164
+ readonly locationAssignment: {
165
+ readonly name: "LocationAssignment";
166
+ readonly title: `@${string}:location-assignments.entities.location-assignment.title`;
167
+ readonly titlePlural: `@${string}:location-assignments.entities.location-assignment.plural`;
168
+ readonly icon: "fa-light fa-building-user";
169
+ };
170
+ };
171
+ };
172
+
173
+ interface AXMLocationManagementGeographicRegionEntityModel extends AXPEntityModel<string> {
174
+ title: AXPMultiLanguageString;
175
+ code?: string;
176
+ type: string;
177
+ parentId?: string;
178
+ coordinates?: string;
179
+ timezone?: string;
180
+ population?: number;
181
+ area?: number;
182
+ /** Foreign key to Financial Core Currency. */
183
+ currencyId?: string;
184
+ currency?: {
185
+ id: string;
186
+ code: string;
187
+ symbol: string;
188
+ title: AXPMultiLanguageString;
189
+ };
190
+ isActive: boolean;
191
+ }
192
+ interface GeographicRegionHierarchy {
193
+ country?: AXMLocationManagementGeographicRegionEntityModel;
194
+ state?: AXMLocationManagementGeographicRegionEntityModel;
195
+ city?: AXMLocationManagementGeographicRegionEntityModel;
196
+ district?: AXMLocationManagementGeographicRegionEntityModel;
197
+ }
198
+
199
+ interface AXMLocationManagementLocationEntityModel extends AXPEntityModel<string> {
200
+ title: string;
201
+ code?: string;
202
+ locationTypeId?: string;
203
+ locationType?: {
204
+ id: string;
205
+ title: string;
206
+ description?: string;
207
+ icon?: string;
208
+ color?: string;
209
+ };
210
+ street1: string;
211
+ street2?: string;
212
+ countryId?: string;
213
+ stateId?: string;
214
+ cityId?: string;
215
+ districtId?: string;
216
+ postalCode: string;
217
+ coordinates?: string;
218
+ description?: string;
219
+ parentLocationId?: string;
220
+ isPrimary?: boolean;
221
+ isActive: boolean;
222
+ validFrom?: Date;
223
+ validTo?: Date;
224
+ timezone?: string;
225
+ /** Computed: formatted address (from computed-property plugin) */
226
+ fullAddress?: string;
227
+ }
228
+
229
+ interface AXMLocationManagementLocationAssignmentEntityModel extends AXPEntityModel<string> {
230
+ locationId: string;
231
+ ownerRef: AXPEntityReference;
232
+ roleId: string;
233
+ personId?: string;
234
+ location?: {
235
+ id: string;
236
+ title: string;
237
+ fullAddress?: string;
238
+ street1?: string;
239
+ street2?: string;
240
+ postalCode?: string;
241
+ city?: {
242
+ title: string;
243
+ };
244
+ state?: {
245
+ title: string;
246
+ };
247
+ country?: {
248
+ title: string;
249
+ };
250
+ };
251
+ role?: {
252
+ id: string;
253
+ title: string;
254
+ };
255
+ person?: {
256
+ id: string;
257
+ fullName?: string;
258
+ phones?: unknown[];
259
+ emails?: unknown[];
260
+ };
261
+ }
262
+
263
+ interface AXMLocationManagementLocationRoleEntityModel extends AXPEntityModel<string> {
264
+ title: string;
265
+ description?: string | null;
266
+ }
267
+
268
+ interface AXMLocationManagementLocationTypeEntityModel extends AXPEntityModel<string> {
269
+ title: string;
270
+ description?: string;
271
+ icon?: string;
272
+ color?: string;
273
+ isActive: boolean;
274
+ }
275
+
276
+ export { AXMLocationManagementFeatureKeys, AXMLocationManagementPermissionsKeys, AXPLocationManagementMenuKeys, AXPPeopleOrganizationPermissionKeys, LOCATION_ASSIGNMENT_LOCATION_PROPERTY_NAMES, LOCATION_ASSIGNMENT_PARTY_TYPE, LOCATION_ASSIGNMENT_REF_PROPERTY_NAMES, RootConfig, buildLocationAssignmentLocationSnapshot, buildLocationAssignmentPersonSnapshot, createLocationAssignmentOwnerRefLookupProperty, createLocationAssignmentOwnerRefTypeProperty, locationAssignmentDetailsCrudActionsForPartyContext, locationAssignmentLocationConditions, locationAssignmentPartyConditions, locationAssignmentReadOnlyRelatedActions, omitLocationAssignmentLocationFromEditLayouts, omitLocationAssignmentRefFromEditLayouts, resolveLocationAssignmentDisplayTitle };
277
+ export type { AXMLocationManagementGeographicRegionEntityModel, AXMLocationManagementLocationAssignmentEntityModel, AXMLocationManagementLocationEntityModel, AXMLocationManagementLocationRoleEntityModel, AXMLocationManagementLocationTypeEntityModel, GeographicRegionHierarchy };
@@ -0,0 +1,42 @@
1
+ import * as i0 from '@angular/core';
2
+ import * as i1 from '@angular/common';
3
+ import * as i2 from '@acorex-platform/framework-client/layout/widget-core';
4
+ import { AXPMenuProvider, AXPMenuProviderContext, AXPSearchCommandProvider, AXPSearchResult, AXPSettingDefinitionProvider, AXPSettingDefinitionProviderContext, AXPGeoLocation } from '@acorex-platform/framework-client/common';
5
+
6
+ declare class AXMLocationManagementModule {
7
+ static ɵfac: i0.ɵɵFactoryDeclaration<AXMLocationManagementModule, never>;
8
+ static ɵmod: i0.ɵɵNgModuleDeclaration<AXMLocationManagementModule, never, [typeof i1.CommonModule, typeof i2.AXPWidgetCoreModule], never>;
9
+ static ɵinj: i0.ɵɵInjectorDeclaration<AXMLocationManagementModule>;
10
+ }
11
+
12
+ declare class AXMLocationManagementMenuProvider implements AXPMenuProvider {
13
+ private entityService;
14
+ provide(context: AXPMenuProviderContext): Promise<void>;
15
+ static ɵfac: i0.ɵɵFactoryDeclaration<AXMLocationManagementMenuProvider, never>;
16
+ static ɵprov: i0.ɵɵInjectableDeclaration<AXMLocationManagementMenuProvider>;
17
+ }
18
+
19
+ declare class AXMSearchCommandProvider extends AXPSearchCommandProvider {
20
+ commands: AXPSearchResult[];
21
+ }
22
+
23
+ declare class AXMSettingProvider implements AXPSettingDefinitionProvider {
24
+ provide(context: AXPSettingDefinitionProviderContext): Promise<void>;
25
+ }
26
+
27
+ declare class AXMLocationManagementService {
28
+ private readonly entityService;
29
+ private readonly translationService;
30
+ private readonly geographicRegionDataAccessor;
31
+ getCountries(): Promise<AXPGeoLocation[]>;
32
+ getProvinces(countryId?: string): Promise<AXPGeoLocation[]>;
33
+ getCities(filter?: {
34
+ countryId?: string;
35
+ provinceId?: string;
36
+ }): Promise<AXPGeoLocation[]>;
37
+ private toGeoLocation;
38
+ static ɵfac: i0.ɵɵFactoryDeclaration<AXMLocationManagementService, never>;
39
+ static ɵprov: i0.ɵɵInjectableDeclaration<AXMLocationManagementService>;
40
+ }
41
+
42
+ export { AXMLocationManagementMenuProvider, AXMLocationManagementModule, AXMLocationManagementService, AXMSearchCommandProvider, AXMSettingProvider };