@worktile/theia 15.0.18 → 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 (153) 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 +1 -1
  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 +10 -10
  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 +44 -134
  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 +16 -17
  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-range-in-table.mjs +6 -6
  88. package/esm2020/plugins/table/utils/is-selection-in-table.mjs +3 -5
  89. package/esm2020/plugins/table/utils/merge-cell.mjs +17 -2
  90. package/esm2020/plugins/table/utils/split-cell.mjs +3 -6
  91. package/esm2020/plugins/table/utils/table-entry.mjs +21 -0
  92. package/esm2020/plugins/todo-item/todo-item.component.mjs +11 -11
  93. package/esm2020/plugins/vertical-align/toolbar-item.component.mjs +11 -11
  94. package/esm2020/services/color-select.service.mjs +7 -7
  95. package/esm2020/services/context.service.mjs +3 -3
  96. package/esm2020/services/table-contextmenu.service.mjs +21 -18
  97. package/esm2020/services/toolbar.service.mjs +3 -3
  98. package/fesm2015/worktile-theia.mjs +800 -759
  99. package/fesm2015/worktile-theia.mjs.map +1 -1
  100. package/fesm2020/worktile-theia.mjs +798 -758
  101. package/fesm2020/worktile-theia.mjs.map +1 -1
  102. package/interfaces/editor.d.ts +2 -2
  103. package/interfaces/element.d.ts +3 -3
  104. package/interfaces/plugins/no-infer.d.ts +1 -1
  105. package/interfaces/plugins/plugin-key.d.ts +1 -1
  106. package/interfaces/plugins/plugin-menu.d.ts +4 -4
  107. package/interfaces/plugins/plugins.d.ts +4 -4
  108. package/interfaces/plugins/with-override.d.ts +1 -1
  109. package/interfaces/toolbar.d.ts +4 -4
  110. package/interfaces/utility/nested-structure-by-key.d.ts +1 -1
  111. package/interfaces/utility/override-by-key.d.ts +1 -1
  112. package/interfaces/utility/types.d.ts +1 -1
  113. package/interfaces/view-base.d.ts +1 -1
  114. package/package.json +1 -1
  115. package/plugins/blockquote/blockquote.component.d.ts +1 -1
  116. package/plugins/code/code.component.d.ts +1 -1
  117. package/plugins/color/toolbar-item.component.d.ts +1 -1
  118. package/plugins/common/transforms.plugin.d.ts +1 -1
  119. package/plugins/heading/heading.plugin.d.ts +1 -1
  120. package/plugins/hr/hr.component.d.ts +1 -1
  121. package/plugins/image/image.component.d.ts +1 -1
  122. package/plugins/inline-code/inline-code.component.d.ts +1 -1
  123. package/plugins/link/edit/link-edit.component.d.ts +1 -1
  124. package/plugins/link/hover/link-hover.component.d.ts +1 -1
  125. package/plugins/link/link.component.d.ts +2 -2
  126. package/plugins/list/components/bulleted-list.component.d.ts +1 -1
  127. package/plugins/list/components/list-item.component.d.ts +1 -1
  128. package/plugins/list/components/numbered-list.component.d.ts +1 -1
  129. package/plugins/list/types.d.ts +1 -1
  130. package/plugins/mention/suggestion.component.d.ts +1 -1
  131. package/plugins/quick-insert/components/quick-insert.component.d.ts +1 -1
  132. package/plugins/table/components/insert-mark/insert-mark.component.d.ts +7 -4
  133. package/plugins/table/components/row/row.component.d.ts +1 -1
  134. package/plugins/table/components/table.component.d.ts +1 -14
  135. package/plugins/table/components/td/td.component.d.ts +1 -1
  136. package/plugins/table/components/toolbar/table-options.component.d.ts +2 -2
  137. package/plugins/table/components/toolbar/table-toolbar.component.d.ts +1 -1
  138. package/plugins/table/table.editor.d.ts +4 -1
  139. package/plugins/table/table.store.d.ts +2 -20
  140. package/plugins/table/toolbar-item.component.d.ts +1 -1
  141. package/plugins/table/utils/calculate-table.d.ts +3 -0
  142. package/plugins/table/utils/cell-position.d.ts +14 -0
  143. package/plugins/table/utils/create-table-position.d.ts +3 -0
  144. package/plugins/table/utils/get-grid-columns.d.ts +1 -1
  145. package/plugins/table/utils/get-min-max-cell-index.d.ts +4 -0
  146. package/plugins/table/utils/is-range-in-table.d.ts +2 -2
  147. package/plugins/table/utils/merge-cell.d.ts +1 -0
  148. package/plugins/table/utils/table-entry.d.ts +5 -0
  149. package/plugins/todo-item/todo-item.component.d.ts +1 -1
  150. package/plugins/vertical-align/toolbar-item.component.d.ts +1 -1
  151. package/queries/find-node.d.ts +1 -1
  152. package/queries/get-range-before.d.ts +1 -1
  153. package/utils/match.d.ts +3 -3
@@ -98,9 +98,9 @@ class TheBaseElementComponent extends BaseElementComponent {
98
98
  this.nativeElement.classList.add(`slate-element-${this.element.type}`, blockClass);
99
99
  }
100
100
  }
101
- TheBaseElementComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheBaseElementComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
102
- TheBaseElementComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.2", type: TheBaseElementComponent, selector: "TheBaseElementComponent", usesInheritance: true, ngImport: i0, template: '', isInline: true });
103
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheBaseElementComponent, decorators: [{
101
+ TheBaseElementComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheBaseElementComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
102
+ TheBaseElementComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: TheBaseElementComponent, selector: "TheBaseElementComponent", usesInheritance: true, ngImport: i0, template: '', isInline: true });
103
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheBaseElementComponent, decorators: [{
104
104
  type: Component,
105
105
  args: [{
106
106
  selector: 'TheBaseElementComponent',
@@ -113,9 +113,9 @@ class TheDefaultElementComponent extends TheBaseElementComponent {
113
113
  return this.element?.indent;
114
114
  }
115
115
  }
116
- TheDefaultElementComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheDefaultElementComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
117
- 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 });
118
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheDefaultElementComponent, decorators: [{
116
+ TheDefaultElementComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheDefaultElementComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
117
+ 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 });
118
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheDefaultElementComponent, decorators: [{
119
119
  type: Component,
120
120
  args: [{
121
121
  selector: '[theDefaultElement]',
@@ -818,9 +818,9 @@ class ElementStylePipe {
818
818
  return style;
819
819
  }
820
820
  }
821
- ElementStylePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: ElementStylePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
822
- ElementStylePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.2", ngImport: i0, type: ElementStylePipe, name: "elementStyle" });
823
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: ElementStylePipe, decorators: [{
821
+ ElementStylePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ElementStylePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
822
+ ElementStylePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.0", ngImport: i0, type: ElementStylePipe, name: "elementStyle" });
823
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ElementStylePipe, decorators: [{
824
824
  type: Pipe,
825
825
  args: [{
826
826
  name: 'elementStyle'
@@ -836,9 +836,9 @@ class ElementClassPipe {
836
836
  return classStr;
837
837
  }
838
838
  }
839
- ElementClassPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: ElementClassPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
840
- ElementClassPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.2", ngImport: i0, type: ElementClassPipe, name: "elementClass" });
841
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: ElementClassPipe, decorators: [{
839
+ ElementClassPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ElementClassPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
840
+ ElementClassPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.0", ngImport: i0, type: ElementClassPipe, name: "elementClass" });
841
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ElementClassPipe, decorators: [{
842
842
  type: Pipe,
843
843
  args: [{
844
844
  name: 'elementClass'
@@ -873,9 +873,9 @@ class TheTemplateComponent {
873
873
  };
874
874
  }
875
875
  }
876
- TheTemplateComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheTemplateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
877
- 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 });
878
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheTemplateComponent, decorators: [{
876
+ TheTemplateComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheTemplateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
877
+ 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 });
878
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheTemplateComponent, decorators: [{
879
879
  type: Component,
880
880
  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" }]
881
881
  }], propDecorators: { paragraphTemplate: [{
@@ -941,9 +941,9 @@ class TheTextComponent extends BaseTextComponent {
941
941
  this.applyTextMark();
942
942
  }
943
943
  }
944
- 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 });
945
- 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"] }] });
946
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheTextComponent, decorators: [{
944
+ 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 });
945
+ 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"] }] });
946
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheTextComponent, decorators: [{
947
947
  type: Component,
948
948
  args: [{
949
949
  selector: 'span[theText]',
@@ -2549,68 +2549,68 @@ const isEmptyContentByFilter = (editor, rules) => {
2549
2549
 
2550
2550
  var index$1 = /*#__PURE__*/Object.freeze({
2551
2551
  __proto__: null,
2552
- anchorBlock: anchorBlock,
2553
- anchorBlockEntry: anchorBlockEntry,
2554
- anchorInlineEntry: anchorInlineEntry,
2555
- findDescendant: findDescendant,
2556
- findNode: findNode,
2557
- findPath: findPath,
2558
- getAbove: getAbove,
2559
- getAboveByType: getAboveByType,
2552
+ getLastNode: getLastNode,
2560
2553
  getAnchorBlockEntry: getAnchorBlockEntry,
2554
+ getAboveByType: getAboveByType,
2555
+ getNodes: getNodes,
2556
+ getNodesByType: getNodesByType,
2561
2557
  getBlockAbove: getBlockAbove,
2562
- getBlockCardAbove: getBlockCardAbove,
2563
- getBlockCardCenterCursor: getBlockCardCenterCursor,
2564
- getContainerBlocks: getContainerBlocks,
2565
- getDirectlyParent: getDirectlyParent,
2566
- getInsertElementsPath: getInsertElementsPath,
2558
+ getPreviousPath: getPreviousPath,
2559
+ getNode: getNode,
2560
+ getParent: getParent,
2567
2561
  getLastChild: getLastChild,
2568
2562
  getLastChildPath: getLastChildPath,
2569
- getLastNode: getLastNode,
2570
2563
  getNextSiblingNodes: getNextSiblingNodes,
2571
- getNode: getNode,
2572
- getNodes: getNodes,
2573
- getNodesByType: getNodesByType,
2574
- getParent: getParent,
2575
- getPlainText: getPlainText,
2576
- getPluginByToolbarItem: getPluginByToolbarItem,
2564
+ getAbove: getAbove,
2577
2565
  getPointBefore: getPointBefore,
2566
+ getSelectionNodesByType: getSelectionNodesByType,
2567
+ getText: getText,
2578
2568
  getPointFromLocation: getPointFromLocation,
2579
- getPreviousPath: getPreviousPath,
2580
- getRangeBefore: getRangeBefore,
2581
2569
  getRangeFromBlockStart: getRangeFromBlockStart,
2570
+ getRangeBefore: getRangeBefore,
2571
+ getBlockCardCenterCursor: getBlockCardCenterCursor,
2572
+ getBlockCardAbove: getBlockCardAbove,
2573
+ getPlainText: getPlainText,
2582
2574
  getSelectionMarks: getSelectionMarks,
2583
- getSelectionNodesByType: getSelectionNodesByType,
2584
- getText: getText,
2585
- getToolbarItemDisabled: getToolbarItemDisabled,
2586
- isAcrossBlocks: isAcrossBlocks,
2575
+ getContainerBlocks: getContainerBlocks,
2576
+ getDirectlyParent: getDirectlyParent,
2587
2577
  isAncestor: isAncestor,
2588
- isAncestorEmpty: isAncestorEmpty,
2589
- isBlockAboveEmpty: isBlockAboveEmpty,
2590
- isBlockActive: isBlockActive,
2591
- isBlockCardCursor: isBlockCardCursor,
2592
- isBlockTextEmptyAfterSelection: isBlockTextEmptyAfterSelection,
2593
2578
  isCollapsed: isCollapsed,
2594
- isContainNestedType: isContainNestedType,
2595
- isContainer: isContainer,
2596
- isDescendant: isDescendant,
2597
- isEmptyContent: isEmptyContent,
2598
- isEmptyContentByFilter: isEmptyContentByFilter,
2599
2579
  isEmptyParagraph: isEmptyParagraph,
2600
- isEmptyParagraphByPath: isEmptyParagraphByPath,
2601
2580
  isEmptyParagraphElement: isEmptyParagraphElement,
2602
- isFirstChild: isFirstChild,
2603
- isGlobalCollapsed: isGlobalCollapsed,
2604
- isIncludeTypes: isIncludeTypes,
2605
2581
  isLogicEmptyParagraphElement: isLogicEmptyParagraphElement,
2606
- isNodeType: isNodeType,
2607
- isNodeTypeIn: isNodeTypeIn,
2608
2582
  isParagraph: isParagraph,
2583
+ isBlockActive: isBlockActive,
2584
+ isIncludeTypes: isIncludeTypes,
2585
+ isAncestorEmpty: isAncestorEmpty,
2586
+ isBlockAboveEmpty: isBlockAboveEmpty,
2587
+ isNodeTypeIn: isNodeTypeIn,
2588
+ isFirstChild: isFirstChild,
2609
2589
  isPointAtRoot: isPointAtRoot,
2610
- isRangeAcrossBlocks: isRangeAcrossBlocks,
2611
2590
  isRangeAtRoot: isRangeAtRoot,
2591
+ isBlockTextEmptyAfterSelection: isBlockTextEmptyAfterSelection,
2612
2592
  isStart: isStart,
2613
- someNode: someNode
2593
+ isRangeAcrossBlocks: isRangeAcrossBlocks,
2594
+ isDescendant: isDescendant,
2595
+ isNodeType: isNodeType,
2596
+ isAcrossBlocks: isAcrossBlocks,
2597
+ isBlockCardCursor: isBlockCardCursor,
2598
+ isEmptyParagraphByPath: isEmptyParagraphByPath,
2599
+ isEmptyContent: isEmptyContent,
2600
+ isEmptyContentByFilter: isEmptyContentByFilter,
2601
+ isContainer: isContainer,
2602
+ getInsertElementsPath: getInsertElementsPath,
2603
+ isContainNestedType: isContainNestedType,
2604
+ anchorBlock: anchorBlock,
2605
+ anchorBlockEntry: anchorBlockEntry,
2606
+ anchorInlineEntry: anchorInlineEntry,
2607
+ findPath: findPath,
2608
+ findNode: findNode,
2609
+ findDescendant: findDescendant,
2610
+ someNode: someNode,
2611
+ getToolbarItemDisabled: getToolbarItemDisabled,
2612
+ getPluginByToolbarItem: getPluginByToolbarItem,
2613
+ isGlobalCollapsed: isGlobalCollapsed
2614
2614
  });
2615
2615
 
2616
2616
  class TheBaseToolbarItem {
@@ -2643,9 +2643,9 @@ class TheBaseToolbarItem {
2643
2643
  }
2644
2644
  }
2645
2645
  }
2646
- TheBaseToolbarItem.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheBaseToolbarItem, deps: [], target: i0.ɵɵFactoryTarget.Directive });
2647
- 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 });
2648
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheBaseToolbarItem, decorators: [{
2646
+ TheBaseToolbarItem.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheBaseToolbarItem, deps: [], target: i0.ɵɵFactoryTarget.Directive });
2647
+ 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 });
2648
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheBaseToolbarItem, decorators: [{
2649
2649
  type: Directive
2650
2650
  }], propDecorators: { toolbarItem: [{
2651
2651
  type: Input
@@ -2681,9 +2681,9 @@ class TheBaseToolbarDropdown extends TheBaseToolbarItem {
2681
2681
  }
2682
2682
  }
2683
2683
  }
2684
- TheBaseToolbarDropdown.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheBaseToolbarDropdown, deps: null, target: i0.ɵɵFactoryTarget.Directive });
2685
- 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 });
2686
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheBaseToolbarDropdown, decorators: [{
2684
+ TheBaseToolbarDropdown.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheBaseToolbarDropdown, deps: null, target: i0.ɵɵFactoryTarget.Directive });
2685
+ 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 });
2686
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheBaseToolbarDropdown, decorators: [{
2687
2687
  type: Directive
2688
2688
  }], propDecorators: { menus: [{
2689
2689
  type: Input
@@ -2694,6 +2694,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
2694
2694
  }] } });
2695
2695
 
2696
2696
  class TheToolbarDropdownComponent extends TheBaseToolbarDropdown {
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
+ }
2697
2707
  get isOpen() {
2698
2708
  return this.dropdownPopoverRef && this.dropdownPopoverRef.getOverlayRef() && this.dropdownPopoverRef.getOverlayRef().hasAttached();
2699
2709
  }
@@ -2706,16 +2716,6 @@ class TheToolbarDropdownComponent extends TheBaseToolbarDropdown {
2706
2716
  get activeDropdown() {
2707
2717
  return this.toolbarItem.dropdownFixedIcon && !!this.activeKeys.length;
2708
2718
  }
2709
- constructor(elementRef, thyPopover, viewContainerRef, overlay) {
2710
- super();
2711
- this.elementRef = elementRef;
2712
- this.thyPopover = thyPopover;
2713
- this.viewContainerRef = viewContainerRef;
2714
- this.overlay = overlay;
2715
- this.className = 'the-toolbar-dropdown-container';
2716
- this.activeKeys = [];
2717
- this.dropdownMode = DropdownMode;
2718
- }
2719
2719
  ngOnInit() {
2720
2720
  if (!this.activeMenuItem) {
2721
2721
  this.activeMenuItem = this.defaultDropdownItem;
@@ -2807,9 +2807,9 @@ class TheToolbarDropdownComponent extends TheBaseToolbarDropdown {
2807
2807
  .withPositions([bottomPosition, topPosition]);
2808
2808
  }
2809
2809
  }
2810
- 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 });
2811
- 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: 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"] }] });
2812
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheToolbarDropdownComponent, decorators: [{
2810
+ 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 });
2811
+ 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"] }] });
2812
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheToolbarDropdownComponent, decorators: [{
2813
2813
  type: Component,
2814
2814
  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" }]
2815
2815
  }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1$1.ThyPopover }, { type: i0.ViewContainerRef }, { type: i2$1.Overlay }]; }, propDecorators: { className: [{
@@ -2827,13 +2827,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
2827
2827
  }] } });
2828
2828
 
2829
2829
  class TheToolbarItemComponent extends TheBaseToolbarItem {
2830
- toggleDropdown(event) {
2831
- super.execute(event);
2832
- }
2833
2830
  constructor() {
2834
2831
  super();
2835
2832
  this.className = 'the-toolbar-item';
2836
2833
  }
2834
+ toggleDropdown(event) {
2835
+ super.execute(event);
2836
+ }
2837
2837
  ngOnInit() { }
2838
2838
  preventDefault(event) {
2839
2839
  event.preventDefault();
@@ -2850,8 +2850,8 @@ class TheToolbarItemComponent extends TheBaseToolbarItem {
2850
2850
  this.toolbarItem?.execute(this.editor);
2851
2851
  }
2852
2852
  }
2853
- TheToolbarItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheToolbarItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2854
- 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: `
2853
+ TheToolbarItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheToolbarItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2854
+ 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: `
2855
2855
  <a
2856
2856
  href="javascript:;"
2857
2857
  thyAction
@@ -2865,7 +2865,7 @@ TheToolbarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0"
2865
2865
  ></a>
2866
2866
  <ng-template #tooltip let-data> {{ data?.name }} {{ data?.shortcutKey }} </ng-template>
2867
2867
  `, 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"] }] });
2868
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheToolbarItemComponent, decorators: [{
2868
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheToolbarItemComponent, decorators: [{
2869
2869
  type: Component,
2870
2870
  args: [{
2871
2871
  selector: 'the-toolbar-item',
@@ -2893,9 +2893,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
2893
2893
  }] } });
2894
2894
 
2895
2895
  class TheToolbarComponent {
2896
- get justifyContent() {
2897
- return this.align;
2898
- }
2899
2896
  constructor(cdr, elementRef, ngZone, toolbarGroupComponent) {
2900
2897
  this.cdr = cdr;
2901
2898
  this.elementRef = elementRef;
@@ -2908,6 +2905,9 @@ class TheToolbarComponent {
2908
2905
  this.moreGroupMenu = ToolbarMoreGroup;
2909
2906
  this.elementWidth = 0;
2910
2907
  }
2908
+ get justifyContent() {
2909
+ return this.align;
2910
+ }
2911
2911
  ngOnInit() {
2912
2912
  this.setToolbarClass();
2913
2913
  this.renderToolbarView();
@@ -3118,9 +3118,9 @@ class TheToolbarComponent {
3118
3118
  return TheToolbarItemComponent;
3119
3119
  }
3120
3120
  }
3121
- 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 });
3122
- 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"] }] });
3123
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheToolbarComponent, decorators: [{
3121
+ 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 });
3122
+ 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"] }] });
3123
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheToolbarComponent, decorators: [{
3124
3124
  type: Component,
3125
3125
  args: [{ selector: 'the-toolbar', host: {
3126
3126
  class: 'the-toolbar-container d-flex align-items-center'
@@ -3272,23 +3272,23 @@ class TheContextService {
3272
3272
  this.destroy$.complete();
3273
3273
  }
3274
3274
  }
3275
- TheContextService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheContextService, deps: [{ token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });
3276
- TheContextService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheContextService });
3277
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheContextService, decorators: [{
3275
+ TheContextService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheContextService, deps: [{ token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });
3276
+ TheContextService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheContextService });
3277
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheContextService, decorators: [{
3278
3278
  type: Injectable
3279
3279
  }], ctorParameters: function () { return [{ type: i0.NgZone }]; } });
3280
3280
 
3281
3281
  class TheColorSelectComponent {
3282
- handleDocumentMouseDown(event) {
3283
- if (!document.querySelector('.color-container').contains(event.target)) {
3284
- this.popoverRef.close();
3285
- }
3286
- }
3287
3282
  constructor(popoverRef) {
3288
3283
  this.popoverRef = popoverRef;
3289
3284
  this.showCustom = true;
3290
3285
  this.selectColors = [];
3291
3286
  }
3287
+ handleDocumentMouseDown(event) {
3288
+ if (!document.querySelector('.color-container').contains(event.target)) {
3289
+ this.popoverRef.close();
3290
+ }
3291
+ }
3292
3292
  ngOnInit() {
3293
3293
  if (this.selectedColor) {
3294
3294
  this.customColor = this.selectedColor.slice(1);
@@ -3354,9 +3354,9 @@ class TheColorSelectComponent {
3354
3354
  this.popoverRef.close();
3355
3355
  }
3356
3356
  }
3357
- 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 });
3358
- 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.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: "input[thyInput], select[thyInput], textarea[thyInput]", inputs: ["thySize"], exportAs: ["thyInput"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
3359
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheColorSelectComponent, decorators: [{
3357
+ 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 });
3358
+ 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 });
3359
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheColorSelectComponent, decorators: [{
3360
3360
  type: Component,
3361
3361
  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" }]
3362
3362
  }], ctorParameters: function () { return [{ type: i1$1.ThyPopoverRef }]; }, propDecorators: { selectedColor: [{
@@ -3381,9 +3381,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
3381
3381
  }] } });
3382
3382
 
3383
3383
  class TheColorSelectService {
3384
- get isOpenColorSelect() {
3385
- return this.colorSelectRef && this.colorSelectRef.componentInstance;
3386
- }
3387
3384
  constructor(thyPopover) {
3388
3385
  this.thyPopover = thyPopover;
3389
3386
  this.backdropClosable = false;
@@ -3392,6 +3389,9 @@ class TheColorSelectService {
3392
3389
  this.placement = 'bottomLeft';
3393
3390
  this.offset = 10;
3394
3391
  }
3392
+ get isOpenColorSelect() {
3393
+ return this.colorSelectRef && this.colorSelectRef.componentInstance;
3394
+ }
3395
3395
  toggleColorSelect(origin, selectedColor, colors, option, selectAction, placement, offset) {
3396
3396
  if (this.isOpenColorSelect) {
3397
3397
  this.colorSelectRef.close();
@@ -3421,9 +3421,9 @@ class TheColorSelectService {
3421
3421
  }
3422
3422
  }
3423
3423
  }
3424
- 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 });
3425
- TheColorSelectService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheColorSelectService });
3426
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheColorSelectService, decorators: [{
3424
+ 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 });
3425
+ TheColorSelectService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheColorSelectService });
3426
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheColorSelectService, decorators: [{
3427
3427
  type: Injectable
3428
3428
  }], ctorParameters: function () { return [{ type: i1$1.ThyPopover }]; } });
3429
3429
 
@@ -3771,13 +3771,21 @@ class TablePosition {
3771
3771
  }
3772
3772
  }
3773
3773
 
3774
+ const createTablePosition = (editor, path) => {
3775
+ path = path || editor.selection.anchor?.path;
3776
+ if (!path) {
3777
+ throw new Error('Path invalid');
3778
+ }
3779
+ return TablePosition.create(new TableOptions(), editor, path);
3780
+ };
3781
+
3774
3782
  /**
3775
3783
  * True if the given range is inside one table
3776
3784
  */
3777
- function isRangeInTable(opts, node, range) {
3778
- const { anchor, focus } = range;
3779
- const startPosition = TablePosition.create(opts, node, anchor.path);
3780
- const endPosition = TablePosition.create(opts, node, focus.path);
3785
+ function isRangeInTable(opts, editor, range) {
3786
+ const { focus } = range;
3787
+ const startPosition = createTablePosition(editor);
3788
+ const endPosition = createTablePosition(editor, focus.path);
3781
3789
  // Only handle events in tables
3782
3790
  if (!startPosition.isInTable() || !endPosition.isInTable()) {
3783
3791
  return false;
@@ -3811,8 +3819,7 @@ function isRectangularInTableCells(editor, cells) {
3811
3819
  let minCol = col;
3812
3820
  let maxRow = row;
3813
3821
  let minRow = row;
3814
- const path = editor.selection.anchor.path;
3815
- const pos = TablePosition.create(new TableOptions(), editor, path);
3822
+ const pos = createTablePosition(editor);
3816
3823
  for (let { row, col } of cells) {
3817
3824
  const { hidden, rowspan, colspan } = pos.findCellByPath({ row, col });
3818
3825
  if (hidden) {
@@ -4125,22 +4132,22 @@ function handleContinualInsertBreak(editor, lowestBlock, type) {
4125
4132
 
4126
4133
  var index = /*#__PURE__*/Object.freeze({
4127
4134
  __proto__: null,
4128
- applyDeepToNodes: applyDeepToNodes,
4135
+ setMarks: setMarks,
4129
4136
  clearMarks: clearMarks,
4130
- closeConversionHint: closeConversionHint,
4131
- deleteElement: deleteElement,
4132
- handleContinualDeleteBackward: handleContinualDeleteBackward,
4133
- handleContinualInsertBreak: handleContinualInsertBreak,
4134
4137
  insertElements: insertElements,
4135
4138
  insertParagraph: insertParagraph,
4136
- mergeDeepToNodes: mergeDeepToNodes,
4137
- moveChildren: moveChildren,
4138
- onKeyDownResetBlockType: onKeyDownResetBlockType,
4139
- setEndSelection: setEndSelection,
4140
- setMarks: setMarks,
4141
4139
  setNode: setNode,
4140
+ unwrapNodesByType: unwrapNodesByType,
4141
+ onKeyDownResetBlockType: onKeyDownResetBlockType,
4142
+ moveChildren: moveChildren,
4143
+ applyDeepToNodes: applyDeepToNodes,
4144
+ mergeDeepToNodes: mergeDeepToNodes,
4142
4145
  unWrap: unWrap,
4143
- unwrapNodesByType: unwrapNodesByType
4146
+ deleteElement: deleteElement,
4147
+ setEndSelection: setEndSelection,
4148
+ closeConversionHint: closeConversionHint,
4149
+ handleContinualDeleteBackward: handleContinualDeleteBackward,
4150
+ handleContinualInsertBreak: handleContinualInsertBreak
4144
4151
  });
4145
4152
 
4146
4153
  /**
@@ -4157,7 +4164,7 @@ function insertTable(opts, editor, rows = 3, columns = 3, getCellContent) {
4157
4164
  }
4158
4165
 
4159
4166
  function getInsertRowState(opts, editor, count = 1, at) {
4160
- const tablePosition = TablePosition.create(opts, editor, editor.selection.anchor.path);
4167
+ const tablePosition = createTablePosition(editor);
4161
4168
  let table = tablePosition.table;
4162
4169
  let tableEntry = tablePosition.tableEntry;
4163
4170
  // Create a new row with the right count of cells
@@ -4247,7 +4254,7 @@ function insertColumn(opts, editor, count = 1, at, // Column index
4247
4254
  getCell) {
4248
4255
  const { selection } = editor;
4249
4256
  const { anchor: { path } } = selection;
4250
- const tablePosition = TablePosition.create(opts, editor, path);
4257
+ const tablePosition = createTablePosition(editor, path);
4251
4258
  let table = tablePosition.table;
4252
4259
  let tableEntry = tablePosition.tableEntry;
4253
4260
  const insertColumnIndex = typeof at === 'undefined' ? tablePosition.getColumnIndex() + 1 : at;
@@ -4316,9 +4323,7 @@ function clearCell(opts, editor, cellEntry) {
4316
4323
  }
4317
4324
 
4318
4325
  function removeRow(opts, editor, selectRowIndex) {
4319
- const { selection } = editor;
4320
- const { anchor: { path } } = selection;
4321
- const tablePosition = TablePosition.create(opts, editor, path);
4326
+ const tablePosition = createTablePosition(editor);
4322
4327
  const { tableEntry, table, rowEntry: [rowNode, rowPath] } = tablePosition;
4323
4328
  selectRowIndex = selectRowIndex === undefined ? [...rowPath].pop() : selectRowIndex;
4324
4329
  const at = tableEntry[1].concat(selectRowIndex);
@@ -4388,7 +4393,7 @@ function removeColumns(table, columnsCount, index) {
4388
4393
  function removeColumn(opts, editor, selectColIndex) {
4389
4394
  const { selection } = editor;
4390
4395
  const { anchor: { path } } = selection;
4391
- const tablePosition = TablePosition.create(opts, editor, path);
4396
+ const tablePosition = createTablePosition(editor, path);
4392
4397
  const { tableEntry, table, row, cellEntry: [cellNode, cellPath] } = tablePosition;
4393
4398
  const rows = tableEntry[0].children;
4394
4399
  selectColIndex = selectColIndex === undefined ? [...cellPath].pop() : selectColIndex;
@@ -4440,8 +4445,8 @@ const NextPath = (path) => {
4440
4445
  function removeTable(opts, editor) {
4441
4446
  const { selection } = editor;
4442
4447
  const { anchor: { path } } = selection;
4443
- const pos = TablePosition.create(opts, editor, path);
4444
- const { table, tableEntry: [, tablePath] } = pos;
4448
+ const pos = createTablePosition(editor, path);
4449
+ const { tableEntry: [, tablePath] } = pos;
4445
4450
  let nextFocusEntry = null;
4446
4451
  let shouldCollapseToEnd = false;
4447
4452
  const nextEntry = Editor.next(editor, { at: tablePath });
@@ -5279,9 +5284,9 @@ class TheBaseSuggestion {
5279
5284
  event.preventDefault();
5280
5285
  }
5281
5286
  }
5282
- TheBaseSuggestion.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheBaseSuggestion, deps: [], target: i0.ɵɵFactoryTarget.Directive });
5283
- 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 });
5284
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheBaseSuggestion, decorators: [{
5287
+ TheBaseSuggestion.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheBaseSuggestion, deps: [], target: i0.ɵɵFactoryTarget.Directive });
5288
+ 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 });
5289
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheBaseSuggestion, decorators: [{
5285
5290
  type: Directive
5286
5291
  }], propDecorators: { editor: [{
5287
5292
  type: Input
@@ -5323,9 +5328,9 @@ class TheTableSelectComponent {
5323
5328
  }
5324
5329
  }
5325
5330
  }
5326
- 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 });
5327
- 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"] }] });
5328
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheTableSelectComponent, decorators: [{
5331
+ 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 });
5332
+ 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"] }] });
5333
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheTableSelectComponent, decorators: [{
5329
5334
  type: Component,
5330
5335
  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" }]
5331
5336
  }], ctorParameters: function () { return [{ type: i1$1.ThyPopoverRef }]; }, propDecorators: { optionsParam: [{
@@ -5341,12 +5346,6 @@ const THE_LISTBOX_PARENT_GROUP_TOKEN = new InjectionToken('THE_LISTBOX_PARENT_GR
5341
5346
  const THE_LISTBOX_TOKEN = new InjectionToken('THE_LISTBOX_TOKEN');
5342
5347
 
5343
5348
  class TheListboxOptionDirective {
5344
- get hasChild() {
5345
- return this._options.length > 0;
5346
- }
5347
- get firstChild() {
5348
- return this._options.first;
5349
- }
5350
5349
  constructor(parentOption, parentGroup, elementRef) {
5351
5350
  this.parentOption = parentOption;
5352
5351
  this.parentGroup = parentGroup;
@@ -5354,6 +5353,12 @@ class TheListboxOptionDirective {
5354
5353
  this._active = false;
5355
5354
  this.className = 'the-listbox-option';
5356
5355
  }
5356
+ get hasChild() {
5357
+ return this._options.length > 0;
5358
+ }
5359
+ get firstChild() {
5360
+ return this._options.first;
5361
+ }
5357
5362
  ngOnInit() { }
5358
5363
  ngAfterContentInit() { }
5359
5364
  getGroups() {
@@ -5378,14 +5383,14 @@ class TheListboxOptionDirective {
5378
5383
  return this._active;
5379
5384
  }
5380
5385
  }
5381
- 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 });
5382
- 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: [
5386
+ 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 });
5387
+ 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: [
5383
5388
  {
5384
5389
  provide: THE_LISTBOX_PARENT_OPTION_TOKEN,
5385
5390
  useExisting: TheListboxOptionDirective
5386
5391
  }
5387
5392
  ], queries: [{ propertyName: "_options", predicate: i0.forwardRef(function () { return TheListboxOptionDirective; }), descendants: true }], exportAs: ["theListboxOption"], ngImport: i0 });
5388
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheListboxOptionDirective, decorators: [{
5393
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheListboxOptionDirective, decorators: [{
5389
5394
  type: Directive,
5390
5395
  args: [{
5391
5396
  selector: '[theListboxOption]',
@@ -5461,14 +5466,14 @@ class TheListboxGroupDirective {
5461
5466
  return this.options[this.options.length - 1];
5462
5467
  }
5463
5468
  }
5464
- 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 });
5465
- 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: [
5469
+ 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 });
5470
+ 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: [
5466
5471
  {
5467
5472
  provide: THE_LISTBOX_PARENT_GROUP_TOKEN,
5468
5473
  useExisting: TheListboxGroupDirective
5469
5474
  }
5470
5475
  ], queries: [{ propertyName: "_options", predicate: TheListboxOptionDirective, descendants: true }], exportAs: ["theListboxGroup"], ngImport: i0 });
5471
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheListboxGroupDirective, decorators: [{
5476
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheListboxGroupDirective, decorators: [{
5472
5477
  type: Directive,
5473
5478
  args: [{
5474
5479
  selector: '[theListboxGroup]',
@@ -5672,14 +5677,14 @@ class TheListboxDirective {
5672
5677
  this._keyboardSubscription.unsubscribe();
5673
5678
  }
5674
5679
  }
5675
- 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 });
5676
- 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: [
5680
+ 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 });
5681
+ 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: [
5677
5682
  {
5678
5683
  provide: THE_LISTBOX_TOKEN,
5679
5684
  useExisting: TheListboxDirective
5680
5685
  }
5681
5686
  ], queries: [{ propertyName: "_groups", predicate: TheListboxGroupDirective, descendants: true }, { propertyName: "_options", predicate: TheListboxOptionDirective, descendants: true }], exportAs: ["theListBox"], ngImport: i0 });
5682
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheListboxDirective, decorators: [{
5687
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheListboxDirective, decorators: [{
5683
5688
  type: Directive,
5684
5689
  args: [{
5685
5690
  selector: '[theListBox]',
@@ -5713,9 +5718,9 @@ class ThePreventDefaultDirective {
5713
5718
  event.preventDefault();
5714
5719
  }
5715
5720
  }
5716
- ThePreventDefaultDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: ThePreventDefaultDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
5717
- 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 });
5718
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: ThePreventDefaultDirective, decorators: [{
5721
+ ThePreventDefaultDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ThePreventDefaultDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
5722
+ 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 });
5723
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ThePreventDefaultDirective, decorators: [{
5719
5724
  type: Directive,
5720
5725
  args: [{
5721
5726
  selector: '[thePreventDefault]',
@@ -5874,9 +5879,9 @@ class ThePluginMenuComponent extends mixinUnsubscribe(MixinBase) {
5874
5879
  super.ngOnDestroy();
5875
5880
  }
5876
5881
  }
5877
- 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 });
5878
- 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.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", "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"] }] });
5879
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: ThePluginMenuComponent, decorators: [{
5882
+ 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 });
5883
+ 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"] }] });
5884
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ThePluginMenuComponent, decorators: [{
5880
5885
  type: Component,
5881
5886
  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" }]
5882
5887
  }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }, { type: i1$1.ThyPopoverRef }]; }, propDecorators: { dropdownTriggers: [{
@@ -5983,6 +5988,13 @@ const TodoItemEditor = {
5983
5988
  };
5984
5989
 
5985
5990
  class TheVerticalToolbarItemComponent extends TheBaseToolbarDropdown {
5991
+ constructor(elementRef, thyPopover, viewContainerRef) {
5992
+ super();
5993
+ this.elementRef = elementRef;
5994
+ this.thyPopover = thyPopover;
5995
+ this.viewContainerRef = viewContainerRef;
5996
+ this.isHide = true;
5997
+ }
5986
5998
  get isOpened() {
5987
5999
  return this.dropdownPopoverRef && this.dropdownPopoverRef.getOverlayRef() && this.dropdownPopoverRef.getOverlayRef().hasAttached();
5988
6000
  }
@@ -5991,13 +6003,6 @@ class TheVerticalToolbarItemComponent extends TheBaseToolbarDropdown {
5991
6003
  this.close();
5992
6004
  }
5993
6005
  }
5994
- constructor(elementRef, thyPopover, viewContainerRef) {
5995
- super();
5996
- this.elementRef = elementRef;
5997
- this.thyPopover = thyPopover;
5998
- this.viewContainerRef = viewContainerRef;
5999
- this.isHide = true;
6000
- }
6001
6006
  ngOnInit() { }
6002
6007
  menusActive(editor) {
6003
6008
  return this.menus.find(i => {
@@ -6040,9 +6045,9 @@ class TheVerticalToolbarItemComponent extends TheBaseToolbarDropdown {
6040
6045
  }
6041
6046
  }
6042
6047
  }
6043
- 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 });
6044
- 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: 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"] }] });
6045
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheVerticalToolbarItemComponent, decorators: [{
6048
+ 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 });
6049
+ 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"] }] });
6050
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheVerticalToolbarItemComponent, decorators: [{
6046
6051
  type: Component,
6047
6052
  args: [{ selector: 'the-toolbar-vertical-align-item', host: {
6048
6053
  class: 'the-toolbar-dropdown-container verticalAlign',
@@ -6209,7 +6214,7 @@ const TableEditor = {
6209
6214
  const tableNode = getAboveByType(editor, ElementKinds.table);
6210
6215
  if (tableNode) {
6211
6216
  const tableComponent = ELEMENT_TO_COMPONENT.get(tableNode[0]);
6212
- const selectedCellPositions = tableComponent.tableStore.selectedCellPositions;
6217
+ const selectedCellPositions = tableComponent.tableStore.getSelectedCellPositions();
6213
6218
  if (selectedCellPositions.length > 0) {
6214
6219
  return selectedCellPositions;
6215
6220
  }
@@ -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
  }
@@ -6821,9 +6824,9 @@ class TheBlockquoteComponent extends TheBaseElementComponent {
6821
6824
  this.cdr = cdr;
6822
6825
  }
6823
6826
  }
6824
- 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 });
6825
- 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"] }] });
6826
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheBlockquoteComponent, decorators: [{
6827
+ 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 });
6828
+ 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"] }] });
6829
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheBlockquoteComponent, decorators: [{
6827
6830
  type: Component,
6828
6831
  args: [{
6829
6832
  selector: 'blockquote[theBlockquote]',
@@ -6907,12 +6910,6 @@ const createBlockquotePlugin = createPluginFactory({
6907
6910
  });
6908
6911
 
6909
6912
  class TheCodeComponent extends TheBaseElementComponent {
6910
- get code() {
6911
- return this.element.content;
6912
- }
6913
- get isToolbarOpen() {
6914
- return this.toolbarPopoverRef && this.toolbarPopoverRef.getOverlayRef() && this.toolbarPopoverRef.getOverlayRef().hasAttached();
6915
- }
6916
6913
  constructor(elementRef, cdr, thyNotifyService, contextService, ngZone, config, thyPopover, viewContainerRef, overlay) {
6917
6914
  super(elementRef, cdr);
6918
6915
  this.elementRef = elementRef;
@@ -6950,6 +6947,12 @@ class TheCodeComponent extends TheBaseElementComponent {
6950
6947
  CodeEditor.setCodeAttribute(this.editor, this.element, { language: item.key });
6951
6948
  };
6952
6949
  }
6950
+ get code() {
6951
+ return this.element.content;
6952
+ }
6953
+ get isToolbarOpen() {
6954
+ return this.toolbarPopoverRef && this.toolbarPopoverRef.getOverlayRef() && this.toolbarPopoverRef.getOverlayRef().hasAttached();
6955
+ }
6953
6956
  onContextChange() {
6954
6957
  super.onContextChange();
6955
6958
  if (this.isCollapsedAndNonReadonly) {
@@ -7118,9 +7121,9 @@ class TheCodeComponent extends TheBaseElementComponent {
7118
7121
  this.destroy$.complete();
7119
7122
  }
7120
7123
  }
7121
- 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 });
7122
- 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.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 });
7123
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheCodeComponent, decorators: [{
7124
+ 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 });
7125
+ 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 });
7126
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheCodeComponent, decorators: [{
7124
7127
  type: Component,
7125
7128
  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" }]
7126
7129
  }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i1$2.ThyNotifyService }, { type: TheContextService }, { type: i0.NgZone }, { type: TheModeConfig, decorators: [{
@@ -7187,15 +7190,15 @@ const createCodePlugin = createPluginFactory({
7187
7190
  });
7188
7191
 
7189
7192
  class TheColorToolbarItemComponent extends TheBaseToolbarItem {
7190
- get isOpenColorSelect() {
7191
- return this.colorSelectRef && this.colorSelectRef.componentInstance;
7192
- }
7193
7193
  constructor(thyPopover) {
7194
7194
  super();
7195
7195
  this.thyPopover = thyPopover;
7196
7196
  this.defaultColorLine = '#FF0100';
7197
7197
  this.defaultBackgroundColorLine = '#FFDA00';
7198
7198
  }
7199
+ get isOpenColorSelect() {
7200
+ return this.colorSelectRef && this.colorSelectRef.componentInstance;
7201
+ }
7199
7202
  preventDefault(event) {
7200
7203
  event.preventDefault();
7201
7204
  event.stopPropagation();
@@ -7248,8 +7251,8 @@ class TheColorToolbarItemComponent extends TheBaseToolbarItem {
7248
7251
  }
7249
7252
  }
7250
7253
  }
7251
- 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 });
7252
- 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: `
7254
+ 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 });
7255
+ 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: `
7253
7256
  <a
7254
7257
  href="javascript:;"
7255
7258
  thyAction
@@ -7267,7 +7270,7 @@ TheColorToolbarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14
7267
7270
  <thy-icon class="link-down-icon font-size-sm text-desc ml-1" thyIconName="caret-down"></thy-icon>
7268
7271
  </a>
7269
7272
  `, 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"] }] });
7270
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheColorToolbarItemComponent, decorators: [{
7273
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheColorToolbarItemComponent, decorators: [{
7271
7274
  type: Component,
7272
7275
  args: [{
7273
7276
  selector: 'the-color-toolbar-item',
@@ -8052,9 +8055,9 @@ class TheConversionHintComponent {
8052
8055
  clearInterval(this.closeTimer);
8053
8056
  }
8054
8057
  }
8055
- TheConversionHintComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheConversionHintComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
8056
- 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 });
8057
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheConversionHintComponent, decorators: [{
8058
+ TheConversionHintComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheConversionHintComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
8059
+ 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 });
8060
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheConversionHintComponent, decorators: [{
8058
8061
  type: Component,
8059
8062
  args: [{ selector: 'the-conversion-hint', host: {
8060
8063
  class: 'the-conversion-hint'
@@ -8422,14 +8425,14 @@ class TheHrComponent extends TheBaseElementComponent {
8422
8425
  });
8423
8426
  }
8424
8427
  }
8425
- 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 });
8426
- TheHrComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.2", type: TheHrComponent, selector: "the-hr, [theHr]", usesInheritance: true, ngImport: i0, template: `
8428
+ 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 });
8429
+ TheHrComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: TheHrComponent, selector: "the-hr, [theHr]", usesInheritance: true, ngImport: i0, template: `
8427
8430
  <div class="the-hr" contenteditable="false" [ngClass]="{ active: isCollapsedAndNonReadonly }">
8428
8431
  <hr class="the-hr" />
8429
8432
  <slate-children [children]="children" [context]="childrenContext" [viewContext]="viewContext"></slate-children>
8430
8433
  </div>
8431
8434
  `, 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"] }] });
8432
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheHrComponent, decorators: [{
8435
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheHrComponent, decorators: [{
8433
8436
  type: Component,
8434
8437
  args: [{
8435
8438
  selector: 'the-hr, [theHr]',
@@ -8492,15 +8495,6 @@ const createHrPlugin = createPluginFactory({
8492
8495
  });
8493
8496
 
8494
8497
  class TheImageComponent extends TheBaseElementComponent {
8495
- get isOpen() {
8496
- return this.layoutToolbarRef && this.layoutToolbarRef.getOverlayRef() && this.layoutToolbarRef.getOverlayRef().hasAttached();
8497
- }
8498
- get imageBindingWidth() {
8499
- const currentWidth = this.imageEntry?.width || this.naturalWidth;
8500
- return this.imageEntry?.layout && currentWidth > this.layoutDefaultWidth && !this.imageEntry?.reSized
8501
- ? this.layoutDefaultWidth
8502
- : this.imageEntry.width;
8503
- }
8504
8498
  constructor(elementRef, imageUploaderService, cdr, theContextService, thyPopover, overlay, thyImageService, viewContainerRef) {
8505
8499
  super(elementRef, cdr);
8506
8500
  this.elementRef = elementRef;
@@ -8584,6 +8578,15 @@ class TheImageComponent extends TheBaseElementComponent {
8584
8578
  }
8585
8579
  };
8586
8580
  }
8581
+ get isOpen() {
8582
+ return this.layoutToolbarRef && this.layoutToolbarRef.getOverlayRef() && this.layoutToolbarRef.getOverlayRef().hasAttached();
8583
+ }
8584
+ get imageBindingWidth() {
8585
+ const currentWidth = this.imageEntry?.width || this.naturalWidth;
8586
+ return this.imageEntry?.layout && currentWidth > this.layoutDefaultWidth && !this.imageEntry?.reSized
8587
+ ? this.layoutDefaultWidth
8588
+ : this.imageEntry.width;
8589
+ }
8587
8590
  ngOnInit() {
8588
8591
  this.fileItem = this.theContextService.uploadingFiles.find(item => item.url === this.element.url);
8589
8592
  if (this.fileItem?.file && this.fileItem.file instanceof File) {
@@ -8828,9 +8831,9 @@ class TheImageComponent extends TheBaseElementComponent {
8828
8831
  event.stopPropagation();
8829
8832
  }
8830
8833
  }
8831
- 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$1.ThyImageService }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component });
8832
- 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: 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", "thyShape", "thyGapDegree", "thyGapPosition", "thyStrokeWidth"] }, { 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"] }] });
8833
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheImageComponent, decorators: [{
8834
+ 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 });
8835
+ 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"] }] });
8836
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheImageComponent, decorators: [{
8834
8837
  type: Component,
8835
8838
  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" }]
8836
8839
  }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: undefined, decorators: [{
@@ -9026,11 +9029,11 @@ class TheInlineCodeComponent extends TheBaseElementComponent {
9026
9029
  this.inlineChromiumBugfix = String.fromCodePoint(160);
9027
9030
  }
9028
9031
  }
9029
- TheInlineCodeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheInlineCodeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
9030
- 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>
9032
+ TheInlineCodeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheInlineCodeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
9033
+ 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>
9031
9034
  <span><slate-children [children]="children" [context]="childrenContext" [viewContext]="viewContext"></slate-children></span>
9032
9035
  <span contenteditable="false" class="the-break-char">{{ inlineChromiumBugfix }}</span>`, isInline: true, dependencies: [{ kind: "component", type: i1.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }] });
9033
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheInlineCodeComponent, decorators: [{
9036
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheInlineCodeComponent, decorators: [{
9034
9037
  type: Component,
9035
9038
  args: [{
9036
9039
  selector: 'span[theInlineCode]',
@@ -9131,9 +9134,9 @@ class TheLinkHoverComponent {
9131
9134
  event.stopPropagation();
9132
9135
  }
9133
9136
  }
9134
- TheLinkHoverComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheLinkHoverComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
9135
- 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"] }] });
9136
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheLinkHoverComponent, decorators: [{
9137
+ TheLinkHoverComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheLinkHoverComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
9138
+ 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"] }] });
9139
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheLinkHoverComponent, decorators: [{
9137
9140
  type: Component,
9138
9141
  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" }]
9139
9142
  }], ctorParameters: function () { return []; }, propDecorators: { link: [{
@@ -9147,11 +9150,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
9147
9150
  }] } });
9148
9151
 
9149
9152
  class TheLinkEditComponent {
9150
- handleDocumentMouseDown(event) {
9151
- if (!document.querySelector('.the-link-edit-container').contains(event.target)) {
9152
- this.thyPopoverRef.close();
9153
- }
9154
- }
9155
9153
  constructor(thyPopoverRef) {
9156
9154
  this.thyPopoverRef = thyPopoverRef;
9157
9155
  this.className = 'the-link-edit-container';
@@ -9169,6 +9167,11 @@ class TheLinkEditComponent {
9169
9167
  }
9170
9168
  };
9171
9169
  }
9170
+ handleDocumentMouseDown(event) {
9171
+ if (!document.querySelector('.the-link-edit-container').contains(event.target)) {
9172
+ this.thyPopoverRef.close();
9173
+ }
9174
+ }
9172
9175
  ngOnInit() {
9173
9176
  this.originText = this.text;
9174
9177
  this.originLink = this.link;
@@ -9215,9 +9218,9 @@ class TheLinkEditComponent {
9215
9218
  }
9216
9219
  }
9217
9220
  }
9218
- 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 });
9219
- 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.ɵ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: ["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"] }] });
9220
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheLinkEditComponent, decorators: [{
9221
+ 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 });
9222
+ 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"] }] });
9223
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheLinkEditComponent, decorators: [{
9221
9224
  type: Component,
9222
9225
  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" }]
9223
9226
  }], ctorParameters: function () { return [{ type: i1$1.ThyPopoverRef }]; }, propDecorators: { className: [{
@@ -9239,12 +9242,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
9239
9242
  }] } });
9240
9243
 
9241
9244
  class TheBaseLinkComponent extends TheBaseElementComponent {
9242
- get linkHoverOpened() {
9243
- return this.thyPopoverHoverRef && this.thyPopoverHoverRef.componentInstance;
9244
- }
9245
- get linkEditOpened() {
9246
- return this.thyPopoverEditRef && this.thyPopoverEditRef.componentInstance;
9247
- }
9248
9245
  constructor(elementRef, cdr, thyPopover, overlay, viewContainerRef) {
9249
9246
  super(elementRef, cdr);
9250
9247
  this.elementRef = elementRef;
@@ -9261,6 +9258,12 @@ class TheBaseLinkComponent extends TheBaseElementComponent {
9261
9258
  }
9262
9259
  };
9263
9260
  }
9261
+ get linkHoverOpened() {
9262
+ return this.thyPopoverHoverRef && this.thyPopoverHoverRef.componentInstance;
9263
+ }
9264
+ get linkEditOpened() {
9265
+ return this.thyPopoverEditRef && this.thyPopoverEditRef.componentInstance;
9266
+ }
9264
9267
  ngOnInit() {
9265
9268
  super.ngOnInit();
9266
9269
  }
@@ -9356,9 +9359,9 @@ class TheBaseLinkComponent extends TheBaseElementComponent {
9356
9359
  this.close(LinkCloseTypes.destroy);
9357
9360
  }
9358
9361
  }
9359
- 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 });
9360
- 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 });
9361
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheBaseLinkComponent, decorators: [{
9362
+ 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 });
9363
+ 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 });
9364
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheBaseLinkComponent, decorators: [{
9362
9365
  type: Component,
9363
9366
  args: [{
9364
9367
  selector: '[TheBaseLinkComponent]',
@@ -9376,11 +9379,11 @@ class TheLinkComponent extends TheBaseLinkComponent {
9376
9379
  this.inlineChromiumBugfix = String.fromCodePoint(160);
9377
9380
  }
9378
9381
  }
9379
- TheLinkComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheLinkComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
9380
- 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>
9382
+ TheLinkComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheLinkComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
9383
+ 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>
9381
9384
  <span><slate-children [children]="children" [context]="childrenContext" [viewContext]="viewContext"></slate-children></span>
9382
9385
  <span contenteditable="false" class="the-break-char">{{ inlineChromiumBugfix }}</span>`, isInline: true, dependencies: [{ kind: "component", type: i1.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }] });
9383
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheLinkComponent, decorators: [{
9386
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheLinkComponent, decorators: [{
9384
9387
  type: Component,
9385
9388
  args: [{
9386
9389
  selector: 'a[theLink]',
@@ -10018,17 +10021,17 @@ function onKeyDownList(e, editor) {
10018
10021
  }
10019
10022
 
10020
10023
  class TheNumberedListComponent extends TheBaseElementComponent {
10024
+ constructor(elementRef, cdr) {
10025
+ super(elementRef, cdr);
10026
+ this.elementRef = elementRef;
10027
+ this.cdr = cdr;
10028
+ }
10021
10029
  get start() {
10022
10030
  return this.element.start;
10023
10031
  }
10024
10032
  get level() {
10025
10033
  return this.element?.indent || null;
10026
10034
  }
10027
- constructor(elementRef, cdr) {
10028
- super(elementRef, cdr);
10029
- this.elementRef = elementRef;
10030
- this.cdr = cdr;
10031
- }
10032
10035
  ngOnInit() {
10033
10036
  super.ngOnInit();
10034
10037
  }
@@ -10036,9 +10039,9 @@ class TheNumberedListComponent extends TheBaseElementComponent {
10036
10039
  super.ngOnDestroy();
10037
10040
  }
10038
10041
  }
10039
- 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 });
10040
- 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"] }] });
10041
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheNumberedListComponent, decorators: [{
10042
+ 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 });
10043
+ 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"] }] });
10044
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheNumberedListComponent, decorators: [{
10042
10045
  type: Component,
10043
10046
  args: [{
10044
10047
  selector: 'ol[theOl]',
@@ -10053,14 +10056,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
10053
10056
  }] } });
10054
10057
 
10055
10058
  class TheBulletedListComponent extends TheBaseElementComponent {
10056
- get level() {
10057
- return this.element?.indent || null;
10058
- }
10059
10059
  constructor(elementRef, cdr) {
10060
10060
  super(elementRef, cdr);
10061
10061
  this.elementRef = elementRef;
10062
10062
  this.cdr = cdr;
10063
10063
  }
10064
+ get level() {
10065
+ return this.element?.indent || null;
10066
+ }
10064
10067
  ngOnInit() {
10065
10068
  super.ngOnInit();
10066
10069
  }
@@ -10068,9 +10071,9 @@ class TheBulletedListComponent extends TheBaseElementComponent {
10068
10071
  super.ngOnDestroy();
10069
10072
  }
10070
10073
  }
10071
- 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 });
10072
- 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"] }] });
10073
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheBulletedListComponent, decorators: [{
10074
+ 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 });
10075
+ 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"] }] });
10076
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheBulletedListComponent, decorators: [{
10074
10077
  type: Component,
10075
10078
  args: [{
10076
10079
  selector: 'ul[theUl]',
@@ -10157,9 +10160,9 @@ class TheListItemComponent extends TheBaseElementComponent {
10157
10160
  }
10158
10161
  }
10159
10162
  }
10160
- 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 });
10161
- 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"] }] });
10162
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheListItemComponent, decorators: [{
10163
+ 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 });
10164
+ 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"] }] });
10165
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheListItemComponent, decorators: [{
10163
10166
  type: Component,
10164
10167
  args: [{
10165
10168
  selector: 'li[theLi]',
@@ -10926,6 +10929,13 @@ const SLA_TABLE_SELECTOR = '.slate-element-table';
10926
10929
  const SLA_TABLE_CELL_SELECTOR = '.slate-element-table-cell';
10927
10930
 
10928
10931
  class TheToolbarGroupComponent {
10932
+ constructor(elementRef, thyPopover, viewContainerRef) {
10933
+ this.elementRef = elementRef;
10934
+ this.thyPopover = thyPopover;
10935
+ this.viewContainerRef = viewContainerRef;
10936
+ this.className = 'the-toolbar-group';
10937
+ this.active = false;
10938
+ }
10929
10939
  set item(i) {
10930
10940
  this._item = i;
10931
10941
  this.activeMenuItem = i;
@@ -10950,13 +10960,6 @@ class TheToolbarGroupComponent {
10950
10960
  clickHandle(event) {
10951
10961
  event.stopPropagation();
10952
10962
  }
10953
- constructor(elementRef, thyPopover, viewContainerRef) {
10954
- this.elementRef = elementRef;
10955
- this.thyPopover = thyPopover;
10956
- this.viewContainerRef = viewContainerRef;
10957
- this.className = 'the-toolbar-group';
10958
- this.active = false;
10959
- }
10960
10963
  ngOnInit() { }
10961
10964
  ngOnDestroy() {
10962
10965
  this.closeGroup();
@@ -11015,9 +11018,9 @@ class TheToolbarGroupComponent {
11015
11018
  }
11016
11019
  }
11017
11020
  }
11018
- 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 });
11019
- 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"] }] });
11020
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheToolbarGroupComponent, decorators: [{
11021
+ 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 });
11022
+ 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"] }] });
11023
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheToolbarGroupComponent, decorators: [{
11021
11024
  type: Component,
11022
11025
  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" }]
11023
11026
  }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1$1.ThyPopover }, { type: i0.ViewContainerRef }]; }, propDecorators: { className: [{
@@ -11063,9 +11066,9 @@ class ColumnResizeNotifierSource {
11063
11066
  this.triggerResize = new Subject();
11064
11067
  }
11065
11068
  }
11066
- ColumnResizeNotifierSource.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: ColumnResizeNotifierSource, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
11067
- ColumnResizeNotifierSource.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: ColumnResizeNotifierSource });
11068
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: ColumnResizeNotifierSource, decorators: [{
11069
+ ColumnResizeNotifierSource.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ColumnResizeNotifierSource, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
11070
+ ColumnResizeNotifierSource.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ColumnResizeNotifierSource });
11071
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ColumnResizeNotifierSource, decorators: [{
11069
11072
  type: Injectable
11070
11073
  }] });
11071
11074
 
@@ -11115,16 +11118,14 @@ class TableCellEventDispatcher {
11115
11118
  }));
11116
11119
  }
11117
11120
  }
11118
- TableCellEventDispatcher.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TableCellEventDispatcher, deps: [{ token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });
11119
- TableCellEventDispatcher.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TableCellEventDispatcher });
11120
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TableCellEventDispatcher, decorators: [{
11121
+ TableCellEventDispatcher.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TableCellEventDispatcher, deps: [{ token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });
11122
+ TableCellEventDispatcher.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TableCellEventDispatcher });
11123
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TableCellEventDispatcher, decorators: [{
11121
11124
  type: Injectable
11122
11125
  }], ctorParameters: function () { return [{ type: i0.NgZone }]; } });
11123
11126
 
11124
11127
  function splitCell(editor) {
11125
- const opts = new TableOptions();
11126
- const { anchor } = editor.selection;
11127
- const tablePosition = TablePosition.create(opts, editor, anchor.path);
11128
+ const tablePosition = createTablePosition(editor);
11128
11129
  const { cell, table, cellEntry } = tablePosition;
11129
11130
  if ((!cell.rowspan && !cell.colspan) || (cell.rowspan === 1 && cell.colspan === 1))
11130
11131
  return editor;
@@ -11150,9 +11151,7 @@ function resetTableCell(editor, table, cell, cellRow, cellCol) {
11150
11151
  }
11151
11152
 
11152
11153
  function getSelectCellNode(editor, selectedCells) {
11153
- const { anchor } = editor.selection;
11154
- const opts = new TableOptions();
11155
- const pos = TablePosition.create(opts, editor, anchor.path);
11154
+ const pos = createTablePosition(editor);
11156
11155
  return selectedCells
11157
11156
  .map(item => {
11158
11157
  const node = pos.findCellByPath(item);
@@ -11166,12 +11165,48 @@ function getSelectCellNode(editor, selectedCells) {
11166
11165
  .filter(item => item);
11167
11166
  }
11168
11167
 
11168
+ /* cell-position 有关的函数 */
11169
+ const isSelectedAllCell = (editor, selectedCellPositions) => {
11170
+ const pos = createTablePosition(editor);
11171
+ return !!selectedCellPositions.length && pos.getHeight() * pos.getWidth() === selectedCellPositions.length;
11172
+ };
11173
+ const getSelectedCellPositions = (editor, selectedCells) => {
11174
+ return selectedCells?.map((cell) => {
11175
+ const path = AngularEditor.findPath(editor, cell);
11176
+ const [row, col] = path.slice(-2);
11177
+ return { row, col };
11178
+ });
11179
+ };
11180
+ /* 获取一定范围内所有的单元格 */
11181
+ const getCellPositionsFromRange = (startRow, startCol, endRow, endCol) => {
11182
+ const result = [];
11183
+ for (let row = startRow; row < endRow; row++) {
11184
+ for (let col = startCol; col < endCol; col++) {
11185
+ result.push({ row, col });
11186
+ }
11187
+ }
11188
+ return result;
11189
+ };
11190
+ /**
11191
+ * 去重重复的单元格位置
11192
+ * @returns
11193
+ */
11194
+ const uniqueCellPosition = (cells, selectedCellPositions) => {
11195
+ const result = [];
11196
+ const modCells = new Set();
11197
+ cells.concat(selectedCellPositions).forEach(cell => modCells.add(JSON.stringify(cell)));
11198
+ modCells.forEach((cell) => result.push(JSON.parse(cell)));
11199
+ return result;
11200
+ };
11201
+
11169
11202
  function isSelectedCellMerged(editor) {
11170
11203
  if (editor && editor.selection) {
11171
11204
  const opts = new TableOptions();
11172
11205
  const { anchor } = editor.selection;
11173
11206
  const { cell } = TablePosition.create(opts, editor, anchor.path);
11174
- return (cell.colspan && cell.colspan !== 1) || (cell.rowspan && cell.rowspan !== 1);
11207
+ if (cell) {
11208
+ return (cell.colspan && cell.colspan !== 1) || (cell.rowspan && cell.rowspan !== 1);
11209
+ }
11175
11210
  }
11176
11211
  return false;
11177
11212
  }
@@ -11251,6 +11286,17 @@ function mergeCellContent(editor, leftTopCellPath, cellPath) {
11251
11286
  });
11252
11287
  });
11253
11288
  }
11289
+ // 计算合并前的单元格
11290
+ function getCellPositionsBeforeMerge(editor, { row, col }) {
11291
+ const pos = createTablePosition(editor);
11292
+ const { rowspan, colspan } = pos.findCellByPath({ row, col });
11293
+ if (rowspan || colspan) {
11294
+ const colSpan = colspan ?? 1;
11295
+ const rowSpan = rowspan ?? 1;
11296
+ return getCellPositionsFromRange(row, col, row + rowSpan, col + colSpan);
11297
+ }
11298
+ return [{ row, col }];
11299
+ }
11254
11300
 
11255
11301
  function setCellMenuVisibility(editor, menuList, tableInfo) {
11256
11302
  const { selectedCellPositions, isFullscreen, isSelectedTable, selectedRowsIndex, selectedColumnsIndex } = tableInfo;
@@ -11293,6 +11339,12 @@ function setCellMenuVisibility(editor, menuList, tableInfo) {
11293
11339
  }
11294
11340
 
11295
11341
  class TheContextMenuComponent {
11342
+ constructor(elementRef, thyPopoverRef) {
11343
+ this.elementRef = elementRef;
11344
+ this.thyPopoverRef = thyPopoverRef;
11345
+ this.menuEntities = [];
11346
+ this.wrap = true;
11347
+ }
11296
11348
  handleDocumentMouseDown(event) {
11297
11349
  if (!this.elementRef.nativeElement.contains(event.target) && event.button !== 2) {
11298
11350
  this.thyPopoverRef.close();
@@ -11324,17 +11376,11 @@ class TheContextMenuComponent {
11324
11376
  this.actionHandle(entity);
11325
11377
  this.thyPopoverRef.close();
11326
11378
  }
11327
- constructor(elementRef, thyPopoverRef) {
11328
- this.elementRef = elementRef;
11329
- this.thyPopoverRef = thyPopoverRef;
11330
- this.menuEntities = [];
11331
- this.wrap = true;
11332
- }
11333
11379
  ngOnInit() { }
11334
11380
  }
11335
- 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 });
11336
- 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.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"] }] });
11337
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheContextMenuComponent, decorators: [{
11381
+ 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 });
11382
+ 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"] }] });
11383
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheContextMenuComponent, decorators: [{
11338
11384
  type: Component,
11339
11385
  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" }]
11340
11386
  }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1$1.ThyPopoverRef }]; }, propDecorators: { menuEntities: [{
@@ -11356,13 +11402,91 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
11356
11402
  args: ['mousedown', ['$event']]
11357
11403
  }] } });
11358
11404
 
11359
- class TableStore {
11360
- get selectedCellPositions() {
11361
- return this.getSelectedCellPositions();
11405
+ const getTableEntry = (editor) => {
11406
+ const { tableEntry } = createTablePosition(editor);
11407
+ return tableEntry;
11408
+ };
11409
+ const getTablePath = (editor) => {
11410
+ const tableEntry = getTableEntry(editor);
11411
+ return tableEntry[1];
11412
+ };
11413
+ const getTable = (editor) => {
11414
+ const { tableEntry } = createTablePosition(editor);
11415
+ return tableEntry[0];
11416
+ };
11417
+ const getSelectedCell = (editor) => {
11418
+ if (editor && editor.selection) {
11419
+ const { cell } = createTablePosition(editor);
11420
+ return cell;
11362
11421
  }
11363
- get dangerousCells() {
11364
- return this.dangerousCells$.getValue();
11422
+ return null;
11423
+ };
11424
+
11425
+ const getMinAndMaxCellIndex = (editor, selectedCellPositions, maxRow, maxCol, minRow, minCol, table) => {
11426
+ const beforeCols = [];
11427
+ const beforeRows = [];
11428
+ let spanSelectedCells = [];
11429
+ if (selectedCellPositions.length) {
11430
+ spanSelectedCells = selectedCellPositions
11431
+ .map(item => {
11432
+ const { row, col } = item;
11433
+ const node = table.children[row].children[col];
11434
+ if (!node.hidden) {
11435
+ return {
11436
+ ...item,
11437
+ colspan: node.colspan || 1,
11438
+ rowspan: node.rowspan || 1
11439
+ };
11440
+ }
11441
+ })
11442
+ .filter(item => item);
11443
+ }
11444
+ table.children.map((row, rowIndex) => {
11445
+ if (rowIndex <= maxRow) {
11446
+ row.children.map((cell, colIndex) => {
11447
+ if (colIndex <= maxCol) {
11448
+ const cellRowIndex = rowIndex + (cell.rowspan || 1) - 1;
11449
+ const cellColIndex = colIndex + (cell.colspan || 1) - 1;
11450
+ if (spanSelectedCells.length) {
11451
+ const { row: selectRow, col: selectCol, rowspan: selectRowspan, colspan: selectColspan } = spanSelectedCells[0];
11452
+ if (selectRow + selectRowspan - 1 >= minRow && selectCol + selectColspan - 1 >= minCol) {
11453
+ minRow = Math.min(spanSelectedCells[0].row, minRow);
11454
+ minCol = Math.min(spanSelectedCells[0].col, minCol);
11455
+ }
11456
+ }
11457
+ if (cell.colspan && cell.colspan > 1) {
11458
+ beforeCols.push({ rowIndex, colIndex, cellColIndex });
11459
+ if (cellColIndex >= minCol && cellRowIndex >= minRow) {
11460
+ maxCol = Math.max(maxCol, cellColIndex);
11461
+ minCol = Math.min(minCol, colIndex);
11462
+ }
11463
+ }
11464
+ if (cell.rowspan && cell.rowspan > 1) {
11465
+ beforeRows.push({ rowIndex, colIndex, cellRowIndex });
11466
+ if (cellColIndex >= minCol && cellRowIndex >= minRow) {
11467
+ minRow = Math.min(minRow, rowIndex);
11468
+ maxRow = Math.max(maxRow, cellRowIndex);
11469
+ }
11470
+ }
11471
+ }
11472
+ });
11473
+ }
11474
+ });
11475
+ // 判断选区范围内之前的单元格 如果存在cellColIndex === minCol,表示当前获取的minCol并不是最小的,重新获取minCol
11476
+ const colNode = beforeCols.filter(item => item.rowIndex <= maxRow && item.colIndex <= maxCol && item.rowIndex >= minRow && item.cellColIndex === minCol);
11477
+ const rowNode = beforeRows.filter(item => item.rowIndex <= maxRow && item.colIndex <= maxCol && item.colIndex >= minCol && item.cellRowIndex === minRow);
11478
+ if (colNode.length || rowNode.length) {
11479
+ return getMinAndMaxCellIndex(editor, selectedCellPositions, maxRow, maxCol, minRow, minCol, table);
11365
11480
  }
11481
+ return {
11482
+ minRow,
11483
+ maxRow,
11484
+ minCol,
11485
+ maxCol
11486
+ };
11487
+ };
11488
+
11489
+ class TableStore {
11366
11490
  constructor() {
11367
11491
  this.selectedCells$ = new BehaviorSubject([]);
11368
11492
  this.dangerousCells$ = new BehaviorSubject([]);
@@ -11377,44 +11501,34 @@ class TableStore {
11377
11501
  this.isRightClicking = false;
11378
11502
  this.pointerSelection = false;
11379
11503
  this.isSelectedAllCell = () => {
11380
- const pos = this.createTablePosition();
11381
- return !!this.selectedCellPositions.length && pos.getHeight() * pos.getWidth() === this.selectedCellPositions.length;
11382
- };
11383
- this.createTablePosition = () => {
11384
- const { path } = this.editor.selection.anchor;
11385
- const opts = new TableOptions();
11386
- return TablePosition.create(opts, this.editor, path);
11504
+ if (!this.editor.selection)
11505
+ return false;
11506
+ const pos = createTablePosition(this.editor);
11507
+ const selectedCellPositions = this.getSelectedCellPositions();
11508
+ return !!selectedCellPositions.length && pos.getHeight() * pos.getWidth() === selectedCellPositions.length;
11387
11509
  };
11388
11510
  }
11389
- getTableEntry() {
11390
- const { tableEntry } = this.createTablePosition();
11391
- return tableEntry;
11392
- }
11393
- getTablePath() {
11394
- const tableEntry = this.getTableEntry();
11395
- return tableEntry[1];
11511
+ get dangerousCells() {
11512
+ return this.dangerousCells$.getValue();
11396
11513
  }
11397
11514
  getSelectedCellPositions() {
11398
- return this.selectedCells$.getValue().map((cell) => {
11399
- const path = AngularEditor.findPath(this.editor, cell);
11400
- const [row, col] = path.slice(-2);
11401
- return { row, col };
11402
- });
11515
+ return getSelectedCellPositions(this.editor, this.selectedCells$.getValue());
11403
11516
  }
11404
- calculateSelectedColumnsAndRowIndex() {
11517
+ setSelectedColumnsAndRowIndex() {
11405
11518
  if (!this.editor?.selection) {
11406
11519
  return;
11407
11520
  }
11408
- const pos = this.createTablePosition();
11521
+ const pos = createTablePosition(this.editor);
11409
11522
  if (!pos?.table) {
11410
11523
  return;
11411
11524
  }
11412
11525
  const mergeBeforeCells = [];
11413
- this.selectedCellPositions.forEach(({ row, col }) => {
11526
+ const selectedCellPositions = this.getSelectedCellPositions();
11527
+ selectedCellPositions.forEach(({ row, col }) => {
11414
11528
  // 计算合并单元格数据时,要按合并前的数据处理
11415
- mergeBeforeCells.push(...this.getCellPositionsBeforeMerge({ row, col }));
11529
+ mergeBeforeCells.push(...getCellPositionsBeforeMerge(this.editor, { row, col }));
11416
11530
  });
11417
- const cells = this.uniqueCellPosition(mergeBeforeCells);
11531
+ const cells = uniqueCellPosition(mergeBeforeCells, selectedCellPositions);
11418
11532
  const rowGroup = groupBy(cells, ({ row }) => row);
11419
11533
  const colGroup = groupBy(cells, ({ col }) => col);
11420
11534
  this.selectedRowsIndex = [];
@@ -11431,7 +11545,7 @@ class TableStore {
11431
11545
  }
11432
11546
  this.selectedRowsIndex = uniq(this.selectedRowsIndex);
11433
11547
  this.selectedColumnsIndex = uniq(this.selectedColumnsIndex);
11434
- if (this.selectedRowsIndex.length === pos.getHeight() && this.selectedColumnsIndex.length === pos.getWidth()) {
11548
+ if (isSelectedAllCell(this.editor, selectedCellPositions)) {
11435
11549
  this.isSelectedTable = true;
11436
11550
  }
11437
11551
  else {
@@ -11439,64 +11553,40 @@ class TableStore {
11439
11553
  }
11440
11554
  }
11441
11555
  setSelectedCells(cells, pos) {
11442
- const uniqueCells = this.pointerSelection ? this.uniqueCellPosition(cells) : cells;
11556
+ const uniqueCells = this.pointerSelection ? uniqueCellPosition(cells, this.getSelectedCellPositions()) : cells;
11443
11557
  const cellElements = uniqueCells.map(cell => {
11444
11558
  return pos.findCellByPath(cell);
11445
11559
  });
11446
11560
  this.selectedCells$.next(cellElements);
11447
- this.calculateSelectedColumnsAndRowIndex();
11561
+ this.setSelectedColumnsAndRowIndex();
11448
11562
  }
11449
11563
  initEditor(editor) {
11450
11564
  this.editor = editor;
11451
11565
  }
11452
- /**
11453
- * 去重重复的单元格位置
11454
- * @returns
11455
- */
11456
- uniqueCellPosition(cells) {
11457
- const result = [];
11458
- const modCells = new Set();
11459
- cells.concat(this.selectedCellPositions).forEach(cell => modCells.add(JSON.stringify(cell)));
11460
- modCells.forEach((cell) => result.push(JSON.parse(cell)));
11461
- return result;
11462
- }
11463
- /**
11464
- * 获取一定范围内所有的单元格
11465
- * @returns
11466
- */
11467
- getCellPositionsFromRange(startRow, startCol, endRow, endCol) {
11468
- const result = [];
11469
- for (let row = startRow; row < endRow; row++) {
11470
- for (let col = startCol; col < endCol; col++) {
11471
- result.push({ row, col });
11472
- }
11473
- }
11474
- return result;
11475
- }
11476
11566
  selectRow(editor, index) {
11477
11567
  this.clearLastFocusPath();
11478
- const pos = this.createTablePosition();
11479
- const cells = this.getCellPositionsFromRange(index, 0, index + 1, pos.getWidth());
11568
+ const pos = createTablePosition(editor);
11569
+ const cells = getCellPositionsFromRange(index, 0, index + 1, pos.getWidth());
11480
11570
  this.setSelectedCells(cells, pos);
11481
11571
  this.focusCell(editor, pos.tableEntry[1].concat([index, 0]));
11482
11572
  }
11483
11573
  selectColumn(editor, index) {
11484
11574
  this.clearLastFocusPath();
11485
- const pos = this.createTablePosition();
11486
- const cells = this.getCellPositionsFromRange(0, index, pos.getHeight(), index + 1);
11575
+ const pos = createTablePosition(editor);
11576
+ const cells = getCellPositionsFromRange(0, index, pos.getHeight(), index + 1);
11487
11577
  this.setSelectedCells(cells, pos);
11488
11578
  this.focusCell(editor, pos.tableEntry[1].concat([0, index]));
11489
11579
  }
11490
11580
  selectTable(editor) {
11491
11581
  this.isSelectedTable = true;
11492
- const pos = this.createTablePosition();
11493
- const cells = this.getCellPositionsFromRange(0, 0, pos.getHeight(), pos.getWidth());
11582
+ const pos = createTablePosition(editor);
11583
+ const cells = getCellPositionsFromRange(0, 0, pos.getHeight(), pos.getWidth());
11494
11584
  this.setSelectedCells(cells, pos);
11495
11585
  this.focusCell(editor, pos.tableEntry[1].concat([0, 0]));
11496
11586
  }
11497
11587
  // 拖选
11498
11588
  selectCells(editor) {
11499
- const pos = this.createTablePosition();
11589
+ const pos = createTablePosition(editor);
11500
11590
  const anchorPath = this.anchorCellPath.slice(-2);
11501
11591
  const focusPath = this.focusCellPath.slice(-2);
11502
11592
  const rows = [anchorPath[0], focusPath[0]].sort((m, n) => m - n);
@@ -11509,73 +11599,10 @@ class TableStore {
11509
11599
  const focusCol = focusPath[1] + (focusColspanCount || 1) - 1;
11510
11600
  let initMaxCol = Math.max(anchorCol, focusCol);
11511
11601
  let initMaxRow = Math.max(anchorRow, focusRow);
11512
- const { minRow, maxRow, minCol, maxCol } = this.getMinAndMaxCellIndex(initMaxRow, initMaxCol, rows[0], columns[0], pos.table);
11513
- const cells = this.getCellPositionsFromRange(minRow, minCol, maxRow + 1, maxCol + 1);
11602
+ const { minRow, maxRow, minCol, maxCol } = getMinAndMaxCellIndex(this.editor, this.getSelectedCellPositions(), initMaxRow, initMaxCol, rows[0], columns[0], pos.table);
11603
+ const cells = getCellPositionsFromRange(minRow, minCol, maxRow + 1, maxCol + 1);
11514
11604
  this.setSelectedCells(cells, pos);
11515
11605
  }
11516
- getMinAndMaxCellIndex(maxRow, maxCol, minRow, minCol, table) {
11517
- const beforeCols = [];
11518
- const beforeRows = [];
11519
- let spanSelectedCells = [];
11520
- if (this.selectedCellPositions.length) {
11521
- spanSelectedCells = this.selectedCellPositions
11522
- .map(item => {
11523
- const { row, col } = item;
11524
- const node = table.children[row].children[col];
11525
- if (!node.hidden) {
11526
- return {
11527
- ...item,
11528
- colspan: node.colspan || 1,
11529
- rowspan: node.rowspan || 1
11530
- };
11531
- }
11532
- })
11533
- .filter(item => item);
11534
- }
11535
- table.children.map((row, rowIndex) => {
11536
- if (rowIndex <= maxRow) {
11537
- row.children.map((cell, colIndex) => {
11538
- if (colIndex <= maxCol) {
11539
- const cellRowIndex = rowIndex + (cell.rowspan || 1) - 1;
11540
- const cellColIndex = colIndex + (cell.colspan || 1) - 1;
11541
- if (spanSelectedCells.length) {
11542
- const { row: selectRow, col: selectCol, rowspan: selectRowspan, colspan: selectColspan } = spanSelectedCells[0];
11543
- if (selectRow + selectRowspan - 1 >= minRow && selectCol + selectColspan - 1 >= minCol) {
11544
- minRow = Math.min(spanSelectedCells[0].row, minRow);
11545
- minCol = Math.min(spanSelectedCells[0].col, minCol);
11546
- }
11547
- }
11548
- if (cell.colspan && cell.colspan > 1) {
11549
- beforeCols.push({ rowIndex, colIndex, cellColIndex });
11550
- if (cellColIndex >= minCol && cellRowIndex >= minRow) {
11551
- maxCol = Math.max(maxCol, cellColIndex);
11552
- minCol = Math.min(minCol, colIndex);
11553
- }
11554
- }
11555
- if (cell.rowspan && cell.rowspan > 1) {
11556
- beforeRows.push({ rowIndex, colIndex, cellRowIndex });
11557
- if (cellColIndex >= minCol && cellRowIndex >= minRow) {
11558
- minRow = Math.min(minRow, rowIndex);
11559
- maxRow = Math.max(maxRow, cellRowIndex);
11560
- }
11561
- }
11562
- }
11563
- });
11564
- }
11565
- });
11566
- // 判断选区范围内之前的单元格 如果存在cellColIndex === minCol,表示当前获取的minCol并不是最小的,重新获取minCol
11567
- const colNode = beforeCols.filter(item => item.rowIndex <= maxRow && item.colIndex <= maxCol && item.rowIndex >= minRow && item.cellColIndex === minCol);
11568
- const rowNode = beforeRows.filter(item => item.rowIndex <= maxRow && item.colIndex <= maxCol && item.colIndex >= minCol && item.cellRowIndex === minRow);
11569
- if (colNode.length || rowNode.length) {
11570
- return this.getMinAndMaxCellIndex(maxRow, maxCol, minRow, minCol, table);
11571
- }
11572
- return {
11573
- minRow,
11574
- maxRow,
11575
- minCol,
11576
- maxCol
11577
- };
11578
- }
11579
11606
  // 选择单元格
11580
11607
  selectCell(cell, editor) {
11581
11608
  const node = AngularEditor.toSlateNode(editor, cell);
@@ -11584,33 +11611,23 @@ class TableStore {
11584
11611
  this.focusCellPath = path;
11585
11612
  this.focusCellElement = cell;
11586
11613
  const [row, col] = path.slice(-2);
11587
- const pos = this.createTablePosition();
11614
+ const pos = createTablePosition(editor);
11588
11615
  const result = [{ row, col }];
11616
+ const selectedCellPositions = this.getSelectedCellPositions();
11589
11617
  if (this.pointerSelection) {
11590
- result.push(...this.selectedCellPositions);
11618
+ result.push(...selectedCellPositions);
11591
11619
  // 处理单元格选中时,处理为选中多单元格
11592
- const selectedCells = this.getCellPositionsBeforeMerge({ row, col });
11620
+ const selectedCells = getCellPositionsBeforeMerge(this.editor, { row, col });
11593
11621
  result.push(...selectedCells);
11594
11622
  // 已聚焦的单元格在多选模式下选中(暂存上次聚焦的单元格数据)
11595
11623
  const focusCell = this.lastFocusCellPath?.slice(-2);
11596
11624
  if (focusCell) {
11597
- const focusCells = this.getCellPositionsBeforeMerge({ row: focusCell[0], col: focusCell[1] });
11625
+ const focusCells = getCellPositionsBeforeMerge(this.editor, { row: focusCell[0], col: focusCell[1] });
11598
11626
  result.push(...focusCells);
11599
11627
  }
11600
11628
  }
11601
11629
  this.setSelectedCells(result, pos);
11602
11630
  }
11603
- // 计算合并前的单元格
11604
- getCellPositionsBeforeMerge({ row, col }) {
11605
- const pos = this.createTablePosition();
11606
- const { rowspan, colspan } = pos.findCellByPath({ row, col });
11607
- if (rowspan || colspan) {
11608
- const colSpan = colspan ?? 1;
11609
- const rowSpan = rowspan ?? 1;
11610
- return this.getCellPositionsFromRange(row, col, row + rowSpan, col + colSpan);
11611
- }
11612
- return [{ row, col }];
11613
- }
11614
11631
  selectedCellsChange() {
11615
11632
  return this.selectedCells$.asObservable().pipe(skip(1));
11616
11633
  }
@@ -11664,9 +11681,10 @@ class TableStore {
11664
11681
  this.focusCellElement = cell;
11665
11682
  }
11666
11683
  else {
11684
+ const selectedCellPositions = this.getSelectedCellPositions();
11667
11685
  isChanged =
11668
11686
  !this.focusCellPath ||
11669
- (this.focusCellPath.toString() === this.anchorCellPath.toString() && this.selectedCellPositions.length === 0);
11687
+ (this.focusCellPath.toString() === this.anchorCellPath.toString() && selectedCellPositions.length === 0);
11670
11688
  }
11671
11689
  if (this.isPrepareSelecting && isChanged) {
11672
11690
  if (JSON.stringify(this.preFocusCellPath) !== JSON.stringify(this.focusCellPath)) {
@@ -11692,15 +11710,16 @@ class TableStore {
11692
11710
  return this.dangerousCells$.asObservable().pipe(skip(1));
11693
11711
  }
11694
11712
  setDangerousCells() {
11713
+ const selectedCellPositions = this.getSelectedCellPositions();
11695
11714
  this.dangerousRowsIndex = this.selectedRowsIndex;
11696
11715
  this.dangerousColumnsIndex = this.selectedColumnsIndex;
11697
- this.dangerousCells$.next(this.selectedCellPositions);
11716
+ this.dangerousCells$.next(selectedCellPositions);
11698
11717
  }
11699
11718
  clearDangerousCells() {
11700
11719
  this.dangerousRowsIndex = [];
11701
11720
  this.dangerousColumnsIndex = [];
11702
11721
  this.dangerousCells$.next([]);
11703
- const pos = this.createTablePosition();
11722
+ const pos = createTablePosition(this.editor);
11704
11723
  if (pos.table) {
11705
11724
  this.isSelectedTable = this.selectedRowsIndex.length === pos.getHeight() && this.selectedColumnsIndex.length === pos.getWidth();
11706
11725
  }
@@ -11709,9 +11728,10 @@ class TableStore {
11709
11728
  return merge(this.dangerousCells$.asObservable().pipe(skip(1)), this.selectedCells$.asObservable().pipe(skip(1)));
11710
11729
  }
11711
11730
  setDangerousRows() {
11712
- const cells = this.selectedCellPositions;
11731
+ const selectedCellPositions = this.getSelectedCellPositions();
11732
+ const cells = selectedCellPositions;
11713
11733
  const rows = uniq(map(cells, 'row')).valueOf();
11714
- const pos = this.createTablePosition();
11734
+ const pos = createTablePosition(this.editor);
11715
11735
  const result = [];
11716
11736
  this.dangerousRowsIndex = rows;
11717
11737
  this.isSelectedTable = rows.length === pos.getHeight();
@@ -11729,9 +11749,10 @@ class TableStore {
11729
11749
  this.dangerousCells$.next(result);
11730
11750
  }
11731
11751
  setDangerousColumns() {
11732
- const cells = this.selectedCellPositions;
11752
+ const selectedCellPositions = this.getSelectedCellPositions();
11753
+ const cells = selectedCellPositions;
11733
11754
  const cols = uniq(map(cells, 'col')).valueOf();
11734
- const pos = this.createTablePosition();
11755
+ const pos = createTablePosition(this.editor);
11735
11756
  const result = [];
11736
11757
  this.dangerousColumnsIndex = cols;
11737
11758
  this.isSelectedTable = cols.length === pos.getWidth();
@@ -11750,21 +11771,22 @@ class TableStore {
11750
11771
  }
11751
11772
  setDangerousTable() {
11752
11773
  this.isSelectedTable = true;
11753
- const pos = this.createTablePosition();
11754
- const cells = this.getCellPositionsFromRange(0, 0, pos.getHeight(), pos.getWidth());
11774
+ const pos = createTablePosition(this.editor);
11775
+ const cells = getCellPositionsFromRange(0, 0, pos.getHeight(), pos.getWidth());
11755
11776
  this.dangerousRowsIndex = [...Array(pos.getHeight())].map((_, i) => i);
11756
11777
  this.dangerousColumnsIndex = [...Array(pos.getWidth())].map((_, i) => i);
11757
11778
  this.dangerousCells$.next(cells);
11758
11779
  }
11759
11780
  selectFirstCell() {
11760
- const { row, col } = this.selectedCellPositions[0];
11761
- const tablePath = this.getTablePath();
11781
+ const selectedCellPositions = this.getSelectedCellPositions();
11782
+ const { row, col } = selectedCellPositions[0];
11783
+ const tablePath = getTablePath(this.editor);
11762
11784
  const path = Editor.start(this.editor, [...tablePath, row, col]);
11763
11785
  Transforms.select(this.editor, path);
11764
11786
  }
11765
11787
  setSelectedCellsBackgroundColor(backgroundColor) {
11766
- const cells = this.selectedCellPositions;
11767
- const tablePath = this.getTablePath();
11788
+ const tablePath = getTablePath(this.editor);
11789
+ const cells = this.getSelectedCellPositions();
11768
11790
  Editor.withoutNormalizing(this.editor, () => {
11769
11791
  for (const { row, col } of cells) {
11770
11792
  const cellPath = [...tablePath, row, col];
@@ -11772,16 +11794,9 @@ class TableStore {
11772
11794
  }
11773
11795
  });
11774
11796
  }
11775
- getSelectedCellBackgroundColor() {
11776
- if (this.editor && this.editor.selection) {
11777
- const { cell } = this.createTablePosition();
11778
- return cell && cell.backgroundColor;
11779
- }
11780
- return '';
11781
- }
11782
11797
  clearSelectedCellsContent() {
11783
- const cells = this.selectedCellPositions;
11784
- const tablePosition = this.createTablePosition();
11798
+ const cells = this.getSelectedCellPositions();
11799
+ const tablePosition = createTablePosition(this.editor);
11785
11800
  if (tablePosition.isInTable()) {
11786
11801
  Editor.withoutNormalizing(this.editor, () => {
11787
11802
  for (const { row, col } of cells) {
@@ -11793,12 +11808,9 @@ class TableStore {
11793
11808
  Transforms.select(this.editor, Editor.start(this.editor, tablePosition.cellEntry[1]));
11794
11809
  }
11795
11810
  }
11796
- mergeCell(editor) {
11797
- mergeCell(editor, this.selectedCellPositions);
11798
- }
11799
11811
  setTableOptions(editor, newOptions) {
11800
- const tablePosition = this.createTablePosition();
11801
- const tablePath = this.getTablePath();
11812
+ const tablePosition = createTablePosition(editor);
11813
+ const tablePath = getTablePath(this.editor);
11802
11814
  const table = tablePosition.table;
11803
11815
  const options = { ...table.options, ...newOptions };
11804
11816
  Transforms.setNodes(editor, { options }, { at: tablePath });
@@ -11809,7 +11821,7 @@ class TableStore {
11809
11821
  }
11810
11822
  removeColumnOrRows(selectedRowIndexs = this.selectedRowsIndex, selectedColumnIndexs = this.selectedColumnsIndex) {
11811
11823
  const { isSelectedTable } = this;
11812
- const tablePosition = this.createTablePosition();
11824
+ const tablePosition = createTablePosition(this.editor);
11813
11825
  if (isSelectedTable) {
11814
11826
  TableEditor.removeTable(this.editor);
11815
11827
  return;
@@ -11846,22 +11858,13 @@ class TableStore {
11846
11858
  }
11847
11859
  }
11848
11860
  }
11849
- TableStore.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TableStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
11850
- TableStore.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TableStore });
11851
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TableStore, decorators: [{
11861
+ TableStore.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TableStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
11862
+ TableStore.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TableStore });
11863
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TableStore, decorators: [{
11852
11864
  type: Injectable
11853
11865
  }], ctorParameters: function () { return []; } });
11854
11866
 
11855
11867
  class TheTableContextMenuService {
11856
- get isOpened() {
11857
- return this.menuRef && this.menuRef.componentInstance;
11858
- }
11859
- get editor() {
11860
- return this.tableStore && this.tableStore.editor;
11861
- }
11862
- get backgroundColor() {
11863
- return this.tableStore.getSelectedCellBackgroundColor();
11864
- }
11865
11868
  constructor(colorSelectService, tableStore, thyPopover, ngZone, theContextService) {
11866
11869
  this.colorSelectService = colorSelectService;
11867
11870
  this.tableStore = tableStore;
@@ -11977,7 +11980,7 @@ class TheTableContextMenuService {
11977
11980
  name: '合并单元格',
11978
11981
  visibility: true,
11979
11982
  actionHandle: () => {
11980
- this.tableStore.mergeCell(this.editor);
11983
+ mergeCell(this.editor, this.tableStore.getSelectedCellPositions());
11981
11984
  }
11982
11985
  },
11983
11986
  {
@@ -12035,8 +12038,18 @@ class TheTableContextMenuService {
12035
12038
  }
12036
12039
  ];
12037
12040
  }
12041
+ get isOpened() {
12042
+ return this.menuRef && this.menuRef.componentInstance;
12043
+ }
12044
+ get editor() {
12045
+ return this.tableStore && this.tableStore.editor;
12046
+ }
12047
+ get backgroundColor() {
12048
+ const cell = getSelectedCell(this.editor);
12049
+ return cell ? cell.backgroundColor : '';
12050
+ }
12038
12051
  getSelectedCell() {
12039
- const selectedCellPositions = this.tableStore.selectedCellPositions;
12052
+ const selectedCellPositions = this.tableStore.getSelectedCellPositions();
12040
12053
  const selectCellNodes = getSelectCellNode(this.editor, selectedCellPositions);
12041
12054
  sortCell(selectCellNodes);
12042
12055
  const leftCellDict = getLeftCellDict(selectCellNodes);
@@ -12052,14 +12065,15 @@ class TheTableContextMenuService {
12052
12065
  }
12053
12066
  openMenuList(event) {
12054
12067
  this.ngZone.run(() => {
12055
- const { selectedCellPositions, isFullscreen, selectedRowsIndex, selectedColumnsIndex, isSelectedTable } = this.tableStore;
12068
+ const { isFullscreen, selectedRowsIndex, selectedColumnsIndex, isSelectedTable } = this.tableStore;
12069
+ const selectedCellPositions = this.tableStore.getSelectedCellPositions();
12056
12070
  const tableInfo = { selectedCellPositions, isFullscreen, selectedRowsIndex, selectedColumnsIndex, isSelectedTable };
12057
12071
  const { row, col } = this.getSelectedCell();
12058
12072
  setCellMenuVisibility(this.editor, this.menuEntities, tableInfo);
12059
12073
  this.menuEntities.forEach(item => {
12060
12074
  switch (item.key) {
12061
12075
  case 'background-color':
12062
- item.backgroundColor = this.tableStore.getSelectedCellBackgroundColor();
12076
+ item.backgroundColor = this.backgroundColor;
12063
12077
  break;
12064
12078
  case TableInsertType.insertRowsUp:
12065
12079
  case TableInsertType.insertRowsDown:
@@ -12121,16 +12135,13 @@ class TheTableContextMenuService {
12121
12135
  }
12122
12136
  }
12123
12137
  }
12124
- 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 });
12125
- TheTableContextMenuService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheTableContextMenuService });
12126
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheTableContextMenuService, decorators: [{
12138
+ 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 });
12139
+ TheTableContextMenuService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheTableContextMenuService });
12140
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheTableContextMenuService, decorators: [{
12127
12141
  type: Injectable
12128
12142
  }], ctorParameters: function () { return [{ type: TheColorSelectService }, { type: TableStore }, { type: i1$1.ThyPopover }, { type: i0.NgZone }, { type: TheContextService }]; } });
12129
12143
 
12130
12144
  class TheTableOptionsComponent {
12131
- get table() {
12132
- return this.tableStore && this.tableStore.getTableEntry()[0];
12133
- }
12134
12145
  constructor(popoverRef) {
12135
12146
  this.popoverRef = popoverRef;
12136
12147
  this.tableDropdownList = [
@@ -12151,6 +12162,9 @@ class TheTableOptionsComponent {
12151
12162
  ngOnInit() {
12152
12163
  this.setColumnOptions();
12153
12164
  }
12165
+ get table() {
12166
+ return getTable(this.editor);
12167
+ }
12154
12168
  setColumnOptions() {
12155
12169
  this.tableDropdownList.forEach(item => {
12156
12170
  const tableComponent = ELEMENT_TO_COMPONENT.get(this.table);
@@ -12177,8 +12191,8 @@ class TheTableOptionsComponent {
12177
12191
  }
12178
12192
  }
12179
12193
  }
12180
- 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 });
12181
- 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: `
12194
+ 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 });
12195
+ 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: `
12182
12196
  <div class="thy-dropdown-menu table-drop-menu">
12183
12197
  <ng-container *ngFor="let option of tableDropdownList">
12184
12198
  <a thyDropdownMenuItem href="javascript:;" (mousedown)="setTableOptions($event, option)">
@@ -12190,7 +12204,7 @@ TheTableOptionsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0
12190
12204
  </ng-container>
12191
12205
  </div>
12192
12206
  `, 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]" }] });
12193
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheTableOptionsComponent, decorators: [{
12207
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheTableOptionsComponent, decorators: [{
12194
12208
  type: Component,
12195
12209
  args: [{
12196
12210
  selector: 'the-table-options',
@@ -12214,15 +12228,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
12214
12228
  }] } });
12215
12229
 
12216
12230
  class TheTableToolbarComponent {
12217
- get editor() {
12218
- return this.tableStore && this.tableStore.editor;
12219
- }
12220
- get hasDivider() {
12221
- return this.cellMenuList.filter(item => item.visibility).length > 1;
12222
- }
12223
- get tableOptions() {
12224
- return getPluginOptions(this.editor, PluginKeys.table);
12225
- }
12226
12231
  constructor(ngZone, colorSelectService, thyPopover, popoverRef, thyNotifyService) {
12227
12232
  this.ngZone = ngZone;
12228
12233
  this.colorSelectService = colorSelectService;
@@ -12238,7 +12243,7 @@ class TheTableToolbarComponent {
12238
12243
  actionHandle: () => {
12239
12244
  event.preventDefault();
12240
12245
  event.stopPropagation();
12241
- this.tableStore.mergeCell(this.editor);
12246
+ mergeCell(this.editor, this.tableStore.getSelectedCellPositions());
12242
12247
  this.popoverRef.close();
12243
12248
  this.tableStore.clearSelectedCells();
12244
12249
  }
@@ -12258,14 +12263,24 @@ class TheTableToolbarComponent {
12258
12263
  }
12259
12264
  ];
12260
12265
  }
12266
+ get editor() {
12267
+ return this.tableStore && this.tableStore.editor;
12268
+ }
12269
+ get hasDivider() {
12270
+ return this.cellMenuList.filter(item => item.visibility).length > 1;
12271
+ }
12272
+ get tableOptions() {
12273
+ return getPluginOptions(this.editor, PluginKeys.table);
12274
+ }
12261
12275
  ngOnInit() {
12262
12276
  this.isColumnEqual = this.tableElement?.columns?.every(col => this.tableElement.columns[0].width === col.width) ?? true;
12263
- const { selectedCellPositions, isSelectedTable } = this.tableStore;
12264
- const tableInfo = { selectedCellPositions, isSelectedTable };
12277
+ const selectedCellPositions = this.tableStore.getSelectedCellPositions();
12278
+ const tableInfo = { selectedCellPositions, isSelectedTable: this.tableStore.isSelectedTable };
12265
12279
  this.isRectangle = isRectangularInTableCells(this.editor, selectedCellPositions);
12266
12280
  this.setDeleteIcon();
12267
12281
  setCellMenuVisibility(this.editor, this.cellMenuList, tableInfo);
12268
- this.selectedColor = this.tableStore.getSelectedCellBackgroundColor();
12282
+ const cell = getSelectedCell(this.editor);
12283
+ this.selectedColor = cell ? cell.backgroundColor : '';
12269
12284
  const path = TheEditor.findPath(this.editor, this.tableElement);
12270
12285
  this.tableChangeSubscriber = this.tableStore.tableChange().subscribe(() => {
12271
12286
  const columns = getNode(this.editor, path).columns;
@@ -12277,8 +12292,9 @@ class TheTableToolbarComponent {
12277
12292
  this.colorSelectService.closeColorSelect();
12278
12293
  }
12279
12294
  setDeleteIcon() {
12280
- const { selectedCellPositions, selectedRowsIndex, selectedColumnsIndex, createTablePosition } = this.tableStore;
12281
- const pos = createTablePosition();
12295
+ const { selectedRowsIndex, selectedColumnsIndex } = this.tableStore;
12296
+ const selectedCellPositions = this.tableStore.getSelectedCellPositions();
12297
+ const pos = createTablePosition(this.editor);
12282
12298
  if (this.tableStore.selectedRowsIndex.length > 0) {
12283
12299
  this.deleteIcon = DeleteIcon['table-delete-rows'];
12284
12300
  this.iconName = '删除整行';
@@ -12375,9 +12391,9 @@ class TheTableToolbarComponent {
12375
12391
  });
12376
12392
  }
12377
12393
  }
12378
- 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 });
12379
- 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: 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"] }] });
12380
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheTableToolbarComponent, decorators: [{
12394
+ 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 });
12395
+ 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"] }] });
12396
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheTableToolbarComponent, decorators: [{
12381
12397
  type: Component,
12382
12398
  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" }]
12383
12399
  }], ctorParameters: function () { return [{ type: i0.NgZone }, { type: TheColorSelectService }, { type: i1$1.ThyPopover }, { type: i1$1.ThyPopoverRef }, { type: i1$2.ThyNotifyService }]; }, propDecorators: { tableStore: [{
@@ -12393,9 +12409,6 @@ var DeleteIcon;
12393
12409
  })(DeleteIcon || (DeleteIcon = {}));
12394
12410
 
12395
12411
  class TableService {
12396
- get isOpened() {
12397
- return this.toolbarRef && this.toolbarRef.componentInstance;
12398
- }
12399
12412
  constructor(thyPopover, overlay, tableStore, theTableContextMenuService, ngZone, theContextService) {
12400
12413
  this.thyPopover = thyPopover;
12401
12414
  this.overlay = overlay;
@@ -12409,6 +12422,9 @@ class TableService {
12409
12422
  this.placement = 'topLeft';
12410
12423
  this.offset = 8;
12411
12424
  }
12425
+ get isOpened() {
12426
+ return this.toolbarRef && this.toolbarRef.componentInstance;
12427
+ }
12412
12428
  openToolbar(origin, tableElement) {
12413
12429
  if (this.isOpened) {
12414
12430
  if (this.toolbarRef.containerInstance.config.origin === origin) {
@@ -12464,9 +12480,9 @@ class TableService {
12464
12480
  }
12465
12481
  }
12466
12482
  }
12467
- 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 });
12468
- TableService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TableService });
12469
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TableService, decorators: [{
12483
+ 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 });
12484
+ TableService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TableService });
12485
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TableService, decorators: [{
12470
12486
  type: Injectable
12471
12487
  }], ctorParameters: function () { return [{ type: i1$1.ThyPopover }, { type: i2$1.Overlay }, { type: TableStore }, { type: TheTableContextMenuService }, { type: i0.NgZone }, { type: TheContextService }]; } });
12472
12488
 
@@ -12501,9 +12517,9 @@ class TableFreezeColumnPipe {
12501
12517
  return !!(tablePluginOptions?.freezeColumnHeader && table.options?.headerColumn && !mergeColumnCells.length && stickyColumn);
12502
12518
  }
12503
12519
  }
12504
- TableFreezeColumnPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TableFreezeColumnPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
12505
- TableFreezeColumnPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.2", ngImport: i0, type: TableFreezeColumnPipe, name: "freezeColumn" });
12506
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TableFreezeColumnPipe, decorators: [{
12520
+ TableFreezeColumnPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TableFreezeColumnPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
12521
+ TableFreezeColumnPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.0", ngImport: i0, type: TableFreezeColumnPipe, name: "freezeColumn" });
12522
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TableFreezeColumnPipe, decorators: [{
12507
12523
  type: Pipe,
12508
12524
  args: [{ name: 'freezeColumn' }]
12509
12525
  }] });
@@ -12517,9 +12533,9 @@ class TableFreezeRowPipe {
12517
12533
  return false;
12518
12534
  }
12519
12535
  }
12520
- TableFreezeRowPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TableFreezeRowPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
12521
- TableFreezeRowPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.2", ngImport: i0, type: TableFreezeRowPipe, name: "freezeRow" });
12522
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TableFreezeRowPipe, decorators: [{
12536
+ TableFreezeRowPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TableFreezeRowPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
12537
+ TableFreezeRowPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.0", ngImport: i0, type: TableFreezeRowPipe, name: "freezeRow" });
12538
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TableFreezeRowPipe, decorators: [{
12523
12539
  type: Pipe,
12524
12540
  args: [{ name: 'freezeRow' }]
12525
12541
  }] });
@@ -12553,9 +12569,13 @@ const getGridColumns = (headerRow, cellsWidth) => {
12553
12569
  });
12554
12570
  return result;
12555
12571
  };
12556
- const getColumnsWidth = (cellRow) => {
12572
+ const getColumnsWidth = (cellRow, isColgroup = false) => {
12557
12573
  const result = [];
12558
12574
  cellRow.childNodes.forEach((item) => {
12575
+ if (isColgroup && IS_SAFARI) {
12576
+ result.push(item.offsetWidth);
12577
+ return;
12578
+ }
12559
12579
  if (item.getBoundingClientRect) {
12560
12580
  result.push(item.getBoundingClientRect().width);
12561
12581
  }
@@ -12563,6 +12583,113 @@ const getColumnsWidth = (cellRow) => {
12563
12583
  return result;
12564
12584
  };
12565
12585
 
12586
+ /**
12587
+ * 计算最小行跨距单元格
12588
+ * @param element TableElement
12589
+ * @returns
12590
+ */
12591
+ const calculateMinRowSpanCellForRows = (element) => {
12592
+ const cells = element.children.map((row, index) => {
12593
+ const noHiddenCells = row.children.filter(cell => !cell.hidden);
12594
+ if (noHiddenCells.length > 0) {
12595
+ const minRowspan = Math.min.apply(Math, noHiddenCells.map(cell => {
12596
+ return cell.rowspan || 1;
12597
+ }));
12598
+ const cell = row.children.find(item => !item.hidden && (item.rowspan || 1) === minRowspan);
12599
+ return {
12600
+ cell,
12601
+ rowIndex: index
12602
+ };
12603
+ }
12604
+ else {
12605
+ return {
12606
+ rowIndex: index
12607
+ };
12608
+ }
12609
+ });
12610
+ return cells;
12611
+ };
12612
+ /**
12613
+ * 计算行控件的平均高度
12614
+ * @param previousCombineRowIndex
12615
+ * @param previousRowIndex
12616
+ * @param rowControls
12617
+ */
12618
+ const calculateRowControlsAvgHeight = (previousCombineRowIndex, previousRowIndex, rowControls) => {
12619
+ const rowControl = rowControls[previousRowIndex];
12620
+ const count = previousCombineRowIndex - previousRowIndex;
12621
+ const avgHeight = Math.floor(rowControl.height / (count + 1));
12622
+ const firstHeight = rowControl.height - avgHeight * count;
12623
+ rowControl.height = firstHeight;
12624
+ rowControls
12625
+ .filter((_, index) => index > previousRowIndex && index <= previousCombineRowIndex)
12626
+ .forEach(rowControl => {
12627
+ rowControl.height = avgHeight;
12628
+ });
12629
+ };
12630
+ const getBelowRowHeight = (editor, cells, index, rowIndex, rowspan) => {
12631
+ let belowRowlHeight = 0;
12632
+ cells.slice(index + 1, cells.length).map(item => {
12633
+ if (!item.cell) {
12634
+ return;
12635
+ }
12636
+ if (rowIndex + rowspan > item.rowIndex) {
12637
+ const cellDom = AngularEditor.toDOMNode(editor, item.cell);
12638
+ if (item.cell.rowspan > 1) {
12639
+ // 如果下方单元格的rowspan > 1,递归计算
12640
+ const height = getBelowRowHeight(editor, cells, cells.findIndex(cell => cell.rowIndex === item.rowIndex), item.rowIndex, item.cell.rowspan);
12641
+ belowRowlHeight += getElementHeight(cellDom) - height;
12642
+ }
12643
+ else {
12644
+ belowRowlHeight += getElementHeight(cellDom);
12645
+ }
12646
+ }
12647
+ });
12648
+ return belowRowlHeight;
12649
+ };
12650
+ const calculateRowControls = (editor, element) => {
12651
+ const minRowSpanCellForRows = calculateMinRowSpanCellForRows(element);
12652
+ const rowControls = [];
12653
+ let previousRowIndex = 0;
12654
+ let previousCombineRowIndex = 0;
12655
+ minRowSpanCellForRows.forEach((cellInfo, index) => {
12656
+ if (!cellInfo.cell) {
12657
+ rowControls.push({
12658
+ height: 0,
12659
+ rowIndex: index
12660
+ });
12661
+ previousCombineRowIndex = index;
12662
+ if (index === minRowSpanCellForRows.length - 1) {
12663
+ calculateRowControlsAvgHeight(previousCombineRowIndex, previousRowIndex, rowControls);
12664
+ }
12665
+ return;
12666
+ }
12667
+ // calculate combine row height
12668
+ if (previousCombineRowIndex > previousRowIndex) {
12669
+ calculateRowControlsAvgHeight(previousCombineRowIndex, previousRowIndex, rowControls);
12670
+ previousCombineRowIndex = 0;
12671
+ }
12672
+ const cellDom = AngularEditor.toDOMNode(editor, cellInfo.cell);
12673
+ let height = getElementHeight(cellDom);
12674
+ // 当cell为合并的单元格(rowspan > 1),计算其实际高度(当前单元格的高度 - 下方合并单元格的高度)
12675
+ if (cellInfo.cell.rowspan > 1) {
12676
+ const calcHeight = height - getBelowRowHeight(editor, minRowSpanCellForRows, index, cellInfo.rowIndex, cellInfo.cell.rowspan);
12677
+ rowControls.push({
12678
+ height: calcHeight,
12679
+ rowIndex: cellInfo.rowIndex
12680
+ });
12681
+ }
12682
+ else {
12683
+ rowControls.push({
12684
+ height,
12685
+ rowIndex: cellInfo.rowIndex
12686
+ });
12687
+ }
12688
+ previousRowIndex = index;
12689
+ });
12690
+ return rowControls;
12691
+ };
12692
+
12566
12693
  const TABLE_SELECTOR = '.the-table';
12567
12694
  const TABLE_WRAPPER_SELECTOR = '.the-table-wrapper';
12568
12695
  const RESIZE_OVERLAY_SELECTOR = '.the-table-resize-overlay-thumb';
@@ -12645,9 +12772,9 @@ class TheColumnResizeDirective {
12645
12772
  this.destroyed.complete();
12646
12773
  }
12647
12774
  }
12648
- 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 });
12649
- TheColumnResizeDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.2", type: TheColumnResizeDirective, selector: "div[theColumnResize]", ngImport: i0 });
12650
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheColumnResizeDirective, decorators: [{
12775
+ 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 });
12776
+ TheColumnResizeDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.0", type: TheColumnResizeDirective, selector: "div[theColumnResize]", ngImport: i0 });
12777
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheColumnResizeDirective, decorators: [{
12651
12778
  type: Directive,
12652
12779
  args: [{
12653
12780
  selector: 'div[theColumnResize]'
@@ -12658,19 +12785,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
12658
12785
  }] }]; } });
12659
12786
 
12660
12787
  class TheInsertMarkComponent {
12661
- get disabled() {
12662
- return this.tableStore && !!this.tableStore.selectedCellPositions.length;
12663
- }
12664
- get editor() {
12665
- return this.tableStore && this.tableStore.editor;
12666
- }
12667
12788
  constructor(cdr, renderer2) {
12668
12789
  this.cdr = cdr;
12669
12790
  this.renderer2 = renderer2;
12791
+ this.destroy$ = new Subject();
12670
12792
  this.tooltipContent = '';
12793
+ this.disabled = false;
12794
+ }
12795
+ get editor() {
12796
+ return this.tableStore && this.tableStore.editor;
12671
12797
  }
12672
12798
  ngOnInit() {
12673
12799
  this.tooltipContent = this.type === 'row' ? '插入行' : '插入列';
12800
+ this.tableStore
12801
+ .selectedCellsChange()
12802
+ .pipe(takeUntil(this.destroy$))
12803
+ .subscribe(selectedCellPositions => {
12804
+ this.disabled = !!selectedCellPositions.length;
12805
+ });
12806
+ }
12807
+ ngOnDestroy() {
12808
+ this.destroy$?.next();
12809
+ this.destroy$?.complete();
12674
12810
  }
12675
12811
  onMouseDown(event) {
12676
12812
  event.preventDefault();
@@ -12706,7 +12842,7 @@ class TheInsertMarkComponent {
12706
12842
  getLength() {
12707
12843
  const { selection } = this.editor;
12708
12844
  if (selection && Range.isCollapsed(selection)) {
12709
- const { table } = TablePosition.create(new TableOptions(), this.editor, selection.anchor.path);
12845
+ const { table } = createTablePosition(this.editor, selection.anchor.path);
12710
12846
  if (!table) {
12711
12847
  return;
12712
12848
  }
@@ -12724,9 +12860,9 @@ class TheInsertMarkComponent {
12724
12860
  }
12725
12861
  }
12726
12862
  }
12727
- 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 });
12728
- 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"] }] });
12729
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheInsertMarkComponent, decorators: [{
12863
+ 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 });
12864
+ 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"] }] });
12865
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheInsertMarkComponent, decorators: [{
12730
12866
  type: Component,
12731
12867
  args: [{ selector: 'the-table-insert-mark', host: {
12732
12868
  class: 'the-table-insert-mark'
@@ -12742,6 +12878,30 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
12742
12878
  }] } });
12743
12879
 
12744
12880
  class TheTableComponent extends TheBaseElementComponent {
12881
+ constructor(elementRef, eventDispatcher, resizeNotifier, tableStore, cdr, ngZone, tableService, theTableContextMenuService, freezeColumnPipe, freezeRowPipe, renderer, contextService) {
12882
+ super(elementRef, cdr);
12883
+ this.eventDispatcher = eventDispatcher;
12884
+ this.resizeNotifier = resizeNotifier;
12885
+ this.tableStore = tableStore;
12886
+ this.cdr = cdr;
12887
+ this.ngZone = ngZone;
12888
+ this.tableService = tableService;
12889
+ this.theTableContextMenuService = theTableContextMenuService;
12890
+ this.freezeColumnPipe = freezeColumnPipe;
12891
+ this.freezeRowPipe = freezeRowPipe;
12892
+ this.renderer = renderer;
12893
+ this.contextService = contextService;
12894
+ this.headerRow = false;
12895
+ this.isSelectedAllCell = false;
12896
+ this.destroy$ = new Subject();
12897
+ this.rowControls = [];
12898
+ this.colControls = [];
12899
+ this.getColControlButtonWidth = () => {
12900
+ let result = 0;
12901
+ result += this.element.options?.numberedColumn ? TABLE_NUMBER_COLUMN : 0;
12902
+ return result;
12903
+ };
12904
+ }
12745
12905
  get columns() {
12746
12906
  return this.element && this.element.columns;
12747
12907
  }
@@ -12766,7 +12926,7 @@ class TheTableComponent extends TheBaseElementComponent {
12766
12926
  if (this.initialized) {
12767
12927
  Promise.resolve().then(() => {
12768
12928
  this.tableStore.emitTableChange();
12769
- this.tableStore.calculateSelectedColumnsAndRowIndex();
12929
+ this.tableStore.setSelectedColumnsAndRowIndex();
12770
12930
  this.bindTableScrollingShadow();
12771
12931
  this.useRowControls();
12772
12932
  this.setHeaderCellStyle();
@@ -12779,30 +12939,6 @@ class TheTableComponent extends TheBaseElementComponent {
12779
12939
  }
12780
12940
  this.headerRow = this.getHeaderRow();
12781
12941
  }
12782
- constructor(elementRef, eventDispatcher, resizeNotifier, tableStore, cdr, ngZone, tableService, theTableContextMenuService, freezeColumnPipe, freezeRowPipe, renderer, contextService) {
12783
- super(elementRef, cdr);
12784
- this.eventDispatcher = eventDispatcher;
12785
- this.resizeNotifier = resizeNotifier;
12786
- this.tableStore = tableStore;
12787
- this.cdr = cdr;
12788
- this.ngZone = ngZone;
12789
- this.tableService = tableService;
12790
- this.theTableContextMenuService = theTableContextMenuService;
12791
- this.freezeColumnPipe = freezeColumnPipe;
12792
- this.freezeRowPipe = freezeRowPipe;
12793
- this.renderer = renderer;
12794
- this.contextService = contextService;
12795
- this.headerRow = false;
12796
- this.isSelectedAllCell = false;
12797
- this.destroy$ = new Subject();
12798
- this.rowControls = [];
12799
- this.colControls = [];
12800
- this.getColControlButtonWidth = () => {
12801
- let result = 0;
12802
- result += this.element.options?.numberedColumn ? TABLE_NUMBER_COLUMN : 0;
12803
- return result;
12804
- };
12805
- }
12806
12942
  ngOnInit() {
12807
12943
  super.ngOnInit();
12808
12944
  this.getColControls();
@@ -12834,7 +12970,7 @@ class TheTableComponent extends TheBaseElementComponent {
12834
12970
  .selectedCellsChange()
12835
12971
  .pipe(takeUntil(this.destroy$))
12836
12972
  .subscribe(() => {
12837
- this.isSelectedAllCell = this.tableStore.isSelectedAllCell();
12973
+ this.isSelectedAllCell = isSelectedAllCell(this.editor, this.tableStore.getSelectedCellPositions());
12838
12974
  });
12839
12975
  }
12840
12976
  getWrapperWidth() {
@@ -12930,7 +13066,7 @@ class TheTableComponent extends TheBaseElementComponent {
12930
13066
  }
12931
13067
  }
12932
13068
  calcHeaderRowShadow() {
12933
- const headerRowHeight = this.calculateRowControls()[0]?.height;
13069
+ const headerRowHeight = calculateRowControls(this.editor, this.element)[0]?.height;
12934
13070
  let height = headerRowHeight;
12935
13071
  // 默认(没有聚焦)的 top 值:滚动容器高度 + 表格的padding(8)
12936
13072
  let top = this.scrollContainerTop + TABLE_PADDING$1;
@@ -12955,7 +13091,7 @@ class TheTableComponent extends TheBaseElementComponent {
12955
13091
  this.scrollContainerTop = event.target.getBoundingClientRect().top;
12956
13092
  const clientRect = this.theTableElement.nativeElement.getBoundingClientRect();
12957
13093
  const headerTopHeight = this.isInTable ? -19 : 11;
12958
- const headerRowHeight = this.calculateRowControls()[0]?.height;
13094
+ const headerRowHeight = calculateRowControls(this.editor, this.element)[0]?.height;
12959
13095
  const top = clientRect.top + headerTopHeight;
12960
13096
  this.isStickyTop =
12961
13097
  top <= this.scrollContainerTop + 8 &&
@@ -13035,7 +13171,9 @@ class TheTableComponent extends TheBaseElementComponent {
13035
13171
  const colControl = this.columnControlsWrapper.nativeElement;
13036
13172
  if (this.freezeRowPipe.transform(this.element, this.headerRow, this.tablePluginOptions)) {
13037
13173
  const headerRow = this.tbodyElement.nativeElement.childNodes[0];
13038
- const cellsWidth = this.colgroup?.nativeElement ? getColumnsWidth(this.colgroup.nativeElement) : this.getDefaultCellWidth();
13174
+ const cellsWidth = this.colgroup?.nativeElement
13175
+ ? getColumnsWidth(this.colgroup.nativeElement, true)
13176
+ : this.getDefaultCellWidth();
13039
13177
  const gridColumns = getGridColumns(headerRow, cellsWidth);
13040
13178
  const tablePadding = 44;
13041
13179
  let tableWidth = this.elementRef.nativeElement.getBoundingClientRect().width;
@@ -13052,7 +13190,7 @@ class TheTableComponent extends TheBaseElementComponent {
13052
13190
  const headerRow = this.nativeElement.querySelector('tbody tr');
13053
13191
  const rowControlInner = this.rowControlsInner.nativeElement;
13054
13192
  const tableCornerBtn = this.cornerControl.nativeElement;
13055
- const headerRowHeight = this.calculateRowControls()[0]?.height;
13193
+ const headerRowHeight = calculateRowControls(this.editor, this.element)[0]?.height;
13056
13194
  const numberedColumn = this.element.options?.numberedColumn;
13057
13195
  if (this.isStickyTop) {
13058
13196
  this.renderer.addClass(this.nativeElement, TableWithStickyRowClass);
@@ -13149,107 +13287,12 @@ class TheTableComponent extends TheBaseElementComponent {
13149
13287
  }
13150
13288
  useRowControls() {
13151
13289
  if ((this.selection && !this.readonly) || this.element.options?.numberedColumn || this.tableStore.isRightClicking) {
13152
- this.rowControls = this.calculateRowControls();
13290
+ this.rowControls = calculateRowControls(this.editor, this.element);
13153
13291
  }
13154
13292
  }
13155
13293
  detectChanges() {
13156
13294
  this.cdr.detectChanges();
13157
13295
  }
13158
- calculateMinRowSpanCellForRows() {
13159
- const cells = this.element.children.map((row, index) => {
13160
- const noHiddenCells = row.children.filter(cell => !cell.hidden);
13161
- if (noHiddenCells.length > 0) {
13162
- const minRowspan = Math.min.apply(Math, noHiddenCells.map(cell => {
13163
- return cell.rowspan || 1;
13164
- }));
13165
- const cell = row.children.find(item => !item.hidden && (item.rowspan || 1) === minRowspan);
13166
- return {
13167
- cell,
13168
- rowIndex: index
13169
- };
13170
- }
13171
- else {
13172
- return {
13173
- rowIndex: index
13174
- };
13175
- }
13176
- });
13177
- return cells;
13178
- }
13179
- calculateRowControls() {
13180
- const minRowSpanCellForRows = this.calculateMinRowSpanCellForRows();
13181
- const rowControls = [];
13182
- let previousRowIndex = 0;
13183
- let previousCombineRowIndex = 0;
13184
- minRowSpanCellForRows.forEach((cellInfo, index) => {
13185
- if (!cellInfo.cell) {
13186
- rowControls.push({
13187
- height: 0,
13188
- rowIndex: index
13189
- });
13190
- previousCombineRowIndex = index;
13191
- if (index === minRowSpanCellForRows.length - 1) {
13192
- this.calculateRowControlsAvgHeight(previousCombineRowIndex, previousRowIndex, rowControls);
13193
- }
13194
- return;
13195
- }
13196
- // calculate combine row height
13197
- if (previousCombineRowIndex > previousRowIndex) {
13198
- this.calculateRowControlsAvgHeight(previousCombineRowIndex, previousRowIndex, rowControls);
13199
- previousCombineRowIndex = 0;
13200
- }
13201
- const cellDom = AngularEditor.toDOMNode(this.editor, cellInfo.cell);
13202
- let height = getElementHeight(cellDom);
13203
- // 当cell为合并的单元格(rowspan > 1),计算其实际高度(当前单元格的高度 - 下方合并单元格的高度)
13204
- if (cellInfo.cell.rowspan > 1) {
13205
- const calcHeight = height - this.getBelowRowHeight(minRowSpanCellForRows, index, cellInfo.rowIndex, cellInfo.cell.rowspan);
13206
- rowControls.push({
13207
- height: calcHeight,
13208
- rowIndex: cellInfo.rowIndex
13209
- });
13210
- }
13211
- else {
13212
- rowControls.push({
13213
- height,
13214
- rowIndex: cellInfo.rowIndex
13215
- });
13216
- }
13217
- previousRowIndex = index;
13218
- });
13219
- return rowControls;
13220
- }
13221
- calculateRowControlsAvgHeight(previousCombineRowIndex, previousRowIndex, rowControls) {
13222
- const rowControl = rowControls[previousRowIndex];
13223
- const count = previousCombineRowIndex - previousRowIndex;
13224
- const avgHeight = Math.floor(rowControl.height / (count + 1));
13225
- const firstHeight = rowControl.height - avgHeight * count;
13226
- rowControl.height = firstHeight;
13227
- rowControls
13228
- .filter((item, _index) => _index > previousRowIndex && _index <= previousCombineRowIndex)
13229
- .forEach(rowControl => {
13230
- rowControl.height = avgHeight;
13231
- });
13232
- }
13233
- getBelowRowHeight(cells, index, rowIndex, rowspan) {
13234
- let belowRowlHeight = 0;
13235
- cells.slice(index + 1, cells.length).map(item => {
13236
- if (!item.cell) {
13237
- return;
13238
- }
13239
- if (rowIndex + rowspan > item.rowIndex) {
13240
- const cellDom = AngularEditor.toDOMNode(this.editor, item.cell);
13241
- if (item.cell.rowspan > 1) {
13242
- // 如果下方单元格的rowspan > 1,递归计算
13243
- const height = this.getBelowRowHeight(cells, cells.findIndex(cell => cell.rowIndex === item.rowIndex), item.rowIndex, item.cell.rowspan);
13244
- belowRowlHeight += getElementHeight(cellDom) - height;
13245
- }
13246
- else {
13247
- belowRowlHeight += getElementHeight(cellDom);
13248
- }
13249
- }
13250
- });
13251
- return belowRowlHeight;
13252
- }
13253
13296
  resolveImage() {
13254
13297
  const imageElements = this.nativeElement.querySelectorAll('img');
13255
13298
  if (imageElements.length) {
@@ -13278,8 +13321,8 @@ class TheTableComponent extends TheBaseElementComponent {
13278
13321
  if (this.selection && !this.readonly) {
13279
13322
  const opts = new TableOptions();
13280
13323
  const selection = this.editor.selection;
13281
- const startPosition = TablePosition.create(opts, this.editor, selection.anchor.path);
13282
- const endPosition = TablePosition.create(opts, this.editor, selection.focus.path);
13324
+ const startPosition = createTablePosition(this.editor);
13325
+ const endPosition = createTablePosition(this.editor, selection.focus.path);
13283
13326
  this.isInTable = startPosition.isInTable() && endPosition.isInTable();
13284
13327
  }
13285
13328
  else {
@@ -13425,7 +13468,8 @@ class TheTableComponent extends TheBaseElementComponent {
13425
13468
  return !isVirtualKey(e) && !this.theTableContextMenuService.isOpened;
13426
13469
  })))
13427
13470
  .pipe(filter(() => {
13428
- return this.tableStore.selectedCellPositions?.length > 0;
13471
+ const selectedCellPositions = this.tableStore.getSelectedCellPositions();
13472
+ return selectedCellPositions?.length > 0;
13429
13473
  }), takeUntil(this.destroy$))
13430
13474
  .subscribe((e) => {
13431
13475
  if (e.type === 'keydown') {
@@ -13533,8 +13577,8 @@ class TheTableComponent extends TheBaseElementComponent {
13533
13577
  this.destroy$.complete();
13534
13578
  }
13535
13579
  }
13536
- 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 });
13537
- 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: [
13580
+ 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 });
13581
+ 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: [
13538
13582
  TableStore,
13539
13583
  TableService,
13540
13584
  TheTableContextMenuService,
@@ -13547,7 +13591,7 @@ TheTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", vers
13547
13591
  useExisting: TheTableComponent
13548
13592
  }
13549
13593
  ], 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"] }] });
13550
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheTableComponent, decorators: [{
13594
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheTableComponent, decorators: [{
13551
13595
  type: Component,
13552
13596
  args: [{ selector: 'the-table, [theTable]', providers: [
13553
13597
  TableStore,
@@ -13610,7 +13654,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
13610
13654
  */
13611
13655
  function clearTableNode(opts, editor, isTopToBot) {
13612
13656
  const { selection } = editor;
13613
- const element = TablePosition.create(opts, editor, selection.focus.path);
13657
+ const element = createTablePosition(editor, selection.focus.path);
13614
13658
  const rowIndex = element.getRowIndex();
13615
13659
  const colIndex = element.getColumnIndex();
13616
13660
  const removeRow = isTopToBot ? 0 : rowIndex + 1;
@@ -13661,9 +13705,8 @@ class TheTableRowComponent extends TheBaseElementComponent {
13661
13705
  }
13662
13706
  onContextChange() {
13663
13707
  super.onContextChange();
13664
- const opts = new TableOptions();
13665
13708
  const path = TheEditor.findPath(this.editor, this.element);
13666
- const tablePosition = TablePosition.create(opts, this.editor, path.concat(0));
13709
+ const tablePosition = createTablePosition(this.editor, path.concat(0));
13667
13710
  const rowIndex = tablePosition.getRowIndex();
13668
13711
  if (rowIndex === 0) {
13669
13712
  this.renderer.addClass(this.elementRef.nativeElement, 'the-sticky-row');
@@ -13685,9 +13728,9 @@ class TheTableRowComponent extends TheBaseElementComponent {
13685
13728
  }
13686
13729
  }
13687
13730
  }
13688
- 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 });
13689
- 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"] }] });
13690
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheTableRowComponent, decorators: [{
13731
+ 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 });
13732
+ 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"] }] });
13733
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheTableRowComponent, decorators: [{
13691
13734
  type: Component,
13692
13735
  args: [{
13693
13736
  selector: 'tr[theTableRow]',
@@ -13843,9 +13886,9 @@ class ColumnResizingStore {
13843
13886
  this.resizeRows.pop();
13844
13887
  }
13845
13888
  }
13846
- ColumnResizingStore.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: ColumnResizingStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
13847
- ColumnResizingStore.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: ColumnResizingStore });
13848
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: ColumnResizingStore, decorators: [{
13889
+ ColumnResizingStore.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ColumnResizingStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
13890
+ ColumnResizingStore.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ColumnResizingStore });
13891
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ColumnResizingStore, decorators: [{
13849
13892
  type: Injectable
13850
13893
  }], ctorParameters: function () { return []; } });
13851
13894
 
@@ -14000,9 +14043,9 @@ class TheColumnResizeOverlayHandleComponent {
14000
14043
  this.destroyed.complete();
14001
14044
  }
14002
14045
  }
14003
- 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 });
14004
- 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 });
14005
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheColumnResizeOverlayHandleComponent, decorators: [{
14046
+ 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 });
14047
+ 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 });
14048
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheColumnResizeOverlayHandleComponent, decorators: [{
14006
14049
  type: Component,
14007
14050
  args: [{
14008
14051
  host: { class: 'the-table-resize-overlay-thumb' },
@@ -14066,6 +14109,22 @@ const POSITION_MAP = {
14066
14109
  }
14067
14110
  };
14068
14111
  class TheTdComponent extends TheBaseElementComponent {
14112
+ constructor(elementRef, cdr, renderer, viewContainerRef, ngZone, injector, overlay, resizingStore, scrollDispatcher, freezeColumnPipe) {
14113
+ super(elementRef, cdr);
14114
+ this.elementRef = elementRef;
14115
+ this.cdr = cdr;
14116
+ this.renderer = renderer;
14117
+ this.viewContainerRef = viewContainerRef;
14118
+ this.ngZone = ngZone;
14119
+ this.injector = injector;
14120
+ this.overlay = overlay;
14121
+ this.resizingStore = resizingStore;
14122
+ this.scrollDispatcher = scrollDispatcher;
14123
+ this.freezeColumnPipe = freezeColumnPipe;
14124
+ this.destroy$ = new Subject();
14125
+ this.tableOptions = new TableOptions();
14126
+ this.cellInnerMinHeight = null;
14127
+ }
14069
14128
  get tableStore() {
14070
14129
  return this.tableComponent.tableStore;
14071
14130
  }
@@ -14113,22 +14172,6 @@ class TheTdComponent extends TheBaseElementComponent {
14113
14172
  this.useState();
14114
14173
  }
14115
14174
  }
14116
- constructor(elementRef, cdr, renderer, viewContainerRef, ngZone, injector, overlay, resizingStore, scrollDispatcher, freezeColumnPipe) {
14117
- super(elementRef, cdr);
14118
- this.elementRef = elementRef;
14119
- this.cdr = cdr;
14120
- this.renderer = renderer;
14121
- this.viewContainerRef = viewContainerRef;
14122
- this.ngZone = ngZone;
14123
- this.injector = injector;
14124
- this.overlay = overlay;
14125
- this.resizingStore = resizingStore;
14126
- this.scrollDispatcher = scrollDispatcher;
14127
- this.freezeColumnPipe = freezeColumnPipe;
14128
- this.destroy$ = new Subject();
14129
- this.tableOptions = new TableOptions();
14130
- this.cellInnerMinHeight = null;
14131
- }
14132
14175
  ngOnInit() {
14133
14176
  super.ngOnInit();
14134
14177
  this.useBackground();
@@ -14214,10 +14257,9 @@ class TheTdComponent extends TheBaseElementComponent {
14214
14257
  useElementStyle(this.elementRef.nativeElement, this.element);
14215
14258
  }
14216
14259
  useTablePosition() {
14217
- const opts = new TableOptions();
14218
14260
  const path = TheEditor.findPath(this.editor, this.element);
14219
14261
  // must be path of cell's children
14220
- this.tablePosition = TablePosition.create(opts, this.editor, path.concat(0));
14262
+ this.tablePosition = createTablePosition(this.editor, path.concat(0));
14221
14263
  }
14222
14264
  useBackground() {
14223
14265
  if (this.element.backgroundColor !== this.backgroundColor) {
@@ -14717,9 +14759,9 @@ class TheTdComponent extends TheBaseElementComponent {
14717
14759
  this.destroy$.complete();
14718
14760
  }
14719
14761
  }
14720
- 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 });
14721
- 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"] }] });
14722
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheTdComponent, decorators: [{
14762
+ 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 });
14763
+ 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"] }] });
14764
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheTdComponent, decorators: [{
14723
14765
  type: Component,
14724
14766
  args: [{ selector: 'td[theTd]', providers: [ColumnResizingStore], template: "<div #cellInner>\n <slate-children [children]=\"children\" [context]=\"childrenContext\" [viewContext]=\"viewContext\"></slate-children>\n</div>\n" }]
14725
14767
  }], 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: [{
@@ -14767,14 +14809,14 @@ const normalizeTable = (table) => {
14767
14809
  };
14768
14810
 
14769
14811
  class TheTableToolbarItemComponent extends TheBaseToolbarItem {
14770
- get isOpenTableSelect() {
14771
- return this.tableSelectRef && this.tableSelectRef.componentInstance;
14772
- }
14773
14812
  constructor(thyPopover, overlay) {
14774
14813
  super();
14775
14814
  this.thyPopover = thyPopover;
14776
14815
  this.overlay = overlay;
14777
14816
  }
14817
+ get isOpenTableSelect() {
14818
+ return this.tableSelectRef && this.tableSelectRef.componentInstance;
14819
+ }
14778
14820
  preventDefault(event) {
14779
14821
  event.preventDefault();
14780
14822
  event.stopPropagation();
@@ -14810,8 +14852,8 @@ class TheTableToolbarItemComponent extends TheBaseToolbarItem {
14810
14852
  return this.tableSelectRef;
14811
14853
  }
14812
14854
  }
14813
- 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 });
14814
- 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: `
14855
+ 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 });
14856
+ 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: `
14815
14857
  <a
14816
14858
  href="javascript:;"
14817
14859
  class="link-with-down"
@@ -14826,7 +14868,7 @@ TheTableToolbarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14
14826
14868
  <thy-icon class="link-down-icon font-size-sm text-desc ml-1" thyIconName="caret-down"> </thy-icon>
14827
14869
  </a>
14828
14870
  `, 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"] }] });
14829
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheTableToolbarItemComponent, decorators: [{
14871
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheTableToolbarItemComponent, decorators: [{
14830
14872
  type: Component,
14831
14873
  args: [{
14832
14874
  selector: 'the-table-toolbar-item',
@@ -14875,7 +14917,7 @@ const withTable = (editor) => {
14875
14917
  const [, startBlockPath] = Editor.above(editor, {
14876
14918
  match: n => Editor.isBlock(editor, n)
14877
14919
  });
14878
- const startPosition = TablePosition.create(opts, editor, selection.anchor.path);
14920
+ const startPosition = createTablePosition(editor);
14879
14921
  if (startBlockPath.length <= startPosition.cellEntry[1].length + 1 &&
14880
14922
  startBlockPath.pop() === 0 &&
14881
14923
  selection.anchor.offset === 0 &&
@@ -14889,8 +14931,8 @@ const withTable = (editor) => {
14889
14931
  const opts = new TableOptions();
14890
14932
  const afterPoint = Editor.after(editor, editor.selection);
14891
14933
  if (afterPoint && isRangeInTable(opts, editor, { anchor: afterPoint, focus: afterPoint })) {
14892
- const beforePosition = TablePosition.create(opts, editor, editor.selection.anchor.path);
14893
- const afterPosition = TablePosition.create(opts, editor, afterPoint.path);
14934
+ const beforePosition = createTablePosition(editor);
14935
+ const afterPosition = createTablePosition(editor, afterPoint.path);
14894
14936
  if (beforePosition.cell && beforePosition.cell !== afterPosition.cell) {
14895
14937
  return;
14896
14938
  }
@@ -14926,8 +14968,8 @@ const withTable = (editor) => {
14926
14968
  onKeydown(event);
14927
14969
  return;
14928
14970
  }
14929
- const startPosition = TablePosition.create(opts, editor, selection.anchor.path);
14930
- const endPosition = TablePosition.create(opts, editor, selection.focus.path);
14971
+ const startPosition = createTablePosition(editor);
14972
+ const endPosition = createTablePosition(editor, selection.focus.path);
14931
14973
  const isCollapsed = Range.isCollapsed(selection);
14932
14974
  if (startPosition && endPosition && endPosition.isInTable()) {
14933
14975
  // for keyboard up and down key in the table
@@ -15004,7 +15046,7 @@ const withTable = (editor) => {
15004
15046
  }
15005
15047
  if (isMoveBackward) {
15006
15048
  const beforePoint = Editor.before(editor, editor.selection);
15007
- const beforePosition = beforePoint && TablePosition.create(opts, editor, beforePoint.path);
15049
+ const beforePosition = beforePoint && createTablePosition(editor, beforePoint.path);
15008
15050
  if (beforePosition && beforePosition.cell && beforePosition.cell.hidden) {
15009
15051
  event.preventDefault();
15010
15052
  const at = Editor.end(editor, TheEditor.findPath(editor, beforePosition.findPrevious()));
@@ -15013,7 +15055,7 @@ const withTable = (editor) => {
15013
15055
  }
15014
15056
  if (isMoveForward) {
15015
15057
  const afterPoint = Editor.after(editor, editor.selection);
15016
- const afterPosition = afterPoint && TablePosition.create(opts, editor, afterPoint.path);
15058
+ const afterPosition = afterPoint && createTablePosition(editor, afterPoint.path);
15017
15059
  if (afterPosition.cell && afterPosition.cell.hidden) {
15018
15060
  event.preventDefault();
15019
15061
  const nextCell = afterPosition.findNext();
@@ -15062,10 +15104,9 @@ const withTable = (editor) => {
15062
15104
  setFragmentData(unit);
15063
15105
  return;
15064
15106
  }
15065
- const { selection } = editor;
15066
- const tablePosition = TablePosition.create(opts, editor, selection.anchor.path);
15107
+ const tablePosition = createTablePosition(editor);
15067
15108
  const tableComponent = ELEMENT_TO_COMPONENT.get(tablePosition.table);
15068
- const selectedCellPositions = tableComponent.tableStore.selectedCellPositions;
15109
+ const selectedCellPositions = tableComponent.tableStore.getSelectedCellPositions();
15069
15110
  let tableFragment = null;
15070
15111
  if (tableComponent.tableStore.selectedRowsIndex.length > 0) {
15071
15112
  const rows = tablePosition.table.children.slice(tableComponent.tableStore.selectedRowsIndex[0], tableComponent.tableStore.selectedRowsIndex[tableComponent.tableStore.selectedRowsIndex.length - 1] + 1);
@@ -15117,7 +15158,7 @@ const withTable = (editor) => {
15117
15158
  fragment.length === 1 &&
15118
15159
  Element$1.isElement(fragment[0]) &&
15119
15160
  fragment[0].type === ElementKinds.table) {
15120
- const tablePosition = TablePosition.create(opts, editor, selection.anchor.path);
15161
+ const tablePosition = createTablePosition(editor);
15121
15162
  const clipboardTable = fragment[0].children;
15122
15163
  const clipboardRow = clipboardTable[0].children;
15123
15164
  const selectRowIndex = tablePosition.getRowIndex();
@@ -15259,7 +15300,7 @@ const withTable = (editor) => {
15259
15300
  node.hidden) {
15260
15301
  setTimeout(() => {
15261
15302
  const opts = new TableOptions();
15262
- const tablePosition = TablePosition.create(opts, editor, editor.selection.anchor.path);
15303
+ const tablePosition = createTablePosition(editor);
15263
15304
  const origin = getOriginCell(tablePosition.table, tablePosition.getRowIndex(), tablePosition.getColumnIndex());
15264
15305
  if (origin) {
15265
15306
  const path = AngularEditor.findPath(editor, origin);
@@ -15295,10 +15336,9 @@ const withTable = (editor) => {
15295
15336
  deleteCutData();
15296
15337
  return;
15297
15338
  }
15298
- const { selection } = editor;
15299
- const element = TablePosition.create(opts, editor, selection.anchor.path);
15339
+ const element = createTablePosition(editor);
15300
15340
  const tableComponent = ELEMENT_TO_COMPONENT.get(element.table);
15301
- const selectedCellPositions = tableComponent.tableStore.selectedCellPositions;
15341
+ const selectedCellPositions = tableComponent.tableStore.getSelectedCellPositions();
15302
15342
  if (selectedCellPositions.length > 0) {
15303
15343
  Editor.withoutNormalizing(editor, () => {
15304
15344
  if (tableComponent.tableStore.isSelectedTable) {
@@ -15325,7 +15365,7 @@ const withTable = (editor) => {
15325
15365
  const isSelectionOperation = editor.operations.every(op => Operation.isSelectionOperation(op));
15326
15366
  if (isCollapsed && isSelectionOperation) {
15327
15367
  const opts = new TableOptions();
15328
- const tablePosition = TablePosition.create(opts, editor, editor.selection.anchor.path);
15368
+ const tablePosition = createTablePosition(editor);
15329
15369
  if (tablePosition.isInTable() && tablePosition.cell.hidden) {
15330
15370
  TableEditor.selectOriginCell(editor, tablePosition.table, tablePosition.getRowIndex(), tablePosition.getColumnIndex(), false);
15331
15371
  }
@@ -15376,6 +15416,13 @@ const createTablePlugin = createPluginFactory({
15376
15416
  });
15377
15417
 
15378
15418
  class TheTodoItemComponent extends TheBaseElementComponent {
15419
+ constructor(elementRef, cdr, ctxService) {
15420
+ super(elementRef, cdr);
15421
+ this.elementRef = elementRef;
15422
+ this.cdr = cdr;
15423
+ this.ctxService = ctxService;
15424
+ this.checkItemClass = true;
15425
+ }
15379
15426
  get checkItemSelectable() {
15380
15427
  return this.editableWithReadonly && this.readonly;
15381
15428
  }
@@ -15385,13 +15432,6 @@ class TheTodoItemComponent extends TheBaseElementComponent {
15385
15432
  get editableWithReadonly() {
15386
15433
  return getPluginOptions(this.editor, PluginKeys.checkItem)?.editableWithReadonly;
15387
15434
  }
15388
- constructor(elementRef, cdr, ctxService) {
15389
- super(elementRef, cdr);
15390
- this.elementRef = elementRef;
15391
- this.cdr = cdr;
15392
- this.ctxService = ctxService;
15393
- this.checkItemClass = true;
15394
- }
15395
15435
  ngOnInit() {
15396
15436
  super.ngOnInit();
15397
15437
  }
@@ -15402,14 +15442,14 @@ class TheTodoItemComponent extends TheBaseElementComponent {
15402
15442
  setNode(this.editor, { checked }, this.element);
15403
15443
  }
15404
15444
  }
15405
- 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 });
15406
- 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: `
15445
+ 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 });
15446
+ 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: `
15407
15447
  <span contenteditable="false" class="todo-item-status">
15408
15448
  <input #checkbox type="checkbox" [checked]="element.checked" (click)="onCheck(checkbox.checked)" />
15409
15449
  </span>
15410
15450
  <span><slate-children [children]="children" [context]="childrenContext" [viewContext]="viewContext"></slate-children></span>
15411
15451
  `, isInline: true, dependencies: [{ kind: "component", type: i1.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }] });
15412
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheTodoItemComponent, decorators: [{
15452
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheTodoItemComponent, decorators: [{
15413
15453
  type: Component,
15414
15454
  args: [{
15415
15455
  selector: 'div[theTodoItem]',
@@ -15675,15 +15715,15 @@ class TheInlineToolbarComponent {
15675
15715
  this.destroy$.complete();
15676
15716
  }
15677
15717
  }
15678
- 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 });
15679
- 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
15718
+ 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 });
15719
+ 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
15680
15720
  #inlineToolbar
15681
15721
  class="the-inline-toolbar"
15682
15722
  [editor]="editor"
15683
15723
  [toolbarItems]="toolbarItems"
15684
15724
  [isMore]="false"
15685
15725
  ></the-toolbar> `, isInline: true, dependencies: [{ kind: "component", type: TheToolbarComponent, selector: "the-toolbar", inputs: ["editor", "toolbarItems", "align", "containerClass", "isMore", "afterTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
15686
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheInlineToolbarComponent, decorators: [{
15726
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheInlineToolbarComponent, decorators: [{
15687
15727
  type: Component,
15688
15728
  args: [{
15689
15729
  selector: 'the-inline-toolbar',
@@ -15709,10 +15749,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
15709
15749
  }] } });
15710
15750
 
15711
15751
  class TheQuickInsertComponent {
15712
- handleMousedownNativeElement(event) {
15713
- event.preventDefault();
15714
- event.stopPropagation();
15715
- }
15716
15752
  constructor(renderer, elementRef, cdr) {
15717
15753
  this.renderer = renderer;
15718
15754
  this.elementRef = elementRef;
@@ -15723,6 +15759,10 @@ class TheQuickInsertComponent {
15723
15759
  this.iconNameFill = 'plus-circle-thin-fill';
15724
15760
  this.displayIconName = this.defaultIconName;
15725
15761
  }
15762
+ handleMousedownNativeElement(event) {
15763
+ event.preventDefault();
15764
+ event.stopPropagation();
15765
+ }
15726
15766
  ngOnInit() {
15727
15767
  const { onChange } = this.editor;
15728
15768
  this.editor.onChange = () => {
@@ -15800,9 +15840,9 @@ class TheQuickInsertComponent {
15800
15840
  }, 100);
15801
15841
  }
15802
15842
  }
15803
- 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 });
15804
- 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: i4.ThyIconComponent, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }] });
15805
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheQuickInsertComponent, decorators: [{
15843
+ 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 });
15844
+ 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"] }] });
15845
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheQuickInsertComponent, decorators: [{
15806
15846
  type: Component,
15807
15847
  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" }]
15808
15848
  }], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { className: [{
@@ -15821,12 +15861,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
15821
15861
  }] } });
15822
15862
 
15823
15863
  class TheEditorComponent extends mixinUnsubscribe(MixinBase) {
15824
- get theGlobalToolbarInstance() {
15825
- return this.theGlobalToolbar ? this.theGlobalToolbar : this.globalToolbarInstance;
15826
- }
15827
- get maxHeight() {
15828
- return this.theOptions?.maxHeight ? `${this.theOptions?.maxHeight}px` : null;
15829
- }
15830
15864
  constructor(theContextService, viewContainerRef, elementRef, ngZone, cdr, iconRegistry) {
15831
15865
  super();
15832
15866
  this.theContextService = theContextService;
@@ -15947,6 +15981,12 @@ class TheEditorComponent extends mixinUnsubscribe(MixinBase) {
15947
15981
  });
15948
15982
  };
15949
15983
  }
15984
+ get theGlobalToolbarInstance() {
15985
+ return this.theGlobalToolbar ? this.theGlobalToolbar : this.globalToolbarInstance;
15986
+ }
15987
+ get maxHeight() {
15988
+ return this.theOptions?.maxHeight ? `${this.theOptions?.maxHeight}px` : null;
15989
+ }
15950
15990
  ngOnInit() {
15951
15991
  this.initialize();
15952
15992
  initializeDefaultMenuIcons(this.iconRegistry);
@@ -16173,8 +16213,8 @@ class TheEditorComponent extends mixinUnsubscribe(MixinBase) {
16173
16213
  };
16174
16214
  }
16175
16215
  }
16176
- 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: i0.NgZone }, { token: i0.ChangeDetectorRef }, { token: i4.ThyIconRegistry }], target: i0.ɵɵFactoryTarget.Component });
16177
- 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: [
16216
+ 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 });
16217
+ 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: [
16178
16218
  TheContextService,
16179
16219
  TheColorSelectService,
16180
16220
  {
@@ -16183,7 +16223,7 @@ TheEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", ver
16183
16223
  multi: true
16184
16224
  }
16185
16225
  ], 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 });
16186
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheEditorComponent, decorators: [{
16226
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheEditorComponent, decorators: [{
16187
16227
  type: Component,
16188
16228
  args: [{ selector: 'the-editor, theEditor', providers: [
16189
16229
  TheContextService,
@@ -16230,10 +16270,10 @@ const ENTRY_COMMON_COMPONENTS = [TheColumnResizeOverlayHandleComponent];
16230
16270
  const DIRECTIVES = [TheColumnResizeDirective];
16231
16271
  class TheColumnResizeCommonModule {
16232
16272
  }
16233
- TheColumnResizeCommonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheColumnResizeCommonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
16234
- TheColumnResizeCommonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.2", ngImport: i0, type: TheColumnResizeCommonModule, declarations: [TheColumnResizeOverlayHandleComponent], exports: [TheColumnResizeOverlayHandleComponent] });
16235
- TheColumnResizeCommonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheColumnResizeCommonModule });
16236
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheColumnResizeCommonModule, decorators: [{
16273
+ TheColumnResizeCommonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheColumnResizeCommonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
16274
+ TheColumnResizeCommonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.0", ngImport: i0, type: TheColumnResizeCommonModule, declarations: [TheColumnResizeOverlayHandleComponent], exports: [TheColumnResizeOverlayHandleComponent] });
16275
+ TheColumnResizeCommonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheColumnResizeCommonModule });
16276
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheColumnResizeCommonModule, decorators: [{
16237
16277
  type: NgModule,
16238
16278
  args: [{
16239
16279
  declarations: ENTRY_COMMON_COMPONENTS,
@@ -16242,10 +16282,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
16242
16282
  }] });
16243
16283
  class TheColumnSizeModule {
16244
16284
  }
16245
- TheColumnSizeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheColumnSizeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
16246
- TheColumnSizeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.2", ngImport: i0, type: TheColumnSizeModule, declarations: [TheColumnResizeDirective], imports: [OverlayModule, TheColumnResizeCommonModule], exports: [TheColumnResizeDirective] });
16247
- TheColumnSizeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheColumnSizeModule, imports: [OverlayModule, TheColumnResizeCommonModule] });
16248
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheColumnSizeModule, decorators: [{
16285
+ TheColumnSizeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheColumnSizeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
16286
+ TheColumnSizeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.0", ngImport: i0, type: TheColumnSizeModule, declarations: [TheColumnResizeDirective], imports: [OverlayModule, TheColumnResizeCommonModule], exports: [TheColumnResizeDirective] });
16287
+ TheColumnSizeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheColumnSizeModule, imports: [OverlayModule, TheColumnResizeCommonModule] });
16288
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheColumnSizeModule, decorators: [{
16249
16289
  type: NgModule,
16250
16290
  args: [{
16251
16291
  imports: [OverlayModule, TheColumnResizeCommonModule],
@@ -16327,8 +16367,8 @@ const PLUGIN_COMPONENTS = [
16327
16367
  const PIPES = [ElementStylePipe, ElementClassPipe, TableFreezeColumnPipe, TableFreezeRowPipe];
16328
16368
  class TheEditorModule {
16329
16369
  }
16330
- TheEditorModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheEditorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
16331
- TheEditorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.2", ngImport: i0, type: TheEditorModule, declarations: [TheEditorComponent, ElementStylePipe, ElementClassPipe, TableFreezeColumnPipe, TableFreezeRowPipe, TheToolbarComponent,
16370
+ TheEditorModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheEditorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
16371
+ TheEditorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.0", ngImport: i0, type: TheEditorModule, declarations: [TheEditorComponent, ElementStylePipe, ElementClassPipe, TableFreezeColumnPipe, TableFreezeRowPipe, TheToolbarComponent,
16332
16372
  TheToolbarDropdownComponent,
16333
16373
  TheToolbarGroupComponent,
16334
16374
  TheToolbarItemComponent,
@@ -16399,14 +16439,14 @@ TheEditorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version
16399
16439
  TheListboxGroupDirective,
16400
16440
  TheListboxDirective,
16401
16441
  ThePreventDefaultDirective] });
16402
- TheEditorModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheEditorModule, providers: [
16442
+ TheEditorModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheEditorModule, providers: [
16403
16443
  {
16404
16444
  provide: TheToolbarGroupToken,
16405
16445
  useValue: TheToolbarGroupComponent
16406
16446
  },
16407
16447
  THE_MODE_PROVIDER
16408
16448
  ], imports: [CommonModule, ScrollingModule, SlateModule, FormsModule, TETHYS, CodemirrorModule, TheColumnSizeModule] });
16409
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheEditorModule, decorators: [{
16449
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheEditorModule, decorators: [{
16410
16450
  type: NgModule,
16411
16451
  args: [{
16412
16452
  declarations: [TheEditorComponent, ...PIPES, ...COMPONENTS, ...PLUGIN_COMPONENTS],
@@ -16471,9 +16511,9 @@ class TheToolbarService {
16471
16511
  });
16472
16512
  }
16473
16513
  }
16474
- TheToolbarService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheToolbarService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
16475
- TheToolbarService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheToolbarService });
16476
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheToolbarService, decorators: [{
16514
+ TheToolbarService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheToolbarService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
16515
+ TheToolbarService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheToolbarService });
16516
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheToolbarService, decorators: [{
16477
16517
  type: Injectable
16478
16518
  }] });
16479
16519