@ones-editor/editor 1.1.16-beta.16 → 1.1.16-beta.18
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/index.js
CHANGED
|
@@ -26425,26 +26425,23 @@ ${codeText}
|
|
|
26425
26425
|
const path = getBlockPath(block);
|
|
26426
26426
|
const blockData = editor.doc.getBlockData(containerId, blockIndex);
|
|
26427
26427
|
const blockClass = getBlockClass(editor, block);
|
|
26428
|
-
|
|
26429
|
-
|
|
26430
|
-
|
|
26431
|
-
|
|
26432
|
-
|
|
26433
|
-
|
|
26434
|
-
|
|
26435
|
-
|
|
26436
|
-
|
|
26437
|
-
|
|
26438
|
-
const
|
|
26439
|
-
if (
|
|
26440
|
-
|
|
26441
|
-
if (oldTools) {
|
|
26442
|
-
oldTools.remove();
|
|
26443
|
-
}
|
|
26444
|
-
block.appendChild(newTools);
|
|
26428
|
+
(_a = blockClass == null ? void 0 : blockClass.handleUpdateBlock) == null ? void 0 : _a.call(blockClass, editor, block, blockData);
|
|
26429
|
+
editor.editorBlockRenders.updateBlock(editor, path, block, blockData);
|
|
26430
|
+
const newBlock = editor.editorBlocks.createBlock(path, container, blockData);
|
|
26431
|
+
const newChildren = pickChildrenWithoutTools(newBlock);
|
|
26432
|
+
pickChildrenWithoutTools(block);
|
|
26433
|
+
newChildren.forEach((node) => {
|
|
26434
|
+
block.appendChild(node);
|
|
26435
|
+
});
|
|
26436
|
+
const newTools = getExistsBlockTools(newBlock);
|
|
26437
|
+
if (newTools) {
|
|
26438
|
+
const oldTools = getExistsBlockTools(block);
|
|
26439
|
+
if (oldTools) {
|
|
26440
|
+
oldTools.remove();
|
|
26445
26441
|
}
|
|
26446
|
-
|
|
26442
|
+
block.appendChild(newTools);
|
|
26447
26443
|
}
|
|
26444
|
+
copyElementAttributes(newBlock, block);
|
|
26448
26445
|
handleBlockElementUpdated$1(editor, block, blockData);
|
|
26449
26446
|
editor.blockHooks.forEach((hook) => {
|
|
26450
26447
|
var _a2;
|
|
@@ -64974,6 +64971,11 @@ ${codeText}
|
|
|
64974
64971
|
return checkBlocks.every((b) => isEmptyTextBlock2(b));
|
|
64975
64972
|
}
|
|
64976
64973
|
function autoShowHideTemplates(editor, options) {
|
|
64974
|
+
var _a, _b;
|
|
64975
|
+
const templateOptions = (_a = editor.options.componentsOptions) == null ? void 0 : _a.templates;
|
|
64976
|
+
if ((_b = templateOptions == null ? void 0 : templateOptions.onBeforeTemplateShowHide) == null ? void 0 : _b.call(templateOptions, editor)) {
|
|
64977
|
+
return;
|
|
64978
|
+
}
|
|
64977
64979
|
if (isEmptyDocForAddingTemplate(editor, editor.doc.toJSON())) {
|
|
64978
64980
|
showTemplates(editor, options);
|
|
64979
64981
|
} else {
|
|
@@ -75363,7 +75365,7 @@ ${data.flowchartText}
|
|
|
75363
75365
|
}
|
|
75364
75366
|
}
|
|
75365
75367
|
});
|
|
75366
|
-
editor.version = "1.1.16-beta.
|
|
75368
|
+
editor.version = "1.1.16-beta.18";
|
|
75367
75369
|
return editor;
|
|
75368
75370
|
}
|
|
75369
75371
|
function isDoc(doc2) {
|
|
@@ -75445,7 +75447,7 @@ ${data.flowchartText}
|
|
|
75445
75447
|
});
|
|
75446
75448
|
editor.addCustom(DOC_RE_AUTH_KEYS, (editor2) => new DocReAuthCallbacks(editor2));
|
|
75447
75449
|
OnesEditorToolbar.register(editor);
|
|
75448
|
-
editor.version = "1.1.16-beta.
|
|
75450
|
+
editor.version = "1.1.16-beta.18";
|
|
75449
75451
|
return editor;
|
|
75450
75452
|
}
|
|
75451
75453
|
async function showDocVersions(editor, options, serverUrl) {
|