Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/text.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'js/editor-rich.js.map')
-rw-r--r--js/editor-rich.js.map2
1 files changed, 1 insertions, 1 deletions
diff --git a/js/editor-rich.js.map b/js/editor-rich.js.map
index 4373cbd1f..fbdc8faa7 100644
--- a/js/editor-rich.js.map
+++ b/js/editor-rich.js.map
@@ -1 +1 @@
-{"version":3,"file":"editor-rich.js?v=df102fcb2aa0da419e47","mappings":";u0NAmDA,MCnD8K,EDmD9K,CACAA,KAAAA,gBACAC,WAAAA,CACAC,cAAAA,WAAA,2EAEAC,MAAAA,CACAC,KAAAA,CACAC,KAAAA,OACAC,QAAAA,MAEAC,OAAAA,CACAF,KAAAA,OACAC,QAAAA,OAGAE,KAfA,WAgBA,OACAC,OAAAA,EACAC,QAAAA,EACAC,OAAAA,EACAC,WAAAA,EACAC,UAAAA,IAAAA,eAAAA,SAAAA,IAAAA,cAAAA,MACAC,QAAAA,IAAAA,KAAAA,uBAGAC,SAAAA,CACAC,WADA,WACA,MACA,sFAEAC,UAJA,WAKA,qEAEAC,mBAPA,WAQA,iEAEAC,SAVA,WAWA,sCACA,KAIA,sCAGAC,MAAAA,CACAX,MADA,SACAY,GACA,GAEAC,SAAAA,cAAAA,WAAAA,SAAAA,EAAAA,KAIAC,QApDA,WAoDA,+GACAC,EAAAA,EAAAA,WAAAA,2BAAAA,WACA,iBAEAA,EAAAA,EAAAA,WAAAA,2BAAAA,WACA,gBALA,4NAQAC,QAAAA,CACAC,QADA,aAIAC,MAJA,WAIA,WACA,cACA,2BACA,kBAGAC,UAVA,WAWA,gBAGA,iBACA,kBACA,WACAC,OAAAA,SAAAA,WAAAA,YAAAA,CAAAC,UAAAA,EAAAC,SAAAA,6IErHIC,EAAU,GAEdA,EAAQC,kBAAoB,IAC5BD,EAAQE,cAAgB,IAElBF,EAAQG,OAAS,SAA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AAYZ,EAAIU,GAAG,KAAMV,EAAI4J,SAAS,QAASxJ,EAAG,SAAS,CAACI,YAAY,qBAAqBF,MAAM,CAAE,YAAaN,EAAI4J,SAAS,SAAUrJ,MAAM,CAAC,0BAA0B,eAAeE,GAAG,CAAC,MAAQ,SAASa,GAAQ,OAAOtB,EAAI2J,mBAAmB,CAACvJ,EAAG,UAAUJ,EAAIU,GAAG,KAAKN,EAAG,OAAO,CAACI,YAAY,0BAA0B,CAACR,EAAIU,GAAG,aAAaV,EAAIW,GAAGX,EAAIY,EAAE,OAAQ,gBAAgB,eAAe,GAAGZ,EAAIa,OAAO,KACxuE,IIWpB,EACA,KACA,WACA,MAI8B","sources":["webpack:///text/src/views/RichWorkspace.vue","webpack:///text/src/views/RichWorkspace.vue?vue&type=script&lang=js&","webpack://text/./src/views/RichWorkspace.vue?5a30","webpack://text/./src/views/RichWorkspace.vue?c027","webpack:///text/src/views/RichWorkspace.vue?vue&type=template&id=79a62630&scoped=true&","webpack:///text/src/helpers/files.js","webpack:///text/src/components/MenuBubble.vue?vue&type=style&index=0&id=2716a5d6&scoped=true&lang=scss&","webpack:///text/src/views/RichWorkspace.vue?vue&type=style&index=0&id=79a62630&lang=scss&scoped=true&","webpack:///text/src/components/MenuBubble.vue?vue&type=template&id=2716a5d6&scoped=true&","webpack:///text/src/components/MenuBubble.vue","webpack:///text/src/components/MenuBubble.vue?vue&type=script&lang=js&","webpack://text/./src/components/MenuBubble.vue?fa65","webpack://text/./src/components/MenuBubble.vue?8445"],"sourcesContent":["<!--\n - @copyright Copyright (c) 2019 Julius Härtl <jus@bitgrid.net>\n -\n - @author Julius Härtl <jus@bitgrid.net>\n -\n - @license GNU AGPL version 3 or any later version\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n -\n -->\n\n<template>\n\t<div v-if=\"enabled\" id=\"rich-workspace\" :class=\"{'icon-loading': !loaded || !ready, 'focus': focus, 'dark': darkTheme, 'creatable': canCreate}\">\n\t\t<div v-if=\"showEmptyWorkspace\" class=\"empty-workspace\" @click=\"createNew\">\n\t\t\t<p class=\"placeholder\">\n\t\t\t\t{{ t('text', 'Add notes, lists or links …') }}\n\t\t\t</p>\n\t\t</div>\n\n\t\t<EditorWrapper v-if=\"file\"\n\t\t\tv-show=\"ready\"\n\t\t\t:key=\"file.path\"\n\t\t\t:file-id=\"file.id\"\n\t\t\t:relative-path=\"filepath\"\n\t\t\t:share-token=\"shareToken\"\n\t\t\t:mime=\"file.mimetype\"\n\t\t\t:autofocus=\"autofocus\"\n\t\t\tactive\n\t\t\tautohide\n\t\t\trich-workspace\n\t\t\t@ready=\"ready=true; loaded=true\"\n\t\t\t@focus=\"focus=true\"\n\t\t\t@blur=\"unfocus\"\n\t\t\t@error=\"reset\" />\n\t</div>\n</template>\n\n<script>\nimport { subscribe } from '@nextcloud/event-bus'\n\nexport default {\n\tname: 'RichWorkspace',\n\tcomponents: {\n\t\tEditorWrapper: () => import(/* webpackChunkName: \"editor\" */'./../components/EditorWrapper.vue'),\n\t},\n\tprops: {\n\t\tfile: {\n\t\t\ttype: Object,\n\t\t\tdefault: null,\n\t\t},\n\t\tfolder: {\n\t\t\ttype: Object,\n\t\t\tdefault: null,\n\t\t},\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tfocus: false,\n\t\t\tloaded: false,\n\t\t\tready: false,\n\t\t\tautofocus: false,\n\t\t\tdarkTheme: OCA.Accessibility && OCA.Accessibility.theme === 'dark',\n\t\t\tenabled: OCA.Text.RichWorkspaceEnabled,\n\t\t}\n\t},\n\tcomputed: {\n\t\tshareToken() {\n\t\t\treturn document.getElementById('sharingToken')?.value\n\t\t},\n\t\tcanCreate() {\n\t\t\treturn !!(this.folder && (this.folder.permissions & OC.PERMISSION_CREATE))\n\t\t},\n\t\tshowEmptyWorkspace() {\n\t\t\treturn (!this.file || (this.autofocus && !this.ready)) && this.canCreate\n\t\t},\n\t\tfilepath() {\n\t\t\tconst { path, name } = this.file || {}\n\t\t\tif (!path) {\n\t\t\t\treturn undefined\n\t\t\t}\n\n\t\t\treturn path + (path.endsWith('/') ? '' : '/') + name\n\t\t},\n\t},\n\twatch: {\n\t\tfocus(newValue) {\n\t\t\tif (!newValue) {\n\t\t\t\t// TODO: change\n\t\t\t\tdocument.querySelector('#editor').scrollTo(0, 0)\n\t\t\t}\n\t\t},\n\t},\n\tasync mounted() {\n\t\tsubscribe('Text::showRichWorkspace', () => {\n\t\t\tthis.enabled = true\n\t\t})\n\t\tsubscribe('Text::hideRichWorkspace', () => {\n\t\t\tthis.enabled = false\n\t\t})\n\t},\n\tmethods: {\n\t\tunfocus() {\n\t\t\t// setTimeout(() => this.focus = false, 2000)\n\t\t},\n\t\treset() {\n\t\t\tthis.focus = false\n\t\t\tthis.$nextTick(() => {\n\t\t\t\tthis.creating = false\n\t\t\t})\n\t\t},\n\t\tcreateNew() {\n\t\t\tif (this.creating) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis.creating = true\n\t\t\tthis.autofocus = true\n\t\t\tif (!this.file) {\n\t\t\t\twindow.FileList.createFile('Readme.md', { scrollTo: false, animate: false })\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n\t#rich-workspace {\n\t\tpadding: 0 50px;\n\t\t/* Slightly reduce vertical space */\n\t\tmargin-bottom: -24px;\n\t\ttext-align: left;\n\t\tmax-height: 0;\n\t\ttransition: max-height 0.5s cubic-bezier(0, 1, 0, 1);\n\t\tz-index: 61;\n\t\tposition: relative;\n\t\t&.creatable {\n\t\t\tmin-height: 90px;\n\t\t}\n\t}\n\n\t/* For subfolders, where there are no Recommendations */\n\t#rich-workspace:only-child {\n\t\tmargin-bottom: 0;\n\t}\n\n\t.empty-workspace {\n\t\tpadding-top: 43px;\n\t\tcolor: var(--color-text-maxcontrast);\n\t\theight: 0;\n\t}\n\n\t#rich-workspace::v-deep div[contenteditable=false] {\n\t\twidth: 100%;\n\t\tpadding: 0px;\n\t\tbackground-color: var(--color-main-background);\n\t\topacity: 1;\n\t\tborder: none;\n\t}\n\n\t#rich-workspace::v-deep .text-editor {\n\t\theight: 100%;\n\t\tposition: unset !important;\n\t\ttop: auto !important;\n\t}\n\n\t#rich-workspace::v-deep .text-editor__wrapper {\n\t\tposition: unset !important;\n\t\toverflow: visible;\n\t}\n\n\t#rich-workspace::v-deep .text-editor__main {\n\t\toverflow: visible !important;\n\t}\n\n\t#rich-workspace::v-deep .content-wrapper {\n\t\toverflow: scroll !important;\n\t\tmax-height: calc(40vh - 50px);\n\t\tpadding-left: 10px;\n\t\tpadding-bottom: 60px; /* ensure menububble fits below */\n\t}\n\n\t#rich-workspace::v-deep .text-editor__wrapper .ProseMirror {\n\t\tpadding: 0px;\n\t\tmargin: 0;\n\t}\n\n\t#rich-workspace::v-deep .editor__content {\n\t\tmargin: 0;\n\t}\n\n\t#rich-workspace.focus {\n\t\tmax-height: 50vh;\n\t}\n\n\t#rich-workspace:not(.focus) {\n\t\tmax-height: 30vh;\n\t\tposition: relative;\n\t\toverflow: hidden;\n\t}\n\n\t#rich-workspace:not(.focus):not(.icon-loading):after {\n\t\tcontent: '';\n\t\tposition: absolute;\n\t\tz-index: 1;\n\t\tbottom: 0;\n\t\tleft: 0;\n\t\tpointer-events: none;\n\t\tbackground-image: linear-gradient(to bottom, rgba(255, 255, 255, 0), var(--color-main-background));\n\t\twidth: 100%;\n\t\theight: 4em;\n\t}\n\n\t#rich-workspace.dark:not(.focus):not(.icon-loading):after {\n\t\tbackground-image: linear-gradient(to bottom, rgba(0, 0, 0, 0), var(--color-main-background));\n\t}\n\n\t@media only screen and (max-width: 1024px) {\n\t\t#rich-workspace:not(.focus) {\n\t\t\tmax-height: 30vh;\n\t\t}\n\t}\n\n\thtml.ie {\n\t\t#rich-workspace::v-deep {\n\t\t\t.text-editor {\n\t\t\t\tposition: initial;\n\t\t\t}\n\n\t\t\t.text-editor__wrapper {\n\t\t\t\tposition: relative !important;\n\t\t\t\ttop: auto !important;\n\t\t\t}\n\n\t\t\t.text-editor__main {\n\t\t\t\tdisplay: flex;\n\t\t\t\tflex-direction: column;\n\t\t\t\toverflow: hidden !important;\n\t\t\t}\n\n\t\t\t.menubar {\n\t\t\t\tposition: relative;\n\t\t\t\toverflow: hidden;\n\t\t\t\tflex-shrink: 0;\n\t\t\t\theight: 44px;\n\t\t\t\ttop: auto;\n\t\t\t}\n\n\t\t\t.text-editor__main > div:nth-child(2) {\n\t\t\t\tmin-height: 44px;\n\t\t\t\toverflow-x: hidden;\n\t\t\t\toverflow-y: auto;\n\t\t\t\tflex-shrink: 1;\n\t\t\t}\n\t\t}\n\t}\n\n</style>\n","import mod from \"-!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./RichWorkspace.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./RichWorkspace.vue?vue&type=script&lang=js&\"","\n import API from \"!../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../node_modules/css-loader/dist/cjs.js!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/sass-loader/dist/cjs.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./RichWorkspace.vue?vue&type=style&index=0&id=79a62630&lang=scss&scoped=true&\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../node_modules/css-loader/dist/cjs.js!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/sass-loader/dist/cjs.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./RichWorkspace.vue?vue&type=style&index=0&id=79a62630&lang=scss&scoped=true&\";\n export default content && content.locals ? content.locals : undefined;\n","import { render, staticRenderFns } from \"./RichWorkspace.vue?vue&type=template&id=79a62630&scoped=true&\"\nimport script from \"./RichWorkspace.vue?vue&type=script&lang=js&\"\nexport * from \"./RichWorkspace.vue?vue&type=script&lang=js&\"\nimport style0 from \"./RichWorkspace.vue?vue&type=style&index=0&id=79a62630&lang=scss&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"79a62630\",\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.enabled)?_c('div',{class:{'icon-loading': !_vm.loaded || !_vm.ready, 'focus': _vm.focus, 'dark': _vm.darkTheme, 'creatable': _vm.canCreate},attrs:{\"id\":\"rich-workspace\"}},[(_vm.showEmptyWorkspace)?_c('div',{staticClass:\"empty-workspace\",on:{\"click\":_vm.createNew}},[_c('p',{staticClass:\"placeholder\"},[_vm._v(\"\\n\\t\\t\\t\"+_vm._s(_vm.t('text', 'Add notes, lists or links …'))+\"\\n\\t\\t\")])]):_vm._e(),_vm._v(\" \"),(_vm.file)?_c('EditorWrapper',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.ready),expression:\"ready\"}],key:_vm.file.path,attrs:{\"file-id\":_vm.file.id,\"relative-path\":_vm.filepath,\"share-token\":_vm.shareToken,\"mime\":_vm.file.mimetype,\"autofocus\":_vm.autofocus,\"active\":\"\",\"autohide\":\"\",\"rich-workspace\":\"\"},on:{\"ready\":function($event){_vm.ready=true; _vm.loaded=true},\"focus\":function($event){_vm.focus=true},\"blur\":_vm.unfocus,\"error\":_vm.reset}}):_vm._e()],1):_vm._e()}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","/*\n * @copyright Copyright (c) 2019 Julius Härtl <jus@bitgrid.net>\n *\n * @author Julius Härtl <jus@bitgrid.net>\n *\n * @license GNU AGPL version 3 or any later version\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\nimport { openMimetypes } from './mime.js'\nimport RichWorkspace from '../views/RichWorkspace.vue'\nimport { imagePath } from '@nextcloud/router'\nimport store from '../store.js'\n\nconst FILE_ACTION_IDENTIFIER = 'Edit with text app'\n\nconst optimalPath = function(from, to) {\n\tconst current = from.split('/')\n\tconst target = to.split('/')\n\tcurrent.pop() // ignore filename\n\twhile (current[0] === target[0]) {\n\t\tcurrent.shift()\n\t\ttarget.shift()\n\t}\n\tconst relativePath = current.fill('..').concat(target)\n\tconst absolutePath = to.split('/')\n\treturn relativePath.length < absolutePath.length\n\t\t? relativePath.join('/')\n\t\t: to\n}\n\nconst registerFileCreate = () => {\n\tconst newFileMenuPlugin = {\n\t\tattach(menu) {\n\t\t\tconst fileList = menu.fileList\n\n\t\t\t// only attach to main file list, public view is not supported yet\n\t\t\tif (fileList.id !== 'files' && fileList.id !== 'files.public') {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\t// register the new menu entry\n\t\t\tmenu.addMenuEntry({\n\t\t\t\tid: 'file',\n\t\t\t\tdisplayName: t('text', 'New text file'),\n\t\t\t\ttemplateName: t('text', 'New text file') + '.md',\n\t\t\t\ticonClass: 'icon-filetype-text',\n\t\t\t\tfileType: 'file',\n\t\t\t\tactionHandler(name) {\n\t\t\t\t\tfileList.createFile(name).then(function(status, data) {\n\t\t\t\t\t\tconst fileInfoModel = new OCA.Files.FileInfoModel(data)\n\t\t\t\t\t\tif (typeof OCA.Viewer !== 'undefined') {\n\t\t\t\t\t\t\tOCA.Files.fileActions.triggerAction('view', fileInfoModel, fileList)\n\t\t\t\t\t\t} else if (typeof OCA.Viewer === 'undefined') {\n\t\t\t\t\t\t\tOCA.Files.fileActions.triggerAction(FILE_ACTION_IDENTIFIER, fileInfoModel, fileList)\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t},\n\t\t\t})\n\t\t},\n\t}\n\tOC.Plugins.register('OCA.Files.NewFileMenu', newFileMenuPlugin)\n}\n\nconst registerFileActionFallback = () => {\n\tconst sharingToken = document.getElementById('sharingToken') ? document.getElementById('sharingToken').value : null\n\tconst dir = document.getElementById('dir').value\n\n\tif (!sharingToken || dir !== '') {\n\t\tconst ViewerRoot = document.createElement('div')\n\t\tViewerRoot.id = 'text-viewer-fallback'\n\t\tdocument.body.appendChild(ViewerRoot)\n\t\tconst registerAction = (mime) => OCA.Files.fileActions.register(\n\t\t\tmime,\n\t\t\tFILE_ACTION_IDENTIFIER,\n\t\t\tOC.PERMISSION_UPDATE | OC.PERMISSION_READ,\n\t\t\timagePath('core', 'actions/rename'),\n\t\t\t(filename) => {\n\t\t\t\tconst file = window.FileList.findFile(filename)\n\t\t\t\tPromise.all([\n\t\t\t\t\timport('vue'),\n\t\t\t\t\timport(/* webpackChunkName: \"files-modal\" */'./../components/PublicFilesEditor.vue'),\n\t\t\t\t]).then((imports) => {\n\t\t\t\t\tconst path = window.FileList.getCurrentDirectory() + '/' + filename\n\t\t\t\t\tconst Vue = imports[0].default\n\t\t\t\t\tVue.prototype.t = window.t\n\t\t\t\t\tVue.prototype.n = window.n\n\t\t\t\t\tVue.prototype.OCA = window.OCA\n\t\t\t\t\tconst Editor = imports[1].default\n\t\t\t\t\tconst vm = new Vue({\n\t\t\t\t\t\trender: function(h) { // eslint-disable-line\n\t\t\t\t\t\t\tconst self = this\n\t\t\t\t\t\t\treturn h(Editor, {\n\t\t\t\t\t\t\t\tprops: {\n\t\t\t\t\t\t\t\t\tfileId: file ? file.id : null,\n\t\t\t\t\t\t\t\t\tactive: true,\n\t\t\t\t\t\t\t\t\tshareToken: sharingToken,\n\t\t\t\t\t\t\t\t\trelativePath: path,\n\t\t\t\t\t\t\t\t\tmimeType: file.mimetype,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\ton: {\n\t\t\t\t\t\t\t\t\tclose: function() { // eslint-disable-line\n\t\t\t\t\t\t\t\t\t\tself.$destroy()\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t},\n\t\t\t\t\t})\n\t\t\t\t\tvm.$mount(ViewerRoot)\n\t\t\t\t})\n\t\t\t},\n\t\t\tt('text', 'Edit')\n\t\t)\n\n\t\tfor (let i = 0; i < openMimetypes.length; i++) {\n\t\t\tregisterAction(openMimetypes[i])\n\t\t\tOCA.Files.fileActions.setDefault(openMimetypes[i], FILE_ACTION_IDENTIFIER)\n\t\t}\n\t}\n\n}\n\nconst FilesWorkspacePlugin = {\n\n\tel: null,\n\tvm: null,\n\n\tattach(fileList) {\n\t\tif (fileList.id !== 'files' && fileList.id !== 'files.public') {\n\t\t\treturn\n\t\t}\n\n\t\tthis.el = document.createElement('div')\n\t\tfileList.registerHeader({\n\t\t\tid: 'workspace',\n\t\t\tel: this.el,\n\t\t\trender: this.render.bind(this),\n\t\t\tpriority: 10,\n\t\t})\n\n\t\tconst PROPERTY_WORKSPACE_FILE = `{${OC.Files.Client.NS_NEXTCLOUD}}rich-workspace-file`\n\n\t\tconst oldGetWebdavProperties = fileList._getWebdavProperties\n\t\tfileList._getWebdavProperties = function() {\n\t\t\treturn [\n\t\t\t\t...oldGetWebdavProperties.apply(this, arguments),\n\t\t\t\tPROPERTY_WORKSPACE_FILE,\n\t\t\t]\n\t\t}\n\n\t\tlet readmeId = null\n\n\t\tfileList.filesClient.addFileInfoParser((response, data) => {\n\t\t\tif (data.mimetype === 'httpd/unix-directory') {\n\t\t\t\tconst props = response.propStat[0].properties\n\t\t\t\tconst dir = data.path + (data.path.endsWith('/') ? '' : '/') + data.name\n\t\t\t\tif (dir === fileList.getCurrentDirectory()) {\n\t\t\t\t\treadmeId = props[PROPERTY_WORKSPACE_FILE]\n\t\t\t\t\tthis.vm.folder = {\n\t\t\t\t\t\tpermissions: data.permissions,\n\t\t\t\t\t}\n\t\t\t\t\tthis.vm.loaded = true\n\t\t\t\t\t// in case no file is found we are done\n\t\t\t\t\tthis.vm.ready = true\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (readmeId && data.id === readmeId) {\n\t\t\t\tif (data.mimetype !== 'text/markdown') {\n\t\t\t\t\tconsole.warn('Expected workspace file to be markdown:', data)\n\t\t\t\t}\n\t\t\t\tthis.open(data)\n\t\t\t\treturn\n\t\t\t}\n\t\t\t/*\n\t\t\t * Handle the creation of 'Readme.md'.\n\t\t\t * The PROPFIND after the creation does not include the parent dir.\n\t\t\t */\n\t\t\tif (data.name === 'Readme.md'\n\t\t\t\t&& data.mimetype === 'text/markdown'\n\t\t\t\t&& data.path === fileList.getCurrentDirectory()) {\n\t\t\t\tthis.open(data)\n\t\t\t}\n\t\t})\n\n\t},\n\n\trender(fileList) {\n\t\tif (fileList.id !== 'files' && fileList.id !== 'files.public') {\n\t\t\treturn\n\t\t}\n\n\t\timport('vue').then((module) => {\n\t\t\tconst Vue = module.default\n\t\t\tthis.el.id = 'files-workspace-wrapper'\n\t\t\tVue.prototype.t = window.t\n\t\t\tVue.prototype.n = window.n\n\t\t\tVue.prototype.OCA = window.OCA\n\t\t\tconst View = Vue.extend(RichWorkspace)\n\t\t\tthis.vm = new View({\n\t\t\t\tpropsData: {\n\t\t\t\t\tfile: null,\n\t\t\t\t\tfolder: null,\n\t\t\t\t},\n\t\t\t\tstore,\n\t\t\t}).$mount(this.el)\n\n\t\t\tfileList.$el.on('urlChanged', data => {\n\t\t\t\tthis.vm.file = null\n\t\t\t\tthis.vm.folder = null\n\t\t\t})\n\t\t\tfileList.$el.on('changeDirectory', data => {\n\t\t\t\tthis.vm.file = null\n\t\t\t\tthis.vm.folder = null\n\t\t\t})\n\t\t})\n\t},\n\n\topen(data) {\n\t\tconst previous = this.vm.file\n\t\tconst id = parseInt(data.id)\n\t\tthis.vm.file = {\n\t\t\t...data,\n\t\t\tid,\n\t\t}\n\t\tif (previous?.id !== id) {\n\t\t\t// Editor loads new file. Wait for it to be ready.\n\t\t\tthis.vm.ready = false\n\t\t}\n\t},\n}\n\nexport {\n\toptimalPath,\n\tregisterFileActionFallback,\n\tregisterFileCreate,\n\tFilesWorkspacePlugin,\n\tFILE_ACTION_IDENTIFIER,\n}\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".menububble[data-v-2716a5d6]{display:flex;z-index:10020;background:var(--color-main-background-translucent);box-shadow:0 1px 5px var(--color-box-shadow);border-radius:var(--border-radius-large);overflow:hidden;padding:0;margin-left:10px;height:44px}.menububble__button[data-v-2716a5d6]{flex-grow:1;border:0;padding:.9rem .7rem;margin:0;border-radius:0;cursor:pointer;background-color:var(--color-main-background);border-right:1px solid var(--color-border);display:flex;align-items:center}.menububble__button[data-v-2716a5d6]:focus,.menububble__button[data-v-2716a5d6]:hover{background-color:var(--color-background-hover);border:0;border-right:1px solid var(--color-border) !important}.menububble__button[data-v-2716a5d6]:last-child{border:0 !important}.menububble__buttontext[data-v-2716a5d6]{padding:.4rem;padding-right:0}.menububble__form[data-v-2716a5d6]{display:flex;align-items:center}.menububble__input[data-v-2716a5d6]{font:inherit;border:none;background:rgba(0,0,0,0);min-width:250px;margin:0 .5em 0 1em}\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/components/MenuBubble.vue\"],\"names\":[],\"mappings\":\"AAqLA,6BACC,YAAA,CACA,aAAA,CACA,mDAAA,CACA,4CAAA,CACA,wCAAA,CACA,eAAA,CACA,SAAA,CACA,gBAAA,CACA,WAAA,CAEA,qCACC,WAAA,CACA,QAAA,CACA,mBAAA,CACA,QAAA,CACA,eAAA,CACA,cAAA,CACA,6CAAA,CACA,0CAAA,CACA,YAAA,CACA,kBAAA,CAEA,sFAEC,8CAAA,CACA,QAAA,CACA,qDAAA,CAGD,gDACC,mBAAA,CAIF,yCACC,aAAA,CACA,eAAA,CAGD,mCACC,YAAA,CACA,kBAAA,CAGD,oCACC,YAAA,CACA,WAAA,CACA,wBAAA,CACA,eAAA,CACA,mBAAA\",\"sourcesContent\":[\"\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n.menububble {\\n\\tdisplay: flex;\\n\\tz-index: 10020;\\n\\tbackground: var(--color-main-background-translucent);\\n\\tbox-shadow: 0 1px 5px var(--color-box-shadow);\\n\\tborder-radius: var(--border-radius-large);\\n\\toverflow: hidden;\\n\\tpadding: 0;\\n\\tmargin-left: 10px;\\n\\theight: 44px;\\n\\n\\t&__button {\\n\\t\\tflex-grow: 1;\\n\\t\\tborder: 0;\\n\\t\\tpadding: 0.9rem 0.7rem;\\n\\t\\tmargin: 0;\\n\\t\\tborder-radius: 0;\\n\\t\\tcursor: pointer;\\n\\t\\tbackground-color: var(--color-main-background);\\n\\t\\tborder-right: 1px solid var(--color-border);\\n\\t\\tdisplay: flex;\\n\\t\\talign-items: center;\\n\\n\\t\\t&:focus,\\n\\t\\t&:hover {\\n\\t\\t\\tbackground-color: var(--color-background-hover);\\n\\t\\t\\tborder: 0;\\n\\t\\t\\tborder-right: 1px solid var(--color-border) !important;\\n\\t\\t}\\n\\n\\t\\t&:last-child {\\n\\t\\t\\tborder: 0 !important;\\n\\t\\t}\\n\\t}\\n\\n\\t&__buttontext {\\n\\t\\tpadding: 0.4rem;\\n\\t\\tpadding-right: 0;\\n\\t}\\n\\n\\t&__form {\\n\\t\\tdisplay: flex;\\n\\t\\talign-items: center;\\n\\t}\\n\\n\\t&__input {\\n\\t\\tfont: inherit;\\n\\t\\tborder: none;\\n\\t\\tbackground: transparent;\\n\\t\\tmin-width: 250px;\\n\\t\\tmargin: 0 0.5em 0 1em;\\n\\t}\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"#rich-workspace[data-v-79a62630]{padding:0 50px;margin-bottom:-24px;text-align:left;max-height:0;transition:max-height .5s cubic-bezier(0, 1, 0, 1);z-index:61;position:relative}#rich-workspace.creatable[data-v-79a62630]{min-height:90px}#rich-workspace[data-v-79a62630]:only-child{margin-bottom:0}.empty-workspace[data-v-79a62630]{padding-top:43px;color:var(--color-text-maxcontrast);height:0}#rich-workspace[data-v-79a62630] div[contenteditable=false]{width:100%;padding:0px;background-color:var(--color-main-background);opacity:1;border:none}#rich-workspace[data-v-79a62630] .text-editor{height:100%;position:unset !important;top:auto !important}#rich-workspace[data-v-79a62630] .text-editor__wrapper{position:unset !important;overflow:visible}#rich-workspace[data-v-79a62630] .text-editor__main{overflow:visible !important}#rich-workspace[data-v-79a62630] .content-wrapper{overflow:scroll !important;max-height:calc(40vh - 50px);padding-left:10px;padding-bottom:60px}#rich-workspace[data-v-79a62630] .text-editor__wrapper .ProseMirror{padding:0px;margin:0}#rich-workspace[data-v-79a62630] .editor__content{margin:0}#rich-workspace.focus[data-v-79a62630]{max-height:50vh}#rich-workspace[data-v-79a62630]:not(.focus){max-height:30vh;position:relative;overflow:hidden}#rich-workspace[data-v-79a62630]:not(.focus):not(.icon-loading):after{content:\\\"\\\";position:absolute;z-index:1;bottom:0;left:0;pointer-events:none;background-image:linear-gradient(to bottom, rgba(255, 255, 255, 0), var(--color-main-background));width:100%;height:4em}#rich-workspace.dark[data-v-79a62630]:not(.focus):not(.icon-loading):after{background-image:linear-gradient(to bottom, rgba(0, 0, 0, 0), var(--color-main-background))}@media only screen and (max-width: 1024px){#rich-workspace[data-v-79a62630]:not(.focus){max-height:30vh}}html.ie #rich-workspace[data-v-79a62630] .text-editor{position:initial}html.ie #rich-workspace[data-v-79a62630] .text-editor__wrapper{position:relative !important;top:auto !important}html.ie #rich-workspace[data-v-79a62630] .text-editor__main{display:flex;flex-direction:column;overflow:hidden !important}html.ie #rich-workspace[data-v-79a62630] .menubar{position:relative;overflow:hidden;flex-shrink:0;height:44px;top:auto}html.ie #rich-workspace[data-v-79a62630] .text-editor__main>div:nth-child(2){min-height:44px;overflow-x:hidden;overflow-y:auto;flex-shrink:1}\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/views/RichWorkspace.vue\"],\"names\":[],\"mappings\":\"AAwIA,iCACC,cAAA,CAEA,mBAAA,CACA,eAAA,CACA,YAAA,CACA,kDAAA,CACA,UAAA,CACA,iBAAA,CACA,2CACC,eAAA,CAKF,4CACC,eAAA,CAGD,kCACC,gBAAA,CACA,mCAAA,CACA,QAAA,CAGD,4DACC,UAAA,CACA,WAAA,CACA,6CAAA,CACA,SAAA,CACA,WAAA,CAGD,8CACC,WAAA,CACA,yBAAA,CACA,mBAAA,CAGD,uDACC,yBAAA,CACA,gBAAA,CAGD,oDACC,2BAAA,CAGD,kDACC,0BAAA,CACA,4BAAA,CACA,iBAAA,CACA,mBAAA,CAGD,oEACC,WAAA,CACA,QAAA,CAGD,kDACC,QAAA,CAGD,uCACC,eAAA,CAGD,6CACC,eAAA,CACA,iBAAA,CACA,eAAA,CAGD,sEACC,UAAA,CACA,iBAAA,CACA,SAAA,CACA,QAAA,CACA,MAAA,CACA,mBAAA,CACA,iGAAA,CACA,UAAA,CACA,UAAA,CAGD,2EACC,2FAAA,CAGD,2CACC,6CACC,eAAA,CAAA,CAMA,sDACC,gBAAA,CAGD,+DACC,4BAAA,CACA,mBAAA,CAGD,4DACC,YAAA,CACA,qBAAA,CACA,0BAAA,CAGD,kDACC,iBAAA,CACA,eAAA,CACA,aAAA,CACA,WAAA,CACA,QAAA,CAGD,6EACC,eAAA,CACA,iBAAA,CACA,eAAA,CACA,aAAA\",\"sourcesContent\":[\"\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n#rich-workspace {\\n\\tpadding: 0 50px;\\n\\t/* Slightly reduce vertical space */\\n\\tmargin-bottom: -24px;\\n\\ttext-align: left;\\n\\tmax-height: 0;\\n\\ttransition: max-height 0.5s cubic-bezier(0, 1, 0, 1);\\n\\tz-index: 61;\\n\\tposition: relative;\\n\\t&.creatable {\\n\\t\\tmin-height: 90px;\\n\\t}\\n}\\n\\n/* For subfolders, where there are no Recommendations */\\n#rich-workspace:only-child {\\n\\tmargin-bottom: 0;\\n}\\n\\n.empty-workspace {\\n\\tpadding-top: 43px;\\n\\tcolor: var(--color-text-maxcontrast);\\n\\theight: 0;\\n}\\n\\n#rich-workspace::v-deep div[contenteditable=false] {\\n\\twidth: 100%;\\n\\tpadding: 0px;\\n\\tbackground-color: var(--color-main-background);\\n\\topacity: 1;\\n\\tborder: none;\\n}\\n\\n#rich-workspace::v-deep .text-editor {\\n\\theight: 100%;\\n\\tposition: unset !important;\\n\\ttop: auto !important;\\n}\\n\\n#rich-workspace::v-deep .text-editor__wrapper {\\n\\tposition: unset !important;\\n\\toverflow: visible;\\n}\\n\\n#rich-workspace::v-deep .text-editor__main {\\n\\toverflow: visible !important;\\n}\\n\\n#rich-workspace::v-deep .content-wrapper {\\n\\toverflow: scroll !important;\\n\\tmax-height: calc(40vh - 50px);\\n\\tpadding-left: 10px;\\n\\tpadding-bottom: 60px; /* ensure menububble fits below */\\n}\\n\\n#rich-workspace::v-deep .text-editor__wrapper .ProseMirror {\\n\\tpadding: 0px;\\n\\tmargin: 0;\\n}\\n\\n#rich-workspace::v-deep .editor__content {\\n\\tmargin: 0;\\n}\\n\\n#rich-workspace.focus {\\n\\tmax-height: 50vh;\\n}\\n\\n#rich-workspace:not(.focus) {\\n\\tmax-height: 30vh;\\n\\tposition: relative;\\n\\toverflow: hidden;\\n}\\n\\n#rich-workspace:not(.focus):not(.icon-loading):after {\\n\\tcontent: '';\\n\\tposition: absolute;\\n\\tz-index: 1;\\n\\tbottom: 0;\\n\\tleft: 0;\\n\\tpointer-events: none;\\n\\tbackground-image: linear-gradient(to bottom, rgba(255, 255, 255, 0), var(--color-main-background));\\n\\twidth: 100%;\\n\\theight: 4em;\\n}\\n\\n#rich-workspace.dark:not(.focus):not(.icon-loading):after {\\n\\tbackground-image: linear-gradient(to bottom, rgba(0, 0, 0, 0), var(--color-main-background));\\n}\\n\\n@media only screen and (max-width: 1024px) {\\n\\t#rich-workspace:not(.focus) {\\n\\t\\tmax-height: 30vh;\\n\\t}\\n}\\n\\nhtml.ie {\\n\\t#rich-workspace::v-deep {\\n\\t\\t.text-editor {\\n\\t\\t\\tposition: initial;\\n\\t\\t}\\n\\n\\t\\t.text-editor__wrapper {\\n\\t\\t\\tposition: relative !important;\\n\\t\\t\\ttop: auto !important;\\n\\t\\t}\\n\\n\\t\\t.text-editor__main {\\n\\t\\t\\tdisplay: flex;\\n\\t\\t\\tflex-direction: column;\\n\\t\\t\\toverflow: hidden !important;\\n\\t\\t}\\n\\n\\t\\t.menubar {\\n\\t\\t\\tposition: relative;\\n\\t\\t\\toverflow: hidden;\\n\\t\\t\\tflex-shrink: 0;\\n\\t\\t\\theight: 44px;\\n\\t\\t\\ttop: auto;\\n\\t\\t}\\n\\n\\t\\t.text-editor__main > div:nth-child(2) {\\n\\t\\t\\tmin-height: 44px;\\n\\t\\t\\toverflow-x: hidden;\\n\\t\\t\\toverflow-y: auto;\\n\\t\\t\\tflex-shrink: 1;\\n\\t\\t}\\n\\t}\\n}\\n\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('BubbleMenu',{staticClass:\"menububble\",attrs:{\"editor\":_vm.$editor,\"tippy-options\":{ onHide: _vm.hideLinkMenu, duration: 200, placement: 'bottom' },\"data-text-el\":\"menu-bubble\"}},[(_vm.linkMenuIsActive)?_c('form',{staticClass:\"menububble__form\",on:{\"submit\":function($event){$event.preventDefault();return _vm.setLinkUrl()}}},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.linkUrl),expression:\"linkUrl\"}],ref:\"linkInput\",staticClass:\"menububble__input\",attrs:{\"type\":\"text\",\"placeholder\":\"https://\"},domProps:{\"value\":(_vm.linkUrl)},on:{\"keydown\":function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,\"esc\",27,$event.key,[\"Esc\",\"Escape\"])){ return null; }return _vm.hideLinkMenu.apply(null, arguments)},\"input\":function($event){if($event.target.composing){ return; }_vm.linkUrl=$event.target.value}}}),_vm._v(\" \"),_c('button',{staticClass:\"menububble__button\",attrs:{\"data-text-bubble-action\":\"confirm\",\"type\":\"button\",\"tabindex\":\"0\"},on:{\"click\":function($event){return _vm.setLinkUrl()}}},[_c('Check')],1)]):[_c('button',{staticClass:\"menububble__button\",class:{ 'is-active': _vm.isActive('link') },attrs:{\"data-text-bubble-action\":\"add-link\"},on:{\"click\":function($event){return _vm.showLinkMenu()}}},[_c('Link'),_vm._v(\" \"),_c('span',{staticClass:\"menububble__buttontext\"},[_vm._v(\"\\n\\t\\t\\t\\t\"+_vm._s(_vm.isActive('link') ? _vm.t('text', 'Update Link') : _vm.t('text', 'Add Link'))+\"\\n\\t\\t\\t\")])],1),_vm._v(\" \"),(!_vm.isUsingDirectEditing)?_c('button',{staticClass:\"menububble__button\",class:{ 'is-active': _vm.isActive('link') },attrs:{\"data-text-bubble-action\":\"add-file\"},on:{\"click\":function($event){return _vm.selectFile()}}},[_c('Document'),_vm._v(\" \"),_c('span',{staticClass:\"menububble__buttontext\"},[_vm._v(_vm._s(_vm.t('text', 'Link file')))])],1):_vm._e(),_vm._v(\" \"),(_vm.isActive('link'))?_c('button',{staticClass:\"menububble__button\",class:{ 'is-active': _vm.isActive('link') },attrs:{\"data-text-bubble-action\":\"remove-link\"},on:{\"click\":function($event){return _vm.removeLinkUrl()}}},[_c('Delete'),_vm._v(\" \"),_c('span',{staticClass:\"menububble__buttontext\"},[_vm._v(\"\\n\\t\\t\\t\\t\"+_vm._s(_vm.t('text', 'Remove Link'))+\"\\n\\t\\t\\t\")])],1):_vm._e()]],2)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<!--\n - @copyright Copyright (c) 2019 Julius Härtl <jus@bitgrid.net>\n -\n - @author Julius Härtl <jus@bitgrid.net>\n -\n - @license GNU AGPL version 3 or any later version\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n -\n -->\n\n<template>\n\t<BubbleMenu :editor=\"$editor\"\n\t\t:tippy-options=\"{ onHide: hideLinkMenu, duration: 200, placement: 'bottom' }\"\n\t\tdata-text-el=\"menu-bubble\"\n\t\tclass=\"menububble\">\n\t\t<form v-if=\"linkMenuIsActive\" class=\"menububble__form\" @submit.prevent=\"setLinkUrl()\">\n\t\t\t<input ref=\"linkInput\"\n\t\t\t\tv-model=\"linkUrl\"\n\t\t\t\tclass=\"menububble__input\"\n\t\t\t\ttype=\"text\"\n\t\t\t\tplaceholder=\"https://\"\n\t\t\t\t@keydown.esc=\"hideLinkMenu\">\n\t\t\t<button class=\"menububble__button\"\n\t\t\t\tdata-text-bubble-action=\"confirm\"\n\t\t\t\ttype=\"button\"\n\t\t\t\ttabindex=\"0\"\n\t\t\t\t@click=\"setLinkUrl()\">\n\t\t\t\t<Check />\n\t\t\t</button>\n\t\t</form>\n\n\t\t<template v-else>\n\t\t\t<button class=\"menububble__button\"\n\t\t\t\tdata-text-bubble-action=\"add-link\"\n\t\t\t\t:class=\"{ 'is-active': isActive('link') }\"\n\t\t\t\t@click=\"showLinkMenu()\">\n\t\t\t\t<Link />\n\t\t\t\t<span class=\"menububble__buttontext\">\n\t\t\t\t\t{{ isActive('link') ? t('text', 'Update Link') : t('text', 'Add Link') }}\n\t\t\t\t</span>\n\t\t\t</button>\n\t\t\t<button v-if=\"!isUsingDirectEditing\"\n\t\t\t\tdata-text-bubble-action=\"add-file\"\n\t\t\t\tclass=\"menububble__button\"\n\t\t\t\t:class=\"{ 'is-active': isActive('link') }\"\n\t\t\t\t@click=\"selectFile()\">\n\t\t\t\t<Document />\n\t\t\t\t<span class=\"menububble__buttontext\">{{ t('text', 'Link file') }}</span>\n\t\t\t</button>\n\t\t\t<button v-if=\"isActive('link')\"\n\t\t\t\tclass=\"menububble__button\"\n\t\t\t\tdata-text-bubble-action=\"remove-link\"\n\t\t\t\t:class=\"{ 'is-active': isActive('link') }\"\n\t\t\t\t@click=\"removeLinkUrl()\">\n\t\t\t\t<Delete />\n\t\t\t\t<span class=\"menububble__buttontext\">\n\t\t\t\t\t{{ t('text', 'Remove Link') }}\n\t\t\t\t</span>\n\t\t\t</button>\n\t\t</template>\n\t</BubbleMenu>\n</template>\n\n<script>\nimport { BubbleMenu } from '@tiptap/vue-2'\nimport { getMarkAttributes } from '@tiptap/core'\nimport { getCurrentUser } from '@nextcloud/auth'\nimport { loadState } from '@nextcloud/initial-state'\nimport Tooltip from '@nextcloud/vue/dist/Directives/Tooltip'\nimport { optimalPath } from './../helpers/files.js'\n\nimport { useEditorMixin } from './EditorWrapper.provider.js'\n\nimport { Link, Document, Delete, Check } from '../components/icons.js'\n\nexport default {\n\tname: 'MenuBubble',\n\tcomponents: {\n\t\tBubbleMenu,\n\t\tLink,\n\t\tDocument,\n\t\tDelete,\n\t\tCheck,\n\t},\n\tdirectives: {\n\t\ttooltip: Tooltip,\n\t},\n\tmixins: [useEditorMixin],\n\tprops: {\n\t\t// used to calculate the position based on the scrollOffset\n\t\tcontentWrapper: {\n\t\t\ttype: HTMLDivElement,\n\t\t\trequired: false,\n\t\t\tdefault: null,\n\t\t},\n\t\tfilePath: {\n\t\t\ttype: String,\n\t\t\trequired: false,\n\t\t\tdefault: '',\n\t\t},\n\t},\n\tdata: () => {\n\t\treturn {\n\t\t\tlinkUrl: null,\n\t\t\tlinkMenuIsActive: false,\n\t\t\tisUsingDirectEditing: loadState('text', 'directEditingToken', null) !== null,\n\t\t}\n\t},\n\tmethods: {\n\t\tshowLinkMenu() {\n\t\t\tconst attrs = getMarkAttributes(this.$editor.state, 'link')\n\t\t\tthis.linkUrl = attrs.href\n\t\t\tthis.linkMenuIsActive = true\n\t\t\tthis.$nextTick(() => {\n\t\t\t\tthis.$refs.linkInput.focus()\n\t\t\t})\n\t\t},\n\t\thideLinkMenu() {\n\t\t\tthis.linkUrl = null\n\t\t\tthis.linkMenuIsActive = false\n\t\t},\n\t\tselectFile() {\n\t\t\tconst currentUser = getCurrentUser()\n\t\t\tif (!currentUser) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst startPath = this.filePath.split('/').slice(0, -1).join('/')\n\t\t\tOC.dialogs.filepicker(t('text', 'Select file to link to'), (file) => {\n\t\t\t\tconst client = OC.Files.getClient()\n\t\t\t\tclient.getFileInfo(file).then((_status, fileInfo) => {\n\t\t\t\t\tconst path = optimalPath(this.filePath, `${fileInfo.path}/${fileInfo.name}`)\n\t\t\t\t\tconst encodedPath = path.split('/').map(encodeURIComponent).join('/')\n\t\t\t\t\tconst href = `${encodedPath}?fileId=${fileInfo.id}`\n\t\t\t\t\tthis.$editor.chain().setLink({ href }).focus().run()\n\t\t\t\t\tthis.hideLinkMenu()\n\t\t\t\t})\n\t\t\t}, false, [], true, undefined, startPath)\n\t\t},\n\t\tsetLinkUrl() {\n\t\t\tlet url = this.linkUrl\n\t\t\t// Heuristics for determining if we need a https:// prefix.\n\t\t\tconst noPrefixes = [\n\t\t\t\t/^[a-zA-Z]+:/, // url with protocol (\"mailTo:email@domain.tld\")\n\t\t\t\t/^\\//, // absolute path\n\t\t\t\t/\\?fileId=/, // relative link with fileId\n\t\t\t\t/^\\.\\.?\\//, // relative link starting with ./ or ../\n\t\t\t\t/^[^.]*[/$]/, // no dots before first '/' - not a domain name\n\t\t\t\t/^#/, // url fragment\n\t\t\t]\n\t\t\tif (url && !noPrefixes.find(regex => url.match(regex))) {\n\t\t\t\turl = 'https://' + url\n\t\t\t}\n\n\t\t\t// Avoid issues when parsing urls later on in markdown that might be entered in an invalid format (e.g. \"mailto: example@example.com\")\n\t\t\tconst href = url.replaceAll(' ', '%20')\n\t\t\tthis.$editor.chain().setLink({ href }).focus().run()\n\t\t\tthis.hideLinkMenu()\n\t\t},\n\t\tremoveLinkUrl() {\n\t\t\tthis.$editor.chain().unsetLink().focus().run()\n\t\t},\n\t\tisActive(selector, args = {}) {\n\t\t\treturn this.$editor.isActive(selector, args)\n\t\t},\n\t},\n}\n</script>\n\n<style scoped lang=\"scss\">\n\t.menububble {\n\t\tdisplay: flex;\n\t\tz-index: 10020;\n\t\tbackground: var(--color-main-background-translucent);\n\t\tbox-shadow: 0 1px 5px var(--color-box-shadow);\n\t\tborder-radius: var(--border-radius-large);\n\t\toverflow: hidden;\n\t\tpadding: 0;\n\t\tmargin-left: 10px;\n\t\theight: 44px;\n\n\t\t&__button {\n\t\t\tflex-grow: 1;\n\t\t\tborder: 0;\n\t\t\tpadding: 0.9rem 0.7rem;\n\t\t\tmargin: 0;\n\t\t\tborder-radius: 0;\n\t\t\tcursor: pointer;\n\t\t\tbackground-color: var(--color-main-background);\n\t\t\tborder-right: 1px solid var(--color-border);\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\n\t\t\t&:focus,\n\t\t\t&:hover {\n\t\t\t\tbackground-color: var(--color-background-hover);\n\t\t\t\tborder: 0;\n\t\t\t\tborder-right: 1px solid var(--color-border) !important;\n\t\t\t}\n\n\t\t\t&:last-child {\n\t\t\t\tborder: 0 !important;\n\t\t\t}\n\t\t}\n\n\t\t&__buttontext {\n\t\t\tpadding: 0.4rem;\n\t\t\tpadding-right: 0;\n\t\t}\n\n\t\t&__form {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t}\n\n\t\t&__input {\n\t\t\tfont: inherit;\n\t\t\tborder: none;\n\t\t\tbackground: transparent;\n\t\t\tmin-width: 250px;\n\t\t\tmargin: 0 0.5em 0 1em;\n\t\t}\n\t}\n</style>\n","import mod from \"-!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MenuBubble.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MenuBubble.vue?vue&type=script&lang=js&\"","\n import API from \"!../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../node_modules/css-loader/dist/cjs.js!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/sass-loader/dist/cjs.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MenuBubble.vue?vue&type=style&index=0&id=2716a5d6&scoped=true&lang=scss&\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../node_modules/css-loader/dist/cjs.js!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/sass-loader/dist/cjs.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MenuBubble.vue?vue&type=style&index=0&id=2716a5d6&scoped=true&lang=scss&\";\n export default content && content.locals ? content.locals : undefined;\n","import { render, staticRenderFns } from \"./MenuBubble.vue?vue&type=template&id=2716a5d6&scoped=true&\"\nimport script from \"./MenuBubble.vue?vue&type=script&lang=js&\"\nexport * from \"./MenuBubble.vue?vue&type=script&lang=js&\"\nimport style0 from \"./MenuBubble.vue?vue&type=style&index=0&id=2716a5d6&scoped=true&lang=scss&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"2716a5d6\",\n null\n \n)\n\nexport default component.exports"],"names":["name","components","EditorWrapper","props","file","type","default","folder","data","focus","loaded","ready","autofocus","darkTheme","enabled","computed","shareToken","canCreate","showEmptyWorkspace","filepath","watch","newValue","document","mounted","subscribe","methods","unfocus","reset","createNew","window","scrollTo","animate","options","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","_vm","this","_h","$createElement","_c","_self","class","attrs","staticClass","on","_v","_s","t","_e","directives","rawName","value","expression","key","path","id","mimetype","$event","FILE_ACTION_IDENTIFIER","optimalPath","from","to","current","split","target","pop","shift","relativePath","fill","concat","absolutePath","length","join","registerFileCreate","newFileMenuPlugin","attach","menu","fileList","addMenuEntry","displayName","templateName","iconClass","fileType","actionHandler","createFile","then","status","fileInfoModel","OCA","Files","FileInfoModel","Viewer","fileActions","triggerAction","OC","Plugins","register","registerFileActionFallback","sharingToken","getElementById","dir","ViewerRoot","createElement","body","appendChild","registerAction","mime","PERMISSION_UPDATE","PERMISSION_READ","imagePath","filename","FileList","findFile","Promise","all","imports","getCurrentDirectory","Vue","prototype","n","Editor","render","h","self","fileId","active","mimeType","close","$destroy","$mount","i","openMimetypes","setDefault","FilesWorkspacePlugin","el","vm","registerHeader","bind","priority","PROPERTY_WORKSPACE_FILE","Client","NS_NEXTCLOUD","oldGetWebdavProperties","_getWebdavProperties","apply","arguments","readmeId","filesClient","addFileInfoParser","response","propStat","properties","endsWith","permissions","console","warn","open","module","View","extend","RichWorkspace","propsData","store","$el","previous","parseInt","___CSS_LOADER_EXPORT___","push","BubbleMenu","Link","Document","Delete","Check","tooltip","mixins","contentWrapper","required","filePath","linkUrl","linkMenuIsActive","isUsingDirectEditing","showLinkMenu","hideLinkMenu","selectFile","client","href","undefined","startPath","setLinkUrl","url","removeLinkUrl","isActive","selector","$editor","onHide","duration","placement","preventDefault","ref","domProps","indexOf","_k","keyCode","composing"],"sourceRoot":""} \ No newline at end of file
+{"version":3,"file":"editor-rich.js?v=d19d51b2e3690ea247d1","mappings":";u0NAmDA,MCnD8K,EDmD9K,CACAA,KAAAA,gBACAC,WAAAA,CACAC,cAAAA,WAAA,2EAEAC,MAAAA,CACAC,KAAAA,CACAC,KAAAA,OACAC,QAAAA,MAEAC,OAAAA,CACAF,KAAAA,OACAC,QAAAA,OAGAE,KAfA,WAgBA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EAAI4J,SAAS,SAAUrJ,MAAM,CAAC,0BAA0B,YAAYE,GAAG,CAAC,MAAQ,SAASa,GAAQ,OAAOtB,EAAIkJ,kBAAkB,CAAC9I,EAAG,QAAQJ,EAAIU,GAAG,KAAKN,EAAG,OAAO,CAACI,YAAY,0BAA0B,CAACR,EAAIU,GAAG,aAAaV,EAAIW,GAAGX,EAAI4J,SAAS,QAAU5J,EAAIY,EAAE,OAAQ,eAAiBZ,EAAIY,EAAE,OAAQ,aAAa,eAAe,GAAGZ,EAAIU,GAAG,KAAOV,EAAIiJ,qBAAoVjJ,EAAIa,KAAlUT,EAAG,SAAS,CAACI,YAAY,qBAAqBF,MAAM,CAAE,YAAaN,EAAI4J,SAAS,SAAUrJ,MAAM,CAAC,0BAA0B,YAAYE,GAAG,CAAC,MAAQ,SAASa,GAAQ,OAAOtB,EAAIoJ,gBAAgB,CAAChJ,EAAG,YAAYJ,EAAIU,GAAG,KAAKN,EAAG,OAAO,CAACI,YAAY,0BAA0B,CAACR,EAAIU,GAAGV,EAAIW,GAAGX,EAAIY,EAAE,OAAQ,kBAAkB,GAAYZ,EAAIU,GAAG,KAAMV,EAAI4J,SAAS,QAASxJ,EAAG,SAAS,CAACI,YAAY,qBAAqBF,MAAM,CAAE,YAAaN,EAAI4J,SAAS,SAAUrJ,MAAM,CAAC,0BAA0B,eAAeE,GAAG,CAAC,MAAQ,SAASa,GAAQ,OAAOtB,EAAI2J,mBAAmB,CAACvJ,EAAG,UAAUJ,EAAIU,GAAG,KAAKN,EAAG,OAAO,CAACI,YAAY,0BAA0B,CAACR,EAAIU,GAAG,aAAaV,EAAIW,GAAGX,EAAIY,EAAE,OAAQ,gBAAgB,eAAe,GAAGZ,EAAIa,OAAO,KACxuE,IIWpB,EACA,KACA,WACA,MAI8B","sources":["webpack:///text/src/views/RichWorkspace.vue","webpack:///text/src/views/RichWorkspace.vue?vue&type=script&lang=js&","webpack://text/./src/views/RichWorkspace.vue?5a30","webpack://text/./src/views/RichWorkspace.vue?c027","webpack:///text/src/views/RichWorkspace.vue?vue&type=template&id=79a62630&scoped=true&","webpack:///text/src/helpers/files.js","webpack:///text/src/components/MenuBubble.vue?vue&type=style&index=0&id=2716a5d6&scoped=true&lang=scss&","webpack:///text/src/views/RichWorkspace.vue?vue&type=style&index=0&id=79a62630&lang=scss&scoped=true&","webpack:///text/src/components/MenuBubble.vue?vue&type=template&id=2716a5d6&scoped=true&","webpack:///text/src/components/MenuBubble.vue","webpack:///text/src/components/MenuBubble.vue?vue&type=script&lang=js&","webpack://text/./src/components/MenuBubble.vue?fa65","webpack://text/./src/components/MenuBubble.vue?8445"],"sourcesContent":["<!--\n - @copyright Copyright (c) 2019 Julius Härtl <jus@bitgrid.net>\n -\n - @author Julius Härtl <jus@bitgrid.net>\n -\n - @license GNU AGPL version 3 or any later version\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n -\n -->\n\n<template>\n\t<div v-if=\"enabled\" id=\"rich-workspace\" :class=\"{'icon-loading': !loaded || !ready, 'focus': focus, 'dark': darkTheme, 'creatable': canCreate}\">\n\t\t<div v-if=\"showEmptyWorkspace\" class=\"empty-workspace\" @click=\"createNew\">\n\t\t\t<p class=\"placeholder\">\n\t\t\t\t{{ t('text', 'Add notes, lists or links …') }}\n\t\t\t</p>\n\t\t</div>\n\n\t\t<EditorWrapper v-if=\"file\"\n\t\t\tv-show=\"ready\"\n\t\t\t:key=\"file.path\"\n\t\t\t:file-id=\"file.id\"\n\t\t\t:relative-path=\"filepath\"\n\t\t\t:share-token=\"shareToken\"\n\t\t\t:mime=\"file.mimetype\"\n\t\t\t:autofocus=\"autofocus\"\n\t\t\tactive\n\t\t\tautohide\n\t\t\trich-workspace\n\t\t\t@ready=\"ready=true; loaded=true\"\n\t\t\t@focus=\"focus=true\"\n\t\t\t@blur=\"unfocus\"\n\t\t\t@error=\"reset\" />\n\t</div>\n</template>\n\n<script>\nimport { subscribe } from '@nextcloud/event-bus'\n\nexport default {\n\tname: 'RichWorkspace',\n\tcomponents: {\n\t\tEditorWrapper: () => import(/* webpackChunkName: \"editor\" */'./../components/EditorWrapper.vue'),\n\t},\n\tprops: {\n\t\tfile: {\n\t\t\ttype: Object,\n\t\t\tdefault: null,\n\t\t},\n\t\tfolder: {\n\t\t\ttype: Object,\n\t\t\tdefault: null,\n\t\t},\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tfocus: false,\n\t\t\tloaded: false,\n\t\t\tready: false,\n\t\t\tautofocus: false,\n\t\t\tdarkTheme: OCA.Accessibility && OCA.Accessibility.theme === 'dark',\n\t\t\tenabled: OCA.Text.RichWorkspaceEnabled,\n\t\t}\n\t},\n\tcomputed: {\n\t\tshareToken() {\n\t\t\treturn document.getElementById('sharingToken')?.value\n\t\t},\n\t\tcanCreate() {\n\t\t\treturn !!(this.folder && (this.folder.permissions & OC.PERMISSION_CREATE))\n\t\t},\n\t\tshowEmptyWorkspace() {\n\t\t\treturn (!this.file || (this.autofocus && !this.ready)) && this.canCreate\n\t\t},\n\t\tfilepath() {\n\t\t\tconst { path, name } = this.file || {}\n\t\t\tif (!path) {\n\t\t\t\treturn undefined\n\t\t\t}\n\n\t\t\treturn path + (path.endsWith('/') ? '' : '/') + name\n\t\t},\n\t},\n\twatch: {\n\t\tfocus(newValue) {\n\t\t\tif (!newValue) {\n\t\t\t\t// TODO: change\n\t\t\t\tdocument.querySelector('#editor').scrollTo(0, 0)\n\t\t\t}\n\t\t},\n\t},\n\tasync mounted() {\n\t\tsubscribe('Text::showRichWorkspace', () => {\n\t\t\tthis.enabled = true\n\t\t})\n\t\tsubscribe('Text::hideRichWorkspace', () => {\n\t\t\tthis.enabled = false\n\t\t})\n\t},\n\tmethods: {\n\t\tunfocus() {\n\t\t\t// setTimeout(() => this.focus = false, 2000)\n\t\t},\n\t\treset() {\n\t\t\tthis.focus = false\n\t\t\tthis.$nextTick(() => {\n\t\t\t\tthis.creating = false\n\t\t\t})\n\t\t},\n\t\tcreateNew() {\n\t\t\tif (this.creating) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis.creating = true\n\t\t\tthis.autofocus = true\n\t\t\tif (!this.file) {\n\t\t\t\twindow.FileList.createFile('Readme.md', { scrollTo: false, animate: false })\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n\t#rich-workspace {\n\t\tpadding: 0 50px;\n\t\t/* Slightly reduce vertical space */\n\t\tmargin-bottom: -24px;\n\t\ttext-align: left;\n\t\tmax-height: 0;\n\t\ttransition: max-height 0.5s cubic-bezier(0, 1, 0, 1);\n\t\tz-index: 61;\n\t\tposition: relative;\n\t\t&.creatable {\n\t\t\tmin-height: 90px;\n\t\t}\n\t}\n\n\t/* For subfolders, where there are no Recommendations */\n\t#rich-workspace:only-child {\n\t\tmargin-bottom: 0;\n\t}\n\n\t.empty-workspace {\n\t\tpadding-top: 43px;\n\t\tcolor: var(--color-text-maxcontrast);\n\t\theight: 0;\n\t}\n\n\t#rich-workspace::v-deep div[contenteditable=false] {\n\t\twidth: 100%;\n\t\tpadding: 0px;\n\t\tbackground-color: var(--color-main-background);\n\t\topacity: 1;\n\t\tborder: none;\n\t}\n\n\t#rich-workspace::v-deep .text-editor {\n\t\theight: 100%;\n\t\tposition: unset !important;\n\t\ttop: auto !important;\n\t}\n\n\t#rich-workspace::v-deep .text-editor__wrapper {\n\t\tposition: unset !important;\n\t\toverflow: visible;\n\t}\n\n\t#rich-workspace::v-deep .text-editor__main {\n\t\toverflow: visible !important;\n\t}\n\n\t#rich-workspace::v-deep .content-wrapper {\n\t\toverflow: scroll !important;\n\t\tmax-height: calc(40vh - 50px);\n\t\tpadding-left: 10px;\n\t\tpadding-bottom: 60px; /* ensure menububble fits below */\n\t}\n\n\t#rich-workspace::v-deep .text-editor__wrapper .ProseMirror {\n\t\tpadding: 0px;\n\t\tmargin: 0;\n\t}\n\n\t#rich-workspace::v-deep .editor__content {\n\t\tmargin: 0;\n\t}\n\n\t#rich-workspace.focus {\n\t\tmax-height: 50vh;\n\t}\n\n\t#rich-workspace:not(.focus) {\n\t\tmax-height: 30vh;\n\t\tposition: relative;\n\t\toverflow: hidden;\n\t}\n\n\t#rich-workspace:not(.focus):not(.icon-loading):after {\n\t\tcontent: '';\n\t\tposition: absolute;\n\t\tz-index: 1;\n\t\tbottom: 0;\n\t\tleft: 0;\n\t\tpointer-events: none;\n\t\tbackground-image: linear-gradient(to bottom, rgba(255, 255, 255, 0), var(--color-main-background));\n\t\twidth: 100%;\n\t\theight: 4em;\n\t}\n\n\t#rich-workspace.dark:not(.focus):not(.icon-loading):after {\n\t\tbackground-image: linear-gradient(to bottom, rgba(0, 0, 0, 0), var(--color-main-background));\n\t}\n\n\t@media only screen and (max-width: 1024px) {\n\t\t#rich-workspace:not(.focus) {\n\t\t\tmax-height: 30vh;\n\t\t}\n\t}\n\n\thtml.ie {\n\t\t#rich-workspace::v-deep {\n\t\t\t.text-editor {\n\t\t\t\tposition: initial;\n\t\t\t}\n\n\t\t\t.text-editor__wrapper {\n\t\t\t\tposition: relative !important;\n\t\t\t\ttop: auto !important;\n\t\t\t}\n\n\t\t\t.text-editor__main {\n\t\t\t\tdisplay: flex;\n\t\t\t\tflex-direction: column;\n\t\t\t\toverflow: hidden !important;\n\t\t\t}\n\n\t\t\t.menubar {\n\t\t\t\tposition: relative;\n\t\t\t\toverflow: hidden;\n\t\t\t\tflex-shrink: 0;\n\t\t\t\theight: 44px;\n\t\t\t\ttop: auto;\n\t\t\t}\n\n\t\t\t.text-editor__main > div:nth-child(2) {\n\t\t\t\tmin-height: 44px;\n\t\t\t\toverflow-x: hidden;\n\t\t\t\toverflow-y: auto;\n\t\t\t\tflex-shrink: 1;\n\t\t\t}\n\t\t}\n\t}\n\n</style>\n","import mod from \"-!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./RichWorkspace.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./RichWorkspace.vue?vue&type=script&lang=js&\"","\n import API from \"!../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../node_modules/css-loader/dist/cjs.js!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/sass-loader/dist/cjs.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./RichWorkspace.vue?vue&type=style&index=0&id=79a62630&lang=scss&scoped=true&\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../node_modules/css-loader/dist/cjs.js!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/sass-loader/dist/cjs.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./RichWorkspace.vue?vue&type=style&index=0&id=79a62630&lang=scss&scoped=true&\";\n export default content && content.locals ? content.locals : undefined;\n","import { render, staticRenderFns } from \"./RichWorkspace.vue?vue&type=template&id=79a62630&scoped=true&\"\nimport script from \"./RichWorkspace.vue?vue&type=script&lang=js&\"\nexport * from \"./RichWorkspace.vue?vue&type=script&lang=js&\"\nimport style0 from \"./RichWorkspace.vue?vue&type=style&index=0&id=79a62630&lang=scss&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"79a62630\",\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.enabled)?_c('div',{class:{'icon-loading': !_vm.loaded || !_vm.ready, 'focus': _vm.focus, 'dark': _vm.darkTheme, 'creatable': _vm.canCreate},attrs:{\"id\":\"rich-workspace\"}},[(_vm.showEmptyWorkspace)?_c('div',{staticClass:\"empty-workspace\",on:{\"click\":_vm.createNew}},[_c('p',{staticClass:\"placeholder\"},[_vm._v(\"\\n\\t\\t\\t\"+_vm._s(_vm.t('text', 'Add notes, lists or links …'))+\"\\n\\t\\t\")])]):_vm._e(),_vm._v(\" \"),(_vm.file)?_c('EditorWrapper',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.ready),expression:\"ready\"}],key:_vm.file.path,attrs:{\"file-id\":_vm.file.id,\"relative-path\":_vm.filepath,\"share-token\":_vm.shareToken,\"mime\":_vm.file.mimetype,\"autofocus\":_vm.autofocus,\"active\":\"\",\"autohide\":\"\",\"rich-workspace\":\"\"},on:{\"ready\":function($event){_vm.ready=true; _vm.loaded=true},\"focus\":function($event){_vm.focus=true},\"blur\":_vm.unfocus,\"error\":_vm.reset}}):_vm._e()],1):_vm._e()}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","/*\n * @copyright Copyright (c) 2019 Julius Härtl <jus@bitgrid.net>\n *\n * @author Julius Härtl <jus@bitgrid.net>\n *\n * @license GNU AGPL version 3 or any later version\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\nimport { openMimetypes } from './mime.js'\nimport RichWorkspace from '../views/RichWorkspace.vue'\nimport { imagePath } from '@nextcloud/router'\nimport store from '../store.js'\n\nconst FILE_ACTION_IDENTIFIER = 'Edit with text app'\n\nconst optimalPath = function(from, to) {\n\tconst current = from.split('/')\n\tconst target = to.split('/')\n\tcurrent.pop() // ignore filename\n\twhile (current[0] === target[0]) {\n\t\tcurrent.shift()\n\t\ttarget.shift()\n\t}\n\tconst relativePath = current.fill('..').concat(target)\n\tconst absolutePath = to.split('/')\n\treturn relativePath.length < absolutePath.length\n\t\t? relativePath.join('/')\n\t\t: to\n}\n\nconst registerFileCreate = () => {\n\tconst newFileMenuPlugin = {\n\t\tattach(menu) {\n\t\t\tconst fileList = menu.fileList\n\n\t\t\t// only attach to main file list, public view is not supported yet\n\t\t\tif (fileList.id !== 'files' && fileList.id !== 'files.public') {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\t// register the new menu entry\n\t\t\tmenu.addMenuEntry({\n\t\t\t\tid: 'file',\n\t\t\t\tdisplayName: t('text', 'New text file'),\n\t\t\t\ttemplateName: t('text', 'New text file') + '.md',\n\t\t\t\ticonClass: 'icon-filetype-text',\n\t\t\t\tfileType: 'file',\n\t\t\t\tactionHandler(name) {\n\t\t\t\t\tfileList.createFile(name).then(function(status, data) {\n\t\t\t\t\t\tconst fileInfoModel = new OCA.Files.FileInfoModel(data)\n\t\t\t\t\t\tif (typeof OCA.Viewer !== 'undefined') {\n\t\t\t\t\t\t\tOCA.Files.fileActions.triggerAction('view', fileInfoModel, fileList)\n\t\t\t\t\t\t} else if (typeof OCA.Viewer === 'undefined') {\n\t\t\t\t\t\t\tOCA.Files.fileActions.triggerAction(FILE_ACTION_IDENTIFIER, fileInfoModel, fileList)\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t},\n\t\t\t})\n\t\t},\n\t}\n\tOC.Plugins.register('OCA.Files.NewFileMenu', newFileMenuPlugin)\n}\n\nconst registerFileActionFallback = () => {\n\tconst sharingToken = document.getElementById('sharingToken') ? document.getElementById('sharingToken').value : null\n\tconst dir = document.getElementById('dir').value\n\n\tif (!sharingToken || dir !== '') {\n\t\tconst ViewerRoot = document.createElement('div')\n\t\tViewerRoot.id = 'text-viewer-fallback'\n\t\tdocument.body.appendChild(ViewerRoot)\n\t\tconst registerAction = (mime) => OCA.Files.fileActions.register(\n\t\t\tmime,\n\t\t\tFILE_ACTION_IDENTIFIER,\n\t\t\tOC.PERMISSION_UPDATE | OC.PERMISSION_READ,\n\t\t\timagePath('core', 'actions/rename'),\n\t\t\t(filename) => {\n\t\t\t\tconst file = window.FileList.findFile(filename)\n\t\t\t\tPromise.all([\n\t\t\t\t\timport('vue'),\n\t\t\t\t\timport(/* webpackChunkName: \"files-modal\" */'./../components/PublicFilesEditor.vue'),\n\t\t\t\t]).then((imports) => {\n\t\t\t\t\tconst path = window.FileList.getCurrentDirectory() + '/' + filename\n\t\t\t\t\tconst Vue = imports[0].default\n\t\t\t\t\tVue.prototype.t = window.t\n\t\t\t\t\tVue.prototype.n = window.n\n\t\t\t\t\tVue.prototype.OCA = window.OCA\n\t\t\t\t\tconst Editor = imports[1].default\n\t\t\t\t\tconst vm = new Vue({\n\t\t\t\t\t\trender: function(h) { // eslint-disable-line\n\t\t\t\t\t\t\tconst self = this\n\t\t\t\t\t\t\treturn h(Editor, {\n\t\t\t\t\t\t\t\tprops: {\n\t\t\t\t\t\t\t\t\tfileId: file ? file.id : null,\n\t\t\t\t\t\t\t\t\tactive: true,\n\t\t\t\t\t\t\t\t\tshareToken: sharingToken,\n\t\t\t\t\t\t\t\t\trelativePath: path,\n\t\t\t\t\t\t\t\t\tmimeType: file.mimetype,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\ton: {\n\t\t\t\t\t\t\t\t\tclose: function() { // eslint-disable-line\n\t\t\t\t\t\t\t\t\t\tself.$destroy()\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t},\n\t\t\t\t\t})\n\t\t\t\t\tvm.$mount(ViewerRoot)\n\t\t\t\t})\n\t\t\t},\n\t\t\tt('text', 'Edit')\n\t\t)\n\n\t\tfor (let i = 0; i < openMimetypes.length; i++) {\n\t\t\tregisterAction(openMimetypes[i])\n\t\t\tOCA.Files.fileActions.setDefault(openMimetypes[i], FILE_ACTION_IDENTIFIER)\n\t\t}\n\t}\n\n}\n\nconst FilesWorkspacePlugin = {\n\n\tel: null,\n\tvm: null,\n\n\tattach(fileList) {\n\t\tif (fileList.id !== 'files' && fileList.id !== 'files.public') {\n\t\t\treturn\n\t\t}\n\n\t\tthis.el = document.createElement('div')\n\t\tfileList.registerHeader({\n\t\t\tid: 'workspace',\n\t\t\tel: this.el,\n\t\t\trender: this.render.bind(this),\n\t\t\tpriority: 10,\n\t\t})\n\n\t\tconst PROPERTY_WORKSPACE_FILE = `{${OC.Files.Client.NS_NEXTCLOUD}}rich-workspace-file`\n\n\t\tconst oldGetWebdavProperties = fileList._getWebdavProperties\n\t\tfileList._getWebdavProperties = function() {\n\t\t\treturn [\n\t\t\t\t...oldGetWebdavProperties.apply(this, arguments),\n\t\t\t\tPROPERTY_WORKSPACE_FILE,\n\t\t\t]\n\t\t}\n\n\t\tlet readmeId = null\n\n\t\tfileList.filesClient.addFileInfoParser((response, data) => {\n\t\t\tif (data.mimetype === 'httpd/unix-directory') {\n\t\t\t\tconst props = response.propStat[0].properties\n\t\t\t\tconst dir = data.path + (data.path.endsWith('/') ? '' : '/') + data.name\n\t\t\t\tif (dir === fileList.getCurrentDirectory()) {\n\t\t\t\t\treadmeId = props[PROPERTY_WORKSPACE_FILE]\n\t\t\t\t\tthis.vm.folder = {\n\t\t\t\t\t\tpermissions: data.permissions,\n\t\t\t\t\t}\n\t\t\t\t\tthis.vm.loaded = true\n\t\t\t\t\t// in case no file is found we are done\n\t\t\t\t\tthis.vm.ready = true\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (readmeId && data.id === readmeId) {\n\t\t\t\tif (data.mimetype !== 'text/markdown') {\n\t\t\t\t\tconsole.warn('Expected workspace file to be markdown:', data)\n\t\t\t\t}\n\t\t\t\tthis.open(data)\n\t\t\t\treturn\n\t\t\t}\n\t\t\t/*\n\t\t\t * Handle the creation of 'Readme.md'.\n\t\t\t * The PROPFIND after the creation does not include the parent dir.\n\t\t\t */\n\t\t\tif (data.name === 'Readme.md'\n\t\t\t\t&& data.mimetype === 'text/markdown'\n\t\t\t\t&& data.path === fileList.getCurrentDirectory()) {\n\t\t\t\tthis.open(data)\n\t\t\t}\n\t\t})\n\n\t},\n\n\trender(fileList) {\n\t\tif (fileList.id !== 'files' && fileList.id !== 'files.public') {\n\t\t\treturn\n\t\t}\n\n\t\timport('vue').then((module) => {\n\t\t\tconst Vue = module.default\n\t\t\tthis.el.id = 'files-workspace-wrapper'\n\t\t\tVue.prototype.t = window.t\n\t\t\tVue.prototype.n = window.n\n\t\t\tVue.prototype.OCA = window.OCA\n\t\t\tconst View = Vue.extend(RichWorkspace)\n\t\t\tthis.vm = new View({\n\t\t\t\tpropsData: {\n\t\t\t\t\tfile: null,\n\t\t\t\t\tfolder: null,\n\t\t\t\t},\n\t\t\t\tstore,\n\t\t\t}).$mount(this.el)\n\n\t\t\tfileList.$el.on('urlChanged', data => {\n\t\t\t\tthis.vm.file = null\n\t\t\t\tthis.vm.folder = null\n\t\t\t})\n\t\t\tfileList.$el.on('changeDirectory', data => {\n\t\t\t\tthis.vm.file = null\n\t\t\t\tthis.vm.folder = null\n\t\t\t})\n\t\t})\n\t},\n\n\topen(data) {\n\t\tconst previous = this.vm.file\n\t\tconst id = parseInt(data.id)\n\t\tthis.vm.file = {\n\t\t\t...data,\n\t\t\tid,\n\t\t}\n\t\tif (previous?.id !== id) {\n\t\t\t// Editor loads new file. Wait for it to be ready.\n\t\t\tthis.vm.ready = false\n\t\t}\n\t},\n}\n\nexport {\n\toptimalPath,\n\tregisterFileActionFallback,\n\tregisterFileCreate,\n\tFilesWorkspacePlugin,\n\tFILE_ACTION_IDENTIFIER,\n}\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".menububble[data-v-2716a5d6]{display:flex;z-index:10020;background:var(--color-main-background-translucent);box-shadow:0 1px 5px var(--color-box-shadow);border-radius:var(--border-radius-large);overflow:hidden;padding:0;margin-left:10px;height:44px}.menububble__button[data-v-2716a5d6]{flex-grow:1;border:0;padding:.9rem .7rem;margin:0;border-radius:0;cursor:pointer;background-color:var(--color-main-background);border-right:1px solid var(--color-border);display:flex;align-items:center}.menububble__button[data-v-2716a5d6]:focus,.menububble__button[data-v-2716a5d6]:hover{background-color:var(--color-background-hover);border:0;border-right:1px solid var(--color-border) !important}.menububble__button[data-v-2716a5d6]:last-child{border:0 !important}.menububble__buttontext[data-v-2716a5d6]{padding:.4rem;padding-right:0}.menububble__form[data-v-2716a5d6]{display:flex;align-items:center}.menububble__input[data-v-2716a5d6]{font:inherit;border:none;background:rgba(0,0,0,0);min-width:250px;margin:0 .5em 0 1em}\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/components/MenuBubble.vue\"],\"names\":[],\"mappings\":\"AAqLA,6BACC,YAAA,CACA,aAAA,CACA,mDAAA,CACA,4CAAA,CACA,wCAAA,CACA,eAAA,CACA,SAAA,CACA,gBAAA,CACA,WAAA,CAEA,qCACC,WAAA,CACA,QAAA,CACA,mBAAA,CACA,QAAA,CACA,eAAA,CACA,cAAA,CACA,6CAAA,CACA,0CAAA,CACA,YAAA,CACA,kBAAA,CAEA,sFAEC,8CAAA,CACA,QAAA,CACA,qDAAA,CAGD,gDACC,mBAAA,CAIF,yCACC,aAAA,CACA,eAAA,CAGD,mCACC,YAAA,CACA,kBAAA,CAGD,oCACC,YAAA,CACA,WAAA,CACA,wBAAA,CACA,eAAA,CACA,mBAAA\",\"sourcesContent\":[\"\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n.menububble {\\n\\tdisplay: flex;\\n\\tz-index: 10020;\\n\\tbackground: var(--color-main-background-translucent);\\n\\tbox-shadow: 0 1px 5px var(--color-box-shadow);\\n\\tborder-radius: var(--border-radius-large);\\n\\toverflow: hidden;\\n\\tpadding: 0;\\n\\tmargin-left: 10px;\\n\\theight: 44px;\\n\\n\\t&__button {\\n\\t\\tflex-grow: 1;\\n\\t\\tborder: 0;\\n\\t\\tpadding: 0.9rem 0.7rem;\\n\\t\\tmargin: 0;\\n\\t\\tborder-radius: 0;\\n\\t\\tcursor: pointer;\\n\\t\\tbackground-color: var(--color-main-background);\\n\\t\\tborder-right: 1px solid var(--color-border);\\n\\t\\tdisplay: flex;\\n\\t\\talign-items: center;\\n\\n\\t\\t&:focus,\\n\\t\\t&:hover {\\n\\t\\t\\tbackground-color: var(--color-background-hover);\\n\\t\\t\\tborder: 0;\\n\\t\\t\\tborder-right: 1px solid var(--color-border) !important;\\n\\t\\t}\\n\\n\\t\\t&:last-child {\\n\\t\\t\\tborder: 0 !important;\\n\\t\\t}\\n\\t}\\n\\n\\t&__buttontext {\\n\\t\\tpadding: 0.4rem;\\n\\t\\tpadding-right: 0;\\n\\t}\\n\\n\\t&__form {\\n\\t\\tdisplay: flex;\\n\\t\\talign-items: center;\\n\\t}\\n\\n\\t&__input {\\n\\t\\tfont: inherit;\\n\\t\\tborder: none;\\n\\t\\tbackground: transparent;\\n\\t\\tmin-width: 250px;\\n\\t\\tmargin: 0 0.5em 0 1em;\\n\\t}\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"#rich-workspace[data-v-79a62630]{padding:0 50px;margin-bottom:-24px;text-align:left;max-height:0;transition:max-height .5s cubic-bezier(0, 1, 0, 1);z-index:61;position:relative}#rich-workspace.creatable[data-v-79a62630]{min-height:90px}#rich-workspace[data-v-79a62630]:only-child{margin-bottom:0}.empty-workspace[data-v-79a62630]{padding-top:43px;color:var(--color-text-maxcontrast);height:0}#rich-workspace[data-v-79a62630] div[contenteditable=false]{width:100%;padding:0px;background-color:var(--color-main-background);opacity:1;border:none}#rich-workspace[data-v-79a62630] .text-editor{height:100%;position:unset !important;top:auto !important}#rich-workspace[data-v-79a62630] .text-editor__wrapper{position:unset !important;overflow:visible}#rich-workspace[data-v-79a62630] .text-editor__main{overflow:visible !important}#rich-workspace[data-v-79a62630] .content-wrapper{overflow:scroll !important;max-height:calc(40vh - 50px);padding-left:10px;padding-bottom:60px}#rich-workspace[data-v-79a62630] .text-editor__wrapper .ProseMirror{padding:0px;margin:0}#rich-workspace[data-v-79a62630] .editor__content{margin:0}#rich-workspace.focus[data-v-79a62630]{max-height:50vh}#rich-workspace[data-v-79a62630]:not(.focus){max-height:30vh;position:relative;overflow:hidden}#rich-workspace[data-v-79a62630]:not(.focus):not(.icon-loading):after{content:\\\"\\\";position:absolute;z-index:1;bottom:0;left:0;pointer-events:none;background-image:linear-gradient(to bottom, rgba(255, 255, 255, 0), var(--color-main-background));width:100%;height:4em}#rich-workspace.dark[data-v-79a62630]:not(.focus):not(.icon-loading):after{background-image:linear-gradient(to bottom, rgba(0, 0, 0, 0), var(--color-main-background))}@media only screen and (max-width: 1024px){#rich-workspace[data-v-79a62630]:not(.focus){max-height:30vh}}html.ie #rich-workspace[data-v-79a62630] .text-editor{position:initial}html.ie #rich-workspace[data-v-79a62630] .text-editor__wrapper{position:relative !important;top:auto !important}html.ie #rich-workspace[data-v-79a62630] .text-editor__main{display:flex;flex-direction:column;overflow:hidden !important}html.ie #rich-workspace[data-v-79a62630] .menubar{position:relative;overflow:hidden;flex-shrink:0;height:44px;top:auto}html.ie #rich-workspace[data-v-79a62630] .text-editor__main>div:nth-child(2){min-height:44px;overflow-x:hidden;overflow-y:auto;flex-shrink:1}\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/views/RichWorkspace.vue\"],\"names\":[],\"mappings\":\"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\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n#rich-workspace {\\n\\tpadding: 0 50px;\\n\\t/* Slightly reduce vertical space */\\n\\tmargin-bottom: -24px;\\n\\ttext-align: left;\\n\\tmax-height: 0;\\n\\ttransition: max-height 0.5s cubic-bezier(0, 1, 0, 1);\\n\\tz-index: 61;\\n\\tposition: relative;\\n\\t&.creatable {\\n\\t\\tmin-height: 90px;\\n\\t}\\n}\\n\\n/* For subfolders, where there are no Recommendations */\\n#rich-workspace:only-child {\\n\\tmargin-bottom: 0;\\n}\\n\\n.empty-workspace {\\n\\tpadding-top: 43px;\\n\\tcolor: var(--color-text-maxcontrast);\\n\\theight: 0;\\n}\\n\\n#rich-workspace::v-deep div[contenteditable=false] {\\n\\twidth: 100%;\\n\\tpadding: 0px;\\n\\tbackground-color: var(--color-main-background);\\n\\topacity: 1;\\n\\tborder: none;\\n}\\n\\n#rich-workspace::v-deep .text-editor {\\n\\theight: 100%;\\n\\tposition: unset !important;\\n\\ttop: auto !important;\\n}\\n\\n#rich-workspace::v-deep .text-editor__wrapper {\\n\\tposition: unset !important;\\n\\toverflow: visible;\\n}\\n\\n#rich-workspace::v-deep .text-editor__main {\\n\\toverflow: visible !important;\\n}\\n\\n#rich-workspace::v-deep .content-wrapper {\\n\\toverflow: scroll !important;\\n\\tmax-height: calc(40vh - 50px);\\n\\tpadding-left: 10px;\\n\\tpadding-bottom: 60px; /* ensure menububble fits below */\\n}\\n\\n#rich-workspace::v-deep .text-editor__wrapper .ProseMirror {\\n\\tpadding: 0px;\\n\\tmargin: 0;\\n}\\n\\n#rich-workspace::v-deep .editor__content {\\n\\tmargin: 0;\\n}\\n\\n#rich-workspace.focus {\\n\\tmax-height: 50vh;\\n}\\n\\n#rich-workspace:not(.focus) {\\n\\tmax-height: 30vh;\\n\\tposition: relative;\\n\\toverflow: hidden;\\n}\\n\\n#rich-workspace:not(.focus):not(.icon-loading):after {\\n\\tcontent: '';\\n\\tposition: absolute;\\n\\tz-index: 1;\\n\\tbottom: 0;\\n\\tleft: 0;\\n\\tpointer-events: none;\\n\\tbackground-image: linear-gradient(to bottom, rgba(255, 255, 255, 0), var(--color-main-background));\\n\\twidth: 100%;\\n\\theight: 4em;\\n}\\n\\n#rich-workspace.dark:not(.focus):not(.icon-loading):after {\\n\\tbackground-image: linear-gradient(to bottom, rgba(0, 0, 0, 0), var(--color-main-background));\\n}\\n\\n@media only screen and (max-width: 1024px) {\\n\\t#rich-workspace:not(.focus) {\\n\\t\\tmax-height: 30vh;\\n\\t}\\n}\\n\\nhtml.ie {\\n\\t#rich-workspace::v-deep {\\n\\t\\t.text-editor {\\n\\t\\t\\tposition: initial;\\n\\t\\t}\\n\\n\\t\\t.text-editor__wrapper {\\n\\t\\t\\tposition: relative !important;\\n\\t\\t\\ttop: auto !important;\\n\\t\\t}\\n\\n\\t\\t.text-editor__main {\\n\\t\\t\\tdisplay: flex;\\n\\t\\t\\tflex-direction: column;\\n\\t\\t\\toverflow: hidden !important;\\n\\t\\t}\\n\\n\\t\\t.menubar {\\n\\t\\t\\tposition: relative;\\n\\t\\t\\toverflow: hidden;\\n\\t\\t\\tflex-shrink: 0;\\n\\t\\t\\theight: 44px;\\n\\t\\t\\ttop: auto;\\n\\t\\t}\\n\\n\\t\\t.text-editor__main > div:nth-child(2) {\\n\\t\\t\\tmin-height: 44px;\\n\\t\\t\\toverflow-x: hidden;\\n\\t\\t\\toverflow-y: auto;\\n\\t\\t\\tflex-shrink: 1;\\n\\t\\t}\\n\\t}\\n}\\n\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('BubbleMenu',{staticClass:\"menububble\",attrs:{\"editor\":_vm.$editor,\"tippy-options\":{ onHide: _vm.hideLinkMenu, duration: 200, placement: 'bottom' },\"data-text-el\":\"menu-bubble\"}},[(_vm.linkMenuIsActive)?_c('form',{staticClass:\"menububble__form\",on:{\"submit\":function($event){$event.preventDefault();return _vm.setLinkUrl()}}},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.linkUrl),expression:\"linkUrl\"}],ref:\"linkInput\",staticClass:\"menububble__input\",attrs:{\"type\":\"text\",\"placeholder\":\"https://\"},domProps:{\"value\":(_vm.linkUrl)},on:{\"keydown\":function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,\"esc\",27,$event.key,[\"Esc\",\"Escape\"])){ return null; }return _vm.hideLinkMenu.apply(null, arguments)},\"input\":function($event){if($event.target.composing){ return; }_vm.linkUrl=$event.target.value}}}),_vm._v(\" \"),_c('button',{staticClass:\"menububble__button\",attrs:{\"data-text-bubble-action\":\"confirm\",\"type\":\"button\",\"tabindex\":\"0\"},on:{\"click\":function($event){return _vm.setLinkUrl()}}},[_c('Check')],1)]):[_c('button',{staticClass:\"menububble__button\",class:{ 'is-active': _vm.isActive('link') },attrs:{\"data-text-bubble-action\":\"add-link\"},on:{\"click\":function($event){return _vm.showLinkMenu()}}},[_c('Link'),_vm._v(\" \"),_c('span',{staticClass:\"menububble__buttontext\"},[_vm._v(\"\\n\\t\\t\\t\\t\"+_vm._s(_vm.isActive('link') ? _vm.t('text', 'Update Link') : _vm.t('text', 'Add Link'))+\"\\n\\t\\t\\t\")])],1),_vm._v(\" \"),(!_vm.isUsingDirectEditing)?_c('button',{staticClass:\"menububble__button\",class:{ 'is-active': _vm.isActive('link') },attrs:{\"data-text-bubble-action\":\"add-file\"},on:{\"click\":function($event){return _vm.selectFile()}}},[_c('Document'),_vm._v(\" \"),_c('span',{staticClass:\"menububble__buttontext\"},[_vm._v(_vm._s(_vm.t('text', 'Link file')))])],1):_vm._e(),_vm._v(\" \"),(_vm.isActive('link'))?_c('button',{staticClass:\"menububble__button\",class:{ 'is-active': _vm.isActive('link') },attrs:{\"data-text-bubble-action\":\"remove-link\"},on:{\"click\":function($event){return _vm.removeLinkUrl()}}},[_c('Delete'),_vm._v(\" \"),_c('span',{staticClass:\"menububble__buttontext\"},[_vm._v(\"\\n\\t\\t\\t\\t\"+_vm._s(_vm.t('text', 'Remove Link'))+\"\\n\\t\\t\\t\")])],1):_vm._e()]],2)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<!--\n - @copyright Copyright (c) 2019 Julius Härtl <jus@bitgrid.net>\n -\n - @author Julius Härtl <jus@bitgrid.net>\n -\n - @license GNU AGPL version 3 or any later version\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n -\n -->\n\n<template>\n\t<BubbleMenu :editor=\"$editor\"\n\t\t:tippy-options=\"{ onHide: hideLinkMenu, duration: 200, placement: 'bottom' }\"\n\t\tdata-text-el=\"menu-bubble\"\n\t\tclass=\"menububble\">\n\t\t<form v-if=\"linkMenuIsActive\" class=\"menububble__form\" @submit.prevent=\"setLinkUrl()\">\n\t\t\t<input ref=\"linkInput\"\n\t\t\t\tv-model=\"linkUrl\"\n\t\t\t\tclass=\"menububble__input\"\n\t\t\t\ttype=\"text\"\n\t\t\t\tplaceholder=\"https://\"\n\t\t\t\t@keydown.esc=\"hideLinkMenu\">\n\t\t\t<button class=\"menububble__button\"\n\t\t\t\tdata-text-bubble-action=\"confirm\"\n\t\t\t\ttype=\"button\"\n\t\t\t\ttabindex=\"0\"\n\t\t\t\t@click=\"setLinkUrl()\">\n\t\t\t\t<Check />\n\t\t\t</button>\n\t\t</form>\n\n\t\t<template v-else>\n\t\t\t<button class=\"menububble__button\"\n\t\t\t\tdata-text-bubble-action=\"add-link\"\n\t\t\t\t:class=\"{ 'is-active': isActive('link') }\"\n\t\t\t\t@click=\"showLinkMenu()\">\n\t\t\t\t<Link />\n\t\t\t\t<span class=\"menububble__buttontext\">\n\t\t\t\t\t{{ isActive('link') ? t('text', 'Update Link') : t('text', 'Add Link') }}\n\t\t\t\t</span>\n\t\t\t</button>\n\t\t\t<button v-if=\"!isUsingDirectEditing\"\n\t\t\t\tdata-text-bubble-action=\"add-file\"\n\t\t\t\tclass=\"menububble__button\"\n\t\t\t\t:class=\"{ 'is-active': isActive('link') }\"\n\t\t\t\t@click=\"selectFile()\">\n\t\t\t\t<Document />\n\t\t\t\t<span class=\"menububble__buttontext\">{{ t('text', 'Link file') }}</span>\n\t\t\t</button>\n\t\t\t<button v-if=\"isActive('link')\"\n\t\t\t\tclass=\"menububble__button\"\n\t\t\t\tdata-text-bubble-action=\"remove-link\"\n\t\t\t\t:class=\"{ 'is-active': isActive('link') }\"\n\t\t\t\t@click=\"removeLinkUrl()\">\n\t\t\t\t<Delete />\n\t\t\t\t<span class=\"menububble__buttontext\">\n\t\t\t\t\t{{ t('text', 'Remove Link') }}\n\t\t\t\t</span>\n\t\t\t</button>\n\t\t</template>\n\t</BubbleMenu>\n</template>\n\n<script>\nimport { BubbleMenu } from '@tiptap/vue-2'\nimport { getMarkAttributes } from '@tiptap/core'\nimport { getCurrentUser } from '@nextcloud/auth'\nimport { loadState } from '@nextcloud/initial-state'\nimport Tooltip from '@nextcloud/vue/dist/Directives/Tooltip'\nimport { optimalPath } from './../helpers/files.js'\n\nimport { useEditorMixin } from './EditorWrapper.provider.js'\n\nimport { Link, Document, Delete, Check } from '../components/icons.js'\n\nexport default {\n\tname: 'MenuBubble',\n\tcomponents: {\n\t\tBubbleMenu,\n\t\tLink,\n\t\tDocument,\n\t\tDelete,\n\t\tCheck,\n\t},\n\tdirectives: {\n\t\ttooltip: Tooltip,\n\t},\n\tmixins: [useEditorMixin],\n\tprops: {\n\t\t// used to calculate the position based on the scrollOffset\n\t\tcontentWrapper: {\n\t\t\ttype: HTMLDivElement,\n\t\t\trequired: false,\n\t\t\tdefault: null,\n\t\t},\n\t\tfilePath: {\n\t\t\ttype: String,\n\t\t\trequired: false,\n\t\t\tdefault: '',\n\t\t},\n\t},\n\tdata: () => {\n\t\treturn {\n\t\t\tlinkUrl: null,\n\t\t\tlinkMenuIsActive: false,\n\t\t\tisUsingDirectEditing: loadState('text', 'directEditingToken', null) !== null,\n\t\t}\n\t},\n\tmethods: {\n\t\tshowLinkMenu() {\n\t\t\tconst attrs = getMarkAttributes(this.$editor.state, 'link')\n\t\t\tthis.linkUrl = attrs.href\n\t\t\tthis.linkMenuIsActive = true\n\t\t\tthis.$nextTick(() => {\n\t\t\t\tthis.$refs.linkInput.focus()\n\t\t\t})\n\t\t},\n\t\thideLinkMenu() {\n\t\t\tthis.linkUrl = null\n\t\t\tthis.linkMenuIsActive = false\n\t\t},\n\t\tselectFile() {\n\t\t\tconst currentUser = getCurrentUser()\n\t\t\tif (!currentUser) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst startPath = this.filePath.split('/').slice(0, -1).join('/')\n\t\t\tOC.dialogs.filepicker(t('text', 'Select file to link to'), (file) => {\n\t\t\t\tconst client = OC.Files.getClient()\n\t\t\t\tclient.getFileInfo(file).then((_status, fileInfo) => {\n\t\t\t\t\tconst path = optimalPath(this.filePath, `${fileInfo.path}/${fileInfo.name}`)\n\t\t\t\t\tconst encodedPath = path.split('/').map(encodeURIComponent).join('/')\n\t\t\t\t\tconst href = `${encodedPath}?fileId=${fileInfo.id}`\n\t\t\t\t\tthis.$editor.chain().setLink({ href }).focus().run()\n\t\t\t\t\tthis.hideLinkMenu()\n\t\t\t\t})\n\t\t\t}, false, [], true, undefined, startPath)\n\t\t},\n\t\tsetLinkUrl() {\n\t\t\tlet url = this.linkUrl\n\t\t\t// Heuristics for determining if we need a https:// prefix.\n\t\t\tconst noPrefixes = [\n\t\t\t\t/^[a-zA-Z]+:/, // url with protocol (\"mailTo:email@domain.tld\")\n\t\t\t\t/^\\//, // absolute path\n\t\t\t\t/\\?fileId=/, // relative link with fileId\n\t\t\t\t/^\\.\\.?\\//, // relative link starting with ./ or ../\n\t\t\t\t/^[^.]*[/$]/, // no dots before first '/' - not a domain name\n\t\t\t\t/^#/, // url fragment\n\t\t\t]\n\t\t\tif (url && !noPrefixes.find(regex => url.match(regex))) {\n\t\t\t\turl = 'https://' + url\n\t\t\t}\n\n\t\t\t// Avoid issues when parsing urls later on in markdown that might be entered in an invalid format (e.g. \"mailto: example@example.com\")\n\t\t\tconst href = url.replaceAll(' ', '%20')\n\t\t\tthis.$editor.chain().setLink({ href }).focus().run()\n\t\t\tthis.hideLinkMenu()\n\t\t},\n\t\tremoveLinkUrl() {\n\t\t\tthis.$editor.chain().unsetLink().focus().run()\n\t\t},\n\t\tisActive(selector, args = {}) {\n\t\t\treturn this.$editor.isActive(selector, args)\n\t\t},\n\t},\n}\n</script>\n\n<style scoped lang=\"scss\">\n\t.menububble {\n\t\tdisplay: flex;\n\t\tz-index: 10020;\n\t\tbackground: var(--color-main-background-translucent);\n\t\tbox-shadow: 0 1px 5px var(--color-box-shadow);\n\t\tborder-radius: var(--border-radius-large);\n\t\toverflow: hidden;\n\t\tpadding: 0;\n\t\tmargin-left: 10px;\n\t\theight: 44px;\n\n\t\t&__button {\n\t\t\tflex-grow: 1;\n\t\t\tborder: 0;\n\t\t\tpadding: 0.9rem 0.7rem;\n\t\t\tmargin: 0;\n\t\t\tborder-radius: 0;\n\t\t\tcursor: pointer;\n\t\t\tbackground-color: var(--color-main-background);\n\t\t\tborder-right: 1px solid var(--color-border);\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\n\t\t\t&:focus,\n\t\t\t&:hover {\n\t\t\t\tbackground-color: var(--color-background-hover);\n\t\t\t\tborder: 0;\n\t\t\t\tborder-right: 1px solid var(--color-border) !important;\n\t\t\t}\n\n\t\t\t&:last-child {\n\t\t\t\tborder: 0 !important;\n\t\t\t}\n\t\t}\n\n\t\t&__buttontext {\n\t\t\tpadding: 0.4rem;\n\t\t\tpadding-right: 0;\n\t\t}\n\n\t\t&__form {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t}\n\n\t\t&__input {\n\t\t\tfont: inherit;\n\t\t\tborder: none;\n\t\t\tbackground: transparent;\n\t\t\tmin-width: 250px;\n\t\t\tmargin: 0 0.5em 0 1em;\n\t\t}\n\t}\n</style>\n","import mod from \"-!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MenuBubble.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MenuBubble.vue?vue&type=script&lang=js&\"","\n import API from \"!../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../node_modules/css-loader/dist/cjs.js!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/sass-loader/dist/cjs.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MenuBubble.vue?vue&type=style&index=0&id=2716a5d6&scoped=true&lang=scss&\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../node_modules/css-loader/dist/cjs.js!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/sass-loader/dist/cjs.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MenuBubble.vue?vue&type=style&index=0&id=2716a5d6&scoped=true&lang=scss&\";\n export default content && content.locals ? content.locals : undefined;\n","import { render, staticRenderFns } from \"./MenuBubble.vue?vue&type=template&id=2716a5d6&scoped=true&\"\nimport script from \"./MenuBubble.vue?vue&type=script&lang=js&\"\nexport * from \"./MenuBubble.vue?vue&type=script&lang=js&\"\nimport style0 from \"./MenuBubble.vue?vue&type=style&index=0&id=2716a5d6&scoped=true&lang=scss&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"2716a5d6\",\n null\n \n)\n\nexport default component.exports"],"names":["name","components","EditorWrapper","props","file","type","default","folder","data","focus","loaded","ready","autofocus","darkTheme","enabled","computed","shareToken","canCreate","showEmptyWorkspace","filepath","watch","newValue","document","mounted","subscribe","methods","unfocus","reset","createNew","window","scrollTo","animate","options","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","_vm","this","_h","$createElement","_c","_self","class","attrs","staticClass","on","_v","_s","t","_e","directives","rawName","value","expression","key","path","id","mimetype","$event","FILE_ACTION_IDENTIFIER","optimalPath","from","to","current","split","target","pop","shift","relativePath","fill","concat","absolutePath","length","join","registerFileCreate","newFileMenuPlugin","attach","menu","fileList","addMenuEntry","displayName","templateName","iconClass","fileType","actionHandler","createFile","then","status","fileInfoModel","OCA","Files","FileInfoModel","Viewer","fileActions","triggerAction","OC","Plugins","register","registerFileActionFallback","sharingToken","getElementById","dir","ViewerRoot","createElement","body","appendChild","registerAction","mime","PERMISSION_UPDATE","PERMISSION_READ","imagePath","filename","FileList","findFile","Promise","all","imports","getCurrentDirectory","Vue","prototype","n","Editor","render","h","self","fileId","active","mimeType","close","$destroy","$mount","i","openMimetypes","setDefault","FilesWorkspacePlugin","el","vm","registerHeader","bind","priority","PROPERTY_WORKSPACE_FILE","Client","NS_NEXTCLOUD","oldGetWebdavProperties","_getWebdavProperties","apply","arguments","readmeId","filesClient","addFileInfoParser","response","propStat","properties","endsWith","permissions","console","warn","open","module","View","extend","RichWorkspace","propsData","store","$el","previous","parseInt","___CSS_LOADER_EXPORT___","push","BubbleMenu","Link","Document","Delete","Check","tooltip","mixins","contentWrapper","required","filePath","linkUrl","linkMenuIsActive","isUsingDirectEditing","showLinkMenu","hideLinkMenu","selectFile","client","href","undefined","startPath","setLinkUrl","url","removeLinkUrl","isActive","selector","$editor","onHide","duration","placement","preventDefault","ref","domProps","indexOf","_k","keyCode","composing"],"sourceRoot":""} \ No newline at end of file