@worktile/theia 3.0.3 → 3.0.6

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 (69) hide show
  1. package/bundles/worktile-theia.umd.js +277 -371
  2. package/bundles/worktile-theia.umd.js.map +1 -1
  3. package/components/toolbar/toolbar.component.d.ts +1 -2
  4. package/components/toolbar-dropdown/toolbar-dropdown.component.d.ts +3 -13
  5. package/components/toolbar-group/toolbar-group.component.d.ts +2 -2
  6. package/components/toolbar-item/toolbar-item.component.d.ts +3 -11
  7. package/constants/node-types.d.ts +2 -1
  8. package/core/toolbar-item/base-toolbar-item.d.ts +29 -0
  9. package/editor.module.d.ts +42 -44
  10. package/esm2015/components/inline-toolbar/inline-toolbar.component.js +2 -2
  11. package/esm2015/components/toolbar/toolbar.component.js +14 -24
  12. package/esm2015/components/toolbar-dropdown/toolbar-dropdown.component.js +11 -41
  13. package/esm2015/components/toolbar-group/toolbar-group.component.js +4 -4
  14. package/esm2015/components/toolbar-item/toolbar-item.component.js +24 -41
  15. package/esm2015/constants/node-types.js +3 -2
  16. package/esm2015/core/toolbar-item/base-toolbar-item.js +92 -0
  17. package/esm2015/editor.component.js +2 -2
  18. package/esm2015/editor.module.js +1 -4
  19. package/esm2015/interfaces/plugins/plugins.js +1 -1
  20. package/esm2015/interfaces/toolbar.js +2 -2
  21. package/esm2015/plugins/align/align.editor.js +3 -7
  22. package/esm2015/plugins/align/align.plugin.js +7 -4
  23. package/esm2015/plugins/code/code.component.js +9 -6
  24. package/esm2015/plugins/color/color.plugin.js +6 -3
  25. package/esm2015/plugins/color/toolbar-item.component.js +14 -23
  26. package/esm2015/plugins/common/reset-type.plugin.js +3 -3
  27. package/esm2015/plugins/deserializers/deserialize-html.plugin.js +3 -3
  28. package/esm2015/plugins/font-size/font-size.editor.js +8 -14
  29. package/esm2015/plugins/heading/heading.editor.js +3 -2
  30. package/esm2015/plugins/heading/heading.plugin.js +2 -2
  31. package/esm2015/plugins/indent/indent.editor.js +1 -10
  32. package/esm2015/plugins/indent/indent.plugin.js +8 -7
  33. package/esm2015/plugins/inline-code/inline-code.plugin.js +6 -3
  34. package/esm2015/plugins/link/link.plugin.js +6 -3
  35. package/esm2015/plugins/mark/mark.plugin.js +6 -3
  36. package/esm2015/plugins/public-api.js +1 -2
  37. package/esm2015/plugins/quick-insert/components/quick-toolbar/quick-toolbar.component.js +2 -2
  38. package/esm2015/plugins/table/components/table.component.js +4 -1
  39. package/esm2015/plugins/table/toolbar-item.component.js +10 -20
  40. package/esm2015/plugins/vertical-align/toolbar-item.component.js +6 -20
  41. package/esm2015/plugins/vertical-align/vertical-align.editor.js +2 -2
  42. package/esm2015/public-api.js +2 -2
  43. package/esm2015/queries/get-insert-elements-path.js +1 -1
  44. package/esm2015/queries/get-plugin-by-toolbar.js +13 -0
  45. package/esm2015/queries/get-toolbar-disabled.js +14 -0
  46. package/esm2015/queries/index.js +4 -2
  47. package/esm2015/utils/fragment.js +7 -4
  48. package/fesm2015/worktile-theia.js +244 -336
  49. package/fesm2015/worktile-theia.js.map +1 -1
  50. package/interfaces/plugins/plugins.d.ts +5 -2
  51. package/interfaces/toolbar.d.ts +4 -1
  52. package/package.json +1 -1
  53. package/plugins/code/code.component.d.ts +2 -2
  54. package/plugins/color/toolbar-item.component.d.ts +3 -9
  55. package/plugins/font-size/font-size.editor.d.ts +0 -1
  56. package/plugins/heading/heading.plugin.d.ts +3 -3
  57. package/plugins/indent/indent.editor.d.ts +0 -1
  58. package/plugins/public-api.d.ts +0 -1
  59. package/plugins/table/toolbar-item.component.d.ts +3 -9
  60. package/plugins/vertical-align/toolbar-item.component.d.ts +5 -13
  61. package/public-api.d.ts +1 -1
  62. package/queries/get-plugin-by-toolbar.d.ts +3 -0
  63. package/queries/get-toolbar-disabled.d.ts +4 -0
  64. package/queries/index.d.ts +3 -1
  65. package/utils/fragment.d.ts +2 -2
  66. package/components/toolbar-base-item/toolbar-base-item.component.d.ts +0 -11
  67. package/esm2015/components/toolbar-base-item/toolbar-base-item.component.js +0 -24
  68. package/esm2015/plugins/indent/toolbar-item.component.js +0 -115
  69. package/plugins/indent/toolbar-item.component.d.ts +0 -36
@@ -2,7 +2,7 @@ import * as i0 from '@angular/core';
2
2
  import { InjectionToken, Component, ChangeDetectionStrategy, HostBinding, Injectable, Input, HostListener, ViewContainerRef, ChangeDetectorRef, Inject, ViewChild, Directive, ElementRef, TemplateRef, Pipe, EventEmitter, forwardRef, Output, NgModule } from '@angular/core';
3
3
  import * as i10 from '@angular/common';
4
4
  import { DOCUMENT, CommonModule } from '@angular/common';
5
- import * as i4$1 from '@angular/forms';
5
+ import * as i4 from '@angular/forms';
6
6
  import { NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
7
7
  import * as i1 from 'slate-angular';
8
8
  import { BaseTextComponent, BaseElementComponent, AngularEditor, NODE_TO_PARENT, NODE_TO_INDEX, IS_SAFARI, hotkeys, getPlainText as getPlainText$1, ELEMENT_TO_COMPONENT, hasBlockCard, isCardLeft, FAKE_RIGHT_BLOCK_CARD_OFFSET, isComponentType, EDITOR_TO_ELEMENT, withAngular, SlateModule } from 'slate-angular';
@@ -13,7 +13,7 @@ import { HistoryEditor, withHistory } from 'slate-history';
13
13
  import { fromEvent, timer, Subject, combineLatest, Observable, BehaviorSubject, merge, ReplaySubject } from 'rxjs';
14
14
  import * as i1$1 from 'ngx-tethys/popover';
15
15
  import { ThyPopover } from 'ngx-tethys/popover';
16
- import * as i4 from 'ngx-tethys/icon';
16
+ import * as i3 from 'ngx-tethys/icon';
17
17
  import { ThyIconModule } from 'ngx-tethys/icon';
18
18
  import * as i5 from 'ngx-tethys/input';
19
19
  import { ThyInputModule } from 'ngx-tethys/input';
@@ -33,7 +33,7 @@ import { ThyUploadStatus } from 'ngx-tethys/uploader';
33
33
  import * as i1$3 from '@angular/platform-browser';
34
34
  import * as i6 from 'ngx-tethys/progress';
35
35
  import { ThyProgressModule } from 'ngx-tethys/progress';
36
- import * as i3 from 'ngx-tethys/nav';
36
+ import * as i3$1 from 'ngx-tethys/nav';
37
37
  import { ThyNavModule } from 'ngx-tethys/nav';
38
38
  import * as i5$1 from 'ngx-tethys/tooltip';
39
39
  import { ThyTooltipModule } from 'ngx-tethys/tooltip';
@@ -202,7 +202,8 @@ const ALIGN_BLOCK_TYPES = [ElementKinds.default, ElementKinds.listItem, ElementK
202
202
  const CONTAINER_BLOCKS = [ElementKinds.blockquote, ElementKinds.tableCell];
203
203
  const LIST_BLOCK_TYPES = [ElementKinds.numberedList, ElementKinds.bulletedList];
204
204
  const VOID_BLOCK_TYPES = [ElementKinds.image, ElementKinds.hr];
205
- const BLOCK_DELETEBACKWARD_TYPES = [ElementKinds.tableCell];
205
+ const BLOCK_DELETE_BACKWARD_TYPES = [ElementKinds.tableCell];
206
+ const DISABLED_OPERATE_TYPES = [ElementKinds.code, ElementKinds.hr];
206
207
 
207
208
  var ErrorCodes;
208
209
  (function (ErrorCodes) {
@@ -482,7 +483,7 @@ const THE_MODE_PROVIDER = {
482
483
  var ToolbarItemType;
483
484
  (function (ToolbarItemType) {
484
485
  ToolbarItemType["default"] = "default";
485
- ToolbarItemType["toolDropdown"] = "tool-dropdown";
486
+ ToolbarItemType["dropdown"] = "dropdown";
486
487
  })(ToolbarItemType || (ToolbarItemType = {}));
487
488
  var ToolbarAlignment;
488
489
  (function (ToolbarAlignment) {
@@ -700,7 +701,7 @@ class TheColorSelectComponent {
700
701
  }
701
702
  }
702
703
  TheColorSelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheColorSelectComponent, deps: [{ token: i1$1.ThyPopoverRef }], target: i0.ɵɵFactoryTarget.Component });
703
- TheColorSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheColorSelectComponent, selector: "the-color-select", inputs: { selectedColor: "selectedColor", selectAction: "selectAction", showCustom: "showCustom", colors: "colors", option: "option" }, host: { listeners: { "document: mousedown": "handleDocumentMouseDown($event)", "mousedown": "handleMouseDown($event)", "keydown": "handleKeydown($event)" } }, ngImport: i0, template: "<div class=\"color-container\">\n <div class=\"colors\">\n <div *ngFor=\"let row of selectColors; let rowIndex = index\">\n <span\n class=\"color-item\"\n *ngFor=\"let _color of row.rowValue; let i = index\"\n [ngClass]=\"_color.classMaps\"\n (mousedown)=\"_selectColor($event, _color.value)\"\n >\n <span [ngStyle]=\"{ background: _color.value }\">\n <thy-icon thyIconName=\"check\" [ngStyle]=\"{ color: row.tickColor }\"></thy-icon>\n </span>\n </span>\n </div>\n </div>\n <div *ngIf=\"option.showCustom\" class=\"select-color\">\n <span class=\"color\" [ngStyle]=\"{ background: selectedColor }\"></span>\n #\n <input\n thyInput\n maxlength=\"6\"\n (keydown.enter)=\"customInputColorEnter($event)\"\n onkeyup=\"value=value.replace(/[^0-9A-Fa-f]/g,'')\"\n class=\"value\"\n [(ngModel)]=\"customColor\"\n (ngModelChange)=\"colorChange(false)\"\n />\n </div>\n</div>\n", components: [{ type: i4.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }], directives: [{ type: i10.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i10.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i10.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i5.ThyInputDirective, selector: "[thyInput]", inputs: ["thySize", "thyAutocomplete"] }, { type: i4$1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { type: i4$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
704
+ TheColorSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheColorSelectComponent, selector: "the-color-select", inputs: { selectedColor: "selectedColor", selectAction: "selectAction", showCustom: "showCustom", colors: "colors", option: "option" }, host: { listeners: { "document: mousedown": "handleDocumentMouseDown($event)", "mousedown": "handleMouseDown($event)", "keydown": "handleKeydown($event)" } }, ngImport: i0, template: "<div class=\"color-container\">\n <div class=\"colors\">\n <div *ngFor=\"let row of selectColors; let rowIndex = index\">\n <span\n class=\"color-item\"\n *ngFor=\"let _color of row.rowValue; let i = index\"\n [ngClass]=\"_color.classMaps\"\n (mousedown)=\"_selectColor($event, _color.value)\"\n >\n <span [ngStyle]=\"{ background: _color.value }\">\n <thy-icon thyIconName=\"check\" [ngStyle]=\"{ color: row.tickColor }\"></thy-icon>\n </span>\n </span>\n </div>\n </div>\n <div *ngIf=\"option.showCustom\" class=\"select-color\">\n <span class=\"color\" [ngStyle]=\"{ background: selectedColor }\"></span>\n #\n <input\n thyInput\n maxlength=\"6\"\n (keydown.enter)=\"customInputColorEnter($event)\"\n onkeyup=\"value=value.replace(/[^0-9A-Fa-f]/g,'')\"\n class=\"value\"\n [(ngModel)]=\"customColor\"\n (ngModelChange)=\"colorChange(false)\"\n />\n </div>\n</div>\n", components: [{ type: i3.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }], directives: [{ type: i10.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i10.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i10.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i5.ThyInputDirective, selector: "[thyInput]", inputs: ["thySize", "thyAutocomplete"] }, { type: i4.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
704
705
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheColorSelectComponent, decorators: [{
705
706
  type: Component,
706
707
  args: [{
@@ -1001,10 +1002,10 @@ function deleteElementKey(nodes, key) {
1001
1002
  return nodes;
1002
1003
  }
1003
1004
  /**
1004
- * 删除 text 节点的 颜色/背景色
1005
+ * 过滤文本格式:颜色/背景色/字体大小
1005
1006
  * @param node
1006
1007
  */
1007
- function deleteColorAndBackgroundColorOfText(node) {
1008
+ function filterTextFormat(node) {
1008
1009
  node.children.forEach((child) => {
1009
1010
  if (Text.isText(child)) {
1010
1011
  if (child['color']) {
@@ -1013,9 +1014,12 @@ function deleteColorAndBackgroundColorOfText(node) {
1013
1014
  if (child['background-color']) {
1014
1015
  delete child['background-color'];
1015
1016
  }
1017
+ if (child['font-size']) {
1018
+ delete child['font-size'];
1019
+ }
1016
1020
  }
1017
1021
  else {
1018
- deleteColorAndBackgroundColorOfText(child);
1022
+ filterTextFormat(child);
1019
1023
  }
1020
1024
  });
1021
1025
  }
@@ -2029,6 +2033,31 @@ const isContainNestedType = (editor, types) => {
2029
2033
  return false;
2030
2034
  };
2031
2035
 
2036
+ const getToolbarItemDisabled = (editor, key, customTypes) => {
2037
+ var _a, _b;
2038
+ if (editor.selection) {
2039
+ let disabledOperateTypes = (_b = (_a = getPluginOptions(editor, key)) === null || _a === void 0 ? void 0 : _a.disabledOperateTypes) !== null && _b !== void 0 ? _b : [];
2040
+ if (customTypes === null || customTypes === void 0 ? void 0 : customTypes.length) {
2041
+ disabledOperateTypes = Array.from(new Set([...disabledOperateTypes, ...customTypes]));
2042
+ }
2043
+ const anchorNode = anchorBlock(editor);
2044
+ return anchorNode && disabledOperateTypes.includes(anchorNode === null || anchorNode === void 0 ? void 0 : anchorNode.type);
2045
+ }
2046
+ };
2047
+
2048
+ const getPluginByToolbarItem = (editor, toolbarItem) => {
2049
+ const pluginKey = toolbarItem.pluginKey;
2050
+ if (pluginKey) {
2051
+ return editor.pluginsByKey[pluginKey];
2052
+ }
2053
+ for (let key in editor.pluginsByKey) {
2054
+ const toolbarItems = editor.pluginsByKey[key].toolbarItems;
2055
+ if (toolbarItems && toolbarItems.some(item => item.key === toolbarItem.key)) {
2056
+ return editor.pluginsByKey[key];
2057
+ }
2058
+ }
2059
+ };
2060
+
2032
2061
  var index$1 = /*#__PURE__*/Object.freeze({
2033
2062
  __proto__: null,
2034
2063
  getLastNode: getLastNode,
@@ -2085,7 +2114,9 @@ var index$1 = /*#__PURE__*/Object.freeze({
2085
2114
  findPath: findPath,
2086
2115
  findNode: findNode,
2087
2116
  findDescendant: findDescendant,
2088
- someNode: someNode
2117
+ someNode: someNode,
2118
+ getToolbarItemDisabled: getToolbarItemDisabled,
2119
+ getPluginByToolbarItem: getPluginByToolbarItem
2089
2120
  });
2090
2121
 
2091
2122
  const insertElements = (editor, elements) => {
@@ -2612,7 +2643,7 @@ const withResetType = (editor) => {
2612
2643
  editor.onKeydown = (event) => {
2613
2644
  const { selection } = editor;
2614
2645
  if (IS_SAFARI && selection && Range.isCollapsed(selection) && hotkeys.isDeleteBackward(event)) {
2615
- const blockEntry = getAboveByType(editor, BLOCK_DELETEBACKWARD_TYPES);
2646
+ const blockEntry = getAboveByType(editor, BLOCK_DELETE_BACKWARD_TYPES);
2616
2647
  if (blockEntry && blockEntry[0]) {
2617
2648
  const isStart = Editor.isStart(editor, selection.anchor, blockEntry[1]);
2618
2649
  if (isStart) {
@@ -3045,7 +3076,7 @@ class TheImageComponent extends TheBaseElementComponent {
3045
3076
  }
3046
3077
  }
3047
3078
  TheImageComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheImageComponent, deps: [{ token: i0.ElementRef }, { token: i1$3.DomSanitizer }, { token: THE_UPLOAD_SERVICE_TOKEN }, { token: i0.ChangeDetectorRef }, { token: TheContextService }, { token: i1$1.ThyPopover }, { token: i2.Overlay }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component });
3048
- TheImageComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheImageComponent, selector: "the-image, [theImage]", viewQueries: [{ propertyName: "imageContent", first: true, predicate: ["imageContent"], descendants: true }, { propertyName: "img", first: true, predicate: ["img"], descendants: true }, { propertyName: "layoutToolbar", first: true, predicate: ["layoutToolbar"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<slate-children [children]=\"children\" [context]=\"childrenContext\" [viewContext]=\"viewContext\"></slate-children>\n\n<div class=\"image-container\" contenteditable=\"false\" [style.textAlign]=\"imageEntry.align\">\n <div\n #imageContent\n *ngIf=\"imageEntry.thumbUrl\"\n class=\"image-content\"\n [class.pointer]=\"!selection\"\n [ngStyle]=\"{\n 'width.px':\n imageEntry?.layout && imageEntry?.width > layoutDefaultWidth && !imageEntry?.reSized\n ? layoutDefaultWidth\n : imageEntry.width,\n 'height.px': imageEntry.height\n }\"\n >\n <img #img class=\"main-image\" [src]=\"imageEntry.thumbUrl\" [alt]=\"imageEntry.name\" />\n <div *ngIf=\"selection\" class=\"image-profile\" [class.outline]=\"selection\">\n <span *ngIf=\"isCollapsed\" (mousedown)=\"startDrag($event, '-xl')\" class=\"image-pointer left top\"></span>\n <span *ngIf=\"isCollapsed\" (mousedown)=\"startDrag($event, 'xl')\" class=\"image-pointer right top\"></span>\n <span *ngIf=\"isCollapsed\" (mousedown)=\"startDrag($event, 'xl')\" class=\"image-pointer right bottom\"></span>\n <span *ngIf=\"isCollapsed\" (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\" (mousedown)=\"preview($event)\" [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 <div class=\"the-block-toolbar-popover\" contenteditable=\"false\">\n <thy-icon-nav>\n <ng-container *ngFor=\"let item of layoutOptions\">\n <a\n *ngIf=\"item.key !== 'split'\"\n href=\"javascript:;\"\n thyIconNavLink\n [ngClass]=\"{ 'remove-link': item.key === 'remove' }\"\n [thyIconNavLinkIcon]=\"item.icon\"\n [thyTooltip]=\"item.name\"\n [thyIconNavLinkActive]=\"layoutActive(item.key)\"\n thyTooltipPlacement=\"top\"\n (mousedown)=\"item?.handle($event, item.key)\"\n ></a>\n <nav-split-line *ngIf=\"item.key === 'split'\"></nav-split-line>\n </ng-container>\n </thy-icon-nav>\n </div>\n</ng-template>\n", components: [{ type: i1.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }, { type: i6.ThyProgressComponent, selector: "thy-progress", inputs: ["thyType", "thySize", "thyValue", "thyMax", "thyTips"] }, { type: i4.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { type: i3.ThyIconNavComponent, selector: "thy-icon-nav", inputs: ["thyType"] }, { type: i3.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: NavSplitLineComponent, selector: "nav-split-line", inputs: ["mode"] }], directives: [{ type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i10.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i10.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i10.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i5$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }] });
3079
+ TheImageComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheImageComponent, selector: "the-image, [theImage]", viewQueries: [{ propertyName: "imageContent", first: true, predicate: ["imageContent"], descendants: true }, { propertyName: "img", first: true, predicate: ["img"], descendants: true }, { propertyName: "layoutToolbar", first: true, predicate: ["layoutToolbar"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<slate-children [children]=\"children\" [context]=\"childrenContext\" [viewContext]=\"viewContext\"></slate-children>\n\n<div class=\"image-container\" contenteditable=\"false\" [style.textAlign]=\"imageEntry.align\">\n <div\n #imageContent\n *ngIf=\"imageEntry.thumbUrl\"\n class=\"image-content\"\n [class.pointer]=\"!selection\"\n [ngStyle]=\"{\n 'width.px':\n imageEntry?.layout && imageEntry?.width > layoutDefaultWidth && !imageEntry?.reSized\n ? layoutDefaultWidth\n : imageEntry.width,\n 'height.px': imageEntry.height\n }\"\n >\n <img #img class=\"main-image\" [src]=\"imageEntry.thumbUrl\" [alt]=\"imageEntry.name\" />\n <div *ngIf=\"selection\" class=\"image-profile\" [class.outline]=\"selection\">\n <span *ngIf=\"isCollapsed\" (mousedown)=\"startDrag($event, '-xl')\" class=\"image-pointer left top\"></span>\n <span *ngIf=\"isCollapsed\" (mousedown)=\"startDrag($event, 'xl')\" class=\"image-pointer right top\"></span>\n <span *ngIf=\"isCollapsed\" (mousedown)=\"startDrag($event, 'xl')\" class=\"image-pointer right bottom\"></span>\n <span *ngIf=\"isCollapsed\" (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\" (mousedown)=\"preview($event)\" [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 <div class=\"the-block-toolbar-popover\" contenteditable=\"false\">\n <thy-icon-nav>\n <ng-container *ngFor=\"let item of layoutOptions\">\n <a\n *ngIf=\"item.key !== 'split'\"\n href=\"javascript:;\"\n thyIconNavLink\n [ngClass]=\"{ 'remove-link': item.key === 'remove' }\"\n [thyIconNavLinkIcon]=\"item.icon\"\n [thyTooltip]=\"item.name\"\n [thyIconNavLinkActive]=\"layoutActive(item.key)\"\n thyTooltipPlacement=\"top\"\n (mousedown)=\"item?.handle($event, item.key)\"\n ></a>\n <nav-split-line *ngIf=\"item.key === 'split'\"></nav-split-line>\n </ng-container>\n </thy-icon-nav>\n </div>\n</ng-template>\n", components: [{ type: i1.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }, { type: i6.ThyProgressComponent, selector: "thy-progress", inputs: ["thyType", "thySize", "thyValue", "thyMax", "thyTips"] }, { type: i3.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { type: i3$1.ThyIconNavComponent, selector: "thy-icon-nav", inputs: ["thyType"] }, { type: i3$1.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: NavSplitLineComponent, selector: "nav-split-line", inputs: ["mode"] }], directives: [{ type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i10.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i10.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i10.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i5$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }] });
3049
3080
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheImageComponent, decorators: [{
3050
3081
  type: Component,
3051
3082
  args: [{
@@ -5375,12 +5406,7 @@ const AlignEditor = {
5375
5406
  var _a;
5376
5407
  const contextService = (_a = editor === null || editor === void 0 ? void 0 : editor.injector) === null || _a === void 0 ? void 0 : _a.get(TheContextService);
5377
5408
  const { theOptions: { richMedia } } = contextService.getOptions();
5378
- if (richMedia && editor.selection) {
5379
- const disableGroup = [ElementKinds.image];
5380
- const anchorBlock$1 = anchorBlock(editor);
5381
- return anchorBlock$1 && disableGroup.includes(anchorBlock$1 === null || anchorBlock$1 === void 0 ? void 0 : anchorBlock$1.type);
5382
- }
5383
- return false;
5409
+ return getToolbarItemDisabled(editor, PluginKeys.align, richMedia ? [ElementKinds.image] : []);
5384
5410
  },
5385
5411
  setAlign(editor, alignment) {
5386
5412
  if (TableEditor.setAlign(editor, alignment)) {
@@ -5420,7 +5446,7 @@ const createAlignPlugin = createPluginFactory({
5420
5446
  toolbarItems: [
5421
5447
  {
5422
5448
  key: ToolbarActionTypes.alignType,
5423
- type: ToolbarItemType.toolDropdown,
5449
+ type: ToolbarItemType.dropdown,
5424
5450
  dropdownMode: DropdownMode.icon,
5425
5451
  dropdownItemKey: ToolbarActionTypes.alignLeft,
5426
5452
  includes: [ToolbarActionTypes.alignLeft, ToolbarActionTypes.alignCenter, ToolbarActionTypes.alignRight],
@@ -5448,11 +5474,15 @@ const createAlignPlugin = createPluginFactory({
5448
5474
  execute: editor => AlignEditor.setAlign(editor, Alignment.right),
5449
5475
  active: editor => AlignEditor.isActive(editor, Alignment.right)
5450
5476
  }
5451
- ]
5477
+ ],
5478
+ options: {
5479
+ disabledOperateTypes: [...DISABLED_OPERATE_TYPES]
5480
+ }
5452
5481
  });
5453
5482
 
5454
5483
  const headingOptions = {
5455
5484
  allowParentTypes: [ElementKinds.tableCell, ElementKinds.blockquote],
5485
+ disabledOperateTypes: [ElementKinds.image, ...DISABLED_OPERATE_TYPES],
5456
5486
  cleanupTypes: [ElementKinds.bulletedList, ElementKinds.numberedList, ElementKinds.listItem]
5457
5487
  };
5458
5488
  const HeadingEditor = {
@@ -5530,7 +5560,7 @@ const createHeadingPlugin = createPluginFactory({
5530
5560
  {
5531
5561
  key: ElementKinds.headingList,
5532
5562
  name: '正文',
5533
- type: ToolbarItemType.toolDropdown,
5563
+ type: ToolbarItemType.dropdown,
5534
5564
  dropdownItemKey: ElementKinds.paragraph,
5535
5565
  includes: [ElementKinds.paragraph, ...STANDARD_HEADING_TYPES]
5536
5566
  },
@@ -5694,7 +5724,10 @@ const createMarkPlugin = createPluginFactory({
5694
5724
  execute: editor => MarkEditor.toggleMark(editor, MarkTypes.underline),
5695
5725
  active: editor => MarkEditor.isMarkActive(editor, MarkTypes.underline)
5696
5726
  }
5697
- ]
5727
+ ],
5728
+ options: {
5729
+ disabledOperateTypes: [ElementKinds.image, ...DISABLED_OPERATE_TYPES]
5730
+ }
5698
5731
  });
5699
5732
 
5700
5733
  const withNodeID = (e) => {
@@ -6775,7 +6808,19 @@ const createRemoveVoidPlugin = createPluginFactory({
6775
6808
  withOverrides: withRemoveVoid
6776
6809
  });
6777
6810
 
6778
- class TheToolbarBaseItemComponent {
6811
+ class TheBaseToolbarItem {
6812
+ set toolbarItem(value) {
6813
+ this._toolbarItem = value;
6814
+ }
6815
+ get toolbarItem() {
6816
+ return this._toolbarItem;
6817
+ }
6818
+ get disabledState() {
6819
+ return this.disabled;
6820
+ }
6821
+ get activeState() {
6822
+ return this.active;
6823
+ }
6779
6824
  execute(event) {
6780
6825
  var _a;
6781
6826
  event.preventDefault();
@@ -6787,30 +6832,76 @@ class TheToolbarBaseItemComponent {
6787
6832
  AngularEditor.focus(this.editor);
6788
6833
  }
6789
6834
  }
6835
+ selectionChange(editor) {
6836
+ var _a, _b, _c, _d, _e;
6837
+ if (editor.selection) {
6838
+ this.active = ((_a = this._toolbarItem) === null || _a === void 0 ? void 0 : _a.active) ? (_b = this._toolbarItem) === null || _b === void 0 ? void 0 : _b.active(editor) : false;
6839
+ if ((_c = this._toolbarItem) === null || _c === void 0 ? void 0 : _c.disable) {
6840
+ this.disabled = ((_d = this._toolbarItem) === null || _d === void 0 ? void 0 : _d.disable) ? (_e = this._toolbarItem) === null || _e === void 0 ? void 0 : _e.disable(editor) : false;
6841
+ }
6842
+ else {
6843
+ const thePlugin = getPluginByToolbarItem(editor, this._toolbarItem);
6844
+ this.disabled = thePlugin && getToolbarItemDisabled(editor, thePlugin.key);
6845
+ }
6846
+ }
6847
+ }
6790
6848
  }
6791
- TheToolbarBaseItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheToolbarBaseItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
6792
- TheToolbarBaseItemComponent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.15", type: TheToolbarBaseItemComponent, ngImport: i0 });
6793
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheToolbarBaseItemComponent, decorators: [{
6849
+ TheBaseToolbarItem.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheBaseToolbarItem, deps: [], target: i0.ɵɵFactoryTarget.Directive });
6850
+ TheBaseToolbarItem.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.15", type: TheBaseToolbarItem, inputs: { toolbarItem: "toolbarItem", editor: "editor" }, host: { properties: { "class.disabled": "this.disabledState", "class.active": "this.activeState" } }, ngImport: i0 });
6851
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheBaseToolbarItem, decorators: [{
6794
6852
  type: Directive
6795
- }] });
6853
+ }], propDecorators: { toolbarItem: [{
6854
+ type: Input
6855
+ }], editor: [{
6856
+ type: Input
6857
+ }], disabledState: [{
6858
+ type: HostBinding,
6859
+ args: ['class.disabled']
6860
+ }], activeState: [{
6861
+ type: HostBinding,
6862
+ args: ['class.active']
6863
+ }] } });
6864
+ class TheBaseToolbarDropdown extends TheBaseToolbarItem {
6865
+ constructor() {
6866
+ super(...arguments);
6867
+ this.mode = DropdownMode.text;
6868
+ }
6869
+ get defaultDropdownItem() {
6870
+ const activeItem = this.dropdownItemKey && this.menus.find((item) => item.key === this.dropdownItemKey);
6871
+ return activeItem ? activeItem : this.menus[0];
6872
+ }
6873
+ selectionChange(editor) {
6874
+ super.selectionChange(editor);
6875
+ const activeItem = this.menus.find(i => {
6876
+ if (i === null || i === void 0 ? void 0 : i.active) {
6877
+ return i === null || i === void 0 ? void 0 : i.active(editor);
6878
+ }
6879
+ });
6880
+ if (!this.toolbarItem.dropdownFixedIcon) {
6881
+ this.activeMenuItem = activeItem ? activeItem : this.defaultDropdownItem;
6882
+ }
6883
+ }
6884
+ }
6885
+ TheBaseToolbarDropdown.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheBaseToolbarDropdown, deps: null, target: i0.ɵɵFactoryTarget.Directive });
6886
+ TheBaseToolbarDropdown.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.15", type: TheBaseToolbarDropdown, inputs: { menus: "menus", mode: "mode", dropdownItemKey: "dropdownItemKey" }, usesInheritance: true, ngImport: i0 });
6887
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheBaseToolbarDropdown, decorators: [{
6888
+ type: Directive
6889
+ }], propDecorators: { menus: [{
6890
+ type: Input
6891
+ }], mode: [{
6892
+ type: Input
6893
+ }], dropdownItemKey: [{
6894
+ type: Input
6895
+ }] } });
6796
6896
 
6797
- class TheToolbarDropdownComponent extends TheToolbarBaseItemComponent {
6897
+ class TheToolbarDropdownComponent extends TheBaseToolbarDropdown {
6798
6898
  constructor(elementRef, thyPopover, viewContainerRef, overlay) {
6799
6899
  super();
6800
6900
  this.elementRef = elementRef;
6801
6901
  this.thyPopover = thyPopover;
6802
6902
  this.viewContainerRef = viewContainerRef;
6803
6903
  this.overlay = overlay;
6804
- this.mode = DropdownMode.text;
6805
6904
  this.dropdownMode = DropdownMode;
6806
- this.disabled = false;
6807
- }
6808
- set item(i) {
6809
- this._item = i;
6810
- this.activeMenu = i;
6811
- }
6812
- get item() {
6813
- return this._item;
6814
6905
  }
6815
6906
  get isOpen() {
6816
6907
  return this.dropdownPopoverRef && this.dropdownPopoverRef.getOverlayRef() && this.dropdownPopoverRef.getOverlayRef().hasAttached();
@@ -6828,34 +6919,24 @@ class TheToolbarDropdownComponent extends TheToolbarBaseItemComponent {
6828
6919
  this.closeDropdownPopover();
6829
6920
  }
6830
6921
  }
6831
- get disabledState() {
6832
- return this.disabled;
6833
- }
6834
6922
  ngOnInit() {
6835
6923
  var _a;
6836
6924
  if (!this.template) {
6837
6925
  this.template = this.mode === this.dropdownMode.icon ? this.iconModeTemplate : this.textModeTemplate;
6838
6926
  }
6839
- if (!this.activeMenu) {
6840
- this.activeMenu = this.menus[0];
6927
+ if (!this.activeMenuItem) {
6928
+ this.activeMenuItem = this.defaultDropdownItem;
6841
6929
  }
6842
6930
  if (this.toolbarItem) {
6843
6931
  this.elementRef.nativeElement.classList.add(`${(_a = this.toolbarItem) === null || _a === void 0 ? void 0 : _a.key}`);
6844
6932
  }
6845
6933
  }
6846
- statusChange(editor) {
6847
- var _a, _b;
6848
- this.disabled = ((_a = this.toolbarItem) === null || _a === void 0 ? void 0 : _a.disable) ? (_b = this.toolbarItem) === null || _b === void 0 ? void 0 : _b.disable(editor) : false;
6849
- const activeItem = this.menus.find(i => {
6850
- if (i === null || i === void 0 ? void 0 : i.active) {
6851
- return i === null || i === void 0 ? void 0 : i.active(editor);
6852
- }
6853
- });
6854
- this.activeMenu = activeItem ? activeItem : this.item;
6855
- }
6856
6934
  itemMousedown(event, item) {
6857
6935
  super.execute(event);
6858
6936
  this.closeDropdownPopover();
6937
+ if (!this.toolbarItem.dropdownFixedIcon) {
6938
+ this.activeMenuItem = item;
6939
+ }
6859
6940
  if (this.itemMousedownHandle) {
6860
6941
  this.itemMousedownHandle(item);
6861
6942
  return;
@@ -6905,7 +6986,7 @@ class TheToolbarDropdownComponent extends TheToolbarBaseItemComponent {
6905
6986
  }
6906
6987
  }
6907
6988
  TheToolbarDropdownComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheToolbarDropdownComponent, deps: [{ token: i0.ElementRef }, { token: i1$1.ThyPopover }, { token: i0.ViewContainerRef }, { token: i2.Overlay }], target: i0.ɵɵFactoryTarget.Component });
6908
- TheToolbarDropdownComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheToolbarDropdownComponent, selector: "the-toolbar-dropdown", inputs: { toolbarItem: "toolbarItem", menus: "menus", mode: "mode", item: "item", itemMousedownHandle: "itemMousedownHandle" }, host: { listeners: { "mousedown": "toggleDropdown($event)", "document: mousedown": "handleDocumentMouseDown($event)" }, properties: { "class.disabled": "this.disabledState" }, classAttribute: "the-toolbar-dropdown-container" }, 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: "<ng-template [ngTemplateOutlet]=\"template\"></ng-template>\n\n<ng-template #iconModeTemplate>\n <a thyIconNavLink class=\"icon-mode link-with-down\" [thyTooltip]=\"activeMenu?.name\" thyTooltipPlacement=\"top\">\n <thy-icon [thyIconName]=\"activeMenu?.icon\"></thy-icon>\n <thy-icon class=\"caret-down-icon font-size-sm text-desc\" thyIconName=\"caret-down\"></thy-icon>\n </a>\n</ng-template>\n\n<ng-template #textModeTemplate>\n <a thyIconNavLink class=\"text-mode\" [thyTooltip]=\"activeMenu?.name\" thyTooltipPlacement=\"top\">\n <span class=\"show-text\">{{ activeMenu?.name }}</span>\n <thy-icon class=\"text-caret-down-icon font-size-sm text-desc\" thyIconName=\"caret-down\"></thy-icon>\n </a>\n</ng-template>\n\n<ng-template #dropdownTemplate>\n <thy-action-menu class=\"dropdown\">\n <ng-container *ngFor=\"let menu of menus\">\n <a\n *ngIf=\"menu.key !== 'split'\"\n thyActionMenuItem\n href=\"javascript:;\"\n [thyActionMenuItemActive]=\"menu.key === activeMenu.key\"\n (mousedown)=\"itemMousedown($event, menu)\"\n [ngStyle]=\"menu?.styles\"\n >\n <span *ngIf=\"menu.icon && mode === dropdownMode.icon\" thyActionMenuItemIcon>\n <thy-icon [thyIconName]=\"menu.icon\"></thy-icon>\n </span>\n <span *ngIf=\"menu.name\" thyActionMenuItemName>{{ menu.name }}</span>\n </a>\n <thy-action-menu-divider *ngIf=\"menu.key === 'split'\"></thy-action-menu-divider>\n </ng-container>\n </thy-action-menu>\n</ng-template>\n", components: [{ type: i3.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i4.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { type: i2$1.ThyActionMenuComponent, selector: "thy-action-menu", inputs: ["thyTheme", "thyWidth"] }, { type: i2$1.ThyActionMenuDividerComponent, selector: "thy-action-menu-divider", inputs: ["thyTitle", "thyType"] }], directives: [{ type: i10.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i5$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { type: i10.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2$1.ThyActionMenuItemDirective, selector: "[thyActionMenuItem]", inputs: ["thyDisabled", "thyType"] }, { type: i2$1.ThyActionMenuItemActiveDirective, selector: "[thyActionMenuItemActive]", inputs: ["thyActionMenuItemActive"] }, { type: i10.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i2$1.ThyActionMenuItemIconDirective, selector: "[thyActionMenuItemIcon]" }, { type: i2$1.ThyActionMenuItemNameDirective, selector: "[thyActionMenuItemName]" }] });
6989
+ TheToolbarDropdownComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheToolbarDropdownComponent, selector: "the-toolbar-dropdown", inputs: { itemMousedownHandle: "itemMousedownHandle" }, host: { listeners: { "mousedown": "toggleDropdown($event)", "document: mousedown": "handleDocumentMouseDown($event)" }, classAttribute: "the-toolbar-dropdown-container" }, 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: "<ng-template [ngTemplateOutlet]=\"template\"></ng-template>\n\n<ng-template #iconModeTemplate>\n <a thyIconNavLink class=\"icon-mode link-with-down\" [thyTooltip]=\"activeMenuItem?.name\" thyTooltipPlacement=\"top\">\n <thy-icon [thyIconName]=\"activeMenuItem?.icon\"></thy-icon>\n <thy-icon class=\"caret-down-icon font-size-sm text-desc\" thyIconName=\"caret-down\"></thy-icon>\n </a>\n</ng-template>\n\n<ng-template #textModeTemplate>\n <a thyIconNavLink class=\"text-mode\" [thyTooltip]=\"activeMenuItem?.name\" thyTooltipPlacement=\"top\">\n <span class=\"show-text\">{{ activeMenuItem?.name }}</span>\n <thy-icon class=\"text-caret-down-icon font-size-sm text-desc\" thyIconName=\"caret-down\"></thy-icon>\n </a>\n</ng-template>\n\n<ng-template #dropdownTemplate>\n <thy-action-menu class=\"dropdown\">\n <ng-container *ngFor=\"let menu of menus\">\n <a\n *ngIf=\"menu.key !== 'split'\"\n thyActionMenuItem\n href=\"javascript:;\"\n [thyActionMenuItemActive]=\"menu.key === activeMenuItem?.key && !toolbarItem?.dropdownFixedIcon\"\n (mousedown)=\"itemMousedown($event, menu)\"\n [ngStyle]=\"menu?.styles\"\n >\n <span *ngIf=\"menu.icon && mode === dropdownMode.icon\" thyActionMenuItemIcon>\n <thy-icon [thyIconName]=\"menu.icon\"></thy-icon>\n </span>\n <span *ngIf=\"menu.name\" thyActionMenuItemName>{{ menu.name }}</span>\n </a>\n <thy-action-menu-divider *ngIf=\"menu.key === 'split'\"></thy-action-menu-divider>\n </ng-container>\n </thy-action-menu>\n</ng-template>\n", components: [{ type: i3$1.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i3.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { type: i2$1.ThyActionMenuComponent, selector: "thy-action-menu", inputs: ["thyTheme", "thyWidth"] }, { type: i2$1.ThyActionMenuDividerComponent, selector: "thy-action-menu-divider", inputs: ["thyTitle", "thyType"] }], directives: [{ type: i10.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i5$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { type: i10.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2$1.ThyActionMenuItemDirective, selector: "[thyActionMenuItem]", inputs: ["thyDisabled", "thyType"] }, { type: i2$1.ThyActionMenuItemActiveDirective, selector: "[thyActionMenuItemActive]", inputs: ["thyActionMenuItemActive"] }, { type: i10.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i2$1.ThyActionMenuItemIconDirective, selector: "[thyActionMenuItemIcon]" }, { type: i2$1.ThyActionMenuItemNameDirective, selector: "[thyActionMenuItemName]" }] });
6909
6990
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheToolbarDropdownComponent, decorators: [{
6910
6991
  type: Component,
6911
6992
  args: [{
@@ -6915,15 +6996,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImpo
6915
6996
  class: 'the-toolbar-dropdown-container'
6916
6997
  }
6917
6998
  }]
6918
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1$1.ThyPopover }, { type: i0.ViewContainerRef }, { type: i2.Overlay }]; }, propDecorators: { toolbarItem: [{
6919
- type: Input
6920
- }], menus: [{
6921
- type: Input
6922
- }], mode: [{
6923
- type: Input
6924
- }], item: [{
6925
- type: Input
6926
- }], itemMousedownHandle: [{
6999
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1$1.ThyPopover }, { type: i0.ViewContainerRef }, { type: i2.Overlay }]; }, propDecorators: { itemMousedownHandle: [{
6927
7000
  type: Input
6928
7001
  }], iconModeTemplate: [{
6929
7002
  type: ViewChild,
@@ -6940,9 +7013,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImpo
6940
7013
  }], handleDocumentMouseDown: [{
6941
7014
  type: HostListener,
6942
7015
  args: ['document: mousedown', ['$event']]
6943
- }], disabledState: [{
6944
- type: HostBinding,
6945
- args: ['class.disabled']
6946
7016
  }] } });
6947
7017
 
6948
7018
  class TheCodeComponent extends TheBaseElementComponent {
@@ -6973,11 +7043,11 @@ class TheCodeComponent extends TheBaseElementComponent {
6973
7043
  lineWrapping: this.config.mode === TheMode.default ? false : true,
6974
7044
  cursorBlinkRate: 500
6975
7045
  };
6976
- this.actives = this.menus[0];
7046
+ this.activeLanguage = this.menus[0];
6977
7047
  this.resizeBounds = null;
6978
- this.onChangeLangulage = item => {
7048
+ this.onChangeLanguage = item => {
6979
7049
  this.options = Object.assign(Object.assign({}, this.options), { mode: item.key });
6980
- this.actives = item;
7050
+ this.activeLanguage = item;
6981
7051
  CodeEditor.setCodeAttribute(this.editor, this.element, { language: item.key });
6982
7052
  };
6983
7053
  }
@@ -7114,7 +7184,10 @@ class TheCodeComponent extends TheBaseElementComponent {
7114
7184
  }
7115
7185
  useMode() {
7116
7186
  this.options = Object.assign(Object.assign({}, this.options), { mode: this.element.language });
7117
- this.actives = this.menus.find(i => i.key === this.element.language);
7187
+ const menuItem = this.menus.find(i => i.key === this.element.language);
7188
+ if (menuItem) {
7189
+ this.activeLanguage = menuItem;
7190
+ }
7118
7191
  }
7119
7192
  useAutoWrap() {
7120
7193
  this.options = Object.assign(Object.assign({}, this.options), { lineWrapping: this.element.autoWrap || false });
@@ -7147,7 +7220,7 @@ class TheCodeComponent extends TheBaseElementComponent {
7147
7220
  }
7148
7221
  }
7149
7222
  TheCodeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheCodeComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i1$4.ThyNotifyService }, { token: TheContextService }, { token: i0.NgZone }, { token: THE_MODE_TOKEN }], target: i0.ɵɵFactoryTarget.Component });
7150
- TheCodeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheCodeComponent, selector: "div[theCode]", viewQueries: [{ propertyName: "codemirror", first: true, predicate: ["codemirror"], descendants: true, read: CodeMirrorComponent }], usesInheritance: true, ngImport: i0, template: "<div contenteditable=\"false\" class=\"the-code-block-operation\" *ngIf=\"isCollapsed && codemirror && !options.readOnly\">\n <thy-icon-nav>\n <the-toolbar-dropdown [menus]=\"menus\" [item]=\"actives\" [itemMousedownHandle]=\"onChangeLangulage\"> </the-toolbar-dropdown>\n <span class=\"auto-wrap d-flex align-items-center\">\n <span>\u81EA\u52A8\u6362\u884C</span>\n <thy-switch\n class=\"auto-wrap-btn d-flex\"\n [(ngModel)]=\"options.lineWrapping\"\n (ngModelChange)=\"onChangeWrap($event)\"\n thySize=\"sm\"\n ></thy-switch>\n </span>\n <a\n href=\"javascript:;\"\n thyIconNavLink\n thyIconNavLinkIcon=\"copy\"\n thyTooltip=\"\u590D\u5236\"\n thyTooltipPlacement=\"top\"\n (mousedown)=\"onCopy($event)\"\n ></a>\n <nav-split-line [mode]=\"ToolbarItemMode.vertical\"></nav-split-line>\n <a\n href=\"javascript:;\"\n thyIconNavLink\n thyIconNavLinkIcon=\"trash\"\n thyTooltip=\"\u5220\u9664\"\n class=\"remove-link\"\n thyTooltipPlacement=\"top\"\n (mousedown)=\"onDelete($event)\"\n ></a>\n </thy-icon-nav>\n</div>\n\n<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: isCollapsed, readonly: options.readOnly, active: isHightLight && isCollapsed }\"\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=\"isCollapsed && !options.readOnly\"></thy-resize-handle>\n</div>\n", components: [{ type: i3.ThyIconNavComponent, selector: "thy-icon-nav", inputs: ["thyType"] }, { type: TheToolbarDropdownComponent, selector: "the-toolbar-dropdown", inputs: ["toolbarItem", "menus", "mode", "item", "itemMousedownHandle"] }, { type: i5$2.ThySwitchComponent, selector: "thy-switch", inputs: ["thyType", "thySize", "thyDisabled"], outputs: ["thyChange"] }, { type: i3.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: NavSplitLineComponent, selector: "nav-split-line", inputs: ["mode"] }, { type: i1.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }, { type: i8.CodeMirrorComponent, selector: "ng-codemirror, [ngCodeMirror]", inputs: ["autoMaxHeight", "delayRefreshTime", "options"], outputs: ["focusChange"] }, { type: i9.ThyResizeHandleComponent, selector: "thy-resize-handle, [thy-resize-handle]", inputs: ["thyDirection"], outputs: ["thyMouseDown"], exportAs: ["thyResizeHandle"] }], directives: [{ type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i5$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { type: i9.ThyResizableDirective, selector: "[thyResizable]", inputs: ["thyBounds", "thyMaxHeight", "thyMaxWidth", "thyMinHeight", "thyMinWidth", "thyGridColumnCount", "thyMaxColumn", "thyMinColumn", "thyLockAspectRatio", "thyPreview", "thyDisabled"], outputs: ["thyResize", "thyResizeEnd", "thyResizeStart"] }, { type: i10.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i10.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
7223
+ TheCodeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheCodeComponent, selector: "div[theCode]", viewQueries: [{ propertyName: "codemirror", first: true, predicate: ["codemirror"], descendants: true, read: CodeMirrorComponent }], usesInheritance: true, ngImport: i0, template: "<div contenteditable=\"false\" class=\"the-code-block-operation\" *ngIf=\"isCollapsed && codemirror && !options.readOnly\">\n <thy-icon-nav>\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\">\n <span>\u81EA\u52A8\u6362\u884C</span>\n <thy-switch\n class=\"auto-wrap-btn d-flex\"\n [(ngModel)]=\"options.lineWrapping\"\n (ngModelChange)=\"onChangeWrap($event)\"\n thySize=\"sm\"\n ></thy-switch>\n </span>\n <a\n href=\"javascript:;\"\n thyIconNavLink\n thyIconNavLinkIcon=\"copy\"\n thyTooltip=\"\u590D\u5236\"\n thyTooltipPlacement=\"top\"\n (mousedown)=\"onCopy($event)\"\n ></a>\n <nav-split-line [mode]=\"ToolbarItemMode.vertical\"></nav-split-line>\n <a\n href=\"javascript:;\"\n thyIconNavLink\n thyIconNavLinkIcon=\"trash\"\n thyTooltip=\"\u5220\u9664\"\n class=\"remove-link\"\n thyTooltipPlacement=\"top\"\n (mousedown)=\"onDelete($event)\"\n ></a>\n </thy-icon-nav>\n</div>\n\n<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: isCollapsed, readonly: options.readOnly, active: isHightLight && isCollapsed }\"\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=\"isCollapsed && !options.readOnly\"></thy-resize-handle>\n</div>\n", components: [{ type: i3$1.ThyIconNavComponent, selector: "thy-icon-nav", inputs: ["thyType"] }, { type: TheToolbarDropdownComponent, selector: "the-toolbar-dropdown", inputs: ["itemMousedownHandle"] }, { type: i5$2.ThySwitchComponent, selector: "thy-switch", inputs: ["thyType", "thySize", "thyDisabled"], outputs: ["thyChange"] }, { type: i3$1.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: NavSplitLineComponent, selector: "nav-split-line", inputs: ["mode"] }, { type: i1.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }, { type: i8.CodeMirrorComponent, selector: "ng-codemirror, [ngCodeMirror]", inputs: ["autoMaxHeight", "delayRefreshTime", "options"], outputs: ["focusChange"] }, { type: i9.ThyResizeHandleComponent, selector: "thy-resize-handle, [thy-resize-handle]", inputs: ["thyDirection"], outputs: ["thyMouseDown"], exportAs: ["thyResizeHandle"] }], directives: [{ type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i5$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { type: i9.ThyResizableDirective, selector: "[thyResizable]", inputs: ["thyBounds", "thyMaxHeight", "thyMaxWidth", "thyMinHeight", "thyMinWidth", "thyGridColumnCount", "thyMaxColumn", "thyMinColumn", "thyLockAspectRatio", "thyPreview", "thyDisabled"], outputs: ["thyResize", "thyResizeEnd", "thyResizeStart"] }, { type: i10.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i10.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
7151
7224
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheCodeComponent, decorators: [{
7152
7225
  type: Component,
7153
7226
  args: [{
@@ -7393,7 +7466,7 @@ class TheLinkEditComponent {
7393
7466
  }
7394
7467
  }
7395
7468
  TheLinkEditComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheLinkEditComponent, deps: [{ token: i1$1.ThyPopoverRef }], target: i0.ɵɵFactoryTarget.Component });
7396
- TheLinkEditComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", 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\n thyForm\n #linkForm=\"thyForm\"\n [thyFormValidatorConfig]=\"validatorConfig\"\n name=\"linkForm\"\n>\n <thy-form-group thyLabelText=\"\u6587\u672C\">\n <input\n thyInput\n placeholder=\"\u8BF7\u8F93\u5165\u6587\u672C\"\n required\n name=\"text\"\n [(ngModel)]=\"text\"\n thyAutofocus\n type=\"text\"\n />\n </thy-form-group>\n <thy-form-group thyLabelText=\"\u94FE\u63A5\">\n <input\n name=\"link\"\n thyInput\n placeholder=\"\u8BF7\u8F93\u5165\u94FE\u63A5\"\n required\n type=\"text\"\n #linkControl=\"ngModel\"\n [(ngModel)]=\"link\"\n />\n </thy-form-group>\n <thy-form-group-footer>\n <div class=\"btn-pair\">\n <button\n thyButton=\"link-secondary\"\n thySize=\"sm\"\n (click)=\"closePopover()\"\n >\u53D6\u6D88</button>\n <button\n thyButton=\"primary-square\"\n thySize=\"sm\"\n (thyFormSubmit)=\"applyLink(linkForm)\"\n >\u5E94\u7528</button>\n </div>\n </thy-form-group-footer>\n</form>\n", components: [{ type: i2$2.ThyFormGroupComponent, selector: "thy-form-group", inputs: ["thyLabelText", "thyLabelTextTranslateKey", "thyLabelRequired", "thyLabelPaddingTopClear", "thyFeedbackIcon", "thyTipsMode", "thyTips", "thyTipsTranslateKey", "thyRowFill"] }, { type: i2$2.ThyFormGroupFooterComponent, selector: "thy-form-group-footer", inputs: ["thyAlign"] }, { type: i1$5.ThyButtonComponent, selector: "thy-button,[thy-button],[thyButton]", inputs: ["thyButton", "thyType", "thyLoading", "thyLoadingText", "thySize", "thyIcon", "thySquare", "thyBlock"] }], directives: [{ type: i4$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i4$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i4$1.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i2$2.ThyFormDirective, selector: "[thyForm],[thy-form]", inputs: ["thyLayout", "thyEnterKeyMode", "thyFormValidatorConfig"], exportAs: ["thyForm"] }, { type: i5$3.ThyAutofocusDirective, selector: "input[thyAutofocus],textarea[thyAutofocus]", inputs: ["thyAutoSelect", "thyAutofocus"] }, { type: i4$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i5.ThyInputDirective, selector: "[thyInput]", inputs: ["thySize", "thyAutocomplete"] }, { type: i4$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i4$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i2$2.ThyFormSubmitDirective, selector: "[thyFormSubmit],[thy-form-submit]", outputs: ["thyFormSubmit"] }] });
7469
+ TheLinkEditComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", 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\n thyForm\n #linkForm=\"thyForm\"\n [thyFormValidatorConfig]=\"validatorConfig\"\n name=\"linkForm\"\n>\n <thy-form-group thyLabelText=\"\u6587\u672C\">\n <input\n thyInput\n placeholder=\"\u8BF7\u8F93\u5165\u6587\u672C\"\n required\n name=\"text\"\n [(ngModel)]=\"text\"\n thyAutofocus\n type=\"text\"\n />\n </thy-form-group>\n <thy-form-group thyLabelText=\"\u94FE\u63A5\">\n <input\n name=\"link\"\n thyInput\n placeholder=\"\u8BF7\u8F93\u5165\u94FE\u63A5\"\n required\n type=\"text\"\n #linkControl=\"ngModel\"\n [(ngModel)]=\"link\"\n />\n </thy-form-group>\n <thy-form-group-footer>\n <div class=\"btn-pair\">\n <button\n thyButton=\"link-secondary\"\n thySize=\"sm\"\n (click)=\"closePopover()\"\n >\u53D6\u6D88</button>\n <button\n thyButton=\"primary-square\"\n thySize=\"sm\"\n (thyFormSubmit)=\"applyLink(linkForm)\"\n >\u5E94\u7528</button>\n </div>\n </thy-form-group-footer>\n</form>\n", components: [{ type: i2$2.ThyFormGroupComponent, selector: "thy-form-group", inputs: ["thyLabelText", "thyLabelTextTranslateKey", "thyLabelRequired", "thyLabelPaddingTopClear", "thyFeedbackIcon", "thyTipsMode", "thyTips", "thyTipsTranslateKey", "thyRowFill"] }, { type: i2$2.ThyFormGroupFooterComponent, selector: "thy-form-group-footer", inputs: ["thyAlign"] }, { type: i1$5.ThyButtonComponent, selector: "thy-button,[thy-button],[thyButton]", inputs: ["thyButton", "thyType", "thyLoading", "thyLoadingText", "thySize", "thyIcon", "thySquare", "thyBlock"] }], directives: [{ type: i4.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i4.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i2$2.ThyFormDirective, selector: "[thyForm],[thy-form]", inputs: ["thyLayout", "thyEnterKeyMode", "thyFormValidatorConfig"], exportAs: ["thyForm"] }, { type: i5$3.ThyAutofocusDirective, selector: "input[thyAutofocus],textarea[thyAutofocus]", inputs: ["thyAutoSelect", "thyAutofocus"] }, { type: i4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i5.ThyInputDirective, selector: "[thyInput]", inputs: ["thySize", "thyAutocomplete"] }, { type: i4.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i2$2.ThyFormSubmitDirective, selector: "[thyFormSubmit],[thy-form-submit]", outputs: ["thyFormSubmit"] }] });
7397
7470
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheLinkEditComponent, decorators: [{
7398
7471
  type: Component,
7399
7472
  args: [{
@@ -7617,7 +7690,10 @@ const createLinkPlugin = createPluginFactory({
7617
7690
  execute: editor => LinkEditor.insertLink(editor),
7618
7691
  active: editor => LinkEditor.isLinkActive(editor)
7619
7692
  }
7620
- ]
7693
+ ],
7694
+ options: {
7695
+ disabledOperateTypes: [ElementKinds.image, ...DISABLED_OPERATE_TYPES]
7696
+ }
7621
7697
  });
7622
7698
 
7623
7699
  /**
@@ -8427,7 +8503,7 @@ TheTableOptionsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0
8427
8503
  </a>
8428
8504
  </ng-container>
8429
8505
  </thy-action-menu>
8430
- `, isInline: true, components: [{ type: i2$1.ThyActionMenuComponent, selector: "thy-action-menu", inputs: ["thyTheme", "thyWidth"] }, { type: i4.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }], directives: [{ type: i10.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2$1.ThyActionMenuItemDirective, selector: "[thyActionMenuItem]", inputs: ["thyDisabled", "thyType"] }, { type: i2$1.ThyActionMenuItemNameDirective, selector: "[thyActionMenuItemName]" }, { type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2$1.ThyActionMenuItemExtendIconDirective, selector: "[thyActionMenuItemExtendIcon]" }] });
8506
+ `, isInline: true, components: [{ type: i2$1.ThyActionMenuComponent, selector: "thy-action-menu", inputs: ["thyTheme", "thyWidth"] }, { type: i3.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }], directives: [{ type: i10.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2$1.ThyActionMenuItemDirective, selector: "[thyActionMenuItem]", inputs: ["thyDisabled", "thyType"] }, { type: i2$1.ThyActionMenuItemNameDirective, selector: "[thyActionMenuItemName]" }, { type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2$1.ThyActionMenuItemExtendIconDirective, selector: "[thyActionMenuItemExtendIcon]" }] });
8431
8507
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheTableOptionsComponent, decorators: [{
8432
8508
  type: Component,
8433
8509
  args: [{
@@ -8581,7 +8657,7 @@ class TheTableToolbarComponent {
8581
8657
  }
8582
8658
  }
8583
8659
  TheTableToolbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheTableToolbarComponent, deps: [{ token: i0.NgZone }, { token: TheColorSelectService }, { token: i1$1.ThyPopover }, { token: i1$1.ThyPopoverRef }], target: i0.ɵɵFactoryTarget.Component });
8584
- TheTableToolbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheTableToolbarComponent, selector: "the-table-toolbar", inputs: { tableStore: "tableStore", isActiveSelect: "isActiveSelect" }, ngImport: i0, template: "<thy-icon-nav>\n <ng-container *ngFor=\"let item of cellMenuList\">\n <a href=\"javascript:;\" thyIconNavLink *ngIf=\"!item.invisibility\" [thyTooltip]=\"item.name\" (mousedown)=\"item.actionHandle()\">\n <thy-icon [thyIconName]=\"item.icon\"></thy-icon>\n </a>\n </ng-container>\n <nav-split-line *ngIf=\"!isActiveSelect && isShowSplitLine\"></nav-split-line>\n <a href=\"javascript:;\" thyIconNavLink thyTooltip=\"\u5355\u5143\u683C\u80CC\u666F\" (mousedown)=\"openSelectColor($event)\">\n <thy-icon thyIconName=\"background-tt\" thyIconType=\"twotone\" [thyTwotoneColor]=\"selectedColor\"></thy-icon>\n </a>\n <nav-split-line *ngIf=\"tableStore.isSelectedTable\"></nav-split-line>\n <button\n thyButton=\"default\"\n *ngIf=\"tableStore.isSelectedTable\"\n class=\"mr-2\"\n thySize=\"md\"\n class=\"table-options\"\n (mousedown)=\"openTableOptionMenu($event)\"\n >\n <span>\u8868\u683C\u9009\u9879</span>\n <thy-icon thyIconName=\"caret-down\"></thy-icon>\n </button>\n <nav-split-line *ngIf=\"deleteIcon\"></nav-split-line>\n <a\n *ngIf=\"deleteIcon\"\n href=\"javascript:;\"\n thyIconNavLink\n [thyTooltip]=\"iconName\"\n class=\"danger\"\n [thyIconNavLinkIcon]=\"deleteIcon\"\n (mousedown)=\"onDelete($event)\"\n (mouseenter)=\"onEnterDelete($event)\"\n (mouseleave)=\"onLeaveDelete($event)\"\n ></a>\n</thy-icon-nav>\n", components: [{ type: i3.ThyIconNavComponent, selector: "thy-icon-nav", inputs: ["thyType"] }, { type: i3.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i4.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { type: NavSplitLineComponent, selector: "nav-split-line", inputs: ["mode"] }, { type: i1$5.ThyButtonComponent, selector: "thy-button,[thy-button],[thyButton]", inputs: ["thyButton", "thyType", "thyLoading", "thyLoadingText", "thySize", "thyIcon", "thySquare", "thyBlock"] }], directives: [{ type: i10.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }] });
8660
+ TheTableToolbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheTableToolbarComponent, selector: "the-table-toolbar", inputs: { tableStore: "tableStore", isActiveSelect: "isActiveSelect" }, ngImport: i0, template: "<thy-icon-nav>\n <ng-container *ngFor=\"let item of cellMenuList\">\n <a href=\"javascript:;\" thyIconNavLink *ngIf=\"!item.invisibility\" [thyTooltip]=\"item.name\" (mousedown)=\"item.actionHandle()\">\n <thy-icon [thyIconName]=\"item.icon\"></thy-icon>\n </a>\n </ng-container>\n <nav-split-line *ngIf=\"!isActiveSelect && isShowSplitLine\"></nav-split-line>\n <a href=\"javascript:;\" thyIconNavLink thyTooltip=\"\u5355\u5143\u683C\u80CC\u666F\" (mousedown)=\"openSelectColor($event)\">\n <thy-icon thyIconName=\"background-tt\" thyIconType=\"twotone\" [thyTwotoneColor]=\"selectedColor\"></thy-icon>\n </a>\n <nav-split-line *ngIf=\"tableStore.isSelectedTable\"></nav-split-line>\n <button\n thyButton=\"default\"\n *ngIf=\"tableStore.isSelectedTable\"\n class=\"mr-2\"\n thySize=\"md\"\n class=\"table-options\"\n (mousedown)=\"openTableOptionMenu($event)\"\n >\n <span>\u8868\u683C\u9009\u9879</span>\n <thy-icon thyIconName=\"caret-down\"></thy-icon>\n </button>\n <nav-split-line *ngIf=\"deleteIcon\"></nav-split-line>\n <a\n *ngIf=\"deleteIcon\"\n href=\"javascript:;\"\n thyIconNavLink\n [thyTooltip]=\"iconName\"\n class=\"danger\"\n [thyIconNavLinkIcon]=\"deleteIcon\"\n (mousedown)=\"onDelete($event)\"\n (mouseenter)=\"onEnterDelete($event)\"\n (mouseleave)=\"onLeaveDelete($event)\"\n ></a>\n</thy-icon-nav>\n", components: [{ type: i3$1.ThyIconNavComponent, selector: "thy-icon-nav", inputs: ["thyType"] }, { type: i3$1.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i3.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { type: NavSplitLineComponent, selector: "nav-split-line", inputs: ["mode"] }, { type: i1$5.ThyButtonComponent, selector: "thy-button,[thy-button],[thyButton]", inputs: ["thyButton", "thyType", "thyLoading", "thyLoadingText", "thySize", "thyIcon", "thySquare", "thyBlock"] }], directives: [{ type: i10.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }] });
8585
8661
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheTableToolbarComponent, decorators: [{
8586
8662
  type: Component,
8587
8663
  args: [{
@@ -8644,7 +8720,7 @@ class TheContextMenuComponent {
8644
8720
  ngOnInit() { }
8645
8721
  }
8646
8722
  TheContextMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheContextMenuComponent, deps: [{ token: i0.ElementRef }, { token: i1$1.ThyPopoverRef }], target: i0.ɵɵFactoryTarget.Component });
8647
- TheContextMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheContextMenuComponent, selector: "the-contextmenu", inputs: { menuEntities: "menuEntities", actionHandle: "actionHandle", activeHandle: "activeHandle", deactiveHandle: "deactiveHandle" }, host: { listeners: { "document: mousedown": "handleDocumentMouseDown($event)", "mousedown": "handleMouseDown($event)" }, properties: { "class.the-overlay-menu-wrap": "this.wrap" } }, ngImport: i0, template: "<thy-action-menu>\n <ng-container *ngFor=\"let menuItem of menuEntities\">\n <a\n thyActionMenuItem\n href=\"javascript:;\"\n *ngIf=\"!menuItem.invisibility\"\n (mousedown)=\"itemMousedown($event, menuItem)\"\n (mouseenter)=\"itemMouseenter($event, menuItem)\"\n (mouseleave)=\"itemMouseleave($event, menuItem)\"\n >\n <span thyActionMenuItemIcon>\n <thy-icon\n *ngIf=\"menuItem.backgroundColor; else elseIcon\"\n [thyIconName]=\"menuItem.icon\"\n thyIconType=\"twotone\"\n [thyTwotoneColor]=\"menuItem.backgroundColor\"\n ></thy-icon>\n <ng-template #elseIcon>\n <thy-icon [thyIconName]=\"menuItem.icon\"></thy-icon>\n </ng-template>\n </span>\n <span thyActionMenuItemName>{{ menuItem.name }}</span>\n <span *ngIf=\"menuItem.extendIcon\" thyActionMenuItemExtendIcon>\n <thy-icon thyIconName=\"{{ menuItem.extendIcon }}\"></thy-icon>\n </span>\n </a>\n <thy-action-menu-divider *ngIf=\"menuItem.divider\"></thy-action-menu-divider>\n </ng-container>\n</thy-action-menu>\n", components: [{ type: i2$1.ThyActionMenuComponent, selector: "thy-action-menu", inputs: ["thyTheme", "thyWidth"] }, { type: i4.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { type: i2$1.ThyActionMenuDividerComponent, selector: "thy-action-menu-divider", inputs: ["thyTitle", "thyType"] }], directives: [{ type: i10.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2$1.ThyActionMenuItemDirective, selector: "[thyActionMenuItem]", inputs: ["thyDisabled", "thyType"] }, { type: i2$1.ThyActionMenuItemIconDirective, selector: "[thyActionMenuItemIcon]" }, { type: i2$1.ThyActionMenuItemNameDirective, selector: "[thyActionMenuItemName]" }, { type: i2$1.ThyActionMenuItemExtendIconDirective, selector: "[thyActionMenuItemExtendIcon]" }] });
8723
+ TheContextMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheContextMenuComponent, selector: "the-contextmenu", inputs: { menuEntities: "menuEntities", actionHandle: "actionHandle", activeHandle: "activeHandle", deactiveHandle: "deactiveHandle" }, host: { listeners: { "document: mousedown": "handleDocumentMouseDown($event)", "mousedown": "handleMouseDown($event)" }, properties: { "class.the-overlay-menu-wrap": "this.wrap" } }, ngImport: i0, template: "<thy-action-menu>\n <ng-container *ngFor=\"let menuItem of menuEntities\">\n <a\n thyActionMenuItem\n href=\"javascript:;\"\n *ngIf=\"!menuItem.invisibility\"\n (mousedown)=\"itemMousedown($event, menuItem)\"\n (mouseenter)=\"itemMouseenter($event, menuItem)\"\n (mouseleave)=\"itemMouseleave($event, menuItem)\"\n >\n <span thyActionMenuItemIcon>\n <thy-icon\n *ngIf=\"menuItem.backgroundColor; else elseIcon\"\n [thyIconName]=\"menuItem.icon\"\n thyIconType=\"twotone\"\n [thyTwotoneColor]=\"menuItem.backgroundColor\"\n ></thy-icon>\n <ng-template #elseIcon>\n <thy-icon [thyIconName]=\"menuItem.icon\"></thy-icon>\n </ng-template>\n </span>\n <span thyActionMenuItemName>{{ menuItem.name }}</span>\n <span *ngIf=\"menuItem.extendIcon\" thyActionMenuItemExtendIcon>\n <thy-icon thyIconName=\"{{ menuItem.extendIcon }}\"></thy-icon>\n </span>\n </a>\n <thy-action-menu-divider *ngIf=\"menuItem.divider\"></thy-action-menu-divider>\n </ng-container>\n</thy-action-menu>\n", components: [{ type: i2$1.ThyActionMenuComponent, selector: "thy-action-menu", inputs: ["thyTheme", "thyWidth"] }, { type: i3.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { type: i2$1.ThyActionMenuDividerComponent, selector: "thy-action-menu-divider", inputs: ["thyTitle", "thyType"] }], directives: [{ type: i10.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2$1.ThyActionMenuItemDirective, selector: "[thyActionMenuItem]", inputs: ["thyDisabled", "thyType"] }, { type: i2$1.ThyActionMenuItemIconDirective, selector: "[thyActionMenuItemIcon]" }, { type: i2$1.ThyActionMenuItemNameDirective, selector: "[thyActionMenuItemName]" }, { type: i2$1.ThyActionMenuItemExtendIconDirective, selector: "[thyActionMenuItemExtendIcon]" }] });
8648
8724
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheContextMenuComponent, decorators: [{
8649
8725
  type: Component,
8650
8726
  args: [{
@@ -9356,6 +9432,9 @@ class TheTableComponent extends TheBaseElementComponent {
9356
9432
  image.onload = () => {
9357
9433
  resolve(true);
9358
9434
  };
9435
+ image.onerror = () => {
9436
+ resolve(true);
9437
+ };
9359
9438
  image.src = item.getAttribute('src');
9360
9439
  });
9361
9440
  imageResolves.push(imageLoad);
@@ -10738,27 +10817,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImpo
10738
10817
  args: ['document: mousedown', ['$event']]
10739
10818
  }] } });
10740
10819
 
10741
- class TheTableToolbarItemComponent extends TheToolbarBaseItemComponent {
10820
+ class TheTableToolbarItemComponent extends TheBaseToolbarItem {
10742
10821
  constructor(thyPopover, overlay) {
10743
10822
  super();
10744
10823
  this.thyPopover = thyPopover;
10745
10824
  this.overlay = overlay;
10746
- this.active = false;
10747
10825
  }
10748
10826
  get isOpenTableSelect() {
10749
10827
  return this.tableSelectRef && this.tableSelectRef.componentInstance;
10750
10828
  }
10751
- statusChange(editor) {
10752
- var _a;
10753
- this.active = (_a = this.item) === null || _a === void 0 ? void 0 : _a.active(editor);
10754
- }
10755
10829
  execute(event) {
10756
10830
  var _a;
10757
10831
  super.execute(event);
10758
10832
  if ((_a = this.editor) === null || _a === void 0 ? void 0 : _a.disabled) {
10759
10833
  return;
10760
10834
  }
10761
- const type = this.item.key;
10762
10835
  this.toggleTableSelect(event);
10763
10836
  }
10764
10837
  toggleTableSelect(event, optionsParam) {
@@ -10784,19 +10857,19 @@ class TheTableToolbarItemComponent extends TheToolbarBaseItemComponent {
10784
10857
  }
10785
10858
  }
10786
10859
  TheTableToolbarItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheTableToolbarItemComponent, deps: [{ token: i1$6.ThyPopover }, { token: i2.Overlay }], target: i0.ɵɵFactoryTarget.Component });
10787
- TheTableToolbarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheTableToolbarItemComponent, selector: "the-table-toolbar-item", inputs: { item: "item", editor: "editor" }, host: { classAttribute: "the-toolbar-dropdown-container" }, usesInheritance: true, ngImport: i0, template: `
10860
+ TheTableToolbarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheTableToolbarItemComponent, selector: "the-table-toolbar-item", host: { classAttribute: "the-toolbar-dropdown-container" }, usesInheritance: true, ngImport: i0, template: `
10788
10861
  <a
10789
10862
  thyIconNavLink
10790
10863
  class="link-with-down"
10791
- [thyTooltip]="item?.name"
10864
+ [thyTooltip]="toolbarItem?.name"
10792
10865
  thyTooltipPlacement="top"
10793
10866
  [thyIconNavLinkActive]="active"
10794
10867
  (mousedown)="execute($event)"
10795
10868
  >
10796
- <thy-icon [thyIconName]="item.icon"></thy-icon>
10869
+ <thy-icon [thyIconName]="toolbarItem.icon"></thy-icon>
10797
10870
  <thy-icon class="link-down-icon font-size-sm text-desc table-down-icon" thyIconName="caret-down"> </thy-icon>
10798
10871
  </a>
10799
- `, isInline: true, components: [{ type: i3.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i4.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }], directives: [{ type: i5$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }] });
10872
+ `, isInline: true, components: [{ type: i3$1.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i3.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }], directives: [{ type: i5$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }] });
10800
10873
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheTableToolbarItemComponent, decorators: [{
10801
10874
  type: Component,
10802
10875
  args: [{
@@ -10805,12 +10878,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImpo
10805
10878
  <a
10806
10879
  thyIconNavLink
10807
10880
  class="link-with-down"
10808
- [thyTooltip]="item?.name"
10881
+ [thyTooltip]="toolbarItem?.name"
10809
10882
  thyTooltipPlacement="top"
10810
10883
  [thyIconNavLinkActive]="active"
10811
10884
  (mousedown)="execute($event)"
10812
10885
  >
10813
- <thy-icon [thyIconName]="item.icon"></thy-icon>
10886
+ <thy-icon [thyIconName]="toolbarItem.icon"></thy-icon>
10814
10887
  <thy-icon class="link-down-icon font-size-sm text-desc table-down-icon" thyIconName="caret-down"> </thy-icon>
10815
10888
  </a>
10816
10889
  `,
@@ -10818,11 +10891,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImpo
10818
10891
  class: 'the-toolbar-dropdown-container'
10819
10892
  }
10820
10893
  }]
10821
- }], ctorParameters: function () { return [{ type: i1$6.ThyPopover }, { type: i2.Overlay }]; }, propDecorators: { item: [{
10822
- type: Input
10823
- }], editor: [{
10824
- type: Input
10825
- }] } });
10894
+ }], ctorParameters: function () { return [{ type: i1$6.ThyPopover }, { type: i2.Overlay }]; } });
10826
10895
 
10827
10896
  const withTable = (editor) => {
10828
10897
  const { deleteBackward, deleteForward, onKeydown, setFragmentData, insertData, normalizeNode, isBlockCard, renderElement, deleteCutData, isContainer, onChange } = editor;
@@ -11267,7 +11336,7 @@ const withDeserializeHMTL = (editor) => {
11267
11336
  return;
11268
11337
  }
11269
11338
  // 过滤 text 节点的 color/background-color 属性
11270
- fragment.forEach(node => deleteColorAndBackgroundColorOfText(node));
11339
+ fragment.forEach(node => filterTextFormat(node));
11271
11340
  Transforms.insertFragment(editor, fragment);
11272
11341
  return;
11273
11342
  }
@@ -11280,73 +11349,63 @@ const createDeserializeHMTLPlugin = createPluginFactory({
11280
11349
  withOverrides: withDeserializeHMTL
11281
11350
  });
11282
11351
 
11283
- class TheToolbarItemComponent extends TheToolbarBaseItemComponent {
11352
+ class TheToolbarItemComponent extends TheBaseToolbarItem {
11284
11353
  constructor(ngZone, cfr) {
11285
11354
  super();
11286
11355
  this.ngZone = ngZone;
11287
11356
  this.cfr = cfr;
11288
11357
  this.itemMode = ToolbarItemMode.horizontal;
11289
11358
  this.ToolbarItemMode = ToolbarItemMode;
11290
- this.active = false;
11291
- this.disabled = false;
11292
11359
  }
11293
11360
  toggleDropdown(event) {
11294
11361
  super.execute(event);
11295
11362
  }
11296
- get disabledState() {
11297
- return this.disabled;
11298
- }
11299
11363
  ngOnInit() {
11300
11364
  var _a, _b;
11301
- if (((_a = this.item) === null || _a === void 0 ? void 0 : _a.quickItemComponent) && isComponentType((_b = this.item) === null || _b === void 0 ? void 0 : _b.quickItemComponent)) {
11365
+ if (((_a = this.toolbarItem) === null || _a === void 0 ? void 0 : _a.quickItemComponent) && isComponentType((_b = this.toolbarItem) === null || _b === void 0 ? void 0 : _b.quickItemComponent)) {
11302
11366
  this.renderToolbarItem();
11303
11367
  }
11304
11368
  }
11305
- statusChange(editor) {
11306
- var _a, _b, _c, _d;
11307
- this.disabled = ((_a = this.item) === null || _a === void 0 ? void 0 : _a.disable) ? (_b = this.item) === null || _b === void 0 ? void 0 : _b.disable(editor) : false;
11308
- this.active = ((_c = this.item) === null || _c === void 0 ? void 0 : _c.active) ? (_d = this.item) === null || _d === void 0 ? void 0 : _d.active(editor) : false;
11309
- }
11310
11369
  execute(event) {
11311
11370
  var _a, _b, _c;
11312
11371
  super.execute(event);
11313
- if (((_a = this.editor) === null || _a === void 0 ? void 0 : _a.disabled) || this.disabled || !((_b = this.item) === null || _b === void 0 ? void 0 : _b.execute)) {
11372
+ if (((_a = this.editor) === null || _a === void 0 ? void 0 : _a.disabled) || this.disabled || !((_b = this.toolbarItem) === null || _b === void 0 ? void 0 : _b.execute)) {
11314
11373
  return;
11315
11374
  }
11316
- (_c = this.item) === null || _c === void 0 ? void 0 : _c.execute(this.editor);
11375
+ (_c = this.toolbarItem) === null || _c === void 0 ? void 0 : _c.execute(this.editor);
11317
11376
  }
11318
11377
  renderToolbarItem() {
11319
11378
  this.ngZone.run(() => {
11320
- const toolbarItemFactory = this.cfr.resolveComponentFactory(this.item.quickItemComponent);
11321
- const tollbarItemRef = this.toolbarContainer.createComponent(toolbarItemFactory);
11322
- tollbarItemRef.instance.editor = this.editor;
11323
- tollbarItemRef.instance.item = this.item;
11324
- tollbarItemRef.instance.itemMode = ToolbarItemMode.vertical;
11379
+ const toolbarItemFactory = this.cfr.resolveComponentFactory(this.toolbarItem.quickItemComponent);
11380
+ const toolbarItemRef = this.toolbarContainer.createComponent(toolbarItemFactory);
11381
+ toolbarItemRef.instance.editor = this.editor;
11382
+ toolbarItemRef.instance.item = this.toolbarItem;
11383
+ toolbarItemRef.instance.itemMode = ToolbarItemMode.vertical;
11325
11384
  });
11326
11385
  }
11327
11386
  }
11328
11387
  TheToolbarItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheToolbarItemComponent, deps: [{ token: i0.NgZone }, { token: i0.ComponentFactoryResolver }], target: i0.ɵɵFactoryTarget.Component });
11329
- TheToolbarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheToolbarItemComponent, selector: "the-toolbar-item", inputs: { editor: "editor", item: "item", itemMode: "itemMode" }, host: { listeners: { "mousedown": "toggleDropdown($event)" }, properties: { "class.disabled": "this.disabledState" }, classAttribute: "the-toolbar-item" }, viewQueries: [{ propertyName: "toolbarContainer", first: true, predicate: ["toolbarContainer"], descendants: true, read: ViewContainerRef, static: true }], usesInheritance: true, ngImport: i0, template: `
11388
+ TheToolbarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheToolbarItemComponent, selector: "the-toolbar-item", inputs: { itemMode: "itemMode" }, host: { listeners: { "mousedown": "toggleDropdown($event)" }, classAttribute: "the-toolbar-item" }, viewQueries: [{ propertyName: "toolbarContainer", first: true, predicate: ["toolbarContainer"], descendants: true, read: ViewContainerRef, static: true }], usesInheritance: true, ngImport: i0, template: `
11330
11389
  <ng-container *ngIf="itemMode === ToolbarItemMode.horizontal; else selectionItem">
11331
11390
  <a
11332
11391
  thyIconNavLink
11333
- [thyIconNavLinkIcon]="item.icon"
11392
+ [thyIconNavLinkIcon]="toolbarItem.icon"
11334
11393
  [thyTooltip]="tooltip"
11335
- [thyTooltipTemplateContext]="{ name: item.name, shortcutKey: item.shortcutKey }"
11394
+ [thyTooltipTemplateContext]="{ name: toolbarItem.name, shortcutKey: toolbarItem.shortcutKey }"
11336
11395
  thyTooltipPlacement="top"
11337
11396
  [thyIconNavLinkActive]="active"
11338
11397
  (mousedown)="execute($event)"
11339
11398
  ></a>
11340
11399
  </ng-container>
11341
11400
  <ng-template #selectionItem>
11342
- <ng-container *ngIf="!item?.quickItemComponent">
11343
- <thy-icon [thyIconName]="item?.icon" [thyIconRotate]="0" class="quick-toolbar-icon"></thy-icon>
11344
- <span class="quick-toolbar-name">{{ item?.name }}</span>
11401
+ <ng-container *ngIf="!toolbarItem?.quickItemComponent">
11402
+ <thy-icon [thyIconName]="toolbarItem?.icon" [thyIconRotate]="0" class="quick-toolbar-icon"></thy-icon>
11403
+ <span class="quick-toolbar-name">{{ toolbarItem?.name }}</span>
11345
11404
  </ng-container>
11346
11405
  </ng-template>
11347
11406
  <ng-template #tooltip let-data> {{ data.name }} {{ data.shortcutKey }} </ng-template>
11348
11407
  <ng-container #toolbarContainer></ng-container>
11349
- `, isInline: true, components: [{ type: i3.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i4.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }], directives: [{ type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }] });
11408
+ `, isInline: true, components: [{ type: i3$1.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i3.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }], directives: [{ type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }] });
11350
11409
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheToolbarItemComponent, decorators: [{
11351
11410
  type: Component,
11352
11411
  args: [{
@@ -11355,18 +11414,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImpo
11355
11414
  <ng-container *ngIf="itemMode === ToolbarItemMode.horizontal; else selectionItem">
11356
11415
  <a
11357
11416
  thyIconNavLink
11358
- [thyIconNavLinkIcon]="item.icon"
11417
+ [thyIconNavLinkIcon]="toolbarItem.icon"
11359
11418
  [thyTooltip]="tooltip"
11360
- [thyTooltipTemplateContext]="{ name: item.name, shortcutKey: item.shortcutKey }"
11419
+ [thyTooltipTemplateContext]="{ name: toolbarItem.name, shortcutKey: toolbarItem.shortcutKey }"
11361
11420
  thyTooltipPlacement="top"
11362
11421
  [thyIconNavLinkActive]="active"
11363
11422
  (mousedown)="execute($event)"
11364
11423
  ></a>
11365
11424
  </ng-container>
11366
11425
  <ng-template #selectionItem>
11367
- <ng-container *ngIf="!item?.quickItemComponent">
11368
- <thy-icon [thyIconName]="item?.icon" [thyIconRotate]="0" class="quick-toolbar-icon"></thy-icon>
11369
- <span class="quick-toolbar-name">{{ item?.name }}</span>
11426
+ <ng-container *ngIf="!toolbarItem?.quickItemComponent">
11427
+ <thy-icon [thyIconName]="toolbarItem?.icon" [thyIconRotate]="0" class="quick-toolbar-icon"></thy-icon>
11428
+ <span class="quick-toolbar-name">{{ toolbarItem?.name }}</span>
11370
11429
  </ng-container>
11371
11430
  </ng-template>
11372
11431
  <ng-template #tooltip let-data> {{ data.name }} {{ data.shortcutKey }} </ng-template>
@@ -11376,11 +11435,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImpo
11376
11435
  class: 'the-toolbar-item'
11377
11436
  }
11378
11437
  }]
11379
- }], ctorParameters: function () { return [{ type: i0.NgZone }, { type: i0.ComponentFactoryResolver }]; }, propDecorators: { editor: [{
11380
- type: Input
11381
- }], item: [{
11382
- type: Input
11383
- }], itemMode: [{
11438
+ }], ctorParameters: function () { return [{ type: i0.NgZone }, { type: i0.ComponentFactoryResolver }]; }, propDecorators: { itemMode: [{
11384
11439
  type: Input
11385
11440
  }], toolbarContainer: [{
11386
11441
  type: ViewChild,
@@ -11388,9 +11443,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImpo
11388
11443
  }], toggleDropdown: [{
11389
11444
  type: HostListener,
11390
11445
  args: ['mousedown', ['$event']]
11391
- }], disabledState: [{
11392
- type: HostBinding,
11393
- args: ['class.disabled']
11394
11446
  }] } });
11395
11447
 
11396
11448
  class TheQuickToolbarComponent extends mixinUnsubscribe(MixinBase) {
@@ -11441,7 +11493,7 @@ class TheQuickToolbarComponent extends mixinUnsubscribe(MixinBase) {
11441
11493
  }
11442
11494
  }
11443
11495
  TheQuickToolbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheQuickToolbarComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
11444
- TheQuickToolbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheQuickToolbarComponent, selector: "the-quick-toolbar", inputs: { editor: "editor", quickToolbarItems: "quickToolbarItems" }, host: { listeners: { "document: mousedown": "handleMouseDown($event)", "document: keydown.enter": "handleEnter()", "document: keydown.escape": "handleEsc()" } }, usesInheritance: true, ngImport: i0, template: "<thy-selection-list\n class=\"the-quick-toolbar\"\n [thyBindKeyEventContainer]=\"editorElement\"\n (thySelectionChange)=\"selectionChange($event)\"\n [thyMultiple]=\"false\"\n>\n <ng-container *ngFor=\"let item of quickToolbarItems\">\n <ng-container *ngIf=\"item.key !== ToolbarActionTypes.split; else splitLine\">\n <thy-list-option [thyValue]=\"item?.key\" (mousedown)=\"stopPropagation($event)\">\n <the-toolbar-item [editor]=\"editor\" [item]=\"item\" [itemMode]=\"ToolbarItemMode.vertical\"></the-toolbar-item>\n </thy-list-option>\n </ng-container>\n </ng-container>\n</thy-selection-list>\n\n<ng-template #splitLine>\n <nav-split-line [mode]=\"ToolbarItemMode.horizontal\"></nav-split-line>\n</ng-template>\n", components: [{ type: i1$7.ThySelectionListComponent, selector: "thy-selection-list,[thy-selection-list]", inputs: ["thyMultiple", "thyBindKeyEventContainer", "thyScrollContainer", "thyBeforeKeydown", "thyUniqueKey", "thyCompareWith", "thyLayout", "thyAutoActiveFirstItem", "thySize", "thySpaceKeyEnabled"], outputs: ["thySelectionChange"] }, { type: i5$3.ThyListOptionComponent, selector: "thy-list-option,[thy-list-option]", inputs: ["id", "thyValue", "thyDisabled"] }, { type: TheToolbarItemComponent, selector: "the-toolbar-item", inputs: ["editor", "item", "itemMode"] }, { type: NavSplitLineComponent, selector: "nav-split-line", inputs: ["mode"] }], directives: [{ type: i10.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
11496
+ TheQuickToolbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheQuickToolbarComponent, selector: "the-quick-toolbar", inputs: { editor: "editor", quickToolbarItems: "quickToolbarItems" }, host: { listeners: { "document: mousedown": "handleMouseDown($event)", "document: keydown.enter": "handleEnter()", "document: keydown.escape": "handleEsc()" } }, usesInheritance: true, ngImport: i0, template: "<thy-selection-list\n class=\"the-quick-toolbar\"\n [thyBindKeyEventContainer]=\"editorElement\"\n (thySelectionChange)=\"selectionChange($event)\"\n [thyMultiple]=\"false\"\n>\n <ng-container *ngFor=\"let item of quickToolbarItems\">\n <ng-container *ngIf=\"item.key !== ToolbarActionTypes.split; else splitLine\">\n <thy-list-option [thyValue]=\"item?.key\" (mousedown)=\"stopPropagation($event)\">\n <the-toolbar-item [editor]=\"editor\" [toolbarItem]=\"item\" [itemMode]=\"ToolbarItemMode.vertical\"></the-toolbar-item>\n </thy-list-option>\n </ng-container>\n </ng-container>\n</thy-selection-list>\n\n<ng-template #splitLine>\n <nav-split-line [mode]=\"ToolbarItemMode.horizontal\"></nav-split-line>\n</ng-template>\n", components: [{ type: i1$7.ThySelectionListComponent, selector: "thy-selection-list,[thy-selection-list]", inputs: ["thyMultiple", "thyBindKeyEventContainer", "thyScrollContainer", "thyBeforeKeydown", "thyUniqueKey", "thyCompareWith", "thyLayout", "thyAutoActiveFirstItem", "thySize", "thySpaceKeyEnabled"], outputs: ["thySelectionChange"] }, { type: i5$3.ThyListOptionComponent, selector: "thy-list-option,[thy-list-option]", inputs: ["id", "thyValue", "thyDisabled"] }, { type: TheToolbarItemComponent, selector: "the-toolbar-item", inputs: ["itemMode"] }, { type: NavSplitLineComponent, selector: "nav-split-line", inputs: ["mode"] }], directives: [{ type: i10.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
11445
11497
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheQuickToolbarComponent, decorators: [{
11446
11498
  type: Component,
11447
11499
  args: [{
@@ -11681,112 +11733,11 @@ const createInlineCodePlugin = createPluginFactory({
11681
11733
  execute: editor => InlineCodeEditor.toggleInlineCode(editor),
11682
11734
  active: editor => InlineCodeEditor.isInlineCodeActive(editor)
11683
11735
  }
11684
- ]
11685
- });
11686
-
11687
- class TheIndentToolbarComponent extends TheToolbarBaseItemComponent {
11688
- constructor(elementRef, thyPopover, viewContainerRef, overlay) {
11689
- super();
11690
- this.elementRef = elementRef;
11691
- this.thyPopover = thyPopover;
11692
- this.viewContainerRef = viewContainerRef;
11693
- this.overlay = overlay;
11694
- this.mode = DropdownMode.text;
11695
- this.dropdownMode = DropdownMode;
11696
- this.disabled = false;
11697
- }
11698
- get isOpen() {
11699
- return this.dropdownPopoverRef && this.dropdownPopoverRef.getOverlayRef() && this.dropdownPopoverRef.getOverlayRef().hasAttached();
11700
- }
11701
- toggleDropdown(event) {
11702
- var _a;
11703
- super.execute(event);
11704
- if (((_a = this.editor) === null || _a === void 0 ? void 0 : _a.disabled) || this.disabled) {
11705
- return;
11706
- }
11707
- this.openDropdownPopover();
11708
- }
11709
- handleDocumentMouseDown(event) {
11710
- if (!this.elementRef.nativeElement.contains(event.target)) {
11711
- this.closeDropdownPopover();
11712
- }
11713
- }
11714
- get disabledState() {
11715
- return this.disabled;
11716
- }
11717
- ngOnInit() {
11718
- var _a;
11719
- if (!this.activeMenu) {
11720
- this.activeMenu = this.menus[0];
11721
- }
11722
- if (this.toolbarItem) {
11723
- this.elementRef.nativeElement.classList.add(`${(_a = this.toolbarItem) === null || _a === void 0 ? void 0 : _a.key}`);
11724
- }
11725
- }
11726
- statusChange(editor) {
11727
- var _a, _b;
11728
- this.disabled = ((_a = this.toolbarItem) === null || _a === void 0 ? void 0 : _a.disable) ? (_b = this.toolbarItem) === null || _b === void 0 ? void 0 : _b.disable(editor) : false;
11729
- }
11730
- itemMousedown(event, item) {
11731
- super.execute(event);
11732
- this.closeDropdownPopover();
11733
- if (item === null || item === void 0 ? void 0 : item.execute) {
11734
- item === null || item === void 0 ? void 0 : item.execute(this.editor);
11735
- }
11736
- }
11737
- openDropdownPopover() {
11738
- var _a;
11739
- this.dropdownPopoverRef = this.thyPopover.open(this.dropdownTemplate, {
11740
- origin: this.elementRef,
11741
- panelClass: ['the-toolbar-dropdown-popover', (_a = this.toolbarItem) === null || _a === void 0 ? void 0 : _a.key],
11742
- placement: 'bottomLeft',
11743
- insideClosable: false,
11744
- backdropClosable: true,
11745
- hasBackdrop: false,
11746
- offset: 10,
11747
- viewContainerRef: this.viewContainerRef,
11748
- scrollStrategy: this.overlay.scrollStrategies.reposition()
11749
- });
11750
- }
11751
- closeDropdownPopover() {
11752
- var _a;
11753
- if (this.dropdownPopoverRef) {
11754
- (_a = this.dropdownPopoverRef) === null || _a === void 0 ? void 0 : _a.close();
11755
- }
11736
+ ],
11737
+ options: {
11738
+ disabledOperateTypes: [ElementKinds.image, ...DISABLED_OPERATE_TYPES]
11756
11739
  }
11757
- }
11758
- TheIndentToolbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheIndentToolbarComponent, deps: [{ token: i0.ElementRef }, { token: i1$1.ThyPopover }, { token: i0.ViewContainerRef }, { token: i2.Overlay }], target: i0.ɵɵFactoryTarget.Component });
11759
- TheIndentToolbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheIndentToolbarComponent, selector: "the-indent-toolbar-item", inputs: { toolbarItem: "toolbarItem", menus: "menus", mode: "mode", item: "item" }, host: { listeners: { "mousedown": "toggleDropdown($event)", "document: mousedown": "handleDocumentMouseDown($event)" }, properties: { "class.disabled": "this.disabledState" }, classAttribute: "the-toolbar-dropdown-container" }, viewQueries: [{ propertyName: "dropdownTemplate", first: true, predicate: ["dropdownTemplate"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<a thyIconNavLink class=\"icon-mode link-with-down\" [thyTooltip]=\"activeMenu?.name\" thyTooltipPlacement=\"top\">\n <thy-icon [thyIconName]=\"activeMenu?.icon\"></thy-icon>\n <thy-icon class=\"caret-down-icon font-size-sm text-desc\" thyIconName=\"caret-down\"></thy-icon>\n</a>\n\n<ng-template #dropdownTemplate>\n <thy-action-menu class=\"dropdown-menu\">\n <ng-container *ngFor=\"let menu of menus\">\n <a\n thyActionMenuItem\n href=\"javascript:;\"\n [thyTooltip]=\"tooltip\"\n [thyTooltipTemplateContext]=\"{ name: menu.name, shortcutKey: menu.shortcutKey }\"\n thyTooltipPlacement=\"right\"\n (mousedown)=\"itemMousedown($event, menu)\"\n >\n <span thyActionMenuItemIcon>\n <thy-icon [thyIconName]=\"menu.icon\"></thy-icon>\n </span>\n <span thyActionMenuItemName>{{ menu.name }}</span>\n </a>\n </ng-container>\n </thy-action-menu>\n</ng-template>\n\n<ng-template #tooltip let-data>{{ data?.shortcutKey }}</ng-template>\n", components: [{ type: i3.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i4.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { type: i2$1.ThyActionMenuComponent, selector: "thy-action-menu", inputs: ["thyTheme", "thyWidth"] }], directives: [{ type: i5$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { type: i10.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2$1.ThyActionMenuItemDirective, selector: "[thyActionMenuItem]", inputs: ["thyDisabled", "thyType"] }, { type: i2$1.ThyActionMenuItemIconDirective, selector: "[thyActionMenuItemIcon]" }, { type: i2$1.ThyActionMenuItemNameDirective, selector: "[thyActionMenuItemName]" }] });
11760
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheIndentToolbarComponent, decorators: [{
11761
- type: Component,
11762
- args: [{
11763
- selector: 'the-indent-toolbar-item',
11764
- templateUrl: './toolbar-item.component.html',
11765
- host: {
11766
- class: 'the-toolbar-dropdown-container'
11767
- }
11768
- }]
11769
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1$1.ThyPopover }, { type: i0.ViewContainerRef }, { type: i2.Overlay }]; }, propDecorators: { toolbarItem: [{
11770
- type: Input
11771
- }], menus: [{
11772
- type: Input
11773
- }], mode: [{
11774
- type: Input
11775
- }], item: [{
11776
- type: Input
11777
- }], dropdownTemplate: [{
11778
- type: ViewChild,
11779
- args: ['dropdownTemplate', { static: true }]
11780
- }], toggleDropdown: [{
11781
- type: HostListener,
11782
- args: ['mousedown', ['$event']]
11783
- }], handleDocumentMouseDown: [{
11784
- type: HostListener,
11785
- args: ['document: mousedown', ['$event']]
11786
- }], disabledState: [{
11787
- type: HostBinding,
11788
- args: ['class.disabled']
11789
- }] } });
11740
+ });
11790
11741
 
11791
11742
  const IndentEditor = {
11792
11743
  getAllowedTypes(editor) {
@@ -11855,14 +11806,6 @@ const IndentEditor = {
11855
11806
  return true;
11856
11807
  }
11857
11808
  return false;
11858
- },
11859
- isDisabled(editor) {
11860
- if (editor.selection) {
11861
- const allowedTypes = IndentEditor.getAllowedTypes(editor);
11862
- const anchorBlock$1 = anchorBlock(editor);
11863
- return anchorBlock$1 && !allowedTypes.includes(anchorBlock$1 === null || anchorBlock$1 === void 0 ? void 0 : anchorBlock$1.type);
11864
- }
11865
- return false;
11866
11809
  }
11867
11810
  };
11868
11811
 
@@ -11936,8 +11879,10 @@ const createIndentPlugin = createPluginFactory({
11936
11879
  {
11937
11880
  key: ElementKinds.indent,
11938
11881
  includes: [Indents.indentRight, Indents.indentLeft],
11939
- iconComponent: TheIndentToolbarComponent,
11940
- disable: editor => IndentEditor.isDisabled(editor)
11882
+ type: ToolbarItemType.dropdown,
11883
+ dropdownMode: DropdownMode.icon,
11884
+ dropdownItemKey: Indents.indentRight,
11885
+ dropdownFixedIcon: true
11941
11886
  },
11942
11887
  {
11943
11888
  key: Indents.indentRight,
@@ -11951,7 +11896,6 @@ const createIndentPlugin = createPluginFactory({
11951
11896
  name: '减少缩进',
11952
11897
  icon: 'float-right',
11953
11898
  shortcutKey: 'Shift+Tab/BackSpace',
11954
- type: ToolbarItemType.toolDropdown,
11955
11899
  execute: editor => IndentEditor.cancelIndent(editor)
11956
11900
  }
11957
11901
  ],
@@ -11964,7 +11908,8 @@ const createIndentPlugin = createPluginFactory({
11964
11908
  ElementKinds.paragraph,
11965
11909
  ...HEADING_TYPES
11966
11910
  ],
11967
- disableIndentTypes: [ElementKinds.bulletedList, ElementKinds.numberedList, ElementKinds.checkItem]
11911
+ disableIndentTypes: [ElementKinds.bulletedList, ElementKinds.numberedList, ElementKinds.checkItem],
11912
+ disabledOperateTypes: [ElementKinds.image, ...DISABLED_OPERATE_TYPES]
11968
11913
  }
11969
11914
  });
11970
11915
 
@@ -12029,14 +11974,6 @@ const FontSizeEditor = {
12029
11974
  }
12030
11975
  }
12031
11976
  return false;
12032
- },
12033
- isDisabled(editor) {
12034
- if (editor.selection) {
12035
- const disableGroup = HEADING_TYPES;
12036
- const anchorBlock$1 = anchorBlock(editor);
12037
- return anchorBlock$1 && disableGroup.includes(anchorBlock$1 === null || anchorBlock$1 === void 0 ? void 0 : anchorBlock$1.type);
12038
- }
12039
- return false;
12040
11977
  }
12041
11978
  };
12042
11979
  const sizeOptions = () => {
@@ -12055,23 +11992,24 @@ const createFontSizePlugin = createPluginFactory({
12055
11992
  {
12056
11993
  key: MarkTypes.fontSize,
12057
11994
  name: '字号',
12058
- type: ToolbarItemType.toolDropdown,
11995
+ type: ToolbarItemType.dropdown,
12059
11996
  dropdownItemKey: FontSizes.fontSize14,
12060
- includes: FontSizeTypes,
12061
- disable: editor => FontSizeEditor.isDisabled(editor)
11997
+ includes: FontSizeTypes
12062
11998
  },
12063
11999
  ...sizeOptions()
12064
- ]
12000
+ ],
12001
+ options: {
12002
+ disabledOperateTypes: [...HEADING_TYPES, ElementKinds.image, ...DISABLED_OPERATE_TYPES]
12003
+ }
12065
12004
  });
12066
12005
 
12067
- class TheVerticalToolbarItemComponent extends TheToolbarBaseItemComponent {
12006
+ class TheVerticalToolbarItemComponent extends TheBaseToolbarDropdown {
12068
12007
  constructor(elementRef, thyPopover, viewContainerRef) {
12069
12008
  super();
12070
12009
  this.elementRef = elementRef;
12071
12010
  this.thyPopover = thyPopover;
12072
12011
  this.viewContainerRef = viewContainerRef;
12073
12012
  this.isHide = true;
12074
- this.active = false;
12075
12013
  }
12076
12014
  get isOpened() {
12077
12015
  return this.dropdownPopoverRef && this.dropdownPopoverRef.getOverlayRef() && this.dropdownPopoverRef.getOverlayRef().hasAttached();
@@ -12082,11 +12020,6 @@ class TheVerticalToolbarItemComponent extends TheToolbarBaseItemComponent {
12082
12020
  }
12083
12021
  }
12084
12022
  ngOnInit() { }
12085
- statusChange(editor) {
12086
- var _a, _b;
12087
- this.active = ((_a = this.toolbarItem) === null || _a === void 0 ? void 0 : _a.active) ? (_b = this.toolbarItem) === null || _b === void 0 ? void 0 : _b.active(editor) : false;
12088
- this.activeMenu = this.menusActive(editor);
12089
- }
12090
12023
  menusActive(editor) {
12091
12024
  return this.menus.find(i => {
12092
12025
  var _a;
@@ -12131,7 +12064,7 @@ class TheVerticalToolbarItemComponent extends TheToolbarBaseItemComponent {
12131
12064
  }
12132
12065
  }
12133
12066
  TheVerticalToolbarItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheVerticalToolbarItemComponent, deps: [{ token: i0.ElementRef }, { token: i1$6.ThyPopover }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component });
12134
- TheVerticalToolbarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheVerticalToolbarItemComponent, selector: "the-toolbar-vertical-align-item", inputs: { item: "item", menus: "menus", editor: "editor", toolbarItem: "toolbarItem" }, 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 thyIconNavLink\n class=\"icon-mode link-with-down\"\n [thyTooltip]=\"toolbarItem?.name\"\n [thyIconNavLinkActive]=\"isOpened\"\n thyTooltipPlacement=\"top\"\n (mousedown)=\"execute($event)\"\n>\n <thy-icon [thyIconName]=\"activeMenu?.icon\"></thy-icon>\n <thy-icon class=\"caret-down-icon font-size-sm text-desc\" thyIconName=\"caret-down\"></thy-icon>\n</a>\n\n<ng-template #VerticalAlignItems>\n <thy-action-menu class=\"dropdown\">\n <ng-container *ngFor=\"let menu of toolbarItem?.includes\">\n <a\n thyActionMenuItem\n href=\"javascript:;\"\n [thyActionMenuItemActive]=\"menu.key === activeMenu?.key\"\n (mousedown)=\"itemMousedown($event, menu)\"\n >\n <span *ngIf=\"menu.icon\" thyActionMenuItemIcon>\n <thy-icon [thyIconName]=\"menu?.icon\"></thy-icon>\n </span>\n <span thyActionMenuItemName>{{ menu.name }}</span>\n </a>\n </ng-container>\n </thy-action-menu>\n</ng-template>\n", components: [{ type: i3.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i4.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { type: i2$1.ThyActionMenuComponent, selector: "thy-action-menu", inputs: ["thyTheme", "thyWidth"] }], directives: [{ type: i5$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { type: i10.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2$1.ThyActionMenuItemDirective, selector: "[thyActionMenuItem]", inputs: ["thyDisabled", "thyType"] }, { type: i2$1.ThyActionMenuItemActiveDirective, selector: "[thyActionMenuItemActive]", inputs: ["thyActionMenuItemActive"] }, { type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2$1.ThyActionMenuItemIconDirective, selector: "[thyActionMenuItemIcon]" }, { type: i2$1.ThyActionMenuItemNameDirective, selector: "[thyActionMenuItemName]" }] });
12067
+ TheVerticalToolbarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", 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 thyIconNavLink\n class=\"icon-mode link-with-down\"\n [thyTooltip]=\"toolbarItem?.name\"\n [thyIconNavLinkActive]=\"isOpened\"\n thyTooltipPlacement=\"top\"\n (mousedown)=\"execute($event)\"\n>\n <thy-icon [thyIconName]=\"activeMenuItem?.icon\"></thy-icon>\n <thy-icon class=\"caret-down-icon font-size-sm text-desc\" thyIconName=\"caret-down\"></thy-icon>\n</a>\n\n<ng-template #VerticalAlignItems>\n <thy-action-menu class=\"dropdown\">\n <ng-container *ngFor=\"let menu of toolbarItem?.includes\">\n <a\n thyActionMenuItem\n href=\"javascript:;\"\n [thyActionMenuItemActive]=\"menu.key === activeMenuItem?.key\"\n (mousedown)=\"itemMousedown($event, menu)\"\n >\n <span *ngIf=\"menu.icon\" thyActionMenuItemIcon>\n <thy-icon [thyIconName]=\"menu?.icon\"></thy-icon>\n </span>\n <span thyActionMenuItemName>{{ menu.name }}</span>\n </a>\n </ng-container>\n </thy-action-menu>\n</ng-template>\n", components: [{ type: i3$1.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i3.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { type: i2$1.ThyActionMenuComponent, selector: "thy-action-menu", inputs: ["thyTheme", "thyWidth"] }], directives: [{ type: i5$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { type: i10.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2$1.ThyActionMenuItemDirective, selector: "[thyActionMenuItem]", inputs: ["thyDisabled", "thyType"] }, { type: i2$1.ThyActionMenuItemActiveDirective, selector: "[thyActionMenuItemActive]", inputs: ["thyActionMenuItemActive"] }, { type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2$1.ThyActionMenuItemIconDirective, selector: "[thyActionMenuItemIcon]" }, { type: i2$1.ThyActionMenuItemNameDirective, selector: "[thyActionMenuItemName]" }] });
12135
12068
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheVerticalToolbarItemComponent, decorators: [{
12136
12069
  type: Component,
12137
12070
  args: [{
@@ -12142,15 +12075,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImpo
12142
12075
  '[class.hide]': '!active'
12143
12076
  }
12144
12077
  }]
12145
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1$6.ThyPopover }, { type: i0.ViewContainerRef }]; }, propDecorators: { item: [{
12146
- type: Input
12147
- }], menus: [{
12148
- type: Input
12149
- }], editor: [{
12150
- type: Input
12151
- }], toolbarItem: [{
12152
- type: Input
12153
- }], template: [{
12078
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1$6.ThyPopover }, { type: i0.ViewContainerRef }]; }, propDecorators: { template: [{
12154
12079
  type: ViewChild,
12155
12080
  args: ['VerticalAlignItems', { read: TemplateRef, static: true }]
12156
12081
  }], handleDocumentMouseDown: [{
@@ -12178,7 +12103,7 @@ const createVerticalAlignPlugin = createPluginFactory({
12178
12103
  {
12179
12104
  key: ToolbarActionTypes.verticalAlign,
12180
12105
  name: '垂直对齐',
12181
- type: ToolbarItemType.toolDropdown,
12106
+ type: ToolbarItemType.dropdown,
12182
12107
  dropdownMode: DropdownMode.icon,
12183
12108
  iconComponent: TheVerticalToolbarItemComponent,
12184
12109
  includes: [ToolbarActionTypes.verticalAlignTop, ToolbarActionTypes.verticalAlignMiddle, ToolbarActionTypes.verticalAlignBottom],
@@ -12359,26 +12284,21 @@ const ColorEditor = {
12359
12284
  }
12360
12285
  };
12361
12286
 
12362
- class TheColorToolbarItemComponent extends TheToolbarBaseItemComponent {
12287
+ class TheColorToolbarItemComponent extends TheBaseToolbarItem {
12363
12288
  constructor(thyPopover) {
12364
12289
  super();
12365
12290
  this.thyPopover = thyPopover;
12366
- this.active = false;
12367
12291
  }
12368
12292
  get isOpenColorSelect() {
12369
12293
  return this.colorSelectRef && this.colorSelectRef.componentInstance;
12370
12294
  }
12371
- statusChange(editor) {
12372
- var _a;
12373
- this.active = (_a = this.item) === null || _a === void 0 ? void 0 : _a.active(editor);
12374
- }
12375
12295
  execute(event) {
12376
12296
  var _a;
12377
12297
  super.execute(event);
12378
- if ((_a = this.editor) === null || _a === void 0 ? void 0 : _a.disabled) {
12298
+ if (((_a = this.editor) === null || _a === void 0 ? void 0 : _a.disabled) || this.disabled) {
12379
12299
  return;
12380
12300
  }
12381
- const type = this.item.key;
12301
+ const type = this.toolbarItem.key;
12382
12302
  this.toggleColorSelect(event, type);
12383
12303
  }
12384
12304
  toggleColorSelect(event, type) {
@@ -12418,19 +12338,19 @@ class TheColorToolbarItemComponent extends TheToolbarBaseItemComponent {
12418
12338
  }
12419
12339
  }
12420
12340
  TheColorToolbarItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheColorToolbarItemComponent, deps: [{ token: i1$1.ThyPopover }], target: i0.ɵɵFactoryTarget.Component });
12421
- TheColorToolbarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheColorToolbarItemComponent, selector: "the-color-toolbar-item", inputs: { item: "item", editor: "editor" }, host: { classAttribute: "the-toolbar-item" }, usesInheritance: true, ngImport: i0, template: `
12341
+ TheColorToolbarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheColorToolbarItemComponent, selector: "the-color-toolbar-item", host: { classAttribute: "the-toolbar-item" }, usesInheritance: true, ngImport: i0, template: `
12422
12342
  <a
12423
12343
  class="link-width-down"
12424
12344
  thyIconNavLink
12425
12345
  [ngStyle]="{
12426
- width: item.key === 'color' ? '42px' : 'auto'
12346
+ width: toolbarItem.key === 'color' ? '42px' : 'auto'
12427
12347
  }"
12428
- [thyTooltip]="item.name"
12348
+ [thyTooltip]="toolbarItem.name"
12429
12349
  [thyIconNavLinkActive]="active"
12430
12350
  thyTooltipPlacement="top"
12431
12351
  (mousedown)="execute($event)"
12432
12352
  >
12433
- <thy-icon [thyIconName]="item.icon" thyIconType="twotone" [thyTwotoneColor]="active"></thy-icon>
12353
+ <thy-icon [thyIconName]="toolbarItem.icon" thyIconType="twotone" [thyTwotoneColor]="active"></thy-icon>
12434
12354
  <thy-icon
12435
12355
  [ngClass]="{
12436
12356
  'link-down-icon': true,
@@ -12440,7 +12360,7 @@ TheColorToolbarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12
12440
12360
  thyIconName="caret-down"
12441
12361
  ></thy-icon>
12442
12362
  </a>
12443
- `, isInline: true, components: [{ type: i3.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i4.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }], directives: [{ type: i10.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i5$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { type: i10.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
12363
+ `, isInline: true, components: [{ type: i3$1.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i3.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }], directives: [{ type: i10.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i5$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { type: i10.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
12444
12364
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheColorToolbarItemComponent, decorators: [{
12445
12365
  type: Component,
12446
12366
  args: [{
@@ -12450,14 +12370,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImpo
12450
12370
  class="link-width-down"
12451
12371
  thyIconNavLink
12452
12372
  [ngStyle]="{
12453
- width: item.key === 'color' ? '42px' : 'auto'
12373
+ width: toolbarItem.key === 'color' ? '42px' : 'auto'
12454
12374
  }"
12455
- [thyTooltip]="item.name"
12375
+ [thyTooltip]="toolbarItem.name"
12456
12376
  [thyIconNavLinkActive]="active"
12457
12377
  thyTooltipPlacement="top"
12458
12378
  (mousedown)="execute($event)"
12459
12379
  >
12460
- <thy-icon [thyIconName]="item.icon" thyIconType="twotone" [thyTwotoneColor]="active"></thy-icon>
12380
+ <thy-icon [thyIconName]="toolbarItem.icon" thyIconType="twotone" [thyTwotoneColor]="active"></thy-icon>
12461
12381
  <thy-icon
12462
12382
  [ngClass]="{
12463
12383
  'link-down-icon': true,
@@ -12472,11 +12392,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImpo
12472
12392
  class: 'the-toolbar-item'
12473
12393
  }
12474
12394
  }]
12475
- }], ctorParameters: function () { return [{ type: i1$1.ThyPopover }]; }, propDecorators: { item: [{
12476
- type: Input
12477
- }], editor: [{
12478
- type: Input
12479
- }] } });
12395
+ }], ctorParameters: function () { return [{ type: i1$1.ThyPopover }]; } });
12480
12396
 
12481
12397
  const createColorPlugin = createPluginFactory({
12482
12398
  key: PluginKeys.color,
@@ -12495,7 +12411,10 @@ const createColorPlugin = createPluginFactory({
12495
12411
  iconComponent: TheColorToolbarItemComponent,
12496
12412
  active: editor => ColorEditor.getActiveColor(editor, MarkTypes.backgroundColor)
12497
12413
  }
12498
- ]
12414
+ ],
12415
+ options: {
12416
+ disabledOperateTypes: [ElementKinds.image, ...DISABLED_OPERATE_TYPES]
12417
+ }
12499
12418
  });
12500
12419
 
12501
12420
  const internalPlugins = () => [
@@ -12577,7 +12496,7 @@ class TheToolbarComponent {
12577
12496
  ngOnInit() {
12578
12497
  this.setToolbarClass();
12579
12498
  this.renderToolbarView();
12580
- this.statusChange(this.editor);
12499
+ this.selectionChange(this.editor);
12581
12500
  if (this.isMore) {
12582
12501
  this.resizeElement();
12583
12502
  }
@@ -12612,13 +12531,13 @@ class TheToolbarComponent {
12612
12531
  });
12613
12532
  this.resizeObserver.observe(editableElement);
12614
12533
  }
12615
- statusChange(editor) {
12534
+ selectionChange(editor) {
12616
12535
  const toolbarItems = [...this.toolbarItems, this.moreGroupMenu];
12617
12536
  for (const item of toolbarItems) {
12618
12537
  if (item.key !== ToolbarActionTypes.split) {
12619
12538
  const itemComponent = this.components.get(item.key);
12620
- if (itemComponent) {
12621
- itemComponent.instance.statusChange(editor);
12539
+ if (itemComponent && itemComponent.instance.selectionChange) {
12540
+ itemComponent.instance.selectionChange(editor);
12622
12541
  }
12623
12542
  }
12624
12543
  }
@@ -12686,7 +12605,7 @@ class TheToolbarComponent {
12686
12605
  elementWidth -= headingWidth;
12687
12606
  continue;
12688
12607
  }
12689
- const isCustomComponent = (item === null || item === void 0 ? void 0 : item.type) === ToolbarItemType.toolDropdown || !!(item === null || item === void 0 ? void 0 : item.iconComponent);
12608
+ const isCustomComponent = (item === null || item === void 0 ? void 0 : item.type) === ToolbarItemType.dropdown || !!(item === null || item === void 0 ? void 0 : item.iconComponent);
12690
12609
  elementWidth -= isCustomComponent ? maxItemWidth : defaultItemWidth;
12691
12610
  }
12692
12611
  return {
@@ -12732,15 +12651,17 @@ class TheToolbarComponent {
12732
12651
  createToolbarItem(item) {
12733
12652
  const { iconComponent, type, dropdownMode, dropdownItemKey, includes } = item, args = __rest(item, ["iconComponent", "type", "dropdownMode", "dropdownItemKey", "includes"]);
12734
12653
  const viewComponent = this.viewComponentType(type);
12735
- const dropdownItem = this.getDropdownItem(item);
12736
12654
  const factory = this.cfr.resolveComponentFactory(iconComponent ? iconComponent : viewComponent);
12737
12655
  const compRef = this.toolbarContainer.createComponent(factory);
12738
12656
  compRef.instance.editor = this.editor;
12739
12657
  compRef.instance.toolbarItem = item;
12740
- compRef.instance.menus = includes;
12741
- compRef.instance.item = includes && dropdownItem ? dropdownItem : args;
12742
- compRef.instance.mode = dropdownMode;
12743
12658
  this.components.set(item.key, compRef);
12659
+ if (item.type === ToolbarItemType.dropdown) {
12660
+ const dropdownRef = compRef;
12661
+ dropdownRef.instance.dropdownItemKey = item.dropdownItemKey;
12662
+ dropdownRef.instance.menus = includes;
12663
+ dropdownRef.instance.mode = dropdownMode;
12664
+ }
12744
12665
  }
12745
12666
  createToolbarSplit() {
12746
12667
  const navSplitLineFactory = this.cfr.resolveComponentFactory(NavSplitLineComponent);
@@ -12760,25 +12681,14 @@ class TheToolbarComponent {
12760
12681
  if (type === ToolbarItemType.default) {
12761
12682
  return TheToolbarItemComponent;
12762
12683
  }
12763
- if (type === ToolbarItemType.toolDropdown) {
12684
+ if (type === ToolbarItemType.dropdown) {
12764
12685
  return TheToolbarDropdownComponent;
12765
12686
  }
12766
12687
  return TheToolbarItemComponent;
12767
12688
  }
12768
- getDropdownItem(item) {
12769
- var _a, _b, _c;
12770
- let dropdownKey = item === null || item === void 0 ? void 0 : item.dropdownItemKey;
12771
- // modify the fontsize option externally
12772
- const contextService = (_b = (_a = this.editor) === null || _a === void 0 ? void 0 : _a.injector) === null || _b === void 0 ? void 0 : _b.get(TheContextService);
12773
- const fontSize = contextService === null || contextService === void 0 ? void 0 : contextService.getDefaultFontSize();
12774
- if (contextService && item.key === MarkTypes.fontSize && fontSize) {
12775
- dropdownKey = fontSize;
12776
- }
12777
- return (_c = item === null || item === void 0 ? void 0 : item.includes) === null || _c === void 0 ? void 0 : _c.find((item) => item.key === dropdownKey);
12778
- }
12779
12689
  }
12780
12690
  TheToolbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheToolbarComponent, deps: [{ token: i0.ComponentFactoryResolver }, { token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i0.NgZone }, { token: TheToolbarGroupToken }], target: i0.ɵɵFactoryTarget.Component });
12781
- TheToolbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheToolbarComponent, selector: "the-toolbar", inputs: { editor: "editor", toolbarItems: "toolbarItems", align: "align", containerClass: "containerClass", isMore: "isMore", afterTemplate: "afterTemplate" }, host: { classAttribute: "the-toolbar-container" }, viewQueries: [{ propertyName: "toolbarContainer", first: true, predicate: ["toolbarContainer"], descendants: true, read: ViewContainerRef, static: true }], usesOnChanges: true, ngImport: i0, template: "<thy-icon-nav [style.justifyContent]=\"align\">\n <ng-container #toolbarContainer></ng-container>\n <ng-content></ng-content>\n <ng-template *ngIf=\"afterTemplate\" [ngTemplateOutlet]=\"afterTemplate\"></ng-template>\n</thy-icon-nav>\n", components: [{ type: i3.ThyIconNavComponent, selector: "thy-icon-nav", inputs: ["thyType"] }], directives: [{ type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i10.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }] });
12691
+ TheToolbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheToolbarComponent, selector: "the-toolbar", inputs: { editor: "editor", toolbarItems: "toolbarItems", align: "align", containerClass: "containerClass", isMore: "isMore", afterTemplate: "afterTemplate" }, host: { classAttribute: "the-toolbar-container" }, viewQueries: [{ propertyName: "toolbarContainer", first: true, predicate: ["toolbarContainer"], descendants: true, read: ViewContainerRef, static: true }], usesOnChanges: true, ngImport: i0, template: "<thy-icon-nav [style.justifyContent]=\"align\">\n <ng-container #toolbarContainer></ng-container>\n <ng-content></ng-content>\n <ng-template *ngIf=\"afterTemplate\" [ngTemplateOutlet]=\"afterTemplate\"></ng-template>\n</thy-icon-nav>\n", components: [{ type: i3$1.ThyIconNavComponent, selector: "thy-icon-nav", inputs: ["thyType"] }], directives: [{ type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i10.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }] });
12782
12692
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheToolbarComponent, decorators: [{
12783
12693
  type: Component,
12784
12694
  args: [{
@@ -12831,7 +12741,7 @@ class TheInlineToolbarComponent {
12831
12741
  .subscribe(() => {
12832
12742
  var _a;
12833
12743
  this.updateInlineToolbar();
12834
- (_a = this.inlineToolbar) === null || _a === void 0 ? void 0 : _a.statusChange(this.editor);
12744
+ (_a = this.inlineToolbar) === null || _a === void 0 ? void 0 : _a.selectionChange(this.editor);
12835
12745
  this.cdr.detectChanges();
12836
12746
  });
12837
12747
  });
@@ -13004,7 +12914,7 @@ class TheQuickInsertComponent {
13004
12914
  }
13005
12915
  }
13006
12916
  TheQuickInsertComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheQuickInsertComponent, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
13007
- TheQuickInsertComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheQuickInsertComponent, selector: "[theQuickInsert]", inputs: { editor: "editor", quickToolbarItems: "quickToolbarItems", isVisible: "isVisible" }, host: { listeners: { "mousedown": "handleMousedownNativeElement($event)" }, properties: { "class.hide": "isHide" }, classAttribute: "the-quick-insert" }, 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", components: [{ type: i4.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }] });
12917
+ TheQuickInsertComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheQuickInsertComponent, selector: "[theQuickInsert]", inputs: { editor: "editor", quickToolbarItems: "quickToolbarItems", isVisible: "isVisible" }, host: { listeners: { "mousedown": "handleMousedownNativeElement($event)" }, properties: { "class.hide": "isHide" }, classAttribute: "the-quick-insert" }, 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", components: [{ type: i3.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }] });
13008
12918
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheQuickInsertComponent, decorators: [{
13009
12919
  type: Component,
13010
12920
  args: [{
@@ -13344,7 +13254,7 @@ class TheEditorComponent extends mixinUnsubscribe(MixinBase) {
13344
13254
  valueChange(value) {
13345
13255
  var _a, _b, _c, _d, _e, _f;
13346
13256
  const isEditable = !((_a = this.theOptions) === null || _a === void 0 ? void 0 : _a.readonly) && !((_b = this.theOptions) === null || _b === void 0 ? void 0 : _b.disabled);
13347
- (_c = this.theGlobalToolbarInstance) === null || _c === void 0 ? void 0 : _c.statusChange(this.editor);
13257
+ (_c = this.theGlobalToolbarInstance) === null || _c === void 0 ? void 0 : _c.selectionChange(this.editor);
13348
13258
  // quick insert button
13349
13259
  if (isEditable) {
13350
13260
  (_d = this.quickInsertInstance) === null || _d === void 0 ? void 0 : _d.checkStatus();
@@ -13479,7 +13389,7 @@ TheEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ver
13479
13389
  useExisting: forwardRef(() => TheEditorComponent),
13480
13390
  multi: true
13481
13391
  }
13482
- ], viewQueries: [{ propertyName: "templateInstance", first: true, predicate: ["templateInstance"], descendants: true, static: true }, { propertyName: "globalToolbarInstance", first: true, predicate: ["globalToolbar"], descendants: true }, { propertyName: "quickInsertInstance", first: true, predicate: ["quickInsert"], descendants: true, static: 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 class=\"the-editable-container\"\n [ngClass]=\"{\n 'the-editor-disabled': theOptions?.disabled,\n 'max-height': maxHeight\n }\"\n [ngStyle]=\"{ 'max-height': maxHeight }\"\n>\n <slate-editable\n class=\"the-editor-typo\"\n [editor]=\"editor\"\n [ngModel]=\"editorValue\"\n (ngModelChange)=\"valueChange($event)\"\n [decorate]=\"decorate\"\n [placeholder]=\"theOptions?.placeholder\"\n [placeholderDecorate]=\"theOptions?.placeholderDecorate ? theOptions?.placeholderDecorate : null\"\n [renderElement]=\"renderElement\"\n [renderText]=\"renderText\"\n [renderLeaf]=\"renderLeaf\"\n [readonly]=\"theOptions?.readonly || theOptions?.disabled\"\n [keydown]=\"onKeyDown\"\n [click]=\"onClick\"\n [paste]=\"onSlaPaste\"\n [beforeInput]=\"onSlaBeforeInput\"\n [blur]=\"onSlaBlur\"\n [focus]=\"onSlaFocus\"\n [copy]=\"onSlaCopy\"\n [cut]=\"onSlaCut\"\n [isStrictDecorate]=\"false\"\n [compositionStart]=\"onSlaCompositionStart\"\n [compositionEnd]=\"onSlaCompositionEnd\"\n [dragStart]=\"onSlaDragStart\"\n [dragOver]=\"onSlaDragOver\"\n [drop]=\"onDrop\"\n (mousedown)=\"mousedown($event)\"\n ></slate-editable>\n <the-inline-toolbar\n *ngIf=\"!theOptions?.readonly && theOptions?.inlineToobarVisible\"\n [editor]=\"editor\"\n [toolbarItems]=\"toolbarEntity.inline\"\n ></the-inline-toolbar>\n <div\n #quickInsert\n theQuickInsert\n [editor]=\"editor\"\n [quickToolbarItems]=\"quickToolbarItems\"\n [isVisible]=\"theOptions?.quickInsertVisible\"\n ></div>\n <the-template #templateInstance></the-template>\n</div>\n", components: [{ type: TheToolbarComponent, selector: "the-toolbar", inputs: ["editor", "toolbarItems", "align", "containerClass", "isMore", "afterTemplate"] }, { type: i1.SlateEditableComponent, selector: "slate-editable", inputs: ["editor", "renderElement", "renderLeaf", "renderText", "decorate", "placeholderDecorate", "isStrictDecorate", "trackBy", "readonly", "placeholder", "beforeInput", "blur", "click", "compositionEnd", "compositionStart", "copy", "cut", "dragOver", "dragStart", "dragEnd", "drop", "focus", "keydown", "paste", "spellCheck", "autoCorrect", "autoCapitalize"] }, { type: TheInlineToolbarComponent, selector: "the-inline-toolbar", inputs: ["editor", "toolbarItems"] }, { type: TheQuickInsertComponent, selector: "[theQuickInsert]", inputs: ["editor", "quickToolbarItems", "isVisible"] }, { type: TheTemplateComponent, selector: "the-template,[theTemplate]" }], directives: [{ type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i10.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i10.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i4$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
13392
+ ], viewQueries: [{ propertyName: "templateInstance", first: true, predicate: ["templateInstance"], descendants: true, static: true }, { propertyName: "globalToolbarInstance", first: true, predicate: ["globalToolbar"], descendants: true }, { propertyName: "quickInsertInstance", first: true, predicate: ["quickInsert"], descendants: true, static: 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 class=\"the-editable-container\"\n [ngClass]=\"{\n 'the-editor-disabled': theOptions?.disabled,\n 'max-height': maxHeight\n }\"\n [ngStyle]=\"{ 'max-height': maxHeight }\"\n>\n <slate-editable\n class=\"the-editor-typo\"\n [editor]=\"editor\"\n [ngModel]=\"editorValue\"\n (ngModelChange)=\"valueChange($event)\"\n [decorate]=\"decorate\"\n [placeholder]=\"theOptions?.placeholder\"\n [placeholderDecorate]=\"theOptions?.placeholderDecorate ? theOptions?.placeholderDecorate : null\"\n [renderElement]=\"renderElement\"\n [renderText]=\"renderText\"\n [renderLeaf]=\"renderLeaf\"\n [readonly]=\"theOptions?.readonly || theOptions?.disabled\"\n [keydown]=\"onKeyDown\"\n [click]=\"onClick\"\n [paste]=\"onSlaPaste\"\n [beforeInput]=\"onSlaBeforeInput\"\n [blur]=\"onSlaBlur\"\n [focus]=\"onSlaFocus\"\n [copy]=\"onSlaCopy\"\n [cut]=\"onSlaCut\"\n [isStrictDecorate]=\"false\"\n [compositionStart]=\"onSlaCompositionStart\"\n [compositionEnd]=\"onSlaCompositionEnd\"\n [dragStart]=\"onSlaDragStart\"\n [dragOver]=\"onSlaDragOver\"\n [drop]=\"onDrop\"\n (mousedown)=\"mousedown($event)\"\n ></slate-editable>\n <the-inline-toolbar\n *ngIf=\"!theOptions?.readonly && theOptions?.inlineToobarVisible\"\n [editor]=\"editor\"\n [toolbarItems]=\"toolbarEntity.inline\"\n ></the-inline-toolbar>\n <div\n #quickInsert\n theQuickInsert\n [editor]=\"editor\"\n [quickToolbarItems]=\"quickToolbarItems\"\n [isVisible]=\"theOptions?.quickInsertVisible\"\n ></div>\n <the-template #templateInstance></the-template>\n</div>\n", components: [{ type: TheToolbarComponent, selector: "the-toolbar", inputs: ["editor", "toolbarItems", "align", "containerClass", "isMore", "afterTemplate"] }, { type: i1.SlateEditableComponent, selector: "slate-editable", inputs: ["editor", "renderElement", "renderLeaf", "renderText", "decorate", "placeholderDecorate", "isStrictDecorate", "trackBy", "readonly", "placeholder", "beforeInput", "blur", "click", "compositionEnd", "compositionStart", "copy", "cut", "dragOver", "dragStart", "dragEnd", "drop", "focus", "keydown", "paste", "spellCheck", "autoCorrect", "autoCapitalize"] }, { type: TheInlineToolbarComponent, selector: "the-inline-toolbar", inputs: ["editor", "toolbarItems"] }, { type: TheQuickInsertComponent, selector: "[theQuickInsert]", inputs: ["editor", "quickToolbarItems", "isVisible"] }, { type: TheTemplateComponent, selector: "the-template,[theTemplate]" }], directives: [{ type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i10.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i10.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
13483
13393
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheEditorComponent, decorators: [{
13484
13394
  type: Component,
13485
13395
  args: [{
@@ -13565,7 +13475,7 @@ class TheToolbarGroupComponent {
13565
13475
  }
13566
13476
  set item(i) {
13567
13477
  this._item = i;
13568
- this.activeMenu = i;
13478
+ this.activeMenuItem = i;
13569
13479
  }
13570
13480
  get item() {
13571
13481
  return this._item;
@@ -13596,9 +13506,9 @@ class TheToolbarGroupComponent {
13596
13506
  this.openGroup(event);
13597
13507
  }
13598
13508
  }
13599
- statusChange(editor) {
13509
+ selectionChange(editor) {
13600
13510
  const activeItem = this.menusActive(editor);
13601
- this.activeMenu = activeItem ? activeItem : null;
13511
+ this.activeMenuItem = activeItem ? activeItem : null;
13602
13512
  this.activeChange();
13603
13513
  this.colseGroup();
13604
13514
  }
@@ -13640,7 +13550,7 @@ class TheToolbarGroupComponent {
13640
13550
  }
13641
13551
  }
13642
13552
  TheToolbarGroupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheToolbarGroupComponent, deps: [{ token: i0.ElementRef }, { token: i1$1.ThyPopover }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component });
13643
- TheToolbarGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheToolbarGroupComponent, selector: "the-toolbar-group", inputs: { menus: "menus", item: "item" }, host: { listeners: { "mousedown": "mousedownHandler($event)", "click": "clickHandle($event)" }, classAttribute: "the-toolbar-group" }, viewQueries: [{ propertyName: "groupTemplate", first: true, predicate: ["groupTemplate"], descendants: true, read: TemplateRef, static: true }], ngImport: i0, template: "<a thyIconNavLink [thyIconNavLinkIcon]=\"item.icon\" [thyTooltip]=\"item?.name\" thyTooltipPlacement=\"top\" [thyIconNavLinkActive]=\"active\"></a>\n\n<ng-template #groupTemplate>\n <the-toolbar class=\"group\" [editor]=\"editor\" [toolbarItems]=\"menus\" [isMore]=\"false\"></the-toolbar>\n</ng-template>\n", components: [{ type: i3.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: TheToolbarComponent, selector: "the-toolbar", inputs: ["editor", "toolbarItems", "align", "containerClass", "isMore", "afterTemplate"] }], directives: [{ type: i5$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }] });
13553
+ TheToolbarGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheToolbarGroupComponent, selector: "the-toolbar-group", inputs: { menus: "menus", item: "item" }, host: { listeners: { "mousedown": "mousedownHandler($event)", "click": "clickHandle($event)" }, classAttribute: "the-toolbar-group" }, viewQueries: [{ propertyName: "groupTemplate", first: true, predicate: ["groupTemplate"], descendants: true, read: TemplateRef, static: true }], ngImport: i0, template: "<a thyIconNavLink [thyIconNavLinkIcon]=\"item.icon\" [thyTooltip]=\"item?.name\" thyTooltipPlacement=\"top\" [thyIconNavLinkActive]=\"active\"></a>\n\n<ng-template #groupTemplate>\n <the-toolbar class=\"group\" [editor]=\"editor\" [toolbarItems]=\"menus\" [isMore]=\"false\"></the-toolbar>\n</ng-template>\n", components: [{ type: i3$1.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: TheToolbarComponent, selector: "the-toolbar", inputs: ["editor", "toolbarItems", "align", "containerClass", "isMore", "afterTemplate"] }], directives: [{ type: i5$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }] });
13644
13554
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheToolbarGroupComponent, decorators: [{
13645
13555
  type: Component,
13646
13556
  args: [{
@@ -13703,7 +13613,6 @@ const COMPONENTS = [
13703
13613
  TheTableToolbarItemComponent,
13704
13614
  TheConversionHintComponent,
13705
13615
  TheVerticalToolbarItemComponent,
13706
- TheIndentToolbarComponent,
13707
13616
  TheTableOptionsComponent
13708
13617
  ];
13709
13618
  const PLUGIN_COMPONENTS = [
@@ -13747,7 +13656,6 @@ TheEditorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version
13747
13656
  TheTableToolbarItemComponent,
13748
13657
  TheConversionHintComponent,
13749
13658
  TheVerticalToolbarItemComponent,
13750
- TheIndentToolbarComponent,
13751
13659
  TheTableOptionsComponent, TheImageComponent,
13752
13660
  TheTemplateComponent,
13753
13661
  TheHrComponent,
@@ -13858,5 +13766,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImpo
13858
13766
  * Generated bundle index. Do not edit.
13859
13767
  */
13860
13768
 
13861
- export { ALIGN_BLOCK_TYPES, A_TAG_REL_ATTR, AlignEditor, Alignment, BLOCK_DELETEBACKWARD_TYPES, BlockquoteEditor, CLIPBOARD_FORMAT_KEY, CODEMIRROR_PADDING_TOP, CODE_MODES, COMPONENTS, CONTAINER_BLOCKS, CONTROL_KEY, CodeEditor, ColorEditor, DEFAULT_LANGUAGE, DEFAULT_SCROLL_CONTAINER, DefaultElementOptions, DefaultGlobalToolbarDefinition, DefaultInlineToolbarDefinition, DefaultQuickToolbarDefinition, DropdownMode, ELEMENT_UNIQUE_ID, ElementKinds, ErrorCodes, FontSizeTypes, FontSizes, HEADING_TYPES, HeadingEditor, HrEditor, IS_MAC, ImageEditor, IndentEditor, Indents, LINK_DEFAULT_TEXT, LIST_BLOCK_TYPES, LayoutTypes, LinkEditor, ListEditor, MarkEditor, MarkProps, MarkTypes, PICTURE_ACCEPTED_UPLOAD_MIME, PICTURE_ACCEPTED_UPLOAD_SIZE, PLUGIN_COMPONENTS, PluginKeys, QuickInsertEditor, STANDARD_HEADING_TYPES, TAB_SPACE, THE_EDITOR_CONVERSION_HINT_REF, THE_EDITOR_QUICK_TOOLBAR_REF, THE_EDITOR_UUID, THE_INLINE_TOOLBAR_TYPES, THE_MODE_PROVIDER, THE_MODE_TOKEN, THE_UPLOAD_SERVICE_TOKEN, TableEditor, TheBaseElementComponent, TheContextService, TheDataMode, TheDefaultElementComponent, TheEditor, TheEditorComponent, TheEditorModule, TheImageComponent, TheIndentToolbarComponent, TheMode, TheModeConfig, index$1 as TheQueries, TheToolbarBaseItemComponent, TheToolbarComponent, TheToolbarDropdownComponent, TheToolbarGroupComponent, TheToolbarGroupToken, TheToolbarItemComponent, TheToolbarService, index as TheTransforms, TodoItemEditor, ToolbarActionTypes, ToolbarAlignment, ToolbarItemMode, ToolbarItemType, ToolbarMoreGroup, VOID_BLOCK_TYPES, VerticalAlignEditor, VerticalAlignment, ZERO_WIDTH_CHAR, autoFocus, autoScrollViewHandle, coercePixelsFromCssValue, combinePlugins, createEmptyParagraph, createPluginFactory, createToolbar, createVerticalAlignPlugin, dataDeserialize, dataSerializing, deleteColorAndBackgroundColorOfText, deleteElementKey, extractFragment, flattenDeepPlugins, getColsTotalWidth, getEditorUUID, getElementClassByPrefix, getElementHeight, getElementWidth, getEndBlock, getPlugin, getPluginOptions, getPlugins, getRowsTotalHeight, getStartBlock, getToolbarClass, headingOptions, htmlToTheia, idCreator, inValidTypes, internalPlugins, isCleanEmptyParagraph, isPureEmptyParagraph, mergeArray, mergeDeepPlugins, mergeElementOptions, mergeOptions, nestedStructureByKey, plainToTheia, pluginsByKey, setEditorUUID, useElementStyle, withTheia };
13769
+ export { ALIGN_BLOCK_TYPES, A_TAG_REL_ATTR, AlignEditor, Alignment, BLOCK_DELETE_BACKWARD_TYPES, BlockquoteEditor, CLIPBOARD_FORMAT_KEY, CODEMIRROR_PADDING_TOP, CODE_MODES, COMPONENTS, CONTAINER_BLOCKS, CONTROL_KEY, CodeEditor, ColorEditor, DEFAULT_LANGUAGE, DEFAULT_SCROLL_CONTAINER, DISABLED_OPERATE_TYPES, DefaultElementOptions, DefaultGlobalToolbarDefinition, DefaultInlineToolbarDefinition, DefaultQuickToolbarDefinition, DropdownMode, ELEMENT_UNIQUE_ID, ElementKinds, ErrorCodes, FontSizeTypes, FontSizes, HEADING_TYPES, HeadingEditor, HrEditor, IS_MAC, ImageEditor, IndentEditor, Indents, LINK_DEFAULT_TEXT, LIST_BLOCK_TYPES, LayoutTypes, LinkEditor, ListEditor, MarkEditor, MarkProps, MarkTypes, PICTURE_ACCEPTED_UPLOAD_MIME, PICTURE_ACCEPTED_UPLOAD_SIZE, PLUGIN_COMPONENTS, PluginKeys, QuickInsertEditor, STANDARD_HEADING_TYPES, TAB_SPACE, THE_EDITOR_CONVERSION_HINT_REF, THE_EDITOR_QUICK_TOOLBAR_REF, THE_EDITOR_UUID, THE_INLINE_TOOLBAR_TYPES, THE_MODE_PROVIDER, THE_MODE_TOKEN, THE_UPLOAD_SERVICE_TOKEN, TableEditor, TheBaseElementComponent, TheBaseToolbarDropdown, TheBaseToolbarItem, TheContextService, TheDataMode, TheDefaultElementComponent, TheEditor, TheEditorComponent, TheEditorModule, TheImageComponent, TheMode, TheModeConfig, index$1 as TheQueries, TheToolbarComponent, TheToolbarDropdownComponent, TheToolbarGroupComponent, TheToolbarGroupToken, TheToolbarItemComponent, TheToolbarService, index as TheTransforms, TodoItemEditor, ToolbarActionTypes, ToolbarAlignment, ToolbarItemMode, ToolbarItemType, ToolbarMoreGroup, VOID_BLOCK_TYPES, VerticalAlignEditor, VerticalAlignment, ZERO_WIDTH_CHAR, autoFocus, autoScrollViewHandle, coercePixelsFromCssValue, combinePlugins, createEmptyParagraph, 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, internalPlugins, isCleanEmptyParagraph, isPureEmptyParagraph, mergeArray, mergeDeepPlugins, mergeElementOptions, mergeOptions, nestedStructureByKey, plainToTheia, pluginsByKey, setEditorUUID, useElementStyle, withTheia };
13862
13770
  //# sourceMappingURL=worktile-theia.js.map