@worktile/theia 14.3.9 → 14.3.10

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 (97) hide show
  1. package/components/contextmenu/contextmenu.component.d.ts +3 -2
  2. package/components/contextmenu/contextmenu.component.scss +7 -0
  3. package/components/index.d.ts +11 -0
  4. package/components/index.scss +10 -0
  5. package/constants/index.d.ts +1 -0
  6. package/editor.module.d.ts +6 -5
  7. package/esm2020/components/action/prevent-default.mjs +4 -4
  8. package/esm2020/components/color-select/color-select.component.mjs +4 -4
  9. package/esm2020/components/column-resize/column-resize-notifier.mjs +4 -4
  10. package/esm2020/components/column-resize/column-resize.directive.mjs +4 -4
  11. package/esm2020/components/column-resize/column-resize.module.mjs +9 -9
  12. package/esm2020/components/column-resize/event-dispatcher.mjs +4 -4
  13. package/esm2020/components/column-resize/overlay-handle.component.mjs +4 -4
  14. package/esm2020/components/column-resize/resizing.store.mjs +4 -4
  15. package/esm2020/components/contextmenu/contextmenu.component.mjs +15 -9
  16. package/esm2020/components/conversion-hint/conversion-hint.component.mjs +4 -4
  17. package/esm2020/components/element/element.component.mjs +4 -4
  18. package/esm2020/components/index.mjs +12 -0
  19. package/esm2020/components/inline-toolbar/inline-toolbar.component.mjs +4 -4
  20. package/esm2020/components/listbox/listbox.mjs +10 -10
  21. package/esm2020/components/plugin-menu/plugin-menu.component.mjs +4 -4
  22. package/esm2020/components/table-select/table-select.component.mjs +4 -4
  23. package/esm2020/components/template/template.component.mjs +4 -4
  24. package/esm2020/components/text/text.component.mjs +4 -4
  25. package/esm2020/components/toolbar/toolbar.component.mjs +4 -4
  26. package/esm2020/components/toolbar-dropdown/toolbar-dropdown.component.mjs +4 -4
  27. package/esm2020/components/toolbar-group/toolbar-group.component.mjs +4 -4
  28. package/esm2020/components/toolbar-item/toolbar-item.component.mjs +4 -4
  29. package/esm2020/constants/index.mjs +2 -1
  30. package/esm2020/core/toolbar-item/base-toolbar-item.mjs +7 -7
  31. package/esm2020/editor.component.mjs +4 -4
  32. package/esm2020/editor.module.mjs +10 -7
  33. package/esm2020/interfaces/view-base.mjs +4 -4
  34. package/esm2020/pipes.mjs +7 -7
  35. package/esm2020/plugins/blockquote/blockquote.component.mjs +4 -4
  36. package/esm2020/plugins/code/code.component.mjs +4 -4
  37. package/esm2020/plugins/color/toolbar-item.component.mjs +4 -4
  38. package/esm2020/plugins/hr/hr.component.mjs +4 -4
  39. package/esm2020/plugins/image/image.component.mjs +4 -4
  40. package/esm2020/plugins/indent/indent.editor.mjs +10 -4
  41. package/esm2020/plugins/indent/on-keydown-indent.mjs +5 -1
  42. package/esm2020/plugins/inline-code/inline-code.component.mjs +4 -4
  43. package/esm2020/plugins/link/edit/link-edit.component.mjs +4 -4
  44. package/esm2020/plugins/link/hover/link-hover.component.mjs +4 -4
  45. package/esm2020/plugins/link/link.component.mjs +7 -7
  46. package/esm2020/plugins/list/components/bulleted-list.component.mjs +5 -5
  47. package/esm2020/plugins/list/components/list-item.component.mjs +4 -4
  48. package/esm2020/plugins/list/components/numbered-list.component.mjs +5 -5
  49. package/esm2020/plugins/mention/suggestion.component.mjs +4 -4
  50. package/esm2020/plugins/quick-insert/components/quick-insert.component.mjs +4 -4
  51. package/esm2020/plugins/table/components/insert-mark/insert-mark.component.mjs +5 -13
  52. package/esm2020/plugins/table/components/row/row.component.mjs +4 -4
  53. package/esm2020/plugins/table/components/table.component.mjs +43 -30
  54. package/esm2020/plugins/table/components/td/td.component.mjs +22 -20
  55. package/esm2020/plugins/table/components/toolbar/table-options.component.mjs +5 -5
  56. package/esm2020/plugins/table/components/toolbar/table-toolbar.component.mjs +26 -6
  57. package/esm2020/plugins/table/table.editor.mjs +76 -17
  58. package/esm2020/plugins/table/table.pipe.mjs +9 -6
  59. package/esm2020/plugins/table/table.service.mjs +9 -8
  60. package/esm2020/plugins/table/table.store.mjs +35 -20
  61. package/esm2020/plugins/table/table.types.mjs +8 -1
  62. package/esm2020/plugins/table/toolbar-item.component.mjs +4 -4
  63. package/esm2020/plugins/table/transforms/index.mjs +8 -0
  64. package/esm2020/plugins/table/transforms/insert-column.mjs +6 -2
  65. package/esm2020/plugins/table/transforms/insert-row.mjs +36 -29
  66. package/esm2020/plugins/table/utils/index.mjs +3 -2
  67. package/esm2020/plugins/table/utils/is-selection-in-table.mjs +20 -1
  68. package/esm2020/plugins/table/utils/set-menu-cell-invisibility.mjs +37 -7
  69. package/esm2020/plugins/todo-item/todo-item.component.mjs +5 -5
  70. package/esm2020/plugins/vertical-align/toolbar-item.component.mjs +4 -4
  71. package/esm2020/public-api.mjs +4 -12
  72. package/esm2020/services/color-select.service.mjs +4 -4
  73. package/esm2020/services/context.service.mjs +4 -4
  74. package/esm2020/services/table-contextmenu.service.mjs +100 -13
  75. package/esm2020/services/toolbar.service.mjs +4 -4
  76. package/fesm2015/worktile-theia.mjs +1362 -1088
  77. package/fesm2015/worktile-theia.mjs.map +1 -1
  78. package/fesm2020/worktile-theia.mjs +1360 -1089
  79. package/fesm2020/worktile-theia.mjs.map +1 -1
  80. package/package.json +1 -1
  81. package/plugins/table/components/mixins.scss +11 -0
  82. package/plugins/table/components/table.component.d.ts +10 -6
  83. package/plugins/table/components/table.component.scss +3 -11
  84. package/plugins/table/components/td/td.component.d.ts +3 -1
  85. package/plugins/table/components/toolbar/table-toolbar.component.d.ts +5 -2
  86. package/plugins/table/table.editor.d.ts +8 -4
  87. package/plugins/table/table.pipe.d.ts +1 -1
  88. package/plugins/table/table.service.d.ts +2 -2
  89. package/plugins/table/table.store.d.ts +7 -0
  90. package/plugins/table/table.types.d.ts +10 -1
  91. package/plugins/table/transforms/index.d.ts +7 -0
  92. package/plugins/table/utils/index.d.ts +2 -1
  93. package/plugins/table/utils/is-selection-in-table.d.ts +7 -1
  94. package/plugins/table/utils/set-menu-cell-invisibility.d.ts +6 -1
  95. package/public-api.d.ts +3 -11
  96. package/services/table-contextmenu.service.d.ts +16 -3
  97. package/styles/index.scss +1 -9
@@ -2,7 +2,7 @@ import * as i2 from '@angular/common';
2
2
  import { DOCUMENT, CommonModule } from '@angular/common';
3
3
  import * as i0 from '@angular/core';
4
4
  import { Component, ChangeDetectionStrategy, HostBinding, InjectionToken, Pipe, TemplateRef, ViewChild, Directive, Input, HostListener, ViewContainerRef, Inject, Injectable, ChangeDetectorRef, ElementRef, Optional, SkipSelf, ContentChildren, EventEmitter, Output, ViewChildren, forwardRef, NgModule } from '@angular/core';
5
- import * as i2$2 from '@angular/forms';
5
+ import * as i3 from '@angular/forms';
6
6
  import { NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
7
7
  import * as i1 from 'slate-angular';
8
8
  import { BaseElementComponent, BaseTextComponent, NODE_TO_PARENT, NODE_TO_INDEX, AngularEditor, hotkeys, IS_SAFARI, ELEMENT_TO_COMPONENT, hasBlockCard, isCardLeft, FAKE_RIGHT_BLOCK_CARD_OFFSET, getPlainText as getPlainText$1, EDITOR_TO_ELEMENT, withAngular, SlateModule } from 'slate-angular';
@@ -16,7 +16,7 @@ import * as i1$1 from 'ngx-tethys/popover';
16
16
  import { ThyPopover, ThyPopoverModule } from 'ngx-tethys/popover';
17
17
  import * as i2$1 from '@angular/cdk/overlay';
18
18
  import { Overlay, OverlayModule } from '@angular/cdk/overlay';
19
- import * as i3 from 'ngx-tethys/icon';
19
+ import * as i4 from 'ngx-tethys/icon';
20
20
  import { ThyIconModule } from 'ngx-tethys/icon';
21
21
  import * as i5 from 'ngx-tethys/action';
22
22
  import { ThyActionModule } from 'ngx-tethys/action';
@@ -26,7 +26,7 @@ import * as i8 from 'ngx-tethys/tooltip';
26
26
  import { ThyTooltipModule } from 'ngx-tethys/tooltip';
27
27
  import * as i12 from 'ngx-tethys/divider';
28
28
  import { ThyDividerComponent, ThyDividerModule } from 'ngx-tethys/divider';
29
- import * as i2$3 from '@angular/cdk/scrolling';
29
+ import * as i2$2 from '@angular/cdk/scrolling';
30
30
  import { CdkScrollable, ScrollingModule } from '@angular/cdk/scrolling';
31
31
  import { mixinUnsubscribe, MixinBase, ScrollToService } from 'ngx-tethys/core';
32
32
  import { isKeyHotkey, isHotkey } from 'is-hotkey';
@@ -46,20 +46,22 @@ import marked from 'marked';
46
46
  import * as i1$3 from 'ngx-tethys/alert';
47
47
  import { ThyAlertModule } from 'ngx-tethys/alert';
48
48
  import { ThyUploadStatus } from 'ngx-tethys/upload';
49
- import * as i4 from 'ngx-tethys/image';
49
+ import * as i4$1 from 'ngx-tethys/image';
50
50
  import { ThyImageModule } from 'ngx-tethys/image';
51
51
  import * as i9$1 from 'ngx-tethys/progress';
52
52
  import { ThyProgressModule } from 'ngx-tethys/progress';
53
53
  import isUrl from 'is-url';
54
54
  import * as i3$1 from 'ngx-tethys/form';
55
55
  import { ThyFormModule } from 'ngx-tethys/form';
56
- import * as i4$1 from 'ngx-tethys/shared';
56
+ import * as i5$2 from 'ngx-tethys/shared';
57
57
  import { ThySharedModule } from 'ngx-tethys/shared';
58
58
  import * as i6$1 from 'ngx-tethys/button';
59
59
  import { ThyButtonModule } from 'ngx-tethys/button';
60
60
  import * as i10$1 from 'ngx-tethys/empty';
61
61
  import { ThyEmptyModule } from 'ngx-tethys/empty';
62
62
  import { DOWN_ARROW, UP_ARROW, RIGHT_ARROW, LEFT_ARROW, ENTER } from '@angular/cdk/keycodes';
63
+ import * as i7 from 'ngx-tethys/input-number';
64
+ import { ThyInputNumberModule } from 'ngx-tethys/input-number';
63
65
  import { coerceCssPixelValue } from '@angular/cdk/coercion';
64
66
  import { PortalInjector, ComponentPortal } from '@angular/cdk/portal';
65
67
  import { ThyAutocompleteModule } from 'ngx-tethys/autocomplete';
@@ -98,9 +100,9 @@ class TheBaseElementComponent extends BaseElementComponent {
98
100
  this.nativeElement.classList.add(`slate-element-${this.element.type}`, blockClass);
99
101
  }
100
102
  }
101
- TheBaseElementComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheBaseElementComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
102
- TheBaseElementComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: TheBaseElementComponent, selector: "TheBaseElementComponent", usesInheritance: true, ngImport: i0, template: '', isInline: true });
103
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheBaseElementComponent, decorators: [{
103
+ TheBaseElementComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheBaseElementComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
104
+ TheBaseElementComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: TheBaseElementComponent, selector: "TheBaseElementComponent", usesInheritance: true, ngImport: i0, template: '', isInline: true });
105
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheBaseElementComponent, decorators: [{
104
106
  type: Component,
105
107
  args: [{
106
108
  selector: 'TheBaseElementComponent',
@@ -114,9 +116,9 @@ class TheDefaultElementComponent extends TheBaseElementComponent {
114
116
  return (_a = this.element) === null || _a === void 0 ? void 0 : _a.indent;
115
117
  }
116
118
  }
117
- TheDefaultElementComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheDefaultElementComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
118
- TheDefaultElementComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: TheDefaultElementComponent, selector: "[theDefaultElement]", host: { properties: { "attr.the-indent": "this.indent" } }, usesInheritance: true, ngImport: i0, template: '<slate-children [children]="children" [context]="childrenContext" [viewContext]="viewContext"></slate-children>', isInline: true, dependencies: [{ kind: "component", type: i1.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
119
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheDefaultElementComponent, decorators: [{
119
+ TheDefaultElementComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheDefaultElementComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
120
+ TheDefaultElementComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: TheDefaultElementComponent, selector: "[theDefaultElement]", host: { properties: { "attr.the-indent": "this.indent" } }, usesInheritance: true, ngImport: i0, template: '<slate-children [children]="children" [context]="childrenContext" [viewContext]="viewContext"></slate-children>', isInline: true, dependencies: [{ kind: "component", type: i1.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
121
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheDefaultElementComponent, decorators: [{
120
122
  type: Component,
121
123
  args: [{
122
124
  selector: '[theDefaultElement]',
@@ -740,6 +742,68 @@ const initializeDefaultMenuIcons = (iconRegistry) => {
740
742
  }
741
743
  };
742
744
 
745
+ const Colors = [
746
+ '#FFFFFF',
747
+ '#333333',
748
+ '#FF0100',
749
+ '#FFDA00',
750
+ '#A4E143',
751
+ '#38D9F0',
752
+ '#4EA8EE',
753
+ '#9570E7',
754
+ '#F3F3F3',
755
+ '#CCCCCC',
756
+ '#FEF3F1',
757
+ '#FEFCDA',
758
+ '#EDF6E8',
759
+ '#E6FBFA',
760
+ '#EBF4FC',
761
+ '#F1EDF7',
762
+ '#DDDDDD',
763
+ '#A5A5A5',
764
+ '#FCD5D0',
765
+ '#F9EDA6',
766
+ '#D4E9D7',
767
+ '#C8E6EA',
768
+ '#CCE0F2',
769
+ '#DAD6EA',
770
+ '#888888',
771
+ '#494949',
772
+ '#EE7976',
773
+ '#E7B323',
774
+ '#99C191',
775
+ '#79C6CE',
776
+ '#6EAAD7',
777
+ '#9D8EC2',
778
+ '#41464C',
779
+ '#000000',
780
+ '#BF1A1E',
781
+ '#AD720E',
782
+ '#1C7232',
783
+ '#1C7892',
784
+ '#18439D',
785
+ '#521B78'
786
+ ];
787
+ const BackgroundColors = [
788
+ '#FFFFFF',
789
+ '#FACCCC',
790
+ '#FFEBCC',
791
+ '#FFFFCC',
792
+ '#CDE8CC',
793
+ '#CCE0F5',
794
+ '#EBD6FF',
795
+ '#F3F3F3',
796
+ '#F06665',
797
+ '#FFC266',
798
+ '#FFFF66',
799
+ '#66B966',
800
+ '#66A3E0',
801
+ '#C285FF'
802
+ ];
803
+ const SpecialTextColor = '#333333';
804
+ const SpecialBackgroundColor = '#FFFFFF';
805
+ const TableHeaderBackgroundColor = '#F3F3F3';
806
+
743
807
  class ElementStylePipe {
744
808
  transform(element, align) {
745
809
  const style = {};
@@ -752,9 +816,9 @@ class ElementStylePipe {
752
816
  return style;
753
817
  }
754
818
  }
755
- ElementStylePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ElementStylePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
756
- ElementStylePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.12", ngImport: i0, type: ElementStylePipe, name: "elementStyle" });
757
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ElementStylePipe, decorators: [{
819
+ ElementStylePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ElementStylePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
820
+ ElementStylePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.0", ngImport: i0, type: ElementStylePipe, name: "elementStyle" });
821
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ElementStylePipe, decorators: [{
758
822
  type: Pipe,
759
823
  args: [{
760
824
  name: 'elementStyle'
@@ -770,9 +834,9 @@ class ElementClassPipe {
770
834
  return classStr;
771
835
  }
772
836
  }
773
- ElementClassPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ElementClassPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
774
- ElementClassPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.12", ngImport: i0, type: ElementClassPipe, name: "elementClass" });
775
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ElementClassPipe, decorators: [{
837
+ ElementClassPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ElementClassPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
838
+ ElementClassPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.0", ngImport: i0, type: ElementClassPipe, name: "elementClass" });
839
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ElementClassPipe, decorators: [{
776
840
  type: Pipe,
777
841
  args: [{
778
842
  name: 'elementClass'
@@ -807,9 +871,9 @@ class TheTemplateComponent {
807
871
  };
808
872
  }
809
873
  }
810
- TheTemplateComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheTemplateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
811
- TheTemplateComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: TheTemplateComponent, selector: "the-template,[theTemplate]", viewQueries: [{ propertyName: "paragraphTemplate", first: true, predicate: ["paragraph"], descendants: true, read: TemplateRef, static: true }, { propertyName: "headingOneTemplate", first: true, predicate: ["headingOne"], descendants: true, read: TemplateRef, static: true }, { propertyName: "headingTwoTemplate", first: true, predicate: ["headingTwo"], descendants: true, read: TemplateRef, static: true }, { propertyName: "headingThreeTemplate", first: true, predicate: ["headingThree"], descendants: true, read: TemplateRef, static: true }, { propertyName: "headingFourTemplate", first: true, predicate: ["headingFour"], descendants: true, read: TemplateRef, static: true }, { propertyName: "headingFiveTemplate", first: true, predicate: ["headingFive"], descendants: true, read: TemplateRef, static: true }, { propertyName: "headingSixTemplate", first: true, predicate: ["headingSix"], descendants: true, read: TemplateRef, static: true }], ngImport: i0, template: "<ng-template #paragraph let-context=\"context\" let-viewContext=\"viewContext\">\n <div theDefaultElement [context]=\"context\" [viewContext]=\"viewContext\" [ngStyle]=\"context.element | elementStyle\"></div>\n</ng-template>\n<ng-template #headingOne let-context=\"context\" let-viewContext=\"viewContext\">\n <h1\n theDefaultElement\n [context]=\"context\"\n [viewContext]=\"viewContext\"\n [attr.id]=\"context.element.key\"\n [ngStyle]=\"context.element | elementStyle\"\n ></h1>\n</ng-template>\n<ng-template #headingTwo let-context=\"context\" let-viewContext=\"viewContext\">\n <h2\n theDefaultElement\n [context]=\"context\"\n [viewContext]=\"viewContext\"\n [attr.id]=\"context.element.key\"\n [ngStyle]=\"context.element | elementStyle\"\n ></h2>\n</ng-template>\n<ng-template #headingThree let-context=\"context\" let-viewContext=\"viewContext\">\n <h3\n theDefaultElement\n [context]=\"context\"\n [viewContext]=\"viewContext\"\n [attr.id]=\"context.element.key\"\n [ngStyle]=\"context.element | elementStyle\"\n ></h3>\n</ng-template>\n<ng-template #headingFour let-context=\"context\" let-viewContext=\"viewContext\">\n <h4\n theDefaultElement\n [context]=\"context\"\n [viewContext]=\"viewContext\"\n [attr.id]=\"context.element.key\"\n [ngStyle]=\"context.element | elementStyle\"\n ></h4>\n</ng-template>\n<ng-template #headingFive let-context=\"context\" let-viewContext=\"viewContext\">\n <h5\n theDefaultElement\n [context]=\"context\"\n [viewContext]=\"viewContext\"\n [attr.id]=\"context.element.key\"\n [ngStyle]=\"context.element | elementStyle\"\n ></h5>\n</ng-template>\n<ng-template #headingSix let-context=\"context\" let-viewContext=\"viewContext\">\n <h6\n theDefaultElement\n [context]=\"context\"\n [viewContext]=\"viewContext\"\n [attr.id]=\"context.element.key\"\n [ngStyle]=\"context.element | elementStyle\"\n ></h6>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: TheDefaultElementComponent, selector: "[theDefaultElement]" }, { kind: "pipe", type: ElementStylePipe, name: "elementStyle" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
812
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheTemplateComponent, decorators: [{
874
+ TheTemplateComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheTemplateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
875
+ TheTemplateComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: TheTemplateComponent, selector: "the-template,[theTemplate]", viewQueries: [{ propertyName: "paragraphTemplate", first: true, predicate: ["paragraph"], descendants: true, read: TemplateRef, static: true }, { propertyName: "headingOneTemplate", first: true, predicate: ["headingOne"], descendants: true, read: TemplateRef, static: true }, { propertyName: "headingTwoTemplate", first: true, predicate: ["headingTwo"], descendants: true, read: TemplateRef, static: true }, { propertyName: "headingThreeTemplate", first: true, predicate: ["headingThree"], descendants: true, read: TemplateRef, static: true }, { propertyName: "headingFourTemplate", first: true, predicate: ["headingFour"], descendants: true, read: TemplateRef, static: true }, { propertyName: "headingFiveTemplate", first: true, predicate: ["headingFive"], descendants: true, read: TemplateRef, static: true }, { propertyName: "headingSixTemplate", first: true, predicate: ["headingSix"], descendants: true, read: TemplateRef, static: true }], ngImport: i0, template: "<ng-template #paragraph let-context=\"context\" let-viewContext=\"viewContext\">\n <div theDefaultElement [context]=\"context\" [viewContext]=\"viewContext\" [ngStyle]=\"context.element | elementStyle\"></div>\n</ng-template>\n<ng-template #headingOne let-context=\"context\" let-viewContext=\"viewContext\">\n <h1\n theDefaultElement\n [context]=\"context\"\n [viewContext]=\"viewContext\"\n [attr.id]=\"context.element.key\"\n [ngStyle]=\"context.element | elementStyle\"\n ></h1>\n</ng-template>\n<ng-template #headingTwo let-context=\"context\" let-viewContext=\"viewContext\">\n <h2\n theDefaultElement\n [context]=\"context\"\n [viewContext]=\"viewContext\"\n [attr.id]=\"context.element.key\"\n [ngStyle]=\"context.element | elementStyle\"\n ></h2>\n</ng-template>\n<ng-template #headingThree let-context=\"context\" let-viewContext=\"viewContext\">\n <h3\n theDefaultElement\n [context]=\"context\"\n [viewContext]=\"viewContext\"\n [attr.id]=\"context.element.key\"\n [ngStyle]=\"context.element | elementStyle\"\n ></h3>\n</ng-template>\n<ng-template #headingFour let-context=\"context\" let-viewContext=\"viewContext\">\n <h4\n theDefaultElement\n [context]=\"context\"\n [viewContext]=\"viewContext\"\n [attr.id]=\"context.element.key\"\n [ngStyle]=\"context.element | elementStyle\"\n ></h4>\n</ng-template>\n<ng-template #headingFive let-context=\"context\" let-viewContext=\"viewContext\">\n <h5\n theDefaultElement\n [context]=\"context\"\n [viewContext]=\"viewContext\"\n [attr.id]=\"context.element.key\"\n [ngStyle]=\"context.element | elementStyle\"\n ></h5>\n</ng-template>\n<ng-template #headingSix let-context=\"context\" let-viewContext=\"viewContext\">\n <h6\n theDefaultElement\n [context]=\"context\"\n [viewContext]=\"viewContext\"\n [attr.id]=\"context.element.key\"\n [ngStyle]=\"context.element | elementStyle\"\n ></h6>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: TheDefaultElementComponent, selector: "[theDefaultElement]" }, { kind: "pipe", type: ElementStylePipe, name: "elementStyle" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
876
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheTemplateComponent, decorators: [{
813
877
  type: Component,
814
878
  args: [{ selector: 'the-template,[theTemplate]', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-template #paragraph let-context=\"context\" let-viewContext=\"viewContext\">\n <div theDefaultElement [context]=\"context\" [viewContext]=\"viewContext\" [ngStyle]=\"context.element | elementStyle\"></div>\n</ng-template>\n<ng-template #headingOne let-context=\"context\" let-viewContext=\"viewContext\">\n <h1\n theDefaultElement\n [context]=\"context\"\n [viewContext]=\"viewContext\"\n [attr.id]=\"context.element.key\"\n [ngStyle]=\"context.element | elementStyle\"\n ></h1>\n</ng-template>\n<ng-template #headingTwo let-context=\"context\" let-viewContext=\"viewContext\">\n <h2\n theDefaultElement\n [context]=\"context\"\n [viewContext]=\"viewContext\"\n [attr.id]=\"context.element.key\"\n [ngStyle]=\"context.element | elementStyle\"\n ></h2>\n</ng-template>\n<ng-template #headingThree let-context=\"context\" let-viewContext=\"viewContext\">\n <h3\n theDefaultElement\n [context]=\"context\"\n [viewContext]=\"viewContext\"\n [attr.id]=\"context.element.key\"\n [ngStyle]=\"context.element | elementStyle\"\n ></h3>\n</ng-template>\n<ng-template #headingFour let-context=\"context\" let-viewContext=\"viewContext\">\n <h4\n theDefaultElement\n [context]=\"context\"\n [viewContext]=\"viewContext\"\n [attr.id]=\"context.element.key\"\n [ngStyle]=\"context.element | elementStyle\"\n ></h4>\n</ng-template>\n<ng-template #headingFive let-context=\"context\" let-viewContext=\"viewContext\">\n <h5\n theDefaultElement\n [context]=\"context\"\n [viewContext]=\"viewContext\"\n [attr.id]=\"context.element.key\"\n [ngStyle]=\"context.element | elementStyle\"\n ></h5>\n</ng-template>\n<ng-template #headingSix let-context=\"context\" let-viewContext=\"viewContext\">\n <h6\n theDefaultElement\n [context]=\"context\"\n [viewContext]=\"viewContext\"\n [attr.id]=\"context.element.key\"\n [ngStyle]=\"context.element | elementStyle\"\n ></h6>\n</ng-template>\n" }]
815
879
  }], propDecorators: { paragraphTemplate: [{
@@ -875,9 +939,9 @@ class TheTextComponent extends BaseTextComponent {
875
939
  this.applyTextMark();
876
940
  }
877
941
  }
878
- TheTextComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheTextComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
879
- TheTextComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: TheTextComponent, selector: "span[theText]", host: { attributes: { "data-slate-node": "text" } }, usesInheritance: true, ngImport: i0, template: `<slate-leaves [context]="context" [viewContext]="viewContext"></slate-leaves>`, isInline: true, dependencies: [{ kind: "component", type: i1.SlateLeavesComponent, selector: "slate-leaves", inputs: ["context"] }] });
880
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheTextComponent, decorators: [{
942
+ TheTextComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheTextComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
943
+ TheTextComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: TheTextComponent, selector: "span[theText]", host: { attributes: { "data-slate-node": "text" } }, usesInheritance: true, ngImport: i0, template: `<slate-leaves [context]="context" [viewContext]="viewContext"></slate-leaves>`, isInline: true, dependencies: [{ kind: "component", type: i1.SlateLeavesComponent, selector: "slate-leaves", inputs: ["context"] }] });
944
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheTextComponent, decorators: [{
881
945
  type: Component,
882
946
  args: [{
883
947
  selector: 'span[theText]',
@@ -2525,9 +2589,9 @@ class TheBaseToolbarItem {
2525
2589
  }
2526
2590
  }
2527
2591
  }
2528
- TheBaseToolbarItem.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheBaseToolbarItem, deps: [], target: i0.ɵɵFactoryTarget.Directive });
2529
- TheBaseToolbarItem.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.12", type: TheBaseToolbarItem, inputs: { toolbarItem: "toolbarItem", editor: "editor" }, host: { properties: { "class.disabled": "this.disabledState", "class.active": "this.activeState" } }, ngImport: i0 });
2530
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheBaseToolbarItem, decorators: [{
2592
+ TheBaseToolbarItem.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheBaseToolbarItem, deps: [], target: i0.ɵɵFactoryTarget.Directive });
2593
+ TheBaseToolbarItem.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.0", type: TheBaseToolbarItem, inputs: { toolbarItem: "toolbarItem", editor: "editor" }, host: { properties: { "class.disabled": "this.disabledState", "class.active": "this.activeState" } }, ngImport: i0 });
2594
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheBaseToolbarItem, decorators: [{
2531
2595
  type: Directive
2532
2596
  }], propDecorators: { toolbarItem: [{
2533
2597
  type: Input
@@ -2561,9 +2625,9 @@ class TheBaseToolbarDropdown extends TheBaseToolbarItem {
2561
2625
  }
2562
2626
  }
2563
2627
  }
2564
- TheBaseToolbarDropdown.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheBaseToolbarDropdown, deps: null, target: i0.ɵɵFactoryTarget.Directive });
2565
- TheBaseToolbarDropdown.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.12", type: TheBaseToolbarDropdown, inputs: { menus: "menus", mode: "mode", dropdownItemKey: "dropdownItemKey" }, usesInheritance: true, ngImport: i0 });
2566
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheBaseToolbarDropdown, decorators: [{
2628
+ TheBaseToolbarDropdown.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheBaseToolbarDropdown, deps: null, target: i0.ɵɵFactoryTarget.Directive });
2629
+ TheBaseToolbarDropdown.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.0", type: TheBaseToolbarDropdown, inputs: { menus: "menus", mode: "mode", dropdownItemKey: "dropdownItemKey" }, usesInheritance: true, ngImport: i0 });
2630
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheBaseToolbarDropdown, decorators: [{
2567
2631
  type: Directive
2568
2632
  }], propDecorators: { menus: [{
2569
2633
  type: Input
@@ -2688,9 +2752,9 @@ class TheToolbarDropdownComponent extends TheBaseToolbarDropdown {
2688
2752
  .withPositions([bottomPosition, topPosition]);
2689
2753
  }
2690
2754
  }
2691
- TheToolbarDropdownComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheToolbarDropdownComponent, deps: [{ token: i0.ElementRef }, { token: i1$1.ThyPopover }, { token: i0.ViewContainerRef }, { token: i2$1.Overlay }], target: i0.ɵɵFactoryTarget.Component });
2692
- TheToolbarDropdownComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: TheToolbarDropdownComponent, selector: "the-toolbar-dropdown", inputs: { itemMousedownHandle: "itemMousedownHandle" }, host: { properties: { "class": "this.className" } }, viewQueries: [{ propertyName: "iconModeTemplate", first: true, predicate: ["iconModeTemplate"], descendants: true, static: true }, { propertyName: "textModeTemplate", first: true, predicate: ["textModeTemplate"], descendants: true, static: true }, { propertyName: "dropdownTemplate", first: true, predicate: ["dropdownTemplate"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<a\n *ngIf=\"mode === dropdownMode.icon\"\n href=\"javascript:;\"\n class=\"icon-mode\"\n thyAction\n [thyActionIcon]=\"activeIcon\"\n [thyActionActive]=\"activeDropdown\"\n (mousedown)=\"preventDefault($event)\"\n (click)=\"toggleDropdown($event)\"\n>\n <thy-icon *ngIf=\"!toolbarItem.isHideDropdownActionIcon\" class=\"font-size-sm text-desc ml-1\" thyIconName=\"caret-down\"></thy-icon>\n</a>\n<a\n *ngIf=\"mode !== dropdownMode.icon\"\n href=\"javascript:;\"\n class=\"text-mode\"\n thyAction\n (mousedown)=\"preventDefault($event)\"\n (click)=\"toggleDropdown($event)\"\n>\n <span class=\"show-text\">{{ activeMenuItem?.name }}</span>\n <thy-icon class=\"font-size-sm text-desc ml-1\" thyIconName=\"caret-down\"></thy-icon>\n</a>\n\n<ng-template #dropdownTemplate>\n <div class=\"thy-dropdown-menu\">\n <ng-container *ngFor=\"let menu of menus\">\n <a\n *ngIf=\"menu.key !== 'split'\"\n class=\"d-flex justify-content-between text-secondary\"\n href=\"javascript:;\"\n thyDropdownMenuItem\n [ngStyle]=\"menu?.styles\"\n [thyDropdownMenuItemActive]=\"activeKeys.includes(menu.key)\"\n (mousedown)=\"preventDefault($event)\"\n (click)=\"itemMousedown($event, menu)\"\n >\n <div class=\"d-flex align-items-center\">\n <thy-icon\n class=\"text-secondary\"\n *ngIf=\"menu?.icon && mode === dropdownMode.icon\"\n thyDropdownMenuItemIcon\n [thyIconName]=\"menu.icon\"\n ></thy-icon>\n <span class=\"text-body\" *ngIf=\"menu?.name\" thyDropdownMenuItemName>{{ menu.name }}</span>\n </div>\n <div class=\"menu-item-right font-size-sm text-muted\" *ngIf=\"menu?.shortcutKey\">{{ menu.shortcutKey }}</div>\n </a>\n <thy-dropdown-menu-divider *ngIf=\"menu.key === 'split'\"></thy-dropdown-menu-divider>\n </ng-container>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i3.ThyIconComponent, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { kind: "component", type: i5.ThyActionComponent, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }, { kind: "component", type: i6.ThyDropdownMenuDividerComponent, selector: "thy-dropdown-menu-divider" }, { kind: "directive", type: i6.ThyDropdownMenuItemDirective, selector: "[thyDropdownMenuItem]", inputs: ["thyType", "thyDisabled"] }, { kind: "directive", type: i6.ThyDropdownMenuItemNameDirective, selector: "[thyDropdownMenuItemName]" }, { kind: "directive", type: i6.ThyDropdownMenuItemIconDirective, selector: "[thyDropdownMenuItemIcon]" }, { kind: "directive", type: i6.ThyDropdownMenuItemActiveDirective, selector: "[thyDropdownMenuItemActive]", inputs: ["thyDropdownMenuItemActive"] }] });
2693
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheToolbarDropdownComponent, decorators: [{
2755
+ TheToolbarDropdownComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheToolbarDropdownComponent, deps: [{ token: i0.ElementRef }, { token: i1$1.ThyPopover }, { token: i0.ViewContainerRef }, { token: i2$1.Overlay }], target: i0.ɵɵFactoryTarget.Component });
2756
+ TheToolbarDropdownComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: TheToolbarDropdownComponent, selector: "the-toolbar-dropdown", inputs: { itemMousedownHandle: "itemMousedownHandle" }, host: { properties: { "class": "this.className" } }, viewQueries: [{ propertyName: "iconModeTemplate", first: true, predicate: ["iconModeTemplate"], descendants: true, static: true }, { propertyName: "textModeTemplate", first: true, predicate: ["textModeTemplate"], descendants: true, static: true }, { propertyName: "dropdownTemplate", first: true, predicate: ["dropdownTemplate"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<a\n *ngIf=\"mode === dropdownMode.icon\"\n href=\"javascript:;\"\n class=\"icon-mode\"\n thyAction\n [thyActionIcon]=\"activeIcon\"\n [thyActionActive]=\"activeDropdown\"\n (mousedown)=\"preventDefault($event)\"\n (click)=\"toggleDropdown($event)\"\n>\n <thy-icon *ngIf=\"!toolbarItem.isHideDropdownActionIcon\" class=\"font-size-sm text-desc ml-1\" thyIconName=\"caret-down\"></thy-icon>\n</a>\n<a\n *ngIf=\"mode !== dropdownMode.icon\"\n href=\"javascript:;\"\n class=\"text-mode\"\n thyAction\n (mousedown)=\"preventDefault($event)\"\n (click)=\"toggleDropdown($event)\"\n>\n <span class=\"show-text\">{{ activeMenuItem?.name }}</span>\n <thy-icon class=\"font-size-sm text-desc ml-1\" thyIconName=\"caret-down\"></thy-icon>\n</a>\n\n<ng-template #dropdownTemplate>\n <div class=\"thy-dropdown-menu\">\n <ng-container *ngFor=\"let menu of menus\">\n <a\n *ngIf=\"menu.key !== 'split'\"\n class=\"d-flex justify-content-between text-secondary\"\n href=\"javascript:;\"\n thyDropdownMenuItem\n [ngStyle]=\"menu?.styles\"\n [thyDropdownMenuItemActive]=\"activeKeys.includes(menu.key)\"\n (mousedown)=\"preventDefault($event)\"\n (click)=\"itemMousedown($event, menu)\"\n >\n <div class=\"d-flex align-items-center\">\n <thy-icon\n class=\"text-secondary\"\n *ngIf=\"menu?.icon && mode === dropdownMode.icon\"\n thyDropdownMenuItemIcon\n [thyIconName]=\"menu.icon\"\n ></thy-icon>\n <span class=\"text-body\" *ngIf=\"menu?.name\" thyDropdownMenuItemName>{{ menu.name }}</span>\n </div>\n <div class=\"menu-item-right font-size-sm text-muted\" *ngIf=\"menu?.shortcutKey\">{{ menu.shortcutKey }}</div>\n </a>\n <thy-dropdown-menu-divider *ngIf=\"menu.key === 'split'\"></thy-dropdown-menu-divider>\n </ng-container>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i4.ThyIconComponent, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { kind: "component", type: i5.ThyActionComponent, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }, { kind: "component", type: i6.ThyDropdownMenuDividerComponent, selector: "thy-dropdown-menu-divider" }, { kind: "directive", type: i6.ThyDropdownMenuItemDirective, selector: "[thyDropdownMenuItem]", inputs: ["thyType", "thyDisabled"] }, { kind: "directive", type: i6.ThyDropdownMenuItemNameDirective, selector: "[thyDropdownMenuItemName]" }, { kind: "directive", type: i6.ThyDropdownMenuItemIconDirective, selector: "[thyDropdownMenuItemIcon]" }, { kind: "directive", type: i6.ThyDropdownMenuItemActiveDirective, selector: "[thyDropdownMenuItemActive]", inputs: ["thyDropdownMenuItemActive"] }] });
2757
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheToolbarDropdownComponent, decorators: [{
2694
2758
  type: Component,
2695
2759
  args: [{ selector: 'the-toolbar-dropdown', template: "<a\n *ngIf=\"mode === dropdownMode.icon\"\n href=\"javascript:;\"\n class=\"icon-mode\"\n thyAction\n [thyActionIcon]=\"activeIcon\"\n [thyActionActive]=\"activeDropdown\"\n (mousedown)=\"preventDefault($event)\"\n (click)=\"toggleDropdown($event)\"\n>\n <thy-icon *ngIf=\"!toolbarItem.isHideDropdownActionIcon\" class=\"font-size-sm text-desc ml-1\" thyIconName=\"caret-down\"></thy-icon>\n</a>\n<a\n *ngIf=\"mode !== dropdownMode.icon\"\n href=\"javascript:;\"\n class=\"text-mode\"\n thyAction\n (mousedown)=\"preventDefault($event)\"\n (click)=\"toggleDropdown($event)\"\n>\n <span class=\"show-text\">{{ activeMenuItem?.name }}</span>\n <thy-icon class=\"font-size-sm text-desc ml-1\" thyIconName=\"caret-down\"></thy-icon>\n</a>\n\n<ng-template #dropdownTemplate>\n <div class=\"thy-dropdown-menu\">\n <ng-container *ngFor=\"let menu of menus\">\n <a\n *ngIf=\"menu.key !== 'split'\"\n class=\"d-flex justify-content-between text-secondary\"\n href=\"javascript:;\"\n thyDropdownMenuItem\n [ngStyle]=\"menu?.styles\"\n [thyDropdownMenuItemActive]=\"activeKeys.includes(menu.key)\"\n (mousedown)=\"preventDefault($event)\"\n (click)=\"itemMousedown($event, menu)\"\n >\n <div class=\"d-flex align-items-center\">\n <thy-icon\n class=\"text-secondary\"\n *ngIf=\"menu?.icon && mode === dropdownMode.icon\"\n thyDropdownMenuItemIcon\n [thyIconName]=\"menu.icon\"\n ></thy-icon>\n <span class=\"text-body\" *ngIf=\"menu?.name\" thyDropdownMenuItemName>{{ menu.name }}</span>\n </div>\n <div class=\"menu-item-right font-size-sm text-muted\" *ngIf=\"menu?.shortcutKey\">{{ menu.shortcutKey }}</div>\n </a>\n <thy-dropdown-menu-divider *ngIf=\"menu.key === 'split'\"></thy-dropdown-menu-divider>\n </ng-container>\n </div>\n</ng-template>\n" }]
2696
2760
  }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1$1.ThyPopover }, { type: i0.ViewContainerRef }, { type: i2$1.Overlay }]; }, propDecorators: { className: [{
@@ -2734,8 +2798,8 @@ class TheToolbarItemComponent extends TheBaseToolbarItem {
2734
2798
  (_d = this.toolbarItem) === null || _d === void 0 ? void 0 : _d.execute(this.editor);
2735
2799
  }
2736
2800
  }
2737
- TheToolbarItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheToolbarItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2738
- TheToolbarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: TheToolbarItemComponent, selector: "the-toolbar-item", host: { listeners: { "mousedown": "toggleDropdown($event)" }, properties: { "class": "this.className" } }, usesInheritance: true, ngImport: i0, template: `
2801
+ TheToolbarItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheToolbarItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2802
+ TheToolbarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: TheToolbarItemComponent, selector: "the-toolbar-item", host: { listeners: { "mousedown": "toggleDropdown($event)" }, properties: { "class": "this.className" } }, usesInheritance: true, ngImport: i0, template: `
2739
2803
  <a
2740
2804
  href="javascript:;"
2741
2805
  thyAction
@@ -2749,7 +2813,7 @@ TheToolbarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0"
2749
2813
  ></a>
2750
2814
  <ng-template #tooltip let-data> {{ data?.name }} {{ data?.shortcutKey }} </ng-template>
2751
2815
  `, isInline: true, dependencies: [{ kind: "directive", type: i8.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { kind: "component", type: i5.ThyActionComponent, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }] });
2752
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheToolbarItemComponent, decorators: [{
2816
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheToolbarItemComponent, decorators: [{
2753
2817
  type: Component,
2754
2818
  args: [{
2755
2819
  selector: 'the-toolbar-item',
@@ -3003,9 +3067,9 @@ class TheToolbarComponent {
3003
3067
  return TheToolbarItemComponent;
3004
3068
  }
3005
3069
  }
3006
- TheToolbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheToolbarComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i0.NgZone }, { token: TheToolbarGroupToken }], target: i0.ɵɵFactoryTarget.Component });
3007
- TheToolbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: TheToolbarComponent, selector: "the-toolbar", inputs: { editor: "editor", toolbarItems: "toolbarItems", align: "align", containerClass: "containerClass", isMore: "isMore", afterTemplate: "afterTemplate" }, host: { properties: { "style.justifyContent": "this.justifyContent" }, classAttribute: "the-toolbar-container d-flex align-items-center" }, viewQueries: [{ propertyName: "toolbarContainer", first: true, predicate: ["toolbarContainer"], descendants: true, read: ViewContainerRef, static: true }], usesOnChanges: true, ngImport: i0, template: "<ng-container #toolbarContainer></ng-container>\n<ng-content></ng-content>\n<ng-template *ngIf=\"afterTemplate\" [ngTemplateOutlet]=\"afterTemplate\"></ng-template>\n", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
3008
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheToolbarComponent, decorators: [{
3070
+ TheToolbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheToolbarComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i0.NgZone }, { token: TheToolbarGroupToken }], target: i0.ɵɵFactoryTarget.Component });
3071
+ TheToolbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: TheToolbarComponent, selector: "the-toolbar", inputs: { editor: "editor", toolbarItems: "toolbarItems", align: "align", containerClass: "containerClass", isMore: "isMore", afterTemplate: "afterTemplate" }, host: { properties: { "style.justifyContent": "this.justifyContent" }, classAttribute: "the-toolbar-container d-flex align-items-center" }, viewQueries: [{ propertyName: "toolbarContainer", first: true, predicate: ["toolbarContainer"], descendants: true, read: ViewContainerRef, static: true }], usesOnChanges: true, ngImport: i0, template: "<ng-container #toolbarContainer></ng-container>\n<ng-content></ng-content>\n<ng-template *ngIf=\"afterTemplate\" [ngTemplateOutlet]=\"afterTemplate\"></ng-template>\n", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
3072
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheToolbarComponent, decorators: [{
3009
3073
  type: Component,
3010
3074
  args: [{ selector: 'the-toolbar', host: {
3011
3075
  class: 'the-toolbar-container d-flex align-items-center'
@@ -3081,9 +3145,9 @@ class TheContextService {
3081
3145
  this.uploadingFiles.splice(this.uploadingFiles.findIndex(item => item.url === file.url), 1);
3082
3146
  }
3083
3147
  }
3084
- TheContextService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheContextService, deps: [{ token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });
3085
- TheContextService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheContextService });
3086
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheContextService, decorators: [{
3148
+ TheContextService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheContextService, deps: [{ token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });
3149
+ TheContextService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheContextService });
3150
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheContextService, decorators: [{
3087
3151
  type: Injectable
3088
3152
  }], ctorParameters: function () { return [{ type: i0.NgZone }]; } });
3089
3153
 
@@ -3163,9 +3227,9 @@ class TheColorSelectComponent {
3163
3227
  this.popoverRef.close();
3164
3228
  }
3165
3229
  }
3166
- TheColorSelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheColorSelectComponent, deps: [{ token: i1$1.ThyPopoverRef }], target: i0.ɵɵFactoryTarget.Component });
3167
- TheColorSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: TheColorSelectComponent, selector: "the-color-select", inputs: { selectedColor: "selectedColor", selectAction: "selectAction", showCustom: "showCustom", colors: "colors", option: "option" }, host: { listeners: { "document: mousedown": "handleDocumentMouseDown($event)", "mousedown": "handleMouseDown($event)", "keydown": "handleKeydown($event)" } }, ngImport: i0, template: "<div class=\"color-container\">\n <div class=\"colors\">\n <div *ngFor=\"let row of selectColors; let rowIndex = index\">\n <span\n class=\"color-item\"\n *ngFor=\"let _color of row.rowValue; let i = index\"\n [ngClass]=\"_color.classMaps\"\n (mousedown)=\"_selectColor($event, _color.value)\"\n >\n <span [ngStyle]=\"{ background: _color.value }\">\n <thy-icon thyIconName=\"check\" [ngStyle]=\"{ color: row.tickColor }\"></thy-icon>\n </span>\n </span>\n </div>\n </div>\n <div *ngIf=\"option.showCustom\" class=\"select-color\">\n <span class=\"color\" [ngStyle]=\"{ background: selectedColor }\"></span>\n #\n <input\n thyInput\n maxlength=\"6\"\n (keydown.enter)=\"customInputColorEnter($event)\"\n onkeyup=\"value=value.replace(/[^0-9A-Fa-f]/g,'')\"\n class=\"value\"\n [(ngModel)]=\"customColor\"\n (ngModelChange)=\"colorChange(false)\"\n />\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i2$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i2$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3.ThyIconComponent, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { kind: "directive", type: i5$1.ThyInputDirective, selector: "input[thyInput], select[thyInput], textarea[thyInput]", inputs: ["thySize"], exportAs: ["thyInput"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
3168
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheColorSelectComponent, decorators: [{
3230
+ TheColorSelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheColorSelectComponent, deps: [{ token: i1$1.ThyPopoverRef }], target: i0.ɵɵFactoryTarget.Component });
3231
+ TheColorSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: TheColorSelectComponent, selector: "the-color-select", inputs: { selectedColor: "selectedColor", selectAction: "selectAction", showCustom: "showCustom", colors: "colors", option: "option" }, host: { listeners: { "document: mousedown": "handleDocumentMouseDown($event)", "mousedown": "handleMouseDown($event)", "keydown": "handleKeydown($event)" } }, ngImport: i0, template: "<div class=\"color-container\">\n <div class=\"colors\">\n <div *ngFor=\"let row of selectColors; let rowIndex = index\">\n <span\n class=\"color-item\"\n *ngFor=\"let _color of row.rowValue; let i = index\"\n [ngClass]=\"_color.classMaps\"\n (mousedown)=\"_selectColor($event, _color.value)\"\n >\n <span [ngStyle]=\"{ background: _color.value }\">\n <thy-icon thyIconName=\"check\" [ngStyle]=\"{ color: row.tickColor }\"></thy-icon>\n </span>\n </span>\n </div>\n </div>\n <div *ngIf=\"option.showCustom\" class=\"select-color\">\n <span class=\"color\" [ngStyle]=\"{ background: selectedColor }\"></span>\n #\n <input\n thyInput\n maxlength=\"6\"\n (keydown.enter)=\"customInputColorEnter($event)\"\n onkeyup=\"value=value.replace(/[^0-9A-Fa-f]/g,'')\"\n class=\"value\"\n [(ngModel)]=\"customColor\"\n (ngModelChange)=\"colorChange(false)\"\n />\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4.ThyIconComponent, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { kind: "directive", type: i5$1.ThyInputDirective, selector: "[thyInput]", inputs: ["thySize", "thyAutocomplete"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
3232
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheColorSelectComponent, decorators: [{
3169
3233
  type: Component,
3170
3234
  args: [{ selector: 'the-color-select', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"color-container\">\n <div class=\"colors\">\n <div *ngFor=\"let row of selectColors; let rowIndex = index\">\n <span\n class=\"color-item\"\n *ngFor=\"let _color of row.rowValue; let i = index\"\n [ngClass]=\"_color.classMaps\"\n (mousedown)=\"_selectColor($event, _color.value)\"\n >\n <span [ngStyle]=\"{ background: _color.value }\">\n <thy-icon thyIconName=\"check\" [ngStyle]=\"{ color: row.tickColor }\"></thy-icon>\n </span>\n </span>\n </div>\n </div>\n <div *ngIf=\"option.showCustom\" class=\"select-color\">\n <span class=\"color\" [ngStyle]=\"{ background: selectedColor }\"></span>\n #\n <input\n thyInput\n maxlength=\"6\"\n (keydown.enter)=\"customInputColorEnter($event)\"\n onkeyup=\"value=value.replace(/[^0-9A-Fa-f]/g,'')\"\n class=\"value\"\n [(ngModel)]=\"customColor\"\n (ngModelChange)=\"colorChange(false)\"\n />\n </div>\n</div>\n" }]
3171
3235
  }], ctorParameters: function () { return [{ type: i1$1.ThyPopoverRef }]; }, propDecorators: { selectedColor: [{
@@ -3230,9 +3294,9 @@ class TheColorSelectService {
3230
3294
  }
3231
3295
  }
3232
3296
  }
3233
- TheColorSelectService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheColorSelectService, deps: [{ token: i1$1.ThyPopover }], target: i0.ɵɵFactoryTarget.Injectable });
3234
- TheColorSelectService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheColorSelectService });
3235
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheColorSelectService, decorators: [{
3297
+ TheColorSelectService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheColorSelectService, deps: [{ token: i1$1.ThyPopover }], target: i0.ɵɵFactoryTarget.Injectable });
3298
+ TheColorSelectService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheColorSelectService });
3299
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheColorSelectService, decorators: [{
3236
3300
  type: Injectable
3237
3301
  }], ctorParameters: function () { return [{ type: i1$1.ThyPopover }]; } });
3238
3302
 
@@ -3270,6 +3334,13 @@ class TableOptions {
3270
3334
  this.typeContent = typeContent;
3271
3335
  }
3272
3336
  }
3337
+ var TableInsertType;
3338
+ (function (TableInsertType) {
3339
+ TableInsertType["insertRowsUp"] = "insert-rows-up";
3340
+ TableInsertType["insertRowsDown"] = "insert-rows-down";
3341
+ TableInsertType["insertColumnsLeft"] = "insert-columns-left";
3342
+ TableInsertType["insertColumnsRight"] = "insert-columns-right";
3343
+ })(TableInsertType || (TableInsertType = {}));
3273
3344
 
3274
3345
  /**
3275
3346
  * Create a new cell
@@ -3579,6 +3650,25 @@ function isSelectionInTable(opts, editor) {
3579
3650
  }
3580
3651
  return isRangeInTable(opts, editor, editor.selection);
3581
3652
  }
3653
+ /**
3654
+ * Whether the cells passed in can form a rectangle
3655
+ * @param cells
3656
+ * @returns boolean
3657
+ */
3658
+ function isRectangularInTableCells(cells) {
3659
+ const { row, col } = cells[0];
3660
+ let maxCol = col;
3661
+ let minCol = col;
3662
+ let maxRow = row;
3663
+ let minRow = row;
3664
+ for (const cell of cells) {
3665
+ maxCol = cell.col > maxCol ? cell.col : maxCol;
3666
+ minCol = cell.col < minCol ? cell.col : minCol;
3667
+ maxRow = cell.row > maxRow ? cell.row : maxRow;
3668
+ minRow = cell.row < minRow ? cell.row : minRow;
3669
+ }
3670
+ return (maxRow + 1 - minRow) * (maxCol + 1 - minCol) === cells.length;
3671
+ }
3582
3672
 
3583
3673
  function calcSpanForRow(table, targetIndex) {
3584
3674
  const rowspans = [];
@@ -3653,125 +3743,6 @@ function isInside(cellRect, rowIndex, columnIndex) {
3653
3743
  return false;
3654
3744
  }
3655
3745
 
3656
- function addColumns(table, columnsCount, insertIndex) {
3657
- if (table.columns.length < columnsCount) {
3658
- if (!insertIndex && insertIndex !== 0) {
3659
- insertIndex = table.columns.length;
3660
- }
3661
- const opts = new TableOptions();
3662
- let columns = table.columns.slice(0, columnsCount).map(item => {
3663
- return { width: item.width };
3664
- });
3665
- const preTotalWidth = table.columns.reduce((prevValue, column) => {
3666
- return prevValue + column.width;
3667
- }, 0);
3668
- for (let i = 0; i < columnsCount - table.columns.length; i++) {
3669
- columns.splice(insertIndex, 0, { width: opts.defaultWidth });
3670
- }
3671
- const currentTotalWidth = columns.reduce((prevValue, column) => {
3672
- return prevValue + column.width;
3673
- }, 0);
3674
- const percentage = preTotalWidth / currentTotalWidth;
3675
- return columns.map((column, index) => {
3676
- const width = Math.round(column.width * percentage > opts.minWidthPx ? column.width * percentage : opts.minWidthPx);
3677
- return { width };
3678
- });
3679
- }
3680
- return table.columns;
3681
- }
3682
-
3683
- /**
3684
- * Insert a new column in current table
3685
- */
3686
- function insertColumn(opts, editor, count = 1, at, // Column index
3687
- getCell) {
3688
- const { selection } = editor;
3689
- const { anchor: { path } } = selection;
3690
- const tablePosition = TablePosition.create(opts, editor, path);
3691
- const { table, tableEntry } = tablePosition;
3692
- const insertColumnIndex = typeof at === 'undefined' ? tablePosition.getColumnIndex() + 1 : at;
3693
- // Insert the new cell
3694
- Editor.withoutNormalizing(editor, () => {
3695
- const colspan = calcSpanForColumn(table, insertColumnIndex);
3696
- for (let i = 0; i < count; i++) {
3697
- table.children.forEach((row, rowIndex) => {
3698
- const isInside = colspan[rowIndex];
3699
- const newCell = getCell ? getCell(insertColumnIndex, rowIndex) : createCell(opts);
3700
- if (isInside) {
3701
- newCell.hidden = true;
3702
- const dirtyCell = row.children.find((cell, columnIndex) => !cell.hidden &&
3703
- columnIndex < insertColumnIndex &&
3704
- cell.colspan &&
3705
- cell.colspan + columnIndex > insertColumnIndex);
3706
- if (dirtyCell) {
3707
- Transforms.setNodes(editor, { colspan: dirtyCell.colspan + 1 }, {
3708
- at: tablePosition.tableEntry[1].concat(rowIndex).concat(row.children.indexOf(dirtyCell))
3709
- });
3710
- }
3711
- }
3712
- Transforms.insertNodes(editor, [newCell], {
3713
- at: tablePosition.tableEntry[1].concat(rowIndex).concat(insertColumnIndex)
3714
- });
3715
- });
3716
- }
3717
- if (table.columns) {
3718
- Transforms.setNodes(editor, { columns: addColumns(table, table.columns.length + 1, insertColumnIndex) }, { at: tableEntry[1] });
3719
- }
3720
- });
3721
- }
3722
- /**
3723
- * Insert new column in the row
3724
- */
3725
- function insertColumnAtRow(opts, editor, count = 1, tableEntry, rowIndex, columnIndex, getCell) {
3726
- Editor.withoutNormalizing(editor, () => {
3727
- for (let i = 0; i < count; i++) {
3728
- const newCell = getCell ? getCell(columnIndex, rowIndex) : createCell(opts);
3729
- Transforms.insertNodes(editor, [newCell], {
3730
- at: tableEntry[1].concat([rowIndex, columnIndex])
3731
- });
3732
- }
3733
- });
3734
- }
3735
-
3736
- /**
3737
- * Insert a new row in current table
3738
- */
3739
- function insertRow(opts, editor, count = 1, at // row index
3740
- ) {
3741
- const tablePosition = TablePosition.create(opts, editor, editor.selection.anchor.path);
3742
- const { table, row } = tablePosition;
3743
- // Create a new row with the right count of cells
3744
- const columns = table.children[0].children.length;
3745
- const newRows = [];
3746
- const rowIndex = tablePosition.getRowIndex();
3747
- const insertRowIndex = typeof at === 'undefined' ? rowIndex + 1 : at;
3748
- for (let i = 0; i < count; i++) {
3749
- const newRow = createRow(opts, columns);
3750
- newRows.push(newRow);
3751
- }
3752
- if (newRows.length === 1) {
3753
- const rowspan = calcSpanForRow(table, insertRowIndex);
3754
- newRows[0].children.forEach((cell, columnIndex) => {
3755
- const isInside = rowspan[columnIndex];
3756
- if (isInside) {
3757
- cell.hidden = true;
3758
- const dirtyRow = table.children.find((row, rowIndex) => !row.children[columnIndex].hidden &&
3759
- rowIndex < insertRowIndex &&
3760
- row.children[columnIndex].rowspan &&
3761
- row.children[columnIndex].rowspan + rowIndex > insertRowIndex);
3762
- if (dirtyRow) {
3763
- Transforms.setNodes(editor, { rowspan: dirtyRow.children[columnIndex].rowspan + 1 }, {
3764
- at: tablePosition.tableEntry[1].concat(table.children.indexOf(dirtyRow)).concat(columnIndex)
3765
- });
3766
- }
3767
- }
3768
- });
3769
- }
3770
- Transforms.insertNodes(editor, newRows, {
3771
- at: tablePosition.tableEntry[1].concat(insertRowIndex)
3772
- });
3773
- }
3774
-
3775
3746
  const setMarks = (editor, marks, at) => {
3776
3747
  Transforms.setNodes(editor, marks, {
3777
3748
  at,
@@ -4017,85 +3988,146 @@ function insertTable(opts, editor, rows = 3, columns = 3, getCellContent) {
4017
3988
  insertElements(editor, table);
4018
3989
  }
4019
3990
 
3991
+ function getInsertRowState(opts, editor, count = 1, at) {
3992
+ const tablePosition = TablePosition.create(opts, editor, editor.selection.anchor.path);
3993
+ let table = tablePosition.table;
3994
+ let tableEntry = tablePosition.tableEntry;
3995
+ // Create a new row with the right count of cells
3996
+ const columns = table.children[0].children.length;
3997
+ const rowIndex = tablePosition.getRowIndex();
3998
+ const insertRowIndex = typeof at === 'undefined' ? rowIndex + 1 : at;
3999
+ return { table, tableEntry, columns, rowIndex, insertRowIndex };
4000
+ }
4001
+ function packNewRow(opts, editor, count = 1, at) {
4002
+ const { table, tableEntry, columns, insertRowIndex } = getInsertRowState(opts, editor, count, at);
4003
+ const rowspan = calcSpanForRow(table, insertRowIndex);
4004
+ const newRow = createRow(opts, columns);
4005
+ newRow.children.forEach((cell, columnIndex) => {
4006
+ const isInside = rowspan[columnIndex];
4007
+ if (isInside) {
4008
+ cell.hidden = true;
4009
+ const dirtyRow = table.children.find((row, rowIndex) => !row.children[columnIndex].hidden &&
4010
+ rowIndex < insertRowIndex &&
4011
+ row.children[columnIndex].rowspan &&
4012
+ row.children[columnIndex].rowspan + rowIndex > insertRowIndex);
4013
+ if (dirtyRow) {
4014
+ Transforms.setNodes(editor, { rowspan: dirtyRow.children[columnIndex].rowspan + 1 }, {
4015
+ at: tableEntry[1].concat(table.children.indexOf(dirtyRow)).concat(columnIndex)
4016
+ });
4017
+ }
4018
+ }
4019
+ });
4020
+ return newRow;
4021
+ }
4020
4022
  /**
4021
- * Clear the content of the given cell
4023
+ * Insert a new row in current table
4022
4024
  */
4023
- function clearCell(opts, editor, cellEntry) {
4024
- Transforms.removeNodes(editor, { at: cellEntry[1] });
4025
- const cellNode = Object.assign(Object.assign({}, cellEntry[0]), createCell(opts));
4026
- Transforms.insertNodes(editor, Object.assign({}, cellNode), { at: cellEntry[1] });
4025
+ function insertRow(opts, editor, count = 1, at // row index
4026
+ ) {
4027
+ const { tableEntry, insertRowIndex } = getInsertRowState(opts, editor, count, at);
4028
+ const newRows = [];
4029
+ for (let i = 0; i < count; i++) {
4030
+ const newRow = packNewRow(opts, editor, count, at);
4031
+ newRows.push(newRow);
4032
+ }
4033
+ Transforms.insertNodes(editor, newRows, {
4034
+ at: tableEntry[1].concat(insertRowIndex)
4035
+ });
4027
4036
  }
4028
4037
 
4029
- function removeColumns(table, columnsCount, index) {
4030
- if (table.columns.length > columnsCount) {
4031
- let removeColumns = [];
4032
- if ((index && index > 0) || index === 0) {
4033
- removeColumns = table.columns.slice(index, index + 1);
4034
- }
4035
- else {
4036
- removeColumns = table.columns.slice(columnsCount);
4038
+ function addColumns(table, columnsCount, insertIndex) {
4039
+ if (table.columns.length < columnsCount) {
4040
+ if (!insertIndex && insertIndex !== 0) {
4041
+ insertIndex = table.columns.length;
4037
4042
  }
4038
- if (removeColumns.length) {
4039
- const addWidth = removeColumns.reduce((totalWidth, cell) => {
4040
- return (totalWidth += cell.width);
4041
- }, 0) / columnsCount;
4042
- return table.columns
4043
- .filter(item => !removeColumns.includes(item))
4044
- .map(item => {
4045
- return { width: item.width + Math.round(addWidth) };
4046
- });
4043
+ const opts = new TableOptions();
4044
+ let columns = table.columns.slice(0, columnsCount).map(item => {
4045
+ return { width: item.width };
4046
+ });
4047
+ const preTotalWidth = table.columns.reduce((prevValue, column) => {
4048
+ return prevValue + column.width;
4049
+ }, 0);
4050
+ for (let i = 0; i < columnsCount - table.columns.length; i++) {
4051
+ columns.splice(insertIndex, 0, { width: opts.defaultWidth });
4047
4052
  }
4053
+ const currentTotalWidth = columns.reduce((prevValue, column) => {
4054
+ return prevValue + column.width;
4055
+ }, 0);
4056
+ const percentage = preTotalWidth / currentTotalWidth;
4057
+ return columns.map((column, index) => {
4058
+ const width = Math.round(column.width * percentage > opts.minWidthPx ? column.width * percentage : opts.minWidthPx);
4059
+ return { width };
4060
+ });
4048
4061
  }
4049
4062
  return table.columns;
4050
4063
  }
4051
4064
 
4052
- function removeColumn(opts, editor, selectColIndex) {
4065
+ /**
4066
+ * Insert a new column in current table
4067
+ */
4068
+ function insertColumn(opts, editor, count = 1, at, // Column index
4069
+ getCell) {
4053
4070
  const { selection } = editor;
4054
4071
  const { anchor: { path } } = selection;
4055
4072
  const tablePosition = TablePosition.create(opts, editor, path);
4056
- const { tableEntry, table, row, cellEntry: [cellNode, cellPath] } = tablePosition;
4057
- const rows = tableEntry[0].children;
4058
- selectColIndex = selectColIndex === undefined ? [...cellPath].pop() : selectColIndex;
4073
+ let table = tablePosition.table;
4074
+ let tableEntry = tablePosition.tableEntry;
4075
+ const insertColumnIndex = typeof at === 'undefined' ? tablePosition.getColumnIndex() + 1 : at;
4076
+ // Insert the new cell
4059
4077
  Editor.withoutNormalizing(editor, () => {
4060
- table.children.map((row, rowIndex) => {
4061
- const dirtyCell = row.children.find((cell, columnIndex) => !cell.hidden && columnIndex < selectColIndex && cell.colspan && cell.colspan + columnIndex > selectColIndex);
4062
- if (dirtyCell) {
4063
- const colspan = dirtyCell.colspan - 1 > 1 ? dirtyCell.colspan - 1 : null;
4064
- Transforms.setNodes(editor, { colspan }, {
4065
- at: tablePosition.tableEntry[1].concat(rowIndex).concat(row.children.indexOf(dirtyCell))
4066
- });
4067
- }
4068
- const removeCell = row.children[selectColIndex];
4069
- const nextCell = row.children[selectColIndex + 1];
4070
- if (nextCell && nextCell.hidden && removeCell.colspan > 1) {
4071
- const colspan = removeCell.colspan - 1 > 1 ? removeCell.colspan - 1 : null;
4072
- Transforms.setNodes(editor, { colspan, rowspan: removeCell.rowspan || null, hidden: null }, { at: tablePosition.tableEntry[1].concat(rowIndex).concat(row.children.indexOf(nextCell)) });
4073
- }
4074
- });
4075
- });
4076
- // Remove the cell from every row
4077
- Editor.withoutNormalizing(editor, () => {
4078
- if (tablePosition.getWidth() > 1) {
4079
- rows.forEach((row, rowIndex) => {
4080
- const at = tableEntry[1].concat([rowIndex, selectColIndex]);
4081
- Transforms.removeNodes(editor, { at });
4078
+ const colspan = calcSpanForColumn(table, insertColumnIndex);
4079
+ for (let i = 0; i < count; i++) {
4080
+ table.children.forEach((row, rowIndex) => {
4081
+ const isInside = colspan[rowIndex];
4082
+ const newCell = getCell ? getCell(insertColumnIndex, rowIndex) : createCell(opts);
4083
+ if (isInside) {
4084
+ newCell.hidden = true;
4085
+ const dirtyCell = row.children.find((cell, columnIndex) => !cell.hidden &&
4086
+ columnIndex < insertColumnIndex &&
4087
+ cell.colspan &&
4088
+ cell.colspan + columnIndex > insertColumnIndex);
4089
+ if (dirtyCell) {
4090
+ Transforms.setNodes(editor, { colspan: dirtyCell.colspan + 1 }, {
4091
+ at: tablePosition.tableEntry[1].concat(rowIndex).concat(row.children.indexOf(dirtyCell))
4092
+ });
4093
+ const position = TablePosition.create(opts, editor, path);
4094
+ table = position.table;
4095
+ tableEntry = position.tableEntry;
4096
+ }
4097
+ }
4098
+ Transforms.insertNodes(editor, [newCell], {
4099
+ at: tablePosition.tableEntry[1].concat(rowIndex).concat(insertColumnIndex)
4100
+ });
4082
4101
  });
4083
- if (table.columns) {
4084
- Transforms.setNodes(editor, { columns: removeColumns(table, table.columns.length - 1, selectColIndex) }, { at: tableEntry[1] });
4085
- }
4086
4102
  }
4087
- else {
4088
- // If last column, clear text in cells instead
4089
- rows.forEach((row, rowIndex) => {
4090
- row.children.forEach((cell, cellIndex) => {
4091
- const at = tableEntry[1].concat([rowIndex, cellIndex]);
4092
- clearCell(opts, editor, [cell, at]);
4093
- });
4103
+ if (table.columns) {
4104
+ Transforms.setNodes(editor, { columns: addColumns(table, table.columns.length + 1, insertColumnIndex) }, { at: tableEntry[1] });
4105
+ }
4106
+ });
4107
+ }
4108
+ /**
4109
+ * Insert new column in the row
4110
+ */
4111
+ function insertColumnAtRow(opts, editor, count = 1, tableEntry, rowIndex, columnIndex, getCell) {
4112
+ Editor.withoutNormalizing(editor, () => {
4113
+ for (let i = 0; i < count; i++) {
4114
+ const newCell = getCell ? getCell(columnIndex, rowIndex) : createCell(opts);
4115
+ Transforms.insertNodes(editor, [newCell], {
4116
+ at: tableEntry[1].concat([rowIndex, columnIndex])
4094
4117
  });
4095
4118
  }
4096
4119
  });
4097
4120
  }
4098
4121
 
4122
+ /**
4123
+ * Clear the content of the given cell
4124
+ */
4125
+ function clearCell(opts, editor, cellEntry) {
4126
+ Transforms.removeNodes(editor, { at: cellEntry[1] });
4127
+ const cellNode = Object.assign(Object.assign({}, cellEntry[0]), createCell(opts));
4128
+ Transforms.insertNodes(editor, Object.assign({}, cellNode), { at: cellEntry[1] });
4129
+ }
4130
+
4099
4131
  function removeRow(opts, editor, selectRowIndex) {
4100
4132
  const { selection } = editor;
4101
4133
  const { anchor: { path } } = selection;
@@ -4143,6 +4175,76 @@ function removeRow(opts, editor, selectRowIndex) {
4143
4175
  }
4144
4176
  }
4145
4177
 
4178
+ function removeColumns(table, columnsCount, index) {
4179
+ if (table.columns.length > columnsCount) {
4180
+ let removeColumns = [];
4181
+ if ((index && index > 0) || index === 0) {
4182
+ removeColumns = table.columns.slice(index, index + 1);
4183
+ }
4184
+ else {
4185
+ removeColumns = table.columns.slice(columnsCount);
4186
+ }
4187
+ if (removeColumns.length) {
4188
+ const addWidth = removeColumns.reduce((totalWidth, cell) => {
4189
+ return (totalWidth += cell.width);
4190
+ }, 0) / columnsCount;
4191
+ return table.columns
4192
+ .filter(item => !removeColumns.includes(item))
4193
+ .map(item => {
4194
+ return { width: item.width + Math.round(addWidth) };
4195
+ });
4196
+ }
4197
+ }
4198
+ return table.columns;
4199
+ }
4200
+
4201
+ function removeColumn(opts, editor, selectColIndex) {
4202
+ const { selection } = editor;
4203
+ const { anchor: { path } } = selection;
4204
+ const tablePosition = TablePosition.create(opts, editor, path);
4205
+ const { tableEntry, table, row, cellEntry: [cellNode, cellPath] } = tablePosition;
4206
+ const rows = tableEntry[0].children;
4207
+ selectColIndex = selectColIndex === undefined ? [...cellPath].pop() : selectColIndex;
4208
+ Editor.withoutNormalizing(editor, () => {
4209
+ table.children.map((row, rowIndex) => {
4210
+ const dirtyCell = row.children.find((cell, columnIndex) => !cell.hidden && columnIndex < selectColIndex && cell.colspan && cell.colspan + columnIndex > selectColIndex);
4211
+ if (dirtyCell) {
4212
+ const colspan = dirtyCell.colspan - 1 > 1 ? dirtyCell.colspan - 1 : null;
4213
+ Transforms.setNodes(editor, { colspan }, {
4214
+ at: tablePosition.tableEntry[1].concat(rowIndex).concat(row.children.indexOf(dirtyCell))
4215
+ });
4216
+ }
4217
+ const removeCell = row.children[selectColIndex];
4218
+ const nextCell = row.children[selectColIndex + 1];
4219
+ if (nextCell && nextCell.hidden && removeCell.colspan > 1) {
4220
+ const colspan = removeCell.colspan - 1 > 1 ? removeCell.colspan - 1 : null;
4221
+ Transforms.setNodes(editor, { colspan, rowspan: removeCell.rowspan || null, hidden: null }, { at: tablePosition.tableEntry[1].concat(rowIndex).concat(row.children.indexOf(nextCell)) });
4222
+ }
4223
+ });
4224
+ });
4225
+ // Remove the cell from every row
4226
+ Editor.withoutNormalizing(editor, () => {
4227
+ if (tablePosition.getWidth() > 1) {
4228
+ rows.forEach((row, rowIndex) => {
4229
+ const at = tableEntry[1].concat([rowIndex, selectColIndex]);
4230
+ Transforms.removeNodes(editor, { at });
4231
+ });
4232
+ if (table.columns) {
4233
+ Transforms.setNodes(editor, { columns: removeColumns(table, table.columns.length - 1, selectColIndex) }, { at: tableEntry[1] });
4234
+ }
4235
+ }
4236
+ else {
4237
+ // If last column, clear text in cells instead
4238
+ rows.forEach((row, rowIndex) => {
4239
+ row.children.forEach((cell, cellIndex) => {
4240
+ const at = tableEntry[1].concat([rowIndex, cellIndex]);
4241
+ clearCell(opts, editor, [cell, at]);
4242
+ });
4243
+ });
4244
+ }
4245
+ });
4246
+ }
4247
+
4146
4248
  const NextPath = (path) => {
4147
4249
  const [last, ...rest] = [...path].reverse();
4148
4250
  return [...rest.reverse(), last + 1];
@@ -4193,6 +4295,81 @@ function removeTable(opts, editor) {
4193
4295
  }
4194
4296
  }
4195
4297
 
4298
+ const IndentEditor = {
4299
+ getAllowedTypes(editor) {
4300
+ var _a, _b;
4301
+ return (_b = (_a = getPluginOptions(editor, PluginKeys.indent)) === null || _a === void 0 ? void 0 : _a.allowedTypes) !== null && _b !== void 0 ? _b : [];
4302
+ },
4303
+ setIndent(editor) {
4304
+ var _a, _b;
4305
+ if (TableEditor.setIndent(editor)) {
4306
+ return;
4307
+ }
4308
+ const allowedTypes = IndentEditor.getAllowedTypes(editor);
4309
+ const maxIndent = (_b = (_a = getPluginOptions(editor, PluginKeys.indent)) === null || _a === void 0 ? void 0 : _a.maxIndent) !== null && _b !== void 0 ? _b : [];
4310
+ const nodes = Array.from(Editor.nodes(editor, {
4311
+ mode: 'highest',
4312
+ match: n => Element$1.isElement(n) && allowedTypes.includes(n.type)
4313
+ }));
4314
+ const [startBlock] = nodes;
4315
+ if (startBlock) {
4316
+ let [{ indent }] = startBlock;
4317
+ indent = indent ? ++indent : 1;
4318
+ if (indent <= maxIndent) {
4319
+ Transforms.setNodes(editor, { indent }, {
4320
+ mode: 'highest',
4321
+ match: n => Element$1.isElement(n) && allowedTypes.includes(n.type)
4322
+ });
4323
+ }
4324
+ }
4325
+ },
4326
+ cancelIndent(editor) {
4327
+ if (TableEditor.cancelIndent(editor)) {
4328
+ return;
4329
+ }
4330
+ const allowedTypes = IndentEditor.getAllowedTypes(editor);
4331
+ const nodes = Array.from(Editor.nodes(editor, {
4332
+ mode: 'highest',
4333
+ match: n => Element$1.isElement(n) && allowedTypes.includes(n.type)
4334
+ }));
4335
+ const [startBlock] = nodes;
4336
+ if (startBlock) {
4337
+ let [{ indent }] = startBlock;
4338
+ indent = indent ? --indent : 0;
4339
+ Transforms.setNodes(editor, { indent }, {
4340
+ mode: 'highest',
4341
+ match: n => Element$1.isElement(n) && allowedTypes.includes(n.type)
4342
+ });
4343
+ }
4344
+ },
4345
+ setTextIndent(editor, kinds, textIndent) {
4346
+ Transforms.setNodes(editor, { textIndent }, {
4347
+ mode: 'highest',
4348
+ match: node => Element$1.isElement(node) && kinds.includes(node.type)
4349
+ });
4350
+ },
4351
+ cancelTextIntent(editor, event, anchorBlock, kinds) {
4352
+ let { textIndent, indent } = anchorBlock;
4353
+ if (textIndent > 2) {
4354
+ event.preventDefault();
4355
+ textIndent -= 2;
4356
+ IndentEditor.setTextIndent(editor, kinds, textIndent);
4357
+ return true;
4358
+ }
4359
+ if (textIndent === 2) {
4360
+ event.preventDefault();
4361
+ IndentEditor.setTextIndent(editor, kinds, null);
4362
+ return true;
4363
+ }
4364
+ if (indent) {
4365
+ event.preventDefault();
4366
+ IndentEditor.cancelIndent(editor);
4367
+ return true;
4368
+ }
4369
+ return false;
4370
+ }
4371
+ };
4372
+
4196
4373
  const TableEditor = {
4197
4374
  insertTable(editor, optionsParam) {
4198
4375
  const opts = new TableOptions(optionsParam);
@@ -4353,12 +4530,75 @@ const TableEditor = {
4353
4530
  const [tableRowEntry] = Editor.nodes(editor, { match: (n) => n.type === ElementKinds.tableRow });
4354
4531
  return tableRowEntry && tableRowEntry[0] && tableRowEntry[0].header;
4355
4532
  },
4533
+ isActiveHeaderRow(editor) {
4534
+ const tableNode = getAboveByType(editor, ElementKinds.table);
4535
+ const cells = TableEditor.getSelectedCells(editor);
4536
+ const { row, col } = cells[0];
4537
+ const cellPath = [...tableNode[1], row, col];
4538
+ const cellRange = { anchor: Editor.start(editor, cellPath), focus: Editor.end(editor, cellPath) };
4539
+ const [headerRow] = Editor.nodes(editor, {
4540
+ match: n => Element$1.isElement(n) && n.type === ElementKinds.tableRow && n.header,
4541
+ at: cellRange
4542
+ });
4543
+ return headerRow;
4544
+ },
4545
+ isActiveHeaderColumn(editor) {
4546
+ var _a, _b;
4547
+ const [table] = Editor.nodes(editor, { match: n => Element$1.isElement(n) && n.type === ElementKinds.table });
4548
+ const { anchor, focus } = editor.selection;
4549
+ const opts = new TableOptions();
4550
+ const anchorPosition = TablePosition.create(opts, editor, anchor.path);
4551
+ const focusPosition = TablePosition.create(opts, editor, focus.path);
4552
+ const anchorIndex = anchorPosition.getColumnIndex();
4553
+ const focusIndex = focusPosition.getColumnIndex();
4554
+ const isContainHeaderColumn = anchorIndex === 0 || focusIndex === 0;
4555
+ const isHeaderColumn = table && table[0] && ((_b = (_a = table[0]) === null || _a === void 0 ? void 0 : _a.options) === null || _b === void 0 ? void 0 : _b.headerColumn);
4556
+ return isHeaderColumn && isContainHeaderColumn;
4557
+ },
4356
4558
  selectOriginCell(editor, table, rowIndex, columnIndex, isStart) {
4357
4559
  const origin = getOriginCell(table, rowIndex, columnIndex);
4358
4560
  if (origin) {
4359
4561
  const path = AngularEditor.findPath(editor, origin);
4360
4562
  Transforms.select(editor, isStart ? Editor.start(editor, path) : Editor.end(editor, path));
4361
4563
  }
4564
+ },
4565
+ setIndent(editor) {
4566
+ return TableEditor.handleSelectedCells(editor, (cellPath, cellRange) => {
4567
+ var _a, _b;
4568
+ const allowedTypes = IndentEditor.getAllowedTypes(editor);
4569
+ const maxIndent = (_b = (_a = getPluginOptions(editor, PluginKeys.indent)) === null || _a === void 0 ? void 0 : _a.maxIndent) !== null && _b !== void 0 ? _b : [];
4570
+ const children = getNode(editor, cellPath).children;
4571
+ if (children.length) {
4572
+ children.forEach((child, index) => {
4573
+ let { indent } = child;
4574
+ indent = indent ? ++indent : 1;
4575
+ if (indent <= maxIndent) {
4576
+ Transforms.setNodes(editor, { indent }, {
4577
+ at: [...cellPath, index],
4578
+ mode: 'highest',
4579
+ match: n => Element$1.isElement(n) && allowedTypes.includes(n.type)
4580
+ });
4581
+ }
4582
+ });
4583
+ }
4584
+ });
4585
+ },
4586
+ cancelIndent(editor) {
4587
+ return TableEditor.handleSelectedCells(editor, (cellPath, cellRange) => {
4588
+ const allowedTypes = IndentEditor.getAllowedTypes(editor);
4589
+ const children = getNode(editor, cellPath).children;
4590
+ if (children.length) {
4591
+ children.forEach((child, index) => {
4592
+ let { indent } = child;
4593
+ indent = indent ? --indent : 0;
4594
+ Transforms.setNodes(editor, { indent }, {
4595
+ at: [...cellPath, index],
4596
+ mode: 'highest',
4597
+ match: n => Element$1.isElement(n) && allowedTypes.includes(n.type)
4598
+ });
4599
+ });
4600
+ }
4601
+ });
4362
4602
  }
4363
4603
  };
4364
4604
 
@@ -5125,9 +5365,9 @@ class TheBlockquoteComponent extends TheBaseElementComponent {
5125
5365
  this.cdr = cdr;
5126
5366
  }
5127
5367
  }
5128
- TheBlockquoteComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheBlockquoteComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
5129
- TheBlockquoteComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: TheBlockquoteComponent, selector: "blockquote[theBlockquote]", usesInheritance: true, ngImport: i0, template: `<slate-children [children]="children" [context]="childrenContext" [viewContext]="viewContext"></slate-children>`, isInline: true, dependencies: [{ kind: "component", type: i1.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }] });
5130
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheBlockquoteComponent, decorators: [{
5368
+ TheBlockquoteComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheBlockquoteComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
5369
+ TheBlockquoteComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: TheBlockquoteComponent, selector: "blockquote[theBlockquote]", usesInheritance: true, ngImport: i0, template: `<slate-children [children]="children" [context]="childrenContext" [viewContext]="viewContext"></slate-children>`, isInline: true, dependencies: [{ kind: "component", type: i1.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }] });
5370
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheBlockquoteComponent, decorators: [{
5131
5371
  type: Component,
5132
5372
  args: [{
5133
5373
  selector: 'blockquote[theBlockquote]',
@@ -5215,9 +5455,9 @@ class ThePreventDefaultDirective {
5215
5455
  event.preventDefault();
5216
5456
  }
5217
5457
  }
5218
- ThePreventDefaultDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ThePreventDefaultDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
5219
- ThePreventDefaultDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.12", type: ThePreventDefaultDirective, selector: "[thePreventDefault]", host: { listeners: { "mousedown": "mousedown($event)" } }, exportAs: ["thePreventDefault"], ngImport: i0 });
5220
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ThePreventDefaultDirective, decorators: [{
5458
+ ThePreventDefaultDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ThePreventDefaultDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
5459
+ ThePreventDefaultDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.0", type: ThePreventDefaultDirective, selector: "[thePreventDefault]", host: { listeners: { "mousedown": "mousedown($event)" } }, exportAs: ["thePreventDefault"], ngImport: i0 });
5460
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ThePreventDefaultDirective, decorators: [{
5221
5461
  type: Directive,
5222
5462
  args: [{
5223
5463
  selector: '[thePreventDefault]',
@@ -5446,9 +5686,9 @@ class TheCodeComponent extends TheBaseElementComponent {
5446
5686
  this.destroy$.complete();
5447
5687
  }
5448
5688
  }
5449
- TheCodeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheCodeComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i1$2.ThyNotifyService }, { token: TheContextService }, { token: i0.NgZone }, { token: THE_MODE_TOKEN }, { token: i1$1.ThyPopover }, { token: i0.ViewContainerRef }, { token: i2$1.Overlay }], target: i0.ɵɵFactoryTarget.Component });
5450
- TheCodeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: TheCodeComponent, selector: "div[theCode]", viewQueries: [{ propertyName: "toolbar", first: true, predicate: ["toolbar"], descendants: true, read: TemplateRef, static: true }, { propertyName: "codemirror", first: true, predicate: ["codemirror"], descendants: true, read: CodeMirrorComponent }, { propertyName: "toolbarDropdownComponent", first: true, predicate: TheToolbarDropdownComponent, descendants: true, read: TheToolbarDropdownComponent }], usesInheritance: true, ngImport: i0, template: "<slate-children [children]=\"children\" [context]=\"childrenContext\" [viewContext]=\"viewContext\"></slate-children>\n\n<!-- \u53EA\u8BFB\u6A21\u5F0F\u4E0BCodeMirror-sizer\u9AD8\u5EA6\u6BD4\u7F16\u8F91\u6A21\u5F0F\u4E0B\u591A2px\uFF0C\u8BBE\u7F6EthyMinHeight\u4E3A46px\u9632\u6B62\u62D6\u62FD\u5230\u6700\u5C0F\u9AD8\u5EA6\u65F6\u53EA\u8BFB\u6A21\u5F0F\u4E0B\u51FA\u73B0\u6EDA\u52A8\u6761 -->\n<div\n thyResizable\n [thyMinHeight]=\"46\"\n [thyBounds]=\"resizeBounds\"\n [style.height.px]=\"resizeHeight\"\n (thyResize)=\"onResize($event)\"\n (thyResizeEnd)=\"onEndResize()\"\n class=\"resize-code-container\"\n [ngClass]=\"{ focus: isCollapsedAndNonReadonly, readonly: options.readOnly, active: isHightLight && isCollapsedAndNonReadonly }\"\n>\n <ng-codemirror\n *ngIf=\"startRenderCodemirror\"\n #codemirror\n contenteditable=\"false\"\n class=\"ng-codemirror-wrapper\"\n [ngStyle]=\"{ maxHeight: maxHeight > 0 ? maxHeight + 'px' : 'auto' }\"\n [options]=\"options\"\n [ngModel]=\"code\"\n [delayRefreshTime]=\"300\"\n (ngModelChange)=\"codeChange($event)\"\n (focusChange)=\"focusChange($event)\"\n [autoMaxHeight]=\"maxHeight\"\n >\n </ng-codemirror>\n <thy-resize-handle thyDirection=\"bottom\" class=\"code-resize-icon\" *ngIf=\"isCollapsedAndNonReadonly\"></thy-resize-handle>\n</div>\n\n<ng-template #toolbar>\n <thy-actions thySize=\"xxs\" thePreventDefault>\n <the-toolbar-dropdown\n [menus]=\"menus\"\n [toolbarItem]=\"activeLanguage\"\n [dropdownItemKey]=\"activeLanguage?.key\"\n [itemMousedownHandle]=\"onChangeLanguage\"\n >\n </the-toolbar-dropdown>\n <span class=\"auto-wrap d-flex align-items-center px-2 text-secondary\">\n <span>\u81EA\u52A8\u6362\u884C</span>\n <thy-switch\n class=\"auto-wrap-btn d-flex ml-1\"\n [(ngModel)]=\"options.lineWrapping\"\n (ngModelChange)=\"onChangeWrap($event)\"\n thySize=\"sm\"\n ></thy-switch>\n </span>\n <a href=\"javascript:;\" thyAction thyActionIcon=\"copy\" thyTooltip=\"\u590D\u5236\" thyTooltipPlacement=\"top\" (click)=\"onCopy($event)\"></a>\n <thy-divider class=\"mr-2 ml-1 align-self-center\" [thyVertical]=\"true\"></thy-divider>\n <a\n href=\"javascript:;\"\n thyAction\n thyType=\"danger\"\n thyActionIcon=\"trash\"\n thyTooltip=\"\u5220\u9664\"\n thyTooltipPlacement=\"top\"\n (click)=\"onDelete($event)\"\n ></a>\n </thy-actions>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i1.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i8.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { kind: "directive", type: i9.ThyResizableDirective, selector: "[thyResizable]", inputs: ["thyBounds", "thyMaxHeight", "thyMaxWidth", "thyMinHeight", "thyMinWidth", "thyGridColumnCount", "thyMaxColumn", "thyMinColumn", "thyLockAspectRatio", "thyPreview", "thyDisabled"], outputs: ["thyResize", "thyResizeEnd", "thyResizeStart"] }, { kind: "component", type: i9.ThyResizeHandleComponent, selector: "thy-resize-handle, [thy-resize-handle]", inputs: ["thyDirection", "thyLine"], outputs: ["thyMouseDown"], exportAs: ["thyResizeHandle"] }, { kind: "component", type: i10.ThySwitchComponent, selector: "thy-switch", inputs: ["thyType", "thySize", "thyDisabled"], outputs: ["thyChange"] }, { kind: "component", type: i5.ThyActionComponent, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }, { kind: "component", type: i5.ThyActionsComponent, selector: "thy-actions", inputs: ["thySize"] }, { kind: "component", type: i12.ThyDividerComponent, selector: "thy-divider", inputs: ["thyVertical", "thyStyle", "thyColor", "thyText", "thyTextDirection", "thyDeeper"] }, { kind: "component", type: i13.CodeMirrorComponent, selector: "ng-codemirror, [ngCodeMirror]", inputs: ["autoMaxHeight", "options", "delayRefreshTime"], outputs: ["focusChange"] }, { kind: "component", type: TheToolbarDropdownComponent, selector: "the-toolbar-dropdown", inputs: ["itemMousedownHandle"] }, { kind: "directive", type: ThePreventDefaultDirective, selector: "[thePreventDefault]", exportAs: ["thePreventDefault"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
5451
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheCodeComponent, decorators: [{
5689
+ TheCodeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheCodeComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i1$2.ThyNotifyService }, { token: TheContextService }, { token: i0.NgZone }, { token: THE_MODE_TOKEN }, { token: i1$1.ThyPopover }, { token: i0.ViewContainerRef }, { token: i2$1.Overlay }], target: i0.ɵɵFactoryTarget.Component });
5690
+ TheCodeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: TheCodeComponent, selector: "div[theCode]", viewQueries: [{ propertyName: "toolbar", first: true, predicate: ["toolbar"], descendants: true, read: TemplateRef, static: true }, { propertyName: "codemirror", first: true, predicate: ["codemirror"], descendants: true, read: CodeMirrorComponent }, { propertyName: "toolbarDropdownComponent", first: true, predicate: TheToolbarDropdownComponent, descendants: true, read: TheToolbarDropdownComponent }], usesInheritance: true, ngImport: i0, template: "<slate-children [children]=\"children\" [context]=\"childrenContext\" [viewContext]=\"viewContext\"></slate-children>\n\n<!-- \u53EA\u8BFB\u6A21\u5F0F\u4E0BCodeMirror-sizer\u9AD8\u5EA6\u6BD4\u7F16\u8F91\u6A21\u5F0F\u4E0B\u591A2px\uFF0C\u8BBE\u7F6EthyMinHeight\u4E3A46px\u9632\u6B62\u62D6\u62FD\u5230\u6700\u5C0F\u9AD8\u5EA6\u65F6\u53EA\u8BFB\u6A21\u5F0F\u4E0B\u51FA\u73B0\u6EDA\u52A8\u6761 -->\n<div\n thyResizable\n [thyMinHeight]=\"46\"\n [thyBounds]=\"resizeBounds\"\n [style.height.px]=\"resizeHeight\"\n (thyResize)=\"onResize($event)\"\n (thyResizeEnd)=\"onEndResize()\"\n class=\"resize-code-container\"\n [ngClass]=\"{ focus: isCollapsedAndNonReadonly, readonly: options.readOnly, active: isHightLight && isCollapsedAndNonReadonly }\"\n>\n <ng-codemirror\n *ngIf=\"startRenderCodemirror\"\n #codemirror\n contenteditable=\"false\"\n class=\"ng-codemirror-wrapper\"\n [ngStyle]=\"{ maxHeight: maxHeight > 0 ? maxHeight + 'px' : 'auto' }\"\n [options]=\"options\"\n [ngModel]=\"code\"\n [delayRefreshTime]=\"300\"\n (ngModelChange)=\"codeChange($event)\"\n (focusChange)=\"focusChange($event)\"\n [autoMaxHeight]=\"maxHeight\"\n >\n </ng-codemirror>\n <thy-resize-handle thyDirection=\"bottom\" class=\"code-resize-icon\" *ngIf=\"isCollapsedAndNonReadonly\"></thy-resize-handle>\n</div>\n\n<ng-template #toolbar>\n <thy-actions thySize=\"xxs\" thePreventDefault>\n <the-toolbar-dropdown\n [menus]=\"menus\"\n [toolbarItem]=\"activeLanguage\"\n [dropdownItemKey]=\"activeLanguage?.key\"\n [itemMousedownHandle]=\"onChangeLanguage\"\n >\n </the-toolbar-dropdown>\n <span class=\"auto-wrap d-flex align-items-center px-2 text-secondary\">\n <span>\u81EA\u52A8\u6362\u884C</span>\n <thy-switch\n class=\"auto-wrap-btn d-flex ml-1\"\n [(ngModel)]=\"options.lineWrapping\"\n (ngModelChange)=\"onChangeWrap($event)\"\n thySize=\"sm\"\n ></thy-switch>\n </span>\n <a href=\"javascript:;\" thyAction thyActionIcon=\"copy\" thyTooltip=\"\u590D\u5236\" thyTooltipPlacement=\"top\" (click)=\"onCopy($event)\"></a>\n <thy-divider class=\"mr-2 ml-1 align-self-center\" [thyVertical]=\"true\"></thy-divider>\n <a\n href=\"javascript:;\"\n thyAction\n thyType=\"danger\"\n thyActionIcon=\"trash\"\n thyTooltip=\"\u5220\u9664\"\n thyTooltipPlacement=\"top\"\n (click)=\"onDelete($event)\"\n ></a>\n </thy-actions>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i1.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i8.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { kind: "directive", type: i9.ThyResizableDirective, selector: "[thyResizable]", inputs: ["thyBounds", "thyMaxHeight", "thyMaxWidth", "thyMinHeight", "thyMinWidth", "thyGridColumnCount", "thyMaxColumn", "thyMinColumn", "thyLockAspectRatio", "thyPreview", "thyDisabled"], outputs: ["thyResize", "thyResizeEnd", "thyResizeStart"] }, { kind: "component", type: i9.ThyResizeHandleComponent, selector: "thy-resize-handle, [thy-resize-handle]", inputs: ["thyDirection", "thyLine"], outputs: ["thyMouseDown"], exportAs: ["thyResizeHandle"] }, { kind: "component", type: i10.ThySwitchComponent, selector: "thy-switch", inputs: ["thyType", "thySize", "thyDisabled"], outputs: ["thyChange"] }, { kind: "component", type: i5.ThyActionComponent, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }, { kind: "component", type: i5.ThyActionsComponent, selector: "thy-actions", inputs: ["thySize"] }, { kind: "component", type: i12.ThyDividerComponent, selector: "thy-divider", inputs: ["thyVertical", "thyStyle", "thyColor", "thyText", "thyTextDirection", "thyDeeper"] }, { kind: "component", type: i13.CodeMirrorComponent, selector: "ng-codemirror, [ngCodeMirror]", inputs: ["autoMaxHeight", "options", "delayRefreshTime"], outputs: ["focusChange"] }, { kind: "component", type: TheToolbarDropdownComponent, selector: "the-toolbar-dropdown", inputs: ["itemMousedownHandle"] }, { kind: "directive", type: ThePreventDefaultDirective, selector: "[thePreventDefault]", exportAs: ["thePreventDefault"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
5691
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheCodeComponent, decorators: [{
5452
5692
  type: Component,
5453
5693
  args: [{ selector: 'div[theCode]', changeDetection: ChangeDetectionStrategy.OnPush, template: "<slate-children [children]=\"children\" [context]=\"childrenContext\" [viewContext]=\"viewContext\"></slate-children>\n\n<!-- \u53EA\u8BFB\u6A21\u5F0F\u4E0BCodeMirror-sizer\u9AD8\u5EA6\u6BD4\u7F16\u8F91\u6A21\u5F0F\u4E0B\u591A2px\uFF0C\u8BBE\u7F6EthyMinHeight\u4E3A46px\u9632\u6B62\u62D6\u62FD\u5230\u6700\u5C0F\u9AD8\u5EA6\u65F6\u53EA\u8BFB\u6A21\u5F0F\u4E0B\u51FA\u73B0\u6EDA\u52A8\u6761 -->\n<div\n thyResizable\n [thyMinHeight]=\"46\"\n [thyBounds]=\"resizeBounds\"\n [style.height.px]=\"resizeHeight\"\n (thyResize)=\"onResize($event)\"\n (thyResizeEnd)=\"onEndResize()\"\n class=\"resize-code-container\"\n [ngClass]=\"{ focus: isCollapsedAndNonReadonly, readonly: options.readOnly, active: isHightLight && isCollapsedAndNonReadonly }\"\n>\n <ng-codemirror\n *ngIf=\"startRenderCodemirror\"\n #codemirror\n contenteditable=\"false\"\n class=\"ng-codemirror-wrapper\"\n [ngStyle]=\"{ maxHeight: maxHeight > 0 ? maxHeight + 'px' : 'auto' }\"\n [options]=\"options\"\n [ngModel]=\"code\"\n [delayRefreshTime]=\"300\"\n (ngModelChange)=\"codeChange($event)\"\n (focusChange)=\"focusChange($event)\"\n [autoMaxHeight]=\"maxHeight\"\n >\n </ng-codemirror>\n <thy-resize-handle thyDirection=\"bottom\" class=\"code-resize-icon\" *ngIf=\"isCollapsedAndNonReadonly\"></thy-resize-handle>\n</div>\n\n<ng-template #toolbar>\n <thy-actions thySize=\"xxs\" thePreventDefault>\n <the-toolbar-dropdown\n [menus]=\"menus\"\n [toolbarItem]=\"activeLanguage\"\n [dropdownItemKey]=\"activeLanguage?.key\"\n [itemMousedownHandle]=\"onChangeLanguage\"\n >\n </the-toolbar-dropdown>\n <span class=\"auto-wrap d-flex align-items-center px-2 text-secondary\">\n <span>\u81EA\u52A8\u6362\u884C</span>\n <thy-switch\n class=\"auto-wrap-btn d-flex ml-1\"\n [(ngModel)]=\"options.lineWrapping\"\n (ngModelChange)=\"onChangeWrap($event)\"\n thySize=\"sm\"\n ></thy-switch>\n </span>\n <a href=\"javascript:;\" thyAction thyActionIcon=\"copy\" thyTooltip=\"\u590D\u5236\" thyTooltipPlacement=\"top\" (click)=\"onCopy($event)\"></a>\n <thy-divider class=\"mr-2 ml-1 align-self-center\" [thyVertical]=\"true\"></thy-divider>\n <a\n href=\"javascript:;\"\n thyAction\n thyType=\"danger\"\n thyActionIcon=\"trash\"\n thyTooltip=\"\u5220\u9664\"\n thyTooltipPlacement=\"top\"\n (click)=\"onDelete($event)\"\n ></a>\n </thy-actions>\n</ng-template>\n" }]
5454
5694
  }], ctorParameters: function () {
@@ -5516,68 +5756,6 @@ const createCodePlugin = createPluginFactory({
5516
5756
  }
5517
5757
  });
5518
5758
 
5519
- const Colors = [
5520
- '#FFFFFF',
5521
- '#333333',
5522
- '#FF0100',
5523
- '#FFDA00',
5524
- '#A4E143',
5525
- '#38D9F0',
5526
- '#4EA8EE',
5527
- '#9570E7',
5528
- '#F3F3F3',
5529
- '#CCCCCC',
5530
- '#FEF3F1',
5531
- '#FEFCDA',
5532
- '#EDF6E8',
5533
- '#E6FBFA',
5534
- '#EBF4FC',
5535
- '#F1EDF7',
5536
- '#DDDDDD',
5537
- '#A5A5A5',
5538
- '#FCD5D0',
5539
- '#F9EDA6',
5540
- '#D4E9D7',
5541
- '#C8E6EA',
5542
- '#CCE0F2',
5543
- '#DAD6EA',
5544
- '#888888',
5545
- '#494949',
5546
- '#EE7976',
5547
- '#E7B323',
5548
- '#99C191',
5549
- '#79C6CE',
5550
- '#6EAAD7',
5551
- '#9D8EC2',
5552
- '#41464C',
5553
- '#000000',
5554
- '#BF1A1E',
5555
- '#AD720E',
5556
- '#1C7232',
5557
- '#1C7892',
5558
- '#18439D',
5559
- '#521B78'
5560
- ];
5561
- const BackgroundColors = [
5562
- '#FFFFFF',
5563
- '#FACCCC',
5564
- '#FFEBCC',
5565
- '#FFFFCC',
5566
- '#CDE8CC',
5567
- '#CCE0F5',
5568
- '#EBD6FF',
5569
- '#F3F3F3',
5570
- '#F06665',
5571
- '#FFC266',
5572
- '#FFFF66',
5573
- '#66B966',
5574
- '#66A3E0',
5575
- '#C285FF'
5576
- ];
5577
- const SpecialTextColor = '#333333';
5578
- const SpecialBackgroundColor = '#FFFFFF';
5579
- const TableHeaderBackgroundColor = '#F3F3F3';
5580
-
5581
5759
  const ColorEditor = {
5582
5760
  getActiveColor(editor, type) {
5583
5761
  var _a;
@@ -5681,8 +5859,8 @@ class TheColorToolbarItemComponent extends TheBaseToolbarItem {
5681
5859
  }
5682
5860
  }
5683
5861
  }
5684
- TheColorToolbarItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheColorToolbarItemComponent, deps: [{ token: i1$1.ThyPopover }], target: i0.ɵɵFactoryTarget.Component });
5685
- TheColorToolbarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: TheColorToolbarItemComponent, selector: "the-color-toolbar-item", host: { classAttribute: "the-toolbar-item" }, usesInheritance: true, ngImport: i0, template: `
5862
+ TheColorToolbarItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheColorToolbarItemComponent, deps: [{ token: i1$1.ThyPopover }], target: i0.ɵɵFactoryTarget.Component });
5863
+ TheColorToolbarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: TheColorToolbarItemComponent, selector: "the-color-toolbar-item", host: { classAttribute: "the-toolbar-item" }, usesInheritance: true, ngImport: i0, template: `
5686
5864
  <a
5687
5865
  href="javascript:;"
5688
5866
  thyAction
@@ -5699,8 +5877,8 @@ TheColorToolbarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14
5699
5877
  ></thy-icon>
5700
5878
  <thy-icon class="link-down-icon font-size-sm text-desc ml-1" thyIconName="caret-down"></thy-icon>
5701
5879
  </a>
5702
- `, isInline: true, dependencies: [{ kind: "component", type: i3.ThyIconComponent, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { kind: "directive", type: i8.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { kind: "component", type: i5.ThyActionComponent, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }] });
5703
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheColorToolbarItemComponent, decorators: [{
5880
+ `, isInline: true, dependencies: [{ kind: "component", type: i4.ThyIconComponent, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { kind: "directive", type: i8.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { kind: "component", type: i5.ThyActionComponent, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }] });
5881
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheColorToolbarItemComponent, decorators: [{
5704
5882
  type: Component,
5705
5883
  args: [{
5706
5884
  selector: 'the-color-toolbar-item',
@@ -6561,9 +6739,9 @@ class TheConversionHintComponent {
6561
6739
  clearInterval(this.closeTimer);
6562
6740
  }
6563
6741
  }
6564
- TheConversionHintComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheConversionHintComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
6565
- TheConversionHintComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: TheConversionHintComponent, selector: "the-conversion-hint", inputs: { editor: "editor", conversion: "conversion" }, host: { listeners: { "mouseenter": "mouseenter()", "mouseleave": "mouseleave()" }, classAttribute: "the-conversion-hint" }, ngImport: i0, template: "<ng-container>\n <thy-alert thyType=\"primary-weak\" thyIcon=\"info-circle-fill\" thyCloseable=\"true\" thyMessage=\"\u68C0\u6D4B\u5230\u7C98\u8D34\u5185\u5BB9\u7B26\u5408Markdown\u8BED\u6CD5\">\n <ng-template #operation>\n <a href=\"javascript:;\" thyAlertActionItem (click)=\"conversion()\"> \u7ACB\u5373\u8F6C\u6362 </a>\n </ng-template>\n </thy-alert>\n</ng-container>\n", dependencies: [{ kind: "component", type: i1$3.ThyAlertComponent, selector: "thy-alert", inputs: ["thyType", "thyTheme", "thyMessage", "thyIcon", "thyCloseable"] }, { kind: "directive", type: i1$3.ThyAlertActionItemDirective, selector: "[thyAlertActionItem]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
6566
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheConversionHintComponent, decorators: [{
6742
+ TheConversionHintComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheConversionHintComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
6743
+ TheConversionHintComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: TheConversionHintComponent, selector: "the-conversion-hint", inputs: { editor: "editor", conversion: "conversion" }, host: { listeners: { "mouseenter": "mouseenter()", "mouseleave": "mouseleave()" }, classAttribute: "the-conversion-hint" }, ngImport: i0, template: "<ng-container>\n <thy-alert thyType=\"primary-weak\" thyIcon=\"info-circle-fill\" thyCloseable=\"true\" thyMessage=\"\u68C0\u6D4B\u5230\u7C98\u8D34\u5185\u5BB9\u7B26\u5408Markdown\u8BED\u6CD5\">\n <ng-template #operation>\n <a href=\"javascript:;\" thyAlertActionItem (click)=\"conversion()\"> \u7ACB\u5373\u8F6C\u6362 </a>\n </ng-template>\n </thy-alert>\n</ng-container>\n", dependencies: [{ kind: "component", type: i1$3.ThyAlertComponent, selector: "thy-alert", inputs: ["thyType", "thyTheme", "thyMessage", "thyIcon", "thyCloseable"] }, { kind: "directive", type: i1$3.ThyAlertActionItemDirective, selector: "[thyAlertActionItem]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
6744
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheConversionHintComponent, decorators: [{
6567
6745
  type: Component,
6568
6746
  args: [{ selector: 'the-conversion-hint', host: {
6569
6747
  class: 'the-conversion-hint'
@@ -6931,14 +7109,14 @@ class TheHrComponent extends TheBaseElementComponent {
6931
7109
  });
6932
7110
  }
6933
7111
  }
6934
- TheHrComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheHrComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
6935
- TheHrComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: TheHrComponent, selector: "the-hr, [theHr]", usesInheritance: true, ngImport: i0, template: `
7112
+ TheHrComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheHrComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
7113
+ TheHrComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: TheHrComponent, selector: "the-hr, [theHr]", usesInheritance: true, ngImport: i0, template: `
6936
7114
  <div class="the-hr" contenteditable="false" [ngClass]="{ active: isCollapsedAndNonReadonly }">
6937
7115
  <hr class="the-hr" />
6938
7116
  <slate-children [children]="children" [context]="childrenContext" [viewContext]="viewContext"></slate-children>
6939
7117
  </div>
6940
7118
  `, isInline: true, dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: i1.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }] });
6941
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheHrComponent, decorators: [{
7119
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheHrComponent, decorators: [{
6942
7120
  type: Component,
6943
7121
  args: [{
6944
7122
  selector: 'the-hr, [theHr]',
@@ -7357,16 +7535,16 @@ class TheImageComponent extends TheBaseElementComponent {
7357
7535
  event.stopPropagation();
7358
7536
  }
7359
7537
  }
7360
- TheImageComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheImageComponent, deps: [{ token: i0.ElementRef }, { token: THE_UPLOAD_SERVICE_TOKEN }, { token: i0.ChangeDetectorRef }, { token: TheContextService }, { token: i1$1.ThyPopover }, { token: i2$1.Overlay }, { token: i4.ThyImageService }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component });
7361
- TheImageComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: TheImageComponent, selector: "the-image, [theImage]", viewQueries: [{ propertyName: "imageContent", first: true, predicate: ["imageContent"], descendants: true }, { propertyName: "img", first: true, predicate: ["img"], descendants: true }, { propertyName: "layoutToolbar", first: true, predicate: ["layoutToolbar"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<slate-children [children]=\"children\" [context]=\"childrenContext\" [viewContext]=\"viewContext\"></slate-children>\n\n<div class=\"image-container\" contenteditable=\"false\" [style.textAlign]=\"imageEntry.align\">\n <div #imageContent *ngIf=\"imageEntry.thumbUrl\" class=\"image-content\" [class.pointer]=\"!selection\">\n <img\n #img\n thyImage\n [ngStyle]=\"{ 'width.px': imageBindingWidth }\"\n [class.image-collapsed]=\"selection && !uploading\"\n class=\"main-image\"\n (load)=\"imageLoaded($event)\"\n (mousedown)=\"preventDefault($event)\"\n [thySrc]=\"imageEntry.thumbUrl\"\n [thyPreviewSrc]=\"imageEntry.thumbUrl\"\n [thyOriginSrc]=\"imageEntry.originUrl\"\n [thyImageMeta]=\"{ name: imageEntry.name, size: imageEntry.size }\"\n [alt]=\"imageEntry.name\"\n />\n <div *ngIf=\"isCollapsedAndNonReadonly\" class=\"image-profile\" [class.outline]=\"selection\">\n <span *ngIf=\"isCollapsedAndNonReadonly\" (mousedown)=\"startDrag($event, '-xl')\" class=\"image-pointer left top\"></span>\n <span *ngIf=\"isCollapsedAndNonReadonly\" (mousedown)=\"startDrag($event, 'xl')\" class=\"image-pointer right top\"></span>\n <span *ngIf=\"isCollapsedAndNonReadonly\" (mousedown)=\"startDrag($event, 'xl')\" class=\"image-pointer right bottom\"></span>\n <span *ngIf=\"isCollapsedAndNonReadonly\" (mousedown)=\"startDrag($event, '-xl')\" class=\"image-pointer left bottom\"></span>\n </div>\n <div *ngIf=\"uploading\" class=\"uploading\">\n <div class=\"uploading-percentage\">\n <thy-progress thyType=\"primary\" [thyValue]=\"percentage\" thySize=\"sm\"></thy-progress>\n <thy-icon (click)=\"cancelUpload($event)\" thyIconName=\"close-circle-bold-fill\" thyIconLegging=\"true\"> </thy-icon>\n </div>\n </div>\n <div *ngIf=\"!uploading\" class=\"layer\" [class.readonly]=\"readonly\"></div>\n </div>\n <div *ngIf=\"!imageEntry.thumbUrl\" class=\"image-loading\" contenteditable=\"false\">\n <thy-icon thyIconName=\"image\"></thy-icon>\n </div>\n</div>\n\n<ng-template #layoutToolbar>\n <thy-actions thySize=\"xxs\">\n <ng-container *ngFor=\"let item of layoutOptions\">\n <a\n *ngIf=\"item.key !== 'split'\"\n href=\"javascript:;\"\n thyAction\n [thyType]=\"item.key === 'remove' ? 'danger' : 'primary'\"\n [thyActionIcon]=\"item.icon\"\n [thyActionActive]=\"layoutActive(item.key)\"\n [thyTooltip]=\"item.name\"\n thyTooltipPlacement=\"top\"\n (mousedown)=\"item?.handle($event, item.key)\"\n ></a>\n <thy-divider *ngIf=\"item.key === 'split'\" class=\"mr-2 ml-1 align-self-center\" [thyVertical]=\"true\"></thy-divider>\n </ng-container>\n </thy-actions>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i1.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }, { kind: "component", type: i3.ThyIconComponent, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { kind: "directive", type: i8.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { kind: "component", type: i9$1.ThyProgressComponent, selector: "thy-progress", inputs: ["thyType", "thySize", "thyValue", "thyMax", "thyTips", "thyShape", "thyGapDegree", "thyGapPosition", "thyStrokeWidth"] }, { kind: "directive", type: i4.ThyImageDirective, selector: "img[thyImage]", inputs: ["thySrc", "thyPreviewSrc", "thyOriginSrc", "thyImageMeta", "thyDisablePreview", "thyResolveSize"], exportAs: ["thyImage"] }, { kind: "component", type: i5.ThyActionComponent, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }, { kind: "component", type: i5.ThyActionsComponent, selector: "thy-actions", inputs: ["thySize"] }, { kind: "component", type: i12.ThyDividerComponent, selector: "thy-divider", inputs: ["thyVertical", "thyStyle", "thyColor", "thyText", "thyTextDirection", "thyDeeper"] }] });
7362
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheImageComponent, decorators: [{
7538
+ TheImageComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheImageComponent, deps: [{ token: i0.ElementRef }, { token: THE_UPLOAD_SERVICE_TOKEN }, { token: i0.ChangeDetectorRef }, { token: TheContextService }, { token: i1$1.ThyPopover }, { token: i2$1.Overlay }, { token: i4$1.ThyImageService }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component });
7539
+ TheImageComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: TheImageComponent, selector: "the-image, [theImage]", viewQueries: [{ propertyName: "imageContent", first: true, predicate: ["imageContent"], descendants: true }, { propertyName: "img", first: true, predicate: ["img"], descendants: true }, { propertyName: "layoutToolbar", first: true, predicate: ["layoutToolbar"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<slate-children [children]=\"children\" [context]=\"childrenContext\" [viewContext]=\"viewContext\"></slate-children>\n\n<div class=\"image-container\" contenteditable=\"false\" [style.textAlign]=\"imageEntry.align\">\n <div #imageContent *ngIf=\"imageEntry.thumbUrl\" class=\"image-content\" [class.pointer]=\"!selection\">\n <img\n #img\n thyImage\n [ngStyle]=\"{ 'width.px': imageBindingWidth }\"\n [class.image-collapsed]=\"selection && !uploading\"\n class=\"main-image\"\n (load)=\"imageLoaded($event)\"\n (mousedown)=\"preventDefault($event)\"\n [thySrc]=\"imageEntry.thumbUrl\"\n [thyPreviewSrc]=\"imageEntry.thumbUrl\"\n [thyOriginSrc]=\"imageEntry.originUrl\"\n [thyImageMeta]=\"{ name: imageEntry.name, size: imageEntry.size }\"\n [alt]=\"imageEntry.name\"\n />\n <div *ngIf=\"isCollapsedAndNonReadonly\" class=\"image-profile\" [class.outline]=\"selection\">\n <span *ngIf=\"isCollapsedAndNonReadonly\" (mousedown)=\"startDrag($event, '-xl')\" class=\"image-pointer left top\"></span>\n <span *ngIf=\"isCollapsedAndNonReadonly\" (mousedown)=\"startDrag($event, 'xl')\" class=\"image-pointer right top\"></span>\n <span *ngIf=\"isCollapsedAndNonReadonly\" (mousedown)=\"startDrag($event, 'xl')\" class=\"image-pointer right bottom\"></span>\n <span *ngIf=\"isCollapsedAndNonReadonly\" (mousedown)=\"startDrag($event, '-xl')\" class=\"image-pointer left bottom\"></span>\n </div>\n <div *ngIf=\"uploading\" class=\"uploading\">\n <div class=\"uploading-percentage\">\n <thy-progress thyType=\"primary\" [thyValue]=\"percentage\" thySize=\"sm\"></thy-progress>\n <thy-icon (click)=\"cancelUpload($event)\" thyIconName=\"close-circle-bold-fill\" thyIconLegging=\"true\"> </thy-icon>\n </div>\n </div>\n <div *ngIf=\"!uploading\" class=\"layer\" [class.readonly]=\"readonly\"></div>\n </div>\n <div *ngIf=\"!imageEntry.thumbUrl\" class=\"image-loading\" contenteditable=\"false\">\n <thy-icon thyIconName=\"image\"></thy-icon>\n </div>\n</div>\n\n<ng-template #layoutToolbar>\n <thy-actions thySize=\"xxs\">\n <ng-container *ngFor=\"let item of layoutOptions\">\n <a\n *ngIf=\"item.key !== 'split'\"\n href=\"javascript:;\"\n thyAction\n [thyType]=\"item.key === 'remove' ? 'danger' : 'primary'\"\n [thyActionIcon]=\"item.icon\"\n [thyActionActive]=\"layoutActive(item.key)\"\n [thyTooltip]=\"item.name\"\n thyTooltipPlacement=\"top\"\n (mousedown)=\"item?.handle($event, item.key)\"\n ></a>\n <thy-divider *ngIf=\"item.key === 'split'\" class=\"mr-2 ml-1 align-self-center\" [thyVertical]=\"true\"></thy-divider>\n </ng-container>\n </thy-actions>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i1.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }, { kind: "component", type: i4.ThyIconComponent, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { kind: "directive", type: i8.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { kind: "component", type: i9$1.ThyProgressComponent, selector: "thy-progress", inputs: ["thyType", "thySize", "thyValue", "thyMax", "thyTips"] }, { kind: "directive", type: i4$1.ThyImageDirective, selector: "img[thyImage]", inputs: ["thySrc", "thyPreviewSrc", "thyOriginSrc", "thyImageMeta", "thyDisablePreview", "thyResolveSize"], exportAs: ["thyImage"] }, { kind: "component", type: i5.ThyActionComponent, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }, { kind: "component", type: i5.ThyActionsComponent, selector: "thy-actions", inputs: ["thySize"] }, { kind: "component", type: i12.ThyDividerComponent, selector: "thy-divider", inputs: ["thyVertical", "thyStyle", "thyColor", "thyText", "thyTextDirection", "thyDeeper"] }] });
7540
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheImageComponent, decorators: [{
7363
7541
  type: Component,
7364
7542
  args: [{ selector: 'the-image, [theImage]', template: "<slate-children [children]=\"children\" [context]=\"childrenContext\" [viewContext]=\"viewContext\"></slate-children>\n\n<div class=\"image-container\" contenteditable=\"false\" [style.textAlign]=\"imageEntry.align\">\n <div #imageContent *ngIf=\"imageEntry.thumbUrl\" class=\"image-content\" [class.pointer]=\"!selection\">\n <img\n #img\n thyImage\n [ngStyle]=\"{ 'width.px': imageBindingWidth }\"\n [class.image-collapsed]=\"selection && !uploading\"\n class=\"main-image\"\n (load)=\"imageLoaded($event)\"\n (mousedown)=\"preventDefault($event)\"\n [thySrc]=\"imageEntry.thumbUrl\"\n [thyPreviewSrc]=\"imageEntry.thumbUrl\"\n [thyOriginSrc]=\"imageEntry.originUrl\"\n [thyImageMeta]=\"{ name: imageEntry.name, size: imageEntry.size }\"\n [alt]=\"imageEntry.name\"\n />\n <div *ngIf=\"isCollapsedAndNonReadonly\" class=\"image-profile\" [class.outline]=\"selection\">\n <span *ngIf=\"isCollapsedAndNonReadonly\" (mousedown)=\"startDrag($event, '-xl')\" class=\"image-pointer left top\"></span>\n <span *ngIf=\"isCollapsedAndNonReadonly\" (mousedown)=\"startDrag($event, 'xl')\" class=\"image-pointer right top\"></span>\n <span *ngIf=\"isCollapsedAndNonReadonly\" (mousedown)=\"startDrag($event, 'xl')\" class=\"image-pointer right bottom\"></span>\n <span *ngIf=\"isCollapsedAndNonReadonly\" (mousedown)=\"startDrag($event, '-xl')\" class=\"image-pointer left bottom\"></span>\n </div>\n <div *ngIf=\"uploading\" class=\"uploading\">\n <div class=\"uploading-percentage\">\n <thy-progress thyType=\"primary\" [thyValue]=\"percentage\" thySize=\"sm\"></thy-progress>\n <thy-icon (click)=\"cancelUpload($event)\" thyIconName=\"close-circle-bold-fill\" thyIconLegging=\"true\"> </thy-icon>\n </div>\n </div>\n <div *ngIf=\"!uploading\" class=\"layer\" [class.readonly]=\"readonly\"></div>\n </div>\n <div *ngIf=\"!imageEntry.thumbUrl\" class=\"image-loading\" contenteditable=\"false\">\n <thy-icon thyIconName=\"image\"></thy-icon>\n </div>\n</div>\n\n<ng-template #layoutToolbar>\n <thy-actions thySize=\"xxs\">\n <ng-container *ngFor=\"let item of layoutOptions\">\n <a\n *ngIf=\"item.key !== 'split'\"\n href=\"javascript:;\"\n thyAction\n [thyType]=\"item.key === 'remove' ? 'danger' : 'primary'\"\n [thyActionIcon]=\"item.icon\"\n [thyActionActive]=\"layoutActive(item.key)\"\n [thyTooltip]=\"item.name\"\n thyTooltipPlacement=\"top\"\n (mousedown)=\"item?.handle($event, item.key)\"\n ></a>\n <thy-divider *ngIf=\"item.key === 'split'\" class=\"mr-2 ml-1 align-self-center\" [thyVertical]=\"true\"></thy-divider>\n </ng-container>\n </thy-actions>\n</ng-template>\n" }]
7365
7543
  }], ctorParameters: function () {
7366
7544
  return [{ type: i0.ElementRef }, { type: undefined, decorators: [{
7367
7545
  type: Inject,
7368
7546
  args: [THE_UPLOAD_SERVICE_TOKEN]
7369
- }] }, { type: i0.ChangeDetectorRef }, { type: TheContextService }, { type: i1$1.ThyPopover }, { type: i2$1.Overlay }, { type: i4.ThyImageService }, { type: i0.ViewContainerRef }];
7547
+ }] }, { type: i0.ChangeDetectorRef }, { type: TheContextService }, { type: i1$1.ThyPopover }, { type: i2$1.Overlay }, { type: i4$1.ThyImageService }, { type: i0.ViewContainerRef }];
7370
7548
  }, propDecorators: { imageContent: [{
7371
7549
  type: ViewChild,
7372
7550
  args: ['imageContent']
@@ -7444,76 +7622,6 @@ const createImagePlugin = createPluginFactory({
7444
7622
  }
7445
7623
  });
7446
7624
 
7447
- const IndentEditor = {
7448
- getAllowedTypes(editor) {
7449
- var _a, _b;
7450
- return (_b = (_a = getPluginOptions(editor, PluginKeys.indent)) === null || _a === void 0 ? void 0 : _a.allowedTypes) !== null && _b !== void 0 ? _b : [];
7451
- },
7452
- setIndent(editor) {
7453
- var _a, _b;
7454
- const allowedTypes = IndentEditor.getAllowedTypes(editor);
7455
- const maxIndent = (_b = (_a = getPluginOptions(editor, PluginKeys.indent)) === null || _a === void 0 ? void 0 : _a.maxIndent) !== null && _b !== void 0 ? _b : [];
7456
- const nodes = Array.from(Editor.nodes(editor, {
7457
- mode: 'highest',
7458
- match: n => Element$1.isElement(n) && allowedTypes.includes(n.type)
7459
- }));
7460
- const [startBlock] = nodes;
7461
- if (startBlock) {
7462
- let [{ indent }] = startBlock;
7463
- indent = indent ? indent : 0;
7464
- indent += 1;
7465
- if (indent <= maxIndent) {
7466
- Transforms.setNodes(editor, { indent }, {
7467
- mode: 'highest',
7468
- match: n => Element$1.isElement(n) && allowedTypes.includes(n.type)
7469
- });
7470
- }
7471
- }
7472
- },
7473
- cancelIndent(editor) {
7474
- const allowedTypes = IndentEditor.getAllowedTypes(editor);
7475
- const nodes = Array.from(Editor.nodes(editor, {
7476
- mode: 'highest',
7477
- match: n => Element$1.isElement(n) && allowedTypes.includes(n.type)
7478
- }));
7479
- const [startBlock] = nodes;
7480
- if (startBlock) {
7481
- let [{ indent }] = startBlock;
7482
- indent = indent === 1 ? null : (indent -= 1);
7483
- Transforms.setNodes(editor, { indent }, {
7484
- mode: 'highest',
7485
- match: n => Element$1.isElement(n) && allowedTypes.includes(n.type)
7486
- });
7487
- }
7488
- },
7489
- setTextIndent(editor, kinds, textIndent) {
7490
- Transforms.setNodes(editor, { textIndent }, {
7491
- mode: 'highest',
7492
- match: node => Element$1.isElement(node) && kinds.includes(node.type)
7493
- });
7494
- },
7495
- cancelTextIntent(editor, event, anchorBlock, kinds) {
7496
- let { textIndent, indent } = anchorBlock;
7497
- if (textIndent > 2) {
7498
- event.preventDefault();
7499
- textIndent -= 2;
7500
- IndentEditor.setTextIndent(editor, kinds, textIndent);
7501
- return true;
7502
- }
7503
- if (textIndent === 2) {
7504
- event.preventDefault();
7505
- IndentEditor.setTextIndent(editor, kinds, null);
7506
- return true;
7507
- }
7508
- if (indent) {
7509
- event.preventDefault();
7510
- IndentEditor.cancelIndent(editor);
7511
- return true;
7512
- }
7513
- return false;
7514
- }
7515
- };
7516
-
7517
7625
  const onKeydownTextIndent = (editor, event, kinds, textIndentDisabled) => {
7518
7626
  const { selection } = editor;
7519
7627
  const isExpanded = Range.isExpanded(selection);
@@ -7529,6 +7637,9 @@ const onKeydownTextIndent = (editor, event, kinds, textIndentDisabled) => {
7529
7637
  const isStart = Editor.isStart(editor, selection.anchor, path);
7530
7638
  if (isKeyHotkey('Tab', event)) {
7531
7639
  event.preventDefault();
7640
+ if (TableEditor.setIndent(editor)) {
7641
+ return true;
7642
+ }
7532
7643
  if (startBlock && (isExpanded || isStart)) {
7533
7644
  if (!editor.isVoid(block)) {
7534
7645
  let { textIndent, type } = block;
@@ -7627,11 +7738,11 @@ class TheInlineCodeComponent extends TheBaseElementComponent {
7627
7738
  this.inlineChromiumBugfix = String.fromCodePoint(160);
7628
7739
  }
7629
7740
  }
7630
- TheInlineCodeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheInlineCodeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
7631
- TheInlineCodeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: TheInlineCodeComponent, selector: "span[theInlineCode]", usesInheritance: true, ngImport: i0, template: `<span contenteditable="false" class="the-break-char">{{ inlineChromiumBugfix }}</span>
7741
+ TheInlineCodeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheInlineCodeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
7742
+ TheInlineCodeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: TheInlineCodeComponent, selector: "span[theInlineCode]", usesInheritance: true, ngImport: i0, template: `<span contenteditable="false" class="the-break-char">{{ inlineChromiumBugfix }}</span>
7632
7743
  <span><slate-children [children]="children" [context]="childrenContext" [viewContext]="viewContext"></slate-children></span>
7633
7744
  <span contenteditable="false" class="the-break-char">{{ inlineChromiumBugfix }}</span>`, isInline: true, dependencies: [{ kind: "component", type: i1.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }] });
7634
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheInlineCodeComponent, decorators: [{
7745
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheInlineCodeComponent, decorators: [{
7635
7746
  type: Component,
7636
7747
  args: [{
7637
7748
  selector: 'span[theInlineCode]',
@@ -7805,9 +7916,9 @@ class TheLinkHoverComponent {
7805
7916
  event.stopPropagation();
7806
7917
  }
7807
7918
  }
7808
- TheLinkHoverComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheLinkHoverComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
7809
- TheLinkHoverComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: TheLinkHoverComponent, selector: "the-link-hover", inputs: { link: "link", dom: "dom", editHandle: "editHandle", deleteHandle: "deleteHandle" }, ngImport: i0, template: "<div class=\"link-hover-card px-1\">\n <a readonly href=\"{{ link }}\" target=\"_blank\" rel=\"{{ aTagRelAttr }}\" class=\"hover-control-plaintext text-truncate mx-2\">\n {{ link }}\n </a>\n <thy-divider class=\"mx-2\" [thyVertical]=\"true\"></thy-divider>\n <a href=\"javascript:;\" thyAction thyActionIcon=\"edit\" thePreventDefault (click)=\"editLink($event)\"></a>\n <thy-divider class=\"mx-2\" [thyVertical]=\"true\"></thy-divider>\n <a href=\"javascript:;\" thyAction thyActionIcon=\"unlink-insert\" thePreventDefault (click)=\"removeLink($event)\"></a>\n</div>\n", dependencies: [{ kind: "component", type: i5.ThyActionComponent, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }, { kind: "component", type: i12.ThyDividerComponent, selector: "thy-divider", inputs: ["thyVertical", "thyStyle", "thyColor", "thyText", "thyTextDirection", "thyDeeper"] }, { kind: "directive", type: ThePreventDefaultDirective, selector: "[thePreventDefault]", exportAs: ["thePreventDefault"] }] });
7810
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheLinkHoverComponent, decorators: [{
7919
+ TheLinkHoverComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheLinkHoverComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
7920
+ TheLinkHoverComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: TheLinkHoverComponent, selector: "the-link-hover", inputs: { link: "link", dom: "dom", editHandle: "editHandle", deleteHandle: "deleteHandle" }, ngImport: i0, template: "<div class=\"link-hover-card px-1\">\n <a readonly href=\"{{ link }}\" target=\"_blank\" rel=\"{{ aTagRelAttr }}\" class=\"hover-control-plaintext text-truncate mx-2\">\n {{ link }}\n </a>\n <thy-divider class=\"mx-2\" [thyVertical]=\"true\"></thy-divider>\n <a href=\"javascript:;\" thyAction thyActionIcon=\"edit\" thePreventDefault (click)=\"editLink($event)\"></a>\n <thy-divider class=\"mx-2\" [thyVertical]=\"true\"></thy-divider>\n <a href=\"javascript:;\" thyAction thyActionIcon=\"unlink-insert\" thePreventDefault (click)=\"removeLink($event)\"></a>\n</div>\n", dependencies: [{ kind: "component", type: i5.ThyActionComponent, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }, { kind: "component", type: i12.ThyDividerComponent, selector: "thy-divider", inputs: ["thyVertical", "thyStyle", "thyColor", "thyText", "thyTextDirection", "thyDeeper"] }, { kind: "directive", type: ThePreventDefaultDirective, selector: "[thePreventDefault]", exportAs: ["thePreventDefault"] }] });
7921
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheLinkHoverComponent, decorators: [{
7811
7922
  type: Component,
7812
7923
  args: [{ selector: 'the-link-hover', template: "<div class=\"link-hover-card px-1\">\n <a readonly href=\"{{ link }}\" target=\"_blank\" rel=\"{{ aTagRelAttr }}\" class=\"hover-control-plaintext text-truncate mx-2\">\n {{ link }}\n </a>\n <thy-divider class=\"mx-2\" [thyVertical]=\"true\"></thy-divider>\n <a href=\"javascript:;\" thyAction thyActionIcon=\"edit\" thePreventDefault (click)=\"editLink($event)\"></a>\n <thy-divider class=\"mx-2\" [thyVertical]=\"true\"></thy-divider>\n <a href=\"javascript:;\" thyAction thyActionIcon=\"unlink-insert\" thePreventDefault (click)=\"removeLink($event)\"></a>\n</div>\n" }]
7813
7924
  }], ctorParameters: function () { return []; }, propDecorators: { link: [{
@@ -7889,9 +8000,9 @@ class TheLinkEditComponent {
7889
8000
  }
7890
8001
  }
7891
8002
  }
7892
- TheLinkEditComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheLinkEditComponent, deps: [{ token: i1$1.ThyPopoverRef }], target: i0.ɵɵFactoryTarget.Component });
7893
- TheLinkEditComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: TheLinkEditComponent, selector: "the-link-edit", inputs: { tag: "tag", node: "node", link: "link", text: "text", originSelection: "originSelection" }, host: { listeners: { "document: mousedown": "handleDocumentMouseDown($event)" }, properties: { "class": "this.className" } }, ngImport: i0, template: "<form thyForm #linkForm=\"thyForm\" [thyFormValidatorConfig]=\"validatorConfig\" name=\"linkForm\">\n <thy-form-group thyLabelText=\"\u6587\u672C\">\n <input thyInput placeholder=\"\u8BF7\u8F93\u5165\u6587\u672C\" required name=\"text\" [(ngModel)]=\"text\" thyAutofocus type=\"text\" />\n </thy-form-group>\n <thy-form-group thyLabelText=\"\u94FE\u63A5\">\n <input name=\"link\" thyInput placeholder=\"\u8BF7\u8F93\u5165\u94FE\u63A5\" required type=\"text\" #linkControl=\"ngModel\" [(ngModel)]=\"link\" />\n </thy-form-group>\n <thy-form-group-footer>\n <div class=\"btn-pair\">\n <button thyButton=\"link-secondary\" thySize=\"sm\" (click)=\"closePopover()\">\u53D6\u6D88</button>\n <button thyButton=\"primary-square\" thySize=\"sm\" (thyFormSubmit)=\"applyLink(linkForm)\">\u5E94\u7528</button>\n </div>\n </thy-form-group-footer>\n</form>\n", dependencies: [{ kind: "directive", type: i2$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i2$2.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3$1.ThyFormDirective, selector: "[thyForm],[thy-form]", inputs: ["thyLayout", "thyEnterKeyMode", "thyFormValidatorConfig"], exportAs: ["thyForm"] }, { kind: "component", type: i3$1.ThyFormGroupComponent, selector: "thy-form-group", inputs: ["thyLabelText", "thyLabelTextTranslateKey", "thyLabelRequired", "thyLabelPaddingTopClear", "thyFeedbackIcon", "thyTipsMode", "thyTips", "thyTipsTranslateKey", "thyRowFill"] }, { kind: "directive", type: i3$1.ThyFormSubmitDirective, selector: "[thyFormSubmit],[thy-form-submit]", outputs: ["thyFormSubmit"] }, { kind: "component", type: i3$1.ThyFormGroupFooterComponent, selector: "thy-form-group-footer", inputs: ["thyAlign"] }, { kind: "directive", type: i4$1.ThyAutofocusDirective, selector: "input[thyAutofocus],textarea[thyAutofocus]", inputs: ["thyAutofocus", "thyAutoSelect"] }, { kind: "directive", type: i5$1.ThyInputDirective, selector: "input[thyInput], select[thyInput], textarea[thyInput]", inputs: ["thySize"], exportAs: ["thyInput"] }, { kind: "component", type: i6$1.ThyButtonComponent, selector: "thy-button,[thy-button],[thyButton]", inputs: ["thyButton", "thyType", "thyLoading", "thyLoadingText", "thySize", "thyIcon", "thyBlock"] }] });
7894
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheLinkEditComponent, decorators: [{
8003
+ TheLinkEditComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheLinkEditComponent, deps: [{ token: i1$1.ThyPopoverRef }], target: i0.ɵɵFactoryTarget.Component });
8004
+ TheLinkEditComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: TheLinkEditComponent, selector: "the-link-edit", inputs: { tag: "tag", node: "node", link: "link", text: "text", originSelection: "originSelection" }, host: { listeners: { "document: mousedown": "handleDocumentMouseDown($event)" }, properties: { "class": "this.className" } }, ngImport: i0, template: "<form thyForm #linkForm=\"thyForm\" [thyFormValidatorConfig]=\"validatorConfig\" name=\"linkForm\">\n <thy-form-group thyLabelText=\"\u6587\u672C\">\n <input thyInput placeholder=\"\u8BF7\u8F93\u5165\u6587\u672C\" required name=\"text\" [(ngModel)]=\"text\" thyAutofocus type=\"text\" />\n </thy-form-group>\n <thy-form-group thyLabelText=\"\u94FE\u63A5\">\n <input name=\"link\" thyInput placeholder=\"\u8BF7\u8F93\u5165\u94FE\u63A5\" required type=\"text\" #linkControl=\"ngModel\" [(ngModel)]=\"link\" />\n </thy-form-group>\n <thy-form-group-footer>\n <div class=\"btn-pair\">\n <button thyButton=\"link-secondary\" thySize=\"sm\" (click)=\"closePopover()\">\u53D6\u6D88</button>\n <button thyButton=\"primary-square\" thySize=\"sm\" (thyFormSubmit)=\"applyLink(linkForm)\">\u5E94\u7528</button>\n </div>\n </thy-form-group-footer>\n</form>\n", dependencies: [{ kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i3.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3$1.ThyFormDirective, selector: "[thyForm],[thy-form]", inputs: ["thyLayout", "thyEnterKeyMode", "thyFormValidatorConfig"], exportAs: ["thyForm"] }, { kind: "component", type: i3$1.ThyFormGroupComponent, selector: "thy-form-group", inputs: ["thyLabelText", "thyLabelTextTranslateKey", "thyLabelRequired", "thyLabelPaddingTopClear", "thyFeedbackIcon", "thyTipsMode", "thyTips", "thyTipsTranslateKey", "thyRowFill"] }, { kind: "directive", type: i3$1.ThyFormSubmitDirective, selector: "[thyFormSubmit],[thy-form-submit]", outputs: ["thyFormSubmit"] }, { kind: "component", type: i3$1.ThyFormGroupFooterComponent, selector: "thy-form-group-footer", inputs: ["thyAlign"] }, { kind: "directive", type: i5$2.ThyAutofocusDirective, selector: "input[thyAutofocus],textarea[thyAutofocus]", inputs: ["thyAutoSelect", "thyAutofocus"] }, { kind: "directive", type: i5$1.ThyInputDirective, selector: "[thyInput]", inputs: ["thySize", "thyAutocomplete"] }, { kind: "component", type: i6$1.ThyButtonComponent, selector: "thy-button,[thy-button],[thyButton]", inputs: ["thyButton", "thyType", "thyLoading", "thyLoadingText", "thySize", "thyIcon", "thyBlock"] }] });
8005
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheLinkEditComponent, decorators: [{
7895
8006
  type: Component,
7896
8007
  args: [{ selector: 'the-link-edit', template: "<form thyForm #linkForm=\"thyForm\" [thyFormValidatorConfig]=\"validatorConfig\" name=\"linkForm\">\n <thy-form-group thyLabelText=\"\u6587\u672C\">\n <input thyInput placeholder=\"\u8BF7\u8F93\u5165\u6587\u672C\" required name=\"text\" [(ngModel)]=\"text\" thyAutofocus type=\"text\" />\n </thy-form-group>\n <thy-form-group thyLabelText=\"\u94FE\u63A5\">\n <input name=\"link\" thyInput placeholder=\"\u8BF7\u8F93\u5165\u94FE\u63A5\" required type=\"text\" #linkControl=\"ngModel\" [(ngModel)]=\"link\" />\n </thy-form-group>\n <thy-form-group-footer>\n <div class=\"btn-pair\">\n <button thyButton=\"link-secondary\" thySize=\"sm\" (click)=\"closePopover()\">\u53D6\u6D88</button>\n <button thyButton=\"primary-square\" thySize=\"sm\" (thyFormSubmit)=\"applyLink(linkForm)\">\u5E94\u7528</button>\n </div>\n </thy-form-group-footer>\n</form>\n" }]
7897
8008
  }], ctorParameters: function () { return [{ type: i1$1.ThyPopoverRef }]; }, propDecorators: { className: [{
@@ -8030,9 +8141,9 @@ class TheBaseLinkComponent extends TheBaseElementComponent {
8030
8141
  this.close(LinkCloseTypes.destroy);
8031
8142
  }
8032
8143
  }
8033
- TheBaseLinkComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheBaseLinkComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i1$1.ThyPopover }, { token: i2$1.Overlay }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component });
8034
- TheBaseLinkComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: TheBaseLinkComponent, selector: "[TheBaseLinkComponent]", host: { listeners: { "click": "mousedownHandle($event)" } }, usesInheritance: true, ngImport: i0, template: '', isInline: true });
8035
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheBaseLinkComponent, decorators: [{
8144
+ TheBaseLinkComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheBaseLinkComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i1$1.ThyPopover }, { token: i2$1.Overlay }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component });
8145
+ TheBaseLinkComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: TheBaseLinkComponent, selector: "[TheBaseLinkComponent]", host: { listeners: { "click": "mousedownHandle($event)" } }, usesInheritance: true, ngImport: i0, template: '', isInline: true });
8146
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheBaseLinkComponent, decorators: [{
8036
8147
  type: Component,
8037
8148
  args: [{
8038
8149
  selector: '[TheBaseLinkComponent]',
@@ -8050,11 +8161,11 @@ class TheLinkComponent extends TheBaseLinkComponent {
8050
8161
  this.inlineChromiumBugfix = String.fromCodePoint(160);
8051
8162
  }
8052
8163
  }
8053
- TheLinkComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheLinkComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
8054
- TheLinkComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: TheLinkComponent, selector: "a[theLink]", host: { attributes: { "target": "_blank" }, properties: { "attr.href": "element.url" } }, usesInheritance: true, ngImport: i0, template: ` <span contenteditable="false" class="the-break-char">{{ inlineChromiumBugfix }}</span>
8164
+ TheLinkComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheLinkComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
8165
+ TheLinkComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: TheLinkComponent, selector: "a[theLink]", host: { attributes: { "target": "_blank" }, properties: { "attr.href": "element.url" } }, usesInheritance: true, ngImport: i0, template: ` <span contenteditable="false" class="the-break-char">{{ inlineChromiumBugfix }}</span>
8055
8166
  <span><slate-children [children]="children" [context]="childrenContext" [viewContext]="viewContext"></slate-children></span>
8056
8167
  <span contenteditable="false" class="the-break-char">{{ inlineChromiumBugfix }}</span>`, isInline: true, dependencies: [{ kind: "component", type: i1.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }] });
8057
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheLinkComponent, decorators: [{
8168
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheLinkComponent, decorators: [{
8058
8169
  type: Component,
8059
8170
  args: [{
8060
8171
  selector: 'a[theLink]',
@@ -8703,7 +8814,7 @@ class TheNumberedListComponent extends TheBaseElementComponent {
8703
8814
  }
8704
8815
  get level() {
8705
8816
  var _a;
8706
- return (_a = this.element) === null || _a === void 0 ? void 0 : _a.indent;
8817
+ return ((_a = this.element) === null || _a === void 0 ? void 0 : _a.indent) || null;
8707
8818
  }
8708
8819
  ngOnInit() {
8709
8820
  super.ngOnInit();
@@ -8712,9 +8823,9 @@ class TheNumberedListComponent extends TheBaseElementComponent {
8712
8823
  super.ngOnDestroy();
8713
8824
  }
8714
8825
  }
8715
- TheNumberedListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheNumberedListComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
8716
- TheNumberedListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: TheNumberedListComponent, selector: "ol[theOl]", host: { properties: { "attr.start": "this.start", "attr.the-level": "this.level" } }, usesInheritance: true, ngImport: i0, template: `<slate-children [children]="children" [context]="childrenContext" [viewContext]="viewContext"></slate-children>`, isInline: true, dependencies: [{ kind: "component", type: i1.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }] });
8717
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheNumberedListComponent, decorators: [{
8826
+ TheNumberedListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheNumberedListComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
8827
+ TheNumberedListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: TheNumberedListComponent, selector: "ol[theOl]", host: { properties: { "attr.start": "this.start", "attr.the-level": "this.level" } }, usesInheritance: true, ngImport: i0, template: `<slate-children [children]="children" [context]="childrenContext" [viewContext]="viewContext"></slate-children>`, isInline: true, dependencies: [{ kind: "component", type: i1.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }] });
8828
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheNumberedListComponent, decorators: [{
8718
8829
  type: Component,
8719
8830
  args: [{
8720
8831
  selector: 'ol[theOl]',
@@ -8736,7 +8847,7 @@ class TheBulletedListComponent extends TheBaseElementComponent {
8736
8847
  }
8737
8848
  get level() {
8738
8849
  var _a;
8739
- return (_a = this.element) === null || _a === void 0 ? void 0 : _a.indent;
8850
+ return ((_a = this.element) === null || _a === void 0 ? void 0 : _a.indent) || null;
8740
8851
  }
8741
8852
  ngOnInit() {
8742
8853
  super.ngOnInit();
@@ -8745,9 +8856,9 @@ class TheBulletedListComponent extends TheBaseElementComponent {
8745
8856
  super.ngOnDestroy();
8746
8857
  }
8747
8858
  }
8748
- TheBulletedListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheBulletedListComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
8749
- TheBulletedListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: TheBulletedListComponent, selector: "ul[theUl]", host: { properties: { "attr.the-level": "this.level" } }, usesInheritance: true, ngImport: i0, template: `<slate-children [children]="children" [context]="childrenContext" [viewContext]="viewContext"></slate-children>`, isInline: true, dependencies: [{ kind: "component", type: i1.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }] });
8750
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheBulletedListComponent, decorators: [{
8859
+ TheBulletedListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheBulletedListComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
8860
+ TheBulletedListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: TheBulletedListComponent, selector: "ul[theUl]", host: { properties: { "attr.the-level": "this.level" } }, usesInheritance: true, ngImport: i0, template: `<slate-children [children]="children" [context]="childrenContext" [viewContext]="viewContext"></slate-children>`, isInline: true, dependencies: [{ kind: "component", type: i1.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }] });
8861
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheBulletedListComponent, decorators: [{
8751
8862
  type: Component,
8752
8863
  args: [{
8753
8864
  selector: 'ul[theUl]',
@@ -8835,9 +8946,9 @@ class TheListItemComponent extends TheBaseElementComponent {
8835
8946
  }
8836
8947
  }
8837
8948
  }
8838
- TheListItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheListItemComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
8839
- TheListItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: TheListItemComponent, selector: "li[theLi]", usesInheritance: true, ngImport: i0, template: `<slate-children [children]="children" [context]="childrenContext" [viewContext]="viewContext"></slate-children>`, isInline: true, dependencies: [{ kind: "component", type: i1.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }] });
8840
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheListItemComponent, decorators: [{
8949
+ TheListItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheListItemComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
8950
+ TheListItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: TheListItemComponent, selector: "li[theLi]", usesInheritance: true, ngImport: i0, template: `<slate-children [children]="children" [context]="childrenContext" [viewContext]="viewContext"></slate-children>`, isInline: true, dependencies: [{ kind: "component", type: i1.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }] });
8951
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheListItemComponent, decorators: [{
8841
8952
  type: Component,
8842
8953
  args: [{
8843
8954
  selector: 'li[theLi]',
@@ -9743,9 +9854,9 @@ class TheBaseSuggestion {
9743
9854
  event.preventDefault();
9744
9855
  }
9745
9856
  }
9746
- TheBaseSuggestion.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheBaseSuggestion, deps: [], target: i0.ɵɵFactoryTarget.Directive });
9747
- TheBaseSuggestion.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.12", type: TheBaseSuggestion, inputs: { editor: "editor", type: "type", keywords: "keywords" }, host: { listeners: { "mousedown": "handleMousedown($event)" } }, ngImport: i0 });
9748
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheBaseSuggestion, decorators: [{
9857
+ TheBaseSuggestion.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheBaseSuggestion, deps: [], target: i0.ɵɵFactoryTarget.Directive });
9858
+ TheBaseSuggestion.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.0", type: TheBaseSuggestion, inputs: { editor: "editor", type: "type", keywords: "keywords" }, host: { listeners: { "mousedown": "handleMousedown($event)" } }, ngImport: i0 });
9859
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheBaseSuggestion, decorators: [{
9749
9860
  type: Directive
9750
9861
  }], propDecorators: { editor: [{
9751
9862
  type: Input
@@ -9819,9 +9930,9 @@ class TheVerticalToolbarItemComponent extends TheBaseToolbarDropdown {
9819
9930
  }
9820
9931
  }
9821
9932
  }
9822
- TheVerticalToolbarItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheVerticalToolbarItemComponent, deps: [{ token: i0.ElementRef }, { token: i1$1.ThyPopover }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component });
9823
- TheVerticalToolbarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: TheVerticalToolbarItemComponent, 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: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.ThyIconComponent, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { kind: "directive", type: i8.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { kind: "component", type: i5.ThyActionComponent, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }, { kind: "directive", type: i6.ThyDropdownMenuItemDirective, selector: "[thyDropdownMenuItem]", inputs: ["thyType", "thyDisabled"] }, { kind: "directive", type: i6.ThyDropdownMenuItemNameDirective, selector: "[thyDropdownMenuItemName]" }, { kind: "directive", type: i6.ThyDropdownMenuItemIconDirective, selector: "[thyDropdownMenuItemIcon]" }, { kind: "directive", type: i6.ThyDropdownMenuItemActiveDirective, selector: "[thyDropdownMenuItemActive]", inputs: ["thyDropdownMenuItemActive"] }] });
9824
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheVerticalToolbarItemComponent, decorators: [{
9933
+ TheVerticalToolbarItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheVerticalToolbarItemComponent, deps: [{ token: i0.ElementRef }, { token: i1$1.ThyPopover }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component });
9934
+ TheVerticalToolbarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: TheVerticalToolbarItemComponent, 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: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.ThyIconComponent, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { kind: "directive", type: i8.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { kind: "component", type: i5.ThyActionComponent, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }, { kind: "directive", type: i6.ThyDropdownMenuItemDirective, selector: "[thyDropdownMenuItem]", inputs: ["thyType", "thyDisabled"] }, { kind: "directive", type: i6.ThyDropdownMenuItemNameDirective, selector: "[thyDropdownMenuItemName]" }, { kind: "directive", type: i6.ThyDropdownMenuItemIconDirective, selector: "[thyDropdownMenuItemIcon]" }, { kind: "directive", type: i6.ThyDropdownMenuItemActiveDirective, selector: "[thyDropdownMenuItemActive]", inputs: ["thyDropdownMenuItemActive"] }] });
9935
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheVerticalToolbarItemComponent, decorators: [{
9825
9936
  type: Component,
9826
9937
  args: [{ selector: 'the-toolbar-vertical-align-item', host: {
9827
9938
  class: 'the-toolbar-dropdown-container verticalAlign',
@@ -9914,9 +10025,9 @@ class TheTableSelectComponent {
9914
10025
  }
9915
10026
  }
9916
10027
  }
9917
- TheTableSelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheTableSelectComponent, deps: [{ token: i1$1.ThyPopoverRef }], target: i0.ɵɵFactoryTarget.Component });
9918
- TheTableSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: TheTableSelectComponent, selector: "table-select", inputs: { optionsParam: "optionsParam", editor: "editor", beforeInsert: "beforeInsert" }, ngImport: i0, template: "<div class=\"table-selector-container\">\n <div *ngFor=\"let item of tableData; let rowIndex = index\" class=\"selector-row\" (mousedown)=\"executeTable($event)\">\n <span\n *ngFor=\"let item of tableData; let colIndex = index\"\n [ngClass]=\"{ 'active-cell': rowIndex <= maxRowIndex && colIndex <= maxColIndex, 'selector-cell': true }\"\n (mouseenter)=\"onSelectCells(rowIndex, colIndex)\"\n >\n </span>\n </div>\n <span class=\"selector-text\">{{ maxRowIndex + 1 }} x {{ maxColIndex + 1 }}</span>\n</div>\n", dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
9919
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheTableSelectComponent, decorators: [{
10028
+ TheTableSelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheTableSelectComponent, deps: [{ token: i1$1.ThyPopoverRef }], target: i0.ɵɵFactoryTarget.Component });
10029
+ TheTableSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: TheTableSelectComponent, selector: "table-select", inputs: { optionsParam: "optionsParam", editor: "editor", beforeInsert: "beforeInsert" }, ngImport: i0, template: "<div class=\"table-selector-container\">\n <div *ngFor=\"let item of tableData; let rowIndex = index\" class=\"selector-row\" (mousedown)=\"executeTable($event)\">\n <span\n *ngFor=\"let item of tableData; let colIndex = index\"\n [ngClass]=\"{ 'active-cell': rowIndex <= maxRowIndex && colIndex <= maxColIndex, 'selector-cell': true }\"\n (mouseenter)=\"onSelectCells(rowIndex, colIndex)\"\n >\n </span>\n </div>\n <span class=\"selector-text\">{{ maxRowIndex + 1 }} x {{ maxColIndex + 1 }}</span>\n</div>\n", dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
10030
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheTableSelectComponent, decorators: [{
9920
10031
  type: Component,
9921
10032
  args: [{ selector: 'table-select', template: "<div class=\"table-selector-container\">\n <div *ngFor=\"let item of tableData; let rowIndex = index\" class=\"selector-row\" (mousedown)=\"executeTable($event)\">\n <span\n *ngFor=\"let item of tableData; let colIndex = index\"\n [ngClass]=\"{ 'active-cell': rowIndex <= maxRowIndex && colIndex <= maxColIndex, 'selector-cell': true }\"\n (mouseenter)=\"onSelectCells(rowIndex, colIndex)\"\n >\n </span>\n </div>\n <span class=\"selector-text\">{{ maxRowIndex + 1 }} x {{ maxColIndex + 1 }}</span>\n</div>\n" }]
9922
10033
  }], ctorParameters: function () { return [{ type: i1$1.ThyPopoverRef }]; }, propDecorators: { optionsParam: [{
@@ -9969,14 +10080,14 @@ class TheListboxOptionDirective {
9969
10080
  return this._active;
9970
10081
  }
9971
10082
  }
9972
- TheListboxOptionDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheListboxOptionDirective, deps: [{ token: THE_LISTBOX_PARENT_OPTION_TOKEN, optional: true, skipSelf: true }, { token: THE_LISTBOX_PARENT_GROUP_TOKEN }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
9973
- TheListboxOptionDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.12", type: TheListboxOptionDirective, selector: "[theListboxOption]", inputs: { theOptionValue: "theOptionValue", theOptionDisabled: "theOptionDisabled" }, host: { properties: { "class": "this.className" } }, providers: [
10083
+ TheListboxOptionDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheListboxOptionDirective, deps: [{ token: THE_LISTBOX_PARENT_OPTION_TOKEN, optional: true, skipSelf: true }, { token: THE_LISTBOX_PARENT_GROUP_TOKEN }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
10084
+ TheListboxOptionDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.0", type: TheListboxOptionDirective, selector: "[theListboxOption]", inputs: { theOptionValue: "theOptionValue", theOptionDisabled: "theOptionDisabled" }, host: { properties: { "class": "this.className" } }, providers: [
9974
10085
  {
9975
10086
  provide: THE_LISTBOX_PARENT_OPTION_TOKEN,
9976
10087
  useExisting: TheListboxOptionDirective
9977
10088
  }
9978
10089
  ], queries: [{ propertyName: "_options", predicate: TheListboxOptionDirective, descendants: true }], exportAs: ["theListboxOption"], ngImport: i0 });
9979
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheListboxOptionDirective, decorators: [{
10090
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheListboxOptionDirective, decorators: [{
9980
10091
  type: Directive,
9981
10092
  args: [{
9982
10093
  selector: '[theListboxOption]',
@@ -10054,14 +10165,14 @@ class TheListboxGroupDirective {
10054
10165
  return this.options[this.options.length - 1];
10055
10166
  }
10056
10167
  }
10057
- TheListboxGroupDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheListboxGroupDirective, deps: [{ token: THE_LISTBOX_PARENT_OPTION_TOKEN, optional: true, skipSelf: true }, { token: THE_LISTBOX_TOKEN }], target: i0.ɵɵFactoryTarget.Directive });
10058
- TheListboxGroupDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.12", type: TheListboxGroupDirective, selector: "[theListboxGroup]", inputs: { horizontalColumn: "horizontalColumn" }, host: { properties: { "class": "this.className" } }, providers: [
10168
+ TheListboxGroupDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheListboxGroupDirective, deps: [{ token: THE_LISTBOX_PARENT_OPTION_TOKEN, optional: true, skipSelf: true }, { token: THE_LISTBOX_TOKEN }], target: i0.ɵɵFactoryTarget.Directive });
10169
+ TheListboxGroupDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.0", type: TheListboxGroupDirective, selector: "[theListboxGroup]", inputs: { horizontalColumn: "horizontalColumn" }, host: { properties: { "class": "this.className" } }, providers: [
10059
10170
  {
10060
10171
  provide: THE_LISTBOX_PARENT_GROUP_TOKEN,
10061
10172
  useExisting: TheListboxGroupDirective
10062
10173
  }
10063
10174
  ], queries: [{ propertyName: "_options", predicate: TheListboxOptionDirective, descendants: true }], exportAs: ["theListboxGroup"], ngImport: i0 });
10064
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheListboxGroupDirective, decorators: [{
10175
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheListboxGroupDirective, decorators: [{
10065
10176
  type: Directive,
10066
10177
  args: [{
10067
10178
  selector: '[theListboxGroup]',
@@ -10267,14 +10378,14 @@ class TheListboxDirective {
10267
10378
  this._keyboardSubscription.unsubscribe();
10268
10379
  }
10269
10380
  }
10270
- TheListboxDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheListboxDirective, deps: [{ token: i0.NgZone }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
10271
- TheListboxDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.12", type: TheListboxDirective, selector: "[theListBox]", inputs: { keyboardContainer: "keyboardContainer", autoActiveFirstItem: "autoActiveFirstItem" }, outputs: { theListboxChange: "theListboxChange" }, host: { properties: { "class": "this.className" } }, providers: [
10381
+ TheListboxDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheListboxDirective, deps: [{ token: i0.NgZone }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
10382
+ TheListboxDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.0", type: TheListboxDirective, selector: "[theListBox]", inputs: { keyboardContainer: "keyboardContainer", autoActiveFirstItem: "autoActiveFirstItem" }, outputs: { theListboxChange: "theListboxChange" }, host: { properties: { "class": "this.className" } }, providers: [
10272
10383
  {
10273
10384
  provide: THE_LISTBOX_TOKEN,
10274
10385
  useExisting: TheListboxDirective
10275
10386
  }
10276
10387
  ], queries: [{ propertyName: "_groups", predicate: TheListboxGroupDirective, descendants: true }, { propertyName: "_options", predicate: TheListboxOptionDirective, descendants: true }], exportAs: ["theListBox"], ngImport: i0 });
10277
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheListboxDirective, decorators: [{
10388
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheListboxDirective, decorators: [{
10278
10389
  type: Directive,
10279
10390
  args: [{
10280
10391
  selector: '[theListBox]',
@@ -10454,9 +10565,9 @@ class ThePluginMenuComponent extends mixinUnsubscribe(MixinBase) {
10454
10565
  super.ngOnDestroy();
10455
10566
  }
10456
10567
  }
10457
- ThePluginMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ThePluginMenuComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: i1$1.ThyPopoverRef }], target: i0.ɵɵFactoryTarget.Component });
10458
- ThePluginMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: ThePluginMenuComponent, selector: "the-plugin-menu", inputs: { editor: "editor", theDisplaySearch: "theDisplaySearch", thePluginMenu: "thePluginMenu" }, host: { properties: { "class": "this.containerClassName" } }, viewQueries: [{ propertyName: "dropdownTriggers", predicate: ["dropdownTriggers"], descendants: true, read: ThyDropdownDirective }], usesInheritance: true, 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]=\"autoActiveFirstItem\"\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 class=\"menu-icon mr-2\">\n <thy-icon [thyIconName]=\"item.menuIcon\"></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 (click)=\"handleItemSelection(item)\"\n >\n <div class=\"menu-icon mr-2\">\n <thy-icon [thyIconName]=\"item.menuIcon\"></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 class=\"menu-icon mr-2\">\n <thy-icon [thyIconName]=\"child.menuIcon\"></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\"></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: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3.ThyIconComponent, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { kind: "directive", type: i8.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { kind: "component", type: i5$1.ThyInputSearchComponent, selector: "thy-input-search", inputs: ["name", "placeholder", "thyTheme", "thySearchFocus", "thyIconPosition", "thySize"], outputs: ["clear", "thyClear"] }, { kind: "component", type: i5.ThyActionComponent, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }, { kind: "component", type: i12.ThyDividerComponent, selector: "thy-divider", inputs: ["thyVertical", "thyStyle", "thyColor", "thyText", "thyTextDirection", "thyDeeper"] }, { kind: "directive", type: i6.ThyDropdownDirective, selector: "[thyDropdown]", inputs: ["thyDropdownMenu", "thyDropdown", "thyTrigger", "thyShowDelay", "thyHideDelay", "thyActiveClass", "thyPopoverOptions"], outputs: ["thyActiveChange"] }, { kind: "component", type: i6.ThyDropdownMenuComponent, selector: "thy-dropdown-menu", inputs: ["thyWidth"] }, { kind: "component", type: i6.ThyDropdownMenuGroupComponent, selector: "thy-dropdown-menu-group", inputs: ["thyTitle"] }, { kind: "directive", type: i6.ThyDropdownMenuItemDirective, selector: "[thyDropdownMenuItem]", inputs: ["thyType", "thyDisabled"] }, { kind: "component", type: i10$1.ThyEmptyComponent, selector: "thy-empty", inputs: ["thyMessage", "thyTranslationKey", "thyTranslationValues", "thyEntityName", "thyEntityNameTranslateKey", "thyIconName", "thySize", "thyMarginTop", "thyTopAuto", "thyContainer", "thyImageUrl", "thyImageLoading", "thyImageFetchPriority", "thyDescription"] }, { kind: "directive", type: i1$1.ThyPopoverDirective, selector: "[thyPopover]", inputs: ["thyPopover", "thyTrigger", "thyPlacement", "thyOffset", "thyConfig", "thyShowDelay", "thyHideDelay", "thyAutoAdaptive", "thyDisabled"] }, { kind: "component", type: TheTableSelectComponent, selector: "table-select", inputs: ["optionsParam", "editor", "beforeInsert"] }, { kind: "directive", type: TheListboxOptionDirective, selector: "[theListboxOption]", inputs: ["theOptionValue", "theOptionDisabled"], exportAs: ["theListboxOption"] }, { kind: "directive", type: TheListboxGroupDirective, selector: "[theListboxGroup]", inputs: ["horizontalColumn"], exportAs: ["theListboxGroup"] }, { kind: "directive", type: TheListboxDirective, selector: "[theListBox]", inputs: ["keyboardContainer", "autoActiveFirstItem"], outputs: ["theListboxChange"], exportAs: ["theListBox"] }, { kind: "directive", type: ThePreventDefaultDirective, selector: "[thePreventDefault]", exportAs: ["thePreventDefault"] }] });
10459
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ThePluginMenuComponent, decorators: [{
10568
+ ThePluginMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ThePluginMenuComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: i1$1.ThyPopoverRef }], target: i0.ɵɵFactoryTarget.Component });
10569
+ ThePluginMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: ThePluginMenuComponent, selector: "the-plugin-menu", inputs: { editor: "editor", theDisplaySearch: "theDisplaySearch", thePluginMenu: "thePluginMenu" }, host: { properties: { "class": "this.containerClassName" } }, viewQueries: [{ propertyName: "dropdownTriggers", predicate: ["dropdownTriggers"], descendants: true, read: ThyDropdownDirective }], usesInheritance: true, 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]=\"autoActiveFirstItem\"\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 class=\"menu-icon mr-2\">\n <thy-icon [thyIconName]=\"item.menuIcon\"></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 (click)=\"handleItemSelection(item)\"\n >\n <div class=\"menu-icon mr-2\">\n <thy-icon [thyIconName]=\"item.menuIcon\"></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 class=\"menu-icon mr-2\">\n <thy-icon [thyIconName]=\"child.menuIcon\"></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\"></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: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4.ThyIconComponent, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { kind: "directive", type: i8.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { kind: "component", type: i5$1.ThyInputSearchComponent, selector: "thy-input-search", inputs: ["name", "placeholder", "thyTheme", "thySearchFocus", "thyIconPosition", "thySize"], outputs: ["clear", "thyClear"] }, { kind: "component", type: i5.ThyActionComponent, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }, { kind: "component", type: i12.ThyDividerComponent, selector: "thy-divider", inputs: ["thyVertical", "thyStyle", "thyColor", "thyText", "thyTextDirection", "thyDeeper"] }, { kind: "directive", type: i6.ThyDropdownDirective, selector: "[thyDropdown]", inputs: ["thyDropdownMenu", "thyDropdown", "thyTrigger", "thyActiveClass", "thyPopoverOptions"], outputs: ["thyActiveChange"] }, { kind: "component", type: i6.ThyDropdownMenuComponent, selector: "thy-dropdown-menu", inputs: ["thyWidth"] }, { kind: "component", type: i6.ThyDropdownMenuGroupComponent, selector: "thy-dropdown-menu-group", inputs: ["thyTitle"] }, { kind: "directive", type: i6.ThyDropdownMenuItemDirective, selector: "[thyDropdownMenuItem]", inputs: ["thyType", "thyDisabled"] }, { kind: "component", type: i10$1.ThyEmptyComponent, selector: "thy-empty", inputs: ["thyMessage", "thyTranslationKey", "thyTranslationValues", "thyEntityName", "thyEntityNameTranslateKey", "thyIconName", "thySize", "thyMarginTop", "thyTopAuto", "thyContainer", "thyImageUrl", "thyImageLoading", "thyImageFetchPriority", "thyDescription"] }, { kind: "directive", type: i1$1.ThyPopoverDirective, selector: "[thyPopover]", inputs: ["thyPopover", "thyTrigger", "thyPlacement", "thyOffset", "thyConfig", "thyShowDelay", "thyHideDelay", "thyAutoAdaptive", "thyDisabled"] }, { kind: "component", type: TheTableSelectComponent, selector: "table-select", inputs: ["optionsParam", "editor", "beforeInsert"] }, { kind: "directive", type: TheListboxOptionDirective, selector: "[theListboxOption]", inputs: ["theOptionValue", "theOptionDisabled"], exportAs: ["theListboxOption"] }, { kind: "directive", type: TheListboxGroupDirective, selector: "[theListboxGroup]", inputs: ["horizontalColumn"], exportAs: ["theListboxGroup"] }, { kind: "directive", type: TheListboxDirective, selector: "[theListBox]", inputs: ["keyboardContainer", "autoActiveFirstItem"], outputs: ["theListboxChange"], exportAs: ["theListBox"] }, { kind: "directive", type: ThePreventDefaultDirective, selector: "[thePreventDefault]", exportAs: ["thePreventDefault"] }] });
10570
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ThePluginMenuComponent, decorators: [{
10460
10571
  type: Component,
10461
10572
  args: [{ selector: 'the-plugin-menu', 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]=\"autoActiveFirstItem\"\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 class=\"menu-icon mr-2\">\n <thy-icon [thyIconName]=\"item.menuIcon\"></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 (click)=\"handleItemSelection(item)\"\n >\n <div class=\"menu-icon mr-2\">\n <thy-icon [thyIconName]=\"item.menuIcon\"></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 class=\"menu-icon mr-2\">\n <thy-icon [thyIconName]=\"child.menuIcon\"></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\"></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" }]
10462
10573
  }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }, { type: i1$1.ThyPopoverRef }]; }, propDecorators: { dropdownTriggers: [{
@@ -10663,6 +10774,127 @@ const createSoftBreakPlugin = createPluginFactory({
10663
10774
  }
10664
10775
  });
10665
10776
 
10777
+ const SLA_TABLE_SELECTOR = '.slate-element-table';
10778
+ const SLA_TABLE_CELL_SELECTOR = '.slate-element-table-cell';
10779
+
10780
+ class TheToolbarGroupComponent {
10781
+ constructor(elementRef, thyPopover, viewContainerRef) {
10782
+ this.elementRef = elementRef;
10783
+ this.thyPopover = thyPopover;
10784
+ this.viewContainerRef = viewContainerRef;
10785
+ this.className = 'the-toolbar-group';
10786
+ this.active = false;
10787
+ }
10788
+ set item(i) {
10789
+ this._item = i;
10790
+ this.activeMenuItem = i;
10791
+ }
10792
+ get item() {
10793
+ return this._item;
10794
+ }
10795
+ get isOpened() {
10796
+ return this.groupPopoverRef && this.groupPopoverRef.getOverlayRef() && this.groupPopoverRef.getOverlayRef().hasAttached();
10797
+ }
10798
+ mousedownHandler(event) {
10799
+ event.preventDefault();
10800
+ this.toggleGroupMenus(event);
10801
+ }
10802
+ documentMouseupHandle(event) {
10803
+ const isGroup = event.target.closest('.the-toolbar-group');
10804
+ const isGroupContainer = event.target.closest('.the-toolbar-group-container');
10805
+ if (!isGroupContainer && !isGroup && this.isOpened) {
10806
+ this.closeGroup();
10807
+ }
10808
+ }
10809
+ clickHandle(event) {
10810
+ event.stopPropagation();
10811
+ }
10812
+ ngOnInit() { }
10813
+ ngOnDestroy() {
10814
+ this.closeGroup();
10815
+ }
10816
+ toggleGroupMenus(event) {
10817
+ var _a;
10818
+ if ((_a = this.editor) === null || _a === void 0 ? void 0 : _a.disabled) {
10819
+ return;
10820
+ }
10821
+ if (this.isOpened) {
10822
+ this.closeGroup();
10823
+ }
10824
+ else {
10825
+ this.openGroup(event);
10826
+ }
10827
+ }
10828
+ selectionChange(editor) {
10829
+ const activeItem = this.menusActive(editor);
10830
+ this.activeMenuItem = activeItem ? activeItem : null;
10831
+ this.activeChange();
10832
+ }
10833
+ menusActive(editor) {
10834
+ return this.menus.find(i => {
10835
+ var _a;
10836
+ if (((_a = this.editor) === null || _a === void 0 ? void 0 : _a.selection) && (i === null || i === void 0 ? void 0 : i.active)) {
10837
+ return i === null || i === void 0 ? void 0 : i.active(editor);
10838
+ }
10839
+ });
10840
+ }
10841
+ activeChange() {
10842
+ const activeItem = this.menusActive(this.editor);
10843
+ if (this.isOpened && !activeItem) {
10844
+ this.active = false;
10845
+ return;
10846
+ }
10847
+ this.active = activeItem ? true : false;
10848
+ }
10849
+ openGroup(event) {
10850
+ this.active = true;
10851
+ this.groupPopoverRef = this.thyPopover.open(this.groupTemplate, {
10852
+ panelClass: 'the-toolbar-group-container',
10853
+ offset: 0,
10854
+ minWidth: 0,
10855
+ placement: 'bottomRight',
10856
+ origin: event.currentTarget,
10857
+ viewContainerRef: this.viewContainerRef,
10858
+ hasBackdrop: false,
10859
+ outsideClosable: true,
10860
+ manualClosure: true
10861
+ });
10862
+ this.groupPopoverRef.afterClosed().subscribe(() => {
10863
+ this.activeChange();
10864
+ });
10865
+ }
10866
+ closeGroup() {
10867
+ if (this.isOpened) {
10868
+ this.groupPopoverRef.close();
10869
+ }
10870
+ }
10871
+ }
10872
+ TheToolbarGroupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheToolbarGroupComponent, deps: [{ token: i0.ElementRef }, { token: i1$1.ThyPopover }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component });
10873
+ TheToolbarGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: TheToolbarGroupComponent, selector: "the-toolbar-group", inputs: { menus: "menus", item: "item" }, host: { listeners: { "mousedown": "mousedownHandler($event)", "document:mouseup": "documentMouseupHandle($event)", "click": "clickHandle($event)" }, properties: { "class": "this.className" } }, viewQueries: [{ propertyName: "groupTemplate", first: true, predicate: ["groupTemplate"], descendants: true, read: TemplateRef, static: true }], ngImport: i0, template: "<a\n href=\"javascript:;\"\n thyAction\n [thyActionIcon]=\"item.icon\"\n [thyActionActive]=\"active\"\n [thyTooltip]=\"item?.name\"\n thyTooltipPlacement=\"top\"\n></a>\n\n<ng-template #groupTemplate>\n <the-toolbar class=\"group\" [editor]=\"editor\" [toolbarItems]=\"menus\" [isMore]=\"false\"></the-toolbar>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i8.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { kind: "component", type: i5.ThyActionComponent, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }, { kind: "component", type: TheToolbarComponent, selector: "the-toolbar", inputs: ["editor", "toolbarItems", "align", "containerClass", "isMore", "afterTemplate"] }] });
10874
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheToolbarGroupComponent, decorators: [{
10875
+ type: Component,
10876
+ args: [{ selector: 'the-toolbar-group', template: "<a\n href=\"javascript:;\"\n thyAction\n [thyActionIcon]=\"item.icon\"\n [thyActionActive]=\"active\"\n [thyTooltip]=\"item?.name\"\n thyTooltipPlacement=\"top\"\n></a>\n\n<ng-template #groupTemplate>\n <the-toolbar class=\"group\" [editor]=\"editor\" [toolbarItems]=\"menus\" [isMore]=\"false\"></the-toolbar>\n</ng-template>\n" }]
10877
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1$1.ThyPopover }, { type: i0.ViewContainerRef }]; }, propDecorators: { className: [{
10878
+ type: HostBinding,
10879
+ args: ['class']
10880
+ }], menus: [{
10881
+ type: Input
10882
+ }], item: [{
10883
+ type: Input
10884
+ }], groupTemplate: [{
10885
+ type: ViewChild,
10886
+ args: ['groupTemplate', { read: TemplateRef, static: true }]
10887
+ }], mousedownHandler: [{
10888
+ type: HostListener,
10889
+ args: ['mousedown', ['$event']]
10890
+ }], documentMouseupHandle: [{
10891
+ type: HostListener,
10892
+ args: ['document:mouseup', ['$event']]
10893
+ }], clickHandle: [{
10894
+ type: HostListener,
10895
+ args: ['click', ['$event']]
10896
+ }] } });
10897
+
10666
10898
  /**
10667
10899
  * @license
10668
10900
  * Copyright Google LLC All Rights Reserved.
@@ -10685,9 +10917,9 @@ class ColumnResizeNotifierSource {
10685
10917
  this.triggerResize = new Subject();
10686
10918
  }
10687
10919
  }
10688
- ColumnResizeNotifierSource.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ColumnResizeNotifierSource, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
10689
- ColumnResizeNotifierSource.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ColumnResizeNotifierSource });
10690
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ColumnResizeNotifierSource, decorators: [{
10920
+ ColumnResizeNotifierSource.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ColumnResizeNotifierSource, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
10921
+ ColumnResizeNotifierSource.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ColumnResizeNotifierSource });
10922
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ColumnResizeNotifierSource, decorators: [{
10691
10923
  type: Injectable
10692
10924
  }] });
10693
10925
 
@@ -10737,12 +10969,40 @@ class TableCellEventDispatcher {
10737
10969
  }));
10738
10970
  }
10739
10971
  }
10740
- TableCellEventDispatcher.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TableCellEventDispatcher, deps: [{ token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });
10741
- TableCellEventDispatcher.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TableCellEventDispatcher });
10742
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TableCellEventDispatcher, decorators: [{
10972
+ TableCellEventDispatcher.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TableCellEventDispatcher, deps: [{ token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });
10973
+ TableCellEventDispatcher.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TableCellEventDispatcher });
10974
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TableCellEventDispatcher, decorators: [{
10743
10975
  type: Injectable
10744
10976
  }], ctorParameters: function () { return [{ type: i0.NgZone }]; } });
10745
10977
 
10978
+ function splitCell(editor) {
10979
+ const opts = new TableOptions();
10980
+ const { anchor } = editor.selection;
10981
+ const tablePosition = TablePosition.create(opts, editor, anchor.path);
10982
+ const { cell, table, cellEntry } = tablePosition;
10983
+ if ((!cell.rowspan && !cell.colspan) || (cell.rowspan === 1 && cell.colspan === 1))
10984
+ return editor;
10985
+ const cellRow = tablePosition.getRowIndex();
10986
+ const cellCol = tablePosition.getColumnIndex();
10987
+ resetTableCell(editor, table, cell, cellRow, cellCol);
10988
+ Transforms.select(editor, cellEntry[1]);
10989
+ Transforms.collapse(editor, { edge: 'end' });
10990
+ }
10991
+ function resetTableCell(editor, table, cell, cellRow, cellCol) {
10992
+ const rowSpanIndex = cellRow + (cell.rowspan || 1) - 1;
10993
+ const colSpanIndex = cellCol + (cell.colspan || 1) - 1;
10994
+ Editor.withoutNormalizing(editor, () => {
10995
+ table.children.map((row, rowIndex) => {
10996
+ row.children.map((col, colIndex) => {
10997
+ if (rowIndex >= cellRow && rowIndex <= rowSpanIndex && colIndex >= cellCol && colIndex <= colSpanIndex) {
10998
+ const path = findPath(editor, col);
10999
+ Transforms.setNodes(editor, { colspan: null, rowspan: null, hidden: null }, { at: path });
11000
+ }
11001
+ });
11002
+ });
11003
+ });
11004
+ }
11005
+
10746
11006
  function getSelectCellNode(editor, selectedCells) {
10747
11007
  const { anchor } = editor.selection;
10748
11008
  const opts = new TableOptions();
@@ -10842,12 +11102,110 @@ function mergeCellContent(editor, leftTopCellPath, cellPath) {
10842
11102
  });
10843
11103
  }
10844
11104
 
10845
- class TableStore {
10846
- constructor() {
10847
- this.selectedCells$ = new BehaviorSubject([]);
10848
- this.dangerousCells$ = new BehaviorSubject([]);
10849
- this.cellsChangeObject$ = new Subject();
10850
- this.tableChange$ = new Subject();
11105
+ function setCellMenuVisibility(editor, menuList, tableInfo, isFromControls) {
11106
+ const { selectedCells, isFullscreen, selectedRowsIndex, selectedColumnsIndex } = tableInfo;
11107
+ const isCellMerged = isSelectedCellMerged(editor);
11108
+ const selectCellNodes = getSelectCellNode(editor, selectedCells).filter(item => !item.node.hidden);
11109
+ const isRect = isRectangularInTableCells(selectedCells);
11110
+ menuList.forEach(item => {
11111
+ switch (item.key) {
11112
+ case 'merge-cells':
11113
+ item.visibility = selectCellNodes && selectCellNodes.length > 1 && !isFromControls && isRect;
11114
+ break;
11115
+ case 'split-cells':
11116
+ item.visibility = selectCellNodes && selectCellNodes.length === 1 && isCellMerged && !isFromControls;
11117
+ break;
11118
+ case 'delete-selection-rows':
11119
+ item.visibility = !isFullscreen || !selectedColumnsIndex.length;
11120
+ break;
11121
+ case 'delete-selection-columns':
11122
+ item.visibility = !isFullscreen || !selectedRowsIndex.length;
11123
+ break;
11124
+ case 'delete-table':
11125
+ item.visibility = !isFullscreen;
11126
+ break;
11127
+ case TableInsertType.insertRowsUp:
11128
+ const isHeader = TableEditor.isActiveHeaderRow(editor);
11129
+ item.visibility = !isHeader && isRect;
11130
+ break;
11131
+ case TableInsertType.insertRowsDown:
11132
+ item.visibility = isRect;
11133
+ break;
11134
+ case TableInsertType.insertColumnsLeft:
11135
+ const isHeaderColumn = TableEditor.isActiveHeaderColumn(editor);
11136
+ item.visibility = !isHeaderColumn && isRect;
11137
+ break;
11138
+ case TableInsertType.insertColumnsRight:
11139
+ item.visibility = isRect;
11140
+ break;
11141
+ }
11142
+ });
11143
+ }
11144
+
11145
+ class TheContextMenuComponent {
11146
+ constructor(elementRef, thyPopoverRef) {
11147
+ this.elementRef = elementRef;
11148
+ this.thyPopoverRef = thyPopoverRef;
11149
+ this.menuEntities = [];
11150
+ this.wrap = true;
11151
+ }
11152
+ handleDocumentMouseDown(event) {
11153
+ if (!this.elementRef.nativeElement.contains(event.target) && event.button !== 2) {
11154
+ this.thyPopoverRef.close();
11155
+ }
11156
+ }
11157
+ handleMouseDown(event) {
11158
+ event.preventDefault();
11159
+ event.stopPropagation();
11160
+ }
11161
+ itemMousedown(event, entity) {
11162
+ event.preventDefault();
11163
+ this.actionHandle(entity);
11164
+ this.thyPopoverRef.close();
11165
+ }
11166
+ itemMouseleave(event, entity) {
11167
+ event.preventDefault();
11168
+ this.deactivateHandle(event, entity);
11169
+ }
11170
+ itemMouseenter(event, entity) {
11171
+ event.preventDefault();
11172
+ this.activeHandle(event, entity);
11173
+ }
11174
+ inputNumberFocus(e) {
11175
+ e.target.focus();
11176
+ }
11177
+ ngOnInit() { }
11178
+ }
11179
+ TheContextMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheContextMenuComponent, deps: [{ token: i0.ElementRef }, { token: i1$1.ThyPopoverRef }], target: i0.ɵɵFactoryTarget.Component });
11180
+ TheContextMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: TheContextMenuComponent, selector: "the-contextmenu", inputs: { menuEntities: "menuEntities", actionHandle: "actionHandle", activeHandle: "activeHandle", deactivateHandle: "deactivateHandle" }, host: { listeners: { "document: mousedown": "handleDocumentMouseDown($event)", "mousedown": "handleMouseDown($event)" }, properties: { "class.the-overlay-menu-wrap": "this.wrap" } }, ngImport: i0, template: "<div class=\"thy-dropdown-menu\">\n <ng-container *ngFor=\"let menuItem of menuEntities\">\n <ng-container *ngIf=\"menuItem.visibility && !menuItem?.isInputNumber\">\n <ng-template [ngTemplateOutlet]=\"defaultMenuTemplate\" [ngTemplateOutletContext]=\"{ $implicit: menuItem }\"></ng-template>\n </ng-container>\n <ng-container *ngIf=\"menuItem.visibility && menuItem?.isInputNumber\">\n <ng-template [ngTemplateOutlet]=\"inputNumberMenuTemplate\" [ngTemplateOutletContext]=\"{ $implicit: menuItem }\"></ng-template>\n </ng-container>\n <thy-dropdown-menu-divider *ngIf=\"menuItem.divider && menuItem.visibility\"></thy-dropdown-menu-divider>\n </ng-container>\n</div>\n\n<ng-template #defaultMenuTemplate let-item>\n <a\n href=\"javascript:;\"\n thyDropdownMenuItem\n (mousedown)=\"itemMousedown($event, item)\"\n (mouseenter)=\"itemMouseenter($event, item)\"\n (mouseleave)=\"itemMouseleave($event, item)\"\n >\n <span thyDropdownMenuItemIcon>\n <thy-icon\n *ngIf=\"item?.backgroundColor; else elseIcon\"\n [thyIconName]=\"item.icon\"\n thyIconType=\"twotone\"\n [thyTwotoneColor]=\"item.backgroundColor\"\n ></thy-icon>\n <ng-template #elseIcon>\n <thy-icon [thyIconName]=\"item.icon\"></thy-icon>\n </ng-template>\n </span>\n <span thyDropdownMenuItemName>{{ item.name }}</span>\n <span *ngIf=\"item.extendIcon\" thyDropdownMenuItemExtendIcon>\n <thy-icon thyIconName=\"{{ item.extendIcon }}\"></thy-icon>\n </span>\n </a>\n</ng-template>\n\n<ng-template #inputNumberMenuTemplate let-item>\n <a href=\"javascript:;\" class=\"the-input-number-menu\" thyDropdownMenuItem (click)=\"itemMousedown($event, item)\">\n <span thyDropdownMenuItemIcon>\n <thy-icon [thyIconName]=\"item.icon\"></thy-icon>\n </span>\n <span thyDropdownMenuItemName class=\"d-flex align-items-center\">\n {{ item.name }}\n <thy-input-number\n #inputNumber\n class=\"mx-2\"\n thySize=\"sm\"\n [(ngModel)]=\"item.count\"\n [thyStep]=\"1\"\n [thyMin]=\"1\"\n (click)=\"inputNumberFocus($event)\"\n (thyEnter)=\"itemMousedown($event, item)\"\n thyStopPropagation\n ></thy-input-number>\n {{ item.nameSuffix }}\n </span>\n </a>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4.ThyIconComponent, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { kind: "directive", type: i5$2.ThyEnterDirective, selector: "[thyEnter]", outputs: ["thyEnter"] }, { kind: "directive", type: i5$2.ThyStopPropagationDirective, selector: "[thyStopPropagation]", inputs: ["thyStopPropagation"] }, { kind: "component", type: i6.ThyDropdownMenuDividerComponent, selector: "thy-dropdown-menu-divider" }, { kind: "directive", type: i6.ThyDropdownMenuItemDirective, selector: "[thyDropdownMenuItem]", inputs: ["thyType", "thyDisabled"] }, { kind: "directive", type: i6.ThyDropdownMenuItemNameDirective, selector: "[thyDropdownMenuItemName]" }, { kind: "directive", type: i6.ThyDropdownMenuItemIconDirective, selector: "[thyDropdownMenuItemIcon]" }, { kind: "directive", type: i6.ThyDropdownMenuItemExtendIconDirective, selector: "[thyDropdownMenuItemExtendIcon]" }, { kind: "component", type: i7.ThyInputNumberComponent, selector: "thy-input-number", inputs: ["thyAutoFocus", "thyPlaceholder", "thyDisabled", "thyMax", "thyMin", "thyStep", "thySize", "thyPrecision", "thySuffix"], outputs: ["thyBlur", "thyFocus"] }] });
11181
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheContextMenuComponent, decorators: [{
11182
+ type: Component,
11183
+ args: [{ selector: 'the-contextmenu', template: "<div class=\"thy-dropdown-menu\">\n <ng-container *ngFor=\"let menuItem of menuEntities\">\n <ng-container *ngIf=\"menuItem.visibility && !menuItem?.isInputNumber\">\n <ng-template [ngTemplateOutlet]=\"defaultMenuTemplate\" [ngTemplateOutletContext]=\"{ $implicit: menuItem }\"></ng-template>\n </ng-container>\n <ng-container *ngIf=\"menuItem.visibility && menuItem?.isInputNumber\">\n <ng-template [ngTemplateOutlet]=\"inputNumberMenuTemplate\" [ngTemplateOutletContext]=\"{ $implicit: menuItem }\"></ng-template>\n </ng-container>\n <thy-dropdown-menu-divider *ngIf=\"menuItem.divider && menuItem.visibility\"></thy-dropdown-menu-divider>\n </ng-container>\n</div>\n\n<ng-template #defaultMenuTemplate let-item>\n <a\n href=\"javascript:;\"\n thyDropdownMenuItem\n (mousedown)=\"itemMousedown($event, item)\"\n (mouseenter)=\"itemMouseenter($event, item)\"\n (mouseleave)=\"itemMouseleave($event, item)\"\n >\n <span thyDropdownMenuItemIcon>\n <thy-icon\n *ngIf=\"item?.backgroundColor; else elseIcon\"\n [thyIconName]=\"item.icon\"\n thyIconType=\"twotone\"\n [thyTwotoneColor]=\"item.backgroundColor\"\n ></thy-icon>\n <ng-template #elseIcon>\n <thy-icon [thyIconName]=\"item.icon\"></thy-icon>\n </ng-template>\n </span>\n <span thyDropdownMenuItemName>{{ item.name }}</span>\n <span *ngIf=\"item.extendIcon\" thyDropdownMenuItemExtendIcon>\n <thy-icon thyIconName=\"{{ item.extendIcon }}\"></thy-icon>\n </span>\n </a>\n</ng-template>\n\n<ng-template #inputNumberMenuTemplate let-item>\n <a href=\"javascript:;\" class=\"the-input-number-menu\" thyDropdownMenuItem (click)=\"itemMousedown($event, item)\">\n <span thyDropdownMenuItemIcon>\n <thy-icon [thyIconName]=\"item.icon\"></thy-icon>\n </span>\n <span thyDropdownMenuItemName class=\"d-flex align-items-center\">\n {{ item.name }}\n <thy-input-number\n #inputNumber\n class=\"mx-2\"\n thySize=\"sm\"\n [(ngModel)]=\"item.count\"\n [thyStep]=\"1\"\n [thyMin]=\"1\"\n (click)=\"inputNumberFocus($event)\"\n (thyEnter)=\"itemMousedown($event, item)\"\n thyStopPropagation\n ></thy-input-number>\n {{ item.nameSuffix }}\n </span>\n </a>\n</ng-template>\n" }]
11184
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1$1.ThyPopoverRef }]; }, propDecorators: { menuEntities: [{
11185
+ type: Input
11186
+ }], actionHandle: [{
11187
+ type: Input
11188
+ }], activeHandle: [{
11189
+ type: Input
11190
+ }], deactivateHandle: [{
11191
+ type: Input
11192
+ }], wrap: [{
11193
+ type: HostBinding,
11194
+ args: ['class.the-overlay-menu-wrap']
11195
+ }], handleDocumentMouseDown: [{
11196
+ type: HostListener,
11197
+ args: ['document: mousedown', ['$event']]
11198
+ }], handleMouseDown: [{
11199
+ type: HostListener,
11200
+ args: ['mousedown', ['$event']]
11201
+ }] } });
11202
+
11203
+ class TableStore {
11204
+ constructor() {
11205
+ this.selectedCells$ = new BehaviorSubject([]);
11206
+ this.dangerousCells$ = new BehaviorSubject([]);
11207
+ this.cellsChangeObject$ = new Subject();
11208
+ this.tableChange$ = new Subject();
10851
11209
  this.selectedColumnsIndex = [];
10852
11210
  this.selectedRowsIndex = [];
10853
11211
  this.dangerousColumnsIndex = [];
@@ -10907,6 +11265,21 @@ class TableStore {
10907
11265
  initEditor(editor) {
10908
11266
  this.editor = editor;
10909
11267
  }
11268
+ /**
11269
+ * 多选模式下需要合并数据
11270
+ * @param cells SelectedCell[]
11271
+ * @returns
11272
+ */
11273
+ buildModCells(cells) {
11274
+ let result = [];
11275
+ if (this.isModSelecting) {
11276
+ const modCells = new Set();
11277
+ cells.concat(this.selectedCells).forEach(cell => modCells.add(JSON.stringify(cell)));
11278
+ modCells.forEach((cell) => result.push(JSON.parse(cell)));
11279
+ return result.sort((a, b) => a.row - b.row);
11280
+ }
11281
+ return cells;
11282
+ }
10910
11283
  selectRow(editor, index) {
10911
11284
  this.selectedRowsIndex = [index];
10912
11285
  this.selectedColumnsIndex = [];
@@ -10921,7 +11294,7 @@ class TableStore {
10921
11294
  col: i
10922
11295
  });
10923
11296
  }
10924
- this.setSelectedCells(result, pos);
11297
+ this.setSelectedCells(this.buildModCells(result), pos);
10925
11298
  this.focusCell(editor, pos.tableEntry[1].concat([index, 0]));
10926
11299
  }
10927
11300
  selectColumn(editor, index) {
@@ -10938,7 +11311,7 @@ class TableStore {
10938
11311
  col: index
10939
11312
  });
10940
11313
  }
10941
- this.setSelectedCells(result, pos);
11314
+ this.setSelectedCells(this.buildModCells(result), pos);
10942
11315
  this.focusCell(editor, pos.tableEntry[1].concat([0, index]));
10943
11316
  }
10944
11317
  selectTable(editor) {
@@ -10960,6 +11333,7 @@ class TableStore {
10960
11333
  }
10961
11334
  return { cells: result, pos };
10962
11335
  }
11336
+ // 拖选
10963
11337
  selectCells(editor) {
10964
11338
  const opts = new TableOptions();
10965
11339
  const { anchor, focus } = editor.selection;
@@ -10986,7 +11360,7 @@ class TableStore {
10986
11360
  });
10987
11361
  }
10988
11362
  }
10989
- this.setSelectedCells(result, pos);
11363
+ this.setSelectedCells(this.buildModCells(result), pos);
10990
11364
  }
10991
11365
  getMinAndMaxCellIndex(maxRow, maxCol, minRow, minCol, table) {
10992
11366
  const beforeCols = [];
@@ -11049,9 +11423,12 @@ class TableStore {
11049
11423
  }
11050
11424
  // 选择单元格
11051
11425
  selectCell(cell, editor) {
11426
+ // todo:处理表格失焦时不选中
11052
11427
  if (!editor.selection) {
11053
11428
  return;
11054
11429
  }
11430
+ // 已聚焦的单元格在多选模式下选中(暂存上次聚焦的单元格)
11431
+ const focusCell = this.lastFocusCellPath.slice(-2);
11055
11432
  const node = AngularEditor.toSlateNode(editor, cell);
11056
11433
  const path = AngularEditor.findPath(editor, node);
11057
11434
  this.anchorCellPath = path;
@@ -11061,19 +11438,14 @@ class TableStore {
11061
11438
  const opts = new TableOptions();
11062
11439
  const { anchor } = editor.selection;
11063
11440
  const pos = TablePosition.create(opts, editor, anchor.path);
11441
+ let result = [];
11064
11442
  if (this.isModSelecting) {
11065
- let newCells = [];
11066
- if (this.selectedCells.find(cell => cell.col === col && cell.row === row)) {
11067
- newCells = this.selectedCells.filter(cell => cell.col !== col || cell.row !== row);
11068
- }
11069
- else {
11070
- newCells = [...this.selectedCells, { row, col }];
11071
- }
11072
- this.selectedCells$.next(newCells);
11443
+ result = [...this.selectedCells, { row: focusCell[0], col: focusCell[1] }, { row, col }];
11073
11444
  }
11074
11445
  else {
11075
- this.setSelectedCells([{ row, col }], pos);
11446
+ result = [{ row, col }];
11076
11447
  }
11448
+ this.setSelectedCells(this.buildModCells(result), pos);
11077
11449
  }
11078
11450
  selectedCellsChange() {
11079
11451
  return this.selectedCells$.asObservable().pipe(skip(1));
@@ -11104,7 +11476,7 @@ class TableStore {
11104
11476
  const node = AngularEditor.toSlateNode(editor, cell);
11105
11477
  const path = AngularEditor.findPath(editor, node);
11106
11478
  this.anchorCellPath = path;
11107
- this.focusCellPath = null;
11479
+ this.lastFocusCellPath = path;
11108
11480
  if (!this.preFocusCellPath) {
11109
11481
  this.preFocusCellPath = this.anchorCellPath;
11110
11482
  }
@@ -11298,7 +11670,6 @@ class TableStore {
11298
11670
  removeColumnOrRows() {
11299
11671
  var _a;
11300
11672
  const { selectedRowsIndex, selectedColumnsIndex, isSelectedTable } = this;
11301
- const tablePluginOptions = getPluginOptions(this.editor, PluginKeys.table);
11302
11673
  const pos = this.createTablePosition();
11303
11674
  if (isSelectedTable) {
11304
11675
  TableEditor.removeTable(this.editor);
@@ -11309,6 +11680,9 @@ class TableStore {
11309
11680
  .sort((a, b) => b - a)
11310
11681
  .forEach(index => {
11311
11682
  TableEditor.removeRow(this.editor, index);
11683
+ if (index === 0) {
11684
+ // 删除行时取消标题行
11685
+ }
11312
11686
  });
11313
11687
  this.changeCells();
11314
11688
  }
@@ -11325,384 +11699,109 @@ class TableStore {
11325
11699
  }
11326
11700
  }
11327
11701
  }
11328
- TableStore.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TableStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
11329
- TableStore.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TableStore });
11330
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TableStore, decorators: [{
11702
+ TableStore.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TableStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
11703
+ TableStore.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TableStore });
11704
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TableStore, decorators: [{
11331
11705
  type: Injectable
11332
11706
  }], ctorParameters: function () { return []; } });
11333
11707
 
11334
- function splitCell(editor) {
11335
- const opts = new TableOptions();
11336
- const { anchor } = editor.selection;
11337
- const tablePosition = TablePosition.create(opts, editor, anchor.path);
11338
- const { cell, table, cellEntry } = tablePosition;
11339
- if ((!cell.rowspan && !cell.colspan) || (cell.rowspan === 1 && cell.colspan === 1))
11340
- return editor;
11341
- const cellRow = tablePosition.getRowIndex();
11342
- const cellCol = tablePosition.getColumnIndex();
11343
- resetTableCell(editor, table, cell, cellRow, cellCol);
11344
- Transforms.select(editor, cellEntry[1]);
11345
- Transforms.collapse(editor, { edge: 'end' });
11346
- }
11347
- function resetTableCell(editor, table, cell, cellRow, cellCol) {
11348
- const rowSpanIndex = cellRow + (cell.rowspan || 1) - 1;
11349
- const colSpanIndex = cellCol + (cell.colspan || 1) - 1;
11350
- Editor.withoutNormalizing(editor, () => {
11351
- table.children.map((row, rowIndex) => {
11352
- row.children.map((col, colIndex) => {
11353
- if (rowIndex >= cellRow && rowIndex <= rowSpanIndex && colIndex >= cellCol && colIndex <= colSpanIndex) {
11354
- const path = findPath(editor, col);
11355
- Transforms.setNodes(editor, { colspan: null, rowspan: null, hidden: null }, { at: path });
11708
+ class TheTableContextMenuService {
11709
+ constructor(colorSelectService, tableStore, thyPopover, ngZone, theContextService) {
11710
+ this.colorSelectService = colorSelectService;
11711
+ this.tableStore = tableStore;
11712
+ this.thyPopover = thyPopover;
11713
+ this.ngZone = ngZone;
11714
+ this.theContextService = theContextService;
11715
+ this.menuEntities = [
11716
+ {
11717
+ key: 'background-color',
11718
+ icon: 'background-tt',
11719
+ divider: true,
11720
+ name: '单元格背景',
11721
+ extendIcon: 'angle-right',
11722
+ visibility: true,
11723
+ actionHandle: () => { },
11724
+ activeHandle: (event) => {
11725
+ if (this.colorSelectService.isOpenColorSelect) {
11726
+ return;
11727
+ }
11728
+ const isHeader = TableEditor.isActiveHeader(this.editor);
11729
+ this.colorSelectService.toggleColorSelect(event.target, this.backgroundColor, BackgroundColors, {
11730
+ perRowColorNumbers: 7,
11731
+ rowOptions: { 1: '#bbb', 2: '#bbb' },
11732
+ specialColor: isHeader ? TableHeaderBackgroundColor : SpecialBackgroundColor
11733
+ }, (newColor) => {
11734
+ if ((newColor === TableHeaderBackgroundColor && isHeader) || (newColor === SpecialBackgroundColor && !isHeader)) {
11735
+ this.tableStore.setSelectedCellsBackgroundColor(null);
11736
+ }
11737
+ else {
11738
+ this.tableStore.setSelectedCellsBackgroundColor(newColor);
11739
+ }
11740
+ this.tableStore.selectFirstCell();
11741
+ }, 'rightTop', 0);
11742
+ },
11743
+ deactivateHandle: (event) => {
11744
+ if (event.relatedTarget instanceof HTMLElement) {
11745
+ if (event.relatedTarget.classList.contains('color-select-container')) {
11746
+ return;
11747
+ }
11748
+ }
11749
+ if (this.colorSelectService.isOpenColorSelect) {
11750
+ this.colorSelectService.closeColorSelect();
11751
+ }
11356
11752
  }
11357
- });
11358
- });
11359
- });
11360
- }
11361
-
11362
- function setCellMenuVisibility(editor, menuList, selectedCells, isFromControls) {
11363
- const isCellMerged = isSelectedCellMerged(editor);
11364
- const selectCellNodes = getSelectCellNode(editor, selectedCells).filter(item => !item.node.hidden);
11365
- menuList.forEach(item => {
11366
- if (item.key === 'merge-cells') {
11367
- item.visibility = selectCellNodes && selectCellNodes.length > 1 && !isFromControls;
11368
- }
11369
- if (item.key === 'split-cells') {
11370
- item.visibility = selectCellNodes && selectCellNodes.length === 1 && isCellMerged && !isFromControls;
11371
- }
11372
- });
11373
- }
11374
-
11375
- class TheTableOptionsComponent {
11376
- constructor(popoverRef) {
11377
- this.popoverRef = popoverRef;
11378
- this.tableDropdownList = [
11379
- // {
11380
- // name: '表头行',
11381
- // key: 'headerRow'
11382
- // },
11753
+ },
11383
11754
  {
11384
- name: '表头列',
11385
- key: 'headerColumn'
11755
+ key: TableInsertType.insertRowsUp,
11756
+ icon: 'table-insert-rows-top',
11757
+ name: '向上插入行',
11758
+ visibility: true,
11759
+ isInputNumber: true,
11760
+ nameSuffix: '行',
11761
+ actionHandle: (item) => {
11762
+ const { targetRowIndex } = this.getTargetRowOrColIndex();
11763
+ TableEditor.insertRow(this.editor, item.count, targetRowIndex);
11764
+ this.tableStore.changeCells();
11765
+ }
11386
11766
  },
11387
11767
  {
11388
- name: '序号列',
11389
- key: 'numberedColumn'
11390
- }
11391
- ];
11392
- }
11393
- get table() {
11394
- return this.tableStore && this.tableStore.getTableEntry(this.editor)[0];
11395
- }
11396
- ngOnInit() {
11397
- this.setColumnOptions();
11398
- }
11399
- setColumnOptions() {
11400
- this.tableDropdownList.forEach(item => {
11401
- item.isActive = (this.table.options && this.table.options[item.key]) || false;
11402
- });
11403
- }
11404
- setTableOptions(event, option) {
11405
- event.preventDefault();
11406
- event.stopPropagation();
11407
- const currentOption = this.tableDropdownList.find(item => item.key === option.key);
11408
- currentOption.isActive = !option.isActive;
11409
- const tableOption = {};
11410
- tableOption[option.key] = currentOption.isActive || null;
11411
- this.tableStore.setTableOptions(this.editor, Object.assign(Object.assign({}, this.table.options), tableOption));
11412
- }
11413
- }
11414
- TheTableOptionsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheTableOptionsComponent, deps: [{ token: i1$1.ThyPopoverRef }], target: i0.ɵɵFactoryTarget.Component });
11415
- TheTableOptionsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: TheTableOptionsComponent, selector: "the-table-options", inputs: { tableStore: "tableStore", editor: "editor" }, ngImport: i0, template: `
11416
- <div class="thy-dropdown-menu table-drop-menu">
11417
- <ng-container *ngFor="let option of tableDropdownList">
11418
- <a thyDropdownMenuItem href="javascript:;" (mousedown)="setTableOptions($event, option)">
11419
- <span thyDropdownMenuItemName>{{ option.name }}</span>
11420
- <span *ngIf="option.isActive" thyDropdownMenuItemIcon class="text-primary">
11421
- <thy-icon thyIconName="check"></thy-icon>
11422
- </span>
11423
- </a>
11424
- </ng-container>
11425
- </div>
11426
- `, isInline: true, dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.ThyIconComponent, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { kind: "directive", type: i6.ThyDropdownMenuItemDirective, selector: "[thyDropdownMenuItem]", inputs: ["thyType", "thyDisabled"] }, { kind: "directive", type: i6.ThyDropdownMenuItemNameDirective, selector: "[thyDropdownMenuItemName]" }, { kind: "directive", type: i6.ThyDropdownMenuItemIconDirective, selector: "[thyDropdownMenuItemIcon]" }] });
11427
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheTableOptionsComponent, decorators: [{
11428
- type: Component,
11429
- args: [{
11430
- selector: 'the-table-options',
11431
- template: `
11432
- <div class="thy-dropdown-menu table-drop-menu">
11433
- <ng-container *ngFor="let option of tableDropdownList">
11434
- <a thyDropdownMenuItem href="javascript:;" (mousedown)="setTableOptions($event, option)">
11435
- <span thyDropdownMenuItemName>{{ option.name }}</span>
11436
- <span *ngIf="option.isActive" thyDropdownMenuItemIcon class="text-primary">
11437
- <thy-icon thyIconName="check"></thy-icon>
11438
- </span>
11439
- </a>
11440
- </ng-container>
11441
- </div>
11442
- `
11443
- }]
11444
- }], ctorParameters: function () { return [{ type: i1$1.ThyPopoverRef }]; }, propDecorators: { tableStore: [{
11445
- type: Input
11446
- }], editor: [{
11447
- type: Input
11448
- }] } });
11449
-
11450
- class TheTableToolbarComponent {
11451
- constructor(ngZone, colorSelectService, thyPopover, popoverRef) {
11452
- this.ngZone = ngZone;
11453
- this.colorSelectService = colorSelectService;
11454
- this.thyPopover = thyPopover;
11455
- this.popoverRef = popoverRef;
11456
- this.cellMenuList = [
11768
+ key: TableInsertType.insertRowsDown,
11769
+ icon: 'table-insert-rows-down',
11770
+ name: '向下插入行',
11771
+ visibility: true,
11772
+ isInputNumber: true,
11773
+ nameSuffix: '行',
11774
+ actionHandle: (item) => {
11775
+ const { targetRowIndex } = this.getTargetRowOrColIndex(false);
11776
+ TableEditor.insertRow(this.editor, item.count, targetRowIndex);
11777
+ this.tableStore.changeCells();
11778
+ }
11779
+ },
11457
11780
  {
11458
- key: 'merge-cells',
11459
- name: '合并单元格',
11460
- visibility: false,
11461
- icon: 'table-merge-cells',
11462
- actionHandle: () => {
11463
- event.preventDefault();
11464
- event.stopPropagation();
11465
- this.tableStore.mergeCell(this.editor);
11466
- this.popoverRef.close();
11467
- this.tableStore.clearSelectedCells();
11781
+ key: TableInsertType.insertColumnsLeft,
11782
+ icon: 'table-insert-columns-left',
11783
+ name: '向左插入列',
11784
+ visibility: true,
11785
+ isInputNumber: true,
11786
+ nameSuffix: '列',
11787
+ actionHandle: (item) => {
11788
+ const { targetColIndex } = this.getTargetRowOrColIndex();
11789
+ TableEditor.insertColumn(this.editor, item.count, targetColIndex);
11790
+ this.tableStore.changeCells();
11468
11791
  }
11469
11792
  },
11470
11793
  {
11471
- key: 'split-cells',
11472
- name: '拆分单元格',
11473
- visibility: false,
11474
- icon: 'table-unmerge-cells',
11475
- actionHandle: () => {
11476
- event.preventDefault();
11477
- event.stopPropagation();
11478
- splitCell(this.editor);
11479
- this.popoverRef.close();
11480
- this.tableStore.clearSelectedCells();
11481
- }
11482
- }
11483
- ];
11484
- }
11485
- get editor() {
11486
- return this.tableStore && this.tableStore.editor;
11487
- }
11488
- get hasDivider() {
11489
- return this.cellMenuList.filter(item => item.visibility).length > 1;
11490
- }
11491
- get tableOptions() {
11492
- return getPluginOptions(this.editor, PluginKeys.table);
11493
- }
11494
- ngOnInit() {
11495
- this.deleteIcon = DeleteIcon[this.getDeleteIcon()];
11496
- this.getIconName(this.deleteIcon);
11497
- setCellMenuVisibility(this.editor, this.cellMenuList, this.tableStore.selectedCells, this.isFromControls);
11498
- this.selectedColor = this.tableStore.getSelectedCellBackgroundColor();
11499
- }
11500
- ngOnDestroy() {
11501
- this.colorSelectService.closeColorSelect();
11502
- }
11503
- getIconName(key) {
11504
- switch (key) {
11505
- case 'trash':
11506
- this.iconName = '删除表格';
11507
- break;
11508
- case 'table-delete-columns':
11509
- this.iconName = '删除整列';
11510
- break;
11511
- case 'table-delete-rows':
11512
- this.iconName = '删除整行';
11513
- break;
11514
- }
11515
- }
11516
- getDeleteIcon() {
11517
- if (this.tableStore.isSelectedTable) {
11518
- return DeleteIcon.trash;
11519
- }
11520
- if (this.tableStore.selectedRowsIndex.length > 0) {
11521
- return DeleteIcon['table-delete-rows'];
11522
- }
11523
- if (this.tableStore.selectedColumnsIndex.length > 0) {
11524
- return DeleteIcon['table-delete-columns'];
11525
- }
11526
- return null;
11527
- }
11528
- onDelete(event) {
11529
- event.preventDefault();
11530
- this.tableStore.removeColumnOrRows();
11531
- this.tableStore.clearDangerousCells();
11532
- this.tableStore.clearSelectedCells();
11533
- this.popoverRef.close();
11534
- }
11535
- onEnterDelete(event) {
11536
- this.tableStore.setDangerousCells();
11537
- }
11538
- onLeaveDelete(event) {
11539
- this.tableStore.clearDangerousCells();
11540
- }
11541
- openSelectColor(event) {
11542
- event.preventDefault();
11543
- event.stopPropagation();
11544
- const element = event.target.closest('.thy-action');
11545
- const isHeader = TableEditor.isActiveHeader(this.editor);
11546
- this.ngZone.run(() => {
11547
- this.colorSelectService.toggleColorSelect(element, this.selectedColor, BackgroundColors, {
11548
- perRowColorNumbers: 7,
11549
- rowOptions: { 1: '#bbb', 2: '#bbb' },
11550
- specialColor: isHeader ? TableHeaderBackgroundColor : SpecialBackgroundColor
11551
- }, (newColor) => {
11552
- if ((newColor === TableHeaderBackgroundColor && isHeader) || (newColor === SpecialBackgroundColor && !isHeader)) {
11553
- this.tableStore.setSelectedCellsBackgroundColor(null);
11554
- }
11555
- else {
11556
- this.tableStore.setSelectedCellsBackgroundColor(newColor);
11557
- }
11558
- this.selectedColor = newColor;
11559
- }, 'bottomLeft', 4);
11560
- });
11561
- }
11562
- setFullscreen(event) {
11563
- this.tableOptions.setFullscreen(this.editor, event, this.tableElement);
11564
- }
11565
- mousedown(event) {
11566
- event.preventDefault();
11567
- event.stopPropagation();
11568
- }
11569
- openTableOptionMenu(event) {
11570
- event.preventDefault();
11571
- event.stopPropagation();
11572
- this.thyPopover.open(TheTableOptionsComponent, {
11573
- origin: event.currentTarget,
11574
- initialState: {
11575
- tableStore: this.tableStore,
11576
- editor: this.editor
11577
- },
11578
- minWidth: 0,
11579
- insideClosable: true,
11580
- outsideClosable: true,
11581
- hasBackdrop: false,
11582
- placement: 'bottomLeft',
11583
- originActiveClass: 'active',
11584
- panelClass: 'table-options-pannel'
11585
- });
11586
- }
11587
- }
11588
- TheTableToolbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheTableToolbarComponent, deps: [{ token: i0.NgZone }, { token: TheColorSelectService }, { token: i1$1.ThyPopover }, { token: i1$1.ThyPopoverRef }], target: i0.ɵɵFactoryTarget.Component });
11589
- TheTableToolbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: TheTableToolbarComponent, selector: "the-table-toolbar", inputs: { tableStore: "tableStore", isFromControls: "isFromControls", tableElement: "tableElement" }, ngImport: i0, template: "<thy-actions thySize=\"xxs\">\n <ng-container *ngFor=\"let item of cellMenuList\">\n <a\n *ngIf=\"item.visibility\"\n href=\"javascript:;\"\n thyAction\n [thyActionIcon]=\"item.icon\"\n [thyTooltip]=\"item.name\"\n (mousedown)=\"item.actionHandle()\"\n ></a>\n </ng-container>\n <thy-divider *ngIf=\"hasDivider\" class=\"mr-2 ml-1 align-self-center\" [thyVertical]=\"true\"> </thy-divider>\n <a href=\"javascript:;\" thyAction thyTooltip=\"\u5355\u5143\u683C\u80CC\u666F\" (mousedown)=\"openSelectColor($event)\">\n <thy-icon thyIconName=\"background-tt\" thyIconType=\"twotone\" [thyTwotoneColor]=\"selectedColor\"></thy-icon>\n </a>\n <a\n href=\"javascript:;\"\n *ngIf=\"tableStore.isSelectedTable && tableOptions?.showFullscreen\"\n thyAction\n thyTooltip=\"\u5168\u5C4F\"\n (mousedown)=\"setFullscreen($event)\"\n >\n <thy-icon thyIconName=\"arrows-alt\"></thy-icon>\n </a>\n\n <ng-container *ngIf=\"tableStore.isSelectedTable\">\n <thy-divider class=\"mr-2 ml-1 align-self-center\" [thyVertical]=\"true\"></thy-divider>\n <a href=\"javascript:;\" class=\"link-with-down\" thyAction (mousedown)=\"mousedown($event)\" (click)=\"openTableOptionMenu($event)\">\n <span>\u8868\u683C\u9009\u9879</span>\n <thy-icon class=\"font-size-sm text-desc ml-1\" thyIconName=\"caret-down\"></thy-icon>\n </a>\n </ng-container>\n\n <ng-container *ngIf=\"tableStore?.isFullscreen ? deleteIcon && !tableStore.isSelectedTable : deleteIcon\">\n <thy-divider class=\"mr-2 ml-1 align-self-center\" [thyVertical]=\"true\"></thy-divider>\n <a\n href=\"javascript:;\"\n thyAction\n thyType=\"danger\"\n [thyActionIcon]=\"deleteIcon\"\n [thyTooltip]=\"iconName\"\n (mousedown)=\"onDelete($event)\"\n (mouseenter)=\"onEnterDelete($event)\"\n (mouseleave)=\"onLeaveDelete($event)\"\n ></a>\n </ng-container>\n</thy-actions>\n", dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.ThyIconComponent, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { kind: "directive", type: i8.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { kind: "component", type: i5.ThyActionComponent, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }, { kind: "component", type: i5.ThyActionsComponent, selector: "thy-actions", inputs: ["thySize"] }, { kind: "component", type: i12.ThyDividerComponent, selector: "thy-divider", inputs: ["thyVertical", "thyStyle", "thyColor", "thyText", "thyTextDirection", "thyDeeper"] }] });
11590
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheTableToolbarComponent, decorators: [{
11591
- type: Component,
11592
- args: [{ selector: 'the-table-toolbar', template: "<thy-actions thySize=\"xxs\">\n <ng-container *ngFor=\"let item of cellMenuList\">\n <a\n *ngIf=\"item.visibility\"\n href=\"javascript:;\"\n thyAction\n [thyActionIcon]=\"item.icon\"\n [thyTooltip]=\"item.name\"\n (mousedown)=\"item.actionHandle()\"\n ></a>\n </ng-container>\n <thy-divider *ngIf=\"hasDivider\" class=\"mr-2 ml-1 align-self-center\" [thyVertical]=\"true\"> </thy-divider>\n <a href=\"javascript:;\" thyAction thyTooltip=\"\u5355\u5143\u683C\u80CC\u666F\" (mousedown)=\"openSelectColor($event)\">\n <thy-icon thyIconName=\"background-tt\" thyIconType=\"twotone\" [thyTwotoneColor]=\"selectedColor\"></thy-icon>\n </a>\n <a\n href=\"javascript:;\"\n *ngIf=\"tableStore.isSelectedTable && tableOptions?.showFullscreen\"\n thyAction\n thyTooltip=\"\u5168\u5C4F\"\n (mousedown)=\"setFullscreen($event)\"\n >\n <thy-icon thyIconName=\"arrows-alt\"></thy-icon>\n </a>\n\n <ng-container *ngIf=\"tableStore.isSelectedTable\">\n <thy-divider class=\"mr-2 ml-1 align-self-center\" [thyVertical]=\"true\"></thy-divider>\n <a href=\"javascript:;\" class=\"link-with-down\" thyAction (mousedown)=\"mousedown($event)\" (click)=\"openTableOptionMenu($event)\">\n <span>\u8868\u683C\u9009\u9879</span>\n <thy-icon class=\"font-size-sm text-desc ml-1\" thyIconName=\"caret-down\"></thy-icon>\n </a>\n </ng-container>\n\n <ng-container *ngIf=\"tableStore?.isFullscreen ? deleteIcon && !tableStore.isSelectedTable : deleteIcon\">\n <thy-divider class=\"mr-2 ml-1 align-self-center\" [thyVertical]=\"true\"></thy-divider>\n <a\n href=\"javascript:;\"\n thyAction\n thyType=\"danger\"\n [thyActionIcon]=\"deleteIcon\"\n [thyTooltip]=\"iconName\"\n (mousedown)=\"onDelete($event)\"\n (mouseenter)=\"onEnterDelete($event)\"\n (mouseleave)=\"onLeaveDelete($event)\"\n ></a>\n </ng-container>\n</thy-actions>\n" }]
11593
- }], ctorParameters: function () { return [{ type: i0.NgZone }, { type: TheColorSelectService }, { type: i1$1.ThyPopover }, { type: i1$1.ThyPopoverRef }]; }, propDecorators: { tableStore: [{
11594
- type: Input
11595
- }], isFromControls: [{
11596
- type: Input
11597
- }], tableElement: [{
11598
- type: Input
11599
- }] } });
11600
- var DeleteIcon;
11601
- (function (DeleteIcon) {
11602
- DeleteIcon[DeleteIcon["table-delete-rows"] = 0] = "table-delete-rows";
11603
- DeleteIcon[DeleteIcon["table-delete-columns"] = 1] = "table-delete-columns";
11604
- DeleteIcon[DeleteIcon["trash"] = 2] = "trash";
11605
- })(DeleteIcon || (DeleteIcon = {}));
11606
-
11607
- class TheContextMenuComponent {
11608
- constructor(elementRef, thyPopoverRef) {
11609
- this.elementRef = elementRef;
11610
- this.thyPopoverRef = thyPopoverRef;
11611
- this.menuEntities = [];
11612
- this.wrap = true;
11613
- }
11614
- handleDocumentMouseDown(event) {
11615
- if (!this.elementRef.nativeElement.contains(event.target) && event.button !== 2) {
11616
- this.thyPopoverRef.close();
11617
- }
11618
- }
11619
- handleMouseDown(event) {
11620
- event.preventDefault();
11621
- event.stopPropagation();
11622
- }
11623
- itemMousedown(event, entity) {
11624
- event.preventDefault();
11625
- this.actionHandle(entity);
11626
- this.thyPopoverRef.close();
11627
- }
11628
- itemMouseleave(event, entity) {
11629
- event.preventDefault();
11630
- this.deactiveHandle(event, entity);
11631
- }
11632
- itemMouseenter(event, entity) {
11633
- event.preventDefault();
11634
- this.activeHandle(event, entity);
11635
- }
11636
- ngOnInit() { }
11637
- }
11638
- TheContextMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheContextMenuComponent, deps: [{ token: i0.ElementRef }, { token: i1$1.ThyPopoverRef }], target: i0.ɵɵFactoryTarget.Component });
11639
- TheContextMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: TheContextMenuComponent, selector: "the-contextmenu", inputs: { menuEntities: "menuEntities", actionHandle: "actionHandle", activeHandle: "activeHandle", deactiveHandle: "deactiveHandle" }, host: { listeners: { "document: mousedown": "handleDocumentMouseDown($event)", "mousedown": "handleMouseDown($event)" }, properties: { "class.the-overlay-menu-wrap": "this.wrap" } }, ngImport: i0, template: "<div class=\"thy-dropdown-menu\">\n <ng-container *ngFor=\"let menuItem of menuEntities\">\n <a\n *ngIf=\"menuItem.visibility\"\n href=\"javascript:;\"\n thyDropdownMenuItem\n (mousedown)=\"itemMousedown($event, menuItem)\"\n (mouseenter)=\"itemMouseenter($event, menuItem)\"\n (mouseleave)=\"itemMouseleave($event, menuItem)\"\n >\n <span thyDropdownMenuItemIcon>\n <thy-icon\n *ngIf=\"menuItem.backgroundColor; else elseIcon\"\n [thyIconName]=\"menuItem.icon\"\n thyIconType=\"twotone\"\n [thyTwotoneColor]=\"menuItem.backgroundColor\"\n ></thy-icon>\n <ng-template #elseIcon>\n <thy-icon [thyIconName]=\"menuItem.icon\"></thy-icon>\n </ng-template>\n </span>\n <span thyDropdownMenuItemName>{{ menuItem.name }}</span>\n <span *ngIf=\"menuItem.extendIcon\" thyDropdownMenuItemExtendIcon>\n <thy-icon thyIconName=\"{{ menuItem.extendIcon }}\"></thy-icon>\n </span>\n </a>\n <thy-dropdown-menu-divider *ngIf=\"menuItem.divider\"></thy-dropdown-menu-divider>\n </ng-container>\n</div>\n", dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.ThyIconComponent, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { kind: "component", type: i6.ThyDropdownMenuDividerComponent, selector: "thy-dropdown-menu-divider" }, { kind: "directive", type: i6.ThyDropdownMenuItemDirective, selector: "[thyDropdownMenuItem]", inputs: ["thyType", "thyDisabled"] }, { kind: "directive", type: i6.ThyDropdownMenuItemNameDirective, selector: "[thyDropdownMenuItemName]" }, { kind: "directive", type: i6.ThyDropdownMenuItemIconDirective, selector: "[thyDropdownMenuItemIcon]" }, { kind: "directive", type: i6.ThyDropdownMenuItemExtendIconDirective, selector: "[thyDropdownMenuItemExtendIcon]" }] });
11640
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheContextMenuComponent, decorators: [{
11641
- type: Component,
11642
- args: [{ selector: 'the-contextmenu', template: "<div class=\"thy-dropdown-menu\">\n <ng-container *ngFor=\"let menuItem of menuEntities\">\n <a\n *ngIf=\"menuItem.visibility\"\n href=\"javascript:;\"\n thyDropdownMenuItem\n (mousedown)=\"itemMousedown($event, menuItem)\"\n (mouseenter)=\"itemMouseenter($event, menuItem)\"\n (mouseleave)=\"itemMouseleave($event, menuItem)\"\n >\n <span thyDropdownMenuItemIcon>\n <thy-icon\n *ngIf=\"menuItem.backgroundColor; else elseIcon\"\n [thyIconName]=\"menuItem.icon\"\n thyIconType=\"twotone\"\n [thyTwotoneColor]=\"menuItem.backgroundColor\"\n ></thy-icon>\n <ng-template #elseIcon>\n <thy-icon [thyIconName]=\"menuItem.icon\"></thy-icon>\n </ng-template>\n </span>\n <span thyDropdownMenuItemName>{{ menuItem.name }}</span>\n <span *ngIf=\"menuItem.extendIcon\" thyDropdownMenuItemExtendIcon>\n <thy-icon thyIconName=\"{{ menuItem.extendIcon }}\"></thy-icon>\n </span>\n </a>\n <thy-dropdown-menu-divider *ngIf=\"menuItem.divider\"></thy-dropdown-menu-divider>\n </ng-container>\n</div>\n" }]
11643
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1$1.ThyPopoverRef }]; }, propDecorators: { menuEntities: [{
11644
- type: Input
11645
- }], actionHandle: [{
11646
- type: Input
11647
- }], activeHandle: [{
11648
- type: Input
11649
- }], deactiveHandle: [{
11650
- type: Input
11651
- }], wrap: [{
11652
- type: HostBinding,
11653
- args: ['class.the-overlay-menu-wrap']
11654
- }], handleDocumentMouseDown: [{
11655
- type: HostListener,
11656
- args: ['document: mousedown', ['$event']]
11657
- }], handleMouseDown: [{
11658
- type: HostListener,
11659
- args: ['mousedown', ['$event']]
11660
- }] } });
11661
-
11662
- class TheTableContextMenuService {
11663
- constructor(colorSelectService, tableStore, thyPopover, ngZone, theContextService) {
11664
- this.colorSelectService = colorSelectService;
11665
- this.tableStore = tableStore;
11666
- this.thyPopover = thyPopover;
11667
- this.ngZone = ngZone;
11668
- this.theContextService = theContextService;
11669
- this.menuEntities = [
11670
- {
11671
- key: 'background-color',
11672
- icon: 'background-tt',
11794
+ key: TableInsertType.insertColumnsRight,
11795
+ icon: 'table-insert-columns-right',
11673
11796
  divider: true,
11674
- name: '单元格背景',
11675
- extendIcon: 'angle-right',
11797
+ name: '向右插入列',
11676
11798
  visibility: true,
11677
- actionHandle: () => { },
11678
- activeHandle: (event) => {
11679
- if (this.colorSelectService.isOpenColorSelect) {
11680
- return;
11681
- }
11682
- const isHeader = TableEditor.isActiveHeader(this.editor);
11683
- this.colorSelectService.toggleColorSelect(event.target, this.backgroundColor, BackgroundColors, {
11684
- perRowColorNumbers: 7,
11685
- rowOptions: { 1: '#bbb', 2: '#bbb' },
11686
- specialColor: isHeader ? TableHeaderBackgroundColor : SpecialBackgroundColor
11687
- }, (newColor) => {
11688
- if ((newColor === TableHeaderBackgroundColor && isHeader) || (newColor === SpecialBackgroundColor && !isHeader)) {
11689
- this.tableStore.setSelectedCellsBackgroundColor(null);
11690
- }
11691
- else {
11692
- this.tableStore.setSelectedCellsBackgroundColor(newColor);
11693
- }
11694
- this.tableStore.selectFirstCell();
11695
- }, 'rightTop', 0);
11696
- },
11697
- deactiveHandle: (event) => {
11698
- if (event.relatedTarget instanceof HTMLElement) {
11699
- if (event.relatedTarget.classList.contains('color-select-container')) {
11700
- return;
11701
- }
11702
- }
11703
- if (this.colorSelectService.isOpenColorSelect) {
11704
- this.colorSelectService.closeColorSelect();
11705
- }
11799
+ isInputNumber: true,
11800
+ nameSuffix: '列',
11801
+ actionHandle: (item) => {
11802
+ const { targetColIndex } = this.getTargetRowOrColIndex(false);
11803
+ TableEditor.insertColumn(this.editor, item.count, targetColIndex);
11804
+ this.tableStore.changeCells();
11706
11805
  }
11707
11806
  },
11708
11807
  {
@@ -11784,63 +11883,342 @@ class TheTableContextMenuService {
11784
11883
  get editor() {
11785
11884
  return this.tableStore && this.tableStore.editor;
11786
11885
  }
11787
- get backgroundColor() {
11788
- return this.tableStore.getSelectedCellBackgroundColor();
11886
+ get backgroundColor() {
11887
+ return this.tableStore.getSelectedCellBackgroundColor();
11888
+ }
11889
+ getSelectedCell() {
11890
+ const cells = this.tableStore.selectedCells;
11891
+ const selectCellNodes = getSelectCellNode(this.editor, cells);
11892
+ const leftCellDict = getLeftCellDict(selectCellNodes);
11893
+ const { rowspan, colspan } = calculateCellSpan(selectCellNodes, leftCellDict);
11894
+ return { row: rowspan, col: colspan, selectCellNodes };
11895
+ }
11896
+ getTargetRowOrColIndex(isFront = true) {
11897
+ const { row, col, selectCellNodes } = this.getSelectedCell();
11898
+ const firstSelectCell = selectCellNodes[0];
11899
+ const targetRowIndex = isFront ? firstSelectCell.row : row + firstSelectCell.row;
11900
+ const targetColIndex = isFront ? firstSelectCell.col : col + firstSelectCell.col;
11901
+ return { targetRowIndex, targetColIndex };
11902
+ }
11903
+ openMenuList(event) {
11904
+ this.ngZone.run(() => {
11905
+ const { selectedCells, isFullscreen, selectedRowsIndex, selectedColumnsIndex } = this.tableStore;
11906
+ const tableInfo = { selectedCells, isFullscreen, selectedRowsIndex, selectedColumnsIndex };
11907
+ const { row, col } = this.getSelectedCell();
11908
+ setCellMenuVisibility(this.editor, this.menuEntities, tableInfo);
11909
+ this.menuEntities.forEach(item => {
11910
+ switch (item.key) {
11911
+ case 'background-color':
11912
+ item.backgroundColor = this.tableStore.getSelectedCellBackgroundColor();
11913
+ break;
11914
+ case TableInsertType.insertRowsUp:
11915
+ case TableInsertType.insertRowsDown:
11916
+ item.count = row;
11917
+ break;
11918
+ case TableInsertType.insertColumnsLeft:
11919
+ case TableInsertType.insertColumnsRight:
11920
+ item.count = col;
11921
+ break;
11922
+ }
11923
+ });
11924
+ this.menuRef = this.thyPopover.open(TheContextMenuComponent, {
11925
+ origin: event.target,
11926
+ initialState: {
11927
+ menuEntities: this.menuEntities,
11928
+ actionHandle: (entity) => {
11929
+ if (!this.editor.selection) {
11930
+ refocus(this.editor);
11931
+ }
11932
+ entity.actionHandle(entity);
11933
+ },
11934
+ activeHandle: (menuEvent, entity) => {
11935
+ if (entity.activeHandle) {
11936
+ entity.activeHandle(menuEvent);
11937
+ }
11938
+ },
11939
+ deactivateHandle: (menuEvent, entity) => {
11940
+ if (entity.key.indexOf('delete') >= 0) {
11941
+ this.tableStore.clearDangerousCells();
11942
+ }
11943
+ if (entity.deactivateHandle) {
11944
+ entity.deactivateHandle(menuEvent);
11945
+ }
11946
+ }
11947
+ },
11948
+ originPosition: {
11949
+ x: event.x + 30,
11950
+ y: event.y
11951
+ },
11952
+ hasBackdrop: false,
11953
+ placement: 'bottomLeft',
11954
+ viewContainerRef: this.theContextService.getOptions().viewContainerRef,
11955
+ manualClosure: true,
11956
+ insideClosable: false,
11957
+ backdropClosable: false
11958
+ });
11959
+ });
11960
+ }
11961
+ closeContextMenu() {
11962
+ if (this.isOpened) {
11963
+ this.menuRef.close();
11964
+ return this.menuRef.afterClosed();
11965
+ }
11966
+ }
11967
+ }
11968
+ TheTableContextMenuService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheTableContextMenuService, deps: [{ token: TheColorSelectService }, { token: TableStore }, { token: i1$1.ThyPopover }, { token: i0.NgZone }, { token: TheContextService }], target: i0.ɵɵFactoryTarget.Injectable });
11969
+ TheTableContextMenuService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheTableContextMenuService });
11970
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheTableContextMenuService, decorators: [{
11971
+ type: Injectable
11972
+ }], ctorParameters: function () { return [{ type: TheColorSelectService }, { type: TableStore }, { type: i1$1.ThyPopover }, { type: i0.NgZone }, { type: TheContextService }]; } });
11973
+
11974
+ class TheTableOptionsComponent {
11975
+ constructor(popoverRef) {
11976
+ this.popoverRef = popoverRef;
11977
+ this.tableDropdownList = [
11978
+ // {
11979
+ // name: '表头行',
11980
+ // key: 'headerRow'
11981
+ // },
11982
+ {
11983
+ name: '标题列',
11984
+ key: 'headerColumn'
11985
+ },
11986
+ {
11987
+ name: '序号列',
11988
+ key: 'numberedColumn'
11989
+ }
11990
+ ];
11991
+ }
11992
+ get table() {
11993
+ return this.tableStore && this.tableStore.getTableEntry(this.editor)[0];
11994
+ }
11995
+ ngOnInit() {
11996
+ this.setColumnOptions();
11997
+ }
11998
+ setColumnOptions() {
11999
+ this.tableDropdownList.forEach(item => {
12000
+ item.isActive = (this.table.options && this.table.options[item.key]) || false;
12001
+ });
12002
+ }
12003
+ setTableOptions(event, option) {
12004
+ event.preventDefault();
12005
+ event.stopPropagation();
12006
+ const currentOption = this.tableDropdownList.find(item => item.key === option.key);
12007
+ currentOption.isActive = !option.isActive;
12008
+ const tableOption = {};
12009
+ tableOption[option.key] = currentOption.isActive || null;
12010
+ this.tableStore.setTableOptions(this.editor, Object.assign(Object.assign({}, this.table.options), tableOption));
12011
+ }
12012
+ }
12013
+ TheTableOptionsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheTableOptionsComponent, deps: [{ token: i1$1.ThyPopoverRef }], target: i0.ɵɵFactoryTarget.Component });
12014
+ TheTableOptionsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: TheTableOptionsComponent, selector: "the-table-options", inputs: { tableStore: "tableStore", editor: "editor" }, ngImport: i0, template: `
12015
+ <div class="thy-dropdown-menu table-drop-menu">
12016
+ <ng-container *ngFor="let option of tableDropdownList">
12017
+ <a thyDropdownMenuItem href="javascript:;" (mousedown)="setTableOptions($event, option)">
12018
+ <span thyDropdownMenuItemName>{{ option.name }}</span>
12019
+ <span *ngIf="option.isActive" thyDropdownMenuItemIcon class="text-primary">
12020
+ <thy-icon thyIconName="check"></thy-icon>
12021
+ </span>
12022
+ </a>
12023
+ </ng-container>
12024
+ </div>
12025
+ `, isInline: true, dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.ThyIconComponent, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { kind: "directive", type: i6.ThyDropdownMenuItemDirective, selector: "[thyDropdownMenuItem]", inputs: ["thyType", "thyDisabled"] }, { kind: "directive", type: i6.ThyDropdownMenuItemNameDirective, selector: "[thyDropdownMenuItemName]" }, { kind: "directive", type: i6.ThyDropdownMenuItemIconDirective, selector: "[thyDropdownMenuItemIcon]" }] });
12026
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheTableOptionsComponent, decorators: [{
12027
+ type: Component,
12028
+ args: [{
12029
+ selector: 'the-table-options',
12030
+ template: `
12031
+ <div class="thy-dropdown-menu table-drop-menu">
12032
+ <ng-container *ngFor="let option of tableDropdownList">
12033
+ <a thyDropdownMenuItem href="javascript:;" (mousedown)="setTableOptions($event, option)">
12034
+ <span thyDropdownMenuItemName>{{ option.name }}</span>
12035
+ <span *ngIf="option.isActive" thyDropdownMenuItemIcon class="text-primary">
12036
+ <thy-icon thyIconName="check"></thy-icon>
12037
+ </span>
12038
+ </a>
12039
+ </ng-container>
12040
+ </div>
12041
+ `
12042
+ }]
12043
+ }], ctorParameters: function () { return [{ type: i1$1.ThyPopoverRef }]; }, propDecorators: { tableStore: [{
12044
+ type: Input
12045
+ }], editor: [{
12046
+ type: Input
12047
+ }] } });
12048
+
12049
+ class TheTableToolbarComponent {
12050
+ constructor(ngZone, colorSelectService, thyPopover, popoverRef) {
12051
+ this.ngZone = ngZone;
12052
+ this.colorSelectService = colorSelectService;
12053
+ this.thyPopover = thyPopover;
12054
+ this.popoverRef = popoverRef;
12055
+ this.cellMenuList = [
12056
+ {
12057
+ key: 'merge-cells',
12058
+ name: '合并单元格',
12059
+ visibility: false,
12060
+ icon: 'table-merge-cells',
12061
+ actionHandle: () => {
12062
+ event.preventDefault();
12063
+ event.stopPropagation();
12064
+ this.tableStore.mergeCell(this.editor);
12065
+ this.popoverRef.close();
12066
+ this.tableStore.clearSelectedCells();
12067
+ }
12068
+ },
12069
+ {
12070
+ key: 'split-cells',
12071
+ name: '拆分单元格',
12072
+ visibility: false,
12073
+ icon: 'table-unmerge-cells',
12074
+ actionHandle: () => {
12075
+ event.preventDefault();
12076
+ event.stopPropagation();
12077
+ splitCell(this.editor);
12078
+ this.popoverRef.close();
12079
+ this.tableStore.clearSelectedCells();
12080
+ }
12081
+ }
12082
+ ];
12083
+ }
12084
+ get editor() {
12085
+ return this.tableStore && this.tableStore.editor;
12086
+ }
12087
+ get hasDivider() {
12088
+ return this.cellMenuList.filter(item => item.visibility).length > 1;
12089
+ }
12090
+ get tableOptions() {
12091
+ return getPluginOptions(this.editor, PluginKeys.table);
12092
+ }
12093
+ ngOnInit() {
12094
+ this.deleteIcon = DeleteIcon[this.getDeleteIcon()];
12095
+ this.getIconName(this.deleteIcon);
12096
+ const { selectedCells } = this.tableStore;
12097
+ const tableInfo = { selectedCells };
12098
+ this.isRectangle = isRectangularInTableCells(selectedCells);
12099
+ setCellMenuVisibility(this.editor, this.cellMenuList, tableInfo, this.isFromControls);
12100
+ this.selectedColor = this.tableStore.getSelectedCellBackgroundColor();
12101
+ }
12102
+ ngOnDestroy() {
12103
+ this.colorSelectService.closeColorSelect();
12104
+ }
12105
+ getIconName(key) {
12106
+ switch (key) {
12107
+ case 'trash':
12108
+ this.iconName = '删除表格';
12109
+ break;
12110
+ case 'table-delete-columns':
12111
+ this.iconName = '删除整列';
12112
+ break;
12113
+ case 'table-delete-rows':
12114
+ this.iconName = '删除整行';
12115
+ break;
12116
+ }
12117
+ }
12118
+ getDeleteIcon() {
12119
+ if (this.tableStore.isSelectedTable) {
12120
+ return DeleteIcon.trash;
12121
+ }
12122
+ if (this.tableStore.selectedRowsIndex.length > 0) {
12123
+ return DeleteIcon['table-delete-rows'];
12124
+ }
12125
+ if (this.tableStore.selectedColumnsIndex.length > 0) {
12126
+ return DeleteIcon['table-delete-columns'];
12127
+ }
12128
+ return null;
12129
+ }
12130
+ onDelete(event) {
12131
+ event.preventDefault();
12132
+ this.tableStore.removeColumnOrRows();
12133
+ this.tableStore.clearDangerousCells();
12134
+ this.tableStore.clearSelectedCells();
12135
+ this.popoverRef.close();
12136
+ }
12137
+ onEnterDelete(event) {
12138
+ this.tableStore.setDangerousCells();
12139
+ }
12140
+ onLeaveDelete(event) {
12141
+ this.tableStore.clearDangerousCells();
11789
12142
  }
11790
- openMenuList(event) {
12143
+ openSelectColor(event) {
12144
+ event.preventDefault();
12145
+ event.stopPropagation();
12146
+ const element = event.target.closest('.thy-action');
12147
+ const isHeader = TableEditor.isActiveHeader(this.editor);
11791
12148
  this.ngZone.run(() => {
11792
- setCellMenuVisibility(this.editor, this.menuEntities, this.tableStore.selectedCells);
11793
- this.menuEntities.forEach(item => {
11794
- if (item.key === 'background-color') {
11795
- item.backgroundColor = this.tableStore.getSelectedCellBackgroundColor();
12149
+ this.colorSelectService.toggleColorSelect(element, this.selectedColor, BackgroundColors, {
12150
+ perRowColorNumbers: 7,
12151
+ rowOptions: { 1: '#bbb', 2: '#bbb' },
12152
+ specialColor: isHeader ? TableHeaderBackgroundColor : SpecialBackgroundColor
12153
+ }, (newColor) => {
12154
+ if ((newColor === TableHeaderBackgroundColor && isHeader) || (newColor === SpecialBackgroundColor && !isHeader)) {
12155
+ this.tableStore.setSelectedCellsBackgroundColor(null);
11796
12156
  }
11797
- });
11798
- this.menuRef = this.thyPopover.open(TheContextMenuComponent, {
11799
- origin: event.target,
11800
- initialState: {
11801
- menuEntities: this.menuEntities,
11802
- actionHandle: (entity) => {
11803
- entity.actionHandle(entity);
11804
- },
11805
- activeHandle: (menuEvent, entity) => {
11806
- if (entity.activeHandle) {
11807
- entity.activeHandle(menuEvent);
11808
- }
11809
- },
11810
- deactiveHandle: (menuEvent, entity) => {
11811
- if (entity.key.indexOf('delete') >= 0) {
11812
- this.tableStore.clearDangerousCells();
11813
- }
11814
- if (entity.deactiveHandle) {
11815
- entity.deactiveHandle(menuEvent);
11816
- }
11817
- }
11818
- },
11819
- originPosition: {
11820
- x: event.x + 30,
11821
- y: event.y
11822
- },
11823
- hasBackdrop: false,
11824
- placement: 'bottomLeft',
11825
- viewContainerRef: this.theContextService.getOptions().viewContainerRef,
11826
- manualClosure: true,
11827
- insideClosable: false,
11828
- backdropClosable: false
11829
- });
12157
+ else {
12158
+ this.tableStore.setSelectedCellsBackgroundColor(newColor);
12159
+ }
12160
+ this.selectedColor = newColor;
12161
+ }, 'bottomLeft', 4);
11830
12162
  });
11831
12163
  }
11832
- closeContextMenu() {
11833
- if (this.isOpened) {
11834
- this.menuRef.close();
11835
- return this.menuRef.afterClosed();
11836
- }
12164
+ setFullscreen(event) {
12165
+ this.tableOptions.setFullscreen(this.editor, event, this.tableElement);
12166
+ }
12167
+ mousedown(event) {
12168
+ event.preventDefault();
12169
+ event.stopPropagation();
12170
+ }
12171
+ setEquallyColumnHandle(event) {
12172
+ event.preventDefault();
12173
+ event.stopPropagation();
12174
+ const cols = [...this.tableElementRef.nativeElement.querySelector('colgroup').children];
12175
+ const initialValue = 0;
12176
+ const sumWidth = cols.reduce((previousValue, currentValue) => {
12177
+ return previousValue + getElementWidth(currentValue);
12178
+ }, initialValue);
12179
+ cols.forEach(col => {
12180
+ col.style.width = coerceCssPixelValue(sumWidth / cols.length);
12181
+ });
12182
+ }
12183
+ openTableOptionMenu(event) {
12184
+ event.preventDefault();
12185
+ event.stopPropagation();
12186
+ this.thyPopover.open(TheTableOptionsComponent, {
12187
+ origin: event.currentTarget,
12188
+ initialState: {
12189
+ tableStore: this.tableStore,
12190
+ editor: this.editor
12191
+ },
12192
+ minWidth: 0,
12193
+ insideClosable: true,
12194
+ outsideClosable: true,
12195
+ hasBackdrop: false,
12196
+ placement: 'bottomLeft',
12197
+ originActiveClass: 'active',
12198
+ panelClass: 'table-options-pannel'
12199
+ });
11837
12200
  }
11838
12201
  }
11839
- TheTableContextMenuService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheTableContextMenuService, deps: [{ token: TheColorSelectService }, { token: TableStore }, { token: i1$1.ThyPopover }, { token: i0.NgZone }, { token: TheContextService }], target: i0.ɵɵFactoryTarget.Injectable });
11840
- TheTableContextMenuServiceprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheTableContextMenuService });
11841
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheTableContextMenuService, decorators: [{
11842
- type: Injectable
11843
- }], ctorParameters: function () { return [{ type: TheColorSelectService }, { type: TableStore }, { type: i1$1.ThyPopover }, { type: i0.NgZone }, { type: TheContextService }]; } });
12202
+ TheTableToolbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheTableToolbarComponent, deps: [{ token: i0.NgZone }, { token: TheColorSelectService }, { token: i1$1.ThyPopover }, { token: i1$1.ThyPopoverRef }], target: i0.ɵɵFactoryTarget.Component });
12203
+ TheTableToolbarComponentcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: TheTableToolbarComponent, selector: "the-table-toolbar", inputs: { tableStore: "tableStore", isFromControls: "isFromControls", tableElement: "tableElement", tableElementRef: "tableElementRef" }, ngImport: i0, template: "<thy-actions thySize=\"xxs\">\n <ng-container *ngFor=\"let item of cellMenuList\">\n <a\n *ngIf=\"item.visibility\"\n href=\"javascript:;\"\n thyAction\n [thyActionIcon]=\"item.icon\"\n [thyTooltip]=\"item.name\"\n (mousedown)=\"item.actionHandle()\"\n ></a>\n </ng-container>\n <thy-divider *ngIf=\"hasDivider\" class=\"mr-2 ml-1 align-self-center\" [thyVertical]=\"true\"> </thy-divider>\n <a href=\"javascript:;\" thyAction thyTooltip=\"\u5355\u5143\u683C\u80CC\u666F\" (mousedown)=\"openSelectColor($event)\">\n <thy-icon thyIconName=\"background-tt\" thyIconType=\"twotone\" [thyTwotoneColor]=\"selectedColor\"></thy-icon>\n </a>\n <a href=\"javascript:;\" *ngIf=\"tableStore.isSelectedTable\" thyAction thyTooltip=\"\u5217\u7B49\u5BBD\" (mousedown)=\"setEquallyColumnHandle($event)\">\n <thy-icon thyIconName=\"table-column-equal-width\"></thy-icon>\n </a>\n <a\n href=\"javascript:;\"\n *ngIf=\"tableStore.isSelectedTable && tableOptions?.showFullscreen\"\n thyAction\n thyTooltip=\"\u5168\u5C4F\"\n (mousedown)=\"setFullscreen($event)\"\n >\n <thy-icon thyIconName=\"arrows-alt\"></thy-icon>\n </a>\n\n <ng-container *ngIf=\"tableStore.isSelectedTable\">\n <thy-divider class=\"mr-2 ml-1 align-self-center\" [thyVertical]=\"true\"></thy-divider>\n <a href=\"javascript:;\" class=\"link-with-down\" thyAction (mousedown)=\"mousedown($event)\" (click)=\"openTableOptionMenu($event)\">\n <span>\u8868\u683C\u9009\u9879</span>\n <thy-icon class=\"font-size-sm text-desc ml-1\" thyIconName=\"caret-down\"></thy-icon>\n </a>\n </ng-container>\n\n <ng-container *ngIf=\"isRectangle && (tableStore?.isFullscreen ? deleteIcon && !tableStore.isSelectedTable : deleteIcon)\">\n <thy-divider class=\"mr-2 ml-1 align-self-center\" [thyVertical]=\"true\"></thy-divider>\n <a\n href=\"javascript:;\"\n thyAction\n thyType=\"danger\"\n [thyActionIcon]=\"deleteIcon\"\n [thyTooltip]=\"iconName\"\n (mousedown)=\"onDelete($event)\"\n (mouseenter)=\"onEnterDelete($event)\"\n (mouseleave)=\"onLeaveDelete($event)\"\n ></a>\n </ng-container>\n</thy-actions>\n", dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.ThyIconComponent, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { kind: "directive", type: i8.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { kind: "component", type: i5.ThyActionComponent, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }, { kind: "component", type: i5.ThyActionsComponent, selector: "thy-actions", inputs: ["thySize"] }, { kind: "component", type: i12.ThyDividerComponent, selector: "thy-divider", inputs: ["thyVertical", "thyStyle", "thyColor", "thyText", "thyTextDirection", "thyDeeper"] }] });
12204
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheTableToolbarComponent, decorators: [{
12205
+ type: Component,
12206
+ args: [{ selector: 'the-table-toolbar', template: "<thy-actions thySize=\"xxs\">\n <ng-container *ngFor=\"let item of cellMenuList\">\n <a\n *ngIf=\"item.visibility\"\n href=\"javascript:;\"\n thyAction\n [thyActionIcon]=\"item.icon\"\n [thyTooltip]=\"item.name\"\n (mousedown)=\"item.actionHandle()\"\n ></a>\n </ng-container>\n <thy-divider *ngIf=\"hasDivider\" class=\"mr-2 ml-1 align-self-center\" [thyVertical]=\"true\"> </thy-divider>\n <a href=\"javascript:;\" thyAction thyTooltip=\"\u5355\u5143\u683C\u80CC\u666F\" (mousedown)=\"openSelectColor($event)\">\n <thy-icon thyIconName=\"background-tt\" thyIconType=\"twotone\" [thyTwotoneColor]=\"selectedColor\"></thy-icon>\n </a>\n <a href=\"javascript:;\" *ngIf=\"tableStore.isSelectedTable\" thyAction thyTooltip=\"\u5217\u7B49\u5BBD\" (mousedown)=\"setEquallyColumnHandle($event)\">\n <thy-icon thyIconName=\"table-column-equal-width\"></thy-icon>\n </a>\n <a\n href=\"javascript:;\"\n *ngIf=\"tableStore.isSelectedTable && tableOptions?.showFullscreen\"\n thyAction\n thyTooltip=\"\u5168\u5C4F\"\n (mousedown)=\"setFullscreen($event)\"\n >\n <thy-icon thyIconName=\"arrows-alt\"></thy-icon>\n </a>\n\n <ng-container *ngIf=\"tableStore.isSelectedTable\">\n <thy-divider class=\"mr-2 ml-1 align-self-center\" [thyVertical]=\"true\"></thy-divider>\n <a href=\"javascript:;\" class=\"link-with-down\" thyAction (mousedown)=\"mousedown($event)\" (click)=\"openTableOptionMenu($event)\">\n <span>\u8868\u683C\u9009\u9879</span>\n <thy-icon class=\"font-size-sm text-desc ml-1\" thyIconName=\"caret-down\"></thy-icon>\n </a>\n </ng-container>\n\n <ng-container *ngIf=\"isRectangle && (tableStore?.isFullscreen ? deleteIcon && !tableStore.isSelectedTable : deleteIcon)\">\n <thy-divider class=\"mr-2 ml-1 align-self-center\" [thyVertical]=\"true\"></thy-divider>\n <a\n href=\"javascript:;\"\n thyAction\n thyType=\"danger\"\n [thyActionIcon]=\"deleteIcon\"\n [thyTooltip]=\"iconName\"\n (mousedown)=\"onDelete($event)\"\n (mouseenter)=\"onEnterDelete($event)\"\n (mouseleave)=\"onLeaveDelete($event)\"\n ></a>\n </ng-container>\n</thy-actions>\n" }]
12207
+ }], ctorParameters: function () { return [{ type: i0.NgZone }, { type: TheColorSelectService }, { type: i1$1.ThyPopover }, { type: i1$1.ThyPopoverRef }]; }, propDecorators: { tableStore: [{
12208
+ type: Input
12209
+ }], isFromControls: [{
12210
+ type: Input
12211
+ }], tableElement: [{
12212
+ type: Input
12213
+ }], tableElementRef: [{
12214
+ type: Input
12215
+ }] } });
12216
+ var DeleteIcon;
12217
+ (function (DeleteIcon) {
12218
+ DeleteIcon[DeleteIcon["table-delete-rows"] = 0] = "table-delete-rows";
12219
+ DeleteIcon[DeleteIcon["table-delete-columns"] = 1] = "table-delete-columns";
12220
+ DeleteIcon[DeleteIcon["trash"] = 2] = "trash";
12221
+ })(DeleteIcon || (DeleteIcon = {}));
11844
12222
 
11845
12223
  class TableService {
11846
12224
  constructor(thyPopover, overlay, tableStore, theTableContextMenuService, ngZone, theContextService) {
@@ -11859,7 +12237,7 @@ class TableService {
11859
12237
  get isOpened() {
11860
12238
  return this.toolbarRef && this.toolbarRef.componentInstance;
11861
12239
  }
11862
- openToolbar(origin, tableElement, isFromControls) {
12240
+ openToolbar(origin, tableElement, isFromControls, tableElementRef) {
11863
12241
  if (this.isOpened) {
11864
12242
  if (this.toolbarRef.containerInstance.config.origin === origin) {
11865
12243
  return;
@@ -11870,7 +12248,8 @@ class TableService {
11870
12248
  initialState: {
11871
12249
  tableStore: this.tableStore,
11872
12250
  tableElement,
11873
- isFromControls
12251
+ isFromControls,
12252
+ tableElementRef
11874
12253
  },
11875
12254
  viewContainerRef: this.theContextService.getOptions().viewContainerRef,
11876
12255
  origin: this.getOrigin(origin),
@@ -11885,9 +12264,9 @@ class TableService {
11885
12264
  manualClosure: true
11886
12265
  });
11887
12266
  }
11888
- afterSelectedCells(origin, element, isFromControls) {
12267
+ afterSelectedCells(origin, element, isFromControls, tableElementRef) {
11889
12268
  this.theTableContextMenuService.closeContextMenu();
11890
- this.openToolbar(origin, element, isFromControls);
12269
+ this.openToolbar(origin, element, isFromControls, tableElementRef);
11891
12270
  }
11892
12271
  getOrigin(origin) {
11893
12272
  if (origin instanceof HTMLTableCellElement && origin.tagName !== 'TH') {
@@ -11915,15 +12294,12 @@ class TableService {
11915
12294
  }
11916
12295
  }
11917
12296
  }
11918
- TableService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TableService, deps: [{ token: i1$1.ThyPopover }, { token: i2$1.Overlay }, { token: TableStore }, { token: TheTableContextMenuService }, { token: i0.NgZone }, { token: TheContextService }], target: i0.ɵɵFactoryTarget.Injectable });
11919
- TableService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TableService });
11920
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TableService, decorators: [{
12297
+ TableService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TableService, deps: [{ token: i1$1.ThyPopover }, { token: i2$1.Overlay }, { token: TableStore }, { token: TheTableContextMenuService }, { token: i0.NgZone }, { token: TheContextService }], target: i0.ɵɵFactoryTarget.Injectable });
12298
+ TableService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TableService });
12299
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TableService, decorators: [{
11921
12300
  type: Injectable
11922
12301
  }], ctorParameters: function () { return [{ type: i1$1.ThyPopover }, { type: i2$1.Overlay }, { type: TableStore }, { type: TheTableContextMenuService }, { type: i0.NgZone }, { type: TheContextService }]; } });
11923
12302
 
11924
- const SLA_TABLE_SELECTOR = '.slate-element-table';
11925
- const SLA_TABLE_CELL_SELECTOR = '.slate-element-table-cell';
11926
-
11927
12303
  function isVirtualKey(e) {
11928
12304
  const isMod = e.ctrlKey || e.metaKey;
11929
12305
  const isAlt = isKeyHotkey('alt', e);
@@ -11937,14 +12313,17 @@ function isVirtualKey(e) {
11937
12313
  }
11938
12314
 
11939
12315
  class TableFreezeColumnPipe {
11940
- transform(element, tablePluginOptions) {
11941
- var _a;
11942
- return (tablePluginOptions === null || tablePluginOptions === void 0 ? void 0 : tablePluginOptions.freezeColumnHeader) && ((_a = element.options) === null || _a === void 0 ? void 0 : _a.headerColumn);
12316
+ transform(table, tablePluginOptions) {
12317
+ var _a, _b;
12318
+ const rows = (_a = table.children) === null || _a === void 0 ? void 0 : _a.map(item => item.children);
12319
+ // 存在合并的单元格时,取消冻结
12320
+ const mergeColumnCells = rows && rows.map(cells => cells[0]).filter(item => item.colspan && item.colspan !== 1);
12321
+ return (tablePluginOptions === null || tablePluginOptions === void 0 ? void 0 : tablePluginOptions.freezeColumnHeader) && ((_b = table.options) === null || _b === void 0 ? void 0 : _b.headerColumn) && !mergeColumnCells.length;
11943
12322
  }
11944
12323
  }
11945
- TableFreezeColumnPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TableFreezeColumnPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
11946
- TableFreezeColumnPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.12", ngImport: i0, type: TableFreezeColumnPipe, name: "freezeColumn" });
11947
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TableFreezeColumnPipe, decorators: [{
12324
+ TableFreezeColumnPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TableFreezeColumnPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
12325
+ TableFreezeColumnPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.0", ngImport: i0, type: TableFreezeColumnPipe, name: "freezeColumn" });
12326
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TableFreezeColumnPipe, decorators: [{
11948
12327
  type: Pipe,
11949
12328
  args: [{ name: 'freezeColumn' }]
11950
12329
  }] });
@@ -12031,9 +12410,9 @@ class TheColumnResizeDirective {
12031
12410
  this.destroyed.complete();
12032
12411
  }
12033
12412
  }
12034
- TheColumnResizeDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheColumnResizeDirective, deps: [{ token: i0.ElementRef }, { token: i0.ViewContainerRef }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: TableCellEventDispatcher }, { token: ColumnResizeNotifierSource }, { token: TheTableToken }], target: i0.ɵɵFactoryTarget.Directive });
12035
- TheColumnResizeDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.12", type: TheColumnResizeDirective, selector: "div[theColumnResize]", ngImport: i0 });
12036
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheColumnResizeDirective, decorators: [{
12413
+ TheColumnResizeDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheColumnResizeDirective, deps: [{ token: i0.ElementRef }, { token: i0.ViewContainerRef }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: TableCellEventDispatcher }, { token: ColumnResizeNotifierSource }, { token: TheTableToken }], target: i0.ɵɵFactoryTarget.Directive });
12414
+ TheColumnResizeDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.0", type: TheColumnResizeDirective, selector: "div[theColumnResize]", ngImport: i0 });
12415
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheColumnResizeDirective, decorators: [{
12037
12416
  type: Directive,
12038
12417
  args: [{
12039
12418
  selector: 'div[theColumnResize]'
@@ -12068,14 +12447,6 @@ class TheInsertMarkComponent {
12068
12447
  }
12069
12448
  const fun = this.type === 'row' ? TableEditor.insertRow : TableEditor.insertColumn;
12070
12449
  fun(this.editor, 1, this.at);
12071
- // update header
12072
- if (this.type === 'row' && this.at === 0) {
12073
- const { selection } = this.editor;
12074
- const opts = new TableOptions();
12075
- const table = TablePosition.create(opts, this.editor, selection.anchor.path);
12076
- Transforms.setNodes(this.editor, { header: true }, { at: table.tableEntry[1].concat(0) });
12077
- Transforms.setNodes(this.editor, { header: null }, { at: table.tableEntry[1].concat(1) });
12078
- }
12079
12450
  this.tableStore.changeCells();
12080
12451
  }
12081
12452
  onMouseEnter(event) {
@@ -12125,9 +12496,9 @@ class TheInsertMarkComponent {
12125
12496
  }
12126
12497
  }
12127
12498
  }
12128
- TheInsertMarkComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheInsertMarkComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
12129
- TheInsertMarkComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: TheInsertMarkComponent, selector: "the-table-insert-mark", inputs: { type: "type", at: "at", tableStore: "tableStore", parentElement: "parentElement" }, ngImport: i0, template: "<div\n [thyTooltip]=\"!disabled && tooltipContent\"\n class=\"the-table-controls-insert-wrapper\"\n [ngClass]=\"{ disabled: disabled }\"\n contenteditable=\"false\"\n (mousedown)=\"onMouseDown($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: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i8.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }] });
12130
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheInsertMarkComponent, decorators: [{
12499
+ TheInsertMarkComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheInsertMarkComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
12500
+ TheInsertMarkComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: TheInsertMarkComponent, selector: "the-table-insert-mark", inputs: { type: "type", at: "at", tableStore: "tableStore", parentElement: "parentElement" }, ngImport: i0, template: "<div\n [thyTooltip]=\"!disabled && tooltipContent\"\n class=\"the-table-controls-insert-wrapper\"\n [ngClass]=\"{ disabled: disabled }\"\n contenteditable=\"false\"\n (mousedown)=\"onMouseDown($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: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i8.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }] });
12501
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheInsertMarkComponent, decorators: [{
12131
12502
  type: Component,
12132
12503
  args: [{ selector: 'the-table-insert-mark', template: "<div\n [thyTooltip]=\"!disabled && tooltipContent\"\n class=\"the-table-controls-insert-wrapper\"\n [ngClass]=\"{ disabled: disabled }\"\n contenteditable=\"false\"\n (mousedown)=\"onMouseDown($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" }]
12133
12504
  }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.Renderer2 }]; }, propDecorators: { type: [{
@@ -12151,6 +12522,7 @@ class TheTableComponent extends TheBaseElementComponent {
12151
12522
  this.tableService = tableService;
12152
12523
  this.theTableContextMenuService = theTableContextMenuService;
12153
12524
  this.freezeColumnPipe = freezeColumnPipe;
12525
+ this.headerRow = false;
12154
12526
  this.destroy$ = new Subject();
12155
12527
  this.rowControls = [];
12156
12528
  this.colControls = [];
@@ -12191,6 +12563,7 @@ class TheTableComponent extends TheBaseElementComponent {
12191
12563
  this.getIsInTable();
12192
12564
  this.getColControls();
12193
12565
  }
12566
+ this.headerRow = this.getHeaderRow();
12194
12567
  }
12195
12568
  ngOnInit() {
12196
12569
  super.ngOnInit();
@@ -12212,6 +12585,20 @@ class TheTableComponent extends TheBaseElementComponent {
12212
12585
  const width = tableContainer.offsetWidth - paddingLeft;
12213
12586
  return width;
12214
12587
  }
12588
+ /**
12589
+ * compatible with old data
12590
+ * @returns
12591
+ */
12592
+ getHeaderRow() {
12593
+ var _a, _b, _c;
12594
+ if ((_b = (_a = this.element) === null || _a === void 0 ? void 0 : _a.options) === null || _b === void 0 ? void 0 : _b.headerRow) {
12595
+ return true;
12596
+ }
12597
+ // compat old data
12598
+ if ((_c = this.element) === null || _c === void 0 ? void 0 : _c.children[0].header) {
12599
+ return true;
12600
+ }
12601
+ }
12215
12602
  ngAfterViewInit() {
12216
12603
  this.ngZone.onStable.pipe(take(1)).subscribe(() => __awaiter(this, void 0, void 0, function* () {
12217
12604
  var _a;
@@ -12503,7 +12890,7 @@ class TheTableComponent extends TheBaseElementComponent {
12503
12890
  event.stopPropagation();
12504
12891
  event.preventDefault();
12505
12892
  this.tableStore.selectTable(this.editor);
12506
- this.tableService.afterSelectedCells(event.target, this.element, true);
12893
+ this.tableService.afterSelectedCells(event.target, this.element, true, this.theTableElement);
12507
12894
  }
12508
12895
  listenTableContextMenuEvent() {
12509
12896
  this.ngZone.runOutsideAngular(() => {
@@ -12556,7 +12943,9 @@ class TheTableComponent extends TheBaseElementComponent {
12556
12943
  return !isVirtualKey(e);
12557
12944
  })))
12558
12945
  .pipe(filter(() => {
12559
- return this.tableStore.selectedCells && this.tableStore.selectedCells.length > 0;
12946
+ return (this.tableStore.selectedCells &&
12947
+ this.tableStore.selectedCells.length > 0 &&
12948
+ !(this.theTableContextMenuService.isOpened && !this.editor.selection));
12560
12949
  }), takeUntil(this.destroy$))
12561
12950
  .subscribe((e) => {
12562
12951
  if (e.type === 'keydown') {
@@ -12576,7 +12965,7 @@ class TheTableComponent extends TheBaseElementComponent {
12576
12965
  fromEvent(document, 'keydown')
12577
12966
  .pipe(takeUntil(this.destroy$), filter((e) => !!e))
12578
12967
  .subscribe((event) => {
12579
- if (isHotkey('mod', event)) {
12968
+ if (isHotkey('mod', event) && !this.readonly) {
12580
12969
  this.tableStore.isModSelecting = true;
12581
12970
  }
12582
12971
  });
@@ -12600,8 +12989,8 @@ class TheTableComponent extends TheBaseElementComponent {
12600
12989
  this.destroy$.complete();
12601
12990
  }
12602
12991
  }
12603
- TheTableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheTableComponent, deps: [{ token: i0.ElementRef }, { token: TableCellEventDispatcher }, { token: ColumnResizeNotifierSource }, { token: TableStore }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: TableService }, { token: TheTableContextMenuService }, { token: TableFreezeColumnPipe }], target: i0.ɵɵFactoryTarget.Component });
12604
- TheTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: TheTableComponent, selector: "the-table, [theTable]", host: { listeners: { "mousedown": "handleMousedown($event)" } }, providers: [
12992
+ TheTableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheTableComponent, deps: [{ token: i0.ElementRef }, { token: TableCellEventDispatcher }, { token: ColumnResizeNotifierSource }, { token: TableStore }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: TableService }, { token: TheTableContextMenuService }, { token: TableFreezeColumnPipe }], target: i0.ɵɵFactoryTarget.Component });
12993
+ TheTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: TheTableComponent, selector: "the-table, [theTable]", host: { listeners: { "mousedown": "handleMousedown($event)" } }, providers: [
12605
12994
  TableStore,
12606
12995
  TableService,
12607
12996
  TheTableContextMenuService,
@@ -12612,8 +13001,8 @@ TheTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", vers
12612
13001
  provide: TheTableToken,
12613
13002
  useExisting: TheTableComponent
12614
13003
  }
12615
- ], viewQueries: [{ propertyName: "tableWrapper", first: true, predicate: ["tableWrapper"], descendants: true, read: ElementRef, static: true }, { propertyName: "theTableElement", first: true, predicate: ["theTable"], descendants: true, read: ElementRef, static: true }, { propertyName: "tbodyElement", first: true, predicate: ["tbody"], descendants: true, read: ElementRef, static: true }], usesInheritance: true, ngImport: i0, template: "<div\n class=\"the-table-container\"\n theColumnResize\n [ngClass]=\"{\n 'the-table-with-controls': isInTable,\n 'the-numbered-column-container': element?.options?.numberedColumn,\n 'the-table-selection-hide': tableStore.isCellSelecting || tableStore.isRightClicking\n }\"\n>\n <div\n class=\"the-table-row-controls-wrapper\"\n [ngClass]=\"{\n 'the-table-focus': isInTable\n }\"\n >\n <div\n class=\"the-table-corner-controls\"\n [ngClass]=\"{\n visible: !readonly && isInTable,\n active: isSelectedAllCell,\n dangerous: tableStore.isSelectedTable && tableStore.dangerousCells.length > 0\n }\"\n >\n <div class=\"the-table-corner-button\" (mousedown)=\"onSelectTable($event)\"></div>\n <div class=\"the-table-corner-controls-insert-row-marker\">\n <the-table-insert-mark type=\"row\" [at]=\"0\" [tableStore]=\"tableStore\"></the-table-insert-mark>\n </div>\n <div class=\"the-table-corner-controls-insert-column-marker\">\n <the-table-insert-mark\n *ngIf=\"!element.options?.headerColumn\"\n type=\"column\"\n [at]=\"0\"\n [tableStore]=\"tableStore\"\n ></the-table-insert-mark>\n </div>\n </div>\n <div class=\"the-table-row-controls\">\n <div class=\"the-table-row-controls-inner\">\n <div\n class=\"the-table-row-controls-button-wrap\"\n *ngFor=\"let control of rowControls; let i = index; trackBy: trackByFnRowControls\"\n [ngClass]=\"{\n active: tableStore.selectedRowsIndex.includes(control.rowIndex),\n dangerous: tableStore.dangerousRowsIndex.includes(control.rowIndex) && tableStore.dangerousCells.length > 0\n }\"\n >\n <ng-container *ngIf=\"!readonly && isInTable && !element?.options?.numberedColumn\">\n <button\n (mousedown)=\"onRowMousedown($event, control.rowIndex)\"\n type=\"button\"\n [ngStyle]=\"{ height: control.height + 1 + 'px' }\"\n class=\"the-table-row-controls-button the-table-controls-button\"\n ></button>\n </ng-container>\n <ng-container *ngIf=\"element?.options?.numberedColumn\">\n <div\n [contentEditable]=\"false\"\n contenteditable=\"false\"\n (mousedown)=\"onRowMousedown($event, control.rowIndex)\"\n class=\"the-table-numbered-controls-button\"\n [ngStyle]=\"{ height: control.height + 1 + 'px' }\"\n >\n <p class=\"row-number d-flex align-items-center\">{{ i + 1 }}</p>\n </div>\n </ng-container>\n <the-table-insert-mark type=\"row\" [at]=\"control.rowIndex + 1\" [tableStore]=\"tableStore\"> </the-table-insert-mark>\n </div>\n </div>\n </div>\n </div>\n <div class=\"the-table-wrapper\" #tableWrapper [ngClass]=\"{ 'the-table-numbered': element?.options?.numberedColumn }\">\n <table class=\"the-table\" #theTable [ngClass]=\"{ 'the-table-with-controls': isInTable }\">\n <colgroup *ngIf=\"columns\">\n <col *ngFor=\"let col of columns\" [ngStyle]=\"{ width: col.width + 'px' }\" />\n </colgroup>\n <thead>\n <tr class=\"the-table-col-controls-wrapper\">\n <th\n #colControl\n class=\"the-table-col-controls\"\n [ngClass]=\"{\n 'the-sticky-cell': i === 0 && element | freezeColumn: tablePluginOptions,\n active: tableStore.selectedColumnsIndex.includes(i),\n dangerous: tableStore.dangerousColumnsIndex.includes(i) && tableStore.dangerousCells.length > 0\n }\"\n (mousedown)=\"onColMousedown($event, i)\"\n *ngFor=\"let control of colControls; let i = index; trackBy: trackByFnColControls\"\n >\n <the-table-insert-mark\n *ngIf=\"isInTable\"\n type=\"column\"\n [at]=\"i + 1\"\n [tableStore]=\"tableStore\"\n [parentElement]=\"colControl\"\n >\n </the-table-insert-mark>\n </th>\n </tr>\n </thead>\n <tbody #tbody>\n <slate-children [children]=\"children\" [context]=\"childrenContext\" [viewContext]=\"viewContext\"> </slate-children>\n </tbody>\n </table>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i1.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }, { kind: "directive", type: TheColumnResizeDirective, selector: "div[theColumnResize]" }, { kind: "component", type: TheInsertMarkComponent, selector: "the-table-insert-mark", inputs: ["type", "at", "tableStore", "parentElement"] }, { kind: "pipe", type: TableFreezeColumnPipe, name: "freezeColumn" }] });
12616
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheTableComponent, decorators: [{
13004
+ ], viewQueries: [{ propertyName: "tableWrapper", first: true, predicate: ["tableWrapper"], descendants: true, read: ElementRef, static: true }, { propertyName: "theTableElement", first: true, predicate: ["theTable"], descendants: true, read: ElementRef, static: true }, { propertyName: "tbodyElement", first: true, predicate: ["tbody"], descendants: true, read: ElementRef, static: true }], usesInheritance: true, ngImport: i0, template: "<div\n class=\"the-table-container\"\n theColumnResize\n [ngClass]=\"{\n 'the-table-with-controls': isInTable,\n 'the-numbered-column-container': element?.options?.numberedColumn,\n 'the-table-selection-hide': tableStore.isCellSelecting || tableStore.isRightClicking\n }\"\n>\n <div\n class=\"the-table-row-controls-wrapper\"\n [ngClass]=\"{\n 'the-table-focus': isInTable\n }\"\n >\n <div\n class=\"the-table-corner-controls\"\n [ngClass]=\"{\n visible: !readonly && isInTable,\n active: isSelectedAllCell,\n dangerous: tableStore.isSelectedTable && tableStore.dangerousCells.length > 0\n }\"\n >\n <div class=\"the-table-corner-button\" (mousedown)=\"onSelectTable($event)\"></div>\n <div class=\"the-table-corner-controls-insert-row-marker\">\n <the-table-insert-mark type=\"row\" [at]=\"0\" [tableStore]=\"tableStore\"></the-table-insert-mark>\n </div>\n <div class=\"the-table-corner-controls-insert-column-marker\">\n <the-table-insert-mark\n *ngIf=\"!element.options?.headerColumn\"\n type=\"column\"\n [at]=\"0\"\n [tableStore]=\"tableStore\"\n ></the-table-insert-mark>\n </div>\n </div>\n <div class=\"the-table-row-controls\">\n <div class=\"the-table-row-controls-inner\">\n <div\n class=\"the-table-row-controls-button-wrap\"\n *ngFor=\"let control of rowControls; let i = index; trackBy: trackByFnRowControls\"\n [ngClass]=\"{\n active: tableStore.selectedRowsIndex.includes(control.rowIndex),\n dangerous: tableStore.dangerousRowsIndex.includes(control.rowIndex) && tableStore.dangerousCells.length > 0\n }\"\n >\n <ng-container *ngIf=\"!readonly && isInTable && !element?.options?.numberedColumn\">\n <button\n (mousedown)=\"onRowMousedown($event, control.rowIndex)\"\n type=\"button\"\n [ngStyle]=\"{ height: control.height + 1 + 'px' }\"\n class=\"the-table-row-controls-button the-table-controls-button\"\n ></button>\n </ng-container>\n <ng-container *ngIf=\"element?.options?.numberedColumn\">\n <div\n [contentEditable]=\"false\"\n contenteditable=\"false\"\n (mousedown)=\"onRowMousedown($event, control.rowIndex)\"\n class=\"the-table-numbered-controls-button\"\n [ngStyle]=\"{ height: control.height + 1 + 'px' }\"\n >\n <p class=\"row-number d-flex align-items-center\">{{ headerRow && i === 0 ? '' : headerRow ? i : i + 1 }}</p>\n </div>\n </ng-container>\n <the-table-insert-mark type=\"row\" [at]=\"control.rowIndex + 1\" [tableStore]=\"tableStore\"> </the-table-insert-mark>\n </div>\n </div>\n </div>\n </div>\n <div class=\"the-table-wrapper\" #tableWrapper [ngClass]=\"{ 'the-table-numbered': element?.options?.numberedColumn }\">\n <table class=\"the-table\" #theTable [ngClass]=\"{ 'the-table-with-controls': isInTable }\">\n <colgroup *ngIf=\"columns\">\n <col *ngFor=\"let col of columns\" [ngStyle]=\"{ width: col.width + 'px' }\" />\n </colgroup>\n <thead>\n <tr class=\"the-table-col-controls-wrapper\">\n <th\n #colControl\n class=\"the-table-col-controls\"\n [ngClass]=\"{\n 'the-sticky-cell': i === 0 && element | freezeColumn: tablePluginOptions,\n active: tableStore.selectedColumnsIndex.includes(i),\n dangerous: tableStore.dangerousColumnsIndex.includes(i) && tableStore.dangerousCells.length > 0\n }\"\n (mousedown)=\"onColMousedown($event, i)\"\n *ngFor=\"let control of colControls; let i = index; trackBy: trackByFnColControls\"\n >\n <the-table-insert-mark\n *ngIf=\"isInTable\"\n type=\"column\"\n [at]=\"i + 1\"\n [tableStore]=\"tableStore\"\n [parentElement]=\"colControl\"\n >\n </the-table-insert-mark>\n </th>\n </tr>\n </thead>\n <tbody #tbody>\n <slate-children [children]=\"children\" [context]=\"childrenContext\" [viewContext]=\"viewContext\"> </slate-children>\n </tbody>\n </table>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i1.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }, { kind: "directive", type: TheColumnResizeDirective, selector: "div[theColumnResize]" }, { kind: "component", type: TheInsertMarkComponent, selector: "the-table-insert-mark", inputs: ["type", "at", "tableStore", "parentElement"] }, { kind: "pipe", type: TableFreezeColumnPipe, name: "freezeColumn" }] });
13005
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheTableComponent, decorators: [{
12617
13006
  type: Component,
12618
13007
  args: [{ selector: 'the-table, [theTable]', providers: [
12619
13008
  TableStore,
@@ -12626,7 +13015,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
12626
13015
  provide: TheTableToken,
12627
13016
  useExisting: TheTableComponent
12628
13017
  }
12629
- ], template: "<div\n class=\"the-table-container\"\n theColumnResize\n [ngClass]=\"{\n 'the-table-with-controls': isInTable,\n 'the-numbered-column-container': element?.options?.numberedColumn,\n 'the-table-selection-hide': tableStore.isCellSelecting || tableStore.isRightClicking\n }\"\n>\n <div\n class=\"the-table-row-controls-wrapper\"\n [ngClass]=\"{\n 'the-table-focus': isInTable\n }\"\n >\n <div\n class=\"the-table-corner-controls\"\n [ngClass]=\"{\n visible: !readonly && isInTable,\n active: isSelectedAllCell,\n dangerous: tableStore.isSelectedTable && tableStore.dangerousCells.length > 0\n }\"\n >\n <div class=\"the-table-corner-button\" (mousedown)=\"onSelectTable($event)\"></div>\n <div class=\"the-table-corner-controls-insert-row-marker\">\n <the-table-insert-mark type=\"row\" [at]=\"0\" [tableStore]=\"tableStore\"></the-table-insert-mark>\n </div>\n <div class=\"the-table-corner-controls-insert-column-marker\">\n <the-table-insert-mark\n *ngIf=\"!element.options?.headerColumn\"\n type=\"column\"\n [at]=\"0\"\n [tableStore]=\"tableStore\"\n ></the-table-insert-mark>\n </div>\n </div>\n <div class=\"the-table-row-controls\">\n <div class=\"the-table-row-controls-inner\">\n <div\n class=\"the-table-row-controls-button-wrap\"\n *ngFor=\"let control of rowControls; let i = index; trackBy: trackByFnRowControls\"\n [ngClass]=\"{\n active: tableStore.selectedRowsIndex.includes(control.rowIndex),\n dangerous: tableStore.dangerousRowsIndex.includes(control.rowIndex) && tableStore.dangerousCells.length > 0\n }\"\n >\n <ng-container *ngIf=\"!readonly && isInTable && !element?.options?.numberedColumn\">\n <button\n (mousedown)=\"onRowMousedown($event, control.rowIndex)\"\n type=\"button\"\n [ngStyle]=\"{ height: control.height + 1 + 'px' }\"\n class=\"the-table-row-controls-button the-table-controls-button\"\n ></button>\n </ng-container>\n <ng-container *ngIf=\"element?.options?.numberedColumn\">\n <div\n [contentEditable]=\"false\"\n contenteditable=\"false\"\n (mousedown)=\"onRowMousedown($event, control.rowIndex)\"\n class=\"the-table-numbered-controls-button\"\n [ngStyle]=\"{ height: control.height + 1 + 'px' }\"\n >\n <p class=\"row-number d-flex align-items-center\">{{ i + 1 }}</p>\n </div>\n </ng-container>\n <the-table-insert-mark type=\"row\" [at]=\"control.rowIndex + 1\" [tableStore]=\"tableStore\"> </the-table-insert-mark>\n </div>\n </div>\n </div>\n </div>\n <div class=\"the-table-wrapper\" #tableWrapper [ngClass]=\"{ 'the-table-numbered': element?.options?.numberedColumn }\">\n <table class=\"the-table\" #theTable [ngClass]=\"{ 'the-table-with-controls': isInTable }\">\n <colgroup *ngIf=\"columns\">\n <col *ngFor=\"let col of columns\" [ngStyle]=\"{ width: col.width + 'px' }\" />\n </colgroup>\n <thead>\n <tr class=\"the-table-col-controls-wrapper\">\n <th\n #colControl\n class=\"the-table-col-controls\"\n [ngClass]=\"{\n 'the-sticky-cell': i === 0 && element | freezeColumn: tablePluginOptions,\n active: tableStore.selectedColumnsIndex.includes(i),\n dangerous: tableStore.dangerousColumnsIndex.includes(i) && tableStore.dangerousCells.length > 0\n }\"\n (mousedown)=\"onColMousedown($event, i)\"\n *ngFor=\"let control of colControls; let i = index; trackBy: trackByFnColControls\"\n >\n <the-table-insert-mark\n *ngIf=\"isInTable\"\n type=\"column\"\n [at]=\"i + 1\"\n [tableStore]=\"tableStore\"\n [parentElement]=\"colControl\"\n >\n </the-table-insert-mark>\n </th>\n </tr>\n </thead>\n <tbody #tbody>\n <slate-children [children]=\"children\" [context]=\"childrenContext\" [viewContext]=\"viewContext\"> </slate-children>\n </tbody>\n </table>\n </div>\n</div>\n" }]
13018
+ ], template: "<div\n class=\"the-table-container\"\n theColumnResize\n [ngClass]=\"{\n 'the-table-with-controls': isInTable,\n 'the-numbered-column-container': element?.options?.numberedColumn,\n 'the-table-selection-hide': tableStore.isCellSelecting || tableStore.isRightClicking\n }\"\n>\n <div\n class=\"the-table-row-controls-wrapper\"\n [ngClass]=\"{\n 'the-table-focus': isInTable\n }\"\n >\n <div\n class=\"the-table-corner-controls\"\n [ngClass]=\"{\n visible: !readonly && isInTable,\n active: isSelectedAllCell,\n dangerous: tableStore.isSelectedTable && tableStore.dangerousCells.length > 0\n }\"\n >\n <div class=\"the-table-corner-button\" (mousedown)=\"onSelectTable($event)\"></div>\n <div class=\"the-table-corner-controls-insert-row-marker\">\n <the-table-insert-mark type=\"row\" [at]=\"0\" [tableStore]=\"tableStore\"></the-table-insert-mark>\n </div>\n <div class=\"the-table-corner-controls-insert-column-marker\">\n <the-table-insert-mark\n *ngIf=\"!element.options?.headerColumn\"\n type=\"column\"\n [at]=\"0\"\n [tableStore]=\"tableStore\"\n ></the-table-insert-mark>\n </div>\n </div>\n <div class=\"the-table-row-controls\">\n <div class=\"the-table-row-controls-inner\">\n <div\n class=\"the-table-row-controls-button-wrap\"\n *ngFor=\"let control of rowControls; let i = index; trackBy: trackByFnRowControls\"\n [ngClass]=\"{\n active: tableStore.selectedRowsIndex.includes(control.rowIndex),\n dangerous: tableStore.dangerousRowsIndex.includes(control.rowIndex) && tableStore.dangerousCells.length > 0\n }\"\n >\n <ng-container *ngIf=\"!readonly && isInTable && !element?.options?.numberedColumn\">\n <button\n (mousedown)=\"onRowMousedown($event, control.rowIndex)\"\n type=\"button\"\n [ngStyle]=\"{ height: control.height + 1 + 'px' }\"\n class=\"the-table-row-controls-button the-table-controls-button\"\n ></button>\n </ng-container>\n <ng-container *ngIf=\"element?.options?.numberedColumn\">\n <div\n [contentEditable]=\"false\"\n contenteditable=\"false\"\n (mousedown)=\"onRowMousedown($event, control.rowIndex)\"\n class=\"the-table-numbered-controls-button\"\n [ngStyle]=\"{ height: control.height + 1 + 'px' }\"\n >\n <p class=\"row-number d-flex align-items-center\">{{ headerRow && i === 0 ? '' : headerRow ? i : i + 1 }}</p>\n </div>\n </ng-container>\n <the-table-insert-mark type=\"row\" [at]=\"control.rowIndex + 1\" [tableStore]=\"tableStore\"> </the-table-insert-mark>\n </div>\n </div>\n </div>\n </div>\n <div class=\"the-table-wrapper\" #tableWrapper [ngClass]=\"{ 'the-table-numbered': element?.options?.numberedColumn }\">\n <table class=\"the-table\" #theTable [ngClass]=\"{ 'the-table-with-controls': isInTable }\">\n <colgroup *ngIf=\"columns\">\n <col *ngFor=\"let col of columns\" [ngStyle]=\"{ width: col.width + 'px' }\" />\n </colgroup>\n <thead>\n <tr class=\"the-table-col-controls-wrapper\">\n <th\n #colControl\n class=\"the-table-col-controls\"\n [ngClass]=\"{\n 'the-sticky-cell': i === 0 && element | freezeColumn: tablePluginOptions,\n active: tableStore.selectedColumnsIndex.includes(i),\n dangerous: tableStore.dangerousColumnsIndex.includes(i) && tableStore.dangerousCells.length > 0\n }\"\n (mousedown)=\"onColMousedown($event, i)\"\n *ngFor=\"let control of colControls; let i = index; trackBy: trackByFnColControls\"\n >\n <the-table-insert-mark\n *ngIf=\"isInTable\"\n type=\"column\"\n [at]=\"i + 1\"\n [tableStore]=\"tableStore\"\n [parentElement]=\"colControl\"\n >\n </the-table-insert-mark>\n </th>\n </tr>\n </thead>\n <tbody #tbody>\n <slate-children [children]=\"children\" [context]=\"childrenContext\" [viewContext]=\"viewContext\"> </slate-children>\n </tbody>\n </table>\n </div>\n</div>\n" }]
12630
13019
  }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: TableCellEventDispatcher }, { type: ColumnResizeNotifierSource }, { type: TableStore }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }, { type: TableService }, { type: TheTableContextMenuService }, { type: TableFreezeColumnPipe }]; }, propDecorators: { tableWrapper: [{
12631
13020
  type: ViewChild,
12632
13021
  args: ['tableWrapper', { read: ElementRef, static: true }]
@@ -12715,9 +13104,9 @@ class TheTableRowComponent extends TheBaseElementComponent {
12715
13104
  }
12716
13105
  }
12717
13106
  }
12718
- TheTableRowComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheTableRowComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
12719
- TheTableRowComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: TheTableRowComponent, selector: "tr[theTableRow]", host: { properties: { "style.backgroundColor": "this.backgroundColor", "style.height": "this.height" } }, usesInheritance: true, ngImport: i0, template: '<slate-children [children]="children" [context]="childrenContext" [viewContext]="viewContext"></slate-children>', isInline: true, dependencies: [{ kind: "component", type: i1.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }] });
12720
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheTableRowComponent, decorators: [{
13107
+ TheTableRowComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheTableRowComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
13108
+ TheTableRowComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: TheTableRowComponent, selector: "tr[theTableRow]", host: { properties: { "style.backgroundColor": "this.backgroundColor", "style.height": "this.height" } }, usesInheritance: true, ngImport: i0, template: '<slate-children [children]="children" [context]="childrenContext" [viewContext]="viewContext"></slate-children>', isInline: true, dependencies: [{ kind: "component", type: i1.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }] });
13109
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheTableRowComponent, decorators: [{
12721
13110
  type: Component,
12722
13111
  args: [{
12723
13112
  selector: 'tr[theTableRow]',
@@ -12876,9 +13265,9 @@ class ColumnResizingStore {
12876
13265
  this.resizeRows.pop();
12877
13266
  }
12878
13267
  }
12879
- ColumnResizingStore.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ColumnResizingStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
12880
- ColumnResizingStore.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ColumnResizingStore });
12881
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ColumnResizingStore, decorators: [{
13268
+ ColumnResizingStore.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ColumnResizingStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
13269
+ ColumnResizingStore.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ColumnResizingStore });
13270
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ColumnResizingStore, decorators: [{
12882
13271
  type: Injectable
12883
13272
  }], ctorParameters: function () { return []; } });
12884
13273
 
@@ -13033,9 +13422,9 @@ class TheColumnResizeOverlayHandleComponent {
13033
13422
  this.destroyed.complete();
13034
13423
  }
13035
13424
  }
13036
- TheColumnResizeOverlayHandleComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheColumnResizeOverlayHandleComponent, 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 });
13037
- TheColumnResizeOverlayHandleComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: TheColumnResizeOverlayHandleComponent, selector: "ng-component", host: { classAttribute: "the-table-resize-overlay-thumb" }, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
13038
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheColumnResizeOverlayHandleComponent, decorators: [{
13425
+ TheColumnResizeOverlayHandleComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheColumnResizeOverlayHandleComponent, 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 });
13426
+ TheColumnResizeOverlayHandleComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: TheColumnResizeOverlayHandleComponent, selector: "ng-component", host: { classAttribute: "the-table-resize-overlay-thumb" }, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
13427
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheColumnResizeOverlayHandleComponent, decorators: [{
13039
13428
  type: Component,
13040
13429
  args: [{
13041
13430
  host: { class: 'the-table-resize-overlay-thumb' },
@@ -13098,7 +13487,7 @@ const POSITION_MAP = {
13098
13487
  }
13099
13488
  };
13100
13489
  class TheTdComponent extends TheBaseElementComponent {
13101
- constructor(elementRef, cdr, renderer, viewContainerRef, ngZone, injector, overlay, resizingStore, scrollDispatcher) {
13490
+ constructor(elementRef, cdr, renderer, viewContainerRef, ngZone, injector, overlay, resizingStore, scrollDispatcher, freezeColumnPipe) {
13102
13491
  super(elementRef, cdr);
13103
13492
  this.elementRef = elementRef;
13104
13493
  this.cdr = cdr;
@@ -13109,6 +13498,7 @@ class TheTdComponent extends TheBaseElementComponent {
13109
13498
  this.overlay = overlay;
13110
13499
  this.resizingStore = resizingStore;
13111
13500
  this.scrollDispatcher = scrollDispatcher;
13501
+ this.freezeColumnPipe = freezeColumnPipe;
13112
13502
  this.destroy$ = new Subject();
13113
13503
  this.tableOptions = new TableOptions();
13114
13504
  this.cellInnerMinHeight = null;
@@ -13243,20 +13633,20 @@ class TheTdComponent extends TheBaseElementComponent {
13243
13633
  });
13244
13634
  }
13245
13635
  setColumnClass() {
13246
- var _a, _b;
13636
+ var _a;
13247
13637
  const colIndex = this.tablePosition.getColumnIndex();
13248
13638
  const table = this.tablePosition.table;
13249
13639
  const tablePluginOptions = getPluginOptions(this.editor, PluginKeys.table);
13250
13640
  // 标题列背景色
13251
- if (colIndex === 0 && ((_a = table.options) === null || _a === void 0 ? void 0 : _a.headerColumn)) {
13252
- this.renderer.addClass(this.elementRef.nativeElement, HEADER_CELL_CLASS);
13253
- }
13254
- else {
13255
- this.renderer.removeClass(this.elementRef.nativeElement, HEADER_CELL_CLASS);
13256
- }
13257
- if (tablePluginOptions.freezeColumnHeader) {
13641
+ if (colIndex === 0) {
13642
+ if ((_a = table.options) === null || _a === void 0 ? void 0 : _a.headerColumn) {
13643
+ this.renderer.addClass(this.elementRef.nativeElement, HEADER_CELL_CLASS);
13644
+ }
13645
+ else {
13646
+ this.renderer.removeClass(this.elementRef.nativeElement, HEADER_CELL_CLASS);
13647
+ }
13258
13648
  // 标题列设置滚动时固定列
13259
- if (colIndex === 0 && ((_b = table.options) === null || _b === void 0 ? void 0 : _b.headerColumn)) {
13649
+ if (this.freezeColumnPipe.transform(table, tablePluginOptions)) {
13260
13650
  this.renderer.addClass(this.elementRef.nativeElement, STICKY_CELL_CLASS);
13261
13651
  }
13262
13652
  else {
@@ -13351,16 +13741,16 @@ class TheTdComponent extends TheBaseElementComponent {
13351
13741
  fromEvent(element, 'mousedown')
13352
13742
  .pipe(takeUntil(this.destroy$), filter((e) => e.button !== 2), map$1(event => event.target.closest(SLA_TABLE_CELL_SELECTOR)), filter(cell => !!cell))
13353
13743
  .subscribe((cell) => {
13744
+ // 单选
13745
+ if (this.tableStore.isModSelecting) {
13746
+ this.tableStore.selectCell(cell, this.editor);
13747
+ }
13354
13748
  this.tableStore.selectCellStart(cell, this.editor);
13355
13749
  if (this.overlayRef) {
13356
13750
  this.overlayRef.detach();
13357
13751
  }
13358
13752
  // 拖选
13359
13753
  this.listenCellMouseEvents();
13360
- // 单选
13361
- if (this.tableStore.isModSelecting) {
13362
- this.tableStore.selectCell(cell, this.editor);
13363
- }
13364
13754
  });
13365
13755
  });
13366
13756
  }
@@ -13379,7 +13769,7 @@ class TheTdComponent extends TheBaseElementComponent {
13379
13769
  .pipe(take(1))
13380
13770
  .subscribe(() => {
13381
13771
  this.tableStore.selectCellEnd(this.editor);
13382
- if (this.tableStore.isCellSelecting) {
13772
+ if (this.tableStore.isCellSelecting || this.tableStore.isModSelecting) {
13383
13773
  this.ngZone.run(() => {
13384
13774
  this.tableComponent.tableService.afterSelectedCells(this.tableStore.focusCellElement, this.tableComponent.element);
13385
13775
  });
@@ -13755,12 +14145,12 @@ class TheTdComponent extends TheBaseElementComponent {
13755
14145
  this.destroy$.complete();
13756
14146
  }
13757
14147
  }
13758
- TheTdComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheTdComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i0.Renderer2 }, { token: i0.ViewContainerRef }, { token: i0.NgZone }, { token: i0.Injector }, { token: i2$1.Overlay }, { token: ColumnResizingStore }, { token: i2$1.ScrollDispatcher }], target: i0.ɵɵFactoryTarget.Component });
13759
- TheTdComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: TheTdComponent, selector: "td[theTd]", host: { properties: { "style.backgroundColor": "this.backgroundColor", "attr.colspan": "this.colspan", "attr.rowspan": "this.rowspan", "style.display": "this.display" } }, providers: [ColumnResizingStore], viewQueries: [{ propertyName: "cellInner", first: true, predicate: ["cellInner"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<div #cellInner>\n <slate-children [children]=\"children\" [context]=\"childrenContext\" [viewContext]=\"viewContext\"></slate-children>\n</div>\n", dependencies: [{ kind: "component", type: i1.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }] });
13760
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheTdComponent, decorators: [{
14148
+ TheTdComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheTdComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i0.Renderer2 }, { token: i0.ViewContainerRef }, { token: i0.NgZone }, { token: i0.Injector }, { token: i2$1.Overlay }, { token: ColumnResizingStore }, { token: i2$1.ScrollDispatcher }, { token: TableFreezeColumnPipe }], target: i0.ɵɵFactoryTarget.Component });
14149
+ TheTdComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: TheTdComponent, selector: "td[theTd]", host: { properties: { "style.backgroundColor": "this.backgroundColor", "attr.colspan": "this.colspan", "attr.rowspan": "this.rowspan", "style.display": "this.display" } }, providers: [ColumnResizingStore], viewQueries: [{ propertyName: "cellInner", first: true, predicate: ["cellInner"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<div #cellInner>\n <slate-children [children]=\"children\" [context]=\"childrenContext\" [viewContext]=\"viewContext\"></slate-children>\n</div>\n", dependencies: [{ kind: "component", type: i1.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }] });
14150
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheTdComponent, decorators: [{
13761
14151
  type: Component,
13762
14152
  args: [{ selector: 'td[theTd]', providers: [ColumnResizingStore], template: "<div #cellInner>\n <slate-children [children]=\"children\" [context]=\"childrenContext\" [viewContext]=\"viewContext\"></slate-children>\n</div>\n" }]
13763
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i0.Renderer2 }, { type: i0.ViewContainerRef }, { type: i0.NgZone }, { type: i0.Injector }, { type: i2$1.Overlay }, { type: ColumnResizingStore }, { type: i2$1.ScrollDispatcher }]; }, propDecorators: { backgroundColor: [{
14153
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i0.Renderer2 }, { type: i0.ViewContainerRef }, { type: i0.NgZone }, { type: i0.Injector }, { type: i2$1.Overlay }, { type: ColumnResizingStore }, { type: i2$1.ScrollDispatcher }, { type: TableFreezeColumnPipe }]; }, propDecorators: { backgroundColor: [{
13764
14154
  type: HostBinding,
13765
14155
  args: ['style.backgroundColor']
13766
14156
  }], colspan: [{
@@ -13852,8 +14242,8 @@ class TheTableToolbarItemComponent extends TheBaseToolbarItem {
13852
14242
  return this.tableSelectRef;
13853
14243
  }
13854
14244
  }
13855
- TheTableToolbarItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheTableToolbarItemComponent, deps: [{ token: i1$1.ThyPopover }, { token: i2$1.Overlay }], target: i0.ɵɵFactoryTarget.Component });
13856
- TheTableToolbarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: TheTableToolbarItemComponent, selector: "the-table-toolbar-item", host: { classAttribute: "the-toolbar-dropdown-container" }, usesInheritance: true, ngImport: i0, template: `
14245
+ TheTableToolbarItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheTableToolbarItemComponent, deps: [{ token: i1$1.ThyPopover }, { token: i2$1.Overlay }], target: i0.ɵɵFactoryTarget.Component });
14246
+ TheTableToolbarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: TheTableToolbarItemComponent, selector: "the-table-toolbar-item", host: { classAttribute: "the-toolbar-dropdown-container" }, usesInheritance: true, ngImport: i0, template: `
13857
14247
  <a
13858
14248
  href="javascript:;"
13859
14249
  class="link-with-down"
@@ -13867,8 +14257,8 @@ TheTableToolbarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14
13867
14257
  >
13868
14258
  <thy-icon class="link-down-icon font-size-sm text-desc ml-1" thyIconName="caret-down"> </thy-icon>
13869
14259
  </a>
13870
- `, isInline: true, dependencies: [{ kind: "component", type: i3.ThyIconComponent, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { kind: "directive", type: i8.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { kind: "component", type: i5.ThyActionComponent, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }] });
13871
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheTableToolbarItemComponent, decorators: [{
14260
+ `, isInline: true, dependencies: [{ kind: "component", type: i4.ThyIconComponent, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { kind: "directive", type: i8.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { kind: "component", type: i5.ThyActionComponent, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }] });
14261
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheTableToolbarItemComponent, decorators: [{
13872
14262
  type: Component,
13873
14263
  args: [{
13874
14264
  selector: 'the-table-toolbar-item',
@@ -14328,7 +14718,7 @@ class TheTodoItemComponent extends TheBaseElementComponent {
14328
14718
  }
14329
14719
  get level() {
14330
14720
  var _a;
14331
- return (_a = this.element) === null || _a === void 0 ? void 0 : _a.indent;
14721
+ return ((_a = this.element) === null || _a === void 0 ? void 0 : _a.indent) || null;
14332
14722
  }
14333
14723
  get editableWithReadonly() {
14334
14724
  var _a;
@@ -14344,14 +14734,14 @@ class TheTodoItemComponent extends TheBaseElementComponent {
14344
14734
  setNode(this.editor, { checked }, this.element);
14345
14735
  }
14346
14736
  }
14347
- TheTodoItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheTodoItemComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: TheContextService }], target: i0.ɵɵFactoryTarget.Component });
14348
- TheTodoItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: TheTodoItemComponent, selector: "div[theTodoItem]", host: { properties: { "class.the-check-item": "this.checkItemClass", "class.the-todo-item-selectable": "this.checkItemSelectable", "attr.the-level": "this.level" } }, usesInheritance: true, ngImport: i0, template: `
14737
+ TheTodoItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheTodoItemComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: TheContextService }], target: i0.ɵɵFactoryTarget.Component });
14738
+ TheTodoItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: TheTodoItemComponent, selector: "div[theTodoItem]", host: { properties: { "class.the-check-item": "this.checkItemClass", "class.the-todo-item-selectable": "this.checkItemSelectable", "attr.the-level": "this.level" } }, usesInheritance: true, ngImport: i0, template: `
14349
14739
  <span contenteditable="false" class="todo-item-status">
14350
14740
  <input #checkbox type="checkbox" [checked]="element.checked" (click)="onCheck(checkbox.checked)" />
14351
14741
  </span>
14352
14742
  <span><slate-children [children]="children" [context]="childrenContext" [viewContext]="viewContext"></slate-children></span>
14353
14743
  `, isInline: true, dependencies: [{ kind: "component", type: i1.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }] });
14354
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheTodoItemComponent, decorators: [{
14744
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheTodoItemComponent, decorators: [{
14355
14745
  type: Component,
14356
14746
  args: [{
14357
14747
  selector: 'div[theTodoItem]',
@@ -14618,15 +15008,15 @@ class TheInlineToolbarComponent {
14618
15008
  this.destroy$.complete();
14619
15009
  }
14620
15010
  }
14621
- TheInlineToolbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheInlineToolbarComponent, deps: [{ token: i0.ElementRef }, { token: i2$1.ScrollDispatcher }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: TheContextService }], target: i0.ɵɵFactoryTarget.Component });
14622
- TheInlineToolbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: TheInlineToolbarComponent, selector: "the-inline-toolbar", inputs: { editor: "editor", toolbarItems: "toolbarItems" }, host: { properties: { "class.hide": "toolbarItems.length === 0" } }, viewQueries: [{ propertyName: "inlineToolbar", first: true, predicate: ["inlineToolbar"], descendants: true }], ngImport: i0, template: `<the-toolbar
15011
+ TheInlineToolbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheInlineToolbarComponent, deps: [{ token: i0.ElementRef }, { token: i2$1.ScrollDispatcher }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: TheContextService }], target: i0.ɵɵFactoryTarget.Component });
15012
+ TheInlineToolbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: TheInlineToolbarComponent, selector: "the-inline-toolbar", inputs: { editor: "editor", toolbarItems: "toolbarItems" }, host: { properties: { "class.hide": "toolbarItems.length === 0" } }, viewQueries: [{ propertyName: "inlineToolbar", first: true, predicate: ["inlineToolbar"], descendants: true }], ngImport: i0, template: `<the-toolbar
14623
15013
  #inlineToolbar
14624
15014
  class="the-inline-toolbar"
14625
15015
  [editor]="editor"
14626
15016
  [toolbarItems]="toolbarItems"
14627
15017
  [isMore]="false"
14628
15018
  ></the-toolbar> `, isInline: true, dependencies: [{ kind: "component", type: TheToolbarComponent, selector: "the-toolbar", inputs: ["editor", "toolbarItems", "align", "containerClass", "isMore", "afterTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
14629
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheInlineToolbarComponent, decorators: [{
15019
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheInlineToolbarComponent, decorators: [{
14630
15020
  type: Component,
14631
15021
  args: [{
14632
15022
  selector: 'the-inline-toolbar',
@@ -14745,9 +15135,9 @@ class TheQuickInsertComponent {
14745
15135
  }, 100);
14746
15136
  }
14747
15137
  }
14748
- TheQuickInsertComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheQuickInsertComponent, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
14749
- TheQuickInsertComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: TheQuickInsertComponent, selector: "[theQuickInsert]", inputs: { editor: "editor", isVisible: "isVisible" }, host: { listeners: { "mousedown": "handleMousedownNativeElement($event)" }, properties: { "class": "this.className" } }, viewQueries: [{ propertyName: "iconElement", first: true, predicate: ["iconElement"], descendants: true, read: ElementRef }], ngImport: i0, template: "<thy-icon\n #iconElement\n [thyIconName]=\"displayIconName\"\n class=\"quick-insert-icon text-desc font-size-xlg\"\n (mouseenter)=\"mouseEnter($event)\"\n (mouseleave)=\"mouseLeave($event)\"\n (mousedown)=\"handleClick($event)\"\n></thy-icon>\n", dependencies: [{ kind: "component", type: i3.ThyIconComponent, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }] });
14750
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheQuickInsertComponent, decorators: [{
15138
+ TheQuickInsertComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheQuickInsertComponent, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
15139
+ TheQuickInsertComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: TheQuickInsertComponent, selector: "[theQuickInsert]", inputs: { editor: "editor", isVisible: "isVisible" }, host: { listeners: { "mousedown": "handleMousedownNativeElement($event)" }, properties: { "class": "this.className" } }, viewQueries: [{ propertyName: "iconElement", first: true, predicate: ["iconElement"], descendants: true, read: ElementRef }], ngImport: i0, template: "<thy-icon\n #iconElement\n [thyIconName]=\"displayIconName\"\n class=\"quick-insert-icon text-desc font-size-xlg\"\n (mouseenter)=\"mouseEnter($event)\"\n (mouseleave)=\"mouseLeave($event)\"\n (mousedown)=\"handleClick($event)\"\n></thy-icon>\n", dependencies: [{ kind: "component", type: i4.ThyIconComponent, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }] });
15140
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheQuickInsertComponent, decorators: [{
14751
15141
  type: Component,
14752
15142
  args: [{ selector: '[theQuickInsert]', template: "<thy-icon\n #iconElement\n [thyIconName]=\"displayIconName\"\n class=\"quick-insert-icon text-desc font-size-xlg\"\n (mouseenter)=\"mouseEnter($event)\"\n (mouseleave)=\"mouseLeave($event)\"\n (mousedown)=\"handleClick($event)\"\n></thy-icon>\n" }]
14753
15143
  }], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { className: [{
@@ -15131,8 +15521,8 @@ class TheEditorComponent extends mixinUnsubscribe(MixinBase) {
15131
15521
  };
15132
15522
  }
15133
15523
  }
15134
- TheEditorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheEditorComponent, deps: [{ token: TheContextService }, { token: i0.ViewContainerRef }, { token: i0.ElementRef }, { token: i2$3.ScrollDispatcher }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }, { token: i3.ThyIconRegistry }], target: i0.ɵɵFactoryTarget.Component });
15135
- TheEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: TheEditorComponent, selector: "the-editor, theEditor", inputs: { theOptions: "theOptions", thePlugins: "thePlugins", theGlobalToolbar: "theGlobalToolbar", theDecorate: "theDecorate", theOnError: "theOnError" }, outputs: { theOnSave: "theOnSave", theOnDOMEvent: "theOnDOMEvent", theEditorCreated: "theEditorCreated", theUploadingStatus: "theUploadingStatus" }, host: { properties: { "class.the-editor-readonly": "theOptions?.readonly" }, classAttribute: "the-editor" }, providers: [
15524
+ TheEditorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheEditorComponent, deps: [{ token: TheContextService }, { token: i0.ViewContainerRef }, { token: i0.ElementRef }, { token: i2$2.ScrollDispatcher }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }, { token: i4.ThyIconRegistry }], target: i0.ɵɵFactoryTarget.Component });
15525
+ TheEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: TheEditorComponent, selector: "the-editor, theEditor", inputs: { theOptions: "theOptions", thePlugins: "thePlugins", theGlobalToolbar: "theGlobalToolbar", theDecorate: "theDecorate", theOnError: "theOnError" }, outputs: { theOnSave: "theOnSave", theOnDOMEvent: "theOnDOMEvent", theEditorCreated: "theEditorCreated", theUploadingStatus: "theUploadingStatus" }, host: { properties: { "class.the-editor-readonly": "theOptions?.readonly" }, classAttribute: "the-editor" }, providers: [
15136
15526
  TheContextService,
15137
15527
  TheColorSelectService,
15138
15528
  {
@@ -15140,8 +15530,8 @@ TheEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", ver
15140
15530
  useExisting: forwardRef(() => TheEditorComponent),
15141
15531
  multi: true
15142
15532
  }
15143
- ], viewQueries: [{ propertyName: "templateInstance", first: true, predicate: ["templateInstance"], descendants: true, static: true }, { propertyName: "theEditableContainer", first: true, predicate: ["theEditableContainer"], descendants: true, read: ElementRef, static: true }, { propertyName: "globalToolbarInstance", first: true, predicate: ["globalToolbar"], descendants: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<the-toolbar\n *ngIf=\"!theOptions?.readonly && !theGlobalToolbar\"\n [ngClass]=\"{\n 'the-toolbar-disabled': theOptions?.disabled\n }\"\n #globalToolbar\n [editor]=\"editor\"\n [toolbarItems]=\"toolbarEntity.global\"\n [containerClass]=\"globalToolbarClass\"\n [align]=\"theOptions?.toolbar?.align\"\n></the-toolbar>\n\n<div\n #theEditableContainer\n class=\"the-editable-container\"\n thyImageGroup\n [ngClass]=\"{\n 'the-editor-disabled': theOptions?.disabled,\n 'max-height': maxHeight\n }\"\n [ngStyle]=\"{ 'max-height': maxHeight }\"\n>\n <slate-editable\n class=\"the-editor-typo\"\n [editor]=\"editor\"\n [ngModel]=\"editorValue\"\n (ngModelChange)=\"valueChange($event)\"\n [decorate]=\"decorate\"\n [placeholder]=\"theOptions?.placeholder\"\n [placeholderDecorate]=\"theOptions?.placeholderDecorate ? theOptions?.placeholderDecorate : null\"\n [renderElement]=\"renderElement\"\n [renderText]=\"renderText\"\n [renderLeaf]=\"renderLeaf\"\n [readonly]=\"theOptions?.readonly || theOptions?.disabled\"\n [keydown]=\"onKeyDown\"\n [click]=\"onClick\"\n [paste]=\"onSlaPaste\"\n [beforeInput]=\"onSlaBeforeInput\"\n [blur]=\"onSlaBlur\"\n [focus]=\"onSlaFocus\"\n [copy]=\"onSlaCopy\"\n [cut]=\"onSlaCut\"\n [isStrictDecorate]=\"false\"\n [compositionStart]=\"onSlaCompositionStart\"\n [compositionEnd]=\"onSlaCompositionEnd\"\n [dragStart]=\"onSlaDragStart\"\n [dragOver]=\"onSlaDragOver\"\n [drop]=\"onDrop\"\n (mousedown)=\"mousedown($event)\"\n ></slate-editable>\n <the-inline-toolbar\n *ngIf=\"!theOptions?.readonly && theOptions?.inlineToolbarVisible\"\n [editor]=\"editor\"\n [toolbarItems]=\"toolbarEntity.inline\"\n ></the-inline-toolbar>\n <div *ngIf=\"!theOptions?.readonly\" theQuickInsert [editor]=\"editor\" [isVisible]=\"visibleQuickInsertPlus\"></div>\n <the-template #templateInstance></the-template>\n</div>\n", dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i1.SlateEditableComponent, selector: "slate-editable", inputs: ["editor", "renderElement", "renderLeaf", "renderText", "decorate", "placeholderDecorate", "isStrictDecorate", "trackBy", "readonly", "placeholder", "beforeInput", "blur", "click", "compositionEnd", "compositionStart", "copy", "cut", "dragOver", "dragStart", "dragEnd", "drop", "focus", "keydown", "paste", "spellCheck", "autoCorrect", "autoCapitalize"] }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4.ThyImageGroupComponent, selector: "thy-image-group, [thyImageGroup]" }, { kind: "component", type: TheToolbarComponent, selector: "the-toolbar", inputs: ["editor", "toolbarItems", "align", "containerClass", "isMore", "afterTemplate"] }, { kind: "component", type: TheInlineToolbarComponent, selector: "the-inline-toolbar", inputs: ["editor", "toolbarItems"] }, { kind: "component", type: TheQuickInsertComponent, selector: "[theQuickInsert]", inputs: ["editor", "isVisible"] }, { kind: "component", type: TheTemplateComponent, selector: "the-template,[theTemplate]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
15144
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheEditorComponent, decorators: [{
15533
+ ], viewQueries: [{ propertyName: "templateInstance", first: true, predicate: ["templateInstance"], descendants: true, static: true }, { propertyName: "theEditableContainer", first: true, predicate: ["theEditableContainer"], descendants: true, read: ElementRef, static: true }, { propertyName: "globalToolbarInstance", first: true, predicate: ["globalToolbar"], descendants: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<the-toolbar\n *ngIf=\"!theOptions?.readonly && !theGlobalToolbar\"\n [ngClass]=\"{\n 'the-toolbar-disabled': theOptions?.disabled\n }\"\n #globalToolbar\n [editor]=\"editor\"\n [toolbarItems]=\"toolbarEntity.global\"\n [containerClass]=\"globalToolbarClass\"\n [align]=\"theOptions?.toolbar?.align\"\n></the-toolbar>\n\n<div\n #theEditableContainer\n class=\"the-editable-container\"\n thyImageGroup\n [ngClass]=\"{\n 'the-editor-disabled': theOptions?.disabled,\n 'max-height': maxHeight\n }\"\n [ngStyle]=\"{ 'max-height': maxHeight }\"\n>\n <slate-editable\n class=\"the-editor-typo\"\n [editor]=\"editor\"\n [ngModel]=\"editorValue\"\n (ngModelChange)=\"valueChange($event)\"\n [decorate]=\"decorate\"\n [placeholder]=\"theOptions?.placeholder\"\n [placeholderDecorate]=\"theOptions?.placeholderDecorate ? theOptions?.placeholderDecorate : null\"\n [renderElement]=\"renderElement\"\n [renderText]=\"renderText\"\n [renderLeaf]=\"renderLeaf\"\n [readonly]=\"theOptions?.readonly || theOptions?.disabled\"\n [keydown]=\"onKeyDown\"\n [click]=\"onClick\"\n [paste]=\"onSlaPaste\"\n [beforeInput]=\"onSlaBeforeInput\"\n [blur]=\"onSlaBlur\"\n [focus]=\"onSlaFocus\"\n [copy]=\"onSlaCopy\"\n [cut]=\"onSlaCut\"\n [isStrictDecorate]=\"false\"\n [compositionStart]=\"onSlaCompositionStart\"\n [compositionEnd]=\"onSlaCompositionEnd\"\n [dragStart]=\"onSlaDragStart\"\n [dragOver]=\"onSlaDragOver\"\n [drop]=\"onDrop\"\n (mousedown)=\"mousedown($event)\"\n ></slate-editable>\n <the-inline-toolbar\n *ngIf=\"!theOptions?.readonly && theOptions?.inlineToolbarVisible\"\n [editor]=\"editor\"\n [toolbarItems]=\"toolbarEntity.inline\"\n ></the-inline-toolbar>\n <div *ngIf=\"!theOptions?.readonly\" theQuickInsert [editor]=\"editor\" [isVisible]=\"visibleQuickInsertPlus\"></div>\n <the-template #templateInstance></the-template>\n</div>\n", dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i1.SlateEditableComponent, selector: "slate-editable", inputs: ["editor", "renderElement", "renderLeaf", "renderText", "decorate", "placeholderDecorate", "isStrictDecorate", "trackBy", "readonly", "placeholder", "beforeInput", "blur", "click", "compositionEnd", "compositionStart", "copy", "cut", "dragOver", "dragStart", "dragEnd", "drop", "focus", "keydown", "paste", "spellCheck", "autoCorrect", "autoCapitalize"] }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4$1.ThyImageGroupComponent, selector: "thy-image-group, [thyImageGroup]" }, { kind: "component", type: TheToolbarComponent, selector: "the-toolbar", inputs: ["editor", "toolbarItems", "align", "containerClass", "isMore", "afterTemplate"] }, { kind: "component", type: TheInlineToolbarComponent, selector: "the-inline-toolbar", inputs: ["editor", "toolbarItems"] }, { kind: "component", type: TheQuickInsertComponent, selector: "[theQuickInsert]", inputs: ["editor", "isVisible"] }, { kind: "component", type: TheTemplateComponent, selector: "the-template,[theTemplate]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
15534
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheEditorComponent, decorators: [{
15145
15535
  type: Component,
15146
15536
  args: [{ selector: 'the-editor, theEditor', providers: [
15147
15537
  TheContextService,
@@ -15155,7 +15545,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
15155
15545
  class: 'the-editor',
15156
15546
  '[class.the-editor-readonly]': 'theOptions?.readonly'
15157
15547
  }, changeDetection: ChangeDetectionStrategy.OnPush, template: "<the-toolbar\n *ngIf=\"!theOptions?.readonly && !theGlobalToolbar\"\n [ngClass]=\"{\n 'the-toolbar-disabled': theOptions?.disabled\n }\"\n #globalToolbar\n [editor]=\"editor\"\n [toolbarItems]=\"toolbarEntity.global\"\n [containerClass]=\"globalToolbarClass\"\n [align]=\"theOptions?.toolbar?.align\"\n></the-toolbar>\n\n<div\n #theEditableContainer\n class=\"the-editable-container\"\n thyImageGroup\n [ngClass]=\"{\n 'the-editor-disabled': theOptions?.disabled,\n 'max-height': maxHeight\n }\"\n [ngStyle]=\"{ 'max-height': maxHeight }\"\n>\n <slate-editable\n class=\"the-editor-typo\"\n [editor]=\"editor\"\n [ngModel]=\"editorValue\"\n (ngModelChange)=\"valueChange($event)\"\n [decorate]=\"decorate\"\n [placeholder]=\"theOptions?.placeholder\"\n [placeholderDecorate]=\"theOptions?.placeholderDecorate ? theOptions?.placeholderDecorate : null\"\n [renderElement]=\"renderElement\"\n [renderText]=\"renderText\"\n [renderLeaf]=\"renderLeaf\"\n [readonly]=\"theOptions?.readonly || theOptions?.disabled\"\n [keydown]=\"onKeyDown\"\n [click]=\"onClick\"\n [paste]=\"onSlaPaste\"\n [beforeInput]=\"onSlaBeforeInput\"\n [blur]=\"onSlaBlur\"\n [focus]=\"onSlaFocus\"\n [copy]=\"onSlaCopy\"\n [cut]=\"onSlaCut\"\n [isStrictDecorate]=\"false\"\n [compositionStart]=\"onSlaCompositionStart\"\n [compositionEnd]=\"onSlaCompositionEnd\"\n [dragStart]=\"onSlaDragStart\"\n [dragOver]=\"onSlaDragOver\"\n [drop]=\"onDrop\"\n (mousedown)=\"mousedown($event)\"\n ></slate-editable>\n <the-inline-toolbar\n *ngIf=\"!theOptions?.readonly && theOptions?.inlineToolbarVisible\"\n [editor]=\"editor\"\n [toolbarItems]=\"toolbarEntity.inline\"\n ></the-inline-toolbar>\n <div *ngIf=\"!theOptions?.readonly\" theQuickInsert [editor]=\"editor\" [isVisible]=\"visibleQuickInsertPlus\"></div>\n <the-template #templateInstance></the-template>\n</div>\n" }]
15158
- }], ctorParameters: function () { return [{ type: TheContextService }, { type: i0.ViewContainerRef }, { type: i0.ElementRef }, { type: i2$3.ScrollDispatcher }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }, { type: i3.ThyIconRegistry }]; }, propDecorators: { theOptions: [{
15548
+ }], ctorParameters: function () { return [{ type: TheContextService }, { type: i0.ViewContainerRef }, { type: i0.ElementRef }, { type: i2$2.ScrollDispatcher }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }, { type: i4.ThyIconRegistry }]; }, propDecorators: { theOptions: [{
15159
15549
  type: Input
15160
15550
  }], thePlugins: [{
15161
15551
  type: Input
@@ -15188,10 +15578,10 @@ const ENTRY_COMMON_COMPONENTS = [TheColumnResizeOverlayHandleComponent];
15188
15578
  const DIRECTIVES = [TheColumnResizeDirective];
15189
15579
  class TheColumnResizeCommonModule {
15190
15580
  }
15191
- TheColumnResizeCommonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheColumnResizeCommonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
15192
- TheColumnResizeCommonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.12", ngImport: i0, type: TheColumnResizeCommonModule, declarations: [TheColumnResizeOverlayHandleComponent], exports: [TheColumnResizeOverlayHandleComponent] });
15193
- TheColumnResizeCommonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheColumnResizeCommonModule });
15194
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheColumnResizeCommonModule, decorators: [{
15581
+ TheColumnResizeCommonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheColumnResizeCommonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
15582
+ TheColumnResizeCommonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.0", ngImport: i0, type: TheColumnResizeCommonModule, declarations: [TheColumnResizeOverlayHandleComponent], exports: [TheColumnResizeOverlayHandleComponent] });
15583
+ TheColumnResizeCommonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheColumnResizeCommonModule });
15584
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheColumnResizeCommonModule, decorators: [{
15195
15585
  type: NgModule,
15196
15586
  args: [{
15197
15587
  declarations: ENTRY_COMMON_COMPONENTS,
@@ -15200,10 +15590,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
15200
15590
  }] });
15201
15591
  class TheColumnSizeModule {
15202
15592
  }
15203
- TheColumnSizeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheColumnSizeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
15204
- TheColumnSizeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.12", ngImport: i0, type: TheColumnSizeModule, declarations: [TheColumnResizeDirective], imports: [OverlayModule, TheColumnResizeCommonModule], exports: [TheColumnResizeDirective] });
15205
- TheColumnSizeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheColumnSizeModule, imports: [OverlayModule, TheColumnResizeCommonModule] });
15206
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheColumnSizeModule, decorators: [{
15593
+ TheColumnSizeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheColumnSizeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
15594
+ TheColumnSizeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.0", ngImport: i0, type: TheColumnSizeModule, declarations: [TheColumnResizeDirective], imports: [OverlayModule, TheColumnResizeCommonModule], exports: [TheColumnResizeDirective] });
15595
+ TheColumnSizeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheColumnSizeModule, imports: [OverlayModule, TheColumnResizeCommonModule] });
15596
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheColumnSizeModule, decorators: [{
15207
15597
  type: NgModule,
15208
15598
  args: [{
15209
15599
  imports: [OverlayModule, TheColumnResizeCommonModule],
@@ -15212,124 +15602,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
15212
15602
  }]
15213
15603
  }] });
15214
15604
 
15215
- class TheToolbarGroupComponent {
15216
- constructor(elementRef, thyPopover, viewContainerRef) {
15217
- this.elementRef = elementRef;
15218
- this.thyPopover = thyPopover;
15219
- this.viewContainerRef = viewContainerRef;
15220
- this.className = 'the-toolbar-group';
15221
- this.active = false;
15222
- }
15223
- set item(i) {
15224
- this._item = i;
15225
- this.activeMenuItem = i;
15226
- }
15227
- get item() {
15228
- return this._item;
15229
- }
15230
- get isOpened() {
15231
- return this.groupPopoverRef && this.groupPopoverRef.getOverlayRef() && this.groupPopoverRef.getOverlayRef().hasAttached();
15232
- }
15233
- mousedownHandler(event) {
15234
- event.preventDefault();
15235
- this.toggleGroupMenus(event);
15236
- }
15237
- documentMouseupHandle(event) {
15238
- const isGroup = event.target.closest('.the-toolbar-group');
15239
- const isGroupContainer = event.target.closest('.the-toolbar-group-container');
15240
- if (!isGroupContainer && !isGroup && this.isOpened) {
15241
- this.closeGroup();
15242
- }
15243
- }
15244
- clickHandle(event) {
15245
- event.stopPropagation();
15246
- }
15247
- ngOnInit() { }
15248
- ngOnDestroy() {
15249
- this.closeGroup();
15250
- }
15251
- toggleGroupMenus(event) {
15252
- var _a;
15253
- if ((_a = this.editor) === null || _a === void 0 ? void 0 : _a.disabled) {
15254
- return;
15255
- }
15256
- if (this.isOpened) {
15257
- this.closeGroup();
15258
- }
15259
- else {
15260
- this.openGroup(event);
15261
- }
15262
- }
15263
- selectionChange(editor) {
15264
- const activeItem = this.menusActive(editor);
15265
- this.activeMenuItem = activeItem ? activeItem : null;
15266
- this.activeChange();
15267
- }
15268
- menusActive(editor) {
15269
- return this.menus.find(i => {
15270
- var _a;
15271
- if (((_a = this.editor) === null || _a === void 0 ? void 0 : _a.selection) && (i === null || i === void 0 ? void 0 : i.active)) {
15272
- return i === null || i === void 0 ? void 0 : i.active(editor);
15273
- }
15274
- });
15275
- }
15276
- activeChange() {
15277
- const activeItem = this.menusActive(this.editor);
15278
- if (this.isOpened && !activeItem) {
15279
- this.active = false;
15280
- return;
15281
- }
15282
- this.active = activeItem ? true : false;
15283
- }
15284
- openGroup(event) {
15285
- this.active = true;
15286
- this.groupPopoverRef = this.thyPopover.open(this.groupTemplate, {
15287
- panelClass: 'the-toolbar-group-container',
15288
- offset: 0,
15289
- minWidth: 0,
15290
- placement: 'bottomRight',
15291
- origin: event.currentTarget,
15292
- viewContainerRef: this.viewContainerRef,
15293
- hasBackdrop: false,
15294
- outsideClosable: true,
15295
- manualClosure: true
15296
- });
15297
- this.groupPopoverRef.afterClosed().subscribe(() => {
15298
- this.activeChange();
15299
- });
15300
- }
15301
- closeGroup() {
15302
- if (this.isOpened) {
15303
- this.groupPopoverRef.close();
15304
- }
15305
- }
15306
- }
15307
- TheToolbarGroupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheToolbarGroupComponent, deps: [{ token: i0.ElementRef }, { token: i1$1.ThyPopover }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component });
15308
- TheToolbarGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: TheToolbarGroupComponent, selector: "the-toolbar-group", inputs: { menus: "menus", item: "item" }, host: { listeners: { "mousedown": "mousedownHandler($event)", "document:mouseup": "documentMouseupHandle($event)", "click": "clickHandle($event)" }, properties: { "class": "this.className" } }, viewQueries: [{ propertyName: "groupTemplate", first: true, predicate: ["groupTemplate"], descendants: true, read: TemplateRef, static: true }], ngImport: i0, template: "<a\n href=\"javascript:;\"\n thyAction\n [thyActionIcon]=\"item.icon\"\n [thyActionActive]=\"active\"\n [thyTooltip]=\"item?.name\"\n thyTooltipPlacement=\"top\"\n></a>\n\n<ng-template #groupTemplate>\n <the-toolbar class=\"group\" [editor]=\"editor\" [toolbarItems]=\"menus\" [isMore]=\"false\"></the-toolbar>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i8.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { kind: "component", type: i5.ThyActionComponent, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }, { kind: "component", type: TheToolbarComponent, selector: "the-toolbar", inputs: ["editor", "toolbarItems", "align", "containerClass", "isMore", "afterTemplate"] }] });
15309
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheToolbarGroupComponent, decorators: [{
15310
- type: Component,
15311
- args: [{ selector: 'the-toolbar-group', template: "<a\n href=\"javascript:;\"\n thyAction\n [thyActionIcon]=\"item.icon\"\n [thyActionActive]=\"active\"\n [thyTooltip]=\"item?.name\"\n thyTooltipPlacement=\"top\"\n></a>\n\n<ng-template #groupTemplate>\n <the-toolbar class=\"group\" [editor]=\"editor\" [toolbarItems]=\"menus\" [isMore]=\"false\"></the-toolbar>\n</ng-template>\n" }]
15312
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1$1.ThyPopover }, { type: i0.ViewContainerRef }]; }, propDecorators: { className: [{
15313
- type: HostBinding,
15314
- args: ['class']
15315
- }], menus: [{
15316
- type: Input
15317
- }], item: [{
15318
- type: Input
15319
- }], groupTemplate: [{
15320
- type: ViewChild,
15321
- args: ['groupTemplate', { read: TemplateRef, static: true }]
15322
- }], mousedownHandler: [{
15323
- type: HostListener,
15324
- args: ['mousedown', ['$event']]
15325
- }], documentMouseupHandle: [{
15326
- type: HostListener,
15327
- args: ['document:mouseup', ['$event']]
15328
- }], clickHandle: [{
15329
- type: HostListener,
15330
- args: ['click', ['$event']]
15331
- }] } });
15332
-
15333
15605
  const TETHYS = [
15334
15606
  ThyIconModule,
15335
15607
  ThyAvatarModule,
@@ -15354,7 +15626,8 @@ const TETHYS = [
15354
15626
  ThyDropdownModule,
15355
15627
  ThyMenuModule,
15356
15628
  ThyEmptyModule,
15357
- ThyPopoverModule
15629
+ ThyPopoverModule,
15630
+ ThyInputNumberModule
15358
15631
  ];
15359
15632
  const COMPONENTS = [
15360
15633
  TheToolbarComponent,
@@ -15402,8 +15675,8 @@ const PLUGIN_COMPONENTS = [
15402
15675
  const PIPES = [ElementStylePipe, ElementClassPipe, TableFreezeColumnPipe];
15403
15676
  class TheEditorModule {
15404
15677
  }
15405
- TheEditorModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheEditorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
15406
- TheEditorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.12", ngImport: i0, type: TheEditorModule, declarations: [TheEditorComponent, ElementStylePipe, ElementClassPipe, TableFreezeColumnPipe, TheToolbarComponent,
15678
+ TheEditorModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheEditorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
15679
+ TheEditorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.0", ngImport: i0, type: TheEditorModule, declarations: [TheEditorComponent, ElementStylePipe, ElementClassPipe, TableFreezeColumnPipe, TheToolbarComponent,
15407
15680
  TheToolbarDropdownComponent,
15408
15681
  TheToolbarGroupComponent,
15409
15682
  TheToolbarItemComponent,
@@ -15463,7 +15736,8 @@ TheEditorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version
15463
15736
  ThyDropdownModule,
15464
15737
  ThyMenuModule,
15465
15738
  ThyEmptyModule,
15466
- ThyPopoverModule, CodemirrorModule, TheColumnSizeModule], exports: [TheEditorComponent,
15739
+ ThyPopoverModule,
15740
+ ThyInputNumberModule, CodemirrorModule, TheColumnSizeModule], exports: [TheEditorComponent,
15467
15741
  TheToolbarComponent,
15468
15742
  TheToolbarDropdownComponent,
15469
15743
  TheToolbarItemComponent,
@@ -15473,14 +15747,14 @@ TheEditorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version
15473
15747
  TheListboxGroupDirective,
15474
15748
  TheListboxDirective,
15475
15749
  ThePreventDefaultDirective] });
15476
- TheEditorModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheEditorModule, providers: [
15750
+ TheEditorModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheEditorModule, providers: [
15477
15751
  {
15478
15752
  provide: TheToolbarGroupToken,
15479
15753
  useValue: TheToolbarGroupComponent
15480
15754
  },
15481
15755
  THE_MODE_PROVIDER
15482
15756
  ], imports: [CommonModule, ScrollingModule, SlateModule, FormsModule, TETHYS, CodemirrorModule, TheColumnSizeModule] });
15483
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheEditorModule, decorators: [{
15757
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheEditorModule, decorators: [{
15484
15758
  type: NgModule,
15485
15759
  args: [{
15486
15760
  declarations: [TheEditorComponent, ...PIPES, ...COMPONENTS, ...PLUGIN_COMPONENTS],
@@ -15545,9 +15819,9 @@ class TheToolbarService {
15545
15819
  });
15546
15820
  }
15547
15821
  }
15548
- TheToolbarService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheToolbarService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
15549
- TheToolbarService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheToolbarService });
15550
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheToolbarService, decorators: [{
15822
+ TheToolbarService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheToolbarService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
15823
+ TheToolbarService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheToolbarService });
15824
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheToolbarService, decorators: [{
15551
15825
  type: Injectable
15552
15826
  }] });
15553
15827
 
@@ -15565,5 +15839,5 @@ const withTestPlugin = (plugins, initValue) => {
15565
15839
  * Generated bundle index. Do not edit.
15566
15840
  */
15567
15841
 
15568
- export { ALIGN_BLOCK_TYPES, A_TAG_REL_ATTR, AlignEditor, Alignment, BLOCK_DELETE_BACKWARD_TYPES, BlockquoteEditor, CLIPBOARD_FORMAT_KEY, CODEMIRROR_PADDING_TOP, CODE_MODES, COMPONENTS, CONTAINER_BLOCKS, CONTROL_KEY, CodeEditor, ColorEditor, DEFAULT_LANGUAGE, DEFAULT_SCROLL_CONTAINER, DISABLED_OPERATE_TYPES, DefaultElementOptions, DefaultGlobalToolbarDefinition, DefaultInlineToolbarDefinition, DefaultPluginMenu, DropdownMode, ELEMENT_UNIQUE_ID, ElementKinds, ErrorCodes, FontSizeTypes, FontSizes, HEADING_TYPES, HeadingEditor, 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, PLUGIN_COMPONENTS, PluginKeys, PluginMenuIcons, PluginMenuSvgs, QuickInsertEditor, STANDARD_HEADING_TYPES, TAB_SPACE, 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_UPLOAD_SERVICE_TOKEN, TableEditor, TheBaseElementComponent, TheBaseSuggestion, TheBaseToolbarDropdown, TheBaseToolbarItem, TheContextService, TheDataMode, TheDefaultElementComponent, TheEditor, TheEditorComponent, TheEditorModule, TheImageComponent, TheListboxDirective, TheListboxGroupDirective, TheListboxOptionDirective, TheMode, TheModeConfig, ThePluginMenu, ThePluginMenuComponent, ThePluginMenuItemType, ThePreventDefaultDirective, index$1 as TheQueries, TheToolbarComponent, TheToolbarDropdownComponent, TheToolbarGroupComponent, TheToolbarGroupToken, TheToolbarItemComponent, TheToolbarService, index as TheTransforms, TodoItemEditor, ToolbarActionTypes, ToolbarAlignment, ToolbarItemType, ToolbarMoreGroup, VOID_BLOCK_TYPES, VerticalAlignEditor, VerticalAlignment, ZERO_WIDTH_CHAR, autoFocus, autoScrollViewHandle, base64toBlob, buildPluginMenu, buildPluginMenuItemMap, coercePixelsFromCssValue, combinePlugins, copyNode, createEmptyParagraph, createMentionPlugin, createPluginFactory, createToolbar, createVerticalAlignPlugin, dataDeserialize, dataSerializing, deleteElementKey, extractFragment, filterTextFormat, flattenDeepPlugins, getColsTotalWidth, getEditorUUID, getElementClassByPrefix, getElementHeight, getElementWidth, getEndBlock, getPlugin, getPluginOptions, getPlugins, getRowsTotalHeight, getStartBlock, getToolbarClass, headingOptions, htmlToTheia, idCreator, inValidTypes, initializeDefaultMenuIcons, internalPlugins, isCleanEmptyParagraph, isDirectionKeydown, isPureEmptyParagraph, mergeArray, mergeDeepPlugins, mergeElementOptions, mergeOptions, nestedStructureByKey, plainToTheia, pluginsByKey, recursionNodes, refocus, setEditorUUID, setRefocusSelection, useElementStyle, withMention, withTestPlugin, withTheia };
15842
+ export { ALIGN_BLOCK_TYPES, A_TAG_REL_ATTR, AlignEditor, Alignment, BLOCK_DELETE_BACKWARD_TYPES, BackgroundColors, BlockquoteEditor, CLIPBOARD_FORMAT_KEY, CODEMIRROR_PADDING_TOP, CODE_MODES, COMPONENTS, CONTAINER_BLOCKS, CONTROL_KEY, CodeEditor, ColorEditor, Colors, ColumnResizeNotifierSource, DEFAULT_LANGUAGE, DEFAULT_SCROLL_CONTAINER, DISABLED_OPERATE_TYPES, DefaultElementOptions, DefaultGlobalToolbarDefinition, DefaultInlineToolbarDefinition, DefaultPluginMenu, DropdownMode, ELEMENT_UNIQUE_ID, 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, PLUGIN_COMPONENTS, PluginKeys, PluginMenuIcons, PluginMenuSvgs, Position, QuickInsertEditor, STANDARD_HEADING_TYPES, SpecialBackgroundColor, SpecialTextColor, TAB_SPACE, 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_UPLOAD_SERVICE_TOKEN, TableCellEventDispatcher, TableEditor, TableHeaderBackgroundColor, TheBaseElementComponent, TheBaseSuggestion, TheBaseToolbarDropdown, TheBaseToolbarItem, TheContextService, TheDataMode, TheDefaultElementComponent, TheEditor, TheEditorComponent, TheEditorModule, TheImageComponent, TheListboxDirective, TheListboxGroupDirective, TheListboxOptionDirective, TheMode, TheModeConfig, ThePluginMenu, ThePluginMenuComponent, ThePluginMenuItemType, ThePreventDefaultDirective, index$1 as TheQueries, TheToolbarComponent, TheToolbarDropdownComponent, TheToolbarGroupComponent, TheToolbarGroupToken, TheToolbarItemComponent, TheToolbarService, index as TheTransforms, TodoItemEditor, ToolbarActionTypes, ToolbarAlignment, ToolbarItemType, ToolbarMoreGroup, VOID_BLOCK_TYPES, VerticalAlignEditor, VerticalAlignment, ZERO_WIDTH_CHAR, autoFocus, autoScrollViewHandle, base64toBlob, buildPluginMenu, buildPluginMenuItemMap, coercePixelsFromCssValue, combinePlugins, copyNode, createEmptyParagraph, createMentionPlugin, createPluginFactory, createToolbar, createVerticalAlignPlugin, dataDeserialize, dataSerializing, deleteElementKey, extractFragment, filterTextFormat, flattenDeepPlugins, getColsTotalWidth, getEditorUUID, getElementClassByPrefix, getElementHeight, getElementWidth, getEndBlock, getPlugin, getPluginOptions, getPlugins, getRowsTotalHeight, getStartBlock, getToolbarClass, headingOptions, htmlToTheia, idCreator, inValidTypes, initializeDefaultMenuIcons, internalPlugins, isCleanEmptyParagraph, isDirectionKeydown, isPureEmptyParagraph, mergeArray, mergeDeepPlugins, mergeElementOptions, mergeOptions, nestedStructureByKey, plainToTheia, pluginsByKey, recursionNodes, refocus, setEditorUUID, setRefocusSelection, useElementStyle, withMention, withTestPlugin, withTheia };
15569
15843
  //# sourceMappingURL=worktile-theia.mjs.map