@ckeditor/ckeditor5-ui 29.1.0 → 31.1.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/lang/contexts.json +0 -1
- package/lang/translations/ar.po +0 -4
- package/lang/translations/ast.po +0 -4
- package/lang/translations/az.po +0 -4
- package/lang/translations/cs.po +0 -4
- package/lang/translations/da.po +0 -4
- package/lang/translations/de-ch.po +0 -4
- package/lang/translations/de.po +0 -4
- package/lang/translations/el.po +0 -4
- package/lang/translations/en-au.po +0 -4
- package/lang/translations/en-gb.po +0 -4
- package/lang/translations/en.po +0 -4
- package/lang/translations/eo.po +0 -4
- package/lang/translations/es.po +0 -4
- package/lang/translations/et.po +0 -4
- package/lang/translations/eu.po +0 -4
- package/lang/translations/fa.po +0 -4
- package/lang/translations/fi.po +0 -4
- package/lang/translations/fr.po +0 -4
- package/lang/translations/gl.po +0 -4
- package/lang/translations/he.po +0 -4
- package/lang/translations/hi.po +0 -4
- package/lang/translations/hr.po +0 -4
- package/lang/translations/hu.po +0 -4
- package/lang/translations/id.po +0 -4
- package/lang/translations/it.po +0 -4
- package/lang/translations/ja.po +0 -4
- package/lang/translations/km.po +0 -4
- package/lang/translations/kn.po +0 -4
- package/lang/translations/ko.po +0 -4
- package/lang/translations/ku.po +0 -4
- package/lang/translations/lt.po +0 -4
- package/lang/translations/lv.po +0 -4
- package/lang/translations/nb.po +0 -4
- package/lang/translations/ne.po +0 -4
- package/lang/translations/nl.po +0 -4
- package/lang/translations/no.po +0 -4
- package/lang/translations/pl.po +0 -4
- package/lang/translations/pt-br.po +0 -4
- package/lang/translations/pt.po +0 -4
- package/lang/translations/ro.po +0 -4
- package/lang/translations/ru.po +0 -4
- package/lang/translations/sk.po +0 -4
- package/lang/translations/sl.po +0 -4
- package/lang/translations/sq.po +0 -4
- package/lang/translations/sr-latn.po +0 -4
- package/lang/translations/sr.po +0 -4
- package/lang/translations/sv.po +0 -4
- package/lang/translations/th.po +0 -4
- package/lang/translations/tk.po +0 -4
- package/lang/translations/tr.po +0 -4
- package/lang/translations/ug.po +0 -4
- package/lang/translations/uk.po +0 -4
- package/lang/translations/uz.po +105 -0
- package/lang/translations/vi.po +0 -4
- package/lang/translations/zh-cn.po +0 -4
- package/lang/translations/zh.po +0 -4
- package/package.json +19 -20
- package/src/button/buttonview.js +1 -1
- package/src/colorgrid/colorgridview.js +10 -0
- package/src/dropdown/button/splitbuttonview.js +10 -0
- package/src/inputtext/inputtextview.js +13 -1
- package/src/list/listview.js +10 -0
- package/src/notification/notification.js +1 -1
- package/src/panel/balloon/balloonpanelview.js +342 -216
- package/src/panel/balloon/contextualballoon.js +31 -4
- package/src/panel/sticky/stickypanelview.js +5 -1
- package/src/toolbar/balloon/balloontoolbar.js +48 -35
- package/src/toolbar/block/blocktoolbar.js +3 -2
- package/src/toolbar/toolbarview.js +4 -2
- package/CHANGELOG.md +0 -542
|
@@ -7,16 +7,17 @@
|
|
|
7
7
|
* @module ui/toolbar/balloon/balloontoolbar
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
import
|
|
10
|
+
import Plugin from '@ckeditor/ckeditor5-core/src/plugin';
|
|
11
11
|
import ContextualBalloon from '../../panel/balloon/contextualballoon';
|
|
12
12
|
import ToolbarView from '../toolbarview';
|
|
13
|
-
import BalloonPanelView from '../../panel/balloon/balloonpanelview.js';
|
|
13
|
+
import BalloonPanelView, { generatePositions } from '../../panel/balloon/balloonpanelview.js';
|
|
14
14
|
import FocusTracker from '@ckeditor/ckeditor5-utils/src/focustracker';
|
|
15
15
|
import Rect from '@ckeditor/ckeditor5-utils/src/dom/rect';
|
|
16
16
|
import normalizeToolbarConfig from '../normalizetoolbarconfig';
|
|
17
17
|
import { debounce } from 'lodash-es';
|
|
18
18
|
import ResizeObserver from '@ckeditor/ckeditor5-utils/src/dom/resizeobserver';
|
|
19
19
|
import toUnit from '@ckeditor/ckeditor5-utils/src/dom/tounit';
|
|
20
|
+
import { env, global } from '@ckeditor/ckeditor5-utils';
|
|
20
21
|
|
|
21
22
|
const toPx = toUnit( 'px' );
|
|
22
23
|
|
|
@@ -300,7 +301,7 @@ export default class BalloonToolbar extends Plugin {
|
|
|
300
301
|
return rangeRects[ rangeRects.length - 1 ];
|
|
301
302
|
}
|
|
302
303
|
},
|
|
303
|
-
positions:
|
|
304
|
+
positions: this._getBalloonPositions( isBackward )
|
|
304
305
|
};
|
|
305
306
|
}
|
|
306
307
|
|
|
@@ -345,39 +346,51 @@ export default class BalloonToolbar extends Plugin {
|
|
|
345
346
|
* @protected
|
|
346
347
|
* @event _selectionChangeDebounced
|
|
347
348
|
*/
|
|
348
|
-
}
|
|
349
349
|
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
defaultPositions
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
350
|
+
/**
|
|
351
|
+
* Returns toolbar positions for the given direction of the selection.
|
|
352
|
+
*
|
|
353
|
+
* @private
|
|
354
|
+
* @param {Boolean} isBackward
|
|
355
|
+
* @returns {Array.<module:utils/dom/position~Position>}
|
|
356
|
+
*/
|
|
357
|
+
_getBalloonPositions( isBackward ) {
|
|
358
|
+
const isSafariIniOS = env.isSafari && env.isiOS;
|
|
359
|
+
|
|
360
|
+
// https://github.com/ckeditor/ckeditor5/issues/7707
|
|
361
|
+
const positions = isSafariIniOS ? generatePositions( {
|
|
362
|
+
// 20px when zoomed out. Less then 20px when zoomed in; the "radius" of the native selection handle gets
|
|
363
|
+
// smaller as the user zooms in. No less than the default v-offset, though.
|
|
364
|
+
verticalOffset: Math.max(
|
|
365
|
+
BalloonPanelView.arrowVerticalOffset,
|
|
366
|
+
Math.round( 20 / global.window.visualViewport.scale )
|
|
367
|
+
)
|
|
368
|
+
} ) : BalloonPanelView.defaultPositions;
|
|
369
|
+
|
|
370
|
+
return isBackward ? [
|
|
371
|
+
positions.northWestArrowSouth,
|
|
372
|
+
positions.northWestArrowSouthWest,
|
|
373
|
+
positions.northWestArrowSouthEast,
|
|
374
|
+
positions.northWestArrowSouthMiddleEast,
|
|
375
|
+
positions.northWestArrowSouthMiddleWest,
|
|
376
|
+
positions.southWestArrowNorth,
|
|
377
|
+
positions.southWestArrowNorthWest,
|
|
378
|
+
positions.southWestArrowNorthEast,
|
|
379
|
+
positions.southWestArrowNorthMiddleWest,
|
|
380
|
+
positions.southWestArrowNorthMiddleEast
|
|
381
|
+
] : [
|
|
382
|
+
positions.southEastArrowNorth,
|
|
383
|
+
positions.southEastArrowNorthEast,
|
|
384
|
+
positions.southEastArrowNorthWest,
|
|
385
|
+
positions.southEastArrowNorthMiddleEast,
|
|
386
|
+
positions.southEastArrowNorthMiddleWest,
|
|
387
|
+
positions.northEastArrowSouth,
|
|
388
|
+
positions.northEastArrowSouthEast,
|
|
389
|
+
positions.northEastArrowSouthWest,
|
|
390
|
+
positions.northEastArrowSouthMiddleEast,
|
|
391
|
+
positions.northEastArrowSouthMiddleWest
|
|
392
|
+
];
|
|
393
|
+
}
|
|
381
394
|
}
|
|
382
395
|
|
|
383
396
|
// Returns "true" when the selection has multiple ranges and each range contains a selectable element
|
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
|
|
10
10
|
/* global window */
|
|
11
11
|
|
|
12
|
-
import
|
|
12
|
+
import Plugin from '@ckeditor/ckeditor5-core/src/plugin';
|
|
13
|
+
import pilcrow from '@ckeditor/ckeditor5-core/theme/icons/pilcrow.svg';
|
|
13
14
|
|
|
14
15
|
import BlockButtonView from './blockbuttonview';
|
|
15
16
|
import BalloonPanelView from '../../panel/balloon/balloonpanelview';
|
|
@@ -273,7 +274,7 @@ export default class BlockToolbar extends Plugin {
|
|
|
273
274
|
|
|
274
275
|
buttonView.set( {
|
|
275
276
|
label: t( 'Edit block' ),
|
|
276
|
-
icon:
|
|
277
|
+
icon: pilcrow,
|
|
277
278
|
withText: false
|
|
278
279
|
} );
|
|
279
280
|
|
|
@@ -20,7 +20,7 @@ import global from '@ckeditor/ckeditor5-utils/src/dom/global';
|
|
|
20
20
|
import { createDropdown, addToolbarToDropdown } from '../dropdown/utils';
|
|
21
21
|
import { logWarning } from '@ckeditor/ckeditor5-utils/src/ckeditorerror';
|
|
22
22
|
import normalizeToolbarConfig from './normalizetoolbarconfig';
|
|
23
|
-
import
|
|
23
|
+
import threeVerticalDots from '@ckeditor/ckeditor5-core/theme/icons/three-vertical-dots.svg';
|
|
24
24
|
|
|
25
25
|
import '../../theme/components/toolbar/toolbar.css';
|
|
26
26
|
|
|
@@ -259,6 +259,8 @@ export default class ToolbarView extends View {
|
|
|
259
259
|
*/
|
|
260
260
|
destroy() {
|
|
261
261
|
this._behavior.destroy();
|
|
262
|
+
this.focusTracker.destroy();
|
|
263
|
+
this.keystrokes.destroy();
|
|
262
264
|
|
|
263
265
|
return super.destroy();
|
|
264
266
|
}
|
|
@@ -935,7 +937,7 @@ class DynamicGrouping {
|
|
|
935
937
|
label: t( 'Show more items' ),
|
|
936
938
|
tooltip: true,
|
|
937
939
|
tooltipPosition: locale.uiLanguageDirection === 'rtl' ? 'se' : 'sw',
|
|
938
|
-
icon:
|
|
940
|
+
icon: threeVerticalDots
|
|
939
941
|
} );
|
|
940
942
|
|
|
941
943
|
// 1:1 pass–through binding.
|