@seafile/sdoc-editor 0.1.160 → 0.1.161-beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/seafile-api.js +32 -9
- package/dist/basic-sdk/constants/index.js +25 -1
- package/dist/basic-sdk/editor/common-editor.js +50 -0
- package/dist/basic-sdk/editor/index.css +29 -0
- package/dist/basic-sdk/editor/index.js +125 -0
- package/dist/basic-sdk/{slate-editor.js → editor/slate-editor.js} +21 -16
- package/dist/basic-sdk/extension/constants/element-type.js +6 -1
- package/dist/basic-sdk/extension/core/transforms/replace-node-children.js +26 -0
- package/dist/basic-sdk/extension/render/render-element.js +221 -1
- package/dist/basic-sdk/socket/helpers.js +2 -0
- package/dist/basic-sdk/socket/socket-client.js +36 -0
- package/dist/basic-sdk/socket/socket-manager.js +25 -2
- package/dist/basic-sdk/socket/with-socket-io.js +30 -12
- package/dist/basic-sdk/utils/diff.js +4 -3
- package/dist/basic-sdk/utils/rebase.js +193 -0
- package/dist/basic-sdk/views/diff-viewer.js +3 -1
- package/dist/basic-sdk/views/viewer.js +9 -12
- package/dist/components/doc-operations/index.js +4 -2
- package/dist/components/doc-operations/revision-operations/index.js +5 -2
- package/dist/components/doc-operations/revision-operations/publish-button.js +6 -13
- package/dist/components/tip-dialog/index.css +6 -0
- package/dist/components/tip-dialog/index.js +65 -0
- package/dist/components/tip-dialog/tip-content.js +47 -0
- package/dist/constants/index.js +28 -2
- package/dist/context.js +44 -9
- package/dist/pages/simple-editor.js +264 -88
- package/package.json +1 -1
- package/public/locales/cs/sdoc-editor.json +16 -1
- package/public/locales/de/sdoc-editor.json +16 -1
- package/public/locales/en/sdoc-editor.json +14 -1
- package/public/locales/es/sdoc-editor.json +16 -1
- package/public/locales/fr/sdoc-editor.json +14 -1
- package/public/locales/it/sdoc-editor.json +17 -2
- package/public/locales/ru/sdoc-editor.json +15 -2
- package/public/locales/zh_CN/sdoc-editor.json +14 -1
- package/dist/basic-sdk/editor.js +0 -105
package/dist/constants/index.js
CHANGED
|
@@ -1,6 +1,32 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
|
+
var _TIP_TITLE, _TIP_CONTENT;
|
|
1
3
|
export var EXTERNAL_EVENT = {
|
|
2
4
|
INTERNAL_LINK_CLICK: 'internal_link_click',
|
|
3
5
|
TOGGLE_STAR: 'toggle_star',
|
|
4
6
|
UNMARK_AS_DRAFT: 'unmark_as_draft',
|
|
5
|
-
SHARE_SDOC: 'share_sdoc'
|
|
6
|
-
|
|
7
|
+
SHARE_SDOC: 'share_sdoc',
|
|
8
|
+
PUBLISH_DOCUMENT: 'publish_document',
|
|
9
|
+
PUBLISH_DOCUMENT_ERROR: 'publish_document_error',
|
|
10
|
+
DOCUMENT_REPLACED: 'document_replaced',
|
|
11
|
+
DOCUMENT_REPLACED_ERROR: 'document_replaced_error',
|
|
12
|
+
REMOVE_DOCUMENT: 'remove_document',
|
|
13
|
+
REMOVE_DOCUMENT_ERROR: 'remove_document_error'
|
|
14
|
+
};
|
|
15
|
+
export var MODE = {
|
|
16
|
+
DIFF_VIEWER: 'diff_viewer',
|
|
17
|
+
VIEWER: 'viewer',
|
|
18
|
+
EDITOR: 'editor'
|
|
19
|
+
};
|
|
20
|
+
export var TIP_TYPE = {
|
|
21
|
+
DELETE_NO_CHANGES_REVISION: 'delete_no_changes_revision',
|
|
22
|
+
MERGE: 'merge',
|
|
23
|
+
HAS_CONFLICT_BEFORE_PUBLISH: 'has_conflict_before_publish',
|
|
24
|
+
HAS_BEEN_PUBLISHED: 'has_been_published',
|
|
25
|
+
HAS_BEEN_REPLACED: 'has_been_merge',
|
|
26
|
+
HAS_CONFLICT_BEFORE_VIEW_CHANGES: 'has_conflict_before_view_changes',
|
|
27
|
+
HAS_BEEN_REMOVED: 'has_been_removed',
|
|
28
|
+
CHECKING: 'checking',
|
|
29
|
+
PUBLISHING: 'publishing'
|
|
30
|
+
};
|
|
31
|
+
export var TIP_TITLE = (_TIP_TITLE = {}, _defineProperty(_TIP_TITLE, TIP_TYPE.DELETE_NO_CHANGES_REVISION, 'Tip'), _defineProperty(_TIP_TITLE, TIP_TYPE.MERGE, 'Tip'), _defineProperty(_TIP_TITLE, TIP_TYPE.HAS_CONFLICT_BEFORE_PUBLISH, 'Tip'), _defineProperty(_TIP_TITLE, TIP_TYPE.HAS_BEEN_PUBLISHED, 'Tip'), _defineProperty(_TIP_TITLE, TIP_TYPE.HAS_BEEN_REPLACED, 'Tip'), _defineProperty(_TIP_TITLE, TIP_TYPE.HAS_CONFLICT_BEFORE_VIEW_CHANGES, 'Tip'), _defineProperty(_TIP_TITLE, TIP_TYPE.HAS_BEEN_REMOVED, 'Tip'), _defineProperty(_TIP_TITLE, TIP_TYPE.CHECKING, 'Tip'), _defineProperty(_TIP_TITLE, TIP_TYPE.PUBLISHING, 'Tip'), _TIP_TITLE);
|
|
32
|
+
export var TIP_CONTENT = (_TIP_CONTENT = {}, _defineProperty(_TIP_CONTENT, TIP_TYPE.DELETE_NO_CHANGES_REVISION, 'Rebase_delete_no_change_revision_tip'), _defineProperty(_TIP_CONTENT, TIP_TYPE.MERGE, 'Merge_tip'), _defineProperty(_TIP_CONTENT, TIP_TYPE.HAS_CONFLICT_BEFORE_PUBLISH, 'Has_conflict_before_publish_tip'), _defineProperty(_TIP_CONTENT, TIP_TYPE.HAS_BEEN_PUBLISHED, 'Has_been_published_tip'), _defineProperty(_TIP_CONTENT, TIP_TYPE.HAS_BEEN_REPLACED, 'Has_been_replaced_tip'), _defineProperty(_TIP_CONTENT, TIP_TYPE.HAS_CONFLICT_BEFORE_VIEW_CHANGES, 'Has_conflict_before_view_changes_tip'), _defineProperty(_TIP_CONTENT, TIP_TYPE.HAS_BEEN_REMOVED, 'Has_been_removed_tip'), _defineProperty(_TIP_CONTENT, TIP_TYPE.CHECKING, 'Checking'), _defineProperty(_TIP_CONTENT, TIP_TYPE.PUBLISHING, 'Publishing'), _TIP_CONTENT);
|
package/dist/context.js
CHANGED
|
@@ -9,6 +9,13 @@ var Context = /*#__PURE__*/function () {
|
|
|
9
9
|
_classCallCheck(this, Context);
|
|
10
10
|
this.initSettings = function () {
|
|
11
11
|
_this.settings = window.seafile ? window.seafile : window.seafileConfig;
|
|
12
|
+
if (_this.settings['isSdocRevision']) {
|
|
13
|
+
var repoID = _this.getSetting('repoID');
|
|
14
|
+
var siteRoot = _this.getSetting('siteRoot');
|
|
15
|
+
var originFilePath = _this.getSetting('originFilePath');
|
|
16
|
+
var originFileURL = "".concat(siteRoot, "lib/").concat(repoID, "/file").concat(originFilePath);
|
|
17
|
+
_this.settings['originFileURL'] = originFileURL;
|
|
18
|
+
}
|
|
12
19
|
};
|
|
13
20
|
this.uploadLocalImage = function (imageFile) {
|
|
14
21
|
var docUuid = _this.getSetting('docUuid');
|
|
@@ -45,6 +52,13 @@ var Context = /*#__PURE__*/function () {
|
|
|
45
52
|
if (this.settings[key] === false) return this.settings[key];
|
|
46
53
|
return this.settings[key] || '';
|
|
47
54
|
}
|
|
55
|
+
}, {
|
|
56
|
+
key: "updateSettings",
|
|
57
|
+
value: function updateSettings(update) {
|
|
58
|
+
for (var key in update) {
|
|
59
|
+
this.settings[key] = update[key];
|
|
60
|
+
}
|
|
61
|
+
}
|
|
48
62
|
}, {
|
|
49
63
|
key: "getViewConfig",
|
|
50
64
|
value: function getViewConfig() {
|
|
@@ -154,16 +168,10 @@ var Context = /*#__PURE__*/function () {
|
|
|
154
168
|
return this.api.startRevise(repoID, fileUuid, filePath);
|
|
155
169
|
}
|
|
156
170
|
}, {
|
|
157
|
-
key: "
|
|
158
|
-
value: function
|
|
159
|
-
var docUuid = this.getSetting('docUuid');
|
|
160
|
-
return this.api.sdocPublishRevision(docUuid);
|
|
161
|
-
}
|
|
162
|
-
}, {
|
|
163
|
-
key: "getSeadocRevisionDownloadLinks",
|
|
164
|
-
value: function getSeadocRevisionDownloadLinks() {
|
|
171
|
+
key: "getSeadocOriginFileContent",
|
|
172
|
+
value: function getSeadocOriginFileContent() {
|
|
165
173
|
var docUuid = this.getSetting('docUuid');
|
|
166
|
-
return this.api.
|
|
174
|
+
return this.api.getSeadocOriginFileContent(docUuid);
|
|
167
175
|
}
|
|
168
176
|
}, {
|
|
169
177
|
key: "getSdocRevisionsCount",
|
|
@@ -177,6 +185,33 @@ var Context = /*#__PURE__*/function () {
|
|
|
177
185
|
var docUuid = this.getSetting('docUuid');
|
|
178
186
|
return this.api.getSdocRevisions(docUuid, page, perPage);
|
|
179
187
|
}
|
|
188
|
+
}, {
|
|
189
|
+
key: "publishRevision",
|
|
190
|
+
value: function publishRevision() {
|
|
191
|
+
var docUuid = this.getSetting('docUuid');
|
|
192
|
+
return this.api.publishRevision(docUuid);
|
|
193
|
+
}
|
|
194
|
+
}, {
|
|
195
|
+
key: "updateSdocRevision",
|
|
196
|
+
value: function updateSdocRevision(sdocContent) {
|
|
197
|
+
var docUuid = this.getSetting('docUuid');
|
|
198
|
+
var docName = this.getSetting('docName');
|
|
199
|
+
return this.api.updateSdocRevision(docUuid, docName, sdocContent);
|
|
200
|
+
}
|
|
201
|
+
}, {
|
|
202
|
+
key: "deleteSdocRevision",
|
|
203
|
+
value: function deleteSdocRevision() {
|
|
204
|
+
var docUuid = this.getSetting('docUuid');
|
|
205
|
+
return this.api.deleteSdocRevision(docUuid);
|
|
206
|
+
}
|
|
207
|
+
}, {
|
|
208
|
+
key: "getRevisionBaseVersionContent",
|
|
209
|
+
value: function getRevisionBaseVersionContent() {
|
|
210
|
+
var docUuid = this.getSetting('docUuid');
|
|
211
|
+
return this.api.getRevisionBaseVersionContent(docUuid);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
// local files
|
|
180
215
|
}, {
|
|
181
216
|
key: "getSdocLocalFiles",
|
|
182
217
|
value: function getSdocLocalFiles(p, type) {
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
3
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
|
3
4
|
import React, { useCallback, useEffect, useRef, useState } from 'react';
|
|
4
5
|
import { withTranslation } from 'react-i18next';
|
|
5
|
-
import deepCopy from 'deep-copy';
|
|
6
|
-
import { SDocEditor, DiffViewer } from '../basic-sdk';
|
|
7
6
|
import Loading from '../components/loading';
|
|
8
7
|
import DocInfo from '../components/doc-info';
|
|
9
8
|
import DocOperations from '../components/doc-operations';
|
|
@@ -11,49 +10,126 @@ import Layout, { Header, Content } from '../layout';
|
|
|
11
10
|
import { generateDefaultDocContent } from '../utils';
|
|
12
11
|
import context from '../context';
|
|
13
12
|
import ErrorBoundary from './error-boundary';
|
|
13
|
+
import TipDialog from '../components/tip-dialog';
|
|
14
|
+
import { EXTERNAL_EVENT, MODE, TIP_TYPE } from '../constants';
|
|
15
|
+
import { getRebase, hasConflict } from '../basic-sdk/utils/rebase';
|
|
16
|
+
import toaster from '../components/toast';
|
|
17
|
+
import { EventBus, SDocEditor } from '../basic-sdk';
|
|
14
18
|
import '../assets/css/simple-editor.css';
|
|
15
19
|
var SimpleEditor = function SimpleEditor(_ref) {
|
|
16
20
|
var isStarred = _ref.isStarred,
|
|
17
21
|
isDraft = _ref.isDraft,
|
|
18
22
|
t = _ref.t;
|
|
23
|
+
context.initApi();
|
|
19
24
|
var editorRef = useRef(null);
|
|
20
25
|
var _useState = useState(true),
|
|
21
26
|
_useState2 = _slicedToArray(_useState, 2),
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
var _useState3 = useState(
|
|
27
|
+
isLoadingSdoc = _useState2[0],
|
|
28
|
+
setLoadingSdoc = _useState2[1];
|
|
29
|
+
var _useState3 = useState(''),
|
|
25
30
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
var _useState5 = useState(
|
|
31
|
+
errorMessage = _useState4[0],
|
|
32
|
+
setErrorMessage = _useState4[1];
|
|
33
|
+
var _useState5 = useState(false),
|
|
29
34
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
var _useState7 = useState(
|
|
35
|
+
isShowChanges = _useState6[0],
|
|
36
|
+
setShowChanges = _useState6[1];
|
|
37
|
+
var _useState7 = useState(null),
|
|
33
38
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
var _useState9 = useState(
|
|
39
|
+
document = _useState8[0],
|
|
40
|
+
setDocument = _useState8[1];
|
|
41
|
+
var _useState9 = useState(MODE.EDITOR),
|
|
37
42
|
_useState10 = _slicedToArray(_useState9, 2),
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
var _useState11 = useState(
|
|
43
|
+
mode = _useState10[0],
|
|
44
|
+
setMode = _useState10[1];
|
|
45
|
+
var _useState11 = useState([]),
|
|
41
46
|
_useState12 = _slicedToArray(_useState11, 2),
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
var _useState13 = useState(
|
|
47
|
+
changes = _useState12[0],
|
|
48
|
+
setChanges = _useState12[1];
|
|
49
|
+
var _useState13 = useState(false),
|
|
45
50
|
_useState14 = _slicedToArray(_useState13, 2),
|
|
46
|
-
|
|
47
|
-
|
|
51
|
+
showTip = _useState14[0],
|
|
52
|
+
setShowTip = _useState14[1];
|
|
53
|
+
var _useState15 = useState(''),
|
|
54
|
+
_useState16 = _slicedToArray(_useState15, 2),
|
|
55
|
+
tipType = _useState16[0],
|
|
56
|
+
setTipType = _useState16[1];
|
|
57
|
+
var _useState17 = useState([]),
|
|
58
|
+
_useState18 = _slicedToArray(_useState17, 2),
|
|
59
|
+
mergeValue = _useState18[0],
|
|
60
|
+
setMergeValue = _useState18[1];
|
|
48
61
|
useEffect(function () {
|
|
49
|
-
|
|
50
|
-
|
|
62
|
+
loadDocument(function (document) {
|
|
63
|
+
setDocument(document);
|
|
64
|
+
setLoadingSdoc(false);
|
|
65
|
+
}, function (errorMessage) {
|
|
66
|
+
setErrorMessage(errorMessage);
|
|
67
|
+
setDocument(null);
|
|
68
|
+
setLoadingSdoc(false);
|
|
69
|
+
}, function () {
|
|
70
|
+
setLoadingSdoc(true);
|
|
71
|
+
});
|
|
51
72
|
|
|
52
73
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
53
74
|
}, []);
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
75
|
+
|
|
76
|
+
// useMount: reset title
|
|
77
|
+
useEffect(function () {
|
|
78
|
+
var isSdocRevision = context.getSetting('isSdocRevision');
|
|
79
|
+
var originFilename = context.getSetting('originFilename');
|
|
80
|
+
if (isSdocRevision) {
|
|
81
|
+
window.document.getElementsByTagName('title')[0].innerText = "".concat(t('Revision'), " - ").concat(originFilename);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
85
|
+
}, []);
|
|
86
|
+
var onDocumentReplaced = useCallback(function () {
|
|
87
|
+
if (showTip) return;
|
|
88
|
+
setTipType(TIP_TYPE.HAS_BEEN_REPLACED);
|
|
89
|
+
setShowTip(true);
|
|
90
|
+
|
|
91
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
92
|
+
}, [editorRef, showTip]);
|
|
93
|
+
var hasPublishRevision = useCallback(function () {
|
|
94
|
+
if (showTip) return;
|
|
95
|
+
setTipType(TIP_TYPE.HAS_BEEN_PUBLISHED);
|
|
96
|
+
setShowTip(true);
|
|
97
|
+
|
|
98
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
99
|
+
}, [editorRef, showTip]);
|
|
100
|
+
var onError = useCallback(function () {
|
|
101
|
+
toaster.danger(t('Error'));
|
|
102
|
+
|
|
103
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
104
|
+
}, []);
|
|
105
|
+
var onDocumentRemoved = useCallback(function () {
|
|
106
|
+
if (showTip) return;
|
|
107
|
+
setTipType(TIP_TYPE.HAS_BEEN_REMOVED);
|
|
108
|
+
setShowTip(true);
|
|
109
|
+
|
|
110
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
111
|
+
}, [showTip]);
|
|
112
|
+
useEffect(function () {
|
|
113
|
+
var eventBus = EventBus.getInstance();
|
|
114
|
+
var unsubscribeMergeDocument = eventBus.subscribe(EXTERNAL_EVENT.DOCUMENT_REPLACED, onDocumentReplaced);
|
|
115
|
+
var unsubscribePublishDocument = eventBus.subscribe(EXTERNAL_EVENT.PUBLISH_DOCUMENT, hasPublishRevision);
|
|
116
|
+
var unsubscribeMergeDocumentError = eventBus.subscribe(EXTERNAL_EVENT.DOCUMENT_REPLACED_ERROR, onError);
|
|
117
|
+
var unsubscribePublishDocumentError = eventBus.subscribe(EXTERNAL_EVENT.PUBLISH_DOCUMENT_ERROR, onError);
|
|
118
|
+
var unsubscribeRemoveDocument = eventBus.subscribe(EXTERNAL_EVENT.REMOVE_DOCUMENT, onDocumentRemoved);
|
|
119
|
+
var unsubscribeRemoveDocumentError = eventBus.subscribe(EXTERNAL_EVENT.REMOVE_DOCUMENT_ERROR, onError);
|
|
120
|
+
return function () {
|
|
121
|
+
unsubscribeMergeDocument();
|
|
122
|
+
unsubscribePublishDocument();
|
|
123
|
+
unsubscribeMergeDocumentError();
|
|
124
|
+
unsubscribePublishDocumentError();
|
|
125
|
+
unsubscribeRemoveDocument();
|
|
126
|
+
unsubscribeRemoveDocumentError();
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
130
|
+
}, []);
|
|
131
|
+
var loadDocument = useCallback(function (successCallback, errorCallback, callback) {
|
|
132
|
+
callback && callback();
|
|
57
133
|
context.getFileContent().then(function (res) {
|
|
58
134
|
var result = res.data || generateDefaultDocContent();
|
|
59
135
|
if (result && !result.children) {
|
|
@@ -63,74 +139,181 @@ var SimpleEditor = function SimpleEditor(_ref) {
|
|
|
63
139
|
cursors: result.cursors || {}
|
|
64
140
|
};
|
|
65
141
|
}
|
|
66
|
-
|
|
67
|
-
setLoadingSdoc(false);
|
|
68
|
-
isFirstLoad && setFirstLoad(false);
|
|
142
|
+
successCallback && successCallback(result);
|
|
69
143
|
}).catch(function (error) {
|
|
70
144
|
// eslint-disable-next-line
|
|
71
145
|
console.log(error);
|
|
72
|
-
|
|
146
|
+
var errorMessage = 'Load_doc_content_error';
|
|
73
147
|
if (error && error.response) {
|
|
74
148
|
var _ref2 = error.response.data || {},
|
|
75
149
|
error_type = _ref2.error_type;
|
|
76
150
|
if (error_type === 'content_invalid') {
|
|
77
|
-
|
|
151
|
+
errorMessage = 'Sdoc_format_invalid';
|
|
78
152
|
}
|
|
79
153
|
}
|
|
80
|
-
|
|
81
|
-
setLoadingSdoc(false);
|
|
154
|
+
errorCallback && errorCallback(errorMessage);
|
|
82
155
|
});
|
|
83
|
-
|
|
84
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
85
156
|
}, []);
|
|
86
|
-
var
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
}).then(function (res) {
|
|
93
|
-
return res.json();
|
|
94
|
-
}).then(function (originContent) {
|
|
95
|
-
setLastContent(originContent);
|
|
96
|
-
setErrorMessage(null);
|
|
97
|
-
setLoadingSdoc(false);
|
|
157
|
+
var setDiffContent = useCallback(function () {
|
|
158
|
+
context.getSeadocOriginFileContent().then(function (res) {
|
|
159
|
+
var originContentString = res.data.content;
|
|
160
|
+
var originContent = JSON.parse(originContentString);
|
|
161
|
+
editorRef.current.setDiffContent(originContent);
|
|
162
|
+
editorRef.current.setLoading(false);
|
|
98
163
|
}).catch(function (error) {
|
|
99
|
-
|
|
100
|
-
setLoadingSdoc(false);
|
|
164
|
+
console.log('error');
|
|
101
165
|
});
|
|
102
|
-
|
|
103
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
104
|
-
}, [document]);
|
|
166
|
+
}, []);
|
|
105
167
|
var toggleViewChanges = useCallback(function (isShowChanges) {
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
168
|
+
var revisionContent = editorRef.current.getSlateValue();
|
|
169
|
+
if (isShowChanges && hasConflict(revisionContent.children)) {
|
|
170
|
+
setTipType(TIP_TYPE.HAS_CONFLICT_BEFORE_VIEW_CHANGES);
|
|
171
|
+
setShowTip(true);
|
|
172
|
+
return;
|
|
111
173
|
}
|
|
112
|
-
|
|
113
|
-
|
|
174
|
+
editorRef.current.setLoading(true);
|
|
175
|
+
setShowChanges(isShowChanges);
|
|
176
|
+
var mode = isShowChanges ? MODE.DIFF_VIEWER : MODE.EDITOR;
|
|
177
|
+
setMode(mode);
|
|
178
|
+
editorRef.current.setEditorMode(mode);
|
|
179
|
+
if (!isShowChanges) {
|
|
180
|
+
loadDocument(function (document) {
|
|
181
|
+
setDocument(document);
|
|
182
|
+
editorRef.current.setSlateValue(document);
|
|
183
|
+
editorRef.current.setLoading(false);
|
|
184
|
+
}, function (errorMessage) {
|
|
185
|
+
setErrorMessage(errorMessage);
|
|
186
|
+
editorRef.current.setLoading(false);
|
|
187
|
+
});
|
|
114
188
|
return;
|
|
115
189
|
}
|
|
116
|
-
|
|
117
|
-
initDocumentData(false);
|
|
190
|
+
setDiffContent();
|
|
118
191
|
|
|
119
192
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
120
|
-
}, [document]);
|
|
121
|
-
var
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
193
|
+
}, [document, editorRef.current]);
|
|
194
|
+
var publishRevision = useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
195
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
196
|
+
while (1) switch (_context.prev = _context.next) {
|
|
197
|
+
case 0:
|
|
198
|
+
setTipType(TIP_TYPE.CHECKING);
|
|
199
|
+
setShowTip(true);
|
|
200
|
+
loadDocument(function (document) {
|
|
201
|
+
var revisionContent = document;
|
|
202
|
+
if (hasConflict(revisionContent.children)) {
|
|
203
|
+
setTipType(TIP_TYPE.HAS_CONFLICT_BEFORE_PUBLISH);
|
|
204
|
+
setShowTip(true);
|
|
205
|
+
return;
|
|
206
|
+
}
|
|
207
|
+
var baseContent;
|
|
208
|
+
var masterContent;
|
|
209
|
+
context.getRevisionBaseVersionContent().then(function (res) {
|
|
210
|
+
var baseVersionContentString = res.data.content; // commit content
|
|
211
|
+
baseContent = JSON.parse(baseVersionContentString);
|
|
212
|
+
return context.getSeadocOriginFileContent();
|
|
213
|
+
}).then(function (res) {
|
|
214
|
+
var masterContentString = res.data.content;
|
|
215
|
+
masterContent = JSON.parse(masterContentString);
|
|
216
|
+
var _getRebase = getRebase(masterContent, baseContent, revisionContent),
|
|
217
|
+
canMerge = _getRebase.canMerge,
|
|
218
|
+
isNeedReplaceMaster = _getRebase.isNeedReplaceMaster,
|
|
219
|
+
value = _getRebase.value;
|
|
220
|
+
if (canMerge && isNeedReplaceMaster) {
|
|
221
|
+
setTipType(TIP_TYPE.PUBLISHING);
|
|
222
|
+
context.publishRevision().then(function (res) {
|
|
223
|
+
setTipType(TIP_TYPE.HAS_BEEN_PUBLISHED);
|
|
224
|
+
setShowTip(true);
|
|
225
|
+
}).catch(function (error) {
|
|
226
|
+
toaster.danger(t('Error'));
|
|
227
|
+
});
|
|
228
|
+
return;
|
|
229
|
+
}
|
|
230
|
+
if (canMerge && !isNeedReplaceMaster) {
|
|
231
|
+
setTipType(TIP_TYPE.DELETE_NO_CHANGES_REVISION);
|
|
232
|
+
setShowTip(true);
|
|
233
|
+
return;
|
|
234
|
+
}
|
|
235
|
+
setMergeValue(value);
|
|
236
|
+
setTipType(TIP_TYPE.MERGE);
|
|
237
|
+
setShowTip(true);
|
|
238
|
+
}).catch(function (error) {
|
|
239
|
+
toaster.danger(t('Error'));
|
|
240
|
+
});
|
|
241
|
+
}, function (errorMessage) {
|
|
242
|
+
toaster.danger(t(errorMessage));
|
|
243
|
+
});
|
|
244
|
+
|
|
245
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
246
|
+
case 3:
|
|
247
|
+
case "end":
|
|
248
|
+
return _context.stop();
|
|
249
|
+
}
|
|
250
|
+
}, _callee);
|
|
251
|
+
})), [isShowChanges, mode]);
|
|
125
252
|
var setDiffChanges = useCallback(function (diff) {
|
|
126
253
|
setChanges(diff.changes);
|
|
127
254
|
|
|
128
255
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
129
256
|
}, [isShowChanges]);
|
|
130
|
-
|
|
257
|
+
var jumpToURL = useCallback(function (url) {
|
|
258
|
+
window.location.href = url;
|
|
259
|
+
}, []);
|
|
260
|
+
var closeTip = useCallback(function () {
|
|
261
|
+
setShowTip(false);
|
|
262
|
+
|
|
263
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
264
|
+
}, [tipType]);
|
|
265
|
+
var tipSubmit = useCallback(function (callback) {
|
|
266
|
+
if (tipType === TIP_TYPE.DELETE_NO_CHANGES_REVISION) {
|
|
267
|
+
callback && callback(true);
|
|
268
|
+
context.deleteSdocRevision().then(function (res) {
|
|
269
|
+
callback && callback(false);
|
|
270
|
+
setShowTip(false);
|
|
271
|
+
var originFileURL = context.getSetting('originFileURL');
|
|
272
|
+
jumpToURL(originFileURL);
|
|
273
|
+
}).catch(function (error) {
|
|
274
|
+
callback && callback(false);
|
|
275
|
+
toaster.danger(t('Error'));
|
|
276
|
+
});
|
|
277
|
+
return;
|
|
278
|
+
}
|
|
279
|
+
if (tipType === TIP_TYPE.MERGE) {
|
|
280
|
+
callback && callback(true);
|
|
281
|
+
var _context$getUserInfo = context.getUserInfo(),
|
|
282
|
+
username = _context$getUserInfo.username;
|
|
283
|
+
var doc = {
|
|
284
|
+
children: mergeValue.children,
|
|
285
|
+
version: mergeValue.version,
|
|
286
|
+
format_version: document.format_version,
|
|
287
|
+
docName: document.docName,
|
|
288
|
+
last_modify_user: username
|
|
289
|
+
};
|
|
290
|
+
context.updateSdocRevision(doc).then(function (res) {
|
|
291
|
+
callback && callback(false);
|
|
292
|
+
var origin_file_version = res.data.origin_file_version;
|
|
293
|
+
context.updateSettings({
|
|
294
|
+
'originFileVersion': origin_file_version
|
|
295
|
+
});
|
|
296
|
+
editorRef.current.setLoading(true);
|
|
297
|
+
editorRef.current.setSlateValue(mergeValue);
|
|
298
|
+
editorRef.current.updateDocumentVersion(mergeValue);
|
|
299
|
+
setMode(MODE.EDITOR);
|
|
300
|
+
editorRef.current.setEditorMode(MODE.EDITOR);
|
|
301
|
+
editorRef.current.setLoading(false);
|
|
302
|
+
setShowTip(false);
|
|
303
|
+
}).catch(function (error) {
|
|
304
|
+
callback && callback(false);
|
|
305
|
+
toaster.danger(t('Error'));
|
|
306
|
+
});
|
|
307
|
+
return;
|
|
308
|
+
}
|
|
309
|
+
setShowTip(false);
|
|
310
|
+
|
|
311
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
312
|
+
}, [tipType, mergeValue, editorRef.current, document]);
|
|
313
|
+
if (isLoadingSdoc) {
|
|
131
314
|
return /*#__PURE__*/React.createElement(Loading, null);
|
|
132
315
|
}
|
|
133
|
-
if (
|
|
316
|
+
if (errorMessage) {
|
|
134
317
|
return /*#__PURE__*/React.createElement("div", {
|
|
135
318
|
className: "error-page"
|
|
136
319
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -144,24 +327,17 @@ var SimpleEditor = function SimpleEditor(_ref) {
|
|
|
144
327
|
}), /*#__PURE__*/React.createElement(DocOperations, {
|
|
145
328
|
isShowChanges: isShowChanges,
|
|
146
329
|
changes: changes,
|
|
147
|
-
toggleViewChanges: toggleViewChanges
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
}, /*#__PURE__*/React.createElement(Loading, null)), !isLoadingSdoc && errorMessage && /*#__PURE__*/React.createElement("div", {
|
|
151
|
-
className: "error-page"
|
|
152
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
153
|
-
className: "error-tip"
|
|
154
|
-
}, t(errorMessage))), !isLoadingSdoc && !errorMessage && /*#__PURE__*/React.createElement(React.Fragment, null, isShowChanges ? /*#__PURE__*/React.createElement(DiffViewer, {
|
|
155
|
-
showToolbar: true,
|
|
156
|
-
showOutline: true,
|
|
157
|
-
currentContent: currentContent,
|
|
158
|
-
lastContent: lastContent,
|
|
159
|
-
didMountCallback: setDiffChanges
|
|
160
|
-
}) : /*#__PURE__*/React.createElement(SDocEditor, {
|
|
161
|
-
config: context.getEditorConfig(),
|
|
162
|
-
document: document,
|
|
330
|
+
toggleViewChanges: toggleViewChanges,
|
|
331
|
+
publishRevision: publishRevision
|
|
332
|
+
})), /*#__PURE__*/React.createElement(Content, null, /*#__PURE__*/React.createElement(SDocEditor, {
|
|
163
333
|
ref: editorRef,
|
|
164
|
-
|
|
165
|
-
|
|
334
|
+
document: document,
|
|
335
|
+
mode: mode,
|
|
336
|
+
setDiffChanges: setDiffChanges
|
|
337
|
+
}))), showTip && /*#__PURE__*/React.createElement(TipDialog, {
|
|
338
|
+
toggle: closeTip,
|
|
339
|
+
submit: tipSubmit,
|
|
340
|
+
tipType: tipType
|
|
341
|
+
}));
|
|
166
342
|
};
|
|
167
343
|
export default withTranslation('sdoc-editor')(SimpleEditor);
|
package/package.json
CHANGED
|
@@ -347,6 +347,7 @@
|
|
|
347
347
|
"Icon_and_text_Link": "Icon and text Link",
|
|
348
348
|
"Card": "Card",
|
|
349
349
|
"Select_sdoc_document": "Select sdoc document",
|
|
350
|
+
"Select_file": "Select file",
|
|
350
351
|
"Local_file": "Local file",
|
|
351
352
|
"Internal_server_exec_operations_error": "An exception occurred on the server, please refresh the page and try again",
|
|
352
353
|
"Failed_to_sync_with_server_operations": "Synchronization with the server failed, please refresh the page",
|
|
@@ -362,5 +363,19 @@
|
|
|
362
363
|
"No_changes": "No changes",
|
|
363
364
|
"Title": "Název",
|
|
364
365
|
"Subtitle": "Subtitle",
|
|
365
|
-
"Link_sdoc": "Link sdoc"
|
|
366
|
+
"Link_sdoc": "Link sdoc",
|
|
367
|
+
"Link_file": "Link file",
|
|
368
|
+
"Keep_my_modification": "Keep my modification",
|
|
369
|
+
"Keep_other_modification": "Keep other's modification",
|
|
370
|
+
"Keep_both_modification": "Keep my modification",
|
|
371
|
+
"Tip": "Tip",
|
|
372
|
+
"Rebase_delete_no_change_revision_tip": "Revision has not made any change compared to original document. Do you want to delete this revision?",
|
|
373
|
+
"Has_been_replaced_tip": "Document content has been replaced. Please refresh the page.",
|
|
374
|
+
"Has_been_published_tip": "Revision has been published, Automatically jump to source content after {{ time }} seconds.",
|
|
375
|
+
"Has_conflict_before_publish_tip": "There are conflicts in the document, please resolve it before publishing!",
|
|
376
|
+
"Merge_tip": "There are conflicts in the documents. Do you want to merge them?",
|
|
377
|
+
"Has_conflict_before_view_changes_tip": "There are conflicts in the document. Please resolve the conflict before viewing the changes!",
|
|
378
|
+
"Has_been_removed_tip": "Document has been removed, please view other documents.",
|
|
379
|
+
"Checking": "Checking...",
|
|
380
|
+
"Publishing": "Publishing..."
|
|
366
381
|
}
|
|
@@ -347,6 +347,7 @@
|
|
|
347
347
|
"Icon_and_text_Link": "Icon and text Link",
|
|
348
348
|
"Card": "Card",
|
|
349
349
|
"Select_sdoc_document": "Select sdoc document",
|
|
350
|
+
"Select_file": "Select file",
|
|
350
351
|
"Local_file": "Local file",
|
|
351
352
|
"Internal_server_exec_operations_error": "An exception occurred on the server, please refresh the page and try again",
|
|
352
353
|
"Failed_to_sync_with_server_operations": "Synchronization with the server failed, please refresh the page",
|
|
@@ -362,5 +363,19 @@
|
|
|
362
363
|
"No_changes": "No changes",
|
|
363
364
|
"Title": "Titel",
|
|
364
365
|
"Subtitle": "Subtitle",
|
|
365
|
-
"Link_sdoc": "Link sdoc"
|
|
366
|
+
"Link_sdoc": "Link sdoc",
|
|
367
|
+
"Link_file": "Link file",
|
|
368
|
+
"Keep_my_modification": "Keep my modification",
|
|
369
|
+
"Keep_other_modification": "Keep other's modification",
|
|
370
|
+
"Keep_both_modification": "Keep my modification",
|
|
371
|
+
"Tip": "Tip",
|
|
372
|
+
"Rebase_delete_no_change_revision_tip": "Revision has not made any change compared to original document. Do you want to delete this revision?",
|
|
373
|
+
"Has_been_replaced_tip": "Document content has been replaced. Please refresh the page.",
|
|
374
|
+
"Has_been_published_tip": "Revision has been published, Automatically jump to source content after {{ time }} seconds.",
|
|
375
|
+
"Has_conflict_before_publish_tip": "There are conflicts in the document, please resolve it before publishing!",
|
|
376
|
+
"Merge_tip": "There are conflicts in the documents. Do you want to merge them?",
|
|
377
|
+
"Has_conflict_before_view_changes_tip": "There are conflicts in the document. Please resolve the conflict before viewing the changes!",
|
|
378
|
+
"Has_been_removed_tip": "Document has been removed, please view other documents.",
|
|
379
|
+
"Checking": "Checking...",
|
|
380
|
+
"Publishing": "Publishing..."
|
|
366
381
|
}
|
|
@@ -364,5 +364,18 @@
|
|
|
364
364
|
"Title": "Title",
|
|
365
365
|
"Subtitle": "Subtitle",
|
|
366
366
|
"Link_sdoc": "Link sdoc",
|
|
367
|
-
"Link_file": "Link file"
|
|
367
|
+
"Link_file": "Link file",
|
|
368
|
+
"Keep_my_modification": "Keep my modification",
|
|
369
|
+
"Keep_other_modification": "Keep other's modification",
|
|
370
|
+
"Keep_both_modification": "Keep my modification",
|
|
371
|
+
"Tip": "Tip",
|
|
372
|
+
"Rebase_delete_no_change_revision_tip": "Revision has not made any change compared to original document. Do you want to delete this revision?",
|
|
373
|
+
"Has_been_replaced_tip": "Document content has been replaced. Please refresh the page.",
|
|
374
|
+
"Has_been_published_tip": "Revision has been published, Automatically jump to source content after {{ time }} seconds.",
|
|
375
|
+
"Has_conflict_before_publish_tip": "There are conflicts in the document, please resolve it before publishing!",
|
|
376
|
+
"Merge_tip": "There are conflicts in the documents. Do you want to merge them?",
|
|
377
|
+
"Has_conflict_before_view_changes_tip": "There are conflicts in the document. Please resolve the conflict before viewing the changes!",
|
|
378
|
+
"Has_been_removed_tip": "Document has been removed, please view other documents.",
|
|
379
|
+
"Checking": "Checking...",
|
|
380
|
+
"Publishing": "Publishing..."
|
|
368
381
|
}
|