mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-21 17:26:29 -05:00
refactor: move render-iframe to commons
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
parent
18206c0615
commit
aef0211092
13 changed files with 15 additions and 15 deletions
|
@ -6,7 +6,7 @@
|
|||
import * as UseBaseUrlModule from '../../../hooks/common/use-base-url'
|
||||
import { mockI18n } from '../../../test-utils/mock-i18n'
|
||||
import { testId } from '../../../utils/test-id'
|
||||
import * as RenderIframeModule from '../../editor-page/renderer-pane/render-iframe'
|
||||
import * as RenderIframeModule from '../../common/render-iframe/render-iframe'
|
||||
import type { CommonModalProps } from '../modals/common-modal'
|
||||
import * as CommonModalModule from '../modals/common-modal'
|
||||
import * as fetchMotdModule from './fetch-motd'
|
||||
|
@ -17,7 +17,7 @@ import React from 'react'
|
|||
|
||||
jest.mock('./fetch-motd')
|
||||
jest.mock('../modals/common-modal')
|
||||
jest.mock('../../editor-page/renderer-pane/render-iframe')
|
||||
jest.mock('../../common/render-iframe/render-iframe')
|
||||
jest.mock('../../../hooks/common/use-base-url')
|
||||
|
||||
describe('motd modal', () => {
|
||||
|
|
|
@ -7,9 +7,9 @@ import { cypressId } from '../../../utils/cypress-attribute'
|
|||
import { Logger } from '../../../utils/logger'
|
||||
import { testId } from '../../../utils/test-id'
|
||||
import { EditorToRendererCommunicatorContextProvider } from '../../editor-page/render-context/editor-to-renderer-communicator-context-provider'
|
||||
import { RenderIframe } from '../../editor-page/renderer-pane/render-iframe'
|
||||
import { RendererType } from '../../render-page/window-post-message-communicator/rendering-message'
|
||||
import { CommonModal } from '../modals/common-modal'
|
||||
import { RenderIframe } from '../render-iframe/render-iframe'
|
||||
import { fetchMotd, MOTD_LOCAL_STORAGE_KEY } from './fetch-motd'
|
||||
import React, { useCallback, useMemo, useEffect, useState } from 'react'
|
||||
import { Button, Modal } from 'react-bootstrap'
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*/
|
||||
import { ORIGIN, useBaseUrl } from '../../../../hooks/common/use-base-url'
|
||||
import { Logger } from '../../../../utils/logger'
|
||||
import { useEditorToRendererCommunicator } from '../../render-context/editor-to-renderer-communicator-context-provider'
|
||||
import { useEditorToRendererCommunicator } from '../../../editor-page/render-context/editor-to-renderer-communicator-context-provider'
|
||||
import type { RefObject } from 'react'
|
||||
import { useCallback, useEffect, useMemo, useRef } from 'react'
|
||||
|
|
@ -3,9 +3,9 @@
|
|||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
import type { ScrollState } from '../../../editor-page/synced-scroll/scroll-props'
|
||||
import { useSendToRenderer } from '../../../render-page/window-post-message-communicator/hooks/use-send-to-renderer'
|
||||
import { CommunicationMessageType } from '../../../render-page/window-post-message-communicator/rendering-message'
|
||||
import type { ScrollState } from '../../synced-scroll/scroll-props'
|
||||
import equal from 'fast-deep-equal'
|
||||
import { useMemo, useRef } from 'react'
|
||||
|
|
@ -7,8 +7,8 @@ import type { DarkModePreference } from '../../../redux/dark-mode/types'
|
|||
import { cypressAttribute, cypressId } from '../../../utils/cypress-attribute'
|
||||
import { Logger } from '../../../utils/logger'
|
||||
import { isTestMode } from '../../../utils/test-modes'
|
||||
import { ShowIf } from '../../common/show-if/show-if'
|
||||
import { WaitSpinner } from '../../common/wait-spinner/wait-spinner'
|
||||
import { useEditorToRendererCommunicator } from '../../editor-page/render-context/editor-to-renderer-communicator-context-provider'
|
||||
import type { ScrollProps } from '../../editor-page/synced-scroll/scroll-props'
|
||||
import { useExtensionEventEmitter } from '../../markdown-renderer/hooks/use-extension-event-emitter'
|
||||
import type { CommonMarkdownRendererProps } from '../../render-page/renderers/common-markdown-renderer-props'
|
||||
import { useEditorReceiveHandler } from '../../render-page/window-post-message-communicator/hooks/use-editor-receive-handler'
|
||||
|
@ -19,8 +19,8 @@ import type {
|
|||
} from '../../render-page/window-post-message-communicator/rendering-message'
|
||||
import type { RendererType } from '../../render-page/window-post-message-communicator/rendering-message'
|
||||
import { CommunicationMessageType } from '../../render-page/window-post-message-communicator/rendering-message'
|
||||
import { useEditorToRendererCommunicator } from '../render-context/editor-to-renderer-communicator-context-provider'
|
||||
import type { ScrollProps } from '../synced-scroll/scroll-props'
|
||||
import { ShowIf } from '../show-if/show-if'
|
||||
import { WaitSpinner } from '../wait-spinner/wait-spinner'
|
||||
import { useEffectOnRenderTypeChange } from './hooks/use-effect-on-render-type-change'
|
||||
import { useForceRenderPageUrlOnIframeLoadCallback } from './hooks/use-force-render-page-url-on-iframe-load-callback'
|
||||
import { useSendAdditionalConfigurationToRenderer } from './hooks/use-send-additional-configuration-to-renderer'
|
|
@ -5,7 +5,7 @@
|
|||
*/
|
||||
import { useTrimmedNoteMarkdownContentWithoutFrontmatter } from '../../hooks/common/use-trimmed-note-markdown-content-without-frontmatter'
|
||||
import { setRendererStatus } from '../../redux/renderer-status/methods'
|
||||
import { RenderIframe } from '../editor-page/renderer-pane/render-iframe'
|
||||
import { RenderIframe } from '../common/render-iframe/render-iframe'
|
||||
import { RendererType } from '../render-page/window-post-message-communicator/rendering-message'
|
||||
import { DocumentInfobar } from './document-infobar'
|
||||
import React, { Fragment } from 'react'
|
||||
|
|
|
@ -5,11 +5,11 @@
|
|||
*/
|
||||
import HighlightedCode from '../../../common/highlighted-code/highlighted-code'
|
||||
import { HtmlToReact } from '../../../common/html-to-react/html-to-react'
|
||||
import { RenderIframe } from '../../../common/render-iframe/render-iframe'
|
||||
import { ExtensionEventEmitterProvider } from '../../../markdown-renderer/hooks/use-extension-event-emitter'
|
||||
import { RendererType } from '../../../render-page/window-post-message-communicator/rendering-message'
|
||||
import type { CheatsheetEntry } from '../../cheatsheet/cheatsheet-extension'
|
||||
import { EditorToRendererCommunicatorContextProvider } from '../../render-context/editor-to-renderer-communicator-context-provider'
|
||||
import { RenderIframe } from '../../renderer-pane/render-iframe'
|
||||
import { ReadMoreLinkItem } from './read-more-link-item'
|
||||
import { useComponentsFromAppExtensions } from './use-components-from-app-extensions'
|
||||
import MarkdownIt from 'markdown-it'
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
import { useApplicationState } from '../../../hooks/common/use-application-state'
|
||||
import { useTrimmedNoteMarkdownContentWithoutFrontmatter } from '../../../hooks/common/use-trimmed-note-markdown-content-without-frontmatter'
|
||||
import { setRendererStatus } from '../../../redux/renderer-status/methods'
|
||||
import type { RenderIframeProps } from '../../common/render-iframe/render-iframe'
|
||||
import { RenderIframe } from '../../common/render-iframe/render-iframe'
|
||||
import { RendererType } from '../../render-page/window-post-message-communicator/rendering-message'
|
||||
import type { RenderIframeProps } from '../renderer-pane/render-iframe'
|
||||
import { RenderIframe } from '../renderer-pane/render-iframe'
|
||||
import { useOnScrollWithLineOffset } from './hooks/use-on-scroll-with-line-offset'
|
||||
import { useScrollStateWithoutLineOffset } from './hooks/use-scroll-state-without-line-offset'
|
||||
import { NoteType } from '@hedgedoc/commons'
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
import { DarkModePreference } from '../../redux/dark-mode/types'
|
||||
import { Logger } from '../../utils/logger'
|
||||
import { AsyncLoadingBoundary } from '../common/async-loading-boundary/async-loading-boundary'
|
||||
import { RenderIframe } from '../editor-page/renderer-pane/render-iframe'
|
||||
import { RenderIframe } from '../common/render-iframe/render-iframe'
|
||||
import { RendererType } from '../render-page/window-post-message-communicator/rendering-message'
|
||||
import { fetchFrontPageContent } from './requests'
|
||||
import React, { useEffect } from 'react'
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
import { useApplicationState } from '../../hooks/common/use-application-state'
|
||||
import { useTrimmedNoteMarkdownContentWithoutFrontmatter } from '../../hooks/common/use-trimmed-note-markdown-content-without-frontmatter'
|
||||
import { setRendererStatus } from '../../redux/renderer-status/methods'
|
||||
import { RenderIframe } from '../editor-page/renderer-pane/render-iframe'
|
||||
import { RenderIframe } from '../common/render-iframe/render-iframe'
|
||||
import { useSendToRenderer } from '../render-page/window-post-message-communicator/hooks/use-send-to-renderer'
|
||||
import {
|
||||
CommunicationMessageType,
|
||||
|
|
Loading…
Reference in a new issue