@ntlab/ntjs-assets 2.116.0 → 2.118.0
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/assets/js/cdn.json +2 -2
- package/assets/js/tinymce/CHANGELOG.md +24 -0
- package/assets/js/tinymce/models/dom/model.js +32 -37
- package/assets/js/tinymce/models/dom/model.min.js +1 -1
- package/assets/js/tinymce/plugins/accordion/plugin.js +27 -14
- package/assets/js/tinymce/plugins/accordion/plugin.min.js +1 -1
- package/assets/js/tinymce/plugins/advlist/plugin.js +7 -5
- package/assets/js/tinymce/plugins/advlist/plugin.min.js +1 -1
- package/assets/js/tinymce/plugins/anchor/plugin.js +1 -1
- package/assets/js/tinymce/plugins/autolink/plugin.js +3 -5
- package/assets/js/tinymce/plugins/autolink/plugin.min.js +1 -1
- package/assets/js/tinymce/plugins/autoresize/plugin.js +4 -6
- package/assets/js/tinymce/plugins/autoresize/plugin.min.js +1 -1
- package/assets/js/tinymce/plugins/autosave/plugin.js +4 -7
- package/assets/js/tinymce/plugins/autosave/plugin.min.js +1 -1
- package/assets/js/tinymce/plugins/charmap/plugin.js +8 -7
- package/assets/js/tinymce/plugins/charmap/plugin.min.js +1 -1
- package/assets/js/tinymce/plugins/code/plugin.js +1 -1
- package/assets/js/tinymce/plugins/codesample/plugin.js +9 -9
- package/assets/js/tinymce/plugins/codesample/plugin.min.js +2 -2
- package/assets/js/tinymce/plugins/directionality/plugin.js +8 -7
- package/assets/js/tinymce/plugins/directionality/plugin.min.js +1 -1
- package/assets/js/tinymce/plugins/emoticons/plugin.js +7 -5
- package/assets/js/tinymce/plugins/emoticons/plugin.min.js +1 -1
- package/assets/js/tinymce/plugins/fullscreen/plugin.js +10 -9
- package/assets/js/tinymce/plugins/fullscreen/plugin.min.js +1 -1
- package/assets/js/tinymce/plugins/help/plugin.js +10 -11
- package/assets/js/tinymce/plugins/help/plugin.min.js +1 -1
- package/assets/js/tinymce/plugins/image/plugin.js +21 -28
- package/assets/js/tinymce/plugins/image/plugin.min.js +1 -1
- package/assets/js/tinymce/plugins/importcss/plugin.js +4 -5
- package/assets/js/tinymce/plugins/importcss/plugin.min.js +1 -1
- package/assets/js/tinymce/plugins/insertdatetime/plugin.js +3 -3
- package/assets/js/tinymce/plugins/insertdatetime/plugin.min.js +1 -1
- package/assets/js/tinymce/plugins/langs8/it.js +1 -1
- package/assets/js/tinymce/plugins/langs8/zh-CN.js +4 -4
- package/assets/js/tinymce/plugins/link/plugin.js +15 -17
- package/assets/js/tinymce/plugins/link/plugin.min.js +1 -1
- package/assets/js/tinymce/plugins/lists/plugin.js +7 -5
- package/assets/js/tinymce/plugins/lists/plugin.min.js +1 -1
- package/assets/js/tinymce/plugins/media/plugin.js +15 -21
- package/assets/js/tinymce/plugins/media/plugin.min.js +1 -1
- package/assets/js/tinymce/plugins/nonbreaking/plugin.js +1 -1
- package/assets/js/tinymce/plugins/pagebreak/plugin.js +1 -1
- package/assets/js/tinymce/plugins/preview/plugin.js +88 -10
- package/assets/js/tinymce/plugins/preview/plugin.min.js +1 -1
- package/assets/js/tinymce/plugins/quickbars/plugin.js +9 -9
- package/assets/js/tinymce/plugins/quickbars/plugin.min.js +1 -1
- package/assets/js/tinymce/plugins/save/plugin.js +1 -1
- package/assets/js/tinymce/plugins/searchreplace/plugin.js +10 -11
- package/assets/js/tinymce/plugins/searchreplace/plugin.min.js +1 -1
- package/assets/js/tinymce/plugins/table/plugin.js +12 -13
- package/assets/js/tinymce/plugins/table/plugin.min.js +1 -1
- package/assets/js/tinymce/plugins/visualblocks/plugin.js +1 -1
- package/assets/js/tinymce/plugins/visualchars/plugin.js +9 -9
- package/assets/js/tinymce/plugins/visualchars/plugin.min.js +1 -1
- package/assets/js/tinymce/plugins/wordcount/plugin.js +1 -1
- package/assets/js/tinymce/skins/ui/oxide/content.css +32 -0
- package/assets/js/tinymce/skins/ui/oxide/content.inline.css +32 -0
- package/assets/js/tinymce/skins/ui/oxide/content.inline.js +1 -1
- package/assets/js/tinymce/skins/ui/oxide/content.inline.min.css +1 -1
- package/assets/js/tinymce/skins/ui/oxide/content.js +1 -1
- package/assets/js/tinymce/skins/ui/oxide/content.min.css +1 -1
- package/assets/js/tinymce/skins/ui/oxide/skin.css +52 -3
- package/assets/js/tinymce/skins/ui/oxide/skin.js +1 -1
- package/assets/js/tinymce/skins/ui/oxide/skin.min.css +1 -1
- package/assets/js/tinymce/skins/ui/oxide-dark/content.css +32 -0
- package/assets/js/tinymce/skins/ui/oxide-dark/content.inline.css +32 -0
- package/assets/js/tinymce/skins/ui/oxide-dark/content.inline.js +1 -1
- package/assets/js/tinymce/skins/ui/oxide-dark/content.inline.min.css +1 -1
- package/assets/js/tinymce/skins/ui/oxide-dark/content.js +1 -1
- package/assets/js/tinymce/skins/ui/oxide-dark/content.min.css +1 -1
- package/assets/js/tinymce/skins/ui/oxide-dark/skin.css +52 -3
- package/assets/js/tinymce/skins/ui/oxide-dark/skin.js +1 -1
- package/assets/js/tinymce/skins/ui/oxide-dark/skin.min.css +1 -1
- package/assets/js/tinymce/skins/ui/tinymce-5/content.css +32 -0
- package/assets/js/tinymce/skins/ui/tinymce-5/content.inline.css +32 -0
- package/assets/js/tinymce/skins/ui/tinymce-5/content.inline.js +1 -1
- package/assets/js/tinymce/skins/ui/tinymce-5/content.inline.min.css +1 -1
- package/assets/js/tinymce/skins/ui/tinymce-5/content.js +1 -1
- package/assets/js/tinymce/skins/ui/tinymce-5/content.min.css +1 -1
- package/assets/js/tinymce/skins/ui/tinymce-5/skin.css +52 -3
- package/assets/js/tinymce/skins/ui/tinymce-5/skin.js +1 -1
- package/assets/js/tinymce/skins/ui/tinymce-5/skin.min.css +1 -1
- package/assets/js/tinymce/skins/ui/tinymce-5-dark/content.css +32 -0
- package/assets/js/tinymce/skins/ui/tinymce-5-dark/content.inline.css +32 -0
- package/assets/js/tinymce/skins/ui/tinymce-5-dark/content.inline.js +1 -1
- package/assets/js/tinymce/skins/ui/tinymce-5-dark/content.inline.min.css +1 -1
- package/assets/js/tinymce/skins/ui/tinymce-5-dark/content.js +1 -1
- package/assets/js/tinymce/skins/ui/tinymce-5-dark/content.min.css +1 -1
- package/assets/js/tinymce/skins/ui/tinymce-5-dark/skin.css +52 -3
- package/assets/js/tinymce/skins/ui/tinymce-5-dark/skin.js +1 -1
- package/assets/js/tinymce/skins/ui/tinymce-5-dark/skin.min.css +1 -1
- package/assets/js/tinymce/themes/silver/theme.js +73 -88
- package/assets/js/tinymce/themes/silver/theme.min.js +1 -1
- package/assets/js/tinymce/tinymce.js +671 -449
- package/assets/js/tinymce/tinymce.min.js +2 -2
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* TinyMCE version 8.
|
|
2
|
+
* TinyMCE version 8.2.0 (2025-10-23)
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
(function () {
|
|
@@ -8,13 +8,12 @@
|
|
|
8
8
|
/* eslint-disable @typescript-eslint/no-wrapper-object-types */
|
|
9
9
|
const getPrototypeOf$2 = Object.getPrototypeOf;
|
|
10
10
|
const hasProto = (v, constructor, predicate) => {
|
|
11
|
-
var _a;
|
|
12
11
|
if (predicate(v, constructor.prototype)) {
|
|
13
12
|
return true;
|
|
14
13
|
}
|
|
15
14
|
else {
|
|
16
15
|
// String-based fallback time
|
|
17
|
-
return
|
|
16
|
+
return v.constructor?.name === constructor.name;
|
|
18
17
|
}
|
|
19
18
|
};
|
|
20
19
|
const typeOf = (x) => {
|
|
@@ -114,6 +113,11 @@
|
|
|
114
113
|
* strict-null-checks
|
|
115
114
|
*/
|
|
116
115
|
class Optional {
|
|
116
|
+
tag;
|
|
117
|
+
value;
|
|
118
|
+
// Sneaky optimisation: every instance of Optional.none is identical, so just
|
|
119
|
+
// reuse the same object
|
|
120
|
+
static singletonNone = new Optional(false);
|
|
117
121
|
// The internal representation has a `tag` and a `value`, but both are
|
|
118
122
|
// private: able to be console.logged, but not able to be accessed by code
|
|
119
123
|
constructor(tag, value) {
|
|
@@ -281,7 +285,7 @@
|
|
|
281
285
|
*/
|
|
282
286
|
getOrDie(message) {
|
|
283
287
|
if (!this.tag) {
|
|
284
|
-
throw new Error(message
|
|
288
|
+
throw new Error(message ?? 'Called getOrDie on None');
|
|
285
289
|
}
|
|
286
290
|
else {
|
|
287
291
|
return this.value;
|
|
@@ -345,9 +349,6 @@
|
|
|
345
349
|
return this.tag ? `some(${this.value})` : 'none()';
|
|
346
350
|
}
|
|
347
351
|
}
|
|
348
|
-
// Sneaky optimisation: every instance of Optional.none is identical, so just
|
|
349
|
-
// reuse the same object
|
|
350
|
-
Optional.singletonNone = new Optional(false);
|
|
351
352
|
|
|
352
353
|
const nativeSlice = Array.prototype.slice;
|
|
353
354
|
const nativeIndexOf = Array.prototype.indexOf;
|
|
@@ -1569,7 +1570,7 @@
|
|
|
1569
1570
|
const detectBrowser$1 = (browsers, userAgentData) => {
|
|
1570
1571
|
return findMap(userAgentData.brands, (uaBrand) => {
|
|
1571
1572
|
const lcBrand = uaBrand.brand.toLowerCase();
|
|
1572
|
-
return find$5(browsers, (browser) =>
|
|
1573
|
+
return find$5(browsers, (browser) => lcBrand === browser.brand?.toLowerCase())
|
|
1573
1574
|
.map((info) => ({
|
|
1574
1575
|
current: info.name,
|
|
1575
1576
|
version: Version.nu(parseInt(uaBrand.version, 10), 0)
|
|
@@ -2480,8 +2481,8 @@
|
|
|
2480
2481
|
if (body === element.dom) {
|
|
2481
2482
|
return SugarPosition(body.offsetLeft, body.offsetTop);
|
|
2482
2483
|
}
|
|
2483
|
-
const scrollTop = firstDefinedOrZero(win
|
|
2484
|
-
const scrollLeft = firstDefinedOrZero(win
|
|
2484
|
+
const scrollTop = firstDefinedOrZero(win?.pageYOffset, html.scrollTop);
|
|
2485
|
+
const scrollLeft = firstDefinedOrZero(win?.pageXOffset, html.scrollLeft);
|
|
2485
2486
|
const clientTop = firstDefinedOrZero(html.clientTop, body.clientTop);
|
|
2486
2487
|
const clientLeft = firstDefinedOrZero(html.clientLeft, body.clientLeft);
|
|
2487
2488
|
return viewport$1(element).translate(scrollLeft - clientLeft, scrollTop - clientTop);
|
|
@@ -2990,10 +2991,9 @@
|
|
|
2990
2991
|
};
|
|
2991
2992
|
|
|
2992
2993
|
const view = (doc) => {
|
|
2993
|
-
var _a;
|
|
2994
2994
|
// Only walk up to the document this script is defined in.
|
|
2995
2995
|
// This prevents walking up to the parent window when the editor is in an iframe.
|
|
2996
|
-
const element = doc.dom === document ? Optional.none() : Optional.from(
|
|
2996
|
+
const element = doc.dom === document ? Optional.none() : Optional.from(doc.dom.defaultView?.frameElement);
|
|
2997
2997
|
return element.map(SugarElement.fromDom);
|
|
2998
2998
|
};
|
|
2999
2999
|
const owner$3 = (element) => owner$4(element);
|
|
@@ -6371,7 +6371,7 @@
|
|
|
6371
6371
|
const value = definition.value.getOrUndefined();
|
|
6372
6372
|
if (value !== get$5(valueElement)) {
|
|
6373
6373
|
// TINY-8736: Value.set throws an error in case the value is undefined
|
|
6374
|
-
set$4(valueElement, value
|
|
6374
|
+
set$4(valueElement, value ?? '');
|
|
6375
6375
|
}
|
|
6376
6376
|
};
|
|
6377
6377
|
updateAttrs();
|
|
@@ -6403,7 +6403,7 @@
|
|
|
6403
6403
|
const e = reconcileToDom(definition, obsoleted);
|
|
6404
6404
|
return Optional.some(e);
|
|
6405
6405
|
}
|
|
6406
|
-
catch
|
|
6406
|
+
catch {
|
|
6407
6407
|
return Optional.none();
|
|
6408
6408
|
}
|
|
6409
6409
|
};
|
|
@@ -6961,7 +6961,6 @@
|
|
|
6961
6961
|
state.getInitialPos().fold(() => storePrior(elem, box, viewport, state, decision), () => noop);
|
|
6962
6962
|
};
|
|
6963
6963
|
const revertToOriginal = (elem, box, state) => state.getInitialPos().bind((position) => {
|
|
6964
|
-
var _a;
|
|
6965
6964
|
state.clearInitialPos();
|
|
6966
6965
|
switch (position.position) {
|
|
6967
6966
|
case 'static':
|
|
@@ -6985,7 +6984,7 @@
|
|
|
6985
6984
|
// countered by the fact that if the offset parent is outside the scroller, then you don't really
|
|
6986
6985
|
// have a scrolling environment any more, because the offset parent isn't going to be impacted
|
|
6987
6986
|
// at all by the scroller
|
|
6988
|
-
const scrollDelta =
|
|
6987
|
+
const scrollDelta = offsetParent.dom.scrollTop ?? 0;
|
|
6989
6988
|
return Optional.some({
|
|
6990
6989
|
morph: 'absolute',
|
|
6991
6990
|
positionCss: NuPositionCss('absolute', get$h(position.style, 'left').map((_left) => box.x - offsetBox.x), get$h(position.style, 'top').map((_top) => box.y - offsetBox.y + scrollDelta), get$h(position.style, 'right').map((_right) => offsetBox.right - box.right), get$h(position.style, 'bottom').map((_bottom) => offsetBox.bottom - box.bottom))
|
|
@@ -8712,9 +8711,8 @@
|
|
|
8712
8711
|
const transitionCancel = unbindable();
|
|
8713
8712
|
let timer;
|
|
8714
8713
|
const isSourceTransition = (e) => {
|
|
8715
|
-
var _a;
|
|
8716
8714
|
// Ensure the transition event isn't from a pseudo element
|
|
8717
|
-
const pseudoElement =
|
|
8715
|
+
const pseudoElement = e.raw.pseudoElement ?? '';
|
|
8718
8716
|
return eq(e.target, element) && isEmpty(pseudoElement) && contains$2(properties, e.raw.propertyName);
|
|
8719
8717
|
};
|
|
8720
8718
|
const transitionDone = (e) => {
|
|
@@ -8723,7 +8721,7 @@
|
|
|
8723
8721
|
transitionCancel.clear();
|
|
8724
8722
|
// Only cleanup the class/timer on transitionend not on a cancel. This is done as cancel
|
|
8725
8723
|
// means the element has been repositioned and would need to keep transitioning
|
|
8726
|
-
const type = e
|
|
8724
|
+
const type = e?.raw.type;
|
|
8727
8725
|
if (isNullable(type) || type === transitionend()) {
|
|
8728
8726
|
clearTimeout(timer);
|
|
8729
8727
|
remove$8(element, timerAttr);
|
|
@@ -15947,12 +15945,11 @@
|
|
|
15947
15945
|
}, always);
|
|
15948
15946
|
const isToolbarLocationBottom = (editor) => getToolbarLocation(editor) === ToolbarLocation$1.bottom;
|
|
15949
15947
|
const fixedContainerTarget = (editor) => {
|
|
15950
|
-
var _a;
|
|
15951
15948
|
if (!editor.inline) {
|
|
15952
15949
|
// fixed_toolbar_container(_target) is only available in inline mode
|
|
15953
15950
|
return Optional.none();
|
|
15954
15951
|
}
|
|
15955
|
-
const selector =
|
|
15952
|
+
const selector = fixedContainerSelector(editor) ?? '';
|
|
15956
15953
|
if (selector.length > 0) {
|
|
15957
15954
|
// If we have a valid selector
|
|
15958
15955
|
return descendant(body(), selector);
|
|
@@ -17478,22 +17475,21 @@
|
|
|
17478
17475
|
})
|
|
17479
17476
|
]);
|
|
17480
17477
|
const renderIcon$3 = (spec, iconName, icons, fallbackIcon) => {
|
|
17481
|
-
var _a, _b, _c;
|
|
17482
17478
|
// If RTL, add the flip icon class if the icon doesn't have a `-rtl` icon available.
|
|
17483
17479
|
const rtlIconClasses = needsRtlTransform(iconName) ? ['tox-icon--flip'] : [];
|
|
17484
17480
|
const iconHtml = get$h(icons, getIconName(iconName, icons)).or(fallbackIcon).getOrThunk(defaultIcon(icons));
|
|
17485
17481
|
return {
|
|
17486
17482
|
dom: {
|
|
17487
17483
|
tag: spec.tag,
|
|
17488
|
-
attributes:
|
|
17484
|
+
attributes: spec.attributes ?? {},
|
|
17489
17485
|
classes: spec.classes.concat(rtlIconClasses),
|
|
17490
17486
|
innerHtml: iconHtml
|
|
17491
17487
|
},
|
|
17492
17488
|
behaviours: derive$1([
|
|
17493
|
-
...
|
|
17489
|
+
...spec.behaviours ?? [],
|
|
17494
17490
|
addFocusableBehaviour()
|
|
17495
17491
|
]),
|
|
17496
|
-
eventOrder:
|
|
17492
|
+
eventOrder: spec.eventOrder ?? {}
|
|
17497
17493
|
};
|
|
17498
17494
|
};
|
|
17499
17495
|
const render$4 = (iconName, spec, iconProvider, fallbackIcon = Optional.none()) => renderIcon$3(spec, iconName, iconProvider(), fallbackIcon);
|
|
@@ -18157,14 +18153,13 @@
|
|
|
18157
18153
|
const searchResultsClass = 'tox-collection--results__js';
|
|
18158
18154
|
// NOTE: this is operating on the the final AlloySpec
|
|
18159
18155
|
const augmentWithAria = (item) => {
|
|
18160
|
-
var _a;
|
|
18161
18156
|
if (item.dom) {
|
|
18162
18157
|
return {
|
|
18163
18158
|
...item,
|
|
18164
18159
|
dom: {
|
|
18165
18160
|
...item.dom,
|
|
18166
18161
|
attributes: {
|
|
18167
|
-
...
|
|
18162
|
+
...item.dom.attributes ?? {},
|
|
18168
18163
|
'id': generate$6('aria-item-search-result-id'),
|
|
18169
18164
|
'aria-selected': 'false'
|
|
18170
18165
|
}
|
|
@@ -18983,11 +18978,10 @@
|
|
|
18983
18978
|
};
|
|
18984
18979
|
|
|
18985
18980
|
const extract = (structure) => {
|
|
18986
|
-
var _a;
|
|
18987
18981
|
const internalDialog = getOrDie(createDialog(structure));
|
|
18988
18982
|
const dataValidator = createDataValidator(structure);
|
|
18989
18983
|
// We used to validate data here, but it's done when loading the dialog in tinymce
|
|
18990
|
-
const initialData =
|
|
18984
|
+
const initialData = structure.initialData ?? {};
|
|
18991
18985
|
return {
|
|
18992
18986
|
internalDialog,
|
|
18993
18987
|
dataValidator,
|
|
@@ -19544,7 +19538,6 @@
|
|
|
19544
19538
|
});
|
|
19545
19539
|
|
|
19546
19540
|
const renderImage$1 = (spec, imageUrl) => {
|
|
19547
|
-
var _a, _b;
|
|
19548
19541
|
const spinnerElement = SugarElement.fromTag('div');
|
|
19549
19542
|
add$2(spinnerElement, 'tox-image-selector-loading-spinner');
|
|
19550
19543
|
const addSpinnerElement = (loadingElement) => {
|
|
@@ -19558,7 +19551,7 @@
|
|
|
19558
19551
|
return {
|
|
19559
19552
|
dom: {
|
|
19560
19553
|
tag: spec.tag,
|
|
19561
|
-
attributes:
|
|
19554
|
+
attributes: spec.attributes ?? {},
|
|
19562
19555
|
classes: spec.classes,
|
|
19563
19556
|
},
|
|
19564
19557
|
components: [
|
|
@@ -19580,7 +19573,7 @@
|
|
|
19580
19573
|
...spec.checkMark.toArray()
|
|
19581
19574
|
],
|
|
19582
19575
|
behaviours: derive$1([
|
|
19583
|
-
...
|
|
19576
|
+
...spec.behaviours ?? [],
|
|
19584
19577
|
config('render-image-events', [
|
|
19585
19578
|
runOnAttached((component) => {
|
|
19586
19579
|
addSpinnerElement(component.element);
|
|
@@ -21612,7 +21605,7 @@
|
|
|
21612
21605
|
const pLabel = spec.label.map((label) => renderLabel$3(label, providersBackstage));
|
|
21613
21606
|
const icons = providersBackstage.icons();
|
|
21614
21607
|
// TINY-10174: Icon string is either in icon pack or displayed directly
|
|
21615
|
-
const getIcon = (icon) =>
|
|
21608
|
+
const getIcon = (icon) => icons[icon] ?? icon;
|
|
21616
21609
|
const runOnItem = (f) => (comp, se) => {
|
|
21617
21610
|
closest$3(se.event.target, '[data-collection-item-value]').each((target) => {
|
|
21618
21611
|
f(comp, se, target, get$g(target, 'data-collection-item-value'));
|
|
@@ -22723,10 +22716,9 @@
|
|
|
22723
22716
|
});
|
|
22724
22717
|
};
|
|
22725
22718
|
const onDrop = (comp, se) => {
|
|
22726
|
-
var _a;
|
|
22727
22719
|
if (!Disabling.isDisabled(comp)) {
|
|
22728
22720
|
const transferEvent = se.event.raw;
|
|
22729
|
-
emitWith(comp, browseFilesEvent, { files:
|
|
22721
|
+
emitWith(comp, browseFilesEvent, { files: transferEvent.dataTransfer?.files });
|
|
22730
22722
|
}
|
|
22731
22723
|
};
|
|
22732
22724
|
const onSelect = (component, simulatedEvent) => {
|
|
@@ -23202,8 +23194,7 @@
|
|
|
23202
23194
|
spec.for.each((name) => {
|
|
23203
23195
|
getCompByName(name).each((target) => {
|
|
23204
23196
|
label.getOpt(comp).each((labelComp) => {
|
|
23205
|
-
|
|
23206
|
-
const id = (_a = get$g(target.element, 'id')) !== null && _a !== void 0 ? _a : generate$6('form-field');
|
|
23197
|
+
const id = get$g(target.element, 'id') ?? generate$6('form-field');
|
|
23207
23198
|
set$9(target.element, 'id', id);
|
|
23208
23199
|
set$9(labelComp.element, 'for', id);
|
|
23209
23200
|
});
|
|
@@ -24704,7 +24695,6 @@
|
|
|
24704
24695
|
const isNormalFooterButtonSpec = (spec, buttonType) => buttonType === 'custom' || buttonType === 'cancel' || buttonType === 'submit';
|
|
24705
24696
|
const isToggleButtonSpec = (spec, buttonType) => buttonType === 'togglebutton';
|
|
24706
24697
|
const renderToggleButton = (spec, providers, btnName) => {
|
|
24707
|
-
var _a, _b;
|
|
24708
24698
|
const optMemIcon = spec.icon
|
|
24709
24699
|
.map((memIcon) => renderReplaceableIconFromPack(memIcon, providers.icons))
|
|
24710
24700
|
.map(record);
|
|
@@ -24726,16 +24716,16 @@
|
|
|
24726
24716
|
const buttonType = spec.buttonType.getOr(!spec.primary ? 'secondary' : 'primary');
|
|
24727
24717
|
const buttonSpec = {
|
|
24728
24718
|
...spec,
|
|
24729
|
-
name:
|
|
24719
|
+
name: spec.name ?? '',
|
|
24730
24720
|
primary: buttonType === 'primary',
|
|
24731
24721
|
tooltip: spec.tooltip,
|
|
24732
|
-
enabled:
|
|
24722
|
+
enabled: spec.enabled ?? false,
|
|
24733
24723
|
borderless: false
|
|
24734
24724
|
};
|
|
24735
24725
|
const tooltipAttributes = buttonSpec.tooltip.or(spec.text).map((tooltip) => ({
|
|
24736
24726
|
'aria-label': providers.translate(tooltip),
|
|
24737
24727
|
})).getOr({});
|
|
24738
|
-
const buttonTypeClasses = calculateClassesFromButtonType(buttonType
|
|
24728
|
+
const buttonTypeClasses = calculateClassesFromButtonType(buttonType ?? 'secondary');
|
|
24739
24729
|
const showIconAndText = spec.icon.isSome() && spec.text.isSome();
|
|
24740
24730
|
const dom = {
|
|
24741
24731
|
tag: 'button',
|
|
@@ -24846,17 +24836,15 @@
|
|
|
24846
24836
|
const filterByQuery = (term, menuItems) => {
|
|
24847
24837
|
const lowerCaseTerm = term.toLowerCase();
|
|
24848
24838
|
return filter$2(menuItems, (item) => {
|
|
24849
|
-
var _a;
|
|
24850
24839
|
const text = item.meta !== undefined && item.meta.text !== undefined ? item.meta.text : item.text;
|
|
24851
|
-
const value =
|
|
24840
|
+
const value = item.value ?? '';
|
|
24852
24841
|
return contains$1(text.toLowerCase(), lowerCaseTerm) || contains$1(value.toLowerCase(), lowerCaseTerm);
|
|
24853
24842
|
});
|
|
24854
24843
|
};
|
|
24855
24844
|
|
|
24856
24845
|
const getItems = (fileType, input, urlBackstage) => {
|
|
24857
|
-
var _a, _b;
|
|
24858
24846
|
const urlInputValue = Representing.getValue(input);
|
|
24859
|
-
const term =
|
|
24847
|
+
const term = urlInputValue?.meta?.text ?? urlInputValue.value;
|
|
24860
24848
|
const info = urlBackstage.getLinkInformation();
|
|
24861
24849
|
return info.fold(() => [], (linkInfo) => {
|
|
24862
24850
|
const history = filterByQuery(term, historyTargets(urlBackstage.getHistory(fileType)));
|
|
@@ -25802,12 +25790,11 @@
|
|
|
25802
25790
|
return isHeader(elm) ? parseInt(elm.nodeName.substr(1), 10) : 0;
|
|
25803
25791
|
};
|
|
25804
25792
|
const headerTarget = (elm) => {
|
|
25805
|
-
var _a;
|
|
25806
25793
|
const headerId = getOrGenerateId(elm);
|
|
25807
25794
|
const attach = () => {
|
|
25808
25795
|
elm.id = headerId;
|
|
25809
25796
|
};
|
|
25810
|
-
return create('header',
|
|
25797
|
+
return create('header', getElementText(elm) ?? '', '#' + headerId, getLevel(elm), attach);
|
|
25811
25798
|
};
|
|
25812
25799
|
const anchorTarget = (elm) => {
|
|
25813
25800
|
const anchorId = elm.id || elm.name;
|
|
@@ -26632,7 +26619,7 @@
|
|
|
26632
26619
|
optSlider.each((slider) => {
|
|
26633
26620
|
Replacing.set(slider, [makeSidebar(panelConfigs)]);
|
|
26634
26621
|
// Show the default sidebar
|
|
26635
|
-
const configKey = showSidebar
|
|
26622
|
+
const configKey = showSidebar?.toLowerCase();
|
|
26636
26623
|
if (isString(configKey) && has$2(panelConfigs, configKey)) {
|
|
26637
26624
|
Composing.getCurrent(slider).each((slotContainer) => {
|
|
26638
26625
|
SlotContainer.showSlot(slotContainer, configKey);
|
|
@@ -27076,7 +27063,6 @@
|
|
|
27076
27063
|
};
|
|
27077
27064
|
|
|
27078
27065
|
const renderButton = (spec, providers) => {
|
|
27079
|
-
var _a, _b;
|
|
27080
27066
|
const isToggleButton = spec.type === 'togglebutton';
|
|
27081
27067
|
const optMemIcon = spec.icon
|
|
27082
27068
|
.map((memIcon) => renderReplaceableIconFromPack(memIcon, providers.icons))
|
|
@@ -27112,7 +27098,7 @@
|
|
|
27112
27098
|
const action = getAction();
|
|
27113
27099
|
const buttonSpec = {
|
|
27114
27100
|
...spec,
|
|
27115
|
-
name: isToggleButton ? spec.text.getOr(spec.icon.getOr('')) :
|
|
27101
|
+
name: isToggleButton ? spec.text.getOr(spec.icon.getOr('')) : spec.text ?? spec.icon.getOr(''),
|
|
27116
27102
|
primary: spec.buttonType === 'primary',
|
|
27117
27103
|
buttonType: Optional.from(spec.buttonType),
|
|
27118
27104
|
tooltip: spec.tooltip,
|
|
@@ -27120,7 +27106,7 @@
|
|
|
27120
27106
|
enabled: true,
|
|
27121
27107
|
borderless: spec.borderless
|
|
27122
27108
|
};
|
|
27123
|
-
const buttonTypeClasses = calculateClassesFromButtonType(
|
|
27109
|
+
const buttonTypeClasses = calculateClassesFromButtonType(spec.buttonType ?? 'secondary');
|
|
27124
27110
|
const optTranslatedText = isToggleButton ? spec.text.map(providers.translate) : Optional.some(providers.translate(spec.text));
|
|
27125
27111
|
const optTranslatedTextComponed = optTranslatedText.map(text$2);
|
|
27126
27112
|
const ariaLabelAttributes = buttonSpec.tooltip.or(optTranslatedText).map((al) => ({
|
|
@@ -27760,7 +27746,7 @@
|
|
|
27760
27746
|
file: { title: 'File', items: 'newdocument restoredraft | preview | importword exportpdf exportword | export print | deleteallconversations' },
|
|
27761
27747
|
edit: { title: 'Edit', items: 'undo redo | cut copy paste pastetext | selectall | searchreplace' },
|
|
27762
27748
|
view: { title: 'View', items: 'code suggestededits revisionhistory | visualaid visualchars visualblocks | spellchecker | preview fullscreen | showcomments' },
|
|
27763
|
-
insert: { title: 'Insert', items: 'image link media addcomment pageembed inserttemplate codesample inserttable accordion math | charmap emoticons hr | pagebreak nonbreaking anchor tableofcontents footnotes | mergetags | insertdatetime' },
|
|
27749
|
+
insert: { title: 'Insert', items: 'image video link media addcomment pageembed inserttemplate codesample inserttable accordion math | charmap emoticons hr | pagebreak nonbreaking anchor tableofcontents footnotes | mergetags | insertdatetime' },
|
|
27764
27750
|
format: { title: 'Format', items: 'bold italic underline strikethrough superscript subscript codeformat | styles blocks fontfamily fontsize align lineheight | forecolor backcolor | language | removeformat' },
|
|
27765
27751
|
tools: { title: 'Tools', items: 'aidialog aishortcuts | spellchecker spellcheckerlanguage | autocorrect capitalization | a11ycheck code typography wordcount addtemplate' },
|
|
27766
27752
|
table: { title: 'Table', items: 'inserttable | cell row column | advtablesort | tableprops deletetable' },
|
|
@@ -28064,7 +28050,6 @@
|
|
|
28064
28050
|
});
|
|
28065
28051
|
};
|
|
28066
28052
|
const renderCommonToolbarButton = (spec, specialisation, providersBackstage, btnName) => {
|
|
28067
|
-
var _a;
|
|
28068
28053
|
const editorOffCell = Cell(noop);
|
|
28069
28054
|
const structure = renderCommonStructure(spec.icon, spec.text, spec.tooltip, Optional.none(), providersBackstage, spec.context, btnName);
|
|
28070
28055
|
return Button.sketch({
|
|
@@ -28091,7 +28076,7 @@
|
|
|
28091
28076
|
// Here we add the commonButtonDisplayEvent behaviour from the structure so we can listen
|
|
28092
28077
|
// to updateMenuIcon and updateMenuText events and run the defined callbacks as they are
|
|
28093
28078
|
// defined in the renderCommonStructure function and fix the size of the button onAttached.
|
|
28094
|
-
[commonButtonDisplayEvent]:
|
|
28079
|
+
[commonButtonDisplayEvent]: structure.buttonBehaviours?.[commonButtonDisplayEvent],
|
|
28095
28080
|
}
|
|
28096
28081
|
});
|
|
28097
28082
|
};
|
|
@@ -28270,36 +28255,39 @@
|
|
|
28270
28255
|
}
|
|
28271
28256
|
}
|
|
28272
28257
|
});
|
|
28273
|
-
const
|
|
28274
|
-
|
|
28275
|
-
|
|
28276
|
-
|
|
28277
|
-
|
|
28278
|
-
|
|
28279
|
-
|
|
28280
|
-
|
|
28281
|
-
|
|
28282
|
-
|
|
28283
|
-
|
|
28284
|
-
|
|
28285
|
-
|
|
28286
|
-
onShow: (comp) => {
|
|
28287
|
-
if (tooltipString.get() !== spec.tooltip.getOr('')) {
|
|
28288
|
-
const translated = sharedBackstage.providers.translate(tooltipString.get());
|
|
28289
|
-
Tooltipping.setComponents(comp, sharedBackstage.providers.tooltips.getComponents({ tooltipText: translated }));
|
|
28290
|
-
}
|
|
28258
|
+
const structure = renderCommonStructure(spec.icon, spec.text, Optional.none(), Optional.some([
|
|
28259
|
+
Toggling.config({
|
|
28260
|
+
toggleClass: "tox-tbtn--enabled" /* ToolbarButtonClasses.Ticked */,
|
|
28261
|
+
aria: spec.presets === 'color' ? { mode: 'none' } : { mode: 'pressed' },
|
|
28262
|
+
toggleOnExecute: false
|
|
28263
|
+
}),
|
|
28264
|
+
...(spec.tooltip.isSome() ? [
|
|
28265
|
+
Tooltipping.config(sharedBackstage.providers.tooltips.getConfig({
|
|
28266
|
+
tooltipText: sharedBackstage.providers.translate(spec.tooltip.getOr('')),
|
|
28267
|
+
onShow: (comp) => {
|
|
28268
|
+
if (tooltipString.get() !== spec.tooltip.getOr('')) {
|
|
28269
|
+
const translated = sharedBackstage.providers.translate(tooltipString.get());
|
|
28270
|
+
Tooltipping.setComponents(comp, sharedBackstage.providers.tooltips.getComponents({ tooltipText: translated }));
|
|
28291
28271
|
}
|
|
28292
|
-
}
|
|
28293
|
-
|
|
28294
|
-
]
|
|
28272
|
+
}
|
|
28273
|
+
}))
|
|
28274
|
+
] : [])
|
|
28275
|
+
]), sharedBackstage.providers, spec.context, btnName);
|
|
28276
|
+
const mainButton = Button.sketch({
|
|
28295
28277
|
dom: {
|
|
28296
|
-
...
|
|
28297
|
-
classes: [
|
|
28278
|
+
...structure.dom,
|
|
28279
|
+
classes: [
|
|
28280
|
+
"tox-tbtn" /* ToolbarButtonClasses.Button */,
|
|
28281
|
+
'tox-split-button__main'
|
|
28282
|
+
].concat(spec.text.isSome() ? ["tox-tbtn--select" /* ToolbarButtonClasses.MatchWidth */] : []),
|
|
28298
28283
|
attributes: {
|
|
28299
28284
|
'aria-label': getMainButtonAriaLabel(),
|
|
28300
28285
|
...(isNonNullable(btnName) ? { 'data-mce-name': btnName } : {})
|
|
28301
28286
|
}
|
|
28302
28287
|
},
|
|
28288
|
+
components: structure.components,
|
|
28289
|
+
eventOrder: structure.eventOrder,
|
|
28290
|
+
buttonBehaviours: structure.buttonBehaviours,
|
|
28303
28291
|
action: (button) => {
|
|
28304
28292
|
if (spec.onAction) {
|
|
28305
28293
|
const api = getApi(button);
|
|
@@ -29107,7 +29095,6 @@
|
|
|
29107
29095
|
};
|
|
29108
29096
|
const createFontSizeButton = (editor, backstage) => createSelectButton(editor, backstage, getSpec$1(editor), getTooltipPlaceholder$1, 'FontSizeTextUpdate', 'fontsize');
|
|
29109
29097
|
const getConfigFromUnit = (unit) => {
|
|
29110
|
-
var _a;
|
|
29111
29098
|
const baseConfig = { step: 1 };
|
|
29112
29099
|
const configs = {
|
|
29113
29100
|
em: { step: 0.1 },
|
|
@@ -29117,7 +29104,7 @@
|
|
|
29117
29104
|
ch: { step: 0.1 },
|
|
29118
29105
|
rem: { step: 0.1 }
|
|
29119
29106
|
};
|
|
29120
|
-
return
|
|
29107
|
+
return configs[unit] ?? baseConfig;
|
|
29121
29108
|
};
|
|
29122
29109
|
const defaultValue = 16;
|
|
29123
29110
|
const isValidValue = (value) => value >= 0;
|
|
@@ -29491,7 +29478,7 @@
|
|
|
29491
29478
|
OuterContainer.toggleSidebar(outerContainer, value);
|
|
29492
29479
|
fireToggleSidebar(editor);
|
|
29493
29480
|
});
|
|
29494
|
-
editor.addQueryValueHandler('ToggleSidebar', () =>
|
|
29481
|
+
editor.addQueryValueHandler('ToggleSidebar', () => OuterContainer.whichSidebar(outerContainer) ?? '');
|
|
29495
29482
|
editor.addCommand('ToggleView', (_ui, value) => {
|
|
29496
29483
|
if (OuterContainer.toggleView(outerContainer, value)) {
|
|
29497
29484
|
const target = outerContainer.element;
|
|
@@ -29508,7 +29495,7 @@
|
|
|
29508
29495
|
fireToggleView(editor);
|
|
29509
29496
|
}
|
|
29510
29497
|
});
|
|
29511
|
-
editor.addQueryValueHandler('ToggleView', () =>
|
|
29498
|
+
editor.addQueryValueHandler('ToggleView', () => OuterContainer.whichView(outerContainer) ?? '');
|
|
29512
29499
|
const toolbarMode = getToolbarMode(editor);
|
|
29513
29500
|
const refreshDrawer = () => {
|
|
29514
29501
|
OuterContainer.refreshToolbar(uiRefs.mainUi.outerContainer);
|
|
@@ -29699,14 +29686,13 @@
|
|
|
29699
29686
|
const getTop = () => offsetParent.fold(() => isPositionedAtTop()
|
|
29700
29687
|
? Math.max(targetBounds.y - get$d(container.element) + offset, 0)
|
|
29701
29688
|
: targetBounds.bottom, (offsetParent) => {
|
|
29702
|
-
var _a;
|
|
29703
29689
|
// Because for ui_mode: split, the main mothership (which includes the toolbar) is moved and added as a sibling
|
|
29704
29690
|
// If there's any relative position div set as the parent and the offsetParent is no longer the body,
|
|
29705
29691
|
// the absolute top/left positions would no longer be correct
|
|
29706
29692
|
// When there's a relative div and the position is the same as the toolbar container
|
|
29707
29693
|
// then it would produce a negative top as it needs to be positioned on top of the offsetParent
|
|
29708
29694
|
const offsetBox = box$1(offsetParent);
|
|
29709
|
-
const scrollDelta =
|
|
29695
|
+
const scrollDelta = offsetParent.dom.scrollTop ?? 0;
|
|
29710
29696
|
const isOffsetParentBody = eq(offsetParent, body());
|
|
29711
29697
|
const topValue = isOffsetParentBody
|
|
29712
29698
|
? Math.max(targetBounds.y - get$d(container.element) + offset, 0)
|
|
@@ -31253,7 +31239,7 @@
|
|
|
31253
31239
|
getOptions: constant$1(settings),
|
|
31254
31240
|
hash: (input) => isUndefined(input.customCode) ? input.code : `${input.code}/${input.customCode}`,
|
|
31255
31241
|
display: (input) => input.title,
|
|
31256
|
-
watcher: (editor, value, callback) =>
|
|
31242
|
+
watcher: (editor, value, callback) => editor.formatter.formatChanged('lang', callback, false, { value: value.code, customValue: value.customCode ?? null }).unbind,
|
|
31257
31243
|
getCurrent: (editor) => {
|
|
31258
31244
|
const node = SugarElement.fromDom(editor.selection.getNode());
|
|
31259
31245
|
return closest(node, (n) => Optional.some(n)
|
|
@@ -32146,8 +32132,7 @@
|
|
|
32146
32132
|
|
|
32147
32133
|
const isHidden = (elm) => elm.nodeName === 'BR' || !!elm.getAttribute('data-mce-bogus') || elm.getAttribute('data-mce-type') === 'bookmark';
|
|
32148
32134
|
const renderElementPath = (editor, settings, providersBackstage) => {
|
|
32149
|
-
|
|
32150
|
-
const delimiter = (_a = settings.delimiter) !== null && _a !== void 0 ? _a : '\u203A';
|
|
32135
|
+
const delimiter = settings.delimiter ?? '\u203A';
|
|
32151
32136
|
const renderElement = (name, element, index) => Button.sketch({
|
|
32152
32137
|
dom: {
|
|
32153
32138
|
tag: 'div',
|
|
@@ -32858,11 +32843,11 @@
|
|
|
32858
32843
|
OuterContainer.focusToolbar(outerContainer);
|
|
32859
32844
|
});
|
|
32860
32845
|
editor.addCommand('ToggleToolbarDrawer', (_ui, options, args) => {
|
|
32861
|
-
if (options
|
|
32846
|
+
if (options?.skipFocus) {
|
|
32862
32847
|
logFeatureDeprecationWarning('skipFocus');
|
|
32863
32848
|
OuterContainer.toggleToolbarDrawerWithoutFocusing(outerContainer);
|
|
32864
32849
|
}
|
|
32865
|
-
else if (args
|
|
32850
|
+
else if (args?.skip_focus) {
|
|
32866
32851
|
OuterContainer.toggleToolbarDrawerWithoutFocusing(outerContainer);
|
|
32867
32852
|
}
|
|
32868
32853
|
else {
|