| 117 | } |
| 118 | |
| 119 | export class PreviewModel implements ViewModel { |
| 120 | viewType: string; |
| 121 | blockId: string; |
| 122 | nodeModel: BlockNodeModel; |
| 123 | tabModel: TabModel; |
| 124 | noPadding?: Atom<boolean>; |
| 125 | blockAtom: Atom<Block>; |
| 126 | viewIcon: Atom<string | IconButtonDecl>; |
| 127 | viewName: Atom<string>; |
| 128 | viewText: Atom<HeaderElem[]>; |
| 129 | preIconButton: Atom<IconButtonDecl>; |
| 130 | endIconButtons: Atom<IconButtonDecl[]>; |
| 131 | hideViewName: Atom<boolean>; |
| 132 | previewTextRef: React.RefObject<HTMLDivElement>; |
| 133 | editMode: Atom<boolean>; |
| 134 | canPreview: PrimitiveAtom<boolean>; |
| 135 | specializedView: Atom<Promise<{ specializedView?: string; errorStr?: string }>>; |
| 136 | loadableSpecializedView: Atom<Loadable<{ specializedView?: string; errorStr?: string }>>; |
| 137 | manageConnection: Atom<boolean>; |
| 138 | connStatus: Atom<ConnStatus>; |
| 139 | filterOutNowsh?: Atom<boolean>; |
| 140 | |
| 141 | metaFilePath: Atom<string>; |
| 142 | statFilePath: Atom<Promise<string>>; |
| 143 | loadableFileInfo: Atom<Loadable<FileInfo>>; |
| 144 | connection: Atom<Promise<string>>; |
| 145 | connectionImmediate: Atom<string>; |
| 146 | statFile: Atom<Promise<FileInfo>>; |
| 147 | fullFile: Atom<Promise<FileData>>; |
| 148 | fileMimeType: Atom<Promise<string>>; |
| 149 | fileMimeTypeLoadable: Atom<Loadable<string>>; |
| 150 | fileContentSaved: PrimitiveAtom<string | null>; |
| 151 | fileContent: WritableAtom<Promise<string>, [string], void>; |
| 152 | newFileContent: PrimitiveAtom<string | null>; |
| 153 | connectionError: PrimitiveAtom<string>; |
| 154 | errorMsgAtom: PrimitiveAtom<ErrorMsg>; |
| 155 | |
| 156 | openFileModal: PrimitiveAtom<boolean>; |
| 157 | openFileModalDelay: PrimitiveAtom<boolean>; |
| 158 | openFileError: PrimitiveAtom<string>; |
| 159 | openFileModalGiveFocusRef: React.RefObject<() => boolean>; |
| 160 | |
| 161 | markdownShowToc: PrimitiveAtom<boolean>; |
| 162 | |
| 163 | monacoRef: React.RefObject<MonacoTypes.editor.IStandaloneCodeEditor>; |
| 164 | |
| 165 | showHiddenFiles: PrimitiveAtom<boolean>; |
| 166 | refreshVersion: PrimitiveAtom<number>; |
| 167 | directorySearchActive: PrimitiveAtom<boolean>; |
| 168 | refreshCallback: () => void; |
| 169 | directoryKeyDownHandler: (waveEvent: WaveKeyboardEvent) => boolean; |
| 170 | codeEditKeyDownHandler: (waveEvent: WaveKeyboardEvent) => boolean; |
| 171 | env: PreviewEnv; |
| 172 | |
| 173 | constructor({ blockId, nodeModel, tabModel, waveEnv }: ViewModelInitType) { |
| 174 | this.viewType = "preview"; |
| 175 | this.blockId = blockId; |
| 176 | this.nodeModel = nodeModel; |
nothing calls this directly
no outgoing calls
no test coverage detected