@ones-editor/editor 2.1.1-beta.66 → 2.1.1-beta.67
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 +15 -16
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -65000,7 +65000,7 @@ ${codeText}
|
|
|
65000
65000
|
}
|
|
65001
65001
|
get commands() {
|
|
65002
65002
|
var _a, _b, _c, _d;
|
|
65003
|
-
if (
|
|
65003
|
+
if (clientType.isMobile) {
|
|
65004
65004
|
return [];
|
|
65005
65005
|
}
|
|
65006
65006
|
let standardCommands = [];
|
|
@@ -82235,7 +82235,7 @@ ${content}
|
|
|
82235
82235
|
}
|
|
82236
82236
|
function getBlockProperties$5(editor, block) {
|
|
82237
82237
|
const properties = getStandardEmbedBlockProperties(editor, block, {
|
|
82238
|
-
presetIds: ["add-comment"],
|
|
82238
|
+
presetIds: editor.readonly ? [] : ["add-comment"],
|
|
82239
82239
|
extCommands: [{
|
|
82240
82240
|
id: "refresh",
|
|
82241
82241
|
name: i18n$1.t("webpage.command.refresh"),
|
|
@@ -83041,9 +83041,6 @@ ${content}
|
|
|
83041
83041
|
return false;
|
|
83042
83042
|
},
|
|
83043
83043
|
extCommands: (editor2, block2) => {
|
|
83044
|
-
if (editor2.readonly) {
|
|
83045
|
-
return [];
|
|
83046
|
-
}
|
|
83047
83044
|
const blockContent = getBlockContent(block2);
|
|
83048
83045
|
const drawioImg = blockContent.querySelector(".editor-drawio-content img");
|
|
83049
83046
|
return [{
|
|
@@ -83053,8 +83050,8 @@ ${content}
|
|
|
83053
83050
|
states: !drawioImg ? ["disabled"] : []
|
|
83054
83051
|
}];
|
|
83055
83052
|
},
|
|
83056
|
-
presetIds: ["edit"],
|
|
83057
|
-
extIds: ["separator", "add-comment"]
|
|
83053
|
+
presetIds: editor.readonly ? [] : ["edit"],
|
|
83054
|
+
extIds: editor.readonly ? [] : ["separator", "add-comment"]
|
|
83058
83055
|
});
|
|
83059
83056
|
return { ...properties, abstract: i18n$1.t("drawio.abstract") };
|
|
83060
83057
|
}
|
|
@@ -83288,12 +83285,17 @@ ${content}
|
|
|
83288
83285
|
plantuml: "https://plantuml.com/"
|
|
83289
83286
|
};
|
|
83290
83287
|
class GraphBlockCommands {
|
|
83291
|
-
constructor(graphType, properties) {
|
|
83292
|
-
|
|
83293
|
-
__publicField(this, "extIds", ["separator", "add-comment"]);
|
|
83288
|
+
constructor(editor, graphType, properties) {
|
|
83289
|
+
this.editor = editor;
|
|
83294
83290
|
this.graphType = graphType;
|
|
83295
83291
|
this.properties = properties;
|
|
83296
83292
|
}
|
|
83293
|
+
get presetIds() {
|
|
83294
|
+
return this.editor.readonly ? [] : ["edit"];
|
|
83295
|
+
}
|
|
83296
|
+
get extIds() {
|
|
83297
|
+
return this.editor.readonly ? [] : ["separator", "add-comment"];
|
|
83298
|
+
}
|
|
83297
83299
|
extCommands(editor, block) {
|
|
83298
83300
|
const commands = [
|
|
83299
83301
|
{
|
|
@@ -83302,9 +83304,6 @@ ${content}
|
|
|
83302
83304
|
icon: HelpIcon
|
|
83303
83305
|
}
|
|
83304
83306
|
];
|
|
83305
|
-
if (editor.readonly) {
|
|
83306
|
-
return commands;
|
|
83307
|
-
}
|
|
83308
83307
|
const blockContent = getBlockContent(block);
|
|
83309
83308
|
const graphImg = blockContent.querySelector("img.graph-embed-image");
|
|
83310
83309
|
const graphImgSrc = graphImg == null ? void 0 : graphImg.src;
|
|
@@ -83336,7 +83335,7 @@ ${content}
|
|
|
83336
83335
|
}
|
|
83337
83336
|
}
|
|
83338
83337
|
function getGraphEmbedBlockProperties(editor, block, type, properties) {
|
|
83339
|
-
const standardProperties = getStandardEmbedBlockProperties(editor, block, new GraphBlockCommands(type, properties));
|
|
83338
|
+
const standardProperties = getStandardEmbedBlockProperties(editor, block, new GraphBlockCommands(editor, type, properties));
|
|
83340
83339
|
return { ...standardProperties, abstract: lodash.exports.capitalize(type) };
|
|
83341
83340
|
}
|
|
83342
83341
|
class GraphBase {
|
|
@@ -86773,7 +86772,7 @@ ${data2.flowchartText}
|
|
|
86773
86772
|
}
|
|
86774
86773
|
}
|
|
86775
86774
|
});
|
|
86776
|
-
editor.version = "2.1.1-beta.
|
|
86775
|
+
editor.version = "2.1.1-beta.67";
|
|
86777
86776
|
if (Logger$2.level === LogLevel.DEBUG) {
|
|
86778
86777
|
window.setReauthFail = (fail) => {
|
|
86779
86778
|
window.isReauthError = fail;
|
|
@@ -86871,7 +86870,7 @@ ${data2.flowchartText}
|
|
|
86871
86870
|
});
|
|
86872
86871
|
editor.addCustom(DOC_RE_AUTH_KEYS, (editor2) => new DocReAuthCallbacks(editor2));
|
|
86873
86872
|
OnesEditorToolbar.register(editor);
|
|
86874
|
-
editor.version = "2.1.1-beta.
|
|
86873
|
+
editor.version = "2.1.1-beta.67";
|
|
86875
86874
|
return editor;
|
|
86876
86875
|
}
|
|
86877
86876
|
async function showDocVersions(editor, options, serverUrl) {
|