df750910-bf1a-46a9-8bca-f1276c24f091.js.map
1.25 KB
{"version":3,"sources":["assets/script/common/classbase/ViewBase.ts"],"names":[],"mappings":";;;;;;;AAAA,mDAAgD;AAiChD,IAAI,OAAO,GAAG,IAAI,wBAAO,CAAC;AACb,QAAA,gBAAgB,GAAG,OAAO,CAAC,WAAW,EAA8B,CAAC","file":"","sourceRoot":"/","sourcesContent":["import { Event, Emitter } from \"simba-eventkit\";\n\nexport interface View {\n readonly _type: \"View\";\n name: string;\n open(parent: View): void;\n show(): void;\n hide(): void;\n close(destroy?: boolean): void;\n readonly isHidden: boolean;\n onShow: Event<() => void>;\n onHide: Event<() => void>;\n onClose: Event<() => void>;\n}\n\nexport interface Subview {\n readonly _type: \"Subview\";\n name: string;\n attachParent(parent: View): void;\n show(): void;\n hide(): void;\n readonly isHidden: boolean;\n onShow: Event<() => void>;\n onHide: Event<() => void>;\n}\n\ninterface PureViewBase<P> {\n setProps(props: P): void;\n updateProps(props: Partial<P>): void;\n // onLoadProps(props: P): void;\n // onPropChange(key: keyof P): void;\n}\n\nlet emitter = new Emitter;\nexport const OnSubviewCreated = emitter.createEvent<(subview: Subview) => void>();\n\nexport type PureView<P> = PureViewBase<P> & View;\nexport type PureSubview<P> = PureViewBase<P> & Subview;"]}