@ckeditor/ckeditor5-ui 47.1.0 → 47.2.0-alpha.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-ui",
3
- "version": "47.1.0",
3
+ "version": "47.2.0-alpha.0",
4
4
  "description": "The UI framework and standard UI library of CKEditor 5.",
5
5
  "keywords": [
6
6
  "ckeditor",
@@ -17,11 +17,11 @@
17
17
  "type": "module",
18
18
  "main": "src/index.js",
19
19
  "dependencies": {
20
- "@ckeditor/ckeditor5-core": "47.1.0",
21
- "@ckeditor/ckeditor5-editor-multi-root": "47.1.0",
22
- "@ckeditor/ckeditor5-engine": "47.1.0",
23
- "@ckeditor/ckeditor5-icons": "47.1.0",
24
- "@ckeditor/ckeditor5-utils": "47.1.0",
20
+ "@ckeditor/ckeditor5-core": "47.2.0-alpha.0",
21
+ "@ckeditor/ckeditor5-editor-multi-root": "47.2.0-alpha.0",
22
+ "@ckeditor/ckeditor5-engine": "47.2.0-alpha.0",
23
+ "@ckeditor/ckeditor5-icons": "47.2.0-alpha.0",
24
+ "@ckeditor/ckeditor5-utils": "47.2.0-alpha.0",
25
25
  "@types/color-convert": "2.0.4",
26
26
  "color-convert": "3.1.0",
27
27
  "color-parse": "2.0.2",
@@ -231,8 +231,6 @@ export declare class DialogView extends /* #__PURE__ */ DialogView_base implemen
231
231
  private _getDialogRect;
232
232
  /**
233
233
  * Returns a viewport `Rect` shrunk by the viewport offset config from all sides.
234
- *
235
- * TODO: This is a duplicate from position.ts module. It should either be exported there or land somewhere in utils.
236
234
  */
237
235
  private _getViewportRect;
238
236
  /**
@@ -5,7 +5,7 @@
5
5
  /**
6
6
  * @module ui/dialog/dialogview
7
7
  */
8
- import { KeystrokeHandler, FocusTracker, Rect, global, toUnit } from '@ckeditor/ckeditor5-utils';
8
+ import { KeystrokeHandler, FocusTracker, Rect, getConstrainedViewportRect, global, toUnit } from '@ckeditor/ckeditor5-utils';
9
9
  import { IconCancel } from '@ckeditor/ckeditor5-icons';
10
10
  import { ViewCollection } from '../viewcollection.js';
11
11
  import { View } from '../view.js';
@@ -454,8 +454,6 @@ export class DialogView extends /* #__PURE__ */ DraggableViewMixin(View) {
454
454
  }
455
455
  /**
456
456
  * Returns a viewport `Rect` shrunk by the viewport offset config from all sides.
457
- *
458
- * TODO: This is a duplicate from position.ts module. It should either be exported there or land somewhere in utils.
459
457
  */
460
458
  _getViewportRect() {
461
459
  const viewportRect = new Rect(global.window);
@@ -463,21 +461,7 @@ export class DialogView extends /* #__PURE__ */ DraggableViewMixin(View) {
463
461
  if (this.isModal) {
464
462
  return viewportRect;
465
463
  }
466
- const viewportOffset = {
467
- top: 0,
468
- bottom: 0,
469
- left: 0,
470
- right: 0,
471
- ...this._getViewportOffset()
472
- };
473
- viewportRect.top += viewportOffset.top;
474
- viewportRect.height -= viewportOffset.top;
475
- viewportRect.bottom -= viewportOffset.bottom;
476
- viewportRect.height -= viewportOffset.bottom;
477
- viewportRect.left += viewportOffset.left;
478
- viewportRect.right -= viewportOffset.right;
479
- viewportRect.width -= viewportOffset.left + viewportOffset.right;
480
- return viewportRect;
464
+ return getConstrainedViewportRect(this._getViewportOffset());
481
465
  }
482
466
  /**
483
467
  * Collects all focusable elements inside the dialog parts
@@ -285,6 +285,7 @@ export declare const MenuBarMenuViewPanelPositioningFunctions: Record<string, Po
285
285
  * groupId: 'insertInline',
286
286
  * items: [
287
287
  * 'menuBar:link',
288
+ * 'menuBar:insertFootnote',
288
289
  * 'menuBar:bookmark',
289
290
  * 'menuBar:comment',
290
291
  * 'menuBar:insertMergeField',
@@ -513,6 +513,7 @@ export const MenuBarMenuViewPanelPositioningFunctions = {
513
513
  * groupId: 'insertInline',
514
514
  * items: [
515
515
  * 'menuBar:link',
516
+ * 'menuBar:insertFootnote',
516
517
  * 'menuBar:bookmark',
517
518
  * 'menuBar:comment',
518
519
  * 'menuBar:insertMergeField',
@@ -788,6 +789,7 @@ export const DefaultMenuBarItems = [
788
789
  groupId: 'insertInline',
789
790
  items: [
790
791
  'menuBar:link',
792
+ 'menuBar:insertFootnote',
791
793
  'menuBar:bookmark',
792
794
  'menuBar:comment',
793
795
  'menuBar:insertMergeField',
@@ -816,7 +818,8 @@ export const DefaultMenuBarItems = [
816
818
  {
817
819
  groupId: 'restrictedEditingException',
818
820
  items: [
819
- 'menuBar:restrictedEditingException'
821
+ 'menuBar:restrictedEditingException:inline',
822
+ 'menuBar:restrictedEditingException:block'
820
823
  ]
821
824
  }
822
825
  ]