1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-04 18:29:39 +02:00
Daniel Neto 2023-06-30 08:55:17 -03:00
parent 746e163d01
commit 1c7ea28b46
808 changed files with 316395 additions and 381162 deletions

View file

@ -1,5 +1,5 @@
/**
* TinyMCE version 6.3.1 (2022-12-06)
* TinyMCE version 6.4.2 (2023-04-26)
*/
(function () {
@ -855,9 +855,7 @@
each(buttons, toggle);
};
const notFoundAlert = api => {
editor.windowManager.alert('Could not find the specified string.', () => {
api.focus('findtext');
});
api.redial(getDialogSpec(true, api.getData()));
};
const focusButtonIfRequired = (api, name) => {
if (global$2.browser.isSafari() && global$2.deviceType.isTouch() && (name === 'find' || name === 'replace' || name === 'replaceall')) {
@ -895,47 +893,59 @@
matchcase: initialState.matchCase,
inselection: initialState.inSelection
};
const spec = {
const getPanelItems = error => {
const items = [
{
type: 'bar',
items: [
{
type: 'input',
name: 'findtext',
placeholder: 'Find',
maximized: true,
inputMode: 'search'
},
{
type: 'button',
name: 'prev',
text: 'Previous',
icon: 'action-prev',
enabled: false,
borderless: true
},
{
type: 'button',
name: 'next',
text: 'Next',
icon: 'action-next',
enabled: false,
borderless: true
}
]
},
{
type: 'input',
name: 'replacetext',
placeholder: 'Replace with',
inputMode: 'search'
}
];
if (error) {
items.push({
type: 'alertbanner',
level: 'error',
text: 'Could not find the specified string.',
icon: 'warning'
});
}
return items;
};
const getDialogSpec = (showNoMatchesAlertBanner, initialData) => ({
title: 'Find and Replace',
size: 'normal',
body: {
type: 'panel',
items: [
{
type: 'bar',
items: [
{
type: 'input',
name: 'findtext',
placeholder: 'Find',
maximized: true,
inputMode: 'search'
},
{
type: 'button',
name: 'prev',
text: 'Previous',
icon: 'action-prev',
enabled: false,
borderless: true
},
{
type: 'button',
name: 'next',
text: 'Next',
icon: 'action-next',
enabled: false,
borderless: true
}
]
},
{
type: 'input',
name: 'replacetext',
placeholder: 'Replace with',
inputMode: 'search'
}
]
items: getPanelItems(showNoMatchesAlertBanner)
},
buttons: [
{
@ -983,6 +993,9 @@
],
initialData,
onChange: (api, details) => {
if (showNoMatchesAlertBanner) {
api.redial(getDialogSpec(false, api.getData()));
}
if (details.name === 'findtext' && currentSearchState.get().count > 0) {
reset(api);
}
@ -1030,8 +1043,8 @@
done(editor, currentSearchState);
editor.undoManager.add();
}
};
dialogApi.set(editor.windowManager.open(spec, { inline: 'toolbar' }));
});
dialogApi.set(editor.windowManager.open(getDialogSpec(false, initialData), { inline: 'toolbar' }));
};
const register$1 = (editor, currentSearchState) => {