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

editor-rich.js.map « js - github.com/nextcloud/text.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: f1ce342d2c7c15071ae745ec9fb3cec3597adcae (plain)
1
{"version":3,"sources":["webpack:///./src/helpers/mime.js","webpack:///./src/helpers/files.js","webpack:///./src/components/MenuBar.vue?60db","webpack:///./src/components/MenuBar.vue?9ed2","webpack:///./src/components/MenuBubble.vue?7e80","webpack:///./src/components/MenuBubble.vue?6f0f","webpack:///./src/components/MenuBar.vue?7e14","webpack:///./src/mixins/menubar.js","webpack:///src/components/MenuBar.vue","webpack:///./src/components/MenuBar.vue?c30a","webpack:///./src/components/MenuBar.vue","webpack:///./src/components/MenuBubble.vue?fde2","webpack:///./src/components/MenuBubble.vue?9ee6","webpack:///src/components/MenuBubble.vue","webpack:///./src/components/MenuBubble.vue","webpack:///./src/components/MenuBar.vue?92cd","webpack:///./src/components/MenuBubble.vue?c0eb"],"names":["__webpack_require__","d","__webpack_exports__","openMimetypes","openMimetypesMarkdown","openMimetypesPlainText","concat","fetchFileInfo","_ref","regeneratorRuntime","mark","_callee","user","path","response","files","wrap","_context","prev","next","axios","method","url","generateRemoteUrl","headers","requesttoken","OC","requestToken","content-Type","data","sent","OCA","Files","App","fileList","filesClient","_client","parseMultiStatus","abrupt","map","file","fileInfo","_parseFileInfo","href","stop","_x","_x2","apply","this","arguments","registerFileCreate","newFileMenuPlugin","attach","menu","id","addMenuEntry","displayName","t","templateName","iconClass","fileType","actionHandler","name","createFile","then","status","fileInfoModel","FileInfoModel","Viewer","fileActions","triggerAction","Plugins","register","registerFileActionFallback","mime","sharingToken","document","getElementById","value","dir","ViewerRoot","createElement","body","appendChild","i","length","PERMISSION_UPDATE","PERMISSION_READ","imagePath","filename","window","FileList","findFile","Promise","all","e","bind","imports","getCurrentDirectory","Vue","default","prototype","n","Editor","render","h","props","fileId","active","shareToken","relativePath","mimeType","mimetype","$mount","setDefault","_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_lib_loader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_MenuBar_vue_vue_type_style_index_0_id_7e2d47d8_scoped_true_lang_scss___WEBPACK_IMPORTED_MODULE_0__","module","exports","push","_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_lib_loader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_MenuBubble_vue_vue_type_style_index_0_id_dcf701dc_scoped_true_lang_scss___WEBPACK_IMPORTED_MODULE_0__","menubar","label","class","isActive","action","command","undo","redo","strong","em","strike","paragraph","visible","children","heading","level","bullet_list","ordered_list","blockquote","code_block","components_MenuBarvue_type_script_lang_js_","components","EditorMenuBar","tiptap_esm","ActionButton","ActionButton_default","a","PopoverMenu","PopoverMenu_default","Actions","Actions_default","directives","Tooltip","Tooltip_default","ClickOutside","vue_click_outside_default","editor","type","Object","required","isRichEditor","Boolean","windowWidth","windowHeight","forceRecompute","submenuVisibility","icons","_toConsumableArray","computed","isPublic","isHiddenInMenu","_this","$index","iconCount","getIconClasses","icon","classes","is-active","isChildMenuVisible","_this2","hasOwnProperty","allIcons","_this3","commands","showImagePrompt","image","childPopoverMenu","_this4","parent","popoverMenuItems","_loop","index","text","hideChildMenu","childIconClass","menuBarWidth","$refs","clientWidth","Math","max","floor","beforeMount","redrawMenuBar","mounted","addEventListener","getWindowWidth","beforeDestroy","removeEventListener","methods","_this5","$nextTick","clickIcon","event","documentElement","getWindowHeight","clientHeight","$set","toggleChildMenu","lastValue","currentUser","getCurrentUser","_command","dialogs","filepicker","uid","info","console","debug","previewUrl","generateUrl","internalLink","appendMeta","hasPreview","src","entries","_ref2","_slicedToArray","key","val","encodeURIComponent","join","alt","component","componentNormalizer","_vm","_h","$createElement","_c","_self","attrs","scopedSlots","_u","fn","ref","staticClass","_l","rawName","expression","title","on","click","$event","preventDefault","_v","open","_s","childIcon","_e","_t","components_MenuBubblevue_type_script_lang_js_","EditorMenuBubble","tooltip","linkUrl","linkMenuIsActive","showLinkMenu","linkInput","focus","hideLinkMenu","setLinkUrl","match","hide","getMarkAttrs","style","submit","link","placeholder","domProps","keydown","indexOf","_k","keyCode","input","target","composing","content","locals","add"],"mappings":"0FAAAA,EAAAC,EAAAC,EAAA,sBAAAC,IAAAH,EAAAC,EAAAC,EAAA,sBAAAE,IAAAJ,EAAAC,EAAAC,EAAA,sBAAAG;;;;;;;;;;;;;;;;;;;;;;AAsBA,IAAMD,EAAwB,CAC7B,iBAGKC,EAAyB,CAC9B,aACA,kBACA,yBACA,mBACA,kBACA,sBACA,8BACA,oBACA,sBACA,qBACA,oBAGKF,EAAgB,GAAHG,OAAOF,EAA0BC,I;;;;;;;;;;;;;;;;;;;;;;ACVpD,IAEME,EAAa,e,EAAAC,G,EAAAC,mBAAAC,KAAG,SAAAC,EAAeC,EAAMC,GAArB,IAAAC,EAAAC,EAAA,OAAAN,mBAAAO,KAAA,SAAAC,GAAA,cAAAA,EAAAC,KAAAD,EAAAE,MAAA,cAAAF,EAAAE,KAAA,EACEC,IAAM,CAC5BC,OAAQ,WACRC,IAAKC,4BAAkB,aAADjB,OAAcM,GAAdN,OAAqBO,IAC3CW,QAAS,CACRC,aAAcC,GAAGC,aACjBC,eAAgB,YAEjBC,KAAM,woBARc,cACff,EADeG,EAAAa,KAiCff,EAAQgB,IAAIC,MAAMC,IAAIC,SAASC,YAAYC,QAAQC,iBAAiBvB,EAASe,MAjC9DZ,EAAAqB,OAAA,SAkCdvB,EAAMwB,IAAI,SAAAC,GAChB,IAAMC,EAAWV,IAAIC,MAAMC,IAAIC,SAASC,YAAYO,eAAeF,GAEnE,OADAC,EAASE,KAAOH,EAAKG,KACdF,KArCa,wBAAAxB,EAAA2B,SAAAjC,K,6KAAH,gBAAAkC,EAAAC,GAAA,OAAAtC,EAAAuC,MAAAC,KAAAC,YA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,WACp4C,IGMpB,EACA,KACA,WACA,MAIavD,EAAA,QAAAgP,E,4BChBf,IAAIoD,EAAUtS,EAAQ,KACA,iBAAZsS,IAAsBA,EAAU,CAAC,CAAClL,EAAOhC,EAAIkN,EAAS,MAC7DA,EAAQC,SAAQnL,EAAOC,QAAUiL,EAAQC,SAG/BC,EADHxS,EAAQ,IAA+DoG,SAChE,WAAYkM,GAAS,EAAM,K,mBCL5C,IAAIA,EAAUtS,EAAQ,KACA,iBAAZsS,IAAsBA,EAAU,CAAC,CAAClL,EAAOhC,EAAIkN,EAAS,MAC7DA,EAAQC,SAAQnL,EAAOC,QAAUiL,EAAQC,SAG/BC,EADHxS,EAAQ,IAA+DoG,SAChE,WAAYkM,GAAS,EAAM","file":"editor-rich.js?v=00ca0a20c46a9bfe7c0c","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/javascript',\n\t'application/json',\n\t'application/xml',\n\t'application/x-empty',\n\t'application/x-msdos-program',\n\t'application/x-php',\n\t'application/x-pearl',\n\t'application/x-text',\n\t'application/yaml'\n]\n\nconst openMimetypes = [...openMimetypesMarkdown, ...openMimetypesPlainText]\n\nexport {\n\topenMimetypes,\n\topenMimetypesMarkdown,\n\topenMimetypesPlainText\n}\n","/*\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 'axios'\nimport { generateRemoteUrl } from 'nextcloud-server/dist/router'\nimport { openMimetypes } from './mime'\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\tvar 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\tlet 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\nexport {\n\tfetchFileInfo,\n\tregisterFileActionFallback,\n\tregisterFileCreate,\n\tFILE_ACTION_IDENTIFIER\n}\n","import mod from \"-!../../node_modules/vue-style-loader/index.js!../../node_modules/css-loader/dist/cjs.js!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/sass-loader/lib/loader.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MenuBar.vue?vue&type=style&index=0&id=7e2d47d8&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/lib/loader.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MenuBar.vue?vue&type=style&index=0&id=7e2d47d8&scoped=true&lang=scss&\"","exports = module.exports = require(\"../../node_modules/css-loader/dist/runtime/api.js\")(false);\n// Module\nexports.push([module.id, \".menubar[data-v-7e2d47d8] {\\n  position: fixed;\\n  position: -webkit-sticky;\\n  position: sticky;\\n  top: 0;\\n  display: flex;\\n  z-index: 10010;\\n  background-color: var(--color-main-background-translucent);\\n  height: 44px;\\n}\\n.menubar .menubar-icons[data-v-7e2d47d8] {\\n    flex-grow: 1;\\n    margin-left: calc((100% - 660px) / 2);\\n}\\n@media (max-width: 660px) {\\n.menubar .menubar-icons[data-v-7e2d47d8] {\\n      margin-left: 0;\\n}\\n}\\n.menubar button[data-v-7e2d47d8] {\\n  width: 44px;\\n  height: 44px;\\n  margin: 0;\\n  background-size: 16px;\\n  border: 0;\\n  background-color: transparent;\\n  opacity: .5;\\n  color: var(--color-main-text);\\n  background-position: center center;\\n  vertical-align: top;\\n}\\n.menubar button[data-v-7e2d47d8]:hover, .menubar button[data-v-7e2d47d8]:focus, .menubar button[data-v-7e2d47d8]:active {\\n    background-color: var(--color-background-dark);\\n}\\n.menubar button.is-active[data-v-7e2d47d8], .menubar button[data-v-7e2d47d8]:hover, .menubar button[data-v-7e2d47d8]:focus {\\n    opacity: 1;\\n}\\n.menubar button.icon-undo[data-v-7e2d47d8], .menubar button.icon-redo[data-v-7e2d47d8] {\\n    opacity: .4;\\n}\\n.menubar .submenu[data-v-7e2d47d8] {\\n  display: inline-block;\\n  width: 44px;\\n  height: 44px;\\n  position: relative;\\n  vertical-align: top;\\n}\\n\", \"\"]);\n","import mod from \"-!../../node_modules/vue-style-loader/index.js!../../node_modules/css-loader/dist/cjs.js!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/sass-loader/lib/loader.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MenuBubble.vue?vue&type=style&index=0&id=dcf701dc&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/lib/loader.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MenuBubble.vue?vue&type=style&index=0&id=dcf701dc&scoped=true&lang=scss&\"","exports = module.exports = require(\"../../node_modules/css-loader/dist/runtime/api.js\")(false);\n// Module\nexports.push([module.id, \".menububble[data-v-dcf701dc] {\\n  position: absolute;\\n  display: flex;\\n  z-index: 10020;\\n  background: var(--color-main-background-translucent);\\n  box-shadow: 0 1px 5px var(--color-box-shadow);\\n  border-radius: 5px;\\n  padding: 0.3rem;\\n  margin-bottom: 0.5rem;\\n  visibility: hidden;\\n  opacity: 0;\\n  transform: translateX(-50%);\\n  transition: opacity 0.2s, visibility 0.2s;\\n}\\n.menububble.is-active[data-v-dcf701dc] {\\n    opacity: 1;\\n    visibility: visible;\\n}\\n.menububble__button[data-v-dcf701dc] {\\n    display: inline-flex;\\n    border: 0;\\n    padding: 0.2rem 0.5rem;\\n    margin-right: 0.2rem;\\n    border-radius: 3px;\\n    cursor: pointer;\\n}\\n.menububble__button[data-v-dcf701dc]:last-child {\\n      margin-right: 0;\\n}\\n.menububble__form[data-v-dcf701dc] {\\n    display: flex;\\n    align-items: center;\\n}\\n.menububble__input[data-v-dcf701dc] {\\n    font: inherit;\\n    border: none;\\n    background: transparent;\\n    min-width: 150px;\\n}\\n\", \"\"]);\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('editor-menu-bar',{attrs:{\"editor\":_vm.editor},scopedSlots:_vm._u([{key:\"default\",fn:function(ref){\nvar commands = ref.commands;\nvar isActive = ref.isActive;\nreturn [_c('div',{staticClass:\"menubar\"},[(_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('popover-menu',{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('action-button',{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('action-button',{key:childIcon.class,attrs:{\"icon\":childIcon.class},on:{\"click\":function($event){return _vm.clickIcon(commands, childIcon)}}},[_vm._v(\"\\n\\t\\t\\t\\t\\t\\t\\t\"+_vm._s(childIcon.label)+\"\\n\\t\\t\\t\\t\\t\\t\")])}):_vm._e()]})],2)],2):_vm._e(),_vm._v(\" \"),_vm._t(\"default\",[_vm._v(\"\\n\\t\\t\\tLeft side\\n\\t\\t\")])],2)]}}],null,true)})}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","/*\n * @copyright Copyright (c) 2019 Julius Härtl <jus@bitgrid.net>\n *\n * @author Julius Härtl <jus@bitgrid.net>\n *\n * @license GNU AGPL version 3 or any later version\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\nexport default [\n\t{\n\t\tlabel: t('text', 'Undo'),\n\t\tclass: 'icon-undo',\n\t\tisActive: (isActive) => {},\n\t\taction: (command) => command.undo()\n\t},\n\t{\n\t\tlabel: t('text', 'Redo'),\n\t\tclass: 'icon-redo',\n\t\tisActive: (isActive) => {},\n\t\taction: (command) => command.redo()\n\t},\n\t{\n\t\tlabel: t('text', 'Bold'),\n\t\tclass: 'icon-bold',\n\t\tisActive: (isActive) => isActive.strong(),\n\t\taction: (command) => {\n\t\t\treturn command.strong()\n\t\t}\n\t},\n\t{\n\t\tlabel: t('text', 'Italic'),\n\t\tclass: 'icon-italic',\n\t\tisActive: (isActive) => isActive.em(),\n\t\taction: (command) => {\n\t\t\treturn command.em()\n\t\t}\n\t},\n\t{\n\t\tlabel: t('text', 'Strikethrough'),\n\t\tclass: 'icon-strike',\n\t\tisActive: (isActive) => isActive.strike(),\n\t\taction: (command) => {\n\t\t\treturn command.strike()\n\t\t}\n\t},\n\t{\n\t\tlabel: t('text', 'Paragraph'),\n\t\tclass: 'icon-paragraph',\n\t\tisActive: (isActive) => {},\n\t\taction: (command) => {\n\t\t\treturn command.paragraph()\n\t\t}\n\t},\n\t{\n\t\tlabel: t('text', 'Headings'),\n\t\tvisible: false,\n\t\tchildren: [\n\t\t\t{\n\t\t\t\tlabel: t('text', 'Heading 1'),\n\t\t\t\tclass: 'icon-h1',\n\t\t\t\tisActive: (isActive) => isActive.heading({ level: 1 }),\n\t\t\t\taction: (command) => {\n\t\t\t\t\treturn command.heading({ level: 1 })\n\t\t\t\t}\n\t\t\t},\n\t\t\t{\n\t\t\t\tlabel: t('text', 'Heading 2'),\n\t\t\t\tclass: 'icon-h2',\n\t\t\t\tisActive: (isActive) => isActive.heading({ level: 2 }),\n\t\t\t\taction: (command) => {\n\t\t\t\t\treturn command.heading({ level: 2 })\n\t\t\t\t}\n\t\t\t},\n\t\t\t{\n\t\t\t\tlabel: t('text', 'Heading 3'),\n\t\t\t\tclass: 'icon-h3',\n\t\t\t\tisActive: (isActive) => isActive.heading({ level: 3 }),\n\t\t\t\taction: (command) => {\n\t\t\t\t\treturn command.heading({ level: 3 })\n\t\t\t\t}\n\t\t\t},\n\t\t\t{\n\t\t\t\tlabel: t('text', 'Heading 4'),\n\t\t\t\tclass: 'icon-h4',\n\t\t\t\tisActive: (isActive) => isActive.heading({ level: 4 }),\n\t\t\t\taction: (command) => {\n\t\t\t\t\treturn command.heading({ level: 4 })\n\t\t\t\t}\n\t\t\t},\n\t\t\t{\n\t\t\t\tlabel: t('text', 'Heading 5'),\n\t\t\t\tclass: 'icon-h5',\n\t\t\t\tisActive: (isActive) => isActive.heading({ level: 5 }),\n\t\t\t\taction: (command) => {\n\t\t\t\t\treturn command.heading({ level: 5 })\n\t\t\t\t}\n\t\t\t},\n\t\t\t{\n\t\t\t\tlabel: t('text', 'Heading 6'),\n\t\t\t\tclass: 'icon-h6',\n\t\t\t\tisActive: (isActive) => isActive.heading({ level: 6 }),\n\t\t\t\taction: (command) => {\n\t\t\t\t\treturn command.heading({ level: 6 })\n\t\t\t\t}\n\t\t\t}\n\t\t]\n\t},\n\t{\n\t\tlabel: t('text', 'Unordered list'),\n\t\tclass: 'icon-ul',\n\t\tisActive: (isActive) => isActive.bullet_list(),\n\t\taction: (command) => {\n\t\t\treturn command.bullet_list()\n\t\t}\n\t},\n\t{\n\t\tlabel: t('text', 'Ordered list'),\n\t\tclass: 'icon-ol',\n\t\tisActive: (isActive) => isActive.ordered_list(),\n\t\taction: (command) => {\n\t\t\treturn command.ordered_list()\n\t\t}\n\t},\n\t{\n\t\tlabel: t('text', 'Blockquote'),\n\t\tclass: 'icon-quote',\n\t\tisActive: (isActive) => isActive.blockquote(),\n\t\taction: (command) => {\n\t\t\treturn command.blockquote()\n\t\t}\n\t},\n\t{\n\t\tlabel: t('text', 'Code block'),\n\t\tclass: 'icon-code',\n\t\tisActive: (isActive) => isActive.code_block(),\n\t\taction: (command) => {\n\t\t\treturn command.code_block()\n\t\t}\n\t}\n]\n","<!--\n  - @copyright Copyright (c) 2019 Julius Härtl <jus@bitgrid.net>\n  -\n  - @author Julius Härtl <jus@bitgrid.net>\n  -\n  - @license GNU AGPL version 3 or any later version\n  -\n  - This program is free software: you can redistribute it and/or modify\n  - it under the terms of the GNU Affero General Public License as\n  - published by the Free Software Foundation, either version 3 of the\n  - License, or (at your option) any later version.\n  -\n  - This program is distributed in the hope that it will be useful,\n  - but WITHOUT ANY WARRANTY; without even the implied warranty of\n  - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  - GNU Affero General Public License for more details.\n  -\n  - You should have received a copy of the GNU Affero General Public License\n  - along with this program. If not, see <http://www.gnu.org/licenses/>.\n  -\n  -->\n\n<template>\n\t<editor-menu-bar v-slot=\"{ commands, isActive }\" :editor=\"editor\">\n\t\t<div class=\"menubar\">\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\" v-show=\"$index < iconCount\" :key=\"icon.label\"\n\t\t\t\t\t\t:title=\"icon.label\"\n\t\t\t\t\t\t:class=\"getIconClasses(isActive, icon)\" @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\" :key=\"icon.label\" v-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<popover-menu :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<action-button v-if=\"icon.class && isHiddenInMenu($index)\" :key=\"icon.class\"\n\t\t\t\t\t\t\t:icon=\"icon.class\" @click=\"clickIcon(commands, icon)\">\n\t\t\t\t\t\t\t{{ icon.label }}\n\t\t\t\t\t\t</action-button>\n\t\t\t\t\t\t<template v-else-if=\"!icon.class && isHiddenInMenu($index)\">\n\t\t\t\t\t\t\t<action-button v-for=\"childIcon in icon.children\" :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</action-button>\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</editor-menu-bar>\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},\n\tdata: () => {\n\t\treturn {\n\t\t\twindowWidth: 0,\n\t\t\twindowHeight: 0,\n\t\t\tforceRecompute: 0,\n\t\t\tsubmenuVisibility: {},\n\t\t\ticons: [...menuBarIcons]\n\t\t}\n\t},\n\tcomputed: {\n\t\tisPublic() {\n\t\t\treturn document.getElementById('isPublic') && document.getElementById('isPublic').value === '1'\n\t\t},\n\t\tisHiddenInMenu() {\n\t\t\treturn ($index) => $index - this.iconCount >= 0\n\t\t},\n\t\tgetIconClasses() {\n\t\t\treturn (isActive, icon) => {\n\t\t\t\tlet 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\tlet 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\tvar 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 : this.windowWidth - 200\n\t\t\tconst iconCount = Math.max((Math.floor(menuBarWidth / 44) - 2), 0)\n\t\t\treturn iconCount\n\t\t}\n\t},\n\tbeforeMount() {\n\t\tthis.redrawMenuBar()\n\t},\n\tmounted() {\n\t\twindow.addEventListener('resize', this.getWindowWidth)\n\t},\n\tbeforeDestroy() {\n\t\twindow.removeEventListener('resize', this.getWindowWidth)\n\t},\n\tmethods: {\n\t\tredrawMenuBar() {\n\t\t\tthis.$nextTick(() => {\n\t\t\t\tthis.getWindowWidth()\n\t\t\t\tthis.forceRecompute++\n\t\t\t})\n\t\t},\n\t\tclickIcon(commands, icon) {\n\t\t\treturn icon.action(commands)\n\t\t},\n\t\tgetWindowWidth(event) {\n\t\t\tthis.windowWidth = document.documentElement.clientWidth\n\t\t},\n\t\tgetWindowHeight(event) {\n\t\t\tthis.windowHeight = document.documentElement.clientHeight\n\t\t},\n\t\thideChildMenu(icon) {\n\t\t\tthis.$set(this.submenuVisibility, icon.label, false)\n\t\t},\n\t\ttoggleChildMenu(icon) {\n\t\t\tconst lastValue = this.submenuVisibility.hasOwnProperty(icon.label) ? this.submenuVisibility[icon.label] : false\n\t\t\tthis.$set(this.submenuVisibility, icon.label, !lastValue)\n\t\t},\n\t\tshowImagePrompt(command) {\n\t\t\tconst currentUser = OC.getCurrentUser()\n\t\t\tif (!currentUser) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst _command = command\n\t\t\tOC.dialogs.filepicker('Insert an image', (file) => {\n\t\t\t\tfetchFileInfo(currentUser.uid, file).then((info) => {\n\t\t\t\t\tconst fileInfo = info[0]\n\t\t\t\t\tconsole.debug(fileInfo)\n\t\t\t\t\tconst previewUrl = OC.generateUrl('/core/preview?') + `fileId=${fileInfo.id}&x=1024&y=1024&a=true`\n\t\t\t\t\tconst internalLink = OC.generateUrl('/f/' + fileInfo.id)\n\n\t\t\t\t\t// dirty but works so we have the information stored in markdown\n\t\t\t\t\tconst appendMeta = {\n\t\t\t\t\t\tmimetype: fileInfo.mimetype,\n\t\t\t\t\t\thasPreview: fileInfo.hasPreview,\n\t\t\t\t\t\tfileId: fileInfo.id\n\t\t\t\t\t}\n\t\t\t\t\tconst src = (fileInfo.hasPreview ? previewUrl : internalLink)\n\t\t\t\t\t\t+ '#'\n\t\t\t\t\t\t+ Object.entries(appendMeta).map(([key, val]) => `${key}=${encodeURIComponent(val)}`).join('&')\n\n\t\t\t\t\t_command({\n\t\t\t\t\t\tsrc: src,\n\t\t\t\t\t\talt: fileInfo.name\n\t\t\t\t\t})\n\t\t\t\t})\n\t\t\t}, false, [], true)\n\t\t}\n\t}\n}\n</script>\n\n<style scoped lang=\"scss\">\n\t.menubar {\n\t\tposition: fixed;\n\t\tposition: -webkit-sticky;\n\t\tposition: sticky;\n\t\ttop: 0;\n\t\tdisplay: flex;\n\t\tz-index: 10010; // above modal-header so buttons are clickable\n\t\tbackground-color: var(--color-main-background-translucent);\n\t\theight: 44px;\n\t\t.menubar-icons {\n\t\t\tflex-grow: 1;\n\t\t\tmargin-left: calc((100% - 660px) / 2);\n\t\t}\n\t\t@media (max-width: 660px) {\n\t\t\t.menubar-icons {\n\t\t\t\tmargin-left: 0;\n\t\t\t}\n\t\t}\n\t}\n\n\t.menubar button {\n\t\twidth: 44px;\n\t\theight: 44px;\n\t\tmargin: 0;\n\t\tbackground-size: 16px;\n\t\tborder: 0;\n\t\tbackground-color: transparent;\n\t\topacity: .5;\n\t\tcolor: var(--color-main-text);\n\t\tbackground-position: center center;\n\t\tvertical-align: top;\n\t\t&:hover, &:focus, &:active {\n\t\t\tbackground-color: var(--color-background-dark);\n\t\t}\n\t\t&.is-active,\n\t\t&:hover,\n\t\t&:focus {\n\t\t\topacity: 1;\n\t\t}\n\n\t\t&.icon-undo, &.icon-redo {\n\t\t\topacity: .4;\n\t\t}\n\t}\n\n\t.menubar .submenu {\n\t\tdisplay: inline-block;\n\t\twidth: 44px;\n\t\theight: 44px;\n\t\tposition: relative;\n\t\tvertical-align: top;\n\t}\n</style>\n","import mod from \"-!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MenuBar.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MenuBar.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./MenuBar.vue?vue&type=template&id=7e2d47d8&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=7e2d47d8&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  \"7e2d47d8\",\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('editor-menu-bubble',{staticClass:\"menububble\",attrs:{\"editor\":_vm.editor},on:{\"hide\":_vm.hideLinkMenu},scopedSlots:_vm._u([{key:\"default\",fn:function(ref){\nvar commands = ref.commands;\nvar isActive = ref.isActive;\nvar getMarkAttrs = ref.getMarkAttrs;\nvar menu = ref.menu;\nreturn [_c('div',{staticClass:\"menububble\",class:{ 'is-active': menu.isActive },style:((\"left: \" + (menu.left) + \"px; bottom: \" + (menu.bottom) + \"px;\"))},[(_vm.linkMenuIsActive)?_c('form',{staticClass:\"menububble__form\",on:{\"submit\":function($event){$event.preventDefault();return _vm.setLinkUrl(commands.link, _vm.linkUrl)}}},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.linkUrl),expression:\"linkUrl\"}],ref:\"linkInput\",staticClass:\"menububble__input\",attrs:{\"type\":\"text\",\"placeholder\":\"https://\"},domProps:{\"value\":(_vm.linkUrl)},on:{\"keydown\":function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,\"esc\",27,$event.key,[\"Esc\",\"Escape\"])){ return null; }return _vm.hideLinkMenu($event)},\"input\":function($event){if($event.target.composing){ return; }_vm.linkUrl=$event.target.value}}}),_vm._v(\" \"),_c('button',{staticClass:\"menububble__button icon-confirm\",attrs:{\"type\":\"button\"},on:{\"click\":function($event){return _vm.setLinkUrl(commands.link, _vm.linkUrl)}}})]):[_c('button',{staticClass:\"menububble__button\",class:{ 'is-active': isActive.link() },on:{\"click\":function($event){_vm.showLinkMenu(getMarkAttrs('link'))}}},[_c('span',{directives:[{name:\"tooltip\",rawName:\"v-tooltip\",value:(isActive.link() ? 'Update Link' : 'Add Link'),expression:\"isActive.link() ? 'Update Link' : 'Add Link'\"}],staticClass:\"icon-link\"}),_vm._v(\" \"),_c('span',[_vm._v(_vm._s(_vm.t('text', 'Add link')))])])]],2)]}}])})}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import mod from \"-!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MenuBubble.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MenuBubble.vue?vue&type=script&lang=js&\"","<!--\n  - @copyright Copyright (c) 2019 Julius Härtl <jus@bitgrid.net>\n  -\n  - @author Julius Härtl <jus@bitgrid.net>\n  -\n  - @license GNU AGPL version 3 or any later version\n  -\n  - This program is free software: you can redistribute it and/or modify\n  - it under the terms of the GNU Affero General Public License as\n  - published by the Free Software Foundation, either version 3 of the\n  - License, or (at your option) any later version.\n  -\n  - This program is distributed in the hope that it will be useful,\n  - but WITHOUT ANY WARRANTY; without even the implied warranty of\n  - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  - GNU Affero General Public License for more details.\n  -\n  - You should have received a copy of the GNU Affero General Public License\n  - along with this program. If not, see <http://www.gnu.org/licenses/>.\n  -\n  -->\n\n<template>\n\t<editor-menu-bubble v-slot=\"{ commands, isActive, getMarkAttrs, menu }\" class=\"menububble\"\n\t\t:editor=\"editor\" @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\" v-model=\"linkUrl\" class=\"menububble__input\"\n\t\t\t\t\ttype=\"text\" placeholder=\"https://\" @keydown.esc=\"hideLinkMenu\">\n\t\t\t\t<button class=\"menububble__button icon-confirm\" type=\"button\" @click=\"setLinkUrl(commands.link, linkUrl)\" />\n\t\t\t</form>\n\n\t\t\t<template v-else>\n\t\t\t\t<button\n\t\t\t\t\tclass=\"menububble__button\"\n\t\t\t\t\t:class=\"{ 'is-active': isActive.link() }\"\n\t\t\t\t\t@click=\"showLinkMenu(getMarkAttrs('link'))\">\n\t\t\t\t\t<span v-tooltip=\"isActive.link() ? 'Update Link' : 'Add Link'\" class=\"icon-link\" />\n\t\t\t\t\t<span>{{ t('text', 'Add link') }}</span>\n\t\t\t\t</button>\n\t\t\t</template>\n\t\t</div>\n\t</editor-menu-bubble>\n</template>\n\n<script>\nimport { EditorMenuBubble } from 'tiptap'\nimport Tooltip from 'nextcloud-vue/dist/Directives/Tooltip'\n\nexport default {\n\tname: 'MenuBubble',\n\tcomponents: {\n\t\tEditorMenuBubble\n\t},\n\tdirectives: {\n\t\ttooltip: Tooltip\n\t},\n\tprops: {\n\t\teditor: {\n\t\t\ttype: Object,\n\t\t\trequired: false,\n\t\t\tdefault: null\n\t\t}\n\t},\n\tdata: () => {\n\t\treturn {\n\t\t\tlinkUrl: null,\n\t\t\tlinkMenuIsActive: false\n\t\t}\n\t},\n\tmethods: {\n\t\tshowLinkMenu(attrs) {\n\t\t\tthis.linkUrl = attrs.href\n\t\t\tthis.linkMenuIsActive = true\n\t\t\tthis.$nextTick(() => {\n\t\t\t\tthis.$refs.linkInput.focus()\n\t\t\t})\n\t\t},\n\t\thideLinkMenu() {\n\t\t\tthis.linkUrl = null\n\t\t\tthis.linkMenuIsActive = false\n\t\t},\n\n\t\tsetLinkUrl(command, url) {\n\t\t\tif (url && !url.match(/^[a-zA-Z]+:\\/\\//) && !url.match(/^\\//)) {\n\t\t\t\turl = 'https://' + url\n\t\t\t}\n\t\t\tcommand({ href: url })\n\t\t\tthis.hideLinkMenu()\n\t\t}\n\t}\n}\n</script>\n\n<style scoped lang=\"scss\">\n\t.menububble {\n\t\tposition: absolute;\n\t\tdisplay: flex;\n\t\tz-index: 10020;\n\t\tbackground: var(--color-main-background-translucent);\n\t\tbox-shadow: 0 1px 5px var(--color-box-shadow);\n\t\tborder-radius: 5px;\n\t\tpadding: 0.3rem;\n\t\tmargin-bottom: 0.5rem;\n\t\tvisibility: hidden;\n\t\topacity: 0;\n\t\ttransform: translateX(-50%);\n\t\ttransition: opacity 0.2s, visibility 0.2s;\n\n\t\t&.is-active {\n\t\t\topacity: 1;\n\t\t\tvisibility: visible;\n\t\t}\n\n\t\t&__button {\n\t\t\tdisplay: inline-flex;\n\t\t\tborder: 0;\n\t\t\tpadding: 0.2rem 0.5rem;\n\t\t\tmargin-right: 0.2rem;\n\t\t\tborder-radius: 3px;\n\t\t\tcursor: pointer;\n\n\t\t\t&:last-child {\n\t\t\t\tmargin-right: 0;\n\t\t\t}\n\t\t}\n\n\t\t&__form {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t}\n\n\t\t&__input {\n\t\t\tfont: inherit;\n\t\t\tborder: none;\n\t\t\tbackground: transparent;\n\t\t\tmin-width: 150px;\n\t\t}\n\t}\n</style>\n","import { render, staticRenderFns } from \"./MenuBubble.vue?vue&type=template&id=dcf701dc&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=dcf701dc&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  \"dcf701dc\",\n  null\n  \n)\n\nexport default component.exports","// 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/lib/loader.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MenuBar.vue?vue&type=style&index=0&id=7e2d47d8&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(\"16966429\", 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/lib/loader.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./MenuBubble.vue?vue&type=style&index=0&id=dcf701dc&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(\"ef006100\", content, true, {});"],"sourceRoot":""}