@ones-editor/editor 2.2.16-beta.8 → 2.2.16
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/@ones-editor/input-handlers/src/i18n/en-us.d.ts +1 -0
- package/@ones-editor/input-handlers/src/i18n/ja-jp.d.ts +1 -0
- package/@ones-editor/input-handlers/src/i18n/zh-cn.d.ts +1 -0
- package/@ones-editor/tsconfig.tsbuildinfo +1 -1
- package/@ones-editor/ui/src/locale/en-us.d.ts +2 -0
- package/@ones-editor/ui/src/locale/ja-jp.d.ts +2 -0
- package/@ones-editor/ui/src/locale/zh-cn.d.ts +2 -0
- package/dist/index.js +28 -13
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -84,10 +84,13 @@ div.editor-root div.editor-content .editor-input {
|
|
|
84
84
|
position: absolute;
|
|
85
85
|
opacity: 0;
|
|
86
86
|
pointer-events: none;
|
|
87
|
+
caret-color: transparent;
|
|
87
88
|
/* width cannot be too small, otherwise the input will not receive the compositionend message */
|
|
88
89
|
width: 16px;
|
|
89
90
|
height: 20px;
|
|
90
91
|
font-size: 16px;
|
|
92
|
+
white-space: nowrap;
|
|
93
|
+
overflow: hidden;
|
|
91
94
|
}
|
|
92
95
|
div.editor-root div.editor-content div[data-type=editor-container] {
|
|
93
96
|
position: relative;
|
|
@@ -50302,6 +50305,9 @@ ${codeText}
|
|
|
50302
50305
|
this.editor = editor;
|
|
50303
50306
|
}
|
|
50304
50307
|
handleBeforeKeyDown(editor, event) {
|
|
50308
|
+
if (!editor.isWritable()) {
|
|
50309
|
+
return false;
|
|
50310
|
+
}
|
|
50305
50311
|
const selectBlocks = editor.selection.range.getSelectedBlocks();
|
|
50306
50312
|
if (selectBlocks.length === 0) {
|
|
50307
50313
|
return false;
|
|
@@ -51377,7 +51383,7 @@ ${codeText}
|
|
|
51377
51383
|
this.form.linkText = createInput(content, {
|
|
51378
51384
|
label: i18n$1.t("link.textLabel"),
|
|
51379
51385
|
required: false,
|
|
51380
|
-
placeholder: i18n$1.t("link.textPlaceholder"),
|
|
51386
|
+
placeholder: clientType.isMobile ? i18n$1.t("link.mobileTextPlaceholder") : i18n$1.t("link.textPlaceholder"),
|
|
51381
51387
|
defaultValue: linkText,
|
|
51382
51388
|
suffixClose: clientType.isMobile,
|
|
51383
51389
|
onChange: this.onChange,
|
|
@@ -51388,7 +51394,7 @@ ${codeText}
|
|
|
51388
51394
|
className: "link-popup-gap",
|
|
51389
51395
|
label: i18n$1.t("link.urlLabel"),
|
|
51390
51396
|
required: true,
|
|
51391
|
-
placeholder: i18n$1.t("link.urlPlaceholder"),
|
|
51397
|
+
placeholder: clientType.isMobile ? i18n$1.t("link.mobileUrlPlaceholder") : i18n$1.t("link.urlPlaceholder"),
|
|
51392
51398
|
defaultValue: linkUrl,
|
|
51393
51399
|
suffixClose: clientType.isMobile,
|
|
51394
51400
|
onChange: this.onChange,
|
|
@@ -59891,6 +59897,8 @@ $$${mathData.mathjaxText}$$
|
|
|
59891
59897
|
urlLabel: "\u94FE\u63A5\u5730\u5740",
|
|
59892
59898
|
textPlaceholder: "\u8BF7\u8F93\u5165\u6587\u672C",
|
|
59893
59899
|
urlPlaceholder: "\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740",
|
|
59900
|
+
mobileTextPlaceholder: "\u8BF7\u8F93\u5165\u6587\u672C",
|
|
59901
|
+
mobileUrlPlaceholder: "\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740",
|
|
59894
59902
|
submitText: "\u786E\u5B9A",
|
|
59895
59903
|
cancelText: "\u53D6\u6D88",
|
|
59896
59904
|
edit: "\u7F16\u8F91",
|
|
@@ -59947,6 +59955,8 @@ $$${mathData.mathjaxText}$$
|
|
|
59947
59955
|
urlLabel: "URL",
|
|
59948
59956
|
textPlaceholder: "Please enter text",
|
|
59949
59957
|
urlPlaceholder: "Please enter URL",
|
|
59958
|
+
mobileTextPlaceholder: "Please enter text",
|
|
59959
|
+
mobileUrlPlaceholder: "Please enter URL",
|
|
59950
59960
|
submitText: "Confirm",
|
|
59951
59961
|
cancelText: "Cancel",
|
|
59952
59962
|
edit: "Edit",
|
|
@@ -60003,6 +60013,8 @@ $$${mathData.mathjaxText}$$
|
|
|
60003
60013
|
urlLabel: "URL",
|
|
60004
60014
|
textPlaceholder: "\u30C6\u30AD\u30B9\u30C8\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",
|
|
60005
60015
|
urlPlaceholder: "URL \u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044\u3002",
|
|
60016
|
+
mobileTextPlaceholder: "\u30C6\u30AD\u30B9\u30C8\u3092\u5165\u529B",
|
|
60017
|
+
mobileUrlPlaceholder: "URL \u3092\u5165\u529B",
|
|
60006
60018
|
submitText: "OK",
|
|
60007
60019
|
cancelText: "\u30AD\u30E3\u30F3\u30BB\u30EB",
|
|
60008
60020
|
edit: "\u7DE8\u96C6",
|
|
@@ -64123,6 +64135,7 @@ ${codeText}
|
|
|
64123
64135
|
heading: "Heading {heading}",
|
|
64124
64136
|
list: "List",
|
|
64125
64137
|
mention: "Quickly assign tasks and use @ to mention yourself or others",
|
|
64138
|
+
mobileMention: "Use @ to mention members",
|
|
64126
64139
|
quote: "Quote",
|
|
64127
64140
|
title: "Enter document title",
|
|
64128
64141
|
mobileDefault: "Type to add content"
|
|
@@ -64134,6 +64147,7 @@ ${codeText}
|
|
|
64134
64147
|
heading: "\u6807\u9898{heading}",
|
|
64135
64148
|
list: "\u5217\u8868",
|
|
64136
64149
|
mention: "\u5FEB\u901F\u5206\u914D\u4EFB\u52A1\uFF0C@\u63D0\u53CA\u81EA\u5DF1\u6216\u4ED6\u4EBA",
|
|
64150
|
+
mobileMention: "\u5FEB\u901F\u5206\u914D\u4EFB\u52A1\uFF0C@\u63D0\u53CA\u81EA\u5DF1\u6216\u4ED6\u4EBA",
|
|
64137
64151
|
quote: "\u5F15\u7528",
|
|
64138
64152
|
title: "\u8BF7\u8F93\u5165\u6587\u6863\u6807\u9898",
|
|
64139
64153
|
mobileDefault: "\u8F93\u5165\u4EE5\u6DFB\u52A0\u5185\u5BB9"
|
|
@@ -64145,6 +64159,7 @@ ${codeText}
|
|
|
64145
64159
|
heading: "\u898B\u51FA\u3057{heading}",
|
|
64146
64160
|
list: "\u30EA\u30B9\u30C8",
|
|
64147
64161
|
mention: "\u81EA\u5206\u3084\u30E1\u30F3\u30D0\u30FC\u3092\uFF20\u3057\u3001\u30BF\u30B9\u30AF\u3092\u7D20\u65E9\u304F\u5272\u308A\u5F53\u3066\u307E\u3059",
|
|
64162
|
+
mobileMention: "\u30E1\u30F3\u30D0\u30FC\u3092\uFF20\u3057\u3066\u30A2\u30B5\u30A4\u30F3\u3059\u308B",
|
|
64148
64163
|
quote: "\u5F15\u7528",
|
|
64149
64164
|
title: "\u30BF\u30A4\u30C8\u30EB\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",
|
|
64150
64165
|
mobileDefault: "\u30B3\u30F3\u30C6\u30F3\u30C4\u3092\u8FFD\u52A0\u3059\u308B\u306B\u306F\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044"
|
|
@@ -64208,7 +64223,7 @@ ${codeText}
|
|
|
64208
64223
|
if (listType === "ordered" || listType === "unordered") {
|
|
64209
64224
|
return i18n$1.t("placeholder.list");
|
|
64210
64225
|
}
|
|
64211
|
-
return i18n$1.t("placeholder.mention");
|
|
64226
|
+
return clientType.isMobile ? i18n$1.t("placeholder.mobileMention") : i18n$1.t("placeholder.mention");
|
|
64212
64227
|
}
|
|
64213
64228
|
function getTextKindBlockPlaceholder(block) {
|
|
64214
64229
|
const blockType = getBlockType(block);
|
|
@@ -82344,8 +82359,7 @@ ${content}
|
|
|
82344
82359
|
assert(logger$j, iframe.contentWindow, "iframe.contentWindow does not exist");
|
|
82345
82360
|
if (evt.data.length > 0) {
|
|
82346
82361
|
const msg = JSON.parse(evt.data);
|
|
82347
|
-
const xml = drawIoData.xmlSvg || drawIoData.xml;
|
|
82348
|
-
assert(logger$j, xml, "xml does not exist");
|
|
82362
|
+
const xml = drawIoData.xmlSvg || drawIoData.xml || "";
|
|
82349
82363
|
switch (msg.event) {
|
|
82350
82364
|
case "configure":
|
|
82351
82365
|
iframe.contentWindow.postMessage(JSON.stringify({
|
|
@@ -82418,12 +82432,13 @@ ${content}
|
|
|
82418
82432
|
const svg = await downloadSvgToString(editor, editor.doc.buildResourceUrl(data2.src));
|
|
82419
82433
|
if (svg) {
|
|
82420
82434
|
data2.xmlSvg = svg;
|
|
82435
|
+
} else {
|
|
82436
|
+
if (!data2.xml && !data2.xmlSvg) {
|
|
82437
|
+
showWarnToast();
|
|
82438
|
+
return;
|
|
82439
|
+
}
|
|
82421
82440
|
}
|
|
82422
82441
|
}
|
|
82423
|
-
if (!data2.xml && !data2.xmlSvg) {
|
|
82424
|
-
showWarnToast();
|
|
82425
|
-
return;
|
|
82426
|
-
}
|
|
82427
82442
|
const { drawioIframe, exit: exitIframe } = await initializeDrawioIframe(editor, block);
|
|
82428
82443
|
exclusiveBlock(editor, block);
|
|
82429
82444
|
const loaded = () => {
|
|
@@ -82673,7 +82688,7 @@ ${content}
|
|
|
82673
82688
|
abstract: "Flowchart/UML",
|
|
82674
82689
|
errorTips: "Flowchart/UML loading failed",
|
|
82675
82690
|
errorSubTips: "The network service is abnormal, you can",
|
|
82676
|
-
warnTips: "
|
|
82691
|
+
warnTips: "Failed to retrieve flowchart/UML resources, unable to edit.",
|
|
82677
82692
|
retry: "Try again",
|
|
82678
82693
|
save: "Saving"
|
|
82679
82694
|
}
|
|
@@ -82699,7 +82714,7 @@ ${content}
|
|
|
82699
82714
|
abstract: "\u30D5\u30ED\u30FC\u30C1\u30E3\u30FC\u30C8/UML",
|
|
82700
82715
|
errorTips: "\u30D5\u30ED\u30FC\u30C1\u30E3\u30FC\u30C8/UML \u306E\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u306B\u5931\u6557\u3057\u307E\u3057\u305F",
|
|
82701
82716
|
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 ",
|
|
82702
|
-
warnTips: "\
|
|
82717
|
+
warnTips: "\u7DE8\u96C6\u3067\u304D\u307E\u305B\u3093\u3002\u30D5\u30ED\u30FC\u30C1\u30E3\u30FC\u30C8/UML \u306E\u30EA\u30BD\u30FC\u30B9\u306E\u8AAD\u307F\u8FBC\u307F\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002",
|
|
82703
82718
|
retry: "\u518D\u8A66\u884C",
|
|
82704
82719
|
save: "\u4FDD\u5B58\u4E2D"
|
|
82705
82720
|
}
|
|
@@ -88471,7 +88486,7 @@ ${data2.flowchartText}
|
|
|
88471
88486
|
}
|
|
88472
88487
|
}
|
|
88473
88488
|
});
|
|
88474
|
-
editor.version = "2.2.16
|
|
88489
|
+
editor.version = "2.2.16";
|
|
88475
88490
|
return editor;
|
|
88476
88491
|
}
|
|
88477
88492
|
function isDoc(doc2) {
|
|
@@ -88566,7 +88581,7 @@ ${data2.flowchartText}
|
|
|
88566
88581
|
});
|
|
88567
88582
|
editor.addCustom(DOC_RE_AUTH_KEYS, (editor2) => new DocReAuthCallbacks(editor2));
|
|
88568
88583
|
OnesEditorToolbar.register(editor);
|
|
88569
|
-
editor.version = "2.2.16
|
|
88584
|
+
editor.version = "2.2.16";
|
|
88570
88585
|
return editor;
|
|
88571
88586
|
}
|
|
88572
88587
|
async function showDocVersions(editor, options, serverUrl) {
|