nextcloud/apps/settings/js/vue-editor-rich.js

393 lines
23 KiB
JavaScript
Raw Normal View History

(window["webpackJsonpSettings"] = window["webpackJsonpSettings"] || []).push([["editor-rich"],{
/***/ "./apps/text/src/components/MenuBubble.vue":
/*!*************************************************!*\
!*** ./apps/text/src/components/MenuBubble.vue ***!
\*************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _MenuBubble_vue_vue_type_template_id_48157a56_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./MenuBubble.vue?vue&type=template&id=48157a56&scoped=true& */ "./apps/text/src/components/MenuBubble.vue?vue&type=template&id=48157a56&scoped=true&");
/* harmony import */ var _MenuBubble_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./MenuBubble.vue?vue&type=script&lang=js& */ "./apps/text/src/components/MenuBubble.vue?vue&type=script&lang=js&");
/* empty/unused harmony star reexport *//* harmony import */ var _MenuBubble_vue_vue_type_style_index_0_id_48157a56_scoped_true_lang_scss___WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./MenuBubble.vue?vue&type=style&index=0&id=48157a56&scoped=true&lang=scss& */ "./apps/text/src/components/MenuBubble.vue?vue&type=style&index=0&id=48157a56&scoped=true&lang=scss&");
/* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js */ "./node_modules/vue-loader/lib/runtime/componentNormalizer.js");
/* normalize component */
var component = Object(_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_3__["default"])(
_MenuBubble_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__["default"],
_MenuBubble_vue_vue_type_template_id_48157a56_scoped_true___WEBPACK_IMPORTED_MODULE_0__["render"],
_MenuBubble_vue_vue_type_template_id_48157a56_scoped_true___WEBPACK_IMPORTED_MODULE_0__["staticRenderFns"],
false,
null,
"48157a56",
null
)
/* hot reload */
if (false) { var api; }
component.options.__file = "apps/text/src/components/MenuBubble.vue"
/* harmony default export */ __webpack_exports__["default"] = (component.exports);
/***/ }),
/***/ "./apps/text/src/components/MenuBubble.vue?vue&type=script&lang=js&":
/*!**************************************************************************!*\
!*** ./apps/text/src/components/MenuBubble.vue?vue&type=script&lang=js& ***!
\**************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_MenuBubble_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/babel-loader/lib!../../../../node_modules/vue-loader/lib??vue-loader-options!./MenuBubble.vue?vue&type=script&lang=js& */ "./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/index.js?!./apps/text/src/components/MenuBubble.vue?vue&type=script&lang=js&");
/* empty/unused harmony star reexport */ /* harmony default export */ __webpack_exports__["default"] = (_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_MenuBubble_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__["default"]);
/***/ }),
/***/ "./apps/text/src/components/MenuBubble.vue?vue&type=style&index=0&id=48157a56&scoped=true&lang=scss&":
/*!***********************************************************************************************************!*\
!*** ./apps/text/src/components/MenuBubble.vue?vue&type=style&index=0&id=48157a56&scoped=true&lang=scss& ***!
\***********************************************************************************************************/
/*! no static exports found */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _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_48157a56_scoped_true_lang_scss___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/vue-style-loader!../../../../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??vue-loader-options!./MenuBubble.vue?vue&type=style&index=0&id=48157a56&scoped=true&lang=scss& */ "./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?!./apps/text/src/components/MenuBubble.vue?vue&type=style&index=0&id=48157a56&scoped=true&lang=scss&");
/* harmony import */ var _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_48157a56_scoped_true_lang_scss___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_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_48157a56_scoped_true_lang_scss___WEBPACK_IMPORTED_MODULE_0__);
/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _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_48157a56_scoped_true_lang_scss___WEBPACK_IMPORTED_MODULE_0__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _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_48157a56_scoped_true_lang_scss___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
/* harmony default export */ __webpack_exports__["default"] = (_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_48157a56_scoped_true_lang_scss___WEBPACK_IMPORTED_MODULE_0___default.a);
/***/ }),
/***/ "./apps/text/src/components/MenuBubble.vue?vue&type=template&id=48157a56&scoped=true&":
/*!********************************************************************************************!*\
!*** ./apps/text/src/components/MenuBubble.vue?vue&type=template&id=48157a56&scoped=true& ***!
\********************************************************************************************/
/*! exports provided: render, staticRenderFns */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_MenuBubble_vue_vue_type_template_id_48157a56_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../node_modules/vue-loader/lib??vue-loader-options!./MenuBubble.vue?vue&type=template&id=48157a56&scoped=true& */ "./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/vue-loader/lib/index.js?!./apps/text/src/components/MenuBubble.vue?vue&type=template&id=48157a56&scoped=true&");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "render", function() { return _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_MenuBubble_vue_vue_type_template_id_48157a56_scoped_true___WEBPACK_IMPORTED_MODULE_0__["render"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_MenuBubble_vue_vue_type_template_id_48157a56_scoped_true___WEBPACK_IMPORTED_MODULE_0__["staticRenderFns"]; });
/***/ }),
/***/ "./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/index.js?!./apps/text/src/components/MenuBubble.vue?vue&type=script&lang=js&":
/*!************************************************************************************************************************************************************!*\
!*** ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./apps/text/src/components/MenuBubble.vue?vue&type=script&lang=js& ***!
\************************************************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
!(function webpackMissingModule() { var e = new Error("Cannot find module 'tiptap'"); e.code = 'MODULE_NOT_FOUND'; throw e; }());
/* harmony import */ var _nextcloud_vue_dist_Directives_Tooltip__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @nextcloud/vue/dist/Directives/Tooltip */ "./node_modules/@nextcloud/vue/dist/Directives/Tooltip.js");
/* harmony import */ var _nextcloud_vue_dist_Directives_Tooltip__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_nextcloud_vue_dist_Directives_Tooltip__WEBPACK_IMPORTED_MODULE_1__);
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */ __webpack_exports__["default"] = ({
name: 'MenuBubble',
components: {
EditorMenuBubble: !(function webpackMissingModule() { var e = new Error("Cannot find module 'tiptap'"); e.code = 'MODULE_NOT_FOUND'; throw e; }())
},
directives: {
tooltip: _nextcloud_vue_dist_Directives_Tooltip__WEBPACK_IMPORTED_MODULE_1___default.a
},
props: {
editor: {
type: Object,
required: false,
default: null
}
},
data: function data() {
return {
linkUrl: null,
linkMenuIsActive: false
};
},
methods: {
showLinkMenu: function showLinkMenu(attrs) {
var _this = this;
this.linkUrl = attrs.href;
this.linkMenuIsActive = true;
this.$nextTick(function () {
_this.$refs.linkInput.focus();
});
},
hideLinkMenu: function hideLinkMenu() {
this.linkUrl = null;
this.linkMenuIsActive = false;
},
setLinkUrl: function setLinkUrl(command, url) {
if (url && !url.match(/^[a-zA-Z]+:\/\//) && !url.match(/^\//)) {
url = 'https://' + url;
}
command({
href: url
});
this.hideLinkMenu();
}
}
});
/***/ }),
/***/ "./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?!./apps/text/src/components/MenuBubble.vue?vue&type=style&index=0&id=48157a56&scoped=true&lang=scss&":
/*!***************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** ./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??vue-loader-options!./apps/text/src/components/MenuBubble.vue?vue&type=style&index=0&id=48157a56&scoped=true&lang=scss& ***!
\***************************************************************************************************************************************************************************************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// Imports
var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(/*! ../../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js");
exports = ___CSS_LOADER_API_IMPORT___(false);
// Module
exports.push([module.i, ".menububble[data-v-48157a56] {\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: var(--border-radius);\n padding: 0;\n margin-bottom: 0.4rem;\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-48157a56] {\n opacity: 1;\n visibility: visible;\n}\n.menububble__button[data-v-48157a56] {\n display: block;\n border: 0;\n padding: 0.3rem 0.7rem;\n margin: 0;\n margin-right: 0.2rem;\n border-radius: var(--border-radius);\n cursor: pointer;\n}\n.menububble__button[data-v-48157a56]:last-child {\n margin-right: 0;\n}\n.menububble__buttontext[data-v-48157a56] {\n padding: 0.4rem;\n padding-right: 0;\n}\n.menububble__form[data-v-48157a56] {\n display: flex;\n align-items: center;\n}\n.menububble__input[data-v-48157a56] {\n font: inherit;\n border: none;\n background: transparent;\n min-width: 150px;\n}\n", ""]);
// Exports
module.exports = exports;
/***/ }),
/***/ "./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/vue-loader/lib/index.js?!./apps/text/src/components/MenuBubble.vue?vue&type=template&id=48157a56&scoped=true&":
/*!**************************************************************************************************************************************************************************************************************************!*\
!*** ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./apps/text/src/components/MenuBubble.vue?vue&type=template&id=48157a56&scoped=true& ***!
\**************************************************************************************************************************************************************************************************************************/
/*! exports provided: render, staticRenderFns */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "render", function() { return render; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return staticRenderFns; });
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) {
var commands = ref.commands
var isActive = ref.isActive
var getMarkAttrs = ref.getMarkAttrs
var menu = ref.menu
return [
_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
)
]
}
}
])
})
}
var staticRenderFns = []
render._withStripped = true
/***/ }),
/***/ "./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?!./apps/text/src/components/MenuBubble.vue?vue&type=style&index=0&id=48157a56&scoped=true&lang=scss&":
/*!***********************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** ./node_modules/vue-style-loader!./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??vue-loader-options!./apps/text/src/components/MenuBubble.vue?vue&type=style&index=0&id=48157a56&scoped=true&lang=scss& ***!
\***********************************************************************************************************************************************************************************************************************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// style-loader: Adds some css to the DOM by adding a <style> tag
// load the styles
var content = __webpack_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??vue-loader-options!./MenuBubble.vue?vue&type=style&index=0&id=48157a56&scoped=true&lang=scss& */ "./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?!./apps/text/src/components/MenuBubble.vue?vue&type=style&index=0&id=48157a56&scoped=true&lang=scss&");
if(typeof content === 'string') content = [[module.i, content, '']];
if(content.locals) module.exports = content.locals;
// add the styles to the DOM
var add = __webpack_require__(/*! ../../../../node_modules/vue-style-loader/lib/addStylesClient.js */ "./node_modules/vue-style-loader/lib/addStylesClient.js").default
var update = add("3f96e312", content, false, {});
// Hot Module Replacement
if(false) {}
/***/ })
}]);
//# sourceMappingURL=vue-editor-rich.js.map?v=4e5cb68d95c32b9eca9f