@worktile/theia 17.2.2 → 17.3.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.
Files changed (63) hide show
  1. package/components/column-resize/column-resize.directive.d.ts +5 -3
  2. package/components/column-resize/column-resize.scss +0 -7
  3. package/components/column-resize/overlay-handle.component.d.ts +4 -6
  4. package/components/column-resize/resizing.store.d.ts +0 -8
  5. package/components/inline-toolbar/inline-toolbar.component.d.ts +1 -1
  6. package/components/toolbar/toolbar.component.d.ts +0 -1
  7. package/constants/node-types.d.ts +0 -1
  8. package/core/utils/plugin-menu.d.ts +8 -0
  9. package/editor.component.d.ts +1 -1
  10. package/esm2022/components/column-resize/column-resize.directive.mjs +28 -9
  11. package/esm2022/components/column-resize/overlay-handle.component.mjs +12 -16
  12. package/esm2022/components/column-resize/resizing.store.mjs +3 -66
  13. package/esm2022/components/inline-toolbar/inline-toolbar.component.mjs +13 -22
  14. package/esm2022/components/plugin-menu/plugin-menu.component.mjs +6 -5
  15. package/esm2022/components/toolbar/toolbar.component.mjs +2 -7
  16. package/esm2022/constants/default.mjs +2 -2
  17. package/esm2022/constants/node-types.mjs +1 -2
  18. package/esm2022/core/utils/plugin-menu.mjs +34 -1
  19. package/esm2022/editor.component.mjs +13 -5
  20. package/esm2022/interfaces/plugins/plugin-menu.mjs +2 -2
  21. package/esm2022/interfaces/plugins/plugins.mjs +1 -1
  22. package/esm2022/plugins/common/block-card.plugin.mjs +12 -2
  23. package/esm2022/plugins/image/image.component.mjs +2 -2
  24. package/esm2022/plugins/image/image.editor.mjs +2 -3
  25. package/esm2022/plugins/image/image.plugin.mjs +2 -2
  26. package/esm2022/plugins/inline-code/inline-code.plugin.mjs +3 -2
  27. package/esm2022/plugins/link/link.plugin.mjs +4 -3
  28. package/esm2022/plugins/quick-insert/quick-insert.editor.mjs +4 -2
  29. package/esm2022/plugins/table/components/insert-mark/insert-mark.component.mjs +41 -17
  30. package/esm2022/plugins/table/components/row/row.component.mjs +2 -2
  31. package/esm2022/plugins/table/components/table.component.mjs +22 -26
  32. package/esm2022/plugins/table/components/td/td.component.mjs +47 -125
  33. package/esm2022/plugins/table/table.editor.mjs +2 -2
  34. package/esm2022/plugins/table/table.types.mjs +1 -1
  35. package/esm2022/plugins/table/utils/get-grid-columns.mjs +2 -2
  36. package/esm2022/plugins/table/utils/table-viewport.mjs +41 -0
  37. package/esm2022/plugins/vertical-align/toolbar-item.component.mjs +3 -5
  38. package/esm2022/queries/anchor-block-entry.mjs +3 -3
  39. package/esm2022/queries/anchor-block.mjs +3 -3
  40. package/esm2022/queries/get-block-card-cursor.mjs +6 -2
  41. package/esm2022/queries/is-block-card-cursor.mjs +7 -2
  42. package/esm2022/utils/index.mjs +2 -2
  43. package/esm2022/utils/scrolling.mjs +43 -0
  44. package/fesm2022/worktile-theia.mjs +294 -314
  45. package/fesm2022/worktile-theia.mjs.map +1 -1
  46. package/interfaces/editor.d.ts +2 -2
  47. package/interfaces/plugins/plugins.d.ts +2 -1
  48. package/package.json +1 -1
  49. package/plugins/table/components/insert-mark/insert-mark.component.d.ts +12 -4
  50. package/plugins/table/components/table.component.d.ts +1 -2
  51. package/plugins/table/components/table.component.scss +4 -18
  52. package/plugins/table/components/td/td.component.d.ts +9 -10
  53. package/plugins/table/table.types.d.ts +2 -2
  54. package/plugins/table/utils/table-viewport.d.ts +8 -0
  55. package/plugins/vertical-align/toolbar-item.component.d.ts +2 -3
  56. package/queries/anchor-block-entry.d.ts +2 -2
  57. package/queries/anchor-block.d.ts +2 -2
  58. package/queries/get-block-card-cursor.d.ts +2 -2
  59. package/queries/is-block-card-cursor.d.ts +2 -2
  60. package/styles/editor.scss +7 -0
  61. package/utils/index.d.ts +1 -1
  62. package/utils/{scroll-into-view.d.ts → scrolling.d.ts} +1 -0
  63. package/esm2022/utils/scroll-into-view.mjs +0 -38
@@ -2,13 +2,13 @@ import { NgIf, NgFor, NgStyle, NgTemplateOutlet, NgClass, DOCUMENT } from '@angu
2
2
  import * as i0 from '@angular/core';
3
3
  import { InjectionToken, Component, Directive, Input, HostBinding, ViewChild, HostListener, ViewContainerRef, Inject, TemplateRef, ChangeDetectionStrategy, Optional, SkipSelf, ContentChildren, forwardRef, EventEmitter, Output, Pipe, Injectable, ElementRef, ChangeDetectorRef, ViewChildren, NgModule } from '@angular/core';
4
4
  import { ThyDivider } from 'ngx-tethys/divider';
5
- import { Editor, Element, Span, Range, Path, Node, Point, Text, Transforms, Operation, createEditor } from 'slate';
6
5
  import { ThyAction, ThyActions } from 'ngx-tethys/action';
7
6
  import { ThyDropdownMenuItemDirective, ThyDropdownMenuDivider, ThyDropdownMenuItemNameDirective, ThyDropdownMenuItemIconDirective, ThyDropdownMenuItemActiveDirective, ThyDropdownDirective, ThyDropdownMenuComponent, ThyDropdownMenuGroup, ThyDropdownMenuItemExtendIconDirective } from 'ngx-tethys/dropdown';
8
7
  import * as i2$2 from 'ngx-tethys/icon';
9
8
  import { ThyIcon, ThyIconRegistry } from 'ngx-tethys/icon';
10
9
  import { cloneDeep, map, assign, defaults, groupBy, uniq, isEqual } from 'lodash';
11
10
  export { assign, cloneDeep, debounce, defaults, groupBy, isEqual, map, uniq } from 'lodash';
11
+ import { Editor, Element, Span, Range, Path, Node, Point, Text, Transforms, Operation, createEditor } from 'slate';
12
12
  import * as i4 from 'slate-angular';
13
13
  import { NODE_TO_PARENT, NODE_TO_INDEX, AngularEditor, hotkeys, IS_SAFARI, BaseElementComponent, ELEMENT_TO_COMPONENT, BaseTextComponent, SlateLeaves, SlateModule, hasBlockCard, isCardLeft, FAKE_RIGHT_BLOCK_CARD_OFFSET, SlateChildrenOutlet, SlateChildren, getPlainText as getPlainText$1, EDITOR_TO_ELEMENT, defaultScrollSelectionIntoView, withAngular } from 'slate-angular';
14
14
  import { HistoryEditor, withHistory } from 'slate-history';
@@ -25,7 +25,8 @@ import { debounceTime, takeUntil, startWith, distinctUntilChanged, skip, map as
25
25
  import * as i2$1 from '@angular/forms';
26
26
  import { FormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';
27
27
  import { ScrollToService } from 'ngx-tethys/core';
28
- import { ThyEmpty } from 'ngx-tethys/empty';
28
+ import * as i3 from 'ngx-tethys/empty';
29
+ import { ThyEmptyModule } from 'ngx-tethys/empty';
29
30
  import { ThyInputSearch, ThyInputDirective } from 'ngx-tethys/input';
30
31
  import { isKeyHotkey } from 'is-hotkey';
31
32
  import isUrl from 'is-url';
@@ -34,8 +35,8 @@ import { marked } from 'marked';
34
35
  import { ThyColorPickerDirective } from 'ngx-tethys/color-picker';
35
36
  import { ThyInputNumber } from 'ngx-tethys/input-number';
36
37
  import { ThyEnterDirective, ThyStopPropagationDirective, ThyAutofocusDirective } from 'ngx-tethys/shared';
37
- import { coerceCssPixelValue } from '@angular/cdk/coercion';
38
38
  import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
39
+ import { coerceCssPixelValue } from '@angular/cdk/coercion';
39
40
  import * as i1$2 from 'ngx-tethys/image';
40
41
  import { ThyImageService, ThyImageDirective, ThyImageGroup } from 'ngx-tethys/image';
41
42
  import * as i6 from 'ng-codemirror';
@@ -51,7 +52,7 @@ import { PortalInjector, ComponentPortal } from '@angular/cdk/portal';
51
52
  import * as i1$3 from '@angular/platform-browser';
52
53
  import * as i2$3 from '@angular/common/http';
53
54
 
54
- const PICTURE_ACCEPTED_UPLOAD_MIME = ['image/png', 'image/jpeg', 'image/gif', 'image/bmp'];
55
+ const PICTURE_ACCEPTED_UPLOAD_MIME = ['image/png', 'image/jpeg', 'image/gif', 'image/bmp', 'image/svg+xml'];
55
56
  const PICTURE_ACCEPTED_UPLOAD_SIZE = 50;
56
57
  const A_TAG_REL_ATTR = 'noopener noreferrer nofollow external ugc';
57
58
  const LINK_DEFAULT_TEXT = '链接';
@@ -183,7 +184,6 @@ const MarkProps = [
183
184
  MarkTypes.underline,
184
185
  MarkTypes.fontSize
185
186
  ];
186
- const THE_INLINE_TOOLBAR_TYPES = [ElementKinds.default, ElementKinds.listItem, ElementKinds.checkItem];
187
187
  const STANDARD_HEADING_TYPES = [
188
188
  ElementKinds.heading_1,
189
189
  ElementKinds.heading_2,
@@ -674,17 +674,25 @@ const createPluginFactory = (defaultPlugin) => (override, overrideByKey = {}) =>
674
674
  return cloneDeep(defaultPlugin);
675
675
  };
676
676
 
677
- const getBlockCardCenterCursor = (editor) => {
677
+ const getBlockCardCenterCursor = (editor, at) => {
678
+ if (at) {
679
+ const point = Editor.point(editor, at);
680
+ return Editor.start(editor, point.path);
681
+ }
678
682
  return Editor.start(editor, editor.selection.anchor.path);
679
683
  };
680
684
 
681
- const isBlockCardCursor = (editor) => {
685
+ const isBlockCardCursor = (editor, at) => {
686
+ if (at) {
687
+ const point = at && Editor.point(editor, at);
688
+ return point.offset < 0;
689
+ }
682
690
  return editor.selection.anchor.offset < 0;
683
691
  };
684
692
 
685
693
  const anchorBlockEntry = (editor, at) => {
686
- if (!at && isBlockCardCursor(editor)) {
687
- at = getBlockCardCenterCursor(editor);
694
+ if (isBlockCardCursor(editor, at)) {
695
+ at = getBlockCardCenterCursor(editor, at);
688
696
  }
689
697
  return Editor.above(editor, {
690
698
  match: n => Element.isElement(n) && Editor.isBlock(editor, n),
@@ -692,8 +700,8 @@ const anchorBlockEntry = (editor, at) => {
692
700
  });
693
701
  };
694
702
 
695
- const anchorBlock = (editor) => {
696
- const entry = anchorBlockEntry(editor, editor.selection.anchor);
703
+ const anchorBlock = (editor, at) => {
704
+ const entry = anchorBlockEntry(editor, at);
697
705
  return entry ? entry[0] : null;
698
706
  };
699
707
 
@@ -1841,7 +1849,7 @@ const ThePluginMenu = {
1841
1849
  }
1842
1850
  },
1843
1851
  isMenuItem(value) {
1844
- if (value.key) {
1852
+ if (value?.key) {
1845
1853
  return true;
1846
1854
  }
1847
1855
  else {
@@ -2250,6 +2258,11 @@ const scrollIntoView = (editor, scrollContainer) => {
2250
2258
  }
2251
2259
  previousHeight = currentHeight;
2252
2260
  };
2261
+ const getEditorScrollContainer = (editor, scrollContainerSelector) => {
2262
+ const selector = scrollContainerSelector || editor.options.scrollContainer || DEFAULT_SCROLL_CONTAINER;
2263
+ const editable = AngularEditor.toDOMNode(editor, editor);
2264
+ return editable.closest(selector);
2265
+ };
2253
2266
 
2254
2267
  const topLeftPosition = {
2255
2268
  originX: 'start',
@@ -2616,6 +2629,37 @@ const buildPluginMenuItemMap = (editor) => {
2616
2629
  });
2617
2630
  return map;
2618
2631
  };
2632
+ /**
2633
+ * 构建当前位置允许插入的元素菜单
2634
+ * @param editor 编辑器对象
2635
+ * @param menus 插入菜单
2636
+ * @returns 返回允许插入的元素菜单
2637
+ */
2638
+ const buildQuickInsertMenus = (editor, menus) => {
2639
+ const [_, path] = getBlockAbove(editor);
2640
+ const [parentNode] = getParent(editor, path);
2641
+ const isContainerNode = isContainer(editor, parentNode);
2642
+ const menuItemsMap = buildPluginMenuItemMap(editor);
2643
+ const pluginMenu = buildPluginMenu(menuItemsMap, menus);
2644
+ const quickMenuConfig = [];
2645
+ pluginMenu.forEach((item) => {
2646
+ const allowParentTypes = getPluginOptions(editor, item.key)?.allowParentTypes || [];
2647
+ const isInlineElement = getPluginOptions(editor, item.key)?.isInline || false;
2648
+ const isAllowParent = isContainerNode ? allowParentTypes.includes(parentNode?.type) : true;
2649
+ if (!item?.type) {
2650
+ quickMenuConfig.push(item);
2651
+ }
2652
+ else if (isInlineElement || isAllowParent) {
2653
+ const menu = menus.find(menu => menu === item.key);
2654
+ quickMenuConfig.push(menu);
2655
+ }
2656
+ });
2657
+ const lastMenu = quickMenuConfig[quickMenuConfig.length - 1];
2658
+ if (ThePluginMenu.isMenuGroup(lastMenu)) {
2659
+ quickMenuConfig.pop();
2660
+ }
2661
+ return quickMenuConfig;
2662
+ };
2619
2663
 
2620
2664
  const withTheia = (editor, plugins = []) => {
2621
2665
  let e = editor;
@@ -2887,10 +2931,6 @@ class TheToolbarComponent {
2887
2931
  });
2888
2932
  this.resizeObserver.observe(editableElement);
2889
2933
  }
2890
- isTableActive() {
2891
- const [table] = Editor.nodes(this.editor, { match: n => Element.isElement(n) && n.type === ElementKinds.table });
2892
- return !!table;
2893
- }
2894
2934
  selectionChange(editor) {
2895
2935
  if (this.isMore) {
2896
2936
  this.renderToolbarView();
@@ -4589,7 +4629,7 @@ const getColumnsWidth = (cellRow) => {
4589
4629
  */
4590
4630
  const calcPrintColumnWidth = (element) => {
4591
4631
  const opts = new TableOptions();
4592
- const columns = element?.columns;
4632
+ const columns = element?.columns ?? [];
4593
4633
  const numberedColumnWidth = element?.options?.numberedColumn ? TABLE_NUMBER_COLUMN : 0;
4594
4634
  // 按照 DPI 96 的 A4 纸宽度是 794, 打印时左右 80px 的边距,所以这里取 794 - 80 * 2 = 634
4595
4635
  // 如果存在序号列,还需要在 634 基础上减去序号列的宽度,剩下的才是内容区域的宽度
@@ -5349,7 +5389,7 @@ const TableEditor = {
5349
5389
  },
5350
5390
  clearCellsContent(editor, cells) {
5351
5391
  if (!cells) {
5352
- cells = editor.selections ? TableEditor.getSelectedCells(editor) || [] : [];
5392
+ cells = editor.selection ? TableEditor.getSelectedCells(editor) || [] : [];
5353
5393
  }
5354
5394
  if (cells.length > 0) {
5355
5395
  const tablePosition = createTablePosition(editor);
@@ -5888,13 +5928,12 @@ const ImageEditor = {
5888
5928
  insertImages(editor, imageFiles) {
5889
5929
  const contextService = editor.injector.get(TheContextService);
5890
5930
  const imageNodes = [];
5891
- const text = { text: '' };
5892
5931
  for (const image of imageFiles) {
5893
5932
  const verify = ImageEditor.verifyImage(editor, image);
5894
5933
  if (verify) {
5895
5934
  const url = URL.createObjectURL(image);
5896
5935
  contextService.addUploadingFiles({ url, file: image });
5897
- imageNodes.push({ type: ElementKinds.image, url, children: [text] });
5936
+ imageNodes.push({ type: ElementKinds.image, url, children: [{ text: '' }] });
5898
5937
  }
5899
5938
  }
5900
5939
  if (imageNodes.length > 0) {
@@ -6576,10 +6615,11 @@ const QuickInsertEditor = {
6576
6615
  const overlay = editor.injector.get(Overlay);
6577
6616
  const viewContainerRef = editor.injector.get(ViewContainerRef);
6578
6617
  const thyPopover = editor.injector.get(ThyPopover);
6618
+ const pluginMenus = buildQuickInsertMenus(editor, editor?.options?.menu);
6579
6619
  const pluginMenuRef = thyPopover.open(ThePluginMenuComponent, {
6580
6620
  initialState: {
6581
6621
  editor,
6582
- thePluginMenu: editor?.options?.menu
6622
+ thePluginMenu: pluginMenus
6583
6623
  },
6584
6624
  origin,
6585
6625
  viewContainerRef: viewContainerRef,
@@ -6669,7 +6709,6 @@ class TheVerticalToolbarItem extends TheBaseToolbarDropdown {
6669
6709
  this.thyPopover = thyPopover;
6670
6710
  this.viewContainerRef = viewContainerRef;
6671
6711
  }
6672
- ngOnInit() { }
6673
6712
  menusActive(editor) {
6674
6713
  return this.menus.find(i => {
6675
6714
  if (this.editor?.selection && i?.active) {
@@ -6710,13 +6749,12 @@ class TheVerticalToolbarItem extends TheBaseToolbarDropdown {
6710
6749
  }
6711
6750
  }
6712
6751
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: TheVerticalToolbarItem, deps: [{ token: i0.ElementRef }, { token: i1.ThyPopover }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component }); }
6713
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.0", type: TheVerticalToolbarItem, isStandalone: true, selector: "the-toolbar-vertical-align-item", host: { listeners: { "document: mousedown": "handleDocumentMouseDown($event)" }, properties: { "class.hide": "!active" }, classAttribute: "the-toolbar-dropdown-container verticalAlign" }, viewQueries: [{ propertyName: "template", first: true, predicate: ["VerticalAlignItems"], descendants: true, read: TemplateRef, static: true }], usesInheritance: true, ngImport: i0, template: "<a\n href=\"javascript:;\"\n class=\"icon-mode link-with-down\"\n thyAction\n [thyActionIcon]=\"activeMenuItem?.icon\"\n [thyActionActive]=\"isOpened\"\n [thyTooltip]=\"toolbarItem?.name\"\n thyTooltipPlacement=\"top\"\n (mousedown)=\"execute($event)\"\n>\n <thy-icon class=\"font-size-sm text-desc ml-1\" thyIconName=\"caret-down\"></thy-icon>\n</a>\n\n<ng-template #VerticalAlignItems>\n <div class=\"thy-dropdown-menu\">\n <ng-container *ngFor=\"let menu of toolbarItem?.includes\">\n <a\n href=\"javascript:;\"\n thyDropdownMenuItem\n [thyDropdownMenuItemActive]=\"menu.key === activeMenuItem?.key\"\n (mousedown)=\"itemMousedown($event, menu)\"\n >\n <thy-icon *ngIf=\"menu.icon\" thyDropdownMenuItemIcon [thyIconName]=\"menu?.icon\"></thy-icon>\n <span thyDropdownMenuItemName>{{ menu.name }}</span>\n </a>\n </ng-container>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ThyIcon, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { kind: "component", type: ThyAction, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }, { kind: "directive", type: ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { kind: "directive", type: ThyDropdownMenuItemDirective, selector: "[thyDropdownMenuItem]", inputs: ["thyType", "thyDisabled"] }, { kind: "directive", type: ThyDropdownMenuItemIconDirective, selector: "[thyDropdownMenuItemIcon]" }, { kind: "directive", type: ThyDropdownMenuItemNameDirective, selector: "[thyDropdownMenuItemName]" }, { kind: "directive", type: ThyDropdownMenuItemActiveDirective, selector: "[thyDropdownMenuItemActive]", inputs: ["thyDropdownMenuItemActive"] }] }); }
6752
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.0", type: TheVerticalToolbarItem, isStandalone: true, selector: "the-toolbar-vertical-align-item", host: { listeners: { "document: mousedown": "handleDocumentMouseDown($event)" }, classAttribute: "the-toolbar-dropdown-container verticalAlign" }, viewQueries: [{ propertyName: "template", first: true, predicate: ["VerticalAlignItems"], descendants: true, read: TemplateRef, static: true }], usesInheritance: true, ngImport: i0, template: "<a\n href=\"javascript:;\"\n class=\"icon-mode link-with-down\"\n thyAction\n [thyActionIcon]=\"activeMenuItem?.icon\"\n [thyActionActive]=\"isOpened\"\n [thyTooltip]=\"toolbarItem?.name\"\n thyTooltipPlacement=\"top\"\n (mousedown)=\"execute($event)\"\n>\n <thy-icon class=\"font-size-sm text-desc ml-1\" thyIconName=\"caret-down\"></thy-icon>\n</a>\n\n<ng-template #VerticalAlignItems>\n <div class=\"thy-dropdown-menu\">\n <ng-container *ngFor=\"let menu of toolbarItem?.includes\">\n <a\n href=\"javascript:;\"\n thyDropdownMenuItem\n [thyDropdownMenuItemActive]=\"menu.key === activeMenuItem?.key\"\n (mousedown)=\"itemMousedown($event, menu)\"\n >\n <thy-icon *ngIf=\"menu.icon\" thyDropdownMenuItemIcon [thyIconName]=\"menu?.icon\"></thy-icon>\n <span thyDropdownMenuItemName>{{ menu.name }}</span>\n </a>\n </ng-container>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ThyIcon, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { kind: "component", type: ThyAction, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }, { kind: "directive", type: ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { kind: "directive", type: ThyDropdownMenuItemDirective, selector: "[thyDropdownMenuItem]", inputs: ["thyType", "thyDisabled"] }, { kind: "directive", type: ThyDropdownMenuItemIconDirective, selector: "[thyDropdownMenuItemIcon]" }, { kind: "directive", type: ThyDropdownMenuItemNameDirective, selector: "[thyDropdownMenuItemName]" }, { kind: "directive", type: ThyDropdownMenuItemActiveDirective, selector: "[thyDropdownMenuItemActive]", inputs: ["thyDropdownMenuItemActive"] }] }); }
6714
6753
  }
6715
6754
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: TheVerticalToolbarItem, decorators: [{
6716
6755
  type: Component,
6717
6756
  args: [{ selector: 'the-toolbar-vertical-align-item', host: {
6718
- class: 'the-toolbar-dropdown-container verticalAlign',
6719
- '[class.hide]': '!active'
6757
+ class: 'the-toolbar-dropdown-container verticalAlign'
6720
6758
  }, standalone: true, imports: [
6721
6759
  NgFor,
6722
6760
  NgIf,
@@ -7028,7 +7066,7 @@ class ThePluginMenuComponent {
7028
7066
  return item?.key ?? index;
7029
7067
  }
7030
7068
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: ThePluginMenuComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: i1.ThyPopoverRef }], target: i0.ɵɵFactoryTarget.Component }); }
7031
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.0", type: ThePluginMenuComponent, isStandalone: true, selector: "the-plugin-menu", inputs: { editor: "editor", theDisplaySearch: "theDisplaySearch", thePluginMenu: "thePluginMenu", sceneKey: "sceneKey", subPanelClass: "subPanelClass", autoActiveFirstItem: "autoActiveFirstItem" }, host: { properties: { "class": "this.containerClassName" } }, viewQueries: [{ propertyName: "dropdownTriggers", predicate: ["dropdownTriggers"], descendants: true, read: ThyDropdownDirective }], ngImport: i0, template: "<div *ngIf=\"theDisplaySearch\" class=\"menu-search px-5 pt-5 pb-2\">\n <thy-input-search [(ngModel)]=\"keyWords\" placeholder=\"\u641C\u7D22\" thyIconPosition=\"after\" (ngModelChange)=\"updateKeywords(keyWords)\">\n </thy-input-search>\n</div>\n\n<div\n *ngIf=\"groupMenu.length > 0; else thyEmpty\"\n theListBox\n [keyboardContainer]=\"keyboardContainer\"\n [autoActiveFirstItem]=\"listBoxAutoActiveFirstItem\"\n (theListboxChange)=\"theListboxChange($event)\"\n class=\"thy-dropdown-menu the-plugin-menu-scroll-container pb-2 pt-0\"\n>\n <div *ngIf=\"iconMenu?.length > 0\" theListboxGroup [horizontalColumn]=\"6\" class=\"icon-menu d-flex pl-5 py-1\">\n <ng-container *ngFor=\"let item of iconMenu; trackBy: trackByFn\">\n <a\n *ngIf=\"item.type === ThePluginMenuItemType.icon\"\n href=\"javascript:;\"\n class=\"mt-2\"\n thyAction\n theListboxOption\n [theOptionValue]=\"item\"\n [thyActionIcon]=\"item.icon\"\n [thyTooltip]=\"item?.name\"\n [thyDisabled]=\"item.disabled\"\n [theOptionDisabled]=\"item.disabled\"\n thePreventDefault\n (click)=\"handleItemSelection(item)\"\n ></a>\n </ng-container>\n </div>\n\n <thy-divider *ngIf=\"this.iconMenu?.length\" class=\"my-2\"></thy-divider>\n <div theListboxGroup>\n <ng-container *ngFor=\"let item of groupMenu; trackBy: trackByFn\">\n <ng-container *ngIf=\"item.isMenuItem && !(item.children?.length > 0) && item.key !== 'table'\">\n <div\n thyDropdownMenuItem\n theListboxOption\n [theOptionValue]=\"item\"\n class=\"py-0\"\n thePreventDefault\n [thyDisabled]=\"item.disabled\"\n [theOptionDisabled]=\"item.disabled\"\n (click)=\"handleItemSelection(item)\"\n >\n <div *ngIf=\"item.menuIcon\" class=\"menu-icon mr-2\">\n <thy-icon [thyIconName]=\"item.menuIcon | getMenuIcon: sceneKey\"></thy-icon>\n </div>\n <div class=\"menu-content d-flex align-items-center\">\n <div class=\"menu-item-title w-100\">\n {{ item.name }}\n </div>\n </div>\n </div>\n </ng-container>\n <ng-container *ngIf=\"item.isMenuItem && item.children?.length > 0\" #hasExpanded>\n <div\n #dropdownTriggers\n [thyDropdown]=\"expand\"\n thyTrigger=\"hover\"\n thyDropdownMenuItem\n [thyDisabled]=\"item.disabled\"\n theListboxOption\n [theOptionValue]=\"item\"\n [theOptionDisabled]=\"item.disabled\"\n [thyPopoverOptions]=\"expandPopoverOptions\"\n class=\"py-0\"\n thePreventDefault\n [thyPanelClass]=\"subPanelClass\"\n (click)=\"handleItemSelection(item)\"\n >\n <div *ngIf=\"item.menuIcon\" class=\"menu-icon mr-2\">\n <thy-icon [thyIconName]=\"item.menuIcon | getMenuIcon: sceneKey\"></thy-icon>\n </div>\n <div class=\"menu-content d-flex align-items-center\">\n <div class=\"menu-item-title w-100\">\n {{ item.name }}\n </div>\n </div>\n <div *ngIf=\"item.children?.length > 0\">\n <thy-icon class=\"text-muted\" thyIconName=\"angle-right\"></thy-icon>\n </div>\n <thy-dropdown-menu #expand>\n <div class=\"the-plugin-menu-container expand-menu\" theListboxGroup>\n <ng-container *ngFor=\"let child of item.children\">\n <div\n *ngIf=\"child.type === ThePluginMenuItemType.group\"\n thyDropdownMenuItem\n theListboxOption\n class=\"py-0\"\n thePreventDefault\n [theOptionDisabled]=\"item.disabled\"\n [thyDisabled]=\"child.disabled\"\n (click)=\"handleItemSelection(child)\"\n [theOptionValue]=\"child\"\n >\n <div *ngIf=\"child.menuIcon\" class=\"menu-icon mr-2\">\n <thy-icon [thyIconName]=\"child.menuIcon | getMenuIcon: sceneKey\"></thy-icon>\n </div>\n <div class=\"menu-content d-flex align-items-center\">\n <div class=\"menu-item-title w-100\">\n {{ child.name }}\n </div>\n </div>\n </div>\n <thy-divider *ngIf=\"child === 'divider'\" class=\"my-2\"></thy-divider>\n </ng-container>\n </div>\n </thy-dropdown-menu>\n </div>\n </ng-container>\n <ng-container *ngIf=\"item.isMenuItem && item.key === 'table'\">\n <div\n #dropdownTriggers\n [thyPopover]=\"tableSelect\"\n thyPlacement=\"rightTop\"\n thyTrigger=\"hover\"\n thyDropdownMenuItem\n theListboxOption\n [thyConfig]=\"tableSelectPopoverConfig\"\n [theOptionValue]=\"item\"\n [theOptionDisabled]=\"item.disabled\"\n [thyDisabled]=\"item.disabled\"\n class=\"py-0\"\n thePreventDefault\n (click)=\"handleItemSelection(item)\"\n >\n <div class=\"menu-icon mr-2\">\n <thy-icon [thyIconName]=\"item.menuIcon | getMenuIcon: sceneKey\"></thy-icon>\n </div>\n <div class=\"menu-content d-flex align-items-center\">\n <div class=\"menu-item-title w-100\">\n {{ item.name }}\n </div>\n </div>\n <div>\n <thy-icon class=\"text-muted\" thyIconName=\"angle-right\"></thy-icon>\n </div>\n\n <ng-template #tableSelect>\n <table-select\n class=\"plugin-menu-table the-table-selector-panel\"\n [editor]=\"editor\"\n [beforeInsert]=\"removeKeywords\"\n ></table-select>\n </ng-template>\n </div>\n </ng-container>\n <ng-container *ngIf=\"!item.isMenuItem\" #menuGroup>\n <thy-dropdown-menu-group class=\"font-size-sm\" [thyTitle]=\"item.groupName\"></thy-dropdown-menu-group>\n </ng-container>\n </ng-container>\n </div>\n</div>\n\n<ng-template #thyEmpty>\n <div class=\"empty d-flex align-items-center justify-content-center\">\n <thy-empty [thyMessage]=\"thyMessage\"></thy-empty>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: TheTableSelect, selector: "table-select", inputs: ["optionsParam", "editor", "beforeInsert"] }, { kind: "component", type: ThyIcon, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { kind: "component", type: ThyEmpty, selector: "thy-empty", inputs: ["thyMessage", "thyTranslationKey", "thyTranslationValues", "thyEntityName", "thyEntityNameTranslateKey", "thyIconName", "thySize", "thyMarginTop", "thyTopAuto", "thyContainer", "thyImageUrl", "thyImageLoading", "thyImageFetchPriority", "thyDescription"] }, { kind: "component", type: ThyAction, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }, { kind: "component", type: ThyDivider, selector: "thy-divider", inputs: ["thyVertical", "thyStyle", "thyColor", "thyText", "thyTextDirection", "thyDeeper"] }, { kind: "component", type: ThyInputSearch, selector: "thy-input-search", inputs: ["name", "placeholder", "thyTheme", "thySearchFocus", "thyIconPosition", "thySize"], outputs: ["clear", "thyClear"] }, { kind: "component", type: ThyDropdownMenuComponent, selector: "thy-dropdown-menu", inputs: ["thyWidth", "thyImmediateRender"] }, { kind: "component", type: ThyDropdownMenuGroup, selector: "thy-dropdown-menu-group", inputs: ["thyTitle"] }, { kind: "pipe", type: PluginMenuPipe, name: "getMenuIcon" }, { kind: "directive", type: ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { kind: "directive", type: ThyPopoverDirective, selector: "[thyPopover]", inputs: ["thyPopover", "thyTrigger", "thyPlacement", "thyOffset", "thyConfig", "thyShowDelay", "thyHideDelay", "thyAutoAdaptive", "thyDisabled"] }, { kind: "directive", type: TheListboxDirective, selector: "[theListBox]", inputs: ["keyboardContainer", "autoActiveFirstItem"], outputs: ["theListboxChange"], exportAs: ["theListBox"] }, { kind: "directive", type: ThyDropdownDirective, selector: "[thyDropdown]", inputs: ["thyDropdownMenu", "thyDropdown", "thyTrigger", "thyShowDelay", "thyHideDelay", "thyActiveClass", "thyPopoverOptions", "thyPlacement", "thyMenuInsideClosable", "thyPanelClass"], outputs: ["thyActiveChange"] }, { kind: "directive", type: TheListboxGroupDirective, selector: "[theListboxGroup]", inputs: ["horizontalColumn"], exportAs: ["theListboxGroup"] }, { kind: "directive", type: TheListboxOptionDirective, selector: "[theListboxOption]", inputs: ["theOptionValue", "theOptionDisabled"], exportAs: ["theListboxOption"] }, { kind: "directive", type: ThePreventDefaultDirective, selector: "[thePreventDefault]", exportAs: ["thePreventDefault"] }, { kind: "directive", type: ThyDropdownMenuItemDirective, selector: "[thyDropdownMenuItem]", inputs: ["thyType", "thyDisabled"] }] }); }
7069
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.0", type: ThePluginMenuComponent, isStandalone: true, selector: "the-plugin-menu", inputs: { editor: "editor", theDisplaySearch: "theDisplaySearch", thePluginMenu: "thePluginMenu", sceneKey: "sceneKey", subPanelClass: "subPanelClass", autoActiveFirstItem: "autoActiveFirstItem" }, host: { properties: { "class": "this.containerClassName" } }, viewQueries: [{ propertyName: "dropdownTriggers", predicate: ["dropdownTriggers"], descendants: true, read: ThyDropdownDirective }], ngImport: i0, template: "<div *ngIf=\"theDisplaySearch\" class=\"menu-search px-5 pt-5 pb-2\">\n <thy-input-search [(ngModel)]=\"keyWords\" placeholder=\"\u641C\u7D22\" thyIconPosition=\"after\" (ngModelChange)=\"updateKeywords(keyWords)\">\n </thy-input-search>\n</div>\n\n<div\n *ngIf=\"groupMenu.length > 0; else empty\"\n theListBox\n [keyboardContainer]=\"keyboardContainer\"\n [autoActiveFirstItem]=\"listBoxAutoActiveFirstItem\"\n (theListboxChange)=\"theListboxChange($event)\"\n class=\"thy-dropdown-menu the-plugin-menu-scroll-container pb-2 pt-0\"\n>\n <ng-container *ngIf=\"iconMenu?.length > 0\">\n <div theListboxGroup [horizontalColumn]=\"6\" class=\"icon-menu d-flex pl-5 py-1\">\n <ng-container *ngFor=\"let item of iconMenu; trackBy: trackByFn\">\n <a\n *ngIf=\"item.type === ThePluginMenuItemType.icon\"\n href=\"javascript:;\"\n class=\"mt-2\"\n thyAction\n theListboxOption\n [theOptionValue]=\"item\"\n [thyActionIcon]=\"item.icon\"\n [thyTooltip]=\"item?.name\"\n [thyDisabled]=\"item.disabled\"\n [theOptionDisabled]=\"item.disabled\"\n thePreventDefault\n (click)=\"handleItemSelection(item)\"\n ></a>\n </ng-container>\n </div>\n <thy-divider class=\"my-2\"></thy-divider>\n </ng-container>\n\n <div theListboxGroup>\n <ng-container *ngFor=\"let item of groupMenu; trackBy: trackByFn\">\n <ng-container *ngIf=\"item.isMenuItem && !(item.children?.length > 0) && item.key !== 'table'\">\n <div\n thyDropdownMenuItem\n theListboxOption\n [theOptionValue]=\"item\"\n class=\"py-0\"\n thePreventDefault\n [thyDisabled]=\"item.disabled\"\n [theOptionDisabled]=\"item.disabled\"\n (click)=\"handleItemSelection(item)\"\n >\n <div *ngIf=\"item.menuIcon\" class=\"menu-icon mr-2\">\n <thy-icon [thyIconName]=\"item.menuIcon | getMenuIcon: sceneKey\"></thy-icon>\n </div>\n <div class=\"menu-content d-flex align-items-center\">\n <div class=\"menu-item-title w-100\">\n {{ item.name }}\n </div>\n </div>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"item.isMenuItem && item.children?.length > 0\" #hasExpanded>\n <div\n #dropdownTriggers\n [thyDropdown]=\"expand\"\n thyTrigger=\"hover\"\n thyDropdownMenuItem\n [thyDisabled]=\"item.disabled\"\n theListboxOption\n [theOptionValue]=\"item\"\n [theOptionDisabled]=\"item.disabled\"\n [thyPopoverOptions]=\"expandPopoverOptions\"\n class=\"py-0\"\n thePreventDefault\n [thyPanelClass]=\"subPanelClass\"\n (click)=\"handleItemSelection(item)\"\n >\n <div *ngIf=\"item.menuIcon\" class=\"menu-icon mr-2\">\n <thy-icon [thyIconName]=\"item.menuIcon | getMenuIcon: sceneKey\"></thy-icon>\n </div>\n <div class=\"menu-content d-flex align-items-center\">\n <div class=\"menu-item-title w-100\">\n {{ item.name }}\n </div>\n </div>\n <div *ngIf=\"item.children?.length > 0\">\n <thy-icon class=\"text-muted\" thyIconName=\"angle-right\"></thy-icon>\n </div>\n <thy-dropdown-menu #expand>\n <div class=\"the-plugin-menu-container expand-menu\" theListboxGroup>\n <ng-container *ngFor=\"let child of item.children\">\n <div\n *ngIf=\"child.type === ThePluginMenuItemType.group\"\n thyDropdownMenuItem\n theListboxOption\n class=\"py-0\"\n thePreventDefault\n [theOptionDisabled]=\"item.disabled\"\n [thyDisabled]=\"child.disabled\"\n (click)=\"handleItemSelection(child)\"\n [theOptionValue]=\"child\"\n >\n <div *ngIf=\"child.menuIcon\" class=\"menu-icon mr-2\">\n <thy-icon [thyIconName]=\"child.menuIcon | getMenuIcon: sceneKey\"></thy-icon>\n </div>\n <div class=\"menu-content d-flex align-items-center\">\n <div class=\"menu-item-title w-100\">\n {{ child.name }}\n </div>\n </div>\n </div>\n <thy-divider *ngIf=\"child === 'divider'\" class=\"my-2\"></thy-divider>\n </ng-container>\n </div>\n </thy-dropdown-menu>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"item.isMenuItem && item.key === 'table'\">\n <div\n #dropdownTriggers\n [thyPopover]=\"tableSelect\"\n thyPlacement=\"rightTop\"\n thyTrigger=\"hover\"\n thyDropdownMenuItem\n theListboxOption\n [thyConfig]=\"tableSelectPopoverConfig\"\n [theOptionValue]=\"item\"\n [theOptionDisabled]=\"item.disabled\"\n [thyDisabled]=\"item.disabled\"\n class=\"py-0\"\n thePreventDefault\n (click)=\"handleItemSelection(item)\"\n >\n <div class=\"menu-icon mr-2\">\n <thy-icon [thyIconName]=\"item.menuIcon | getMenuIcon: sceneKey\"></thy-icon>\n </div>\n <div class=\"menu-content d-flex align-items-center\">\n <div class=\"menu-item-title w-100\">\n {{ item.name }}\n </div>\n </div>\n <div>\n <thy-icon class=\"text-muted\" thyIconName=\"angle-right\"></thy-icon>\n </div>\n\n <ng-template #tableSelect>\n <table-select\n class=\"plugin-menu-table the-table-selector-panel\"\n [editor]=\"editor\"\n [beforeInsert]=\"removeKeywords\"\n ></table-select>\n </ng-template>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"!item.isMenuItem\" #menuGroup>\n <thy-dropdown-menu-group class=\"font-size-sm\" [thyTitle]=\"item.groupName\"></thy-dropdown-menu-group>\n </ng-container>\n </ng-container>\n </div>\n</div>\n\n<ng-template #empty>\n <div class=\"empty d-flex align-items-center justify-content-center\">\n <thy-empty [thyMessage]=\"thyMessage\"></thy-empty>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: ThyEmptyModule }, { kind: "component", type: i3.ThyEmpty, selector: "thy-empty", inputs: ["thyMessage", "thyTranslationKey", "thyTranslationValues", "thyEntityName", "thyEntityNameTranslateKey", "thyIconName", "thySize", "thyMarginTop", "thyTopAuto", "thyContainer", "thyImageUrl", "thyImageLoading", "thyImageFetchPriority", "thyDescription"] }, { kind: "component", type: TheTableSelect, selector: "table-select", inputs: ["optionsParam", "editor", "beforeInsert"] }, { kind: "component", type: ThyIcon, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { kind: "component", type: ThyAction, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }, { kind: "component", type: ThyDivider, selector: "thy-divider", inputs: ["thyVertical", "thyStyle", "thyColor", "thyText", "thyTextDirection", "thyDeeper"] }, { kind: "component", type: ThyInputSearch, selector: "thy-input-search", inputs: ["name", "placeholder", "thyTheme", "thySearchFocus", "thyIconPosition", "thySize"], outputs: ["clear", "thyClear"] }, { kind: "component", type: ThyDropdownMenuComponent, selector: "thy-dropdown-menu", inputs: ["thyWidth", "thyImmediateRender"] }, { kind: "component", type: ThyDropdownMenuGroup, selector: "thy-dropdown-menu-group", inputs: ["thyTitle"] }, { kind: "pipe", type: PluginMenuPipe, name: "getMenuIcon" }, { kind: "directive", type: ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { kind: "directive", type: ThyPopoverDirective, selector: "[thyPopover]", inputs: ["thyPopover", "thyTrigger", "thyPlacement", "thyOffset", "thyConfig", "thyShowDelay", "thyHideDelay", "thyAutoAdaptive", "thyDisabled"] }, { kind: "directive", type: TheListboxDirective, selector: "[theListBox]", inputs: ["keyboardContainer", "autoActiveFirstItem"], outputs: ["theListboxChange"], exportAs: ["theListBox"] }, { kind: "directive", type: ThyDropdownDirective, selector: "[thyDropdown]", inputs: ["thyDropdownMenu", "thyDropdown", "thyTrigger", "thyShowDelay", "thyHideDelay", "thyActiveClass", "thyPopoverOptions", "thyPlacement", "thyMenuInsideClosable", "thyPanelClass"], outputs: ["thyActiveChange"] }, { kind: "directive", type: TheListboxGroupDirective, selector: "[theListboxGroup]", inputs: ["horizontalColumn"], exportAs: ["theListboxGroup"] }, { kind: "directive", type: TheListboxOptionDirective, selector: "[theListboxOption]", inputs: ["theOptionValue", "theOptionDisabled"], exportAs: ["theListboxOption"] }, { kind: "directive", type: ThePreventDefaultDirective, selector: "[thePreventDefault]", exportAs: ["thePreventDefault"] }, { kind: "directive", type: ThyDropdownMenuItemDirective, selector: "[thyDropdownMenuItem]", inputs: ["thyType", "thyDisabled"] }] }); }
7032
7070
  }
7033
7071
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: ThePluginMenuComponent, decorators: [{
7034
7072
  type: Component,
@@ -7036,9 +7074,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.0", ngImpor
7036
7074
  NgIf,
7037
7075
  NgFor,
7038
7076
  FormsModule,
7077
+ ThyEmptyModule,
7039
7078
  TheTableSelect,
7040
7079
  ThyIcon,
7041
- ThyEmpty,
7042
7080
  ThyAction,
7043
7081
  ThyDivider,
7044
7082
  ThyInputSearch,
@@ -7053,7 +7091,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.0", ngImpor
7053
7091
  TheListboxOptionDirective,
7054
7092
  ThePreventDefaultDirective,
7055
7093
  ThyDropdownMenuItemDirective
7056
- ], template: "<div *ngIf=\"theDisplaySearch\" class=\"menu-search px-5 pt-5 pb-2\">\n <thy-input-search [(ngModel)]=\"keyWords\" placeholder=\"\u641C\u7D22\" thyIconPosition=\"after\" (ngModelChange)=\"updateKeywords(keyWords)\">\n </thy-input-search>\n</div>\n\n<div\n *ngIf=\"groupMenu.length > 0; else thyEmpty\"\n theListBox\n [keyboardContainer]=\"keyboardContainer\"\n [autoActiveFirstItem]=\"listBoxAutoActiveFirstItem\"\n (theListboxChange)=\"theListboxChange($event)\"\n class=\"thy-dropdown-menu the-plugin-menu-scroll-container pb-2 pt-0\"\n>\n <div *ngIf=\"iconMenu?.length > 0\" theListboxGroup [horizontalColumn]=\"6\" class=\"icon-menu d-flex pl-5 py-1\">\n <ng-container *ngFor=\"let item of iconMenu; trackBy: trackByFn\">\n <a\n *ngIf=\"item.type === ThePluginMenuItemType.icon\"\n href=\"javascript:;\"\n class=\"mt-2\"\n thyAction\n theListboxOption\n [theOptionValue]=\"item\"\n [thyActionIcon]=\"item.icon\"\n [thyTooltip]=\"item?.name\"\n [thyDisabled]=\"item.disabled\"\n [theOptionDisabled]=\"item.disabled\"\n thePreventDefault\n (click)=\"handleItemSelection(item)\"\n ></a>\n </ng-container>\n </div>\n\n <thy-divider *ngIf=\"this.iconMenu?.length\" class=\"my-2\"></thy-divider>\n <div theListboxGroup>\n <ng-container *ngFor=\"let item of groupMenu; trackBy: trackByFn\">\n <ng-container *ngIf=\"item.isMenuItem && !(item.children?.length > 0) && item.key !== 'table'\">\n <div\n thyDropdownMenuItem\n theListboxOption\n [theOptionValue]=\"item\"\n class=\"py-0\"\n thePreventDefault\n [thyDisabled]=\"item.disabled\"\n [theOptionDisabled]=\"item.disabled\"\n (click)=\"handleItemSelection(item)\"\n >\n <div *ngIf=\"item.menuIcon\" class=\"menu-icon mr-2\">\n <thy-icon [thyIconName]=\"item.menuIcon | getMenuIcon: sceneKey\"></thy-icon>\n </div>\n <div class=\"menu-content d-flex align-items-center\">\n <div class=\"menu-item-title w-100\">\n {{ item.name }}\n </div>\n </div>\n </div>\n </ng-container>\n <ng-container *ngIf=\"item.isMenuItem && item.children?.length > 0\" #hasExpanded>\n <div\n #dropdownTriggers\n [thyDropdown]=\"expand\"\n thyTrigger=\"hover\"\n thyDropdownMenuItem\n [thyDisabled]=\"item.disabled\"\n theListboxOption\n [theOptionValue]=\"item\"\n [theOptionDisabled]=\"item.disabled\"\n [thyPopoverOptions]=\"expandPopoverOptions\"\n class=\"py-0\"\n thePreventDefault\n [thyPanelClass]=\"subPanelClass\"\n (click)=\"handleItemSelection(item)\"\n >\n <div *ngIf=\"item.menuIcon\" class=\"menu-icon mr-2\">\n <thy-icon [thyIconName]=\"item.menuIcon | getMenuIcon: sceneKey\"></thy-icon>\n </div>\n <div class=\"menu-content d-flex align-items-center\">\n <div class=\"menu-item-title w-100\">\n {{ item.name }}\n </div>\n </div>\n <div *ngIf=\"item.children?.length > 0\">\n <thy-icon class=\"text-muted\" thyIconName=\"angle-right\"></thy-icon>\n </div>\n <thy-dropdown-menu #expand>\n <div class=\"the-plugin-menu-container expand-menu\" theListboxGroup>\n <ng-container *ngFor=\"let child of item.children\">\n <div\n *ngIf=\"child.type === ThePluginMenuItemType.group\"\n thyDropdownMenuItem\n theListboxOption\n class=\"py-0\"\n thePreventDefault\n [theOptionDisabled]=\"item.disabled\"\n [thyDisabled]=\"child.disabled\"\n (click)=\"handleItemSelection(child)\"\n [theOptionValue]=\"child\"\n >\n <div *ngIf=\"child.menuIcon\" class=\"menu-icon mr-2\">\n <thy-icon [thyIconName]=\"child.menuIcon | getMenuIcon: sceneKey\"></thy-icon>\n </div>\n <div class=\"menu-content d-flex align-items-center\">\n <div class=\"menu-item-title w-100\">\n {{ child.name }}\n </div>\n </div>\n </div>\n <thy-divider *ngIf=\"child === 'divider'\" class=\"my-2\"></thy-divider>\n </ng-container>\n </div>\n </thy-dropdown-menu>\n </div>\n </ng-container>\n <ng-container *ngIf=\"item.isMenuItem && item.key === 'table'\">\n <div\n #dropdownTriggers\n [thyPopover]=\"tableSelect\"\n thyPlacement=\"rightTop\"\n thyTrigger=\"hover\"\n thyDropdownMenuItem\n theListboxOption\n [thyConfig]=\"tableSelectPopoverConfig\"\n [theOptionValue]=\"item\"\n [theOptionDisabled]=\"item.disabled\"\n [thyDisabled]=\"item.disabled\"\n class=\"py-0\"\n thePreventDefault\n (click)=\"handleItemSelection(item)\"\n >\n <div class=\"menu-icon mr-2\">\n <thy-icon [thyIconName]=\"item.menuIcon | getMenuIcon: sceneKey\"></thy-icon>\n </div>\n <div class=\"menu-content d-flex align-items-center\">\n <div class=\"menu-item-title w-100\">\n {{ item.name }}\n </div>\n </div>\n <div>\n <thy-icon class=\"text-muted\" thyIconName=\"angle-right\"></thy-icon>\n </div>\n\n <ng-template #tableSelect>\n <table-select\n class=\"plugin-menu-table the-table-selector-panel\"\n [editor]=\"editor\"\n [beforeInsert]=\"removeKeywords\"\n ></table-select>\n </ng-template>\n </div>\n </ng-container>\n <ng-container *ngIf=\"!item.isMenuItem\" #menuGroup>\n <thy-dropdown-menu-group class=\"font-size-sm\" [thyTitle]=\"item.groupName\"></thy-dropdown-menu-group>\n </ng-container>\n </ng-container>\n </div>\n</div>\n\n<ng-template #thyEmpty>\n <div class=\"empty d-flex align-items-center justify-content-center\">\n <thy-empty [thyMessage]=\"thyMessage\"></thy-empty>\n </div>\n</ng-template>\n" }]
7094
+ ], template: "<div *ngIf=\"theDisplaySearch\" class=\"menu-search px-5 pt-5 pb-2\">\n <thy-input-search [(ngModel)]=\"keyWords\" placeholder=\"\u641C\u7D22\" thyIconPosition=\"after\" (ngModelChange)=\"updateKeywords(keyWords)\">\n </thy-input-search>\n</div>\n\n<div\n *ngIf=\"groupMenu.length > 0; else empty\"\n theListBox\n [keyboardContainer]=\"keyboardContainer\"\n [autoActiveFirstItem]=\"listBoxAutoActiveFirstItem\"\n (theListboxChange)=\"theListboxChange($event)\"\n class=\"thy-dropdown-menu the-plugin-menu-scroll-container pb-2 pt-0\"\n>\n <ng-container *ngIf=\"iconMenu?.length > 0\">\n <div theListboxGroup [horizontalColumn]=\"6\" class=\"icon-menu d-flex pl-5 py-1\">\n <ng-container *ngFor=\"let item of iconMenu; trackBy: trackByFn\">\n <a\n *ngIf=\"item.type === ThePluginMenuItemType.icon\"\n href=\"javascript:;\"\n class=\"mt-2\"\n thyAction\n theListboxOption\n [theOptionValue]=\"item\"\n [thyActionIcon]=\"item.icon\"\n [thyTooltip]=\"item?.name\"\n [thyDisabled]=\"item.disabled\"\n [theOptionDisabled]=\"item.disabled\"\n thePreventDefault\n (click)=\"handleItemSelection(item)\"\n ></a>\n </ng-container>\n </div>\n <thy-divider class=\"my-2\"></thy-divider>\n </ng-container>\n\n <div theListboxGroup>\n <ng-container *ngFor=\"let item of groupMenu; trackBy: trackByFn\">\n <ng-container *ngIf=\"item.isMenuItem && !(item.children?.length > 0) && item.key !== 'table'\">\n <div\n thyDropdownMenuItem\n theListboxOption\n [theOptionValue]=\"item\"\n class=\"py-0\"\n thePreventDefault\n [thyDisabled]=\"item.disabled\"\n [theOptionDisabled]=\"item.disabled\"\n (click)=\"handleItemSelection(item)\"\n >\n <div *ngIf=\"item.menuIcon\" class=\"menu-icon mr-2\">\n <thy-icon [thyIconName]=\"item.menuIcon | getMenuIcon: sceneKey\"></thy-icon>\n </div>\n <div class=\"menu-content d-flex align-items-center\">\n <div class=\"menu-item-title w-100\">\n {{ item.name }}\n </div>\n </div>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"item.isMenuItem && item.children?.length > 0\" #hasExpanded>\n <div\n #dropdownTriggers\n [thyDropdown]=\"expand\"\n thyTrigger=\"hover\"\n thyDropdownMenuItem\n [thyDisabled]=\"item.disabled\"\n theListboxOption\n [theOptionValue]=\"item\"\n [theOptionDisabled]=\"item.disabled\"\n [thyPopoverOptions]=\"expandPopoverOptions\"\n class=\"py-0\"\n thePreventDefault\n [thyPanelClass]=\"subPanelClass\"\n (click)=\"handleItemSelection(item)\"\n >\n <div *ngIf=\"item.menuIcon\" class=\"menu-icon mr-2\">\n <thy-icon [thyIconName]=\"item.menuIcon | getMenuIcon: sceneKey\"></thy-icon>\n </div>\n <div class=\"menu-content d-flex align-items-center\">\n <div class=\"menu-item-title w-100\">\n {{ item.name }}\n </div>\n </div>\n <div *ngIf=\"item.children?.length > 0\">\n <thy-icon class=\"text-muted\" thyIconName=\"angle-right\"></thy-icon>\n </div>\n <thy-dropdown-menu #expand>\n <div class=\"the-plugin-menu-container expand-menu\" theListboxGroup>\n <ng-container *ngFor=\"let child of item.children\">\n <div\n *ngIf=\"child.type === ThePluginMenuItemType.group\"\n thyDropdownMenuItem\n theListboxOption\n class=\"py-0\"\n thePreventDefault\n [theOptionDisabled]=\"item.disabled\"\n [thyDisabled]=\"child.disabled\"\n (click)=\"handleItemSelection(child)\"\n [theOptionValue]=\"child\"\n >\n <div *ngIf=\"child.menuIcon\" class=\"menu-icon mr-2\">\n <thy-icon [thyIconName]=\"child.menuIcon | getMenuIcon: sceneKey\"></thy-icon>\n </div>\n <div class=\"menu-content d-flex align-items-center\">\n <div class=\"menu-item-title w-100\">\n {{ child.name }}\n </div>\n </div>\n </div>\n <thy-divider *ngIf=\"child === 'divider'\" class=\"my-2\"></thy-divider>\n </ng-container>\n </div>\n </thy-dropdown-menu>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"item.isMenuItem && item.key === 'table'\">\n <div\n #dropdownTriggers\n [thyPopover]=\"tableSelect\"\n thyPlacement=\"rightTop\"\n thyTrigger=\"hover\"\n thyDropdownMenuItem\n theListboxOption\n [thyConfig]=\"tableSelectPopoverConfig\"\n [theOptionValue]=\"item\"\n [theOptionDisabled]=\"item.disabled\"\n [thyDisabled]=\"item.disabled\"\n class=\"py-0\"\n thePreventDefault\n (click)=\"handleItemSelection(item)\"\n >\n <div class=\"menu-icon mr-2\">\n <thy-icon [thyIconName]=\"item.menuIcon | getMenuIcon: sceneKey\"></thy-icon>\n </div>\n <div class=\"menu-content d-flex align-items-center\">\n <div class=\"menu-item-title w-100\">\n {{ item.name }}\n </div>\n </div>\n <div>\n <thy-icon class=\"text-muted\" thyIconName=\"angle-right\"></thy-icon>\n </div>\n\n <ng-template #tableSelect>\n <table-select\n class=\"plugin-menu-table the-table-selector-panel\"\n [editor]=\"editor\"\n [beforeInsert]=\"removeKeywords\"\n ></table-select>\n </ng-template>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"!item.isMenuItem\" #menuGroup>\n <thy-dropdown-menu-group class=\"font-size-sm\" [thyTitle]=\"item.groupName\"></thy-dropdown-menu-group>\n </ng-container>\n </ng-container>\n </div>\n</div>\n\n<ng-template #empty>\n <div class=\"empty d-flex align-items-center justify-content-center\">\n <thy-empty [thyMessage]=\"thyMessage\"></thy-empty>\n </div>\n</ng-template>\n" }]
7057
7095
  }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }, { type: i1.ThyPopoverRef }], propDecorators: { dropdownTriggers: [{
7058
7096
  type: ViewChildren,
7059
7097
  args: ['dropdownTriggers', { read: ThyDropdownDirective }]
@@ -7292,42 +7330,35 @@ class TheInlineToolbar {
7292
7330
  }
7293
7331
  updateInlineToolbar() {
7294
7332
  const inlineToolbar = this.elementRef.nativeElement.firstElementChild;
7295
- if (!this.editor.selection) {
7296
- inlineToolbar.removeAttribute('style');
7333
+ if (!inlineToolbar) {
7297
7334
  return;
7298
7335
  }
7299
- const anchorBlock$1 = anchorBlock(this.editor);
7300
- if (!inlineToolbar || !anchorBlock$1) {
7301
- return;
7302
- }
7303
- const { editor } = this;
7304
- const { selection } = editor;
7336
+ const { selection } = this.editor;
7305
7337
  if (!selection ||
7306
- !AngularEditor.isFocused(editor) ||
7307
- Range.isCollapsed(selection) ||
7308
- Editor.string(editor, selection) === '') {
7338
+ (selection &&
7339
+ (!AngularEditor.isFocused(this.editor) ||
7340
+ Range.isCollapsed(selection) ||
7341
+ Editor.string(this.editor, selection) === ''))) {
7309
7342
  inlineToolbar.removeAttribute('style');
7310
7343
  return;
7311
7344
  }
7312
- if (!THE_INLINE_TOOLBAR_TYPES.includes(anchorBlock$1.type)) {
7313
- return;
7314
- }
7315
7345
  const native = window.getSelection();
7316
7346
  if (native.type !== 'None') {
7317
7347
  const range = native.getRangeAt(0);
7318
7348
  this.updatePosition(inlineToolbar, range);
7319
7349
  this.inlineToolbar?.selectionChange(this.editor);
7350
+ this.cdr.markForCheck();
7320
7351
  }
7321
- this.cdr.detectChanges();
7322
7352
  }
7323
7353
  updatePosition(toolbarElement, range) {
7324
7354
  let boundary = range.getBoundingClientRect();
7325
- if (!boundary || (boundary.height === 0 && boundary.width === 0 && range.startContainer === range.endContainer)) {
7326
- if (range.startContainer.nodeType === 1 && range.startContainer.querySelector('img')) {
7327
- boundary = range.startContainer.querySelector('img').getBoundingClientRect();
7355
+ const startContainer = range.startContainer;
7356
+ if (!boundary || (boundary.height === 0 && boundary.width === 0 && startContainer === range.endContainer)) {
7357
+ if (startContainer.nodeType === 1 && startContainer.querySelector('img')) {
7358
+ boundary = startContainer.querySelector('img').getBoundingClientRect();
7328
7359
  }
7329
7360
  else {
7330
- boundary = range.startContainer.getBoundingClientRect();
7361
+ boundary = startContainer.getBoundingClientRect();
7331
7362
  }
7332
7363
  }
7333
7364
  const editableElement = this.contextService.getEditableElement();
@@ -7687,7 +7718,7 @@ class ResizeRef {
7687
7718
  }
7688
7719
 
7689
7720
  class TheColumnResizeOverlayHandle {
7690
- constructor(elementRef, viewContainerRef, cdr, ngZone, resizeRef, eventDispatcher, document, resizeNotifier) {
7721
+ constructor(elementRef, viewContainerRef, cdr, ngZone, resizeRef, eventDispatcher, document, resizeNotifier, destroyRef) {
7691
7722
  this.elementRef = elementRef;
7692
7723
  this.viewContainerRef = viewContainerRef;
7693
7724
  this.cdr = cdr;
@@ -7696,7 +7727,7 @@ class TheColumnResizeOverlayHandle {
7696
7727
  this.eventDispatcher = eventDispatcher;
7697
7728
  this.document = document;
7698
7729
  this.resizeNotifier = resizeNotifier;
7699
- this.destroyed = new ReplaySubject();
7730
+ this.destroyRef = destroyRef;
7700
7731
  }
7701
7732
  ngAfterViewInit() {
7702
7733
  this._listenForMouseEvents();
@@ -7710,15 +7741,14 @@ class TheColumnResizeOverlayHandle {
7710
7741
  }
7711
7742
  _listenForMouseEvents() {
7712
7743
  this.ngZone.runOutsideAngular(() => {
7713
- const takeUntilDestroyed = takeUntil(this.destroyed);
7714
7744
  fromEvent(this.elementRef.nativeElement, 'mouseenter')
7715
- .pipe(takeUntilDestroyed, mapTo(this.resizeRef.origin.nativeElement))
7745
+ .pipe(mapTo(this.resizeRef.origin.nativeElement), takeUntilDestroyed(this.destroyRef))
7716
7746
  .subscribe(cell => {
7717
7747
  this.eventDispatcher.tableCellHovered.next({ cell, position: this.resizeRef.position });
7718
7748
  this.resizeRef.updateSizeAndOffset();
7719
7749
  });
7720
7750
  fromEvent(this.elementRef.nativeElement, 'mousedown')
7721
- .pipe(takeUntilDestroyed)
7751
+ .pipe(takeUntilDestroyed(this.destroyRef))
7722
7752
  .subscribe(mousedownEvent => {
7723
7753
  mousedownEvent.preventDefault();
7724
7754
  this._dragStarted(mousedownEvent);
@@ -7742,10 +7772,10 @@ class TheColumnResizeOverlayHandle {
7742
7772
  let size = isXAxis ? initialWidthSize : initialHeightSize;
7743
7773
  this.updateResizeActive(true);
7744
7774
  this._notifyResizeStarted();
7745
- mouseup.pipe(takeUntil(escape), takeUntil(this.destroyed)).subscribe(({ clientX, clientY }) => {
7775
+ mouseup.pipe(takeUntil(escape), takeUntilDestroyed(this.destroyRef)).subscribe(({ clientX, clientY }) => {
7746
7776
  this._notifyResizeEnded(size, isXAxis ? clientX !== startX : clientY !== startY);
7747
7777
  });
7748
- escape.pipe(takeUntil(mouseup), takeUntil(this.destroyed)).subscribe(() => {
7778
+ escape.pipe(takeUntil(mouseup), takeUntilDestroyed(this.destroyRef)).subscribe(() => {
7749
7779
  this._notifyResizeEnded(size);
7750
7780
  });
7751
7781
  mousemove
@@ -7757,7 +7787,7 @@ class TheColumnResizeOverlayHandle {
7757
7787
  }), startWith({
7758
7788
  clientX: startX,
7759
7789
  clientY: startY
7760
- }), distinctUntilChanged(), pairwise(), takeUntil(mouseup), takeUntil(escape), takeUntil(this.destroyed))
7790
+ }), distinctUntilChanged(), pairwise(), takeUntil(mouseup), takeUntil(escape), takeUntilDestroyed(this.destroyRef))
7761
7791
  .subscribe(([prev, curr]) => {
7762
7792
  let deltaSize = isXAxis ? curr.clientX - prev.clientX : curr.clientY - prev.clientY;
7763
7793
  this.resizeNotifier.triggerResize.next({
@@ -7806,11 +7836,7 @@ class TheColumnResizeOverlayHandle {
7806
7836
  this.resizeNotifier.resizeStarted.next(sizeMessage);
7807
7837
  });
7808
7838
  }
7809
- ngOnDestroy() {
7810
- this.destroyed.next();
7811
- this.destroyed.complete();
7812
- }
7813
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: TheColumnResizeOverlayHandle, deps: [{ token: i0.ElementRef }, { token: i0.ViewContainerRef }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: ResizeRef }, { token: TableCellEventDispatcher }, { token: DOCUMENT }, { token: ColumnResizeNotifierSource }], target: i0.ɵɵFactoryTarget.Component }); }
7839
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: TheColumnResizeOverlayHandle, deps: [{ token: i0.ElementRef }, { token: i0.ViewContainerRef }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: ResizeRef }, { token: TableCellEventDispatcher }, { token: DOCUMENT }, { token: ColumnResizeNotifierSource }, { token: i0.DestroyRef }], target: i0.ɵɵFactoryTarget.Component }); }
7814
7840
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.0", type: TheColumnResizeOverlayHandle, isStandalone: true, selector: "ng-component", host: { classAttribute: "the-table-resize-overlay-thumb" }, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
7815
7841
  }
7816
7842
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: TheColumnResizeOverlayHandle, decorators: [{
@@ -7824,12 +7850,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.0", ngImpor
7824
7850
  }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.ViewContainerRef }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }, { type: ResizeRef }, { type: TableCellEventDispatcher }, { type: undefined, decorators: [{
7825
7851
  type: Inject,
7826
7852
  args: [DOCUMENT]
7827
- }] }, { type: ColumnResizeNotifierSource }] });
7853
+ }] }, { type: ColumnResizeNotifierSource }, { type: i0.DestroyRef }] });
7828
7854
 
7829
7855
  class ColumnResizingStore {
7830
7856
  constructor() {
7831
7857
  this.resizeCols = [];
7832
- this.resizeRows = [];
7833
7858
  }
7834
7859
  storeResizingCol(colElement) {
7835
7860
  if (this.resizeCols.some(cache => cache.colElement === colElement)) {
@@ -7837,27 +7862,14 @@ class ColumnResizingStore {
7837
7862
  }
7838
7863
  this.resizeCols.push({ colElement, baseWidth: getElementWidth(colElement) });
7839
7864
  }
7840
- storeResizingRow(rowElement) {
7841
- if (this.resizeRows.some(cache => cache.rowElement === rowElement)) {
7842
- return;
7843
- }
7844
- this.resizeRows.push({ rowElement, baseHeight: getElementHeight(rowElement) });
7845
- }
7846
7865
  storeTableWidth(cols) {
7847
7866
  if (!this.tableCols) {
7848
7867
  this.tableCols = { cols, baseWidth: getColsTotalWidth(cols) };
7849
7868
  }
7850
7869
  }
7851
- storeTableHeight(rows) {
7852
- if (!this.tableRows) {
7853
- this.tableRows = { rows, baseHeight: getRowsTotalHeight(rows) };
7854
- }
7855
- }
7856
7870
  cleanResizing() {
7857
7871
  this.tableCols = null;
7858
- this.tableRows = null;
7859
7872
  this.resizeCols = [];
7860
- this.resizeRows = [];
7861
7873
  this.direction = null;
7862
7874
  }
7863
7875
  restoreLeftCols(deltaX) {
@@ -7879,44 +7891,6 @@ class ColumnResizingStore {
7879
7891
  }
7880
7892
  return deltaX;
7881
7893
  }
7882
- restoreTopRows(deltaY) {
7883
- let index = this.resizeRows.length - 1;
7884
- while (index >= 0 && deltaY > 0) {
7885
- const currentHeight = this.resizeRows[index].rowElement.getBoundingClientRect().height;
7886
- if (this.resizeRows[index].baseHeight > currentHeight) {
7887
- if (this.resizeRows[index].baseHeight > currentHeight + deltaY) {
7888
- this.resizeRows[index].rowElement.style.height = coerceCssPixelValue(currentHeight + deltaY);
7889
- deltaY = 0;
7890
- }
7891
- else {
7892
- deltaY -= this.resizeRows[index].baseHeight - currentHeight;
7893
- this.resizeRows[index].rowElement.style.height = coerceCssPixelValue(this.resizeRows[index].baseHeight);
7894
- this.popRow();
7895
- }
7896
- }
7897
- index--;
7898
- }
7899
- return deltaY;
7900
- }
7901
- restoreBottomRows(deltaY) {
7902
- let index = this.resizeRows.length - 1;
7903
- while (index >= 0 && deltaY < 0) {
7904
- const currentHeight = coercePixelsFromCssValue(this.resizeRows[index].rowElement.style.height);
7905
- if (this.resizeRows[index].baseHeight > currentHeight) {
7906
- if (this.resizeRows[index].baseHeight > currentHeight + Math.abs(deltaY)) {
7907
- this.resizeRows[index].rowElement.style.height = coerceCssPixelValue(currentHeight + Math.abs(deltaY));
7908
- deltaY = 0;
7909
- }
7910
- else {
7911
- deltaY += this.resizeRows[index].baseHeight - currentHeight;
7912
- this.resizeRows[index].rowElement.style.height = coerceCssPixelValue(this.resizeRows[index].baseHeight);
7913
- this.popRow();
7914
- }
7915
- }
7916
- index--;
7917
- }
7918
- return deltaY;
7919
- }
7920
7894
  restoreRightCols(deltaX) {
7921
7895
  let index = this.resizeCols.length - 1;
7922
7896
  while (index >= 0 && deltaX < 0) {
@@ -7941,11 +7915,6 @@ class ColumnResizingStore {
7941
7915
  return getColsTotalWidth(this.tableCols.cols) - this.tableCols.baseWidth - Math.abs(deltaX);
7942
7916
  }
7943
7917
  }
7944
- getAddTableHeight(deltaY) {
7945
- if (this.tableRows) {
7946
- return getRowsTotalHeight(this.tableRows.rows) - this.tableRows.baseHeight - Math.abs(deltaY);
7947
- }
7948
- }
7949
7918
  isRestoring(deltaValue, isXAxis = true) {
7950
7919
  return !this.isResizing(deltaValue, isXAxis);
7951
7920
  }
@@ -7956,9 +7925,6 @@ class ColumnResizingStore {
7956
7925
  if (this.resizeCols.length > 0) {
7957
7926
  return;
7958
7927
  }
7959
- if (this.resizeRows.length > 0) {
7960
- return;
7961
- }
7962
7928
  this.direction = this.getDirection(deltaValue, isXAxis);
7963
7929
  }
7964
7930
  getDirection(deltaValue, isXAxis = true) {
@@ -7967,9 +7933,6 @@ class ColumnResizingStore {
7967
7933
  popCol() {
7968
7934
  this.resizeCols.pop();
7969
7935
  }
7970
- popRow() {
7971
- this.resizeRows.pop();
7972
- }
7973
7936
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: ColumnResizingStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
7974
7937
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: ColumnResizingStore }); }
7975
7938
  }
@@ -7998,6 +7961,25 @@ class TheColumnResizeDirective {
7998
7961
  this._listenStartDrag();
7999
7962
  this._listenEndDrag();
8000
7963
  }
7964
+ getResizeRowIndex(position, cell) {
7965
+ const rowElements = this.theTableComponent.nativeElement.querySelector('tbody').children;
7966
+ const editor = this.theTableComponent?.editor;
7967
+ if (cell && rowElements && editor) {
7968
+ const node = AngularEditor.toSlateNode(editor, cell);
7969
+ const path = AngularEditor.findPath(editor, node);
7970
+ const [row] = path.slice(-2);
7971
+ let rowIndex;
7972
+ switch (position) {
7973
+ case Position.top:
7974
+ rowIndex = row - 1;
7975
+ break;
7976
+ case Position.bottom:
7977
+ rowIndex = row;
7978
+ break;
7979
+ }
7980
+ return rowIndex;
7981
+ }
7982
+ }
8001
7983
  _listenForCellEdgeHoverEvents() {
8002
7984
  this.ngZone.runOutsideAngular(() => {
8003
7985
  const element = this.elementRef.nativeElement;
@@ -8017,6 +7999,7 @@ class TheColumnResizeDirective {
8017
7999
  const positionOffsets = [topOffset, rightOffset, bottomOffset, leftOffset];
8018
8000
  const minIndex = positionOffsets.indexOf(Math.min(...positionOffsets));
8019
8001
  this.position = positions[minIndex];
8002
+ this.targetCell = cell;
8020
8003
  return { cell, position: this.position };
8021
8004
  }
8022
8005
  return null;
@@ -8035,9 +8018,6 @@ class TheColumnResizeDirective {
8035
8018
  if (this.position === Position.left || this.position === Position.right) {
8036
8019
  this.theTableComponent.initializeColumns();
8037
8020
  }
8038
- else {
8039
- this.theTableComponent.initializeRows();
8040
- }
8041
8021
  });
8042
8022
  }
8043
8023
  _listenEndDrag() {
@@ -8054,7 +8034,8 @@ class TheColumnResizeDirective {
8054
8034
  this.theTableComponent.transformColumnsWidth();
8055
8035
  }
8056
8036
  else {
8057
- this.theTableComponent.transformRowHeight();
8037
+ const rowIndex = this.getResizeRowIndex(this.position, this.targetCell);
8038
+ this.theTableComponent.transformRowHeight(rowIndex);
8058
8039
  }
8059
8040
  });
8060
8041
  }
@@ -9280,8 +9261,18 @@ const withBlockCard = (editor) => {
9280
9261
  const centerX = rectEditable.x + rectEditable.width / 2;
9281
9262
  const blockCardEntry = AngularEditor.toSlateCardEntry(editor, relativeBlockCardElement.firstElementChild);
9282
9263
  if (blockCardEntry && editor.isBlockCard(blockCardEntry[0])) {
9264
+ const parentBlockCardEntry = Editor.above(editor, {
9265
+ at: blockCardEntry[1],
9266
+ mode: 'highest',
9267
+ match: node => editor.isBlockCard(node)
9268
+ });
9283
9269
  event.preventDefault();
9284
- AngularEditor.moveBlockCard(editor, blockCardEntry[0], { direction: event.x < centerX ? 'left' : 'right' });
9270
+ if (parentBlockCardEntry) {
9271
+ AngularEditor.moveBlockCard(editor, parentBlockCardEntry[0], { direction: event.x < centerX ? 'left' : 'right' });
9272
+ }
9273
+ else {
9274
+ AngularEditor.moveBlockCard(editor, blockCardEntry[0], { direction: event.x < centerX ? 'left' : 'right' });
9275
+ }
9285
9276
  }
9286
9277
  }
9287
9278
  return;
@@ -10004,7 +9995,7 @@ class TheImage extends TheBaseElement {
10004
9995
  const currentWidth = this.imageEntry?.width || this.naturalWidth;
10005
9996
  return this.imageEntry?.layout && currentWidth > this.layoutDefaultWidth && !this.imageEntry?.reSized
10006
9997
  ? this.layoutDefaultWidth
10007
- : this.imageEntry.width;
9998
+ : currentWidth;
10008
9999
  }
10009
10000
  constructor(elementRef, cdr, imageGroup, imageUploaderService, theContextService, thyPopover, overlay, destroyRef) {
10010
10001
  super(elementRef, cdr);
@@ -10511,7 +10502,7 @@ const createImagePlugin = createPluginFactory({
10511
10502
  ],
10512
10503
  options: {
10513
10504
  allowParentTypes: [ElementKinds.listItem, ElementKinds.tableCell, ElementKinds.blockquote],
10514
- imageTypes: ['image/png', 'image/jpeg', 'image/gif', 'image/bmp']
10505
+ imageTypes: ['image/png', 'image/jpeg', 'image/gif', 'image/bmp', 'image/svg+xml']
10515
10506
  }
10516
10507
  });
10517
10508
 
@@ -10621,6 +10612,22 @@ const createIndentPlugin = createPluginFactory({
10621
10612
  }
10622
10613
  });
10623
10614
 
10615
+ /**
10616
+ * Remove nodes with empty text.
10617
+ */
10618
+ const withRemoveEmptyNodes = (options) => (editor) => {
10619
+ const types = castArray(options.type);
10620
+ const { normalizeNode } = editor;
10621
+ editor.normalizeNode = ([node, path]) => {
10622
+ if (node.type && types.includes(node.type) && Node.string(node) === '') {
10623
+ Transforms.removeNodes(editor, { at: path });
10624
+ return;
10625
+ }
10626
+ normalizeNode([node, path]);
10627
+ };
10628
+ return editor;
10629
+ };
10630
+
10624
10631
  class TheInlineCode extends TheBaseElement {
10625
10632
  constructor() {
10626
10633
  super(...arguments);
@@ -10645,22 +10652,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.0", ngImpor
10645
10652
  }]
10646
10653
  }] });
10647
10654
 
10648
- /**
10649
- * Remove nodes with empty text.
10650
- */
10651
- const withRemoveEmptyNodes = (options) => (editor) => {
10652
- const types = castArray(options.type);
10653
- const { normalizeNode } = editor;
10654
- editor.normalizeNode = ([node, path]) => {
10655
- if (node.type && types.includes(node.type) && Node.string(node) === '') {
10656
- Transforms.removeNodes(editor, { at: path });
10657
- return;
10658
- }
10659
- normalizeNode([node, path]);
10660
- };
10661
- return editor;
10662
- };
10663
-
10664
10655
  const withInlineCode = (editor) => {
10665
10656
  const { isInline, renderElement, insertText } = editor;
10666
10657
  editor.isInline = (element) => {
@@ -10715,6 +10706,7 @@ const createInlineCodePlugin = createPluginFactory({
10715
10706
  }
10716
10707
  ],
10717
10708
  options: {
10709
+ isInline: true,
10718
10710
  disabledOperateTypes: [ElementKinds.image, ...DISABLED_OPERATE_TYPES]
10719
10711
  }
10720
10712
  });
@@ -11061,6 +11053,7 @@ const createLinkPlugin = createPluginFactory({
11061
11053
  }
11062
11054
  ],
11063
11055
  options: {
11056
+ isInline: true,
11064
11057
  disabledOperateTypes: [ElementKinds.image, ...DISABLED_OPERATE_TYPES]
11065
11058
  }
11066
11059
  });
@@ -12570,7 +12563,7 @@ class TheTableRow extends TheBaseElement {
12570
12563
  this.updateNumberedColumnPosition();
12571
12564
  }
12572
12565
  setHeight() {
12573
- if (this.element.height) {
12566
+ if (this.element?.height) {
12574
12567
  this.height = this.element.height + 'px';
12575
12568
  }
12576
12569
  }
@@ -13972,13 +13965,53 @@ const moveSelectionFromCell = (editor, e) => {
13972
13965
  });
13973
13966
  };
13974
13967
 
13968
+ const getTableViewportRect = (editor, table) => {
13969
+ const tableComponent = ELEMENT_TO_COMPONENT.get(table);
13970
+ const tableWrapper = tableComponent.tableWrapper.nativeElement;
13971
+ const tableWrapperCSSStyle = getComputedStyle(tableWrapper);
13972
+ const tableWrapperRect = tableWrapper.getBoundingClientRect();
13973
+ const tableWrapperPaddingBottom = coercePixelsFromCssValue(tableWrapperCSSStyle.paddingBottom || '0px');
13974
+ const firstRow = AngularEditor.toDOMNode(editor, table.children[0]);
13975
+ const firstRowRect = firstRow.getBoundingClientRect();
13976
+ const controlHeight = 11;
13977
+ const adjustedTableRect = {
13978
+ left: tableWrapperRect.left,
13979
+ right: tableWrapperRect.right,
13980
+ bottom: tableWrapperRect.bottom - tableWrapperPaddingBottom,
13981
+ top: firstRowRect.top - controlHeight
13982
+ };
13983
+ const editorScrollContainer = getEditorScrollContainer(editor);
13984
+ const editorScrollContainerCSSStyle = getComputedStyle(editorScrollContainer);
13985
+ const editorScrollContainerRect = editorScrollContainer.getBoundingClientRect();
13986
+ // handle toolbar effect
13987
+ const paddingTop = coercePixelsFromCssValue(editorScrollContainerCSSStyle.paddingTop || '0px');
13988
+ const adjustedEditorScrollContainerRect = {
13989
+ left: editorScrollContainerRect.left,
13990
+ right: editorScrollContainerRect.right,
13991
+ bottom: editorScrollContainerRect.bottom,
13992
+ top: editorScrollContainerRect.top + paddingTop
13993
+ };
13994
+ const left = Math.max(adjustedEditorScrollContainerRect.left, adjustedTableRect.left);
13995
+ const right = Math.min(adjustedEditorScrollContainerRect.right, adjustedTableRect.right);
13996
+ const bottom = Math.min(adjustedEditorScrollContainerRect.bottom, adjustedTableRect.bottom);
13997
+ const top = Math.max(adjustedEditorScrollContainerRect.top, adjustedTableRect.top);
13998
+ return {
13999
+ left,
14000
+ right,
14001
+ top,
14002
+ bottom
14003
+ };
14004
+ };
14005
+
13975
14006
  class TheInsertMark {
13976
14007
  get editor() {
13977
14008
  return this.tableStore && this.tableStore.editor;
13978
14009
  }
13979
- constructor(cdr, renderer2) {
14010
+ constructor(cdr, renderer2, elementRef) {
13980
14011
  this.cdr = cdr;
13981
14012
  this.renderer2 = renderer2;
14013
+ this.elementRef = elementRef;
14014
+ this.insertLineStyle = {};
13982
14015
  this.destroy$ = new Subject();
13983
14016
  this.tooltipContent = '';
13984
14017
  this.disabled = false;
@@ -14015,7 +14048,7 @@ class TheInsertMark {
14015
14048
  return;
14016
14049
  }
14017
14050
  this.dotWrapperHovered = true;
14018
- this.insertLength = this.getLength();
14051
+ this.insertLineStyle = this.getInsertLineStyle();
14019
14052
  this.parentElement && this.renderer2.addClass(this.parentElement, TOP_CELL_CLASS);
14020
14053
  this.cdr.detectChanges();
14021
14054
  }
@@ -14028,35 +14061,54 @@ class TheInsertMark {
14028
14061
  this.parentElement && this.renderer2.removeClass(this.parentElement, TOP_CELL_CLASS);
14029
14062
  this.cdr.detectChanges();
14030
14063
  }
14031
- getLength() {
14064
+ getInsertLineStyle() {
14032
14065
  const { selection } = this.editor;
14033
14066
  if (selection && Range.isCollapsed(selection)) {
14034
14067
  const { table } = createTablePosition(this.editor, selection.anchor.path);
14035
14068
  if (!table) {
14036
14069
  return;
14037
14070
  }
14038
- const tableComponent = ELEMENT_TO_COMPONENT.get(table);
14039
- const tableWrapper = tableComponent.tableWrapper.nativeElement;
14040
- const tableElement = tableComponent.theTableElement.nativeElement;
14041
- let result = 0;
14071
+ let width = 0;
14072
+ let height = 0;
14073
+ let left = 0;
14074
+ let top = 0;
14075
+ const insertMarkSize = 19;
14076
+ const insertMarkBoundingClientRect = this.insertWrapper.nativeElement.getBoundingClientRect();
14077
+ const tableViewportRect = getTableViewportRect(this.editor, table);
14042
14078
  if (this.type === 'row') {
14043
- result = tableWrapper.offsetWidth;
14079
+ width = tableViewportRect.right - insertMarkBoundingClientRect.right;
14080
+ height = 1;
14081
+ left = insertMarkBoundingClientRect.left + insertMarkSize;
14082
+ top = insertMarkBoundingClientRect.top + insertMarkSize / 2;
14044
14083
  }
14045
14084
  else {
14046
- result = tableElement.offsetHeight - 1;
14085
+ width = 1;
14086
+ height = tableViewportRect.bottom - insertMarkBoundingClientRect.bottom;
14087
+ left = insertMarkBoundingClientRect.left + insertMarkSize / 2;
14088
+ top = insertMarkBoundingClientRect.top + insertMarkSize;
14089
+ if (this.isLastColumn()) {
14090
+ left = insertMarkBoundingClientRect.right;
14091
+ }
14047
14092
  }
14048
- return result + 'px';
14093
+ return { height: `${height}px`, width: `${width}px`, left: `${left}px`, top: `${top}px` };
14049
14094
  }
14050
14095
  }
14051
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: TheInsertMark, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component }); }
14052
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.0", type: TheInsertMark, isStandalone: true, selector: "the-table-insert-mark", inputs: { type: "type", at: "at", tableStore: "tableStore", parentElement: "parentElement" }, host: { classAttribute: "the-table-insert-mark" }, ngImport: i0, template: "<div\n [thyTooltip]=\"!disabled && tooltipContent\"\n class=\"the-table-controls-insert-wrapper\"\n [ngClass]=\"{ disabled: disabled }\"\n contenteditable=\"false\"\n (pointerdown)=\"preventDefault($event)\"\n (pointerup)=\"insert($event)\"\n (click)=\"preventDefault($event)\"\n (mouseup)=\"preventDefault($event)\"\n (mouseenter)=\"onMouseEnter($event)\"\n (mouseleave)=\"onMouseLeave($event)\"\n>\n <div\n class=\"the-table-controls-insert-line\"\n *ngIf=\"dotWrapperHovered\"\n [attr.data-dot-type]=\"type\"\n [ngStyle]=\"{ height: type === 'column' && insertLength, width: type === 'row' && insertLength }\"\n ></div>\n</div>\n", dependencies: [{ kind: "directive", type: ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] }); }
14096
+ isLastColumn() {
14097
+ const tablePosition = createTablePosition(this.editor);
14098
+ if (!tablePosition?.table) {
14099
+ return false;
14100
+ }
14101
+ return this.type === 'column' && this.at === tablePosition.getWidth();
14102
+ }
14103
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: TheInsertMark, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
14104
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.0", type: TheInsertMark, isStandalone: true, selector: "the-table-insert-mark", inputs: { type: "type", at: "at", tableStore: "tableStore", parentElement: "parentElement" }, host: { classAttribute: "the-table-insert-mark" }, viewQueries: [{ propertyName: "insertWrapper", first: true, predicate: ["insertWrapper"], descendants: true }], ngImport: i0, template: "<div\n #insertWrapper\n [thyTooltip]=\"!disabled && tooltipContent\"\n class=\"the-table-controls-insert-wrapper\"\n [ngClass]=\"{ disabled: disabled }\"\n contenteditable=\"false\"\n (pointerdown)=\"preventDefault($event)\"\n (pointerup)=\"insert($event)\"\n (click)=\"preventDefault($event)\"\n (mouseup)=\"preventDefault($event)\"\n (mouseenter)=\"onMouseEnter($event)\"\n (mouseleave)=\"onMouseLeave($event)\"\n>\n <div\n class=\"the-table-controls-insert-line\"\n *ngIf=\"dotWrapperHovered\"\n [ngStyle]=\"insertLineStyle\"\n ></div>\n</div>\n", dependencies: [{ kind: "directive", type: ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] }); }
14053
14105
  }
14054
14106
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: TheInsertMark, decorators: [{
14055
14107
  type: Component,
14056
14108
  args: [{ selector: 'the-table-insert-mark', host: {
14057
14109
  class: 'the-table-insert-mark'
14058
- }, standalone: true, imports: [ThyTooltipDirective, NgClass, NgIf, NgStyle], template: "<div\n [thyTooltip]=\"!disabled && tooltipContent\"\n class=\"the-table-controls-insert-wrapper\"\n [ngClass]=\"{ disabled: disabled }\"\n contenteditable=\"false\"\n (pointerdown)=\"preventDefault($event)\"\n (pointerup)=\"insert($event)\"\n (click)=\"preventDefault($event)\"\n (mouseup)=\"preventDefault($event)\"\n (mouseenter)=\"onMouseEnter($event)\"\n (mouseleave)=\"onMouseLeave($event)\"\n>\n <div\n class=\"the-table-controls-insert-line\"\n *ngIf=\"dotWrapperHovered\"\n [attr.data-dot-type]=\"type\"\n [ngStyle]=\"{ height: type === 'column' && insertLength, width: type === 'row' && insertLength }\"\n ></div>\n</div>\n" }]
14059
- }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i0.Renderer2 }], propDecorators: { type: [{
14110
+ }, standalone: true, imports: [ThyTooltipDirective, NgClass, NgIf, NgStyle], template: "<div\n #insertWrapper\n [thyTooltip]=\"!disabled && tooltipContent\"\n class=\"the-table-controls-insert-wrapper\"\n [ngClass]=\"{ disabled: disabled }\"\n contenteditable=\"false\"\n (pointerdown)=\"preventDefault($event)\"\n (pointerup)=\"insert($event)\"\n (click)=\"preventDefault($event)\"\n (mouseup)=\"preventDefault($event)\"\n (mouseenter)=\"onMouseEnter($event)\"\n (mouseleave)=\"onMouseLeave($event)\"\n>\n <div\n class=\"the-table-controls-insert-line\"\n *ngIf=\"dotWrapperHovered\"\n [ngStyle]=\"insertLineStyle\"\n ></div>\n</div>\n" }]
14111
+ }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i0.Renderer2 }, { type: i0.ElementRef }], propDecorators: { type: [{
14060
14112
  type: Input
14061
14113
  }], at: [{
14062
14114
  type: Input
@@ -14064,6 +14116,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.0", ngImpor
14064
14116
  type: Input
14065
14117
  }], parentElement: [{
14066
14118
  type: Input
14119
+ }], insertWrapper: [{
14120
+ type: ViewChild,
14121
+ args: ['insertWrapper']
14067
14122
  }] } });
14068
14123
 
14069
14124
  class TheTable extends TheBaseElement {
@@ -14219,8 +14274,9 @@ class TheTable extends TheBaseElement {
14219
14274
  }
14220
14275
  });
14221
14276
  setTimeout(() => {
14277
+ const isPrintMode = this.config.mode === TheMode.print;
14222
14278
  this.getWrapperWidthAndLeft();
14223
- if (this.config.mode === TheMode.print) {
14279
+ if (isPrintMode) {
14224
14280
  this.columns = calcPrintColumnWidth(this.element);
14225
14281
  }
14226
14282
  this.isFreezeRow = this.freezeRowPipe.transform(this.element, this.tablePluginOptions);
@@ -14231,11 +14287,13 @@ class TheTable extends TheBaseElement {
14231
14287
  this.subscribeCellPositionChange();
14232
14288
  this.listenOnSelectedCells();
14233
14289
  this.listenKeydownEvent();
14234
- this.listenKeyupEvent();
14235
14290
  this.listenSelectstartEvent();
14236
14291
  this.listenTableContextMenuEvent();
14237
14292
  this.listenTableWrapperScroll();
14238
14293
  this.subscribeScrollContainerScroll(this.tableWrapperLeft);
14294
+ if (isPrintMode) {
14295
+ this.cdr.markForCheck();
14296
+ }
14239
14297
  this.ngZone.runOutsideAngular(() => {
14240
14298
  merge(this.contextService.containerResized$, this.contextService.windowResized$)
14241
14299
  .pipe(takeUntil(this.destroy$))
@@ -14369,9 +14427,11 @@ class TheTable extends TheBaseElement {
14369
14427
  const hasColumns = this.element?.columns && this.colgroup?.nativeElement;
14370
14428
  let cellsWidth = [];
14371
14429
  let gridColumns = '';
14430
+ let colControlGridColumns = '';
14372
14431
  if (hasColumns) {
14373
14432
  cellsWidth = getColumnsWidth(this.colgroup.nativeElement);
14374
14433
  gridColumns = getGridColumns(headerRow, cellsWidth);
14434
+ colControlGridColumns = getGridColumns(colControl, this.element?.columns.map(item => item.width));
14375
14435
  }
14376
14436
  else {
14377
14437
  if (this.readonly) {
@@ -14383,17 +14443,17 @@ class TheTable extends TheBaseElement {
14383
14443
  const percent = +(100 / columnCount).toFixed(4);
14384
14444
  cellsWidth = new Array(columnCount).fill(percent);
14385
14445
  gridColumns = getGridColumns(headerRow, cellsWidth, '%');
14446
+ colControlGridColumns = getGridColumns(colControl, getColumnsWidth(colControl));
14386
14447
  }
14387
14448
  }
14388
14449
  const tablePadding = 44;
14389
14450
  // 序号列存在时, 表格宽度加序号列宽度
14390
14451
  // 只读模式下, 表格宽度不变
14391
14452
  const tableWidth = !this.readonly && this.element?.options?.numberedColumn ? this.tableWrapperWidth - tablePadding : this.tableWrapperWidth;
14392
- const stickyRows = this.isInTable ? [colControl, headerRow] : [headerRow];
14393
- stickyRows.map(item => {
14394
- this.renderer.setStyle(item, 'width', tableWidth + 'px');
14395
- this.renderer.setStyle(item, 'grid-template-columns', gridColumns);
14396
- });
14453
+ this.renderer.setStyle(headerRow, 'width', tableWidth + 'px');
14454
+ this.renderer.setStyle(headerRow, 'grid-template-columns', gridColumns);
14455
+ this.renderer.setStyle(colControl, 'width', tableWidth + 'px');
14456
+ this.renderer.setStyle(colControl, 'grid-template-columns', colControlGridColumns);
14397
14457
  }
14398
14458
  }
14399
14459
  getStickRowElements() {
@@ -14566,7 +14626,7 @@ class TheTable extends TheBaseElement {
14566
14626
  const tr = this.element.children[0];
14567
14627
  const columns = tr.children.map(cell => {
14568
14628
  return {
14569
- width: Number((this.tableWrapperWidth / tr.children.length - tr.children.length).toFixed(2))
14629
+ width: this.tableWrapperWidth / tr.children.length
14570
14630
  };
14571
14631
  });
14572
14632
  setNode(this.editor, { columns }, this.element);
@@ -14576,18 +14636,20 @@ class TheTable extends TheBaseElement {
14576
14636
  this.element.children.map((row, index$1) => {
14577
14637
  if (!row.height) {
14578
14638
  const element = TheEditor.toDOMNode(this.editor, row);
14579
- let height = getElementHeight(element);
14639
+ const height = getElementHeight(element);
14580
14640
  setNode(this.editor, { height }, row);
14581
14641
  }
14582
14642
  });
14583
14643
  }
14584
- transformRowHeight() {
14644
+ transformRowHeight(rowIndex) {
14585
14645
  const rowElements = this.nativeElement.querySelector('tbody').children;
14586
14646
  if (rowElements) {
14587
- [...rowElements].map((row, index$1) => {
14588
- let height = getElementHeight(row);
14589
- setNode(this.editor, { height }, this.element.children[index$1]);
14590
- });
14647
+ const elements = [...rowElements];
14648
+ const operateRow = elements[rowIndex];
14649
+ if (operateRow) {
14650
+ const height = getElementHeight(operateRow);
14651
+ setNode(this.editor, { height }, this.element.children[rowIndex]);
14652
+ }
14591
14653
  }
14592
14654
  }
14593
14655
  transformColumnsWidth() {
@@ -14750,17 +14812,6 @@ class TheTable extends TheBaseElement {
14750
14812
  });
14751
14813
  });
14752
14814
  }
14753
- listenKeyupEvent() {
14754
- this.ngZone.runOutsideAngular(() => {
14755
- fromEvent(document, 'keyup')
14756
- .pipe(takeUntil(this.destroy$), filter((e) => !!e))
14757
- .subscribe(e => {
14758
- if (e.key === 'Shift') {
14759
- this.tableStore.selectCellEnd();
14760
- }
14761
- });
14762
- });
14763
- }
14764
14815
  listenSelectstartEvent() {
14765
14816
  this.ngZone.runOutsideAngular(() => {
14766
14817
  fromEvent(document, 'selectstart')
@@ -14970,13 +15021,6 @@ class TheTd extends TheBaseElement {
14970
15021
  get tableElement() {
14971
15022
  return this.tableComponent?.theTableElement?.nativeElement;
14972
15023
  }
14973
- get scrollableElementTop() {
14974
- const containerElement = this.elementRef.nativeElement.closest(this.editor.options?.scrollContainer || DEFAULT_SCROLL_CONTAINER);
14975
- if (containerElement) {
14976
- return containerElement.getBoundingClientRect().top;
14977
- }
14978
- return -window.scrollY;
14979
- }
14980
15024
  get scrollableElementBottom() {
14981
15025
  const containerElement = this.elementRef.nativeElement.closest(this.editor.options?.scrollContainer || DEFAULT_SCROLL_CONTAINER);
14982
15026
  if (containerElement) {
@@ -15192,7 +15236,7 @@ class TheTd extends TheBaseElement {
15192
15236
  return null;
15193
15237
  }
15194
15238
  return value;
15195
- }))
15239
+ }), debounceTime(100))
15196
15240
  .subscribe(hoveredCellInfo => {
15197
15241
  if (hoveredCellInfo && hoveredCellInfo.position) {
15198
15242
  this.hoveredDirection = hoveredCellInfo.position;
@@ -15279,46 +15323,18 @@ class TheTd extends TheBaseElement {
15279
15323
  this.updateOverlayHandleSizeAndOffset();
15280
15324
  }
15281
15325
  updateOverlayHandleSizeAndOffset() {
15282
- this.overlayRef?.removePanelClass(['the-column-resize-handle-panel', ...this.rowResizeClass]);
15283
- this.isXAxisHover ? this.updateOverlayHandleColumnSize() : this.updateOverlayHandleRowSize();
15284
- this.overlayRef?.updatePositionStrategy(this.createPositionStrategy());
15326
+ this.overlayRef?.removePanelClass(this.rowResizeClass);
15327
+ const overlayHandleRect = this.getOverlayHandleRect();
15328
+ this.overlayRef?.updatePositionStrategy(this.createPositionStrategy(overlayHandleRect));
15285
15329
  this.resizeRef.setDirection(this.isXAxisHover ? 'X' : 'Y');
15286
15330
  this.resizeRef.setPosition(this.hoveredDirection);
15287
- }
15288
- updateOverlayHandleColumnSize() {
15289
- let height = 0;
15290
- const tableElementRect = this.tableElement.getBoundingClientRect();
15291
- const tableElementTop = tableElementRect.top;
15292
- const tableElementBottom = tableElementRect.bottom;
15293
- if (this.getIsStickyTopRow()) {
15294
- height = tableElementBottom - this.scrollableElementTop - TABLE_INSERT_MASK - TABLE_PADDING + TABLE_BORDER;
15295
- }
15296
- else if (tableElementTop < this.scrollableElementTop) {
15297
- height = this.tableElement.offsetHeight - (this.scrollableElementTop - tableElementTop);
15298
- const editor = this.elementRef.nativeElement.closest('the-editor');
15299
- const toolbar = editor.querySelector('.the-global-toolbar');
15300
- // 处理 toolbar 存在的时候减去内嵌工具栏高度
15301
- if (toolbar) {
15302
- height = height - toolbar.offsetHeight;
15303
- this.overlayRef.hostElement.style.marginTop = `${toolbar.offsetHeight}px`;
15304
- }
15305
- }
15306
- else if (tableElementBottom > this.scrollableElementBottom) {
15307
- height = this.tableElement.offsetHeight - (tableElementBottom - this.scrollableElementBottom);
15331
+ if (this.isXAxisHover) {
15332
+ this.overlayRef.updateSize({ height: overlayHandleRect.height, width: overlayHandleRect.width, maxHeight: 'inherit' });
15308
15333
  }
15309
15334
  else {
15310
- height = this.tableElement.offsetHeight;
15335
+ this.overlayRef.addPanelClass(this.rowResizeClass);
15336
+ this.overlayRef.updateSize({ height: overlayHandleRect.height, width: overlayHandleRect.width });
15311
15337
  }
15312
- this.overlayRef.updateSize({ height, width: OVERLAY_INIT_SIZE, maxHeight: 'inherit' });
15313
- }
15314
- getIsStickyTopRow() {
15315
- const newTableElement = this.tableComponent.nativeElement;
15316
- return newTableElement.className.includes(TableWithStickyRowClass);
15317
- }
15318
- updateOverlayHandleRowSize() {
15319
- const width = this.tableComponent.tableWrapper.nativeElement.offsetWidth;
15320
- this.overlayRef.addPanelClass(this.rowResizeClass);
15321
- this.overlayRef.updateSize({ width: width - 2, height: OVERLAY_INIT_SIZE });
15322
15338
  }
15323
15339
  applySize(deltaSize, previousSize) {
15324
15340
  // update col width and table width
@@ -15339,8 +15355,7 @@ class TheTd extends TheBaseElement {
15339
15355
  // over both cells and extending it down the table as needed.
15340
15356
  const overlayOption = this.isXAxisHover
15341
15357
  ? {
15342
- width: OVERLAY_INIT_SIZE + 'px',
15343
- panelClass: 'the-column-resize-handle-panel'
15358
+ width: OVERLAY_INIT_SIZE + 'px'
15344
15359
  }
15345
15360
  : {
15346
15361
  height: OVERLAY_INIT_SIZE + 'px',
@@ -15354,12 +15369,10 @@ class TheTd extends TheBaseElement {
15354
15369
  ...overlayOption
15355
15370
  });
15356
15371
  }
15357
- createPositionStrategy() {
15358
- let offsetY = this.calculateOverlayHandleOffsetY();
15359
- let offsetX = this.calculateOverlayHandleOffsetX();
15372
+ createPositionStrategy(overlayHandleRect) {
15360
15373
  const position = this.isXAxisHover
15361
- ? { ...POSITION_MAP[this.hoveredDirection], offsetY }
15362
- : { ...POSITION_MAP[this.hoveredDirection], offsetX };
15374
+ ? { ...POSITION_MAP[this.hoveredDirection], offsetY: overlayHandleRect?.top || 0 }
15375
+ : { ...POSITION_MAP[this.hoveredDirection], offsetX: overlayHandleRect?.left || 0 };
15363
15376
  return this.overlay
15364
15377
  .position()
15365
15378
  .flexibleConnectedTo(this.elementRef.nativeElement)
@@ -15368,27 +15381,27 @@ class TheTd extends TheBaseElement {
15368
15381
  .withPush(false)
15369
15382
  .withPositions([position]);
15370
15383
  }
15371
- calculateOverlayHandleOffsetY() {
15372
- const tableElementTop = this.tableElement.getBoundingClientRect().top;
15373
- if (this.getIsStickyTopRow()) {
15374
- /* 设置固定标题行后,第一个表格元素实际是第二行,第二行和第一行偏移的位置差一个 mask 和与顶部 padding 的位置,所以需要补齐 */
15375
- return (this.scrollableElementTop -
15376
- this.elementRef.nativeElement.getBoundingClientRect().top +
15377
- TABLE_INSERT_MASK +
15378
- TABLE_PADDING -
15379
- TABLE_BORDER);
15380
- }
15381
- if (tableElementTop < this.scrollableElementTop) {
15382
- return this.scrollableElementTop - this.elementRef.nativeElement.getBoundingClientRect().top;
15384
+ getOverlayHandleRect() {
15385
+ const tableViewportRect = getTableViewportRect(this.editor, this.tableComponent.element);
15386
+ const cellRect = this.elementRef.nativeElement.getBoundingClientRect();
15387
+ const top = tableViewportRect.top - cellRect.top;
15388
+ const left = tableViewportRect.left - cellRect.left;
15389
+ let width = 0;
15390
+ let height = 0;
15391
+ if (this.isXAxisHover) {
15392
+ width = OVERLAY_INIT_SIZE;
15393
+ height = tableViewportRect.bottom - tableViewportRect.top;
15383
15394
  }
15384
15395
  else {
15385
- return tableElementTop - this.elementRef.nativeElement.getBoundingClientRect().top;
15396
+ width = tableViewportRect.right - tableViewportRect.left;
15397
+ height = OVERLAY_INIT_SIZE;
15386
15398
  }
15387
- }
15388
- calculateOverlayHandleOffsetX() {
15389
- const cellElementLeft = this.elementRef.nativeElement.getBoundingClientRect().left;
15390
- const tableElementLeft = this.tableElement.getBoundingClientRect().left;
15391
- return tableElementLeft - cellElementLeft + this.scrollableElementLeft;
15399
+ return {
15400
+ top,
15401
+ left,
15402
+ width,
15403
+ height
15404
+ };
15392
15405
  }
15393
15406
  applyColumnSize(deltaX) {
15394
15407
  const cols = [...this.tableElement.querySelector('colgroup').children];
@@ -15486,7 +15499,6 @@ class TheTd extends TheBaseElement {
15486
15499
  }
15487
15500
  applyRowSize(deltaY) {
15488
15501
  const rows = [...this.tableElement.querySelector('tbody').children];
15489
- this.resizingStore.storeTableHeight(rows);
15490
15502
  this.resizingStore.initDirection(deltaY, this.isXAxisHover);
15491
15503
  let rowIndex = this.elementRef.nativeElement.parentElement.rowIndex - 1; // subtract thead's tr
15492
15504
  if (this.hoveredDirection === Position.top) {
@@ -15495,69 +15507,29 @@ class TheTd extends TheBaseElement {
15495
15507
  const rowSpan = this.elementRef.nativeElement.rowSpan;
15496
15508
  const bottomRowIndex = rowIndex + (rowSpan - 1) + 1;
15497
15509
  if (deltaY > 0) {
15498
- this.applyBottomRows(rows, deltaY, bottomRowIndex);
15499
- if (this.resizingStore.isRestoring(deltaY, this.isXAxisHover)) {
15500
- deltaY = this.resizingStore.restoreTopRows(deltaY);
15501
- }
15502
- if (deltaY > 0) {
15503
- let initHeight = getElementHeight(rows[rowIndex]);
15504
- rows[rowIndex].style.height = coerceCssPixelValue(initHeight + deltaY);
15505
- }
15510
+ this.applyTargetRow(rows, deltaY, bottomRowIndex);
15511
+ const rowHeight = getElementHeight(rows[rowIndex]);
15512
+ rows[rowIndex].style.height = coerceCssPixelValue(rowHeight + deltaY);
15506
15513
  }
15507
15514
  else {
15508
- let addDeltaY = this.resizingStore.getAddTableHeight(deltaY);
15509
- const _delta = this.applyTopRows(rows, deltaY, rowIndex);
15510
- if (_delta === deltaY) {
15511
- // can not resize
15512
- return;
15513
- }
15514
- deltaY = deltaY - _delta;
15515
- if (this.resizingStore.isRestoring(deltaY, this.isXAxisHover)) {
15516
- if (addDeltaY < 0) {
15517
- deltaY = this.resizingStore.restoreBottomRows(deltaY);
15518
- }
15519
- }
15515
+ this.applyTargetRow(rows, deltaY, rowIndex);
15520
15516
  }
15521
15517
  }
15522
- applyTopRows(rows, deltaY, rowIndex) {
15523
- while (deltaY < 0 && rows[rowIndex]) {
15518
+ applyTargetRow(rows, deltaY, rowIndex) {
15519
+ if (deltaY < 0 && rows[rowIndex]) {
15520
+ const minHeightPx = this.tableOptions.minHeightPx;
15524
15521
  const rowOffsetHeight = getElementHeight(rows[rowIndex]);
15525
- if (rowOffsetHeight > this.tableOptions.minHeightPx) {
15526
- if (this.resizingStore.isResizing(deltaY, this.isXAxisHover)) {
15527
- this.resizingStore.storeResizingRow(rows[rowIndex]);
15528
- }
15529
- if (rowOffsetHeight > this.tableOptions.minHeightPx + Math.abs(deltaY)) {
15530
- rows[rowIndex].style.height = coerceCssPixelValue(rowOffsetHeight - Math.abs(deltaY));
15531
- deltaY = 0;
15532
- }
15533
- else {
15534
- deltaY += rowOffsetHeight - this.tableOptions.minHeightPx;
15535
- rows[rowIndex].style.height = coerceCssPixelValue(this.tableOptions.minHeightPx);
15536
- }
15537
- }
15538
- rowIndex--;
15539
- }
15540
- return deltaY;
15541
- }
15542
- applyBottomRows(rows, deltaY, rowIndex) {
15543
- while (rows[rowIndex] && deltaY > 0) {
15544
- const rowOffsetHeight = getElementHeight(rows[rowIndex]);
15545
- if (rowOffsetHeight > this.tableOptions.minHeightPx) {
15546
- if (this.resizingStore.isResizing(deltaY, this.isXAxisHover)) {
15547
- this.resizingStore.storeResizingRow(rows[rowIndex]);
15548
- }
15549
- if (rowOffsetHeight > deltaY + this.tableOptions.minHeightPx) {
15550
- rows[rowIndex].style.height = coerceCssPixelValue(rowOffsetHeight - deltaY);
15551
- deltaY = 0;
15522
+ if (rowOffsetHeight > minHeightPx) {
15523
+ let currentHeight;
15524
+ if (rowOffsetHeight > minHeightPx + Math.abs(deltaY)) {
15525
+ currentHeight = rowOffsetHeight - Math.abs(deltaY);
15552
15526
  }
15553
15527
  else {
15554
- deltaY -= rowOffsetHeight - this.tableOptions.minHeightPx;
15555
- rows[rowIndex].style.height = coerceCssPixelValue(this.tableOptions.minHeightPx);
15528
+ currentHeight = minHeightPx;
15556
15529
  }
15530
+ rows[rowIndex].style.height = coerceCssPixelValue(currentHeight);
15557
15531
  }
15558
- rowIndex++;
15559
15532
  }
15560
- return deltaY;
15561
15533
  }
15562
15534
  //#region
15563
15535
  ngOnDestroy() {
@@ -16678,7 +16650,7 @@ class TheEditorComponent {
16678
16650
  return;
16679
16651
  }
16680
16652
  if (isKeyHotkey('mod+a', event) && !event.defaultPrevented) {
16681
- this.handleSelectAll();
16653
+ this.handleSelectAll(event);
16682
16654
  }
16683
16655
  };
16684
16656
  this.onClick = (event) => {
@@ -16958,8 +16930,8 @@ class TheEditorComponent {
16958
16930
  mousedown(event) {
16959
16931
  this.editor.mousedown(event);
16960
16932
  }
16961
- handleSelectAll() {
16962
- let node;
16933
+ handleSelectAll(event) {
16934
+ let node = null;
16963
16935
  if (!this.editor.selection) {
16964
16936
  setEndSelection(this.editor);
16965
16937
  }
@@ -16983,7 +16955,15 @@ class TheEditorComponent {
16983
16955
  }
16984
16956
  }
16985
16957
  if (!node) {
16986
- Transforms.select(this.editor, []);
16958
+ let range = Editor.range(this.editor, []);
16959
+ // If the first element is of block-card type,
16960
+ // clicking delete does not trigger the underlying beforeinput event,
16961
+ // resulting in ineffective deletion #WIK-15396.
16962
+ if (this.editor.isBlockCard(this.editor.children[0])) {
16963
+ const [anchor, focus] = Range.edges(range, { reverse: true });
16964
+ range = { anchor, focus };
16965
+ }
16966
+ Transforms.select(this.editor, range);
16987
16967
  }
16988
16968
  event.preventDefault();
16989
16969
  return;
@@ -17349,5 +17329,5 @@ const withTestPlugin = (plugins, initValue) => {
17349
17329
  * Generated bundle index. Do not edit.
17350
17330
  */
17351
17331
 
17352
- export { ALIGN_BLOCK_TYPES, A_TAG_REL_ATTR, AlignEditor, Alignment, BLOCK_DELETE_BACKWARD_TYPES, BasicTest, BlockquoteEditor, CLIPBOARD_FORMAT_KEY, CODEMIRROR_PADDING_TOP, CODE_MODES, CONTAINER_BLOCKS, CONTROL_KEY, CodeEditor, ColorEditor, ColumnResizeNotifierSource, ColumnResizingStore, DEFAULT_LANGUAGE, DEFAULT_SCROLL_CONTAINER, DISABLED_OPERATE_TYPES, DataTransferFaker, DefaultElementOptions, DefaultGlobalToolbarDefinition, DefaultInlineToolbarDefinition, DefaultPluginMenu, DropdownMode, ELEMENT_UNIQUE_ID, EditorPresetConfigFactoryMock, ElementKinds, ErrorCodes, FontSizeTypes, FontSizes, HEADING_TYPES, HeadingEditor, HoveredCellInfo, HrEditor, IS_MAC, ImageEditor, IndentEditor, Indents, InlineCodeEditor, LINK_DEFAULT_TEXT, LIST_BLOCK_TYPES, LayoutTypes, LinkEditor, ListEditor, MarkEditor, MarkProps, MarkTypes, MentionEditor, PICTURE_ACCEPTED_UPLOAD_MIME, PICTURE_ACCEPTED_UPLOAD_SIZE, PluginKeys, PluginMenuIcons, PluginMenuSvgs, Position, QuickInsertEditor, ResizeRef, SLA_TABLE_CELL_SELECTOR, SLA_TABLE_SELECTOR, STANDARD_HEADING_TYPES, ScrollDirection, SpecialBackgroundColor, TAB_SPACE, THE_EDITOR_BG_COLOR, THE_EDITOR_COLOR, THE_EDITOR_CONVERSION_HINT_REF, THE_EDITOR_ORIGIN_ANCHOR, THE_EDITOR_POPOVER_REF, THE_EDITOR_PREVIOUS_SELECTION, THE_EDITOR_UUID, THE_INLINE_TOOLBAR_TYPES, THE_LISTBOX_PARENT_GROUP_TOKEN, THE_LISTBOX_PARENT_OPTION_TOKEN, THE_LISTBOX_TOKEN, THE_MODE_PROVIDER, THE_MODE_TOKEN, THE_PLUGIN_MENU_REF, THE_PRESET_CONFIG_TOKEN, THE_UPLOAD_SERVICE_TOKEN, TableCellEventDispatcher, TableEditor, TableHeaderBackgroundColor, TablePosition, TheBaseElement, TheBaseSuggestion, TheBaseToolbarDropdown, TheBaseToolbarItem, TheColumnResizeDirective, TheColumnResizeOverlayHandle, TheContextMenu, TheContextService, TheConversionHint, TheDataMode, TheDefaultElement, TheEditor, TheEditorComponent, TheEditorModule, TheImage, TheInlineToolbar, TheListboxDirective, TheListboxGroupDirective, TheListboxOptionDirective, TheMode, TheModeConfig, ThePluginMenu, ThePluginMenuComponent, ThePluginMenuItemType, ThePreventDefaultDirective, index$1 as TheQueries, TheTableSelect, TheTemplate, TheText, TheToolbarComponent, TheToolbarDropdown, TheToolbarGroup, TheToolbarGroupToken, TheToolbarItem, TheToolbarService, index as TheTransforms, TodoItemEditor, ToolbarActionTypes, ToolbarAlignment, ToolbarItemType, ToolbarMoreGroup, VOID_BLOCK_TYPES, VerticalAlignEditor, VerticalAlignment, ZERO_WIDTH_CHAR, autoFocus, base64toBlob, bottomLeftPosition, buildPluginMenu, buildPluginMenuItemMap, calcPrintColumnWidth, calcSpanForColumn, calcSpanForRow, calculateHeaderRowHeight, calculateRowControls, coercePixelsFromCssValue, combinePlugins, copyNode, copyNodeForSafari, createCell, createEmptyContent, createEmptyParagraph, createMentionPlugin, createPluginFactory, createRow, createTable, createTablePosition, createTest1Plugin, createTestPlugin, createToolbar, createVerticalAlignPlugin, customPluginMock, customPluginMockKey, dataDeserialize, dataSerializing, deleteElementKey, errorImageUrlMock, extractFragment, filterTextFormat, fixBlockWithoutParagraph, fixBlockWithoutText, flattenDeepPlugins, getCellPositionsFromRange, getColsTotalWidth, getColumnsWidth, getDirtyElements, getEditorUUID, getElementClassByPrefix, getElementHeight, getElementWidth, getEndBlock, getGridColumns, getMode, getNextCell, getOriginCell, getPlugin, getPluginOptions, getPlugins, getRowsTotalHeight, getSelectCellNode, getSelectedCellPositions, getStartBlock, getTableByCell, getTableByRow, getToolbarClass, hasHeaderRow, headingOptions, htmlToTheia, idCreator, inValidTypes, initializeDefaultMenuIcons, insertDataByInvalidType, internalPlugins, isCleanEmptyParagraph, isColorIndicator, isColorInput, isColorPanel, isDirectionKeydown, isInside, isMobileMode, isPrintMode, isPureEmptyParagraph, isRangeInTable, isRectangularInTableCells, isSelectedAllCell, isSelectionInTable, isVirtualKey, matchOptions, mergeArray, mergeDeepPlugins, mergeElementOptions, mergeOptions, nestedStructureByKey, normalizeValue, originOptions, plainToTheia, pluginKey, pluginKey1, pluginsByKey, reSelection, recursionNodes, refocus, scrollIntoView, setEditorUUID, theTethysIconRegistryFaker, topLeftPosition, uniqueCellPosition, updatePopoverPosition, useElementStyle, withMention, withTestPlugin, withTheia };
17332
+ export { ALIGN_BLOCK_TYPES, A_TAG_REL_ATTR, AlignEditor, Alignment, BLOCK_DELETE_BACKWARD_TYPES, BasicTest, BlockquoteEditor, CLIPBOARD_FORMAT_KEY, CODEMIRROR_PADDING_TOP, CODE_MODES, CONTAINER_BLOCKS, CONTROL_KEY, CodeEditor, ColorEditor, ColumnResizeNotifierSource, ColumnResizingStore, DEFAULT_LANGUAGE, DEFAULT_SCROLL_CONTAINER, DISABLED_OPERATE_TYPES, DataTransferFaker, DefaultElementOptions, DefaultGlobalToolbarDefinition, DefaultInlineToolbarDefinition, DefaultPluginMenu, DropdownMode, ELEMENT_UNIQUE_ID, EditorPresetConfigFactoryMock, ElementKinds, ErrorCodes, FontSizeTypes, FontSizes, HEADING_TYPES, HeadingEditor, HoveredCellInfo, HrEditor, IS_MAC, ImageEditor, IndentEditor, Indents, InlineCodeEditor, LINK_DEFAULT_TEXT, LIST_BLOCK_TYPES, LayoutTypes, LinkEditor, ListEditor, MarkEditor, MarkProps, MarkTypes, MentionEditor, PICTURE_ACCEPTED_UPLOAD_MIME, PICTURE_ACCEPTED_UPLOAD_SIZE, PluginKeys, PluginMenuIcons, PluginMenuSvgs, Position, QuickInsertEditor, ResizeRef, SLA_TABLE_CELL_SELECTOR, SLA_TABLE_SELECTOR, STANDARD_HEADING_TYPES, ScrollDirection, SpecialBackgroundColor, TAB_SPACE, THE_EDITOR_BG_COLOR, THE_EDITOR_COLOR, THE_EDITOR_CONVERSION_HINT_REF, THE_EDITOR_ORIGIN_ANCHOR, THE_EDITOR_POPOVER_REF, THE_EDITOR_PREVIOUS_SELECTION, THE_EDITOR_UUID, THE_LISTBOX_PARENT_GROUP_TOKEN, THE_LISTBOX_PARENT_OPTION_TOKEN, THE_LISTBOX_TOKEN, THE_MODE_PROVIDER, THE_MODE_TOKEN, THE_PLUGIN_MENU_REF, THE_PRESET_CONFIG_TOKEN, THE_UPLOAD_SERVICE_TOKEN, TableCellEventDispatcher, TableEditor, TableHeaderBackgroundColor, TablePosition, TheBaseElement, TheBaseSuggestion, TheBaseToolbarDropdown, TheBaseToolbarItem, TheColumnResizeDirective, TheColumnResizeOverlayHandle, TheContextMenu, TheContextService, TheConversionHint, TheDataMode, TheDefaultElement, TheEditor, TheEditorComponent, TheEditorModule, TheImage, TheInlineToolbar, TheListboxDirective, TheListboxGroupDirective, TheListboxOptionDirective, TheMode, TheModeConfig, ThePluginMenu, ThePluginMenuComponent, ThePluginMenuItemType, ThePreventDefaultDirective, index$1 as TheQueries, TheTableSelect, TheTemplate, TheText, TheToolbarComponent, TheToolbarDropdown, TheToolbarGroup, TheToolbarGroupToken, TheToolbarItem, TheToolbarService, index as TheTransforms, TodoItemEditor, ToolbarActionTypes, ToolbarAlignment, ToolbarItemType, ToolbarMoreGroup, VOID_BLOCK_TYPES, VerticalAlignEditor, VerticalAlignment, ZERO_WIDTH_CHAR, autoFocus, base64toBlob, bottomLeftPosition, buildPluginMenu, buildPluginMenuItemMap, buildQuickInsertMenus, calcPrintColumnWidth, calcSpanForColumn, calcSpanForRow, calculateHeaderRowHeight, calculateRowControls, coercePixelsFromCssValue, combinePlugins, copyNode, copyNodeForSafari, createCell, createEmptyContent, createEmptyParagraph, createMentionPlugin, createPluginFactory, createRow, createTable, createTablePosition, createTest1Plugin, createTestPlugin, createToolbar, createVerticalAlignPlugin, customPluginMock, customPluginMockKey, dataDeserialize, dataSerializing, deleteElementKey, errorImageUrlMock, extractFragment, filterTextFormat, fixBlockWithoutParagraph, fixBlockWithoutText, flattenDeepPlugins, getCellPositionsFromRange, getColsTotalWidth, getColumnsWidth, getDirtyElements, getEditorScrollContainer, getEditorUUID, getElementClassByPrefix, getElementHeight, getElementWidth, getEndBlock, getGridColumns, getMode, getNextCell, getOriginCell, getPlugin, getPluginOptions, getPlugins, getRowsTotalHeight, getSelectCellNode, getSelectedCellPositions, getStartBlock, getTableByCell, getTableByRow, getToolbarClass, hasHeaderRow, headingOptions, htmlToTheia, idCreator, inValidTypes, initializeDefaultMenuIcons, insertDataByInvalidType, internalPlugins, isCleanEmptyParagraph, isColorIndicator, isColorInput, isColorPanel, isDirectionKeydown, isInside, isMobileMode, isPrintMode, isPureEmptyParagraph, isRangeInTable, isRectangularInTableCells, isSelectedAllCell, isSelectionInTable, isVirtualKey, matchOptions, mergeArray, mergeDeepPlugins, mergeElementOptions, mergeOptions, nestedStructureByKey, normalizeValue, originOptions, plainToTheia, pluginKey, pluginKey1, pluginsByKey, reSelection, recursionNodes, refocus, scrollIntoView, setEditorUUID, theTethysIconRegistryFaker, topLeftPosition, uniqueCellPosition, updatePopoverPosition, useElementStyle, withMention, withTestPlugin, withTheia };
17353
17333
  //# sourceMappingURL=worktile-theia.mjs.map