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 25b3c12bb..fb3ea8ec2 100644
--- a/js/editor-rich.js.map
+++ b/js/editor-rich.js.map
@@ -1 +1 @@
-{"version":3,"sources":["webpack:///./src/helpers/mime.js","webpack:///./src/views/RichWorkspace.vue?b9fc","webpack:///./src/views/RichWorkspace.vue?7bcd","webpack:///./src/views/RichWorkspace.vue?29dd","webpack:///src/views/RichWorkspace.vue","webpack:///./src/views/RichWorkspace.vue?d0bc","webpack:///./src/views/RichWorkspace.vue","webpack:///./src/views/RichWorkspace.vue?a835","webpack:///./src/helpers/files.js","webpack:///./src/components/MenuBar.vue?e364","webpack:///./src/components/MenuBubble.vue?72b9","webpack:///./src/components/MenuBar.vue?595a","webpack:///./src/components/MenuBar.vue?fd2e","webpack:///./src/components/MenuBubble.vue?f5d6","webpack:///./src/components/MenuBubble.vue?cdbd","webpack:///./src/components/MenuBar.vue?0921","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?c3b0","webpack:///./src/components/MenuBubble.vue?7a05","webpack:///src/components/MenuBubble.vue","webpack:///./src/components/MenuBubble.vue"],"names":["openMimetypesMarkdown","openMimetypesPlainText","openMimetypes","exports","___CSS_LOADER_API_IMPORT___","push","module","i","content","locals","add","default","_vm","this","_h","$createElement","_c","_self","class","loaded","ready","focus","attrs","file","autofocus","staticClass","on","createNew","_v","_s","t","_e","directives","name","rawName","value","expression","key","id","path","shareToken","mimetype","$event","reset","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","bullet_list_item","ordered_list","todo_item","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,sBACA,8BACA,uBACA,yBACA,mBACA,qBACA,oBACA,oBACA,kBACA,mBACA,WACA,WACA,YACA,WACA,gBACA,WACA,qBACA,cACA,gBACA,sBAGKC,EAAgB,GAAH,OAAOF,EAA0BC,I,iCCnDpD,mBAAuU,G,qBCEvUE,EADkC,EAAQ,GAChCC,EAA4B,IAE9BC,KAAK,CAACC,EAAOC,EAAI,w0DAAy0D,KAEl2DD,EAAOH,QAAUA,G,mBCHjB,IAAIK,EAAU,EAAQ,KACA,iBAAZA,IAAsBA,EAAU,CAAC,CAACF,EAAOC,EAAIC,EAAS,MAC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,MAAO,aACPsH,SAAU,SAACA,GAAD,OAAcA,EAASiB,cACjChB,OAAQ,SAACC,GACR,OAAOA,EAAQe,eAGjB,CACClB,MAAOzG,EAAE,OAAQ,cACjBZ,MAAO,YACPsH,SAAU,SAACA,GAAD,OAAcA,EAASkB,cACjCjB,OAAQ,SAACC,GACR,OAAOA,EAAQgB,gB,25BCxElB,ICpFuL,EDoFvL,CACA,eACA,YACA,kBACA,iBACA,gBACA,aAEA,YACA,YACA,kBAEA,OACA,QACA,YACA,YACA,cAEA,cACA,aACA,YAEA,UACA,aACA,YAEA,UACA,aACA,aAGA,gBACA,OACA,cACA,eACA,iBACA,qBACA,aAGA,UACA,eADA,WACA,WACA,6CAEA,eAJA,WAKA,qBACA,OACA,2BAGA,OADA,cACA,IAGA,mBAbA,WAaA,WACA,mBACA,oFAGA,SAlBA,WAkBA,WACA,qBACA,WAEA,0BACA,+BACA,mBACA,sBAEA,mBACA,gCAIA,iBAhCA,WAgCA,WACA,yBACA,SADA,WAEA,GACA,QACA,gBACA,gBACA,kBACA,eACA,oBAEA,2BARA,oBAWA,WAGA,eAjDA,WAkDA,qBACA,gBACA,WACA,iBACA,eAGA,kBAGA,UA5DA,WA6DA,oBACA,iBACA,gGACA,iCACA,WAGA,QA5GA,WA4GA,WACA,sDACA,2CACA,qDACA,mBACA,kBAEA,oBACA,iCAEA,MAEA,cAxHA,WAyHA,0DAEA,SACA,cADA,WACA,WACA,2BACA,mBACA,uBAGA,UAPA,SAOA,KACA,oBAEA,eAVA,SAUA,GACA,uDAEA,gBAbA,SAaA,GACA,yDAEA,cAhBA,SAgBA,GACA,8CAEA,gBAnBA,SAmBA,GACA,wFACA,8CAEA,gBAvBA,SAuBA,GACA,0BACA,MAGA,QACA,qDACA,uCACA,WACA,iBACA,sFACA,6BAGA,GACA,oBACA,wBACA,aAEA,qBACA,IACA,gIAEA,GACA,MACA,mBAGA,a,iBE1PIC,EAAY,YACd,GJTW,WAAa,IAAI/I,EAAIC,KAASC,EAA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C,YAAqBpL,EAAI6K,QAAQ/I,EAAOqJ,OAAO5J,WAAUvB,EAAIgB,GAAG,KAAKZ,EAAG,SAAS,CAACS,YAAY,kCAAkCH,MAAM,CAAC,KAAO,UAAUI,GAAG,CAAC,MAAQ,SAASgB,GAAQ,OAAO9B,EAAI2K,WAAWtB,EAASuB,KAAM5K,EAAI6K,eAAe,CAACzK,EAAG,SAAS,CAACS,YAAY,qBAAqBP,MAAM,CAAE,YAAasH,EAASgD,QAAS9J,GAAG,CAAC,MAAQ,SAASgB,GAAQ9B,EAAIqL,aAAaZ,EAAa,YAAY,CAACrK,EAAG,OAAO,CAACgB,WAAW,CAAC,CAACC,KAAK,UAAUC,QAAQ,YAAYC,MAAOqG,EAASgD,OAAS,cAAgB,WAAYpJ,WAAW,iDAAiDX,YAAY,cAAcb,EAAIgB,GAAG,KAAKZ,EAAG,OAAO,CAACS,YAAY,0BAA0B,CAACb,EAAIgB,GAAGhB,EAAIiB,GAAGjB,EAAIkB,EAAE,OAAQ,oBAAoB,YAC36C,IGMpB,EACA,KACA,WACA,MAIa,UAAA6H,E","file":"editor-rich.js?v=cba2a8d4ef3b96fb5ca5","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\nconst openMimetypesMarkdown = [\n\t'text/markdown',\n]\n\nconst openMimetypesPlainText = [\n\t'text/plain',\n\t'application/cmd',\n\t'application/x-empty',\n\t'application/x-msdos-program',\n\t'application/epub+zip',\n\t'application/javascript',\n\t'application/json',\n\t'application/x-perl',\n\t'application/x-php',\n\t'application/x-tex',\n\t'application/xml',\n\t'application/yaml',\n\t'text/css',\n\t'text/csv',\n\t'text/html',\n\t'text/x-c',\n\t'text/x-c++src',\n\t'text/x-h',\n\t'text/x-java-source',\n\t'text/x-ldif',\n\t'text/x-python',\n\t'text/x-shellscript',\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=58b6d2a2&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=58b6d2a2&scoped=true&lang=css&\"","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \"\\n#rich-workspace[data-v-58b6d2a2] {\\n\\tpadding: 0 60px;\\n\\tmin-height: 90px;\\n\\t/* Slightly reduce vertical space */\\n\\tmargin-bottom: -24px;\\n\\ttext-align: left;\\n}\\n\\n/* For subfolders, where there are no Recommendations */\\n#rich-workspace[data-v-58b6d2a2]:only-child {\\n\\tmargin-bottom: 0;\\n}\\n.empty-workspace[data-v-58b6d2a2] {\\n\\tpadding-top: 43px;\\n\\tcolor: var(--color-text-maxcontrast);\\n\\theight: 0;\\n}\\n#rich-workspace[data-v-58b6d2a2] 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-58b6d2a2] #editor-container {\\n\\theight: 100%;\\n\\tposition: unset !important;\\n}\\n#rich-workspace[data-v-58b6d2a2] #editor-wrapper {\\n\\tposition: unset !important;\\n\\toverflow: visible;\\n}\\n#rich-workspace[data-v-58b6d2a2] #editor {\\n\\tpadding-bottom: 80px;\\n\\toverflow: scroll !important;\\n\\theight: 50vh;\\n}\\n#rich-workspace[data-v-58b6d2a2] #editor-wrapper .ProseMirror {\\n\\tpadding: 0px;\\n\\tmargin: 0;\\n}\\n#rich-workspace[data-v-58b6d2a2] .menubar {\\n\\tz-index: 90;\\n\\t/* Slightly reduce vertical space */\\n\\tmargin-bottom: -10px;\\n}\\n#rich-workspace[data-v-58b6d2a2] .menubar .menubar-icons {\\n\\tmargin-left: 0;\\n}\\n#rich-workspace[data-v-58b6d2a2] .editor__content {\\n\\tmargin: 0;\\n}\\n#rich-workspace[data-v-58b6d2a2]:not(.focus) {\\n\\tmax-height: 30vh;\\n\\tposition: relative;\\n\\toverflow: hidden;\\n}\\n#rich-workspace[data-v-58b6d2a2]: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(0,0,0, 0), var(--color-main-background));\\n\\twidth: 100%;\\n\\theight: 4em;\\n}\\n@media only screen and (max-width: 1024px) {\\n#rich-workspace[data-v-58b6d2a2]:not(.focus) {\\n\\t\\tmax-height: 30vh;\\n}\\n}\\n\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\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/vue-loader/lib/index.js??vue-loader-options!./RichWorkspace.vue?vue&type=style&index=0&id=58b6d2a2&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(\"0bcf594a\", 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 v-if=\"enabled\" id=\"rich-workspace\" :class=\"{'icon-loading': !loaded || !ready, 'focus': focus }\">\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\t\t@focus=\"focus=true\"\n\t\t\t@blur=\"focus=false\"\n\t\t\t@error=\"reset\" />\n\t</div>\n</template>\n\n<script>\nimport axios from '@nextcloud/axios'\nimport { generateOcsUrl } from '@nextcloud/router'\nimport { subscribe } from '@nextcloud/event-bus'\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\tfocus: false,\n\t\t\tfile: null,\n\t\t\tloaded: false,\n\t\t\tready: false,\n\t\t\tautofocus: false,\n\t\t\tenabled: OCA.Text.RichWorkspaceEnabled,\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\tif (this.enabled) {\n\t\t\tthis.getFileInfo()\n\t\t}\n\t\tsubscribe('Text::showRichWorkspace', () => {\n\t\t\tthis.enabled = true\n\t\t\tthis.getFileInfo()\n\t\t})\n\t\tsubscribe('Text::hideRichWorkspace', () => {\n\t\t\tthis.enabled = false\n\t\t})\n\t},\n\tmethods: {\n\t\treset() {\n\t\t\tthis.file = null\n\t\t\tthis.$nextTick(() => {\n\t\t\t\tthis.getFileInfo()\n\t\t\t})\n\t\t},\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\t/* Slightly reduce vertical space */\n\t\tmargin-bottom: -24px;\n\t\ttext-align: left;\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 #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\toverflow: visible;\n\t}\n\n\t#rich-workspace::v-deep #editor {\n\t\tpadding-bottom: 80px;\n\t\toverflow: scroll !important;\n\t\theight: 50vh;\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 {\n\t\tz-index: 90;\n\t\t/* Slightly reduce vertical space */\n\t\tmargin-bottom: -10px;\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\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(0,0,0, 0), var(--color-main-background));\n\t\twidth: 100%;\n\t\theight: 4em;\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</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=58b6d2a2&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=58b6d2a2&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 \"58b6d2a2\",\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 },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},\"focus\":function($event){_vm.focus=true},\"blur\":function($event){_vm.focus=false},\"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\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/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\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\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","// 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=59502d77&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(\"1aba18fd\", 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=b3f47288&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(\"77931eb0\", content, true, {});","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=59502d77&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=59502d77&scoped=true&lang=scss&\"","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \".menubar[data-v-59502d77]{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-59502d77]{visibility:hidden;opacity:0;transition:visibility 0.2s 0.4s, opacity 0.2s 0.4s}.menubar.autohide.is-focused[data-v-59502d77]{visibility:visible;opacity:1}.menubar .menubar-icons[data-v-59502d77]{flex-grow:1;margin-left:calc((100% - 660px) / 2)}@media (max-width: 660px){.menubar .menubar-icons[data-v-59502d77]{margin-left:0}}.menubar[data-v-59502d77] .action-item__menu ul{max-height:calc(100vh - 88px);overflow:scroll}.menubar button[data-v-59502d77]{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-59502d77]:hover,.menubar button[data-v-59502d77]:focus,.menubar button[data-v-59502d77]:active{background-color:var(--color-background-dark)}.menubar button.is-active[data-v-59502d77],.menubar button[data-v-59502d77]:hover,.menubar button[data-v-59502d77]:focus{opacity:1}.menubar button.icon-undo[data-v-59502d77],.menubar button.icon-redo[data-v-59502d77]{opacity:.4}.menubar .submenu[data-v-59502d77]{display:inline-block;width:44px;height:44px;position:relative;vertical-align:top}\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\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=b3f47288&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=b3f47288&scoped=true&lang=scss&\"","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \".menububble[data-v-b3f47288]{position:absolute;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);padding:0;margin-bottom:0.4rem;visibility:hidden;opacity:0;transform:translateX(-50%);transition:opacity 0.2s, visibility 0.2s}.menububble.is-active[data-v-b3f47288]{opacity:1;visibility:visible}.menububble__button[data-v-b3f47288]{display:block;border:0;padding:0.3rem 0.7rem;margin:0;margin-right:0.2rem;border-radius:var(--border-radius);cursor:pointer}.menububble__button[data-v-b3f47288]:last-child{margin-right:0}.menububble__buttontext[data-v-b3f47288]{padding:0.4rem;padding-right:0}.menububble__form[data-v-b3f47288]{display:flex;align-items:center}.menububble__input[data-v-b3f47288]{font:inherit;border:none;background:transparent;min-width:150px}\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\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_item()\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', 'ToDo list'),\n\t\tclass: 'icon-checkmark',\n\t\tisActive: (isActive) => false,\n\t\taction: (command) => command.todo_item(),\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\tisPublic: {\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\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 > 200 ? this.$refs.menubar.clientWidth : 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\tmounted() {\n\t\twindow.addEventListener('resize', this.getWindowWidth)\n\t\tthis.checkInterval = setInterval(() => {\n\t\t\tconst isWidthAvailable = (this.$refs.menubar && this.$refs.menubar.clientWidth > 0)\n\t\t\tif (this.isRichEditor && isWidthAvailable) {\n\t\t\t\tthis.redrawMenuBar()\n\t\t\t}\n\t\t\tif (!this.isRichEditor || isWidthAvailable) {\n\t\t\t\tclearInterval(this.checkInterval)\n\t\t\t}\n\t\t}, 100)\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\t&::v-deep .action-item__menu ul {\n\t\t\tmax-height: calc(100vh - 88px);\n\t\t\toverflow: scroll;\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=59502d77&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=59502d77&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 \"59502d77\",\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',{staticClass:\"menububble__buttontext\"},[_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 class=\"menububble__buttontext\">{{ 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: var(--border-radius);\n\t\tpadding: 0;\n\t\tmargin-bottom: 0.4rem;\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: block;\n\t\t\tborder: 0;\n\t\t\tpadding: 0.3rem 0.7rem;\n\t\t\tmargin: 0;\n\t\t\tmargin-right: 0.2rem;\n\t\t\tborder-radius: var(--border-radius);\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&__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: 150px;\n\t\t}\n\t}\n</style>\n","import { render, staticRenderFns } from \"./MenuBubble.vue?vue&type=template&id=b3f47288&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=b3f47288&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 \"b3f47288\",\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""} \ No newline at end of file
+{"version":3,"sources":["webpack:///./src/helpers/mime.js","webpack:///./src/views/RichWorkspace.vue?fa4f","webpack:///./src/views/RichWorkspace.vue?77df","webpack:///./src/views/RichWorkspace.vue?1b42","webpack:///src/views/RichWorkspace.vue","webpack:///./src/views/RichWorkspace.vue?d0bc","webpack:///./src/views/RichWorkspace.vue","webpack:///./src/views/RichWorkspace.vue?c2ed","webpack:///./src/helpers/files.js","webpack:///./src/components/MenuBar.vue?e364","webpack:///./src/components/MenuBubble.vue?72b9","webpack:///./src/components/MenuBar.vue?595a","webpack:///./src/components/MenuBar.vue?fd2e","webpack:///./src/components/MenuBubble.vue?f5d6","webpack:///./src/components/MenuBubble.vue?cdbd","webpack:///./src/components/MenuBar.vue?0921","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?c3b0","webpack:///./src/components/MenuBubble.vue?7a05","webpack:///src/components/MenuBubble.vue","webpack:///./src/components/MenuBubble.vue"],"names":["openMimetypesMarkdown","openMimetypesPlainText","openMimetypes","exports","___CSS_LOADER_API_IMPORT___","push","module","i","content","locals","add","default","_vm","this","_h","$createElement","_c","_self","class","loaded","ready","focus","darkTheme","attrs","file","autofocus","staticClass","on","createNew","_v","_s","t","_e","directives","name","rawName","value","expression","key","id","path","shareToken","mimetype","$event","reset","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","bullet_list_item","ordered_list","todo_item","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,sBACA,8BACA,uBACA,yBACA,mBACA,qBACA,oBACA,oBACA,kBACA,mBACA,WACA,WACA,YACA,WACA,gBACA,WACA,qBACA,cACA,gBACA,sBAGKC,EAAgB,GAAH,OAAOF,EAA0BC,I,iCCnDpD,mBAAuU,G,qBCEvUE,EADkC,EAAQ,GAChCC,EAA4B,IAE9BC,KAAK,CAACC,EAAOC,EAAI,kgEAAmgE,KAE5hED,EAAOH,QAAU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aACjBb,MAAO,iBACPuH,SAAU,SAACA,GAAD,OAAc,GACxBC,OAAQ,SAACC,GAAD,OAAaA,EAAQc,cAE9B,CACCjB,MAAOzG,EAAE,OAAQ,cACjBb,MAAO,aACPuH,SAAU,SAACA,GAAD,OAAcA,EAASiB,cACjChB,OAAQ,SAACC,GACR,OAAOA,EAAQe,eAGjB,CACClB,MAAOzG,EAAE,OAAQ,cACjBb,MAAO,YACPuH,SAAU,SAACA,GAAD,OAAcA,EAASkB,cACjCjB,OAAQ,SAACC,GACR,OAAOA,EAAQgB,gB,25BCxElB,ICpFuL,EDoFvL,CACA,eACA,YACA,kBACA,iBACA,gBACA,aAEA,YACA,YACA,kBAEA,OACA,QACA,YACA,YACA,cAEA,cACA,aACA,YAEA,UACA,aACA,YAEA,UACA,aACA,aAGA,gBACA,OACA,cACA,eACA,iBACA,qBACA,aAGA,UACA,eADA,WACA,WACA,6CAEA,eAJA,WAKA,qBACA,OACA,2BAGA,OADA,cACA,IAGA,mBAbA,WAaA,WACA,mBACA,oFAGA,SAlBA,WAkBA,WACA,qBACA,WAEA,0BACA,+BACA,mBACA,sBAEA,mBACA,gCAIA,iBAhCA,WAgCA,WACA,yBACA,SADA,WAEA,GACA,QACA,gBACA,gBACA,kBACA,eACA,oBAEA,2BARA,oBAWA,WAGA,eAjDA,WAkDA,qBACA,gBACA,WACA,iBACA,eAGA,kBAGA,UA5DA,WA6DA,oBACA,iBACA,gGACA,iCACA,WAGA,QA5GA,WA4GA,WACA,sDACA,2CACA,qDACA,mBACA,kBAEA,oBACA,iCAEA,MAEA,cAxHA,WAyHA,0DAEA,SACA,cADA,WACA,WACA,2BACA,mBACA,uBAGA,UAPA,SAOA,KACA,oBAEA,eAVA,SAUA,GACA,uDAEA,gBAbA,SAaA,GACA,yDAEA,cAhBA,SAgBA,GACA,8CAEA,gBAnBA,SAmBA,GACA,wFACA,8CAEA,gBAvBA,SAuBA,GACA,0BACA,MAGA,QACA,qDACA,uCACA,WACA,iBACA,sFAC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J,QAAQ,MAAM,GAAGpJ,EAAOL,IAAI,CAAC,MAAM,WAAoB,KAAc1B,EAAIyK,aAAa1I,IAAS,MAAQ,SAASA,GAAWA,EAAOqJ,OAAOC,YAAqBrL,EAAI8K,QAAQ/I,EAAOqJ,OAAO5J,WAAUxB,EAAIiB,GAAG,KAAKb,EAAG,SAAS,CAACU,YAAY,kCAAkCH,MAAM,CAAC,KAAO,UAAUI,GAAG,CAAC,MAAQ,SAASgB,GAAQ,OAAO/B,EAAI4K,WAAWtB,EAASuB,KAAM7K,EAAI8K,eAAe,CAAC1K,EAAG,SAAS,CAACU,YAAY,qBAAqBR,MAAM,CAAE,YAAauH,EAASgD,QAAS9J,GAAG,CAAC,MAAQ,SAASgB,GAAQ/B,EAAIsL,aAAaZ,EAAa,YAAY,CAACtK,EAAG,OAAO,CAACiB,WAAW,CAAC,CAACC,KAAK,UAAUC,QAAQ,YAAYC,MAAOqG,EAASgD,OAAS,cAAgB,WAAYpJ,WAAW,iDAAiDX,YAAY,cAAcd,EAAIiB,GAAG,KAAKb,EAAG,OAAO,CAACU,YAAY,0BAA0B,CAACd,EAAIiB,GAAGjB,EAAIkB,GAAGlB,EAAImB,EAAE,OAAQ,oBAAoB,YAC36C,IGMpB,EACA,KACA,WACA,MAIa,UAAA6H,E","file":"editor-rich.js?v=85d3787d07d79cb80abf","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\nconst openMimetypesMarkdown = [\n\t'text/markdown',\n]\n\nconst openMimetypesPlainText = [\n\t'text/plain',\n\t'application/cmd',\n\t'application/x-empty',\n\t'application/x-msdos-program',\n\t'application/epub+zip',\n\t'application/javascript',\n\t'application/json',\n\t'application/x-perl',\n\t'application/x-php',\n\t'application/x-tex',\n\t'application/xml',\n\t'application/yaml',\n\t'text/css',\n\t'text/csv',\n\t'text/html',\n\t'text/x-c',\n\t'text/x-c++src',\n\t'text/x-h',\n\t'text/x-java-source',\n\t'text/x-ldif',\n\t'text/x-python',\n\t'text/x-shellscript',\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=6213c251&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=6213c251&scoped=true&lang=css&\"","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \"\\n#rich-workspace[data-v-6213c251] {\\n\\tpadding: 0 60px;\\n\\tmin-height: 90px;\\n\\t/* Slightly reduce vertical space */\\n\\tmargin-bottom: -24px;\\n\\ttext-align: left;\\n}\\n\\n/* For subfolders, where there are no Recommendations */\\n#rich-workspace[data-v-6213c251]:only-child {\\n\\tmargin-bottom: 0;\\n}\\n.empty-workspace[data-v-6213c251] {\\n\\tpadding-top: 43px;\\n\\tcolor: var(--color-text-maxcontrast);\\n\\theight: 0;\\n}\\n#rich-workspace[data-v-6213c251] 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-6213c251] #editor-container {\\n\\theight: 100%;\\n\\tposition: unset !important;\\n}\\n#rich-workspace[data-v-6213c251] #editor-wrapper {\\n\\tposition: unset !important;\\n\\toverflow: visible;\\n}\\n#rich-workspace[data-v-6213c251] #editor {\\n\\tpadding-bottom: 80px;\\n\\toverflow: scroll !important;\\n\\theight: 50vh;\\n}\\n#rich-workspace[data-v-6213c251] #editor-wrapper .ProseMirror {\\n\\tpadding: 0px;\\n\\tmargin: 0;\\n}\\n#rich-workspace[data-v-6213c251] .menubar {\\n\\tz-index: 90;\\n\\t/* Slightly reduce vertical space */\\n\\tmargin-bottom: -10px;\\n}\\n#rich-workspace[data-v-6213c251] .menubar .menubar-icons {\\n\\tmargin-left: 0;\\n}\\n#rich-workspace[data-v-6213c251] .editor__content {\\n\\tmargin: 0;\\n}\\n#rich-workspace[data-v-6213c251]:not(.focus) {\\n\\tmax-height: 30vh;\\n\\tposition: relative;\\n\\toverflow: hidden;\\n}\\n#rich-workspace[data-v-6213c251]: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#rich-workspace.dark[data-v-6213c251]:not(.focus):not(.icon-loading):after {\\n\\tbackground-image: linear-gradient(to bottom, rgba(0, 0, 0, 0), var(--color-main-background));\\n}\\n@media only screen and (max-width: 1024px) {\\n#rich-workspace[data-v-6213c251]:not(.focus) {\\n\\t\\tmax-height: 30vh;\\n}\\n}\\n\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\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/vue-loader/lib/index.js??vue-loader-options!./RichWorkspace.vue?vue&type=style&index=0&id=6213c251&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(\"3db19206\", 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 v-if=\"enabled\" id=\"rich-workspace\" :class=\"{'icon-loading': !loaded || !ready, 'focus': focus, 'dark': darkTheme }\">\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\t\t@focus=\"focus=true\"\n\t\t\t@blur=\"focus=false\"\n\t\t\t@error=\"reset\" />\n\t</div>\n</template>\n\n<script>\nimport axios from '@nextcloud/axios'\nimport { generateOcsUrl } from '@nextcloud/router'\nimport { subscribe } from '@nextcloud/event-bus'\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\tfocus: false,\n\t\t\tfile: null,\n\t\t\tloaded: false,\n\t\t\tready: false,\n\t\t\tautofocus: false,\n\t\t\tdarkTheme: 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') ? 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\tfocus: function(newValue) {\n\t\t\tif (!newValue) {\n\t\t\t\tdocument.querySelector('#editor').scrollTo(0, 0)\n\t\t\t}\n\t\t},\n\t},\n\tasync mounted() {\n\t\tif (this.enabled) {\n\t\t\tthis.getFileInfo()\n\t\t}\n\t\tsubscribe('Text::showRichWorkspace', () => {\n\t\t\tthis.enabled = true\n\t\t\tthis.getFileInfo()\n\t\t})\n\t\tsubscribe('Text::hideRichWorkspace', () => {\n\t\t\tthis.enabled = false\n\t\t})\n\t},\n\tmethods: {\n\t\treset() {\n\t\t\tthis.file = null\n\t\t\tthis.$nextTick(() => {\n\t\t\t\tthis.getFileInfo()\n\t\t\t})\n\t\t},\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\t/* Slightly reduce vertical space */\n\t\tmargin-bottom: -24px;\n\t\ttext-align: left;\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 #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\toverflow: visible;\n\t}\n\n\t#rich-workspace::v-deep #editor {\n\t\tpadding-bottom: 80px;\n\t\toverflow: scroll !important;\n\t\theight: 50vh;\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 {\n\t\tz-index: 90;\n\t\t/* Slightly reduce vertical space */\n\t\tmargin-bottom: -10px;\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\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</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=6213c251&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=6213c251&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 \"6213c251\",\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 },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},\"focus\":function($event){_vm.focus=true},\"blur\":function($event){_vm.focus=false},\"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\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/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\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\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","// 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=59502d77&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(\"1aba18fd\", 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=b3f47288&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(\"77931eb0\", content, true, {});","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=59502d77&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=59502d77&scoped=true&lang=scss&\"","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \".menubar[data-v-59502d77]{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-59502d77]{visibility:hidden;opacity:0;transition:visibility 0.2s 0.4s, opacity 0.2s 0.4s}.menubar.autohide.is-focused[data-v-59502d77]{visibility:visible;opacity:1}.menubar .menubar-icons[data-v-59502d77]{flex-grow:1;margin-left:calc((100% - 660px) / 2)}@media (max-width: 660px){.menubar .menubar-icons[data-v-59502d77]{margin-left:0}}.menubar[data-v-59502d77] .action-item__menu ul{max-height:calc(100vh - 88px);overflow:scroll}.menubar button[data-v-59502d77]{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-59502d77]:hover,.menubar button[data-v-59502d77]:focus,.menubar button[data-v-59502d77]:active{background-color:var(--color-background-dark)}.menubar button.is-active[data-v-59502d77],.menubar button[data-v-59502d77]:hover,.menubar button[data-v-59502d77]:focus{opacity:1}.menubar button.icon-undo[data-v-59502d77],.menubar button.icon-redo[data-v-59502d77]{opacity:.4}.menubar .submenu[data-v-59502d77]{display:inline-block;width:44px;height:44px;position:relative;vertical-align:top}\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\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=b3f47288&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=b3f47288&scoped=true&lang=scss&\"","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \".menububble[data-v-b3f47288]{position:absolute;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);padding:0;margin-bottom:0.4rem;visibility:hidden;opacity:0;transform:translateX(-50%);transition:opacity 0.2s, visibility 0.2s}.menububble.is-active[data-v-b3f47288]{opacity:1;visibility:visible}.menububble__button[data-v-b3f47288]{display:block;border:0;padding:0.3rem 0.7rem;margin:0;margin-right:0.2rem;border-radius:var(--border-radius);cursor:pointer}.menububble__button[data-v-b3f47288]:last-child{margin-right:0}.menububble__buttontext[data-v-b3f47288]{padding:0.4rem;padding-right:0}.menububble__form[data-v-b3f47288]{display:flex;align-items:center}.menububble__input[data-v-b3f47288]{font:inherit;border:none;background:transparent;min-width:150px}\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\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_item()\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', 'ToDo list'),\n\t\tclass: 'icon-checkmark',\n\t\tisActive: (isActive) => false,\n\t\taction: (command) => command.todo_item(),\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\tisPublic: {\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\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 > 200 ? this.$refs.menubar.clientWidth : 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\tmounted() {\n\t\twindow.addEventListener('resize', this.getWindowWidth)\n\t\tthis.checkInterval = setInterval(() => {\n\t\t\tconst isWidthAvailable = (this.$refs.menubar && this.$refs.menubar.clientWidth > 0)\n\t\t\tif (this.isRichEditor && isWidthAvailable) {\n\t\t\t\tthis.redrawMenuBar()\n\t\t\t}\n\t\t\tif (!this.isRichEditor || isWidthAvailable) {\n\t\t\t\tclearInterval(this.checkInterval)\n\t\t\t}\n\t\t}, 100)\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\t&::v-deep .action-item__menu ul {\n\t\t\tmax-height: calc(100vh - 88px);\n\t\t\toverflow: scroll;\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=59502d77&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=59502d77&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 \"59502d77\",\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',{staticClass:\"menububble__buttontext\"},[_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 class=\"menububble__buttontext\">{{ 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: var(--border-radius);\n\t\tpadding: 0;\n\t\tmargin-bottom: 0.4rem;\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: block;\n\t\t\tborder: 0;\n\t\t\tpadding: 0.3rem 0.7rem;\n\t\t\tmargin: 0;\n\t\t\tmargin-right: 0.2rem;\n\t\t\tborder-radius: var(--border-radius);\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&__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: 150px;\n\t\t}\n\t}\n</style>\n","import { render, staticRenderFns } from \"./MenuBubble.vue?vue&type=template&id=b3f47288&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=b3f47288&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 \"b3f47288\",\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""} \ No newline at end of file