@worktile/theia 15.2.0 → 15.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. package/esm2020/components/action/prevent-default.mjs +3 -3
  2. package/esm2020/components/column-resize/column-resize-notifier.mjs +3 -3
  3. package/esm2020/components/column-resize/column-resize.directive.mjs +8 -4
  4. package/esm2020/components/column-resize/column-resize.module.mjs +8 -8
  5. package/esm2020/components/column-resize/event-dispatcher.mjs +3 -3
  6. package/esm2020/components/column-resize/overlay-handle.component.mjs +3 -3
  7. package/esm2020/components/column-resize/resizing.store.mjs +3 -3
  8. package/esm2020/components/contextmenu/contextmenu.component.mjs +3 -3
  9. package/esm2020/components/conversion-hint/conversion-hint.component.mjs +3 -3
  10. package/esm2020/components/element/element.component.mjs +3 -3
  11. package/esm2020/components/inline-toolbar/inline-toolbar.component.mjs +3 -3
  12. package/esm2020/components/listbox/listbox.mjs +9 -9
  13. package/esm2020/components/plugin-menu/plugin-menu.component.mjs +3 -3
  14. package/esm2020/components/table-select/table-select.component.mjs +3 -3
  15. package/esm2020/components/template/template.component.mjs +3 -3
  16. package/esm2020/components/text/text.component.mjs +3 -3
  17. package/esm2020/components/toolbar/toolbar.component.mjs +3 -3
  18. package/esm2020/components/toolbar-dropdown/toolbar-dropdown.component.mjs +3 -3
  19. package/esm2020/components/toolbar-group/toolbar-group.component.mjs +3 -3
  20. package/esm2020/components/toolbar-item/toolbar-item.component.mjs +3 -3
  21. package/esm2020/core/toolbar-item/base-toolbar-item.mjs +6 -6
  22. package/esm2020/editor.component.mjs +7 -7
  23. package/esm2020/editor.module.mjs +4 -4
  24. package/esm2020/interfaces/view-base.mjs +3 -3
  25. package/esm2020/pipes.mjs +6 -6
  26. package/esm2020/plugins/blockquote/blockquote.component.mjs +3 -3
  27. package/esm2020/plugins/code/code.component.mjs +3 -3
  28. package/esm2020/plugins/code/code.plugin.mjs +14 -2
  29. package/esm2020/plugins/color/toolbar-item.component.mjs +3 -3
  30. package/esm2020/plugins/hr/hr.component.mjs +3 -3
  31. package/esm2020/plugins/image/image.component.mjs +3 -3
  32. package/esm2020/plugins/inline-code/inline-code.component.mjs +3 -3
  33. package/esm2020/plugins/link/edit/link-edit.component.mjs +3 -3
  34. package/esm2020/plugins/link/hover/link-hover.component.mjs +3 -3
  35. package/esm2020/plugins/link/link.component.mjs +6 -6
  36. package/esm2020/plugins/list/components/bulleted-list.component.mjs +3 -3
  37. package/esm2020/plugins/list/components/list-item.component.mjs +3 -3
  38. package/esm2020/plugins/list/components/numbered-list.component.mjs +3 -3
  39. package/esm2020/plugins/mention/suggestion.component.mjs +3 -3
  40. package/esm2020/plugins/quick-insert/components/quick-insert.component.mjs +3 -3
  41. package/esm2020/plugins/table/components/insert-mark/insert-mark.component.mjs +3 -3
  42. package/esm2020/plugins/table/components/row/row.component.mjs +3 -3
  43. package/esm2020/plugins/table/components/table.component.mjs +36 -25
  44. package/esm2020/plugins/table/components/td/td.component.mjs +53 -84
  45. package/esm2020/plugins/table/components/toolbar/table-options.component.mjs +7 -8
  46. package/esm2020/plugins/table/components/toolbar/table-toolbar.component.mjs +6 -6
  47. package/esm2020/plugins/table/table.pipe.mjs +6 -6
  48. package/esm2020/plugins/table/table.service.mjs +57 -10
  49. package/esm2020/plugins/table/table.store.mjs +189 -134
  50. package/esm2020/plugins/table/toolbar-item.component.mjs +3 -3
  51. package/esm2020/plugins/table/utils/cell-position.mjs +31 -10
  52. package/esm2020/plugins/table/utils/get-min-max-cell-index.mjs +9 -11
  53. package/esm2020/plugins/table/utils/get-select-cell-node.mjs +8 -1
  54. package/esm2020/plugins/table/utils/index.mjs +17 -9
  55. package/esm2020/plugins/table/utils/remove-row-column.mjs +47 -0
  56. package/esm2020/plugins/table/utils/set-node-options.mjs +11 -0
  57. package/esm2020/plugins/todo-item/todo-item.component.mjs +3 -3
  58. package/esm2020/plugins/vertical-align/toolbar-item.component.mjs +3 -3
  59. package/esm2020/services/context.service.mjs +3 -3
  60. package/esm2020/services/table-contextmenu.service.mjs +13 -6
  61. package/esm2020/services/toolbar.service.mjs +3 -3
  62. package/esm2020/utils/dom.mjs +2 -2
  63. package/esm2020/utils/index.mjs +2 -1
  64. package/fesm2015/worktile-theia.mjs +1236 -1072
  65. package/fesm2015/worktile-theia.mjs.map +1 -1
  66. package/fesm2020/worktile-theia.mjs +1237 -1079
  67. package/fesm2020/worktile-theia.mjs.map +1 -1
  68. package/package.json +1 -1
  69. package/plugins/table/components/table.component.d.ts +4 -2
  70. package/plugins/table/components/td/td.component.d.ts +5 -8
  71. package/plugins/table/components/toolbar/table-options.component.d.ts +1 -3
  72. package/plugins/table/table.editor.d.ts +1 -4
  73. package/plugins/table/table.service.d.ts +22 -4
  74. package/plugins/table/table.store.d.ts +42 -16
  75. package/plugins/table/utils/cell-position.d.ts +24 -2
  76. package/plugins/table/utils/get-min-max-cell-index.d.ts +6 -1
  77. package/plugins/table/utils/get-select-cell-node.d.ts +1 -0
  78. package/plugins/table/utils/index.d.ts +16 -8
  79. package/plugins/table/utils/remove-row-column.d.ts +6 -0
  80. package/plugins/table/utils/set-node-options.d.ts +3 -0
  81. package/utils/index.d.ts +1 -0
  82. package/esm2020/plugins/table/utils/get-base-height.mjs +0 -22
  83. package/plugins/table/utils/get-base-height.d.ts +0 -9
@@ -9,7 +9,7 @@ import { BaseElementComponent, BaseTextComponent, NODE_TO_PARENT, NODE_TO_INDEX,
9
9
  import { Range, Element as Element$1, Editor, Node, Span, Path, Text, Point, Transforms, Operation, createEditor } from 'slate';
10
10
  import { __rest, __awaiter } from 'tslib';
11
11
  import { map, cloneDeep, assign, defaults, groupBy, uniq, isEqual } from 'lodash';
12
- import { isObject, isArray, isString } from 'ngx-tethys/util';
12
+ import { isObject, isArray, isString, isUndefined } from 'ngx-tethys/util';
13
13
  import { TheiaConverter } from '@atinc/selene';
14
14
  import { HistoryEditor, withHistory } from 'slate-history';
15
15
  import * as i1$1 from 'ngx-tethys/popover';
@@ -62,8 +62,8 @@ import * as i6$2 from 'ngx-tethys/button';
62
62
  import { ThyButtonModule } from 'ngx-tethys/button';
63
63
  import * as i7$1 from 'ngx-tethys/input-number';
64
64
  import { ThyInputNumberModule } from 'ngx-tethys/input-number';
65
- import { coerceCssPixelValue } from '@angular/cdk/coercion';
66
65
  import { PortalInjector, ComponentPortal } from '@angular/cdk/portal';
66
+ import { coerceCssPixelValue } from '@angular/cdk/coercion';
67
67
  import { ScrollingModule } from '@angular/cdk/scrolling';
68
68
  import { ThyAutocompleteModule } from 'ngx-tethys/autocomplete';
69
69
  import { ThyAvatarModule } from 'ngx-tethys/avatar';
@@ -101,9 +101,9 @@ class TheBaseElementComponent extends BaseElementComponent {
101
101
  this.nativeElement.classList.add(`slate-element-${this.element.type}`, blockClass);
102
102
  }
103
103
  }
104
- TheBaseElementComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheBaseElementComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
105
- TheBaseElementComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.2", type: TheBaseElementComponent, selector: "TheBaseElementComponent", usesInheritance: true, ngImport: i0, template: '', isInline: true });
106
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheBaseElementComponent, decorators: [{
104
+ TheBaseElementComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TheBaseElementComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
105
+ TheBaseElementComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: TheBaseElementComponent, selector: "TheBaseElementComponent", usesInheritance: true, ngImport: i0, template: '', isInline: true });
106
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TheBaseElementComponent, decorators: [{
107
107
  type: Component,
108
108
  args: [{
109
109
  selector: 'TheBaseElementComponent',
@@ -117,9 +117,9 @@ class TheDefaultElementComponent extends TheBaseElementComponent {
117
117
  return (_a = this.element) === null || _a === void 0 ? void 0 : _a.indent;
118
118
  }
119
119
  }
120
- TheDefaultElementComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheDefaultElementComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
121
- 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 });
122
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheDefaultElementComponent, decorators: [{
120
+ TheDefaultElementComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TheDefaultElementComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
121
+ TheDefaultElementComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", 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 });
122
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TheDefaultElementComponent, decorators: [{
123
123
  type: Component,
124
124
  args: [{
125
125
  selector: '[theDefaultElement]',
@@ -763,9 +763,9 @@ class ElementStylePipe {
763
763
  return style;
764
764
  }
765
765
  }
766
- ElementStylePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: ElementStylePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
767
- ElementStylePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.2", ngImport: i0, type: ElementStylePipe, name: "elementStyle" });
768
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: ElementStylePipe, decorators: [{
766
+ ElementStylePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ElementStylePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
767
+ ElementStylePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: ElementStylePipe, name: "elementStyle" });
768
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ElementStylePipe, decorators: [{
769
769
  type: Pipe,
770
770
  args: [{
771
771
  name: 'elementStyle'
@@ -781,9 +781,9 @@ class ElementClassPipe {
781
781
  return classStr;
782
782
  }
783
783
  }
784
- ElementClassPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: ElementClassPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
785
- ElementClassPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.2", ngImport: i0, type: ElementClassPipe, name: "elementClass" });
786
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: ElementClassPipe, decorators: [{
784
+ ElementClassPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ElementClassPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
785
+ ElementClassPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: ElementClassPipe, name: "elementClass" });
786
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ElementClassPipe, decorators: [{
787
787
  type: Pipe,
788
788
  args: [{
789
789
  name: 'elementClass'
@@ -818,9 +818,9 @@ class TheTemplateComponent {
818
818
  };
819
819
  }
820
820
  }
821
- TheTemplateComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheTemplateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
822
- 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 });
823
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheTemplateComponent, decorators: [{
821
+ TheTemplateComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TheTemplateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
822
+ TheTemplateComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", 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 });
823
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TheTemplateComponent, decorators: [{
824
824
  type: Component,
825
825
  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" }]
826
826
  }], propDecorators: { paragraphTemplate: [{
@@ -886,9 +886,9 @@ class TheTextComponent extends BaseTextComponent {
886
886
  this.applyTextMark();
887
887
  }
888
888
  }
889
- 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 });
890
- 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"] }] });
891
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheTextComponent, decorators: [{
889
+ TheTextComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TheTextComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
890
+ TheTextComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", 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"] }] });
891
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TheTextComponent, decorators: [{
892
892
  type: Component,
893
893
  args: [{
894
894
  selector: 'span[theText]',
@@ -2173,7 +2173,7 @@ function getElementWidth(element) {
2173
2173
  return coercePixelsFromCssValue(element.style.width) || element.getBoundingClientRect().width;
2174
2174
  }
2175
2175
  function getElementHeight(element) {
2176
- return element.getBoundingClientRect().height;
2176
+ return coercePixelsFromCssValue(element.style.height) || element.getBoundingClientRect().height;
2177
2177
  }
2178
2178
  function getColsTotalWidth(cols) {
2179
2179
  return cols.reduce((total, col) => {
@@ -2419,6 +2419,21 @@ function insertDataByInvalidType(editor, fragment) {
2419
2419
  return true;
2420
2420
  }
2421
2421
 
2422
+ const isColorPanel = (element) => {
2423
+ const pickerPanel = element.closest('.thy-color-picker-panel');
2424
+ const customPickerPanel = element.closest('.thy-color-picker-custom-panel');
2425
+ if (pickerPanel || customPickerPanel) {
2426
+ return true;
2427
+ }
2428
+ return false;
2429
+ };
2430
+ const isColorIndicator = (element) => {
2431
+ return element.closest('.indicator-hue-alp');
2432
+ };
2433
+ const isColorInput = (element) => {
2434
+ return element.closest('.thy-color-inputs');
2435
+ };
2436
+
2422
2437
  const toolbarInitialize = (toolbarItems, global = DefaultGlobalToolbarDefinition, inline = DefaultInlineToolbarDefinition) => {
2423
2438
  const toolbarDefinition = {
2424
2439
  global,
@@ -2633,9 +2648,9 @@ class TheBaseToolbarItem {
2633
2648
  }
2634
2649
  }
2635
2650
  }
2636
- TheBaseToolbarItem.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheBaseToolbarItem, deps: [], target: i0.ɵɵFactoryTarget.Directive });
2637
- 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 });
2638
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheBaseToolbarItem, decorators: [{
2651
+ TheBaseToolbarItem.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TheBaseToolbarItem, deps: [], target: i0.ɵɵFactoryTarget.Directive });
2652
+ TheBaseToolbarItem.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: TheBaseToolbarItem, inputs: { toolbarItem: "toolbarItem", editor: "editor", itemMousedownHandle: "itemMousedownHandle" }, host: { properties: { "class.disabled": "this.disabledState", "class.active": "this.activeState" } }, ngImport: i0 });
2653
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TheBaseToolbarItem, decorators: [{
2639
2654
  type: Directive
2640
2655
  }], propDecorators: { toolbarItem: [{
2641
2656
  type: Input
@@ -2671,9 +2686,9 @@ class TheBaseToolbarDropdown extends TheBaseToolbarItem {
2671
2686
  }
2672
2687
  }
2673
2688
  }
2674
- TheBaseToolbarDropdown.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheBaseToolbarDropdown, deps: null, target: i0.ɵɵFactoryTarget.Directive });
2675
- 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 });
2676
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheBaseToolbarDropdown, decorators: [{
2689
+ TheBaseToolbarDropdown.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TheBaseToolbarDropdown, deps: null, target: i0.ɵɵFactoryTarget.Directive });
2690
+ TheBaseToolbarDropdown.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: TheBaseToolbarDropdown, inputs: { menus: "menus", mode: "mode", dropdownItemKey: "dropdownItemKey" }, usesInheritance: true, ngImport: i0 });
2691
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TheBaseToolbarDropdown, decorators: [{
2677
2692
  type: Directive
2678
2693
  }], propDecorators: { menus: [{
2679
2694
  type: Input
@@ -2798,9 +2813,9 @@ class TheToolbarDropdownComponent extends TheBaseToolbarDropdown {
2798
2813
  .withPositions([bottomPosition, topPosition]);
2799
2814
  }
2800
2815
  }
2801
- 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 });
2802
- 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"] }] });
2803
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheToolbarDropdownComponent, decorators: [{
2816
+ TheToolbarDropdownComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TheToolbarDropdownComponent, deps: [{ token: i0.ElementRef }, { token: i1$1.ThyPopover }, { token: i0.ViewContainerRef }, { token: i2$1.Overlay }], target: i0.ɵɵFactoryTarget.Component });
2817
+ TheToolbarDropdownComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", 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"] }] });
2818
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TheToolbarDropdownComponent, decorators: [{
2804
2819
  type: Component,
2805
2820
  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" }]
2806
2821
  }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1$1.ThyPopover }, { type: i0.ViewContainerRef }, { type: i2$1.Overlay }]; }, propDecorators: { className: [{
@@ -2842,8 +2857,8 @@ class TheToolbarItemComponent extends TheBaseToolbarItem {
2842
2857
  (_d = this.toolbarItem) === null || _d === void 0 ? void 0 : _d.execute(this.editor);
2843
2858
  }
2844
2859
  }
2845
- TheToolbarItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheToolbarItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2846
- 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: `
2860
+ TheToolbarItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TheToolbarItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2861
+ TheToolbarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: TheToolbarItemComponent, selector: "the-toolbar-item", host: { listeners: { "mousedown": "toggleDropdown($event)" }, properties: { "class": "this.className" } }, usesInheritance: true, ngImport: i0, template: `
2847
2862
  <a
2848
2863
  href="javascript:;"
2849
2864
  thyAction
@@ -2857,7 +2872,7 @@ TheToolbarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0"
2857
2872
  ></a>
2858
2873
  <ng-template #tooltip let-data> {{ data?.name }} {{ data?.shortcutKey }} </ng-template>
2859
2874
  `, 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"] }] });
2860
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheToolbarItemComponent, decorators: [{
2875
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TheToolbarItemComponent, decorators: [{
2861
2876
  type: Component,
2862
2877
  args: [{
2863
2878
  selector: 'the-toolbar-item',
@@ -3111,9 +3126,9 @@ class TheToolbarComponent {
3111
3126
  return TheToolbarItemComponent;
3112
3127
  }
3113
3128
  }
3114
- 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 });
3115
- 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"] }] });
3116
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheToolbarComponent, decorators: [{
3129
+ TheToolbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TheToolbarComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i0.NgZone }, { token: TheToolbarGroupToken }], target: i0.ɵɵFactoryTarget.Component });
3130
+ TheToolbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", 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"] }] });
3131
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TheToolbarComponent, decorators: [{
3117
3132
  type: Component,
3118
3133
  args: [{ selector: 'the-toolbar', host: {
3119
3134
  class: 'the-toolbar-container d-flex align-items-center'
@@ -3271,9 +3286,9 @@ class TheContextService {
3271
3286
  this.destroy$.complete();
3272
3287
  }
3273
3288
  }
3274
- TheContextService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheContextService, deps: [{ token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });
3275
- TheContextService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheContextService });
3276
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheContextService, decorators: [{
3289
+ TheContextService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TheContextService, deps: [{ token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });
3290
+ TheContextService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TheContextService });
3291
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TheContextService, decorators: [{
3277
3292
  type: Injectable
3278
3293
  }], ctorParameters: function () { return [{ type: i0.NgZone }]; } });
3279
3294
 
@@ -3767,263 +3782,594 @@ function isInside(cellRect, rowIndex, columnIndex) {
3767
3782
  return false;
3768
3783
  }
3769
3784
 
3770
- const setMarks = (editor, marks, at) => {
3771
- Transforms.setNodes(editor, marks, {
3772
- at,
3773
- match: Text.isText,
3774
- split: true
3785
+ function isVirtualKey(e) {
3786
+ const isMod = e.ctrlKey || e.metaKey;
3787
+ const isAlt = isKeyHotkey('alt', e);
3788
+ const isShift = isKeyHotkey('shift', e);
3789
+ const isCapsLock = e.key.includes('CapsLock');
3790
+ const isTab = e.key.includes('Tab');
3791
+ const isEsc = e.key.includes('Escape');
3792
+ const isF = e.key.startsWith('F');
3793
+ const isArrow = e.key.includes('Arrow') ? true : false;
3794
+ return isCapsLock || isMod || isAlt || isArrow || isShift || isTab || isEsc || isF;
3795
+ }
3796
+
3797
+ /**
3798
+ * 获取标题行网格列宽值
3799
+ * @param editor
3800
+ * @param headerRow 标题行
3801
+ * @param cellsWidth
3802
+ * @returns string
3803
+ */
3804
+ const getGridColumns = (headerRow, cellsWidth) => {
3805
+ let result = '';
3806
+ Array.from(headerRow.childNodes)
3807
+ .filter((n) => n.nodeType === 1)
3808
+ .forEach((node, i) => {
3809
+ var _a;
3810
+ const col = node.getAttribute('colspan');
3811
+ const display = node.style.display;
3812
+ if (display === 'none') {
3813
+ return;
3814
+ }
3815
+ if (col) {
3816
+ const colSpan = (_a = Number(col)) !== null && _a !== void 0 ? _a : 1;
3817
+ let width = 0;
3818
+ Array.from({ length: colSpan }, (_, j) => {
3819
+ width += cellsWidth[i + j];
3820
+ });
3821
+ result += width + 'px ';
3822
+ }
3823
+ else {
3824
+ result += cellsWidth[i] + 'px ';
3825
+ }
3775
3826
  });
3827
+ return result;
3776
3828
  };
3777
-
3778
- const clearMarks = (editor) => {
3779
- const { selection } = editor;
3780
- if (!selection) {
3781
- return;
3782
- }
3783
- if (Range.isCollapsed(selection)) {
3784
- const marks = Editor.marks(editor);
3785
- for (const key in marks) {
3786
- Editor.removeMark(editor, key);
3829
+ const getColumnsWidth = (cellRow, isColgroup = false) => {
3830
+ const result = [];
3831
+ Array.from(cellRow.childNodes)
3832
+ .filter((n) => n.nodeType === 1)
3833
+ .forEach((item) => {
3834
+ if (isColgroup && IS_SAFARI) {
3835
+ result.push(item.offsetWidth);
3836
+ return;
3787
3837
  }
3788
- }
3789
- else {
3790
- const unsetMarks = {};
3791
- MarkProps.forEach(key => {
3792
- unsetMarks[key] = null;
3793
- });
3794
- setMarks(editor, unsetMarks);
3795
- }
3838
+ if (item.getBoundingClientRect) {
3839
+ result.push(item.getBoundingClientRect().width);
3840
+ }
3841
+ });
3842
+ return result;
3796
3843
  };
3797
-
3798
- const insertElements = (editor, elements) => {
3799
- var _a;
3800
- if (!editor.selection) {
3801
- refocus(editor);
3802
- }
3803
- if (Range.isExpanded(editor.selection)) {
3804
- Editor.deleteFragment(editor);
3805
- }
3806
- const type = !isArray(elements) ? elements.type : elements[0].type; // 后期处理复制粘贴需要修改
3807
- const allowParentTypes = ((_a = getPluginOptions(editor, type)) === null || _a === void 0 ? void 0 : _a.allowParentTypes) || [];
3808
- const insertNodePath = getInsertElementsPath(editor, allowParentTypes);
3809
- const [anchorBlock, anchorBlockPath] = anchorBlockEntry(editor);
3810
- let isEmpty = Editor.isEmpty(editor, anchorBlock);
3811
- if (insertNodePath) {
3812
- Editor.withoutNormalizing(editor, () => {
3813
- Transforms.insertNodes(editor, elements, { at: insertNodePath });
3814
- Transforms.select(editor, Editor.start(editor, insertNodePath));
3815
- if (isEmpty) {
3816
- Transforms.removeNodes(editor, { at: anchorBlockPath });
3817
- }
3818
- });
3819
- return;
3820
- }
3821
- const nextPath = Path.next([anchorBlockPath[0]]);
3822
- Transforms.insertNodes(editor, elements, { at: nextPath });
3823
- if (isEmpty && anchorBlockPath.length === 1) {
3824
- Transforms.delete(editor, { at: anchorBlockPath });
3825
- Transforms.select(editor, Editor.start(editor, anchorBlockPath));
3844
+ /**
3845
+ * 计算表格列宽
3846
+ * @param isReadonly
3847
+ * @param element
3848
+ * @param tableWidth
3849
+ * @param mode
3850
+ * @returns number[]
3851
+ */
3852
+ const calcColumnGroups = (isReadonly, element, tableWidth, mode) => {
3853
+ const columns = element === null || element === void 0 ? void 0 : element.columns;
3854
+ if (isReadonly) {
3855
+ if (columns) {
3856
+ const opts = new TableOptions();
3857
+ const isPrint = mode === TheMode.print;
3858
+ const newColumns = isPrint
3859
+ ? calcPrintColumnWidth(element, opts.minWidthPx)
3860
+ : calcColumnWidth(element, tableWidth, opts.minWidthPx);
3861
+ return newColumns;
3862
+ }
3863
+ return [];
3826
3864
  }
3827
3865
  else {
3828
- Transforms.select(editor, Editor.start(editor, nextPath));
3866
+ return columns;
3829
3867
  }
3830
3868
  };
3831
-
3832
- const setNode = (editor, props, origin) => {
3833
- Transforms.setNodes(editor, props, { at: findPath(editor, origin) });
3869
+ /**
3870
+ * 计算表格列宽
3871
+ * @param element
3872
+ * @param tableWidth
3873
+ * @param minWidthPx
3874
+ * @returns number[]
3875
+ */
3876
+ const calcColumnWidth = (element, tableWidth, minWidthPx) => {
3877
+ var _a;
3878
+ const columns = element === null || element === void 0 ? void 0 : element.columns;
3879
+ const numberedColumnWidth = ((_a = element === null || element === void 0 ? void 0 : element.options) === null || _a === void 0 ? void 0 : _a.numberedColumn) ? TABLE_NUMBER_COLUMN : 0;
3880
+ const columnsWidth = columns.reduce((a, b) => a + b.width, 0);
3881
+ // 总列宽大于当前表格宽度时,按照设置时的总列宽计算
3882
+ const columnTotalWidth = Math.max(columnsWidth, tableWidth - numberedColumnWidth);
3883
+ return columns.map(column => {
3884
+ const cellWidth = (column.width / columnsWidth) * columnTotalWidth;
3885
+ return { width: Math.max(cellWidth, minWidthPx) };
3886
+ });
3834
3887
  };
3835
-
3836
3888
  /**
3837
- * Unwrap nodes by type
3889
+ * 打印模式下,按照原宽度比例基于当前表格宽度计算列宽
3890
+ * 1. 所有列的最小列宽总和大于表格宽度时,所有列返回最小宽度
3891
+ * @param element
3892
+ * @param minWidthPx
3893
+ * @returns number[]
3838
3894
  */
3839
- const unwrapNodesByType = (editor, types, options = {}) => {
3840
- if (!Array.isArray(types)) {
3841
- types = [types];
3895
+ const calcPrintColumnWidth = (element, minWidthPx) => {
3896
+ var _a;
3897
+ const columns = element === null || element === void 0 ? void 0 : element.columns;
3898
+ const numberedColumnWidth = ((_a = element === null || element === void 0 ? void 0 : element.options) === null || _a === void 0 ? void 0 : _a.numberedColumn) ? TABLE_NUMBER_COLUMN : 0;
3899
+ // 按照 DPI 96 的 A4 纸宽度是 794, 打印时左右 80px 的边距,所以这里取 794 - 80 * 2 = 634
3900
+ // 如果存在序号列,还需要在 634 基础上减去序号列的宽度,剩下的才是内容区域的宽度
3901
+ let columnTotalWidth = 634 - numberedColumnWidth;
3902
+ const columnsWidth = columns.reduce((a, b) => a + b.width, 0);
3903
+ // 计算所有列的 minWidth 总和
3904
+ const totalMinWidth = minWidthPx * columns.length;
3905
+ if (totalMinWidth > columnTotalWidth) {
3906
+ // 如果所有列的 minWidth 总和大于 columnTotalWidth,所有列返回最小宽度
3907
+ return columns.map(() => ({ width: minWidthPx }));
3842
3908
  }
3843
- Transforms.unwrapNodes(editor, Object.assign({ match: n => Element$1.isElement(n) && types.includes(n.type) }, options));
3909
+ // 在剩余的宽度中按比例分配
3910
+ const remainingWidth = columnTotalWidth - totalMinWidth;
3911
+ const remainingWidthRatio = columns.map(column => column.width / columnsWidth);
3912
+ // 为什么减 1, 因为这个宽度是内容区域宽度,但 td 右侧还有一个边框,所以减去 1
3913
+ let newColumnsWidth = remainingWidthRatio.map(ratio => minWidthPx + Math.floor(ratio * remainingWidth) - 1);
3914
+ return columns.map((_, index) => ({
3915
+ width: newColumnsWidth[index]
3916
+ }));
3844
3917
  };
3845
3918
 
3846
- const onKeyDownResetBlockType = ({ rules }) => (event, editor) => {
3847
- let reset;
3848
- if (editor.selection && isCollapsed(editor.selection)) {
3849
- rules.forEach(({ types, defaultType, hotkey, predicate, onReset }) => {
3850
- if (!event || (hotkey && isKeyHotkey(hotkey, event))) {
3851
- if (predicate(editor) && isNodeTypeIn(editor, types)) {
3852
- if (event !== null) {
3853
- event.preventDefault();
3854
- }
3855
- Transforms.setNodes(editor, { type: defaultType });
3856
- onReset(editor);
3857
- reset = true;
3858
- }
3859
- }
3860
- });
3919
+ /* cell-position 有关的函数 */
3920
+ /**
3921
+ * 判断是否选中了所有的单元格
3922
+ * @param editor 编辑器对象
3923
+ * @param selectedCellPositions 选中的单元格位置数组
3924
+ * @returns 是否选中了所有的单元格
3925
+ */
3926
+ const isSelectedAllCell = (editor, selectedCellPositions) => {
3927
+ if (!AngularEditor.isFocused(editor)) {
3928
+ return false;
3861
3929
  }
3862
- return reset;
3930
+ const pos = createTablePosition(editor);
3931
+ return !!selectedCellPositions.length && pos.getHeight() * pos.getWidth() === selectedCellPositions.length;
3863
3932
  };
3864
-
3865
3933
  /**
3866
- * 将节点的子级移动到路径。 返回移动的子级数。
3934
+ * 获取选中的单元格位置数组
3935
+ * @param editor 编辑器对象
3936
+ * @param selectedCells 选中的单元格
3937
+ * @returns 选中的单元格位置
3867
3938
  */
3868
- const moveChildren = (editor, { at, to, match, start = 0 }) => {
3869
- let moved = 0;
3870
- const parentPath = Path.isPath(at) ? at : at[1];
3871
- const parentNode = Path.isPath(at) ? Node.get(editor, parentPath) : at[0];
3872
- if (!Editor.isBlock(editor, parentNode))
3873
- return moved;
3874
- for (let i = parentNode.children.length - 1; i >= start; i--) {
3875
- const childPath = [...parentPath, i];
3876
- const childNode = getNode(editor, childPath);
3877
- if (!match || (childNode && match([childNode, childPath]))) {
3878
- Transforms.moveNodes(editor, { at: childPath, to });
3879
- moved++;
3939
+ const getSelectedCellPositions = (editor, selectedCells) => {
3940
+ return selectedCells === null || selectedCells === void 0 ? void 0 : selectedCells.map((cell) => {
3941
+ const path = AngularEditor.findPath(editor, cell);
3942
+ const [row, col] = path.slice(-2);
3943
+ return { row, col };
3944
+ });
3945
+ };
3946
+ /**
3947
+ * 获取一定范围内所有的单元格位置
3948
+ * @param startRow 起始行
3949
+ * @param startCol 起始列
3950
+ * @param endRow 结束行
3951
+ * @param endCol 结束列
3952
+ * @returns 单元格位置
3953
+ */
3954
+ const getCellPositionsFromRange = (startRow, startCol, endRow, endCol) => {
3955
+ const positions = [];
3956
+ for (let row = startRow; row < endRow; row++) {
3957
+ for (let col = startCol; col < endCol; col++) {
3958
+ positions.push({ row, col });
3880
3959
  }
3881
3960
  }
3882
- return moved;
3883
- };
3884
-
3885
- const insertParagraph = (editor, at) => {
3886
- Transforms.insertNodes(editor, createEmptyParagraph(), { at });
3961
+ return positions;
3887
3962
  };
3888
-
3889
3963
  /**
3890
- * Recursively apply an operation to children nodes with a query.
3964
+ * 过滤重复的单元格位置
3965
+ * @param cells 单元格数组
3966
+ * @param selectedCellPositions 选中的单元格位置数组
3967
+ * @returns 过滤后的单元格位置数组
3891
3968
  */
3892
- const applyDeepToNodes = ({ node, source, apply, query }) => {
3893
- const entry = [node, []];
3894
- if (isNodeType(entry, query)) {
3895
- if (source instanceof Function) {
3896
- apply(node, source());
3969
+ const uniqueCellPosition = (cells, selectedCellPositions) => {
3970
+ const positions = [];
3971
+ const modCells = new Set();
3972
+ cells.concat(selectedCellPositions).forEach(cell => modCells.add(JSON.stringify(cell)));
3973
+ modCells.forEach((cell) => positions.push(JSON.parse(cell)));
3974
+ return positions;
3975
+ };
3976
+
3977
+ /**
3978
+ * 计算最小行跨距单元格
3979
+ * @param element TableElement
3980
+ * @returns
3981
+ */
3982
+ const calculateMinRowSpanCellForRows = (element) => {
3983
+ const cells = element.children.map((row, index) => {
3984
+ const noHiddenCells = row.children.filter(cell => !cell.hidden);
3985
+ if (noHiddenCells.length > 0) {
3986
+ const minRowspan = Math.min.apply(Math, noHiddenCells.map(cell => {
3987
+ return cell.rowspan || 1;
3988
+ }));
3989
+ const cell = row.children.find(item => !item.hidden && (item.rowspan || 1) === minRowspan);
3990
+ return {
3991
+ cell,
3992
+ rowIndex: index
3993
+ };
3897
3994
  }
3898
3995
  else {
3899
- apply(node, source);
3996
+ return {
3997
+ rowIndex: index
3998
+ };
3900
3999
  }
3901
- }
3902
- if (!isAncestor(node)) {
3903
- return;
3904
- }
3905
- node.children.forEach((child) => {
3906
- applyDeepToNodes({ node: child, source, apply, query });
3907
4000
  });
4001
+ return cells;
3908
4002
  };
3909
-
3910
4003
  /**
3911
- * Recursively merge a source object to children nodes with a query.
4004
+ * 计算行控件的平均高度
4005
+ * @param previousCombineRowIndex
4006
+ * @param previousRowIndex
4007
+ * @param rowControls
3912
4008
  */
3913
- const mergeDeepToNodes = (options) => {
3914
- applyDeepToNodes(Object.assign(Object.assign({}, options), { apply: defaults }));
3915
- };
3916
-
3917
- const unWrap = (editor, kind) => {
3918
- Editor.withoutNormalizing(editor, () => {
3919
- Transforms.setNodes(editor, { type: ElementKinds.paragraph });
3920
- Transforms.unwrapNodes(editor, {
3921
- match: n => Element$1.isElement(n) && n.type === kind,
3922
- split: true
3923
- });
4009
+ const calculateRowControlsAvgHeight = (previousCombineRowIndex, previousRowIndex, rowControls) => {
4010
+ const rowControl = rowControls[previousRowIndex];
4011
+ const count = previousCombineRowIndex - previousRowIndex;
4012
+ const avgHeight = Math.floor(rowControl.height / (count + 1));
4013
+ const firstHeight = rowControl.height - avgHeight * count;
4014
+ rowControl.height = firstHeight;
4015
+ rowControls
4016
+ .filter((_, index) => index > previousRowIndex && index <= previousCombineRowIndex)
4017
+ .forEach(rowControl => {
4018
+ rowControl.height = avgHeight;
3924
4019
  });
3925
4020
  };
3926
-
3927
- const deleteElement = (editor, element) => {
3928
- const at = findPath(editor, element);
3929
- Transforms.insertNodes(editor, createEmptyParagraph(), { at });
3930
- AngularEditor.focus(editor);
3931
- Transforms.select(editor, at);
3932
- Transforms.removeNodes(editor, { at: Path.next(at) });
4021
+ const getBelowRowHeight = (editor, cells, index, rowIndex, rowspan) => {
4022
+ let belowRowlHeight = 0;
4023
+ cells.slice(index + 1, cells.length).map(item => {
4024
+ if (!item.cell) {
4025
+ return;
4026
+ }
4027
+ if (rowIndex + rowspan > item.rowIndex) {
4028
+ const cellDom = AngularEditor.toDOMNode(editor, item.cell);
4029
+ if (item.cell.rowspan > 1) {
4030
+ // 如果下方单元格的rowspan > 1,递归计算
4031
+ const height = getBelowRowHeight(editor, cells, cells.findIndex(cell => cell.rowIndex === item.rowIndex), item.rowIndex, item.cell.rowspan);
4032
+ belowRowlHeight += getElementHeight(cellDom) - height;
4033
+ }
4034
+ else {
4035
+ belowRowlHeight += getElementHeight(cellDom);
4036
+ }
4037
+ }
4038
+ });
4039
+ return belowRowlHeight;
3933
4040
  };
3934
-
3935
- const setEndSelection = (editor) => {
3936
- const lastNode = getLastNode(editor, 1);
3937
- const end = Editor.end(editor, lastNode[1]);
3938
- Transforms.select(editor, end);
3939
- AngularEditor.focus(editor);
4041
+ const calculateRowControls = (editor, element) => {
4042
+ const minRowSpanCellForRows = calculateMinRowSpanCellForRows(element);
4043
+ const rowControls = [];
4044
+ let previousRowIndex = 0;
4045
+ let previousCombineRowIndex = 0;
4046
+ minRowSpanCellForRows.forEach((cellInfo, index) => {
4047
+ if (!cellInfo.cell) {
4048
+ rowControls.push({
4049
+ height: 0,
4050
+ rowIndex: index
4051
+ });
4052
+ previousCombineRowIndex = index;
4053
+ if (index === minRowSpanCellForRows.length - 1) {
4054
+ calculateRowControlsAvgHeight(previousCombineRowIndex, previousRowIndex, rowControls);
4055
+ }
4056
+ return;
4057
+ }
4058
+ // calculate combine row height
4059
+ if (previousCombineRowIndex > previousRowIndex) {
4060
+ calculateRowControlsAvgHeight(previousCombineRowIndex, previousRowIndex, rowControls);
4061
+ previousCombineRowIndex = 0;
4062
+ }
4063
+ const cellDom = AngularEditor.toDOMNode(editor, cellInfo.cell);
4064
+ let height = getElementHeight(cellDom);
4065
+ // 当cell为合并的单元格(rowspan > 1),计算其实际高度(当前单元格的高度 - 下方合并单元格的高度)
4066
+ if (cellInfo.cell.rowspan > 1) {
4067
+ const calcHeight = height - getBelowRowHeight(editor, minRowSpanCellForRows, index, cellInfo.rowIndex, cellInfo.cell.rowspan);
4068
+ rowControls.push({
4069
+ height: calcHeight,
4070
+ rowIndex: cellInfo.rowIndex
4071
+ });
4072
+ }
4073
+ else {
4074
+ rowControls.push({
4075
+ height,
4076
+ rowIndex: cellInfo.rowIndex
4077
+ });
4078
+ }
4079
+ previousRowIndex = index;
4080
+ });
4081
+ return rowControls;
3940
4082
  };
3941
4083
 
3942
- const closeConversionHint = (editor) => {
3943
- const hintRef = THE_EDITOR_CONVERSION_HINT_REF.get(editor);
3944
- if (hintRef) {
3945
- hintRef.close();
4084
+ /**
4085
+ * compatible with old data
4086
+ * @returns
4087
+ */
4088
+ function isHeaderRow(element) {
4089
+ var _a;
4090
+ if ((_a = element === null || element === void 0 ? void 0 : element.options) === null || _a === void 0 ? void 0 : _a.headerRow) {
4091
+ return true;
3946
4092
  }
3947
- };
3948
-
3949
- function handleContinualDeleteBackward(editor, aboveResult, type) {
3950
- const highestBlock = aboveResult[0];
3951
- const lowestBlock = anchorBlock(editor);
3952
- const wrapBlockType = highestBlock.type;
3953
- if (lowestBlock && Editor.isStart(editor, editor.selection.anchor, aboveResult[1])) {
3954
- if (wrapBlockType === type) {
3955
- if (highestBlock.children[0] === lowestBlock) {
3956
- unWrap(editor, wrapBlockType);
3957
- return true;
3958
- }
3959
- }
4093
+ // compat old data
4094
+ if (element === null || element === void 0 ? void 0 : element.children[0].header) {
4095
+ return true;
3960
4096
  }
3961
- return false;
3962
4097
  }
3963
4098
 
3964
- function handleContinualInsertBreak(editor, lowestBlock, type) {
3965
- const isEmpty = Editor.isEmpty(editor, lowestBlock);
3966
- const isEnd = Editor.isEnd(editor, editor.selection.anchor, editor.selection.focus.path);
3967
- const aboveResult = Editor.above(editor, {
3968
- match: n => Editor.isBlock(editor, n) && n.type === type
3969
- });
3970
- if (aboveResult && aboveResult[0] && isEnd && isEmpty) {
3971
- const wrapBlock = aboveResult[0];
3972
- if (wrapBlock.type === type) {
3973
- if (wrapBlock.children[wrapBlock.children.length - 1] === lowestBlock) {
3974
- unWrap(editor, wrapBlock.type);
3975
- return true;
3976
- }
4099
+ function getSelectCellNode(editor, selectedCells) {
4100
+ const pos = createTablePosition(editor);
4101
+ return selectedCells
4102
+ .map(item => {
4103
+ const node = pos.findCellByPath(item);
4104
+ if (node) {
4105
+ return Object.assign(Object.assign({}, item), { node: node });
3977
4106
  }
3978
- }
3979
- return false;
4107
+ })
4108
+ .filter(item => item);
4109
+ }
4110
+ function focusCell(editor, path) {
4111
+ const at = Editor.start(editor, path);
4112
+ TheEditor.focus(editor);
4113
+ Transforms.select(editor, at);
3980
4114
  }
3981
4115
 
3982
- var index = /*#__PURE__*/Object.freeze({
3983
- __proto__: null,
3984
- applyDeepToNodes: applyDeepToNodes,
3985
- clearMarks: clearMarks,
3986
- closeConversionHint: closeConversionHint,
3987
- deleteElement: deleteElement,
3988
- handleContinualDeleteBackward: handleContinualDeleteBackward,
3989
- handleContinualInsertBreak: handleContinualInsertBreak,
3990
- insertElements: insertElements,
3991
- insertParagraph: insertParagraph,
3992
- mergeDeepToNodes: mergeDeepToNodes,
3993
- moveChildren: moveChildren,
3994
- onKeyDownResetBlockType: onKeyDownResetBlockType,
3995
- setEndSelection: setEndSelection,
3996
- setMarks: setMarks,
3997
- setNode: setNode,
3998
- unWrap: unWrap,
3999
- unwrapNodesByType: unwrapNodesByType
4000
- });
4116
+ const setMarks = (editor, marks, at) => {
4117
+ Transforms.setNodes(editor, marks, {
4118
+ at,
4119
+ match: Text.isText,
4120
+ split: true
4121
+ });
4122
+ };
4001
4123
 
4002
- /**
4003
- * Insert a new table
4004
- */
4005
- function insertTable(opts, editor, rows = 3, columns = 3, getCellContent) {
4124
+ const clearMarks = (editor) => {
4006
4125
  const { selection } = editor;
4007
- if (!(selection === null || selection === void 0 ? void 0 : selection.anchor)) {
4126
+ if (!selection) {
4008
4127
  return;
4009
4128
  }
4010
- // Create the table node
4011
- const table = createTable(opts, columns, rows, getCellContent);
4012
- insertElements(editor, table);
4013
- }
4129
+ if (Range.isCollapsed(selection)) {
4130
+ const marks = Editor.marks(editor);
4131
+ for (const key in marks) {
4132
+ Editor.removeMark(editor, key);
4133
+ }
4134
+ }
4135
+ else {
4136
+ const unsetMarks = {};
4137
+ MarkProps.forEach(key => {
4138
+ unsetMarks[key] = null;
4139
+ });
4140
+ setMarks(editor, unsetMarks);
4141
+ }
4142
+ };
4014
4143
 
4015
- function getInsertRowState(opts, editor, count = 1, at) {
4016
- const tablePosition = createTablePosition(editor);
4017
- let table = tablePosition.table;
4018
- let tableEntry = tablePosition.tableEntry;
4019
- // Create a new row with the right count of cells
4020
- const columns = table.children[0].children.length;
4021
- const rowIndex = tablePosition.getRowIndex();
4022
- const insertRowIndex = typeof at === 'undefined' ? rowIndex + 1 : at;
4023
- return { table, tableEntry, columns, rowIndex, insertRowIndex };
4024
- }
4025
- function packNewRow(opts, editor, count = 1, at) {
4026
- const { table, tableEntry, columns, insertRowIndex } = getInsertRowState(opts, editor, count, at);
4144
+ const insertElements = (editor, elements) => {
4145
+ var _a;
4146
+ if (!editor.selection) {
4147
+ refocus(editor);
4148
+ }
4149
+ if (Range.isExpanded(editor.selection)) {
4150
+ Editor.deleteFragment(editor);
4151
+ }
4152
+ const type = !isArray(elements) ? elements.type : elements[0].type; // 后期处理复制粘贴需要修改
4153
+ const allowParentTypes = ((_a = getPluginOptions(editor, type)) === null || _a === void 0 ? void 0 : _a.allowParentTypes) || [];
4154
+ const insertNodePath = getInsertElementsPath(editor, allowParentTypes);
4155
+ const [anchorBlock, anchorBlockPath] = anchorBlockEntry(editor);
4156
+ let isEmpty = Editor.isEmpty(editor, anchorBlock);
4157
+ if (insertNodePath) {
4158
+ Editor.withoutNormalizing(editor, () => {
4159
+ Transforms.insertNodes(editor, elements, { at: insertNodePath });
4160
+ Transforms.select(editor, Editor.start(editor, insertNodePath));
4161
+ if (isEmpty) {
4162
+ Transforms.removeNodes(editor, { at: anchorBlockPath });
4163
+ }
4164
+ });
4165
+ return;
4166
+ }
4167
+ const nextPath = Path.next([anchorBlockPath[0]]);
4168
+ Transforms.insertNodes(editor, elements, { at: nextPath });
4169
+ if (isEmpty && anchorBlockPath.length === 1) {
4170
+ Transforms.delete(editor, { at: anchorBlockPath });
4171
+ Transforms.select(editor, Editor.start(editor, anchorBlockPath));
4172
+ }
4173
+ else {
4174
+ Transforms.select(editor, Editor.start(editor, nextPath));
4175
+ }
4176
+ };
4177
+
4178
+ const setNode = (editor, props, origin) => {
4179
+ Transforms.setNodes(editor, props, { at: findPath(editor, origin) });
4180
+ };
4181
+
4182
+ /**
4183
+ * Unwrap nodes by type
4184
+ */
4185
+ const unwrapNodesByType = (editor, types, options = {}) => {
4186
+ if (!Array.isArray(types)) {
4187
+ types = [types];
4188
+ }
4189
+ Transforms.unwrapNodes(editor, Object.assign({ match: n => Element$1.isElement(n) && types.includes(n.type) }, options));
4190
+ };
4191
+
4192
+ const onKeyDownResetBlockType = ({ rules }) => (event, editor) => {
4193
+ let reset;
4194
+ if (editor.selection && isCollapsed(editor.selection)) {
4195
+ rules.forEach(({ types, defaultType, hotkey, predicate, onReset }) => {
4196
+ if (!event || (hotkey && isKeyHotkey(hotkey, event))) {
4197
+ if (predicate(editor) && isNodeTypeIn(editor, types)) {
4198
+ if (event !== null) {
4199
+ event.preventDefault();
4200
+ }
4201
+ Transforms.setNodes(editor, { type: defaultType });
4202
+ onReset(editor);
4203
+ reset = true;
4204
+ }
4205
+ }
4206
+ });
4207
+ }
4208
+ return reset;
4209
+ };
4210
+
4211
+ /**
4212
+ * 将节点的子级移动到路径。 返回移动的子级数。
4213
+ */
4214
+ const moveChildren = (editor, { at, to, match, start = 0 }) => {
4215
+ let moved = 0;
4216
+ const parentPath = Path.isPath(at) ? at : at[1];
4217
+ const parentNode = Path.isPath(at) ? Node.get(editor, parentPath) : at[0];
4218
+ if (!Editor.isBlock(editor, parentNode))
4219
+ return moved;
4220
+ for (let i = parentNode.children.length - 1; i >= start; i--) {
4221
+ const childPath = [...parentPath, i];
4222
+ const childNode = getNode(editor, childPath);
4223
+ if (!match || (childNode && match([childNode, childPath]))) {
4224
+ Transforms.moveNodes(editor, { at: childPath, to });
4225
+ moved++;
4226
+ }
4227
+ }
4228
+ return moved;
4229
+ };
4230
+
4231
+ const insertParagraph = (editor, at) => {
4232
+ Transforms.insertNodes(editor, createEmptyParagraph(), { at });
4233
+ };
4234
+
4235
+ /**
4236
+ * Recursively apply an operation to children nodes with a query.
4237
+ */
4238
+ const applyDeepToNodes = ({ node, source, apply, query }) => {
4239
+ const entry = [node, []];
4240
+ if (isNodeType(entry, query)) {
4241
+ if (source instanceof Function) {
4242
+ apply(node, source());
4243
+ }
4244
+ else {
4245
+ apply(node, source);
4246
+ }
4247
+ }
4248
+ if (!isAncestor(node)) {
4249
+ return;
4250
+ }
4251
+ node.children.forEach((child) => {
4252
+ applyDeepToNodes({ node: child, source, apply, query });
4253
+ });
4254
+ };
4255
+
4256
+ /**
4257
+ * Recursively merge a source object to children nodes with a query.
4258
+ */
4259
+ const mergeDeepToNodes = (options) => {
4260
+ applyDeepToNodes(Object.assign(Object.assign({}, options), { apply: defaults }));
4261
+ };
4262
+
4263
+ const unWrap = (editor, kind) => {
4264
+ Editor.withoutNormalizing(editor, () => {
4265
+ Transforms.setNodes(editor, { type: ElementKinds.paragraph });
4266
+ Transforms.unwrapNodes(editor, {
4267
+ match: n => Element$1.isElement(n) && n.type === kind,
4268
+ split: true
4269
+ });
4270
+ });
4271
+ };
4272
+
4273
+ const deleteElement = (editor, element) => {
4274
+ const at = findPath(editor, element);
4275
+ Transforms.insertNodes(editor, createEmptyParagraph(), { at });
4276
+ AngularEditor.focus(editor);
4277
+ Transforms.select(editor, at);
4278
+ Transforms.removeNodes(editor, { at: Path.next(at) });
4279
+ };
4280
+
4281
+ const setEndSelection = (editor) => {
4282
+ const lastNode = getLastNode(editor, 1);
4283
+ const end = Editor.end(editor, lastNode[1]);
4284
+ Transforms.select(editor, end);
4285
+ AngularEditor.focus(editor);
4286
+ };
4287
+
4288
+ const closeConversionHint = (editor) => {
4289
+ const hintRef = THE_EDITOR_CONVERSION_HINT_REF.get(editor);
4290
+ if (hintRef) {
4291
+ hintRef.close();
4292
+ }
4293
+ };
4294
+
4295
+ function handleContinualDeleteBackward(editor, aboveResult, type) {
4296
+ const highestBlock = aboveResult[0];
4297
+ const lowestBlock = anchorBlock(editor);
4298
+ const wrapBlockType = highestBlock.type;
4299
+ if (lowestBlock && Editor.isStart(editor, editor.selection.anchor, aboveResult[1])) {
4300
+ if (wrapBlockType === type) {
4301
+ if (highestBlock.children[0] === lowestBlock) {
4302
+ unWrap(editor, wrapBlockType);
4303
+ return true;
4304
+ }
4305
+ }
4306
+ }
4307
+ return false;
4308
+ }
4309
+
4310
+ function handleContinualInsertBreak(editor, lowestBlock, type) {
4311
+ const isEmpty = Editor.isEmpty(editor, lowestBlock);
4312
+ const isEnd = Editor.isEnd(editor, editor.selection.anchor, editor.selection.focus.path);
4313
+ const aboveResult = Editor.above(editor, {
4314
+ match: n => Editor.isBlock(editor, n) && n.type === type
4315
+ });
4316
+ if (aboveResult && aboveResult[0] && isEnd && isEmpty) {
4317
+ const wrapBlock = aboveResult[0];
4318
+ if (wrapBlock.type === type) {
4319
+ if (wrapBlock.children[wrapBlock.children.length - 1] === lowestBlock) {
4320
+ unWrap(editor, wrapBlock.type);
4321
+ return true;
4322
+ }
4323
+ }
4324
+ }
4325
+ return false;
4326
+ }
4327
+
4328
+ var index = /*#__PURE__*/Object.freeze({
4329
+ __proto__: null,
4330
+ applyDeepToNodes: applyDeepToNodes,
4331
+ clearMarks: clearMarks,
4332
+ closeConversionHint: closeConversionHint,
4333
+ deleteElement: deleteElement,
4334
+ handleContinualDeleteBackward: handleContinualDeleteBackward,
4335
+ handleContinualInsertBreak: handleContinualInsertBreak,
4336
+ insertElements: insertElements,
4337
+ insertParagraph: insertParagraph,
4338
+ mergeDeepToNodes: mergeDeepToNodes,
4339
+ moveChildren: moveChildren,
4340
+ onKeyDownResetBlockType: onKeyDownResetBlockType,
4341
+ setEndSelection: setEndSelection,
4342
+ setMarks: setMarks,
4343
+ setNode: setNode,
4344
+ unWrap: unWrap,
4345
+ unwrapNodesByType: unwrapNodesByType
4346
+ });
4347
+
4348
+ /**
4349
+ * Insert a new table
4350
+ */
4351
+ function insertTable(opts, editor, rows = 3, columns = 3, getCellContent) {
4352
+ const { selection } = editor;
4353
+ if (!(selection === null || selection === void 0 ? void 0 : selection.anchor)) {
4354
+ return;
4355
+ }
4356
+ // Create the table node
4357
+ const table = createTable(opts, columns, rows, getCellContent);
4358
+ insertElements(editor, table);
4359
+ }
4360
+
4361
+ function getInsertRowState(opts, editor, count = 1, at) {
4362
+ const tablePosition = createTablePosition(editor);
4363
+ let table = tablePosition.table;
4364
+ let tableEntry = tablePosition.tableEntry;
4365
+ // Create a new row with the right count of cells
4366
+ const columns = table.children[0].children.length;
4367
+ const rowIndex = tablePosition.getRowIndex();
4368
+ const insertRowIndex = typeof at === 'undefined' ? rowIndex + 1 : at;
4369
+ return { table, tableEntry, columns, rowIndex, insertRowIndex };
4370
+ }
4371
+ function packNewRow(opts, editor, count = 1, at) {
4372
+ const { table, tableEntry, columns, insertRowIndex } = getInsertRowState(opts, editor, count, at);
4027
4373
  const rowspan = calcSpanForRow(table, insertRowIndex);
4028
4374
  const newRow = createRow(opts, columns);
4029
4375
  newRow.children.forEach((cell, columnIndex) => {
@@ -5106,9 +5452,9 @@ class TheBaseSuggestion {
5106
5452
  event.preventDefault();
5107
5453
  }
5108
5454
  }
5109
- TheBaseSuggestion.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheBaseSuggestion, deps: [], target: i0.ɵɵFactoryTarget.Directive });
5110
- 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 });
5111
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheBaseSuggestion, decorators: [{
5455
+ TheBaseSuggestion.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TheBaseSuggestion, deps: [], target: i0.ɵɵFactoryTarget.Directive });
5456
+ TheBaseSuggestion.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: TheBaseSuggestion, inputs: { editor: "editor", type: "type", keywords: "keywords" }, host: { listeners: { "mousedown": "handleMousedown($event)" } }, ngImport: i0 });
5457
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TheBaseSuggestion, decorators: [{
5112
5458
  type: Directive
5113
5459
  }], propDecorators: { editor: [{
5114
5460
  type: Input
@@ -5150,9 +5496,9 @@ class TheTableSelectComponent {
5150
5496
  }
5151
5497
  }
5152
5498
  }
5153
- 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 });
5154
- 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"] }] });
5155
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheTableSelectComponent, decorators: [{
5499
+ TheTableSelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TheTableSelectComponent, deps: [{ token: i1$1.ThyPopoverRef }], target: i0.ɵɵFactoryTarget.Component });
5500
+ TheTableSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", 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"] }] });
5501
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TheTableSelectComponent, decorators: [{
5156
5502
  type: Component,
5157
5503
  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" }]
5158
5504
  }], ctorParameters: function () { return [{ type: i1$1.ThyPopoverRef }]; }, propDecorators: { optionsParam: [{
@@ -5205,14 +5551,14 @@ class TheListboxOptionDirective {
5205
5551
  return this._active;
5206
5552
  }
5207
5553
  }
5208
- 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 });
5209
- 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: [
5554
+ TheListboxOptionDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", 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 });
5555
+ TheListboxOptionDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: TheListboxOptionDirective, selector: "[theListboxOption]", inputs: { theOptionValue: "theOptionValue", theOptionDisabled: "theOptionDisabled" }, host: { properties: { "class": "this.className" } }, providers: [
5210
5556
  {
5211
5557
  provide: THE_LISTBOX_PARENT_OPTION_TOKEN,
5212
5558
  useExisting: TheListboxOptionDirective
5213
5559
  }
5214
5560
  ], queries: [{ propertyName: "_options", predicate: i0.forwardRef(function () { return TheListboxOptionDirective; }), descendants: true }], exportAs: ["theListboxOption"], ngImport: i0 });
5215
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheListboxOptionDirective, decorators: [{
5561
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TheListboxOptionDirective, decorators: [{
5216
5562
  type: Directive,
5217
5563
  args: [{
5218
5564
  selector: '[theListboxOption]',
@@ -5290,14 +5636,14 @@ class TheListboxGroupDirective {
5290
5636
  return this.options[this.options.length - 1];
5291
5637
  }
5292
5638
  }
5293
- 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 });
5294
- 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: [
5639
+ TheListboxGroupDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TheListboxGroupDirective, deps: [{ token: THE_LISTBOX_PARENT_OPTION_TOKEN, optional: true, skipSelf: true }, { token: THE_LISTBOX_TOKEN }], target: i0.ɵɵFactoryTarget.Directive });
5640
+ TheListboxGroupDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: TheListboxGroupDirective, selector: "[theListboxGroup]", inputs: { horizontalColumn: "horizontalColumn" }, host: { properties: { "class": "this.className" } }, providers: [
5295
5641
  {
5296
5642
  provide: THE_LISTBOX_PARENT_GROUP_TOKEN,
5297
5643
  useExisting: TheListboxGroupDirective
5298
5644
  }
5299
5645
  ], queries: [{ propertyName: "_options", predicate: TheListboxOptionDirective, descendants: true }], exportAs: ["theListboxGroup"], ngImport: i0 });
5300
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheListboxGroupDirective, decorators: [{
5646
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TheListboxGroupDirective, decorators: [{
5301
5647
  type: Directive,
5302
5648
  args: [{
5303
5649
  selector: '[theListboxGroup]',
@@ -5503,14 +5849,14 @@ class TheListboxDirective {
5503
5849
  this._keyboardSubscription.unsubscribe();
5504
5850
  }
5505
5851
  }
5506
- 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 });
5507
- 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: [
5852
+ TheListboxDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TheListboxDirective, deps: [{ token: i0.NgZone }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
5853
+ TheListboxDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: TheListboxDirective, selector: "[theListBox]", inputs: { keyboardContainer: "keyboardContainer", autoActiveFirstItem: "autoActiveFirstItem" }, outputs: { theListboxChange: "theListboxChange" }, host: { properties: { "class": "this.className" } }, providers: [
5508
5854
  {
5509
5855
  provide: THE_LISTBOX_TOKEN,
5510
5856
  useExisting: TheListboxDirective
5511
5857
  }
5512
5858
  ], queries: [{ propertyName: "_groups", predicate: TheListboxGroupDirective, descendants: true }, { propertyName: "_options", predicate: TheListboxOptionDirective, descendants: true }], exportAs: ["theListBox"], ngImport: i0 });
5513
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheListboxDirective, decorators: [{
5859
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TheListboxDirective, decorators: [{
5514
5860
  type: Directive,
5515
5861
  args: [{
5516
5862
  selector: '[theListBox]',
@@ -5544,9 +5890,9 @@ class ThePreventDefaultDirective {
5544
5890
  event.preventDefault();
5545
5891
  }
5546
5892
  }
5547
- ThePreventDefaultDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: ThePreventDefaultDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
5548
- 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 });
5549
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: ThePreventDefaultDirective, decorators: [{
5893
+ ThePreventDefaultDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ThePreventDefaultDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
5894
+ ThePreventDefaultDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: ThePreventDefaultDirective, selector: "[thePreventDefault]", host: { listeners: { "mousedown": "mousedown($event)" } }, exportAs: ["thePreventDefault"], ngImport: i0 });
5895
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ThePreventDefaultDirective, decorators: [{
5550
5896
  type: Directive,
5551
5897
  args: [{
5552
5898
  selector: '[thePreventDefault]',
@@ -5708,9 +6054,9 @@ class ThePluginMenuComponent extends mixinUnsubscribe(MixinBase) {
5708
6054
  super.ngOnDestroy();
5709
6055
  }
5710
6056
  }
5711
- 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 });
5712
- 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: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4.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: i6$1.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", "thyPlacement", "thyMenuInsideClosable", "thyPanelClass"], 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"] }] });
5713
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: ThePluginMenuComponent, decorators: [{
6057
+ ThePluginMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ThePluginMenuComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: i1$1.ThyPopoverRef }], target: i0.ɵɵFactoryTarget.Component });
6058
+ ThePluginMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: ThePluginMenuComponent, selector: "the-plugin-menu", inputs: { editor: "editor", theDisplaySearch: "theDisplaySearch", thePluginMenu: "thePluginMenu" }, host: { properties: { "class": "this.containerClassName" } }, viewQueries: [{ propertyName: "dropdownTriggers", predicate: ["dropdownTriggers"], descendants: true, read: ThyDropdownDirective }], usesInheritance: true, ngImport: i0, template: "<div *ngIf=\"theDisplaySearch\" class=\"menu-search px-5 pt-5 pb-2\">\n <thy-input-search [(ngModel)]=\"keyWords\" placeholder=\"\u641C\u7D22\" thyIconPosition=\"after\" (ngModelChange)=\"updateKeywords(keyWords)\">\n </thy-input-search>\n</div>\n\n<div\n *ngIf=\"groupMenu.length > 0; else thyEmpty\"\n theListBox\n [keyboardContainer]=\"keyboardContainer\"\n [autoActiveFirstItem]=\"autoActiveFirstItem\"\n (theListboxChange)=\"theListboxChange($event)\"\n class=\"thy-dropdown-menu the-plugin-menu-scroll-container pb-2 pt-0\"\n>\n <div *ngIf=\"iconMenu?.length > 0\" theListboxGroup [horizontalColumn]=\"6\" class=\"icon-menu d-flex pl-5 py-1\">\n <ng-container *ngFor=\"let item of iconMenu; trackBy: trackByFn\">\n <a\n *ngIf=\"item.type === ThePluginMenuItemType.icon\"\n href=\"javascript:;\"\n class=\"mt-2\"\n thyAction\n theListboxOption\n [theOptionValue]=\"item\"\n [thyActionIcon]=\"item.icon\"\n [thyTooltip]=\"item?.name\"\n [thyDisabled]=\"item.disabled\"\n [theOptionDisabled]=\"item.disabled\"\n thePreventDefault\n (click)=\"handleItemSelection(item)\"\n ></a>\n </ng-container>\n </div>\n\n <thy-divider *ngIf=\"this.iconMenu?.length\" class=\"my-2\"></thy-divider>\n <div theListboxGroup>\n <ng-container *ngFor=\"let item of groupMenu; trackBy: trackByFn\">\n <ng-container *ngIf=\"item.isMenuItem && !(item.children?.length > 0) && item.key !== 'table'\">\n <div\n thyDropdownMenuItem\n theListboxOption\n [theOptionValue]=\"item\"\n class=\"py-0\"\n thePreventDefault\n [thyDisabled]=\"item.disabled\"\n [theOptionDisabled]=\"item.disabled\"\n (click)=\"handleItemSelection(item)\"\n >\n <div class=\"menu-icon mr-2\">\n <thy-icon [thyIconName]=\"item.menuIcon\"></thy-icon>\n </div>\n <div class=\"menu-content d-flex align-items-center\">\n <div class=\"menu-item-title w-100\">\n {{ item.name }}\n </div>\n </div>\n </div>\n </ng-container>\n <ng-container *ngIf=\"item.isMenuItem && item.children?.length > 0\" #hasExpanded>\n <div\n #dropdownTriggers\n [thyDropdown]=\"expand\"\n thyTrigger=\"hover\"\n thyDropdownMenuItem\n [thyDisabled]=\"item.disabled\"\n theListboxOption\n [theOptionValue]=\"item\"\n [theOptionDisabled]=\"item.disabled\"\n [thyPopoverOptions]=\"expandPopoverOptions\"\n class=\"py-0\"\n thePreventDefault\n (click)=\"handleItemSelection(item)\"\n >\n <div class=\"menu-icon mr-2\">\n <thy-icon [thyIconName]=\"item.menuIcon\"></thy-icon>\n </div>\n <div class=\"menu-content d-flex align-items-center\">\n <div class=\"menu-item-title w-100\">\n {{ item.name }}\n </div>\n </div>\n <div *ngIf=\"item.children?.length > 0\">\n <thy-icon class=\"text-muted\" thyIconName=\"angle-right\"></thy-icon>\n </div>\n <thy-dropdown-menu #expand>\n <div class=\"the-plugin-menu-container expand-menu\" theListboxGroup>\n <ng-container *ngFor=\"let child of item.children\">\n <div\n *ngIf=\"child.type === ThePluginMenuItemType.group\"\n thyDropdownMenuItem\n theListboxOption\n class=\"py-0\"\n thePreventDefault\n [theOptionDisabled]=\"item.disabled\"\n [thyDisabled]=\"child.disabled\"\n (click)=\"handleItemSelection(child)\"\n [theOptionValue]=\"child\"\n >\n <div class=\"menu-icon mr-2\">\n <thy-icon [thyIconName]=\"child.menuIcon\"></thy-icon>\n </div>\n <div class=\"menu-content d-flex align-items-center\">\n <div class=\"menu-item-title w-100\">\n {{ child.name }}\n </div>\n </div>\n </div>\n <thy-divider *ngIf=\"child === 'divider'\" class=\"my-2\"></thy-divider>\n </ng-container>\n </div>\n </thy-dropdown-menu>\n </div>\n </ng-container>\n <ng-container *ngIf=\"item.isMenuItem && item.key === 'table'\">\n <div\n #dropdownTriggers\n [thyPopover]=\"tableSelect\"\n thyPlacement=\"rightTop\"\n thyTrigger=\"hover\"\n thyDropdownMenuItem\n theListboxOption\n [thyConfig]=\"tableSelectPopoverConfig\"\n [theOptionValue]=\"item\"\n [theOptionDisabled]=\"item.disabled\"\n [thyDisabled]=\"item.disabled\"\n class=\"py-0\"\n thePreventDefault\n (click)=\"handleItemSelection(item)\"\n >\n <div class=\"menu-icon mr-2\">\n <thy-icon [thyIconName]=\"item.menuIcon\"></thy-icon>\n </div>\n <div class=\"menu-content d-flex align-items-center\">\n <div class=\"menu-item-title w-100\">\n {{ item.name }}\n </div>\n </div>\n <div>\n <thy-icon class=\"text-muted\" thyIconName=\"angle-right\"></thy-icon>\n </div>\n\n <ng-template #tableSelect>\n <table-select\n class=\"plugin-menu-table the-table-selector-panel\"\n [editor]=\"editor\"\n [beforeInsert]=\"removeKeywords\"\n ></table-select>\n </ng-template>\n </div>\n </ng-container>\n <ng-container *ngIf=\"!item.isMenuItem\" #menuGroup>\n <thy-dropdown-menu-group class=\"font-size-sm\" [thyTitle]=\"item.groupName\"></thy-dropdown-menu-group>\n </ng-container>\n </ng-container>\n </div>\n</div>\n\n<ng-template #thyEmpty>\n <div class=\"empty d-flex align-items-center justify-content-center\">\n <thy-empty [thyMessage]=\"thyMessage\"></thy-empty>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: 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: i6$1.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", "thyPlacement", "thyMenuInsideClosable", "thyPanelClass"], 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"] }] });
6059
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ThePluginMenuComponent, decorators: [{
5714
6060
  type: Component,
5715
6061
  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" }]
5716
6062
  }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }, { type: i1$1.ThyPopoverRef }]; }, propDecorators: { dropdownTriggers: [{
@@ -5877,9 +6223,9 @@ class TheVerticalToolbarItemComponent extends TheBaseToolbarDropdown {
5877
6223
  }
5878
6224
  }
5879
6225
  }
5880
- 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 });
5881
- 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"] }] });
5882
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheVerticalToolbarItemComponent, decorators: [{
6226
+ TheVerticalToolbarItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TheVerticalToolbarItemComponent, deps: [{ token: i0.ElementRef }, { token: i1$1.ThyPopover }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component });
6227
+ TheVerticalToolbarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", 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"] }] });
6228
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TheVerticalToolbarItemComponent, decorators: [{
5883
6229
  type: Component,
5884
6230
  args: [{ selector: 'the-toolbar-vertical-align-item', host: {
5885
6231
  class: 'the-toolbar-dropdown-container verticalAlign',
@@ -6666,9 +7012,9 @@ class TheBlockquoteComponent extends TheBaseElementComponent {
6666
7012
  this.cdr = cdr;
6667
7013
  }
6668
7014
  }
6669
- 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 });
6670
- 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"] }] });
6671
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheBlockquoteComponent, decorators: [{
7015
+ TheBlockquoteComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TheBlockquoteComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
7016
+ TheBlockquoteComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", 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"] }] });
7017
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TheBlockquoteComponent, decorators: [{
6672
7018
  type: Component,
6673
7019
  args: [{
6674
7020
  selector: 'blockquote[theBlockquote]',
@@ -6966,9 +7312,9 @@ class TheCodeComponent extends TheBaseElementComponent {
6966
7312
  this.destroy$.complete();
6967
7313
  }
6968
7314
  }
6969
- 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 });
6970
- 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: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i8.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { kind: "directive", type: i9.ThyResizableDirective, selector: "[thyResizable]", inputs: ["thyBounds", "thyMaxHeight", "thyMaxWidth", "thyMinHeight", "thyMinWidth", "thyGridColumnCount", "thyMaxColumn", "thyMinColumn", "thyLockAspectRatio", "thyPreview", "thyDisabled"], outputs: ["thyResize", "thyResizeStart", "thyResizeEnd"] }, { 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 });
6971
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheCodeComponent, decorators: [{
7315
+ TheCodeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", 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 });
7316
+ TheCodeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: TheCodeComponent, selector: "div[theCode]", viewQueries: [{ propertyName: "toolbar", first: true, predicate: ["toolbar"], descendants: true, read: TemplateRef, static: true }, { propertyName: "codemirror", first: true, predicate: ["codemirror"], descendants: true, read: CodeMirrorComponent }, { propertyName: "toolbarDropdownComponent", first: true, predicate: TheToolbarDropdownComponent, descendants: true, read: TheToolbarDropdownComponent }], usesInheritance: true, ngImport: i0, template: "<slate-children [children]=\"children\" [context]=\"childrenContext\" [viewContext]=\"viewContext\"></slate-children>\n\n<!-- \u53EA\u8BFB\u6A21\u5F0F\u4E0BCodeMirror-sizer\u9AD8\u5EA6\u6BD4\u7F16\u8F91\u6A21\u5F0F\u4E0B\u591A2px\uFF0C\u8BBE\u7F6EthyMinHeight\u4E3A46px\u9632\u6B62\u62D6\u62FD\u5230\u6700\u5C0F\u9AD8\u5EA6\u65F6\u53EA\u8BFB\u6A21\u5F0F\u4E0B\u51FA\u73B0\u6EDA\u52A8\u6761 -->\n<div\n thyResizable\n [thyMinHeight]=\"46\"\n [thyBounds]=\"resizeBounds\"\n [style.height.px]=\"resizeHeight\"\n (thyResize)=\"onResize($event)\"\n (thyResizeEnd)=\"onEndResize()\"\n class=\"resize-code-container\"\n [ngClass]=\"{ focus: isCollapsedAndNonReadonly, readonly: options.readOnly, active: isHightLight && isCollapsedAndNonReadonly }\"\n>\n <ng-codemirror\n *ngIf=\"startRenderCodemirror\"\n #codemirror\n contenteditable=\"false\"\n class=\"ng-codemirror-wrapper\"\n [ngStyle]=\"{ maxHeight: maxHeight > 0 ? maxHeight + 'px' : 'auto' }\"\n [options]=\"options\"\n [ngModel]=\"code\"\n [delayRefreshTime]=\"300\"\n (ngModelChange)=\"codeChange($event)\"\n (focusChange)=\"focusChange($event)\"\n [autoMaxHeight]=\"maxHeight\"\n >\n </ng-codemirror>\n <thy-resize-handle thyDirection=\"bottom\" class=\"code-resize-icon\" *ngIf=\"isCollapsedAndNonReadonly\"></thy-resize-handle>\n</div>\n\n<ng-template #toolbar>\n <thy-actions thySize=\"xxs\" thePreventDefault>\n <the-toolbar-dropdown\n [menus]=\"menus\"\n [toolbarItem]=\"activeLanguage\"\n [dropdownItemKey]=\"activeLanguage?.key\"\n [itemMousedownHandle]=\"onChangeLanguage\"\n >\n </the-toolbar-dropdown>\n <span class=\"auto-wrap d-flex align-items-center px-2 text-secondary\">\n <span>\u81EA\u52A8\u6362\u884C</span>\n <thy-switch\n class=\"auto-wrap-btn d-flex ml-1\"\n [(ngModel)]=\"options.lineWrapping\"\n (ngModelChange)=\"onChangeWrap($event)\"\n thySize=\"sm\"\n ></thy-switch>\n </span>\n <a href=\"javascript:;\" thyAction thyActionIcon=\"copy\" thyTooltip=\"\u590D\u5236\" thyTooltipPlacement=\"top\" (click)=\"onCopy($event)\"></a>\n <thy-divider class=\"mr-2 ml-1 align-self-center\" [thyVertical]=\"true\"></thy-divider>\n <a\n href=\"javascript:;\"\n thyAction\n thyType=\"danger\"\n thyActionIcon=\"trash\"\n thyTooltip=\"\u5220\u9664\"\n thyTooltipPlacement=\"top\"\n (click)=\"onDelete($event)\"\n ></a>\n </thy-actions>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i1.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i8.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { kind: "directive", type: i9.ThyResizableDirective, selector: "[thyResizable]", inputs: ["thyBounds", "thyMaxHeight", "thyMaxWidth", "thyMinHeight", "thyMinWidth", "thyGridColumnCount", "thyMaxColumn", "thyMinColumn", "thyLockAspectRatio", "thyPreview", "thyDisabled"], outputs: ["thyResize", "thyResizeStart", "thyResizeEnd"] }, { 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 });
7317
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TheCodeComponent, decorators: [{
6972
7318
  type: Component,
6973
7319
  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" }]
6974
7320
  }], ctorParameters: function () {
@@ -6988,7 +7334,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
6988
7334
  }] } });
6989
7335
 
6990
7336
  const withCode = (editor) => {
6991
- const { isVoid, isBlockCard, renderElement } = editor;
7337
+ const { isVoid, isBlockCard, renderElement, setFragmentData } = editor;
6992
7338
  editor.isVoid = (element) => {
6993
7339
  return element.type === ElementKinds.code ? true : isVoid(element);
6994
7340
  };
@@ -7004,6 +7350,16 @@ const withCode = (editor) => {
7004
7350
  }
7005
7351
  return renderElement(element);
7006
7352
  };
7353
+ editor.setFragmentData = unit => {
7354
+ setFragmentData(unit);
7355
+ const { selection } = editor;
7356
+ const [start] = Editor.edges(editor, selection);
7357
+ if (isNodeTypeIn(editor, [ElementKinds.code], { at: start })) {
7358
+ const [codeNode] = getAboveByType(editor, ElementKinds.code);
7359
+ unit.setData('text/plain', codeNode.content.trim());
7360
+ return unit;
7361
+ }
7362
+ };
7007
7363
  return editor;
7008
7364
  };
7009
7365
  const createCodePlugin = createPluginFactory({
@@ -7075,9 +7431,9 @@ class TheColorToolbarItemComponent extends TheBaseToolbarItem {
7075
7431
  ColorEditor.setColor(this.editor, this.selectedColor, this.type);
7076
7432
  }
7077
7433
  }
7078
- TheColorToolbarItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheColorToolbarItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
7079
- 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: "<a\n href=\"javascript:;\"\n thyAction\n [thyActionActive]=\"active\"\n [thyTooltip]=\"toolbarItem.name\"\n thyTooltipPlacement=\"top\"\n thyColorPicker\n thyPlacement=\"bottomLeft\"\n [(ngModel)]=\"selectedColor\"\n (ngModelChange)=\"changeColor($event)\"\n (mousedown)=\"preventDefault($event)\"\n>\n <thy-icon\n [thyIconName]=\"toolbarItem.icon\"\n thyIconType=\"twotone\"\n [thyTwotoneColor]=\"active ?? (toolbarItem.key === 'color' ? defaultColorLine : defaultBackgroundColorLine)\"\n ></thy-icon>\n <thy-icon class=\"link-down-icon font-size-sm text-desc ml-1\" thyIconName=\"caret-down\"></thy-icon>\n</a>\n", dependencies: [{ kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4.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: i5.ThyColorPickerDirective, selector: "[thyColorPicker]", inputs: ["thyOffset", "thyHasBackdrop", "thyDefaultColor", "thyTransparentColorSelectable", "thyPresetColors", "thyPlacement", "thyTrigger", "thyShowDelay", "thyHideDelay"], outputs: ["thyPanelOpen", "thyPanelClose"] }] });
7080
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheColorToolbarItemComponent, decorators: [{
7434
+ TheColorToolbarItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TheColorToolbarItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
7435
+ TheColorToolbarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: TheColorToolbarItemComponent, selector: "the-color-toolbar-item", host: { classAttribute: "the-toolbar-item" }, usesInheritance: true, ngImport: i0, template: "<a\n href=\"javascript:;\"\n thyAction\n [thyActionActive]=\"active\"\n [thyTooltip]=\"toolbarItem.name\"\n thyTooltipPlacement=\"top\"\n thyColorPicker\n thyPlacement=\"bottomLeft\"\n [(ngModel)]=\"selectedColor\"\n (ngModelChange)=\"changeColor($event)\"\n (mousedown)=\"preventDefault($event)\"\n>\n <thy-icon\n [thyIconName]=\"toolbarItem.icon\"\n thyIconType=\"twotone\"\n [thyTwotoneColor]=\"active ?? (toolbarItem.key === 'color' ? defaultColorLine : defaultBackgroundColorLine)\"\n ></thy-icon>\n <thy-icon class=\"link-down-icon font-size-sm text-desc ml-1\" thyIconName=\"caret-down\"></thy-icon>\n</a>\n", dependencies: [{ kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4.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: i5.ThyColorPickerDirective, selector: "[thyColorPicker]", inputs: ["thyOffset", "thyHasBackdrop", "thyDefaultColor", "thyTransparentColorSelectable", "thyPresetColors", "thyPlacement", "thyTrigger", "thyShowDelay", "thyHideDelay"], outputs: ["thyPanelOpen", "thyPanelClose"] }] });
7436
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TheColorToolbarItemComponent, decorators: [{
7081
7437
  type: Component,
7082
7438
  args: [{ selector: 'the-color-toolbar-item', host: {
7083
7439
  class: 'the-toolbar-item'
@@ -7404,21 +7760,6 @@ const createBlockCardPlugin = createPluginFactory({
7404
7760
  withOverrides: withBlockCard
7405
7761
  });
7406
7762
 
7407
- const isColorPanel = (element) => {
7408
- const pickerPanel = element.closest('.thy-color-picker-panel');
7409
- const customPickerPanel = element.closest('.thy-color-picker-custom-panel');
7410
- if (pickerPanel || customPickerPanel) {
7411
- return true;
7412
- }
7413
- return false;
7414
- };
7415
- const isColorIndicator = (element) => {
7416
- return element.closest('.indicator-hue-alp');
7417
- };
7418
- const isColorInput = (element) => {
7419
- return element.closest('.thy-color-inputs');
7420
- };
7421
-
7422
7763
  const withInternalCommon = (editor) => {
7423
7764
  const { globalMousedown, onKeydown } = editor;
7424
7765
  editor.globalMousedown = (event) => {
@@ -7840,9 +8181,9 @@ class TheConversionHintComponent {
7840
8181
  clearInterval(this.closeTimer);
7841
8182
  }
7842
8183
  }
7843
- TheConversionHintComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheConversionHintComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
7844
- 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 });
7845
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheConversionHintComponent, decorators: [{
8184
+ TheConversionHintComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TheConversionHintComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
8185
+ TheConversionHintComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", 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 });
8186
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TheConversionHintComponent, decorators: [{
7846
8187
  type: Component,
7847
8188
  args: [{ selector: 'the-conversion-hint', host: {
7848
8189
  class: 'the-conversion-hint'
@@ -8210,14 +8551,14 @@ class TheHrComponent extends TheBaseElementComponent {
8210
8551
  });
8211
8552
  }
8212
8553
  }
8213
- 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 });
8214
- TheHrComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.2", type: TheHrComponent, selector: "the-hr, [theHr]", usesInheritance: true, ngImport: i0, template: `
8554
+ TheHrComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TheHrComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
8555
+ TheHrComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: TheHrComponent, selector: "the-hr, [theHr]", usesInheritance: true, ngImport: i0, template: `
8215
8556
  <div class="the-hr" contenteditable="false" [ngClass]="{ active: isCollapsedAndNonReadonly }">
8216
8557
  <hr class="the-hr" />
8217
8558
  <slate-children [children]="children" [context]="childrenContext" [viewContext]="viewContext"></slate-children>
8218
8559
  </div>
8219
8560
  `, 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"] }] });
8220
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheHrComponent, decorators: [{
8561
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TheHrComponent, decorators: [{
8221
8562
  type: Component,
8222
8563
  args: [{
8223
8564
  selector: 'the-hr, [theHr]',
@@ -8658,9 +8999,9 @@ class TheImageComponent extends TheBaseElementComponent {
8658
8999
  event.stopPropagation();
8659
9000
  }
8660
9001
  }
8661
- 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: i0.ViewContainerRef }, { token: i4$1.ThyImageGroupComponent }], target: i0.ɵɵFactoryTarget.Component });
8662
- 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 }, { propertyName: "imageDirective", first: true, predicate: ThyImageDirective, descendants: 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 (click)=\"imageClick()\"\n [thySrc]=\"imageEntry.thumbUrl\"\n [thyPreviewSrc]=\"imageEntry.thumbUrl\"\n [thyOriginSrc]=\"imageEntry.originUrl\"\n [thyDisablePreview]=\"disablePreview\"\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"] }] });
8663
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheImageComponent, decorators: [{
9002
+ TheImageComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", 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: i0.ViewContainerRef }, { token: i4$1.ThyImageGroupComponent }], target: i0.ɵɵFactoryTarget.Component });
9003
+ TheImageComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", 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 }, { propertyName: "imageDirective", first: true, predicate: ThyImageDirective, descendants: 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 (click)=\"imageClick()\"\n [thySrc]=\"imageEntry.thumbUrl\"\n [thyPreviewSrc]=\"imageEntry.thumbUrl\"\n [thyOriginSrc]=\"imageEntry.originUrl\"\n [thyDisablePreview]=\"disablePreview\"\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"] }] });
9004
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TheImageComponent, decorators: [{
8664
9005
  type: Component,
8665
9006
  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 (click)=\"imageClick()\"\n [thySrc]=\"imageEntry.thumbUrl\"\n [thyPreviewSrc]=\"imageEntry.thumbUrl\"\n [thyOriginSrc]=\"imageEntry.originUrl\"\n [thyDisablePreview]=\"disablePreview\"\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" }]
8666
9007
  }], ctorParameters: function () {
@@ -8864,11 +9205,11 @@ class TheInlineCodeComponent extends TheBaseElementComponent {
8864
9205
  this.inlineChromiumBugfix = String.fromCodePoint(160);
8865
9206
  }
8866
9207
  }
8867
- TheInlineCodeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheInlineCodeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
8868
- 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>
9208
+ TheInlineCodeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TheInlineCodeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
9209
+ TheInlineCodeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: TheInlineCodeComponent, selector: "span[theInlineCode]", usesInheritance: true, ngImport: i0, template: `<span contenteditable="false" class="the-break-char">{{ inlineChromiumBugfix }}</span>
8869
9210
  <span><slate-children [children]="children" [context]="childrenContext" [viewContext]="viewContext"></slate-children></span>
8870
9211
  <span contenteditable="false" class="the-break-char">{{ inlineChromiumBugfix }}</span>`, isInline: true, dependencies: [{ kind: "component", type: i1.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }] });
8871
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheInlineCodeComponent, decorators: [{
9212
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TheInlineCodeComponent, decorators: [{
8872
9213
  type: Component,
8873
9214
  args: [{
8874
9215
  selector: 'span[theInlineCode]',
@@ -8969,9 +9310,9 @@ class TheLinkHoverComponent {
8969
9310
  event.stopPropagation();
8970
9311
  }
8971
9312
  }
8972
- TheLinkHoverComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheLinkHoverComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
8973
- 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"] }] });
8974
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheLinkHoverComponent, decorators: [{
9313
+ TheLinkHoverComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TheLinkHoverComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
9314
+ TheLinkHoverComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", 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"] }] });
9315
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TheLinkHoverComponent, decorators: [{
8975
9316
  type: Component,
8976
9317
  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" }]
8977
9318
  }], ctorParameters: function () { return []; }, propDecorators: { link: [{
@@ -9053,9 +9394,9 @@ class TheLinkEditComponent {
9053
9394
  }
9054
9395
  }
9055
9396
  }
9056
- 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 });
9057
- 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: i2$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i2$2.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.ThyFormDirective, selector: "[thyForm],[thy-form]", inputs: ["thyLayout", "thyEnterKeyMode", "thyFormValidatorConfig"], exportAs: ["thyForm"] }, { kind: "component", type: i3.ThyFormGroupComponent, selector: "thy-form-group", inputs: ["thyLabelText", "thyLabelTextTranslateKey", "thyLabelRequired", "thyLabelPaddingTopClear", "thyFeedbackIcon", "thyTipsMode", "thyTips", "thyTipsTranslateKey", "thyRowFill"] }, { kind: "directive", type: i3.ThyFormSubmitDirective, selector: "[thyFormSubmit],[thy-form-submit]", outputs: ["thyFormSubmit"] }, { kind: "component", type: i3.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: i6$1.ThyInputDirective, selector: "input[thyInput], select[thyInput], textarea[thyInput]", inputs: ["thySize"], exportAs: ["thyInput"] }, { kind: "component", type: i6$2.ThyButtonComponent, selector: "thy-button,[thy-button],[thyButton]", inputs: ["thyButton", "thyType", "thyLoading", "thyLoadingText", "thySize", "thyIcon", "thyBlock"] }] });
9058
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheLinkEditComponent, decorators: [{
9397
+ TheLinkEditComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TheLinkEditComponent, deps: [{ token: i1$1.ThyPopoverRef }], target: i0.ɵɵFactoryTarget.Component });
9398
+ TheLinkEditComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: TheLinkEditComponent, selector: "the-link-edit", inputs: { tag: "tag", node: "node", link: "link", text: "text", originSelection: "originSelection" }, host: { listeners: { "document: mousedown": "handleDocumentMouseDown($event)" }, properties: { "class": "this.className" } }, ngImport: i0, template: "<form thyForm #linkForm=\"thyForm\" [thyFormValidatorConfig]=\"validatorConfig\" name=\"linkForm\">\n <thy-form-group thyLabelText=\"\u6587\u672C\">\n <input thyInput placeholder=\"\u8BF7\u8F93\u5165\u6587\u672C\" required name=\"text\" [(ngModel)]=\"text\" thyAutofocus type=\"text\" />\n </thy-form-group>\n <thy-form-group thyLabelText=\"\u94FE\u63A5\">\n <input name=\"link\" thyInput placeholder=\"\u8BF7\u8F93\u5165\u94FE\u63A5\" required type=\"text\" #linkControl=\"ngModel\" [(ngModel)]=\"link\" />\n </thy-form-group>\n <thy-form-group-footer>\n <div class=\"btn-pair\">\n <button thyButton=\"link-secondary\" thySize=\"sm\" (click)=\"closePopover()\">\u53D6\u6D88</button>\n <button thyButton=\"primary-square\" thySize=\"sm\" (thyFormSubmit)=\"applyLink(linkForm)\">\u5E94\u7528</button>\n </div>\n </thy-form-group-footer>\n</form>\n", dependencies: [{ kind: "directive", type: i2$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i2$2.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.ThyFormDirective, selector: "[thyForm],[thy-form]", inputs: ["thyLayout", "thyEnterKeyMode", "thyFormValidatorConfig"], exportAs: ["thyForm"] }, { kind: "component", type: i3.ThyFormGroupComponent, selector: "thy-form-group", inputs: ["thyLabelText", "thyLabelTextTranslateKey", "thyLabelRequired", "thyLabelPaddingTopClear", "thyFeedbackIcon", "thyTipsMode", "thyTips", "thyTipsTranslateKey", "thyRowFill"] }, { kind: "directive", type: i3.ThyFormSubmitDirective, selector: "[thyFormSubmit],[thy-form-submit]", outputs: ["thyFormSubmit"] }, { kind: "component", type: i3.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: i6$1.ThyInputDirective, selector: "input[thyInput], select[thyInput], textarea[thyInput]", inputs: ["thySize"], exportAs: ["thyInput"] }, { kind: "component", type: i6$2.ThyButtonComponent, selector: "thy-button,[thy-button],[thyButton]", inputs: ["thyButton", "thyType", "thyLoading", "thyLoadingText", "thySize", "thyIcon", "thyBlock"] }] });
9399
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TheLinkEditComponent, decorators: [{
9059
9400
  type: Component,
9060
9401
  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" }]
9061
9402
  }], ctorParameters: function () { return [{ type: i1$1.ThyPopoverRef }]; }, propDecorators: { className: [{
@@ -9194,9 +9535,9 @@ class TheBaseLinkComponent extends TheBaseElementComponent {
9194
9535
  this.close(LinkCloseTypes.destroy);
9195
9536
  }
9196
9537
  }
9197
- 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 });
9198
- 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 });
9199
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheBaseLinkComponent, decorators: [{
9538
+ TheBaseLinkComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", 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 });
9539
+ TheBaseLinkComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: TheBaseLinkComponent, selector: "[TheBaseLinkComponent]", host: { listeners: { "click": "mousedownHandle($event)" } }, usesInheritance: true, ngImport: i0, template: '', isInline: true });
9540
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TheBaseLinkComponent, decorators: [{
9200
9541
  type: Component,
9201
9542
  args: [{
9202
9543
  selector: '[TheBaseLinkComponent]',
@@ -9214,11 +9555,11 @@ class TheLinkComponent extends TheBaseLinkComponent {
9214
9555
  this.inlineChromiumBugfix = String.fromCodePoint(160);
9215
9556
  }
9216
9557
  }
9217
- TheLinkComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheLinkComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
9218
- 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>
9558
+ TheLinkComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TheLinkComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
9559
+ TheLinkComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", 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>
9219
9560
  <span><slate-children [children]="children" [context]="childrenContext" [viewContext]="viewContext"></slate-children></span>
9220
9561
  <span contenteditable="false" class="the-break-char">{{ inlineChromiumBugfix }}</span>`, isInline: true, dependencies: [{ kind: "component", type: i1.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }] });
9221
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheLinkComponent, decorators: [{
9562
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TheLinkComponent, decorators: [{
9222
9563
  type: Component,
9223
9564
  args: [{
9224
9565
  selector: 'a[theLink]',
@@ -9876,9 +10217,9 @@ class TheNumberedListComponent extends TheBaseElementComponent {
9876
10217
  super.ngOnDestroy();
9877
10218
  }
9878
10219
  }
9879
- 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 });
9880
- 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"] }] });
9881
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheNumberedListComponent, decorators: [{
10220
+ TheNumberedListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TheNumberedListComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
10221
+ TheNumberedListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", 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"] }] });
10222
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TheNumberedListComponent, decorators: [{
9882
10223
  type: Component,
9883
10224
  args: [{
9884
10225
  selector: 'ol[theOl]',
@@ -9909,9 +10250,9 @@ class TheBulletedListComponent extends TheBaseElementComponent {
9909
10250
  super.ngOnDestroy();
9910
10251
  }
9911
10252
  }
9912
- 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 });
9913
- 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"] }] });
9914
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheBulletedListComponent, decorators: [{
10253
+ TheBulletedListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TheBulletedListComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
10254
+ TheBulletedListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", 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"] }] });
10255
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TheBulletedListComponent, decorators: [{
9915
10256
  type: Component,
9916
10257
  args: [{
9917
10258
  selector: 'ul[theUl]',
@@ -9999,9 +10340,9 @@ class TheListItemComponent extends TheBaseElementComponent {
9999
10340
  }
10000
10341
  }
10001
10342
  }
10002
- 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 });
10003
- 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"] }] });
10004
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheListItemComponent, decorators: [{
10343
+ TheListItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TheListItemComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
10344
+ TheListItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", 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"] }] });
10345
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TheListItemComponent, decorators: [{
10005
10346
  type: Component,
10006
10347
  args: [{
10007
10348
  selector: 'li[theLi]',
@@ -10844,9 +11185,9 @@ class TheToolbarGroupComponent {
10844
11185
  }
10845
11186
  }
10846
11187
  }
10847
- 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 });
10848
- 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"] }] });
10849
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheToolbarGroupComponent, decorators: [{
11188
+ TheToolbarGroupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TheToolbarGroupComponent, deps: [{ token: i0.ElementRef }, { token: i1$1.ThyPopover }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component });
11189
+ TheToolbarGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", 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"] }] });
11190
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TheToolbarGroupComponent, decorators: [{
10850
11191
  type: Component,
10851
11192
  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" }]
10852
11193
  }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1$1.ThyPopover }, { type: i0.ViewContainerRef }]; }, propDecorators: { className: [{
@@ -10892,9 +11233,9 @@ class ColumnResizeNotifierSource {
10892
11233
  this.triggerResize = new Subject();
10893
11234
  }
10894
11235
  }
10895
- ColumnResizeNotifierSource.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: ColumnResizeNotifierSource, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
10896
- ColumnResizeNotifierSource.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: ColumnResizeNotifierSource });
10897
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: ColumnResizeNotifierSource, decorators: [{
11236
+ ColumnResizeNotifierSource.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ColumnResizeNotifierSource, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
11237
+ ColumnResizeNotifierSource.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ColumnResizeNotifierSource });
11238
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ColumnResizeNotifierSource, decorators: [{
10898
11239
  type: Injectable
10899
11240
  }] });
10900
11241
 
@@ -10944,9 +11285,9 @@ class TableCellEventDispatcher {
10944
11285
  }));
10945
11286
  }
10946
11287
  }
10947
- TableCellEventDispatcher.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TableCellEventDispatcher, deps: [{ token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });
10948
- TableCellEventDispatcher.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TableCellEventDispatcher });
10949
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TableCellEventDispatcher, decorators: [{
11288
+ TableCellEventDispatcher.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TableCellEventDispatcher, deps: [{ token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });
11289
+ TableCellEventDispatcher.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TableCellEventDispatcher });
11290
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TableCellEventDispatcher, decorators: [{
10950
11291
  type: Injectable
10951
11292
  }], ctorParameters: function () { return [{ type: i0.NgZone }]; } });
10952
11293
 
@@ -10976,55 +11317,6 @@ function resetTableCell(editor, table, cell, cellRow, cellCol) {
10976
11317
  });
10977
11318
  }
10978
11319
 
10979
- function getSelectCellNode(editor, selectedCells) {
10980
- const pos = createTablePosition(editor);
10981
- return selectedCells
10982
- .map(item => {
10983
- const node = pos.findCellByPath(item);
10984
- if (node) {
10985
- return Object.assign(Object.assign({}, item), { node: node });
10986
- }
10987
- })
10988
- .filter(item => item);
10989
- }
10990
-
10991
- /* cell-position 有关的函数 */
10992
- const isSelectedAllCell = (editor, selectedCellPositions) => {
10993
- if (!AngularEditor.isFocused(editor)) {
10994
- return false;
10995
- }
10996
- const pos = createTablePosition(editor);
10997
- return !!selectedCellPositions.length && pos.getHeight() * pos.getWidth() === selectedCellPositions.length;
10998
- };
10999
- const getSelectedCellPositions = (editor, selectedCells) => {
11000
- return selectedCells === null || selectedCells === void 0 ? void 0 : selectedCells.map((cell) => {
11001
- const path = AngularEditor.findPath(editor, cell);
11002
- const [row, col] = path.slice(-2);
11003
- return { row, col };
11004
- });
11005
- };
11006
- /* 获取一定范围内所有的单元格 */
11007
- const getCellPositionsFromRange = (startRow, startCol, endRow, endCol) => {
11008
- const result = [];
11009
- for (let row = startRow; row < endRow; row++) {
11010
- for (let col = startCol; col < endCol; col++) {
11011
- result.push({ row, col });
11012
- }
11013
- }
11014
- return result;
11015
- };
11016
- /**
11017
- * 去重重复的单元格位置
11018
- * @returns
11019
- */
11020
- const uniqueCellPosition = (cells, selectedCellPositions) => {
11021
- const result = [];
11022
- const modCells = new Set();
11023
- cells.concat(selectedCellPositions).forEach(cell => modCells.add(JSON.stringify(cell)));
11024
- modCells.forEach((cell) => result.push(JSON.parse(cell)));
11025
- return result;
11026
- };
11027
-
11028
11320
  function isSelectedCellMerged(editor) {
11029
11321
  if (editor && editor.selection) {
11030
11322
  const opts = new TableOptions();
@@ -11211,9 +11503,9 @@ class TheContextMenuComponent {
11211
11503
  }
11212
11504
  ngOnInit() { }
11213
11505
  }
11214
- 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 });
11215
- 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 && menuItem.key !== 'background-color'\">\n <ng-template [ngTemplateOutlet]=\"defaultMenuTemplate\" [ngTemplateOutletContext]=\"{ $implicit: menuItem }\"></ng-template>\n </ng-container>\n <ng-container *ngIf=\"menuItem.visibility && menuItem.key === 'background-color'\">\n <ng-template [ngTemplateOutlet]=\"backgroundColorTemplate\" [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 [thyIconName]=\"item.icon\"></thy-icon>\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 #backgroundColorTemplate let-item>\n <a\n href=\"javascript:;\"\n thyDropdownMenuItem\n thyColorPicker\n thyTrigger=\"hover\"\n thyPlacement=\"rightTop\"\n [(ngModel)]=\"item.backgroundColor\"\n (ngModelChange)=\"changeColor($event, item)\"\n [thyHasBackdrop]=\"false\"\n >\n <span thyDropdownMenuItemIcon>\n <thy-icon [thyIconName]=\"item.icon\" thyIconType=\"twotone\" [thyTwotoneColor]=\"item.backgroundColor\"></thy-icon>\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: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4.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"] }, { kind: "directive", type: i5.ThyColorPickerDirective, selector: "[thyColorPicker]", inputs: ["thyOffset", "thyHasBackdrop", "thyDefaultColor", "thyTransparentColorSelectable", "thyPresetColors", "thyPlacement", "thyTrigger", "thyShowDelay", "thyHideDelay"], outputs: ["thyPanelOpen", "thyPanelClose"] }] });
11216
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheContextMenuComponent, decorators: [{
11506
+ TheContextMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TheContextMenuComponent, deps: [{ token: i0.ElementRef }, { token: i1$1.ThyPopoverRef }], target: i0.ɵɵFactoryTarget.Component });
11507
+ TheContextMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", 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 && menuItem.key !== 'background-color'\">\n <ng-template [ngTemplateOutlet]=\"defaultMenuTemplate\" [ngTemplateOutletContext]=\"{ $implicit: menuItem }\"></ng-template>\n </ng-container>\n <ng-container *ngIf=\"menuItem.visibility && menuItem.key === 'background-color'\">\n <ng-template [ngTemplateOutlet]=\"backgroundColorTemplate\" [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 [thyIconName]=\"item.icon\"></thy-icon>\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 #backgroundColorTemplate let-item>\n <a\n href=\"javascript:;\"\n thyDropdownMenuItem\n thyColorPicker\n thyTrigger=\"hover\"\n thyPlacement=\"rightTop\"\n [(ngModel)]=\"item.backgroundColor\"\n (ngModelChange)=\"changeColor($event, item)\"\n [thyHasBackdrop]=\"false\"\n >\n <span thyDropdownMenuItemIcon>\n <thy-icon [thyIconName]=\"item.icon\" thyIconType=\"twotone\" [thyTwotoneColor]=\"item.backgroundColor\"></thy-icon>\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: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4.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"] }, { kind: "directive", type: i5.ThyColorPickerDirective, selector: "[thyColorPicker]", inputs: ["thyOffset", "thyHasBackdrop", "thyDefaultColor", "thyTransparentColorSelectable", "thyPresetColors", "thyPlacement", "thyTrigger", "thyShowDelay", "thyHideDelay"], outputs: ["thyPanelOpen", "thyPanelClose"] }] });
11508
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TheContextMenuComponent, decorators: [{
11217
11509
  type: Component,
11218
11510
  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 && menuItem.key !== 'background-color'\">\n <ng-template [ngTemplateOutlet]=\"defaultMenuTemplate\" [ngTemplateOutletContext]=\"{ $implicit: menuItem }\"></ng-template>\n </ng-container>\n <ng-container *ngIf=\"menuItem.visibility && menuItem.key === 'background-color'\">\n <ng-template [ngTemplateOutlet]=\"backgroundColorTemplate\" [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 [thyIconName]=\"item.icon\"></thy-icon>\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 #backgroundColorTemplate let-item>\n <a\n href=\"javascript:;\"\n thyDropdownMenuItem\n thyColorPicker\n thyTrigger=\"hover\"\n thyPlacement=\"rightTop\"\n [(ngModel)]=\"item.backgroundColor\"\n (ngModelChange)=\"changeColor($event, item)\"\n [thyHasBackdrop]=\"false\"\n >\n <span thyDropdownMenuItemIcon>\n <thy-icon [thyIconName]=\"item.icon\" thyIconType=\"twotone\" [thyTwotoneColor]=\"item.backgroundColor\"></thy-icon>\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" }]
11219
11511
  }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1$1.ThyPopoverRef }]; }, propDecorators: { menuEntities: [{
@@ -11274,32 +11566,80 @@ const setSelectedCellsBackgroundColor = (editor, color, tableStore) => {
11274
11566
  }
11275
11567
  };
11276
11568
 
11569
+ function setTableOptions(editor, newOptions) {
11570
+ const tablePosition = createTablePosition(editor);
11571
+ const tablePath = getTablePath(editor);
11572
+ const table = tablePosition.table;
11573
+ const options = Object.assign(Object.assign({}, table.options), newOptions);
11574
+ Transforms.setNodes(editor, { options }, { at: tablePath });
11575
+ }
11576
+
11577
+ function removeColumnOrRows(editor, tableStore, options) {
11578
+ var _a;
11579
+ const { isSelectedTable } = tableStore;
11580
+ const selectedRowsIndex = (options === null || options === void 0 ? void 0 : options.selectedRowsIndex) || tableStore.selectedRowsIndex;
11581
+ const selectedColumnsIndex = (options === null || options === void 0 ? void 0 : options.selectedColumnsIndex) || tableStore.selectedColumnsIndex;
11582
+ const tablePosition = createTablePosition(editor);
11583
+ if (isSelectedTable) {
11584
+ TableEditor.removeTable(editor);
11585
+ return;
11586
+ }
11587
+ const tableComponent = ELEMENT_TO_COMPONENT.get(tablePosition.table);
11588
+ if (selectedRowsIndex.length > 0 && selectedColumnsIndex.length === 0) {
11589
+ // 删除行时取消标题行
11590
+ if (tablePosition.table && tableComponent.headerRow && selectedRowsIndex.includes(0)) {
11591
+ setTableOptions(editor, { headerRow: false });
11592
+ // headerRow 兼容代码, 取消标题行的时候同时设置 row 中的 header 属性
11593
+ if (tablePosition.table.children[0].header) {
11594
+ const rowPath = TheEditor.findPath(editor, tablePosition.table.children[0]);
11595
+ Transforms.setNodes(editor, { header: null }, { at: rowPath });
11596
+ }
11597
+ }
11598
+ selectedRowsIndex
11599
+ .sort((a, b) => b - a)
11600
+ .forEach(index => {
11601
+ TableEditor.removeRow(editor, index);
11602
+ });
11603
+ tableStore.changeCells();
11604
+ }
11605
+ if (selectedColumnsIndex.length > 0 && selectedRowsIndex.length === 0) {
11606
+ // 删除列时取消标题列
11607
+ if (tablePosition.table && ((_a = tablePosition.table.options) === null || _a === void 0 ? void 0 : _a.headerColumn) && selectedColumnsIndex.includes(0)) {
11608
+ setTableOptions(editor, { headerColumn: false });
11609
+ }
11610
+ selectedColumnsIndex
11611
+ .sort((a, b) => b - a)
11612
+ .forEach(index => {
11613
+ TableEditor.removeColumn(editor, index);
11614
+ });
11615
+ tableStore.changeCells();
11616
+ }
11617
+ }
11618
+
11277
11619
  const getMinAndMaxCellIndex = (editor, selectedCellPositions, maxRow, maxCol, minRow, minCol, table) => {
11278
11620
  const beforeCols = [];
11279
11621
  const beforeRows = [];
11280
11622
  let spanSelectedCells = [];
11281
11623
  if (selectedCellPositions.length) {
11282
- spanSelectedCells = selectedCellPositions
11283
- .map(item => {
11624
+ spanSelectedCells = selectedCellPositions.map(item => {
11284
11625
  const { row, col } = item;
11285
11626
  const node = table.children[row].children[col];
11286
11627
  if (!node.hidden) {
11287
11628
  return Object.assign(Object.assign({}, item), { colspan: node.colspan || 1, rowspan: node.rowspan || 1 });
11288
11629
  }
11289
- })
11290
- .filter(item => item);
11630
+ });
11291
11631
  }
11292
- table.children.map((row, rowIndex) => {
11632
+ table.children.forEach((row, rowIndex) => {
11293
11633
  if (rowIndex <= maxRow) {
11294
- row.children.map((cell, colIndex) => {
11634
+ row.children.forEach((cell, colIndex) => {
11295
11635
  if (colIndex <= maxCol) {
11296
11636
  const cellRowIndex = rowIndex + (cell.rowspan || 1) - 1;
11297
11637
  const cellColIndex = colIndex + (cell.colspan || 1) - 1;
11298
11638
  if (spanSelectedCells.length) {
11299
- const { row: selectRow, col: selectCol, rowspan: selectRowspan, colspan: selectColspan } = spanSelectedCells[0];
11300
- if (selectRow + selectRowspan - 1 >= minRow && selectCol + selectColspan - 1 >= minCol) {
11301
- minRow = Math.min(spanSelectedCells[0].row, minRow);
11302
- minCol = Math.min(spanSelectedCells[0].col, minCol);
11639
+ const { row: selectRow, col: selectCol, rowspan: selectRowSpan, colspan: selectColSpan } = spanSelectedCells[0];
11640
+ if (selectRow + selectRowSpan - 1 >= minRow && selectCol + selectColSpan - 1 >= minCol) {
11641
+ minRow = Math.min(selectRow, minRow);
11642
+ minCol = Math.min(selectCol, minCol);
11303
11643
  }
11304
11644
  }
11305
11645
  if (cell.colspan && cell.colspan > 1) {
@@ -11352,17 +11692,17 @@ class TableStore {
11352
11692
  this.isRightClicking = false;
11353
11693
  this.isFocusedInput = false;
11354
11694
  this.pointerSelection = false;
11355
- this.isSelectedAllCell = () => {
11356
- if (!this.editor.selection)
11357
- return false;
11358
- const pos = createTablePosition(this.editor);
11359
- const selectedCellPositions = this.getSelectedCellPositions();
11360
- return !!selectedCellPositions.length && pos.getHeight() * pos.getWidth() === selectedCellPositions.length;
11361
- };
11695
+ this.areaSelection = false;
11696
+ }
11697
+ initEditor(editor) {
11698
+ this.editor = editor;
11362
11699
  }
11363
11700
  getSelectedCellPositions() {
11364
11701
  return getSelectedCellPositions(this.editor, this.selectedCells$.getValue());
11365
11702
  }
11703
+ publishDangerousCells(value) {
11704
+ return this.dangerousCells$.next(value);
11705
+ }
11366
11706
  setSelectedColumnsAndRowIndex() {
11367
11707
  var _a;
11368
11708
  if (!((_a = this.editor) === null || _a === void 0 ? void 0 : _a.selection)) {
@@ -11410,29 +11750,52 @@ class TableStore {
11410
11750
  this.selectedCells$.next(cellElements);
11411
11751
  this.setSelectedColumnsAndRowIndex();
11412
11752
  }
11413
- initEditor(editor) {
11414
- this.editor = editor;
11415
- }
11416
11753
  selectRow(editor, index) {
11417
- this.clearLastFocusPath();
11418
11754
  const pos = createTablePosition(editor);
11419
- const cells = getCellPositionsFromRange(index, 0, index + 1, pos.getWidth());
11420
- this.setSelectedCells(cells, pos);
11421
- this.focusCell(editor, pos.tableEntry[1].concat([index, 0]));
11755
+ const rangeCells = getCellPositionsFromRange(index, 0, index + 1, pos.getWidth());
11756
+ this.clearLastFocusPath();
11757
+ if (this.isAreaSelectionByType('row', rangeCells)) {
11758
+ this.areaSelectRowAndColumn(rangeCells);
11759
+ }
11760
+ else {
11761
+ this.setSelectedCells(rangeCells, pos);
11762
+ this.focusCell(pos.tableEntry[1].concat([index, 0]));
11763
+ }
11422
11764
  }
11423
11765
  selectColumn(editor, index) {
11424
- this.clearLastFocusPath();
11425
11766
  const pos = createTablePosition(editor);
11426
- const cells = getCellPositionsFromRange(0, index, pos.getHeight(), index + 1);
11427
- this.setSelectedCells(cells, pos);
11428
- this.focusCell(editor, pos.tableEntry[1].concat([0, index]));
11767
+ const rangeCells = getCellPositionsFromRange(0, index, pos.getHeight(), index + 1);
11768
+ this.clearLastFocusPath();
11769
+ if (this.isAreaSelectionByType('col', rangeCells)) {
11770
+ this.areaSelectRowAndColumn(rangeCells);
11771
+ }
11772
+ else {
11773
+ this.setSelectedCells(rangeCells, pos);
11774
+ this.focusCell(pos.tableEntry[1].concat([0, index]));
11775
+ }
11429
11776
  }
11430
11777
  selectTable(editor) {
11431
- this.isSelectedTable = true;
11432
11778
  const pos = createTablePosition(editor);
11433
11779
  const cells = getCellPositionsFromRange(0, 0, pos.getHeight(), pos.getWidth());
11780
+ const lastCell = cells[cells.length - 1];
11781
+ const anchorCellPath = pos.tableEntry[1].concat([lastCell.row, lastCell.col]);
11782
+ this.isSelectedTable = true;
11434
11783
  this.setSelectedCells(cells, pos);
11435
- this.focusCell(editor, pos.tableEntry[1].concat([0, 0]));
11784
+ this.setAreaAnchorCellPath(anchorCellPath);
11785
+ this.focusCell(pos.tableEntry[1].concat([0, 0]));
11786
+ }
11787
+ // 拖选开始 || 记录聚焦点
11788
+ selectCellStart(cell, editor) {
11789
+ const node = AngularEditor.toSlateNode(editor, cell);
11790
+ const path = AngularEditor.findPath(editor, node);
11791
+ this.isPrepareSelecting = true;
11792
+ this.anchorCellPath = path;
11793
+ this.focusCellPath = path;
11794
+ this.focusCellElement = cell;
11795
+ this.lastFocusCellPath = path;
11796
+ if (!this.preFocusCellPath) {
11797
+ this.preFocusCellPath = this.anchorCellPath;
11798
+ }
11436
11799
  }
11437
11800
  // 拖选
11438
11801
  selectCells(editor) {
@@ -11453,6 +11816,13 @@ class TableStore {
11453
11816
  const cells = getCellPositionsFromRange(minRow, minCol, maxRow + 1, maxCol + 1);
11454
11817
  this.setSelectedCells(cells, pos);
11455
11818
  }
11819
+ selectFirstCell() {
11820
+ const selectedCellPositions = this.getSelectedCellPositions();
11821
+ const { row, col } = selectedCellPositions[0];
11822
+ const tablePath = getTablePath(this.editor);
11823
+ const path = Editor.start(this.editor, [...tablePath, row, col]);
11824
+ Transforms.select(this.editor, path);
11825
+ }
11456
11826
  // 选择单元格
11457
11827
  selectCell(cell, editor) {
11458
11828
  var _a;
@@ -11463,80 +11833,37 @@ class TableStore {
11463
11833
  this.focusCellElement = cell;
11464
11834
  const [row, col] = path.slice(-2);
11465
11835
  const pos = createTablePosition(editor);
11466
- const result = [{ row, col }];
11836
+ const cells = [{ row, col }];
11467
11837
  const selectedCellPositions = this.getSelectedCellPositions();
11468
11838
  if (this.pointerSelection) {
11469
- result.push(...selectedCellPositions);
11839
+ cells.push(...selectedCellPositions);
11470
11840
  // 处理单元格选中时,处理为选中多单元格
11471
11841
  const selectedCells = getCellPositionsBeforeMerge(this.editor, { row, col });
11472
- result.push(...selectedCells);
11842
+ cells.push(...selectedCells);
11473
11843
  // 已聚焦的单元格在多选模式下选中(暂存上次聚焦的单元格数据)
11474
11844
  const focusCell = (_a = this.lastFocusCellPath) === null || _a === void 0 ? void 0 : _a.slice(-2);
11475
11845
  if (focusCell) {
11476
11846
  const focusCells = getCellPositionsBeforeMerge(this.editor, { row: focusCell[0], col: focusCell[1] });
11477
- result.push(...focusCells);
11847
+ cells.push(...focusCells);
11478
11848
  }
11479
11849
  }
11480
- this.setSelectedCells(result, pos);
11481
- }
11482
- selectedCellsChange() {
11483
- return this.selectedCells$.asObservable().pipe(skip(1));
11484
- }
11485
- cellsPositionChange() {
11486
- return this.cellsChangeObject$.asObservable();
11487
- }
11488
- changeCells() {
11489
- this.cellsChangeObject$.next();
11490
- }
11491
- emitTableChange() {
11492
- this.tableChange$.next();
11493
- }
11494
- tableChange() {
11495
- return this.tableChange$.asObservable();
11496
- }
11497
- clearSelectedCells() {
11498
- this.selectedColumnsIndex = [];
11499
- this.selectedRowsIndex = [];
11500
- this.isSelectedTable = false;
11501
- this.isCellSelecting = false;
11502
- this.isRightClicking = false;
11503
- this.isFocusedInput = false;
11504
- this.selectedCells$.next([]);
11505
- }
11506
- clearLastFocusPath() {
11507
- this.lastFocusCellPath = null;
11508
- }
11509
- // 拖选开始 || 记录聚焦点
11510
- selectCellStart(cell, editor) {
11511
- this.isPrepareSelecting = true;
11512
- const node = AngularEditor.toSlateNode(editor, cell);
11513
- const path = AngularEditor.findPath(editor, node);
11514
- this.anchorCellPath = path;
11515
- this.lastFocusCellPath = path;
11516
- if (!this.preFocusCellPath) {
11517
- this.preFocusCellPath = this.anchorCellPath;
11518
- }
11850
+ this.setSelectedCells(cells, pos);
11519
11851
  }
11520
11852
  selectCellOngoing(cell, editor) {
11521
- if (AngularEditor.isReadonly(editor)) {
11522
- return;
11523
- }
11524
- if (!editor.selection) {
11853
+ if (AngularEditor.isReadonly(editor) || !editor.selection) {
11525
11854
  return;
11526
11855
  }
11527
11856
  let isChanged;
11528
11857
  if (cell) {
11529
11858
  const node = AngularEditor.toSlateNode(editor, cell);
11530
11859
  const path = AngularEditor.findPath(editor, node);
11531
- isChanged = !this.focusCellPath || this.focusCellPath.toString() !== path.toString();
11860
+ isChanged = !this.focusCellPath || !Path.equals(this.focusCellPath, path);
11532
11861
  this.focusCellPath = path;
11533
11862
  this.focusCellElement = cell;
11534
11863
  }
11535
11864
  else {
11536
11865
  const selectedCellPositions = this.getSelectedCellPositions();
11537
- isChanged =
11538
- !this.focusCellPath ||
11539
- (this.focusCellPath.toString() === this.anchorCellPath.toString() && selectedCellPositions.length === 0);
11866
+ isChanged = !this.focusCellPath || (Path.equals(this.focusCellPath, this.anchorCellPath) && selectedCellPositions.length === 0);
11540
11867
  }
11541
11868
  if (this.isPrepareSelecting && isChanged) {
11542
11869
  if (JSON.stringify(this.preFocusCellPath) !== JSON.stringify(this.focusCellPath)) {
@@ -11546,18 +11873,41 @@ class TableStore {
11546
11873
  }
11547
11874
  }
11548
11875
  }
11876
+ clearSelectedCells() {
11877
+ console.log('clearSelectedCells');
11878
+ this.selectedColumnsIndex = [];
11879
+ this.selectedRowsIndex = [];
11880
+ this.isSelectedTable = false;
11881
+ this.isCellSelecting = false;
11882
+ this.isRightClicking = false;
11883
+ this.isFocusedInput = false;
11884
+ this.selectedCells$.next([]);
11885
+ }
11886
+ clearLastFocusPath() {
11887
+ this.lastFocusCellPath = null;
11888
+ }
11889
+ selectedCellsChange() {
11890
+ return this.selectedCells$.asObservable().pipe(skip(1));
11891
+ }
11892
+ cellsPositionChange() {
11893
+ return this.cellsChangeObject$.asObservable();
11894
+ }
11895
+ changeCells() {
11896
+ this.cellsChangeObject$.next();
11897
+ }
11898
+ emitTableChange() {
11899
+ this.tableChange$.next();
11900
+ }
11901
+ tableChange() {
11902
+ return this.tableChange$.asObservable();
11903
+ }
11549
11904
  selectCellEnd(editor) {
11550
11905
  if (this.isCellSelecting) {
11551
- this.focusCell(editor, this.focusCellPath);
11906
+ this.focusCell(this.focusCellPath);
11552
11907
  }
11553
11908
  this.isPrepareSelecting = false;
11554
11909
  this.preFocusCellPath = null;
11555
11910
  }
11556
- focusCell(editor, path) {
11557
- const at = Editor.start(editor, path);
11558
- TheEditor.focus(this.editor);
11559
- Transforms.select(editor, at);
11560
- }
11561
11911
  dangerousCellsChange() {
11562
11912
  return this.dangerousCells$.asObservable().pipe(skip(1));
11563
11913
  }
@@ -11629,13 +11979,6 @@ class TableStore {
11629
11979
  this.dangerousColumnsIndex = [...Array(pos.getWidth())].map((_, i) => i);
11630
11980
  this.dangerousCells$.next(cells);
11631
11981
  }
11632
- selectFirstCell() {
11633
- const selectedCellPositions = this.getSelectedCellPositions();
11634
- const { row, col } = selectedCellPositions[0];
11635
- const tablePath = getTablePath(this.editor);
11636
- const path = Editor.start(this.editor, [...tablePath, row, col]);
11637
- Transforms.select(this.editor, path);
11638
- }
11639
11982
  setSelectedCellsBackgroundColor(backgroundColor) {
11640
11983
  const cells = this.selectedCells$.getValue();
11641
11984
  Editor.withoutNormalizing(this.editor, () => {
@@ -11659,60 +12002,111 @@ class TableStore {
11659
12002
  Transforms.select(this.editor, Editor.start(this.editor, tablePosition.cellEntry[1]));
11660
12003
  }
11661
12004
  }
11662
- setTableOptions(editor, newOptions) {
11663
- const tablePosition = createTablePosition(editor);
11664
- const tablePath = getTablePath(this.editor);
11665
- const table = tablePosition.table;
11666
- const options = Object.assign(Object.assign({}, table.options), newOptions);
11667
- Transforms.setNodes(editor, { options }, { at: tablePath });
12005
+ /**
12006
+ * 聚焦单元格并设置聚焦相关路径及元素
12007
+ */
12008
+ focusCell(path) {
12009
+ const node = Node.get(this.editor, path);
12010
+ const cellHTMLElement = AngularEditor.toDOMNode(this.editor, node);
12011
+ this.preFocusCellPath = this.focusCellPath;
12012
+ this.focusCellPath = path;
12013
+ this.focusCellElement = cellHTMLElement;
12014
+ focusCell(this.editor, path);
11668
12015
  }
11669
- removeDangerousColumnsOrRows() {
11670
- const { dangerousRowsIndex, dangerousColumnsIndex } = this;
11671
- this.removeColumnOrRows(dangerousRowsIndex, dangerousColumnsIndex);
12016
+ /**
12017
+ * 区域选择开始
12018
+ * @param editor 编辑器对象
12019
+ * @param cell 单元格元素
12020
+ */
12021
+ areaSelectionStart(cell, editor) {
12022
+ const node = AngularEditor.toSlateNode(editor, cell);
12023
+ const path = AngularEditor.findPath(editor, node);
12024
+ this.isPrepareSelecting = true;
12025
+ this.lastFocusCellPath = path;
12026
+ if (!this.preFocusCellPath) {
12027
+ this.preFocusCellPath = this.anchorCellPath;
12028
+ }
11672
12029
  }
11673
- removeColumnOrRows(selectedRowIndexs = this.selectedRowsIndex, selectedColumnIndexs = this.selectedColumnsIndex) {
11674
- var _a;
11675
- const { isSelectedTable } = this;
11676
- const tablePosition = createTablePosition(this.editor);
11677
- if (isSelectedTable) {
11678
- TableEditor.removeTable(this.editor);
12030
+ /**
12031
+ * 设置区域选择的单元格
12032
+ * @param cellElement 单元格元素
12033
+ */
12034
+ setAreaSelectionCells(cellElement) {
12035
+ if (AngularEditor.isReadonly(this.editor) || !this.editor.selection || !this.isPrepareSelecting) {
11679
12036
  return;
11680
12037
  }
11681
- const tableComponent = ELEMENT_TO_COMPONENT.get(tablePosition.table);
11682
- if (selectedRowIndexs.length > 0 && selectedColumnIndexs.length === 0) {
11683
- // 删除行时取消标题行
11684
- if (tablePosition.table && tableComponent.headerRow && selectedRowIndexs.includes(0)) {
11685
- this.setTableOptions(this.editor, { headerRow: false });
11686
- // headerRow 兼容代码, 取消标题行的时候同时设置 row 中的 header 属性
11687
- if (tablePosition.table.children[0].header) {
11688
- const rowPath = TheEditor.findPath(this.editor, tablePosition.table.children[0]);
11689
- Transforms.setNodes(this.editor, { header: null }, { at: rowPath });
11690
- }
11691
- }
11692
- selectedRowIndexs
11693
- .sort((a, b) => b - a)
11694
- .forEach(index => {
11695
- TableEditor.removeRow(this.editor, index);
11696
- });
11697
- this.changeCells();
12038
+ const currentCellPath = AngularEditor.findPath(this.editor, cellElement);
12039
+ const selectedCellPositions = this.getSelectedCellPositions();
12040
+ const selectEqual = Path.equals(currentCellPath, this.anchorCellPath);
12041
+ // 不可以区域选择单一单元格
12042
+ if (selectedCellPositions.length <= 1 && selectEqual) {
12043
+ return;
11698
12044
  }
11699
- if (selectedColumnIndexs.length > 0 && selectedRowIndexs.length === 0) {
11700
- // 删除列时取消标题列
11701
- if (tablePosition.table && ((_a = tablePosition.table.options) === null || _a === void 0 ? void 0 : _a.headerColumn) && selectedColumnIndexs.includes(0)) {
11702
- this.setTableOptions(this.editor, { headerColumn: false });
11703
- }
11704
- selectedColumnIndexs
11705
- .sort((a, b) => b - a)
11706
- .forEach(index => {
11707
- TableEditor.removeColumn(this.editor, index);
11708
- });
11709
- this.changeCells();
12045
+ this.isCellSelecting = true;
12046
+ this.focusCell(currentCellPath);
12047
+ this.selectCells(this.editor);
12048
+ }
12049
+ /**
12050
+ * 判断选择整列/整行时是否符合区域选择规则
12051
+ * @param type 选择类型
12052
+ * @param cells 本次选择的单元格
12053
+ * @returns 是否符合区域选择规则
12054
+ */
12055
+ isAreaSelectionByType(type, cells) {
12056
+ if (!this.focusCellPath) {
12057
+ return false;
12058
+ }
12059
+ const selectedCells = this.getSelectedCellPositions();
12060
+ const sortRows = cells.map(item => item.row).sort((m, n) => m - n);
12061
+ const sortCols = cells.map(item => item.col).sort((m, n) => m - n);
12062
+ const startRow = sortRows[0];
12063
+ const startCol = sortCols[0];
12064
+ const [row, col] = this.focusCellPath.slice(-2);
12065
+ if (type === 'row') {
12066
+ return this.areaSelection && selectedCells.length === 0 && row !== startRow;
12067
+ }
12068
+ if (type === 'col') {
12069
+ return this.areaSelection && selectedCells.length === 0 && col !== startCol;
12070
+ }
12071
+ }
12072
+ /**
12073
+ * 处理区域选择启用时选择整行/整列
12074
+ * @param cells 选择的单元格
12075
+ */
12076
+ areaSelectRowAndColumn(cells) {
12077
+ const pos = createTablePosition(this.editor);
12078
+ const selectedCells = this.getSelectedCellPositions();
12079
+ let selectCells = [...selectedCells, ...cells];
12080
+ // 处理仅聚焦单元格但当前没有已选中的单元格时
12081
+ if (selectedCells.length === 0) {
12082
+ const [row, col] = this.focusCellPath.slice(-2);
12083
+ selectCells = [{ row, col }, ...cells];
12084
+ }
12085
+ const sortRows = selectCells.map(item => item.row).sort((m, n) => m - n);
12086
+ const sortCols = selectCells.map(item => item.col).sort((m, n) => m - n);
12087
+ const startRow = sortRows[0];
12088
+ const startCol = sortCols[0];
12089
+ const endRow = sortCols[sortCols.length - 1];
12090
+ const endCol = sortRows[sortRows.length - 1];
12091
+ const anchorCellPath = pos.tableEntry[1].concat([endCol, endRow]);
12092
+ const focusCellPath = pos.tableEntry[1].concat([startRow, startCol]);
12093
+ this.setAreaAnchorCellPath(anchorCellPath);
12094
+ this.focusCell(focusCellPath);
12095
+ this.selectCells(this.editor);
12096
+ }
12097
+ /**
12098
+ * 设置区域选择触发时的指定 anchorCellPath
12099
+ * @param path 路径
12100
+ */
12101
+ setAreaAnchorCellPath(path) {
12102
+ if (this.areaSelection && path) {
12103
+ this.anchorCellPath = path;
11710
12104
  }
11711
12105
  }
11712
12106
  }
11713
- TableStore.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TableStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
11714
- TableStore.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TableStore });
11715
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TableStore, decorators: [{
12107
+ TableStore.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TableStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
12108
+ TableStore.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TableStore });
12109
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TableStore, decorators: [{
11716
12110
  type: Injectable
11717
12111
  }], ctorParameters: function () { return []; } });
11718
12112
 
@@ -11841,7 +12235,10 @@ class TheTableContextMenuService {
11841
12235
  name: '删除所在行',
11842
12236
  visibility: true,
11843
12237
  actionHandle: () => {
11844
- this.tableStore.removeDangerousColumnsOrRows();
12238
+ removeColumnOrRows(this.editor, this.tableStore, {
12239
+ selectedColumnsIndex: this.tableStore.dangerousColumnsIndex,
12240
+ selectedRowsIndex: this.tableStore.dangerousRowsIndex
12241
+ });
11845
12242
  this.tableStore.clearDangerousCells();
11846
12243
  this.tableStore.clearSelectedCells();
11847
12244
  },
@@ -11856,7 +12253,10 @@ class TheTableContextMenuService {
11856
12253
  name: '删除所在列',
11857
12254
  visibility: true,
11858
12255
  actionHandle: () => {
11859
- this.tableStore.removeDangerousColumnsOrRows();
12256
+ removeColumnOrRows(this.editor, this.tableStore, {
12257
+ selectedColumnsIndex: this.tableStore.dangerousColumnsIndex,
12258
+ selectedRowsIndex: this.tableStore.dangerousRowsIndex
12259
+ });
11860
12260
  this.tableStore.clearDangerousCells();
11861
12261
  this.tableStore.clearSelectedCells();
11862
12262
  },
@@ -11967,9 +12367,9 @@ class TheTableContextMenuService {
11967
12367
  }
11968
12368
  }
11969
12369
  }
11970
- TheTableContextMenuService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheTableContextMenuService, deps: [{ token: TableStore }, { token: i1$1.ThyPopover }, { token: i0.NgZone }, { token: TheContextService }], target: i0.ɵɵFactoryTarget.Injectable });
11971
- TheTableContextMenuService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheTableContextMenuService });
11972
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheTableContextMenuService, decorators: [{
12370
+ TheTableContextMenuService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TheTableContextMenuService, deps: [{ token: TableStore }, { token: i1$1.ThyPopover }, { token: i0.NgZone }, { token: TheContextService }], target: i0.ɵɵFactoryTarget.Injectable });
12371
+ TheTableContextMenuService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TheTableContextMenuService });
12372
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TheTableContextMenuService, decorators: [{
11973
12373
  type: Injectable
11974
12374
  }], ctorParameters: function () { return [{ type: TableStore }, { type: i1$1.ThyPopover }, { type: i0.NgZone }, { type: TheContextService }]; } });
11975
12375
 
@@ -12015,7 +12415,7 @@ class TheTableOptionsComponent {
12015
12415
  currentOption.isActive = !option.isActive;
12016
12416
  const tableOption = {};
12017
12417
  tableOption[option.key] = currentOption.isActive || false;
12018
- this.tableStore.setTableOptions(this.editor, Object.assign({}, tableOption));
12418
+ setTableOptions(this.editor, Object.assign({}, tableOption));
12019
12419
  // headerRow 兼容代码, 取消标题行的时候同时设置 row 中的 header 属性
12020
12420
  if (option.key === TableOperations.headerRow && !tableOption[option.key] && this.table.children[0].header) {
12021
12421
  const rowPath = TheEditor.findPath(this.editor, this.table.children[0]);
@@ -12023,8 +12423,8 @@ class TheTableOptionsComponent {
12023
12423
  }
12024
12424
  }
12025
12425
  }
12026
- 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 });
12027
- 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: `
12426
+ TheTableOptionsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TheTableOptionsComponent, deps: [{ token: i1$1.ThyPopoverRef }], target: i0.ɵɵFactoryTarget.Component });
12427
+ TheTableOptionsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: TheTableOptionsComponent, selector: "the-table-options", inputs: { editor: "editor" }, ngImport: i0, template: `
12028
12428
  <div class="thy-dropdown-menu table-drop-menu">
12029
12429
  <ng-container *ngFor="let option of tableDropdownList">
12030
12430
  <a thyDropdownMenuItem href="javascript:;" (mousedown)="setTableOptions($event, option)">
@@ -12036,7 +12436,7 @@ TheTableOptionsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0
12036
12436
  </ng-container>
12037
12437
  </div>
12038
12438
  `, 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]" }] });
12039
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheTableOptionsComponent, decorators: [{
12439
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TheTableOptionsComponent, decorators: [{
12040
12440
  type: Component,
12041
12441
  args: [{
12042
12442
  selector: 'the-table-options',
@@ -12053,9 +12453,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
12053
12453
  </div>
12054
12454
  `
12055
12455
  }]
12056
- }], ctorParameters: function () { return [{ type: i1$1.ThyPopoverRef }]; }, propDecorators: { tableStore: [{
12057
- type: Input
12058
- }], editor: [{
12456
+ }], ctorParameters: function () { return [{ type: i1$1.ThyPopoverRef }]; }, propDecorators: { editor: [{
12059
12457
  type: Input
12060
12458
  }] } });
12061
12459
 
@@ -12149,7 +12547,7 @@ class TheTableToolbarComponent {
12149
12547
  }
12150
12548
  onDelete(event) {
12151
12549
  event.preventDefault();
12152
- this.tableStore.removeColumnOrRows();
12550
+ removeColumnOrRows(this.editor, this.tableStore);
12153
12551
  this.tableStore.clearDangerousCells();
12154
12552
  this.tableStore.clearSelectedCells();
12155
12553
  this.popoverRef.close();
@@ -12197,7 +12595,6 @@ class TheTableToolbarComponent {
12197
12595
  this.thyPopover.open(TheTableOptionsComponent, {
12198
12596
  origin: event.currentTarget,
12199
12597
  initialState: {
12200
- tableStore: this.tableStore,
12201
12598
  editor: this.editor
12202
12599
  },
12203
12600
  minWidth: 0,
@@ -12210,9 +12607,9 @@ class TheTableToolbarComponent {
12210
12607
  });
12211
12608
  }
12212
12609
  }
12213
- TheTableToolbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheTableToolbarComponent, deps: [{ token: i1$1.ThyPopover }, { token: i1$1.ThyPopoverRef }, { token: i1$2.ThyNotifyService }], target: i0.ɵɵFactoryTarget.Component });
12214
- 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\n href=\"javascript:;\"\n thyAction\n thyTooltip=\"\u5355\u5143\u683C\u80CC\u666F\"\n thyColorPicker\n [(ngModel)]=\"selectedColor\"\n (ngModelChange)=\"changeColor($event)\"\n (mousedown)=\"openColorPanel($event)\"\n thyPlacement=\"bottomLeft\"\n [thyHasBackdrop]=\"false\"\n >\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: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4.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"] }, { kind: "directive", type: i5.ThyColorPickerDirective, selector: "[thyColorPicker]", inputs: ["thyOffset", "thyHasBackdrop", "thyDefaultColor", "thyTransparentColorSelectable", "thyPresetColors", "thyPlacement", "thyTrigger", "thyShowDelay", "thyHideDelay"], outputs: ["thyPanelOpen", "thyPanelClose"] }] });
12215
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheTableToolbarComponent, decorators: [{
12610
+ TheTableToolbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TheTableToolbarComponent, deps: [{ token: i1$1.ThyPopover }, { token: i1$1.ThyPopoverRef }, { token: i1$2.ThyNotifyService }], target: i0.ɵɵFactoryTarget.Component });
12611
+ TheTableToolbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", 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\n href=\"javascript:;\"\n thyAction\n thyTooltip=\"\u5355\u5143\u683C\u80CC\u666F\"\n thyColorPicker\n [(ngModel)]=\"selectedColor\"\n (ngModelChange)=\"changeColor($event)\"\n (mousedown)=\"openColorPanel($event)\"\n thyPlacement=\"bottomLeft\"\n [thyHasBackdrop]=\"false\"\n >\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: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4.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"] }, { kind: "directive", type: i5.ThyColorPickerDirective, selector: "[thyColorPicker]", inputs: ["thyOffset", "thyHasBackdrop", "thyDefaultColor", "thyTransparentColorSelectable", "thyPresetColors", "thyPlacement", "thyTrigger", "thyShowDelay", "thyHideDelay"], outputs: ["thyPanelOpen", "thyPanelClose"] }] });
12612
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TheTableToolbarComponent, decorators: [{
12216
12613
  type: Component,
12217
12614
  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\n href=\"javascript:;\"\n thyAction\n thyTooltip=\"\u5355\u5143\u683C\u80CC\u666F\"\n thyColorPicker\n [(ngModel)]=\"selectedColor\"\n (ngModelChange)=\"changeColor($event)\"\n (mousedown)=\"openColorPanel($event)\"\n thyPlacement=\"bottomLeft\"\n [thyHasBackdrop]=\"false\"\n >\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" }]
12218
12615
  }], ctorParameters: function () { return [{ type: i1$1.ThyPopover }, { type: i1$1.ThyPopoverRef }, { type: i1$2.ThyNotifyService }]; }, propDecorators: { tableStore: [{
@@ -12231,393 +12628,183 @@ class TableService {
12231
12628
  get isOpened() {
12232
12629
  return this.toolbarRef && this.toolbarRef.componentInstance;
12233
12630
  }
12234
- constructor(thyPopover, overlay, tableStore, theTableContextMenuService, ngZone, theContextService) {
12631
+ constructor(thyPopover, overlay, tableStore, ngZone, theContextService) {
12235
12632
  this.thyPopover = thyPopover;
12236
12633
  this.overlay = overlay;
12237
12634
  this.tableStore = tableStore;
12238
- this.theTableContextMenuService = theTableContextMenuService;
12239
12635
  this.ngZone = ngZone;
12240
- this.theContextService = theContextService;
12241
- this.backdropClosable = false;
12242
- this.hasBackdrop = false;
12243
- this.insideClosable = false;
12244
- this.placement = 'topLeft';
12245
- this.offset = 8;
12246
- }
12247
- openToolbar(origin, tableElement) {
12248
- if (this.isOpened) {
12249
- if (this.toolbarRef.containerInstance.config.origin === origin) {
12250
- return;
12251
- }
12252
- this.toolbarRef.close();
12253
- }
12254
- this.toolbarRef = this.thyPopover.open(TheTableToolbarComponent, {
12255
- initialState: {
12256
- tableStore: this.tableStore,
12257
- tableElement
12258
- },
12259
- viewContainerRef: this.theContextService.getOptions().viewContainerRef,
12260
- origin: this.getOrigin(origin),
12261
- backdropClosable: this.backdropClosable,
12262
- panelClass: 'the-plugin-toolbar-popover',
12263
- placement: this.placement,
12264
- offset: this.offset,
12265
- hasBackdrop: this.hasBackdrop,
12266
- insideClosable: this.insideClosable,
12267
- minWidth: 0,
12268
- scrollStrategy: this.overlay.scrollStrategies.reposition(),
12269
- manualClosure: true
12270
- });
12271
- if (this.toolbarRef) {
12272
- this.toolbarRef
12273
- .getOverlayRef()
12274
- .outsidePointerEvents()
12275
- .pipe(skip(1))
12276
- .subscribe(event => {
12277
- if (isColorPanel(event.target)) {
12278
- return;
12279
- }
12280
- if (!this.toolbarRef.getOverlayRef().hostElement.contains(event.target)) {
12281
- this.closeToolbar();
12282
- }
12283
- });
12284
- }
12285
- }
12286
- afterSelectedCells(origin, element) {
12287
- this.theTableContextMenuService.closeContextMenu();
12288
- this.openToolbar(origin, element);
12289
- }
12290
- getOrigin(origin) {
12291
- if (origin instanceof HTMLTableCellElement && origin.tagName !== 'TH') {
12292
- const { selectedRowsIndex, selectedColumnsIndex, focusCellPath, isSelectedTable, focusCellElement } = this.tableStore;
12293
- const [row, col] = focusCellPath.slice(-2);
12294
- const tableElement = focusCellElement.closest('.the-table-container');
12295
- if (isSelectedTable && col === 0 && row === 0) {
12296
- return tableElement.querySelector('.the-table-corner-controls');
12297
- }
12298
- if (selectedColumnsIndex.length > 0 && row === 0) {
12299
- return tableElement.querySelectorAll('.the-table-col-controls')[col];
12300
- }
12301
- if (selectedRowsIndex.length > 0 && col === 0) {
12302
- return tableElement.querySelectorAll('.the-table-row-controls-button-wrap')[row];
12303
- }
12304
- }
12305
- return origin;
12306
- }
12307
- closeToolbar() {
12308
- if (this.isOpened) {
12309
- this.ngZone.run(() => {
12310
- this.toolbarRef.close();
12311
- });
12312
- return this.toolbarRef.afterClosed();
12313
- }
12314
- }
12315
- }
12316
- 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 });
12317
- TableService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TableService });
12318
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TableService, decorators: [{
12319
- type: Injectable
12320
- }], ctorParameters: function () { return [{ type: i1$1.ThyPopover }, { type: i2$1.Overlay }, { type: TableStore }, { type: TheTableContextMenuService }, { type: i0.NgZone }, { type: TheContextService }]; } });
12321
-
12322
- function isVirtualKey(e) {
12323
- const isMod = e.ctrlKey || e.metaKey;
12324
- const isAlt = isKeyHotkey('alt', e);
12325
- const isShift = isKeyHotkey('shift', e);
12326
- const isCapsLock = e.key.includes('CapsLock');
12327
- const isTab = e.key.includes('Tab');
12328
- const isEsc = e.key.includes('Escape');
12329
- const isF = e.key.startsWith('F');
12330
- const isArrow = e.key.includes('Arrow') ? true : false;
12331
- return isCapsLock || isMod || isAlt || isArrow || isShift || isTab || isEsc || isF;
12332
- }
12333
-
12334
- class TableFreezeColumnPipe {
12335
- transform(table, tablePluginOptions) {
12336
- var _a, _b, _c;
12337
- const rows = (_a = table.children) === null || _a === void 0 ? void 0 : _a.map(item => item.children);
12338
- const headerColumnWidth = table.columns && table.columns[0].width;
12339
- const tableComponent = ELEMENT_TO_COMPONENT.get(table);
12340
- let stickyColumn = true;
12341
- let buffer = TABLE_CONTROL;
12342
- if ((_b = table.options) === null || _b === void 0 ? void 0 : _b.numberedColumn) {
12343
- buffer = TABLE_NUMBER_COLUMN + TABLE_CONTROL;
12344
- }
12345
- if (tableComponent) {
12346
- const tableWidth = getElementWidth(tableComponent.elementRef.nativeElement);
12347
- stickyColumn = headerColumnWidth + buffer < tableWidth;
12348
- }
12349
- // 标题列存在合并的列时,取消冻结
12350
- const mergeColumnCells = rows && rows.map(cells => cells[0]).filter(item => item.colspan && item.colspan !== 1);
12351
- return !!((tablePluginOptions === null || tablePluginOptions === void 0 ? void 0 : tablePluginOptions.freezeColumnHeader) && ((_c = table.options) === null || _c === void 0 ? void 0 : _c.headerColumn) && !mergeColumnCells.length && stickyColumn);
12352
- }
12353
- }
12354
- TableFreezeColumnPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TableFreezeColumnPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
12355
- TableFreezeColumnPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.2", ngImport: i0, type: TableFreezeColumnPipe, name: "freezeColumn" });
12356
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TableFreezeColumnPipe, decorators: [{
12357
- type: Pipe,
12358
- args: [{ name: 'freezeColumn' }]
12359
- }] });
12360
- class TableFreezeRowPipe {
12361
- transform(table, headerRow, tablePluginOptions) {
12362
- var _a;
12363
- // 标题行存在合并的行时,取消冻结
12364
- if (table.children) {
12365
- const mergeRows = (_a = table.children[0]) === null || _a === void 0 ? void 0 : _a.children.filter(item => item.rowspan && item.rowspan !== 1);
12366
- return !!(headerRow && !mergeRows.length && (tablePluginOptions === null || tablePluginOptions === void 0 ? void 0 : tablePluginOptions.freezeRowHeader));
12367
- }
12368
- return false;
12369
- }
12370
- }
12371
- TableFreezeRowPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TableFreezeRowPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
12372
- TableFreezeRowPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.2", ngImport: i0, type: TableFreezeRowPipe, name: "freezeRow" });
12373
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TableFreezeRowPipe, decorators: [{
12374
- type: Pipe,
12375
- args: [{ name: 'freezeRow' }]
12376
- }] });
12377
-
12378
- /**
12379
- * 获取标题行网格列宽值
12380
- * @param editor
12381
- * @param headerRow 标题行
12382
- * @param cellsWidth
12383
- * @returns string
12384
- */
12385
- const getGridColumns = (headerRow, cellsWidth) => {
12386
- let result = '';
12387
- Array.from(headerRow.childNodes)
12388
- .filter((n) => n.nodeType === 1)
12389
- .forEach((node, i) => {
12390
- var _a;
12391
- const col = node.getAttribute('colspan');
12392
- const display = node.style.display;
12393
- if (display === 'none') {
12394
- return;
12395
- }
12396
- if (col) {
12397
- const colSpan = (_a = Number(col)) !== null && _a !== void 0 ? _a : 1;
12398
- let width = 0;
12399
- Array.from({ length: colSpan }, (_, j) => {
12400
- width += cellsWidth[i + j];
12401
- });
12402
- result += width + 'px ';
12403
- }
12404
- else {
12405
- result += cellsWidth[i] + 'px ';
12406
- }
12407
- });
12408
- return result;
12409
- };
12410
- const getColumnsWidth = (cellRow, isColgroup = false) => {
12411
- const result = [];
12412
- Array.from(cellRow.childNodes)
12413
- .filter((n) => n.nodeType === 1)
12414
- .forEach((item) => {
12415
- if (isColgroup && IS_SAFARI) {
12416
- result.push(item.offsetWidth);
12417
- return;
12418
- }
12419
- if (item.getBoundingClientRect) {
12420
- result.push(item.getBoundingClientRect().width);
12421
- }
12422
- });
12423
- return result;
12424
- };
12425
- /**
12426
- * 计算表格列宽
12427
- * @param isReadonly
12428
- * @param element
12429
- * @param tableWidth
12430
- * @param mode
12431
- * @returns number[]
12432
- */
12433
- const calcColumnGroups = (isReadonly, element, tableWidth, mode) => {
12434
- const columns = element === null || element === void 0 ? void 0 : element.columns;
12435
- if (isReadonly) {
12436
- if (columns) {
12437
- const opts = new TableOptions();
12438
- const isPrint = mode === TheMode.print;
12439
- const newColumns = isPrint
12440
- ? calcPrintColumnWidth(element, opts.minWidthPx)
12441
- : calcColumnWidth(element, tableWidth, opts.minWidthPx);
12442
- return newColumns;
12443
- }
12444
- return [];
12445
- }
12446
- else {
12447
- return columns;
12448
- }
12449
- };
12450
- /**
12451
- * 计算表格列宽
12452
- * @param element
12453
- * @param tableWidth
12454
- * @param minWidthPx
12455
- * @returns number[]
12456
- */
12457
- const calcColumnWidth = (element, tableWidth, minWidthPx) => {
12458
- var _a;
12459
- const columns = element === null || element === void 0 ? void 0 : element.columns;
12460
- const numberedColumnWidth = ((_a = element === null || element === void 0 ? void 0 : element.options) === null || _a === void 0 ? void 0 : _a.numberedColumn) ? TABLE_NUMBER_COLUMN : 0;
12461
- const columnsWidth = columns.reduce((a, b) => a + b.width, 0);
12462
- // 总列宽大于当前表格宽度时,按照设置时的总列宽计算
12463
- const columnTotalWidth = Math.max(columnsWidth, tableWidth - numberedColumnWidth);
12464
- return columns.map(column => {
12465
- const cellWidth = (column.width / columnsWidth) * columnTotalWidth;
12466
- return { width: Math.max(cellWidth, minWidthPx) };
12467
- });
12468
- };
12469
- /**
12470
- * 打印模式下,按照原宽度比例基于当前表格宽度计算列宽
12471
- * 1. 所有列的最小列宽总和大于表格宽度时,所有列返回最小宽度
12472
- * @param element
12473
- * @param minWidthPx
12474
- * @returns number[]
12475
- */
12476
- const calcPrintColumnWidth = (element, minWidthPx) => {
12477
- var _a;
12478
- const columns = element === null || element === void 0 ? void 0 : element.columns;
12479
- const numberedColumnWidth = ((_a = element === null || element === void 0 ? void 0 : element.options) === null || _a === void 0 ? void 0 : _a.numberedColumn) ? TABLE_NUMBER_COLUMN : 0;
12480
- // 按照 DPI 96 的 A4 纸宽度是 794, 打印时左右 80px 的边距,所以这里取 794 - 80 * 2 = 634
12481
- // 如果存在序号列,还需要在 634 基础上减去序号列的宽度,剩下的才是内容区域的宽度
12482
- let columnTotalWidth = 634 - numberedColumnWidth;
12483
- const columnsWidth = columns.reduce((a, b) => a + b.width, 0);
12484
- // 计算所有列的 minWidth 总和
12485
- const totalMinWidth = minWidthPx * columns.length;
12486
- if (totalMinWidth > columnTotalWidth) {
12487
- // 如果所有列的 minWidth 总和大于 columnTotalWidth,所有列返回最小宽度
12488
- return columns.map(() => ({ width: minWidthPx }));
12489
- }
12490
- // 在剩余的宽度中按比例分配
12491
- const remainingWidth = columnTotalWidth - totalMinWidth;
12492
- const remainingWidthRatio = columns.map(column => column.width / columnsWidth);
12493
- // 为什么减 1, 因为这个宽度是内容区域宽度,但 td 右侧还有一个边框,所以减去 1
12494
- let newColumnsWidth = remainingWidthRatio.map(ratio => minWidthPx + Math.floor(ratio * remainingWidth) - 1);
12495
- return columns.map((_, index) => ({
12496
- width: newColumnsWidth[index]
12497
- }));
12498
- };
12499
-
12500
- /**
12501
- * 计算最小行跨距单元格
12502
- * @param element TableElement
12503
- * @returns
12504
- */
12505
- const calculateMinRowSpanCellForRows = (element) => {
12506
- const cells = element.children.map((row, index) => {
12507
- const noHiddenCells = row.children.filter(cell => !cell.hidden);
12508
- if (noHiddenCells.length > 0) {
12509
- const minRowspan = Math.min.apply(Math, noHiddenCells.map(cell => {
12510
- return cell.rowspan || 1;
12511
- }));
12512
- const cell = row.children.find(item => !item.hidden && (item.rowspan || 1) === minRowspan);
12513
- return {
12514
- cell,
12515
- rowIndex: index
12516
- };
12517
- }
12518
- else {
12519
- return {
12520
- rowIndex: index
12521
- };
12636
+ this.theContextService = theContextService;
12637
+ this.backdropClosable = false;
12638
+ this.hasBackdrop = false;
12639
+ this.insideClosable = false;
12640
+ this.placement = 'topLeft';
12641
+ this.offset = 8;
12642
+ }
12643
+ openToolbar(origin, tableElement) {
12644
+ if (this.isOpened) {
12645
+ if (this.toolbarRef.containerInstance.config.origin === origin) {
12646
+ return;
12647
+ }
12648
+ this.toolbarRef.close();
12522
12649
  }
12523
- });
12524
- return cells;
12525
- };
12526
- /**
12527
- * 计算行控件的平均高度
12528
- * @param previousCombineRowIndex
12529
- * @param previousRowIndex
12530
- * @param rowControls
12531
- */
12532
- const calculateRowControlsAvgHeight = (previousCombineRowIndex, previousRowIndex, rowControls) => {
12533
- const rowControl = rowControls[previousRowIndex];
12534
- const count = previousCombineRowIndex - previousRowIndex;
12535
- const avgHeight = Math.floor(rowControl.height / (count + 1));
12536
- const firstHeight = rowControl.height - avgHeight * count;
12537
- rowControl.height = firstHeight;
12538
- rowControls
12539
- .filter((_, index) => index > previousRowIndex && index <= previousCombineRowIndex)
12540
- .forEach(rowControl => {
12541
- rowControl.height = avgHeight;
12542
- });
12543
- };
12544
- const getBelowRowHeight = (editor, cells, index, rowIndex, rowspan) => {
12545
- let belowRowlHeight = 0;
12546
- cells.slice(index + 1, cells.length).map(item => {
12547
- if (!item.cell) {
12548
- return;
12650
+ this.toolbarRef = this.thyPopover.open(TheTableToolbarComponent, {
12651
+ initialState: {
12652
+ tableStore: this.tableStore,
12653
+ tableElement
12654
+ },
12655
+ viewContainerRef: this.theContextService.getOptions().viewContainerRef,
12656
+ origin: this.getOrigin(origin),
12657
+ backdropClosable: this.backdropClosable,
12658
+ panelClass: 'the-plugin-toolbar-popover',
12659
+ placement: this.placement,
12660
+ offset: this.offset,
12661
+ hasBackdrop: this.hasBackdrop,
12662
+ insideClosable: this.insideClosable,
12663
+ minWidth: 0,
12664
+ scrollStrategy: this.overlay.scrollStrategies.reposition(),
12665
+ manualClosure: true
12666
+ });
12667
+ if (this.toolbarRef) {
12668
+ this.toolbarRef
12669
+ .getOverlayRef()
12670
+ .outsidePointerEvents()
12671
+ .pipe(skip(1))
12672
+ .subscribe(event => {
12673
+ if (isColorPanel(event.target)) {
12674
+ return;
12675
+ }
12676
+ if (!this.toolbarRef.getOverlayRef().hostElement.contains(event.target)) {
12677
+ this.closeToolbar();
12678
+ }
12679
+ });
12549
12680
  }
12550
- if (rowIndex + rowspan > item.rowIndex) {
12551
- const cellDom = AngularEditor.toDOMNode(editor, item.cell);
12552
- if (item.cell.rowspan > 1) {
12553
- // 如果下方单元格的rowspan > 1,递归计算
12554
- const height = getBelowRowHeight(editor, cells, cells.findIndex(cell => cell.rowIndex === item.rowIndex), item.rowIndex, item.cell.rowspan);
12555
- belowRowlHeight += getElementHeight(cellDom) - height;
12681
+ }
12682
+ afterSelectedCells(origin, element) {
12683
+ this.openToolbar(origin, element);
12684
+ }
12685
+ getOrigin(origin) {
12686
+ if (origin instanceof HTMLTableCellElement && origin.tagName !== 'TH') {
12687
+ const { selectedRowsIndex, selectedColumnsIndex, focusCellPath, isSelectedTable, focusCellElement } = this.tableStore;
12688
+ const [row, col] = focusCellPath.slice(-2);
12689
+ const tableElement = focusCellElement.closest('.the-table-container');
12690
+ if (isSelectedTable && col === 0 && row === 0) {
12691
+ return tableElement.querySelector('.the-table-corner-controls');
12556
12692
  }
12557
- else {
12558
- belowRowlHeight += getElementHeight(cellDom);
12693
+ if (selectedColumnsIndex.length > 0 && row === 0) {
12694
+ return tableElement.querySelectorAll('.the-table-col-controls')[col];
12695
+ }
12696
+ if (selectedRowsIndex.length > 0 && col === 0) {
12697
+ return tableElement.querySelectorAll('.the-table-row-controls-button-wrap')[row];
12559
12698
  }
12560
12699
  }
12561
- });
12562
- return belowRowlHeight;
12563
- };
12564
- const calculateRowControls = (editor, element) => {
12565
- const minRowSpanCellForRows = calculateMinRowSpanCellForRows(element);
12566
- const rowControls = [];
12567
- let previousRowIndex = 0;
12568
- let previousCombineRowIndex = 0;
12569
- minRowSpanCellForRows.forEach((cellInfo, index) => {
12570
- if (!cellInfo.cell) {
12571
- rowControls.push({
12572
- height: 0,
12573
- rowIndex: index
12700
+ return origin;
12701
+ }
12702
+ closeToolbar() {
12703
+ if (this.isOpened) {
12704
+ this.ngZone.run(() => {
12705
+ this.toolbarRef.close();
12574
12706
  });
12575
- previousCombineRowIndex = index;
12576
- if (index === minRowSpanCellForRows.length - 1) {
12577
- calculateRowControlsAvgHeight(previousCombineRowIndex, previousRowIndex, rowControls);
12578
- }
12579
- return;
12707
+ return this.toolbarRef.afterClosed();
12580
12708
  }
12581
- // calculate combine row height
12582
- if (previousCombineRowIndex > previousRowIndex) {
12583
- calculateRowControlsAvgHeight(previousCombineRowIndex, previousRowIndex, rowControls);
12584
- previousCombineRowIndex = 0;
12709
+ }
12710
+ /**
12711
+ * 判断是否触发了点选,并处理点选状态
12712
+ * @param e 事件对象
12713
+ * @param tbody tbody元素
12714
+ */
12715
+ handleKeydownForPointerSelection(e, tbody) {
12716
+ const cell = tbody === null || tbody === void 0 ? void 0 : tbody.querySelector('.focused-cell');
12717
+ if (cell) {
12718
+ this.tableStore.pointerSelection = true;
12719
+ this.tableStore.selectCellStart(cell, this.tableStore.editor);
12585
12720
  }
12586
- const cellDom = AngularEditor.toDOMNode(editor, cellInfo.cell);
12587
- let height = getElementHeight(cellDom);
12588
- // 当cell为合并的单元格(rowspan > 1),计算其实际高度(当前单元格的高度 - 下方合并单元格的高度)
12589
- if (cellInfo.cell.rowspan > 1) {
12590
- const calcHeight = height - getBelowRowHeight(editor, minRowSpanCellForRows, index, cellInfo.rowIndex, cellInfo.cell.rowspan);
12591
- rowControls.push({
12592
- height: calcHeight,
12593
- rowIndex: cellInfo.rowIndex
12594
- });
12721
+ }
12722
+ /**
12723
+ * 判断是否触发了区域选择,并处理区域选择状态
12724
+ * @param e 事件对象
12725
+ * @param tbody tbody元素
12726
+ */
12727
+ handleKeydownForAreaSelection(e, tbody) {
12728
+ const isTable = TableEditor.isActive(this.tableStore.editor);
12729
+ const cell = tbody === null || tbody === void 0 ? void 0 : tbody.querySelector('.focused-cell');
12730
+ if (isTable && cell) {
12731
+ this.tableStore.areaSelectionStart(cell, this.tableStore.editor);
12732
+ this.tableStore.areaSelection = true;
12595
12733
  }
12596
- else {
12597
- rowControls.push({
12598
- height,
12599
- rowIndex: cellInfo.rowIndex
12600
- });
12734
+ }
12735
+ cancelPointerSelection() {
12736
+ if (this.tableStore.pointerSelection) {
12737
+ this.tableStore.pointerSelection = false;
12601
12738
  }
12602
- previousRowIndex = index;
12603
- });
12604
- return rowControls;
12605
- };
12739
+ }
12740
+ cancelAreaSelection() {
12741
+ if (this.tableStore.areaSelection) {
12742
+ this.tableStore.areaSelection = false;
12743
+ this.tableStore.selectCellEnd(this.tableStore.editor);
12744
+ }
12745
+ }
12746
+ /**
12747
+ * 进行区域选择时,阻止默认的选区事件
12748
+ * @param e 事件对象
12749
+ * @param editor 编辑器对象
12750
+ */
12751
+ selectStartPreventDefault(e) {
12752
+ const isReadonly = AngularEditor.isReadonly(this.tableStore.editor);
12753
+ const cells = this.tableStore.getSelectedCellPositions();
12754
+ if (!isReadonly && this.tableStore.areaSelection && cells.length > 1) {
12755
+ e.preventDefault();
12756
+ }
12757
+ }
12758
+ }
12759
+ TableService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TableService, deps: [{ token: i1$1.ThyPopover }, { token: i2$1.Overlay }, { token: TableStore }, { token: i0.NgZone }, { token: TheContextService }], target: i0.ɵɵFactoryTarget.Injectable });
12760
+ TableService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TableService });
12761
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TableService, decorators: [{
12762
+ type: Injectable
12763
+ }], ctorParameters: function () { return [{ type: i1$1.ThyPopover }, { type: i2$1.Overlay }, { type: TableStore }, { type: i0.NgZone }, { type: TheContextService }]; } });
12606
12764
 
12607
- /**
12608
- * compatible with old data
12609
- * @returns
12610
- */
12611
- function isHeaderRow(element) {
12612
- var _a;
12613
- if ((_a = element === null || element === void 0 ? void 0 : element.options) === null || _a === void 0 ? void 0 : _a.headerRow) {
12614
- return true;
12765
+ class TableFreezeColumnPipe {
12766
+ transform(table, tablePluginOptions) {
12767
+ var _a, _b, _c;
12768
+ const rows = (_a = table.children) === null || _a === void 0 ? void 0 : _a.map(item => item.children);
12769
+ const headerColumnWidth = table.columns && table.columns[0].width;
12770
+ const tableComponent = ELEMENT_TO_COMPONENT.get(table);
12771
+ let stickyColumn = true;
12772
+ let buffer = TABLE_CONTROL;
12773
+ if ((_b = table.options) === null || _b === void 0 ? void 0 : _b.numberedColumn) {
12774
+ buffer = TABLE_NUMBER_COLUMN + TABLE_CONTROL;
12775
+ }
12776
+ if (tableComponent) {
12777
+ const tableWidth = getElementWidth(tableComponent.elementRef.nativeElement);
12778
+ stickyColumn = headerColumnWidth + buffer < tableWidth;
12779
+ }
12780
+ // 标题列存在合并的列时,取消冻结
12781
+ const mergeColumnCells = rows && rows.map(cells => cells[0]).filter(item => item.colspan && item.colspan !== 1);
12782
+ return !!((tablePluginOptions === null || tablePluginOptions === void 0 ? void 0 : tablePluginOptions.freezeColumnHeader) && ((_c = table.options) === null || _c === void 0 ? void 0 : _c.headerColumn) && !mergeColumnCells.length && stickyColumn);
12615
12783
  }
12616
- // compat old data
12617
- if (element === null || element === void 0 ? void 0 : element.children[0].header) {
12618
- return true;
12784
+ }
12785
+ TableFreezeColumnPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TableFreezeColumnPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
12786
+ TableFreezeColumnPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: TableFreezeColumnPipe, name: "freezeColumn" });
12787
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TableFreezeColumnPipe, decorators: [{
12788
+ type: Pipe,
12789
+ args: [{ name: 'freezeColumn' }]
12790
+ }] });
12791
+ class TableFreezeRowPipe {
12792
+ transform(table, headerRow, tablePluginOptions) {
12793
+ var _a;
12794
+ // 标题行存在合并的行时,取消冻结
12795
+ if (table.children) {
12796
+ const mergeRows = (_a = table.children[0]) === null || _a === void 0 ? void 0 : _a.children.filter(item => item.rowspan && item.rowspan !== 1);
12797
+ return !!(headerRow && !mergeRows.length && (tablePluginOptions === null || tablePluginOptions === void 0 ? void 0 : tablePluginOptions.freezeRowHeader));
12798
+ }
12799
+ return false;
12619
12800
  }
12620
12801
  }
12802
+ TableFreezeRowPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TableFreezeRowPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
12803
+ TableFreezeRowPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: TableFreezeRowPipe, name: "freezeRow" });
12804
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TableFreezeRowPipe, decorators: [{
12805
+ type: Pipe,
12806
+ args: [{ name: 'freezeRow' }]
12807
+ }] });
12621
12808
 
12622
12809
  const TABLE_SELECTOR = '.the-table';
12623
12810
  const TABLE_WRAPPER_SELECTOR = '.the-table-wrapper';
@@ -12687,6 +12874,10 @@ class TheColumnResizeDirective {
12687
12874
  merge(this.resizeNotifier.resizeCanceled, this.resizeNotifier.resizeCompleted)
12688
12875
  .pipe(takeUntil(this.destroyed))
12689
12876
  .subscribe(() => {
12877
+ // 如果没有进行拖拽就不要进行后续表格宽高计算了
12878
+ if (!this.resizeStarted) {
12879
+ return;
12880
+ }
12690
12881
  this.resizeStarted = false;
12691
12882
  if (this.position === Position.left || this.position === Position.right) {
12692
12883
  this.theTableComponent.transformColumnsWidth();
@@ -12701,9 +12892,9 @@ class TheColumnResizeDirective {
12701
12892
  this.destroyed.complete();
12702
12893
  }
12703
12894
  }
12704
- 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 });
12705
- TheColumnResizeDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.2", type: TheColumnResizeDirective, selector: "div[theColumnResize]", ngImport: i0 });
12706
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheColumnResizeDirective, decorators: [{
12895
+ TheColumnResizeDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", 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 });
12896
+ TheColumnResizeDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: TheColumnResizeDirective, selector: "div[theColumnResize]", ngImport: i0 });
12897
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TheColumnResizeDirective, decorators: [{
12707
12898
  type: Directive,
12708
12899
  args: [{
12709
12900
  selector: 'div[theColumnResize]'
@@ -12792,9 +12983,9 @@ class TheInsertMarkComponent {
12792
12983
  }
12793
12984
  }
12794
12985
  }
12795
- 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 });
12796
- 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"] }] });
12797
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheInsertMarkComponent, decorators: [{
12986
+ TheInsertMarkComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TheInsertMarkComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
12987
+ TheInsertMarkComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", 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"] }] });
12988
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TheInsertMarkComponent, decorators: [{
12798
12989
  type: Component,
12799
12990
  args: [{ selector: 'the-table-insert-mark', host: {
12800
12991
  class: 'the-table-insert-mark'
@@ -12924,8 +13115,10 @@ class TheTableComponent extends TheBaseElementComponent {
12924
13115
  this.subscribeCellPositionChange();
12925
13116
  this.listenTableContextMenuEvent();
12926
13117
  this.listenOnSelectedCells();
12927
- this.listenKeydownSelectEvents();
13118
+ this.listenKeydownEvent();
13119
+ this.listenKeyupEvent();
12928
13120
  this.listenTableWrapperScroll();
13121
+ this.listenSelectstartEvent();
12929
13122
  this.getColumnGroups();
12930
13123
  this.bindTableScrollingShadow();
12931
13124
  if ((_a = this.element.options) === null || _a === void 0 ? void 0 : _a.numberedColumn) {
@@ -13431,7 +13624,7 @@ class TheTableComponent extends TheBaseElementComponent {
13431
13624
  this.tableStore.clearSelectedCellsContent();
13432
13625
  }
13433
13626
  const isCurrentTableElement = this.nativeElement.contains(e.target);
13434
- if (!isCurrentTableElement || !this.tableStore.pointerSelection) {
13627
+ if (!isCurrentTableElement || (!this.tableStore.pointerSelection && !this.tableStore.areaSelection)) {
13435
13628
  this.tableStore.clearSelectedCells();
13436
13629
  }
13437
13630
  if (!isCurrentTableElement) {
@@ -13440,21 +13633,36 @@ class TheTableComponent extends TheBaseElementComponent {
13440
13633
  this.theTableContextMenuService.closeContextMenu();
13441
13634
  });
13442
13635
  }
13443
- listenKeydownSelectEvents() {
13636
+ listenKeydownEvent() {
13444
13637
  this.ngZone.runOutsideAngular(() => {
13445
13638
  fromEvent(document, 'keydown')
13446
13639
  .pipe(takeUntil(this.destroy$), filter((e) => !!e))
13447
13640
  .subscribe((event) => {
13448
- if (isKeyHotkey('mod', event) && !this.readonly) {
13449
- this.tableStore.pointerSelection = true;
13450
- const cell = this.tbodyElement.nativeElement.querySelector('.focused-cell');
13451
- cell && this.tableStore.selectCellStart(cell, this.editor);
13641
+ if (!this.readonly && isKeyHotkey('mod', event)) {
13642
+ this.tableService.handleKeydownForPointerSelection(event, this.tbodyNativeElement);
13643
+ }
13644
+ if (!this.readonly && isKeyHotkey('shift', event)) {
13645
+ this.tableService.handleKeydownForAreaSelection(event, this.tbodyNativeElement);
13452
13646
  }
13453
13647
  });
13648
+ });
13649
+ }
13650
+ listenKeyupEvent() {
13651
+ this.ngZone.runOutsideAngular(() => {
13454
13652
  fromEvent(document, 'keyup')
13455
13653
  .pipe(takeUntil(this.destroy$), filter((e) => !!e))
13456
13654
  .subscribe(() => {
13457
- this.tableStore.pointerSelection = false;
13655
+ this.tableService.cancelPointerSelection();
13656
+ this.tableService.cancelAreaSelection();
13657
+ });
13658
+ });
13659
+ }
13660
+ listenSelectstartEvent() {
13661
+ this.ngZone.runOutsideAngular(() => {
13662
+ fromEvent(document, 'selectstart')
13663
+ .pipe(takeUntil(this.destroy$))
13664
+ .subscribe((event) => {
13665
+ this.tableService.selectStartPreventDefault(event);
13458
13666
  });
13459
13667
  });
13460
13668
  }
@@ -13532,8 +13740,8 @@ class TheTableComponent extends TheBaseElementComponent {
13532
13740
  this.destroy$.complete();
13533
13741
  }
13534
13742
  }
13535
- 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 }, { token: THE_MODE_TOKEN }], target: i0.ɵɵFactoryTarget.Component });
13536
- 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 || tableStore.isFocusedInput", "class.the-table-with-sticky-column": "freezeColumnPipe.transform(element, tablePluginOptions)", "class.the-numbered-table": "element?.options?.numberedColumn", "class.the-table-selection-hide": "tableStore.isCellSelecting || tableStore.isRightClicking || tableStore.isFocusedInput" } }, providers: [
13743
+ TheTableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", 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 }, { token: THE_MODE_TOKEN }], target: i0.ɵɵFactoryTarget.Component });
13744
+ TheTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: TheTableComponent, selector: "the-table, [theTable]", host: { listeners: { "mousedown": "handleMousedown($event)" }, properties: { "class.the-table-with-controls": "isInTable || tableStore.isRightClicking || tableStore.isFocusedInput", "class.the-table-with-sticky-column": "freezeColumnPipe.transform(element, tablePluginOptions)", "class.the-numbered-table": "element?.options?.numberedColumn", "class.the-table-selection-hide": "tableStore.isCellSelecting || tableStore.isRightClicking || tableStore.isFocusedInput" } }, providers: [
13537
13745
  TableStore,
13538
13746
  TableService,
13539
13747
  TheTableContextMenuService,
@@ -13546,7 +13754,7 @@ TheTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", vers
13546
13754
  useExisting: TheTableComponent
13547
13755
  }
13548
13756
  ], 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 #tableRowControlsWrapper class=\"the-table-row-controls-wrapper\">\n <div\n class=\"the-table-corner-controls the-sticky-corner-controls\"\n #cornerControl\n [ngClass]=\"{\n visible: !readonly && (isInTable || tableStore.isRightClicking || tableStore.isFocusedInput),\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\n *ngIf=\"!readonly && (isInTable || tableStore.isRightClicking || tableStore.isFocusedInput) && !element?.options?.numberedColumn\"\n >\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 *ngIf=\"readonly && element?.options?.numberedColumn\" class=\"the-table-number-col\" />\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 *ngIf=\"readonly && element?.options?.numberedColumn\" class=\"the-table-number-col\"></th>\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 || tableStore.isFocusedInput\"\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 *ngIf=\"!element?.options?.headerColumn\"\n #headerRowLeftShadow\n class=\"header-row-shadow header-row-left-shadow\"\n contenteditable=\"false\"\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"] }] });
13549
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheTableComponent, decorators: [{
13757
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TheTableComponent, decorators: [{
13550
13758
  type: Component,
13551
13759
  args: [{ selector: 'the-table, [theTable]', providers: [
13552
13760
  TableStore,
@@ -13697,14 +13905,14 @@ class TheTableRowComponent extends TheBaseElementComponent {
13697
13905
  this.rowNumber = headerRow && rowIndex === 0 ? '' : headerRow ? rowIndex : rowIndex + 1;
13698
13906
  }
13699
13907
  }
13700
- 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 });
13701
- 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: `
13908
+ TheTableRowComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TheTableRowComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
13909
+ TheTableRowComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: TheTableRowComponent, selector: "tr[theTableRow]", host: { properties: { "style.height": "this.height" } }, usesInheritance: true, ngImport: i0, template: `
13702
13910
  <td *ngIf="readonly && numberedColumn" class="the-table-number-column align-middle" thePreventDefault>
13703
13911
  {{ rowNumber }}
13704
13912
  </td>
13705
13913
  <slate-children [children]="children" [context]="childrenContext" [viewContext]="viewContext"></slate-children>
13706
13914
  `, isInline: true, dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i1.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }, { kind: "directive", type: ThePreventDefaultDirective, selector: "[thePreventDefault]", exportAs: ["thePreventDefault"] }] });
13707
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheTableRowComponent, decorators: [{
13915
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TheTableRowComponent, decorators: [{
13708
13916
  type: Component,
13709
13917
  args: [{
13710
13918
  selector: 'tr[theTableRow]',
@@ -13865,9 +14073,9 @@ class ColumnResizingStore {
13865
14073
  this.resizeRows.pop();
13866
14074
  }
13867
14075
  }
13868
- ColumnResizingStore.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: ColumnResizingStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
13869
- ColumnResizingStore.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: ColumnResizingStore });
13870
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: ColumnResizingStore, decorators: [{
14076
+ ColumnResizingStore.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ColumnResizingStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
14077
+ ColumnResizingStore.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ColumnResizingStore });
14078
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ColumnResizingStore, decorators: [{
13871
14079
  type: Injectable
13872
14080
  }], ctorParameters: function () { return []; } });
13873
14081
 
@@ -14022,9 +14230,9 @@ class TheColumnResizeOverlayHandleComponent {
14022
14230
  this.destroyed.complete();
14023
14231
  }
14024
14232
  }
14025
- 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 });
14026
- 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 });
14027
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheColumnResizeOverlayHandleComponent, decorators: [{
14233
+ TheColumnResizeOverlayHandleComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", 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 });
14234
+ TheColumnResizeOverlayHandleComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: TheColumnResizeOverlayHandleComponent, selector: "ng-component", host: { classAttribute: "the-table-resize-overlay-thumb" }, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
14235
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TheColumnResizeOverlayHandleComponent, decorators: [{
14028
14236
  type: Component,
14029
14237
  args: [{
14030
14238
  host: { class: 'the-table-resize-overlay-thumb' },
@@ -14038,26 +14246,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
14038
14246
  }] }, { type: ColumnResizeNotifierSource }];
14039
14247
  } });
14040
14248
 
14041
- /**
14042
- * 计算每一行的基础高度(不包含隐藏或者跨行的单元格)
14043
- * @param editor
14044
- * @param table
14045
- * @returns
14046
- */
14047
- function getBaseHeightForRows(editor, table) {
14048
- const baseHeightForRows = table.children.map((row, index) => {
14049
- const baseCells = row.children.filter(cell => !cell.hidden && (!cell.rowspan || cell.rowspan <= 1));
14050
- if (baseCells.length > 0) {
14051
- const cellDom = AngularEditor.toDOMNode(editor, baseCells[0]);
14052
- return cellDom.offsetHeight;
14053
- }
14054
- else {
14055
- return BASE_CELL_HEIGHT;
14056
- }
14057
- });
14058
- return baseHeightForRows;
14059
- }
14060
-
14061
14249
  const OVERLAY_ACTIVE_CLASS = 'the-resizable-overlay-thumb-active';
14062
14250
  const OVERLAY_INIT_SIZE = 16;
14063
14251
  const TABLE_INSERT_MASK = 19;
@@ -14091,19 +14279,24 @@ const POSITION_MAP = {
14091
14279
  };
14092
14280
  class TheTdComponent extends TheBaseElementComponent {
14093
14281
  get tableStore() {
14094
- return this.tableComponent.tableStore;
14282
+ var _a;
14283
+ return (_a = this.tableComponent) === null || _a === void 0 ? void 0 : _a.tableStore;
14095
14284
  }
14096
14285
  get tableService() {
14097
- return this.tableComponent.tableService;
14286
+ var _a;
14287
+ return (_a = this.tableComponent) === null || _a === void 0 ? void 0 : _a.tableService;
14098
14288
  }
14099
14289
  get eventDispatcher() {
14100
- return this.tableComponent.eventDispatcher;
14290
+ var _a;
14291
+ return (_a = this.tableComponent) === null || _a === void 0 ? void 0 : _a.eventDispatcher;
14101
14292
  }
14102
14293
  get resizeNotifier() {
14103
- return this.tableComponent.resizeNotifier;
14294
+ var _a;
14295
+ return (_a = this.tableComponent) === null || _a === void 0 ? void 0 : _a.resizeNotifier;
14104
14296
  }
14105
14297
  get tableElement() {
14106
- return this.tableComponent.theTableElement.nativeElement;
14298
+ var _a, _b;
14299
+ return (_b = (_a = this.tableComponent) === null || _a === void 0 ? void 0 : _a.theTableElement) === null || _b === void 0 ? void 0 : _b.nativeElement;
14107
14300
  }
14108
14301
  get scrollableElementTop() {
14109
14302
  var _a;
@@ -14125,7 +14318,7 @@ class TheTdComponent extends TheBaseElementComponent {
14125
14318
  return this.tableComponent.tableWrapper.nativeElement.scrollLeft;
14126
14319
  }
14127
14320
  get isXAxisHover() {
14128
- return [Position.left, Position.right].includes(this.hoverdDirection);
14321
+ return [Position.left, Position.right].includes(this.hoveredDirection);
14129
14322
  }
14130
14323
  get rowResizeClass() {
14131
14324
  var _a;
@@ -14174,8 +14367,6 @@ class TheTdComponent extends TheBaseElementComponent {
14174
14367
  this.listenCellSelectEvents();
14175
14368
  this.listenForCellHoverEvents();
14176
14369
  this.listenForResizeEvents();
14177
- // const height = this.calculateCellInnerMinHeight();
14178
- // this.useMinHeight(height);
14179
14370
  });
14180
14371
  }
14181
14372
  getInjectionService() {
@@ -14229,8 +14420,6 @@ class TheTdComponent extends TheBaseElementComponent {
14229
14420
  .pipe(takeUntil(this.destroy$))
14230
14421
  .subscribe(() => {
14231
14422
  this.useTablePosition();
14232
- // const height = this.calculateCellInnerMinHeight();
14233
- // this.useMinHeight(height);
14234
14423
  });
14235
14424
  }
14236
14425
  useState() {
@@ -14260,58 +14449,21 @@ class TheTdComponent extends TheBaseElementComponent {
14260
14449
  this.rowspan = this.element.rowspan;
14261
14450
  }
14262
14451
  }
14263
- calculateCellInnerMinHeight() {
14264
- if (this.element.colspan) {
14265
- const rowIndex = this.tablePosition.getRowIndex();
14266
- if (this.calculateCombinedRows().length > 0) {
14267
- let height = 0;
14268
- const heights = getBaseHeightForRows(this.editor, this.tableComponent.element);
14269
- for (let index = rowIndex; index < this.element.rowspan + rowIndex; index++) {
14270
- height += heights[index];
14271
- }
14272
- height = height - BASE_FILL_HEIGHT;
14273
- return height;
14274
- }
14275
- }
14276
- return undefined;
14277
- }
14278
- calculateCombinedRows() {
14279
- const rowIndex = this.tablePosition.getRowIndex();
14280
- const combinedRows = [];
14281
- const table = this.tablePosition.table;
14282
- table.children.forEach((row, _rowIndex) => {
14283
- if (_rowIndex > rowIndex && _rowIndex <= rowIndex + this.element.rowspan) {
14284
- const isCombined = row.children.every(cell => cell.hidden || cell.rowspan > 1);
14285
- if (isCombined) {
14286
- combinedRows.push(_rowIndex);
14287
- }
14288
- }
14289
- });
14290
- return combinedRows;
14291
- }
14292
14452
  useDisplay() {
14293
14453
  this.display = this.element.hidden ? 'none' : '';
14294
14454
  }
14295
14455
  // 聚焦
14296
14456
  useFocus() {
14297
- if (this.isCollapsedAndNonReadonly && isGlobalCollapsed(this.editor)) {
14457
+ var _a;
14458
+ const isCollapsedElement = this.isCollapsedAndNonReadonly && isGlobalCollapsed(this.editor);
14459
+ const isFocused = ((_a = this.tableStore) === null || _a === void 0 ? void 0 : _a.focusCellElement) === this.elementRef.nativeElement;
14460
+ if (!this.readonly && (isCollapsedElement || isFocused)) {
14298
14461
  this.renderer.addClass(this.elementRef.nativeElement, 'focused-cell');
14299
14462
  }
14300
14463
  else {
14301
14464
  this.renderer.removeClass(this.elementRef.nativeElement, 'focused-cell');
14302
14465
  }
14303
14466
  }
14304
- useMinHeight(minHeight) {
14305
- if (this.cellInnerMinHeight === minHeight) {
14306
- return;
14307
- }
14308
- this.cellInnerMinHeight = minHeight;
14309
- // if (this.cellInnerMinHeight) {
14310
- // this.cellInnerNativeElement.style.minHeight = `${this.cellInnerMinHeight}px`;
14311
- // } else {
14312
- // this.cellInnerNativeElement.style.removeProperty('min-height');
14313
- // }
14314
- }
14315
14467
  //#region cell-select
14316
14468
  listenCellSelectEvents() {
14317
14469
  this.ngZone.runOutsideAngular(() => {
@@ -14319,16 +14471,22 @@ class TheTdComponent extends TheBaseElementComponent {
14319
14471
  fromEvent(element, 'mousedown')
14320
14472
  .pipe(takeUntil(this.destroy$), filter((e) => e.button !== 2), map$1(event => event.target.closest(SLA_TABLE_CELL_SELECTOR)), filter(cell => !!cell))
14321
14473
  .subscribe((cell) => {
14322
- // 点选
14323
- if (this.tableStore.pointerSelection) {
14324
- this.tableStore.selectCell(cell, this.editor);
14325
- }
14326
- this.tableStore.selectCellStart(cell, this.editor);
14327
- if (this.overlayRef) {
14328
- this.overlayRef.detach();
14474
+ if (!this.readonly) {
14475
+ if (this.tableStore.pointerSelection) {
14476
+ this.tableStore.selectCell(cell, this.editor);
14477
+ }
14478
+ if (this.tableStore.areaSelection) {
14479
+ this.tableStore.setAreaSelectionCells(this.element);
14480
+ }
14481
+ else {
14482
+ this.tableStore.selectCellStart(cell, this.editor);
14483
+ }
14484
+ if (this.overlayRef) {
14485
+ this.overlayRef.detach();
14486
+ }
14487
+ // 拖选
14488
+ this.listenCellMouseEvents();
14329
14489
  }
14330
- // 拖选
14331
- this.listenCellMouseEvents();
14332
14490
  });
14333
14491
  });
14334
14492
  }
@@ -14344,14 +14502,16 @@ class TheTdComponent extends TheBaseElementComponent {
14344
14502
  this.tableStore.selectCellOngoing(cell, this.editor);
14345
14503
  });
14346
14504
  fromEvent(document, 'mouseup')
14347
- .pipe(take(1))
14505
+ .pipe(take(1), takeUntil(this.destroy$))
14348
14506
  .subscribe(() => {
14349
- this.tableStore.selectCellEnd(this.editor);
14350
14507
  if (this.tableStore.isCellSelecting || this.tableStore.pointerSelection) {
14351
14508
  this.ngZone.run(() => {
14352
14509
  this.tableComponent.tableService.afterSelectedCells(this.tableStore.focusCellElement, this.tableComponent.element);
14353
14510
  });
14354
14511
  }
14512
+ if (!this.tableStore.areaSelection) {
14513
+ this.tableStore.selectCellEnd(this.editor);
14514
+ }
14355
14515
  mouseoverObservable.unsubscribe();
14356
14516
  });
14357
14517
  }
@@ -14373,13 +14533,13 @@ class TheTdComponent extends TheBaseElementComponent {
14373
14533
  }))
14374
14534
  .subscribe(hoveredCellInfo => {
14375
14535
  if (hoveredCellInfo && hoveredCellInfo.position) {
14376
- this.hoverdDirection = hoveredCellInfo.position;
14536
+ this.hoveredDirection = hoveredCellInfo.position;
14377
14537
  }
14378
14538
  else {
14379
- this.hoverdDirection = null;
14539
+ this.hoveredDirection = null;
14380
14540
  }
14381
14541
  if (hoveredCellInfo) {
14382
- this.hoverdDirection = hoveredCellInfo.position;
14542
+ this.hoveredDirection = hoveredCellInfo.position;
14383
14543
  if (!this.overlayRef || !this.overlayRef.hasAttached()) {
14384
14544
  this.overlayRef = this._createOverlayForHandle();
14385
14545
  this._showHandleOverlay();
@@ -14399,16 +14559,20 @@ class TheTdComponent extends TheBaseElementComponent {
14399
14559
  merge(this.resizeNotifier.resizeCanceled, this.resizeNotifier.triggerResize)
14400
14560
  .pipe(takeUntilDestroyed, filter(columnSize => columnSize.tableCell === this.elementRef.nativeElement))
14401
14561
  .subscribe(({ deltaSize, previousSize, completeImmediately }) => {
14562
+ // 如果偏移的值不存在就不要进行后续的计算了
14563
+ if (isUndefined(deltaSize) || isUndefined(previousSize)) {
14564
+ return;
14565
+ }
14402
14566
  const { top, left, height, width } = this.elementRef.nativeElement.getBoundingClientRect();
14403
14567
  const { clientY, clientX } = event;
14404
14568
  let isPreventApplySize = false;
14405
14569
  // 向下,或者向右移动(deltaSize > 0),鼠标位置不在当前单元格拖拽线上,阻止应用拖拽尺寸
14406
14570
  if (this.isXAxisHover) {
14407
- const cellWidth = this.hoverdDirection === Position.left ? 0 : width;
14571
+ const cellWidth = this.hoveredDirection === Position.left ? 0 : width;
14408
14572
  isPreventApplySize = deltaSize > 0 && left + cellWidth - clientX > 0;
14409
14573
  }
14410
14574
  else {
14411
- const cellHeight = this.hoverdDirection === Position.top ? 0 : height;
14575
+ const cellHeight = this.hoveredDirection === Position.top ? 0 : height;
14412
14576
  isPreventApplySize = deltaSize > 0 && top + cellHeight - clientY > 0;
14413
14577
  }
14414
14578
  if (isPreventApplySize) {
@@ -14458,7 +14622,7 @@ class TheTdComponent extends TheBaseElementComponent {
14458
14622
  this.isXAxisHover ? this.updateOverlayHandleColumnSize() : this.updateOverlayHandleRowSize();
14459
14623
  (_b = this.overlayRef) === null || _b === void 0 ? void 0 : _b.updatePositionStrategy(this.createPositionStrategy());
14460
14624
  this.resizeRef.setDirection(this.isXAxisHover ? 'X' : 'Y');
14461
- this.resizeRef.setPosition(this.hoverdDirection);
14625
+ this.resizeRef.setPosition(this.hoveredDirection);
14462
14626
  }
14463
14627
  updateOverlayHandleColumnSize() {
14464
14628
  let height = 0;
@@ -14529,7 +14693,7 @@ class TheTdComponent extends TheBaseElementComponent {
14529
14693
  let offsetY = this.calculateOverlayHandleOffsetY();
14530
14694
  let offsetX = this.calculateOverlayHandleOffsetX();
14531
14695
  const position = this.isXAxisHover
14532
- ? Object.assign(Object.assign({}, POSITION_MAP[this.hoverdDirection]), { offsetY }) : Object.assign(Object.assign({}, POSITION_MAP[this.hoverdDirection]), { offsetX });
14696
+ ? Object.assign(Object.assign({}, POSITION_MAP[this.hoveredDirection]), { offsetY }) : Object.assign(Object.assign({}, POSITION_MAP[this.hoveredDirection]), { offsetX });
14533
14697
  return this.overlay
14534
14698
  .position()
14535
14699
  .flexibleConnectedTo(this.elementRef.nativeElement)
@@ -14565,7 +14729,7 @@ class TheTdComponent extends TheBaseElementComponent {
14565
14729
  this.resizingStore.storeTableWidth(cols);
14566
14730
  this.resizingStore.initDirection(deltaX);
14567
14731
  let cellIndex = this.elementRef.nativeElement.cellIndex;
14568
- if (this.hoverdDirection === 'left') {
14732
+ if (this.hoveredDirection === 'left') {
14569
14733
  cellIndex = cellIndex - 1;
14570
14734
  }
14571
14735
  const colspan = this.elementRef.nativeElement.getAttribute('colspan') || 1;
@@ -14659,7 +14823,7 @@ class TheTdComponent extends TheBaseElementComponent {
14659
14823
  this.resizingStore.storeTableHeight(rows);
14660
14824
  this.resizingStore.initDirection(deltaY, this.isXAxisHover);
14661
14825
  let rowIndex = this.elementRef.nativeElement.parentElement.rowIndex - 1; // subtract thead's tr
14662
- if (this.hoverdDirection === Position.top) {
14826
+ if (this.hoveredDirection === Position.top) {
14663
14827
  rowIndex = rowIndex - 1;
14664
14828
  }
14665
14829
  const rowSpan = this.elementRef.nativeElement.rowSpan;
@@ -14739,9 +14903,9 @@ class TheTdComponent extends TheBaseElementComponent {
14739
14903
  this.destroy$.complete();
14740
14904
  }
14741
14905
  }
14742
- 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 });
14743
- 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"] }] });
14744
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheTdComponent, decorators: [{
14906
+ TheTdComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", 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 });
14907
+ TheTdComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", 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"] }] });
14908
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TheTdComponent, decorators: [{
14745
14909
  type: Component,
14746
14910
  args: [{ selector: 'td[theTd]', providers: [ColumnResizingStore], template: "<div #cellInner>\n <slate-children [children]=\"children\" [context]=\"childrenContext\" [viewContext]=\"viewContext\"></slate-children>\n</div>\n" }]
14747
14911
  }], 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: [{
@@ -14833,8 +14997,8 @@ class TheTableToolbarItemComponent extends TheBaseToolbarItem {
14833
14997
  return this.tableSelectRef;
14834
14998
  }
14835
14999
  }
14836
- 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 });
14837
- 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: `
15000
+ TheTableToolbarItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TheTableToolbarItemComponent, deps: [{ token: i1$1.ThyPopover }, { token: i2$1.Overlay }], target: i0.ɵɵFactoryTarget.Component });
15001
+ TheTableToolbarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: TheTableToolbarItemComponent, selector: "the-table-toolbar-item", host: { classAttribute: "the-toolbar-dropdown-container" }, usesInheritance: true, ngImport: i0, template: `
14838
15002
  <a
14839
15003
  href="javascript:;"
14840
15004
  class="link-with-down"
@@ -14849,7 +15013,7 @@ TheTableToolbarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14
14849
15013
  <thy-icon class="link-down-icon font-size-sm text-desc ml-1" thyIconName="caret-down"> </thy-icon>
14850
15014
  </a>
14851
15015
  `, 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"] }] });
14852
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheTableToolbarItemComponent, decorators: [{
15016
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TheTableToolbarItemComponent, decorators: [{
14853
15017
  type: Component,
14854
15018
  args: [{
14855
15019
  selector: 'the-table-toolbar-item',
@@ -15425,14 +15589,14 @@ class TheTodoItemComponent extends TheBaseElementComponent {
15425
15589
  setNode(this.editor, { checked }, this.element);
15426
15590
  }
15427
15591
  }
15428
- 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 });
15429
- 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: `
15592
+ TheTodoItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TheTodoItemComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: TheContextService }], target: i0.ɵɵFactoryTarget.Component });
15593
+ TheTodoItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", 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: `
15430
15594
  <span contenteditable="false" class="todo-item-status">
15431
15595
  <input #checkbox type="checkbox" [checked]="element.checked" (click)="onCheck(checkbox.checked)" />
15432
15596
  </span>
15433
15597
  <span><slate-children [children]="children" [context]="childrenContext" [viewContext]="viewContext"></slate-children></span>
15434
15598
  `, isInline: true, dependencies: [{ kind: "component", type: i1.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }] });
15435
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheTodoItemComponent, decorators: [{
15599
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TheTodoItemComponent, decorators: [{
15436
15600
  type: Component,
15437
15601
  args: [{
15438
15602
  selector: 'div[theTodoItem]',
@@ -15699,15 +15863,15 @@ class TheInlineToolbarComponent {
15699
15863
  this.destroy$.complete();
15700
15864
  }
15701
15865
  }
15702
- 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 });
15703
- 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
15866
+ TheInlineToolbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TheInlineToolbarComponent, deps: [{ token: i0.ElementRef }, { token: i2$1.ScrollDispatcher }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: TheContextService }], target: i0.ɵɵFactoryTarget.Component });
15867
+ TheInlineToolbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", 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
15704
15868
  #inlineToolbar
15705
15869
  class="the-inline-toolbar"
15706
15870
  [editor]="editor"
15707
15871
  [toolbarItems]="toolbarItems"
15708
15872
  [isMore]="false"
15709
15873
  ></the-toolbar> `, isInline: true, dependencies: [{ kind: "component", type: TheToolbarComponent, selector: "the-toolbar", inputs: ["editor", "toolbarItems", "align", "containerClass", "isMore", "afterTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
15710
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheInlineToolbarComponent, decorators: [{
15874
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TheInlineToolbarComponent, decorators: [{
15711
15875
  type: Component,
15712
15876
  args: [{
15713
15877
  selector: 'the-inline-toolbar',
@@ -15826,9 +15990,9 @@ class TheQuickInsertComponent {
15826
15990
  }, 100);
15827
15991
  }
15828
15992
  }
15829
- 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 });
15830
- 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"] }] });
15831
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheQuickInsertComponent, decorators: [{
15993
+ TheQuickInsertComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TheQuickInsertComponent, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
15994
+ TheQuickInsertComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", 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"] }] });
15995
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TheQuickInsertComponent, decorators: [{
15832
15996
  type: Component,
15833
15997
  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" }]
15834
15998
  }], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { className: [{
@@ -15905,17 +16069,17 @@ class TheEditorComponent extends mixinUnsubscribe(MixinBase) {
15905
16069
  key: event.key
15906
16070
  }
15907
16071
  });
15908
- if (isKeyHotkey('mod+s', event)) {
16072
+ AngularEditor.onKeydown(this.editor, event);
16073
+ if (isKeyHotkey('mod+s', event) && !event.defaultPrevented) {
15909
16074
  this.ngZone.run(() => {
15910
16075
  this.theOnSave.emit(this.editorValue);
15911
16076
  });
15912
16077
  event.preventDefault();
15913
16078
  return;
15914
16079
  }
15915
- if (isKeyHotkey('mod+a', event)) {
16080
+ if (isKeyHotkey('mod+a', event) && !event.defaultPrevented) {
15916
16081
  this.handleSelectAll();
15917
16082
  }
15918
- AngularEditor.onKeydown(this.editor, event);
15919
16083
  };
15920
16084
  this.onClick = (event) => {
15921
16085
  AngularEditor.onClick(this.editor, event);
@@ -16216,8 +16380,8 @@ class TheEditorComponent extends mixinUnsubscribe(MixinBase) {
16216
16380
  };
16217
16381
  }
16218
16382
  }
16219
- 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 });
16220
- 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: [
16383
+ TheEditorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", 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 });
16384
+ TheEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", 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: [
16221
16385
  TheContextService,
16222
16386
  {
16223
16387
  provide: NG_VALUE_ACCESSOR,
@@ -16225,7 +16389,7 @@ TheEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", ver
16225
16389
  multi: true
16226
16390
  }
16227
16391
  ], 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 [scrollSelectionIntoView]=\"scrollSelectionIntoView\"\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", "scrollSelectionIntoView", "isStrictDecorate", "trackBy", "readonly", "placeholder", "beforeInput", "blur", "click", "compositionEnd", "compositionUpdate", "compositionStart", "copy", "cut", "dragOver", "dragStart", "dragEnd", "drop", "focus", "keydown", "paste", "spellCheck", "autoCorrect", "autoCapitalize"] }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4$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 });
16228
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheEditorComponent, decorators: [{
16392
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TheEditorComponent, decorators: [{
16229
16393
  type: Component,
16230
16394
  args: [{ selector: 'the-editor, theEditor', providers: [
16231
16395
  TheContextService,
@@ -16271,10 +16435,10 @@ const ENTRY_COMMON_COMPONENTS = [TheColumnResizeOverlayHandleComponent];
16271
16435
  const DIRECTIVES = [TheColumnResizeDirective];
16272
16436
  class TheColumnResizeCommonModule {
16273
16437
  }
16274
- TheColumnResizeCommonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheColumnResizeCommonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
16275
- TheColumnResizeCommonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.2", ngImport: i0, type: TheColumnResizeCommonModule, declarations: [TheColumnResizeOverlayHandleComponent], exports: [TheColumnResizeOverlayHandleComponent] });
16276
- TheColumnResizeCommonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheColumnResizeCommonModule });
16277
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheColumnResizeCommonModule, decorators: [{
16438
+ TheColumnResizeCommonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TheColumnResizeCommonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
16439
+ TheColumnResizeCommonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: TheColumnResizeCommonModule, declarations: [TheColumnResizeOverlayHandleComponent], exports: [TheColumnResizeOverlayHandleComponent] });
16440
+ TheColumnResizeCommonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TheColumnResizeCommonModule });
16441
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TheColumnResizeCommonModule, decorators: [{
16278
16442
  type: NgModule,
16279
16443
  args: [{
16280
16444
  declarations: ENTRY_COMMON_COMPONENTS,
@@ -16283,10 +16447,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
16283
16447
  }] });
16284
16448
  class TheColumnSizeModule {
16285
16449
  }
16286
- TheColumnSizeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheColumnSizeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
16287
- TheColumnSizeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.2", ngImport: i0, type: TheColumnSizeModule, declarations: [TheColumnResizeDirective], imports: [OverlayModule, TheColumnResizeCommonModule], exports: [TheColumnResizeDirective] });
16288
- TheColumnSizeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheColumnSizeModule, imports: [OverlayModule, TheColumnResizeCommonModule] });
16289
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheColumnSizeModule, decorators: [{
16450
+ TheColumnSizeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TheColumnSizeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
16451
+ TheColumnSizeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: TheColumnSizeModule, declarations: [TheColumnResizeDirective], imports: [OverlayModule, TheColumnResizeCommonModule], exports: [TheColumnResizeDirective] });
16452
+ TheColumnSizeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TheColumnSizeModule, imports: [OverlayModule, TheColumnResizeCommonModule] });
16453
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TheColumnSizeModule, decorators: [{
16290
16454
  type: NgModule,
16291
16455
  args: [{
16292
16456
  imports: [OverlayModule, TheColumnResizeCommonModule],
@@ -16368,8 +16532,8 @@ const PLUGIN_COMPONENTS = [
16368
16532
  const PIPES = [ElementStylePipe, ElementClassPipe, TableFreezeColumnPipe, TableFreezeRowPipe];
16369
16533
  class TheEditorModule {
16370
16534
  }
16371
- TheEditorModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheEditorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
16372
- TheEditorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.2", ngImport: i0, type: TheEditorModule, declarations: [TheEditorComponent, ElementStylePipe, ElementClassPipe, TableFreezeColumnPipe, TableFreezeRowPipe, TheToolbarComponent,
16535
+ TheEditorModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TheEditorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
16536
+ TheEditorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: TheEditorModule, declarations: [TheEditorComponent, ElementStylePipe, ElementClassPipe, TableFreezeColumnPipe, TableFreezeRowPipe, TheToolbarComponent,
16373
16537
  TheToolbarDropdownComponent,
16374
16538
  TheToolbarGroupComponent,
16375
16539
  TheToolbarItemComponent,
@@ -16440,14 +16604,14 @@ TheEditorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version
16440
16604
  TheListboxGroupDirective,
16441
16605
  TheListboxDirective,
16442
16606
  ThePreventDefaultDirective] });
16443
- TheEditorModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheEditorModule, providers: [
16607
+ TheEditorModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TheEditorModule, providers: [
16444
16608
  {
16445
16609
  provide: TheToolbarGroupToken,
16446
16610
  useValue: TheToolbarGroupComponent
16447
16611
  },
16448
16612
  THE_MODE_PROVIDER
16449
16613
  ], imports: [CommonModule, ScrollingModule, SlateModule, FormsModule, TETHYS, CodemirrorModule, TheColumnSizeModule] });
16450
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheEditorModule, decorators: [{
16614
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TheEditorModule, decorators: [{
16451
16615
  type: NgModule,
16452
16616
  args: [{
16453
16617
  declarations: [TheEditorComponent, ...PIPES, ...COMPONENTS, ...PLUGIN_COMPONENTS],
@@ -16512,9 +16676,9 @@ class TheToolbarService {
16512
16676
  });
16513
16677
  }
16514
16678
  }
16515
- TheToolbarService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheToolbarService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
16516
- TheToolbarService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheToolbarService });
16517
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheToolbarService, decorators: [{
16679
+ TheToolbarService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TheToolbarService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
16680
+ TheToolbarService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TheToolbarService });
16681
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TheToolbarService, decorators: [{
16518
16682
  type: Injectable
16519
16683
  }] });
16520
16684
 
@@ -16532,5 +16696,5 @@ const withTestPlugin = (plugins, initValue) => {
16532
16696
  * Generated bundle index. Do not edit.
16533
16697
  */
16534
16698
 
16535
- export { ALIGN_BLOCK_TYPES, A_TAG_REL_ATTR, AlignEditor, Alignment, BLOCK_DELETE_BACKWARD_TYPES, BlockquoteEditor, CLIPBOARD_FORMAT_KEY, CODEMIRROR_PADDING_TOP, CODE_MODES, COMPONENTS, CONTAINER_BLOCKS, CONTROL_KEY, CodeEditor, ColorEditor, ColumnResizeNotifierSource, DEFAULT_LANGUAGE, DEFAULT_SCROLL_CONTAINER, DISABLED_OPERATE_TYPES, DefaultElementOptions, DefaultGlobalToolbarDefinition, DefaultInlineToolbarDefinition, DefaultPluginMenu, DropdownMode, ELEMENT_UNIQUE_ID, ElementKinds, ErrorCodes, FontSizeTypes, FontSizes, HEADING_TYPES, HeadingEditor, HoveredCellInfo, HrEditor, IS_MAC, ImageEditor, IndentEditor, Indents, InlineCodeEditor, LINK_DEFAULT_TEXT, LIST_BLOCK_TYPES, LayoutTypes, LinkEditor, ListEditor, MarkEditor, MarkProps, MarkTypes, MentionEditor, PICTURE_ACCEPTED_UPLOAD_MIME, PICTURE_ACCEPTED_UPLOAD_SIZE, PLUGIN_COMPONENTS, PluginKeys, PluginMenuIcons, PluginMenuSvgs, Position, QuickInsertEditor, STANDARD_HEADING_TYPES, ScrollDirection, SpecialBackgroundColor, TAB_SPACE, THE_EDITOR_CONVERSION_HINT_REF, THE_EDITOR_ORIGIN_ANCHOR, THE_EDITOR_POPOVER_REF, THE_EDITOR_PREVIOUS_SELECTION, THE_EDITOR_UUID, THE_INLINE_TOOLBAR_TYPES, THE_LISTBOX_PARENT_GROUP_TOKEN, THE_LISTBOX_PARENT_OPTION_TOKEN, THE_LISTBOX_TOKEN, THE_MODE_PROVIDER, THE_MODE_TOKEN, THE_PLUGIN_MENU_REF, THE_UPLOAD_SERVICE_TOKEN, TableCellEventDispatcher, TableEditor, TableHeaderBackgroundColor, TheBaseElementComponent, TheBaseSuggestion, TheBaseToolbarDropdown, TheBaseToolbarItem, TheContextService, TheDataMode, TheDefaultElementComponent, TheEditor, TheEditorComponent, TheEditorModule, TheImageComponent, TheListboxDirective, TheListboxGroupDirective, TheListboxOptionDirective, TheMode, TheModeConfig, ThePluginMenu, ThePluginMenuComponent, ThePluginMenuItemType, ThePreventDefaultDirective, index$1 as TheQueries, TheToolbarComponent, TheToolbarDropdownComponent, TheToolbarGroupComponent, TheToolbarGroupToken, TheToolbarItemComponent, TheToolbarService, index as TheTransforms, TodoItemEditor, ToolbarActionTypes, ToolbarAlignment, ToolbarItemType, ToolbarMoreGroup, VOID_BLOCK_TYPES, VerticalAlignEditor, VerticalAlignment, ZERO_WIDTH_CHAR, autoFocus, base64toBlob, buildPluginMenu, buildPluginMenuItemMap, coercePixelsFromCssValue, combinePlugins, copyNode, copyNodeForSafari, createEmptyParagraph, createMentionPlugin, createPluginFactory, createToolbar, createVerticalAlignPlugin, dataDeserialize, dataSerializing, deleteElementKey, extractFragment, filterTextFormat, flattenDeepPlugins, getColsTotalWidth, getEditorUUID, getElementClassByPrefix, getElementHeight, getElementWidth, getEndBlock, getPlugin, getPluginOptions, getPlugins, getRowsTotalHeight, getStartBlock, getToolbarClass, headingOptions, htmlToTheia, idCreator, inValidTypes, initializeDefaultMenuIcons, insertDataByInvalidType, internalPlugins, isCleanEmptyParagraph, isDirectionKeydown, isPureEmptyParagraph, mergeArray, mergeDeepPlugins, mergeElementOptions, mergeOptions, nestedStructureByKey, plainToTheia, pluginsByKey, reSelection, recursionNodes, refocus, scrollIntoView, setEditorUUID, useElementStyle, withMention, withTestPlugin, withTheia };
16699
+ export { ALIGN_BLOCK_TYPES, A_TAG_REL_ATTR, AlignEditor, Alignment, BLOCK_DELETE_BACKWARD_TYPES, BlockquoteEditor, CLIPBOARD_FORMAT_KEY, CODEMIRROR_PADDING_TOP, CODE_MODES, COMPONENTS, CONTAINER_BLOCKS, CONTROL_KEY, CodeEditor, ColorEditor, ColumnResizeNotifierSource, DEFAULT_LANGUAGE, DEFAULT_SCROLL_CONTAINER, DISABLED_OPERATE_TYPES, DefaultElementOptions, DefaultGlobalToolbarDefinition, DefaultInlineToolbarDefinition, DefaultPluginMenu, DropdownMode, ELEMENT_UNIQUE_ID, ElementKinds, ErrorCodes, FontSizeTypes, FontSizes, HEADING_TYPES, HeadingEditor, HoveredCellInfo, HrEditor, IS_MAC, ImageEditor, IndentEditor, Indents, InlineCodeEditor, LINK_DEFAULT_TEXT, LIST_BLOCK_TYPES, LayoutTypes, LinkEditor, ListEditor, MarkEditor, MarkProps, MarkTypes, MentionEditor, PICTURE_ACCEPTED_UPLOAD_MIME, PICTURE_ACCEPTED_UPLOAD_SIZE, PLUGIN_COMPONENTS, PluginKeys, PluginMenuIcons, PluginMenuSvgs, Position, QuickInsertEditor, STANDARD_HEADING_TYPES, ScrollDirection, SpecialBackgroundColor, TAB_SPACE, THE_EDITOR_CONVERSION_HINT_REF, THE_EDITOR_ORIGIN_ANCHOR, THE_EDITOR_POPOVER_REF, THE_EDITOR_PREVIOUS_SELECTION, THE_EDITOR_UUID, THE_INLINE_TOOLBAR_TYPES, THE_LISTBOX_PARENT_GROUP_TOKEN, THE_LISTBOX_PARENT_OPTION_TOKEN, THE_LISTBOX_TOKEN, THE_MODE_PROVIDER, THE_MODE_TOKEN, THE_PLUGIN_MENU_REF, THE_UPLOAD_SERVICE_TOKEN, TableCellEventDispatcher, TableEditor, TableHeaderBackgroundColor, TheBaseElementComponent, TheBaseSuggestion, TheBaseToolbarDropdown, TheBaseToolbarItem, TheContextService, TheDataMode, TheDefaultElementComponent, TheEditor, TheEditorComponent, TheEditorModule, TheImageComponent, TheListboxDirective, TheListboxGroupDirective, TheListboxOptionDirective, TheMode, TheModeConfig, ThePluginMenu, ThePluginMenuComponent, ThePluginMenuItemType, ThePreventDefaultDirective, index$1 as TheQueries, TheToolbarComponent, TheToolbarDropdownComponent, TheToolbarGroupComponent, TheToolbarGroupToken, TheToolbarItemComponent, TheToolbarService, index as TheTransforms, TodoItemEditor, ToolbarActionTypes, ToolbarAlignment, ToolbarItemType, ToolbarMoreGroup, VOID_BLOCK_TYPES, VerticalAlignEditor, VerticalAlignment, ZERO_WIDTH_CHAR, autoFocus, base64toBlob, buildPluginMenu, buildPluginMenuItemMap, coercePixelsFromCssValue, combinePlugins, copyNode, copyNodeForSafari, createEmptyParagraph, createMentionPlugin, createPluginFactory, createToolbar, createVerticalAlignPlugin, dataDeserialize, dataSerializing, deleteElementKey, extractFragment, filterTextFormat, flattenDeepPlugins, getColsTotalWidth, getEditorUUID, getElementClassByPrefix, getElementHeight, getElementWidth, getEndBlock, getPlugin, getPluginOptions, getPlugins, getRowsTotalHeight, getStartBlock, getToolbarClass, headingOptions, htmlToTheia, idCreator, inValidTypes, initializeDefaultMenuIcons, insertDataByInvalidType, internalPlugins, isCleanEmptyParagraph, isColorIndicator, isColorInput, isColorPanel, isDirectionKeydown, isPureEmptyParagraph, mergeArray, mergeDeepPlugins, mergeElementOptions, mergeOptions, nestedStructureByKey, plainToTheia, pluginsByKey, reSelection, recursionNodes, refocus, scrollIntoView, setEditorUUID, useElementStyle, withMention, withTestPlugin, withTheia };
16536
16700
  //# sourceMappingURL=worktile-theia.mjs.map