mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-03 17:59:55 +02:00
This commit is contained in:
parent
f0f62670c5
commit
7e26256cac
4563 changed files with 1246712 additions and 17558 deletions
57
node_modules/tinymce/plugins/accordion/plugin.js
generated
vendored
57
node_modules/tinymce/plugins/accordion/plugin.js
generated
vendored
|
@ -1,11 +1,11 @@
|
|||
/**
|
||||
* TinyMCE version 6.7.1 (2023-10-19)
|
||||
* TinyMCE version 6.8.2 (2023-12-11)
|
||||
*/
|
||||
|
||||
(function () {
|
||||
'use strict';
|
||||
|
||||
var global$3 = tinymce.util.Tools.resolve('tinymce.PluginManager');
|
||||
var global$4 = tinymce.util.Tools.resolve('tinymce.PluginManager');
|
||||
|
||||
let unique = 0;
|
||||
const generate = prefix => {
|
||||
|
@ -735,7 +735,7 @@
|
|||
const accordionBodyWrapperClass = 'mce-accordion-body';
|
||||
const accordionBodyWrapperTag = 'div';
|
||||
|
||||
var global$2 = tinymce.util.Tools.resolve('tinymce.util.Tools');
|
||||
var global$3 = tinymce.util.Tools.resolve('tinymce.util.Tools');
|
||||
|
||||
const isSummary = node => (node === null || node === void 0 ? void 0 : node.nodeName) === 'SUMMARY';
|
||||
const isDetails = node => (node === null || node === void 0 ? void 0 : node.nodeName) === 'DETAILS';
|
||||
|
@ -744,6 +744,10 @@
|
|||
const node = editor.selection.getNode();
|
||||
return isSummary(node) || Boolean(editor.dom.getParent(node, isSummary));
|
||||
};
|
||||
const isAtDetailsStart = editor => {
|
||||
const rng = editor.selection.getRng();
|
||||
return isDetails(rng.startContainer) && rng.collapsed && rng.startOffset === 0;
|
||||
};
|
||||
const isInsertAllowed = editor => !isInSummary(editor) && editor.dom.isEditable(editor.selection.getNode());
|
||||
const getSelectedDetails = editor => Optional.from(editor.dom.getParent(editor.selection.getNode(), isDetails));
|
||||
const isDetailsSelected = editor => getSelectedDetails(editor).isSome();
|
||||
|
@ -777,7 +781,7 @@
|
|||
normalizeSummary(editor, accordion);
|
||||
};
|
||||
const normalizeDetails = editor => {
|
||||
global$2.each(global$2.grep(editor.dom.select('details', editor.getBody())), normalizeAccordion(editor));
|
||||
global$3.each(global$3.grep(editor.dom.select('details', editor.getBody())), normalizeAccordion(editor));
|
||||
};
|
||||
|
||||
const insertAccordion = editor => {
|
||||
|
@ -851,7 +855,7 @@
|
|||
editor.addCommand('RemoveAccordion', () => removeAccordion(editor));
|
||||
};
|
||||
|
||||
var global$1 = tinymce.util.Tools.resolve('tinymce.html.Node');
|
||||
var global$2 = tinymce.util.Tools.resolve('tinymce.html.Node');
|
||||
|
||||
const getClassList = node => {
|
||||
var _a, _b;
|
||||
|
@ -895,12 +899,12 @@
|
|||
};
|
||||
};
|
||||
const padInputNode = node => {
|
||||
const br = new global$1('br', 1);
|
||||
const br = new global$2('br', 1);
|
||||
br.attr('data-mce-bogus', '1');
|
||||
node.empty();
|
||||
node.append(br);
|
||||
};
|
||||
const setup$1 = editor => {
|
||||
const setup$2 = editor => {
|
||||
editor.on('PreInit', () => {
|
||||
const {serializer, parser} = editor;
|
||||
parser.addNodeFilter(accordionTag, nodes => {
|
||||
|
@ -910,7 +914,7 @@
|
|||
const accordionNode = node;
|
||||
const {summaryNode, wrapperNode, otherNodes} = getAccordionChildren(accordionNode);
|
||||
const hasSummaryNode = isNonNullable(summaryNode);
|
||||
const newSummaryNode = hasSummaryNode ? summaryNode : new global$1('summary', 1);
|
||||
const newSummaryNode = hasSummaryNode ? summaryNode : new global$2('summary', 1);
|
||||
if (isNullable(newSummaryNode.firstChild)) {
|
||||
padInputNode(newSummaryNode);
|
||||
}
|
||||
|
@ -923,7 +927,8 @@
|
|||
}
|
||||
}
|
||||
const hasWrapperNode = isNonNullable(wrapperNode);
|
||||
const newWrapperNode = hasWrapperNode ? wrapperNode : new global$1(accordionBodyWrapperTag, 1);
|
||||
const newWrapperNode = hasWrapperNode ? wrapperNode : new global$2(accordionBodyWrapperTag, 1);
|
||||
newWrapperNode.attr('data-mce-bogus', '1');
|
||||
addClasses(newWrapperNode, [accordionBodyWrapperClass]);
|
||||
if (otherNodes.length > 0) {
|
||||
for (let j = 0; j < otherNodes.length; j++) {
|
||||
|
@ -932,7 +937,7 @@
|
|||
}
|
||||
}
|
||||
if (isNullable(newWrapperNode.firstChild)) {
|
||||
const pNode = new global$1('p', 1);
|
||||
const pNode = new global$2('p', 1);
|
||||
padInputNode(pNode);
|
||||
newWrapperNode.append(pNode);
|
||||
}
|
||||
|
@ -961,18 +966,17 @@
|
|||
});
|
||||
};
|
||||
|
||||
var global = tinymce.util.Tools.resolve('tinymce.util.VK');
|
||||
var global$1 = tinymce.util.Tools.resolve('tinymce.util.VK');
|
||||
|
||||
const setupEnterKeyInSummary = editor => {
|
||||
editor.on('keydown', event => {
|
||||
if (event.shiftKey || event.keyCode !== global.ENTER || !isInSummary(editor)) {
|
||||
return;
|
||||
if (!event.shiftKey && event.keyCode === global$1.ENTER && isInSummary(editor) || isAtDetailsStart(editor)) {
|
||||
event.preventDefault();
|
||||
editor.execCommand('ToggleAccordion');
|
||||
}
|
||||
event.preventDefault();
|
||||
editor.execCommand('ToggleAccordion');
|
||||
});
|
||||
};
|
||||
const setup = editor => {
|
||||
const setup$1 = editor => {
|
||||
setupEnterKeyInSummary(editor);
|
||||
editor.on('ExecCommand', e => {
|
||||
const cmd = e.command.toLowerCase();
|
||||
|
@ -982,6 +986,22 @@
|
|||
});
|
||||
};
|
||||
|
||||
var global = tinymce.util.Tools.resolve('tinymce.Env');
|
||||
|
||||
const setup = editor => {
|
||||
if (global.browser.isSafari()) {
|
||||
editor.on('click', e => {
|
||||
if (isSummary(e.target)) {
|
||||
const summary = e.target;
|
||||
const rng = editor.selection.getRng();
|
||||
if (rng.collapsed && rng.startContainer === summary.parentNode && rng.startOffset === 0) {
|
||||
editor.selection.setCursorLocation(summary, 0);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
const onSetup = editor => buttonApi => {
|
||||
const onNodeChange = () => buttonApi.setEnabled(isInsertAllowed(editor));
|
||||
editor.on('NodeChange', onNodeChange);
|
||||
|
@ -1020,11 +1040,12 @@
|
|||
};
|
||||
|
||||
var Plugin = () => {
|
||||
global$3.add('accordion', editor => {
|
||||
global$4.add('accordion', editor => {
|
||||
register(editor);
|
||||
register$1(editor);
|
||||
setup(editor);
|
||||
setup$1(editor);
|
||||
setup$2(editor);
|
||||
setup(editor);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue