@ones-editor/editor 2.1.1-beta.40 → 2.1.1-beta.42
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/tsconfig.tsbuildinfo +1 -1
- package/dist/index.js +20 -11
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -45992,7 +45992,7 @@ ${codeText}
|
|
|
45992
45992
|
return children;
|
|
45993
45993
|
}
|
|
45994
45994
|
getAvailableCommands(editor, block, range, params) {
|
|
45995
|
-
const disable = !isTextKindBlock(editor, block);
|
|
45995
|
+
const disable = !isTextKindBlock(editor, block) || isTitleBlock$2(block);
|
|
45996
45996
|
if (disable && (params == null ? void 0 : params.isFilter)) {
|
|
45997
45997
|
return [];
|
|
45998
45998
|
}
|
|
@@ -48631,7 +48631,7 @@ ${codeText}
|
|
|
48631
48631
|
return commands;
|
|
48632
48632
|
}
|
|
48633
48633
|
getAvailableCommands(editor, block, range, params) {
|
|
48634
|
-
const disabled = !isTextKindBlock(editor, block) || isSelectBoxOnly(editor);
|
|
48634
|
+
const disabled = !isTextKindBlock(editor, block) || isSelectBoxOnly(editor) || isTitleBlock$2(block);
|
|
48635
48635
|
if (disabled && (params == null ? void 0 : params.isFilter)) {
|
|
48636
48636
|
return [];
|
|
48637
48637
|
}
|
|
@@ -48733,7 +48733,7 @@ ${codeText}
|
|
|
48733
48733
|
this.editor = editor;
|
|
48734
48734
|
}
|
|
48735
48735
|
getAvailableCommands(editor, block, range, params) {
|
|
48736
|
-
const disabled = !isTextKindBlock(editor, block) || isSelectBoxOnly(editor);
|
|
48736
|
+
const disabled = !isTextKindBlock(editor, block) || isSelectBoxOnly(editor) || isTitleBlock$2(block);
|
|
48737
48737
|
if (disabled && (params == null ? void 0 : params.isFilter)) {
|
|
48738
48738
|
return [];
|
|
48739
48739
|
}
|
|
@@ -49044,7 +49044,7 @@ ${codeText}
|
|
|
49044
49044
|
class LinkProvider {
|
|
49045
49045
|
constructor(editor) {
|
|
49046
49046
|
__publicField(this, "id", "LinkProvider");
|
|
49047
|
-
__publicField(this, "isDisabled", (editor, block, range) => isSelectBoxOnly(editor) || !editor.selection.range.isSimple() || getAllSelectedBlocks(editor).length > 1);
|
|
49047
|
+
__publicField(this, "isDisabled", (editor, block, range) => isSelectBoxOnly(editor) || !editor.selection.range.isSimple() || getAllSelectedBlocks(editor).length > 1 || isTitleBlock$2(block));
|
|
49048
49048
|
__publicField(this, "getAvailableCommands", (editor, block, range, params) => {
|
|
49049
49049
|
const disabled = this.isDisabled(editor, block, range);
|
|
49050
49050
|
if (disabled && (params == null ? void 0 : params.isFilter)) {
|
|
@@ -49146,6 +49146,9 @@ ${codeText}
|
|
|
49146
49146
|
if (isSelectBoxOnly(this.editor)) {
|
|
49147
49147
|
return true;
|
|
49148
49148
|
}
|
|
49149
|
+
if (isTitleBlock$2(block)) {
|
|
49150
|
+
return true;
|
|
49151
|
+
}
|
|
49149
49152
|
return false;
|
|
49150
49153
|
}
|
|
49151
49154
|
getAvailableCommands(editor, block, range, params) {
|
|
@@ -58127,7 +58130,7 @@ $$${mathData.mathjaxText}$$
|
|
|
58127
58130
|
this.editor = editor;
|
|
58128
58131
|
}
|
|
58129
58132
|
getAvailableCommands(editor, block, range, params) {
|
|
58130
|
-
const disable = !isTextKindBlock(editor, block) || isSelectBoxOnly(editor);
|
|
58133
|
+
const disable = !isTextKindBlock(editor, block) || isSelectBoxOnly(editor) || isTitleBlock$2(block);
|
|
58131
58134
|
if (disable && (params == null ? void 0 : params.isFilter)) {
|
|
58132
58135
|
return [];
|
|
58133
58136
|
}
|
|
@@ -58220,7 +58223,7 @@ $$${mathData.mathjaxText}$$
|
|
|
58220
58223
|
return this.editor.getCustom("block-attributes-handler");
|
|
58221
58224
|
}
|
|
58222
58225
|
getAvailableCommands(editor, block, range, params) {
|
|
58223
|
-
const disable = !isTextKindBlock(editor, block) || isSelectBoxOnly(editor);
|
|
58226
|
+
const disable = !isTextKindBlock(editor, block) || isSelectBoxOnly(editor) || isTitleBlock$2(block);
|
|
58224
58227
|
if (disable && (params == null ? void 0 : params.isFilter)) {
|
|
58225
58228
|
return [];
|
|
58226
58229
|
}
|
|
@@ -58272,7 +58275,7 @@ $$${mathData.mathjaxText}$$
|
|
|
58272
58275
|
this.editor = editor;
|
|
58273
58276
|
}
|
|
58274
58277
|
getAvailableCommands(editor, block, range, params) {
|
|
58275
|
-
const disable = !isTextKindBlock(editor, block) || isSelectBoxOnly(editor);
|
|
58278
|
+
const disable = !isTextKindBlock(editor, block) || isSelectBoxOnly(editor) || isTitleBlock$2(block);
|
|
58276
58279
|
if (disable && (params == null ? void 0 : params.isFilter)) {
|
|
58277
58280
|
return [];
|
|
58278
58281
|
}
|
|
@@ -58514,14 +58517,13 @@ $$${mathData.mathjaxText}$$
|
|
|
58514
58517
|
this.editor = editor;
|
|
58515
58518
|
}
|
|
58516
58519
|
getAvailableCommands(editor, block, range, params) {
|
|
58517
|
-
const disable = !isTextKindBlock(editor, block) || isSelectBoxOnly(editor);
|
|
58520
|
+
const disable = !isTextKindBlock(editor, block) || isSelectBoxOnly(editor) || isTitleBlock$2(block);
|
|
58518
58521
|
if (disable && (params == null ? void 0 : params.isFilter)) {
|
|
58519
58522
|
return [];
|
|
58520
58523
|
}
|
|
58521
58524
|
let commands = [{
|
|
58522
58525
|
id: "style-code",
|
|
58523
58526
|
name: i18n$1.t("commands.code"),
|
|
58524
|
-
states: disable && !(params == null ? void 0 : params.isFilter) ? ["disabled"] : [],
|
|
58525
58527
|
icon: InlineCodeIcon
|
|
58526
58528
|
}];
|
|
58527
58529
|
if (getBlockTextLength$6(editor, block) === 0 || !isTextKindBlock(editor, block)) {
|
|
@@ -58530,6 +58532,13 @@ $$${mathData.mathjaxText}$$
|
|
|
58530
58532
|
const subText2 = getSubText(editor, block, range);
|
|
58531
58533
|
commands = getStandardTextStyles(commands, subText2);
|
|
58532
58534
|
}
|
|
58535
|
+
if (!(params == null ? void 0 : params.isFilter)) {
|
|
58536
|
+
commands.forEach((item) => {
|
|
58537
|
+
if (disable) {
|
|
58538
|
+
item.states = ["disabled"];
|
|
58539
|
+
}
|
|
58540
|
+
});
|
|
58541
|
+
}
|
|
58533
58542
|
return commands;
|
|
58534
58543
|
}
|
|
58535
58544
|
getInsertCommands() {
|
|
@@ -85036,7 +85045,7 @@ ${data2.flowchartText}
|
|
|
85036
85045
|
}
|
|
85037
85046
|
}
|
|
85038
85047
|
});
|
|
85039
|
-
editor.version = "2.1.1-beta.
|
|
85048
|
+
editor.version = "2.1.1-beta.42";
|
|
85040
85049
|
if (Logger$2.level === LogLevel.DEBUG) {
|
|
85041
85050
|
window.setReauthFail = (fail) => {
|
|
85042
85051
|
window.isReauthError = fail;
|
|
@@ -85135,7 +85144,7 @@ ${data2.flowchartText}
|
|
|
85135
85144
|
});
|
|
85136
85145
|
editor.addCustom(DOC_RE_AUTH_KEYS, (editor2) => new DocReAuthCallbacks(editor2));
|
|
85137
85146
|
OnesEditorToolbar.register(editor);
|
|
85138
|
-
editor.version = "2.1.1-beta.
|
|
85147
|
+
editor.version = "2.1.1-beta.42";
|
|
85139
85148
|
return editor;
|
|
85140
85149
|
}
|
|
85141
85150
|
async function showDocVersions(editor, options, serverUrl) {
|