Home > @uniformdev/project-map

project-map package

Classes

Class

Description

ProjectMapClient

Route

UncachedProjectMapClient

Functions

Function

Description

getActiveEdition({ editions, selectEdition, selectId, selectEnabledLocales, targetLocale, }, input)

Finds the active edition for a given locale in an array of all editions. The active edition is the highest priority edition that enables the target locale. If there is no target locale, then the default edition is returned if there is one. Otherwise, undefined is returned (no edition matches).

getNodeActiveCompositionEdition({ node, targetLocale, fallbackWhenLocaleNotMatched, }, input)

Finds the active edition for a given locale in a node's compositionData. Note: All editions, including the composition, are stored in the editions array when it is present.

getNodeLocalePath(node, locale)

Given a project map node and a locale, resolves the correct path for the locale This is computed as follows: - If the locale is unspecified, then use the fallback path - If the locale is specified, then use the locale-specific path if it exists, otherwise use the fallback path

getNodeLocalePath(node, locale)

getRouteAlternateLocalesUrls(routeResponse)

Gets all possible locale specific URLs for a composition route response

This is appropriate for generating links to other locale versions of the current composition, such as for alternate language tags, language switchers, etc.

The URLs will be: * Computed based on the attached project map node path * Not include a base URL from the project map, if one is set * If a dynamic locale path segment exists, it will be rewritten automatically to the target locale

Interfaces

Interface

Description

GetActiveEditionOptions

ObjectWithEditionMetadata

Variables

Variable

Description

__INTERNAL_MISSING_PARENT_NODE_ERROR

Internal use only.

ROOT_NODE_PATH

Type Aliases

Type Alias

Description

AlternateLocaleUrls

ExpandOptions

LocalePathNode

MatchedRoute

NodeType

ProjectMapDefinition

ProjectMapDefinitions

ProjectMapDefinitionWithId

ProjectMapDeleteRequest

ProjectMapGetRequest

ProjectMapGetResponse

ProjectMapNode

ProjectMapNodeAllowedQueryString

ProjectMapNodeCompositionData

ProjectMapNodeCompositionEditionData

ProjectMapNodeData

ProjectMapNodeDeleteRequest

ProjectMapNodeGetRequest

ProjectMapNodeGetResponse

ProjectMapNodeLocale

ProjectMapNodeUpsertRequest

ProjectMapNodeUpsertRequestNode

ProjectMapNodeUpsertRequestNodeLocale

ProjectMapNodeWithId

ProjectMapNodeWithProjectMapReference

ProjectMapSubtree

ProjectMapUpsertRequest

ProjectMapUpsertResponse

UnmatchedRoute