import Collection from "@arcgis/core/core/Collection"; import { Evented } from "@arcgis/core/core/Evented"; import { ObservableMap } from "@vertigis/arcgis-extensions/utilities/ObservableMap"; import type { ComponentModel } from "../models"; import type { Layout } from "./Layout"; /** * Represents the state of a layout node. */ export declare enum State { UNLOADED = 0, SUSPENDED = 1, ACTIVATED = 2, DEACTIVATED = 3, FAILED = 4 } /** * Possible types for XML attribute values. */ export type AttributeValue = string | number | boolean | undefined; /** * Properties used to initialize a LayoutNode. */ export interface LayoutNodeProperties { /** * Whether the node is part of the layout definition, or a temporary * transient component that will be removed when deactivated. */ transient?: boolean; /** * The node's unique ID. Must conform to valid XML identifier rules. */ id?: string; /** * The XML element name. */ name: string; /** * The XML namespace. */ namespace?: string; } /** * LayoutNode Events. */ interface LayoutNodeEvents { /** * Raised when a nodes attribute changes. */ attributeChange: undefined; } declare const LayoutNode_base: typeof Evented & (abstract new (...args: any[]) => import("@vertigis/arcgis-extensions/support/observableUtils").ObservableMixin); /** * A node in a layout tree, representing a component. */ export declare class LayoutNode extends LayoutNode_base { /** * @deprecated Do not directly reference this property. Use EventNames and * EventTypes helpers from @arcgis/core/Evented. */ readonly "@eventTypes": LayoutNodeEvents; /** * The node's attributes, keyed by attribute name. */ readonly attributes: ObservableMap; /** * The node's immediate children. */ readonly children: Collection; /** * Indicates that the node is transient and should not be included in * serialization. */ transient: boolean; /** * The most recent error that occurred while trying to activate the node. */ lastError: Error; /** * The component model. Only available once the node has been loaded. */ model: ComponentModel; private readonly _handles; private readonly _name; private readonly _namespace; private _parent; private _state; private _visualState; private _autoActivate; constructor(args: LayoutNodeProperties); /** * The unique ID for this node. */ get id(): string; /** * The node name, corresponding to the element name in layout XML. */ get name(): string; /** * The node's XML namespace. */ get namespace(): string; /** * The current state of the node. */ get state(): State; set state(value: State); /** * Gets the visual state of the node. The set of visual states is specific * to component type. */ get visualState(): string; /** * Sets the visual state of the node. The set of visual states is specific * to component type. */ set visualState(newVisualState: string); /** * The node's immediate parent. */ get parent(): LayoutNode; /** * Gets the layout that this layout node is a part of. */ get layout(): Layout; /** * Determines whether to automatically activate this node when its parent is * activated. This will only be respected when the parent node is activated * from an unloaded state. */ get autoActivate(): boolean; set autoActivate(value: boolean); /** * All of the node's ancestors. */ get ancestors(): LayoutNode[]; /** * All of the node's descendants in breadth-first search. */ get descendants(): LayoutNode[]; /** * Returns the 'config' attribute for the LayoutNode, which is the ID of its * corresponding model. */ get config(): string; destroy(): void; /** * Appends a model ID or model IDs to the current list of models. * * @param modelIds The model ID(s) to append to the current list of models. */ addModels(modelIds: string | string[]): void; /** * Removes a model ID or model IDs from the current list of models. * * @param modelIds The model ID(s) to remove from the current list of * models. */ removeModels(modelIds: string | string[]): void; } export {};