@ckeditor/ckeditor5-ui 44.3.0 → 45.0.0-alpha.1

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.
Files changed (107) hide show
  1. package/LICENSE.md +1 -1
  2. package/ckeditor5-metadata.json +1 -1
  3. package/dist/index-editor.css +28 -0
  4. package/dist/index.css +33 -0
  5. package/dist/index.css.map +1 -1
  6. package/dist/index.js +196 -74
  7. package/dist/index.js.map +1 -1
  8. package/dist/translations/be.d.ts +8 -0
  9. package/dist/translations/be.js +5 -0
  10. package/dist/translations/be.umd.js +11 -0
  11. package/lang/translations/be.po +208 -0
  12. package/package.json +12 -6
  13. package/src/arialiveannouncer.js +24 -0
  14. package/src/autocomplete/autocompleteview.js +29 -25
  15. package/src/badge/badge.js +23 -15
  16. package/src/bindings/draggableviewmixin.js +12 -12
  17. package/src/button/buttonview.js +35 -5
  18. package/src/button/filedialogbuttonview.js +11 -1
  19. package/src/button/listitembuttonview.js +14 -10
  20. package/src/button/switchbuttonview.js +4 -0
  21. package/src/collapsible/collapsibleview.d.ts +1 -4
  22. package/src/collapsible/collapsibleview.js +13 -2
  23. package/src/colorgrid/colorgridview.js +18 -2
  24. package/src/colorgrid/colortileview.d.ts +1 -4
  25. package/src/colorgrid/colortileview.js +3 -3
  26. package/src/colorpicker/colorpickerview.js +28 -1
  27. package/src/colorselector/colorgridsfragmentview.js +80 -4
  28. package/src/colorselector/colorpickerfragmentview.js +44 -3
  29. package/src/colorselector/colorselectorview.js +36 -0
  30. package/src/componentfactory.js +8 -4
  31. package/src/dialog/dialog.js +18 -0
  32. package/src/dialog/dialogactionsview.js +20 -0
  33. package/src/dialog/dialogcontentview.js +4 -0
  34. package/src/dialog/dialogview.d.ts +1 -1
  35. package/src/dialog/dialogview.js +56 -11
  36. package/src/dropdown/button/dropdownbuttonview.d.ts +0 -3
  37. package/src/dropdown/button/dropdownbuttonview.js +6 -2
  38. package/src/dropdown/button/splitbuttonview.d.ts +1 -4
  39. package/src/dropdown/button/splitbuttonview.js +27 -3
  40. package/src/dropdown/dropdownpanelview.js +8 -0
  41. package/src/dropdown/dropdownview.js +235 -184
  42. package/src/dropdown/menu/dropdownmenubuttonview.d.ts +0 -3
  43. package/src/dropdown/menu/dropdownmenubuttonview.js +6 -2
  44. package/src/dropdown/menu/dropdownmenulistitembuttonview.js +1 -0
  45. package/src/dropdown/menu/dropdownmenulistitemview.js +4 -0
  46. package/src/dropdown/menu/dropdownmenunestedmenuview.js +31 -8
  47. package/src/dropdown/menu/dropdownmenurootlistview.js +16 -8
  48. package/src/editableui/editableuiview.js +22 -4
  49. package/src/editableui/inline/inlineeditableuiview.js +4 -0
  50. package/src/editorui/accessibilityhelp/accessibilityhelp.js +8 -11
  51. package/src/editorui/bodycollection.js +13 -0
  52. package/src/editorui/boxed/boxededitoruiview.js +14 -0
  53. package/src/editorui/editorui.d.ts +1 -1
  54. package/src/editorui/editorui.js +56 -25
  55. package/src/editorui/editoruiview.d.ts +15 -1
  56. package/src/editorui/editoruiview.js +22 -0
  57. package/src/editorui/evaluationbadge.js +5 -5
  58. package/src/editorui/poweredby.d.ts +1 -4
  59. package/src/editorui/poweredby.js +5 -2
  60. package/src/focuscycler.js +31 -0
  61. package/src/formheader/formheaderview.js +8 -0
  62. package/src/formrow/formrowview.d.ts +57 -0
  63. package/src/formrow/formrowview.js +56 -0
  64. package/src/highlightedtext/highlightedtextview.js +1 -1
  65. package/src/highlightedtext/labelwithhighlightview.js +4 -0
  66. package/src/icon/iconview.js +25 -16
  67. package/src/index.d.ts +1 -0
  68. package/src/index.js +1 -0
  69. package/src/input/inputbase.js +5 -0
  70. package/src/label/labelview.js +5 -0
  71. package/src/labeledfield/labeledfieldview.js +20 -0
  72. package/src/labeledinput/labeledinputview.js +13 -0
  73. package/src/list/listitemgroupview.js +15 -0
  74. package/src/list/listitemview.js +4 -0
  75. package/src/list/listview.js +27 -5
  76. package/src/menubar/menubarmenubuttonview.d.ts +0 -3
  77. package/src/menubar/menubarmenubuttonview.js +6 -2
  78. package/src/menubar/menubarmenupanelview.js +4 -0
  79. package/src/menubar/menubarmenuview.js +23 -6
  80. package/src/menubar/menubarview.d.ts +8 -0
  81. package/src/menubar/menubarview.js +27 -7
  82. package/src/menubar/utils.d.ts +6 -0
  83. package/src/menubar/utils.js +16 -3
  84. package/src/model.js +1 -1
  85. package/src/panel/balloon/balloonpanelview.js +464 -449
  86. package/src/panel/balloon/contextualballoon.js +60 -24
  87. package/src/panel/sticky/stickypanelview.js +14 -0
  88. package/src/search/searchresultsview.js +18 -0
  89. package/src/search/text/searchtextqueryview.d.ts +0 -3
  90. package/src/search/text/searchtextqueryview.js +15 -3
  91. package/src/search/text/searchtextview.js +43 -3
  92. package/src/template.js +69 -1
  93. package/src/textarea/textareaview.js +12 -5
  94. package/src/toolbar/balloon/balloontoolbar.d.ts +1 -1
  95. package/src/toolbar/balloon/balloontoolbar.js +38 -11
  96. package/src/toolbar/block/blocktoolbar.js +24 -8
  97. package/src/toolbar/toolbarview.d.ts +15 -2
  98. package/src/toolbar/toolbarview.js +206 -58
  99. package/src/tooltipmanager.js +50 -32
  100. package/src/view.js +76 -0
  101. package/src/viewcollection.js +4 -0
  102. package/theme/components/form/form.css +87 -0
  103. package/theme/components/formrow/formrow.css +32 -0
  104. package/theme/icons/accessibility.svg +0 -1
  105. package/theme/icons/color-tile-check.svg +0 -1
  106. package/theme/icons/dropdown-arrow.svg +0 -1
  107. package/theme/icons/project-logo.svg +0 -1
package/dist/index.js CHANGED
@@ -3,8 +3,9 @@
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
4
  */
5
5
  import { Collection, CKEditorError, EmitterMixin, isNode, toArray, DomEmitterMixin, ObservableMixin, isIterable, uid, env, delay, getEnvKeystrokeText, isVisible, global, KeystrokeHandler, FocusTracker, toUnit, Rect, createElement, ResizeObserver, getBorderWidths, logWarning, getOptimalPosition, isText, isRange, priorities, first, parseBase64EncodedObject, getAncestors } from '@ckeditor/ckeditor5-utils/dist/index.js';
6
- import { cloneDeepWith, isObject, isElement, debounce, throttle, cloneDeep, extend, escapeRegExp, escape } from 'lodash-es';
7
- import { icons, Plugin, ContextPlugin } from '@ckeditor/ckeditor5-core/dist/index.js';
6
+ import { cloneDeepWith, isObject, isElement, debounce, throttle, cloneDeep, extend, escapeRegExp, escape } from 'es-toolkit/compat';
7
+ import { Plugin, ContextPlugin } from '@ckeditor/ckeditor5-core/dist/index.js';
8
+ import { IconCancel, IconCheck, IconAccessibility, IconDropdownArrow, IconColorTileCheck, IconDragIndicator, IconPilcrow, IconThreeVerticalDots, IconText, IconPlus, IconParagraph, IconImportExport, IconBold, IconAlignLeft, IconColorPalette, IconEraser, IconProjectLogo, IconPreviousArrow, IconNextArrow, IconLoupe } from '@ckeditor/ckeditor5-icons/dist/index.js';
8
9
  import parse from 'color-parse';
9
10
  import * as convert from 'color-convert';
10
11
  import { HexBase } from 'vanilla-colorful/lib/entrypoints/hex';
@@ -2326,6 +2327,13 @@ const xhtmlNs = 'http://www.w3.org/1999/xhtml';
2326
2327
  if (this.content) {
2327
2328
  const parsed = new DOMParser().parseFromString(this.content.trim(), 'image/svg+xml');
2328
2329
  const svg = parsed.querySelector('svg');
2330
+ if (!svg) {
2331
+ /**
2332
+ * The provided icon content is not a valid SVG.
2333
+ *
2334
+ * @error ui-iconview-invalid-svg
2335
+ */ throw new CKEditorError('ui-iconview-invalid-svg', this);
2336
+ }
2329
2337
  const viewBox = svg.getAttribute('viewBox');
2330
2338
  if (viewBox) {
2331
2339
  this.viewBox = viewBox;
@@ -2467,6 +2475,7 @@ const xhtmlNs = 'http://www.w3.org/1999/xhtml';
2467
2475
  class: 'ck-button__icon'
2468
2476
  }
2469
2477
  });
2478
+ this.iconView.bind('content').to(this, 'icon');
2470
2479
  this.keystrokeView = this._createKeystrokeView();
2471
2480
  this.bind('_tooltipString').to(this, 'tooltip', this, 'label', this, 'keystroke', this._getTooltipString.bind(this));
2472
2481
  const template = {
@@ -2540,9 +2549,15 @@ const xhtmlNs = 'http://www.w3.org/1999/xhtml';
2540
2549
  */ render() {
2541
2550
  super.render();
2542
2551
  if (this.icon) {
2543
- this.iconView.bind('content').to(this, 'icon');
2544
2552
  this.children.add(this.iconView);
2545
2553
  }
2554
+ this.on('change:icon', (evt, prop, newIcon, oldIcon)=>{
2555
+ if (newIcon && !oldIcon) {
2556
+ this.children.add(this.iconView, 0);
2557
+ } else if (!newIcon && oldIcon) {
2558
+ this.children.remove(this.iconView);
2559
+ }
2560
+ });
2546
2561
  this.children.add(this.labelView);
2547
2562
  if (this.withKeystroke && this.keystroke) {
2548
2563
  this.children.add(this.keystrokeView);
@@ -3777,7 +3792,7 @@ const toPx$6 = /* #__PURE__ */ toUnit('px');
3777
3792
  buttonView.set({
3778
3793
  label: t('Close'),
3779
3794
  tooltip: true,
3780
- icon: icons.cancel
3795
+ icon: IconCancel
3781
3796
  });
3782
3797
  buttonView.on('execute', ()=>this.fire('close', {
3783
3798
  source: 'closeButton'
@@ -4193,7 +4208,7 @@ class CheckIconHolderView extends View {
4193
4208
  * Creates a check icon view.
4194
4209
  */ _createCheckIconView() {
4195
4210
  const iconView = new IconView();
4196
- iconView.content = icons.check;
4211
+ iconView.content = IconCheck;
4197
4212
  iconView.extendTemplate({
4198
4213
  attributes: {
4199
4214
  class: 'ck-list-item-button__check-icon'
@@ -4362,8 +4377,6 @@ function normalizeKeystrokeDefinition(definition) {
4362
4377
  return definition;
4363
4378
  }
4364
4379
 
4365
- var accessibilityIcon = "<svg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M10 6.628a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z\"/><path d=\"M8.5 9.125a.3.3 0 0 0-.253-.296L5.11 8.327a.75.75 0 1 1 .388-1.449l4.04.716c.267.072.624.08.893.009l4.066-.724a.75.75 0 1 1 .388 1.45l-3.132.5a.3.3 0 0 0-.253.296v1.357a.3.3 0 0 0 .018.102l1.615 4.438a.75.75 0 0 1-1.41.513l-1.35-3.71a.3.3 0 0 0-.281-.197h-.209a.3.3 0 0 0-.282.198l-1.35 3.711a.75.75 0 0 1-1.41-.513l1.64-4.509a.3.3 0 0 0 .019-.103V9.125Z\"/><path clip-rule=\"evenodd\" d=\"M10 18.5a8.5 8.5 0 1 1 0-17 8.5 8.5 0 0 1 0 17Zm0 1.5c5.523 0 10-4.477 10-10S15.523 0 10 0 0 4.477 0 10s4.477 10 10 10Z\"/></svg>";
4366
-
4367
4380
  /**
4368
4381
  * A plugin that brings the accessibility help dialog to the editor available under the <kbd>Alt</kbd>+<kbd>0</kbd>
4369
4382
  * keystroke and via the "Accessibility help" toolbar button. The dialog displays a list of keystrokes that can be used
@@ -4427,7 +4440,7 @@ var accessibilityIcon = "<svg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/20
4427
4440
  const view = new ButtonClass(locale);
4428
4441
  view.set({
4429
4442
  keystroke: 'Alt+0',
4430
- icon: accessibilityIcon,
4443
+ icon: IconAccessibility,
4431
4444
  isToggleable: true
4432
4445
  });
4433
4446
  view.on('execute', ()=>this._toggleDialog());
@@ -4481,7 +4494,7 @@ var accessibilityIcon = "<svg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/20
4481
4494
  id: 'accessibilityHelp',
4482
4495
  className: 'ck-accessibility-help-dialog',
4483
4496
  title: t('Accessibility help'),
4484
- icon: accessibilityIcon,
4497
+ icon: IconAccessibility,
4485
4498
  hasCloseButton: true,
4486
4499
  content: this.contentView
4487
4500
  });
@@ -4788,7 +4801,7 @@ var accessibilityIcon = "<svg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/20
4788
4801
  on: {
4789
4802
  // Removing from code coverage since we cannot programmatically set input element files.
4790
4803
  change: bind.to(/* istanbul ignore next -- @preserve */ ()=>{
4791
- if (this.element && this.element.files && this.element.files.length) {
4804
+ if (this.element?.files?.length) {
4792
4805
  this.fire('done', this.element.files);
4793
4806
  }
4794
4807
  this.element.value = '';
@@ -4803,8 +4816,6 @@ var accessibilityIcon = "<svg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/20
4803
4816
  }
4804
4817
  }
4805
4818
 
4806
- var dropdownArrowIcon = "<svg viewBox=\"0 0 10 10\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M.941 4.523a.75.75 0 1 1 1.06-1.06l3.006 3.005 3.005-3.005a.75.75 0 1 1 1.06 1.06l-3.549 3.55a.75.75 0 0 1-1.168-.136L.941 4.523z\"/></svg>";
4807
-
4808
4819
  /**
4809
4820
  * A collapsible UI component. Consists of a labeled button and a container which can be collapsed
4810
4821
  * by clicking the button. The collapsible container can be a host to other UI views.
@@ -4878,7 +4889,7 @@ var dropdownArrowIcon = "<svg viewBox=\"0 0 10 10\" xmlns=\"http://www.w3.org/20
4878
4889
  const bind = buttonView.bindTemplate;
4879
4890
  buttonView.set({
4880
4891
  withText: true,
4881
- icon: dropdownArrowIcon
4892
+ icon: IconDropdownArrow
4882
4893
  });
4883
4894
  buttonView.extendTemplate({
4884
4895
  attributes: {
@@ -4974,8 +4985,6 @@ var dropdownArrowIcon = "<svg viewBox=\"0 0 10 10\" xmlns=\"http://www.w3.org/20
4974
4985
  }
4975
4986
  }
4976
4987
 
4977
- var checkIcon = "<svg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path class=\"ck-icon__fill\" d=\"M16.935 5.328a2 2 0 0 1 0 2.829l-7.778 7.778a2 2 0 0 1-2.829 0L3.5 13.107a1.999 1.999 0 1 1 2.828-2.829l.707.707a1 1 0 0 0 1.414 0l5.658-5.657a2 2 0 0 1 2.828 0z\"/><path d=\"M14.814 6.035 8.448 12.4a1 1 0 0 1-1.414 0l-1.413-1.415A1 1 0 1 0 4.207 12.4l2.829 2.829a1 1 0 0 0 1.414 0l7.778-7.778a1 1 0 1 0-1.414-1.415z\"/></svg>";
4978
-
4979
4988
  /**
4980
4989
  * This class represents a single color tile in the {@link module:ui/colorgrid/colorgridview~ColorGridView}.
4981
4990
  */ class ColorTileView extends ButtonView {
@@ -4984,7 +4993,7 @@ var checkIcon = "<svg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"
4984
4993
  const bind = this.bindTemplate;
4985
4994
  this.set('color', undefined);
4986
4995
  this.set('hasBorder', false);
4987
- this.icon = checkIcon;
4996
+ this.icon = IconColorTileCheck;
4988
4997
  this.extendTemplate({
4989
4998
  attributes: {
4990
4999
  style: {
@@ -5034,7 +5043,7 @@ var checkIcon = "<svg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"
5034
5043
  */ constructor(locale, options){
5035
5044
  super(locale);
5036
5045
  const colorDefinitions = options && options.colorDefinitions ? options.colorDefinitions : [];
5037
- this.columns = options && options.columns ? options.columns : 5;
5046
+ this.columns = options?.columns || 5;
5038
5047
  const viewStyleAttribute = {
5039
5048
  gridTemplateColumns: `repeat( ${this.columns}, 1fr)`
5040
5049
  };
@@ -5114,7 +5123,7 @@ var checkIcon = "<svg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"
5114
5123
  focusTracker: this.focusTracker,
5115
5124
  gridItems: this.items,
5116
5125
  numberOfColumns: this.columns,
5117
- uiLanguageDirection: this.locale && this.locale.uiLanguageDirection
5126
+ uiLanguageDirection: this.locale?.uiLanguageDirection
5118
5127
  });
5119
5128
  }
5120
5129
  /**
@@ -6298,7 +6307,7 @@ function getTextareaElementClone(element, value) {
6298
6307
  * Creates a {@link module:ui/icon/iconview~IconView} instance as {@link #arrowView}.
6299
6308
  */ _createArrowView() {
6300
6309
  const arrowView = new IconView();
6301
- arrowView.content = dropdownArrowIcon;
6310
+ arrowView.content = IconDropdownArrow;
6302
6311
  arrowView.extendTemplate({
6303
6312
  attributes: {
6304
6313
  class: 'ck-dropdown__arrow'
@@ -6376,7 +6385,7 @@ function getTextareaElementClone(element, value) {
6376
6385
  * @private
6377
6386
  */ _createArrowView() {
6378
6387
  const arrowView = new IconView();
6379
- arrowView.content = dropdownArrowIcon;
6388
+ arrowView.content = IconDropdownArrow;
6380
6389
  arrowView.extendTemplate({
6381
6390
  attributes: {
6382
6391
  class: 'ck-dropdown-menu-list__nested-menu__button__arrow'
@@ -8528,15 +8537,15 @@ const POSITION_OFF_SCREEN = {
8528
8537
  }
8529
8538
 
8530
8539
  const NESTED_TOOLBAR_ICONS = /* #__PURE__ */ (()=>({
8531
- alignLeft: icons.alignLeft,
8532
- bold: icons.bold,
8533
- importExport: icons.importExport,
8534
- paragraph: icons.paragraph,
8535
- plus: icons.plus,
8536
- text: icons.text,
8537
- threeVerticalDots: icons.threeVerticalDots,
8538
- pilcrow: icons.pilcrow,
8539
- dragIndicator: icons.dragIndicator
8540
+ alignLeft: IconAlignLeft,
8541
+ bold: IconBold,
8542
+ importExport: IconImportExport,
8543
+ paragraph: IconParagraph,
8544
+ plus: IconPlus,
8545
+ text: IconText,
8546
+ threeVerticalDots: IconThreeVerticalDots,
8547
+ pilcrow: IconPilcrow,
8548
+ dragIndicator: IconDragIndicator
8540
8549
  }))();
8541
8550
  /**
8542
8551
  * The toolbar view class.
@@ -8600,11 +8609,14 @@ const NESTED_TOOLBAR_ICONS = /* #__PURE__ */ (()=>({
8600
8609
  this.set('ariaLabel', t('Editor toolbar'));
8601
8610
  this.set('maxWidth', 'auto');
8602
8611
  this.set('role', 'toolbar');
8612
+ this.set('isGrouping', !!this.options.shouldGroupWhenFull);
8603
8613
  this.items = this.createCollection();
8604
8614
  this.focusTracker = new FocusTracker();
8605
8615
  this.keystrokes = new KeystrokeHandler();
8606
8616
  this.set('class', undefined);
8607
8617
  this.set('isCompact', false);
8618
+ // Static toolbar can be vertical when needed.
8619
+ this.set('isVertical', false);
8608
8620
  this.itemsView = new ItemsView(locale);
8609
8621
  this.children = this.createCollection();
8610
8622
  this.children.add(this.itemsView);
@@ -8631,7 +8643,11 @@ const NESTED_TOOLBAR_ICONS = /* #__PURE__ */ (()=>({
8631
8643
  'ck',
8632
8644
  'ck-toolbar',
8633
8645
  bind.to('class'),
8634
- bind.if('isCompact', 'ck-toolbar_compact')
8646
+ bind.if('isCompact', 'ck-toolbar_compact'),
8647
+ // To group items dynamically, the toolbar needs a dedicated CSS class. Only used for dynamic grouping.
8648
+ bind.if('isGrouping', 'ck-toolbar_grouping'),
8649
+ // When vertical, the toolbar has an additional CSS class. Only used for static layout.
8650
+ bind.if('isVertical', 'ck-toolbar_vertical')
8635
8651
  ];
8636
8652
  if (this.options.shouldGroupWhenFull && this.options.isFloating) {
8637
8653
  classes.push('ck-toolbar_floating');
@@ -8703,6 +8719,23 @@ const NESTED_TOOLBAR_ICONS = /* #__PURE__ */ (()=>({
8703
8719
  */ fillFromConfig(itemsOrConfig, factory, removeItems) {
8704
8720
  this.items.addMany(this._buildItemsFromConfig(itemsOrConfig, factory, removeItems));
8705
8721
  }
8722
+ /**
8723
+ * Changes the behavior of toolbar if it does not fit into the available space.
8724
+ */ switchBehavior(newBehaviorType) {
8725
+ if (this._behavior.type !== newBehaviorType) {
8726
+ this._behavior.destroy();
8727
+ this.itemsView.children.clear();
8728
+ this.focusables.clear();
8729
+ if (newBehaviorType === 'dynamic') {
8730
+ this._behavior = new DynamicGrouping(this);
8731
+ this._behavior.render(this);
8732
+ this._behavior.refreshItems();
8733
+ } else {
8734
+ this._behavior = new StaticLayout(this);
8735
+ this._behavior.render(this);
8736
+ }
8737
+ }
8738
+ }
8706
8739
  /**
8707
8740
  * A utility that expands the plain toolbar configuration into a list of view items using a given component factory.
8708
8741
  *
@@ -8875,7 +8908,7 @@ const NESTED_TOOLBAR_ICONS = /* #__PURE__ */ (()=>({
8875
8908
  // Allow disabling icon by passing false.
8876
8909
  if (icon !== false) {
8877
8910
  // A pre-defined icon picked by name, SVG string, a fallback (default) icon.
8878
- dropdownView.buttonView.icon = NESTED_TOOLBAR_ICONS[icon] || icon || icons.threeVerticalDots;
8911
+ dropdownView.buttonView.icon = NESTED_TOOLBAR_ICONS[icon] || icon || IconThreeVerticalDots;
8879
8912
  } else {
8880
8913
  dropdownView.buttonView.withText = true;
8881
8914
  }
@@ -8912,27 +8945,20 @@ const NESTED_TOOLBAR_ICONS = /* #__PURE__ */ (()=>({
8912
8945
  * At the same time, it also makes it possible to display a toolbar with a vertical layout
8913
8946
  * using the {@link module:ui/toolbar/toolbarview~ToolbarView#isVertical} property.
8914
8947
  */ class StaticLayout {
8948
+ /**
8949
+ * Toolbar behavior type.
8950
+ */ type = 'static';
8915
8951
  /**
8916
8952
  * Creates an instance of the {@link module:ui/toolbar/toolbarview~StaticLayout} toolbar
8917
8953
  * behavior.
8918
8954
  *
8919
8955
  * @param view An instance of the toolbar that this behavior is added to.
8920
8956
  */ constructor(view){
8921
- const bind = view.bindTemplate;
8922
- // Static toolbar can be vertical when needed.
8923
- view.set('isVertical', false);
8957
+ view.isGrouping = false;
8924
8958
  // 1:1 pass–through binding, all ToolbarView#items are visible.
8925
8959
  view.itemsView.children.bindTo(view.items).using((item)=>item);
8926
8960
  // 1:1 pass–through binding, all ToolbarView#items are focusable.
8927
8961
  view.focusables.bindTo(view.items).using((item)=>isFocusable(item) ? item : null);
8928
- view.extendTemplate({
8929
- attributes: {
8930
- class: [
8931
- // When vertical, the toolbar has an additional CSS class.
8932
- bind.if('isVertical', 'ck-toolbar_vertical')
8933
- ]
8934
- }
8935
- });
8936
8962
  }
8937
8963
  /**
8938
8964
  * @inheritDoc
@@ -8959,6 +8985,9 @@ const NESTED_TOOLBAR_ICONS = /* #__PURE__ */ (()=>({
8959
8985
  * └───────────────────────────────────────────────────────────────────────────────────────────────┘
8960
8986
  * ```
8961
8987
  */ class DynamicGrouping {
8988
+ /**
8989
+ * Toolbar behavior type.
8990
+ */ type = 'dynamic';
8962
8991
  /**
8963
8992
  * A toolbar view this behavior belongs to.
8964
8993
  */ view;
@@ -9039,6 +9068,7 @@ const NESTED_TOOLBAR_ICONS = /* #__PURE__ */ (()=>({
9039
9068
  this.viewItemsView = view.itemsView;
9040
9069
  this.viewFocusTracker = view.focusTracker;
9041
9070
  this.viewLocale = view.locale;
9071
+ this.view.isGrouping = true;
9042
9072
  this.ungroupedItems = view.createCollection();
9043
9073
  this.groupedItems = view.createCollection();
9044
9074
  this.groupedItemsDropdown = this._createGroupedItemsDropdown();
@@ -9078,14 +9108,6 @@ const NESTED_TOOLBAR_ICONS = /* #__PURE__ */ (()=>({
9078
9108
  // some new space is available and we could do some ungrouping.
9079
9109
  this._updateGrouping();
9080
9110
  });
9081
- view.extendTemplate({
9082
- attributes: {
9083
- class: [
9084
- // To group items dynamically, the toolbar needs a dedicated CSS class.
9085
- 'ck-toolbar_grouping'
9086
- ]
9087
- }
9088
- });
9089
9111
  }
9090
9112
  /**
9091
9113
  * Enables dynamic items grouping based on the dimensions of the toolbar.
@@ -9102,8 +9124,27 @@ const NESTED_TOOLBAR_ICONS = /* #__PURE__ */ (()=>({
9102
9124
  // The dropdown may not be in ToolbarView#children at the moment of toolbar destruction
9103
9125
  // so let's make sure it's actually destroyed along with the toolbar.
9104
9126
  this.groupedItemsDropdown.destroy();
9127
+ // Do not try to remove the same elements if they are already removed.
9128
+ if (this.viewChildren.length > 1) {
9129
+ this.viewChildren.remove(this.groupedItemsDropdown);
9130
+ this.viewChildren.remove(this.viewChildren.last);
9131
+ }
9105
9132
  this.resizeObserver.destroy();
9106
9133
  }
9134
+ /**
9135
+ * Re-adds all items to the toolbar. Use when the toolbar is re-rendered and the items grouping is lost.
9136
+ */ refreshItems() {
9137
+ const view = this.view;
9138
+ if (view.items.length) {
9139
+ for(let currentIndex = 0; currentIndex < view.items.length; currentIndex++){
9140
+ const item = [
9141
+ ...view.items
9142
+ ][currentIndex];
9143
+ this.ungroupedItems.add(item, currentIndex);
9144
+ }
9145
+ this._updateGrouping();
9146
+ }
9147
+ }
9107
9148
  /**
9108
9149
  * When called, it will check if any of the {@link #ungroupedItems} do not fit into a single row of the toolbar,
9109
9150
  * and it will move them to the {@link #groupedItems} when it happens.
@@ -9257,7 +9298,7 @@ const NESTED_TOOLBAR_ICONS = /* #__PURE__ */ (()=>({
9257
9298
  label: t('Show more items'),
9258
9299
  tooltip: true,
9259
9300
  tooltipPosition: locale.uiLanguageDirection === 'rtl' ? 'se' : 'sw',
9260
- icon: icons.threeVerticalDots
9301
+ icon: IconThreeVerticalDots
9261
9302
  });
9262
9303
  return dropdown;
9263
9304
  }
@@ -9419,7 +9460,7 @@ const NESTED_TOOLBAR_ICONS = /* #__PURE__ */ (()=>({
9419
9460
  */ _createArrowView() {
9420
9461
  const arrowView = new ButtonView();
9421
9462
  const bind = arrowView.bindTemplate;
9422
- arrowView.icon = dropdownArrowIcon;
9463
+ arrowView.icon = IconDropdownArrow;
9423
9464
  arrowView.extendTemplate({
9424
9465
  attributes: {
9425
9466
  class: [
@@ -10737,7 +10778,7 @@ class ColorPickerInputRowView extends View {
10737
10778
  this.colorPickerButtonView.set({
10738
10779
  label: this._colorPickerLabel,
10739
10780
  withText: true,
10740
- icon: icons.colorPalette,
10781
+ icon: IconColorPalette,
10741
10782
  class: 'ck-color-selector__color-picker'
10742
10783
  });
10743
10784
  this.colorPickerButtonView.on('execute', ()=>{
@@ -10750,7 +10791,7 @@ class ColorPickerInputRowView extends View {
10750
10791
  const buttonView = new ButtonView();
10751
10792
  buttonView.set({
10752
10793
  withText: true,
10753
- icon: icons.eraser,
10794
+ icon: IconEraser,
10754
10795
  label: this._removeButtonLabel
10755
10796
  });
10756
10797
  buttonView.class = 'ck-color-selector__remove-color';
@@ -10794,7 +10835,7 @@ class ColorPickerInputRowView extends View {
10794
10835
  const colorTile = new ColorTileView();
10795
10836
  colorTile.set({
10796
10837
  color: colorObj.color,
10797
- hasBorder: colorObj.options && colorObj.options.hasBorder
10838
+ hasBorder: colorObj.options?.hasBorder
10798
10839
  });
10799
10840
  if (colorObj.label) {
10800
10841
  colorTile.set({
@@ -11022,14 +11063,14 @@ class ColorPickerInputRowView extends View {
11022
11063
  const saveButtonView = new ButtonView(locale);
11023
11064
  const cancelButtonView = new ButtonView(locale);
11024
11065
  saveButtonView.set({
11025
- icon: icons.check,
11066
+ icon: IconCheck,
11026
11067
  class: 'ck-button-save',
11027
11068
  type: 'button',
11028
11069
  withText: false,
11029
11070
  label: t('Accept')
11030
11071
  });
11031
11072
  cancelButtonView.set({
11032
- icon: icons.cancel,
11073
+ icon: IconCancel,
11033
11074
  class: 'ck-button-cancel',
11034
11075
  type: 'button',
11035
11076
  withText: false,
@@ -12068,8 +12109,6 @@ function getLowerCornerPosition(focusedEditableElement, config, getBalloonLeft)
12068
12109
  };
12069
12110
  }
12070
12111
 
12071
- var poweredByIcon = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"53\" height=\"10\" viewBox=\"0 0 53 10\"><path fill=\"#1C2331\" d=\"M31.724 1.492a15.139 15.139 0 0 0 .045 1.16 2.434 2.434 0 0 0-.687-.34 3.68 3.68 0 0 0-1.103-.166 2.332 2.332 0 0 0-1.14.255 1.549 1.549 0 0 0-.686.87c-.15.41-.225.98-.225 1.712 0 .939.148 1.659.444 2.161.297.503.792.754 1.487.754.452.015.9-.094 1.294-.316.296-.174.557-.4.771-.669l.14.852h1.282V.007h-1.623v1.485ZM31 6.496a1.77 1.77 0 0 1-.494.061.964.964 0 0 1-.521-.127.758.758 0 0 1-.296-.466 3.984 3.984 0 0 1-.093-.992 4.208 4.208 0 0 1 .098-1.052.753.753 0 0 1 .307-.477 1.08 1.08 0 0 1 .55-.122c.233-.004.466.026.69.089l.483.144v2.553c-.11.076-.213.143-.307.2a1.73 1.73 0 0 1-.417.189ZM35.68 0l-.702.004c-.322.002-.482.168-.48.497l.004.581c.002.33.164.493.486.49l.702-.004c.322-.002.481-.167.48-.496L36.165.49c-.002-.33-.164-.493-.486-.491ZM36.145 2.313l-1.612.01.034 5.482 1.613-.01-.035-5.482ZM39.623.79 37.989.8 38 2.306l-.946.056.006 1.009.949-.006.024 2.983c.003.476.143.844.419 1.106.275.26.658.39 1.148.387.132 0 .293-.01.483-.03.19-.02.38-.046.57-.08.163-.028.324-.068.482-.119l-.183-1.095-.702.004a.664.664 0 0 1-.456-.123.553.553 0 0 1-.14-.422l-.016-2.621 1.513-.01-.006-1.064-1.514.01-.01-1.503ZM46.226 2.388c-.41-.184-.956-.274-1.636-.27-.673.004-1.215.101-1.627.29-.402.179-.72.505-.888.91-.18.419-.268.979-.264 1.68.004.688.1 1.24.285 1.655.172.404.495.724.9.894.414.18.957.268 1.63.264.68-.004 1.224-.099 1.632-.284.4-.176.714-.501.878-.905.176-.418.263-.971.258-1.658-.004-.702-.097-1.261-.28-1.677a1.696 1.696 0 0 0-.888-.9Zm-.613 3.607a.77.77 0 0 1-.337.501 1.649 1.649 0 0 1-1.317.009.776.776 0 0 1-.343-.497 4.066 4.066 0 0 1-.105-1.02 4.136 4.136 0 0 1 .092-1.03.786.786 0 0 1 .337-.507 1.59 1.59 0 0 1 1.316-.008.79.79 0 0 1 .344.502c.078.337.113.683.105 1.03.012.343-.019.685-.092 1.02ZM52.114 2.07a2.67 2.67 0 0 0-1.128.278c-.39.191-.752.437-1.072.73l-.157-.846-1.273.008.036 5.572 1.623-.01-.024-3.78c.35-.124.646-.22.887-.286.26-.075.53-.114.8-.118l.45-.003.144-1.546-.286.001ZM22.083 7.426l-1.576-2.532a2.137 2.137 0 0 0-.172-.253 1.95 1.95 0 0 0-.304-.29.138.138 0 0 1 .042-.04 1.7 1.7 0 0 0 .328-.374l1.75-2.71c.01-.015.025-.028.024-.048-.01-.01-.021-.007-.031-.007L20.49 1.17a.078.078 0 0 0-.075.045l-.868 1.384c-.23.366-.46.732-.688 1.099a.108.108 0 0 1-.112.06c-.098-.005-.196-.001-.294-.002-.018 0-.038.006-.055-.007.002-.02.002-.039.005-.058a4.6 4.6 0 0 0 .046-.701V1.203c0-.02-.009-.032-.03-.03h-.033L16.93 1.17c-.084 0-.073-.01-.073.076v6.491c-.001.018.006.028.025.027h1.494c.083 0 .072.007.072-.071v-2.19c0-.055-.003-.11-.004-.166a3.366 3.366 0 0 0-.05-.417h.06c.104 0 .209.002.313-.002a.082.082 0 0 1 .084.05c.535.913 1.07 1.824 1.607 2.736a.104.104 0 0 0 .103.062c.554-.003 1.107-.002 1.66-.002l.069-.003-.019-.032-.188-.304ZM27.112 6.555c-.005-.08-.004-.08-.082-.08h-2.414c-.053 0-.106-.003-.159-.011a.279.279 0 0 1-.246-.209.558.558 0 0 1-.022-.15c0-.382 0-.762-.002-1.143 0-.032.007-.049.042-.044h2.504c.029.003.037-.012.034-.038V3.814c0-.089.013-.078-.076-.078h-2.44c-.07 0-.062.003-.062-.06v-.837c0-.047.004-.093.013-.14a.283.283 0 0 1 .241-.246.717.717 0 0 1 .146-.011h2.484c.024.002.035-.009.036-.033l.003-.038.03-.496c.01-.183.024-.365.034-.548.005-.085.003-.087-.082-.094-.218-.018-.437-.038-.655-.05a17.845 17.845 0 0 0-.657-.026 72.994 72.994 0 0 0-1.756-.016 1.7 1.7 0 0 0-.471.064 1.286 1.286 0 0 0-.817.655c-.099.196-.149.413-.145.633v3.875c0 .072.003.144.011.216a1.27 1.27 0 0 0 .711 1.029c.228.113.48.167.734.158.757-.005 1.515.002 2.272-.042.274-.016.548-.034.82-.053.03-.002.043-.008.04-.041-.008-.104-.012-.208-.019-.312a69.964 69.964 0 0 1-.05-.768ZM16.14 7.415l-.127-1.075c-.004-.03-.014-.04-.044-.037a13.125 13.125 0 0 1-.998.073c-.336.01-.672.02-1.008.016-.116-.001-.233-.014-.347-.039a.746.746 0 0 1-.45-.262c-.075-.1-.132-.211-.167-.33a3.324 3.324 0 0 1-.126-.773 9.113 9.113 0 0 1-.015-.749c0-.285.022-.57.065-.852.023-.158.066-.312.127-.46a.728.728 0 0 1 .518-.443 1.64 1.64 0 0 1 .397-.048c.628-.001 1.255.003 1.882.05.022.001.033-.006.036-.026l.003-.031.06-.55c.019-.177.036-.355.057-.532.004-.034-.005-.046-.04-.056a5.595 5.595 0 0 0-1.213-.21 10.783 10.783 0 0 0-.708-.02c-.24-.003-.48.01-.719.041a3.477 3.477 0 0 0-.625.14 1.912 1.912 0 0 0-.807.497c-.185.2-.33.433-.424.688a4.311 4.311 0 0 0-.24 1.096c-.031.286-.045.572-.042.86-.006.43.024.86.091 1.286.04.25.104.497.193.734.098.279.26.53.473.734.214.205.473.358.756.446.344.11.702.17 1.063.177a8.505 8.505 0 0 0 1.578-.083 6.11 6.11 0 0 0 .766-.18c.03-.008.047-.023.037-.057a.157.157 0 0 1-.003-.025Z\"/><path fill=\"#AFE229\" d=\"M6.016 6.69a1.592 1.592 0 0 0-.614.21c-.23.132-.422.32-.56.546-.044.072-.287.539-.287.539l-.836 1.528.009.006c.038.025.08.046.123.063.127.046.26.07.395.073.505.023 1.011-.007 1.517-.003.29.009.58.002.869-.022a.886.886 0 0 0 .395-.116.962.962 0 0 0 .312-.286c.056-.083.114-.163.164-.249.24-.408.48-.816.718-1.226.075-.128.148-.257.222-.386l.112-.192a1.07 1.07 0 0 0 .153-.518l-1.304.023s-1.258-.005-1.388.01Z\"/><path fill=\"#771BFF\" d=\"m2.848 9.044.76-1.39.184-.352c-.124-.067-.245-.14-.367-.21-.346-.204-.706-.384-1.045-.6a.984.984 0 0 1-.244-.207c-.108-.134-.136-.294-.144-.46-.021-.409-.002-.818-.009-1.227-.003-.195 0-.39.003-.585.004-.322.153-.553.427-.713l.833-.488c.22-.13.44-.257.662-.385.05-.029.105-.052.158-.077.272-.128.519-.047.76.085l.044.028c.123.06.242.125.358.196.318.178.635.357.952.537.095.056.187.117.275.184.194.144.254.35.266.578.016.284.007.569.006.853-.001.28.004.558 0 .838.592-.003 1.259 0 1.259 0l.723-.013c-.003-.292-.007-.584-.007-.876 0-.524.015-1.048-.016-1.571-.024-.42-.135-.8-.492-1.067a5.02 5.02 0 0 0-.506-.339A400.52 400.52 0 0 0 5.94.787C5.722.664 5.513.524 5.282.423 5.255.406 5.228.388 5.2.373 4.758.126 4.305-.026 3.807.21c-.097.046-.197.087-.29.14A699.896 699.896 0 0 0 .783 1.948c-.501.294-.773.717-.778 1.31-.004.36-.009.718-.001 1.077.016.754-.017 1.508.024 2.261.016.304.07.6.269.848.127.15.279.28.448.382.622.4 1.283.734 1.92 1.11l.183.109Z\"/></svg>\n";
12072
-
12073
12112
  const DEFAULT_LABEL = 'Powered by';
12074
12113
  /**
12075
12114
  * A helper that enables the "powered by" feature in the editor and renders a link to the project's
@@ -12136,7 +12175,7 @@ const DEFAULT_LABEL = 'Powered by';
12136
12175
  const iconView = new IconView();
12137
12176
  const bind = this.bindTemplate;
12138
12177
  iconView.set({
12139
- content: poweredByIcon,
12178
+ content: IconProjectLogo,
12140
12179
  isColorInherited: false
12141
12180
  });
12142
12181
  this.setTemplate({
@@ -12616,7 +12655,7 @@ const NESTED_PANEL_HORIZONTAL_OFFSET = 5;
12616
12655
  * This is analogous to the {@link module:ui/dropdown/dropdownview~DropdownView}.
12617
12656
  */ openAndFocusPanelOnArrowDownKey (menuView) {
12618
12657
  menuView.keystrokes.set('arrowdown', (data, cancel)=>{
12619
- if (menuView.focusTracker.focusedElement === menuView.buttonView.element) {
12658
+ if (menuView.isEnabled && menuView.focusTracker.focusedElement === menuView.buttonView.element) {
12620
12659
  if (!menuView.isOpen) {
12621
12660
  menuView.isOpen = true;
12622
12661
  }
@@ -12928,6 +12967,12 @@ const NESTED_PANEL_HORIZONTAL_OFFSET = 5;
12928
12967
  * ]
12929
12968
  * },
12930
12969
  * {
12970
+ * groupId: 'fullscreen',
12971
+ * items: [
12972
+ * 'menuBar:fullscreen'
12973
+ * ]
12974
+ * },
12975
+ * {
12931
12976
  * groupId: 'restrictedEditingException',
12932
12977
  * items: [
12933
12978
  * 'menuBar:restrictedEditingException'
@@ -13191,6 +13236,12 @@ const DefaultMenuBarItems = [
13191
13236
  'menuBar:previewMergeFields'
13192
13237
  ]
13193
13238
  },
13239
+ {
13240
+ groupId: 'fullscreen',
13241
+ items: [
13242
+ 'menuBar:fullscreen'
13243
+ ]
13244
+ },
13194
13245
  {
13195
13246
  groupId: 'restrictedEditing',
13196
13247
  items: [
@@ -13209,7 +13260,8 @@ const DefaultMenuBarItems = [
13209
13260
  'menuBar:insertImage',
13210
13261
  'menuBar:ckbox',
13211
13262
  'menuBar:ckfinder',
13212
- 'menuBar:insertTable'
13263
+ 'menuBar:insertTable',
13264
+ 'menuBar:insertTableLayout'
13213
13265
  ]
13214
13266
  },
13215
13267
  {
@@ -14065,7 +14117,7 @@ function isMenuDefinition(definition) {
14065
14117
  }
14066
14118
  /**
14067
14119
  * Initializes menu bar.
14068
- */ _initMenuBar(menuBarView) {
14120
+ */ initMenuBar(menuBarView) {
14069
14121
  const menuBarViewElement = menuBarView.element;
14070
14122
  this.focusTracker.add(menuBarViewElement);
14071
14123
  this.editor.keystrokes.listenTo(menuBarViewElement);
@@ -14307,7 +14359,7 @@ function isMenuDefinition(definition) {
14307
14359
  }
14308
14360
  // Prioritize contextual toolbars. They are displayed at the selection.
14309
14361
  if (options.isContextual) {
14310
- weight--;
14362
+ weight -= 2;
14311
14363
  }
14312
14364
  return weight;
14313
14365
  }
@@ -14320,8 +14372,20 @@ function isMenuDefinition(definition) {
14320
14372
  * structure of the editor, like panels, icons etc.
14321
14373
  */ body;
14322
14374
  /**
14323
- * Menu bar view instance. May not be initialized in some editor types.
14375
+ * Menu bar view instance. Initialized by default in:
14376
+ *
14377
+ * * balloon editor;
14378
+ * * decoupled editor;
14379
+ * * multiroot editor.
14324
14380
  */ menuBarView;
14381
+ /**
14382
+ * Toolbar view instance. Initialized by default in:
14383
+ *
14384
+ * * classic editor;
14385
+ * * decoupled editor;
14386
+ * * inline editor;
14387
+ * * multiroot editor.
14388
+ */ toolbar;
14325
14389
  /**
14326
14390
  * Creates an instance of the editor UI view class.
14327
14391
  *
@@ -14595,6 +14659,50 @@ function isMenuDefinition(definition) {
14595
14659
  }
14596
14660
  }
14597
14661
 
14662
+ /**
14663
+ * The class representing a single row in a form,
14664
+ */ class FormRowView extends View {
14665
+ /**
14666
+ * A collection of row items (buttons, dropdowns, etc.).
14667
+ */ children;
14668
+ /**
14669
+ * Creates an instance of the form row class.
14670
+ *
14671
+ * @param locale The locale instance.
14672
+ * @param options.labelView When passed, the row gets the `group` and `aria-labelledby`
14673
+ * DOM attributes and gets described by the label.
14674
+ */ constructor(locale, options = {}){
14675
+ super(locale);
14676
+ const bind = this.bindTemplate;
14677
+ this.set('class', [
14678
+ 'ck',
14679
+ 'ck-form__row',
14680
+ ...toArray(options.class || [])
14681
+ ]);
14682
+ this.children = this.createCollection();
14683
+ if (options.children) {
14684
+ options.children.forEach((child)=>this.children.add(child));
14685
+ }
14686
+ this.set('_role', null);
14687
+ this.set('_ariaLabelledBy', null);
14688
+ if (options.labelView) {
14689
+ this.set({
14690
+ _role: 'group',
14691
+ _ariaLabelledBy: options.labelView.id
14692
+ });
14693
+ }
14694
+ this.setTemplate({
14695
+ tag: 'div',
14696
+ attributes: {
14697
+ class: bind.to('class', (classes)=>classes.join(' ')),
14698
+ role: bind.to('_role'),
14699
+ 'aria-labelledby': bind.to('_ariaLabelledBy')
14700
+ },
14701
+ children: this.children
14702
+ });
14703
+ }
14704
+ }
14705
+
14598
14706
  /**
14599
14707
  * The iframe view class.
14600
14708
  *
@@ -15287,8 +15395,8 @@ const toPx$4 = /* #__PURE__ */ toUnit('px');
15287
15395
  const bind = this.bindTemplate;
15288
15396
  this.set('isNavigationVisible', true);
15289
15397
  this.focusTracker = new FocusTracker();
15290
- this.buttonPrevView = this._createButtonView(t('Previous'), icons.previousArrow);
15291
- this.buttonNextView = this._createButtonView(t('Next'), icons.nextArrow);
15398
+ this.buttonPrevView = this._createButtonView(t('Previous'), IconPreviousArrow);
15399
+ this.buttonNextView = this._createButtonView(t('Next'), IconNextArrow);
15292
15400
  this.content = this.createCollection();
15293
15401
  this.setTemplate({
15294
15402
  tag: 'div',
@@ -15706,7 +15814,7 @@ const toPx$3 = /* #__PURE__ */ toUnit('px');
15706
15814
  this._viewConfig = viewConfig;
15707
15815
  if (this._viewConfig.showIcon) {
15708
15816
  this.iconView = new IconView();
15709
- this.iconView.content = icons.loupe;
15817
+ this.iconView.content = IconLoupe;
15710
15818
  this.fieldWrapperChildren.add(this.iconView, 0);
15711
15819
  this.extendTemplate({
15712
15820
  attributes: {
@@ -15718,7 +15826,7 @@ const toPx$3 = /* #__PURE__ */ toUnit('px');
15718
15826
  this.resetButtonView = new ButtonView(locale);
15719
15827
  this.resetButtonView.set({
15720
15828
  label: t('Clear'),
15721
- icon: icons.cancel,
15829
+ icon: IconCancel,
15722
15830
  class: 'ck-search__reset',
15723
15831
  isVisible: false,
15724
15832
  tooltip: true
@@ -16051,7 +16159,7 @@ const toPx$3 = /* #__PURE__ */ toUnit('px');
16051
16159
  const defaultTextConfig = this._config.infoView && this._config.infoView.text;
16052
16160
  let primaryText, secondaryText;
16053
16161
  if (data.totalItemsCount) {
16054
- if (defaultTextConfig && defaultTextConfig.notFound) {
16162
+ if (defaultTextConfig?.notFound) {
16055
16163
  primaryText = defaultTextConfig.notFound.primary;
16056
16164
  secondaryText = defaultTextConfig.notFound.secondary;
16057
16165
  } else {
@@ -16059,7 +16167,7 @@ const toPx$3 = /* #__PURE__ */ toUnit('px');
16059
16167
  secondaryText = '';
16060
16168
  }
16061
16169
  } else {
16062
- if (defaultTextConfig && defaultTextConfig.noSearchableItems) {
16170
+ if (defaultTextConfig?.noSearchableItems) {
16063
16171
  primaryText = defaultTextConfig.noSearchableItems.primary;
16064
16172
  secondaryText = defaultTextConfig.noSearchableItems.secondary;
16065
16173
  } else {
@@ -16427,7 +16535,7 @@ const toPx$2 = /* #__PURE__ */ toUnit('px');
16427
16535
  * The contextual balloon plugin instance.
16428
16536
  */ _balloon;
16429
16537
  /**
16430
- * Fires `_selectionChangeDebounced` event using `lodash#debounce`.
16538
+ * Fires `_selectionChangeDebounced` event using `es-toolkit#debounce`.
16431
16539
  *
16432
16540
  * This event is an internal plugin event which is fired 200 ms after model selection last change.
16433
16541
  * This is to makes easy test debounced action without need to use `setTimeout`.
@@ -17257,7 +17365,7 @@ const toPx = /* #__PURE__ */ toUnit('px');
17257
17365
  * Creates the {@link #arrowView} instance.
17258
17366
  */ _createArrowView() {
17259
17367
  const arrowView = new IconView();
17260
- arrowView.content = dropdownArrowIcon;
17368
+ arrowView.content = IconDropdownArrow;
17261
17369
  arrowView.extendTemplate({
17262
17370
  attributes: {
17263
17371
  class: 'ck-menu-bar__menu__button__arrow'
@@ -17681,6 +17789,20 @@ const EVENT_NAME_DELEGATES = [
17681
17789
  topLevelCategoryMenuView.isOpen = false;
17682
17790
  }
17683
17791
  }
17792
+ /**
17793
+ * Disables all menus in the bar.
17794
+ */ disable() {
17795
+ for (const topLevelCategoryMenuView of this.children){
17796
+ topLevelCategoryMenuView.isEnabled = false;
17797
+ }
17798
+ }
17799
+ /**
17800
+ * Enables all menus in the bar.
17801
+ */ enable() {
17802
+ for (const topLevelCategoryMenuView of this.children){
17803
+ topLevelCategoryMenuView.isEnabled = true;
17804
+ }
17805
+ }
17684
17806
  /**
17685
17807
  * Registers a menu view in the menu bar. Every {@link module:ui/menubar/menubarmenuview~MenuBarMenuView} instance must be registered
17686
17808
  * in the menu bar to be properly managed.
@@ -17821,5 +17943,5 @@ const EVENT_NAME_DELEGATES = [
17821
17943
  }
17822
17944
  }
17823
17945
 
17824
- export { AccessibilityHelp, AutocompleteView, BalloonPanelView, BalloonToolbar, BlockToolbar, BodyCollection, BoxedEditorUIView, ButtonLabelView, ButtonLabelWithHighlightView, ButtonView, CollapsibleView, ColorGridView, ColorPickerView, ColorSelectorView, ColorTileView, ComponentFactory, ContextualBalloon, CssTransitionDisablerMixin, DefaultMenuBarItems, Dialog, DialogView, DialogViewPosition, DocumentColorCollection, DropdownButtonView, DropdownMenuListItemButtonView, DropdownMenuListItemView, DropdownMenuListView, DropdownMenuNestedMenuView, DropdownMenuPanelPositioningFunctions, DropdownMenuRootListView, DropdownPanelView, DropdownView, EditorUI, EditorUIView, FileDialogButtonView, FileDialogListItemButtonView, FocusCycler, FormHeaderView, HighlightedTextView, IconView, IframeView, InlineEditableUIView, InputNumberView, InputTextView, InputView, LabelView, LabelWithHighlightView, LabeledFieldView, ListItemButtonView, ListItemGroupView, ListItemView, ListSeparatorView, ListView, MenuBarMenuListItemButtonView, MenuBarMenuListItemFileDialogButtonView, MenuBarMenuListItemView, MenuBarMenuListView, MenuBarMenuView, MenuBarView, Notification, SearchInfoView, SearchTextView, SpinnerView, SplitButtonView, StickyPanelView, SwitchButtonView, Template, TextareaView, ToolbarLineBreakView, ToolbarSeparatorView, ToolbarView, TooltipManager, View, ViewCollection, Model as ViewModel, addKeyboardHandlingForGrid, addListToDropdown, addMenuToDropdown, addToolbarToDropdown, clickOutsideHandler, createDropdown, createLabeledDropdown, createLabeledInputNumber, createLabeledInputText, createLabeledTextarea, filterGroupAndItemNames, focusChildOnDropdownOpen, getLocalizedColorOptions, injectCssTransitionDisabler, isFocusable, isViewWithFocusCycler, normalizeColorOptions, normalizeMenuBarConfig, normalizeSingleColorDefinition, normalizeToolbarConfig, submitHandler };
17946
+ export { AccessibilityHelp, AutocompleteView, BalloonPanelView, BalloonToolbar, BlockToolbar, BodyCollection, BoxedEditorUIView, ButtonLabelView, ButtonLabelWithHighlightView, ButtonView, CollapsibleView, ColorGridView, ColorPickerView, ColorSelectorView, ColorTileView, ComponentFactory, ContextualBalloon, CssTransitionDisablerMixin, DefaultMenuBarItems, Dialog, DialogView, DialogViewPosition, DocumentColorCollection, DropdownButtonView, DropdownMenuListItemButtonView, DropdownMenuListItemView, DropdownMenuListView, DropdownMenuNestedMenuView, DropdownMenuPanelPositioningFunctions, DropdownMenuRootListView, DropdownPanelView, DropdownView, EditorUI, EditorUIView, FileDialogButtonView, FileDialogListItemButtonView, FocusCycler, FormHeaderView, FormRowView, HighlightedTextView, IconView, IframeView, InlineEditableUIView, InputNumberView, InputTextView, InputView, LabelView, LabelWithHighlightView, LabeledFieldView, ListItemButtonView, ListItemGroupView, ListItemView, ListSeparatorView, ListView, MenuBarMenuListItemButtonView, MenuBarMenuListItemFileDialogButtonView, MenuBarMenuListItemView, MenuBarMenuListView, MenuBarMenuView, MenuBarView, Notification, SearchInfoView, SearchTextView, SpinnerView, SplitButtonView, StickyPanelView, SwitchButtonView, Template, TextareaView, ToolbarLineBreakView, ToolbarSeparatorView, ToolbarView, TooltipManager, View, ViewCollection, Model as ViewModel, addKeyboardHandlingForGrid, addListToDropdown, addMenuToDropdown, addToolbarToDropdown, clickOutsideHandler, createDropdown, createLabeledDropdown, createLabeledInputNumber, createLabeledInputText, createLabeledTextarea, filterGroupAndItemNames, focusChildOnDropdownOpen, getLocalizedColorOptions, injectCssTransitionDisabler, isFocusable, isViewWithFocusCycler, normalizeColorOptions, normalizeMenuBarConfig, normalizeSingleColorDefinition, normalizeToolbarConfig, submitHandler };
17825
17947
  //# sourceMappingURL=index.js.map