mirror of
https://github.com/getnamingo/registry.git
synced 2025-07-21 01:55:59 +02:00
Updated tabler to 1.0.0-beta20
This commit is contained in:
parent
9fafe701aa
commit
ae0bfb08f3
429 changed files with 28170 additions and 18920 deletions
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* TinyMCE version 6.2.0 (2022-09-08)
|
||||
* TinyMCE version 6.4.2 (2023-04-26)
|
||||
*/
|
||||
|
||||
(function () {
|
||||
|
@ -383,7 +383,39 @@
|
|||
return true;
|
||||
};
|
||||
|
||||
typeof window !== 'undefined' ? window : Function('return this;')();
|
||||
const Global = typeof window !== 'undefined' ? window : Function('return this;')();
|
||||
|
||||
const path = (parts, scope) => {
|
||||
let o = scope !== undefined && scope !== null ? scope : Global;
|
||||
for (let i = 0; i < parts.length && o !== undefined && o !== null; ++i) {
|
||||
o = o[parts[i]];
|
||||
}
|
||||
return o;
|
||||
};
|
||||
const resolve$2 = (p, scope) => {
|
||||
const parts = p.split('.');
|
||||
return path(parts, scope);
|
||||
};
|
||||
|
||||
const unsafe = (name, scope) => {
|
||||
return resolve$2(name, scope);
|
||||
};
|
||||
const getOrDie = (name, scope) => {
|
||||
const actual = unsafe(name, scope);
|
||||
if (actual === undefined || actual === null) {
|
||||
throw new Error(name + ' not available on this browser');
|
||||
}
|
||||
return actual;
|
||||
};
|
||||
|
||||
const getPrototypeOf = Object.getPrototypeOf;
|
||||
const sandHTMLElement = scope => {
|
||||
return getOrDie('HTMLElement', scope);
|
||||
};
|
||||
const isPrototypeOf = x => {
|
||||
const scope = resolve$2('ownerDocument.defaultView', x);
|
||||
return isObject(x) && (sandHTMLElement(scope).prototype.isPrototypeOf(x) || /^HTML\w*Element$/.test(getPrototypeOf(x).constructor.name));
|
||||
};
|
||||
|
||||
const COMMENT = 8;
|
||||
const DOCUMENT = 9;
|
||||
|
@ -398,6 +430,7 @@
|
|||
const type = element => element.dom.nodeType;
|
||||
const isType = t => element => type(element) === t;
|
||||
const isComment = element => type(element) === COMMENT || name(element) === '#comment';
|
||||
const isHTMLElement = element => isElement(element) && isPrototypeOf(element.dom);
|
||||
const isElement = isType(ELEMENT);
|
||||
const isText = isType(TEXT);
|
||||
const isDocument = isType(DOCUMENT);
|
||||
|
@ -2173,13 +2206,14 @@
|
|||
|
||||
const getEnd = element => name(element) === 'img' ? 1 : getOption(element).fold(() => children$2(element).length, v => v.length);
|
||||
const isTextNodeWithCursorPosition = el => getOption(el).filter(text => text.trim().length !== 0 || text.indexOf(nbsp) > -1).isSome();
|
||||
const isContentEditableFalse = elem => isHTMLElement(elem) && get$b(elem, 'contenteditable') === 'false';
|
||||
const elementsWithCursorPosition = [
|
||||
'img',
|
||||
'br'
|
||||
];
|
||||
const isCursorPosition = elem => {
|
||||
const hasCursorPosition = isTextNodeWithCursorPosition(elem);
|
||||
return hasCursorPosition || contains$2(elementsWithCursorPosition, name(elem));
|
||||
return hasCursorPosition || contains$2(elementsWithCursorPosition, name(elem)) || isContentEditableFalse(elem);
|
||||
};
|
||||
|
||||
const first = element => descendant$1(element, isCursorPosition);
|
||||
|
@ -2245,7 +2279,6 @@
|
|||
});
|
||||
return foldr(parents, (last, parent) => {
|
||||
const clonedFormat = shallow(parent);
|
||||
remove$7(clonedFormat, 'contenteditable');
|
||||
append$1(last, clonedFormat);
|
||||
return clonedFormat;
|
||||
}, newCell);
|
||||
|
@ -2323,6 +2356,16 @@
|
|||
};
|
||||
const fromDom = nodes => map$1(nodes, SugarElement.fromDom);
|
||||
|
||||
const closest = target => closest$1(target, '[contenteditable]');
|
||||
const isEditable$1 = (element, assumeEditable = false) => {
|
||||
if (inBody(element)) {
|
||||
return element.dom.isContentEditable;
|
||||
} else {
|
||||
return closest(element).fold(constant(assumeEditable), editable => getRaw(editable) === 'true');
|
||||
}
|
||||
};
|
||||
const getRaw = element => element.dom.contentEditable;
|
||||
|
||||
const getBody = editor => SugarElement.fromDom(editor.getBody());
|
||||
const getIsRoot = editor => element => eq$1(element, getBody(editor));
|
||||
const removeDataStyle = table => {
|
||||
|
@ -2341,6 +2384,7 @@
|
|||
};
|
||||
const isPercentage$1 = value => /^(\d+(\.\d+)?)%$/.test(value);
|
||||
const isPixel = value => /^(\d+(\.\d+)?)px$/.test(value);
|
||||
const isInEditableContext$1 = cell => closest$2(cell, isTag('table')).exists(isEditable$1);
|
||||
|
||||
const inSelection = (bounds, detail) => {
|
||||
const leftEdge = detail.column;
|
||||
|
@ -3152,16 +3196,6 @@
|
|||
fallback
|
||||
};
|
||||
|
||||
const closest = target => closest$1(target, '[contenteditable]');
|
||||
const isEditable$1 = (element, assumeEditable = false) => {
|
||||
if (inBody(element)) {
|
||||
return element.dom.isContentEditable;
|
||||
} else {
|
||||
return closest(element).fold(constant(assumeEditable), editable => getRaw(editable) === 'true');
|
||||
}
|
||||
};
|
||||
const getRaw = element => element.dom.contentEditable;
|
||||
|
||||
const setIfNot = (element, property, value, ignore) => {
|
||||
if (value === ignore) {
|
||||
remove$7(element, property);
|
||||
|
@ -5290,8 +5324,8 @@
|
|||
const getColumns = () => getData(tableTypeColumn);
|
||||
const clearColumns = () => clearData(tableTypeColumn);
|
||||
|
||||
const getSelectionStartCellOrCaption = editor => getSelectionCellOrCaption(getSelectionStart(editor), getIsRoot(editor));
|
||||
const getSelectionStartCell = editor => getSelectionCell(getSelectionStart(editor), getIsRoot(editor));
|
||||
const getSelectionStartCellOrCaption = editor => getSelectionCellOrCaption(getSelectionStart(editor), getIsRoot(editor)).filter(isInEditableContext$1);
|
||||
const getSelectionStartCell = editor => getSelectionCell(getSelectionStart(editor), getIsRoot(editor)).filter(isInEditableContext$1);
|
||||
const registerCommands = (editor, actions) => {
|
||||
const isRoot = getIsRoot(editor);
|
||||
const eraseTable = () => getSelectionStartCellOrCaption(editor).each(cellOrCaption => {
|
||||
|
@ -5438,7 +5472,7 @@
|
|||
if (!isObject(args)) {
|
||||
return;
|
||||
}
|
||||
const cells = getCellsFromSelection(editor);
|
||||
const cells = filter$2(getCellsFromSelection(editor), isInEditableContext$1);
|
||||
if (cells.length === 0) {
|
||||
return;
|
||||
}
|
||||
|
@ -6259,6 +6293,7 @@
|
|||
};
|
||||
|
||||
const findCell = (target, isRoot) => closest$1(target, 'td,th', isRoot);
|
||||
const isInEditableContext = cell => parentElement(cell).exists(isEditable$1);
|
||||
const MouseSelection = (bridge, container, isRoot, annotations) => {
|
||||
const cursor = value();
|
||||
const clearstate = cursor.clear;
|
||||
|
@ -6286,7 +6321,7 @@
|
|||
};
|
||||
const mousedown = event => {
|
||||
annotations.clear(container);
|
||||
findCell(event.target, isRoot).each(cursor.set);
|
||||
findCell(event.target, isRoot).filter(isInEditableContext).each(cursor.set);
|
||||
};
|
||||
const mouseover = event => {
|
||||
applySelection(event);
|
||||
|
@ -6628,6 +6663,8 @@
|
|||
mouseup: handlers.mouseup
|
||||
};
|
||||
};
|
||||
const isEditableNode = node => closest$2(node, isHTMLElement).exists(isEditable$1);
|
||||
const isEditableSelection = (start, finish) => isEditableNode(start) || isEditableNode(finish);
|
||||
const keyboard = (win, container, isRoot, annotations) => {
|
||||
const bridge = WindowBridge(win);
|
||||
const clearToNavigate = () => {
|
||||
|
@ -6642,7 +6679,9 @@
|
|||
if (isNavigation(keycode) && !shiftKey) {
|
||||
annotations.clearBeforeUpdate(container);
|
||||
}
|
||||
if (isDown(keycode) && shiftKey) {
|
||||
if (isNavigation(keycode) && shiftKey && !isEditableSelection(start, finish)) {
|
||||
return Optional.none;
|
||||
} else if (isDown(keycode) && shiftKey) {
|
||||
return curry(select, bridge, container, isRoot, down, finish, start, annotations.selectRange);
|
||||
} else if (isUp(keycode) && shiftKey) {
|
||||
return curry(select, bridge, container, isRoot, up, finish, start, annotations.selectRange);
|
||||
|
@ -6671,7 +6710,9 @@
|
|||
});
|
||||
};
|
||||
};
|
||||
if (isDown(keycode) && shiftKey) {
|
||||
if (isNavigation(keycode) && shiftKey && !isEditableSelection(start, finish)) {
|
||||
return Optional.none;
|
||||
} else if (isDown(keycode) && shiftKey) {
|
||||
return update$1([rc(+1, 0)]);
|
||||
} else if (isUp(keycode) && shiftKey) {
|
||||
return update$1([rc(-1, 0)]);
|
||||
|
@ -6701,7 +6742,7 @@
|
|||
if (!shiftKey) {
|
||||
return Optional.none();
|
||||
}
|
||||
if (isNavigation(keycode)) {
|
||||
if (isNavigation(keycode) && isEditableSelection(start, finish)) {
|
||||
return sync(container, isRoot, start, soffset, finish, foffset, annotations.selectRange);
|
||||
} else {
|
||||
return Optional.none();
|
||||
|
@ -7335,6 +7376,7 @@
|
|||
const off = () => {
|
||||
active = false;
|
||||
};
|
||||
const isActive = () => active;
|
||||
const runIfActive = f => {
|
||||
return (...args) => {
|
||||
if (active) {
|
||||
|
@ -7356,6 +7398,7 @@
|
|||
go,
|
||||
on,
|
||||
off,
|
||||
isActive,
|
||||
destroy,
|
||||
events: events.registry
|
||||
};
|
||||
|
@ -7679,8 +7722,10 @@
|
|||
destroy(wire);
|
||||
}
|
||||
}, table => {
|
||||
hoverTable = Optional.some(table);
|
||||
refresh(wire, table);
|
||||
if (resizing.isActive()) {
|
||||
hoverTable = Optional.some(table);
|
||||
refresh(wire, table);
|
||||
}
|
||||
});
|
||||
});
|
||||
const destroy$1 = () => {
|
||||
|
@ -7933,6 +7978,17 @@
|
|||
}
|
||||
});
|
||||
});
|
||||
editor.on('dragstart dragend', e => {
|
||||
tableResize.on(resize => {
|
||||
if (e.type === 'dragstart') {
|
||||
resize.hideBars();
|
||||
resize.off();
|
||||
} else {
|
||||
resize.on();
|
||||
resize.showBars();
|
||||
}
|
||||
});
|
||||
});
|
||||
editor.on('remove', () => {
|
||||
destroy();
|
||||
});
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue