Interface RelationshipDetailsBindings

Defines the bindings for managing relationship details in a component.

interface RelationshipDetailsBindings {
    hiddenFields?: string[];
    initialCreateData?: Record<string, any>;
    linkReasons: Relationship[];
    newPageModel?: {
        model: PageModelObjectData;
    };
    onLinkReasonSelected: ((linkReason: Relationship) => void);
    onRelatedPageChange?: ((change: PageDataChange | PageModeChange) => void);
    onRelationshipValuesChange?: ((current: Record<string, any>, previous?: Record<string, any>) => void);
    parentObjectTypeLabel: string;
    parentObjectTypeName: string;
    readOnlyFields?: string[];
    relationshipValues?: Record<string, any>;
    selectedItem?: {
        id: string;
        type: string;
    };
    setApi?: ((api: PageViewerApi) => void);
    targetObjectTypeLabel: string;
    targetObjectTypeName: string;
}

Properties

hiddenFields?: string[]

Fields that are hidden and cannot be seen by the user within the relationships properties panel

initialCreateData?: Record<string, any>

Represents the initial field values used to populate the related object during creation.

linkReasons: Relationship[]

Represents the list of reasons that define the purpose or context of the relationship.

newPageModel?: {
    model: PageModelObjectData;
}

Contains the data for a new page model, if applicable. Includes a PageModelObjectData object to represent the model structure.

onLinkReasonSelected: ((linkReason: Relationship) => void)

Callback invoked when a link reason is selected.

Type declaration

    • (linkReason): void
    • Parameters

      • linkReason: Relationship

        The selected link reason.

      Returns void

onRelatedPageChange?: ((change: PageDataChange | PageModeChange) => void)

Callback invoked when the related page changes. Triggered by events such as data updates or mode transitions.

Type declaration

    • (change): void
    • Parameters

      Returns void

onRelationshipValuesChange?: ((current: Record<string, any>, previous?: Record<string, any>) => void)

Callback invoked when the relationship values are updated. Provides both the current and previous values for comparison.

Type declaration

    • (current, previous?): void
    • Parameters

      • current: Record<string, any>

        The updated relationship values.

      • Optionalprevious: Record<string, any>

        The previous relationship values, if available.

      Returns void

parentObjectTypeLabel: string

Specifies the user-friendly label of the parent object type.

parentObjectTypeName: string

Defines the identifier of the parent object type that owns the relationship.

readOnlyFields?: string[]

Fields that are read-only and cannot be modified by the user within the relationships properties panel

relationshipValues?: Record<string, any>

Represents the current field values of the relationship as key-value pairs.

selectedItem?: {
    id: string;
    type: string;
}

Represents the currently selected item in the relationship, if applicable. Contains an object with id and type fields to identify the selected item.

setApi?: ((api: PageViewerApi) => void)

Callback to set the API for the page viewer. Provides a PageViewerAPI instance to the component.

Type declaration

    • (api): void
    • Parameters

      Returns void

targetObjectTypeLabel: string

Defines the display label of the target object type.

targetObjectTypeName: string

Defines the identifier of the target object type that the relationship references.