import { IPublicTypePropsList, IPublicTypeCompositeValue, IPublicEnumTransformStage, IBaseModelProps } from '@alilc/lowcode-types'; import type { IPublicTypePropsMap } from '@alilc/lowcode-types'; import type { IProp } from './prop'; import { INode } from '../node'; interface ExtrasObject { [key: string]: any; } export declare const EXTRA_KEY_PREFIX = "___"; export declare function getConvertedExtraKey(key: string): string; export declare function getOriginalExtraKey(key: string): string; export interface IPropParent { readonly props: IProps; readonly owner: INode; get path(): string[]; delete(prop: IProp): void; } export interface IProps extends Props { } export declare class Props implements Omit, 'getExtraProp' | 'getExtraPropValue' | 'setExtraPropValue' | 'node'>, IPropParent { readonly id: string; private items; private get maps(); readonly path: any[]; get props(): IProps; readonly owner: INode; /** * 元素个数 */ get size(): number; type: 'map' | 'list'; private purged; constructor(owner: INode, value?: IPublicTypePropsMap | IPublicTypePropsList | null, extras?: ExtrasObject); import(value?: IPublicTypePropsMap | IPublicTypePropsList | null, extras?: ExtrasObject): void; merge(value: IPublicTypePropsMap, extras?: IPublicTypePropsMap): void; export(stage?: IPublicEnumTransformStage): { props?: IPublicTypePropsMap | IPublicTypePropsList; extras?: ExtrasObject; }; /** * @deprecated */ private transformToStatic; /** * 根据 path 路径查询属性 * * @param createIfNone 当没有的时候,是否创建一个 */ query(path: string, createIfNone?: boolean): IProp | null; /** * 获取某个属性,如果不存在,临时获取一个待写入 * @param createIfNone 当没有的时候,是否创建一个 */ get(path: string, createIfNone?: boolean): IProp | null; /** * 删除项 */ delete(prop: IProp): void; /** * 删除 key */ deleteKey(key: string): void; /** * 添加值 */ add(value: IPublicTypeCompositeValue | null, key?: string | number, spread?: boolean, options?: any): IProp; /** * 是否存在 key */ has(key: string): boolean; /** * 迭代器 */ [Symbol.iterator](): { next(): { value: IProp; }; }; /** * 遍历 */ forEach(fn: (item: IProp, key: number | string | undefined) => void): void; /** * 遍历 */ map(fn: (item: IProp, key: number | string | undefined) => T): T[] | null; filter(fn: (item: IProp, key: number | string | undefined) => boolean): IProp[]; /** * 回收销毁 */ purge(): void; /** * 获取某个属性, 如果不存在,临时获取一个待写入 * @param createIfNone 当没有的时候,是否创建一个 */ getProp(path: string, createIfNone?: boolean): IProp | null; /** * 获取单个属性值 */ getPropValue(path: string): any; /** * 设置单个属性值 */ setPropValue(path: string, value: any): void; /** * 获取 props 对应的 node */ getNode(): INode; /** * @deprecated * 获取 props 对应的 node */ toData(): IPublicTypePropsMap | IPublicTypePropsList; } export {};