diff options
author | Max <max@nextcloud.com> | 2022-05-03 17:33:18 +0300 |
---|---|---|
committer | Max <max@nextcloud.com> | 2022-05-03 17:33:39 +0300 |
commit | 56ff9c56ffe1d09958028c54a17e9dc3ebc4b53e (patch) | |
tree | 16fa3c3421fb2386a1d238246ff42a4c1c2edf23 /src | |
parent | 93ba775578f31d162eafd6a1d8acf3e273962b19 (diff) |
fix: specify file extensions in import statements
As recommended in @nextcloud/eslint-config@8.0.0
https://github.com/nextcloud/eslint-config/pull/292
Signed-off-by: Max <max@nextcloud.com>
Diffstat (limited to 'src')
38 files changed, 108 insertions, 97 deletions
diff --git a/src/EditorFactory.js b/src/EditorFactory.js index b82990a9a..cbdd56a48 100644 --- a/src/EditorFactory.js +++ b/src/EditorFactory.js @@ -33,15 +33,15 @@ import CodeBlock from '@tiptap/extension-code-block' import CodeBlockLowlight from '@tiptap/extension-code-block-lowlight' import Dropcursor from '@tiptap/extension-dropcursor' import HorizontalRule from '@tiptap/extension-horizontal-rule' -import Table from './nodes/Table' -import TableCell from './nodes/TableCell' -import TableHeader from './nodes/TableHeader' -import TableHeadRow from './nodes/TableHeadRow' -import TableRow from './nodes/TableRow' +import Table from './nodes/Table.js' +import TableCell from './nodes/TableCell.js' +import TableHeader from './nodes/TableHeader.js' +import TableHeadRow from './nodes/TableHeadRow.js' +import TableRow from './nodes/TableRow.js' /* eslint-enable import/no-named-as-default */ import { Editor } from '@tiptap/core' -import { Strong, Italic, Strike, Link, Underline } from './marks' +import { Strong, Italic, Strike, Link, Underline } from './marks/index.js' import { Image, PlainTextDocument, @@ -51,13 +51,13 @@ import { TaskList, TaskItem, Callout, -} from './nodes' -import { Markdown, Emoji } from './extensions' +} from './nodes/index.js' +import { Markdown, Emoji } from './extensions/index.js' import { translate as t } from '@nextcloud/l10n' import { listLanguages, registerLanguage } from 'lowlight/lib/core' import { emojiSearch } from '@nextcloud/vue/dist/Functions/emoji' import { VueRenderer } from '@tiptap/vue-2' -import EmojiList from './components/EmojiList' +import EmojiList from './components/EmojiList.vue' import tippy from 'tippy.js' import 'proxy-polyfill' diff --git a/src/commands/index.js b/src/commands/index.js index 0667673af..8b40f8774 100644 --- a/src/commands/index.js +++ b/src/commands/index.js @@ -20,7 +20,7 @@ * */ -import listInputRule from './listInputRule' +import listInputRule from './listInputRule.js' export { listInputRule, diff --git a/src/components/EditorWrapper.vue b/src/components/EditorWrapper.vue index 913528229..6296dcd5d 100644 --- a/src/components/EditorWrapper.vue +++ b/src/components/EditorWrapper.vue @@ -92,19 +92,19 @@ import escapeHtml from 'escape-html' import moment from '@nextcloud/moment' import { showError } from '@nextcloud/dialogs' -import { EDITOR, SYNC_SERVICE } from './EditorWrapper.provider' +import { EDITOR, SYNC_SERVICE } from './EditorWrapper.provider.js' -import { SyncService, ERROR_TYPE, IDLE_TIMEOUT } from './../services/SyncService' -import { endpointUrl, getRandomGuestName } from './../helpers' -import { extensionHighlight } from '../helpers/mappings' -import { createEditor, serializePlainText, loadSyntaxHighlight } from './../EditorFactory' -import { createMarkdownSerializer } from './../extensions/Markdown' -import markdownit from './../markdownit' +import { SyncService, ERROR_TYPE, IDLE_TIMEOUT } from './../services/SyncService.js' +import { endpointUrl, getRandomGuestName } from './../helpers/index.js' +import { extensionHighlight } from '../helpers/mappings.js' +import { createEditor, serializePlainText, loadSyntaxHighlight } from './../EditorFactory.js' +import { createMarkdownSerializer } from './../extensions/Markdown.js' +import markdownit from './../markdownit/index.js' import { EditorContent } from '@tiptap/vue-2' -import { Collaboration, Keymap, UserColor } from './../extensions' -import isMobile from './../mixins/isMobile' -import store from './../mixins/store' +import { Collaboration, Keymap, UserColor } from './../extensions/index.js' +import isMobile from './../mixins/isMobile.js' +import store from './../mixins/store.js' import Tooltip from '@nextcloud/vue/dist/Directives/Tooltip' import { getVersion, receiveTransaction } from 'prosemirror-collab' import { Step } from 'prosemirror-transform' @@ -127,13 +127,13 @@ export default { name: 'EditorWrapper', components: { EditorContent, - MenuBar: () => import(/* webpackChunkName: "editor-rich" */'./MenuBar'), - MenuBubble: () => import(/* webpackChunkName: "editor-rich" */'./MenuBubble'), - ReadOnlyEditor: () => import(/* webpackChunkName: "editor" */'./ReadOnlyEditor'), - CollisionResolveDialog: () => import(/* webpackChunkName: "editor" */'./CollisionResolveDialog'), - GuestNameDialog: () => import(/* webpackChunkName: "editor-guest" */'./GuestNameDialog'), - SessionList: () => import(/* webpackChunkName: "editor-collab" */'./SessionList'), - HelpModal: () => import(/* webpackChunkName: "editor-collab" */'./HelpModal'), + MenuBar: () => import(/* webpackChunkName: "editor-rich" */'./MenuBar.vue'), + MenuBubble: () => import(/* webpackChunkName: "editor-rich" */'./MenuBubble.vue'), + ReadOnlyEditor: () => import(/* webpackChunkName: "editor" */'./ReadOnlyEditor.vue'), + CollisionResolveDialog: () => import(/* webpackChunkName: "editor" */'./CollisionResolveDialog.vue'), + GuestNameDialog: () => import(/* webpackChunkName: "editor-guest" */'./GuestNameDialog.vue'), + SessionList: () => import(/* webpackChunkName: "editor-collab" */'./SessionList.vue'), + HelpModal: () => import(/* webpackChunkName: "editor-collab" */'./HelpModal.vue'), Lock, }, directives: { diff --git a/src/components/GuestNameDialog.vue b/src/components/GuestNameDialog.vue index 77b4cc03a..370b78754 100644 --- a/src/components/GuestNameDialog.vue +++ b/src/components/GuestNameDialog.vue @@ -35,7 +35,7 @@ import Tooltip from '@nextcloud/vue/dist/Directives/Tooltip' import Avatar from '@nextcloud/vue/dist/Components/Avatar' import { generateUrl } from '@nextcloud/router' -import { useSyncServiceMixin } from './EditorWrapper.provider' +import { useSyncServiceMixin } from './EditorWrapper.provider.js' export default { name: 'GuestNameDialog', diff --git a/src/components/HelpModal.vue b/src/components/HelpModal.vue index 86d0aaf13..a5fd44c3c 100644 --- a/src/components/HelpModal.vue +++ b/src/components/HelpModal.vue @@ -160,7 +160,7 @@ <script> import Modal from '@nextcloud/vue/dist/Components/Modal' import Tooltip from '@nextcloud/vue/dist/Directives/Tooltip' -import isMobile from './../mixins/isMobile' +import isMobile from './../mixins/isMobile.js' export default { name: 'HelpModal', diff --git a/src/components/MenuBar.vue b/src/components/MenuBar.vue index 4b0e57fe7..ce2ad9108 100644 --- a/src/components/MenuBar.vue +++ b/src/components/MenuBar.vue @@ -120,10 +120,10 @@ <script> import Tooltip from '@nextcloud/vue/dist/Directives/Tooltip' -import menuBarIcons from './../mixins/menubar' -import isMobile from './../mixins/isMobile' +import menuBarIcons from './../mixins/menubar.js' +import isMobile from './../mixins/isMobile.js' -import { useEditorMixin } from './EditorWrapper.provider' +import { useEditorMixin } from './EditorWrapper.provider.js' import Actions from '@nextcloud/vue/dist/Components/Actions' import ActionButton from '@nextcloud/vue/dist/Components/ActionButton' diff --git a/src/components/MenuBubble.vue b/src/components/MenuBubble.vue index 31be99db0..ed296dc0a 100644 --- a/src/components/MenuBubble.vue +++ b/src/components/MenuBubble.vue @@ -71,10 +71,10 @@ import { BubbleMenu } from '@tiptap/vue-2' import { getMarkAttributes } from '@tiptap/core' import Tooltip from '@nextcloud/vue/dist/Directives/Tooltip' import { getCurrentUser } from '@nextcloud/auth' -import { optimalPath } from './../helpers/files' +import { optimalPath } from './../helpers/files.js' import { loadState } from '@nextcloud/initial-state' -import { useEditorMixin } from './EditorWrapper.provider' +import { useEditorMixin } from './EditorWrapper.provider.js' export default { name: 'MenuBubble', diff --git a/src/components/PublicFilesEditor.vue b/src/components/PublicFilesEditor.vue index e82e13db4..d5e4caccc 100644 --- a/src/components/PublicFilesEditor.vue +++ b/src/components/PublicFilesEditor.vue @@ -37,7 +37,7 @@ export default { name: 'PublicFilesEditor', components: { Modal, - EditorWrapper: () => import(/* webpackChunkName: "editor" */'./EditorWrapper'), + EditorWrapper: () => import(/* webpackChunkName: "editor" */'./EditorWrapper.vue'), }, props: { fileId: { diff --git a/src/components/ReadOnlyEditor.vue b/src/components/ReadOnlyEditor.vue index 8ffc4c87e..ba1fcb715 100644 --- a/src/components/ReadOnlyEditor.vue +++ b/src/components/ReadOnlyEditor.vue @@ -27,8 +27,8 @@ <script> import { EditorContent } from '@tiptap/vue-2' import escapeHtml from 'escape-html' -import { createEditor } from '../EditorFactory' -import markdownit from './../markdownit' +import { createEditor } from '../EditorFactory.js' +import markdownit from './../markdownit/index.js' export default { name: 'ReadOnlyEditor', diff --git a/src/components/SessionList.vue b/src/components/SessionList.vue index 01f49f44f..c004dc938 100644 --- a/src/components/SessionList.vue +++ b/src/components/SessionList.vue @@ -75,7 +75,7 @@ import Avatar from '@nextcloud/vue/dist/Components/Avatar' import Popover from '@nextcloud/vue/dist/Components/Popover' import Tooltip from '@nextcloud/vue/dist/Directives/Tooltip' -import store from '../mixins/store' +import store from '../mixins/store.js' const COLLABORATOR_IDLE_TIME = 60 const COLLABORATOR_DISCONNECT_TIME = 90 diff --git a/src/components/ViewerComponent.vue b/src/components/ViewerComponent.vue index 361fa1b1e..9e86c5277 100644 --- a/src/components/ViewerComponent.vue +++ b/src/components/ViewerComponent.vue @@ -33,7 +33,7 @@ export default { name: 'ViewerComponent', components: { - EditorWrapper: () => import(/* webpackChunkName: "editor" */'./EditorWrapper'), + EditorWrapper: () => import(/* webpackChunkName: "editor" */'./EditorWrapper.vue'), }, props: { filename: { diff --git a/src/extensions/UserColor.js b/src/extensions/UserColor.js index d6b55bdc7..bb9b36be1 100644 --- a/src/extensions/UserColor.js +++ b/src/extensions/UserColor.js @@ -23,8 +23,8 @@ import { Extension } from '@tiptap/core' import { Plugin } from 'prosemirror-state' import { Decoration, DecorationSet } from 'prosemirror-view' -import TrackState from './tracking/TrackState' -import { Span } from './tracking/models' +import TrackState from './tracking/TrackState.js' +import { Span } from './tracking/models.js' const UserColor = Extension.create({ diff --git a/src/extensions/index.js b/src/extensions/index.js index dfc84425f..998fff30c 100644 --- a/src/extensions/index.js +++ b/src/extensions/index.js @@ -20,11 +20,11 @@ * */ -import Emoji from './Emoji' -import Keymap from './Keymap' -import UserColor from './UserColor' -import Collaboration from './Collaboration' -import Markdown from './Markdown' +import Emoji from './Emoji.js' +import Keymap from './Keymap.js' +import UserColor from './UserColor.js' +import Collaboration from './Collaboration.js' +import Markdown from './Markdown.js' export { Emoji, diff --git a/src/extensions/tracking/TrackState.js b/src/extensions/tracking/TrackState.js index 2a3832885..3d1ec6f24 100644 --- a/src/extensions/tracking/TrackState.js +++ b/src/extensions/tracking/TrackState.js @@ -20,7 +20,7 @@ * */ -import { Span } from './models' +import { Span } from './models.js' /* * This code is heavily inspired by the change tracking example of prosemirror diff --git a/src/files.js b/src/files.js index b7ddd97b4..bf29f779b 100644 --- a/src/files.js +++ b/src/files.js @@ -21,11 +21,11 @@ */ import Vue from 'vue' -import { registerFileActionFallback, FilesWorkspacePlugin } from './helpers/files' -import FilesSettings from './views/FilesSettings' +import { registerFileActionFallback, FilesWorkspacePlugin } from './helpers/files.js' +import FilesSettings from './views/FilesSettings.vue' import { loadState } from '@nextcloud/initial-state' import { linkTo } from '@nextcloud/router' -import store from './store' +import store from './store.js' __webpack_nonce__ = btoa(OC.requestToken) // eslint-disable-line __webpack_public_path__ = linkTo('text', 'js/') // eslint-disable-line diff --git a/src/helpers/files.js b/src/helpers/files.js index 67f281d03..f4b5625d0 100644 --- a/src/helpers/files.js +++ b/src/helpers/files.js @@ -20,10 +20,10 @@ * */ -import { openMimetypes } from './mime' -import RichWorkspace from '../views/RichWorkspace' +import { openMimetypes } from './mime.js' +import RichWorkspace from '../views/RichWorkspace.vue' import { imagePath } from '@nextcloud/router' -import store from '../store' +import store from '../store.js' const FILE_ACTION_IDENTIFIER = 'Edit with text app' @@ -92,7 +92,7 @@ const registerFileActionFallback = () => { const file = window.FileList.findFile(filename) Promise.all([ import('vue'), - import(/* webpackChunkName: "files-modal" */'./../components/PublicFilesEditor'), + import(/* webpackChunkName: "files-modal" */'./../components/PublicFilesEditor.vue'), ]).then((imports) => { const path = window.FileList.getCurrentDirectory() + '/' + filename const Vue = imports[0].default diff --git a/src/main.js b/src/main.js index acc9add9a..5217a9570 100644 --- a/src/main.js +++ b/src/main.js @@ -1,4 +1,4 @@ -import store from './store' +import store from './store.js' __webpack_nonce__ = btoa(OC.requestToken) // eslint-disable-line __webpack_public_path__ = OC.linkTo('text', 'js/') // eslint-disable-line @@ -6,7 +6,7 @@ __webpack_public_path__ = OC.linkTo('text', 'js/') // eslint-disable-line if (document.getElementById('app-content')) { Promise.all([ import(/* webpackChunkName: "editor" */'vue'), - import(/* webpackChunkName: "editor" */'./views/DirectEditing'), + import(/* webpackChunkName: "editor" */'./views/DirectEditing.vue'), ]).then((imports) => { const Vue = imports[0].default Vue.prototype.t = window.t diff --git a/src/markdownit/index.js b/src/markdownit/index.js index d4c559533..ca166dbad 100644 --- a/src/markdownit/index.js +++ b/src/markdownit/index.js @@ -1,8 +1,8 @@ import MarkdownIt from 'markdown-it' import taskLists from 'markdown-it-task-lists' -import underline from './underline' -import splitMixedLists from './splitMixedLists' -import callouts from './callouts' +import underline from './underline.js' +import splitMixedLists from './splitMixedLists.js' +import callouts from './callouts.js' const markdownit = MarkdownIt('commonmark', { html: false, breaks: false }) .enable('strikethrough') diff --git a/src/marks/Link.js b/src/marks/Link.js index a5794a1a6..20cd22b9f 100644 --- a/src/marks/Link.js +++ b/src/marks/Link.js @@ -21,8 +21,8 @@ */ import TipTapLink from '@tiptap/extension-link' -import { domHref, parseHref } from './../helpers/links' -import { clickHandler } from '../plugins/link' +import { domHref, parseHref } from './../helpers/links.js' +import { clickHandler } from '../plugins/link.js' const Link = TipTapLink.extend({ diff --git a/src/marks/index.js b/src/marks/index.js index a08b05b95..20023ff07 100644 --- a/src/marks/index.js +++ b/src/marks/index.js @@ -21,10 +21,10 @@ */ import TipTapItalic from '@tiptap/extension-italic' -import Link from './Link' -import Strike from './Strike' -import Strong from './Strong' -import Underline from './Underline' +import Link from './Link.js' +import Strike from './Strike.js' +import Strong from './Strong.js' +import Underline from './Underline.js' const Italic = TipTapItalic.extend({ name: 'em', diff --git a/src/mixins/store.js b/src/mixins/store.js index 1cf36314b..83524eb2e 100644 --- a/src/mixins/store.js +++ b/src/mixins/store.js @@ -20,7 +20,7 @@ * */ -import store from '../store' +import store from '../store.js' /** * This mixin is required since we cannot be sure that the root Vue instance has diff --git a/src/nodes/BulletList.js b/src/nodes/BulletList.js index 4d4d0f537..ac32fd040 100644 --- a/src/nodes/BulletList.js +++ b/src/nodes/BulletList.js @@ -21,7 +21,7 @@ */ import TiptapBulletList from '@tiptap/extension-bullet-list' -import { listInputRule } from '../commands' +import { listInputRule } from '../commands/index.js' /* We want to allow for `* [ ]` as an input rule for bullet lists. * Therefore the list input rules need to check the input diff --git a/src/nodes/Callouts.js b/src/nodes/Callouts.js index 0f2b2e8de..44286ecd4 100644 --- a/src/nodes/Callouts.js +++ b/src/nodes/Callouts.js @@ -21,7 +21,7 @@ */ import { Node, mergeAttributes, isNodeActive } from '@tiptap/core' -import { typesAvailable } from '../markdownit/callouts' +import { typesAvailable } from './../markdownit/callouts.js' export default Node.create({ diff --git a/src/nodes/Image.js b/src/nodes/Image.js index 6a1a250cf..b772291b5 100644 --- a/src/nodes/Image.js +++ b/src/nodes/Image.js @@ -22,7 +22,7 @@ import TiptapImage from '@tiptap/extension-image' import { Plugin } from 'prosemirror-state' -import ImageView from './ImageView' +import ImageView from './ImageView.vue' import { VueNodeViewRenderer } from '@tiptap/vue-2' const Image = TiptapImage.extend({ diff --git a/src/nodes/ImageView.vue b/src/nodes/ImageView.vue index 751ce2f84..99dda2500 100644 --- a/src/nodes/ImageView.vue +++ b/src/nodes/ImageView.vue @@ -78,7 +78,7 @@ import { getCurrentUser } from '@nextcloud/auth' import { NodeViewWrapper } from '@tiptap/vue-2' import ClickOutside from 'vue-click-outside' import TrashCanIcon from 'vue-material-design-icons/TrashCan.vue' -import store from './../mixins/store' +import store from './../mixins/store.js' const imageMimes = [ 'image/png', diff --git a/src/nodes/Table.js b/src/nodes/Table.js index 8a9e564bd..d43b20332 100644 --- a/src/nodes/Table.js +++ b/src/nodes/Table.js @@ -3,7 +3,7 @@ import { Node, mergeAttributes } from '@tiptap/core' import { TextSelection } from 'prosemirror-state' import { isInTable, moveCellForward, selectionCell } from 'prosemirror-tables' import { VueNodeViewRenderer } from '@tiptap/vue-2' -import TableView from './TableView' +import TableView from './TableView.vue' /* * Markdown tables do not include captions. @@ -33,6 +33,13 @@ const tableCaption = Node.create({ }) +/** + * + * @param {object} schema - schema of the editor + * @param {number} rowsCount - number of rows in the table + * @param {number} colsCount - number of cols in the table + * @param {object} cellContent - currently unused + */ function createTable(schema, rowsCount, colsCount, cellContent) { const headerCells = [] const cells = [] @@ -54,6 +61,10 @@ function createTable(schema, rowsCount, colsCount, cellContent) { return schema.nodes.table.createChecked(null, [headRow, ...rows]) } +/** + * + * @param {object} $cell - resolved position of the current cell + */ function findSameCellInNextRow($cell) { if ($cell.index(-1) === $cell.node(-1).childCount - 1) { return null diff --git a/src/nodes/TableCell.js b/src/nodes/TableCell.js index a1f445420..34574b4b3 100644 --- a/src/nodes/TableCell.js +++ b/src/nodes/TableCell.js @@ -1,6 +1,6 @@ import { TableCell } from '@tiptap/extension-table-cell' import { VueNodeViewRenderer } from '@tiptap/vue-2' -import TableCellView from './TableCellView' +import TableCellView from './TableCellView.vue' export default TableCell.extend({ content: 'inline*', diff --git a/src/nodes/TableHead.js b/src/nodes/TableHead.js index fd845fa7d..2245742b8 100644 --- a/src/nodes/TableHead.js +++ b/src/nodes/TableHead.js @@ -1,5 +1,5 @@ import { Node, mergeAttributes } from '@tiptap/core' -import TableHeadRow from './TableHeadRow' +import TableHeadRow from './TableHeadRow.js' export default Node.create({ name: 'tableHead', diff --git a/src/nodes/TableHeadRow.js b/src/nodes/TableHeadRow.js index ea13c9b2e..18f28ecb9 100644 --- a/src/nodes/TableHeadRow.js +++ b/src/nodes/TableHeadRow.js @@ -1,4 +1,4 @@ -import TableRow from './TableRow' +import TableRow from './TableRow.js' export default TableRow.extend({ name: 'tableHeadRow', diff --git a/src/nodes/TableHeader.js b/src/nodes/TableHeader.js index f6538be5d..e260dc809 100644 --- a/src/nodes/TableHeader.js +++ b/src/nodes/TableHeader.js @@ -1,6 +1,6 @@ import { TableHeader } from '@tiptap/extension-table-header' import { VueNodeViewRenderer } from '@tiptap/vue-2' -import TableHeaderView from './TableHeaderView' +import TableHeaderView from './TableHeaderView.vue' export default TableHeader.extend({ content: 'inline*', diff --git a/src/nodes/index.js b/src/nodes/index.js index 0f8e70a43..ec8a8d5a1 100644 --- a/src/nodes/index.js +++ b/src/nodes/index.js @@ -20,14 +20,14 @@ * */ -import Image from './Image' -import PlainTextDocument from './PlainTextDocument' -import BulletList from './BulletList' -import TaskItem from './TaskItem' -import TaskList from './TaskList' -import TrailingNode from './TrailingNode' -import Heading from './Heading' -import Callout from './Callouts' +import Image from './Image.js' +import PlainTextDocument from './PlainTextDocument.js' +import BulletList from './BulletList.js' +import TaskItem from './TaskItem.js' +import TaskList from './TaskList.js' +import TrailingNode from './TrailingNode.js' +import Heading from './Heading.js' +import Callout from './Callouts.js' export { Image, diff --git a/src/plugins/link.js b/src/plugins/link.js index dde5634c7..5f352851e 100644 --- a/src/plugins/link.js +++ b/src/plugins/link.js @@ -1,6 +1,6 @@ import { generateUrl } from '@nextcloud/router' import { Plugin } from 'prosemirror-state' -import markdownit from './../markdownit' +import markdownit from './../markdownit/index.js' const clickHandler = ({ editor }) => { return new Plugin({ diff --git a/src/public.js b/src/public.js index cf28f0ce0..754d76f5e 100644 --- a/src/public.js +++ b/src/public.js @@ -1,12 +1,12 @@ -import { documentReady } from './helpers' +import { documentReady } from './helpers/index.js' import { FilesWorkspacePlugin, registerFileActionFallback, registerFileCreate, -} from './helpers/files' -import { openMimetypes } from './helpers/mime' +} from './helpers/files.js' +import { openMimetypes } from './helpers/mime.js' import { loadState } from '@nextcloud/initial-state' -import store from './store' +import store from './store.js' __webpack_nonce__ = btoa(OC.requestToken) // eslint-disable-line __webpack_public_path__ = OC.linkTo('text', 'js/') // eslint-disable-line @@ -34,7 +34,7 @@ documentReady(() => { if (openMimetypes.indexOf(mimetype) !== -1) { Promise.all([ import(/* webpackChunkName: "vendor" */'vue'), - import(/* webpackChunkName: "editor" */'./components/EditorWrapper'), + import(/* webpackChunkName: "editor" */'./components/EditorWrapper.vue'), ]).then((imports) => { const Vue = imports[0].default Vue.prototype.t = window.t diff --git a/src/services/PollingBackend.js b/src/services/PollingBackend.js index 798b20191..352e117f6 100644 --- a/src/services/PollingBackend.js +++ b/src/services/PollingBackend.js @@ -20,8 +20,8 @@ * */ import axios from '@nextcloud/axios' -import { endpointUrl } from '../helpers' -import { SyncService, ERROR_TYPE } from './SyncService' +import { endpointUrl } from '../helpers/index.js' +import { SyncService, ERROR_TYPE } from './SyncService.js' import { sendableSteps } from 'prosemirror-collab' /** diff --git a/src/services/SyncService.js b/src/services/SyncService.js index 1dfaf0362..5b672dd7e 100644 --- a/src/services/SyncService.js +++ b/src/services/SyncService.js @@ -21,8 +21,8 @@ */ import axios from '@nextcloud/axios' -import PollingBackend from './PollingBackend' -import { endpointUrl } from './../helpers' +import PollingBackend from './PollingBackend.js' +import { endpointUrl } from './../helpers/index.js' import { getVersion, sendableSteps } from 'prosemirror-collab' const defaultOptions = { diff --git a/src/viewer.js b/src/viewer.js index ae046543e..aec8d65ed 100644 --- a/src/viewer.js +++ b/src/viewer.js @@ -20,8 +20,8 @@ * */ -import ViewerComponent from './components/ViewerComponent' -import { openMimetypesMarkdown, openMimetypesPlainText } from './helpers/mime' +import ViewerComponent from './components/ViewerComponent.vue' +import { openMimetypesMarkdown, openMimetypesPlainText } from './helpers/mime.js' __webpack_nonce__ = btoa(OC.requestToken) // eslint-disable-line __webpack_public_path__ = OC.linkTo('text', 'js/') // eslint-disable-line diff --git a/src/views/DirectEditing.vue b/src/views/DirectEditing.vue index e1de3b21e..eac9bd4e1 100644 --- a/src/views/DirectEditing.vue +++ b/src/views/DirectEditing.vue @@ -38,7 +38,7 @@ <script> import Vue from 'vue' -import EditorWrapper from '../components/EditorWrapper' +import EditorWrapper from '../components/EditorWrapper.vue' const log = Vue.observable({ messages: [], diff --git a/src/views/RichWorkspace.vue b/src/views/RichWorkspace.vue index ef4d35064..f67a5d376 100644 --- a/src/views/RichWorkspace.vue +++ b/src/views/RichWorkspace.vue @@ -51,7 +51,7 @@ import { subscribe } from '@nextcloud/event-bus' export default { name: 'RichWorkspace', components: { - EditorWrapper: () => import(/* webpackChunkName: "editor" */'./../components/EditorWrapper'), + EditorWrapper: () => import(/* webpackChunkName: "editor" */'./../components/EditorWrapper.vue'), }, props: { file: { |