%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /www/varak.net/nextcloud.varak.net/apps_old/apps/text/js/
Upload File :
Create Path :
Current File : //www/varak.net/nextcloud.varak.net/apps_old/apps/text/js/RichWorkspace-pu9ZIxIn.chunk.mjs.map

{"version":3,"file":"RichWorkspace-pu9ZIxIn.chunk.mjs","sources":["../src/views/RichWorkspace.vue"],"sourcesContent":["<!--\n  - SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors\n  - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<template>\n\t<div v-if=\"enabled && localHasRichWorkspace\"\n\t\tid=\"rich-workspace\"\n\t\t:class=\"{'focus': focus, 'dark': darkTheme }\">\n\t\t<RichTextReader v-if=\"!loaded || !ready\" :content=\"content\" class=\"rich-workspace--preview\" />\n\t\t<Editor v-if=\"file\"\n\t\t\tv-show=\"ready\"\n\t\t\t:key=\"file.path\"\n\t\t\t:file-id=\"file.id\"\n\t\t\t:relative-path=\"file.path\"\n\t\t\t:share-token=\"shareToken\"\n\t\t\t:mime=\"file.mimetype\"\n\t\t\t:autofocus=\"autofocus\"\n\t\t\t:hide-menu=\"hideMenu\"\n\t\t\tactive\n\t\t\trich-workspace\n\t\t\t@ready=\"ready=true\"\n\t\t\t@focus=\"onFocus\"\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, unsubscribe } from '@nextcloud/event-bus'\nimport getEditorInstance from '../components/Editor.singleton.js'\nimport RichTextReader from '../components/RichTextReader.vue'\n\nconst IS_PUBLIC = !!(document.getElementById('isPublic'))\nconst WORKSPACE_URL = generateOcsUrl('apps/text' + (IS_PUBLIC ? '/public' : '') + '/workspace', 2)\nconst SUPPORTED_STATIC_FILENAMES = ['Readme.md', 'README.md', 'readme.md']\n\nexport default {\n\tname: 'RichWorkspace',\n\tcomponents: {\n\t\tRichTextReader,\n\t\tEditor: getEditorInstance,\n\t},\n\tprops: {\n\t\tcontent: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t\tpath: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\t\tactive: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\t\thasRichWorkspace: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t},\n\tdata() {\n\t\treturn {\n\t\t\t// Keep track of a local copy of the hasRichWorkspace state as it might change after initial rendering (e.g. when adding/removing the readme)\n\t\t\tlocalHasRichWorkspace: false,\n\t\t\tfocus: false,\n\t\t\tfolder: null,\n\t\t\tfile: null,\n\t\t\tloaded: false,\n\t\t\tready: false,\n\t\t\tautofocus: false,\n\t\t\thideMenu: true,\n\t\t\tdarkTheme: OCA.Accessibility && OCA.Accessibility.theme === 'dark',\n\t\t\tenabled: OCA.Text.RichWorkspaceEnabled,\n\t\t}\n\t},\n\tcomputed: {\n\t\tshareToken() {\n\t\t\treturn document.getElementById('sharingToken')?.value\n\t\t},\n\t},\n\twatch: {\n\t\tpath() {\n\t\t\tthis.getFileInfo()\n\t\t},\n\t\tfocus(newValue) {\n\t\t\tif (!newValue) {\n\t\t\t\tdocument.querySelector('#rich-workspace .text-editor__main').scrollTo(0, 0)\n\t\t\t}\n\t\t},\n\t\thasRichWorkspace(value) {\n\t\t\tthis.localHasRichWorkspace = value\n\t\t},\n\t},\n\tmounted() {\n\t\tthis.localHasRichWorkspace = this.hasRichWorkspace\n\t\tif (this.enabled && this.hasRichWorkspace) {\n\t\t\tthis.getFileInfo()\n\t\t}\n\t\tsubscribe('Text::showRichWorkspace', this.showRichWorkspace)\n\t\tsubscribe('Text::hideRichWorkspace', this.hideRichWorkspace)\n\t\tsubscribe('files:node:created', this.onFileCreated)\n\t\tsubscribe('files:node:deleted', this.onFileDeleted)\n\t\tsubscribe('files:node:renamed', this.onFileRenamed)\n\n\t\tthis.listenKeydownEvents()\n\n\t},\n\tbeforeDestroy() {\n\t\tunsubscribe('Text::showRichWorkspace', this.showRichWorkspace)\n\t\tunsubscribe('Text::hideRichWorkspace', this.hideRichWorkspace)\n\t\tunsubscribe('files:node:created', this.onFileCreated)\n\t\tunsubscribe('files:node:deleted', this.onFileDeleted)\n\t\tunsubscribe('files:node:renamed', this.onFileRenamed)\n\n\t\tthis.unlistenKeydownEvents()\n\t},\n\tmethods: {\n\t\tonFocus() {\n\t\t\tthis.focus = true\n\t\t\tthis.hideMenu = false\n\t\t\tthis.unlistenKeydownEvents()\n\t\t},\n\t\treset() {\n\t\t\tthis.localHasRichWorkspace = false\n\t\t\tthis.file = null\n\t\t\tthis.focus = false\n\t\t\tthis.$nextTick(() => {\n\t\t\t\tthis.creating = false\n\t\t\t\tthis.getFileInfo()\n\t\t\t})\n\t\t},\n\t\tgetFileInfo(autofocus) {\n\t\t\tif (!this.enabled) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis.file = null\n\t\t\tthis.ready = false\n\t\t\tthis.loaded = true\n\t\t\tthis.autofocus = 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\treturn axios.get(WORKSPACE_URL, { params })\n\t\t\t\t.then((response) => {\n\t\t\t\t\tconst data = response.data.ocs.data\n\t\t\t\t\tthis.folder = data.folder || null\n\t\t\t\t\tthis.file = data.file\n\t\t\t\t\tthis.editing = true\n\t\t\t\t\tthis.loaded = true\n\t\t\t\t\tthis.autofocus = autofocus || false\n\t\t\t\t\tthis.localHasRichWorkspace = true\n\t\t\t\t\treturn true\n\t\t\t\t})\n\t\t\t\t.catch((error) => {\n\t\t\t\t\tif (error.response.data.ocs && error.response.data.ocs.data.folder) {\n\t\t\t\t\t\tthis.folder = error.response.data.ocs.data.folder\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.folder = null\n\t\t\t\t\t}\n\t\t\t\t\tthis.file = null\n\t\t\t\t\tthis.loaded = true\n\t\t\t\t\tthis.ready = true\n\t\t\t\t\tthis.creating = false\n\t\t\t\t\treturn false\n\t\t\t\t})\n\t\t},\n\t\tshowRichWorkspace(event) {\n\t\t\tthis.enabled = true\n\t\t\tthis.getFileInfo(event?.autofocus || false)\n\t\t},\n\t\thideRichWorkspace() {\n\t\t\tthis.enabled = false\n\t\t},\n\t\tlistenKeydownEvents() {\n\t\t\twindow.addEventListener('keydown', this.onKeydown)\n\t\t},\n\t\tunlistenKeydownEvents() {\n\t\t\twindow.removeEventListener('keydown', this.onKeydown)\n\t\t},\n\t\tonKeydown(e) {\n\t\t\tif (e.key === 'Tab') {\n\t\t\t\tthis.hideMenu = false\n\t\t\t}\n\t\t},\n\t\tonFileCreated(node) {\n\t\t\tif (SUPPORTED_STATIC_FILENAMES.includes(node.basename)) {\n\t\t\t\tthis.localHasRichWorkspace = true\n\t\t\t\tthis.getFileInfo(true)\n\t\t\t}\n\t\t},\n\t\tonFileDeleted(node) {\n\t\t\tif (node.path === this.file?.path) {\n\t\t\t\tthis.localHasRichWorkspace = false\n\t\t\t}\n\t\t},\n\t\tonFileRenamed(node) {\n\t\t\tif (SUPPORTED_STATIC_FILENAMES.includes(node.basename)) {\n\t\t\t\tthis.localHasRichWorkspace = true\n\t\t\t} else if (node.fileid === this.file?.id && node.path !== this.file?.path) {\n\t\t\t\tthis.localHasRichWorkspace = false\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n\t#rich-workspace {\n\t\tpadding: 0 50px;\n\t\t/* Slightly reduce vertical space */\n\t\tmargin-bottom: -24px;\n\t\ttext-align: left;\n\t\tmax-height: 0;\n\t\ttransition: max-height 0.5s cubic-bezier(0, 1, 0, 1);\n\t\tz-index: 61;\n\t\tposition: relative;\n\t}\n\n\t.rich-workspace--preview {\n\t\tmargin-top: var(--default-clickable-area);\n\n\t\t&:deep(div[contenteditable='false']) {\n\t\t\tmargin: 0;\n\t\t}\n\t}\n\n\t/* For subfolders, where there are no Recommendations */\n\t#rich-workspace:only-child {\n\t\tmargin-bottom: 0;\n\t}\n\n\t.empty-workspace {\n\t\tcursor: pointer;\n\t\tdisplay: block;\n\t\tpadding-top: 43px;\n\t\tcolor: var(--color-text-maxcontrast);\n\t}\n\n\t#rich-workspace: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:deep(.text-editor) {\n\t\theight: 100%;\n\t\tposition: unset !important;\n\t\ttop: auto !important;\n\t}\n\n\t#rich-workspace:deep(.text-editor__wrapper) {\n\t\tposition: unset !important;\n\t\toverflow: visible;\n\t}\n\n\t#rich-workspace:deep(.text-editor__main) {\n\t\toverflow: visible !important;\n\t}\n\n\t#rich-workspace:deep(.content-wrapper) {\n\t\toverflow: scroll !important;\n\t\tmax-height: calc(40vh - 50px);\n\t\tpadding-left: 10px;\n\t\tpadding-bottom: 10px;\n\t}\n\n\t#rich-workspace:deep(.text-editor__wrapper .ProseMirror) {\n\t\tpadding: 0px;\n\t\tmargin: 0;\n\t}\n\n\t#rich-workspace:deep(.table-wrapper .content) {\n\t\ttr {\n\t\t\tth, td {\n\t\t\t\tflex-grow: 1;\n\t\t\t}\n\n\t\t\tth {\n\t\t\t\tdiv {\n\t\t\t\t\twidth: 100%;\n\t\t\t\t}\n\n\t\t\t\t.action-item div {\n\t\t\t\t\tdisplay: flex;\n\t\t\t\t\tjustify-content: flex-end;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t#rich-workspace:deep(.editor__content) {\n\t\tmargin: 0;\n\t}\n\n\t#rich-workspace.focus {\n\t\tmax-height: 50vh;\n\t}\n\n\t#rich-workspace:not(.focus) {\n\t\tmax-height: 30vh;\n\t\tposition: relative;\n\t\toverflow: hidden;\n\t}\n\n\t#rich-workspace:not(.focus):not(.empty):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):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</style>\n"],"names":["IS_PUBLIC","WORKSPACE_URL","generateOcsUrl","SUPPORTED_STATIC_FILENAMES","_sfc_main","RichTextReader","getEditorInstance","_a","newValue","value","subscribe","unsubscribe","autofocus","params","axios","response","data","error","event","e","node","_b"],"mappings":";guBAkCA,MAAAA,EAAA,CAAA,CAAA,SAAA,eAAA,UAAA,EACAC,EAAAC,EAAA,aAAAF,EAAA,UAAA,IAAA,aAAA,CAAA,EACAG,EAAA,CAAA,YAAA,YAAA,WAAA,EAEAC,EAAA,CACA,KAAA,gBACA,WAAA,CACA,eAAAC,EACA,OAAAC,CACA,EACA,MAAA,CACA,QAAA,CACA,KAAA,OACA,QAAA,EACA,EACA,KAAA,CACA,KAAA,OACA,SAAA,EACA,EACA,OAAA,CACA,KAAA,QACA,QAAA,EACA,EACA,iBAAA,CACA,KAAA,QACA,QAAA,EACA,CACA,EACA,MAAA,CACA,MAAA,CAEA,sBAAA,GACA,MAAA,GACA,OAAA,KACA,KAAA,KACA,OAAA,GACA,MAAA,GACA,UAAA,GACA,SAAA,GACA,UAAA,IAAA,eAAA,IAAA,cAAA,QAAA,OACA,QAAA,IAAA,KAAA,oBACA,CACA,EACA,SAAA,CACA,YAAA,OACA,OAAAC,EAAA,SAAA,eAAA,cAAA,IAAA,YAAAA,EAAA,KACA,CACA,EACA,MAAA,CACA,MAAA,CACA,KAAA,YAAA,CACA,EACA,MAAAC,EAAA,CACAA,GACA,SAAA,cAAA,oCAAA,EAAA,S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