@ones-editor/editor 2.3.0-beta.12 → 2.3.0-beta.14
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.
|
@@ -7,17 +7,12 @@ export default class ErrorInfoBar {
|
|
|
7
7
|
private message;
|
|
8
8
|
private _hideTimer;
|
|
9
9
|
private _adjustParentInterval;
|
|
10
|
-
private _messageText;
|
|
11
10
|
private _type;
|
|
12
11
|
constructor(editor: OnesEditor);
|
|
13
|
-
show(message: string,
|
|
14
|
-
type: BarType;
|
|
15
|
-
customMessage?: string;
|
|
16
|
-
}): void;
|
|
12
|
+
show(message: string, type: BarType): void;
|
|
17
13
|
hide(): void;
|
|
18
14
|
visible(): boolean;
|
|
19
15
|
destroy(): void;
|
|
20
16
|
private findParent;
|
|
21
17
|
private autoAdjustParent;
|
|
22
|
-
private getErrorMessage;
|
|
23
18
|
}
|
package/dist/index.js
CHANGED
|
@@ -85522,8 +85522,7 @@ ${docStr}
|
|
|
85522
85522
|
drawioContainer.setAttribute("data-placeholder", i18n$1.t("drawio.loading"));
|
|
85523
85523
|
const clientId = editor.clientId;
|
|
85524
85524
|
const popupClass = ["editor-popup-info-container", `editor-popup-info-container-${clientId}`];
|
|
85525
|
-
|
|
85526
|
-
errorInfoContainer.setAttribute("data-custom-error-message", i18n$1.t("error.networkPopup"));
|
|
85525
|
+
createElement("div", popupClass, drawioContainer);
|
|
85527
85526
|
drawioIframe = createElement("iframe", ["drawio-iframe-element"], drawioContainer);
|
|
85528
85527
|
drawioIframe.setAttribute("frameborder", "0");
|
|
85529
85528
|
addClass(drawioContainer, SHOW_FULL_SCREEN_IFRAME);
|
|
@@ -85967,10 +85966,10 @@ ${docStr}
|
|
|
85967
85966
|
errorSubTips: "The network service is abnormal, you can",
|
|
85968
85967
|
retry: "Try again",
|
|
85969
85968
|
save: "Saving",
|
|
85970
|
-
exit: "
|
|
85969
|
+
exit: "Exit",
|
|
85971
85970
|
error: {
|
|
85972
|
-
exitConfirm: "
|
|
85973
|
-
exitMessage: "
|
|
85971
|
+
exitConfirm: "Exit editing",
|
|
85972
|
+
exitMessage: "Exiting editing will discard all changes. Are you sure you want to exit?"
|
|
85974
85973
|
}
|
|
85975
85974
|
}
|
|
85976
85975
|
};
|
|
@@ -86001,10 +86000,10 @@ ${docStr}
|
|
|
86001
86000
|
errorSubTips: "\u304A\u4F7F\u3044\u306E\u30CD\u30C3\u30C8\u30EF\u30FC\u30AF\u63A5\u7D9A\u306B\u554F\u984C\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002\u6B21\u306E\u64CD\u4F5C\u3092\u884C\u3063\u3066\u304F\u3060\u3055\u3044\u3002 ",
|
|
86002
86001
|
retry: "\u518D\u8A66\u884C",
|
|
86003
86002
|
save: "\u4FDD\u5B58\u4E2D",
|
|
86004
|
-
exit: "
|
|
86003
|
+
exit: "OK",
|
|
86005
86004
|
error: {
|
|
86006
|
-
exitConfirm: "\
|
|
86007
|
-
exitMessage: "\
|
|
86005
|
+
exitConfirm: "\u7DE8\u96C6\u3092\u7D42\u4E86",
|
|
86006
|
+
exitMessage: "\u7DE8\u96C6\u3092\u7D42\u4E86\u3059\u308B\u3068\u3001\u3059\u3079\u3066\u306E\u5909\u66F4\u304C\u5931\u308F\u308C\u307E\u3059\u3002\u3088\u308D\u3057\u3044\u3067\u3059\u304B\uFF1F"
|
|
86008
86007
|
}
|
|
86009
86008
|
}
|
|
86010
86009
|
};
|
|
@@ -88104,7 +88103,7 @@ ${data2.flowchartText}
|
|
|
88104
88103
|
},
|
|
88105
88104
|
error: {
|
|
88106
88105
|
retry: "\u91CD\u8BD5",
|
|
88107
|
-
network: "\
|
|
88106
|
+
network: "\u670D\u52A1\u8FDE\u63A5\u5F02\u5E38\uFF0C\u6B63\u5728\u5C1D\u8BD5\u91CD\u8FDE\u3002\u4E3A\u907F\u514D\u5185\u5BB9\u65E0\u6CD5\u540C\u6B65\uFF0C\u5DF2\u6682\u65F6\u7981\u7528\u7F16\u8F91\u3002\u8BF7\u5728\u670D\u52A1\u8FDE\u63A5\u540E\u7EE7\u7EED\u3002",
|
|
88108
88107
|
networkPopup: "\u670D\u52A1\u8FDE\u63A5\u5F02\u5E38\uFF0C\u6B63\u5728\u5C1D\u8BD5\u91CD\u8FDE...",
|
|
88109
88108
|
uploadResourceError: "\u6570\u636E\u4FDD\u5B58\u5F02\u5E38",
|
|
88110
88109
|
uploadResourceErrorMessage: "\u8D44\u6E90\u4FDD\u5B58\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",
|
|
@@ -88133,12 +88132,12 @@ ${data2.flowchartText}
|
|
|
88133
88132
|
},
|
|
88134
88133
|
error: {
|
|
88135
88134
|
retry: "Try again",
|
|
88136
|
-
network: "
|
|
88137
|
-
networkPopup: "
|
|
88138
|
-
uploadResourceError: "
|
|
88139
|
-
uploadResourceErrorMessage: "
|
|
88140
|
-
uploadResourcePopup: "
|
|
88141
|
-
uploadResourceNoPopup: "
|
|
88135
|
+
network: "Service connection lost, trying to reconnect. Editing is temporarily disabled to prevent unsynced content. Please continue once the connection is restored.",
|
|
88136
|
+
networkPopup: "Service connection lost, trying to reconnect...",
|
|
88137
|
+
uploadResourceError: "Unable to save data",
|
|
88138
|
+
uploadResourceErrorMessage: "Resource upload failed, please retry later.",
|
|
88139
|
+
uploadResourcePopup: "Resource upload error. Unable to save data. Please copy any unsaved changes and refresh the page to try again.",
|
|
88140
|
+
uploadResourceNoPopup: "Resource upload error. Editing is temporarily disabled to prevent data loss. Please copy any unsaved changes and refresh the page to try again."
|
|
88142
88141
|
}
|
|
88143
88142
|
};
|
|
88144
88143
|
const jaJP$1 = {
|
|
@@ -88162,12 +88161,12 @@ ${data2.flowchartText}
|
|
|
88162
88161
|
},
|
|
88163
88162
|
error: {
|
|
88164
88163
|
retry: "\u518D\u8A66\u884C",
|
|
88165
|
-
network: "\
|
|
88166
|
-
networkPopup: "\
|
|
88167
|
-
uploadResourceError: "\
|
|
88168
|
-
uploadResourceErrorMessage: "\
|
|
88169
|
-
uploadResourcePopup: "\
|
|
88170
|
-
uploadResourceNoPopup: "\
|
|
88164
|
+
network: "\u30B5\u30FC\u30D3\u30B9\u3078\u306E\u63A5\u7D9A\u304C\u5207\u65AD\u3055\u308C\u307E\u3057\u305F\u3002\u7DE8\u96C6\u3059\u308B\u5185\u5BB9\u306E\u540C\u671F\u304C\u5931\u6557\u3057\u306A\u3044\u3088\u3046\u306B\u3001\u7DE8\u96C6\u6A5F\u80FD\u304C\u4E00\u6642\u5229\u7528\u3067\u304D\u306A\u3044\u72B6\u614B\u306B\u306A\u3063\u3066\u3044\u307E\u3059\u3002\u30B5\u30FC\u30D3\u30B9\u3078\u306E\u63A5\u7D9A\u304C\u56DE\u5FA9\u3059\u308B\u307E\u3067\u304A\u5F85\u3061\u304F\u3060\u3055\u3044\u3002",
|
|
88165
|
+
networkPopup: "\u30B5\u30FC\u30D3\u30B9\u3078\u306E\u63A5\u7D9A\u304C\u5207\u65AD\u3055\u308C\u307E\u3057\u305F\u3002\u518D\u63A5\u7D9A\u3092\u8A66\u307F\u3066\u3044\u307E\u3059...",
|
|
88166
|
+
uploadResourceError: "\u30C7\u30FC\u30BF\u3092\u4FDD\u5B58\u3067\u304D\u307E\u305B\u3093",
|
|
88167
|
+
uploadResourceErrorMessage: "\u30EA\u30BD\u30FC\u30B9\u306E\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002\u3057\u3070\u3089\u304F\u3057\u3066\u304B\u3089\u3082\u3046\u4E00\u5EA6\u304A\u8A66\u3057\u304F\u3060\u3055\u3044\u3002",
|
|
88168
|
+
uploadResourcePopup: "\u30EA\u30BD\u30FC\u30B9\u306E\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002\u30C7\u30FC\u30BF\u3092\u4FDD\u5B58\u3067\u304D\u307E\u305B\u3093\u3002\u4FDD\u5B58\u3055\u308C\u3066\u3044\u306A\u3044\u5909\u66F4\u3092\u30B3\u30D4\u30FC\u3057\u3066\u3001\u30DA\u30FC\u30B8\u3092\u66F4\u65B0\u3057\u3066\u304F\u3060\u3055\u3044\u3002",
|
|
88169
|
+
uploadResourceNoPopup: "\u30EA\u30BD\u30FC\u30B9\u306E\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002\u30C7\u30FC\u30BF\u640D\u5931\u3092\u9632\u3050\u305F\u3081\u306B\u3001\u7DE8\u96C6\u3092\u4E00\u6642\u7684\u306B\u7121\u52B9\u306B\u3057\u307E\u3057\u305F\u3002\u4FDD\u5B58\u3055\u308C\u3066\u3044\u306A\u3044\u5909\u66F4\u3092\u30B3\u30D4\u30FC\u3057\u3066\u3001\u30DA\u30FC\u30B8\u3092\u66F4\u65B0\u3057\u3066\u304F\u3060\u3055\u3044\u3002"
|
|
88171
88170
|
}
|
|
88172
88171
|
};
|
|
88173
88172
|
i18n$1.mergeLang({
|
|
@@ -88215,7 +88214,6 @@ ${data2.flowchartText}
|
|
|
88215
88214
|
__publicField(this, "message");
|
|
88216
88215
|
__publicField(this, "_hideTimer", null);
|
|
88217
88216
|
__publicField(this, "_adjustParentInterval", null);
|
|
88218
|
-
__publicField(this, "_messageText", "");
|
|
88219
88217
|
__publicField(this, "_type", "error");
|
|
88220
88218
|
this.editor = editor;
|
|
88221
88219
|
const root2 = createElement("div", ["error-info-bar"], null);
|
|
@@ -88224,14 +88222,13 @@ ${data2.flowchartText}
|
|
|
88224
88222
|
const message = createElement("div", ["message"], content);
|
|
88225
88223
|
this.message = message;
|
|
88226
88224
|
}
|
|
88227
|
-
show(message,
|
|
88228
|
-
this.
|
|
88229
|
-
this._type = options.type;
|
|
88225
|
+
show(message, type) {
|
|
88226
|
+
this._type = type;
|
|
88230
88227
|
const parent = this.findParent();
|
|
88231
88228
|
if (this.root.parentElement !== parent) {
|
|
88232
88229
|
parent.insertAdjacentElement("afterbegin", this.root);
|
|
88233
88230
|
}
|
|
88234
|
-
this.message.innerText =
|
|
88231
|
+
this.message.innerText = message;
|
|
88235
88232
|
removeClass(this.root, "hidden");
|
|
88236
88233
|
this.root.setAttribute("data-type", this._type);
|
|
88237
88234
|
if (this._hideTimer) {
|
|
@@ -88299,13 +88296,6 @@ ${data2.flowchartText}
|
|
|
88299
88296
|
currentParent.insertAdjacentElement("afterbegin", this.root);
|
|
88300
88297
|
}, 1e3);
|
|
88301
88298
|
}
|
|
88302
|
-
getErrorMessage(parent) {
|
|
88303
|
-
const customErrorMessage = parent.getAttribute("data-custom-error-message");
|
|
88304
|
-
if (customErrorMessage && this._type === "error") {
|
|
88305
|
-
return customErrorMessage;
|
|
88306
|
-
}
|
|
88307
|
-
return this._messageText;
|
|
88308
|
-
}
|
|
88309
88299
|
}
|
|
88310
88300
|
const logger$6 = getLogger("error-handler");
|
|
88311
88301
|
class DefaultErrorHandler {
|
|
@@ -88401,10 +88391,9 @@ ${data2.flowchartText}
|
|
|
88401
88391
|
if (this._editor) {
|
|
88402
88392
|
this._editor.readonly = true;
|
|
88403
88393
|
}
|
|
88404
|
-
this.
|
|
88405
|
-
|
|
88406
|
-
|
|
88407
|
-
});
|
|
88394
|
+
const defaultMessage = this.hasPopup() ? i18n$1.t("error.networkPopup") : i18n$1.t("error.network");
|
|
88395
|
+
const errorMessage = customMessage || defaultMessage;
|
|
88396
|
+
this.bar.show(errorMessage, "error");
|
|
88408
88397
|
}
|
|
88409
88398
|
autoHide() {
|
|
88410
88399
|
var _a;
|
|
@@ -90776,7 +90765,7 @@ ${data2.flowchartText}
|
|
|
90776
90765
|
}
|
|
90777
90766
|
}
|
|
90778
90767
|
});
|
|
90779
|
-
editor.version = "2.3.0-beta.
|
|
90768
|
+
editor.version = "2.3.0-beta.14";
|
|
90780
90769
|
return editor;
|
|
90781
90770
|
}
|
|
90782
90771
|
function isDoc(doc2) {
|
|
@@ -90883,7 +90872,7 @@ ${data2.flowchartText}
|
|
|
90883
90872
|
}
|
|
90884
90873
|
});
|
|
90885
90874
|
OnesEditorToolbar.register(editor);
|
|
90886
|
-
editor.version = "2.3.0-beta.
|
|
90875
|
+
editor.version = "2.3.0-beta.14";
|
|
90887
90876
|
return editor;
|
|
90888
90877
|
}
|
|
90889
90878
|
async function showDocVersions(editor, options, serverUrl) {
|