UNPKG

wdpapi

Version:

51WORLD WdpApi is a set of programming interfaces developed by JavaScript that is responsible for negotiating between web pages and cloud rendering platforms. Supported by 51Cloud rendering platform, it enables the users to create any HTML5 UI element on

268 lines (267 loc) 8.13 kB
import { ObjectCore } from './object-core'; import { ResultType, EntityOutlinerAtomType, EntityFlagAtomType, BasicInfoAtomType, VisibleAtomType } from './data-type'; /** * @public * @class ObjectCommon * @extends ObjectCore * @implements ObjectCommonAbstract */ export declare class ObjectCommon extends ObjectCore implements ObjectCommonAbstract { activeBaseAttributes: Array<string>; protected BasicInfoAtom: BasicInfoAtomType; protected EntityOutlinerAtom: EntityOutlinerAtomType; protected VisibleAtom: VisibleAtomType; protected EntityFlagAtom: EntityFlagAtomType; get bVisible(): boolean; set bVisible(bVisible: boolean); get bLocked(): boolean; set bLocked(bLocked: boolean); get entityName(): string; set entityName(entityName: string); get customId(): string; set customId(customId: string); get customData(): any; set customData(customData: any); get parentEid(): string; set parentEid(parentEid: string); get index(): string; set index(index: string); GetLocked(): Promise<ResultType>; SetLocked(bLocked?: boolean): Promise<ResultType>; GetVisible(): Promise<ResultType>; SetVisible(bVisible?: boolean): Promise<ResultType>; GetEntityName(): Promise<ResultType>; SetEntityName(entityName: string): Promise<ResultType>; GetCustomId(): Promise<ResultType>; SetCustomId(customId: string): Promise<ResultType>; GetCustomData(): Promise<ResultType>; SetCustomData(customData: any): Promise<ResultType>; GetParentEid(): Promise<ResultType>; SetParentEid(parentEid: string): Promise<ResultType>; /** * @private * @async * @function handleVisibleAction * @param {boolean} bVisible (default value is true) * @returns {Promise<ResultType>} */ private handleVisibleAction; /** * @private * @async * @function handleLockAction * @param {boolean} bLocked (default value is false) * @returns {Promise<ResultType>} */ private handleLockAction; /** * @protected * @function getOtherData * @returns {Record<string, any>} */ protected getOtherData(): Record<string, any>; /** * @protected * @function setVisibleData * @param {Partial<VisibleAtomType>} opt * @returns {void} */ protected setVisibleData(opt: Partial<VisibleAtomType>): void; /** * @protected * @function setLockedData * @param {Partial<EntityFlagAtomType>} opt * @returns {void} */ protected setLockedData(opt: Partial<EntityFlagAtomType>): void; /** * @protected * @function setIndexData * @param {Partial<EntityOutlinerAtomType>} opt * @returns {void} */ protected setIndexData(opt: Partial<EntityOutlinerAtomType>): void; /** * @protected * @function setBasicData * @param {Partial<BasicInfoAtomType>} opt * @returns {void} */ protected setBasicData(opt: Partial<BasicInfoAtomType>): void; /** * @protected * @function getBasicData * @returns {BasicInfoAtomType} */ protected getBasicData(): BasicInfoAtomType; /** * @protected * @function handleBasicAtom * @param {Record<string, any>} oriData * @param {Record<string, any>} paramsData * @returns {void} */ protected handleBasicAtom(oriData: Record<string, any>, paramsData: Record<string, any>): void; /** * @protected * @function handleVisibleAtom * @param {Record<string, any>} oriData * @param {Record<string, any>} paramsData * @returns {void} */ protected handleVisibleAtom(oriData: Record<string, any>, paramsData: Record<string, any>): void; /** * @protected * @function handleLockedAtom * @param {Record<string, any>} oriData * @param {Record<string, any>} paramsData * @returns {void} */ protected handleLockedAtom(oriData: Record<string, any>, paramsData: Record<string, any>): void; /** * @protected * @function handleEntityOutlinerAtom * @param {Record<string, any>} oriData * @param {Record<string, any>} paramsData * @returns {void} */ protected handleEntityOutlinerAtom(oriData: Record<string, any>, paramsData: Record<string, any>): void; /** * @protected * @function validateEntityName * @param {string} entityName * @returns {void} */ protected validateEntityName(entityName: string): void; /** * @protected * @function validateCustomId * @param {string} customId * @returns {void} */ protected validateCustomId(customId: string): void; /** * @protected * @function validateVisible * @param {boolean} bVisible * @returns {void} */ protected validateVisible(bVisible: boolean): void; /** * @public * @function GetBasicScheme * @returns {{BasicInfoAtom: BasicInfoAtomType}} */ GetBasicScheme(): { BasicInfoAtom: BasicInfoAtomType; }; /** * @public * @function GetVisibleScheme * @returns {{VisibleAtom: VisibleAtomType}} */ GetVisibleScheme(): { VisibleAtom: VisibleAtomType; }; /** * @public * @function GetBaseScheme * @returns {{BasicInfoAtom: BasicInfoAtomType, VisibleAtom: VisibleAtomType}} */ GetBaseScheme(): { BasicInfoAtom: BasicInfoAtomType; VisibleAtom: VisibleAtomType; }; /** * @public * @function GetAllScheme * @returns {Record<string, any>} */ GetAllScheme(): Record<string, any>; /** * @public * @async * @function UpdateBasic * @param {Partial<BasicInfoAtomType>} opt * @returns {Promise<ResultType>} */ UpdateBasic(opt: Partial<BasicInfoAtomType>): Promise<ResultType>; /** * @public * @async * @function UpdateOutliner * @param {Partial<EntityOutlinerAtomType>} opt * @returns {Promise<ResultType>} */ UpdateOutliner(opt: Partial<EntityOutlinerAtomType>): Promise<ResultType>; /** * @public * @function SetVisibleCache * @param {boolean} bVisible (default value is true) * @returns {void} */ SetVisibleCache(bVisible?: boolean): void; /** * @public * @function generateVisibleAtom * @param {boolean} bVisible * @returns {{VisibleAtom: {bVisible: boolean}}} */ generateVisibleAtom(bVisible: boolean): { VisibleAtom: { bVisible: boolean; }; }; /** * @public * @function generateEntityFlagAtom * @param {boolean} bLocked * @returns {{EntityFlagAtom: {bLocked: boolean}}} */ generateEntityFlagAtom(bLocked: boolean): { EntityFlagAtom: { bLocked: boolean; }; }; /** * @public * @function GetData * @returns {Record<string, any>} */ GetData(): Record<string, any>; /** * @public * @function GetDataForEdit * @returns {Record<string, any>} */ GetDataForEdit(): Record<string, any>; } declare abstract class ObjectCommonAbstract { abstract GetBasicScheme: () => { BasicInfoAtom: BasicInfoAtomType; }; abstract GetVisibleScheme: () => { VisibleAtom: VisibleAtomType; }; abstract GetBaseScheme: () => { BasicInfoAtom: BasicInfoAtomType; VisibleAtom: VisibleAtomType; }; abstract GetAllScheme: () => Record<string, any>; abstract UpdateBasic: (opt: Partial<BasicInfoAtomType>) => Promise<ResultType>; abstract UpdateOutliner: (opt: Partial<EntityOutlinerAtomType>) => Promise<ResultType>; abstract SetVisibleCache: (bVisible?: boolean) => void; abstract generateVisibleAtom: (bVisible: boolean) => { VisibleAtom: { bVisible: boolean; }; }; abstract generateEntityFlagAtom: (bLocked: boolean) => { EntityFlagAtom: { bLocked: boolean; }; }; abstract GetData: () => Record<string, any>; abstract GetDataForEdit: () => Record<string, any>; } export {};