@ntlab/ntjs-assets 2.83.0 → 2.85.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 +3 -3
- package/assets/js/tinymce/icons/default/icons.js +5 -0
- package/assets/js/tinymce/icons/default/icons.min.js +1 -1
- package/assets/js/tinymce/models/dom/model.js +5 -14
- package/assets/js/tinymce/models/dom/model.min.js +1 -1
- package/assets/js/tinymce/notices.txt +2 -2
- package/assets/js/tinymce/plugins/accordion/plugin.js +2 -5
- package/assets/js/tinymce/plugins/advlist/plugin.js +2 -2
- 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 +1 -2
- package/assets/js/tinymce/plugins/autoresize/plugin.js +1 -1
- package/assets/js/tinymce/plugins/autosave/plugin.js +1 -1
- package/assets/js/tinymce/plugins/charmap/plugin.js +1 -2
- package/assets/js/tinymce/plugins/code/plugin.js +3 -2
- package/assets/js/tinymce/plugins/code/plugin.min.js +1 -1
- package/assets/js/tinymce/plugins/codesample/plugin.js +3 -2
- package/assets/js/tinymce/plugins/codesample/plugin.min.js +1 -1
- package/assets/js/tinymce/plugins/directionality/plugin.js +2 -5
- package/assets/js/tinymce/plugins/emoticons/plugin.js +1 -3
- package/assets/js/tinymce/plugins/fullscreen/plugin.js +2 -5
- package/assets/js/tinymce/plugins/help/js/i18n/keynav/bg-BG.js +93 -0
- package/assets/js/tinymce/plugins/help/js/i18n/keynav/fr-FR.js +93 -0
- package/assets/js/tinymce/plugins/help/js/i18n/keynav/he-IL.js +93 -0
- package/assets/js/tinymce/plugins/help/js/i18n/keynav/hu-HU.js +93 -0
- package/assets/js/tinymce/plugins/help/js/i18n/keynav/ko-KR.js +93 -0
- package/assets/js/tinymce/plugins/help/js/i18n/keynav/nb-NO.js +93 -0
- package/assets/js/tinymce/plugins/help/js/i18n/keynav/pt-BR.js +93 -0
- package/assets/js/tinymce/plugins/help/js/i18n/keynav/pt-PT.js +93 -0
- package/assets/js/tinymce/plugins/help/js/i18n/keynav/sl-SI.js +93 -0
- package/assets/js/tinymce/plugins/help/js/i18n/keynav/sv-SE.js +93 -0
- package/assets/js/tinymce/plugins/help/js/i18n/keynav/th-TH.js +93 -0
- package/assets/js/tinymce/plugins/help/js/i18n/keynav/zh-CN.js +87 -0
- package/assets/js/tinymce/plugins/help/js/i18n/keynav/zh-TW.js +93 -0
- package/assets/js/tinymce/plugins/help/plugin.js +3 -5
- package/assets/js/tinymce/plugins/help/plugin.min.js +1 -1
- package/assets/js/tinymce/plugins/image/plugin.js +14 -5
- package/assets/js/tinymce/plugins/image/plugin.min.js +1 -1
- package/assets/js/tinymce/plugins/importcss/plugin.js +1 -2
- package/assets/js/tinymce/plugins/insertdatetime/plugin.js +2 -1
- package/assets/js/tinymce/plugins/insertdatetime/plugin.min.js +1 -1
- package/assets/js/tinymce/plugins/langs7/es.js +2 -2
- package/assets/js/tinymce/plugins/langs7/pt_BR.js +1 -1
- package/assets/js/tinymce/plugins/link/plugin.js +1 -4
- package/assets/js/tinymce/plugins/lists/plugin.js +105 -2049
- package/assets/js/tinymce/plugins/lists/plugin.min.js +1 -1
- package/assets/js/tinymce/plugins/media/plugin.js +1 -3
- 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 +1 -1
- package/assets/js/tinymce/plugins/quickbars/plugin.js +1 -1
- package/assets/js/tinymce/plugins/save/plugin.js +1 -1
- package/assets/js/tinymce/plugins/searchreplace/plugin.js +1 -3
- package/assets/js/tinymce/plugins/table/plugin.js +2 -12
- 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 +1 -2
- package/assets/js/tinymce/plugins/wordcount/plugin.js +1 -1
- package/assets/js/tinymce/skins/ui/oxide/content.css +91 -0
- package/assets/js/tinymce/skins/ui/oxide/content.inline.css +91 -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 +495 -70
- 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 +91 -0
- package/assets/js/tinymce/skins/ui/oxide-dark/content.inline.css +91 -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 +495 -70
- 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 +91 -0
- package/assets/js/tinymce/skins/ui/tinymce-5/content.inline.css +91 -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 +495 -70
- 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 +91 -0
- package/assets/js/tinymce/skins/ui/tinymce-5-dark/content.inline.css +91 -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 +495 -70
- 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 +483 -524
- package/assets/js/tinymce/themes/silver/theme.min.js +1 -1
- package/assets/js/tinymce/tinymce.js +5874 -3300
- package/assets/js/tinymce/tinymce.min.js +3 -4
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* TinyMCE version
|
|
2
|
+
* TinyMCE version 8.0.0 (TBD)
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
(function () {
|
|
@@ -80,7 +80,6 @@
|
|
|
80
80
|
const tripleEquals = (a, b) => {
|
|
81
81
|
return a === b;
|
|
82
82
|
};
|
|
83
|
-
// eslint-disable-next-line prefer-arrow/prefer-arrow-functions
|
|
84
83
|
function curry(fn, ...initialArgs) {
|
|
85
84
|
return (...restArgs) => {
|
|
86
85
|
const all = initialArgs.concat(restArgs);
|
|
@@ -350,11 +349,9 @@
|
|
|
350
349
|
// reuse the same object
|
|
351
350
|
Optional.singletonNone = new Optional(false);
|
|
352
351
|
|
|
353
|
-
/* eslint-disable @typescript-eslint/unbound-method */
|
|
354
352
|
const nativeSlice = Array.prototype.slice;
|
|
355
353
|
const nativeIndexOf = Array.prototype.indexOf;
|
|
356
354
|
const nativePush = Array.prototype.push;
|
|
357
|
-
/* eslint-enable */
|
|
358
355
|
const rawIndexOf = (ts, t) => nativeIndexOf.call(ts, t);
|
|
359
356
|
const indexOf = (xs, x) => {
|
|
360
357
|
// The rawIndexOf method does not wrap up in an option. This is for performance reasons.
|
|
@@ -538,7 +535,6 @@
|
|
|
538
535
|
//
|
|
539
536
|
// Use the native keys if it is available (IE9+), otherwise fall back to manually filtering
|
|
540
537
|
const keys = Object.keys;
|
|
541
|
-
// eslint-disable-next-line @typescript-eslint/unbound-method
|
|
542
538
|
const hasOwnProperty = Object.hasOwnProperty;
|
|
543
539
|
const each = (obj, f) => {
|
|
544
540
|
const props = keys(obj);
|
|
@@ -1899,6 +1895,7 @@
|
|
|
1899
1895
|
return ret;
|
|
1900
1896
|
};
|
|
1901
1897
|
const offsetParent = (element) => Optional.from(element.dom.offsetParent).map(SugarElement.fromDom);
|
|
1898
|
+
const prevSibling = (element) => Optional.from(element.dom.previousSibling).map(SugarElement.fromDom);
|
|
1902
1899
|
const nextSibling = (element) => Optional.from(element.dom.nextSibling).map(SugarElement.fromDom);
|
|
1903
1900
|
const children = (element) => map$2(element.dom.childNodes, SugarElement.fromDom);
|
|
1904
1901
|
const child$2 = (element, index) => {
|
|
@@ -2210,9 +2207,7 @@
|
|
|
2210
2207
|
|
|
2211
2208
|
// some elements, such as mathml, don't have style attributes
|
|
2212
2209
|
// others, such as angular elements, have style attributes that aren't a CSSStyleDeclaration
|
|
2213
|
-
const isSupported = (dom) =>
|
|
2214
|
-
// eslint-disable-next-line @typescript-eslint/unbound-method
|
|
2215
|
-
dom.style !== undefined && isFunction(dom.style.getPropertyValue);
|
|
2210
|
+
const isSupported = (dom) => dom.style !== undefined && isFunction(dom.style.getPropertyValue);
|
|
2216
2211
|
|
|
2217
2212
|
// Node.contains() is very, very, very good performance
|
|
2218
2213
|
// http://jsperf.com/closest-vs-contains/5
|
|
@@ -2439,17 +2434,13 @@
|
|
|
2439
2434
|
const isHidden$1 = (dom) => dom.offsetWidth <= 0 && dom.offsetHeight <= 0;
|
|
2440
2435
|
const isVisible = (element) => !isHidden$1(element.dom);
|
|
2441
2436
|
|
|
2442
|
-
const api$1 = Dimension('width', (element) =>
|
|
2443
|
-
// IMO passing this function is better than using dom['offset' + 'width']
|
|
2444
|
-
element.dom.offsetWidth);
|
|
2445
|
-
const apiExact = Dimension('width', (element) => {
|
|
2437
|
+
const api$1 = Dimension('width', (element) => {
|
|
2446
2438
|
const dom = element.dom;
|
|
2447
2439
|
return inBody(element) ? dom.getBoundingClientRect().width : dom.offsetWidth;
|
|
2448
2440
|
});
|
|
2449
2441
|
const set$6 = (element, h) => api$1.set(element, h);
|
|
2450
2442
|
const get$c = (element) => api$1.get(element);
|
|
2451
2443
|
const getOuter = (element) => api$1.getOuter(element);
|
|
2452
|
-
const getOuterExact = (element) => apiExact.getOuter(element);
|
|
2453
2444
|
const setMax = (element, value) => {
|
|
2454
2445
|
// These properties affect the absolute max-height, they are not counted natively, we want to include these properties.
|
|
2455
2446
|
const inclusions = ['margin-left', 'border-left-width', 'padding-left', 'padding-right', 'border-right-width', 'margin-right'];
|
|
@@ -3283,7 +3274,9 @@
|
|
|
3283
3274
|
}
|
|
3284
3275
|
};
|
|
3285
3276
|
|
|
3286
|
-
const mergeValues$1 = (values, base) =>
|
|
3277
|
+
const mergeValues$1 = (values, base) => {
|
|
3278
|
+
return SimpleResult.svalue(deepMerge(base, merge$1.apply(undefined, values)));
|
|
3279
|
+
};
|
|
3287
3280
|
const mergeErrors$1 = (errors) => compose(SimpleResult.serror, flatten)(errors);
|
|
3288
3281
|
const consolidateObj = (objects, base) => {
|
|
3289
3282
|
const partition = SimpleResult.partition(objects);
|
|
@@ -3513,6 +3506,7 @@
|
|
|
3513
3506
|
const optionNumber = (key) => optionOf(key, number);
|
|
3514
3507
|
const optionString = (key) => optionOf(key, string);
|
|
3515
3508
|
const optionStringEnum = (key, values) => optionOf(key, validateEnum(values));
|
|
3509
|
+
const optionBoolean = (key) => optionOf(key, boolean);
|
|
3516
3510
|
const optionFunction = (key) => optionOf(key, functionProcessor);
|
|
3517
3511
|
const optionArrayOf = (key, schema) => optionOf(key, arrOf(schema));
|
|
3518
3512
|
const optionObjOf = (key, objSchema) => optionOf(key, objOf(objSchema));
|
|
@@ -4902,6 +4896,11 @@
|
|
|
4902
4896
|
const RIGHT = [39];
|
|
4903
4897
|
const DOWN = [40];
|
|
4904
4898
|
|
|
4899
|
+
const closeTooltips = constant$1('tooltipping.close.all');
|
|
4900
|
+
const dismissPopups = constant$1('dismiss.popups');
|
|
4901
|
+
const repositionPopups = constant$1('reposition.popups');
|
|
4902
|
+
const mouseReleased = constant$1('mouse.released');
|
|
4903
|
+
|
|
4905
4904
|
const cyclePrev = (values, index, predicate) => {
|
|
4906
4905
|
const before = reverse(values.slice(0, index));
|
|
4907
4906
|
const after = reverse(values.slice(index + 1));
|
|
@@ -5231,7 +5230,19 @@
|
|
|
5231
5230
|
const goFromPseudoTabstop = (component, simulatedEvent, tabbingConfig) => findCurrent(component, tabbingConfig).filter((elem) => !tabbingConfig.useTabstopAt(elem))
|
|
5232
5231
|
.bind((elem) => (isFirstChild(elem) ? goBackwards : goForwards)(component, simulatedEvent, tabbingConfig));
|
|
5233
5232
|
const execute = (component, simulatedEvent, tabbingConfig) => tabbingConfig.onEnter.bind((f) => f(component, simulatedEvent));
|
|
5234
|
-
const exit = (component, simulatedEvent, tabbingConfig) =>
|
|
5233
|
+
const exit = (component, simulatedEvent, tabbingConfig) => {
|
|
5234
|
+
component.getSystem().broadcastOn([closeTooltips()], {
|
|
5235
|
+
closedTooltip: () => {
|
|
5236
|
+
simulatedEvent.stop();
|
|
5237
|
+
}
|
|
5238
|
+
});
|
|
5239
|
+
if (!simulatedEvent.isStopped()) {
|
|
5240
|
+
return tabbingConfig.onEscape.bind((f) => f(component, simulatedEvent));
|
|
5241
|
+
}
|
|
5242
|
+
else {
|
|
5243
|
+
return Optional.none();
|
|
5244
|
+
}
|
|
5245
|
+
};
|
|
5235
5246
|
const getKeydownRules = constant$1([
|
|
5236
5247
|
rule(and([isShift$1, inSet(TAB)]), goBackwards),
|
|
5237
5248
|
rule(inSet(TAB), goForwards),
|
|
@@ -5267,7 +5278,7 @@
|
|
|
5267
5278
|
// keyup also. This does make the name confusing, though.
|
|
5268
5279
|
const stopEventForFirefox = (_component, _simulatedEvent) => Optional.some(true);
|
|
5269
5280
|
|
|
5270
|
-
const schema$
|
|
5281
|
+
const schema$y = [
|
|
5271
5282
|
defaulted('execute', defaultExecute),
|
|
5272
5283
|
defaulted('useSpace', false),
|
|
5273
5284
|
defaulted('useEnter', true),
|
|
@@ -5289,7 +5300,7 @@
|
|
|
5289
5300
|
const getKeyupRules$5 = (component, _simulatedEvent, executeConfig, _executeState) => executeConfig.useSpace && !inside(component.element) ?
|
|
5290
5301
|
[rule(inSet(SPACE), stopEventForFirefox)] :
|
|
5291
5302
|
[];
|
|
5292
|
-
var ExecutionType = typical(schema$
|
|
5303
|
+
var ExecutionType = typical(schema$y, NoState.init, getKeydownRules$5, getKeyupRules$5, () => Optional.none());
|
|
5293
5304
|
|
|
5294
5305
|
const flatgrid$1 = () => {
|
|
5295
5306
|
const dimensions = value$2();
|
|
@@ -5390,7 +5401,7 @@
|
|
|
5390
5401
|
const cycleUp$1 = (values, index, numRows, numCols) => cycleVertical$1(values, index, numRows, numCols, -1);
|
|
5391
5402
|
const cycleDown$1 = (values, index, numRows, numCols) => cycleVertical$1(values, index, numRows, numCols, +1);
|
|
5392
5403
|
|
|
5393
|
-
const schema$
|
|
5404
|
+
const schema$x = [
|
|
5394
5405
|
required$1('selector'),
|
|
5395
5406
|
defaulted('execute', defaultExecute),
|
|
5396
5407
|
onKeyboardHandler('onEscape'),
|
|
@@ -5427,7 +5438,7 @@
|
|
|
5427
5438
|
rule(inSet(ESCAPE), doEscape$1),
|
|
5428
5439
|
rule(inSet(SPACE), stopEventForFirefox)
|
|
5429
5440
|
]);
|
|
5430
|
-
var FlatgridType = typical(schema$
|
|
5441
|
+
var FlatgridType = typical(schema$x, flatgrid$1, getKeydownRules$4, getKeyupRules$4, () => Optional.some(focusIn$4));
|
|
5431
5442
|
|
|
5432
5443
|
const f = (container, selector, current, delta, getNewIndex) => {
|
|
5433
5444
|
const isDisabledButton = (candidate) => name$3(candidate) === 'button' && get$g(candidate, 'disabled') === 'disabled';
|
|
@@ -5451,7 +5462,7 @@
|
|
|
5451
5462
|
return newIndex === prevIndex ? Optional.none() : onNewIndex(newIndex);
|
|
5452
5463
|
});
|
|
5453
5464
|
|
|
5454
|
-
const schema$
|
|
5465
|
+
const schema$w = [
|
|
5455
5466
|
required$1('selector'),
|
|
5456
5467
|
defaulted('getInitial', Optional.none),
|
|
5457
5468
|
defaulted('execute', defaultExecute),
|
|
@@ -5490,7 +5501,7 @@
|
|
|
5490
5501
|
rule(inSet(SPACE), stopEventForFirefox),
|
|
5491
5502
|
rule(inSet(ESCAPE), doEscape)
|
|
5492
5503
|
]);
|
|
5493
|
-
var FlowType = typical(schema$
|
|
5504
|
+
var FlowType = typical(schema$w, NoState.init, getKeydownRules$3, getKeyupRules$3, () => Optional.some(focusIn$3));
|
|
5494
5505
|
|
|
5495
5506
|
const toCell = (matrix, rowIndex, columnIndex) => Optional.from(matrix[rowIndex]).bind((row) => Optional.from(row[columnIndex]).map((cell) => ({
|
|
5496
5507
|
rowIndex,
|
|
@@ -5531,7 +5542,7 @@
|
|
|
5531
5542
|
const moveUp$1 = (matrix, startRow, startCol) => moveVertical(matrix, startCol, startRow, -1);
|
|
5532
5543
|
const moveDown$1 = (matrix, startRow, startCol) => moveVertical(matrix, startCol, startRow, +1);
|
|
5533
5544
|
|
|
5534
|
-
const schema$
|
|
5545
|
+
const schema$v = [
|
|
5535
5546
|
requiredObjOf('selectors', [
|
|
5536
5547
|
required$1('row'),
|
|
5537
5548
|
required$1('cell')
|
|
@@ -5580,9 +5591,9 @@
|
|
|
5580
5591
|
const getKeyupRules$2 = constant$1([
|
|
5581
5592
|
rule(inSet(SPACE), stopEventForFirefox)
|
|
5582
5593
|
]);
|
|
5583
|
-
var MatrixType = typical(schema$
|
|
5594
|
+
var MatrixType = typical(schema$v, NoState.init, getKeydownRules$2, getKeyupRules$2, () => Optional.some(focusIn$2));
|
|
5584
5595
|
|
|
5585
|
-
const schema$
|
|
5596
|
+
const schema$u = [
|
|
5586
5597
|
required$1('selector'),
|
|
5587
5598
|
defaulted('execute', defaultExecute),
|
|
5588
5599
|
defaulted('moveOnTab', false)
|
|
@@ -5609,9 +5620,9 @@
|
|
|
5609
5620
|
const getKeyupRules$1 = constant$1([
|
|
5610
5621
|
rule(inSet(SPACE), stopEventForFirefox)
|
|
5611
5622
|
]);
|
|
5612
|
-
var MenuType = typical(schema$
|
|
5623
|
+
var MenuType = typical(schema$u, NoState.init, getKeydownRules$1, getKeyupRules$1, () => Optional.some(focusIn$1));
|
|
5613
5624
|
|
|
5614
|
-
const schema$
|
|
5625
|
+
const schema$t = [
|
|
5615
5626
|
onKeyboardHandler('onSpace'),
|
|
5616
5627
|
onKeyboardHandler('onEnter'),
|
|
5617
5628
|
onKeyboardHandler('onShiftEnter'),
|
|
@@ -5641,7 +5652,7 @@
|
|
|
5641
5652
|
...(specialInfo.stopSpaceKeyup ? [rule(inSet(SPACE), stopEventForFirefox)] : []),
|
|
5642
5653
|
rule(inSet(ESCAPE), specialInfo.onEscape)
|
|
5643
5654
|
];
|
|
5644
|
-
var SpecialType = typical(schema$
|
|
5655
|
+
var SpecialType = typical(schema$t, NoState.init, getKeydownRules, getKeyupRules, (specialInfo) => specialInfo.focusIn);
|
|
5645
5656
|
|
|
5646
5657
|
const acyclic = AcyclicType.schema();
|
|
5647
5658
|
const cyclic = CyclicType.schema();
|
|
@@ -6279,7 +6290,7 @@
|
|
|
6279
6290
|
};
|
|
6280
6291
|
|
|
6281
6292
|
const baseBehaviour = 'alloy.base.behaviour';
|
|
6282
|
-
const schema$
|
|
6293
|
+
const schema$s = objOf([
|
|
6283
6294
|
field$1('dom', 'dom', required$2(), objOf([
|
|
6284
6295
|
// Note, no children.
|
|
6285
6296
|
required$1('tag'),
|
|
@@ -6308,7 +6319,7 @@
|
|
|
6308
6319
|
}), anyValue()),
|
|
6309
6320
|
option$3('domModification')
|
|
6310
6321
|
]);
|
|
6311
|
-
const toInfo = (spec) => asRaw('custom.definition', schema$
|
|
6322
|
+
const toInfo = (spec) => asRaw('custom.definition', schema$s, spec);
|
|
6312
6323
|
const toDefinition = (detail) =>
|
|
6313
6324
|
// EFFICIENCY: Consider not merging here.
|
|
6314
6325
|
({
|
|
@@ -7337,7 +7348,6 @@
|
|
|
7337
7348
|
const withinRange = (coord1, coord2, xRange, yRange, scroll, origin) => {
|
|
7338
7349
|
const a1 = asAbsolute(coord1, scroll, origin);
|
|
7339
7350
|
const a2 = asAbsolute(coord2, scroll, origin);
|
|
7340
|
-
// eslint-disable-next-line no-console
|
|
7341
7351
|
// console.log(`a1.left: ${a1.left}, a2.left: ${a2.left}, leftDelta: ${a1.left - a2.left}, xRange: ${xRange}, lD <= xRange: ${Math.abs(a1.left - a2.left) <= xRange}`);
|
|
7342
7352
|
// console.log(`a1.top: ${a1.top}, a2.top: ${a2.top}, topDelta: ${a1.top - a2.top}, yRange: ${yRange}, lD <= xRange: ${Math.abs(a1.top - a2.top) <= yRange}`);
|
|
7343
7353
|
return Math.abs(a1.left - a2.left) <= xRange &&
|
|
@@ -7628,7 +7638,7 @@
|
|
|
7628
7638
|
};
|
|
7629
7639
|
};
|
|
7630
7640
|
|
|
7631
|
-
const factory$
|
|
7641
|
+
const factory$n = (detail) => {
|
|
7632
7642
|
const { attributes, ...domWithoutAttributes } = detail.dom;
|
|
7633
7643
|
return {
|
|
7634
7644
|
uid: detail.uid,
|
|
@@ -7649,7 +7659,7 @@
|
|
|
7649
7659
|
};
|
|
7650
7660
|
const Container = single({
|
|
7651
7661
|
name: 'Container',
|
|
7652
|
-
factory: factory$
|
|
7662
|
+
factory: factory$n,
|
|
7653
7663
|
configFields: [
|
|
7654
7664
|
defaulted('components', []),
|
|
7655
7665
|
field('containerBehaviours', []),
|
|
@@ -7714,7 +7724,7 @@
|
|
|
7714
7724
|
defaulted('mustSnap', false)
|
|
7715
7725
|
]);
|
|
7716
7726
|
|
|
7717
|
-
const schema$
|
|
7727
|
+
const schema$r = [
|
|
7718
7728
|
// Is this used?
|
|
7719
7729
|
defaulted('useFixed', never),
|
|
7720
7730
|
required$1('blockerClass'),
|
|
@@ -7876,8 +7886,8 @@
|
|
|
7876
7886
|
start();
|
|
7877
7887
|
})
|
|
7878
7888
|
];
|
|
7879
|
-
const schema$
|
|
7880
|
-
...schema$
|
|
7889
|
+
const schema$q = [
|
|
7890
|
+
...schema$r,
|
|
7881
7891
|
output$1('dragger', {
|
|
7882
7892
|
handlers: handlers(events$d)
|
|
7883
7893
|
})
|
|
@@ -7958,8 +7968,8 @@
|
|
|
7958
7968
|
run$1(touchcancel(), stopBlocking)
|
|
7959
7969
|
];
|
|
7960
7970
|
};
|
|
7961
|
-
const schema$
|
|
7962
|
-
...schema$
|
|
7971
|
+
const schema$p = [
|
|
7972
|
+
...schema$r,
|
|
7963
7973
|
output$1('dragger', {
|
|
7964
7974
|
handlers: handlers(events$c)
|
|
7965
7975
|
})
|
|
@@ -7969,16 +7979,16 @@
|
|
|
7969
7979
|
...events$d(dragConfig, dragState, updateStartState),
|
|
7970
7980
|
...events$c(dragConfig, dragState, updateStartState)
|
|
7971
7981
|
];
|
|
7972
|
-
const schema$
|
|
7973
|
-
...schema$
|
|
7982
|
+
const schema$o = [
|
|
7983
|
+
...schema$r,
|
|
7974
7984
|
output$1('dragger', {
|
|
7975
7985
|
handlers: handlers(events$b)
|
|
7976
7986
|
})
|
|
7977
7987
|
];
|
|
7978
7988
|
|
|
7979
|
-
const mouse = schema$
|
|
7980
|
-
const touch = schema$
|
|
7981
|
-
const mouseOrTouch = schema$
|
|
7989
|
+
const mouse = schema$q;
|
|
7990
|
+
const touch = schema$p;
|
|
7991
|
+
const mouseOrTouch = schema$o;
|
|
7982
7992
|
|
|
7983
7993
|
var DraggingBranches = /*#__PURE__*/Object.freeze({
|
|
7984
7994
|
__proto__: null,
|
|
@@ -8731,7 +8741,7 @@
|
|
|
8731
8741
|
// Request the next animation frame so we can roughly determine when the transition starts and then ensure
|
|
8732
8742
|
// the transition is cleaned up. In addition add ~17ms to the delay as that's about about 1 frame at 60fps
|
|
8733
8743
|
const duration = getTransitionDuration(element);
|
|
8734
|
-
requestAnimationFrame(() => {
|
|
8744
|
+
window.requestAnimationFrame(() => {
|
|
8735
8745
|
timer = setTimeout(transitionDone, duration + 17);
|
|
8736
8746
|
set$9(element, timerAttr, timer);
|
|
8737
8747
|
});
|
|
@@ -8773,7 +8783,7 @@
|
|
|
8773
8783
|
* in case we decide to bring back the flexibility of working with non-standard positioning.
|
|
8774
8784
|
*/
|
|
8775
8785
|
const elementSize = (p) => ({
|
|
8776
|
-
width: Math.ceil(
|
|
8786
|
+
width: Math.ceil(getOuter(p)),
|
|
8777
8787
|
height: getOuter$1(p)
|
|
8778
8788
|
});
|
|
8779
8789
|
const layout = (anchorBox, element, bubbles, options) => {
|
|
@@ -8851,7 +8861,7 @@
|
|
|
8851
8861
|
|
|
8852
8862
|
const nu$1 = identity;
|
|
8853
8863
|
|
|
8854
|
-
const schema$
|
|
8864
|
+
const schema$n = () => optionObjOf('layouts', [
|
|
8855
8865
|
required$1('onLtr'),
|
|
8856
8866
|
required$1('onRtl'),
|
|
8857
8867
|
option$3('onBottomLtr'),
|
|
@@ -8890,7 +8900,7 @@
|
|
|
8890
8900
|
required$1('hotspot'),
|
|
8891
8901
|
option$3('bubble'),
|
|
8892
8902
|
defaulted('overrides', {}),
|
|
8893
|
-
schema$
|
|
8903
|
+
schema$n(),
|
|
8894
8904
|
output$1('placement', placement$4)
|
|
8895
8905
|
];
|
|
8896
8906
|
|
|
@@ -8914,7 +8924,7 @@
|
|
|
8914
8924
|
defaulted('width', 0),
|
|
8915
8925
|
defaulted('bubble', fallback()),
|
|
8916
8926
|
defaulted('overrides', {}),
|
|
8917
|
-
schema$
|
|
8927
|
+
schema$n(),
|
|
8918
8928
|
output$1('placement', placement$3)
|
|
8919
8929
|
];
|
|
8920
8930
|
|
|
@@ -8997,7 +9007,7 @@
|
|
|
8997
9007
|
required$1('node'),
|
|
8998
9008
|
required$1('root'),
|
|
8999
9009
|
option$3('bubble'),
|
|
9000
|
-
schema$
|
|
9010
|
+
schema$n(),
|
|
9001
9011
|
// chiefly MaxHeight.expandable()
|
|
9002
9012
|
defaulted('overrides', {}),
|
|
9003
9013
|
defaulted('showAbove', false),
|
|
@@ -9086,7 +9096,7 @@
|
|
|
9086
9096
|
option$3('getSelection'),
|
|
9087
9097
|
required$1('root'),
|
|
9088
9098
|
option$3('bubble'),
|
|
9089
|
-
schema$
|
|
9099
|
+
schema$n(),
|
|
9090
9100
|
defaulted('overrides', {}),
|
|
9091
9101
|
defaulted('showAbove', false),
|
|
9092
9102
|
output$1('placement', placement$1)
|
|
@@ -9127,7 +9137,7 @@
|
|
|
9127
9137
|
};
|
|
9128
9138
|
var SubmenuAnchor = [
|
|
9129
9139
|
required$1('item'),
|
|
9130
|
-
schema$
|
|
9140
|
+
schema$n(),
|
|
9131
9141
|
defaulted('overrides', {}),
|
|
9132
9142
|
output$1('placement', placement)
|
|
9133
9143
|
];
|
|
@@ -10142,7 +10152,10 @@
|
|
|
10142
10152
|
// to rely on receiving.
|
|
10143
10153
|
const receivingData = message;
|
|
10144
10154
|
if (!receivingData.universal) {
|
|
10145
|
-
if (contains$2(receivingData.channels, ExclusivityChannel)) {
|
|
10155
|
+
if (contains$2(receivingData.channels, ExclusivityChannel) || contains$2(receivingData.channels, closeTooltips())) {
|
|
10156
|
+
if (receivingData.data.closedTooltip && state.isShowing()) {
|
|
10157
|
+
receivingData.data.closedTooltip();
|
|
10158
|
+
}
|
|
10146
10159
|
hide(comp);
|
|
10147
10160
|
}
|
|
10148
10161
|
}
|
|
@@ -10290,13 +10303,9 @@
|
|
|
10290
10303
|
};
|
|
10291
10304
|
|
|
10292
10305
|
// TODO: ^ rename the parts/ api to composites, it will break mobile alloy now if we do
|
|
10293
|
-
const parts$
|
|
10306
|
+
const parts$g = AlloyParts;
|
|
10294
10307
|
const partType$1 = PartType;
|
|
10295
10308
|
|
|
10296
|
-
const dismissPopups = constant$1('dismiss.popups');
|
|
10297
|
-
const repositionPopups = constant$1('reposition.popups');
|
|
10298
|
-
const mouseReleased = constant$1('mouse.released');
|
|
10299
|
-
|
|
10300
10309
|
const fromSource = (event, source) => {
|
|
10301
10310
|
const stopper = Cell(false);
|
|
10302
10311
|
const cutter = Cell(false);
|
|
@@ -10780,7 +10789,7 @@
|
|
|
10780
10789
|
]));
|
|
10781
10790
|
};
|
|
10782
10791
|
|
|
10783
|
-
const factory$
|
|
10792
|
+
const factory$m = (detail) => {
|
|
10784
10793
|
const events$1 = events(detail.action);
|
|
10785
10794
|
const tag = detail.dom.tag;
|
|
10786
10795
|
const lookupAttr = (attr) => get$h(detail.dom, 'attributes').bind((attrs) => get$h(attrs, attr));
|
|
@@ -10828,7 +10837,7 @@
|
|
|
10828
10837
|
};
|
|
10829
10838
|
const Button = single({
|
|
10830
10839
|
name: 'Button',
|
|
10831
|
-
factory: factory$
|
|
10840
|
+
factory: factory$m,
|
|
10832
10841
|
configFields: [
|
|
10833
10842
|
defaulted('uid', undefined),
|
|
10834
10843
|
required$1('dom'),
|
|
@@ -10840,7 +10849,7 @@
|
|
|
10840
10849
|
]
|
|
10841
10850
|
});
|
|
10842
10851
|
|
|
10843
|
-
const schema$
|
|
10852
|
+
const schema$m = constant$1([
|
|
10844
10853
|
defaulted('shell', false),
|
|
10845
10854
|
required$1('makeItem'),
|
|
10846
10855
|
defaulted('setupItem', noop),
|
|
@@ -10855,12 +10864,12 @@
|
|
|
10855
10864
|
name: 'items',
|
|
10856
10865
|
overrides: customListDetail
|
|
10857
10866
|
});
|
|
10858
|
-
const parts$
|
|
10867
|
+
const parts$f = constant$1([
|
|
10859
10868
|
itemsPart
|
|
10860
10869
|
]);
|
|
10861
10870
|
const name$1 = constant$1('CustomList');
|
|
10862
10871
|
|
|
10863
|
-
const factory$
|
|
10872
|
+
const factory$l = (detail, components, _spec, _external) => {
|
|
10864
10873
|
const setItems = (list, items) => {
|
|
10865
10874
|
getListContainer(list).fold(() => {
|
|
10866
10875
|
// check that the group container existed. It may not have if the components
|
|
@@ -10900,9 +10909,9 @@
|
|
|
10900
10909
|
};
|
|
10901
10910
|
const CustomList = composite({
|
|
10902
10911
|
name: name$1(),
|
|
10903
|
-
configFields: schema$
|
|
10904
|
-
partFields: parts$
|
|
10905
|
-
factory: factory$
|
|
10912
|
+
configFields: schema$m(),
|
|
10913
|
+
partFields: parts$f(),
|
|
10914
|
+
factory: factory$l,
|
|
10906
10915
|
apis: {
|
|
10907
10916
|
setItems: (apis, list, items) => {
|
|
10908
10917
|
apis.setItems(list, items);
|
|
@@ -11031,7 +11040,7 @@
|
|
|
11031
11040
|
components: detail.components,
|
|
11032
11041
|
eventOrder: detail.eventOrder
|
|
11033
11042
|
});
|
|
11034
|
-
const schema$
|
|
11043
|
+
const schema$l = [
|
|
11035
11044
|
required$1('data'),
|
|
11036
11045
|
required$1('components'),
|
|
11037
11046
|
required$1('dom'),
|
|
@@ -11045,7 +11054,7 @@
|
|
|
11045
11054
|
output$1('builder', builder$2),
|
|
11046
11055
|
defaulted('eventOrder', {})
|
|
11047
11056
|
];
|
|
11048
|
-
var ItemType = schema$
|
|
11057
|
+
var ItemType = schema$l;
|
|
11049
11058
|
|
|
11050
11059
|
const builder$1 = (detail) => ({
|
|
11051
11060
|
dom: detail.dom,
|
|
@@ -11054,15 +11063,15 @@
|
|
|
11054
11063
|
stopper(focusItem())
|
|
11055
11064
|
])
|
|
11056
11065
|
});
|
|
11057
|
-
const schema$
|
|
11066
|
+
const schema$k = [
|
|
11058
11067
|
required$1('dom'),
|
|
11059
11068
|
required$1('components'),
|
|
11060
11069
|
output$1('builder', builder$1)
|
|
11061
11070
|
];
|
|
11062
|
-
var SeparatorType = schema$
|
|
11071
|
+
var SeparatorType = schema$k;
|
|
11063
11072
|
|
|
11064
11073
|
const owner$2 = constant$1('item-widget');
|
|
11065
|
-
const parts$
|
|
11074
|
+
const parts$e = constant$1([
|
|
11066
11075
|
required({
|
|
11067
11076
|
name: 'widget',
|
|
11068
11077
|
overrides: (detail) => {
|
|
@@ -11084,7 +11093,7 @@
|
|
|
11084
11093
|
]);
|
|
11085
11094
|
|
|
11086
11095
|
const builder = (detail) => {
|
|
11087
|
-
const subs = substitutes(owner$2(), detail, parts$
|
|
11096
|
+
const subs = substitutes(owner$2(), detail, parts$e());
|
|
11088
11097
|
const components = components$1(owner$2(), detail, subs.internals());
|
|
11089
11098
|
const focusWidget = (component) => getPart(component, detail, 'widget').map((widget) => {
|
|
11090
11099
|
Keying.focusIn(widget);
|
|
@@ -11162,7 +11171,7 @@
|
|
|
11162
11171
|
])
|
|
11163
11172
|
};
|
|
11164
11173
|
};
|
|
11165
|
-
const schema$
|
|
11174
|
+
const schema$j = [
|
|
11166
11175
|
required$1('uid'),
|
|
11167
11176
|
required$1('data'),
|
|
11168
11177
|
required$1('components'),
|
|
@@ -11172,10 +11181,10 @@
|
|
|
11172
11181
|
SketchBehaviours.field('widgetBehaviours', [Representing, Focusing, Keying]),
|
|
11173
11182
|
defaulted('domModification', {}),
|
|
11174
11183
|
// We don't have the uid at this point
|
|
11175
|
-
defaultUidsSchema(parts$
|
|
11184
|
+
defaultUidsSchema(parts$e()),
|
|
11176
11185
|
output$1('builder', builder)
|
|
11177
11186
|
];
|
|
11178
|
-
var WidgetType = schema$
|
|
11187
|
+
var WidgetType = schema$j;
|
|
11179
11188
|
|
|
11180
11189
|
const itemSchema$2 = choose$1('type', {
|
|
11181
11190
|
widget: WidgetType,
|
|
@@ -11206,7 +11215,7 @@
|
|
|
11206
11215
|
moveOnTab: movementInfo.moveOnTab,
|
|
11207
11216
|
focusManager: detail.focusManager
|
|
11208
11217
|
});
|
|
11209
|
-
const parts$
|
|
11218
|
+
const parts$d = constant$1([
|
|
11210
11219
|
group({
|
|
11211
11220
|
factory: {
|
|
11212
11221
|
sketch: (spec) => {
|
|
@@ -11237,7 +11246,7 @@
|
|
|
11237
11246
|
}
|
|
11238
11247
|
})
|
|
11239
11248
|
]);
|
|
11240
|
-
const schema$
|
|
11249
|
+
const schema$i = constant$1([
|
|
11241
11250
|
optionString('role'),
|
|
11242
11251
|
required$1('value'),
|
|
11243
11252
|
required$1('items'),
|
|
@@ -11351,8 +11360,8 @@
|
|
|
11351
11360
|
|
|
11352
11361
|
const Menu = composite({
|
|
11353
11362
|
name: 'Menu',
|
|
11354
|
-
configFields: schema$
|
|
11355
|
-
partFields: parts$
|
|
11363
|
+
configFields: schema$i(),
|
|
11364
|
+
partFields: parts$d(),
|
|
11356
11365
|
factory: make$6
|
|
11357
11366
|
});
|
|
11358
11367
|
|
|
@@ -11942,14 +11951,14 @@
|
|
|
11942
11951
|
})
|
|
11943
11952
|
}));
|
|
11944
11953
|
|
|
11945
|
-
const schema$
|
|
11954
|
+
const schema$h = objOfOnly([
|
|
11946
11955
|
defaulted('isExtraPart', never),
|
|
11947
11956
|
optionObjOf('fireEventInstead', [
|
|
11948
11957
|
defaulted('event', dismissRequested())
|
|
11949
11958
|
])
|
|
11950
11959
|
]);
|
|
11951
11960
|
const receivingChannel$1 = (rawSpec) => {
|
|
11952
|
-
const detail = asRawOrDie$1('Dismissal', schema$
|
|
11961
|
+
const detail = asRawOrDie$1('Dismissal', schema$h, rawSpec);
|
|
11953
11962
|
return {
|
|
11954
11963
|
[dismissPopups()]: {
|
|
11955
11964
|
schema: objOfOnly([
|
|
@@ -11967,14 +11976,14 @@
|
|
|
11967
11976
|
};
|
|
11968
11977
|
};
|
|
11969
11978
|
|
|
11970
|
-
const schema$
|
|
11979
|
+
const schema$g = objOfOnly([
|
|
11971
11980
|
optionObjOf('fireEventInstead', [
|
|
11972
11981
|
defaulted('event', repositionRequested())
|
|
11973
11982
|
]),
|
|
11974
11983
|
requiredFunction('doReposition')
|
|
11975
11984
|
]);
|
|
11976
11985
|
const receivingChannel = (rawSpec) => {
|
|
11977
|
-
const detail = asRawOrDie$1('Reposition', schema$
|
|
11986
|
+
const detail = asRawOrDie$1('Reposition', schema$g, rawSpec);
|
|
11978
11987
|
return {
|
|
11979
11988
|
[repositionPopups()]: {
|
|
11980
11989
|
onReceive: (sandbox) => {
|
|
@@ -12175,14 +12184,14 @@
|
|
|
12175
12184
|
SketchBehaviours.field('sandboxBehaviours', [Composing, Receiving, Sandboxing, Representing])
|
|
12176
12185
|
];
|
|
12177
12186
|
|
|
12178
|
-
const schema$
|
|
12187
|
+
const schema$f = constant$1([
|
|
12179
12188
|
required$1('dom'),
|
|
12180
12189
|
required$1('fetch'),
|
|
12181
12190
|
onHandler('onOpen'),
|
|
12182
12191
|
onKeyboardHandler('onExecute'),
|
|
12183
12192
|
defaulted('getHotspot', Optional.some),
|
|
12184
12193
|
defaulted('getAnchorOverrides', constant$1({})),
|
|
12185
|
-
schema$
|
|
12194
|
+
schema$n(),
|
|
12186
12195
|
field('dropdownBehaviours', [Toggling, Coupling, Keying, Focusing]),
|
|
12187
12196
|
required$1('toggleClass'),
|
|
12188
12197
|
defaulted('eventOrder', {}),
|
|
@@ -12192,7 +12201,7 @@
|
|
|
12192
12201
|
option$3('role'),
|
|
12193
12202
|
option$3('listRole'),
|
|
12194
12203
|
].concat(sandboxFields()));
|
|
12195
|
-
const parts$
|
|
12204
|
+
const parts$c = constant$1([
|
|
12196
12205
|
external$1({
|
|
12197
12206
|
schema: [
|
|
12198
12207
|
tieredMenuMarkers(),
|
|
@@ -12213,7 +12222,7 @@
|
|
|
12213
12222
|
partType()
|
|
12214
12223
|
]);
|
|
12215
12224
|
|
|
12216
|
-
const factory$
|
|
12225
|
+
const factory$k = (detail, components, _spec, externals) => {
|
|
12217
12226
|
const lookupAttr = (attr) => get$h(detail.dom, 'attributes').bind((attrs) => get$h(attrs, attr));
|
|
12218
12227
|
const switchToMenu = (sandbox) => {
|
|
12219
12228
|
Sandboxing.getState(sandbox).each((tmenu) => {
|
|
@@ -12348,9 +12357,9 @@
|
|
|
12348
12357
|
};
|
|
12349
12358
|
const Dropdown = composite({
|
|
12350
12359
|
name: 'Dropdown',
|
|
12351
|
-
configFields: schema$
|
|
12352
|
-
partFields: parts$
|
|
12353
|
-
factory: factory$
|
|
12360
|
+
configFields: schema$f(),
|
|
12361
|
+
partFields: parts$c(),
|
|
12362
|
+
factory: factory$k,
|
|
12354
12363
|
apis: {
|
|
12355
12364
|
open: (apis, comp) => apis.open(comp),
|
|
12356
12365
|
refetch: (apis, comp) => apis.refetch(comp),
|
|
@@ -12362,7 +12371,7 @@
|
|
|
12362
12371
|
});
|
|
12363
12372
|
|
|
12364
12373
|
const owner$1 = 'form';
|
|
12365
|
-
const schema$
|
|
12374
|
+
const schema$e = [
|
|
12366
12375
|
field('formBehaviours', [Representing])
|
|
12367
12376
|
];
|
|
12368
12377
|
const getPartName$1 = (name) => '<alloy.field.' + name + '>';
|
|
@@ -12383,7 +12392,7 @@
|
|
|
12383
12392
|
// Unlike other sketches, a form does not know its parts in advance (as they represent each field
|
|
12384
12393
|
// in a particular form). Therefore, it needs to calculate the part names on the fly
|
|
12385
12394
|
const fieldParts = map$2(partNames, (n) => required({ name: n, pname: getPartName$1(n) }));
|
|
12386
|
-
return composite$1(owner$1, schema$
|
|
12395
|
+
return composite$1(owner$1, schema$e, fieldParts, make$4, spec);
|
|
12387
12396
|
};
|
|
12388
12397
|
const toResult = (o, e) => o.fold(() => Result.error(e), Result.value);
|
|
12389
12398
|
const make$4 = (detail, components) => ({
|
|
@@ -12426,7 +12435,7 @@
|
|
|
12426
12435
|
sketch: sketch$2
|
|
12427
12436
|
};
|
|
12428
12437
|
|
|
12429
|
-
const schema$
|
|
12438
|
+
const schema$d = constant$1([
|
|
12430
12439
|
required$1('dom'),
|
|
12431
12440
|
defaulted('shell', true),
|
|
12432
12441
|
field('toolbarBehaviours', [Replacing])
|
|
@@ -12437,7 +12446,7 @@
|
|
|
12437
12446
|
Replacing.config({})
|
|
12438
12447
|
])
|
|
12439
12448
|
});
|
|
12440
|
-
const parts$
|
|
12449
|
+
const parts$b = constant$1([
|
|
12441
12450
|
// Note, is the container for putting all the groups in, not a group itself.
|
|
12442
12451
|
optional({
|
|
12443
12452
|
name: 'groups',
|
|
@@ -12445,7 +12454,7 @@
|
|
|
12445
12454
|
})
|
|
12446
12455
|
]);
|
|
12447
12456
|
|
|
12448
|
-
const factory$
|
|
12457
|
+
const factory$j = (detail, components, _spec, _externals) => {
|
|
12449
12458
|
const setGroups = (toolbar, groups) => {
|
|
12450
12459
|
getGroupContainer(toolbar).fold(() => {
|
|
12451
12460
|
// check that the group container existed. It may not have if the components
|
|
@@ -12478,9 +12487,9 @@
|
|
|
12478
12487
|
};
|
|
12479
12488
|
const Toolbar = composite({
|
|
12480
12489
|
name: 'Toolbar',
|
|
12481
|
-
configFields: schema$
|
|
12482
|
-
partFields: parts$
|
|
12483
|
-
factory: factory$
|
|
12490
|
+
configFields: schema$d(),
|
|
12491
|
+
partFields: parts$b(),
|
|
12492
|
+
factory: factory$j,
|
|
12484
12493
|
apis: {
|
|
12485
12494
|
setGroups: (apis, toolbar, groups) => {
|
|
12486
12495
|
apis.setGroups(toolbar, groups);
|
|
@@ -12488,7 +12497,7 @@
|
|
|
12488
12497
|
}
|
|
12489
12498
|
});
|
|
12490
12499
|
|
|
12491
|
-
const schema$
|
|
12500
|
+
const schema$c = constant$1([
|
|
12492
12501
|
markers$1(['toggledClass']),
|
|
12493
12502
|
required$1('lazySink'),
|
|
12494
12503
|
requiredFunction('fetch'),
|
|
@@ -12496,10 +12505,10 @@
|
|
|
12496
12505
|
optionObjOf('fireDismissalEventInstead', [
|
|
12497
12506
|
defaulted('event', dismissRequested())
|
|
12498
12507
|
]),
|
|
12499
|
-
schema$
|
|
12508
|
+
schema$n(),
|
|
12500
12509
|
onHandler('onToggled'),
|
|
12501
12510
|
]);
|
|
12502
|
-
const parts$
|
|
12511
|
+
const parts$a = constant$1([
|
|
12503
12512
|
external$1({
|
|
12504
12513
|
name: 'button',
|
|
12505
12514
|
overrides: (detail) => ({
|
|
@@ -12529,7 +12538,7 @@
|
|
|
12529
12538
|
}),
|
|
12530
12539
|
external$1({
|
|
12531
12540
|
factory: Toolbar,
|
|
12532
|
-
schema: schema$
|
|
12541
|
+
schema: schema$d(),
|
|
12533
12542
|
name: 'toolbar',
|
|
12534
12543
|
overrides: (detail) => {
|
|
12535
12544
|
return {
|
|
@@ -12645,7 +12654,7 @@
|
|
|
12645
12654
|
])
|
|
12646
12655
|
};
|
|
12647
12656
|
};
|
|
12648
|
-
const factory$
|
|
12657
|
+
const factory$i = (detail, components, spec, externals) => ({
|
|
12649
12658
|
...Button.sketch({
|
|
12650
12659
|
...externals.button(),
|
|
12651
12660
|
action: (button) => {
|
|
@@ -12688,9 +12697,9 @@
|
|
|
12688
12697
|
});
|
|
12689
12698
|
const FloatingToolbarButton = composite({
|
|
12690
12699
|
name: 'FloatingToolbarButton',
|
|
12691
|
-
factory: factory$
|
|
12692
|
-
configFields: schema$
|
|
12693
|
-
partFields: parts$
|
|
12700
|
+
factory: factory$i,
|
|
12701
|
+
configFields: schema$c(),
|
|
12702
|
+
partFields: parts$a(),
|
|
12694
12703
|
apis: {
|
|
12695
12704
|
setGroups: (apis, button, groups) => {
|
|
12696
12705
|
apis.setGroups(button, groups);
|
|
@@ -12709,11 +12718,11 @@
|
|
|
12709
12718
|
}
|
|
12710
12719
|
});
|
|
12711
12720
|
|
|
12712
|
-
const schema$
|
|
12721
|
+
const schema$b = constant$1([
|
|
12713
12722
|
defaulted('prefix', 'form-field'),
|
|
12714
12723
|
field('fieldBehaviours', [Composing, Representing])
|
|
12715
12724
|
]);
|
|
12716
|
-
const parts$
|
|
12725
|
+
const parts$9 = constant$1([
|
|
12717
12726
|
optional({
|
|
12718
12727
|
schema: [required$1('dom')],
|
|
12719
12728
|
name: 'label'
|
|
@@ -12751,7 +12760,7 @@
|
|
|
12751
12760
|
})
|
|
12752
12761
|
]);
|
|
12753
12762
|
|
|
12754
|
-
const factory$
|
|
12763
|
+
const factory$h = (detail, components, _spec, _externals) => {
|
|
12755
12764
|
const behaviours = augment(detail.fieldBehaviours, [
|
|
12756
12765
|
Composing.config({
|
|
12757
12766
|
find: (container) => {
|
|
@@ -12808,16 +12817,16 @@
|
|
|
12808
12817
|
};
|
|
12809
12818
|
const FormField = composite({
|
|
12810
12819
|
name: 'FormField',
|
|
12811
|
-
configFields: schema$
|
|
12812
|
-
partFields: parts$
|
|
12813
|
-
factory: factory$
|
|
12820
|
+
configFields: schema$b(),
|
|
12821
|
+
partFields: parts$9(),
|
|
12822
|
+
factory: factory$h,
|
|
12814
12823
|
apis: {
|
|
12815
12824
|
getField: (apis, comp) => apis.getField(comp),
|
|
12816
12825
|
getLabel: (apis, comp) => apis.getLabel(comp)
|
|
12817
12826
|
}
|
|
12818
12827
|
});
|
|
12819
12828
|
|
|
12820
|
-
const schema$
|
|
12829
|
+
const schema$a = constant$1([
|
|
12821
12830
|
defaulted('field1Name', 'field1'),
|
|
12822
12831
|
defaulted('field2Name', 'field2'),
|
|
12823
12832
|
onStrictHandler('onLockedChange'),
|
|
@@ -12850,7 +12859,7 @@
|
|
|
12850
12859
|
};
|
|
12851
12860
|
}
|
|
12852
12861
|
});
|
|
12853
|
-
const parts$
|
|
12862
|
+
const parts$8 = constant$1([
|
|
12854
12863
|
coupledPart('field1', 'field2'),
|
|
12855
12864
|
coupledPart('field2', 'field1'),
|
|
12856
12865
|
required({
|
|
@@ -12875,7 +12884,7 @@
|
|
|
12875
12884
|
})
|
|
12876
12885
|
]);
|
|
12877
12886
|
|
|
12878
|
-
const factory$
|
|
12887
|
+
const factory$g = (detail, components, _spec, _externals) => ({
|
|
12879
12888
|
uid: detail.uid,
|
|
12880
12889
|
dom: detail.dom,
|
|
12881
12890
|
components,
|
|
@@ -12911,9 +12920,9 @@
|
|
|
12911
12920
|
});
|
|
12912
12921
|
const FormCoupledInputs = composite({
|
|
12913
12922
|
name: 'FormCoupledInputs',
|
|
12914
|
-
configFields: schema$
|
|
12915
|
-
partFields: parts$
|
|
12916
|
-
factory: factory$
|
|
12923
|
+
configFields: schema$a(),
|
|
12924
|
+
partFields: parts$8(),
|
|
12925
|
+
factory: factory$g,
|
|
12917
12926
|
apis: {
|
|
12918
12927
|
getField1: (apis, component) => apis.getField1(component),
|
|
12919
12928
|
getField2: (apis, component) => apis.getField2(component),
|
|
@@ -12921,7 +12930,7 @@
|
|
|
12921
12930
|
}
|
|
12922
12931
|
});
|
|
12923
12932
|
|
|
12924
|
-
const factory$
|
|
12933
|
+
const factory$f = (detail, _spec) => {
|
|
12925
12934
|
const options = map$2(detail.options, (option) => ({
|
|
12926
12935
|
dom: {
|
|
12927
12936
|
tag: 'option',
|
|
@@ -12977,7 +12986,7 @@
|
|
|
12977
12986
|
defaulted('selectAttributes', {}),
|
|
12978
12987
|
option$3('data')
|
|
12979
12988
|
],
|
|
12980
|
-
factory: factory$
|
|
12989
|
+
factory: factory$f
|
|
12981
12990
|
});
|
|
12982
12991
|
|
|
12983
12992
|
const makeMenu = (detail, menuSandbox, placementSpec, menuSpec, getBounds) => {
|
|
@@ -13030,7 +13039,7 @@
|
|
|
13030
13039
|
}
|
|
13031
13040
|
});
|
|
13032
13041
|
};
|
|
13033
|
-
const factory$
|
|
13042
|
+
const factory$e = (detail, spec) => {
|
|
13034
13043
|
const isPartOfRelated = (sandbox, queryElem) => {
|
|
13035
13044
|
const related = detail.getRelated(sandbox);
|
|
13036
13045
|
return related.exists((rel) => isPartOf(rel, queryElem));
|
|
@@ -13156,7 +13165,7 @@
|
|
|
13156
13165
|
defaulted('isExtraPart', never),
|
|
13157
13166
|
defaulted('eventOrder', Optional.none)
|
|
13158
13167
|
],
|
|
13159
|
-
factory: factory$
|
|
13168
|
+
factory: factory$e,
|
|
13160
13169
|
apis: {
|
|
13161
13170
|
showAt: (apis, component, anchor, thing) => {
|
|
13162
13171
|
apis.showAt(component, anchor, thing);
|
|
@@ -13184,7 +13193,7 @@
|
|
|
13184
13193
|
}
|
|
13185
13194
|
});
|
|
13186
13195
|
|
|
13187
|
-
const schema$
|
|
13196
|
+
const schema$9 = constant$1([
|
|
13188
13197
|
defaultedString('type', 'text'),
|
|
13189
13198
|
option$3('data'),
|
|
13190
13199
|
defaulted('inputAttributes', {}),
|
|
@@ -13244,7 +13253,7 @@
|
|
|
13244
13253
|
classes: detail.inputClasses
|
|
13245
13254
|
});
|
|
13246
13255
|
|
|
13247
|
-
const factory$
|
|
13256
|
+
const factory$d = (detail, _spec) => ({
|
|
13248
13257
|
uid: detail.uid,
|
|
13249
13258
|
dom: dom$1(detail),
|
|
13250
13259
|
// No children.
|
|
@@ -13254,11 +13263,11 @@
|
|
|
13254
13263
|
});
|
|
13255
13264
|
const Input = single({
|
|
13256
13265
|
name: 'Input',
|
|
13257
|
-
configFields: schema$
|
|
13258
|
-
factory: factory$
|
|
13266
|
+
configFields: schema$9(),
|
|
13267
|
+
factory: factory$d
|
|
13259
13268
|
});
|
|
13260
13269
|
|
|
13261
|
-
const parts$
|
|
13270
|
+
const parts$7 = generate$5(owner$2(), parts$e());
|
|
13262
13271
|
|
|
13263
13272
|
const labelledBy = (labelledElement, labelElement) => {
|
|
13264
13273
|
const labelId = getOpt(labelledElement, 'id')
|
|
@@ -13270,7 +13279,7 @@
|
|
|
13270
13279
|
set$9(labelledElement, 'aria-labelledby', labelId);
|
|
13271
13280
|
};
|
|
13272
13281
|
|
|
13273
|
-
const schema$
|
|
13282
|
+
const schema$8 = constant$1([
|
|
13274
13283
|
required$1('lazySink'),
|
|
13275
13284
|
option$3('dragBlockClass'),
|
|
13276
13285
|
defaultedFunction('getBounds', win),
|
|
@@ -13282,7 +13291,7 @@
|
|
|
13282
13291
|
onStrictKeyboardHandler('onEscape')
|
|
13283
13292
|
]);
|
|
13284
13293
|
const basic = { sketch: identity };
|
|
13285
|
-
const parts$
|
|
13294
|
+
const parts$6 = constant$1([
|
|
13286
13295
|
optional({
|
|
13287
13296
|
name: 'draghandle',
|
|
13288
13297
|
overrides: (detail, spec) => {
|
|
@@ -13349,7 +13358,7 @@
|
|
|
13349
13358
|
})
|
|
13350
13359
|
]);
|
|
13351
13360
|
|
|
13352
|
-
const factory$
|
|
13361
|
+
const factory$c = (detail, components, spec, externals) => {
|
|
13353
13362
|
const dialogComp = value$2();
|
|
13354
13363
|
// TODO IMPROVEMENT: Make close actually close the dialog by default!
|
|
13355
13364
|
const showDialog = (dialog) => {
|
|
@@ -13445,9 +13454,9 @@
|
|
|
13445
13454
|
};
|
|
13446
13455
|
const ModalDialog = composite({
|
|
13447
13456
|
name: 'ModalDialog',
|
|
13448
|
-
configFields: schema$
|
|
13449
|
-
partFields: parts$
|
|
13450
|
-
factory: factory$
|
|
13457
|
+
configFields: schema$8(),
|
|
13458
|
+
partFields: parts$6(),
|
|
13459
|
+
factory: factory$c,
|
|
13451
13460
|
apis: {
|
|
13452
13461
|
show: (apis, dialog) => {
|
|
13453
13462
|
apis.show(dialog);
|
|
@@ -14326,7 +14335,7 @@
|
|
|
14326
14335
|
});
|
|
14327
14336
|
|
|
14328
14337
|
const owner = 'container';
|
|
14329
|
-
const schema$
|
|
14338
|
+
const schema$7 = [
|
|
14330
14339
|
field('slotBehaviours', [])
|
|
14331
14340
|
];
|
|
14332
14341
|
const getPartName = (name) => '<alloy.field.' + name + '>';
|
|
@@ -14350,7 +14359,7 @@
|
|
|
14350
14359
|
// record lists the names of the parts to put in the schema.
|
|
14351
14360
|
// TODO: Find a nice way to remove dupe with Form
|
|
14352
14361
|
const fieldParts = map$2(partNames, (n) => required({ name: n, pname: getPartName(n) }));
|
|
14353
|
-
return composite$1(owner, schema$
|
|
14362
|
+
return composite$1(owner, schema$7, fieldParts, make$3, spec);
|
|
14354
14363
|
};
|
|
14355
14364
|
const make$3 = (detail, components) => {
|
|
14356
14365
|
const getSlotNames = (_) => getAllPartNames(detail);
|
|
@@ -14414,230 +14423,6 @@
|
|
|
14414
14423
|
...{ sketch }
|
|
14415
14424
|
};
|
|
14416
14425
|
|
|
14417
|
-
const schema$7 = constant$1([
|
|
14418
|
-
required$1('toggleClass'),
|
|
14419
|
-
required$1('fetch'),
|
|
14420
|
-
onStrictHandler('onExecute'),
|
|
14421
|
-
defaulted('getHotspot', Optional.some),
|
|
14422
|
-
defaulted('getAnchorOverrides', constant$1({})),
|
|
14423
|
-
schema$o(),
|
|
14424
|
-
onStrictHandler('onItemExecute'),
|
|
14425
|
-
option$3('lazySink'),
|
|
14426
|
-
required$1('dom'),
|
|
14427
|
-
onHandler('onOpen'),
|
|
14428
|
-
field('splitDropdownBehaviours', [Coupling, Keying, Focusing]),
|
|
14429
|
-
defaulted('matchWidth', false),
|
|
14430
|
-
defaulted('useMinWidth', false),
|
|
14431
|
-
defaulted('eventOrder', {}),
|
|
14432
|
-
option$3('role'),
|
|
14433
|
-
option$3('listRole')
|
|
14434
|
-
].concat(sandboxFields()));
|
|
14435
|
-
const arrowPart = required({
|
|
14436
|
-
factory: Button,
|
|
14437
|
-
schema: [required$1('dom')],
|
|
14438
|
-
name: 'arrow',
|
|
14439
|
-
defaults: () => {
|
|
14440
|
-
return {
|
|
14441
|
-
buttonBehaviours: derive$1([
|
|
14442
|
-
// TODO: Remove all traces of revoking
|
|
14443
|
-
Focusing.revoke()
|
|
14444
|
-
])
|
|
14445
|
-
};
|
|
14446
|
-
},
|
|
14447
|
-
overrides: (detail) => {
|
|
14448
|
-
return {
|
|
14449
|
-
dom: {
|
|
14450
|
-
tag: 'span',
|
|
14451
|
-
attributes: {
|
|
14452
|
-
role: 'presentation'
|
|
14453
|
-
}
|
|
14454
|
-
},
|
|
14455
|
-
action: (arrow) => {
|
|
14456
|
-
arrow.getSystem().getByUid(detail.uid).each(emitExecute);
|
|
14457
|
-
},
|
|
14458
|
-
buttonBehaviours: derive$1([
|
|
14459
|
-
Toggling.config({
|
|
14460
|
-
toggleOnExecute: false,
|
|
14461
|
-
toggleClass: detail.toggleClass
|
|
14462
|
-
})
|
|
14463
|
-
])
|
|
14464
|
-
};
|
|
14465
|
-
}
|
|
14466
|
-
});
|
|
14467
|
-
const buttonPart = required({
|
|
14468
|
-
factory: Button,
|
|
14469
|
-
schema: [required$1('dom')],
|
|
14470
|
-
name: 'button',
|
|
14471
|
-
defaults: () => {
|
|
14472
|
-
return {
|
|
14473
|
-
buttonBehaviours: derive$1([
|
|
14474
|
-
// TODO: Remove all traces of revoking
|
|
14475
|
-
Focusing.revoke()
|
|
14476
|
-
])
|
|
14477
|
-
};
|
|
14478
|
-
},
|
|
14479
|
-
overrides: (detail) => {
|
|
14480
|
-
return {
|
|
14481
|
-
dom: {
|
|
14482
|
-
tag: 'span',
|
|
14483
|
-
attributes: {
|
|
14484
|
-
role: 'presentation'
|
|
14485
|
-
}
|
|
14486
|
-
},
|
|
14487
|
-
action: (btn) => {
|
|
14488
|
-
btn.getSystem().getByUid(detail.uid).each((splitDropdown) => {
|
|
14489
|
-
detail.onExecute(splitDropdown, btn);
|
|
14490
|
-
});
|
|
14491
|
-
}
|
|
14492
|
-
};
|
|
14493
|
-
}
|
|
14494
|
-
});
|
|
14495
|
-
const parts$6 = constant$1([
|
|
14496
|
-
arrowPart,
|
|
14497
|
-
buttonPart,
|
|
14498
|
-
optional({
|
|
14499
|
-
factory: {
|
|
14500
|
-
sketch: (spec) => {
|
|
14501
|
-
return {
|
|
14502
|
-
uid: spec.uid,
|
|
14503
|
-
dom: {
|
|
14504
|
-
tag: 'span',
|
|
14505
|
-
styles: {
|
|
14506
|
-
display: 'none'
|
|
14507
|
-
},
|
|
14508
|
-
attributes: {
|
|
14509
|
-
'aria-hidden': 'true'
|
|
14510
|
-
},
|
|
14511
|
-
innerHtml: spec.text
|
|
14512
|
-
}
|
|
14513
|
-
};
|
|
14514
|
-
}
|
|
14515
|
-
},
|
|
14516
|
-
schema: [required$1('text')],
|
|
14517
|
-
name: 'aria-descriptor'
|
|
14518
|
-
}),
|
|
14519
|
-
external$1({
|
|
14520
|
-
schema: [
|
|
14521
|
-
tieredMenuMarkers()
|
|
14522
|
-
],
|
|
14523
|
-
name: 'menu',
|
|
14524
|
-
defaults: (detail) => {
|
|
14525
|
-
return {
|
|
14526
|
-
onExecute: (tmenu, item) => {
|
|
14527
|
-
// CAUTION: This won't work if the splitDropdown and the tmenu aren't
|
|
14528
|
-
// in the same mothership. It is just a default, though.
|
|
14529
|
-
tmenu.getSystem().getByUid(detail.uid).each((splitDropdown) => {
|
|
14530
|
-
detail.onItemExecute(splitDropdown, tmenu, item);
|
|
14531
|
-
});
|
|
14532
|
-
}
|
|
14533
|
-
};
|
|
14534
|
-
}
|
|
14535
|
-
}),
|
|
14536
|
-
partType()
|
|
14537
|
-
]);
|
|
14538
|
-
|
|
14539
|
-
const factory$c = (detail, components, spec, externals) => {
|
|
14540
|
-
const switchToMenu = (sandbox) => {
|
|
14541
|
-
Composing.getCurrent(sandbox).each((current) => {
|
|
14542
|
-
Highlighting.highlightFirst(current);
|
|
14543
|
-
Keying.focusIn(current);
|
|
14544
|
-
});
|
|
14545
|
-
};
|
|
14546
|
-
const action = (component) => {
|
|
14547
|
-
const onOpenSync = switchToMenu;
|
|
14548
|
-
togglePopup(detail, identity, component, externals, onOpenSync, HighlightOnOpen.HighlightMenuAndItem).get(noop);
|
|
14549
|
-
};
|
|
14550
|
-
const openMenu = (comp) => {
|
|
14551
|
-
action(comp);
|
|
14552
|
-
return Optional.some(true);
|
|
14553
|
-
};
|
|
14554
|
-
const executeOnButton = (comp) => {
|
|
14555
|
-
const button = getPartOrDie(comp, detail, 'button');
|
|
14556
|
-
emitExecute(button);
|
|
14557
|
-
return Optional.some(true);
|
|
14558
|
-
};
|
|
14559
|
-
const buttonEvents = {
|
|
14560
|
-
...derive$2([
|
|
14561
|
-
runOnAttached((component, _simulatedEvent) => {
|
|
14562
|
-
const ariaDescriptor = getPart(component, detail, 'aria-descriptor');
|
|
14563
|
-
ariaDescriptor.each((descriptor) => {
|
|
14564
|
-
const descriptorId = generate$6('aria');
|
|
14565
|
-
set$9(descriptor.element, 'id', descriptorId);
|
|
14566
|
-
set$9(component.element, 'aria-describedby', descriptorId);
|
|
14567
|
-
});
|
|
14568
|
-
})
|
|
14569
|
-
]),
|
|
14570
|
-
...events(Optional.some(action))
|
|
14571
|
-
};
|
|
14572
|
-
const apis = {
|
|
14573
|
-
repositionMenus: (comp) => {
|
|
14574
|
-
if (Toggling.isOn(comp)) {
|
|
14575
|
-
repositionMenus(comp);
|
|
14576
|
-
}
|
|
14577
|
-
}
|
|
14578
|
-
};
|
|
14579
|
-
return {
|
|
14580
|
-
uid: detail.uid,
|
|
14581
|
-
dom: detail.dom,
|
|
14582
|
-
components,
|
|
14583
|
-
apis,
|
|
14584
|
-
eventOrder: {
|
|
14585
|
-
...detail.eventOrder,
|
|
14586
|
-
// Order, the button state is toggled first, so assumed !selected means close.
|
|
14587
|
-
[execute$5()]: ['disabling', 'toggling', 'alloy.base.behaviour']
|
|
14588
|
-
},
|
|
14589
|
-
events: buttonEvents,
|
|
14590
|
-
behaviours: augment(detail.splitDropdownBehaviours, [
|
|
14591
|
-
Coupling.config({
|
|
14592
|
-
others: {
|
|
14593
|
-
sandbox: (hotspot) => {
|
|
14594
|
-
const arrow = getPartOrDie(hotspot, detail, 'arrow');
|
|
14595
|
-
const extras = {
|
|
14596
|
-
onOpen: () => {
|
|
14597
|
-
Toggling.on(arrow);
|
|
14598
|
-
Toggling.on(hotspot);
|
|
14599
|
-
},
|
|
14600
|
-
onClose: () => {
|
|
14601
|
-
Toggling.off(arrow);
|
|
14602
|
-
Toggling.off(hotspot);
|
|
14603
|
-
}
|
|
14604
|
-
};
|
|
14605
|
-
return makeSandbox$1(detail, hotspot, extras);
|
|
14606
|
-
}
|
|
14607
|
-
}
|
|
14608
|
-
}),
|
|
14609
|
-
Keying.config({
|
|
14610
|
-
mode: 'special',
|
|
14611
|
-
onSpace: executeOnButton,
|
|
14612
|
-
onEnter: executeOnButton,
|
|
14613
|
-
onDown: openMenu
|
|
14614
|
-
}),
|
|
14615
|
-
Focusing.config({}),
|
|
14616
|
-
Toggling.config({
|
|
14617
|
-
toggleOnExecute: false,
|
|
14618
|
-
aria: {
|
|
14619
|
-
mode: 'expanded'
|
|
14620
|
-
}
|
|
14621
|
-
})
|
|
14622
|
-
]),
|
|
14623
|
-
domModification: {
|
|
14624
|
-
attributes: {
|
|
14625
|
-
'role': detail.role.getOr('button'),
|
|
14626
|
-
'aria-haspopup': true
|
|
14627
|
-
}
|
|
14628
|
-
}
|
|
14629
|
-
};
|
|
14630
|
-
};
|
|
14631
|
-
const SplitDropdown = composite({
|
|
14632
|
-
name: 'SplitDropdown',
|
|
14633
|
-
configFields: schema$7(),
|
|
14634
|
-
partFields: parts$6(),
|
|
14635
|
-
factory: factory$c,
|
|
14636
|
-
apis: {
|
|
14637
|
-
repositionMenus: (apis, comp) => apis.repositionMenus(comp)
|
|
14638
|
-
}
|
|
14639
|
-
});
|
|
14640
|
-
|
|
14641
14426
|
const generate$1 = (xs, f) => {
|
|
14642
14427
|
const init = {
|
|
14643
14428
|
len: 0,
|
|
@@ -14766,11 +14551,11 @@
|
|
|
14766
14551
|
const parts$5 = constant$1([
|
|
14767
14552
|
required({
|
|
14768
14553
|
factory: Toolbar,
|
|
14769
|
-
schema: schema$
|
|
14554
|
+
schema: schema$d(),
|
|
14770
14555
|
name: 'primary'
|
|
14771
14556
|
}),
|
|
14772
14557
|
external$1({
|
|
14773
|
-
schema: schema$
|
|
14558
|
+
schema: schema$d(),
|
|
14774
14559
|
name: 'overflow'
|
|
14775
14560
|
}),
|
|
14776
14561
|
external$1({
|
|
@@ -14927,12 +14712,12 @@
|
|
|
14927
14712
|
const parts$3 = constant$1([
|
|
14928
14713
|
required({
|
|
14929
14714
|
factory: Toolbar,
|
|
14930
|
-
schema: schema$
|
|
14715
|
+
schema: schema$d(),
|
|
14931
14716
|
name: 'primary'
|
|
14932
14717
|
}),
|
|
14933
14718
|
required({
|
|
14934
14719
|
factory: Toolbar,
|
|
14935
|
-
schema: schema$
|
|
14720
|
+
schema: schema$d(),
|
|
14936
14721
|
name: 'overflow',
|
|
14937
14722
|
overrides: (detail) => {
|
|
14938
14723
|
return {
|
|
@@ -15721,7 +15506,7 @@
|
|
|
15721
15506
|
]),
|
|
15722
15507
|
customField('lazyTypeaheadComp', () => Cell(Optional.none)),
|
|
15723
15508
|
customField('previewing', () => Cell(true))
|
|
15724
|
-
].concat(schema$
|
|
15509
|
+
].concat(schema$9()).concat(sandboxFields()));
|
|
15725
15510
|
const parts = constant$1([
|
|
15726
15511
|
external$1({
|
|
15727
15512
|
schema: [
|
|
@@ -16301,7 +16086,7 @@
|
|
|
16301
16086
|
return sc.isFullscreen() ? win() : constrainByMany(box$1(sc.element), scrollableBoxes);
|
|
16302
16087
|
};
|
|
16303
16088
|
|
|
16304
|
-
/*! @license DOMPurify 3.2.
|
|
16089
|
+
/*! @license DOMPurify 3.2.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.6/LICENSE */
|
|
16305
16090
|
|
|
16306
16091
|
const {
|
|
16307
16092
|
entries,
|
|
@@ -16361,6 +16146,9 @@
|
|
|
16361
16146
|
*/
|
|
16362
16147
|
function unapply(func) {
|
|
16363
16148
|
return function (thisArg) {
|
|
16149
|
+
if (thisArg instanceof RegExp) {
|
|
16150
|
+
thisArg.lastIndex = 0;
|
|
16151
|
+
}
|
|
16364
16152
|
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
16365
16153
|
args[_key - 1] = arguments[_key];
|
|
16366
16154
|
}
|
|
@@ -16502,7 +16290,7 @@
|
|
|
16502
16290
|
const TMPLIT_EXPR = seal(/\$\{[\w\W]*/gm); // eslint-disable-line unicorn/better-regex
|
|
16503
16291
|
const DATA_ATTR = seal(/^data-[\-\w.\u00B7-\uFFFF]+$/); // eslint-disable-line no-useless-escape
|
|
16504
16292
|
const ARIA_ATTR = seal(/^aria-[\-\w]+$/); // eslint-disable-line no-useless-escape
|
|
16505
|
-
const IS_ALLOWED_URI = seal(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i // eslint-disable-line no-useless-escape
|
|
16293
|
+
const IS_ALLOWED_URI = seal(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i // eslint-disable-line no-useless-escape
|
|
16506
16294
|
);
|
|
16507
16295
|
const IS_SCRIPT_OR_DATA = seal(/^(?:\w+script|data):/i);
|
|
16508
16296
|
const ATTR_WHITESPACE = seal(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g // eslint-disable-line no-control-regex
|
|
@@ -16599,7 +16387,7 @@
|
|
|
16599
16387
|
function createDOMPurify() {
|
|
16600
16388
|
let window = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getGlobal();
|
|
16601
16389
|
const DOMPurify = root => createDOMPurify(root);
|
|
16602
|
-
DOMPurify.version = '3.2.
|
|
16390
|
+
DOMPurify.version = '3.2.6';
|
|
16603
16391
|
DOMPurify.removed = [];
|
|
16604
16392
|
if (!window || !window.document || window.document.nodeType !== NODE_TYPE.document || !window.Element) {
|
|
16605
16393
|
// Not running in a browser, provide a factory function
|
|
@@ -16838,8 +16626,8 @@
|
|
|
16838
16626
|
URI_SAFE_ATTRIBUTES = objectHasOwnProperty(cfg, 'ADD_URI_SAFE_ATTR') ? addToSet(clone(DEFAULT_URI_SAFE_ATTRIBUTES), cfg.ADD_URI_SAFE_ATTR, transformCaseFunc) : DEFAULT_URI_SAFE_ATTRIBUTES;
|
|
16839
16627
|
DATA_URI_TAGS = objectHasOwnProperty(cfg, 'ADD_DATA_URI_TAGS') ? addToSet(clone(DEFAULT_DATA_URI_TAGS), cfg.ADD_DATA_URI_TAGS, transformCaseFunc) : DEFAULT_DATA_URI_TAGS;
|
|
16840
16628
|
FORBID_CONTENTS = objectHasOwnProperty(cfg, 'FORBID_CONTENTS') ? addToSet({}, cfg.FORBID_CONTENTS, transformCaseFunc) : DEFAULT_FORBID_CONTENTS;
|
|
16841
|
-
FORBID_TAGS = objectHasOwnProperty(cfg, 'FORBID_TAGS') ? addToSet({}, cfg.FORBID_TAGS, transformCaseFunc) : {};
|
|
16842
|
-
FORBID_ATTR = objectHasOwnProperty(cfg, 'FORBID_ATTR') ? addToSet({}, cfg.FORBID_ATTR, transformCaseFunc) : {};
|
|
16629
|
+
FORBID_TAGS = objectHasOwnProperty(cfg, 'FORBID_TAGS') ? addToSet({}, cfg.FORBID_TAGS, transformCaseFunc) : clone({});
|
|
16630
|
+
FORBID_ATTR = objectHasOwnProperty(cfg, 'FORBID_ATTR') ? addToSet({}, cfg.FORBID_ATTR, transformCaseFunc) : clone({});
|
|
16843
16631
|
USE_PROFILES = objectHasOwnProperty(cfg, 'USE_PROFILES') ? cfg.USE_PROFILES : false;
|
|
16844
16632
|
ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false; // Default true
|
|
16845
16633
|
ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false; // Default true
|
|
@@ -17204,7 +16992,7 @@
|
|
|
17204
16992
|
allowedTags: ALLOWED_TAGS
|
|
17205
16993
|
});
|
|
17206
16994
|
/* Detect mXSS attempts abusing namespace confusion */
|
|
17207
|
-
if (currentNode.hasChildNodes() && !_isNode(currentNode.firstElementChild) && regExpTest(/<[/\w]/g, currentNode.innerHTML) && regExpTest(/<[/\w]/g, currentNode.textContent)) {
|
|
16995
|
+
if (SAFE_FOR_XML && currentNode.hasChildNodes() && !_isNode(currentNode.firstElementChild) && regExpTest(/<[/\w!]/g, currentNode.innerHTML) && regExpTest(/<[/\w!]/g, currentNode.textContent)) {
|
|
17208
16996
|
_forceRemove(currentNode);
|
|
17209
16997
|
return true;
|
|
17210
16998
|
}
|
|
@@ -17356,8 +17144,8 @@
|
|
|
17356
17144
|
value: attrValue
|
|
17357
17145
|
} = attr;
|
|
17358
17146
|
const lcName = transformCaseFunc(name);
|
|
17359
|
-
|
|
17360
|
-
|
|
17147
|
+
const initValue = attrValue;
|
|
17148
|
+
let value = name === 'value' ? initValue : stringTrim(initValue);
|
|
17361
17149
|
/* Execute a hook if present */
|
|
17362
17150
|
hookEvent.attrName = lcName;
|
|
17363
17151
|
hookEvent.attrValue = value;
|
|
@@ -17383,7 +17171,6 @@
|
|
|
17383
17171
|
if (hookEvent.forceKeepAttr) {
|
|
17384
17172
|
continue;
|
|
17385
17173
|
}
|
|
17386
|
-
/* Remove attribute */
|
|
17387
17174
|
/* Did the hooks approve of the attribute? */
|
|
17388
17175
|
if (!hookEvent.keepAttr) {
|
|
17389
17176
|
_removeAttribute(name, currentNode);
|
|
@@ -17437,7 +17224,9 @@
|
|
|
17437
17224
|
} else {
|
|
17438
17225
|
arrayPop(DOMPurify.removed);
|
|
17439
17226
|
}
|
|
17440
|
-
} catch (_) {
|
|
17227
|
+
} catch (_) {
|
|
17228
|
+
_removeAttribute(name, currentNode);
|
|
17229
|
+
}
|
|
17441
17230
|
}
|
|
17442
17231
|
}
|
|
17443
17232
|
/* Execute a hook if present */
|
|
@@ -17689,7 +17478,7 @@
|
|
|
17689
17478
|
})
|
|
17690
17479
|
]);
|
|
17691
17480
|
const renderIcon$3 = (spec, iconName, icons, fallbackIcon) => {
|
|
17692
|
-
var _a, _b;
|
|
17481
|
+
var _a, _b, _c;
|
|
17693
17482
|
// If RTL, add the flip icon class if the icon doesn't have a `-rtl` icon available.
|
|
17694
17483
|
const rtlIconClasses = needsRtlTransform(iconName) ? ['tox-icon--flip'] : [];
|
|
17695
17484
|
const iconHtml = get$h(icons, getIconName(iconName, icons)).or(fallbackIcon).getOrThunk(defaultIcon(icons));
|
|
@@ -17703,7 +17492,8 @@
|
|
|
17703
17492
|
behaviours: derive$1([
|
|
17704
17493
|
...(_b = spec.behaviours) !== null && _b !== void 0 ? _b : [],
|
|
17705
17494
|
addFocusableBehaviour()
|
|
17706
|
-
])
|
|
17495
|
+
]),
|
|
17496
|
+
eventOrder: (_c = spec.eventOrder) !== null && _c !== void 0 ? _c : {}
|
|
17707
17497
|
};
|
|
17708
17498
|
};
|
|
17709
17499
|
const render$4 = (iconName, spec, iconProvider, fallbackIcon = Optional.none()) => renderIcon$3(spec, iconName, iconProvider(), fallbackIcon);
|
|
@@ -18386,6 +18176,7 @@
|
|
|
18386
18176
|
}
|
|
18387
18177
|
};
|
|
18388
18178
|
|
|
18179
|
+
const widgetAriaLabel = 'Use arrow keys to navigate.';
|
|
18389
18180
|
const chunk = (rowDom, numColumns) => (items) => {
|
|
18390
18181
|
const chunks = chunk$1(items, numColumns);
|
|
18391
18182
|
return map$2(chunks, (c) => ({
|
|
@@ -18396,7 +18187,10 @@
|
|
|
18396
18187
|
const forSwatch = (columns) => ({
|
|
18397
18188
|
dom: {
|
|
18398
18189
|
tag: 'div',
|
|
18399
|
-
classes: ['tox-menu', 'tox-swatches-menu']
|
|
18190
|
+
classes: ['tox-menu', 'tox-swatches-menu'],
|
|
18191
|
+
attributes: {
|
|
18192
|
+
'aria-label': global$6.translate(widgetAriaLabel)
|
|
18193
|
+
}
|
|
18400
18194
|
},
|
|
18401
18195
|
components: [
|
|
18402
18196
|
{
|
|
@@ -18500,10 +18294,15 @@
|
|
|
18500
18294
|
}
|
|
18501
18295
|
});
|
|
18502
18296
|
};
|
|
18297
|
+
const hasWidget = (items) => exists(items, (item) => item.type === 'widget');
|
|
18503
18298
|
const forCollection = (columns, initItems, _hasIcons = true) => ({
|
|
18504
18299
|
dom: {
|
|
18505
18300
|
tag: 'div',
|
|
18506
|
-
classes: ['tox-menu', 'tox-collection'].concat(columns === 1 ? ['tox-collection--list'] : ['tox-collection--grid'])
|
|
18301
|
+
classes: ['tox-menu', 'tox-collection'].concat(columns === 1 ? ['tox-collection--list'] : ['tox-collection--grid']),
|
|
18302
|
+
attributes: {
|
|
18303
|
+
// widget item can be inserttable, colorswatch or imageselect - all of them are navigated with arrow keys
|
|
18304
|
+
...hasWidget(initItems) ? { 'aria-label': global$6.translate(widgetAriaLabel) } : {}
|
|
18305
|
+
},
|
|
18507
18306
|
},
|
|
18508
18307
|
components: [
|
|
18509
18308
|
// We don't need to add IDs for each item because there are no
|
|
@@ -18694,6 +18493,7 @@
|
|
|
18694
18493
|
const optionalRole = optionString('role');
|
|
18695
18494
|
const optionalIcon = optionString('icon');
|
|
18696
18495
|
const optionalTooltip = optionString('tooltip');
|
|
18496
|
+
const optionalChevronTooltip = optionString('chevronTooltip');
|
|
18697
18497
|
const optionalLabel = optionString('label');
|
|
18698
18498
|
const optionalShortcut = optionString('shortcut');
|
|
18699
18499
|
const optionalSelect = optionFunction('select');
|
|
@@ -18970,6 +18770,7 @@
|
|
|
18970
18770
|
defaultedBoolean('maximized', false),
|
|
18971
18771
|
enabled,
|
|
18972
18772
|
defaultedString('context', 'mode:design'),
|
|
18773
|
+
optionBoolean('spellcheck'),
|
|
18973
18774
|
]);
|
|
18974
18775
|
const textAreaSchema = objOf(textAreaFields);
|
|
18975
18776
|
const textAreaDataProcessor = string;
|
|
@@ -19500,6 +19301,7 @@
|
|
|
19500
19301
|
const splitButtonSchema = objOf([
|
|
19501
19302
|
type,
|
|
19502
19303
|
optionalTooltip,
|
|
19304
|
+
optionalChevronTooltip,
|
|
19503
19305
|
optionalIcon,
|
|
19504
19306
|
optionalText,
|
|
19505
19307
|
optionalSelect,
|
|
@@ -20264,7 +20066,6 @@
|
|
|
20264
20066
|
return hsvColour(Math.round(h), Math.round(s * 100), Math.round(v * 100));
|
|
20265
20067
|
};
|
|
20266
20068
|
|
|
20267
|
-
/* eslint-disable no-console */
|
|
20268
20069
|
const min = Math.min;
|
|
20269
20070
|
const max = Math.max;
|
|
20270
20071
|
const round$1 = Math.round;
|
|
@@ -20815,6 +20616,7 @@
|
|
|
20815
20616
|
const registerTextColorButton = (editor, name, format, lastColor) => {
|
|
20816
20617
|
editor.ui.registry.addSplitButton(name, {
|
|
20817
20618
|
tooltip: getToolTipText(editor, format, lastColor.get()),
|
|
20619
|
+
chevronTooltip: name === 'forecolor' ? 'Text color menu' : 'Background color menu',
|
|
20818
20620
|
presets: 'color',
|
|
20819
20621
|
icon: name === 'forecolor' ? 'text-color' : 'highlight-bg-color',
|
|
20820
20622
|
select: select$1(editor, format),
|
|
@@ -21113,7 +20915,7 @@
|
|
|
21113
20915
|
},
|
|
21114
20916
|
autofocus: true,
|
|
21115
20917
|
components: [
|
|
21116
|
-
parts$
|
|
20918
|
+
parts$7.widget(Menu.sketch(widgetSpec))
|
|
21117
20919
|
]
|
|
21118
20920
|
};
|
|
21119
20921
|
};
|
|
@@ -21144,7 +20946,7 @@
|
|
|
21144
20946
|
},
|
|
21145
20947
|
autofocus: true,
|
|
21146
20948
|
components: [
|
|
21147
|
-
parts$
|
|
20949
|
+
parts$7.widget(Menu.sketch(widgetSpec))
|
|
21148
20950
|
]
|
|
21149
20951
|
};
|
|
21150
20952
|
};
|
|
@@ -21227,7 +21029,7 @@
|
|
|
21227
21029
|
classes: ['tox-fancymenuitem']
|
|
21228
21030
|
},
|
|
21229
21031
|
autofocus: true,
|
|
21230
|
-
components: [parts$
|
|
21032
|
+
components: [parts$7.widget({
|
|
21231
21033
|
dom: {
|
|
21232
21034
|
tag: 'div',
|
|
21233
21035
|
classes: ['tox-insert-table-picker']
|
|
@@ -22113,6 +21915,7 @@
|
|
|
22113
21915
|
};
|
|
22114
21916
|
|
|
22115
21917
|
// TODO: Move this to alloy if the concept works out
|
|
21918
|
+
// eslint-disable-next-line consistent-this
|
|
22116
21919
|
const self = () => Composing.config({
|
|
22117
21920
|
find: Optional.some
|
|
22118
21921
|
});
|
|
@@ -24308,7 +24111,9 @@
|
|
|
24308
24111
|
})).toArray();
|
|
24309
24112
|
const placeholder = spec.placeholder.fold(constant$1({}), (p) => ({ placeholder: providersBackstage.translate(p) }));
|
|
24310
24113
|
const inputMode = spec.inputMode.fold(constant$1({}), (mode) => ({ inputmode: mode }));
|
|
24114
|
+
const spellcheck = spec.spellcheck.fold(constant$1({}), (spellchecker) => ({ spellcheck: spellchecker }));
|
|
24311
24115
|
const inputAttributes = {
|
|
24116
|
+
...spellcheck,
|
|
24312
24117
|
...placeholder,
|
|
24313
24118
|
...inputMode,
|
|
24314
24119
|
'data-mce-name': spec.name
|
|
@@ -24361,7 +24166,8 @@
|
|
|
24361
24166
|
validation: Optional.none(),
|
|
24362
24167
|
maximized: spec.maximized,
|
|
24363
24168
|
data: initialData,
|
|
24364
|
-
context: spec.context
|
|
24169
|
+
context: spec.context,
|
|
24170
|
+
spellcheck: Optional.none(),
|
|
24365
24171
|
}, providersBackstage);
|
|
24366
24172
|
const renderTextarea = (spec, providersBackstage, initialData) => renderTextField({
|
|
24367
24173
|
name: spec.name,
|
|
@@ -24375,7 +24181,8 @@
|
|
|
24375
24181
|
validation: Optional.none(),
|
|
24376
24182
|
maximized: spec.maximized,
|
|
24377
24183
|
data: initialData,
|
|
24378
|
-
context: spec.context
|
|
24184
|
+
context: spec.context,
|
|
24185
|
+
spellcheck: spec.spellcheck,
|
|
24379
24186
|
}, providersBackstage);
|
|
24380
24187
|
|
|
24381
24188
|
const getMenuButtonApi = (component) => ({
|
|
@@ -26206,6 +26013,15 @@
|
|
|
26206
26013
|
};
|
|
26207
26014
|
};
|
|
26208
26015
|
|
|
26016
|
+
const migrationFrom7x = 'https://www.tiny.cloud/docs/tinymce/latest/migration-from-7x/';
|
|
26017
|
+
const deprecatedFeatures = {
|
|
26018
|
+
skipFocus: `ToggleToolbarDrawer skipFocus is deprecated see migration guide: ${migrationFrom7x}`,
|
|
26019
|
+
};
|
|
26020
|
+
const logFeatureDeprecationWarning = (feature) => {
|
|
26021
|
+
// eslint-disable-next-line no-console
|
|
26022
|
+
console.warn(deprecatedFeatures[feature], new Error().stack);
|
|
26023
|
+
};
|
|
26024
|
+
|
|
26209
26025
|
const setup$b = (editor, mothership, uiMotherships) => {
|
|
26210
26026
|
const broadcastEvent = (name, evt) => {
|
|
26211
26027
|
each$1([mothership, ...uiMotherships], (m) => {
|
|
@@ -26218,6 +26034,13 @@
|
|
|
26218
26034
|
});
|
|
26219
26035
|
};
|
|
26220
26036
|
const fireDismissPopups = (evt) => broadcastOn(dismissPopups(), { target: evt.target });
|
|
26037
|
+
const fireCloseTooltips = (event) => {
|
|
26038
|
+
broadcastOn(closeTooltips(), {
|
|
26039
|
+
closedTooltip: () => {
|
|
26040
|
+
event.preventDefault();
|
|
26041
|
+
}
|
|
26042
|
+
});
|
|
26043
|
+
};
|
|
26221
26044
|
// Document touch events
|
|
26222
26045
|
const doc = getDocument();
|
|
26223
26046
|
const onTouchstart = bind$1(doc, 'touchstart', fireDismissPopups);
|
|
@@ -26293,6 +26116,7 @@
|
|
|
26293
26116
|
editor.on('ResizeEditor', onEditorResize);
|
|
26294
26117
|
editor.on('AfterProgressState', onEditorProgress);
|
|
26295
26118
|
editor.on('DismissPopups', onDismissPopups);
|
|
26119
|
+
editor.on('CloseActiveTooltips', fireCloseTooltips);
|
|
26296
26120
|
each$1([mothership, ...uiMotherships], (gui) => {
|
|
26297
26121
|
gui.element.dom.addEventListener('focusin', onFocusIn);
|
|
26298
26122
|
gui.element.dom.addEventListener('focusout', onFocusOut);
|
|
@@ -26309,6 +26133,7 @@
|
|
|
26309
26133
|
editor.off('ResizeEditor', onEditorResize);
|
|
26310
26134
|
editor.off('AfterProgressState', onEditorProgress);
|
|
26311
26135
|
editor.off('DismissPopups', onDismissPopups);
|
|
26136
|
+
editor.off('CloseActiveTooltips', fireCloseTooltips);
|
|
26312
26137
|
each$1([mothership, ...uiMotherships], (gui) => {
|
|
26313
26138
|
gui.element.dom.removeEventListener('focusin', onFocusIn);
|
|
26314
26139
|
gui.element.dom.removeEventListener('focusout', onFocusOut);
|
|
@@ -26704,7 +26529,7 @@
|
|
|
26704
26529
|
}
|
|
26705
26530
|
});
|
|
26706
26531
|
|
|
26707
|
-
const promotionMessage = '💝Get all features';
|
|
26532
|
+
const promotionMessage = '💝 Get all features';
|
|
26708
26533
|
const promotionLink = 'https://www.tiny.cloud/tinymce-upgrade-to-cloud/?utm_campaign=self_hosted_upgrade_promo&utm_source=tiny&utm_medium=referral';
|
|
26709
26534
|
const renderPromotion = (spec) => {
|
|
26710
26535
|
const components = spec.promotionLink ? [
|
|
@@ -27074,7 +26899,6 @@
|
|
|
27074
26899
|
});
|
|
27075
26900
|
};
|
|
27076
26901
|
|
|
27077
|
-
// eslint-disable-next-line max-len
|
|
27078
26902
|
const renderToolbarGroupCommon = (toolbarGroup) => {
|
|
27079
26903
|
const attributes = toolbarGroup.label.isNone() ?
|
|
27080
26904
|
toolbarGroup.title.fold(() => ({}), (title) => ({ attributes: { 'aria-label': title } }))
|
|
@@ -27100,8 +26924,7 @@
|
|
|
27100
26924
|
items: toolbarGroup.items,
|
|
27101
26925
|
markers: {
|
|
27102
26926
|
// nav within a group breaks if disabled buttons are first in their group so skip them
|
|
27103
|
-
itemSelector: '
|
|
27104
|
-
'.tox-split-button:not([disabled]), ' +
|
|
26927
|
+
itemSelector: '.tox-tbtn:not([disabled]), ' +
|
|
27105
26928
|
'.tox-toolbar-nav-item:not([disabled]), ' +
|
|
27106
26929
|
'.tox-number-input:not([disabled])'
|
|
27107
26930
|
},
|
|
@@ -27395,7 +27218,7 @@
|
|
|
27395
27218
|
};
|
|
27396
27219
|
const factory$2 = (detail, components, _spec, _externals) => {
|
|
27397
27220
|
const apis = {
|
|
27398
|
-
getPane: (comp) => parts$
|
|
27221
|
+
getPane: (comp) => parts$g.getPart(comp, detail, 'pane'),
|
|
27399
27222
|
getOnShow: (_comp) => detail.viewConfig.onShow,
|
|
27400
27223
|
getOnHide: (_comp) => detail.viewConfig.onHide,
|
|
27401
27224
|
};
|
|
@@ -27588,91 +27411,91 @@
|
|
|
27588
27411
|
};
|
|
27589
27412
|
const apis = {
|
|
27590
27413
|
getSocket: (comp) => {
|
|
27591
|
-
return parts$
|
|
27414
|
+
return parts$g.getPart(comp, detail, 'socket');
|
|
27592
27415
|
},
|
|
27593
27416
|
setSidebar: (comp, panelConfigs, showSidebar) => {
|
|
27594
|
-
parts$
|
|
27417
|
+
parts$g.getPart(comp, detail, 'sidebar').each((sidebar) => setSidebar(sidebar, panelConfigs, showSidebar));
|
|
27595
27418
|
},
|
|
27596
27419
|
toggleSidebar: (comp, name) => {
|
|
27597
|
-
parts$
|
|
27420
|
+
parts$g.getPart(comp, detail, 'sidebar').each((sidebar) => toggleSidebar(sidebar, name));
|
|
27598
27421
|
},
|
|
27599
27422
|
whichSidebar: (comp) => {
|
|
27600
|
-
return parts$
|
|
27423
|
+
return parts$g.getPart(comp, detail, 'sidebar').bind(whichSidebar).getOrNull();
|
|
27601
27424
|
},
|
|
27602
27425
|
getHeader: (comp) => {
|
|
27603
|
-
return parts$
|
|
27426
|
+
return parts$g.getPart(comp, detail, 'header');
|
|
27604
27427
|
},
|
|
27605
27428
|
getToolbar: (comp) => {
|
|
27606
|
-
return parts$
|
|
27429
|
+
return parts$g.getPart(comp, detail, 'toolbar');
|
|
27607
27430
|
},
|
|
27608
27431
|
setToolbar: (comp, groups) => {
|
|
27609
|
-
parts$
|
|
27432
|
+
parts$g.getPart(comp, detail, 'toolbar').each((toolbar) => {
|
|
27610
27433
|
const renderedGroups = map$2(groups, renderToolbarGroup);
|
|
27611
27434
|
toolbar.getApis().setGroups(toolbar, renderedGroups);
|
|
27612
27435
|
});
|
|
27613
27436
|
},
|
|
27614
27437
|
setToolbars: (comp, toolbars) => {
|
|
27615
|
-
parts$
|
|
27438
|
+
parts$g.getPart(comp, detail, 'multiple-toolbar').each((mToolbar) => {
|
|
27616
27439
|
const renderedToolbars = map$2(toolbars, (g) => map$2(g, renderToolbarGroup));
|
|
27617
27440
|
CustomList.setItems(mToolbar, renderedToolbars);
|
|
27618
27441
|
});
|
|
27619
27442
|
},
|
|
27620
27443
|
refreshToolbar: (comp) => {
|
|
27621
|
-
const toolbar = parts$
|
|
27444
|
+
const toolbar = parts$g.getPart(comp, detail, 'toolbar');
|
|
27622
27445
|
toolbar.each((toolbar) => toolbar.getApis().refresh(toolbar));
|
|
27623
27446
|
},
|
|
27624
27447
|
toggleToolbarDrawer: (comp) => {
|
|
27625
|
-
parts$
|
|
27448
|
+
parts$g.getPart(comp, detail, 'toolbar').each((toolbar) => {
|
|
27626
27449
|
mapFrom(toolbar.getApis().toggle, (toggle) => toggle(toolbar));
|
|
27627
27450
|
});
|
|
27628
27451
|
},
|
|
27629
27452
|
toggleToolbarDrawerWithoutFocusing: (comp) => {
|
|
27630
|
-
parts$
|
|
27453
|
+
parts$g.getPart(comp, detail, 'toolbar').each((toolbar) => {
|
|
27631
27454
|
mapFrom(toolbar.getApis().toggleWithoutFocusing, (toggleWithoutFocusing) => toggleWithoutFocusing(toolbar));
|
|
27632
27455
|
});
|
|
27633
27456
|
},
|
|
27634
27457
|
isToolbarDrawerToggled: (comp) => {
|
|
27635
27458
|
// isOpen may not be defined on all toolbars e.g. 'scrolling' and 'wrap'
|
|
27636
|
-
return parts$
|
|
27459
|
+
return parts$g.getPart(comp, detail, 'toolbar')
|
|
27637
27460
|
.bind((toolbar) => Optional.from(toolbar.getApis().isOpen).map((isOpen) => isOpen(toolbar)))
|
|
27638
27461
|
.getOr(false);
|
|
27639
27462
|
},
|
|
27640
27463
|
getThrobber: (comp) => {
|
|
27641
|
-
return parts$
|
|
27464
|
+
return parts$g.getPart(comp, detail, 'throbber');
|
|
27642
27465
|
},
|
|
27643
27466
|
focusToolbar: (comp) => {
|
|
27644
|
-
const optToolbar = parts$
|
|
27467
|
+
const optToolbar = parts$g.getPart(comp, detail, 'toolbar').orThunk(() => parts$g.getPart(comp, detail, 'multiple-toolbar'));
|
|
27645
27468
|
optToolbar.each((toolbar) => {
|
|
27646
27469
|
Keying.focusIn(toolbar);
|
|
27647
27470
|
});
|
|
27648
27471
|
},
|
|
27649
27472
|
setMenubar: (comp, menus) => {
|
|
27650
|
-
parts$
|
|
27473
|
+
parts$g.getPart(comp, detail, 'menubar').each((menubar) => {
|
|
27651
27474
|
SilverMenubar.setMenus(menubar, menus);
|
|
27652
27475
|
});
|
|
27653
27476
|
},
|
|
27654
27477
|
focusMenubar: (comp) => {
|
|
27655
|
-
parts$
|
|
27478
|
+
parts$g.getPart(comp, detail, 'menubar').each((menubar) => {
|
|
27656
27479
|
SilverMenubar.focus(menubar);
|
|
27657
27480
|
});
|
|
27658
27481
|
},
|
|
27659
27482
|
setViews: (comp, viewConfigs) => {
|
|
27660
|
-
parts$
|
|
27483
|
+
parts$g.getPart(comp, detail, 'viewWrapper').each((wrapper) => {
|
|
27661
27484
|
ViewWrapper.setViews(wrapper, viewConfigs);
|
|
27662
27485
|
});
|
|
27663
27486
|
},
|
|
27664
27487
|
toggleView: (comp, name) => {
|
|
27665
|
-
return parts$
|
|
27488
|
+
return parts$g.getPart(comp, detail, 'viewWrapper').exists((wrapper) => ViewWrapper.toggleView(wrapper, () => apis.showMainView(comp), () => apis.hideMainView(comp), name));
|
|
27666
27489
|
},
|
|
27667
27490
|
whichView: (comp) => {
|
|
27668
|
-
return parts$
|
|
27491
|
+
return parts$g.getPart(comp, detail, 'viewWrapper').bind(ViewWrapper.whichView).getOrNull();
|
|
27669
27492
|
},
|
|
27670
27493
|
hideMainView: (comp) => {
|
|
27671
27494
|
toolbarDrawerOpenState = apis.isToolbarDrawerToggled(comp);
|
|
27672
27495
|
if (toolbarDrawerOpenState) {
|
|
27673
27496
|
apis.toggleToolbarDrawer(comp);
|
|
27674
27497
|
}
|
|
27675
|
-
parts$
|
|
27498
|
+
parts$g.getPart(comp, detail, 'editorContainer').each((editorContainer) => {
|
|
27676
27499
|
const element = editorContainer.element;
|
|
27677
27500
|
toggleStatusbar(element);
|
|
27678
27501
|
set$7(element, 'display', 'none');
|
|
@@ -27683,7 +27506,7 @@
|
|
|
27683
27506
|
if (toolbarDrawerOpenState) {
|
|
27684
27507
|
apis.toggleToolbarDrawer(comp);
|
|
27685
27508
|
}
|
|
27686
|
-
parts$
|
|
27509
|
+
parts$g.getPart(comp, detail, 'editorContainer').each((editorContainer) => {
|
|
27687
27510
|
const element = editorContainer.element;
|
|
27688
27511
|
toggleStatusbar(element);
|
|
27689
27512
|
remove$6(element, 'display');
|
|
@@ -27935,7 +27758,7 @@
|
|
|
27935
27758
|
const defaultMenus = {
|
|
27936
27759
|
file: { title: 'File', items: 'newdocument restoredraft | preview | importword exportpdf exportword | export print | deleteallconversations' },
|
|
27937
27760
|
edit: { title: 'Edit', items: 'undo redo | cut copy paste pastetext | selectall | searchreplace' },
|
|
27938
|
-
view: { title: 'View', items: 'code revisionhistory | visualaid visualchars visualblocks | spellchecker | preview fullscreen | showcomments' },
|
|
27761
|
+
view: { title: 'View', items: 'code suggestededits revisionhistory | visualaid visualchars visualblocks | spellchecker | preview fullscreen | showcomments' },
|
|
27939
27762
|
insert: { title: 'Insert', items: 'image link media addcomment pageembed inserttemplate codesample inserttable accordion math | charmap emoticons hr | pagebreak nonbreaking anchor tableofcontents footnotes | mergetags | insertdatetime' },
|
|
27940
27763
|
format: { title: 'Format', items: 'bold italic underline strikethrough superscript subscript codeformat | styles blocks fontfamily fontsize align lineheight | forecolor backcolor | language | removeformat' },
|
|
27941
27764
|
tools: { title: 'Tools', items: 'aidialog aishortcuts | spellchecker spellcheckerlanguage | autocorrect capitalization | a11ycheck code typography wordcount addtemplate' },
|
|
@@ -28240,7 +28063,7 @@
|
|
|
28240
28063
|
});
|
|
28241
28064
|
};
|
|
28242
28065
|
const renderCommonToolbarButton = (spec, specialisation, providersBackstage, btnName) => {
|
|
28243
|
-
var
|
|
28066
|
+
var _a;
|
|
28244
28067
|
const editorOffCell = Cell(noop);
|
|
28245
28068
|
const structure = renderCommonStructure(spec.icon, spec.text, spec.tooltip, Optional.none(), providersBackstage, spec.context, btnName);
|
|
28246
28069
|
return Button.sketch({
|
|
@@ -28267,7 +28090,7 @@
|
|
|
28267
28090
|
// Here we add the commonButtonDisplayEvent behaviour from the structure so we can listen
|
|
28268
28091
|
// to updateMenuIcon and updateMenuText events and run the defined callbacks as they are
|
|
28269
28092
|
// defined in the renderCommonStructure function and fix the size of the button onAttached.
|
|
28270
|
-
[commonButtonDisplayEvent]: (
|
|
28093
|
+
[commonButtonDisplayEvent]: (_a = structure.buttonBehaviours) === null || _a === void 0 ? void 0 : _a[commonButtonDisplayEvent],
|
|
28271
28094
|
}
|
|
28272
28095
|
});
|
|
28273
28096
|
};
|
|
@@ -28305,117 +28128,187 @@
|
|
|
28305
28128
|
})
|
|
28306
28129
|
])
|
|
28307
28130
|
}))));
|
|
28308
|
-
|
|
28309
|
-
|
|
28310
|
-
const
|
|
28311
|
-
const
|
|
28312
|
-
|
|
28313
|
-
|
|
28314
|
-
|
|
28315
|
-
|
|
28131
|
+
const makeSplitButtonApi = (tooltipString, sharedBackstage, spec) => (component) => {
|
|
28132
|
+
const system = component.getSystem();
|
|
28133
|
+
const element = component.element;
|
|
28134
|
+
const getComponents = () => {
|
|
28135
|
+
const isChevron = has(element, 'tox-split-button__chevron');
|
|
28136
|
+
const mainOpt = isChevron ?
|
|
28137
|
+
prevSibling(element).bind((el) => system.getByDom(el).toOptional()) :
|
|
28138
|
+
Optional.some(component);
|
|
28139
|
+
const chevronOpt = isChevron ?
|
|
28140
|
+
Optional.some(component) :
|
|
28141
|
+
nextSibling(element).bind((el) => system.getByDom(el).toOptional().filter((comp) => has(comp.element, 'tox-split-button__chevron')));
|
|
28142
|
+
return { mainOpt, chevronOpt };
|
|
28143
|
+
};
|
|
28144
|
+
const applyBoth = (f) => {
|
|
28145
|
+
const { mainOpt, chevronOpt } = getComponents();
|
|
28146
|
+
mainOpt.each(f);
|
|
28147
|
+
chevronOpt.each(f);
|
|
28148
|
+
};
|
|
28149
|
+
return {
|
|
28150
|
+
isEnabled: () => {
|
|
28151
|
+
const { mainOpt } = getComponents();
|
|
28152
|
+
return mainOpt.exists((c) => !Disabling.isDisabled(c));
|
|
28153
|
+
},
|
|
28154
|
+
setEnabled: (state) => applyBoth((c) => Disabling.set(c, !state)),
|
|
28155
|
+
setText: (text) => {
|
|
28156
|
+
const { mainOpt } = getComponents();
|
|
28157
|
+
mainOpt.each((c) => emitWith(c, updateMenuText, { text }));
|
|
28158
|
+
},
|
|
28159
|
+
setIcon: (icon) => {
|
|
28160
|
+
const { mainOpt } = getComponents();
|
|
28161
|
+
mainOpt.each((c) => emitWith(c, updateMenuIcon, { icon }));
|
|
28162
|
+
},
|
|
28163
|
+
setIconFill: (id, value) => applyBoth((c) => {
|
|
28164
|
+
descendant(c.element, `svg path[class="${id}"], rect[class="${id}"]`).each((underlinePath) => {
|
|
28316
28165
|
set$9(underlinePath, 'fill', value);
|
|
28317
28166
|
});
|
|
28167
|
+
}),
|
|
28168
|
+
isActive: () => {
|
|
28169
|
+
const { mainOpt } = getComponents();
|
|
28170
|
+
return mainOpt.exists((c) => Toggling.isOn(c));
|
|
28318
28171
|
},
|
|
28319
28172
|
setActive: (state) => {
|
|
28320
|
-
|
|
28321
|
-
set
|
|
28322
|
-
// Toggle the inner button state, as that's the toggle component of the split button
|
|
28323
|
-
descendant(comp.element, 'span').each((button) => {
|
|
28324
|
-
comp.getSystem().getByDom(button).each((buttonComp) => Toggling.set(buttonComp, state));
|
|
28325
|
-
});
|
|
28173
|
+
const { mainOpt } = getComponents();
|
|
28174
|
+
mainOpt.each((c) => Toggling.set(c, state));
|
|
28326
28175
|
},
|
|
28327
|
-
isActive: () => descendant(comp.element, 'span').exists((button) => comp.getSystem().getByDom(button).exists(Toggling.isOn)),
|
|
28328
|
-
setText: (text) => descendant(comp.element, 'span').each((button) => comp.getSystem().getByDom(button).each((buttonComp) => emitWith(buttonComp, updateMenuText, {
|
|
28329
|
-
text
|
|
28330
|
-
}))),
|
|
28331
|
-
setIcon: (icon) => descendant(comp.element, 'span').each((button) => comp.getSystem().getByDom(button).each((buttonComp) => emitWith(buttonComp, updateMenuIcon, {
|
|
28332
|
-
icon
|
|
28333
|
-
}))),
|
|
28334
28176
|
setTooltip: (tooltip) => {
|
|
28335
|
-
const translatedTooltip = sharedBackstage.providers.translate(tooltip);
|
|
28336
|
-
set$9(comp.element, 'aria-label', translatedTooltip);
|
|
28337
28177
|
tooltipString.set(tooltip);
|
|
28178
|
+
const { mainOpt, chevronOpt } = getComponents();
|
|
28179
|
+
mainOpt.each((c) => set$9(c.element, 'aria-label', sharedBackstage.providers.translate(tooltip)));
|
|
28180
|
+
// For chevron, use the explicit chevronTooltip if provided, otherwise fall back to default behavior
|
|
28181
|
+
const chevronTooltipText = spec.chevronTooltip
|
|
28182
|
+
.map((chevronTooltip) => sharedBackstage.providers.translate(chevronTooltip))
|
|
28183
|
+
.getOr(sharedBackstage.providers.translate(`${tooltip} menu`));
|
|
28184
|
+
chevronOpt.each((c) => set$9(c.element, 'aria-label', chevronTooltipText));
|
|
28338
28185
|
}
|
|
28339
|
-
}
|
|
28186
|
+
};
|
|
28187
|
+
};
|
|
28188
|
+
const renderSplitButton = (spec, sharedBackstage, btnName) => {
|
|
28340
28189
|
const editorOffCell = Cell(noop);
|
|
28341
|
-
const
|
|
28342
|
-
|
|
28343
|
-
|
|
28190
|
+
const tooltipString = Cell(spec.tooltip.getOr(''));
|
|
28191
|
+
const getApi = makeSplitButtonApi(tooltipString, sharedBackstage, spec);
|
|
28192
|
+
const menuId = generate$6('tox-split-menu');
|
|
28193
|
+
const expandedCell = Cell(false);
|
|
28194
|
+
const getAriaAttributes = () => ({
|
|
28195
|
+
'aria-haspopup': 'menu',
|
|
28196
|
+
'aria-expanded': String(expandedCell.get()),
|
|
28197
|
+
'aria-controls': menuId
|
|
28198
|
+
});
|
|
28199
|
+
// Helper to get ARIA label for the main button
|
|
28200
|
+
const getMainButtonAriaLabel = () => {
|
|
28201
|
+
return spec.tooltip.map((tooltip) => sharedBackstage.providers.translate(tooltip))
|
|
28202
|
+
.getOr(sharedBackstage.providers.translate('Text color'));
|
|
28203
|
+
};
|
|
28204
|
+
// Helper to get ARIA label and tooltip for the chevron/dropdown button
|
|
28205
|
+
const getChevronTooltip = () => {
|
|
28206
|
+
return spec.chevronTooltip
|
|
28207
|
+
.map((tooltip) => sharedBackstage.providers.translate(tooltip))
|
|
28208
|
+
.getOrThunk(() => {
|
|
28209
|
+
const mainLabel = getMainButtonAriaLabel();
|
|
28210
|
+
return sharedBackstage.providers.translate(['{0} menu', mainLabel]);
|
|
28211
|
+
});
|
|
28212
|
+
};
|
|
28213
|
+
const updateAriaExpanded = (expanded, comp) => {
|
|
28214
|
+
expandedCell.set(expanded);
|
|
28215
|
+
set$9(comp.element, 'aria-expanded', String(expanded));
|
|
28344
28216
|
};
|
|
28345
|
-
|
|
28217
|
+
const arrow = Dropdown.sketch({
|
|
28346
28218
|
dom: {
|
|
28347
|
-
tag: '
|
|
28348
|
-
classes: ["tox-
|
|
28219
|
+
tag: 'button',
|
|
28220
|
+
classes: ["tox-tbtn" /* ToolbarButtonClasses.Button */, 'tox-split-button__chevron'],
|
|
28221
|
+
innerHtml: get('chevron-down', sharedBackstage.providers.icons),
|
|
28349
28222
|
attributes: {
|
|
28350
|
-
'aria-
|
|
28351
|
-
...
|
|
28352
|
-
...(
|
|
28223
|
+
'aria-label': getChevronTooltip(),
|
|
28224
|
+
...(isNonNullable(btnName) ? { 'data-mce-name': btnName + '-chevron' } : {}),
|
|
28225
|
+
...getAriaAttributes()
|
|
28353
28226
|
}
|
|
28354
28227
|
},
|
|
28355
|
-
|
|
28356
|
-
|
|
28357
|
-
|
|
28358
|
-
spec.onAction(api);
|
|
28359
|
-
}
|
|
28360
|
-
},
|
|
28361
|
-
onItemExecute: (_a, _b, _c) => { },
|
|
28362
|
-
splitDropdownBehaviours: derive$1([
|
|
28228
|
+
components: [],
|
|
28229
|
+
toggleClass: "tox-tbtn--enabled" /* ToolbarButtonClasses.Ticked */,
|
|
28230
|
+
dropdownBehaviours: derive$1([
|
|
28363
28231
|
config('split-dropdown-events', [
|
|
28364
28232
|
runOnAttached((comp, _se) => forceInitialSize(comp)),
|
|
28365
|
-
|
|
28366
|
-
|
|
28367
|
-
|
|
28233
|
+
onControlAttached({ getApi, onSetup: spec.onSetup }, editorOffCell),
|
|
28234
|
+
run$1('alloy-dropdown-open', (comp) => updateAriaExpanded(true, comp)),
|
|
28235
|
+
run$1('alloy-dropdown-close', (comp) => updateAriaExpanded(false, comp)),
|
|
28368
28236
|
]),
|
|
28369
|
-
DisablingConfigs.
|
|
28237
|
+
DisablingConfigs.toolbarButton(() => sharedBackstage.providers.checkUiComponentContext(spec.context).shouldDisable),
|
|
28370
28238
|
toggleOnReceive(() => sharedBackstage.providers.checkUiComponentContext(spec.context)),
|
|
28371
28239
|
Unselecting.config({}),
|
|
28372
|
-
|
|
28373
|
-
|
|
28374
|
-
|
|
28375
|
-
|
|
28376
|
-
|
|
28377
|
-
|
|
28378
|
-
|
|
28379
|
-
|
|
28380
|
-
|
|
28381
|
-
|
|
28382
|
-
|
|
28383
|
-
});
|
|
28384
|
-
}).toArray())
|
|
28240
|
+
Tooltipping.config(sharedBackstage.providers.tooltips.getConfig({
|
|
28241
|
+
tooltipText: getChevronTooltip(),
|
|
28242
|
+
onShow: (comp) => {
|
|
28243
|
+
if (tooltipString.get() !== spec.tooltip.getOr('')) {
|
|
28244
|
+
const chevronTooltipText = spec.chevronTooltip
|
|
28245
|
+
.map((chevronTooltip) => sharedBackstage.providers.translate(chevronTooltip))
|
|
28246
|
+
.getOr(`${sharedBackstage.providers.translate(tooltipString.get())} menu`);
|
|
28247
|
+
Tooltipping.setComponents(comp, sharedBackstage.providers.tooltips.getComponents({ tooltipText: chevronTooltipText }));
|
|
28248
|
+
}
|
|
28249
|
+
}
|
|
28250
|
+
}))
|
|
28385
28251
|
]),
|
|
28386
|
-
eventOrder: {
|
|
28387
|
-
[attachedToDom()]: ['alloy.base.behaviour', 'split-dropdown-events', 'tooltipping'],
|
|
28388
|
-
[detachedFromDom()]: ['split-dropdown-events', 'tooltipping']
|
|
28389
|
-
},
|
|
28390
|
-
toggleClass: "tox-tbtn--enabled" /* ToolbarButtonClasses.Ticked */,
|
|
28391
28252
|
lazySink: sharedBackstage.getSink,
|
|
28392
28253
|
fetch: fetchChoices(getApi, spec, sharedBackstage.providers),
|
|
28393
|
-
|
|
28394
|
-
|
|
28395
|
-
menu
|
|
28254
|
+
getHotspot: (comp) => prevSibling(comp.element).bind((el) => comp.getSystem().getByDom(el).toOptional()),
|
|
28255
|
+
onOpen: (_anchor, _comp, menu) => {
|
|
28256
|
+
Highlighting.highlightBy(menu, (item) => has(item.element, 'tox-collection__item--active'));
|
|
28257
|
+
Highlighting.getHighlighted(menu).each(Keying.focusIn);
|
|
28396
28258
|
},
|
|
28397
|
-
|
|
28398
|
-
|
|
28399
|
-
|
|
28400
|
-
DisablingConfigs.toolbarButton(never),
|
|
28401
|
-
toggleOnReceive(constant$1({ contextType: 'any', shouldDisable: false }))
|
|
28402
|
-
]), sharedBackstage.providers, spec.context)),
|
|
28403
|
-
SplitDropdown.parts.arrow({
|
|
28259
|
+
parts: {
|
|
28260
|
+
menu: {
|
|
28261
|
+
...part(false, spec.columns, spec.presets),
|
|
28404
28262
|
dom: {
|
|
28405
|
-
|
|
28406
|
-
|
|
28407
|
-
|
|
28408
|
-
|
|
28409
|
-
|
|
28410
|
-
|
|
28411
|
-
|
|
28412
|
-
|
|
28263
|
+
...part(false, spec.columns, spec.presets).dom,
|
|
28264
|
+
tag: 'div',
|
|
28265
|
+
attributes: {
|
|
28266
|
+
id: menuId
|
|
28267
|
+
}
|
|
28268
|
+
}
|
|
28269
|
+
}
|
|
28270
|
+
}
|
|
28271
|
+
});
|
|
28272
|
+
const mainButton = Button.sketch({
|
|
28273
|
+
...renderCommonStructure(spec.icon, spec.text, Optional.none(), Optional.some([
|
|
28274
|
+
Toggling.config({
|
|
28275
|
+
toggleClass: "tox-tbtn--enabled" /* ToolbarButtonClasses.Ticked */,
|
|
28276
|
+
aria: spec.presets === 'color' ? { mode: 'none' } : { mode: 'pressed' },
|
|
28277
|
+
toggleOnExecute: false
|
|
28413
28278
|
}),
|
|
28414
|
-
|
|
28415
|
-
|
|
28416
|
-
|
|
28417
|
-
|
|
28279
|
+
DisablingConfigs.toolbarButton(() => sharedBackstage.providers.checkUiComponentContext(spec.context).shouldDisable),
|
|
28280
|
+
toggleOnReceive(() => sharedBackstage.providers.checkUiComponentContext(spec.context)),
|
|
28281
|
+
config('split-main-aria-events', []),
|
|
28282
|
+
...(spec.tooltip.isSome() ? [
|
|
28283
|
+
Tooltipping.config(sharedBackstage.providers.tooltips.getConfig({
|
|
28284
|
+
tooltipText: sharedBackstage.providers.translate(spec.tooltip.getOr('')),
|
|
28285
|
+
onShow: (comp) => {
|
|
28286
|
+
if (tooltipString.get() !== spec.tooltip.getOr('')) {
|
|
28287
|
+
const translated = sharedBackstage.providers.translate(tooltipString.get());
|
|
28288
|
+
Tooltipping.setComponents(comp, sharedBackstage.providers.tooltips.getComponents({ tooltipText: translated }));
|
|
28289
|
+
}
|
|
28290
|
+
}
|
|
28291
|
+
}))
|
|
28292
|
+
] : [])
|
|
28293
|
+
]), sharedBackstage.providers, spec.context, btnName),
|
|
28294
|
+
dom: {
|
|
28295
|
+
...renderCommonStructure(spec.icon, spec.text, Optional.none(), Optional.none(), sharedBackstage.providers, spec.context, btnName).dom,
|
|
28296
|
+
classes: ["tox-tbtn" /* ToolbarButtonClasses.Button */, 'tox-split-button__main'],
|
|
28297
|
+
attributes: {
|
|
28298
|
+
'aria-label': getMainButtonAriaLabel(),
|
|
28299
|
+
...(isNonNullable(btnName) ? { 'data-mce-name': btnName } : {})
|
|
28300
|
+
}
|
|
28301
|
+
},
|
|
28302
|
+
action: (button) => {
|
|
28303
|
+
if (spec.onAction) {
|
|
28304
|
+
const api = getApi(button);
|
|
28305
|
+
if (api.isEnabled()) {
|
|
28306
|
+
spec.onAction(api);
|
|
28307
|
+
}
|
|
28308
|
+
}
|
|
28309
|
+
}
|
|
28418
28310
|
});
|
|
28311
|
+
return [mainButton, arrow];
|
|
28419
28312
|
};
|
|
28420
28313
|
|
|
28421
28314
|
const contextFormInputSelector = '.tox-toolbar-slider__input,.tox-toolbar-textfield';
|
|
@@ -28491,7 +28384,7 @@
|
|
|
28491
28384
|
active$1(getRootNode(comp.element)).fold(() => focus$4(f), (active) => {
|
|
28492
28385
|
// We need this extra check since if the focus is aleady on the iframe we don't want to call focus on it again since that closes the context toolbar
|
|
28493
28386
|
if (!eq(active, f)) {
|
|
28494
|
-
|
|
28387
|
+
spec.focusElement(f);
|
|
28495
28388
|
}
|
|
28496
28389
|
});
|
|
28497
28390
|
});
|
|
@@ -29459,8 +29352,12 @@
|
|
|
29459
29352
|
const toolbarGroups = createToolbar(toolbarConfig);
|
|
29460
29353
|
const groups = map$2(toolbarGroups, (group) => {
|
|
29461
29354
|
const items = bind$3(group.items, (toolbarItem) => {
|
|
29462
|
-
|
|
29463
|
-
|
|
29355
|
+
if (toolbarItem.trim().length === 0) {
|
|
29356
|
+
return [];
|
|
29357
|
+
}
|
|
29358
|
+
return lookupButton(editor, toolbarConfig.buttons, toolbarItem, toolbarConfig.allowToolbarGroups, backstage, prefixes)
|
|
29359
|
+
.map((spec) => Array.isArray(spec) ? spec : [spec])
|
|
29360
|
+
.getOr([]);
|
|
29464
29361
|
});
|
|
29465
29362
|
return {
|
|
29466
29363
|
title: Optional.from(editor.translate(group.name)),
|
|
@@ -30223,6 +30120,11 @@
|
|
|
30223
30120
|
}
|
|
30224
30121
|
});
|
|
30225
30122
|
};
|
|
30123
|
+
const getFormParentApi = (comp, valueState, focusfallbackElement) => {
|
|
30124
|
+
const parent$1 = parent(comp.element);
|
|
30125
|
+
const parentCompOpt = parent$1.bind((parent) => comp.getSystem().getByDom(parent).toOptional());
|
|
30126
|
+
return getFormApi(parentCompOpt.getOr(comp), valueState, focusfallbackElement);
|
|
30127
|
+
};
|
|
30226
30128
|
|
|
30227
30129
|
const runOnExecute = (memInput, original, valueState) => run$1(internalToolbarButtonExecute, (comp, se) => {
|
|
30228
30130
|
const input = memInput.get(comp);
|
|
@@ -30466,7 +30368,7 @@
|
|
|
30466
30368
|
|
|
30467
30369
|
const renderContextFormSliderInput = (ctx, providers, onEnter, valueState) => {
|
|
30468
30370
|
const editorOffCell = Cell(noop);
|
|
30469
|
-
const getApi = (comp) =>
|
|
30371
|
+
const getApi = (comp) => getFormParentApi(comp, valueState);
|
|
30470
30372
|
const pLabel = ctx.label.map((label) => FormField.parts.label({
|
|
30471
30373
|
dom: { tag: 'label', classes: ['tox-label'] },
|
|
30472
30374
|
components: [text$2(providers.translate(label))]
|
|
@@ -30520,7 +30422,7 @@
|
|
|
30520
30422
|
|
|
30521
30423
|
const renderContextFormTextInput = (ctx, providers, onEnter, valueState) => {
|
|
30522
30424
|
const editorOffCell = Cell(noop);
|
|
30523
|
-
const getFormApi
|
|
30425
|
+
const getFormApi = (comp) => getFormParentApi(comp, valueState);
|
|
30524
30426
|
const pLabel = ctx.label.map((label) => FormField.parts.label({
|
|
30525
30427
|
dom: { tag: 'label', classes: ['tox-label'] },
|
|
30526
30428
|
components: [text$2(providers.translate(label))]
|
|
@@ -30560,13 +30462,13 @@
|
|
|
30560
30462
|
onSetup: ctx.onSetup,
|
|
30561
30463
|
getApi: (comp) => {
|
|
30562
30464
|
const closestFocussableOpt = ancestor$1(comp.element, '.tox-toolbar').bind((toolbar) => descendant(toolbar, 'button:enabled'));
|
|
30563
|
-
return closestFocussableOpt.fold(() =>
|
|
30465
|
+
return closestFocussableOpt.fold(() => getFormParentApi(comp, valueState), (closestFocussable) => getFormParentApi(comp, valueState, closestFocussable));
|
|
30564
30466
|
},
|
|
30565
30467
|
onBeforeSetup: Keying.focusIn
|
|
30566
30468
|
}, editorOffCell),
|
|
30567
|
-
onContextFormControlDetached({ getApi: getFormApi
|
|
30469
|
+
onContextFormControlDetached({ getApi: getFormApi }, editorOffCell, valueState),
|
|
30568
30470
|
run$1(input(), (comp) => {
|
|
30569
|
-
ctx.onInput(getFormApi
|
|
30471
|
+
ctx.onInput(getFormApi(comp));
|
|
30570
30472
|
})
|
|
30571
30473
|
])
|
|
30572
30474
|
])
|
|
@@ -31020,6 +30922,14 @@
|
|
|
31020
30922
|
},
|
|
31021
30923
|
onBack: () => {
|
|
31022
30924
|
fireContextFormSlideBack(editor);
|
|
30925
|
+
},
|
|
30926
|
+
focusElement: (el) => {
|
|
30927
|
+
if (editor.getBody().contains(el.dom)) {
|
|
30928
|
+
editor.focus();
|
|
30929
|
+
}
|
|
30930
|
+
else {
|
|
30931
|
+
focus$4(el);
|
|
30932
|
+
}
|
|
31023
30933
|
}
|
|
31024
30934
|
});
|
|
31025
30935
|
const contextbar = build$1(contextToolbarResult.sketch);
|
|
@@ -31407,7 +31317,7 @@
|
|
|
31407
31317
|
editor.ui.registry.addButton('indent', {
|
|
31408
31318
|
tooltip: 'Increase indent',
|
|
31409
31319
|
icon: 'indent',
|
|
31410
|
-
onSetup: onSetupEditableToggle(editor),
|
|
31320
|
+
onSetup: onSetupEditableToggle(editor, () => editor.queryCommandState('indent')),
|
|
31411
31321
|
onAction: onActionExecCommand(editor, 'indent')
|
|
31412
31322
|
});
|
|
31413
31323
|
};
|
|
@@ -32348,24 +32258,35 @@
|
|
|
32348
32258
|
ResizeTypes[ResizeTypes["Both"] = 1] = "Both";
|
|
32349
32259
|
ResizeTypes[ResizeTypes["Vertical"] = 2] = "Vertical";
|
|
32350
32260
|
})(ResizeTypes || (ResizeTypes = {}));
|
|
32351
|
-
const
|
|
32261
|
+
const getOriginalDimensions = (editor) => {
|
|
32262
|
+
const container = SugarElement.fromDom(editor.getContainer());
|
|
32263
|
+
const originalHeight = get$d(container);
|
|
32264
|
+
const originalWidth = get$c(container);
|
|
32265
|
+
return {
|
|
32266
|
+
height: originalHeight,
|
|
32267
|
+
width: originalWidth,
|
|
32268
|
+
};
|
|
32269
|
+
};
|
|
32270
|
+
const getDimensions = (editor, deltas, resizeType, originalDimentions) => {
|
|
32352
32271
|
const dimensions = {
|
|
32353
|
-
height: calcCappedSize(
|
|
32272
|
+
height: calcCappedSize(originalDimentions.height + deltas.top, getMinHeightOption(editor), getMaxHeightOption(editor)),
|
|
32273
|
+
width: resizeType === ResizeTypes.Both
|
|
32274
|
+
? calcCappedSize(originalDimentions.width + deltas.left, getMinWidthOption(editor), getMaxWidthOption(editor))
|
|
32275
|
+
: originalDimentions.width,
|
|
32354
32276
|
};
|
|
32355
|
-
if (resizeType === ResizeTypes.Both) {
|
|
32356
|
-
dimensions.width = calcCappedSize(originalWidth + deltas.left, getMinWidthOption(editor), getMaxWidthOption(editor));
|
|
32357
|
-
}
|
|
32358
32277
|
return dimensions;
|
|
32359
32278
|
};
|
|
32360
32279
|
const resize = (editor, deltas, resizeType) => {
|
|
32361
32280
|
const container = SugarElement.fromDom(editor.getContainer());
|
|
32362
|
-
const
|
|
32281
|
+
const originalDimentions = getOriginalDimensions(editor);
|
|
32282
|
+
const dimensions = getDimensions(editor, deltas, resizeType, originalDimentions);
|
|
32363
32283
|
each(dimensions, (val, dim) => {
|
|
32364
32284
|
if (isNumber(val)) {
|
|
32365
32285
|
set$7(container, dim, numToPx(val));
|
|
32366
32286
|
}
|
|
32367
32287
|
});
|
|
32368
32288
|
fireResizeEditor(editor);
|
|
32289
|
+
return dimensions;
|
|
32369
32290
|
};
|
|
32370
32291
|
|
|
32371
32292
|
const getResizeType = (editor) => {
|
|
@@ -32380,10 +32301,19 @@
|
|
|
32380
32301
|
return ResizeTypes.Vertical;
|
|
32381
32302
|
}
|
|
32382
32303
|
};
|
|
32383
|
-
const
|
|
32304
|
+
const getAriaValuetext = (dimensions, resizeType) => {
|
|
32305
|
+
return resizeType === ResizeTypes.Both
|
|
32306
|
+
? global$6.translate([`Editor's height: {0} pixels, Editor's width: {1} pixels`, dimensions.height, dimensions.width])
|
|
32307
|
+
: global$6.translate([`Editor's height: {0} pixels`, dimensions.height]);
|
|
32308
|
+
};
|
|
32309
|
+
const setAriaValuetext = (comp, dimensions, resizeType) => {
|
|
32310
|
+
set$9(comp.element, 'aria-valuetext', getAriaValuetext(dimensions, resizeType));
|
|
32311
|
+
};
|
|
32312
|
+
const keyboardHandler = (editor, comp, resizeType, x, y) => {
|
|
32384
32313
|
const scale = 20;
|
|
32385
32314
|
const delta = SugarPosition(x * scale, y * scale);
|
|
32386
|
-
resize(editor, delta, resizeType);
|
|
32315
|
+
const newDimentions = resize(editor, delta, resizeType);
|
|
32316
|
+
setAriaValuetext(comp, newDimentions, resizeType);
|
|
32387
32317
|
return Optional.some(true);
|
|
32388
32318
|
};
|
|
32389
32319
|
const renderResizeHandler = (editor, providersBackstage) => {
|
|
@@ -32392,8 +32322,8 @@
|
|
|
32392
32322
|
return Optional.none();
|
|
32393
32323
|
}
|
|
32394
32324
|
const resizeLabel = resizeType === ResizeTypes.Both
|
|
32395
|
-
? 'Press the arrow keys to resize the editor.'
|
|
32396
|
-
: 'Press the Up and Down arrow keys to resize the editor.';
|
|
32325
|
+
? global$6.translate('Press the arrow keys to resize the editor.')
|
|
32326
|
+
: global$6.translate('Press the Up and Down arrow keys to resize the editor.');
|
|
32397
32327
|
const cursorClass = resizeType === ResizeTypes.Both
|
|
32398
32328
|
? 'tox-statusbar__resize-cursor-both'
|
|
32399
32329
|
: 'tox-statusbar__resize-cursor-default';
|
|
@@ -32402,28 +32332,48 @@
|
|
|
32402
32332
|
classes: ['tox-statusbar__resize-handle', cursorClass],
|
|
32403
32333
|
attributes: {
|
|
32404
32334
|
'aria-label': providersBackstage.translate(resizeLabel),
|
|
32405
|
-
'data-mce-name': 'resize-handle'
|
|
32335
|
+
'data-mce-name': 'resize-handle',
|
|
32336
|
+
'role': 'separator'
|
|
32406
32337
|
},
|
|
32407
32338
|
behaviours: [
|
|
32408
32339
|
Dragging.config({
|
|
32409
32340
|
mode: 'mouse',
|
|
32410
32341
|
repositionTarget: false,
|
|
32411
|
-
onDrag: (
|
|
32342
|
+
onDrag: (comp, _target, delta) => {
|
|
32343
|
+
const newDimentions = resize(editor, delta, resizeType);
|
|
32344
|
+
setAriaValuetext(comp, newDimentions, resizeType);
|
|
32345
|
+
},
|
|
32412
32346
|
blockerClass: 'tox-blocker'
|
|
32413
32347
|
}),
|
|
32414
32348
|
Keying.config({
|
|
32415
32349
|
mode: 'special',
|
|
32416
|
-
onLeft: () => keyboardHandler(editor, resizeType, -1, 0),
|
|
32417
|
-
onRight: () => keyboardHandler(editor, resizeType, 1, 0),
|
|
32418
|
-
onUp: () => keyboardHandler(editor, resizeType, 0, -1),
|
|
32419
|
-
onDown: () => keyboardHandler(editor, resizeType, 0, 1),
|
|
32350
|
+
onLeft: (comp) => keyboardHandler(editor, comp, resizeType, -1, 0),
|
|
32351
|
+
onRight: (comp) => keyboardHandler(editor, comp, resizeType, 1, 0),
|
|
32352
|
+
onUp: (comp) => keyboardHandler(editor, comp, resizeType, 0, -1),
|
|
32353
|
+
onDown: (comp) => keyboardHandler(editor, comp, resizeType, 0, 1),
|
|
32420
32354
|
}),
|
|
32421
32355
|
Tabstopping.config({}),
|
|
32422
32356
|
Focusing.config({}),
|
|
32423
32357
|
Tooltipping.config(providersBackstage.tooltips.getConfig({
|
|
32424
32358
|
tooltipText: providersBackstage.translate('Resize')
|
|
32425
|
-
}))
|
|
32426
|
-
|
|
32359
|
+
})),
|
|
32360
|
+
config('set-aria-valuetext', [
|
|
32361
|
+
runOnAttached((comp) => {
|
|
32362
|
+
const setInitialValuetext = () => {
|
|
32363
|
+
setAriaValuetext(comp, getOriginalDimensions(editor), resizeType);
|
|
32364
|
+
};
|
|
32365
|
+
if (editor._skinLoaded) {
|
|
32366
|
+
setInitialValuetext();
|
|
32367
|
+
}
|
|
32368
|
+
else {
|
|
32369
|
+
editor.once('SkinLoaded', setInitialValuetext);
|
|
32370
|
+
}
|
|
32371
|
+
})
|
|
32372
|
+
])
|
|
32373
|
+
],
|
|
32374
|
+
eventOrder: {
|
|
32375
|
+
[attachedToDom()]: ['add-focusable', 'set-aria-valuetext']
|
|
32376
|
+
}
|
|
32427
32377
|
}, providersBackstage.icons));
|
|
32428
32378
|
};
|
|
32429
32379
|
|
|
@@ -32906,8 +32856,12 @@
|
|
|
32906
32856
|
editor.addShortcut('alt+F10', 'focus toolbar', () => {
|
|
32907
32857
|
OuterContainer.focusToolbar(outerContainer);
|
|
32908
32858
|
});
|
|
32909
|
-
editor.addCommand('ToggleToolbarDrawer', (_ui, options) => {
|
|
32859
|
+
editor.addCommand('ToggleToolbarDrawer', (_ui, options, args) => {
|
|
32910
32860
|
if (options === null || options === void 0 ? void 0 : options.skipFocus) {
|
|
32861
|
+
logFeatureDeprecationWarning('skipFocus');
|
|
32862
|
+
OuterContainer.toggleToolbarDrawerWithoutFocusing(outerContainer);
|
|
32863
|
+
}
|
|
32864
|
+
else if (args === null || args === void 0 ? void 0 : args.skip_focus) {
|
|
32911
32865
|
OuterContainer.toggleToolbarDrawerWithoutFocusing(outerContainer);
|
|
32912
32866
|
}
|
|
32913
32867
|
else {
|
|
@@ -32915,6 +32869,11 @@
|
|
|
32915
32869
|
}
|
|
32916
32870
|
});
|
|
32917
32871
|
editor.addQueryStateHandler('ToggleToolbarDrawer', () => OuterContainer.isToolbarDrawerToggled(outerContainer));
|
|
32872
|
+
editor.on('blur', () => {
|
|
32873
|
+
if (getToolbarMode(editor) === ToolbarMode$1.floating && OuterContainer.isToolbarDrawerToggled(outerContainer)) {
|
|
32874
|
+
OuterContainer.toggleToolbarDrawerWithoutFocusing(outerContainer);
|
|
32875
|
+
}
|
|
32876
|
+
});
|
|
32918
32877
|
};
|
|
32919
32878
|
const renderUIWithRefs = (uiRefs) => {
|
|
32920
32879
|
const { mainUi, popupUi, uiMotherships } = uiRefs;
|