(data?: IPublicTypeRootSchema)
| 303 | |
| 304 | @action |
| 305 | createDocument(data?: IPublicTypeRootSchema): IDocumentModel { |
| 306 | const doc = new DocumentModel(this, data || this?.data?.componentsTree?.[0]); |
| 307 | this.documents.push(doc); |
| 308 | this.documentsMap.set(doc.id, doc); |
| 309 | return doc; |
| 310 | } |
| 311 | |
| 312 | open(doc?: string | IDocumentModel | IPublicTypeRootSchema): IDocumentModel | null { |
| 313 | if (!doc) { |