@ones-editor/editor 1.1.16-beta.18 → 1.1.16-beta.19
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
|
@@ -64878,9 +64878,9 @@ ${codeText}
|
|
|
64878
64878
|
});
|
|
64879
64879
|
}
|
|
64880
64880
|
function showTemplatesCore(editor, options) {
|
|
64881
|
-
var _a, _b;
|
|
64881
|
+
var _a, _b, _c;
|
|
64882
64882
|
const templateOptions = (_a = editor.options.componentsOptions) == null ? void 0 : _a.templates;
|
|
64883
|
-
if (!templateOptions) {
|
|
64883
|
+
if (!templateOptions || ((_b = templateOptions == null ? void 0 : templateOptions.onBeforeTemplateShow) == null ? void 0 : _b.call(templateOptions, editor))) {
|
|
64884
64884
|
return;
|
|
64885
64885
|
}
|
|
64886
64886
|
const lastBlock2 = getLastChildBlock(editor.rootContainer);
|
|
@@ -64934,7 +64934,7 @@ ${codeText}
|
|
|
64934
64934
|
});
|
|
64935
64935
|
const chooseTemplateCard = createChooseTemplateCard(editor, chooseTemplateImageSrc);
|
|
64936
64936
|
cardContainer.appendChild(chooseTemplateCard);
|
|
64937
|
-
(
|
|
64937
|
+
(_c = templateOptions == null ? void 0 : templateOptions.onTemplateChooserStatusChanged) == null ? void 0 : _c.call(templateOptions, editor, cardContainer, "visible");
|
|
64938
64938
|
}
|
|
64939
64939
|
const showTemplates = debounce__default.default(showTemplatesCore, 50);
|
|
64940
64940
|
function hideTemplates(editor) {
|
|
@@ -64971,11 +64971,6 @@ ${codeText}
|
|
|
64971
64971
|
return checkBlocks.every((b) => isEmptyTextBlock2(b));
|
|
64972
64972
|
}
|
|
64973
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
|
-
}
|
|
64979
64974
|
if (isEmptyDocForAddingTemplate(editor, editor.doc.toJSON())) {
|
|
64980
64975
|
showTemplates(editor, options);
|
|
64981
64976
|
} else {
|
|
@@ -75365,7 +75360,7 @@ ${data.flowchartText}
|
|
|
75365
75360
|
}
|
|
75366
75361
|
}
|
|
75367
75362
|
});
|
|
75368
|
-
editor.version = "1.1.16-beta.
|
|
75363
|
+
editor.version = "1.1.16-beta.19";
|
|
75369
75364
|
return editor;
|
|
75370
75365
|
}
|
|
75371
75366
|
function isDoc(doc2) {
|
|
@@ -75447,7 +75442,7 @@ ${data.flowchartText}
|
|
|
75447
75442
|
});
|
|
75448
75443
|
editor.addCustom(DOC_RE_AUTH_KEYS, (editor2) => new DocReAuthCallbacks(editor2));
|
|
75449
75444
|
OnesEditorToolbar.register(editor);
|
|
75450
|
-
editor.version = "1.1.16-beta.
|
|
75445
|
+
editor.version = "1.1.16-beta.19";
|
|
75451
75446
|
return editor;
|
|
75452
75447
|
}
|
|
75453
75448
|
async function showDocVersions(editor, options, serverUrl) {
|