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

editor-rich.js.map « js - github.com/nextcloud/text.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 3532576d99ea341460da9070438901445b91c3b2 (plain)
1
{"version":3,"sources":["webpack:///./src/helpers/mime.js","webpack:///./src/views/RichWorkspace.vue?6451","webpack:///./src/views/RichWorkspace.vue?c912","webpack:///./src/components/MenuBar.vue?ad98","webpack:///./src/components/MenuBubble.vue?44b3","webpack:///./src/views/RichWorkspace.vue?8c2e","webpack:///src/views/RichWorkspace.vue","webpack:///./src/views/RichWorkspace.vue?d0bc","webpack:///./src/views/RichWorkspace.vue","webpack:///./src/views/RichWorkspace.vue?822c","webpack:///./src/helpers/files.js","webpack:///./src/components/MenuBar.vue?169d","webpack:///./src/components/MenuBar.vue?456d","webpack:///./src/components/MenuBubble.vue?0016","webpack:///./src/components/MenuBubble.vue?0293","webpack:///./src/components/MenuBar.vue?ae98","webpack:///./src/mixins/menubar.js","webpack:///src/components/MenuBar.vue","webpack:///./src/components/MenuBar.vue?c014","webpack:///./src/components/MenuBar.vue","webpack:///./src/components/MenuBubble.vue?5c2d","webpack:///./src/components/MenuBubble.vue?7a05","webpack:///src/components/MenuBubble.vue","webpack:///./src/components/MenuBubble.vue"],"names":["openMimetypesMarkdown","openMimetypesPlainText","openMimetypes","module","exports","push","i","content","locals","add","default","_vm","this","_h","$createElement","_c","_self","class","loaded","ready","attrs","file","autofocus","staticClass","on","createNew","_v","_s","t","_e","directives","name","rawName","value","expression","key","id","path","shareToken","mimetype","$event","fetchFileInfo","user","axios","method","url","generateRemoteUrl","headers","requesttoken","OC","requestToken","data","response","files","OCA","Files","App","fileList","filesClient","_client","parseMultiStatus","map","fileInfo","_parseFileInfo","href","registerFileCreate","newFileMenuPlugin","attach","menu","addMenuEntry","displayName","templateName","iconClass","fileType","actionHandler","createFile","then","status","fileInfoModel","FileInfoModel","Viewer","fileActions","triggerAction","Plugins","register","registerFileActionFallback","sharingToken","document","getElementById","dir","ViewerRoot","createElement","body","appendChild","registerAction","mime","PERMISSION_UPDATE","PERMISSION_READ","imagePath","filename","window","FileList","findFile","Promise","all","imports","getCurrentDirectory","Vue","prototype","n","Editor","render","h","props","fileId","active","relativePath","mimeType","$mount","length","setDefault","FilesWorkspacePlugin","el","registerHeader","bind","priority","vm","extend","RichWorkspace","propsData","$el","toString","label","isActive","action","command","undo","redo","strong","em","strike","paragraph","visible","children","heading","level","bullet_list","ordered_list","blockquote","code_block","component","editor","scopedSlots","_u","fn","ref","commands","focused","autohide","_l","icon","$index","iconCount","getIconClasses","clickIcon","hideChildMenu","childIconClass","preventDefault","toggleChildMenu","open","isChildMenuVisible","childPopoverMenu","isHiddenInMenu","childIcon","_t","hideLinkMenu","getMarkAttrs","style","setLinkUrl","link","linkUrl","domProps","type","indexOf","_k","keyCode","target","composing","showLinkMenu"],"mappings":"mGAAA;;;;;;;;;;;;;;;;;;;;;;AAsBA,IAAMA,EAAwB,CAC7B,iBAGKC,EAAyB,CAC9B,aACA,kBACA,yBACA,mBACA,kBACA,sBACA,8BACA,oBACA,sBACA,qBACA,oBAGKC,EAAgB,GAAH,OAAOF,EAA0BC,I,iCCxCpD,mBAAuU,G,qBCA7TE,EAAOC,QAAU,EAAQ,IAAR,EAA6D,IAEhFC,KAAK,CAACF,EAAOG,EAAI,80BAA+0B,M,oBCCx2B,IAAIC,EAAU,EAAQ,KACA,iBAAZA,IAAsBA,EAAU,CAAC,CAACJ,EAAOG,EAAIC,EAAS,MAC7DA,EAAQC,SAAQL,EAAOC,QAAUG,EAAQC,SAG/BC,EADH,EAAQ,KAA+DC,SAChE,WAAYH,GAAS,EAAM,K,oBCL5C,IAAIA,EAAU,EAAQ,KACA,iBAAZA,IAAsBA,EAAU,CAAC,CAACJ,EAAOG,EAAIC,EAAS,MAC7DA,EAAQC,SAAQL,EAAOC,QAAUG,EAAQC,SAG/BC,EADH,EAAQ,KAA+DC,SAChE,WAAYH,GAAS,EAAM,K,mB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* @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\nconst openMimetypesMarkdown = [\n\t'text/markdown'\n]\n\nconst openMimetypesPlainText = [\n\t'text/plain',\n\t'application/cmd',\n\t'application/javascript',\n\t'application/json',\n\t'application/xml',\n\t'application/x-empty',\n\t'application/x-msdos-program',\n\t'application/x-php',\n\t'application/x-pearl',\n\t'application/x-text',\n\t'application/yaml'\n]\n\nconst openMimetypes = [...openMimetypesMarkdown, ...openMimetypesPlainText]\n\nexport {\n\topenMimetypes,\n\topenMimetypesMarkdown,\n\topenMimetypesPlainText\n}\n","import mod from \"-!../../node_modules/vue-style-loader/index.js!../../node_modules/css-loader/dist/cjs.js!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./RichWorkspace.vue?vue&type=style&index=0&id=38cf7d37&scoped=true&lang=css&\"; export default mod; export * from \"-!../../node_modules/vue-style-loader/index.js!../../node_modules/css-loader/dist/cjs.js!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./RichWorkspace.vue?vue&type=style&index=0&id=38cf7d37&scoped=true&lang=css&\"","exports = module.exports = require(\"../../node_modules/css-loader/dist/runtime/api.js\")(false);\n// Module\nexports.push([module.id, \"\\n#rich-workspace[data-v-38cf7d37] {\\n\\tpadding: 0 60px;\\n\\tmin-height: 90px;\\n\\ttext-align: left;\\n}\\n.empty-workspace[data-v-38cf7d37] {\\n\\tmargin-top: 54px;\\n\\tcolor: var(--color-text-maxcontrast);\\n\\theight: 0;\\n}\\n#rich-workspace[data-v-38cf7d37] div[contenteditable=false] {\\n\\twidth: 100%;\\n\\tpadding: 0px;\\n\\tbackground-color: var(--color-main-background);\\n\\topacity: 1;\\n\\tborder: none;\\n}\\n#rich-workspace[data-v-38cf7d37] #editor-container {\\n\\theight: 100%;\\n\\tposition: unset !important;\\n}\\n#rich-workspace[data-v-38cf7d37] #editor-wrapper {\\n\\tposition: unset !important;\\n}\\n#rich-workspace[data-v-38cf7d37] #editor-wrapper .ProseMirror {\\n\\tpadding: 0px;\\n\\tmargin: 0;\\n}\\n#rich-workspace[data-v-38cf7d37] .menubar .menubar-icons {\\n\\tmargin-left: 0;\\n}\\n#rich-workspace[data-v-38cf7d37] .editor__content {\\n\\tmargin: 0;\\n}\\n\", \"\"]);\n","// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = require(\"!!../../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!./MenuBar.vue?vue&type=style&index=0&id=432e474a&scoped=true&lang=scss&\");\nif(typeof content === 'string') content = [[module.id, content, '']];\nif(content.locals) module.exports = content.locals;\n// add the styles to the DOM\nvar add = require(\"!../../node_modules/vue-style-loader/lib/addStylesClient.js\").default\nvar update = add(\"642fb50e\", content, true, {});","// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = require(\"!!../../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=7735676e&scoped=true&lang=scss&\");\nif(typeof content === 'string') content = [[module.id, content, '']];\nif(content.locals) module.exports = content.locals;\n// add the styles to the DOM\nvar add = require(\"!../../node_modules/vue-style-loader/lib/addStylesClient.js\").default\nvar update = add(\"79148c10\", content, true, {});","// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = require(\"!!../../node_modules/css-loader/dist/cjs.js!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./RichWorkspace.vue?vue&type=style&index=0&id=38cf7d37&scoped=true&lang=css&\");\nif(typeof content === 'string') content = [[module.id, content, '']];\nif(content.locals) module.exports = content.locals;\n// add the styles to the DOM\nvar add = require(\"!../../node_modules/vue-style-loader/lib/addStylesClient.js\").default\nvar update = add(\"377b1ccd\", content, true, {});","<!--\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 id=\"rich-workspace\" :class=\"{'icon-loading': !loaded || !ready }\">\n\t\t<div v-if=\"!file || (autofocus && !ready)\" 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.id\"\n\t\t\t:file-id=\"file.id\"\n\t\t\t:relative-path=\"file.path\"\n\t\t\t:share-token=\"shareToken\"\n\t\t\t:active=\"true\"\n\t\t\t:autohide=\"true\"\n\t\t\t:mime=\"file.mimetype\"\n\t\t\t:autofocus=\"autofocus\"\n\t\t\t@ready=\"ready=true\" />\n\t</div>\n</template>\n\n<script>\nimport axios from '@nextcloud/axios'\nimport { generateOcsUrl } from '@nextcloud/router'\n\nconst IS_PUBLIC = !!(document.getElementById('isPublic'))\nconst WORKSPACE_URL = generateOcsUrl('apps/text' + (IS_PUBLIC ? '/public' : ''), 2) + 'workspace'\n\nexport default {\n\tname: 'RichWorkspace',\n\tcomponents: {\n\t\tEditorWrapper: () => import(/* webpackChunkName: \"editor\" */'./../components/EditorWrapper')\n\t},\n\tprops: {\n\t\tpath: {\n\t\t\ttype: String,\n\t\t\trequired: true\n\t\t}\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tfile: null,\n\t\t\tloaded: false,\n\t\t\tready: false,\n\t\t\tautofocus: false\n\t\t}\n\t},\n\tcomputed: {\n\t\tshareToken() {\n\t\t\treturn document.getElementById('sharingToken') ? document.getElementById('sharingToken').value : null\n\t\t}\n\t},\n\twatch: {\n\t\tpath: function() {\n\t\t\tthis.getFileInfo()\n\t\t}\n\t},\n\tasync mounted() {\n\t\tthis.getFileInfo()\n\t},\n\tmethods: {\n\t\tgetFileInfo() {\n\t\t\tthis.loaded = false\n\t\t\tthis.autofocus = false\n\t\t\tthis.ready = false\n\t\t\tconst params = { path: this.path }\n\t\t\tif (IS_PUBLIC) {\n\t\t\t\tparams.shareToken = this.shareToken\n\t\t\t}\n\t\t\taxios.get(WORKSPACE_URL, { params }).then((response) => {\n\t\t\t\tconst data = response.data.ocs.data\n\t\t\t\tthis.file = data.file\n\t\t\t\tthis.editing = true\n\t\t\t\tthis.loaded = true\n\t\t\t}).catch(() => {\n\t\t\t\tthis.file = null\n\t\t\t\tthis.loaded = true\n\t\t\t\tthis.ready = true\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\twindow.FileList.createFile('README.md', { scrollTo: false, animate: false }).then((status, data) => {\n\t\t\t\tthis.getFileInfo()\n\t\t\t\tthis.autofocus = true\n\t\t\t\tthis.creating = false\n\t\t\t})\n\t\t}\n\t}\n}\n</script>\n\n<style scoped>\n\t#rich-workspace {\n\t\tpadding: 0 60px;\n\t\tmin-height: 90px;\n\t\ttext-align: left;\n\t}\n\n\t.empty-workspace {\n\t\tmargin-top: 54px;\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 #editor-container {\n\t\theight: 100%;\n\t\tposition: unset !important;\n\t}\n\n\t#rich-workspace::v-deep #editor-wrapper {\n\t\tposition: unset !important;\n\t}\n\n\t#rich-workspace::v-deep #editor-wrapper .ProseMirror {\n\t\tpadding: 0px;\n\t\tmargin: 0;\n\t}\n\n\t#rich-workspace::v-deep .menubar .menubar-icons {\n\t\tmargin-left: 0;\n\t}\n\n\t#rich-workspace::v-deep .editor__content {\n\t\tmargin: 0;\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!./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&\"","import { render, staticRenderFns } from \"./RichWorkspace.vue?vue&type=template&id=38cf7d37&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=38cf7d37&scoped=true&lang=css&\"\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  \"38cf7d37\",\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 _c('div',{class:{'icon-loading': !_vm.loaded || !_vm.ready },attrs:{\"id\":\"rich-workspace\"}},[(!_vm.file || (_vm.autofocus && !_vm.ready))?_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.id,attrs:{\"file-id\":_vm.file.id,\"relative-path\":_vm.file.path,\"share-token\":_vm.shareToken,\"active\":true,\"autohide\":true,\"mime\":_vm.file.mimetype,\"autofocus\":_vm.autofocus},on:{\"ready\":function($event){_vm.ready=true}}}):_vm._e()],1)}\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/**\n * Callback that should be executed after the document is ready\n * @param callback\n */\nimport axios from '@nextcloud/axios'\nimport { generateRemoteUrl } from 'nextcloud-server/dist/router'\nimport { openMimetypes } from './mime'\nimport RichWorkspace from '../views/RichWorkspace'\n\nconst FILE_ACTION_IDENTIFIER = 'Edit with text app'\n\nconst fetchFileInfo = async function(user, path) {\n\tconst response = await axios({\n\t\tmethod: 'PROPFIND',\n\t\turl: generateRemoteUrl(`dav/files/${user}${path}`),\n\t\theaders: {\n\t\t\trequesttoken: OC.requestToken,\n\t\t\t'content-Type': 'text/xml'\n\t\t},\n\t\tdata: `<?xml version=\"1.0\"?>\n<d:propfind  xmlns:d=\"DAV:\" xmlns:oc=\"http://owncloud.org/ns\" xmlns:nc=\"http://nextcloud.org/ns\" xmlns:ocs=\"http://open-collaboration-services.org/ns\">\n  <d:prop>\n    <d:getlastmodified />\n    <d:getetag />\n    <d:getcontenttype />\n    <d:resourcetype />\n    <oc:fileid />\n    <oc:permissions />\n    <oc:size />\n    <d:getcontentlength />\n    <nc:has-preview />\n    <nc:mount-type />\n    <nc:is-encrypted />\n    <ocs:share-permissions />\n    <oc:tags />\n    <oc:favorite />\n    <oc:comments-unread />\n    <oc:owner-id />\n    <oc:owner-display-name />\n    <oc:share-types />\n  </d:prop>\n</d:propfind>`\n\t})\n\n\tconst files = OCA.Files.App.fileList.filesClient._client.parseMultiStatus(response.data)\n\treturn files.map(file => {\n\t\tconst fileInfo = OCA.Files.App.fileList.filesClient._parseFileInfo(file)\n\t\tfileInfo.href = file.href\n\t\treturn fileInfo\n\t})\n}\n\nconst registerFileCreate = () => {\n\tconst newFileMenuPlugin = {\n\t\tattach: function(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 document'),\n\t\t\t\ttemplateName: t('text', 'New text document') + '.md',\n\t\t\t\ticonClass: 'icon-filetype-text',\n\t\t\t\tfileType: 'file',\n\t\t\t\tactionHandler: function(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\tOC.imagePath('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')\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: h => h(Editor, {\n\t\t\t\t\t\t\tprops: {\n\t\t\t\t\t\t\t\tfileId: file ? file.id : null,\n\t\t\t\t\t\t\t\tactive: true,\n\t\t\t\t\t\t\t\tshareToken: sharingToken,\n\t\t\t\t\t\t\t\trelativePath: path,\n\t\t\t\t\t\t\t\tmimeType: file.mimetype\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\n\tattach: function(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\t},\n\n\trender: function(fileList) {\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\tconst vm = new View({\n\t\t\t\tpropsData: {\n\t\t\t\t\tpath: fileList.getCurrentDirectory()\n\t\t\t\t}\n\t\t\t}).$mount(this.el)\n\n\t\t\tfileList.$el.on('changeDirectory', data => {\n\t\t\t\tvm.path = data.dir.toString()\n\t\t\t})\n\t\t})\n\t}\n}\n\nexport {\n\tfetchFileInfo,\n\tregisterFileActionFallback,\n\tregisterFileCreate,\n\tFilesWorkspacePlugin,\n\tFILE_ACTION_IDENTIFIER\n}\n","import mod from \"-!../../node_modules/vue-style-loader/index.js!../../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!./MenuBar.vue?vue&type=style&index=0&id=432e474a&scoped=true&lang=scss&\"; export default mod; export * from \"-!../../node_modules/vue-style-loader/index.js!../../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!./MenuBar.vue?vue&type=style&index=0&id=432e474a&scoped=true&lang=scss&\"","exports = module.exports = require(\"../../node_modules/css-loader/dist/runtime/api.js\")(false);\n// Module\nexports.push([module.id, \".menubar[data-v-432e474a]{position:fixed;position:-webkit-sticky;position:sticky;top:0;display:flex;z-index:10010;background-color:var(--color-main-background-translucent);height:44px}.menubar.autohide[data-v-432e474a]{visibility:hidden;opacity:0;transition:visibility 0.2s 0.4s, opacity 0.2s 0.4s}.menubar.autohide.is-focused[data-v-432e474a]{visibility:visible;opacity:1}.menubar .menubar-icons[data-v-432e474a]{flex-grow:1;margin-left:calc((100% - 660px) / 2)}@media (max-width: 660px){.menubar .menubar-icons[data-v-432e474a]{margin-left:0}}.menubar button[data-v-432e474a]{width:44px;height:44px;margin:0;background-size:16px;border:0;background-color:transparent;opacity:.5;color:var(--color-main-text);background-position:center center;vertical-align:top}.menubar button[data-v-432e474a]:hover,.menubar button[data-v-432e474a]:focus,.menubar button[data-v-432e474a]:active{background-color:var(--color-background-dark)}.menubar button.is-active[data-v-432e474a],.menubar button[data-v-432e474a]:hover,.menubar button[data-v-432e474a]:focus{opacity:1}.menubar button.icon-undo[data-v-432e474a],.menubar button.icon-redo[data-v-432e474a]{opacity:.4}.menubar .submenu[data-v-432e474a]{display:inline-block;width:44px;height:44px;position:relative;vertical-align:top}\\n\", \"\"]);\n","import mod from \"-!../../node_modules/vue-style-loader/index.js!../../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=7735676e&scoped=true&lang=scss&\"; export default mod; export * from \"-!../../node_modules/vue-style-loader/index.js!../../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=7735676e&scoped=true&lang=scss&\"","exports = module.exports = require(\"../../node_modules/css-loader/dist/runtime/api.js\")(false);\n// Module\nexports.push([module.id, \".menububble[data-v-7735676e]{position:absolute;display:flex;z-index:10020;background:var(--color-main-background-translucent);box-shadow:0 1px 5px var(--color-box-shadow);border-radius:5px;padding:0.3rem;margin-bottom:0.5rem;visibility:hidden;opacity:0;transform:translateX(-50%);transition:opacity 0.2s, visibility 0.2s}.menububble.is-active[data-v-7735676e]{opacity:1;visibility:visible}.menububble__button[data-v-7735676e]{display:inline-flex;border:0;padding:0.2rem 0.5rem;margin-right:0.2rem;border-radius:3px;cursor:pointer}.menububble__button[data-v-7735676e]:last-child{margin-right:0}.menububble__form[data-v-7735676e]{display:flex;align-items:center}.menububble__input[data-v-7735676e]{font:inherit;border:none;background:transparent;min-width:150px}\\n\", \"\"]);\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('EditorMenuBar',{attrs:{\"editor\":_vm.editor},scopedSlots:_vm._u([{key:\"default\",fn:function(ref){\nvar commands = ref.commands;\nvar isActive = ref.isActive;\nvar focused = ref.focused;\nreturn [_c('div',{staticClass:\"menubar\",class:{ 'is-focused': focused, 'autohide': _vm.autohide }},[(_vm.isRichEditor)?_c('div',{ref:\"menubar\",staticClass:\"menubar-icons\"},[_vm._l((_vm.allIcons),function(icon,$index){return [(icon.class)?_c('button',{directives:[{name:\"show\",rawName:\"v-show\",value:($index < _vm.iconCount),expression:\"$index < iconCount\"}],key:icon.label,class:_vm.getIconClasses(isActive, icon),attrs:{\"title\":icon.label},on:{\"click\":function($event){return _vm.clickIcon(commands, icon)}}}):[_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:($index < _vm.iconCount),expression:\"$index < iconCount\"},{name:\"click-outside\",rawName:\"v-click-outside\",value:(function () { return _vm.hideChildMenu(icon); }),expression:\"() => hideChildMenu(icon)\"}],key:icon.label,staticClass:\"submenu\"},[_c('button',{class:_vm.childIconClass(isActive, icon.children ),attrs:{\"title\":icon.label},on:{\"click\":function($event){$event.preventDefault();return _vm.toggleChildMenu(icon)}}}),_vm._v(\" \"),_c('div',{staticClass:\"popovermenu menu-center\",class:{open: _vm.isChildMenuVisible(icon)}},[_c('PopoverMenu',{attrs:{\"menu\":_vm.childPopoverMenu(isActive, commands, icon.children, icon)}})],1)])]]}),_vm._v(\" \"),_c('Actions',[_vm._l((_vm.allIcons),function(icon,$index){return [(icon.class && _vm.isHiddenInMenu($index))?_c('ActionButton',{key:icon.class,attrs:{\"icon\":icon.class},on:{\"click\":function($event){return _vm.clickIcon(commands, icon)}}},[_vm._v(\"\\n\\t\\t\\t\\t\\t\\t\"+_vm._s(icon.label)+\"\\n\\t\\t\\t\\t\\t\")]):(!icon.class && _vm.isHiddenInMenu($index))?_vm._l((icon.children),function(childIcon){return _c('ActionButton',{key:childIcon.class,attrs:{\"icon\":childIcon.class},on:{\"click\":function($event){return _vm.clickIcon(commands, childIcon)}}},[_vm._v(\"\\n\\t\\t\\t\\t\\t\\t\\t\"+_vm._s(childIcon.label)+\"\\n\\t\\t\\t\\t\\t\\t\")])}):_vm._e()]})],2)],2):_vm._e(),_vm._v(\" \"),_vm._t(\"default\",[_vm._v(\"\\n\\t\\t\\tLeft side\\n\\t\\t\")])],2)]}}],null,true)})}\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\nexport default [\n\t{\n\t\tlabel: t('text', 'Undo'),\n\t\tclass: 'icon-undo',\n\t\tisActive: (isActive) => {},\n\t\taction: (command) => command.undo()\n\t},\n\t{\n\t\tlabel: t('text', 'Redo'),\n\t\tclass: 'icon-redo',\n\t\tisActive: (isActive) => {},\n\t\taction: (command) => command.redo()\n\t},\n\t{\n\t\tlabel: t('text', 'Bold'),\n\t\tclass: 'icon-bold',\n\t\tisActive: (isActive) => isActive.strong(),\n\t\taction: (command) => {\n\t\t\treturn command.strong()\n\t\t}\n\t},\n\t{\n\t\tlabel: t('text', 'Italic'),\n\t\tclass: 'icon-italic',\n\t\tisActive: (isActive) => isActive.em(),\n\t\taction: (command) => {\n\t\t\treturn command.em()\n\t\t}\n\t},\n\t{\n\t\tlabel: t('text', 'Strikethrough'),\n\t\tclass: 'icon-strike',\n\t\tisActive: (isActive) => isActive.strike(),\n\t\taction: (command) => {\n\t\t\treturn command.strike()\n\t\t}\n\t},\n\t{\n\t\tlabel: t('text', 'Paragraph'),\n\t\tclass: 'icon-paragraph',\n\t\tisActive: (isActive) => {},\n\t\taction: (command) => {\n\t\t\treturn command.paragraph()\n\t\t}\n\t},\n\t{\n\t\tlabel: t('text', 'Headings'),\n\t\tvisible: false,\n\t\tchildren: [\n\t\t\t{\n\t\t\t\tlabel: t('text', 'Heading 1'),\n\t\t\t\tclass: 'icon-h1',\n\t\t\t\tisActive: (isActive) => isActive.heading({ level: 1 }),\n\t\t\t\taction: (command) => {\n\t\t\t\t\treturn command.heading({ level: 1 })\n\t\t\t\t}\n\t\t\t},\n\t\t\t{\n\t\t\t\tlabel: t('text', 'Heading 2'),\n\t\t\t\tclass: 'icon-h2',\n\t\t\t\tisActive: (isActive) => isActive.heading({ level: 2 }),\n\t\t\t\taction: (command) => {\n\t\t\t\t\treturn command.heading({ level: 2 })\n\t\t\t\t}\n\t\t\t},\n\t\t\t{\n\t\t\t\tlabel: t('text', 'Heading 3'),\n\t\t\t\tclass: 'icon-h3',\n\t\t\t\tisActive: (isActive) => isActive.heading({ level: 3 }),\n\t\t\t\taction: (command) => {\n\t\t\t\t\treturn command.heading({ level: 3 })\n\t\t\t\t}\n\t\t\t},\n\t\t\t{\n\t\t\t\tlabel: t('text', 'Heading 4'),\n\t\t\t\tclass: 'icon-h4',\n\t\t\t\tisActive: (isActive) => isActive.heading({ level: 4 }),\n\t\t\t\taction: (command) => {\n\t\t\t\t\treturn command.heading({ level: 4 })\n\t\t\t\t}\n\t\t\t},\n\t\t\t{\n\t\t\t\tlabel: t('text', 'Heading 5'),\n\t\t\t\tclass: 'icon-h5',\n\t\t\t\tisActive: (isActive) => isActive.heading({ level: 5 }),\n\t\t\t\taction: (command) => {\n\t\t\t\t\treturn command.heading({ level: 5 })\n\t\t\t\t}\n\t\t\t},\n\t\t\t{\n\t\t\t\tlabel: t('text', 'Heading 6'),\n\t\t\t\tclass: 'icon-h6',\n\t\t\t\tisActive: (isActive) => isActive.heading({ level: 6 }),\n\t\t\t\taction: (command) => {\n\t\t\t\t\treturn command.heading({ level: 6 })\n\t\t\t\t}\n\t\t\t}\n\t\t]\n\t},\n\t{\n\t\tlabel: t('text', 'Unordered list'),\n\t\tclass: 'icon-ul',\n\t\tisActive: (isActive) => isActive.bullet_list(),\n\t\taction: (command) => {\n\t\t\treturn command.bullet_list()\n\t\t}\n\t},\n\t{\n\t\tlabel: t('text', 'Ordered list'),\n\t\tclass: 'icon-ol',\n\t\tisActive: (isActive) => isActive.ordered_list(),\n\t\taction: (command) => {\n\t\t\treturn command.ordered_list()\n\t\t}\n\t},\n\t{\n\t\tlabel: t('text', 'Blockquote'),\n\t\tclass: 'icon-quote',\n\t\tisActive: (isActive) => isActive.blockquote(),\n\t\taction: (command) => {\n\t\t\treturn command.blockquote()\n\t\t}\n\t},\n\t{\n\t\tlabel: t('text', 'Code block'),\n\t\tclass: 'icon-code',\n\t\tisActive: (isActive) => isActive.code_block(),\n\t\taction: (command) => {\n\t\t\treturn command.code_block()\n\t\t}\n\t}\n]\n","<!--\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<EditorMenuBar v-slot=\"{ commands, isActive, focused }\" :editor=\"editor\">\n\t\t<div class=\"menubar\" :class=\"{ 'is-focused': focused, 'autohide': autohide }\">\n\t\t\t<div v-if=\"isRichEditor\" ref=\"menubar\" class=\"menubar-icons\">\n\t\t\t\t<template v-for=\"(icon, $index) in allIcons\">\n\t\t\t\t\t<button v-if=\"icon.class\"\n\t\t\t\t\t\tv-show=\"$index < iconCount\"\n\t\t\t\t\t\t:key=\"icon.label\"\n\t\t\t\t\t\t:title=\"icon.label\"\n\t\t\t\t\t\t:class=\"getIconClasses(isActive, icon)\"\n\t\t\t\t\t\t@click=\"clickIcon(commands, icon)\" />\n\t\t\t\t\t<template v-else>\n\t\t\t\t\t\t<div v-show=\"$index < iconCount\"\n\t\t\t\t\t\t\t:key=\"icon.label\"\n\t\t\t\t\t\t\tv-click-outside=\"() => hideChildMenu(icon)\"\n\t\t\t\t\t\t\tclass=\"submenu\">\n\t\t\t\t\t\t\t<button :class=\"childIconClass(isActive, icon.children, )\"\n\t\t\t\t\t\t\t\t:title=\"icon.label\"\n\t\t\t\t\t\t\t\t@click.prevent=\"toggleChildMenu(icon)\" />\n\t\t\t\t\t\t\t<div :class=\"{open: isChildMenuVisible(icon)}\" class=\"popovermenu menu-center\">\n\t\t\t\t\t\t\t\t<PopoverMenu :menu=\"childPopoverMenu(isActive, commands, icon.children, icon)\" />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</template>\n\t\t\t\t</template>\n\t\t\t\t<Actions>\n\t\t\t\t\t<template v-for=\"(icon, $index) in allIcons\">\n\t\t\t\t\t\t<ActionButton v-if=\"icon.class && isHiddenInMenu($index)\"\n\t\t\t\t\t\t\t:key=\"icon.class\"\n\t\t\t\t\t\t\t:icon=\"icon.class\"\n\t\t\t\t\t\t\t@click=\"clickIcon(commands, icon)\">\n\t\t\t\t\t\t\t{{ icon.label }}\n\t\t\t\t\t\t</ActionButton>\n\t\t\t\t\t\t<template v-else-if=\"!icon.class && isHiddenInMenu($index)\">\n\t\t\t\t\t\t\t<ActionButton v-for=\"childIcon in icon.children\"\n\t\t\t\t\t\t\t\t:key=\"childIcon.class\"\n\t\t\t\t\t\t\t\t:icon=\"childIcon.class\"\n\t\t\t\t\t\t\t\t@click=\"clickIcon(commands, childIcon)\">\n\t\t\t\t\t\t\t\t{{ childIcon.label }}\n\t\t\t\t\t\t\t</ActionButton>\n\t\t\t\t\t\t</template>\n\t\t\t\t\t</template>\n\t\t\t\t</Actions>\n\t\t\t</div>\n\t\t\t<slot>\n\t\t\t\tLeft side\n\t\t\t</slot>\n\t\t</div>\n\t</EditorMenuBar>\n</template>\n\n<script>\nimport { EditorMenuBar } from 'tiptap'\nimport Tooltip from 'nextcloud-vue/dist/Directives/Tooltip'\nimport menuBarIcons from './../mixins/menubar'\nimport { fetchFileInfo } from './../helpers/files'\n\nimport Actions from 'nextcloud-vue/dist/Components/Actions'\nimport ActionButton from 'nextcloud-vue/dist/Components/ActionButton'\nimport PopoverMenu from 'nextcloud-vue/dist/Components/PopoverMenu'\nimport ClickOutside from 'vue-click-outside'\n\nexport default {\n\tname: 'MenuBar',\n\tcomponents: {\n\t\tEditorMenuBar,\n\t\tActionButton,\n\t\tPopoverMenu,\n\t\tActions\n\t},\n\tdirectives: {\n\t\tTooltip,\n\t\tClickOutside\n\t},\n\tprops: {\n\t\teditor: {\n\t\t\ttype: Object,\n\t\t\trequired: false,\n\t\t\tdefault: null\n\t\t},\n\t\tisRichEditor: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\t\tautohide: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t},\n\tdata: () => {\n\t\treturn {\n\t\t\twindowWidth: 0,\n\t\t\twindowHeight: 0,\n\t\t\tforceRecompute: 0,\n\t\t\tsubmenuVisibility: {},\n\t\t\ticons: [...menuBarIcons]\n\t\t}\n\t},\n\tcomputed: {\n\t\tisPublic() {\n\t\t\treturn document.getElementById('isPublic') && document.getElementById('isPublic').value === '1'\n\t\t},\n\t\tisHiddenInMenu() {\n\t\t\treturn ($index) => $index - this.iconCount >= 0\n\t\t},\n\t\tgetIconClasses() {\n\t\t\treturn (isActive, icon) => {\n\t\t\t\tconst classes = {\n\t\t\t\t\t'is-active': icon.isActive(isActive)\n\t\t\t\t}\n\t\t\t\tclasses[icon.class] = true\n\t\t\t\treturn classes\n\t\t\t}\n\t\t},\n\t\tisChildMenuVisible() {\n\t\t\treturn (icon) => {\n\t\t\t\treturn this.submenuVisibility.hasOwnProperty(icon.label) ? this.submenuVisibility[icon.label] : false\n\t\t\t}\n\t\t},\n\t\tallIcons() {\n\t\t\tif (this.isPublic) {\n\t\t\t\treturn this.icons\n\t\t\t}\n\t\t\treturn [...this.icons, {\n\t\t\t\tlabel: t('text', 'Insert image'),\n\t\t\t\tclass: 'icon-image',\n\t\t\t\tisActive: () => {\n\t\t\t\t},\n\t\t\t\taction: (commands) => {\n\t\t\t\t\tthis.showImagePrompt(commands.image)\n\t\t\t\t}\n\t\t\t}]\n\t\t},\n\t\tchildPopoverMenu() {\n\t\t\treturn (isActive, commands, icons, parent) => {\n\t\t\t\tconst popoverMenuItems = []\n\t\t\t\tfor (const index in icons) {\n\t\t\t\t\tpopoverMenuItems.push({\n\t\t\t\t\t\ttext: icons[index].label,\n\t\t\t\t\t\ticon: icons[index].class,\n\t\t\t\t\t\taction: () => {\n\t\t\t\t\t\t\ticons[index].action(commands)\n\t\t\t\t\t\t\tthis.hideChildMenu(parent)\n\t\t\t\t\t\t},\n\t\t\t\t\t\tactive: icons[index].isActive(isActive)\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t\treturn popoverMenuItems\n\t\t\t}\n\t\t},\n\t\tchildIconClass() {\n\t\t\treturn (isActive, icons) => {\n\t\t\t\tfor (const index in icons) {\n\t\t\t\t\tconst icon = icons[index]\n\t\t\t\t\tif (icon.isActive(isActive)) {\n\t\t\t\t\t\treturn icon.class\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn 'icon-h1'\n\t\t\t}\n\t\t},\n\t\ticonCount() {\n\t\t\tthis.forceRecompute // eslint-disable-line\n\t\t\tthis.windowWidth // eslint-disable-line\n\t\t\tconst menuBarWidth = this.$refs.menubar && this.$refs.menubar.clientWidth > 100 ? this.$refs.menubar.clientWidth : this.windowWidth - 200\n\t\t\tconst iconCount = Math.max((Math.floor(menuBarWidth / 44) - 2), 0)\n\t\t\treturn iconCount\n\t\t}\n\t},\n\tbeforeMount() {\n\t\tthis.redrawMenuBar()\n\t},\n\tmounted() {\n\t\twindow.addEventListener('resize', this.getWindowWidth)\n\t},\n\tbeforeDestroy() {\n\t\twindow.removeEventListener('resize', this.getWindowWidth)\n\t},\n\tmethods: {\n\t\tredrawMenuBar() {\n\t\t\tthis.$nextTick(() => {\n\t\t\t\tthis.getWindowWidth()\n\t\t\t\tthis.forceRecompute++\n\t\t\t})\n\t\t},\n\t\tclickIcon(commands, icon) {\n\t\t\treturn icon.action(commands)\n\t\t},\n\t\tgetWindowWidth(event) {\n\t\t\tthis.windowWidth = document.documentElement.clientWidth\n\t\t},\n\t\tgetWindowHeight(event) {\n\t\t\tthis.windowHeight = document.documentElement.clientHeight\n\t\t},\n\t\thideChildMenu(icon) {\n\t\t\tthis.$set(this.submenuVisibility, icon.label, false)\n\t\t},\n\t\ttoggleChildMenu(icon) {\n\t\t\tconst lastValue = this.submenuVisibility.hasOwnProperty(icon.label) ? this.submenuVisibility[icon.label] : false\n\t\t\tthis.$set(this.submenuVisibility, icon.label, !lastValue)\n\t\t},\n\t\tshowImagePrompt(command) {\n\t\t\tconst currentUser = OC.getCurrentUser()\n\t\t\tif (!currentUser) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst _command = command\n\t\t\tOC.dialogs.filepicker('Insert an image', (file) => {\n\t\t\t\tfetchFileInfo(currentUser.uid, file).then((info) => {\n\t\t\t\t\tconst fileInfo = info[0]\n\t\t\t\t\tconsole.debug(fileInfo)\n\t\t\t\t\tconst previewUrl = OC.generateUrl('/core/preview?') + `fileId=${fileInfo.id}&x=1024&y=1024&a=true`\n\t\t\t\t\tconst internalLink = OC.generateUrl('/f/' + fileInfo.id)\n\n\t\t\t\t\t// dirty but works so we have the information stored in markdown\n\t\t\t\t\tconst appendMeta = {\n\t\t\t\t\t\tmimetype: fileInfo.mimetype,\n\t\t\t\t\t\thasPreview: fileInfo.hasPreview,\n\t\t\t\t\t\tfileId: fileInfo.id\n\t\t\t\t\t}\n\t\t\t\t\tconst src = (fileInfo.hasPreview ? previewUrl : internalLink)\n\t\t\t\t\t\t+ '#'\n\t\t\t\t\t\t+ Object.entries(appendMeta).map(([key, val]) => `${key}=${encodeURIComponent(val)}`).join('&')\n\n\t\t\t\t\t_command({\n\t\t\t\t\t\tsrc: src,\n\t\t\t\t\t\talt: fileInfo.name\n\t\t\t\t\t})\n\t\t\t\t})\n\t\t\t}, false, [], true)\n\t\t}\n\t}\n}\n</script>\n\n<style scoped lang=\"scss\">\n\t.menubar {\n\t\tposition: fixed;\n\t\tposition: -webkit-sticky;\n\t\tposition: sticky;\n\t\ttop: 0;\n\t\tdisplay: flex;\n\t\tz-index: 10010; // above modal-header so buttons are clickable\n\t\tbackground-color: var(--color-main-background-translucent);\n\t\theight: 44px;\n\n\t\t&.autohide {\n\t\t\tvisibility: hidden;\n\t\t\topacity: 0;\n\t\t\ttransition: visibility 0.2s 0.4s, opacity 0.2s 0.4s;\n\t\t\t&.is-focused {\n\t\t\t\tvisibility: visible;\n\t\t\t\topacity: 1;\n\t\t\t}\n\t\t}\n\t\t.menubar-icons {\n\t\t\tflex-grow: 1;\n\t\t\tmargin-left: calc((100% - 660px) / 2);\n\t\t}\n\t\t@media (max-width: 660px) {\n\t\t\t.menubar-icons {\n\t\t\t\tmargin-left: 0;\n\t\t\t}\n\t\t}\n\t}\n\n\t.menubar button {\n\t\twidth: 44px;\n\t\theight: 44px;\n\t\tmargin: 0;\n\t\tbackground-size: 16px;\n\t\tborder: 0;\n\t\tbackground-color: transparent;\n\t\topacity: .5;\n\t\tcolor: var(--color-main-text);\n\t\tbackground-position: center center;\n\t\tvertical-align: top;\n\t\t&:hover, &:focus, &:active {\n\t\t\tbackground-color: var(--color-background-dark);\n\t\t}\n\t\t&.is-active,\n\t\t&:hover,\n\t\t&:focus {\n\t\t\topacity: 1;\n\t\t}\n\n\t\t&.icon-undo, &.icon-redo {\n\t\t\topacity: .4;\n\t\t}\n\t}\n\n\t.menubar .submenu {\n\t\tdisplay: inline-block;\n\t\twidth: 44px;\n\t\theight: 44px;\n\t\tposition: relative;\n\t\tvertical-align: top;\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!./MenuBar.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!./MenuBar.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./MenuBar.vue?vue&type=template&id=432e474a&scoped=true&\"\nimport script from \"./MenuBar.vue?vue&type=script&lang=js&\"\nexport * from \"./MenuBar.vue?vue&type=script&lang=js&\"\nimport style0 from \"./MenuBar.vue?vue&type=style&index=0&id=432e474a&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  \"432e474a\",\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 _c('EditorMenuBubble',{staticClass:\"menububble\",attrs:{\"editor\":_vm.editor},on:{\"hide\":_vm.hideLinkMenu},scopedSlots:_vm._u([{key:\"default\",fn:function(ref){\nvar commands = ref.commands;\nvar isActive = ref.isActive;\nvar getMarkAttrs = ref.getMarkAttrs;\nvar menu = ref.menu;\nreturn [_c('div',{staticClass:\"menububble\",class:{ 'is-active': menu.isActive },style:((\"left: \" + (menu.left) + \"px; bottom: \" + (menu.bottom) + \"px;\"))},[(_vm.linkMenuIsActive)?_c('form',{staticClass:\"menububble__form\",on:{\"submit\":function($event){$event.preventDefault();return _vm.setLinkUrl(commands.link, _vm.linkUrl)}}},[_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($event)},\"input\":function($event){if($event.target.composing){ return; }_vm.linkUrl=$event.target.value}}}),_vm._v(\" \"),_c('button',{staticClass:\"menububble__button icon-confirm\",attrs:{\"type\":\"button\"},on:{\"click\":function($event){return _vm.setLinkUrl(commands.link, _vm.linkUrl)}}})]):[_c('button',{staticClass:\"menububble__button\",class:{ 'is-active': isActive.link() },on:{\"click\":function($event){_vm.showLinkMenu(getMarkAttrs('link'))}}},[_c('span',{directives:[{name:\"tooltip\",rawName:\"v-tooltip\",value:(isActive.link() ? 'Update Link' : 'Add Link'),expression:\"isActive.link() ? 'Update Link' : 'Add Link'\"}],staticClass:\"icon-link\"}),_vm._v(\" \"),_c('span',[_vm._v(_vm._s(_vm.t('text', 'Add link')))])])]],2)]}}])})}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","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  - @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<EditorMenuBubble v-slot=\"{ commands, isActive, getMarkAttrs, menu }\"\n\t\tclass=\"menububble\"\n\t\t:editor=\"editor\"\n\t\t@hide=\"hideLinkMenu\">\n\t\t<div class=\"menububble\" :class=\"{ 'is-active': menu.isActive }\" :style=\"`left: ${menu.left}px; bottom: ${menu.bottom}px;`\">\n\t\t\t<form v-if=\"linkMenuIsActive\" class=\"menububble__form\" @submit.prevent=\"setLinkUrl(commands.link, linkUrl)\">\n\t\t\t\t<input ref=\"linkInput\"\n\t\t\t\t\tv-model=\"linkUrl\"\n\t\t\t\t\tclass=\"menububble__input\"\n\t\t\t\t\ttype=\"text\"\n\t\t\t\t\tplaceholder=\"https://\"\n\t\t\t\t\t@keydown.esc=\"hideLinkMenu\">\n\t\t\t\t<button class=\"menububble__button icon-confirm\" type=\"button\" @click=\"setLinkUrl(commands.link, linkUrl)\" />\n\t\t\t</form>\n\n\t\t\t<template v-else>\n\t\t\t\t<button\n\t\t\t\t\tclass=\"menububble__button\"\n\t\t\t\t\t:class=\"{ 'is-active': isActive.link() }\"\n\t\t\t\t\t@click=\"showLinkMenu(getMarkAttrs('link'))\">\n\t\t\t\t\t<span v-tooltip=\"isActive.link() ? 'Update Link' : 'Add Link'\" class=\"icon-link\" />\n\t\t\t\t\t<span>{{ t('text', 'Add link') }}</span>\n\t\t\t\t</button>\n\t\t\t</template>\n\t\t</div>\n\t</EditorMenuBubble>\n</template>\n\n<script>\nimport { EditorMenuBubble } from 'tiptap'\nimport Tooltip from 'nextcloud-vue/dist/Directives/Tooltip'\n\nexport default {\n\tname: 'MenuBubble',\n\tcomponents: {\n\t\tEditorMenuBubble\n\t},\n\tdirectives: {\n\t\ttooltip: Tooltip\n\t},\n\tprops: {\n\t\teditor: {\n\t\t\ttype: Object,\n\t\t\trequired: false,\n\t\t\tdefault: null\n\t\t}\n\t},\n\tdata: () => {\n\t\treturn {\n\t\t\tlinkUrl: null,\n\t\t\tlinkMenuIsActive: false\n\t\t}\n\t},\n\tmethods: {\n\t\tshowLinkMenu(attrs) {\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\n\t\tsetLinkUrl(command, url) {\n\t\t\tif (url && !url.match(/^[a-zA-Z]+:\\/\\//) && !url.match(/^\\//)) {\n\t\t\t\turl = 'https://' + url\n\t\t\t}\n\t\t\tcommand({ href: url })\n\t\t\tthis.hideLinkMenu()\n\t\t}\n\t}\n}\n</script>\n\n<style scoped lang=\"scss\">\n\t.menububble {\n\t\tposition: absolute;\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: 5px;\n\t\tpadding: 0.3rem;\n\t\tmargin-bottom: 0.5rem;\n\t\tvisibility: hidden;\n\t\topacity: 0;\n\t\ttransform: translateX(-50%);\n\t\ttransition: opacity 0.2s, visibility 0.2s;\n\n\t\t&.is-active {\n\t\t\topacity: 1;\n\t\t\tvisibility: visible;\n\t\t}\n\n\t\t&__button {\n\t\t\tdisplay: inline-flex;\n\t\t\tborder: 0;\n\t\t\tpadding: 0.2rem 0.5rem;\n\t\t\tmargin-right: 0.2rem;\n\t\t\tborder-radius: 3px;\n\t\t\tcursor: pointer;\n\n\t\t\t&:last-child {\n\t\t\t\tmargin-right: 0;\n\t\t\t}\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: 150px;\n\t\t}\n\t}\n</style>\n","import { render, staticRenderFns } from \"./MenuBubble.vue?vue&type=template&id=7735676e&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=7735676e&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  \"7735676e\",\n  null\n  \n)\n\nexport default component.exports"],"sourceRoot":""}