getWellKnownAssociationsCatalog

Function

There are two primary UI workflows when we consider associations:

  1. Viewing associations
  2. Forming associations

Because associations involve a 2-way agreement between parent and child, when viewing associations, there are 3 gallery states that can be viewed: "associated", "pending", and "requesting" entities. Additionally, when forming associations, we need a picker experience filtered to entities that can still be requested for association.

These define the "well-known" association catalogs that this util can return. In turn, these can be passed into the catalog and/or gallery-picker components to render the appropriate UI experience.

Parameters

Parameter Type Default Notes
i18nScope Required string

translation scope to be interpolated into the catalog

catalogName Required WellKnownAssociationCatalog

name of the well-known catalog requested

entity Required HubEntity

primary entity the catalog is being built for

associationType Required HubEntityType

type of entity the primary entity wants to view associations for

context Required IArcGISContext

contextual auth and portal information

Returns

Promise<IHubCatalog>
Property Type Notes
schemaVersion number

Schema Version

collections Optional IHubCollection[]

Collections within the Catalog

displayConfig Optional IGalleryDisplayConfig

Optional display configuration to control a catalog's appearance in the UI

emojii Optional string

Optional Emoji to show in the UI

integrity Optional {
collections:
string
scopes:
string
}

Hashes to verify the integrity of the catalog Only verified when the catalog is loaded into the editor If the hashes do not match, the catalog will not be loaded and the user will simply have the option to reset the catalog

scopes Optional ICatalogScope

Filter defines the "scopes" of the Catalog, on a per entity type basis

title Optional string

Title for the Gallery

type Optional CatalogType

Function defined in common/src/associations/wellKnownAssociationCatalogs.ts:56