@worktile/theia 15.0.17 → 15.0.19

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 (157) hide show
  1. package/components/action/prevent-default.d.ts +1 -1
  2. package/components/color-select/color-select.component.d.ts +1 -1
  3. package/components/column-resize/column-resize.directive.d.ts +1 -1
  4. package/components/column-resize/overlay-handle.component.d.ts +1 -1
  5. package/components/contextmenu/contextmenu.component.d.ts +1 -1
  6. package/components/conversion-hint/conversion-hint.component.d.ts +1 -1
  7. package/components/element/element.component.d.ts +1 -1
  8. package/components/inline-toolbar/inline-toolbar.component.d.ts +1 -1
  9. package/components/listbox/listbox.d.ts +3 -3
  10. package/components/listbox/listbox.type.d.ts +1 -1
  11. package/components/plugin-menu/plugin-menu.component.d.ts +1 -1
  12. package/components/table-select/table-select.component.d.ts +1 -1
  13. package/components/template/template.component.d.ts +1 -1
  14. package/components/text/text.component.d.ts +1 -1
  15. package/components/toolbar/toolbar.component.d.ts +1 -1
  16. package/components/toolbar-dropdown/toolbar-dropdown.component.d.ts +1 -1
  17. package/components/toolbar-group/toolbar-group.component.d.ts +1 -1
  18. package/components/toolbar-item/toolbar-item.component.d.ts +1 -1
  19. package/constants/color-select.d.ts +1 -1
  20. package/core/toolbar-item/base-toolbar-item.d.ts +2 -2
  21. package/custom-types.d.ts +6 -6
  22. package/editor.component.d.ts +2 -4
  23. package/esm2020/components/action/prevent-default.mjs +3 -3
  24. package/esm2020/components/color-select/color-select.component.mjs +9 -9
  25. package/esm2020/components/column-resize/column-resize-notifier.mjs +3 -3
  26. package/esm2020/components/column-resize/column-resize.directive.mjs +3 -3
  27. package/esm2020/components/column-resize/column-resize.module.mjs +8 -8
  28. package/esm2020/components/column-resize/event-dispatcher.mjs +3 -3
  29. package/esm2020/components/column-resize/overlay-handle.component.mjs +3 -3
  30. package/esm2020/components/column-resize/resizing.store.mjs +3 -3
  31. package/esm2020/components/contextmenu/contextmenu.component.mjs +10 -10
  32. package/esm2020/components/conversion-hint/conversion-hint.component.mjs +3 -3
  33. package/esm2020/components/element/element.component.mjs +3 -3
  34. package/esm2020/components/inline-toolbar/inline-toolbar.component.mjs +3 -3
  35. package/esm2020/components/listbox/listbox.mjs +16 -16
  36. package/esm2020/components/plugin-menu/plugin-menu.component.mjs +3 -3
  37. package/esm2020/components/table-select/table-select.component.mjs +3 -3
  38. package/esm2020/components/template/template.component.mjs +3 -3
  39. package/esm2020/components/text/text.component.mjs +3 -3
  40. package/esm2020/components/toolbar/toolbar.component.mjs +7 -7
  41. package/esm2020/components/toolbar-dropdown/toolbar-dropdown.component.mjs +14 -14
  42. package/esm2020/components/toolbar-group/toolbar-group.component.mjs +11 -11
  43. package/esm2020/components/toolbar-item/toolbar-item.component.mjs +7 -7
  44. package/esm2020/core/toolbar-item/base-toolbar-item.mjs +6 -6
  45. package/esm2020/editor.component.mjs +26 -26
  46. package/esm2020/editor.module.mjs +4 -4
  47. package/esm2020/interfaces/view-base.mjs +3 -3
  48. package/esm2020/pipes.mjs +6 -6
  49. package/esm2020/plugins/blockquote/blockquote.component.mjs +3 -3
  50. package/esm2020/plugins/code/code.component.mjs +10 -10
  51. package/esm2020/plugins/color/toolbar-item.component.mjs +7 -7
  52. package/esm2020/plugins/hr/hr.component.mjs +3 -3
  53. package/esm2020/plugins/image/image.component.mjs +13 -13
  54. package/esm2020/plugins/inline-code/inline-code.component.mjs +3 -3
  55. package/esm2020/plugins/link/edit/link-edit.component.mjs +9 -9
  56. package/esm2020/plugins/link/hover/link-hover.component.mjs +3 -3
  57. package/esm2020/plugins/link/link.component.mjs +13 -13
  58. package/esm2020/plugins/list/components/bulleted-list.component.mjs +7 -7
  59. package/esm2020/plugins/list/components/list-item.component.mjs +3 -3
  60. package/esm2020/plugins/list/components/numbered-list.component.mjs +9 -9
  61. package/esm2020/plugins/mention/suggestion.component.mjs +3 -3
  62. package/esm2020/plugins/quick-insert/components/quick-insert.component.mjs +8 -8
  63. package/esm2020/plugins/table/components/insert-mark/insert-mark.component.mjs +24 -13
  64. package/esm2020/plugins/table/components/row/row.component.mjs +6 -8
  65. package/esm2020/plugins/table/components/table.component.mjs +46 -135
  66. package/esm2020/plugins/table/components/td/td.component.mjs +22 -23
  67. package/esm2020/plugins/table/components/toolbar/table-options.component.mjs +8 -7
  68. package/esm2020/plugins/table/components/toolbar/table-toolbar.component.mjs +24 -19
  69. package/esm2020/plugins/table/table.editor.mjs +5 -6
  70. package/esm2020/plugins/table/table.pipe.mjs +6 -6
  71. package/esm2020/plugins/table/table.plugin.mjs +72 -28
  72. package/esm2020/plugins/table/table.service.mjs +7 -7
  73. package/esm2020/plugins/table/table.store.mjs +63 -179
  74. package/esm2020/plugins/table/toolbar-item.component.mjs +7 -7
  75. package/esm2020/plugins/table/transforms/clear-table-node.mjs +3 -3
  76. package/esm2020/plugins/table/transforms/insert-column.mjs +4 -3
  77. package/esm2020/plugins/table/transforms/insert-row.mjs +4 -3
  78. package/esm2020/plugins/table/transforms/remove-column.mjs +3 -3
  79. package/esm2020/plugins/table/transforms/remove-row.mjs +3 -5
  80. package/esm2020/plugins/table/transforms/remove-table.mjs +4 -4
  81. package/esm2020/plugins/table/utils/calculate-table.mjs +109 -0
  82. package/esm2020/plugins/table/utils/cell-position.mjs +36 -0
  83. package/esm2020/plugins/table/utils/create-table-position.mjs +10 -0
  84. package/esm2020/plugins/table/utils/get-grid-columns.mjs +7 -2
  85. package/esm2020/plugins/table/utils/get-min-max-cell-index.mjs +64 -0
  86. package/esm2020/plugins/table/utils/get-select-cell-node.mjs +3 -6
  87. package/esm2020/plugins/table/utils/is-legal-table.mjs +16 -0
  88. package/esm2020/plugins/table/utils/is-range-in-table.mjs +6 -6
  89. package/esm2020/plugins/table/utils/is-selection-in-table.mjs +3 -5
  90. package/esm2020/plugins/table/utils/merge-cell.mjs +17 -2
  91. package/esm2020/plugins/table/utils/split-cell.mjs +3 -6
  92. package/esm2020/plugins/table/utils/table-entry.mjs +21 -0
  93. package/esm2020/plugins/todo-item/todo-item.component.mjs +11 -11
  94. package/esm2020/plugins/vertical-align/toolbar-item.component.mjs +11 -11
  95. package/esm2020/services/color-select.service.mjs +7 -7
  96. package/esm2020/services/context.service.mjs +3 -3
  97. package/esm2020/services/table-contextmenu.service.mjs +21 -18
  98. package/esm2020/services/toolbar.service.mjs +3 -3
  99. package/esm2020/utils/lodash.mjs +3 -3
  100. package/fesm2015/worktile-theia.mjs +886 -790
  101. package/fesm2015/worktile-theia.mjs.map +1 -1
  102. package/fesm2020/worktile-theia.mjs +881 -786
  103. package/fesm2020/worktile-theia.mjs.map +1 -1
  104. package/interfaces/editor.d.ts +2 -2
  105. package/interfaces/element.d.ts +3 -3
  106. package/interfaces/plugins/no-infer.d.ts +1 -1
  107. package/interfaces/plugins/plugin-key.d.ts +1 -1
  108. package/interfaces/plugins/plugin-menu.d.ts +4 -4
  109. package/interfaces/plugins/plugins.d.ts +4 -4
  110. package/interfaces/plugins/with-override.d.ts +1 -1
  111. package/interfaces/toolbar.d.ts +4 -4
  112. package/interfaces/utility/nested-structure-by-key.d.ts +1 -1
  113. package/interfaces/utility/override-by-key.d.ts +1 -1
  114. package/interfaces/utility/types.d.ts +1 -1
  115. package/interfaces/view-base.d.ts +1 -1
  116. package/package.json +1 -1
  117. package/plugins/blockquote/blockquote.component.d.ts +1 -1
  118. package/plugins/code/code.component.d.ts +1 -1
  119. package/plugins/color/toolbar-item.component.d.ts +1 -1
  120. package/plugins/common/transforms.plugin.d.ts +1 -1
  121. package/plugins/heading/heading.plugin.d.ts +1 -1
  122. package/plugins/hr/hr.component.d.ts +1 -1
  123. package/plugins/image/image.component.d.ts +1 -1
  124. package/plugins/inline-code/inline-code.component.d.ts +1 -1
  125. package/plugins/link/edit/link-edit.component.d.ts +1 -1
  126. package/plugins/link/hover/link-hover.component.d.ts +1 -1
  127. package/plugins/link/link.component.d.ts +2 -2
  128. package/plugins/list/components/bulleted-list.component.d.ts +1 -1
  129. package/plugins/list/components/list-item.component.d.ts +1 -1
  130. package/plugins/list/components/numbered-list.component.d.ts +1 -1
  131. package/plugins/list/types.d.ts +1 -1
  132. package/plugins/mention/suggestion.component.d.ts +1 -1
  133. package/plugins/quick-insert/components/quick-insert.component.d.ts +1 -1
  134. package/plugins/table/components/insert-mark/insert-mark.component.d.ts +7 -4
  135. package/plugins/table/components/row/row.component.d.ts +1 -1
  136. package/plugins/table/components/table.component.d.ts +1 -14
  137. package/plugins/table/components/td/td.component.d.ts +1 -1
  138. package/plugins/table/components/toolbar/table-options.component.d.ts +2 -2
  139. package/plugins/table/components/toolbar/table-toolbar.component.d.ts +1 -1
  140. package/plugins/table/table.editor.d.ts +4 -1
  141. package/plugins/table/table.store.d.ts +2 -20
  142. package/plugins/table/toolbar-item.component.d.ts +1 -1
  143. package/plugins/table/utils/calculate-table.d.ts +3 -0
  144. package/plugins/table/utils/cell-position.d.ts +14 -0
  145. package/plugins/table/utils/create-table-position.d.ts +3 -0
  146. package/plugins/table/utils/get-grid-columns.d.ts +1 -1
  147. package/plugins/table/utils/get-min-max-cell-index.d.ts +4 -0
  148. package/plugins/table/utils/is-legal-table.d.ts +4 -0
  149. package/plugins/table/utils/is-range-in-table.d.ts +2 -2
  150. package/plugins/table/utils/merge-cell.d.ts +1 -0
  151. package/plugins/table/utils/table-entry.d.ts +5 -0
  152. package/plugins/todo-item/todo-item.component.d.ts +1 -1
  153. package/plugins/vertical-align/toolbar-item.component.d.ts +1 -1
  154. package/queries/find-node.d.ts +1 -1
  155. package/queries/get-range-before.d.ts +1 -1
  156. package/utils/lodash.d.ts +2 -2
  157. package/utils/match.d.ts +3 -3
@@ -2,13 +2,13 @@ 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, ElementRef, ChangeDetectorRef, Optional, SkipSelf, ContentChildren, forwardRef, EventEmitter, Output, ViewChildren, NgModule } from '@angular/core';
5
- import * as i3$1 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';
9
9
  import { Range, Element as Element$1, Editor, Node, Span, Path, Text, Point, Transforms, Operation, createEditor } from 'slate';
10
10
  import { __rest, __awaiter } from 'tslib';
11
- import { map, cloneDeep, assign, defaults, groupBy, uniq, debounce } from 'lodash';
11
+ import { map, cloneDeep, assign, defaults, groupBy, uniq, debounce, isEqual } from 'lodash';
12
12
  import { isObject, isArray, isString } from 'ngx-tethys/util';
13
13
  import { TheiaConverter } from '@atinc/selene';
14
14
  import { HistoryEditor, withHistory } from 'slate-history';
@@ -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 i7 from 'ngx-tethys/action';
22
22
  import { ThyActionModule } from 'ngx-tethys/action';
@@ -47,12 +47,12 @@ import marked from 'marked';
47
47
  import * as i1$3 from 'ngx-tethys/alert';
48
48
  import { ThyAlertModule } from 'ngx-tethys/alert';
49
49
  import { ThyUploadStatus } from 'ngx-tethys/upload';
50
- import * as i4 from 'ngx-tethys/image';
50
+ import * as i4$1 from 'ngx-tethys/image';
51
51
  import { ThyImageModule } from 'ngx-tethys/image';
52
52
  import * as i9$1 from 'ngx-tethys/progress';
53
53
  import { ThyProgressModule } from 'ngx-tethys/progress';
54
54
  import isUrl from 'is-url';
55
- import * as i3$2 from 'ngx-tethys/form';
55
+ import * as i3$1 from 'ngx-tethys/form';
56
56
  import { ThyFormModule } from 'ngx-tethys/form';
57
57
  import * as i5$1 from 'ngx-tethys/shared';
58
58
  import { ThySharedModule } from 'ngx-tethys/shared';
@@ -62,7 +62,6 @@ import * as i7$1 from 'ngx-tethys/input-number';
62
62
  import { ThyInputNumberModule } from 'ngx-tethys/input-number';
63
63
  import { coerceCssPixelValue } from '@angular/cdk/coercion';
64
64
  import { PortalInjector, ComponentPortal } from '@angular/cdk/portal';
65
- import * as i2$2 from '@angular/cdk/scrolling';
66
65
  import { ScrollingModule } from '@angular/cdk/scrolling';
67
66
  import { ThyAutocompleteModule } from 'ngx-tethys/autocomplete';
68
67
  import { ThyAvatarModule } from 'ngx-tethys/avatar';
@@ -100,9 +99,9 @@ class TheBaseElementComponent extends BaseElementComponent {
100
99
  this.nativeElement.classList.add(`slate-element-${this.element.type}`, blockClass);
101
100
  }
102
101
  }
103
- TheBaseElementComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheBaseElementComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
104
- TheBaseElementComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.2", type: TheBaseElementComponent, selector: "TheBaseElementComponent", usesInheritance: true, ngImport: i0, template: '', isInline: true });
105
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheBaseElementComponent, decorators: [{
102
+ TheBaseElementComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheBaseElementComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
103
+ TheBaseElementComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: TheBaseElementComponent, selector: "TheBaseElementComponent", usesInheritance: true, ngImport: i0, template: '', isInline: true });
104
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheBaseElementComponent, decorators: [{
106
105
  type: Component,
107
106
  args: [{
108
107
  selector: 'TheBaseElementComponent',
@@ -116,9 +115,9 @@ class TheDefaultElementComponent extends TheBaseElementComponent {
116
115
  return (_a = this.element) === null || _a === void 0 ? void 0 : _a.indent;
117
116
  }
118
117
  }
119
- TheDefaultElementComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheDefaultElementComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
120
- TheDefaultElementComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.2", 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: "15.2.2", ngImport: i0, type: TheDefaultElementComponent, decorators: [{
118
+ TheDefaultElementComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheDefaultElementComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
119
+ 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 });
120
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheDefaultElementComponent, decorators: [{
122
121
  type: Component,
123
122
  args: [{
124
123
  selector: '[theDefaultElement]',
@@ -821,9 +820,9 @@ class ElementStylePipe {
821
820
  return style;
822
821
  }
823
822
  }
824
- ElementStylePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: ElementStylePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
825
- ElementStylePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.2", ngImport: i0, type: ElementStylePipe, name: "elementStyle" });
826
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: ElementStylePipe, decorators: [{
823
+ ElementStylePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ElementStylePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
824
+ ElementStylePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.0", ngImport: i0, type: ElementStylePipe, name: "elementStyle" });
825
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ElementStylePipe, decorators: [{
827
826
  type: Pipe,
828
827
  args: [{
829
828
  name: 'elementStyle'
@@ -839,9 +838,9 @@ class ElementClassPipe {
839
838
  return classStr;
840
839
  }
841
840
  }
842
- ElementClassPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: ElementClassPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
843
- ElementClassPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.2", ngImport: i0, type: ElementClassPipe, name: "elementClass" });
844
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: ElementClassPipe, decorators: [{
841
+ ElementClassPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ElementClassPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
842
+ ElementClassPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.0", ngImport: i0, type: ElementClassPipe, name: "elementClass" });
843
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ElementClassPipe, decorators: [{
845
844
  type: Pipe,
846
845
  args: [{
847
846
  name: 'elementClass'
@@ -876,9 +875,9 @@ class TheTemplateComponent {
876
875
  };
877
876
  }
878
877
  }
879
- TheTemplateComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheTemplateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
880
- TheTemplateComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.2", 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 });
881
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheTemplateComponent, decorators: [{
878
+ TheTemplateComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheTemplateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
879
+ 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 });
880
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheTemplateComponent, decorators: [{
882
881
  type: Component,
883
882
  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" }]
884
883
  }], propDecorators: { paragraphTemplate: [{
@@ -944,9 +943,9 @@ class TheTextComponent extends BaseTextComponent {
944
943
  this.applyTextMark();
945
944
  }
946
945
  }
947
- TheTextComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheTextComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
948
- TheTextComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.2", 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"] }] });
949
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheTextComponent, decorators: [{
946
+ 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 });
947
+ 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"] }] });
948
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheTextComponent, decorators: [{
950
949
  type: Component,
951
950
  args: [{
952
951
  selector: 'span[theText]',
@@ -2535,68 +2534,68 @@ const isEmptyContentByFilter = (editor, rules) => {
2535
2534
 
2536
2535
  var index$1 = /*#__PURE__*/Object.freeze({
2537
2536
  __proto__: null,
2538
- anchorBlock: anchorBlock,
2539
- anchorBlockEntry: anchorBlockEntry,
2540
- anchorInlineEntry: anchorInlineEntry,
2541
- findDescendant: findDescendant,
2542
- findNode: findNode,
2543
- findPath: findPath,
2544
- getAbove: getAbove,
2545
- getAboveByType: getAboveByType,
2537
+ getLastNode: getLastNode,
2546
2538
  getAnchorBlockEntry: getAnchorBlockEntry,
2539
+ getAboveByType: getAboveByType,
2540
+ getNodes: getNodes,
2541
+ getNodesByType: getNodesByType,
2547
2542
  getBlockAbove: getBlockAbove,
2548
- getBlockCardAbove: getBlockCardAbove,
2549
- getBlockCardCenterCursor: getBlockCardCenterCursor,
2550
- getContainerBlocks: getContainerBlocks,
2551
- getDirectlyParent: getDirectlyParent,
2552
- getInsertElementsPath: getInsertElementsPath,
2543
+ getPreviousPath: getPreviousPath,
2544
+ getNode: getNode,
2545
+ getParent: getParent,
2553
2546
  getLastChild: getLastChild,
2554
2547
  getLastChildPath: getLastChildPath,
2555
- getLastNode: getLastNode,
2556
2548
  getNextSiblingNodes: getNextSiblingNodes,
2557
- getNode: getNode,
2558
- getNodes: getNodes,
2559
- getNodesByType: getNodesByType,
2560
- getParent: getParent,
2561
- getPlainText: getPlainText,
2562
- getPluginByToolbarItem: getPluginByToolbarItem,
2549
+ getAbove: getAbove,
2563
2550
  getPointBefore: getPointBefore,
2551
+ getSelectionNodesByType: getSelectionNodesByType,
2552
+ getText: getText,
2564
2553
  getPointFromLocation: getPointFromLocation,
2565
- getPreviousPath: getPreviousPath,
2566
- getRangeBefore: getRangeBefore,
2567
2554
  getRangeFromBlockStart: getRangeFromBlockStart,
2555
+ getRangeBefore: getRangeBefore,
2556
+ getBlockCardCenterCursor: getBlockCardCenterCursor,
2557
+ getBlockCardAbove: getBlockCardAbove,
2558
+ getPlainText: getPlainText,
2568
2559
  getSelectionMarks: getSelectionMarks,
2569
- getSelectionNodesByType: getSelectionNodesByType,
2570
- getText: getText,
2571
- getToolbarItemDisabled: getToolbarItemDisabled,
2572
- isAcrossBlocks: isAcrossBlocks,
2560
+ getContainerBlocks: getContainerBlocks,
2561
+ getDirectlyParent: getDirectlyParent,
2573
2562
  isAncestor: isAncestor,
2574
- isAncestorEmpty: isAncestorEmpty,
2575
- isBlockAboveEmpty: isBlockAboveEmpty,
2576
- isBlockActive: isBlockActive,
2577
- isBlockCardCursor: isBlockCardCursor,
2578
- isBlockTextEmptyAfterSelection: isBlockTextEmptyAfterSelection,
2579
2563
  isCollapsed: isCollapsed,
2580
- isContainNestedType: isContainNestedType,
2581
- isContainer: isContainer,
2582
- isDescendant: isDescendant,
2583
- isEmptyContent: isEmptyContent,
2584
- isEmptyContentByFilter: isEmptyContentByFilter,
2585
2564
  isEmptyParagraph: isEmptyParagraph,
2586
- isEmptyParagraphByPath: isEmptyParagraphByPath,
2587
2565
  isEmptyParagraphElement: isEmptyParagraphElement,
2588
- isFirstChild: isFirstChild,
2589
- isGlobalCollapsed: isGlobalCollapsed,
2590
- isIncludeTypes: isIncludeTypes,
2591
2566
  isLogicEmptyParagraphElement: isLogicEmptyParagraphElement,
2592
- isNodeType: isNodeType,
2593
- isNodeTypeIn: isNodeTypeIn,
2594
2567
  isParagraph: isParagraph,
2568
+ isBlockActive: isBlockActive,
2569
+ isIncludeTypes: isIncludeTypes,
2570
+ isAncestorEmpty: isAncestorEmpty,
2571
+ isBlockAboveEmpty: isBlockAboveEmpty,
2572
+ isNodeTypeIn: isNodeTypeIn,
2573
+ isFirstChild: isFirstChild,
2595
2574
  isPointAtRoot: isPointAtRoot,
2596
- isRangeAcrossBlocks: isRangeAcrossBlocks,
2597
2575
  isRangeAtRoot: isRangeAtRoot,
2576
+ isBlockTextEmptyAfterSelection: isBlockTextEmptyAfterSelection,
2598
2577
  isStart: isStart,
2599
- someNode: someNode
2578
+ isRangeAcrossBlocks: isRangeAcrossBlocks,
2579
+ isDescendant: isDescendant,
2580
+ isNodeType: isNodeType,
2581
+ isAcrossBlocks: isAcrossBlocks,
2582
+ isBlockCardCursor: isBlockCardCursor,
2583
+ isEmptyParagraphByPath: isEmptyParagraphByPath,
2584
+ isEmptyContent: isEmptyContent,
2585
+ isEmptyContentByFilter: isEmptyContentByFilter,
2586
+ isContainer: isContainer,
2587
+ getInsertElementsPath: getInsertElementsPath,
2588
+ isContainNestedType: isContainNestedType,
2589
+ anchorBlock: anchorBlock,
2590
+ anchorBlockEntry: anchorBlockEntry,
2591
+ anchorInlineEntry: anchorInlineEntry,
2592
+ findPath: findPath,
2593
+ findNode: findNode,
2594
+ findDescendant: findDescendant,
2595
+ someNode: someNode,
2596
+ getToolbarItemDisabled: getToolbarItemDisabled,
2597
+ getPluginByToolbarItem: getPluginByToolbarItem,
2598
+ isGlobalCollapsed: isGlobalCollapsed
2600
2599
  });
2601
2600
 
2602
2601
  class TheBaseToolbarItem {
@@ -2630,9 +2629,9 @@ class TheBaseToolbarItem {
2630
2629
  }
2631
2630
  }
2632
2631
  }
2633
- TheBaseToolbarItem.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheBaseToolbarItem, deps: [], target: i0.ɵɵFactoryTarget.Directive });
2634
- TheBaseToolbarItem.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.2", type: TheBaseToolbarItem, inputs: { toolbarItem: "toolbarItem", editor: "editor", itemMousedownHandle: "itemMousedownHandle" }, host: { properties: { "class.disabled": "this.disabledState", "class.active": "this.activeState" } }, ngImport: i0 });
2635
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheBaseToolbarItem, decorators: [{
2632
+ TheBaseToolbarItem.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheBaseToolbarItem, deps: [], target: i0.ɵɵFactoryTarget.Directive });
2633
+ TheBaseToolbarItem.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.0", type: TheBaseToolbarItem, inputs: { toolbarItem: "toolbarItem", editor: "editor", itemMousedownHandle: "itemMousedownHandle" }, host: { properties: { "class.disabled": "this.disabledState", "class.active": "this.activeState" } }, ngImport: i0 });
2634
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheBaseToolbarItem, decorators: [{
2636
2635
  type: Directive
2637
2636
  }], propDecorators: { toolbarItem: [{
2638
2637
  type: Input
@@ -2668,9 +2667,9 @@ class TheBaseToolbarDropdown extends TheBaseToolbarItem {
2668
2667
  }
2669
2668
  }
2670
2669
  }
2671
- TheBaseToolbarDropdown.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheBaseToolbarDropdown, deps: null, target: i0.ɵɵFactoryTarget.Directive });
2672
- TheBaseToolbarDropdown.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.2", type: TheBaseToolbarDropdown, inputs: { menus: "menus", mode: "mode", dropdownItemKey: "dropdownItemKey" }, usesInheritance: true, ngImport: i0 });
2673
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheBaseToolbarDropdown, decorators: [{
2670
+ TheBaseToolbarDropdown.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheBaseToolbarDropdown, deps: null, target: i0.ɵɵFactoryTarget.Directive });
2671
+ 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 });
2672
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheBaseToolbarDropdown, decorators: [{
2674
2673
  type: Directive
2675
2674
  }], propDecorators: { menus: [{
2676
2675
  type: Input
@@ -2681,6 +2680,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
2681
2680
  }] } });
2682
2681
 
2683
2682
  class TheToolbarDropdownComponent extends TheBaseToolbarDropdown {
2683
+ constructor(elementRef, thyPopover, viewContainerRef, overlay) {
2684
+ super();
2685
+ this.elementRef = elementRef;
2686
+ this.thyPopover = thyPopover;
2687
+ this.viewContainerRef = viewContainerRef;
2688
+ this.overlay = overlay;
2689
+ this.className = 'the-toolbar-dropdown-container';
2690
+ this.activeKeys = [];
2691
+ this.dropdownMode = DropdownMode;
2692
+ }
2684
2693
  get isOpen() {
2685
2694
  return this.dropdownPopoverRef && this.dropdownPopoverRef.getOverlayRef() && this.dropdownPopoverRef.getOverlayRef().hasAttached();
2686
2695
  }
@@ -2694,16 +2703,6 @@ class TheToolbarDropdownComponent extends TheBaseToolbarDropdown {
2694
2703
  get activeDropdown() {
2695
2704
  return this.toolbarItem.dropdownFixedIcon && !!this.activeKeys.length;
2696
2705
  }
2697
- constructor(elementRef, thyPopover, viewContainerRef, overlay) {
2698
- super();
2699
- this.elementRef = elementRef;
2700
- this.thyPopover = thyPopover;
2701
- this.viewContainerRef = viewContainerRef;
2702
- this.overlay = overlay;
2703
- this.className = 'the-toolbar-dropdown-container';
2704
- this.activeKeys = [];
2705
- this.dropdownMode = DropdownMode;
2706
- }
2707
2706
  ngOnInit() {
2708
2707
  var _a, _b, _c, _d;
2709
2708
  if (!this.activeMenuItem) {
@@ -2795,9 +2794,9 @@ class TheToolbarDropdownComponent extends TheBaseToolbarDropdown {
2795
2794
  .withPositions([bottomPosition, topPosition]);
2796
2795
  }
2797
2796
  }
2798
- TheToolbarDropdownComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheToolbarDropdownComponent, deps: [{ token: i0.ElementRef }, { token: i1$1.ThyPopover }, { token: i0.ViewContainerRef }, { token: i2$1.Overlay }], target: i0.ɵɵFactoryTarget.Component });
2799
- TheToolbarDropdownComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.2", type: TheToolbarDropdownComponent, selector: "the-toolbar-dropdown", 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: i7.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"] }] });
2800
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheToolbarDropdownComponent, decorators: [{
2797
+ 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 });
2798
+ TheToolbarDropdownComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: TheToolbarDropdownComponent, selector: "the-toolbar-dropdown", 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: i7.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"] }] });
2799
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheToolbarDropdownComponent, decorators: [{
2801
2800
  type: Component,
2802
2801
  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" }]
2803
2802
  }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1$1.ThyPopover }, { type: i0.ViewContainerRef }, { type: i2$1.Overlay }]; }, propDecorators: { className: [{
@@ -2815,13 +2814,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
2815
2814
  }] } });
2816
2815
 
2817
2816
  class TheToolbarItemComponent extends TheBaseToolbarItem {
2818
- toggleDropdown(event) {
2819
- super.execute(event);
2820
- }
2821
2817
  constructor() {
2822
2818
  super();
2823
2819
  this.className = 'the-toolbar-item';
2824
2820
  }
2821
+ toggleDropdown(event) {
2822
+ super.execute(event);
2823
+ }
2825
2824
  ngOnInit() { }
2826
2825
  preventDefault(event) {
2827
2826
  event.preventDefault();
@@ -2839,8 +2838,8 @@ class TheToolbarItemComponent extends TheBaseToolbarItem {
2839
2838
  (_d = this.toolbarItem) === null || _d === void 0 ? void 0 : _d.execute(this.editor);
2840
2839
  }
2841
2840
  }
2842
- TheToolbarItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheToolbarItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2843
- TheToolbarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.2", type: TheToolbarItemComponent, selector: "the-toolbar-item", host: { listeners: { "mousedown": "toggleDropdown($event)" }, properties: { "class": "this.className" } }, usesInheritance: true, ngImport: i0, template: `
2841
+ TheToolbarItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheToolbarItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2842
+ 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: `
2844
2843
  <a
2845
2844
  href="javascript:;"
2846
2845
  thyAction
@@ -2854,7 +2853,7 @@ TheToolbarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0"
2854
2853
  ></a>
2855
2854
  <ng-template #tooltip let-data> {{ data?.name }} {{ data?.shortcutKey }} </ng-template>
2856
2855
  `, 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: i7.ThyActionComponent, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }] });
2857
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheToolbarItemComponent, decorators: [{
2856
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheToolbarItemComponent, decorators: [{
2858
2857
  type: Component,
2859
2858
  args: [{
2860
2859
  selector: 'the-toolbar-item',
@@ -2882,9 +2881,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
2882
2881
  }] } });
2883
2882
 
2884
2883
  class TheToolbarComponent {
2885
- get justifyContent() {
2886
- return this.align;
2887
- }
2888
2884
  constructor(cdr, elementRef, ngZone, toolbarGroupComponent) {
2889
2885
  this.cdr = cdr;
2890
2886
  this.elementRef = elementRef;
@@ -2897,6 +2893,9 @@ class TheToolbarComponent {
2897
2893
  this.moreGroupMenu = ToolbarMoreGroup;
2898
2894
  this.elementWidth = 0;
2899
2895
  }
2896
+ get justifyContent() {
2897
+ return this.align;
2898
+ }
2900
2899
  ngOnInit() {
2901
2900
  this.setToolbarClass();
2902
2901
  this.renderToolbarView();
@@ -3108,9 +3107,9 @@ class TheToolbarComponent {
3108
3107
  return TheToolbarItemComponent;
3109
3108
  }
3110
3109
  }
3111
- TheToolbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheToolbarComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i0.NgZone }, { token: TheToolbarGroupToken }], target: i0.ɵɵFactoryTarget.Component });
3112
- TheToolbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.2", 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"] }] });
3113
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheToolbarComponent, decorators: [{
3110
+ 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 });
3111
+ 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"] }] });
3112
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheToolbarComponent, decorators: [{
3114
3113
  type: Component,
3115
3114
  args: [{ selector: 'the-toolbar', host: {
3116
3115
  class: 'the-toolbar-container d-flex align-items-center'
@@ -3268,23 +3267,23 @@ class TheContextService {
3268
3267
  this.destroy$.complete();
3269
3268
  }
3270
3269
  }
3271
- TheContextService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheContextService, deps: [{ token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });
3272
- TheContextService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheContextService });
3273
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheContextService, decorators: [{
3270
+ TheContextService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheContextService, deps: [{ token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });
3271
+ TheContextService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheContextService });
3272
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheContextService, decorators: [{
3274
3273
  type: Injectable
3275
3274
  }], ctorParameters: function () { return [{ type: i0.NgZone }]; } });
3276
3275
 
3277
3276
  class TheColorSelectComponent {
3278
- handleDocumentMouseDown(event) {
3279
- if (!document.querySelector('.color-container').contains(event.target)) {
3280
- this.popoverRef.close();
3281
- }
3282
- }
3283
3277
  constructor(popoverRef) {
3284
3278
  this.popoverRef = popoverRef;
3285
3279
  this.showCustom = true;
3286
3280
  this.selectColors = [];
3287
3281
  }
3282
+ handleDocumentMouseDown(event) {
3283
+ if (!document.querySelector('.color-container').contains(event.target)) {
3284
+ this.popoverRef.close();
3285
+ }
3286
+ }
3288
3287
  ngOnInit() {
3289
3288
  if (this.selectedColor) {
3290
3289
  this.customColor = this.selectedColor.slice(1);
@@ -3350,9 +3349,9 @@ class TheColorSelectComponent {
3350
3349
  this.popoverRef.close();
3351
3350
  }
3352
3351
  }
3353
- TheColorSelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheColorSelectComponent, deps: [{ token: i1$1.ThyPopoverRef }], target: i0.ɵɵFactoryTarget.Component });
3354
- TheColorSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.2", 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$1.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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i3$1.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.ThyInputDirective, selector: "input[thyInput], select[thyInput], textarea[thyInput]", inputs: ["thySize"], exportAs: ["thyInput"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
3355
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheColorSelectComponent, decorators: [{
3352
+ 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 });
3353
+ 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.ThyInputDirective, selector: "[thyInput]", inputs: ["thySize", "thyAutocomplete"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
3354
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheColorSelectComponent, decorators: [{
3356
3355
  type: Component,
3357
3356
  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" }]
3358
3357
  }], ctorParameters: function () { return [{ type: i1$1.ThyPopoverRef }]; }, propDecorators: { selectedColor: [{
@@ -3377,9 +3376,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
3377
3376
  }] } });
3378
3377
 
3379
3378
  class TheColorSelectService {
3380
- get isOpenColorSelect() {
3381
- return this.colorSelectRef && this.colorSelectRef.componentInstance;
3382
- }
3383
3379
  constructor(thyPopover) {
3384
3380
  this.thyPopover = thyPopover;
3385
3381
  this.backdropClosable = false;
@@ -3388,6 +3384,9 @@ class TheColorSelectService {
3388
3384
  this.placement = 'bottomLeft';
3389
3385
  this.offset = 10;
3390
3386
  }
3387
+ get isOpenColorSelect() {
3388
+ return this.colorSelectRef && this.colorSelectRef.componentInstance;
3389
+ }
3391
3390
  toggleColorSelect(origin, selectedColor, colors, option, selectAction, placement, offset) {
3392
3391
  if (this.isOpenColorSelect) {
3393
3392
  this.colorSelectRef.close();
@@ -3417,9 +3416,9 @@ class TheColorSelectService {
3417
3416
  }
3418
3417
  }
3419
3418
  }
3420
- TheColorSelectService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheColorSelectService, deps: [{ token: i1$1.ThyPopover }], target: i0.ɵɵFactoryTarget.Injectable });
3421
- TheColorSelectService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheColorSelectService });
3422
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheColorSelectService, decorators: [{
3419
+ 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 });
3420
+ TheColorSelectService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheColorSelectService });
3421
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheColorSelectService, decorators: [{
3423
3422
  type: Injectable
3424
3423
  }], ctorParameters: function () { return [{ type: i1$1.ThyPopover }]; } });
3425
3424
 
@@ -3767,13 +3766,22 @@ class TablePosition {
3767
3766
  }
3768
3767
  }
3769
3768
 
3769
+ const createTablePosition = (editor, path) => {
3770
+ var _a;
3771
+ path = path || ((_a = editor.selection.anchor) === null || _a === void 0 ? void 0 : _a.path);
3772
+ if (!path) {
3773
+ throw new Error('Path invalid');
3774
+ }
3775
+ return TablePosition.create(new TableOptions(), editor, path);
3776
+ };
3777
+
3770
3778
  /**
3771
3779
  * True if the given range is inside one table
3772
3780
  */
3773
- function isRangeInTable(opts, node, range) {
3774
- const { anchor, focus } = range;
3775
- const startPosition = TablePosition.create(opts, node, anchor.path);
3776
- const endPosition = TablePosition.create(opts, node, focus.path);
3781
+ function isRangeInTable(opts, editor, range) {
3782
+ const { focus } = range;
3783
+ const startPosition = createTablePosition(editor);
3784
+ const endPosition = createTablePosition(editor, focus.path);
3777
3785
  // Only handle events in tables
3778
3786
  if (!startPosition.isInTable() || !endPosition.isInTable()) {
3779
3787
  return false;
@@ -3807,8 +3815,7 @@ function isRectangularInTableCells(editor, cells) {
3807
3815
  let minCol = col;
3808
3816
  let maxRow = row;
3809
3817
  let minRow = row;
3810
- const path = editor.selection.anchor.path;
3811
- const pos = TablePosition.create(new TableOptions(), editor, path);
3818
+ const pos = createTablePosition(editor);
3812
3819
  for (let { row, col } of cells) {
3813
3820
  const { hidden, rowspan, colspan } = pos.findCellByPath({ row, col });
3814
3821
  if (hidden) {
@@ -4119,22 +4126,22 @@ function handleContinualInsertBreak(editor, lowestBlock, type) {
4119
4126
 
4120
4127
  var index = /*#__PURE__*/Object.freeze({
4121
4128
  __proto__: null,
4122
- applyDeepToNodes: applyDeepToNodes,
4129
+ setMarks: setMarks,
4123
4130
  clearMarks: clearMarks,
4124
- closeConversionHint: closeConversionHint,
4125
- deleteElement: deleteElement,
4126
- handleContinualDeleteBackward: handleContinualDeleteBackward,
4127
- handleContinualInsertBreak: handleContinualInsertBreak,
4128
4131
  insertElements: insertElements,
4129
4132
  insertParagraph: insertParagraph,
4130
- mergeDeepToNodes: mergeDeepToNodes,
4131
- moveChildren: moveChildren,
4132
- onKeyDownResetBlockType: onKeyDownResetBlockType,
4133
- setEndSelection: setEndSelection,
4134
- setMarks: setMarks,
4135
4133
  setNode: setNode,
4134
+ unwrapNodesByType: unwrapNodesByType,
4135
+ onKeyDownResetBlockType: onKeyDownResetBlockType,
4136
+ moveChildren: moveChildren,
4137
+ applyDeepToNodes: applyDeepToNodes,
4138
+ mergeDeepToNodes: mergeDeepToNodes,
4136
4139
  unWrap: unWrap,
4137
- unwrapNodesByType: unwrapNodesByType
4140
+ deleteElement: deleteElement,
4141
+ setEndSelection: setEndSelection,
4142
+ closeConversionHint: closeConversionHint,
4143
+ handleContinualDeleteBackward: handleContinualDeleteBackward,
4144
+ handleContinualInsertBreak: handleContinualInsertBreak
4138
4145
  });
4139
4146
 
4140
4147
  /**
@@ -4151,7 +4158,7 @@ function insertTable(opts, editor, rows = 3, columns = 3, getCellContent) {
4151
4158
  }
4152
4159
 
4153
4160
  function getInsertRowState(opts, editor, count = 1, at) {
4154
- const tablePosition = TablePosition.create(opts, editor, editor.selection.anchor.path);
4161
+ const tablePosition = createTablePosition(editor);
4155
4162
  let table = tablePosition.table;
4156
4163
  let tableEntry = tablePosition.tableEntry;
4157
4164
  // Create a new row with the right count of cells
@@ -4241,7 +4248,7 @@ function insertColumn(opts, editor, count = 1, at, // Column index
4241
4248
  getCell) {
4242
4249
  const { selection } = editor;
4243
4250
  const { anchor: { path } } = selection;
4244
- const tablePosition = TablePosition.create(opts, editor, path);
4251
+ const tablePosition = createTablePosition(editor, path);
4245
4252
  let table = tablePosition.table;
4246
4253
  let tableEntry = tablePosition.tableEntry;
4247
4254
  const insertColumnIndex = typeof at === 'undefined' ? tablePosition.getColumnIndex() + 1 : at;
@@ -4307,9 +4314,7 @@ function clearCell(opts, editor, cellEntry) {
4307
4314
  }
4308
4315
 
4309
4316
  function removeRow(opts, editor, selectRowIndex) {
4310
- const { selection } = editor;
4311
- const { anchor: { path } } = selection;
4312
- const tablePosition = TablePosition.create(opts, editor, path);
4317
+ const tablePosition = createTablePosition(editor);
4313
4318
  const { tableEntry, table, rowEntry: [rowNode, rowPath] } = tablePosition;
4314
4319
  selectRowIndex = selectRowIndex === undefined ? [...rowPath].pop() : selectRowIndex;
4315
4320
  const at = tableEntry[1].concat(selectRowIndex);
@@ -4379,7 +4384,7 @@ function removeColumns(table, columnsCount, index) {
4379
4384
  function removeColumn(opts, editor, selectColIndex) {
4380
4385
  const { selection } = editor;
4381
4386
  const { anchor: { path } } = selection;
4382
- const tablePosition = TablePosition.create(opts, editor, path);
4387
+ const tablePosition = createTablePosition(editor, path);
4383
4388
  const { tableEntry, table, row, cellEntry: [cellNode, cellPath] } = tablePosition;
4384
4389
  const rows = tableEntry[0].children;
4385
4390
  selectColIndex = selectColIndex === undefined ? [...cellPath].pop() : selectColIndex;
@@ -4431,8 +4436,8 @@ const NextPath = (path) => {
4431
4436
  function removeTable(opts, editor) {
4432
4437
  const { selection } = editor;
4433
4438
  const { anchor: { path } } = selection;
4434
- const pos = TablePosition.create(opts, editor, path);
4435
- const { table, tableEntry: [, tablePath] } = pos;
4439
+ const pos = createTablePosition(editor, path);
4440
+ const { tableEntry: [, tablePath] } = pos;
4436
4441
  let nextFocusEntry = null;
4437
4442
  let shouldCollapseToEnd = false;
4438
4443
  const nextEntry = Editor.next(editor, { at: tablePath });
@@ -5266,9 +5271,9 @@ class TheBaseSuggestion {
5266
5271
  event.preventDefault();
5267
5272
  }
5268
5273
  }
5269
- TheBaseSuggestion.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheBaseSuggestion, deps: [], target: i0.ɵɵFactoryTarget.Directive });
5270
- TheBaseSuggestion.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.2", type: TheBaseSuggestion, inputs: { editor: "editor", type: "type", keywords: "keywords" }, host: { listeners: { "mousedown": "handleMousedown($event)" } }, ngImport: i0 });
5271
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheBaseSuggestion, decorators: [{
5274
+ TheBaseSuggestion.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheBaseSuggestion, deps: [], target: i0.ɵɵFactoryTarget.Directive });
5275
+ 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 });
5276
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheBaseSuggestion, decorators: [{
5272
5277
  type: Directive
5273
5278
  }], propDecorators: { editor: [{
5274
5279
  type: Input
@@ -5310,9 +5315,9 @@ class TheTableSelectComponent {
5310
5315
  }
5311
5316
  }
5312
5317
  }
5313
- TheTableSelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheTableSelectComponent, deps: [{ token: i1$1.ThyPopoverRef }], target: i0.ɵɵFactoryTarget.Component });
5314
- TheTableSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.2", 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"] }] });
5315
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheTableSelectComponent, decorators: [{
5318
+ 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 });
5319
+ 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"] }] });
5320
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheTableSelectComponent, decorators: [{
5316
5321
  type: Component,
5317
5322
  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" }]
5318
5323
  }], ctorParameters: function () { return [{ type: i1$1.ThyPopoverRef }]; }, propDecorators: { optionsParam: [{
@@ -5328,12 +5333,6 @@ const THE_LISTBOX_PARENT_GROUP_TOKEN = new InjectionToken('THE_LISTBOX_PARENT_GR
5328
5333
  const THE_LISTBOX_TOKEN = new InjectionToken('THE_LISTBOX_TOKEN');
5329
5334
 
5330
5335
  class TheListboxOptionDirective {
5331
- get hasChild() {
5332
- return this._options.length > 0;
5333
- }
5334
- get firstChild() {
5335
- return this._options.first;
5336
- }
5337
5336
  constructor(parentOption, parentGroup, elementRef) {
5338
5337
  this.parentOption = parentOption;
5339
5338
  this.parentGroup = parentGroup;
@@ -5341,6 +5340,12 @@ class TheListboxOptionDirective {
5341
5340
  this._active = false;
5342
5341
  this.className = 'the-listbox-option';
5343
5342
  }
5343
+ get hasChild() {
5344
+ return this._options.length > 0;
5345
+ }
5346
+ get firstChild() {
5347
+ return this._options.first;
5348
+ }
5344
5349
  ngOnInit() { }
5345
5350
  ngAfterContentInit() { }
5346
5351
  getGroups() {
@@ -5365,14 +5370,14 @@ class TheListboxOptionDirective {
5365
5370
  return this._active;
5366
5371
  }
5367
5372
  }
5368
- TheListboxOptionDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", 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 });
5369
- TheListboxOptionDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.2", type: TheListboxOptionDirective, selector: "[theListboxOption]", inputs: { theOptionValue: "theOptionValue", theOptionDisabled: "theOptionDisabled" }, host: { properties: { "class": "this.className" } }, providers: [
5373
+ 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 });
5374
+ 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: [
5370
5375
  {
5371
5376
  provide: THE_LISTBOX_PARENT_OPTION_TOKEN,
5372
5377
  useExisting: TheListboxOptionDirective
5373
5378
  }
5374
5379
  ], queries: [{ propertyName: "_options", predicate: i0.forwardRef(function () { return TheListboxOptionDirective; }), descendants: true }], exportAs: ["theListboxOption"], ngImport: i0 });
5375
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheListboxOptionDirective, decorators: [{
5380
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheListboxOptionDirective, decorators: [{
5376
5381
  type: Directive,
5377
5382
  args: [{
5378
5383
  selector: '[theListboxOption]',
@@ -5450,14 +5455,14 @@ class TheListboxGroupDirective {
5450
5455
  return this.options[this.options.length - 1];
5451
5456
  }
5452
5457
  }
5453
- TheListboxGroupDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheListboxGroupDirective, deps: [{ token: THE_LISTBOX_PARENT_OPTION_TOKEN, optional: true, skipSelf: true }, { token: THE_LISTBOX_TOKEN }], target: i0.ɵɵFactoryTarget.Directive });
5454
- TheListboxGroupDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.2", type: TheListboxGroupDirective, selector: "[theListboxGroup]", inputs: { horizontalColumn: "horizontalColumn" }, host: { properties: { "class": "this.className" } }, providers: [
5458
+ 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 });
5459
+ 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: [
5455
5460
  {
5456
5461
  provide: THE_LISTBOX_PARENT_GROUP_TOKEN,
5457
5462
  useExisting: TheListboxGroupDirective
5458
5463
  }
5459
5464
  ], queries: [{ propertyName: "_options", predicate: TheListboxOptionDirective, descendants: true }], exportAs: ["theListboxGroup"], ngImport: i0 });
5460
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheListboxGroupDirective, decorators: [{
5465
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheListboxGroupDirective, decorators: [{
5461
5466
  type: Directive,
5462
5467
  args: [{
5463
5468
  selector: '[theListboxGroup]',
@@ -5663,14 +5668,14 @@ class TheListboxDirective {
5663
5668
  this._keyboardSubscription.unsubscribe();
5664
5669
  }
5665
5670
  }
5666
- TheListboxDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheListboxDirective, deps: [{ token: i0.NgZone }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
5667
- TheListboxDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.2", type: TheListboxDirective, selector: "[theListBox]", inputs: { keyboardContainer: "keyboardContainer", autoActiveFirstItem: "autoActiveFirstItem" }, outputs: { theListboxChange: "theListboxChange" }, host: { properties: { "class": "this.className" } }, providers: [
5671
+ 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 });
5672
+ 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: [
5668
5673
  {
5669
5674
  provide: THE_LISTBOX_TOKEN,
5670
5675
  useExisting: TheListboxDirective
5671
5676
  }
5672
5677
  ], queries: [{ propertyName: "_groups", predicate: TheListboxGroupDirective, descendants: true }, { propertyName: "_options", predicate: TheListboxOptionDirective, descendants: true }], exportAs: ["theListBox"], ngImport: i0 });
5673
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheListboxDirective, decorators: [{
5678
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheListboxDirective, decorators: [{
5674
5679
  type: Directive,
5675
5680
  args: [{
5676
5681
  selector: '[theListBox]',
@@ -5704,9 +5709,9 @@ class ThePreventDefaultDirective {
5704
5709
  event.preventDefault();
5705
5710
  }
5706
5711
  }
5707
- ThePreventDefaultDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: ThePreventDefaultDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
5708
- ThePreventDefaultDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.2", type: ThePreventDefaultDirective, selector: "[thePreventDefault]", host: { listeners: { "mousedown": "mousedown($event)" } }, exportAs: ["thePreventDefault"], ngImport: i0 });
5709
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: ThePreventDefaultDirective, decorators: [{
5712
+ ThePreventDefaultDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ThePreventDefaultDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
5713
+ 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 });
5714
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ThePreventDefaultDirective, decorators: [{
5710
5715
  type: Directive,
5711
5716
  args: [{
5712
5717
  selector: '[thePreventDefault]',
@@ -5868,9 +5873,9 @@ class ThePluginMenuComponent extends mixinUnsubscribe(MixinBase) {
5868
5873
  super.ngOnDestroy();
5869
5874
  }
5870
5875
  }
5871
- ThePluginMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: ThePluginMenuComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: i1$1.ThyPopoverRef }], target: i0.ɵɵFactoryTarget.Component });
5872
- ThePluginMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.2", 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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.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.ThyInputSearchComponent, selector: "thy-input-search", inputs: ["name", "placeholder", "thyTheme", "thySearchFocus", "thyIconPosition", "thySize"], outputs: ["clear", "thyClear"] }, { kind: "component", type: i7.ThyActionComponent, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }, { kind: "component", type: i8$1.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.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"] }] });
5873
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: ThePluginMenuComponent, decorators: [{
5876
+ 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 });
5877
+ 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.ThyInputSearchComponent, selector: "thy-input-search", inputs: ["name", "placeholder", "thyTheme", "thySearchFocus", "thyIconPosition", "thySize"], outputs: ["clear", "thyClear"] }, { kind: "component", type: i7.ThyActionComponent, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }, { kind: "component", type: i8$1.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.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"] }] });
5878
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ThePluginMenuComponent, decorators: [{
5874
5879
  type: Component,
5875
5880
  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" }]
5876
5881
  }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }, { type: i1$1.ThyPopoverRef }]; }, propDecorators: { dropdownTriggers: [{
@@ -5977,6 +5982,13 @@ const TodoItemEditor = {
5977
5982
  };
5978
5983
 
5979
5984
  class TheVerticalToolbarItemComponent extends TheBaseToolbarDropdown {
5985
+ constructor(elementRef, thyPopover, viewContainerRef) {
5986
+ super();
5987
+ this.elementRef = elementRef;
5988
+ this.thyPopover = thyPopover;
5989
+ this.viewContainerRef = viewContainerRef;
5990
+ this.isHide = true;
5991
+ }
5980
5992
  get isOpened() {
5981
5993
  return this.dropdownPopoverRef && this.dropdownPopoverRef.getOverlayRef() && this.dropdownPopoverRef.getOverlayRef().hasAttached();
5982
5994
  }
@@ -5985,13 +5997,6 @@ class TheVerticalToolbarItemComponent extends TheBaseToolbarDropdown {
5985
5997
  this.close();
5986
5998
  }
5987
5999
  }
5988
- constructor(elementRef, thyPopover, viewContainerRef) {
5989
- super();
5990
- this.elementRef = elementRef;
5991
- this.thyPopover = thyPopover;
5992
- this.viewContainerRef = viewContainerRef;
5993
- this.isHide = true;
5994
- }
5995
6000
  ngOnInit() { }
5996
6001
  menusActive(editor) {
5997
6002
  return this.menus.find(i => {
@@ -6037,9 +6042,9 @@ class TheVerticalToolbarItemComponent extends TheBaseToolbarDropdown {
6037
6042
  }
6038
6043
  }
6039
6044
  }
6040
- TheVerticalToolbarItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheVerticalToolbarItemComponent, deps: [{ token: i0.ElementRef }, { token: i1$1.ThyPopover }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component });
6041
- TheVerticalToolbarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.2", 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: i7.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"] }] });
6042
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheVerticalToolbarItemComponent, decorators: [{
6045
+ 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 });
6046
+ 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: i7.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"] }] });
6047
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheVerticalToolbarItemComponent, decorators: [{
6043
6048
  type: Component,
6044
6049
  args: [{ selector: 'the-toolbar-vertical-align-item', host: {
6045
6050
  class: 'the-toolbar-dropdown-container verticalAlign',
@@ -6208,7 +6213,7 @@ const TableEditor = {
6208
6213
  const tableNode = getAboveByType(editor, ElementKinds.table);
6209
6214
  if (tableNode) {
6210
6215
  const tableComponent = ELEMENT_TO_COMPONENT.get(tableNode[0]);
6211
- const selectedCellPositions = tableComponent.tableStore.selectedCellPositions;
6216
+ const selectedCellPositions = tableComponent.tableStore.getSelectedCellPositions();
6212
6217
  if (selectedCellPositions.length > 0) {
6213
6218
  return selectedCellPositions;
6214
6219
  }
@@ -6323,9 +6328,7 @@ const TableEditor = {
6323
6328
  if (!TableEditor.hasHeaderRow(editor) && !TableEditor.hasHeaderColumn(editor)) {
6324
6329
  return false;
6325
6330
  }
6326
- const opts = new TableOptions();
6327
- const selection = editor.selection;
6328
- const position = TablePosition.create(opts, editor, selection.focus.path);
6331
+ const position = createTablePosition(editor, editor.selection.focus.path);
6329
6332
  if (TableEditor.hasHeaderRow(editor) && position.getRowIndex() === 0) {
6330
6333
  return true;
6331
6334
  }
@@ -6827,9 +6830,9 @@ class TheBlockquoteComponent extends TheBaseElementComponent {
6827
6830
  this.cdr = cdr;
6828
6831
  }
6829
6832
  }
6830
- TheBlockquoteComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheBlockquoteComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
6831
- TheBlockquoteComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.2", 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"] }] });
6832
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheBlockquoteComponent, decorators: [{
6833
+ 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 });
6834
+ 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"] }] });
6835
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheBlockquoteComponent, decorators: [{
6833
6836
  type: Component,
6834
6837
  args: [{
6835
6838
  selector: 'blockquote[theBlockquote]',
@@ -6913,12 +6916,6 @@ const createBlockquotePlugin = createPluginFactory({
6913
6916
  });
6914
6917
 
6915
6918
  class TheCodeComponent extends TheBaseElementComponent {
6916
- get code() {
6917
- return this.element.content;
6918
- }
6919
- get isToolbarOpen() {
6920
- return this.toolbarPopoverRef && this.toolbarPopoverRef.getOverlayRef() && this.toolbarPopoverRef.getOverlayRef().hasAttached();
6921
- }
6922
6919
  constructor(elementRef, cdr, thyNotifyService, contextService, ngZone, config, thyPopover, viewContainerRef, overlay) {
6923
6920
  super(elementRef, cdr);
6924
6921
  this.elementRef = elementRef;
@@ -6956,6 +6953,12 @@ class TheCodeComponent extends TheBaseElementComponent {
6956
6953
  CodeEditor.setCodeAttribute(this.editor, this.element, { language: item.key });
6957
6954
  };
6958
6955
  }
6956
+ get code() {
6957
+ return this.element.content;
6958
+ }
6959
+ get isToolbarOpen() {
6960
+ return this.toolbarPopoverRef && this.toolbarPopoverRef.getOverlayRef() && this.toolbarPopoverRef.getOverlayRef().hasAttached();
6961
+ }
6959
6962
  onContextChange() {
6960
6963
  super.onContextChange();
6961
6964
  if (this.isCollapsedAndNonReadonly) {
@@ -7126,9 +7129,9 @@ class TheCodeComponent extends TheBaseElementComponent {
7126
7129
  this.destroy$.complete();
7127
7130
  }
7128
7131
  }
7129
- TheCodeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", 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 });
7130
- TheCodeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.2", 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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.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$1.ThySwitchComponent, selector: "thy-switch", inputs: ["thyType", "thySize", "thyDisabled"], outputs: ["thyChange"] }, { kind: "component", type: i7.ThyActionComponent, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }, { kind: "component", type: i7.ThyActionsComponent, selector: "thy-actions", inputs: ["thySize"] }, { kind: "component", type: i8$1.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" }, { kind: "directive", type: ThePreventDefaultDirective, selector: "[thePreventDefault]", exportAs: ["thePreventDefault"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
7131
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheCodeComponent, decorators: [{
7132
+ 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 });
7133
+ 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$1.ThySwitchComponent, selector: "thy-switch", inputs: ["thyType", "thySize", "thyDisabled"], outputs: ["thyChange"] }, { kind: "component", type: i7.ThyActionComponent, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }, { kind: "component", type: i7.ThyActionsComponent, selector: "thy-actions", inputs: ["thySize"] }, { kind: "component", type: i8$1.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" }, { kind: "directive", type: ThePreventDefaultDirective, selector: "[thePreventDefault]", exportAs: ["thePreventDefault"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
7134
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheCodeComponent, decorators: [{
7132
7135
  type: Component,
7133
7136
  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" }]
7134
7137
  }], ctorParameters: function () {
@@ -7197,15 +7200,15 @@ const createCodePlugin = createPluginFactory({
7197
7200
  });
7198
7201
 
7199
7202
  class TheColorToolbarItemComponent extends TheBaseToolbarItem {
7200
- get isOpenColorSelect() {
7201
- return this.colorSelectRef && this.colorSelectRef.componentInstance;
7202
- }
7203
7203
  constructor(thyPopover) {
7204
7204
  super();
7205
7205
  this.thyPopover = thyPopover;
7206
7206
  this.defaultColorLine = '#FF0100';
7207
7207
  this.defaultBackgroundColorLine = '#FFDA00';
7208
7208
  }
7209
+ get isOpenColorSelect() {
7210
+ return this.colorSelectRef && this.colorSelectRef.componentInstance;
7211
+ }
7209
7212
  preventDefault(event) {
7210
7213
  event.preventDefault();
7211
7214
  event.stopPropagation();
@@ -7259,8 +7262,8 @@ class TheColorToolbarItemComponent extends TheBaseToolbarItem {
7259
7262
  }
7260
7263
  }
7261
7264
  }
7262
- TheColorToolbarItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheColorToolbarItemComponent, deps: [{ token: i1$1.ThyPopover }], target: i0.ɵɵFactoryTarget.Component });
7263
- TheColorToolbarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.2", type: TheColorToolbarItemComponent, selector: "the-color-toolbar-item", host: { classAttribute: "the-toolbar-item" }, usesInheritance: true, ngImport: i0, template: `
7265
+ 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 });
7266
+ 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: `
7264
7267
  <a
7265
7268
  href="javascript:;"
7266
7269
  thyAction
@@ -7277,8 +7280,8 @@ TheColorToolbarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14
7277
7280
  ></thy-icon>
7278
7281
  <thy-icon class="link-down-icon font-size-sm text-desc ml-1" thyIconName="caret-down"></thy-icon>
7279
7282
  </a>
7280
- `, 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: i7.ThyActionComponent, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }] });
7281
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheColorToolbarItemComponent, decorators: [{
7283
+ `, 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: i7.ThyActionComponent, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }] });
7284
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheColorToolbarItemComponent, decorators: [{
7282
7285
  type: Component,
7283
7286
  args: [{
7284
7287
  selector: 'the-color-toolbar-item',
@@ -8066,9 +8069,9 @@ class TheConversionHintComponent {
8066
8069
  clearInterval(this.closeTimer);
8067
8070
  }
8068
8071
  }
8069
- TheConversionHintComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheConversionHintComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
8070
- TheConversionHintComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.2", 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 });
8071
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheConversionHintComponent, decorators: [{
8072
+ TheConversionHintComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheConversionHintComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
8073
+ 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 });
8074
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheConversionHintComponent, decorators: [{
8072
8075
  type: Component,
8073
8076
  args: [{ selector: 'the-conversion-hint', host: {
8074
8077
  class: 'the-conversion-hint'
@@ -8436,14 +8439,14 @@ class TheHrComponent extends TheBaseElementComponent {
8436
8439
  });
8437
8440
  }
8438
8441
  }
8439
- TheHrComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheHrComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
8440
- TheHrComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.2", type: TheHrComponent, selector: "the-hr, [theHr]", usesInheritance: true, ngImport: i0, template: `
8442
+ 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 });
8443
+ TheHrComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: TheHrComponent, selector: "the-hr, [theHr]", usesInheritance: true, ngImport: i0, template: `
8441
8444
  <div class="the-hr" contenteditable="false" [ngClass]="{ active: isCollapsedAndNonReadonly }">
8442
8445
  <hr class="the-hr" />
8443
8446
  <slate-children [children]="children" [context]="childrenContext" [viewContext]="viewContext"></slate-children>
8444
8447
  </div>
8445
8448
  `, 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"] }] });
8446
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheHrComponent, decorators: [{
8449
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheHrComponent, decorators: [{
8447
8450
  type: Component,
8448
8451
  args: [{
8449
8452
  selector: 'the-hr, [theHr]',
@@ -8506,16 +8509,6 @@ const createHrPlugin = createPluginFactory({
8506
8509
  });
8507
8510
 
8508
8511
  class TheImageComponent extends TheBaseElementComponent {
8509
- get isOpen() {
8510
- return this.layoutToolbarRef && this.layoutToolbarRef.getOverlayRef() && this.layoutToolbarRef.getOverlayRef().hasAttached();
8511
- }
8512
- get imageBindingWidth() {
8513
- var _a, _b, _c;
8514
- const currentWidth = ((_a = this.imageEntry) === null || _a === void 0 ? void 0 : _a.width) || this.naturalWidth;
8515
- return ((_b = this.imageEntry) === null || _b === void 0 ? void 0 : _b.layout) && currentWidth > this.layoutDefaultWidth && !((_c = this.imageEntry) === null || _c === void 0 ? void 0 : _c.reSized)
8516
- ? this.layoutDefaultWidth
8517
- : this.imageEntry.width;
8518
- }
8519
8512
  constructor(elementRef, imageUploaderService, cdr, theContextService, thyPopover, overlay, thyImageService, viewContainerRef) {
8520
8513
  super(elementRef, cdr);
8521
8514
  this.elementRef = elementRef;
@@ -8600,6 +8593,16 @@ class TheImageComponent extends TheBaseElementComponent {
8600
8593
  }
8601
8594
  };
8602
8595
  }
8596
+ get isOpen() {
8597
+ return this.layoutToolbarRef && this.layoutToolbarRef.getOverlayRef() && this.layoutToolbarRef.getOverlayRef().hasAttached();
8598
+ }
8599
+ get imageBindingWidth() {
8600
+ var _a, _b, _c;
8601
+ const currentWidth = ((_a = this.imageEntry) === null || _a === void 0 ? void 0 : _a.width) || this.naturalWidth;
8602
+ return ((_b = this.imageEntry) === null || _b === void 0 ? void 0 : _b.layout) && currentWidth > this.layoutDefaultWidth && !((_c = this.imageEntry) === null || _c === void 0 ? void 0 : _c.reSized)
8603
+ ? this.layoutDefaultWidth
8604
+ : this.imageEntry.width;
8605
+ }
8603
8606
  ngOnInit() {
8604
8607
  var _a;
8605
8608
  this.fileItem = this.theContextService.uploadingFiles.find(item => item.url === this.element.url);
@@ -8849,16 +8852,16 @@ class TheImageComponent extends TheBaseElementComponent {
8849
8852
  event.stopPropagation();
8850
8853
  }
8851
8854
  }
8852
- TheImageComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", 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 });
8853
- TheImageComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.2", 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: i7.ThyActionComponent, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }, { kind: "component", type: i7.ThyActionsComponent, selector: "thy-actions", inputs: ["thySize"] }, { kind: "component", type: i8$1.ThyDividerComponent, selector: "thy-divider", inputs: ["thyVertical", "thyStyle", "thyColor", "thyText", "thyTextDirection", "thyDeeper"] }] });
8854
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheImageComponent, decorators: [{
8855
+ 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 });
8856
+ 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: i7.ThyActionComponent, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }, { kind: "component", type: i7.ThyActionsComponent, selector: "thy-actions", inputs: ["thySize"] }, { kind: "component", type: i8$1.ThyDividerComponent, selector: "thy-divider", inputs: ["thyVertical", "thyStyle", "thyColor", "thyText", "thyTextDirection", "thyDeeper"] }] });
8857
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheImageComponent, decorators: [{
8855
8858
  type: Component,
8856
8859
  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" }]
8857
8860
  }], ctorParameters: function () {
8858
8861
  return [{ type: i0.ElementRef }, { type: undefined, decorators: [{
8859
8862
  type: Inject,
8860
8863
  args: [THE_UPLOAD_SERVICE_TOKEN]
8861
- }] }, { type: i0.ChangeDetectorRef }, { type: TheContextService }, { type: i1$1.ThyPopover }, { type: i2$1.Overlay }, { type: i4.ThyImageService }, { type: i0.ViewContainerRef }];
8864
+ }] }, { type: i0.ChangeDetectorRef }, { type: TheContextService }, { type: i1$1.ThyPopover }, { type: i2$1.Overlay }, { type: i4$1.ThyImageService }, { type: i0.ViewContainerRef }];
8862
8865
  }, propDecorators: { imageContent: [{
8863
8866
  type: ViewChild,
8864
8867
  args: ['imageContent']
@@ -9052,11 +9055,11 @@ class TheInlineCodeComponent extends TheBaseElementComponent {
9052
9055
  this.inlineChromiumBugfix = String.fromCodePoint(160);
9053
9056
  }
9054
9057
  }
9055
- TheInlineCodeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheInlineCodeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
9056
- TheInlineCodeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.2", type: TheInlineCodeComponent, selector: "span[theInlineCode]", usesInheritance: true, ngImport: i0, template: `<span contenteditable="false" class="the-break-char">{{ inlineChromiumBugfix }}</span>
9058
+ TheInlineCodeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheInlineCodeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
9059
+ 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>
9057
9060
  <span><slate-children [children]="children" [context]="childrenContext" [viewContext]="viewContext"></slate-children></span>
9058
9061
  <span contenteditable="false" class="the-break-char">{{ inlineChromiumBugfix }}</span>`, isInline: true, dependencies: [{ kind: "component", type: i1.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }] });
9059
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheInlineCodeComponent, decorators: [{
9062
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheInlineCodeComponent, decorators: [{
9060
9063
  type: Component,
9061
9064
  args: [{
9062
9065
  selector: 'span[theInlineCode]',
@@ -9157,9 +9160,9 @@ class TheLinkHoverComponent {
9157
9160
  event.stopPropagation();
9158
9161
  }
9159
9162
  }
9160
- TheLinkHoverComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheLinkHoverComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
9161
- TheLinkHoverComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.2", 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: i7.ThyActionComponent, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }, { kind: "component", type: i8$1.ThyDividerComponent, selector: "thy-divider", inputs: ["thyVertical", "thyStyle", "thyColor", "thyText", "thyTextDirection", "thyDeeper"] }, { kind: "directive", type: ThePreventDefaultDirective, selector: "[thePreventDefault]", exportAs: ["thePreventDefault"] }] });
9162
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheLinkHoverComponent, decorators: [{
9163
+ TheLinkHoverComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheLinkHoverComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
9164
+ 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: i7.ThyActionComponent, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }, { kind: "component", type: i8$1.ThyDividerComponent, selector: "thy-divider", inputs: ["thyVertical", "thyStyle", "thyColor", "thyText", "thyTextDirection", "thyDeeper"] }, { kind: "directive", type: ThePreventDefaultDirective, selector: "[thePreventDefault]", exportAs: ["thePreventDefault"] }] });
9165
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheLinkHoverComponent, decorators: [{
9163
9166
  type: Component,
9164
9167
  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" }]
9165
9168
  }], ctorParameters: function () { return []; }, propDecorators: { link: [{
@@ -9173,11 +9176,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
9173
9176
  }] } });
9174
9177
 
9175
9178
  class TheLinkEditComponent {
9176
- handleDocumentMouseDown(event) {
9177
- if (!document.querySelector('.the-link-edit-container').contains(event.target)) {
9178
- this.thyPopoverRef.close();
9179
- }
9180
- }
9181
9179
  constructor(thyPopoverRef) {
9182
9180
  this.thyPopoverRef = thyPopoverRef;
9183
9181
  this.className = 'the-link-edit-container';
@@ -9195,6 +9193,11 @@ class TheLinkEditComponent {
9195
9193
  }
9196
9194
  };
9197
9195
  }
9196
+ handleDocumentMouseDown(event) {
9197
+ if (!document.querySelector('.the-link-edit-container').contains(event.target)) {
9198
+ this.thyPopoverRef.close();
9199
+ }
9200
+ }
9198
9201
  ngOnInit() {
9199
9202
  this.originText = this.text;
9200
9203
  this.originLink = this.link;
@@ -9241,9 +9244,9 @@ class TheLinkEditComponent {
9241
9244
  }
9242
9245
  }
9243
9246
  }
9244
- TheLinkEditComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheLinkEditComponent, deps: [{ token: i1$1.ThyPopoverRef }], target: i0.ɵɵFactoryTarget.Component });
9245
- TheLinkEditComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.2", 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$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3$1.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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i3$1.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3$2.ThyFormDirective, selector: "[thyForm],[thy-form]", inputs: ["thyLayout", "thyEnterKeyMode", "thyFormValidatorConfig"], exportAs: ["thyForm"] }, { kind: "component", type: i3$2.ThyFormGroupComponent, selector: "thy-form-group", inputs: ["thyLabelText", "thyLabelTextTranslateKey", "thyLabelRequired", "thyLabelPaddingTopClear", "thyFeedbackIcon", "thyTipsMode", "thyTips", "thyTipsTranslateKey", "thyRowFill"] }, { kind: "directive", type: i3$2.ThyFormSubmitDirective, selector: "[thyFormSubmit],[thy-form-submit]", outputs: ["thyFormSubmit"] }, { kind: "component", type: i3$2.ThyFormGroupFooterComponent, selector: "thy-form-group-footer", inputs: ["thyAlign"] }, { kind: "directive", type: i5$1.ThyAutofocusDirective, selector: "input[thyAutofocus],textarea[thyAutofocus]", inputs: ["thyAutofocus", "thyAutoSelect"] }, { kind: "directive", type: i5.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"] }] });
9246
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheLinkEditComponent, decorators: [{
9247
+ 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 });
9248
+ 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$1.ThyAutofocusDirective, selector: "input[thyAutofocus],textarea[thyAutofocus]", inputs: ["thyAutoSelect", "thyAutofocus"] }, { kind: "directive", type: i5.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"] }] });
9249
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheLinkEditComponent, decorators: [{
9247
9250
  type: Component,
9248
9251
  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" }]
9249
9252
  }], ctorParameters: function () { return [{ type: i1$1.ThyPopoverRef }]; }, propDecorators: { className: [{
@@ -9265,12 +9268,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
9265
9268
  }] } });
9266
9269
 
9267
9270
  class TheBaseLinkComponent extends TheBaseElementComponent {
9268
- get linkHoverOpened() {
9269
- return this.thyPopoverHoverRef && this.thyPopoverHoverRef.componentInstance;
9270
- }
9271
- get linkEditOpened() {
9272
- return this.thyPopoverEditRef && this.thyPopoverEditRef.componentInstance;
9273
- }
9274
9271
  constructor(elementRef, cdr, thyPopover, overlay, viewContainerRef) {
9275
9272
  super(elementRef, cdr);
9276
9273
  this.elementRef = elementRef;
@@ -9287,6 +9284,12 @@ class TheBaseLinkComponent extends TheBaseElementComponent {
9287
9284
  }
9288
9285
  };
9289
9286
  }
9287
+ get linkHoverOpened() {
9288
+ return this.thyPopoverHoverRef && this.thyPopoverHoverRef.componentInstance;
9289
+ }
9290
+ get linkEditOpened() {
9291
+ return this.thyPopoverEditRef && this.thyPopoverEditRef.componentInstance;
9292
+ }
9290
9293
  ngOnInit() {
9291
9294
  super.ngOnInit();
9292
9295
  }
@@ -9382,9 +9385,9 @@ class TheBaseLinkComponent extends TheBaseElementComponent {
9382
9385
  this.close(LinkCloseTypes.destroy);
9383
9386
  }
9384
9387
  }
9385
- TheBaseLinkComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", 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 });
9386
- TheBaseLinkComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.2", type: TheBaseLinkComponent, selector: "[TheBaseLinkComponent]", host: { listeners: { "click": "mousedownHandle($event)" } }, usesInheritance: true, ngImport: i0, template: '', isInline: true });
9387
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheBaseLinkComponent, decorators: [{
9388
+ 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 });
9389
+ 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 });
9390
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheBaseLinkComponent, decorators: [{
9388
9391
  type: Component,
9389
9392
  args: [{
9390
9393
  selector: '[TheBaseLinkComponent]',
@@ -9402,11 +9405,11 @@ class TheLinkComponent extends TheBaseLinkComponent {
9402
9405
  this.inlineChromiumBugfix = String.fromCodePoint(160);
9403
9406
  }
9404
9407
  }
9405
- TheLinkComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheLinkComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
9406
- TheLinkComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.2", 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>
9408
+ TheLinkComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheLinkComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
9409
+ 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>
9407
9410
  <span><slate-children [children]="children" [context]="childrenContext" [viewContext]="viewContext"></slate-children></span>
9408
9411
  <span contenteditable="false" class="the-break-char">{{ inlineChromiumBugfix }}</span>`, isInline: true, dependencies: [{ kind: "component", type: i1.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }] });
9409
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheLinkComponent, decorators: [{
9412
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheLinkComponent, decorators: [{
9410
9413
  type: Component,
9411
9414
  args: [{
9412
9415
  selector: 'a[theLink]',
@@ -10045,6 +10048,11 @@ function onKeyDownList(e, editor) {
10045
10048
  }
10046
10049
 
10047
10050
  class TheNumberedListComponent extends TheBaseElementComponent {
10051
+ constructor(elementRef, cdr) {
10052
+ super(elementRef, cdr);
10053
+ this.elementRef = elementRef;
10054
+ this.cdr = cdr;
10055
+ }
10048
10056
  get start() {
10049
10057
  return this.element.start;
10050
10058
  }
@@ -10052,11 +10060,6 @@ class TheNumberedListComponent extends TheBaseElementComponent {
10052
10060
  var _a;
10053
10061
  return ((_a = this.element) === null || _a === void 0 ? void 0 : _a.indent) || null;
10054
10062
  }
10055
- constructor(elementRef, cdr) {
10056
- super(elementRef, cdr);
10057
- this.elementRef = elementRef;
10058
- this.cdr = cdr;
10059
- }
10060
10063
  ngOnInit() {
10061
10064
  super.ngOnInit();
10062
10065
  }
@@ -10064,9 +10067,9 @@ class TheNumberedListComponent extends TheBaseElementComponent {
10064
10067
  super.ngOnDestroy();
10065
10068
  }
10066
10069
  }
10067
- TheNumberedListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheNumberedListComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
10068
- TheNumberedListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.2", 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"] }] });
10069
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheNumberedListComponent, decorators: [{
10070
+ 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 });
10071
+ 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"] }] });
10072
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheNumberedListComponent, decorators: [{
10070
10073
  type: Component,
10071
10074
  args: [{
10072
10075
  selector: 'ol[theOl]',
@@ -10081,15 +10084,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
10081
10084
  }] } });
10082
10085
 
10083
10086
  class TheBulletedListComponent extends TheBaseElementComponent {
10084
- get level() {
10085
- var _a;
10086
- return ((_a = this.element) === null || _a === void 0 ? void 0 : _a.indent) || null;
10087
- }
10088
10087
  constructor(elementRef, cdr) {
10089
10088
  super(elementRef, cdr);
10090
10089
  this.elementRef = elementRef;
10091
10090
  this.cdr = cdr;
10092
10091
  }
10092
+ get level() {
10093
+ var _a;
10094
+ return ((_a = this.element) === null || _a === void 0 ? void 0 : _a.indent) || null;
10095
+ }
10093
10096
  ngOnInit() {
10094
10097
  super.ngOnInit();
10095
10098
  }
@@ -10097,9 +10100,9 @@ class TheBulletedListComponent extends TheBaseElementComponent {
10097
10100
  super.ngOnDestroy();
10098
10101
  }
10099
10102
  }
10100
- TheBulletedListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheBulletedListComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
10101
- TheBulletedListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.2", 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"] }] });
10102
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheBulletedListComponent, decorators: [{
10103
+ 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 });
10104
+ 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"] }] });
10105
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheBulletedListComponent, decorators: [{
10103
10106
  type: Component,
10104
10107
  args: [{
10105
10108
  selector: 'ul[theUl]',
@@ -10187,9 +10190,9 @@ class TheListItemComponent extends TheBaseElementComponent {
10187
10190
  }
10188
10191
  }
10189
10192
  }
10190
- TheListItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheListItemComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
10191
- TheListItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.2", 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"] }] });
10192
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheListItemComponent, decorators: [{
10193
+ 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 });
10194
+ 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"] }] });
10195
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheListItemComponent, decorators: [{
10193
10196
  type: Component,
10194
10197
  args: [{
10195
10198
  selector: 'li[theLi]',
@@ -10941,6 +10944,13 @@ const SLA_TABLE_SELECTOR = '.slate-element-table';
10941
10944
  const SLA_TABLE_CELL_SELECTOR = '.slate-element-table-cell';
10942
10945
 
10943
10946
  class TheToolbarGroupComponent {
10947
+ constructor(elementRef, thyPopover, viewContainerRef) {
10948
+ this.elementRef = elementRef;
10949
+ this.thyPopover = thyPopover;
10950
+ this.viewContainerRef = viewContainerRef;
10951
+ this.className = 'the-toolbar-group';
10952
+ this.active = false;
10953
+ }
10944
10954
  set item(i) {
10945
10955
  this._item = i;
10946
10956
  this.activeMenuItem = i;
@@ -10965,13 +10975,6 @@ class TheToolbarGroupComponent {
10965
10975
  clickHandle(event) {
10966
10976
  event.stopPropagation();
10967
10977
  }
10968
- constructor(elementRef, thyPopover, viewContainerRef) {
10969
- this.elementRef = elementRef;
10970
- this.thyPopover = thyPopover;
10971
- this.viewContainerRef = viewContainerRef;
10972
- this.className = 'the-toolbar-group';
10973
- this.active = false;
10974
- }
10975
10978
  ngOnInit() { }
10976
10979
  ngOnDestroy() {
10977
10980
  this.closeGroup();
@@ -11032,9 +11035,9 @@ class TheToolbarGroupComponent {
11032
11035
  }
11033
11036
  }
11034
11037
  }
11035
- TheToolbarGroupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheToolbarGroupComponent, deps: [{ token: i0.ElementRef }, { token: i1$1.ThyPopover }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component });
11036
- TheToolbarGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.2", 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: i7.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"] }] });
11037
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheToolbarGroupComponent, decorators: [{
11038
+ 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 });
11039
+ 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: i7.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"] }] });
11040
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheToolbarGroupComponent, decorators: [{
11038
11041
  type: Component,
11039
11042
  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" }]
11040
11043
  }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1$1.ThyPopover }, { type: i0.ViewContainerRef }]; }, propDecorators: { className: [{
@@ -11080,9 +11083,9 @@ class ColumnResizeNotifierSource {
11080
11083
  this.triggerResize = new Subject();
11081
11084
  }
11082
11085
  }
11083
- ColumnResizeNotifierSource.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: ColumnResizeNotifierSource, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
11084
- ColumnResizeNotifierSource.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: ColumnResizeNotifierSource });
11085
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: ColumnResizeNotifierSource, decorators: [{
11086
+ ColumnResizeNotifierSource.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ColumnResizeNotifierSource, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
11087
+ ColumnResizeNotifierSource.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ColumnResizeNotifierSource });
11088
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ColumnResizeNotifierSource, decorators: [{
11086
11089
  type: Injectable
11087
11090
  }] });
11088
11091
 
@@ -11132,16 +11135,14 @@ class TableCellEventDispatcher {
11132
11135
  }));
11133
11136
  }
11134
11137
  }
11135
- TableCellEventDispatcher.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TableCellEventDispatcher, deps: [{ token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });
11136
- TableCellEventDispatcher.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TableCellEventDispatcher });
11137
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TableCellEventDispatcher, decorators: [{
11138
+ TableCellEventDispatcher.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TableCellEventDispatcher, deps: [{ token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });
11139
+ TableCellEventDispatcher.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TableCellEventDispatcher });
11140
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TableCellEventDispatcher, decorators: [{
11138
11141
  type: Injectable
11139
11142
  }], ctorParameters: function () { return [{ type: i0.NgZone }]; } });
11140
11143
 
11141
11144
  function splitCell(editor) {
11142
- const opts = new TableOptions();
11143
- const { anchor } = editor.selection;
11144
- const tablePosition = TablePosition.create(opts, editor, anchor.path);
11145
+ const tablePosition = createTablePosition(editor);
11145
11146
  const { cell, table, cellEntry } = tablePosition;
11146
11147
  if ((!cell.rowspan && !cell.colspan) || (cell.rowspan === 1 && cell.colspan === 1))
11147
11148
  return editor;
@@ -11167,9 +11168,7 @@ function resetTableCell(editor, table, cell, cellRow, cellCol) {
11167
11168
  }
11168
11169
 
11169
11170
  function getSelectCellNode(editor, selectedCells) {
11170
- const { anchor } = editor.selection;
11171
- const opts = new TableOptions();
11172
- const pos = TablePosition.create(opts, editor, anchor.path);
11171
+ const pos = createTablePosition(editor);
11173
11172
  return selectedCells
11174
11173
  .map(item => {
11175
11174
  const node = pos.findCellByPath(item);
@@ -11180,12 +11179,48 @@ function getSelectCellNode(editor, selectedCells) {
11180
11179
  .filter(item => item);
11181
11180
  }
11182
11181
 
11182
+ /* cell-position 有关的函数 */
11183
+ const isSelectedAllCell = (editor, selectedCellPositions) => {
11184
+ const pos = createTablePosition(editor);
11185
+ return !!selectedCellPositions.length && pos.getHeight() * pos.getWidth() === selectedCellPositions.length;
11186
+ };
11187
+ const getSelectedCellPositions = (editor, selectedCells) => {
11188
+ return selectedCells === null || selectedCells === void 0 ? void 0 : selectedCells.map((cell) => {
11189
+ const path = AngularEditor.findPath(editor, cell);
11190
+ const [row, col] = path.slice(-2);
11191
+ return { row, col };
11192
+ });
11193
+ };
11194
+ /* 获取一定范围内所有的单元格 */
11195
+ const getCellPositionsFromRange = (startRow, startCol, endRow, endCol) => {
11196
+ const result = [];
11197
+ for (let row = startRow; row < endRow; row++) {
11198
+ for (let col = startCol; col < endCol; col++) {
11199
+ result.push({ row, col });
11200
+ }
11201
+ }
11202
+ return result;
11203
+ };
11204
+ /**
11205
+ * 去重重复的单元格位置
11206
+ * @returns
11207
+ */
11208
+ const uniqueCellPosition = (cells, selectedCellPositions) => {
11209
+ const result = [];
11210
+ const modCells = new Set();
11211
+ cells.concat(selectedCellPositions).forEach(cell => modCells.add(JSON.stringify(cell)));
11212
+ modCells.forEach((cell) => result.push(JSON.parse(cell)));
11213
+ return result;
11214
+ };
11215
+
11183
11216
  function isSelectedCellMerged(editor) {
11184
11217
  if (editor && editor.selection) {
11185
11218
  const opts = new TableOptions();
11186
11219
  const { anchor } = editor.selection;
11187
11220
  const { cell } = TablePosition.create(opts, editor, anchor.path);
11188
- return (cell.colspan && cell.colspan !== 1) || (cell.rowspan && cell.rowspan !== 1);
11221
+ if (cell) {
11222
+ return (cell.colspan && cell.colspan !== 1) || (cell.rowspan && cell.rowspan !== 1);
11223
+ }
11189
11224
  }
11190
11225
  return false;
11191
11226
  }
@@ -11265,6 +11300,17 @@ function mergeCellContent(editor, leftTopCellPath, cellPath) {
11265
11300
  });
11266
11301
  });
11267
11302
  }
11303
+ // 计算合并前的单元格
11304
+ function getCellPositionsBeforeMerge(editor, { row, col }) {
11305
+ const pos = createTablePosition(editor);
11306
+ const { rowspan, colspan } = pos.findCellByPath({ row, col });
11307
+ if (rowspan || colspan) {
11308
+ const colSpan = colspan !== null && colspan !== void 0 ? colspan : 1;
11309
+ const rowSpan = rowspan !== null && rowspan !== void 0 ? rowspan : 1;
11310
+ return getCellPositionsFromRange(row, col, row + rowSpan, col + colSpan);
11311
+ }
11312
+ return [{ row, col }];
11313
+ }
11268
11314
 
11269
11315
  function setCellMenuVisibility(editor, menuList, tableInfo) {
11270
11316
  const { selectedCellPositions, isFullscreen, isSelectedTable, selectedRowsIndex, selectedColumnsIndex } = tableInfo;
@@ -11307,6 +11353,12 @@ function setCellMenuVisibility(editor, menuList, tableInfo) {
11307
11353
  }
11308
11354
 
11309
11355
  class TheContextMenuComponent {
11356
+ constructor(elementRef, thyPopoverRef) {
11357
+ this.elementRef = elementRef;
11358
+ this.thyPopoverRef = thyPopoverRef;
11359
+ this.menuEntities = [];
11360
+ this.wrap = true;
11361
+ }
11310
11362
  handleDocumentMouseDown(event) {
11311
11363
  if (!this.elementRef.nativeElement.contains(event.target) && event.button !== 2) {
11312
11364
  this.thyPopoverRef.close();
@@ -11338,17 +11390,11 @@ class TheContextMenuComponent {
11338
11390
  this.actionHandle(entity);
11339
11391
  this.thyPopoverRef.close();
11340
11392
  }
11341
- constructor(elementRef, thyPopoverRef) {
11342
- this.elementRef = elementRef;
11343
- this.thyPopoverRef = thyPopoverRef;
11344
- this.menuEntities = [];
11345
- this.wrap = true;
11346
- }
11347
11393
  ngOnInit() { }
11348
11394
  }
11349
- TheContextMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheContextMenuComponent, deps: [{ token: i0.ElementRef }, { token: i1$1.ThyPopoverRef }], target: i0.ɵɵFactoryTarget.Component });
11350
- TheContextMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.2", 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)=\"itemEnterHandle($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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.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.ThyEnterDirective, selector: "[thyEnter]", outputs: ["thyEnter"] }, { kind: "directive", type: i5$1.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$1.ThyInputNumberComponent, selector: "thy-input-number", inputs: ["thyAutoFocus", "thyPlaceholder", "thyDisabled", "thyMax", "thyMin", "thyStep", "thySize", "thyPrecision", "thySuffix"], outputs: ["thyBlur", "thyFocus"] }] });
11351
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheContextMenuComponent, decorators: [{
11395
+ 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 });
11396
+ 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)=\"itemEnterHandle($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$1.ThyEnterDirective, selector: "[thyEnter]", outputs: ["thyEnter"] }, { kind: "directive", type: i5$1.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$1.ThyInputNumberComponent, selector: "thy-input-number", inputs: ["thyAutoFocus", "thyPlaceholder", "thyDisabled", "thyMax", "thyMin", "thyStep", "thySize", "thyPrecision", "thySuffix"], outputs: ["thyBlur", "thyFocus"] }] });
11397
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheContextMenuComponent, decorators: [{
11352
11398
  type: Component,
11353
11399
  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)=\"itemEnterHandle($event, item)\"\n thyStopPropagation\n ></thy-input-number>\n {{ item.nameSuffix }}\n </span>\n </a>\n</ng-template>\n" }]
11354
11400
  }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1$1.ThyPopoverRef }]; }, propDecorators: { menuEntities: [{
@@ -11370,13 +11416,87 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
11370
11416
  args: ['mousedown', ['$event']]
11371
11417
  }] } });
11372
11418
 
11373
- class TableStore {
11374
- get selectedCellPositions() {
11375
- return this.getSelectedCellPositions();
11419
+ const getTableEntry = (editor) => {
11420
+ const { tableEntry } = createTablePosition(editor);
11421
+ return tableEntry;
11422
+ };
11423
+ const getTablePath = (editor) => {
11424
+ const tableEntry = getTableEntry(editor);
11425
+ return tableEntry[1];
11426
+ };
11427
+ const getTable = (editor) => {
11428
+ const { tableEntry } = createTablePosition(editor);
11429
+ return tableEntry[0];
11430
+ };
11431
+ const getSelectedCell = (editor) => {
11432
+ if (editor && editor.selection) {
11433
+ const { cell } = createTablePosition(editor);
11434
+ return cell;
11376
11435
  }
11377
- get dangerousCells() {
11378
- return this.dangerousCells$.getValue();
11436
+ return null;
11437
+ };
11438
+
11439
+ const getMinAndMaxCellIndex = (editor, selectedCellPositions, maxRow, maxCol, minRow, minCol, table) => {
11440
+ const beforeCols = [];
11441
+ const beforeRows = [];
11442
+ let spanSelectedCells = [];
11443
+ if (selectedCellPositions.length) {
11444
+ spanSelectedCells = selectedCellPositions
11445
+ .map(item => {
11446
+ const { row, col } = item;
11447
+ const node = table.children[row].children[col];
11448
+ if (!node.hidden) {
11449
+ return Object.assign(Object.assign({}, item), { colspan: node.colspan || 1, rowspan: node.rowspan || 1 });
11450
+ }
11451
+ })
11452
+ .filter(item => item);
11453
+ }
11454
+ table.children.map((row, rowIndex) => {
11455
+ if (rowIndex <= maxRow) {
11456
+ row.children.map((cell, colIndex) => {
11457
+ if (colIndex <= maxCol) {
11458
+ const cellRowIndex = rowIndex + (cell.rowspan || 1) - 1;
11459
+ const cellColIndex = colIndex + (cell.colspan || 1) - 1;
11460
+ if (spanSelectedCells.length) {
11461
+ const { row: selectRow, col: selectCol, rowspan: selectRowspan, colspan: selectColspan } = spanSelectedCells[0];
11462
+ if (selectRow + selectRowspan - 1 >= minRow && selectCol + selectColspan - 1 >= minCol) {
11463
+ minRow = Math.min(spanSelectedCells[0].row, minRow);
11464
+ minCol = Math.min(spanSelectedCells[0].col, minCol);
11465
+ }
11466
+ }
11467
+ if (cell.colspan && cell.colspan > 1) {
11468
+ beforeCols.push({ rowIndex, colIndex, cellColIndex });
11469
+ if (cellColIndex >= minCol && cellRowIndex >= minRow) {
11470
+ maxCol = Math.max(maxCol, cellColIndex);
11471
+ minCol = Math.min(minCol, colIndex);
11472
+ }
11473
+ }
11474
+ if (cell.rowspan && cell.rowspan > 1) {
11475
+ beforeRows.push({ rowIndex, colIndex, cellRowIndex });
11476
+ if (cellColIndex >= minCol && cellRowIndex >= minRow) {
11477
+ minRow = Math.min(minRow, rowIndex);
11478
+ maxRow = Math.max(maxRow, cellRowIndex);
11479
+ }
11480
+ }
11481
+ }
11482
+ });
11483
+ }
11484
+ });
11485
+ // 判断选区范围内之前的单元格 如果存在cellColIndex === minCol,表示当前获取的minCol并不是最小的,重新获取minCol
11486
+ const colNode = beforeCols.filter(item => item.rowIndex <= maxRow && item.colIndex <= maxCol && item.rowIndex >= minRow && item.cellColIndex === minCol);
11487
+ const rowNode = beforeRows.filter(item => item.rowIndex <= maxRow && item.colIndex <= maxCol && item.colIndex >= minCol && item.cellRowIndex === minRow);
11488
+ if (colNode.length || rowNode.length) {
11489
+ return getMinAndMaxCellIndex(editor, selectedCellPositions, maxRow, maxCol, minRow, minCol, table);
11379
11490
  }
11491
+ return {
11492
+ minRow,
11493
+ maxRow,
11494
+ minCol,
11495
+ maxCol
11496
+ };
11497
+ };
11498
+
11499
+ class TableStore {
11380
11500
  constructor() {
11381
11501
  this.selectedCells$ = new BehaviorSubject([]);
11382
11502
  this.dangerousCells$ = new BehaviorSubject([]);
@@ -11391,45 +11511,35 @@ class TableStore {
11391
11511
  this.isRightClicking = false;
11392
11512
  this.pointerSelection = false;
11393
11513
  this.isSelectedAllCell = () => {
11394
- const pos = this.createTablePosition();
11395
- return !!this.selectedCellPositions.length && pos.getHeight() * pos.getWidth() === this.selectedCellPositions.length;
11396
- };
11397
- this.createTablePosition = () => {
11398
- const { path } = this.editor.selection.anchor;
11399
- const opts = new TableOptions();
11400
- return TablePosition.create(opts, this.editor, path);
11514
+ if (!this.editor.selection)
11515
+ return false;
11516
+ const pos = createTablePosition(this.editor);
11517
+ const selectedCellPositions = this.getSelectedCellPositions();
11518
+ return !!selectedCellPositions.length && pos.getHeight() * pos.getWidth() === selectedCellPositions.length;
11401
11519
  };
11402
11520
  }
11403
- getTableEntry() {
11404
- const { tableEntry } = this.createTablePosition();
11405
- return tableEntry;
11406
- }
11407
- getTablePath() {
11408
- const tableEntry = this.getTableEntry();
11409
- return tableEntry[1];
11521
+ get dangerousCells() {
11522
+ return this.dangerousCells$.getValue();
11410
11523
  }
11411
11524
  getSelectedCellPositions() {
11412
- return this.selectedCells$.getValue().map((cell) => {
11413
- const path = AngularEditor.findPath(this.editor, cell);
11414
- const [row, col] = path.slice(-2);
11415
- return { row, col };
11416
- });
11525
+ return getSelectedCellPositions(this.editor, this.selectedCells$.getValue());
11417
11526
  }
11418
- calculateSelectedColumnsAndRowIndex() {
11527
+ setSelectedColumnsAndRowIndex() {
11419
11528
  var _a;
11420
11529
  if (!((_a = this.editor) === null || _a === void 0 ? void 0 : _a.selection)) {
11421
11530
  return;
11422
11531
  }
11423
- const pos = this.createTablePosition();
11532
+ const pos = createTablePosition(this.editor);
11424
11533
  if (!(pos === null || pos === void 0 ? void 0 : pos.table)) {
11425
11534
  return;
11426
11535
  }
11427
11536
  const mergeBeforeCells = [];
11428
- this.selectedCellPositions.forEach(({ row, col }) => {
11537
+ const selectedCellPositions = this.getSelectedCellPositions();
11538
+ selectedCellPositions.forEach(({ row, col }) => {
11429
11539
  // 计算合并单元格数据时,要按合并前的数据处理
11430
- mergeBeforeCells.push(...this.getCellPositionsBeforeMerge({ row, col }));
11540
+ mergeBeforeCells.push(...getCellPositionsBeforeMerge(this.editor, { row, col }));
11431
11541
  });
11432
- const cells = this.uniqueCellPosition(mergeBeforeCells);
11542
+ const cells = uniqueCellPosition(mergeBeforeCells, selectedCellPositions);
11433
11543
  const rowGroup = groupBy(cells, ({ row }) => row);
11434
11544
  const colGroup = groupBy(cells, ({ col }) => col);
11435
11545
  this.selectedRowsIndex = [];
@@ -11446,7 +11556,7 @@ class TableStore {
11446
11556
  }
11447
11557
  this.selectedRowsIndex = uniq(this.selectedRowsIndex);
11448
11558
  this.selectedColumnsIndex = uniq(this.selectedColumnsIndex);
11449
- if (this.selectedRowsIndex.length === pos.getHeight() && this.selectedColumnsIndex.length === pos.getWidth()) {
11559
+ if (isSelectedAllCell(this.editor, selectedCellPositions)) {
11450
11560
  this.isSelectedTable = true;
11451
11561
  }
11452
11562
  else {
@@ -11454,64 +11564,40 @@ class TableStore {
11454
11564
  }
11455
11565
  }
11456
11566
  setSelectedCells(cells, pos) {
11457
- const uniqueCells = this.pointerSelection ? this.uniqueCellPosition(cells) : cells;
11567
+ const uniqueCells = this.pointerSelection ? uniqueCellPosition(cells, this.getSelectedCellPositions()) : cells;
11458
11568
  const cellElements = uniqueCells.map(cell => {
11459
11569
  return pos.findCellByPath(cell);
11460
11570
  });
11461
11571
  this.selectedCells$.next(cellElements);
11462
- this.calculateSelectedColumnsAndRowIndex();
11572
+ this.setSelectedColumnsAndRowIndex();
11463
11573
  }
11464
11574
  initEditor(editor) {
11465
11575
  this.editor = editor;
11466
11576
  }
11467
- /**
11468
- * 去重重复的单元格位置
11469
- * @returns
11470
- */
11471
- uniqueCellPosition(cells) {
11472
- const result = [];
11473
- const modCells = new Set();
11474
- cells.concat(this.selectedCellPositions).forEach(cell => modCells.add(JSON.stringify(cell)));
11475
- modCells.forEach((cell) => result.push(JSON.parse(cell)));
11476
- return result;
11477
- }
11478
- /**
11479
- * 获取一定范围内所有的单元格
11480
- * @returns
11481
- */
11482
- getCellPositionsFromRange(startRow, startCol, endRow, endCol) {
11483
- const result = [];
11484
- for (let row = startRow; row < endRow; row++) {
11485
- for (let col = startCol; col < endCol; col++) {
11486
- result.push({ row, col });
11487
- }
11488
- }
11489
- return result;
11490
- }
11491
11577
  selectRow(editor, index) {
11492
11578
  this.clearLastFocusPath();
11493
- const pos = this.createTablePosition();
11494
- const cells = this.getCellPositionsFromRange(index, 0, index + 1, pos.getWidth());
11579
+ const pos = createTablePosition(editor);
11580
+ const cells = getCellPositionsFromRange(index, 0, index + 1, pos.getWidth());
11495
11581
  this.setSelectedCells(cells, pos);
11496
11582
  this.focusCell(editor, pos.tableEntry[1].concat([index, 0]));
11497
11583
  }
11498
11584
  selectColumn(editor, index) {
11499
11585
  this.clearLastFocusPath();
11500
- const pos = this.createTablePosition();
11501
- const cells = this.getCellPositionsFromRange(0, index, pos.getHeight(), index + 1);
11586
+ const pos = createTablePosition(editor);
11587
+ const cells = getCellPositionsFromRange(0, index, pos.getHeight(), index + 1);
11502
11588
  this.setSelectedCells(cells, pos);
11503
11589
  this.focusCell(editor, pos.tableEntry[1].concat([0, index]));
11504
11590
  }
11505
11591
  selectTable(editor) {
11506
11592
  this.isSelectedTable = true;
11507
- const pos = this.createTablePosition();
11508
- const cells = this.getCellPositionsFromRange(0, 0, pos.getHeight(), pos.getWidth());
11593
+ const pos = createTablePosition(editor);
11594
+ const cells = getCellPositionsFromRange(0, 0, pos.getHeight(), pos.getWidth());
11509
11595
  this.setSelectedCells(cells, pos);
11510
11596
  this.focusCell(editor, pos.tableEntry[1].concat([0, 0]));
11511
11597
  }
11512
11598
  // 拖选
11513
11599
  selectCells(editor) {
11514
- const pos = this.createTablePosition();
11600
+ const pos = createTablePosition(editor);
11515
11601
  const anchorPath = this.anchorCellPath.slice(-2);
11516
11602
  const focusPath = this.focusCellPath.slice(-2);
11517
11603
  const rows = [anchorPath[0], focusPath[0]].sort((m, n) => m - n);
@@ -11524,69 +11610,10 @@ class TableStore {
11524
11610
  const focusCol = focusPath[1] + (focusColspanCount || 1) - 1;
11525
11611
  let initMaxCol = Math.max(anchorCol, focusCol);
11526
11612
  let initMaxRow = Math.max(anchorRow, focusRow);
11527
- const { minRow, maxRow, minCol, maxCol } = this.getMinAndMaxCellIndex(initMaxRow, initMaxCol, rows[0], columns[0], pos.table);
11528
- const cells = this.getCellPositionsFromRange(minRow, minCol, maxRow + 1, maxCol + 1);
11613
+ const { minRow, maxRow, minCol, maxCol } = getMinAndMaxCellIndex(this.editor, this.getSelectedCellPositions(), initMaxRow, initMaxCol, rows[0], columns[0], pos.table);
11614
+ const cells = getCellPositionsFromRange(minRow, minCol, maxRow + 1, maxCol + 1);
11529
11615
  this.setSelectedCells(cells, pos);
11530
11616
  }
11531
- getMinAndMaxCellIndex(maxRow, maxCol, minRow, minCol, table) {
11532
- const beforeCols = [];
11533
- const beforeRows = [];
11534
- let spanSelectedCells = [];
11535
- if (this.selectedCellPositions.length) {
11536
- spanSelectedCells = this.selectedCellPositions
11537
- .map(item => {
11538
- const { row, col } = item;
11539
- const node = table.children[row].children[col];
11540
- if (!node.hidden) {
11541
- return Object.assign(Object.assign({}, item), { colspan: node.colspan || 1, rowspan: node.rowspan || 1 });
11542
- }
11543
- })
11544
- .filter(item => item);
11545
- }
11546
- table.children.map((row, rowIndex) => {
11547
- if (rowIndex <= maxRow) {
11548
- row.children.map((cell, colIndex) => {
11549
- if (colIndex <= maxCol) {
11550
- const cellRowIndex = rowIndex + (cell.rowspan || 1) - 1;
11551
- const cellColIndex = colIndex + (cell.colspan || 1) - 1;
11552
- if (spanSelectedCells.length) {
11553
- const { row: selectRow, col: selectCol, rowspan: selectRowspan, colspan: selectColspan } = spanSelectedCells[0];
11554
- if (selectRow + selectRowspan - 1 >= minRow && selectCol + selectColspan - 1 >= minCol) {
11555
- minRow = Math.min(spanSelectedCells[0].row, minRow);
11556
- minCol = Math.min(spanSelectedCells[0].col, minCol);
11557
- }
11558
- }
11559
- if (cell.colspan && cell.colspan > 1) {
11560
- beforeCols.push({ rowIndex, colIndex, cellColIndex });
11561
- if (cellColIndex >= minCol && cellRowIndex >= minRow) {
11562
- maxCol = Math.max(maxCol, cellColIndex);
11563
- minCol = Math.min(minCol, colIndex);
11564
- }
11565
- }
11566
- if (cell.rowspan && cell.rowspan > 1) {
11567
- beforeRows.push({ rowIndex, colIndex, cellRowIndex });
11568
- if (cellColIndex >= minCol && cellRowIndex >= minRow) {
11569
- minRow = Math.min(minRow, rowIndex);
11570
- maxRow = Math.max(maxRow, cellRowIndex);
11571
- }
11572
- }
11573
- }
11574
- });
11575
- }
11576
- });
11577
- // 判断选区范围内之前的单元格 如果存在cellColIndex === minCol,表示当前获取的minCol并不是最小的,重新获取minCol
11578
- const colNode = beforeCols.filter(item => item.rowIndex <= maxRow && item.colIndex <= maxCol && item.rowIndex >= minRow && item.cellColIndex === minCol);
11579
- const rowNode = beforeRows.filter(item => item.rowIndex <= maxRow && item.colIndex <= maxCol && item.colIndex >= minCol && item.cellRowIndex === minRow);
11580
- if (colNode.length || rowNode.length) {
11581
- return this.getMinAndMaxCellIndex(maxRow, maxCol, minRow, minCol, table);
11582
- }
11583
- return {
11584
- minRow,
11585
- maxRow,
11586
- minCol,
11587
- maxCol
11588
- };
11589
- }
11590
11617
  // 选择单元格
11591
11618
  selectCell(cell, editor) {
11592
11619
  var _a;
@@ -11596,33 +11623,23 @@ class TableStore {
11596
11623
  this.focusCellPath = path;
11597
11624
  this.focusCellElement = cell;
11598
11625
  const [row, col] = path.slice(-2);
11599
- const pos = this.createTablePosition();
11626
+ const pos = createTablePosition(editor);
11600
11627
  const result = [{ row, col }];
11628
+ const selectedCellPositions = this.getSelectedCellPositions();
11601
11629
  if (this.pointerSelection) {
11602
- result.push(...this.selectedCellPositions);
11630
+ result.push(...selectedCellPositions);
11603
11631
  // 处理单元格选中时,处理为选中多单元格
11604
- const selectedCells = this.getCellPositionsBeforeMerge({ row, col });
11632
+ const selectedCells = getCellPositionsBeforeMerge(this.editor, { row, col });
11605
11633
  result.push(...selectedCells);
11606
11634
  // 已聚焦的单元格在多选模式下选中(暂存上次聚焦的单元格数据)
11607
11635
  const focusCell = (_a = this.lastFocusCellPath) === null || _a === void 0 ? void 0 : _a.slice(-2);
11608
11636
  if (focusCell) {
11609
- const focusCells = this.getCellPositionsBeforeMerge({ row: focusCell[0], col: focusCell[1] });
11637
+ const focusCells = getCellPositionsBeforeMerge(this.editor, { row: focusCell[0], col: focusCell[1] });
11610
11638
  result.push(...focusCells);
11611
11639
  }
11612
11640
  }
11613
11641
  this.setSelectedCells(result, pos);
11614
11642
  }
11615
- // 计算合并前的单元格
11616
- getCellPositionsBeforeMerge({ row, col }) {
11617
- const pos = this.createTablePosition();
11618
- const { rowspan, colspan } = pos.findCellByPath({ row, col });
11619
- if (rowspan || colspan) {
11620
- const colSpan = colspan !== null && colspan !== void 0 ? colspan : 1;
11621
- const rowSpan = rowspan !== null && rowspan !== void 0 ? rowspan : 1;
11622
- return this.getCellPositionsFromRange(row, col, row + rowSpan, col + colSpan);
11623
- }
11624
- return [{ row, col }];
11625
- }
11626
11643
  selectedCellsChange() {
11627
11644
  return this.selectedCells$.asObservable().pipe(skip(1));
11628
11645
  }
@@ -11676,9 +11693,10 @@ class TableStore {
11676
11693
  this.focusCellElement = cell;
11677
11694
  }
11678
11695
  else {
11696
+ const selectedCellPositions = this.getSelectedCellPositions();
11679
11697
  isChanged =
11680
11698
  !this.focusCellPath ||
11681
- (this.focusCellPath.toString() === this.anchorCellPath.toString() && this.selectedCellPositions.length === 0);
11699
+ (this.focusCellPath.toString() === this.anchorCellPath.toString() && selectedCellPositions.length === 0);
11682
11700
  }
11683
11701
  if (this.isPrepareSelecting && isChanged) {
11684
11702
  if (JSON.stringify(this.preFocusCellPath) !== JSON.stringify(this.focusCellPath)) {
@@ -11704,15 +11722,16 @@ class TableStore {
11704
11722
  return this.dangerousCells$.asObservable().pipe(skip(1));
11705
11723
  }
11706
11724
  setDangerousCells() {
11725
+ const selectedCellPositions = this.getSelectedCellPositions();
11707
11726
  this.dangerousRowsIndex = this.selectedRowsIndex;
11708
11727
  this.dangerousColumnsIndex = this.selectedColumnsIndex;
11709
- this.dangerousCells$.next(this.selectedCellPositions);
11728
+ this.dangerousCells$.next(selectedCellPositions);
11710
11729
  }
11711
11730
  clearDangerousCells() {
11712
11731
  this.dangerousRowsIndex = [];
11713
11732
  this.dangerousColumnsIndex = [];
11714
11733
  this.dangerousCells$.next([]);
11715
- const pos = this.createTablePosition();
11734
+ const pos = createTablePosition(this.editor);
11716
11735
  if (pos.table) {
11717
11736
  this.isSelectedTable = this.selectedRowsIndex.length === pos.getHeight() && this.selectedColumnsIndex.length === pos.getWidth();
11718
11737
  }
@@ -11721,9 +11740,10 @@ class TableStore {
11721
11740
  return merge(this.dangerousCells$.asObservable().pipe(skip(1)), this.selectedCells$.asObservable().pipe(skip(1)));
11722
11741
  }
11723
11742
  setDangerousRows() {
11724
- const cells = this.selectedCellPositions;
11743
+ const selectedCellPositions = this.getSelectedCellPositions();
11744
+ const cells = selectedCellPositions;
11725
11745
  const rows = uniq(map(cells, 'row')).valueOf();
11726
- const pos = this.createTablePosition();
11746
+ const pos = createTablePosition(this.editor);
11727
11747
  const result = [];
11728
11748
  this.dangerousRowsIndex = rows;
11729
11749
  this.isSelectedTable = rows.length === pos.getHeight();
@@ -11741,9 +11761,10 @@ class TableStore {
11741
11761
  this.dangerousCells$.next(result);
11742
11762
  }
11743
11763
  setDangerousColumns() {
11744
- const cells = this.selectedCellPositions;
11764
+ const selectedCellPositions = this.getSelectedCellPositions();
11765
+ const cells = selectedCellPositions;
11745
11766
  const cols = uniq(map(cells, 'col')).valueOf();
11746
- const pos = this.createTablePosition();
11767
+ const pos = createTablePosition(this.editor);
11747
11768
  const result = [];
11748
11769
  this.dangerousColumnsIndex = cols;
11749
11770
  this.isSelectedTable = cols.length === pos.getWidth();
@@ -11762,21 +11783,22 @@ class TableStore {
11762
11783
  }
11763
11784
  setDangerousTable() {
11764
11785
  this.isSelectedTable = true;
11765
- const pos = this.createTablePosition();
11766
- const cells = this.getCellPositionsFromRange(0, 0, pos.getHeight(), pos.getWidth());
11786
+ const pos = createTablePosition(this.editor);
11787
+ const cells = getCellPositionsFromRange(0, 0, pos.getHeight(), pos.getWidth());
11767
11788
  this.dangerousRowsIndex = [...Array(pos.getHeight())].map((_, i) => i);
11768
11789
  this.dangerousColumnsIndex = [...Array(pos.getWidth())].map((_, i) => i);
11769
11790
  this.dangerousCells$.next(cells);
11770
11791
  }
11771
11792
  selectFirstCell() {
11772
- const { row, col } = this.selectedCellPositions[0];
11773
- const tablePath = this.getTablePath();
11793
+ const selectedCellPositions = this.getSelectedCellPositions();
11794
+ const { row, col } = selectedCellPositions[0];
11795
+ const tablePath = getTablePath(this.editor);
11774
11796
  const path = Editor.start(this.editor, [...tablePath, row, col]);
11775
11797
  Transforms.select(this.editor, path);
11776
11798
  }
11777
11799
  setSelectedCellsBackgroundColor(backgroundColor) {
11778
- const cells = this.selectedCellPositions;
11779
- const tablePath = this.getTablePath();
11800
+ const tablePath = getTablePath(this.editor);
11801
+ const cells = this.getSelectedCellPositions();
11780
11802
  Editor.withoutNormalizing(this.editor, () => {
11781
11803
  for (const { row, col } of cells) {
11782
11804
  const cellPath = [...tablePath, row, col];
@@ -11784,16 +11806,9 @@ class TableStore {
11784
11806
  }
11785
11807
  });
11786
11808
  }
11787
- getSelectedCellBackgroundColor() {
11788
- if (this.editor && this.editor.selection) {
11789
- const { cell } = this.createTablePosition();
11790
- return cell && cell.backgroundColor;
11791
- }
11792
- return '';
11793
- }
11794
11809
  clearSelectedCellsContent() {
11795
- const cells = this.selectedCellPositions;
11796
- const tablePosition = this.createTablePosition();
11810
+ const cells = this.getSelectedCellPositions();
11811
+ const tablePosition = createTablePosition(this.editor);
11797
11812
  if (tablePosition.isInTable()) {
11798
11813
  Editor.withoutNormalizing(this.editor, () => {
11799
11814
  for (const { row, col } of cells) {
@@ -11805,12 +11820,9 @@ class TableStore {
11805
11820
  Transforms.select(this.editor, Editor.start(this.editor, tablePosition.cellEntry[1]));
11806
11821
  }
11807
11822
  }
11808
- mergeCell(editor) {
11809
- mergeCell(editor, this.selectedCellPositions);
11810
- }
11811
11823
  setTableOptions(editor, newOptions) {
11812
- const tablePosition = this.createTablePosition();
11813
- const tablePath = this.getTablePath();
11824
+ const tablePosition = createTablePosition(editor);
11825
+ const tablePath = getTablePath(this.editor);
11814
11826
  const table = tablePosition.table;
11815
11827
  const options = Object.assign(Object.assign({}, table.options), newOptions);
11816
11828
  Transforms.setNodes(editor, { options }, { at: tablePath });
@@ -11822,7 +11834,7 @@ class TableStore {
11822
11834
  removeColumnOrRows(selectedRowIndexs = this.selectedRowsIndex, selectedColumnIndexs = this.selectedColumnsIndex) {
11823
11835
  var _a;
11824
11836
  const { isSelectedTable } = this;
11825
- const tablePosition = this.createTablePosition();
11837
+ const tablePosition = createTablePosition(this.editor);
11826
11838
  if (isSelectedTable) {
11827
11839
  TableEditor.removeTable(this.editor);
11828
11840
  return;
@@ -11859,22 +11871,13 @@ class TableStore {
11859
11871
  }
11860
11872
  }
11861
11873
  }
11862
- TableStore.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TableStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
11863
- TableStore.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TableStore });
11864
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TableStore, decorators: [{
11874
+ TableStore.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TableStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
11875
+ TableStore.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TableStore });
11876
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TableStore, decorators: [{
11865
11877
  type: Injectable
11866
11878
  }], ctorParameters: function () { return []; } });
11867
11879
 
11868
11880
  class TheTableContextMenuService {
11869
- get isOpened() {
11870
- return this.menuRef && this.menuRef.componentInstance;
11871
- }
11872
- get editor() {
11873
- return this.tableStore && this.tableStore.editor;
11874
- }
11875
- get backgroundColor() {
11876
- return this.tableStore.getSelectedCellBackgroundColor();
11877
- }
11878
11881
  constructor(colorSelectService, tableStore, thyPopover, ngZone, theContextService) {
11879
11882
  this.colorSelectService = colorSelectService;
11880
11883
  this.tableStore = tableStore;
@@ -11990,7 +11993,7 @@ class TheTableContextMenuService {
11990
11993
  name: '合并单元格',
11991
11994
  visibility: true,
11992
11995
  actionHandle: () => {
11993
- this.tableStore.mergeCell(this.editor);
11996
+ mergeCell(this.editor, this.tableStore.getSelectedCellPositions());
11994
11997
  }
11995
11998
  },
11996
11999
  {
@@ -12048,8 +12051,18 @@ class TheTableContextMenuService {
12048
12051
  }
12049
12052
  ];
12050
12053
  }
12054
+ get isOpened() {
12055
+ return this.menuRef && this.menuRef.componentInstance;
12056
+ }
12057
+ get editor() {
12058
+ return this.tableStore && this.tableStore.editor;
12059
+ }
12060
+ get backgroundColor() {
12061
+ const cell = getSelectedCell(this.editor);
12062
+ return cell ? cell.backgroundColor : '';
12063
+ }
12051
12064
  getSelectedCell() {
12052
- const selectedCellPositions = this.tableStore.selectedCellPositions;
12065
+ const selectedCellPositions = this.tableStore.getSelectedCellPositions();
12053
12066
  const selectCellNodes = getSelectCellNode(this.editor, selectedCellPositions);
12054
12067
  sortCell(selectCellNodes);
12055
12068
  const leftCellDict = getLeftCellDict(selectCellNodes);
@@ -12065,14 +12078,15 @@ class TheTableContextMenuService {
12065
12078
  }
12066
12079
  openMenuList(event) {
12067
12080
  this.ngZone.run(() => {
12068
- const { selectedCellPositions, isFullscreen, selectedRowsIndex, selectedColumnsIndex, isSelectedTable } = this.tableStore;
12081
+ const { isFullscreen, selectedRowsIndex, selectedColumnsIndex, isSelectedTable } = this.tableStore;
12082
+ const selectedCellPositions = this.tableStore.getSelectedCellPositions();
12069
12083
  const tableInfo = { selectedCellPositions, isFullscreen, selectedRowsIndex, selectedColumnsIndex, isSelectedTable };
12070
12084
  const { row, col } = this.getSelectedCell();
12071
12085
  setCellMenuVisibility(this.editor, this.menuEntities, tableInfo);
12072
12086
  this.menuEntities.forEach(item => {
12073
12087
  switch (item.key) {
12074
12088
  case 'background-color':
12075
- item.backgroundColor = this.tableStore.getSelectedCellBackgroundColor();
12089
+ item.backgroundColor = this.backgroundColor;
12076
12090
  break;
12077
12091
  case TableInsertType.insertRowsUp:
12078
12092
  case TableInsertType.insertRowsDown:
@@ -12134,16 +12148,13 @@ class TheTableContextMenuService {
12134
12148
  }
12135
12149
  }
12136
12150
  }
12137
- TheTableContextMenuService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheTableContextMenuService, deps: [{ token: TheColorSelectService }, { token: TableStore }, { token: i1$1.ThyPopover }, { token: i0.NgZone }, { token: TheContextService }], target: i0.ɵɵFactoryTarget.Injectable });
12138
- TheTableContextMenuService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheTableContextMenuService });
12139
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheTableContextMenuService, decorators: [{
12151
+ 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 });
12152
+ TheTableContextMenuService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheTableContextMenuService });
12153
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheTableContextMenuService, decorators: [{
12140
12154
  type: Injectable
12141
12155
  }], ctorParameters: function () { return [{ type: TheColorSelectService }, { type: TableStore }, { type: i1$1.ThyPopover }, { type: i0.NgZone }, { type: TheContextService }]; } });
12142
12156
 
12143
12157
  class TheTableOptionsComponent {
12144
- get table() {
12145
- return this.tableStore && this.tableStore.getTableEntry()[0];
12146
- }
12147
12158
  constructor(popoverRef) {
12148
12159
  this.popoverRef = popoverRef;
12149
12160
  this.tableDropdownList = [
@@ -12164,6 +12175,9 @@ class TheTableOptionsComponent {
12164
12175
  ngOnInit() {
12165
12176
  this.setColumnOptions();
12166
12177
  }
12178
+ get table() {
12179
+ return getTable(this.editor);
12180
+ }
12167
12181
  setColumnOptions() {
12168
12182
  this.tableDropdownList.forEach(item => {
12169
12183
  const tableComponent = ELEMENT_TO_COMPONENT.get(this.table);
@@ -12190,8 +12204,8 @@ class TheTableOptionsComponent {
12190
12204
  }
12191
12205
  }
12192
12206
  }
12193
- TheTableOptionsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheTableOptionsComponent, deps: [{ token: i1$1.ThyPopoverRef }], target: i0.ɵɵFactoryTarget.Component });
12194
- TheTableOptionsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.2", type: TheTableOptionsComponent, selector: "the-table-options", inputs: { tableStore: "tableStore", editor: "editor" }, ngImport: i0, template: `
12207
+ 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 });
12208
+ 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: `
12195
12209
  <div class="thy-dropdown-menu table-drop-menu">
12196
12210
  <ng-container *ngFor="let option of tableDropdownList">
12197
12211
  <a thyDropdownMenuItem href="javascript:;" (mousedown)="setTableOptions($event, option)">
@@ -12202,8 +12216,8 @@ TheTableOptionsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0
12202
12216
  </a>
12203
12217
  </ng-container>
12204
12218
  </div>
12205
- `, 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]" }] });
12206
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheTableOptionsComponent, decorators: [{
12219
+ `, 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]" }] });
12220
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheTableOptionsComponent, decorators: [{
12207
12221
  type: Component,
12208
12222
  args: [{
12209
12223
  selector: 'the-table-options',
@@ -12227,15 +12241,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
12227
12241
  }] } });
12228
12242
 
12229
12243
  class TheTableToolbarComponent {
12230
- get editor() {
12231
- return this.tableStore && this.tableStore.editor;
12232
- }
12233
- get hasDivider() {
12234
- return this.cellMenuList.filter(item => item.visibility).length > 1;
12235
- }
12236
- get tableOptions() {
12237
- return getPluginOptions(this.editor, PluginKeys.table);
12238
- }
12239
12244
  constructor(ngZone, colorSelectService, thyPopover, popoverRef, thyNotifyService) {
12240
12245
  this.ngZone = ngZone;
12241
12246
  this.colorSelectService = colorSelectService;
@@ -12251,7 +12256,7 @@ class TheTableToolbarComponent {
12251
12256
  actionHandle: () => {
12252
12257
  event.preventDefault();
12253
12258
  event.stopPropagation();
12254
- this.tableStore.mergeCell(this.editor);
12259
+ mergeCell(this.editor, this.tableStore.getSelectedCellPositions());
12255
12260
  this.popoverRef.close();
12256
12261
  this.tableStore.clearSelectedCells();
12257
12262
  }
@@ -12271,15 +12276,25 @@ class TheTableToolbarComponent {
12271
12276
  }
12272
12277
  ];
12273
12278
  }
12279
+ get editor() {
12280
+ return this.tableStore && this.tableStore.editor;
12281
+ }
12282
+ get hasDivider() {
12283
+ return this.cellMenuList.filter(item => item.visibility).length > 1;
12284
+ }
12285
+ get tableOptions() {
12286
+ return getPluginOptions(this.editor, PluginKeys.table);
12287
+ }
12274
12288
  ngOnInit() {
12275
12289
  var _a, _b, _c;
12276
12290
  this.isColumnEqual = (_c = (_b = (_a = this.tableElement) === null || _a === void 0 ? void 0 : _a.columns) === null || _b === void 0 ? void 0 : _b.every(col => this.tableElement.columns[0].width === col.width)) !== null && _c !== void 0 ? _c : true;
12277
- const { selectedCellPositions, isSelectedTable } = this.tableStore;
12278
- const tableInfo = { selectedCellPositions, isSelectedTable };
12291
+ const selectedCellPositions = this.tableStore.getSelectedCellPositions();
12292
+ const tableInfo = { selectedCellPositions, isSelectedTable: this.tableStore.isSelectedTable };
12279
12293
  this.isRectangle = isRectangularInTableCells(this.editor, selectedCellPositions);
12280
12294
  this.setDeleteIcon();
12281
12295
  setCellMenuVisibility(this.editor, this.cellMenuList, tableInfo);
12282
- this.selectedColor = this.tableStore.getSelectedCellBackgroundColor();
12296
+ const cell = getSelectedCell(this.editor);
12297
+ this.selectedColor = cell ? cell.backgroundColor : '';
12283
12298
  const path = TheEditor.findPath(this.editor, this.tableElement);
12284
12299
  this.tableChangeSubscriber = this.tableStore.tableChange().subscribe(() => {
12285
12300
  var _a;
@@ -12293,8 +12308,9 @@ class TheTableToolbarComponent {
12293
12308
  this.colorSelectService.closeColorSelect();
12294
12309
  }
12295
12310
  setDeleteIcon() {
12296
- const { selectedCellPositions, selectedRowsIndex, selectedColumnsIndex, createTablePosition } = this.tableStore;
12297
- const pos = createTablePosition();
12311
+ const { selectedRowsIndex, selectedColumnsIndex } = this.tableStore;
12312
+ const selectedCellPositions = this.tableStore.getSelectedCellPositions();
12313
+ const pos = createTablePosition(this.editor);
12298
12314
  if (this.tableStore.selectedRowsIndex.length > 0) {
12299
12315
  this.deleteIcon = DeleteIcon['table-delete-rows'];
12300
12316
  this.iconName = '删除整行';
@@ -12391,9 +12407,9 @@ class TheTableToolbarComponent {
12391
12407
  });
12392
12408
  }
12393
12409
  }
12394
- TheTableToolbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheTableToolbarComponent, deps: [{ token: i0.NgZone }, { token: TheColorSelectService }, { token: i1$1.ThyPopover }, { token: i1$1.ThyPopoverRef }, { token: i1$2.ThyNotifyService }], target: i0.ɵɵFactoryTarget.Component });
12395
- TheTableToolbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.2", type: TheTableToolbarComponent, selector: "the-table-toolbar", inputs: { tableStore: "tableStore", 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 && !isColumnEqual\"\n thyAction\n thyTooltip=\"\u5217\u7B49\u5BBD\"\n (mousedown)=\"setEquallyColumnHandle($event)\"\n >\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 <a\n *ngIf=\"tableStore.isSelectedTable && !tableStore?.isFullscreen\"\n class=\"fullscreen-hidden\"\n href=\"javascript:;\"\n thyAction\n thyActionIcon=\"copy\"\n thyTooltip=\"\u590D\u5236\"\n (mousedown)=\"onCopy($event)\"\n ></a>\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 <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: i7.ThyActionComponent, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }, { kind: "component", type: i7.ThyActionsComponent, selector: "thy-actions", inputs: ["thySize"] }, { kind: "component", type: i8$1.ThyDividerComponent, selector: "thy-divider", inputs: ["thyVertical", "thyStyle", "thyColor", "thyText", "thyTextDirection", "thyDeeper"] }] });
12396
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheTableToolbarComponent, decorators: [{
12410
+ 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 }, { token: i1$2.ThyNotifyService }], target: i0.ɵɵFactoryTarget.Component });
12411
+ TheTableToolbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: TheTableToolbarComponent, selector: "the-table-toolbar", inputs: { tableStore: "tableStore", 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 && !isColumnEqual\"\n thyAction\n thyTooltip=\"\u5217\u7B49\u5BBD\"\n (mousedown)=\"setEquallyColumnHandle($event)\"\n >\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 <a\n *ngIf=\"tableStore.isSelectedTable && !tableStore?.isFullscreen\"\n class=\"fullscreen-hidden\"\n href=\"javascript:;\"\n thyAction\n thyActionIcon=\"copy\"\n thyTooltip=\"\u590D\u5236\"\n (mousedown)=\"onCopy($event)\"\n ></a>\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 <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: 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: i7.ThyActionComponent, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }, { kind: "component", type: i7.ThyActionsComponent, selector: "thy-actions", inputs: ["thySize"] }, { kind: "component", type: i8$1.ThyDividerComponent, selector: "thy-divider", inputs: ["thyVertical", "thyStyle", "thyColor", "thyText", "thyTextDirection", "thyDeeper"] }] });
12412
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheTableToolbarComponent, decorators: [{
12397
12413
  type: Component,
12398
12414
  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 && !isColumnEqual\"\n thyAction\n thyTooltip=\"\u5217\u7B49\u5BBD\"\n (mousedown)=\"setEquallyColumnHandle($event)\"\n >\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 <a\n *ngIf=\"tableStore.isSelectedTable && !tableStore?.isFullscreen\"\n class=\"fullscreen-hidden\"\n href=\"javascript:;\"\n thyAction\n thyActionIcon=\"copy\"\n thyTooltip=\"\u590D\u5236\"\n (mousedown)=\"onCopy($event)\"\n ></a>\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 <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" }]
12399
12415
  }], ctorParameters: function () { return [{ type: i0.NgZone }, { type: TheColorSelectService }, { type: i1$1.ThyPopover }, { type: i1$1.ThyPopoverRef }, { type: i1$2.ThyNotifyService }]; }, propDecorators: { tableStore: [{
@@ -12409,9 +12425,6 @@ var DeleteIcon;
12409
12425
  })(DeleteIcon || (DeleteIcon = {}));
12410
12426
 
12411
12427
  class TableService {
12412
- get isOpened() {
12413
- return this.toolbarRef && this.toolbarRef.componentInstance;
12414
- }
12415
12428
  constructor(thyPopover, overlay, tableStore, theTableContextMenuService, ngZone, theContextService) {
12416
12429
  this.thyPopover = thyPopover;
12417
12430
  this.overlay = overlay;
@@ -12425,6 +12438,9 @@ class TableService {
12425
12438
  this.placement = 'topLeft';
12426
12439
  this.offset = 8;
12427
12440
  }
12441
+ get isOpened() {
12442
+ return this.toolbarRef && this.toolbarRef.componentInstance;
12443
+ }
12428
12444
  openToolbar(origin, tableElement) {
12429
12445
  if (this.isOpened) {
12430
12446
  if (this.toolbarRef.containerInstance.config.origin === origin) {
@@ -12480,9 +12496,9 @@ class TableService {
12480
12496
  }
12481
12497
  }
12482
12498
  }
12483
- TableService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", 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 });
12484
- TableService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TableService });
12485
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TableService, decorators: [{
12499
+ 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 });
12500
+ TableService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TableService });
12501
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TableService, decorators: [{
12486
12502
  type: Injectable
12487
12503
  }], ctorParameters: function () { return [{ type: i1$1.ThyPopover }, { type: i2$1.Overlay }, { type: TableStore }, { type: TheTableContextMenuService }, { type: i0.NgZone }, { type: TheContextService }]; } });
12488
12504
 
@@ -12518,9 +12534,9 @@ class TableFreezeColumnPipe {
12518
12534
  return !!((tablePluginOptions === null || tablePluginOptions === void 0 ? void 0 : tablePluginOptions.freezeColumnHeader) && ((_c = table.options) === null || _c === void 0 ? void 0 : _c.headerColumn) && !mergeColumnCells.length && stickyColumn);
12519
12535
  }
12520
12536
  }
12521
- TableFreezeColumnPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TableFreezeColumnPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
12522
- TableFreezeColumnPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.2", ngImport: i0, type: TableFreezeColumnPipe, name: "freezeColumn" });
12523
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TableFreezeColumnPipe, decorators: [{
12537
+ TableFreezeColumnPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TableFreezeColumnPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
12538
+ TableFreezeColumnPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.0", ngImport: i0, type: TableFreezeColumnPipe, name: "freezeColumn" });
12539
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TableFreezeColumnPipe, decorators: [{
12524
12540
  type: Pipe,
12525
12541
  args: [{ name: 'freezeColumn' }]
12526
12542
  }] });
@@ -12535,9 +12551,9 @@ class TableFreezeRowPipe {
12535
12551
  return false;
12536
12552
  }
12537
12553
  }
12538
- TableFreezeRowPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TableFreezeRowPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
12539
- TableFreezeRowPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.2", ngImport: i0, type: TableFreezeRowPipe, name: "freezeRow" });
12540
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TableFreezeRowPipe, decorators: [{
12554
+ TableFreezeRowPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TableFreezeRowPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
12555
+ TableFreezeRowPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.0", ngImport: i0, type: TableFreezeRowPipe, name: "freezeRow" });
12556
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TableFreezeRowPipe, decorators: [{
12541
12557
  type: Pipe,
12542
12558
  args: [{ name: 'freezeRow' }]
12543
12559
  }] });
@@ -12572,9 +12588,13 @@ const getGridColumns = (headerRow, cellsWidth) => {
12572
12588
  });
12573
12589
  return result;
12574
12590
  };
12575
- const getColumnsWidth = (cellRow) => {
12591
+ const getColumnsWidth = (cellRow, isColgroup = false) => {
12576
12592
  const result = [];
12577
12593
  cellRow.childNodes.forEach((item) => {
12594
+ if (isColgroup && IS_SAFARI) {
12595
+ result.push(item.offsetWidth);
12596
+ return;
12597
+ }
12578
12598
  if (item.getBoundingClientRect) {
12579
12599
  result.push(item.getBoundingClientRect().width);
12580
12600
  }
@@ -12582,6 +12602,113 @@ const getColumnsWidth = (cellRow) => {
12582
12602
  return result;
12583
12603
  };
12584
12604
 
12605
+ /**
12606
+ * 计算最小行跨距单元格
12607
+ * @param element TableElement
12608
+ * @returns
12609
+ */
12610
+ const calculateMinRowSpanCellForRows = (element) => {
12611
+ const cells = element.children.map((row, index) => {
12612
+ const noHiddenCells = row.children.filter(cell => !cell.hidden);
12613
+ if (noHiddenCells.length > 0) {
12614
+ const minRowspan = Math.min.apply(Math, noHiddenCells.map(cell => {
12615
+ return cell.rowspan || 1;
12616
+ }));
12617
+ const cell = row.children.find(item => !item.hidden && (item.rowspan || 1) === minRowspan);
12618
+ return {
12619
+ cell,
12620
+ rowIndex: index
12621
+ };
12622
+ }
12623
+ else {
12624
+ return {
12625
+ rowIndex: index
12626
+ };
12627
+ }
12628
+ });
12629
+ return cells;
12630
+ };
12631
+ /**
12632
+ * 计算行控件的平均高度
12633
+ * @param previousCombineRowIndex
12634
+ * @param previousRowIndex
12635
+ * @param rowControls
12636
+ */
12637
+ const calculateRowControlsAvgHeight = (previousCombineRowIndex, previousRowIndex, rowControls) => {
12638
+ const rowControl = rowControls[previousRowIndex];
12639
+ const count = previousCombineRowIndex - previousRowIndex;
12640
+ const avgHeight = Math.floor(rowControl.height / (count + 1));
12641
+ const firstHeight = rowControl.height - avgHeight * count;
12642
+ rowControl.height = firstHeight;
12643
+ rowControls
12644
+ .filter((_, index) => index > previousRowIndex && index <= previousCombineRowIndex)
12645
+ .forEach(rowControl => {
12646
+ rowControl.height = avgHeight;
12647
+ });
12648
+ };
12649
+ const getBelowRowHeight = (editor, cells, index, rowIndex, rowspan) => {
12650
+ let belowRowlHeight = 0;
12651
+ cells.slice(index + 1, cells.length).map(item => {
12652
+ if (!item.cell) {
12653
+ return;
12654
+ }
12655
+ if (rowIndex + rowspan > item.rowIndex) {
12656
+ const cellDom = AngularEditor.toDOMNode(editor, item.cell);
12657
+ if (item.cell.rowspan > 1) {
12658
+ // 如果下方单元格的rowspan > 1,递归计算
12659
+ const height = getBelowRowHeight(editor, cells, cells.findIndex(cell => cell.rowIndex === item.rowIndex), item.rowIndex, item.cell.rowspan);
12660
+ belowRowlHeight += getElementHeight(cellDom) - height;
12661
+ }
12662
+ else {
12663
+ belowRowlHeight += getElementHeight(cellDom);
12664
+ }
12665
+ }
12666
+ });
12667
+ return belowRowlHeight;
12668
+ };
12669
+ const calculateRowControls = (editor, element) => {
12670
+ const minRowSpanCellForRows = calculateMinRowSpanCellForRows(element);
12671
+ const rowControls = [];
12672
+ let previousRowIndex = 0;
12673
+ let previousCombineRowIndex = 0;
12674
+ minRowSpanCellForRows.forEach((cellInfo, index) => {
12675
+ if (!cellInfo.cell) {
12676
+ rowControls.push({
12677
+ height: 0,
12678
+ rowIndex: index
12679
+ });
12680
+ previousCombineRowIndex = index;
12681
+ if (index === minRowSpanCellForRows.length - 1) {
12682
+ calculateRowControlsAvgHeight(previousCombineRowIndex, previousRowIndex, rowControls);
12683
+ }
12684
+ return;
12685
+ }
12686
+ // calculate combine row height
12687
+ if (previousCombineRowIndex > previousRowIndex) {
12688
+ calculateRowControlsAvgHeight(previousCombineRowIndex, previousRowIndex, rowControls);
12689
+ previousCombineRowIndex = 0;
12690
+ }
12691
+ const cellDom = AngularEditor.toDOMNode(editor, cellInfo.cell);
12692
+ let height = getElementHeight(cellDom);
12693
+ // 当cell为合并的单元格(rowspan > 1),计算其实际高度(当前单元格的高度 - 下方合并单元格的高度)
12694
+ if (cellInfo.cell.rowspan > 1) {
12695
+ const calcHeight = height - getBelowRowHeight(editor, minRowSpanCellForRows, index, cellInfo.rowIndex, cellInfo.cell.rowspan);
12696
+ rowControls.push({
12697
+ height: calcHeight,
12698
+ rowIndex: cellInfo.rowIndex
12699
+ });
12700
+ }
12701
+ else {
12702
+ rowControls.push({
12703
+ height,
12704
+ rowIndex: cellInfo.rowIndex
12705
+ });
12706
+ }
12707
+ previousRowIndex = index;
12708
+ });
12709
+ return rowControls;
12710
+ };
12711
+
12585
12712
  const TABLE_SELECTOR = '.the-table';
12586
12713
  const TABLE_WRAPPER_SELECTOR = '.the-table-wrapper';
12587
12714
  const RESIZE_OVERLAY_SELECTOR = '.the-table-resize-overlay-thumb';
@@ -12664,9 +12791,9 @@ class TheColumnResizeDirective {
12664
12791
  this.destroyed.complete();
12665
12792
  }
12666
12793
  }
12667
- TheColumnResizeDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheColumnResizeDirective, deps: [{ token: i0.ElementRef }, { token: i0.ViewContainerRef }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: TableCellEventDispatcher }, { token: ColumnResizeNotifierSource }, { token: THE_TABLE_COMPONENT_TOKEN }], target: i0.ɵɵFactoryTarget.Directive });
12668
- TheColumnResizeDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.2", type: TheColumnResizeDirective, selector: "div[theColumnResize]", ngImport: i0 });
12669
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheColumnResizeDirective, decorators: [{
12794
+ 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: THE_TABLE_COMPONENT_TOKEN }], target: i0.ɵɵFactoryTarget.Directive });
12795
+ TheColumnResizeDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.0", type: TheColumnResizeDirective, selector: "div[theColumnResize]", ngImport: i0 });
12796
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheColumnResizeDirective, decorators: [{
12670
12797
  type: Directive,
12671
12798
  args: [{
12672
12799
  selector: 'div[theColumnResize]'
@@ -12679,19 +12806,29 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
12679
12806
  } });
12680
12807
 
12681
12808
  class TheInsertMarkComponent {
12682
- get disabled() {
12683
- return this.tableStore && !!this.tableStore.selectedCellPositions.length;
12684
- }
12685
- get editor() {
12686
- return this.tableStore && this.tableStore.editor;
12687
- }
12688
12809
  constructor(cdr, renderer2) {
12689
12810
  this.cdr = cdr;
12690
12811
  this.renderer2 = renderer2;
12812
+ this.destroy$ = new Subject();
12691
12813
  this.tooltipContent = '';
12814
+ this.disabled = false;
12815
+ }
12816
+ get editor() {
12817
+ return this.tableStore && this.tableStore.editor;
12692
12818
  }
12693
12819
  ngOnInit() {
12694
12820
  this.tooltipContent = this.type === 'row' ? '插入行' : '插入列';
12821
+ this.tableStore
12822
+ .selectedCellsChange()
12823
+ .pipe(takeUntil(this.destroy$))
12824
+ .subscribe(selectedCellPositions => {
12825
+ this.disabled = !!selectedCellPositions.length;
12826
+ });
12827
+ }
12828
+ ngOnDestroy() {
12829
+ var _a, _b;
12830
+ (_a = this.destroy$) === null || _a === void 0 ? void 0 : _a.next();
12831
+ (_b = this.destroy$) === null || _b === void 0 ? void 0 : _b.complete();
12695
12832
  }
12696
12833
  onMouseDown(event) {
12697
12834
  event.preventDefault();
@@ -12727,7 +12864,7 @@ class TheInsertMarkComponent {
12727
12864
  getLength() {
12728
12865
  const { selection } = this.editor;
12729
12866
  if (selection && Range.isCollapsed(selection)) {
12730
- const { table } = TablePosition.create(new TableOptions(), this.editor, selection.anchor.path);
12867
+ const { table } = createTablePosition(this.editor, selection.anchor.path);
12731
12868
  if (!table) {
12732
12869
  return;
12733
12870
  }
@@ -12745,9 +12882,9 @@ class TheInsertMarkComponent {
12745
12882
  }
12746
12883
  }
12747
12884
  }
12748
- TheInsertMarkComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheInsertMarkComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
12749
- TheInsertMarkComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.2", type: TheInsertMarkComponent, selector: "the-table-insert-mark", inputs: { type: "type", at: "at", tableStore: "tableStore", parentElement: "parentElement" }, host: { classAttribute: "the-table-insert-mark" }, ngImport: i0, template: "<div\n [thyTooltip]=\"!disabled && tooltipContent\"\n class=\"the-table-controls-insert-wrapper\"\n [ngClass]=\"{ disabled: disabled }\"\n contenteditable=\"false\"\n (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"] }] });
12750
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheInsertMarkComponent, decorators: [{
12885
+ 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 });
12886
+ 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" }, host: { classAttribute: "the-table-insert-mark" }, ngImport: i0, template: "<div\n [thyTooltip]=\"!disabled && tooltipContent\"\n class=\"the-table-controls-insert-wrapper\"\n [ngClass]=\"{ disabled: disabled }\"\n contenteditable=\"false\"\n (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"] }] });
12887
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheInsertMarkComponent, decorators: [{
12751
12888
  type: Component,
12752
12889
  args: [{ selector: 'the-table-insert-mark', host: {
12753
12890
  class: 'the-table-insert-mark'
@@ -12763,6 +12900,31 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
12763
12900
  }] } });
12764
12901
 
12765
12902
  class TheTableComponent extends TheBaseElementComponent {
12903
+ constructor(elementRef, eventDispatcher, resizeNotifier, tableStore, cdr, ngZone, tableService, theTableContextMenuService, freezeColumnPipe, freezeRowPipe, renderer, contextService) {
12904
+ super(elementRef, cdr);
12905
+ this.eventDispatcher = eventDispatcher;
12906
+ this.resizeNotifier = resizeNotifier;
12907
+ this.tableStore = tableStore;
12908
+ this.cdr = cdr;
12909
+ this.ngZone = ngZone;
12910
+ this.tableService = tableService;
12911
+ this.theTableContextMenuService = theTableContextMenuService;
12912
+ this.freezeColumnPipe = freezeColumnPipe;
12913
+ this.freezeRowPipe = freezeRowPipe;
12914
+ this.renderer = renderer;
12915
+ this.contextService = contextService;
12916
+ this.headerRow = false;
12917
+ this.isSelectedAllCell = false;
12918
+ this.destroy$ = new Subject();
12919
+ this.rowControls = [];
12920
+ this.colControls = [];
12921
+ this.getColControlButtonWidth = () => {
12922
+ var _a;
12923
+ let result = 0;
12924
+ result += ((_a = this.element.options) === null || _a === void 0 ? void 0 : _a.numberedColumn) ? TABLE_NUMBER_COLUMN : 0;
12925
+ return result;
12926
+ };
12927
+ }
12766
12928
  get columns() {
12767
12929
  return this.element && this.element.columns;
12768
12930
  }
@@ -12788,7 +12950,7 @@ class TheTableComponent extends TheBaseElementComponent {
12788
12950
  if (this.initialized) {
12789
12951
  Promise.resolve().then(() => {
12790
12952
  this.tableStore.emitTableChange();
12791
- this.tableStore.calculateSelectedColumnsAndRowIndex();
12953
+ this.tableStore.setSelectedColumnsAndRowIndex();
12792
12954
  this.bindTableScrollingShadow();
12793
12955
  this.useRowControls();
12794
12956
  this.setHeaderCellStyle();
@@ -12801,31 +12963,6 @@ class TheTableComponent extends TheBaseElementComponent {
12801
12963
  }
12802
12964
  this.headerRow = this.getHeaderRow();
12803
12965
  }
12804
- constructor(elementRef, eventDispatcher, resizeNotifier, tableStore, cdr, ngZone, tableService, theTableContextMenuService, freezeColumnPipe, freezeRowPipe, renderer, contextService) {
12805
- super(elementRef, cdr);
12806
- this.eventDispatcher = eventDispatcher;
12807
- this.resizeNotifier = resizeNotifier;
12808
- this.tableStore = tableStore;
12809
- this.cdr = cdr;
12810
- this.ngZone = ngZone;
12811
- this.tableService = tableService;
12812
- this.theTableContextMenuService = theTableContextMenuService;
12813
- this.freezeColumnPipe = freezeColumnPipe;
12814
- this.freezeRowPipe = freezeRowPipe;
12815
- this.renderer = renderer;
12816
- this.contextService = contextService;
12817
- this.headerRow = false;
12818
- this.isSelectedAllCell = false;
12819
- this.destroy$ = new Subject();
12820
- this.rowControls = [];
12821
- this.colControls = [];
12822
- this.getColControlButtonWidth = () => {
12823
- var _a;
12824
- let result = 0;
12825
- result += ((_a = this.element.options) === null || _a === void 0 ? void 0 : _a.numberedColumn) ? TABLE_NUMBER_COLUMN : 0;
12826
- return result;
12827
- };
12828
- }
12829
12966
  ngOnInit() {
12830
12967
  super.ngOnInit();
12831
12968
  this.getColControls();
@@ -12857,7 +12994,7 @@ class TheTableComponent extends TheBaseElementComponent {
12857
12994
  .selectedCellsChange()
12858
12995
  .pipe(takeUntil(this.destroy$))
12859
12996
  .subscribe(() => {
12860
- this.isSelectedAllCell = this.tableStore.isSelectedAllCell();
12997
+ this.isSelectedAllCell = isSelectedAllCell(this.editor, this.tableStore.getSelectedCellPositions());
12861
12998
  });
12862
12999
  }
12863
13000
  getWrapperWidth() {
@@ -12913,6 +13050,7 @@ class TheTableComponent extends TheBaseElementComponent {
12913
13050
  this.subscribeScrollContainerScroll();
12914
13051
  this.contextService.containerResized$.pipe(takeUntil(this.destroy$)).subscribe(result => {
12915
13052
  if (result.widthChanged) {
13053
+ this.setHeaderRowShadow();
12916
13054
  this.setHeaderRowLeftStyle();
12917
13055
  }
12918
13056
  });
@@ -12920,8 +13058,8 @@ class TheTableComponent extends TheBaseElementComponent {
12920
13058
  if (result.widthChanged) {
12921
13059
  this.setGridColumnsStyle();
12922
13060
  this.setStickyRowStyle();
12923
- this.setHeaderRowShadow();
12924
13061
  this.bindTableScrollingShadow();
13062
+ this.setHeaderRowShadow();
12925
13063
  }
12926
13064
  });
12927
13065
  this.contextService.windowResized$.pipe(takeUntil(this.destroy$)).subscribe(result => {
@@ -12955,7 +13093,7 @@ class TheTableComponent extends TheBaseElementComponent {
12955
13093
  }
12956
13094
  calcHeaderRowShadow() {
12957
13095
  var _a;
12958
- const headerRowHeight = (_a = this.calculateRowControls()[0]) === null || _a === void 0 ? void 0 : _a.height;
13096
+ const headerRowHeight = (_a = calculateRowControls(this.editor, this.element)[0]) === null || _a === void 0 ? void 0 : _a.height;
12959
13097
  let height = headerRowHeight;
12960
13098
  // 默认(没有聚焦)的 top 值:滚动容器高度 + 表格的padding(8)
12961
13099
  let top = this.scrollContainerTop + TABLE_PADDING$1;
@@ -12981,7 +13119,7 @@ class TheTableComponent extends TheBaseElementComponent {
12981
13119
  this.scrollContainerTop = event.target.getBoundingClientRect().top;
12982
13120
  const clientRect = this.theTableElement.nativeElement.getBoundingClientRect();
12983
13121
  const headerTopHeight = this.isInTable ? -19 : 11;
12984
- const headerRowHeight = (_a = this.calculateRowControls()[0]) === null || _a === void 0 ? void 0 : _a.height;
13122
+ const headerRowHeight = (_a = calculateRowControls(this.editor, this.element)[0]) === null || _a === void 0 ? void 0 : _a.height;
12985
13123
  const top = clientRect.top + headerTopHeight;
12986
13124
  this.isStickyTop =
12987
13125
  top <= this.scrollContainerTop + 8 &&
@@ -13063,7 +13201,9 @@ class TheTableComponent extends TheBaseElementComponent {
13063
13201
  const colControl = this.columnControlsWrapper.nativeElement;
13064
13202
  if (this.freezeRowPipe.transform(this.element, this.headerRow, this.tablePluginOptions)) {
13065
13203
  const headerRow = this.tbodyElement.nativeElement.childNodes[0];
13066
- const cellsWidth = ((_a = this.colgroup) === null || _a === void 0 ? void 0 : _a.nativeElement) ? getColumnsWidth(this.colgroup.nativeElement) : this.getDefaultCellWidth();
13204
+ const cellsWidth = ((_a = this.colgroup) === null || _a === void 0 ? void 0 : _a.nativeElement)
13205
+ ? getColumnsWidth(this.colgroup.nativeElement, true)
13206
+ : this.getDefaultCellWidth();
13067
13207
  const gridColumns = getGridColumns(headerRow, cellsWidth);
13068
13208
  const tablePadding = 44;
13069
13209
  let tableWidth = this.elementRef.nativeElement.getBoundingClientRect().width;
@@ -13081,7 +13221,7 @@ class TheTableComponent extends TheBaseElementComponent {
13081
13221
  const headerRow = this.nativeElement.querySelector('tbody tr');
13082
13222
  const rowControlInner = this.rowControlsInner.nativeElement;
13083
13223
  const tableCornerBtn = this.cornerControl.nativeElement;
13084
- const headerRowHeight = (_a = this.calculateRowControls()[0]) === null || _a === void 0 ? void 0 : _a.height;
13224
+ const headerRowHeight = (_a = calculateRowControls(this.editor, this.element)[0]) === null || _a === void 0 ? void 0 : _a.height;
13085
13225
  const numberedColumn = (_b = this.element.options) === null || _b === void 0 ? void 0 : _b.numberedColumn;
13086
13226
  if (this.isStickyTop) {
13087
13227
  this.renderer.addClass(this.nativeElement, TableWithStickyRowClass);
@@ -13180,107 +13320,12 @@ class TheTableComponent extends TheBaseElementComponent {
13180
13320
  useRowControls() {
13181
13321
  var _a;
13182
13322
  if ((this.selection && !this.readonly) || ((_a = this.element.options) === null || _a === void 0 ? void 0 : _a.numberedColumn) || this.tableStore.isRightClicking) {
13183
- this.rowControls = this.calculateRowControls();
13323
+ this.rowControls = calculateRowControls(this.editor, this.element);
13184
13324
  }
13185
13325
  }
13186
13326
  detectChanges() {
13187
13327
  this.cdr.detectChanges();
13188
13328
  }
13189
- calculateMinRowSpanCellForRows() {
13190
- const cells = this.element.children.map((row, index) => {
13191
- const noHiddenCells = row.children.filter(cell => !cell.hidden);
13192
- if (noHiddenCells.length > 0) {
13193
- const minRowspan = Math.min.apply(Math, noHiddenCells.map(cell => {
13194
- return cell.rowspan || 1;
13195
- }));
13196
- const cell = row.children.find(item => !item.hidden && (item.rowspan || 1) === minRowspan);
13197
- return {
13198
- cell,
13199
- rowIndex: index
13200
- };
13201
- }
13202
- else {
13203
- return {
13204
- rowIndex: index
13205
- };
13206
- }
13207
- });
13208
- return cells;
13209
- }
13210
- calculateRowControls() {
13211
- const minRowSpanCellForRows = this.calculateMinRowSpanCellForRows();
13212
- const rowControls = [];
13213
- let previousRowIndex = 0;
13214
- let previousCombineRowIndex = 0;
13215
- minRowSpanCellForRows.forEach((cellInfo, index) => {
13216
- if (!cellInfo.cell) {
13217
- rowControls.push({
13218
- height: 0,
13219
- rowIndex: index
13220
- });
13221
- previousCombineRowIndex = index;
13222
- if (index === minRowSpanCellForRows.length - 1) {
13223
- this.calculateRowControlsAvgHeight(previousCombineRowIndex, previousRowIndex, rowControls);
13224
- }
13225
- return;
13226
- }
13227
- // calculate combine row height
13228
- if (previousCombineRowIndex > previousRowIndex) {
13229
- this.calculateRowControlsAvgHeight(previousCombineRowIndex, previousRowIndex, rowControls);
13230
- previousCombineRowIndex = 0;
13231
- }
13232
- const cellDom = AngularEditor.toDOMNode(this.editor, cellInfo.cell);
13233
- let height = getElementHeight(cellDom);
13234
- // 当cell为合并的单元格(rowspan > 1),计算其实际高度(当前单元格的高度 - 下方合并单元格的高度)
13235
- if (cellInfo.cell.rowspan > 1) {
13236
- const calcHeight = height - this.getBelowRowHeight(minRowSpanCellForRows, index, cellInfo.rowIndex, cellInfo.cell.rowspan);
13237
- rowControls.push({
13238
- height: calcHeight,
13239
- rowIndex: cellInfo.rowIndex
13240
- });
13241
- }
13242
- else {
13243
- rowControls.push({
13244
- height,
13245
- rowIndex: cellInfo.rowIndex
13246
- });
13247
- }
13248
- previousRowIndex = index;
13249
- });
13250
- return rowControls;
13251
- }
13252
- calculateRowControlsAvgHeight(previousCombineRowIndex, previousRowIndex, rowControls) {
13253
- const rowControl = rowControls[previousRowIndex];
13254
- const count = previousCombineRowIndex - previousRowIndex;
13255
- const avgHeight = Math.floor(rowControl.height / (count + 1));
13256
- const firstHeight = rowControl.height - avgHeight * count;
13257
- rowControl.height = firstHeight;
13258
- rowControls
13259
- .filter((item, _index) => _index > previousRowIndex && _index <= previousCombineRowIndex)
13260
- .forEach(rowControl => {
13261
- rowControl.height = avgHeight;
13262
- });
13263
- }
13264
- getBelowRowHeight(cells, index, rowIndex, rowspan) {
13265
- let belowRowlHeight = 0;
13266
- cells.slice(index + 1, cells.length).map(item => {
13267
- if (!item.cell) {
13268
- return;
13269
- }
13270
- if (rowIndex + rowspan > item.rowIndex) {
13271
- const cellDom = AngularEditor.toDOMNode(this.editor, item.cell);
13272
- if (item.cell.rowspan > 1) {
13273
- // 如果下方单元格的rowspan > 1,递归计算
13274
- const height = this.getBelowRowHeight(cells, cells.findIndex(cell => cell.rowIndex === item.rowIndex), item.rowIndex, item.cell.rowspan);
13275
- belowRowlHeight += getElementHeight(cellDom) - height;
13276
- }
13277
- else {
13278
- belowRowlHeight += getElementHeight(cellDom);
13279
- }
13280
- }
13281
- });
13282
- return belowRowlHeight;
13283
- }
13284
13329
  resolveImage() {
13285
13330
  const imageElements = this.nativeElement.querySelectorAll('img');
13286
13331
  if (imageElements.length) {
@@ -13310,8 +13355,8 @@ class TheTableComponent extends TheBaseElementComponent {
13310
13355
  if (this.selection && !this.readonly) {
13311
13356
  const opts = new TableOptions();
13312
13357
  const selection = this.editor.selection;
13313
- const startPosition = TablePosition.create(opts, this.editor, selection.anchor.path);
13314
- const endPosition = TablePosition.create(opts, this.editor, selection.focus.path);
13358
+ const startPosition = createTablePosition(this.editor);
13359
+ const endPosition = createTablePosition(this.editor, selection.focus.path);
13315
13360
  this.isInTable = startPosition.isInTable() && endPosition.isInTable();
13316
13361
  }
13317
13362
  else {
@@ -13457,8 +13502,8 @@ class TheTableComponent extends TheBaseElementComponent {
13457
13502
  return !isVirtualKey(e) && !this.theTableContextMenuService.isOpened;
13458
13503
  })))
13459
13504
  .pipe(filter(() => {
13460
- var _a;
13461
- return ((_a = this.tableStore.selectedCellPositions) === null || _a === void 0 ? void 0 : _a.length) > 0;
13505
+ const selectedCellPositions = this.tableStore.getSelectedCellPositions();
13506
+ return (selectedCellPositions === null || selectedCellPositions === void 0 ? void 0 : selectedCellPositions.length) > 0;
13462
13507
  }), takeUntil(this.destroy$))
13463
13508
  .subscribe((e) => {
13464
13509
  if (e.type === 'keydown') {
@@ -13567,8 +13612,8 @@ class TheTableComponent extends TheBaseElementComponent {
13567
13612
  this.destroy$.complete();
13568
13613
  }
13569
13614
  }
13570
- TheTableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", 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 }, { token: TableFreezeRowPipe }, { token: i0.Renderer2 }, { token: TheContextService }], target: i0.ɵɵFactoryTarget.Component });
13571
- TheTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.2", type: TheTableComponent, selector: "the-table, [theTable]", host: { listeners: { "mousedown": "handleMousedown($event)" }, properties: { "class.the-table-with-controls": "isInTable || tableStore.isRightClicking", "class.the-table-with-sticky-column": "freezeColumnPipe.transform(element, tablePluginOptions)", "class.the-numberd-table": "element?.options?.numberedColumn", "class.the-table-selection-hide": "tableStore.isCellSelecting || tableStore.isRightClicking" } }, providers: [
13615
+ 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 }, { token: TableFreezeRowPipe }, { token: i0.Renderer2 }, { token: TheContextService }], target: i0.ɵɵFactoryTarget.Component });
13616
+ TheTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: TheTableComponent, selector: "the-table, [theTable]", host: { listeners: { "mousedown": "handleMousedown($event)" }, properties: { "class.the-table-with-controls": "isInTable || tableStore.isRightClicking", "class.the-table-with-sticky-column": "freezeColumnPipe.transform(element, tablePluginOptions)", "class.the-numberd-table": "element?.options?.numberedColumn", "class.the-table-selection-hide": "tableStore.isCellSelecting || tableStore.isRightClicking" } }, providers: [
13572
13617
  TableStore,
13573
13618
  TableService,
13574
13619
  TheTableContextMenuService,
@@ -13581,7 +13626,7 @@ TheTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", vers
13581
13626
  useExisting: TheTableComponent
13582
13627
  }
13583
13628
  ], 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 }, { propertyName: "tableRowControlsWrapper", first: true, predicate: ["tableRowControlsWrapper"], descendants: true, read: ElementRef }, { propertyName: "columnControlsWrapper", first: true, predicate: ["columnControlsWrapper"], descendants: true, read: ElementRef }, { propertyName: "cornerControl", first: true, predicate: ["cornerControl"], descendants: true, read: ElementRef }, { propertyName: "rowControlsInner", first: true, predicate: ["rowControlsInner"], descendants: true, read: ElementRef }, { propertyName: "headerRowLeftShadow", first: true, predicate: ["headerRowLeftShadow"], descendants: true, read: ElementRef }, { propertyName: "headerRowRightShadow", first: true, predicate: ["headerRowRightShadow"], descendants: true, read: ElementRef }, { propertyName: "colgroup", first: true, predicate: ["colgroup"], descendants: true, read: ElementRef }, { propertyName: "rowControlsButtonWrapper", predicate: ["rowControlsButtonWrapper"], descendants: true, read: ElementRef }], usesInheritance: true, ngImport: i0, template: "<div class=\"the-table-container\" theColumnResize>\n <div class=\"the-table-row-controls-wrapper\" #tableRowControlsWrapper>\n <div\n class=\"the-table-corner-controls the-sticky-corner-controls\"\n #cornerControl\n [ngClass]=\"{\n visible: !readonly && (isInTable || tableStore.isRightClicking),\n 'control-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\" *ngIf=\"!headerRow\">\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\" *ngIf=\"!element.options?.headerColumn\">\n <the-table-insert-mark type=\"column\" [at]=\"0\" [tableStore]=\"tableStore\"></the-table-insert-mark>\n </div>\n </div>\n <div class=\"the-table-row-controls\">\n <div class=\"the-table-row-controls-inner\" #rowControlsInner>\n <div\n class=\"the-table-row-controls-button-wrap\"\n #rowControlsButtonWrapper\n *ngFor=\"let control of rowControls; let i = index; trackBy: trackByFnRowControls\"\n [ngClass]=\"{\n 'control-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 || tableStore.isRightClicking) && !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>\n <colgroup #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 the-sticky-row\" #columnControlsWrapper>\n <th\n #colControl\n class=\"the-table-col-controls\"\n *ngFor=\"let control of colControls; let i = index; trackBy: trackByFnColControls\"\n [ngClass]=\"{\n 'control-active': tableStore.selectedColumnsIndex.includes(i),\n dangerous: tableStore.dangerousColumnsIndex.includes(i) && tableStore.dangerousCells.length > 0\n }\"\n (mousedown)=\"onColMousedown($event, i)\"\n >\n <the-table-insert-mark\n *ngIf=\"isInTable || tableStore.isRightClicking\"\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 <div\n class=\"header-row-shadow header-row-left-shadow\"\n #headerRowLeftShadow\n contenteditable=\"false\"\n *ngIf=\"!element.options?.headerColumn\"\n ></div>\n <div class=\"header-row-shadow header-row-right-shadow\" #headerRowRightShadow contenteditable=\"false\"></div>\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"] }] });
13584
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheTableComponent, decorators: [{
13629
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheTableComponent, decorators: [{
13585
13630
  type: Component,
13586
13631
  args: [{ selector: 'the-table, [theTable]', providers: [
13587
13632
  TableStore,
@@ -13644,7 +13689,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
13644
13689
  */
13645
13690
  function clearTableNode(opts, editor, isTopToBot) {
13646
13691
  const { selection } = editor;
13647
- const element = TablePosition.create(opts, editor, selection.focus.path);
13692
+ const element = createTablePosition(editor, selection.focus.path);
13648
13693
  const rowIndex = element.getRowIndex();
13649
13694
  const colIndex = element.getColumnIndex();
13650
13695
  const removeRow = isTopToBot ? 0 : rowIndex + 1;
@@ -13695,9 +13740,8 @@ class TheTableRowComponent extends TheBaseElementComponent {
13695
13740
  }
13696
13741
  onContextChange() {
13697
13742
  super.onContextChange();
13698
- const opts = new TableOptions();
13699
13743
  const path = TheEditor.findPath(this.editor, this.element);
13700
- const tablePosition = TablePosition.create(opts, this.editor, path.concat(0));
13744
+ const tablePosition = createTablePosition(this.editor, path.concat(0));
13701
13745
  const rowIndex = tablePosition.getRowIndex();
13702
13746
  if (rowIndex === 0) {
13703
13747
  this.renderer.addClass(this.elementRef.nativeElement, 'the-sticky-row');
@@ -13719,9 +13763,9 @@ class TheTableRowComponent extends TheBaseElementComponent {
13719
13763
  }
13720
13764
  }
13721
13765
  }
13722
- TheTableRowComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheTableRowComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
13723
- TheTableRowComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.2", type: TheTableRowComponent, selector: "tr[theTableRow]", host: { properties: { "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"] }] });
13724
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheTableRowComponent, decorators: [{
13766
+ TheTableRowComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheTableRowComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
13767
+ TheTableRowComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: TheTableRowComponent, selector: "tr[theTableRow]", host: { properties: { "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"] }] });
13768
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheTableRowComponent, decorators: [{
13725
13769
  type: Component,
13726
13770
  args: [{
13727
13771
  selector: 'tr[theTableRow]',
@@ -13877,9 +13921,9 @@ class ColumnResizingStore {
13877
13921
  this.resizeRows.pop();
13878
13922
  }
13879
13923
  }
13880
- ColumnResizingStore.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: ColumnResizingStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
13881
- ColumnResizingStore.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: ColumnResizingStore });
13882
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: ColumnResizingStore, decorators: [{
13924
+ ColumnResizingStore.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ColumnResizingStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
13925
+ ColumnResizingStore.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ColumnResizingStore });
13926
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ColumnResizingStore, decorators: [{
13883
13927
  type: Injectable
13884
13928
  }], ctorParameters: function () { return []; } });
13885
13929
 
@@ -14034,9 +14078,9 @@ class TheColumnResizeOverlayHandleComponent {
14034
14078
  this.destroyed.complete();
14035
14079
  }
14036
14080
  }
14037
- TheColumnResizeOverlayHandleComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", 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 });
14038
- TheColumnResizeOverlayHandleComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.2", type: TheColumnResizeOverlayHandleComponent, selector: "ng-component", host: { classAttribute: "the-table-resize-overlay-thumb" }, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
14039
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheColumnResizeOverlayHandleComponent, decorators: [{
14081
+ 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 });
14082
+ 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 });
14083
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheColumnResizeOverlayHandleComponent, decorators: [{
14040
14084
  type: Component,
14041
14085
  args: [{
14042
14086
  host: { class: 'the-table-resize-overlay-thumb' },
@@ -14102,6 +14146,22 @@ const POSITION_MAP = {
14102
14146
  }
14103
14147
  };
14104
14148
  class TheTdComponent extends TheBaseElementComponent {
14149
+ constructor(elementRef, cdr, renderer, viewContainerRef, ngZone, injector, overlay, resizingStore, scrollDispatcher, freezeColumnPipe) {
14150
+ super(elementRef, cdr);
14151
+ this.elementRef = elementRef;
14152
+ this.cdr = cdr;
14153
+ this.renderer = renderer;
14154
+ this.viewContainerRef = viewContainerRef;
14155
+ this.ngZone = ngZone;
14156
+ this.injector = injector;
14157
+ this.overlay = overlay;
14158
+ this.resizingStore = resizingStore;
14159
+ this.scrollDispatcher = scrollDispatcher;
14160
+ this.freezeColumnPipe = freezeColumnPipe;
14161
+ this.destroy$ = new Subject();
14162
+ this.tableOptions = new TableOptions();
14163
+ this.cellInnerMinHeight = null;
14164
+ }
14105
14165
  get tableStore() {
14106
14166
  return this.tableComponent.tableStore;
14107
14167
  }
@@ -14152,22 +14212,6 @@ class TheTdComponent extends TheBaseElementComponent {
14152
14212
  this.useState();
14153
14213
  }
14154
14214
  }
14155
- constructor(elementRef, cdr, renderer, viewContainerRef, ngZone, injector, overlay, resizingStore, scrollDispatcher, freezeColumnPipe) {
14156
- super(elementRef, cdr);
14157
- this.elementRef = elementRef;
14158
- this.cdr = cdr;
14159
- this.renderer = renderer;
14160
- this.viewContainerRef = viewContainerRef;
14161
- this.ngZone = ngZone;
14162
- this.injector = injector;
14163
- this.overlay = overlay;
14164
- this.resizingStore = resizingStore;
14165
- this.scrollDispatcher = scrollDispatcher;
14166
- this.freezeColumnPipe = freezeColumnPipe;
14167
- this.destroy$ = new Subject();
14168
- this.tableOptions = new TableOptions();
14169
- this.cellInnerMinHeight = null;
14170
- }
14171
14215
  ngOnInit() {
14172
14216
  super.ngOnInit();
14173
14217
  this.useBackground();
@@ -14253,10 +14297,9 @@ class TheTdComponent extends TheBaseElementComponent {
14253
14297
  useElementStyle(this.elementRef.nativeElement, this.element);
14254
14298
  }
14255
14299
  useTablePosition() {
14256
- const opts = new TableOptions();
14257
14300
  const path = TheEditor.findPath(this.editor, this.element);
14258
14301
  // must be path of cell's children
14259
- this.tablePosition = TablePosition.create(opts, this.editor, path.concat(0));
14302
+ this.tablePosition = createTablePosition(this.editor, path.concat(0));
14260
14303
  }
14261
14304
  useBackground() {
14262
14305
  if (this.element.backgroundColor !== this.backgroundColor) {
@@ -14752,9 +14795,9 @@ class TheTdComponent extends TheBaseElementComponent {
14752
14795
  this.destroy$.complete();
14753
14796
  }
14754
14797
  }
14755
- TheTdComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", 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 });
14756
- TheTdComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.2", 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], 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"] }] });
14757
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheTdComponent, decorators: [{
14798
+ 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 });
14799
+ 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], 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"] }] });
14800
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheTdComponent, decorators: [{
14758
14801
  type: Component,
14759
14802
  args: [{ selector: 'td[theTd]', providers: [ColumnResizingStore], template: "<div #cellInner>\n <slate-children [children]=\"children\" [context]=\"childrenContext\" [viewContext]=\"viewContext\"></slate-children>\n</div>\n" }]
14760
14803
  }], 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: [{
@@ -14802,14 +14845,14 @@ const normalizeTable = (table) => {
14802
14845
  };
14803
14846
 
14804
14847
  class TheTableToolbarItemComponent extends TheBaseToolbarItem {
14805
- get isOpenTableSelect() {
14806
- return this.tableSelectRef && this.tableSelectRef.componentInstance;
14807
- }
14808
14848
  constructor(thyPopover, overlay) {
14809
14849
  super();
14810
14850
  this.thyPopover = thyPopover;
14811
14851
  this.overlay = overlay;
14812
14852
  }
14853
+ get isOpenTableSelect() {
14854
+ return this.tableSelectRef && this.tableSelectRef.componentInstance;
14855
+ }
14813
14856
  preventDefault(event) {
14814
14857
  event.preventDefault();
14815
14858
  event.stopPropagation();
@@ -14846,8 +14889,8 @@ class TheTableToolbarItemComponent extends TheBaseToolbarItem {
14846
14889
  return this.tableSelectRef;
14847
14890
  }
14848
14891
  }
14849
- TheTableToolbarItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheTableToolbarItemComponent, deps: [{ token: i1$1.ThyPopover }, { token: i2$1.Overlay }], target: i0.ɵɵFactoryTarget.Component });
14850
- TheTableToolbarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.2", type: TheTableToolbarItemComponent, selector: "the-table-toolbar-item", host: { classAttribute: "the-toolbar-dropdown-container" }, usesInheritance: true, ngImport: i0, template: `
14892
+ 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 });
14893
+ 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: `
14851
14894
  <a
14852
14895
  href="javascript:;"
14853
14896
  class="link-with-down"
@@ -14861,8 +14904,8 @@ TheTableToolbarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14
14861
14904
  >
14862
14905
  <thy-icon class="link-down-icon font-size-sm text-desc ml-1" thyIconName="caret-down"> </thy-icon>
14863
14906
  </a>
14864
- `, 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: i7.ThyActionComponent, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }] });
14865
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheTableToolbarItemComponent, decorators: [{
14907
+ `, 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: i7.ThyActionComponent, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }] });
14908
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheTableToolbarItemComponent, decorators: [{
14866
14909
  type: Component,
14867
14910
  args: [{
14868
14911
  selector: 'the-table-toolbar-item',
@@ -14887,6 +14930,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
14887
14930
  }]
14888
14931
  }], ctorParameters: function () { return [{ type: i1$1.ThyPopover }, { type: i2$1.Overlay }]; } });
14889
14932
 
14933
+ const isLegalTable = (editor, element, path) => {
14934
+ try {
14935
+ const nodePath = path || TheEditor.findPath(editor, element);
14936
+ const opts = new TableOptions();
14937
+ const tablePosition = TablePosition.create(opts, editor, nodePath.concat(0));
14938
+ return element.type === ElementKinds.tableCell ? tablePosition.table && tablePosition.row : tablePosition.table;
14939
+ }
14940
+ catch (error) {
14941
+ return false;
14942
+ }
14943
+ };
14944
+
14890
14945
  const withTable = (editor) => {
14891
14946
  const { deleteBackward, deleteForward, onKeydown, setFragmentData, insertData, normalizeNode, isBlockCard, renderElement, deleteCutData, isContainer, onChange, onClick } = editor;
14892
14947
  editor.deleteBackward = unit => {
@@ -14899,7 +14954,7 @@ const withTable = (editor) => {
14899
14954
  const [, startBlockPath] = Editor.above(editor, {
14900
14955
  match: n => Editor.isBlock(editor, n)
14901
14956
  });
14902
- const startPosition = TablePosition.create(opts, editor, selection.anchor.path);
14957
+ const startPosition = createTablePosition(editor);
14903
14958
  if (startBlockPath.length <= startPosition.cellEntry[1].length + 1 &&
14904
14959
  startBlockPath.pop() === 0 &&
14905
14960
  selection.anchor.offset === 0 &&
@@ -14913,8 +14968,8 @@ const withTable = (editor) => {
14913
14968
  const opts = new TableOptions();
14914
14969
  const afterPoint = Editor.after(editor, editor.selection);
14915
14970
  if (afterPoint && isRangeInTable(opts, editor, { anchor: afterPoint, focus: afterPoint })) {
14916
- const beforePosition = TablePosition.create(opts, editor, editor.selection.anchor.path);
14917
- const afterPosition = TablePosition.create(opts, editor, afterPoint.path);
14971
+ const beforePosition = createTablePosition(editor);
14972
+ const afterPosition = createTablePosition(editor, afterPoint.path);
14918
14973
  if (beforePosition.cell && beforePosition.cell !== afterPosition.cell) {
14919
14974
  return;
14920
14975
  }
@@ -14950,8 +15005,8 @@ const withTable = (editor) => {
14950
15005
  onKeydown(event);
14951
15006
  return;
14952
15007
  }
14953
- const startPosition = TablePosition.create(opts, editor, selection.anchor.path);
14954
- const endPosition = TablePosition.create(opts, editor, selection.focus.path);
15008
+ const startPosition = createTablePosition(editor);
15009
+ const endPosition = createTablePosition(editor, selection.focus.path);
14955
15010
  const isCollapsed = Range.isCollapsed(selection);
14956
15011
  if (startPosition && endPosition && endPosition.isInTable()) {
14957
15012
  // for keyboard up and down key in the table
@@ -15028,7 +15083,7 @@ const withTable = (editor) => {
15028
15083
  }
15029
15084
  if (isMoveBackward) {
15030
15085
  const beforePoint = Editor.before(editor, editor.selection);
15031
- const beforePosition = beforePoint && TablePosition.create(opts, editor, beforePoint.path);
15086
+ const beforePosition = beforePoint && createTablePosition(editor, beforePoint.path);
15032
15087
  if (beforePosition && beforePosition.cell && beforePosition.cell.hidden) {
15033
15088
  event.preventDefault();
15034
15089
  const at = Editor.end(editor, TheEditor.findPath(editor, beforePosition.findPrevious()));
@@ -15037,7 +15092,7 @@ const withTable = (editor) => {
15037
15092
  }
15038
15093
  if (isMoveForward) {
15039
15094
  const afterPoint = Editor.after(editor, editor.selection);
15040
- const afterPosition = afterPoint && TablePosition.create(opts, editor, afterPoint.path);
15095
+ const afterPosition = afterPoint && createTablePosition(editor, afterPoint.path);
15041
15096
  if (afterPosition.cell && afterPosition.cell.hidden) {
15042
15097
  event.preventDefault();
15043
15098
  const nextCell = afterPosition.findNext();
@@ -15086,10 +15141,9 @@ const withTable = (editor) => {
15086
15141
  setFragmentData(unit);
15087
15142
  return;
15088
15143
  }
15089
- const { selection } = editor;
15090
- const tablePosition = TablePosition.create(opts, editor, selection.anchor.path);
15144
+ const tablePosition = createTablePosition(editor);
15091
15145
  const tableComponent = ELEMENT_TO_COMPONENT.get(tablePosition.table);
15092
- const selectedCellPositions = tableComponent.tableStore.selectedCellPositions;
15146
+ const selectedCellPositions = tableComponent.tableStore.getSelectedCellPositions();
15093
15147
  let tableFragment = null;
15094
15148
  if (tableComponent.tableStore.selectedRowsIndex.length > 0) {
15095
15149
  const rows = tablePosition.table.children.slice(tableComponent.tableStore.selectedRowsIndex[0], tableComponent.tableStore.selectedRowsIndex[tableComponent.tableStore.selectedRowsIndex.length - 1] + 1);
@@ -15138,7 +15192,7 @@ const withTable = (editor) => {
15138
15192
  fragment.length === 1 &&
15139
15193
  Element$1.isElement(fragment[0]) &&
15140
15194
  fragment[0].type === ElementKinds.table) {
15141
- const tablePosition = TablePosition.create(opts, editor, selection.anchor.path);
15195
+ const tablePosition = createTablePosition(editor);
15142
15196
  const clipboardTable = fragment[0].children;
15143
15197
  const clipboardRow = clipboardTable[0].children;
15144
15198
  const selectRowIndex = tablePosition.getRowIndex();
@@ -15206,9 +15260,9 @@ const withTable = (editor) => {
15206
15260
  }
15207
15261
  insertData(data);
15208
15262
  };
15209
- editor.normalizeNode = (entry) => {
15210
- if (Element$1.isElement(entry[0]) && entry[0].type === ElementKinds.table) {
15211
- const table = entry[0];
15263
+ editor.normalizeNode = ([node, path]) => {
15264
+ if (Element$1.isElement(node) && node.type === ElementKinds.table) {
15265
+ const table = node;
15212
15266
  const maxWidth = Math.max(...table.children.map(row => row.children.length));
15213
15267
  const invalidRows = table.children.filter(row => row.children.length < maxWidth);
15214
15268
  if (invalidRows.length > 0) {
@@ -15217,27 +15271,70 @@ const withTable = (editor) => {
15217
15271
  table.children.map((row, rowIndex) => {
15218
15272
  row.children.map((cell, cellIndex) => {
15219
15273
  if (cell.hidden || cell.colspan || cell.rowspan) {
15220
- Transforms.setNodes(editor, { hidden: null, colspan: null, rowspan: null }, { at: [...entry[1], rowIndex, cellIndex] });
15274
+ Transforms.setNodes(editor, { hidden: null, colspan: null, rowspan: null }, { at: [...path, rowIndex, cellIndex] });
15221
15275
  }
15222
15276
  });
15223
15277
  });
15224
15278
  invalidRows.forEach(row => {
15225
15279
  const count = maxWidth - row.children.length;
15226
- insertColumnAtRow(opts, editor, count, entry, table.children.indexOf(row), row.children.length);
15280
+ insertColumnAtRow(opts, editor, count, [node, path], table.children.indexOf(row), row.children.length);
15227
15281
  });
15228
15282
  });
15229
15283
  }
15230
15284
  if (table.columns && table.columns.length !== maxWidth) {
15231
15285
  const columns = table.columns.length > maxWidth ? removeColumns(table, maxWidth) : addColumns(table, maxWidth);
15232
- Transforms.setNodes(editor, { columns }, { at: entry[1] });
15286
+ Transforms.setNodes(editor, { columns }, { at: path });
15287
+ }
15288
+ }
15289
+ // noramlize illegal cell and row to be paragraph
15290
+ if (Element$1.isElement(node) && [ElementKinds.tableCell, ElementKinds.tableRow].includes(node.type)) {
15291
+ if (!isLegalTable(editor, node, path)) {
15292
+ try {
15293
+ const rootPath = [path[0]];
15294
+ const offset = editor.selection.focus.offset;
15295
+ // find all tableCell and tableRow
15296
+ const nodes = Editor.nodes(editor, {
15297
+ at: rootPath,
15298
+ mode: 'lowest',
15299
+ match: (node) => {
15300
+ return node.type === ElementKinds.tableCell;
15301
+ }
15302
+ });
15303
+ let cursorPath = path[0];
15304
+ if (nodes) {
15305
+ let index = 0;
15306
+ // noramlize to be paragraph
15307
+ for (const [targetNode, targetPath] of nodes) {
15308
+ index++;
15309
+ const paragraph = createEmptyParagraph();
15310
+ const text = Node.string(targetNode);
15311
+ paragraph.children[0].text = text;
15312
+ if (targetNode.key === node.key) {
15313
+ cursorPath = rootPath[0] + index;
15314
+ }
15315
+ Transforms.insertNodes(editor, paragraph, { at: [rootPath[0] + index] });
15316
+ }
15317
+ }
15318
+ const cursor = { path: [cursorPath, 0], offset: offset };
15319
+ Transforms.select(editor, { anchor: cursor, focus: cursor });
15320
+ // remove root node
15321
+ Transforms.removeNodes(editor, {
15322
+ at: rootPath
15323
+ });
15324
+ }
15325
+ catch (error) { }
15326
+ return;
15233
15327
  }
15234
15328
  }
15235
15329
  // adjust selection when selection is in hidden cell
15236
- if (Element$1.isElement(entry[0]) && entry[0].type === ElementKinds.tableCell && entry[0].hidden) {
15237
- if (editor.selection && Range.isCollapsed(editor.selection) && Path.isAncestor(entry[1], editor.selection.anchor.path)) {
15330
+ if (Element$1.isElement(node) && node.type === ElementKinds.tableCell) {
15331
+ if (editor.selection &&
15332
+ Range.isCollapsed(editor.selection) &&
15333
+ Path.isAncestor(path, editor.selection.anchor.path) &&
15334
+ node.hidden) {
15238
15335
  setTimeout(() => {
15239
15336
  const opts = new TableOptions();
15240
- const tablePosition = TablePosition.create(opts, editor, editor.selection.anchor.path);
15337
+ const tablePosition = createTablePosition(editor);
15241
15338
  const origin = getOriginCell(tablePosition.table, tablePosition.getRowIndex(), tablePosition.getColumnIndex());
15242
15339
  if (origin) {
15243
15340
  const path = AngularEditor.findPath(editor, origin);
@@ -15247,7 +15344,7 @@ const withTable = (editor) => {
15247
15344
  return;
15248
15345
  }
15249
15346
  }
15250
- normalizeNode(entry);
15347
+ normalizeNode([node, path]);
15251
15348
  };
15252
15349
  editor.isBlockCard = (element) => {
15253
15350
  if (element && element.type === ElementKinds.table) {
@@ -15259,10 +15356,10 @@ const withTable = (editor) => {
15259
15356
  if (element.type === ElementKinds.table) {
15260
15357
  return TheTableComponent;
15261
15358
  }
15262
- if (element.type === ElementKinds.tableRow) {
15359
+ if (element.type === ElementKinds.tableRow && isLegalTable(editor, element)) {
15263
15360
  return TheTableRowComponent;
15264
15361
  }
15265
- if (element.type === ElementKinds.tableCell) {
15362
+ if (element.type === ElementKinds.tableCell && isLegalTable(editor, element)) {
15266
15363
  return TheTdComponent;
15267
15364
  }
15268
15365
  return renderElement(element);
@@ -15273,10 +15370,9 @@ const withTable = (editor) => {
15273
15370
  deleteCutData();
15274
15371
  return;
15275
15372
  }
15276
- const { selection } = editor;
15277
- const element = TablePosition.create(opts, editor, selection.anchor.path);
15373
+ const element = createTablePosition(editor);
15278
15374
  const tableComponent = ELEMENT_TO_COMPONENT.get(element.table);
15279
- const selectedCellPositions = tableComponent.tableStore.selectedCellPositions;
15375
+ const selectedCellPositions = tableComponent.tableStore.getSelectedCellPositions();
15280
15376
  if (selectedCellPositions.length > 0) {
15281
15377
  Editor.withoutNormalizing(editor, () => {
15282
15378
  if (tableComponent.tableStore.isSelectedTable) {
@@ -15303,7 +15399,7 @@ const withTable = (editor) => {
15303
15399
  const isSelectionOperation = editor.operations.every(op => Operation.isSelectionOperation(op));
15304
15400
  if (isCollapsed && isSelectionOperation) {
15305
15401
  const opts = new TableOptions();
15306
- const tablePosition = TablePosition.create(opts, editor, editor.selection.anchor.path);
15402
+ const tablePosition = createTablePosition(editor);
15307
15403
  if (tablePosition.isInTable() && tablePosition.cell.hidden) {
15308
15404
  TableEditor.selectOriginCell(editor, tablePosition.table, tablePosition.getRowIndex(), tablePosition.getColumnIndex(), false);
15309
15405
  }
@@ -15354,6 +15450,13 @@ const createTablePlugin = createPluginFactory({
15354
15450
  });
15355
15451
 
15356
15452
  class TheTodoItemComponent extends TheBaseElementComponent {
15453
+ constructor(elementRef, cdr, ctxService) {
15454
+ super(elementRef, cdr);
15455
+ this.elementRef = elementRef;
15456
+ this.cdr = cdr;
15457
+ this.ctxService = ctxService;
15458
+ this.checkItemClass = true;
15459
+ }
15357
15460
  get checkItemSelectable() {
15358
15461
  return this.editableWithReadonly && this.readonly;
15359
15462
  }
@@ -15365,13 +15468,6 @@ class TheTodoItemComponent extends TheBaseElementComponent {
15365
15468
  var _a;
15366
15469
  return (_a = getPluginOptions(this.editor, PluginKeys.checkItem)) === null || _a === void 0 ? void 0 : _a.editableWithReadonly;
15367
15470
  }
15368
- constructor(elementRef, cdr, ctxService) {
15369
- super(elementRef, cdr);
15370
- this.elementRef = elementRef;
15371
- this.cdr = cdr;
15372
- this.ctxService = ctxService;
15373
- this.checkItemClass = true;
15374
- }
15375
15471
  ngOnInit() {
15376
15472
  super.ngOnInit();
15377
15473
  }
@@ -15382,14 +15478,14 @@ class TheTodoItemComponent extends TheBaseElementComponent {
15382
15478
  setNode(this.editor, { checked }, this.element);
15383
15479
  }
15384
15480
  }
15385
- TheTodoItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheTodoItemComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: TheContextService }], target: i0.ɵɵFactoryTarget.Component });
15386
- TheTodoItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.2", 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: `
15481
+ 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 });
15482
+ 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: `
15387
15483
  <span contenteditable="false" class="todo-item-status">
15388
15484
  <input #checkbox type="checkbox" [checked]="element.checked" (click)="onCheck(checkbox.checked)" />
15389
15485
  </span>
15390
15486
  <span><slate-children [children]="children" [context]="childrenContext" [viewContext]="viewContext"></slate-children></span>
15391
15487
  `, isInline: true, dependencies: [{ kind: "component", type: i1.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }] });
15392
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheTodoItemComponent, decorators: [{
15488
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheTodoItemComponent, decorators: [{
15393
15489
  type: Component,
15394
15490
  args: [{
15395
15491
  selector: 'div[theTodoItem]',
@@ -15656,15 +15752,15 @@ class TheInlineToolbarComponent {
15656
15752
  this.destroy$.complete();
15657
15753
  }
15658
15754
  }
15659
- TheInlineToolbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheInlineToolbarComponent, deps: [{ token: i0.ElementRef }, { token: i2$1.ScrollDispatcher }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: TheContextService }], target: i0.ɵɵFactoryTarget.Component });
15660
- TheInlineToolbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.2", 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
15755
+ 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 });
15756
+ 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
15661
15757
  #inlineToolbar
15662
15758
  class="the-inline-toolbar"
15663
15759
  [editor]="editor"
15664
15760
  [toolbarItems]="toolbarItems"
15665
15761
  [isMore]="false"
15666
15762
  ></the-toolbar> `, isInline: true, dependencies: [{ kind: "component", type: TheToolbarComponent, selector: "the-toolbar", inputs: ["editor", "toolbarItems", "align", "containerClass", "isMore", "afterTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
15667
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheInlineToolbarComponent, decorators: [{
15763
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheInlineToolbarComponent, decorators: [{
15668
15764
  type: Component,
15669
15765
  args: [{
15670
15766
  selector: 'the-inline-toolbar',
@@ -15690,10 +15786,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
15690
15786
  }] } });
15691
15787
 
15692
15788
  class TheQuickInsertComponent {
15693
- handleMousedownNativeElement(event) {
15694
- event.preventDefault();
15695
- event.stopPropagation();
15696
- }
15697
15789
  constructor(renderer, elementRef, cdr) {
15698
15790
  this.renderer = renderer;
15699
15791
  this.elementRef = elementRef;
@@ -15704,6 +15796,10 @@ class TheQuickInsertComponent {
15704
15796
  this.iconNameFill = 'plus-circle-thin-fill';
15705
15797
  this.displayIconName = this.defaultIconName;
15706
15798
  }
15799
+ handleMousedownNativeElement(event) {
15800
+ event.preventDefault();
15801
+ event.stopPropagation();
15802
+ }
15707
15803
  ngOnInit() {
15708
15804
  const { onChange } = this.editor;
15709
15805
  this.editor.onChange = () => {
@@ -15783,9 +15879,9 @@ class TheQuickInsertComponent {
15783
15879
  }, 100);
15784
15880
  }
15785
15881
  }
15786
- TheQuickInsertComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheQuickInsertComponent, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
15787
- TheQuickInsertComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.2", 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"] }] });
15788
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheQuickInsertComponent, decorators: [{
15882
+ 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 });
15883
+ 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"] }] });
15884
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheQuickInsertComponent, decorators: [{
15789
15885
  type: Component,
15790
15886
  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" }]
15791
15887
  }], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { className: [{
@@ -15804,19 +15900,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
15804
15900
  }] } });
15805
15901
 
15806
15902
  class TheEditorComponent extends mixinUnsubscribe(MixinBase) {
15807
- get theGlobalToolbarInstance() {
15808
- return this.theGlobalToolbar ? this.theGlobalToolbar : this.globalToolbarInstance;
15809
- }
15810
- get maxHeight() {
15811
- var _a, _b;
15812
- return ((_a = this.theOptions) === null || _a === void 0 ? void 0 : _a.maxHeight) ? `${(_b = this.theOptions) === null || _b === void 0 ? void 0 : _b.maxHeight}px` : null;
15813
- }
15814
- constructor(theContextService, viewContainerRef, elementRef, scrollDispatcher, ngZone, cdr, iconRegistry) {
15903
+ constructor(theContextService, viewContainerRef, elementRef, ngZone, cdr, iconRegistry) {
15815
15904
  super();
15816
15905
  this.theContextService = theContextService;
15817
15906
  this.viewContainerRef = viewContainerRef;
15818
15907
  this.elementRef = elementRef;
15819
- this.scrollDispatcher = scrollDispatcher;
15820
15908
  this.ngZone = ngZone;
15821
15909
  this.cdr = cdr;
15822
15910
  this.iconRegistry = iconRegistry;
@@ -15927,6 +16015,13 @@ class TheEditorComponent extends mixinUnsubscribe(MixinBase) {
15927
16015
  });
15928
16016
  };
15929
16017
  }
16018
+ get theGlobalToolbarInstance() {
16019
+ return this.theGlobalToolbar ? this.theGlobalToolbar : this.globalToolbarInstance;
16020
+ }
16021
+ get maxHeight() {
16022
+ var _a, _b;
16023
+ return ((_a = this.theOptions) === null || _a === void 0 ? void 0 : _a.maxHeight) ? `${(_b = this.theOptions) === null || _b === void 0 ? void 0 : _b.maxHeight}px` : null;
16024
+ }
15930
16025
  ngOnInit() {
15931
16026
  this.initialize();
15932
16027
  initializeDefaultMenuIcons(this.iconRegistry);
@@ -15943,18 +16038,18 @@ class TheEditorComponent extends mixinUnsubscribe(MixinBase) {
15943
16038
  this.onErrorHandler();
15944
16039
  }
15945
16040
  ngOnChanges(changes) {
15946
- var _a, _b, _c, _d, _e;
16041
+ var _a, _b, _c, _d, _e, _f, _g;
15947
16042
  const options = changes.theOptions;
15948
- if (options) {
15949
- this.initializeOptions();
16043
+ if (options && !options.firstChange && !isEqual((_a = options.currentValue) === null || _a === void 0 ? void 0 : _a.toolbar, (_b = options.previousValue) === null || _b === void 0 ? void 0 : _b.toolbar)) {
16044
+ this.toolbarCalculate();
15950
16045
  }
15951
- if (options && ((_a = options.currentValue) === null || _a === void 0 ? void 0 : _a.readonly) !== ((_b = options.previousValue) === null || _b === void 0 ? void 0 : _b.readonly)) {
16046
+ if (options && ((_c = options.currentValue) === null || _c === void 0 ? void 0 : _c.readonly) !== ((_d = options.previousValue) === null || _d === void 0 ? void 0 : _d.readonly)) {
15952
16047
  this.applyAutoFocus();
15953
16048
  }
15954
16049
  if (changes['theDecorate']) {
15955
16050
  this.generateDecorate();
15956
16051
  }
15957
- if (((_c = this.editor) === null || _c === void 0 ? void 0 : _c.selection) && (((_d = options === null || options === void 0 ? void 0 : options.currentValue) === null || _d === void 0 ? void 0 : _d.readonly) || ((_e = options === null || options === void 0 ? void 0 : options.currentValue) === null || _e === void 0 ? void 0 : _e.disabled))) {
16052
+ if (((_e = this.editor) === null || _e === void 0 ? void 0 : _e.selection) && (((_f = options === null || options === void 0 ? void 0 : options.currentValue) === null || _f === void 0 ? void 0 : _f.readonly) || ((_g = options === null || options === void 0 ? void 0 : options.currentValue) === null || _g === void 0 ? void 0 : _g.disabled))) {
15958
16053
  Transforms.deselect(this.editor);
15959
16054
  }
15960
16055
  }
@@ -15977,6 +16072,7 @@ class TheEditorComponent extends mixinUnsubscribe(MixinBase) {
15977
16072
  nativeElement: this.elementRef.nativeElement,
15978
16073
  viewContainerRef: this.viewContainerRef
15979
16074
  });
16075
+ this.initializeOptions();
15980
16076
  this.toolbarCalculate();
15981
16077
  setTimeout(() => {
15982
16078
  // You need to wait for the editor rendering to complete
@@ -16158,8 +16254,8 @@ class TheEditorComponent extends mixinUnsubscribe(MixinBase) {
16158
16254
  };
16159
16255
  }
16160
16256
  }
16161
- TheEditorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheEditorComponent, deps: [{ token: TheContextService }, { token: i0.ViewContainerRef }, { token: i0.ElementRef }, { token: i2$2.ScrollDispatcher }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }, { token: i3.ThyIconRegistry }], target: i0.ɵɵFactoryTarget.Component });
16162
- TheEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.2", 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: [
16257
+ 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: i0.NgZone }, { token: i0.ChangeDetectorRef }, { token: i4.ThyIconRegistry }], target: i0.ɵɵFactoryTarget.Component });
16258
+ 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: [
16163
16259
  TheContextService,
16164
16260
  TheColorSelectService,
16165
16261
  {
@@ -16167,8 +16263,8 @@ TheEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", ver
16167
16263
  useExisting: forwardRef(() => TheEditorComponent),
16168
16264
  multi: true
16169
16265
  }
16170
- ], 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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.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 });
16171
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheEditorComponent, decorators: [{
16266
+ ], 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 });
16267
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheEditorComponent, decorators: [{
16172
16268
  type: Component,
16173
16269
  args: [{ selector: 'the-editor, theEditor', providers: [
16174
16270
  TheContextService,
@@ -16182,7 +16278,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
16182
16278
  class: 'the-editor',
16183
16279
  '[class.the-editor-readonly]': 'theOptions?.readonly'
16184
16280
  }, 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" }]
16185
- }], ctorParameters: function () { return [{ type: TheContextService }, { type: i0.ViewContainerRef }, { type: i0.ElementRef }, { type: i2$2.ScrollDispatcher }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }, { type: i3.ThyIconRegistry }]; }, propDecorators: { theOptions: [{
16281
+ }], ctorParameters: function () { return [{ type: TheContextService }, { type: i0.ViewContainerRef }, { type: i0.ElementRef }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }, { type: i4.ThyIconRegistry }]; }, propDecorators: { theOptions: [{
16186
16282
  type: Input
16187
16283
  }], thePlugins: [{
16188
16284
  type: Input
@@ -16215,10 +16311,10 @@ const ENTRY_COMMON_COMPONENTS = [TheColumnResizeOverlayHandleComponent];
16215
16311
  const DIRECTIVES = [TheColumnResizeDirective];
16216
16312
  class TheColumnResizeCommonModule {
16217
16313
  }
16218
- TheColumnResizeCommonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheColumnResizeCommonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
16219
- TheColumnResizeCommonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.2", ngImport: i0, type: TheColumnResizeCommonModule, declarations: [TheColumnResizeOverlayHandleComponent], exports: [TheColumnResizeOverlayHandleComponent] });
16220
- TheColumnResizeCommonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheColumnResizeCommonModule });
16221
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheColumnResizeCommonModule, decorators: [{
16314
+ TheColumnResizeCommonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheColumnResizeCommonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
16315
+ TheColumnResizeCommonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.0", ngImport: i0, type: TheColumnResizeCommonModule, declarations: [TheColumnResizeOverlayHandleComponent], exports: [TheColumnResizeOverlayHandleComponent] });
16316
+ TheColumnResizeCommonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheColumnResizeCommonModule });
16317
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheColumnResizeCommonModule, decorators: [{
16222
16318
  type: NgModule,
16223
16319
  args: [{
16224
16320
  declarations: ENTRY_COMMON_COMPONENTS,
@@ -16227,10 +16323,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
16227
16323
  }] });
16228
16324
  class TheColumnSizeModule {
16229
16325
  }
16230
- TheColumnSizeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheColumnSizeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
16231
- TheColumnSizeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.2", ngImport: i0, type: TheColumnSizeModule, declarations: [TheColumnResizeDirective], imports: [OverlayModule, TheColumnResizeCommonModule], exports: [TheColumnResizeDirective] });
16232
- TheColumnSizeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheColumnSizeModule, imports: [OverlayModule, TheColumnResizeCommonModule] });
16233
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheColumnSizeModule, decorators: [{
16326
+ TheColumnSizeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheColumnSizeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
16327
+ TheColumnSizeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.0", ngImport: i0, type: TheColumnSizeModule, declarations: [TheColumnResizeDirective], imports: [OverlayModule, TheColumnResizeCommonModule], exports: [TheColumnResizeDirective] });
16328
+ TheColumnSizeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheColumnSizeModule, imports: [OverlayModule, TheColumnResizeCommonModule] });
16329
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheColumnSizeModule, decorators: [{
16234
16330
  type: NgModule,
16235
16331
  args: [{
16236
16332
  imports: [OverlayModule, TheColumnResizeCommonModule],
@@ -16312,8 +16408,8 @@ const PLUGIN_COMPONENTS = [
16312
16408
  const PIPES = [ElementStylePipe, ElementClassPipe, TableFreezeColumnPipe, TableFreezeRowPipe];
16313
16409
  class TheEditorModule {
16314
16410
  }
16315
- TheEditorModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheEditorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
16316
- TheEditorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.2", ngImport: i0, type: TheEditorModule, declarations: [TheEditorComponent, ElementStylePipe, ElementClassPipe, TableFreezeColumnPipe, TableFreezeRowPipe, TheToolbarComponent,
16411
+ TheEditorModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheEditorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
16412
+ TheEditorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.0", ngImport: i0, type: TheEditorModule, declarations: [TheEditorComponent, ElementStylePipe, ElementClassPipe, TableFreezeColumnPipe, TableFreezeRowPipe, TheToolbarComponent,
16317
16413
  TheToolbarDropdownComponent,
16318
16414
  TheToolbarGroupComponent,
16319
16415
  TheToolbarItemComponent,
@@ -16384,14 +16480,14 @@ TheEditorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version
16384
16480
  TheListboxGroupDirective,
16385
16481
  TheListboxDirective,
16386
16482
  ThePreventDefaultDirective] });
16387
- TheEditorModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheEditorModule, providers: [
16483
+ TheEditorModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheEditorModule, providers: [
16388
16484
  {
16389
16485
  provide: TheToolbarGroupToken,
16390
16486
  useValue: TheToolbarGroupComponent
16391
16487
  },
16392
16488
  THE_MODE_PROVIDER
16393
16489
  ], imports: [CommonModule, ScrollingModule, SlateModule, FormsModule, TETHYS, CodemirrorModule, TheColumnSizeModule] });
16394
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheEditorModule, decorators: [{
16490
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheEditorModule, decorators: [{
16395
16491
  type: NgModule,
16396
16492
  args: [{
16397
16493
  declarations: [TheEditorComponent, ...PIPES, ...COMPONENTS, ...PLUGIN_COMPONENTS],
@@ -16456,9 +16552,9 @@ class TheToolbarService {
16456
16552
  });
16457
16553
  }
16458
16554
  }
16459
- TheToolbarService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheToolbarService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
16460
- TheToolbarService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheToolbarService });
16461
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheToolbarService, decorators: [{
16555
+ TheToolbarService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheToolbarService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
16556
+ TheToolbarService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheToolbarService });
16557
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheToolbarService, decorators: [{
16462
16558
  type: Injectable
16463
16559
  }] });
16464
16560