@worktile/theia 3.0.3 → 3.0.4

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 (66) hide show
  1. package/bundles/worktile-theia.umd.js +263 -365
  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/core/toolbar-item/base-toolbar-item.d.ts +29 -0
  8. package/editor.module.d.ts +42 -44
  9. package/esm2015/components/inline-toolbar/inline-toolbar.component.js +2 -2
  10. package/esm2015/components/toolbar/toolbar.component.js +14 -24
  11. package/esm2015/components/toolbar-dropdown/toolbar-dropdown.component.js +11 -41
  12. package/esm2015/components/toolbar-group/toolbar-group.component.js +4 -4
  13. package/esm2015/components/toolbar-item/toolbar-item.component.js +24 -41
  14. package/esm2015/core/toolbar-item/base-toolbar-item.js +92 -0
  15. package/esm2015/editor.component.js +2 -2
  16. package/esm2015/editor.module.js +1 -4
  17. package/esm2015/interfaces/plugins/plugins.js +1 -1
  18. package/esm2015/interfaces/toolbar.js +2 -2
  19. package/esm2015/plugins/align/align.editor.js +3 -7
  20. package/esm2015/plugins/align/align.plugin.js +7 -4
  21. package/esm2015/plugins/code/code.component.js +3 -3
  22. package/esm2015/plugins/color/color.plugin.js +6 -3
  23. package/esm2015/plugins/color/toolbar-item.component.js +14 -23
  24. package/esm2015/plugins/deserializers/deserialize-html.plugin.js +3 -3
  25. package/esm2015/plugins/font-size/font-size.editor.js +7 -13
  26. package/esm2015/plugins/heading/heading.editor.js +2 -1
  27. package/esm2015/plugins/heading/heading.plugin.js +2 -2
  28. package/esm2015/plugins/indent/indent.editor.js +1 -10
  29. package/esm2015/plugins/indent/indent.plugin.js +8 -7
  30. package/esm2015/plugins/inline-code/inline-code.plugin.js +5 -2
  31. package/esm2015/plugins/link/link.plugin.js +5 -2
  32. package/esm2015/plugins/mark/mark.plugin.js +6 -3
  33. package/esm2015/plugins/public-api.js +1 -2
  34. package/esm2015/plugins/quick-insert/components/quick-toolbar/quick-toolbar.component.js +2 -2
  35. package/esm2015/plugins/table/components/table.component.js +4 -1
  36. package/esm2015/plugins/table/toolbar-item.component.js +10 -20
  37. package/esm2015/plugins/vertical-align/toolbar-item.component.js +6 -20
  38. package/esm2015/plugins/vertical-align/vertical-align.editor.js +2 -2
  39. package/esm2015/public-api.js +2 -2
  40. package/esm2015/queries/get-insert-elements-path.js +1 -1
  41. package/esm2015/queries/get-plugin-key-by-toolbar-key.js +10 -0
  42. package/esm2015/queries/get-toolbar-disabled.js +14 -0
  43. package/esm2015/queries/index.js +4 -2
  44. package/esm2015/utils/fragment.js +7 -4
  45. package/fesm2015/worktile-theia.js +232 -331
  46. package/fesm2015/worktile-theia.js.map +1 -1
  47. package/interfaces/plugins/plugins.d.ts +5 -2
  48. package/interfaces/toolbar.d.ts +2 -1
  49. package/package.json +1 -1
  50. package/plugins/code/code.component.d.ts +1 -1
  51. package/plugins/color/toolbar-item.component.d.ts +3 -9
  52. package/plugins/font-size/font-size.editor.d.ts +0 -1
  53. package/plugins/heading/heading.plugin.d.ts +3 -3
  54. package/plugins/indent/indent.editor.d.ts +0 -1
  55. package/plugins/public-api.d.ts +0 -1
  56. package/plugins/table/toolbar-item.component.d.ts +3 -9
  57. package/plugins/vertical-align/toolbar-item.component.d.ts +5 -13
  58. package/public-api.d.ts +1 -1
  59. package/queries/get-plugin-key-by-toolbar-key.d.ts +3 -0
  60. package/queries/get-toolbar-disabled.d.ts +4 -0
  61. package/queries/index.d.ts +3 -1
  62. package/utils/fragment.d.ts +2 -2
  63. package/components/toolbar-base-item/toolbar-base-item.component.d.ts +0 -11
  64. package/esm2015/components/toolbar-base-item/toolbar-base-item.component.js +0 -24
  65. package/esm2015/plugins/indent/toolbar-item.component.js +0 -115
  66. package/plugins/indent/toolbar-item.component.d.ts +0 -36
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
2
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/forms'), require('slate-angular'), require('ngx-tethys/core'), require('is-hotkey'), require('slate'), require('slate-history'), require('rxjs'), require('ngx-tethys/popover'), require('ngx-tethys/icon'), require('ngx-tethys/input'), require('@atinc/selene'), require('lodash'), require('ngx-tethys/util'), require('@angular/cdk/overlay'), require('marked'), require('ngx-tethys'), require('ngx-tethys/alert'), require('rxjs/operators'), require('ngx-tethys/uploader'), require('@angular/platform-browser'), require('ngx-tethys/progress'), require('ngx-tethys/nav'), require('ngx-tethys/tooltip'), require('ng-codemirror'), require('ngx-tethys/notify'), require('ngx-tethys/action-menu'), require('ngx-tethys/switch'), require('ngx-tethys/resizable'), require('is-url'), require('ngx-tethys/button'), require('ngx-tethys/form'), require('ngx-tethys/shared'), require('@angular/cdk/coercion'), require('@angular/cdk/portal'), require('ngx-tethys/list'), require('ngx-tethys/autocomplete'), require('ngx-tethys/avatar'), require('ngx-tethys/select')) :
3
3
  typeof define === 'function' && define.amd ? define('@worktile/theia', ['exports', '@angular/core', '@angular/common', '@angular/forms', 'slate-angular', 'ngx-tethys/core', 'is-hotkey', 'slate', 'slate-history', 'rxjs', 'ngx-tethys/popover', 'ngx-tethys/icon', 'ngx-tethys/input', '@atinc/selene', 'lodash', 'ngx-tethys/util', '@angular/cdk/overlay', 'marked', 'ngx-tethys', 'ngx-tethys/alert', 'rxjs/operators', 'ngx-tethys/uploader', '@angular/platform-browser', 'ngx-tethys/progress', 'ngx-tethys/nav', 'ngx-tethys/tooltip', 'ng-codemirror', 'ngx-tethys/notify', 'ngx-tethys/action-menu', 'ngx-tethys/switch', 'ngx-tethys/resizable', 'is-url', 'ngx-tethys/button', 'ngx-tethys/form', 'ngx-tethys/shared', '@angular/cdk/coercion', '@angular/cdk/portal', 'ngx-tethys/list', 'ngx-tethys/autocomplete', 'ngx-tethys/avatar', 'ngx-tethys/select'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.worktile = global.worktile || {}, global.worktile.theia = {}), global.ng.core, global.ng.common, global.ng.forms, global.i1, global.core, global.isHotkey, global.slate, global.slateHistory, global.rxjs, global.i1$1, global.i4, global.i5, global.selene, global._lodash, global.util, global.ng.cdk.overlay, global.marked, global.i1$2, global.i1$3, global.rxjs.operators, global.uploader, global.ng.platformBrowser, global.i6, global.i3, global.i5$1, global.i8, global.i1$5, global.i2$1, global.i5$2, global.i9, global.isUrl, global.i1$6, global.i2$2, global.i5$3, global.ng.cdk.coercion, global.ng.cdk.portal, global.i1$7, global.autocomplete, global.avatar, global.select));
5
- })(this, (function (exports, i0, i10, i4$1, i1, core, isHotkey, slate, slateHistory, rxjs, i1$1, i4, i5, selene, _lodash, util, i2, marked, i1$2, i1$3, operators, uploader, i1$4, i6, i3, i5$1, i8, i1$5, i2$1, i5$2, i9, isUrl, i1$6, i2$2, i5$3, coercion, portal, i1$7, autocomplete, avatar, select) { 'use strict';
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.worktile = global.worktile || {}, global.worktile.theia = {}), global.ng.core, global.ng.common, global.ng.forms, global.i1, global.core, global.isHotkey, global.slate, global.slateHistory, global.rxjs, global.i1$1, global.i3, global.i5, global.selene, global._lodash, global.util, global.ng.cdk.overlay, global.marked, global.i1$2, global.i1$3, global.rxjs.operators, global.uploader, global.ng.platformBrowser, global.i6, global.i3$1, global.i5$1, global.i8, global.i1$5, global.i2$1, global.i5$2, global.i9, global.isUrl, global.i1$6, global.i2$2, global.i5$3, global.ng.cdk.coercion, global.ng.cdk.portal, global.i1$7, global.autocomplete, global.avatar, global.select));
5
+ })(this, (function (exports, i0, i10, i4, i1, core, isHotkey, slate, slateHistory, rxjs, i1$1, i3, i5, selene, _lodash, util, i2, marked, i1$2, i1$3, operators, uploader, i1$4, i6, i3$1, i5$1, i8, i1$5, i2$1, i5$2, i9, isUrl, i1$6, i2$2, i5$3, coercion, portal, i1$7, autocomplete, avatar, select) { 'use strict';
6
6
 
7
7
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
8
8
 
@@ -26,11 +26,11 @@
26
26
 
27
27
  var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
28
28
  var i10__namespace = /*#__PURE__*/_interopNamespace(i10);
29
- var i4__namespace$1 = /*#__PURE__*/_interopNamespace(i4$1);
29
+ var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
30
30
  var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
31
31
  var isHotkey__default = /*#__PURE__*/_interopDefaultLegacy(isHotkey);
32
32
  var i1__namespace$1 = /*#__PURE__*/_interopNamespace(i1$1);
33
- var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
33
+ var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
34
34
  var i5__namespace = /*#__PURE__*/_interopNamespace(i5);
35
35
  var _lodash__namespace = /*#__PURE__*/_interopNamespace(_lodash);
36
36
  var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
@@ -39,7 +39,7 @@
39
39
  var i1__namespace$2 = /*#__PURE__*/_interopNamespace(i1$3);
40
40
  var i1__namespace$3 = /*#__PURE__*/_interopNamespace(i1$4);
41
41
  var i6__namespace = /*#__PURE__*/_interopNamespace(i6);
42
- var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
42
+ var i3__namespace$1 = /*#__PURE__*/_interopNamespace(i3$1);
43
43
  var i5__namespace$1 = /*#__PURE__*/_interopNamespace(i5$1);
44
44
  var i8__namespace = /*#__PURE__*/_interopNamespace(i8);
45
45
  var i1__namespace$4 = /*#__PURE__*/_interopNamespace(i1$5);
@@ -810,7 +810,7 @@
810
810
  exports.ToolbarItemType = void 0;
811
811
  (function (ToolbarItemType) {
812
812
  ToolbarItemType["default"] = "default";
813
- ToolbarItemType["toolDropdown"] = "tool-dropdown";
813
+ ToolbarItemType["dropdown"] = "dropdown";
814
814
  })(exports.ToolbarItemType || (exports.ToolbarItemType = {}));
815
815
  exports.ToolbarAlignment = void 0;
816
816
  (function (ToolbarAlignment) {
@@ -1034,7 +1034,7 @@
1034
1034
  return TheColorSelectComponent;
1035
1035
  }());
1036
1036
  TheColorSelectComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheColorSelectComponent, deps: [{ token: i1__namespace$1.ThyPopoverRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
1037
- TheColorSelectComponent.ɵcmp = i0__namespace.ɵɵ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__namespace, 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__namespace.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }], directives: [{ type: i10__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i10__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i10__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i10__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4__namespace$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__namespace.ThyInputDirective, selector: "[thyInput]", inputs: ["thySize", "thyAutocomplete"] }, { type: i4__namespace$1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { type: i4__namespace$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4__namespace$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
1037
+ TheColorSelectComponent.ɵcmp = i0__namespace.ɵɵ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__namespace, 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__namespace.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }], directives: [{ type: i10__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i10__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i10__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i10__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4__namespace.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__namespace.ThyInputDirective, selector: "[thyInput]", inputs: ["thySize", "thyAutocomplete"] }, { type: i4__namespace.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { type: i4__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4__namespace.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
1038
1038
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheColorSelectComponent, decorators: [{
1039
1039
  type: i0.Component,
1040
1040
  args: [{
@@ -1342,10 +1342,10 @@
1342
1342
  return nodes;
1343
1343
  }
1344
1344
  /**
1345
- * 删除 text 节点的 颜色/背景色
1345
+ * 过滤文本格式:颜色/背景色/字体大小
1346
1346
  * @param node
1347
1347
  */
1348
- function deleteColorAndBackgroundColorOfText(node) {
1348
+ function filterTextFormat(node) {
1349
1349
  node.children.forEach(function (child) {
1350
1350
  if (slate.Text.isText(child)) {
1351
1351
  if (child['color']) {
@@ -1354,9 +1354,12 @@
1354
1354
  if (child['background-color']) {
1355
1355
  delete child['background-color'];
1356
1356
  }
1357
+ if (child['font-size']) {
1358
+ delete child['font-size'];
1359
+ }
1357
1360
  }
1358
1361
  else {
1359
- deleteColorAndBackgroundColorOfText(child);
1362
+ filterTextFormat(child);
1360
1363
  }
1361
1364
  });
1362
1365
  }
@@ -2445,6 +2448,28 @@
2445
2448
  return false;
2446
2449
  };
2447
2450
 
2451
+ var getToolbarItemDisabled = function (editor, key, customTypes) {
2452
+ var _a, _b;
2453
+ if (editor.selection) {
2454
+ var disabledOperateTypes = (_b = (_a = getPluginOptions(editor, key)) === null || _a === void 0 ? void 0 : _a.disabledOperateTypes) !== null && _b !== void 0 ? _b : [];
2455
+ if (customTypes === null || customTypes === void 0 ? void 0 : customTypes.length) {
2456
+ disabledOperateTypes = Array.from(new Set(__spreadArray(__spreadArray([], __read(disabledOperateTypes)), __read(customTypes))));
2457
+ }
2458
+ var anchorNode = anchorBlock(editor);
2459
+ return anchorNode && disabledOperateTypes.includes(anchorNode === null || anchorNode === void 0 ? void 0 : anchorNode.type);
2460
+ }
2461
+ };
2462
+
2463
+ var getPluginKeyByToolbarKey = function (editor, toolbarKey) {
2464
+ for (var key in editor.pluginsByKey) {
2465
+ var toolbarItems = editor.pluginsByKey[key].toolbarItems;
2466
+ if (toolbarItems && toolbarItems.some(function (item) { return item.key === toolbarKey; })) {
2467
+ toolbarKey = key;
2468
+ }
2469
+ }
2470
+ return toolbarKey;
2471
+ };
2472
+
2448
2473
  var index$1 = /*#__PURE__*/Object.freeze({
2449
2474
  __proto__: null,
2450
2475
  getLastNode: getLastNode,
@@ -2501,7 +2526,9 @@
2501
2526
  findPath: findPath,
2502
2527
  findNode: findNode,
2503
2528
  findDescendant: findDescendant,
2504
- someNode: someNode
2529
+ someNode: someNode,
2530
+ getToolbarItemDisabled: getToolbarItemDisabled,
2531
+ getPluginKeyByToolbarKey: getPluginKeyByToolbarKey
2505
2532
  });
2506
2533
 
2507
2534
  var insertElements = function (editor, elements) {
@@ -3513,7 +3540,7 @@
3513
3540
  return TheImageComponent;
3514
3541
  }(TheBaseElementComponent));
3515
3542
  TheImageComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheImageComponent, deps: [{ token: i0__namespace.ElementRef }, { token: i1__namespace$3.DomSanitizer }, { token: THE_UPLOAD_SERVICE_TOKEN }, { token: i0__namespace.ChangeDetectorRef }, { token: TheContextService }, { token: i1__namespace$1.ThyPopover }, { token: i2__namespace.Overlay }, { token: i0__namespace.ViewContainerRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
3516
- TheImageComponent.ɵcmp = i0__namespace.ɵɵ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__namespace, 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__namespace.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }, { type: i6__namespace.ThyProgressComponent, selector: "thy-progress", inputs: ["thyType", "thySize", "thyValue", "thyMax", "thyTips"] }, { type: i4__namespace.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { type: i3__namespace.ThyIconNavComponent, selector: "thy-icon-nav", inputs: ["thyType"] }, { type: i3__namespace.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: NavSplitLineComponent, selector: "nav-split-line", inputs: ["mode"] }], directives: [{ type: i10__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i10__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i10__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i10__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i5__namespace$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }] });
3543
+ TheImageComponent.ɵcmp = i0__namespace.ɵɵ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__namespace, 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__namespace.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }, { type: i6__namespace.ThyProgressComponent, selector: "thy-progress", inputs: ["thyType", "thySize", "thyValue", "thyMax", "thyTips"] }, { type: i3__namespace.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { type: i3__namespace$1.ThyIconNavComponent, selector: "thy-icon-nav", inputs: ["thyType"] }, { type: i3__namespace$1.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: NavSplitLineComponent, selector: "nav-split-line", inputs: ["mode"] }], directives: [{ type: i10__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i10__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i10__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i10__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i5__namespace$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }] });
3517
3544
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheImageComponent, decorators: [{
3518
3545
  type: i0.Component,
3519
3546
  args: [{
@@ -5964,12 +5991,7 @@
5964
5991
  var _a;
5965
5992
  var contextService = (_a = editor === null || editor === void 0 ? void 0 : editor.injector) === null || _a === void 0 ? void 0 : _a.get(TheContextService);
5966
5993
  var richMedia = contextService.getOptions().theOptions.richMedia;
5967
- if (richMedia && editor.selection) {
5968
- var disableGroup = [exports.ElementKinds.image];
5969
- var anchorBlock$1 = anchorBlock(editor);
5970
- return anchorBlock$1 && disableGroup.includes(anchorBlock$1 === null || anchorBlock$1 === void 0 ? void 0 : anchorBlock$1.type);
5971
- }
5972
- return false;
5994
+ return getToolbarItemDisabled(editor, exports.PluginKeys.align, richMedia ? [exports.ElementKinds.image] : []);
5973
5995
  },
5974
5996
  setAlign: function (editor, alignment) {
5975
5997
  if (TableEditor.setAlign(editor, alignment)) {
@@ -6009,7 +6031,7 @@
6009
6031
  toolbarItems: [
6010
6032
  {
6011
6033
  key: exports.ToolbarActionTypes.alignType,
6012
- type: exports.ToolbarItemType.toolDropdown,
6034
+ type: exports.ToolbarItemType.dropdown,
6013
6035
  dropdownMode: exports.DropdownMode.icon,
6014
6036
  dropdownItemKey: exports.ToolbarActionTypes.alignLeft,
6015
6037
  includes: [exports.ToolbarActionTypes.alignLeft, exports.ToolbarActionTypes.alignCenter, exports.ToolbarActionTypes.alignRight],
@@ -6037,11 +6059,15 @@
6037
6059
  execute: function (editor) { return AlignEditor.setAlign(editor, exports.Alignment.right); },
6038
6060
  active: function (editor) { return AlignEditor.isActive(editor, exports.Alignment.right); }
6039
6061
  }
6040
- ]
6062
+ ],
6063
+ options: {
6064
+ disabledOperateTypes: [exports.ElementKinds.code]
6065
+ }
6041
6066
  });
6042
6067
 
6043
6068
  var headingOptions = {
6044
6069
  allowParentTypes: [exports.ElementKinds.tableCell, exports.ElementKinds.blockquote],
6070
+ disabledOperateTypes: [exports.ElementKinds.image, exports.ElementKinds.code],
6045
6071
  cleanupTypes: [exports.ElementKinds.bulletedList, exports.ElementKinds.numberedList, exports.ElementKinds.listItem]
6046
6072
  };
6047
6073
  var HeadingEditor = {
@@ -6120,7 +6146,7 @@
6120
6146
  {
6121
6147
  key: exports.ElementKinds.headingList,
6122
6148
  name: '正文',
6123
- type: exports.ToolbarItemType.toolDropdown,
6149
+ type: exports.ToolbarItemType.dropdown,
6124
6150
  dropdownItemKey: exports.ElementKinds.paragraph,
6125
6151
  includes: __spreadArray([exports.ElementKinds.paragraph], __read(STANDARD_HEADING_TYPES))
6126
6152
  },
@@ -6286,7 +6312,10 @@
6286
6312
  execute: function (editor) { return MarkEditor.toggleMark(editor, exports.MarkTypes.underline); },
6287
6313
  active: function (editor) { return MarkEditor.isMarkActive(editor, exports.MarkTypes.underline); }
6288
6314
  }
6289
- ]
6315
+ ],
6316
+ options: {
6317
+ disabledOperateTypes: [exports.ElementKinds.image, exports.ElementKinds.code]
6318
+ }
6290
6319
  });
6291
6320
 
6292
6321
  var withNodeID = function (e) {
@@ -7396,10 +7425,34 @@
7396
7425
  withOverrides: withRemoveVoid
7397
7426
  });
7398
7427
 
7399
- var TheToolbarBaseItemComponent = /** @class */ (function () {
7400
- function TheToolbarBaseItemComponent() {
7428
+ var TheBaseToolbarItem = /** @class */ (function () {
7429
+ function TheBaseToolbarItem() {
7401
7430
  }
7402
- TheToolbarBaseItemComponent.prototype.execute = function (event) {
7431
+ Object.defineProperty(TheBaseToolbarItem.prototype, "toolbarItem", {
7432
+ get: function () {
7433
+ return this._toolbarItem;
7434
+ },
7435
+ set: function (value) {
7436
+ this._toolbarItem = value;
7437
+ },
7438
+ enumerable: false,
7439
+ configurable: true
7440
+ });
7441
+ Object.defineProperty(TheBaseToolbarItem.prototype, "disabledState", {
7442
+ get: function () {
7443
+ return this.disabled;
7444
+ },
7445
+ enumerable: false,
7446
+ configurable: true
7447
+ });
7448
+ Object.defineProperty(TheBaseToolbarItem.prototype, "activeState", {
7449
+ get: function () {
7450
+ return this.active;
7451
+ },
7452
+ enumerable: false,
7453
+ configurable: true
7454
+ });
7455
+ TheBaseToolbarItem.prototype.execute = function (event) {
7403
7456
  var _a;
7404
7457
  event.preventDefault();
7405
7458
  event.stopPropagation();
@@ -7410,13 +7463,76 @@
7410
7463
  i1.AngularEditor.focus(this.editor);
7411
7464
  }
7412
7465
  };
7413
- return TheToolbarBaseItemComponent;
7466
+ TheBaseToolbarItem.prototype.selectionChange = function (editor) {
7467
+ var _a, _b, _c, _d, _e, _f;
7468
+ if (editor.selection) {
7469
+ 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;
7470
+ if ((_c = this._toolbarItem) === null || _c === void 0 ? void 0 : _c.disable) {
7471
+ 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;
7472
+ }
7473
+ else {
7474
+ var pluginKey = getPluginKeyByToolbarKey(editor, (_f = this._toolbarItem) === null || _f === void 0 ? void 0 : _f.key);
7475
+ this.disabled = pluginKey && getToolbarItemDisabled(editor, pluginKey);
7476
+ }
7477
+ }
7478
+ };
7479
+ return TheBaseToolbarItem;
7414
7480
  }());
7415
- TheToolbarBaseItemComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheToolbarBaseItemComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Directive });
7416
- TheToolbarBaseItemComponent.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.15", type: TheToolbarBaseItemComponent, ngImport: i0__namespace });
7417
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheToolbarBaseItemComponent, decorators: [{
7481
+ TheBaseToolbarItem.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheBaseToolbarItem, deps: [], target: i0__namespace.ɵɵFactoryTarget.Directive });
7482
+ TheBaseToolbarItem.ɵdir = i0__namespace.ɵɵ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__namespace });
7483
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheBaseToolbarItem, decorators: [{
7418
7484
  type: i0.Directive
7419
- }] });
7485
+ }], propDecorators: { toolbarItem: [{
7486
+ type: i0.Input
7487
+ }], editor: [{
7488
+ type: i0.Input
7489
+ }], disabledState: [{
7490
+ type: i0.HostBinding,
7491
+ args: ['class.disabled']
7492
+ }], activeState: [{
7493
+ type: i0.HostBinding,
7494
+ args: ['class.active']
7495
+ }] } });
7496
+ var TheBaseToolbarDropdown = /** @class */ (function (_super) {
7497
+ __extends(TheBaseToolbarDropdown, _super);
7498
+ function TheBaseToolbarDropdown() {
7499
+ var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
7500
+ _this.mode = exports.DropdownMode.text;
7501
+ return _this;
7502
+ }
7503
+ Object.defineProperty(TheBaseToolbarDropdown.prototype, "defaultDropdownItem", {
7504
+ get: function () {
7505
+ var _this = this;
7506
+ var activeItem = this.dropdownItemKey && this.menus.find(function (item) { return item.key === _this.dropdownItemKey; });
7507
+ return activeItem ? activeItem : this.menus[0];
7508
+ },
7509
+ enumerable: false,
7510
+ configurable: true
7511
+ });
7512
+ TheBaseToolbarDropdown.prototype.selectionChange = function (editor) {
7513
+ _super.prototype.selectionChange.call(this, editor);
7514
+ var activeItem = this.menus.find(function (i) {
7515
+ if (i === null || i === void 0 ? void 0 : i.active) {
7516
+ return i === null || i === void 0 ? void 0 : i.active(editor);
7517
+ }
7518
+ });
7519
+ if (!this.toolbarItem.dropdownFixedIcon) {
7520
+ this.activeMenuItem = activeItem ? activeItem : this.defaultDropdownItem;
7521
+ }
7522
+ };
7523
+ return TheBaseToolbarDropdown;
7524
+ }(TheBaseToolbarItem));
7525
+ TheBaseToolbarDropdown.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheBaseToolbarDropdown, deps: null, target: i0__namespace.ɵɵFactoryTarget.Directive });
7526
+ TheBaseToolbarDropdown.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.15", type: TheBaseToolbarDropdown, inputs: { menus: "menus", mode: "mode", dropdownItemKey: "dropdownItemKey" }, usesInheritance: true, ngImport: i0__namespace });
7527
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheBaseToolbarDropdown, decorators: [{
7528
+ type: i0.Directive
7529
+ }], propDecorators: { menus: [{
7530
+ type: i0.Input
7531
+ }], mode: [{
7532
+ type: i0.Input
7533
+ }], dropdownItemKey: [{
7534
+ type: i0.Input
7535
+ }] } });
7420
7536
 
7421
7537
  var TheToolbarDropdownComponent = /** @class */ (function (_super) {
7422
7538
  __extends(TheToolbarDropdownComponent, _super);
@@ -7426,22 +7542,9 @@
7426
7542
  _this.thyPopover = thyPopover;
7427
7543
  _this.viewContainerRef = viewContainerRef;
7428
7544
  _this.overlay = overlay;
7429
- _this.mode = exports.DropdownMode.text;
7430
7545
  _this.dropdownMode = exports.DropdownMode;
7431
- _this.disabled = false;
7432
7546
  return _this;
7433
7547
  }
7434
- Object.defineProperty(TheToolbarDropdownComponent.prototype, "item", {
7435
- get: function () {
7436
- return this._item;
7437
- },
7438
- set: function (i) {
7439
- this._item = i;
7440
- this.activeMenu = i;
7441
- },
7442
- enumerable: false,
7443
- configurable: true
7444
- });
7445
7548
  Object.defineProperty(TheToolbarDropdownComponent.prototype, "isOpen", {
7446
7549
  get: function () {
7447
7550
  return this.dropdownPopoverRef && this.dropdownPopoverRef.getOverlayRef() && this.dropdownPopoverRef.getOverlayRef().hasAttached();
@@ -7462,38 +7565,24 @@
7462
7565
  this.closeDropdownPopover();
7463
7566
  }
7464
7567
  };
7465
- Object.defineProperty(TheToolbarDropdownComponent.prototype, "disabledState", {
7466
- get: function () {
7467
- return this.disabled;
7468
- },
7469
- enumerable: false,
7470
- configurable: true
7471
- });
7472
7568
  TheToolbarDropdownComponent.prototype.ngOnInit = function () {
7473
7569
  var _a;
7474
7570
  if (!this.template) {
7475
7571
  this.template = this.mode === this.dropdownMode.icon ? this.iconModeTemplate : this.textModeTemplate;
7476
7572
  }
7477
- if (!this.activeMenu) {
7478
- this.activeMenu = this.menus[0];
7573
+ if (!this.activeMenuItem) {
7574
+ this.activeMenuItem = this.defaultDropdownItem;
7479
7575
  }
7480
7576
  if (this.toolbarItem) {
7481
7577
  this.elementRef.nativeElement.classList.add("" + ((_a = this.toolbarItem) === null || _a === void 0 ? void 0 : _a.key));
7482
7578
  }
7483
7579
  };
7484
- TheToolbarDropdownComponent.prototype.statusChange = function (editor) {
7485
- var _a, _b;
7486
- 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;
7487
- var activeItem = this.menus.find(function (i) {
7488
- if (i === null || i === void 0 ? void 0 : i.active) {
7489
- return i === null || i === void 0 ? void 0 : i.active(editor);
7490
- }
7491
- });
7492
- this.activeMenu = activeItem ? activeItem : this.item;
7493
- };
7494
7580
  TheToolbarDropdownComponent.prototype.itemMousedown = function (event, item) {
7495
7581
  _super.prototype.execute.call(this, event);
7496
7582
  this.closeDropdownPopover();
7583
+ if (!this.toolbarItem.dropdownFixedIcon) {
7584
+ this.activeMenuItem = item;
7585
+ }
7497
7586
  if (this.itemMousedownHandle) {
7498
7587
  this.itemMousedownHandle(item);
7499
7588
  return;
@@ -7542,9 +7631,9 @@
7542
7631
  .withPositions([bottomPosition, topPosition]);
7543
7632
  };
7544
7633
  return TheToolbarDropdownComponent;
7545
- }(TheToolbarBaseItemComponent));
7634
+ }(TheBaseToolbarDropdown));
7546
7635
  TheToolbarDropdownComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheToolbarDropdownComponent, deps: [{ token: i0__namespace.ElementRef }, { token: i1__namespace$1.ThyPopover }, { token: i0__namespace.ViewContainerRef }, { token: i2__namespace.Overlay }], target: i0__namespace.ɵɵFactoryTarget.Component });
7547
- TheToolbarDropdownComponent.ɵcmp = i0__namespace.ɵɵ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__namespace, 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__namespace.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i4__namespace.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { type: i2__namespace$1.ThyActionMenuComponent, selector: "thy-action-menu", inputs: ["thyTheme", "thyWidth"] }, { type: i2__namespace$1.ThyActionMenuDividerComponent, selector: "thy-action-menu-divider", inputs: ["thyTitle", "thyType"] }], directives: [{ type: i10__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i5__namespace$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { type: i10__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i10__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2__namespace$1.ThyActionMenuItemDirective, selector: "[thyActionMenuItem]", inputs: ["thyDisabled", "thyType"] }, { type: i2__namespace$1.ThyActionMenuItemActiveDirective, selector: "[thyActionMenuItemActive]", inputs: ["thyActionMenuItemActive"] }, { type: i10__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i2__namespace$1.ThyActionMenuItemIconDirective, selector: "[thyActionMenuItemIcon]" }, { type: i2__namespace$1.ThyActionMenuItemNameDirective, selector: "[thyActionMenuItemName]" }] });
7636
+ TheToolbarDropdownComponent.ɵcmp = i0__namespace.ɵɵ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__namespace, 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__namespace$1.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i3__namespace.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { type: i2__namespace$1.ThyActionMenuComponent, selector: "thy-action-menu", inputs: ["thyTheme", "thyWidth"] }, { type: i2__namespace$1.ThyActionMenuDividerComponent, selector: "thy-action-menu-divider", inputs: ["thyTitle", "thyType"] }], directives: [{ type: i10__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i5__namespace$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { type: i10__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i10__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2__namespace$1.ThyActionMenuItemDirective, selector: "[thyActionMenuItem]", inputs: ["thyDisabled", "thyType"] }, { type: i2__namespace$1.ThyActionMenuItemActiveDirective, selector: "[thyActionMenuItemActive]", inputs: ["thyActionMenuItemActive"] }, { type: i10__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i2__namespace$1.ThyActionMenuItemIconDirective, selector: "[thyActionMenuItemIcon]" }, { type: i2__namespace$1.ThyActionMenuItemNameDirective, selector: "[thyActionMenuItemName]" }] });
7548
7637
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheToolbarDropdownComponent, decorators: [{
7549
7638
  type: i0.Component,
7550
7639
  args: [{
@@ -7554,15 +7643,7 @@
7554
7643
  class: 'the-toolbar-dropdown-container'
7555
7644
  }
7556
7645
  }]
7557
- }], ctorParameters: function () { return [{ type: i0__namespace.ElementRef }, { type: i1__namespace$1.ThyPopover }, { type: i0__namespace.ViewContainerRef }, { type: i2__namespace.Overlay }]; }, propDecorators: { toolbarItem: [{
7558
- type: i0.Input
7559
- }], menus: [{
7560
- type: i0.Input
7561
- }], mode: [{
7562
- type: i0.Input
7563
- }], item: [{
7564
- type: i0.Input
7565
- }], itemMousedownHandle: [{
7646
+ }], ctorParameters: function () { return [{ type: i0__namespace.ElementRef }, { type: i1__namespace$1.ThyPopover }, { type: i0__namespace.ViewContainerRef }, { type: i2__namespace.Overlay }]; }, propDecorators: { itemMousedownHandle: [{
7566
7647
  type: i0.Input
7567
7648
  }], iconModeTemplate: [{
7568
7649
  type: i0.ViewChild,
@@ -7579,9 +7660,6 @@
7579
7660
  }], handleDocumentMouseDown: [{
7580
7661
  type: i0.HostListener,
7581
7662
  args: ['document: mousedown', ['$event']]
7582
- }], disabledState: [{
7583
- type: i0.HostBinding,
7584
- args: ['class.disabled']
7585
7663
  }] } });
7586
7664
 
7587
7665
  var TheCodeComponent = /** @class */ (function (_super) {
@@ -7615,7 +7693,7 @@
7615
7693
  };
7616
7694
  _this.actives = _this.menus[0];
7617
7695
  _this.resizeBounds = null;
7618
- _this.onChangeLangulage = function (item) {
7696
+ _this.onChangeLanguage = function (item) {
7619
7697
  _this.options = Object.assign(Object.assign({}, _this.options), { mode: item.key });
7620
7698
  _this.actives = item;
7621
7699
  CodeEditor.setCodeAttribute(_this.editor, _this.element, { language: item.key });
@@ -7798,7 +7876,7 @@
7798
7876
  return TheCodeComponent;
7799
7877
  }(TheBaseElementComponent));
7800
7878
  TheCodeComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheCodeComponent, deps: [{ token: i0__namespace.ElementRef }, { token: i0__namespace.ChangeDetectorRef }, { token: i1__namespace$4.ThyNotifyService }, { token: TheContextService }, { token: i0__namespace.NgZone }, { token: THE_MODE_TOKEN }], target: i0__namespace.ɵɵFactoryTarget.Component });
7801
- TheCodeComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheCodeComponent, selector: "div[theCode]", viewQueries: [{ propertyName: "codemirror", first: true, predicate: ["codemirror"], descendants: true, read: i8.CodeMirrorComponent }], usesInheritance: true, ngImport: i0__namespace, 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__namespace.ThyIconNavComponent, selector: "thy-icon-nav", inputs: ["thyType"] }, { type: TheToolbarDropdownComponent, selector: "the-toolbar-dropdown", inputs: ["toolbarItem", "menus", "mode", "item", "itemMousedownHandle"] }, { type: i5__namespace$2.ThySwitchComponent, selector: "thy-switch", inputs: ["thyType", "thySize", "thyDisabled"], outputs: ["thyChange"] }, { type: i3__namespace.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: NavSplitLineComponent, selector: "nav-split-line", inputs: ["mode"] }, { type: i1__namespace.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }, { type: i8__namespace.CodeMirrorComponent, selector: "ng-codemirror, [ngCodeMirror]", inputs: ["autoMaxHeight", "delayRefreshTime", "options"], outputs: ["focusChange"] }, { type: i9__namespace.ThyResizeHandleComponent, selector: "thy-resize-handle, [thy-resize-handle]", inputs: ["thyDirection"], outputs: ["thyMouseDown"], exportAs: ["thyResizeHandle"] }], directives: [{ type: i10__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4__namespace$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4__namespace$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i5__namespace$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { type: i9__namespace.ThyResizableDirective, selector: "[thyResizable]", inputs: ["thyBounds", "thyMaxHeight", "thyMaxWidth", "thyMinHeight", "thyMinWidth", "thyGridColumnCount", "thyMaxColumn", "thyMinColumn", "thyLockAspectRatio", "thyPreview", "thyDisabled"], outputs: ["thyResize", "thyResizeEnd", "thyResizeStart"] }, { type: i10__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i10__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
7879
+ TheCodeComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheCodeComponent, selector: "div[theCode]", viewQueries: [{ propertyName: "codemirror", first: true, predicate: ["codemirror"], descendants: true, read: i8.CodeMirrorComponent }], usesInheritance: true, ngImport: i0__namespace, template: "<div contenteditable=\"false\" class=\"the-code-block-operation\" *ngIf=\"isCollapsed && codemirror && !options.readOnly\">\n <thy-icon-nav>\n <the-toolbar-dropdown [menus]=\"menus\" [toolbarItem]=\"actives\" [itemMousedownHandle]=\"onChangeLanguage\"> </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__namespace$1.ThyIconNavComponent, selector: "thy-icon-nav", inputs: ["thyType"] }, { type: TheToolbarDropdownComponent, selector: "the-toolbar-dropdown", inputs: ["itemMousedownHandle"] }, { type: i5__namespace$2.ThySwitchComponent, selector: "thy-switch", inputs: ["thyType", "thySize", "thyDisabled"], outputs: ["thyChange"] }, { type: i3__namespace$1.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: NavSplitLineComponent, selector: "nav-split-line", inputs: ["mode"] }, { type: i1__namespace.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }, { type: i8__namespace.CodeMirrorComponent, selector: "ng-codemirror, [ngCodeMirror]", inputs: ["autoMaxHeight", "delayRefreshTime", "options"], outputs: ["focusChange"] }, { type: i9__namespace.ThyResizeHandleComponent, selector: "thy-resize-handle, [thy-resize-handle]", inputs: ["thyDirection"], outputs: ["thyMouseDown"], exportAs: ["thyResizeHandle"] }], directives: [{ type: i10__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4__namespace.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i5__namespace$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { type: i9__namespace.ThyResizableDirective, selector: "[thyResizable]", inputs: ["thyBounds", "thyMaxHeight", "thyMaxWidth", "thyMinHeight", "thyMinWidth", "thyGridColumnCount", "thyMaxColumn", "thyMinColumn", "thyLockAspectRatio", "thyPreview", "thyDisabled"], outputs: ["thyResize", "thyResizeEnd", "thyResizeStart"] }, { type: i10__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i10__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
7802
7880
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheCodeComponent, decorators: [{
7803
7881
  type: i0.Component,
7804
7882
  args: [{
@@ -8050,7 +8128,7 @@
8050
8128
  return TheLinkEditComponent;
8051
8129
  }());
8052
8130
  TheLinkEditComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheLinkEditComponent, deps: [{ token: i1__namespace$1.ThyPopoverRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
8053
- TheLinkEditComponent.ɵcmp = i0__namespace.ɵɵ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__namespace, 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__namespace$2.ThyFormGroupComponent, selector: "thy-form-group", inputs: ["thyLabelText", "thyLabelTextTranslateKey", "thyLabelRequired", "thyLabelPaddingTopClear", "thyFeedbackIcon", "thyTipsMode", "thyTips", "thyTipsTranslateKey", "thyRowFill"] }, { type: i2__namespace$2.ThyFormGroupFooterComponent, selector: "thy-form-group-footer", inputs: ["thyAlign"] }, { type: i1__namespace$5.ThyButtonComponent, selector: "thy-button,[thy-button],[thyButton]", inputs: ["thyButton", "thyType", "thyLoading", "thyLoadingText", "thySize", "thyIcon", "thySquare", "thyBlock"] }], directives: [{ type: i4__namespace$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i4__namespace$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i4__namespace$1.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i2__namespace$2.ThyFormDirective, selector: "[thyForm],[thy-form]", inputs: ["thyLayout", "thyEnterKeyMode", "thyFormValidatorConfig"], exportAs: ["thyForm"] }, { type: i5__namespace$3.ThyAutofocusDirective, selector: "input[thyAutofocus],textarea[thyAutofocus]", inputs: ["thyAutoSelect", "thyAutofocus"] }, { type: i4__namespace$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__namespace.ThyInputDirective, selector: "[thyInput]", inputs: ["thySize", "thyAutocomplete"] }, { type: i4__namespace$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i4__namespace$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4__namespace$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i2__namespace$2.ThyFormSubmitDirective, selector: "[thyFormSubmit],[thy-form-submit]", outputs: ["thyFormSubmit"] }] });
8131
+ TheLinkEditComponent.ɵcmp = i0__namespace.ɵɵ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__namespace, 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__namespace$2.ThyFormGroupComponent, selector: "thy-form-group", inputs: ["thyLabelText", "thyLabelTextTranslateKey", "thyLabelRequired", "thyLabelPaddingTopClear", "thyFeedbackIcon", "thyTipsMode", "thyTips", "thyTipsTranslateKey", "thyRowFill"] }, { type: i2__namespace$2.ThyFormGroupFooterComponent, selector: "thy-form-group-footer", inputs: ["thyAlign"] }, { type: i1__namespace$5.ThyButtonComponent, selector: "thy-button,[thy-button],[thyButton]", inputs: ["thyButton", "thyType", "thyLoading", "thyLoadingText", "thySize", "thyIcon", "thySquare", "thyBlock"] }], directives: [{ type: i4__namespace.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i4__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i4__namespace.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i2__namespace$2.ThyFormDirective, selector: "[thyForm],[thy-form]", inputs: ["thyLayout", "thyEnterKeyMode", "thyFormValidatorConfig"], exportAs: ["thyForm"] }, { type: i5__namespace$3.ThyAutofocusDirective, selector: "input[thyAutofocus],textarea[thyAutofocus]", inputs: ["thyAutoSelect", "thyAutofocus"] }, { type: i4__namespace.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__namespace.ThyInputDirective, selector: "[thyInput]", inputs: ["thySize", "thyAutocomplete"] }, { type: i4__namespace.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i4__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4__namespace.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i2__namespace$2.ThyFormSubmitDirective, selector: "[thyFormSubmit],[thy-form-submit]", outputs: ["thyFormSubmit"] }] });
8054
8132
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheLinkEditComponent, decorators: [{
8055
8133
  type: i0.Component,
8056
8134
  args: [{
@@ -8286,7 +8364,10 @@
8286
8364
  execute: function (editor) { return LinkEditor.insertLink(editor); },
8287
8365
  active: function (editor) { return LinkEditor.isLinkActive(editor); }
8288
8366
  }
8289
- ]
8367
+ ],
8368
+ options: {
8369
+ disabledOperateTypes: [exports.ElementKinds.image, exports.ElementKinds.code]
8370
+ }
8290
8371
  });
8291
8372
 
8292
8373
  /**
@@ -9164,7 +9245,7 @@
9164
9245
  return TheTableOptionsComponent;
9165
9246
  }());
9166
9247
  TheTableOptionsComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheTableOptionsComponent, deps: [{ token: i1__namespace$6.ThyPopoverRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
9167
- TheTableOptionsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheTableOptionsComponent, selector: "the-table-options", inputs: { tableStore: "tableStore", editor: "editor" }, host: { listeners: { "document: mousedown": "handleDocumentMouseDown($event)" } }, ngImport: i0__namespace, template: "\n <thy-action-menu class=\"table-drop-menu\">\n <ng-container *ngFor=\"let option of tableDropdownList\">\n <a thyActionMenuItem href=\"javascript:;\" (mousedown)=\"setTableOptions($event, option)\">\n <span thyActionMenuItemName>{{ option.name }}</span>\n <span thyActionMenuItemExtendIcon class=\"text-primary\" *ngIf=\"option.isActive\">\n <thy-icon thyIconName=\"check\"></thy-icon>\n </span>\n </a>\n </ng-container>\n </thy-action-menu>\n ", isInline: true, components: [{ type: i2__namespace$1.ThyActionMenuComponent, selector: "thy-action-menu", inputs: ["thyTheme", "thyWidth"] }, { type: i4__namespace.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }], directives: [{ type: i10__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2__namespace$1.ThyActionMenuItemDirective, selector: "[thyActionMenuItem]", inputs: ["thyDisabled", "thyType"] }, { type: i2__namespace$1.ThyActionMenuItemNameDirective, selector: "[thyActionMenuItemName]" }, { type: i10__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2__namespace$1.ThyActionMenuItemExtendIconDirective, selector: "[thyActionMenuItemExtendIcon]" }] });
9248
+ TheTableOptionsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheTableOptionsComponent, selector: "the-table-options", inputs: { tableStore: "tableStore", editor: "editor" }, host: { listeners: { "document: mousedown": "handleDocumentMouseDown($event)" } }, ngImport: i0__namespace, template: "\n <thy-action-menu class=\"table-drop-menu\">\n <ng-container *ngFor=\"let option of tableDropdownList\">\n <a thyActionMenuItem href=\"javascript:;\" (mousedown)=\"setTableOptions($event, option)\">\n <span thyActionMenuItemName>{{ option.name }}</span>\n <span thyActionMenuItemExtendIcon class=\"text-primary\" *ngIf=\"option.isActive\">\n <thy-icon thyIconName=\"check\"></thy-icon>\n </span>\n </a>\n </ng-container>\n </thy-action-menu>\n ", isInline: true, components: [{ type: i2__namespace$1.ThyActionMenuComponent, selector: "thy-action-menu", inputs: ["thyTheme", "thyWidth"] }, { type: i3__namespace.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }], directives: [{ type: i10__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2__namespace$1.ThyActionMenuItemDirective, selector: "[thyActionMenuItem]", inputs: ["thyDisabled", "thyType"] }, { type: i2__namespace$1.ThyActionMenuItemNameDirective, selector: "[thyActionMenuItemName]" }, { type: i10__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2__namespace$1.ThyActionMenuItemExtendIconDirective, selector: "[thyActionMenuItemExtendIcon]" }] });
9168
9249
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheTableOptionsComponent, decorators: [{
9169
9250
  type: i0.Component,
9170
9251
  args: [{
@@ -9318,7 +9399,7 @@
9318
9399
  return TheTableToolbarComponent;
9319
9400
  }());
9320
9401
  TheTableToolbarComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheTableToolbarComponent, deps: [{ token: i0__namespace.NgZone }, { token: TheColorSelectService }, { token: i1__namespace$1.ThyPopover }, { token: i1__namespace$1.ThyPopoverRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
9321
- TheTableToolbarComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheTableToolbarComponent, selector: "the-table-toolbar", inputs: { tableStore: "tableStore", isActiveSelect: "isActiveSelect" }, ngImport: i0__namespace, 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__namespace.ThyIconNavComponent, selector: "thy-icon-nav", inputs: ["thyType"] }, { type: i3__namespace.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i4__namespace.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { type: NavSplitLineComponent, selector: "nav-split-line", inputs: ["mode"] }, { type: i1__namespace$5.ThyButtonComponent, selector: "thy-button,[thy-button],[thyButton]", inputs: ["thyButton", "thyType", "thyLoading", "thyLoadingText", "thySize", "thyIcon", "thySquare", "thyBlock"] }], directives: [{ type: i10__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i10__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5__namespace$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }] });
9402
+ TheTableToolbarComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheTableToolbarComponent, selector: "the-table-toolbar", inputs: { tableStore: "tableStore", isActiveSelect: "isActiveSelect" }, ngImport: i0__namespace, 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__namespace$1.ThyIconNavComponent, selector: "thy-icon-nav", inputs: ["thyType"] }, { type: i3__namespace$1.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i3__namespace.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { type: NavSplitLineComponent, selector: "nav-split-line", inputs: ["mode"] }, { type: i1__namespace$5.ThyButtonComponent, selector: "thy-button,[thy-button],[thyButton]", inputs: ["thyButton", "thyType", "thyLoading", "thyLoadingText", "thySize", "thyIcon", "thySquare", "thyBlock"] }], directives: [{ type: i10__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i10__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5__namespace$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }] });
9322
9403
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheTableToolbarComponent, decorators: [{
9323
9404
  type: i0.Component,
9324
9405
  args: [{
@@ -9382,7 +9463,7 @@
9382
9463
  return TheContextMenuComponent;
9383
9464
  }());
9384
9465
  TheContextMenuComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheContextMenuComponent, deps: [{ token: i0__namespace.ElementRef }, { token: i1__namespace$1.ThyPopoverRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
9385
- TheContextMenuComponent.ɵcmp = i0__namespace.ɵɵ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__namespace, 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__namespace$1.ThyActionMenuComponent, selector: "thy-action-menu", inputs: ["thyTheme", "thyWidth"] }, { type: i4__namespace.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { type: i2__namespace$1.ThyActionMenuDividerComponent, selector: "thy-action-menu-divider", inputs: ["thyTitle", "thyType"] }], directives: [{ type: i10__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i10__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2__namespace$1.ThyActionMenuItemDirective, selector: "[thyActionMenuItem]", inputs: ["thyDisabled", "thyType"] }, { type: i2__namespace$1.ThyActionMenuItemIconDirective, selector: "[thyActionMenuItemIcon]" }, { type: i2__namespace$1.ThyActionMenuItemNameDirective, selector: "[thyActionMenuItemName]" }, { type: i2__namespace$1.ThyActionMenuItemExtendIconDirective, selector: "[thyActionMenuItemExtendIcon]" }] });
9466
+ TheContextMenuComponent.ɵcmp = i0__namespace.ɵɵ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__namespace, 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__namespace$1.ThyActionMenuComponent, selector: "thy-action-menu", inputs: ["thyTheme", "thyWidth"] }, { type: i3__namespace.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { type: i2__namespace$1.ThyActionMenuDividerComponent, selector: "thy-action-menu-divider", inputs: ["thyTitle", "thyType"] }], directives: [{ type: i10__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i10__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2__namespace$1.ThyActionMenuItemDirective, selector: "[thyActionMenuItem]", inputs: ["thyDisabled", "thyType"] }, { type: i2__namespace$1.ThyActionMenuItemIconDirective, selector: "[thyActionMenuItemIcon]" }, { type: i2__namespace$1.ThyActionMenuItemNameDirective, selector: "[thyActionMenuItemName]" }, { type: i2__namespace$1.ThyActionMenuItemExtendIconDirective, selector: "[thyActionMenuItemExtendIcon]" }] });
9386
9467
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheContextMenuComponent, decorators: [{
9387
9468
  type: i0.Component,
9388
9469
  args: [{
@@ -10163,6 +10244,9 @@
10163
10244
  image.onload = function () {
10164
10245
  resolve(true);
10165
10246
  };
10247
+ image.onerror = function () {
10248
+ resolve(true);
10249
+ };
10166
10250
  image.src = item.getAttribute('src');
10167
10251
  });
10168
10252
  imageResolves_1.push(imageLoad);
@@ -11645,7 +11729,6 @@
11645
11729
  var _this = _super.call(this) || this;
11646
11730
  _this.thyPopover = thyPopover;
11647
11731
  _this.overlay = overlay;
11648
- _this.active = false;
11649
11732
  return _this;
11650
11733
  }
11651
11734
  Object.defineProperty(TheTableToolbarItemComponent.prototype, "isOpenTableSelect", {
@@ -11655,17 +11738,12 @@
11655
11738
  enumerable: false,
11656
11739
  configurable: true
11657
11740
  });
11658
- TheTableToolbarItemComponent.prototype.statusChange = function (editor) {
11659
- var _a;
11660
- this.active = (_a = this.item) === null || _a === void 0 ? void 0 : _a.active(editor);
11661
- };
11662
11741
  TheTableToolbarItemComponent.prototype.execute = function (event) {
11663
11742
  var _a;
11664
11743
  _super.prototype.execute.call(this, event);
11665
11744
  if ((_a = this.editor) === null || _a === void 0 ? void 0 : _a.disabled) {
11666
11745
  return;
11667
11746
  }
11668
- var type = this.item.key;
11669
11747
  this.toggleTableSelect(event);
11670
11748
  };
11671
11749
  TheTableToolbarItemComponent.prototype.toggleTableSelect = function (event, optionsParam) {
@@ -11690,23 +11768,19 @@
11690
11768
  return this.tableSelectRef;
11691
11769
  };
11692
11770
  return TheTableToolbarItemComponent;
11693
- }(TheToolbarBaseItemComponent));
11771
+ }(TheBaseToolbarItem));
11694
11772
  TheTableToolbarItemComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheTableToolbarItemComponent, deps: [{ token: i1__namespace$6.ThyPopover }, { token: i2__namespace.Overlay }], target: i0__namespace.ɵɵFactoryTarget.Component });
11695
- TheTableToolbarItemComponent.ɵcmp = i0__namespace.ɵɵ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__namespace, template: "\n <a\n thyIconNavLink\n class=\"link-with-down\"\n [thyTooltip]=\"item?.name\"\n thyTooltipPlacement=\"top\"\n [thyIconNavLinkActive]=\"active\"\n (mousedown)=\"execute($event)\"\n >\n <thy-icon [thyIconName]=\"item.icon\"></thy-icon>\n <thy-icon class=\"link-down-icon font-size-sm text-desc table-down-icon\" thyIconName=\"caret-down\"> </thy-icon>\n </a>\n ", isInline: true, components: [{ type: i3__namespace.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i4__namespace.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }], directives: [{ type: i5__namespace$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }] });
11773
+ TheTableToolbarItemComponent.ɵcmp = i0__namespace.ɵɵ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__namespace, template: "\n <a\n thyIconNavLink\n class=\"link-with-down\"\n [thyTooltip]=\"toolbarItem?.name\"\n thyTooltipPlacement=\"top\"\n [thyIconNavLinkActive]=\"active\"\n (mousedown)=\"execute($event)\"\n >\n <thy-icon [thyIconName]=\"toolbarItem.icon\"></thy-icon>\n <thy-icon class=\"link-down-icon font-size-sm text-desc table-down-icon\" thyIconName=\"caret-down\"> </thy-icon>\n </a>\n ", isInline: true, components: [{ type: i3__namespace$1.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i3__namespace.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }], directives: [{ type: i5__namespace$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }] });
11696
11774
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheTableToolbarItemComponent, decorators: [{
11697
11775
  type: i0.Component,
11698
11776
  args: [{
11699
11777
  selector: 'the-table-toolbar-item',
11700
- template: "\n <a\n thyIconNavLink\n class=\"link-with-down\"\n [thyTooltip]=\"item?.name\"\n thyTooltipPlacement=\"top\"\n [thyIconNavLinkActive]=\"active\"\n (mousedown)=\"execute($event)\"\n >\n <thy-icon [thyIconName]=\"item.icon\"></thy-icon>\n <thy-icon class=\"link-down-icon font-size-sm text-desc table-down-icon\" thyIconName=\"caret-down\"> </thy-icon>\n </a>\n ",
11778
+ template: "\n <a\n thyIconNavLink\n class=\"link-with-down\"\n [thyTooltip]=\"toolbarItem?.name\"\n thyTooltipPlacement=\"top\"\n [thyIconNavLinkActive]=\"active\"\n (mousedown)=\"execute($event)\"\n >\n <thy-icon [thyIconName]=\"toolbarItem.icon\"></thy-icon>\n <thy-icon class=\"link-down-icon font-size-sm text-desc table-down-icon\" thyIconName=\"caret-down\"> </thy-icon>\n </a>\n ",
11701
11779
  host: {
11702
11780
  class: 'the-toolbar-dropdown-container'
11703
11781
  }
11704
11782
  }]
11705
- }], ctorParameters: function () { return [{ type: i1__namespace$6.ThyPopover }, { type: i2__namespace.Overlay }]; }, propDecorators: { item: [{
11706
- type: i0.Input
11707
- }], editor: [{
11708
- type: i0.Input
11709
- }] } });
11783
+ }], ctorParameters: function () { return [{ type: i1__namespace$6.ThyPopover }, { type: i2__namespace.Overlay }]; } });
11710
11784
 
11711
11785
  var _a;
11712
11786
  var withTable = function (editor) {
@@ -12164,7 +12238,7 @@
12164
12238
  return;
12165
12239
  }
12166
12240
  // 过滤 text 节点的 color/background-color 属性
12167
- fragment.forEach(function (node) { return deleteColorAndBackgroundColorOfText(node); });
12241
+ fragment.forEach(function (node) { return filterTextFormat(node); });
12168
12242
  slate.Transforms.insertFragment(editor, fragment);
12169
12243
  return;
12170
12244
  }
@@ -12185,67 +12259,49 @@
12185
12259
  _this.cfr = cfr;
12186
12260
  _this.itemMode = exports.ToolbarItemMode.horizontal;
12187
12261
  _this.ToolbarItemMode = exports.ToolbarItemMode;
12188
- _this.active = false;
12189
- _this.disabled = false;
12190
12262
  return _this;
12191
12263
  }
12192
12264
  TheToolbarItemComponent.prototype.toggleDropdown = function (event) {
12193
12265
  _super.prototype.execute.call(this, event);
12194
12266
  };
12195
- Object.defineProperty(TheToolbarItemComponent.prototype, "disabledState", {
12196
- get: function () {
12197
- return this.disabled;
12198
- },
12199
- enumerable: false,
12200
- configurable: true
12201
- });
12202
12267
  TheToolbarItemComponent.prototype.ngOnInit = function () {
12203
12268
  var _a, _b;
12204
- if (((_a = this.item) === null || _a === void 0 ? void 0 : _a.quickItemComponent) && i1.isComponentType((_b = this.item) === null || _b === void 0 ? void 0 : _b.quickItemComponent)) {
12269
+ if (((_a = this.toolbarItem) === null || _a === void 0 ? void 0 : _a.quickItemComponent) && i1.isComponentType((_b = this.toolbarItem) === null || _b === void 0 ? void 0 : _b.quickItemComponent)) {
12205
12270
  this.renderToolbarItem();
12206
12271
  }
12207
12272
  };
12208
- TheToolbarItemComponent.prototype.statusChange = function (editor) {
12209
- var _a, _b, _c, _d;
12210
- 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;
12211
- 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;
12212
- };
12213
12273
  TheToolbarItemComponent.prototype.execute = function (event) {
12214
12274
  var _a, _b, _c;
12215
12275
  _super.prototype.execute.call(this, event);
12216
- 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)) {
12276
+ 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)) {
12217
12277
  return;
12218
12278
  }
12219
- (_c = this.item) === null || _c === void 0 ? void 0 : _c.execute(this.editor);
12279
+ (_c = this.toolbarItem) === null || _c === void 0 ? void 0 : _c.execute(this.editor);
12220
12280
  };
12221
12281
  TheToolbarItemComponent.prototype.renderToolbarItem = function () {
12222
12282
  var _this = this;
12223
12283
  this.ngZone.run(function () {
12224
- var toolbarItemFactory = _this.cfr.resolveComponentFactory(_this.item.quickItemComponent);
12225
- var tollbarItemRef = _this.toolbarContainer.createComponent(toolbarItemFactory);
12226
- tollbarItemRef.instance.editor = _this.editor;
12227
- tollbarItemRef.instance.item = _this.item;
12228
- tollbarItemRef.instance.itemMode = exports.ToolbarItemMode.vertical;
12284
+ var toolbarItemFactory = _this.cfr.resolveComponentFactory(_this.toolbarItem.quickItemComponent);
12285
+ var toolbarItemRef = _this.toolbarContainer.createComponent(toolbarItemFactory);
12286
+ toolbarItemRef.instance.editor = _this.editor;
12287
+ toolbarItemRef.instance.item = _this.toolbarItem;
12288
+ toolbarItemRef.instance.itemMode = exports.ToolbarItemMode.vertical;
12229
12289
  });
12230
12290
  };
12231
12291
  return TheToolbarItemComponent;
12232
- }(TheToolbarBaseItemComponent));
12292
+ }(TheBaseToolbarItem));
12233
12293
  TheToolbarItemComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheToolbarItemComponent, deps: [{ token: i0__namespace.NgZone }, { token: i0__namespace.ComponentFactoryResolver }], target: i0__namespace.ɵɵFactoryTarget.Component });
12234
- TheToolbarItemComponent.ɵcmp = i0__namespace.ɵɵ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: i0.ViewContainerRef, static: true }], usesInheritance: true, ngImport: i0__namespace, template: "\n <ng-container *ngIf=\"itemMode === ToolbarItemMode.horizontal; else selectionItem\">\n <a\n thyIconNavLink\n [thyIconNavLinkIcon]=\"item.icon\"\n [thyTooltip]=\"tooltip\"\n [thyTooltipTemplateContext]=\"{ name: item.name, shortcutKey: item.shortcutKey }\"\n thyTooltipPlacement=\"top\"\n [thyIconNavLinkActive]=\"active\"\n (mousedown)=\"execute($event)\"\n ></a>\n </ng-container>\n <ng-template #selectionItem>\n <ng-container *ngIf=\"!item?.quickItemComponent\">\n <thy-icon [thyIconName]=\"item?.icon\" [thyIconRotate]=\"0\" class=\"quick-toolbar-icon\"></thy-icon>\n <span class=\"quick-toolbar-name\">{{ item?.name }}</span>\n </ng-container>\n </ng-template>\n <ng-template #tooltip let-data> {{ data.name }} {{ data.shortcutKey }} </ng-template>\n <ng-container #toolbarContainer></ng-container>\n ", isInline: true, components: [{ type: i3__namespace.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i4__namespace.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }], directives: [{ type: i10__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5__namespace$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }] });
12294
+ TheToolbarItemComponent.ɵcmp = i0__namespace.ɵɵ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: i0.ViewContainerRef, static: true }], usesInheritance: true, ngImport: i0__namespace, template: "\n <ng-container *ngIf=\"itemMode === ToolbarItemMode.horizontal; else selectionItem\">\n <a\n thyIconNavLink\n [thyIconNavLinkIcon]=\"toolbarItem.icon\"\n [thyTooltip]=\"tooltip\"\n [thyTooltipTemplateContext]=\"{ name: toolbarItem.name, shortcutKey: toolbarItem.shortcutKey }\"\n thyTooltipPlacement=\"top\"\n [thyIconNavLinkActive]=\"active\"\n (mousedown)=\"execute($event)\"\n ></a>\n </ng-container>\n <ng-template #selectionItem>\n <ng-container *ngIf=\"!toolbarItem?.quickItemComponent\">\n <thy-icon [thyIconName]=\"toolbarItem?.icon\" [thyIconRotate]=\"0\" class=\"quick-toolbar-icon\"></thy-icon>\n <span class=\"quick-toolbar-name\">{{ toolbarItem?.name }}</span>\n </ng-container>\n </ng-template>\n <ng-template #tooltip let-data> {{ data.name }} {{ data.shortcutKey }} </ng-template>\n <ng-container #toolbarContainer></ng-container>\n ", isInline: true, components: [{ type: i3__namespace$1.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i3__namespace.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }], directives: [{ type: i10__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5__namespace$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }] });
12235
12295
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheToolbarItemComponent, decorators: [{
12236
12296
  type: i0.Component,
12237
12297
  args: [{
12238
12298
  selector: 'the-toolbar-item',
12239
- template: "\n <ng-container *ngIf=\"itemMode === ToolbarItemMode.horizontal; else selectionItem\">\n <a\n thyIconNavLink\n [thyIconNavLinkIcon]=\"item.icon\"\n [thyTooltip]=\"tooltip\"\n [thyTooltipTemplateContext]=\"{ name: item.name, shortcutKey: item.shortcutKey }\"\n thyTooltipPlacement=\"top\"\n [thyIconNavLinkActive]=\"active\"\n (mousedown)=\"execute($event)\"\n ></a>\n </ng-container>\n <ng-template #selectionItem>\n <ng-container *ngIf=\"!item?.quickItemComponent\">\n <thy-icon [thyIconName]=\"item?.icon\" [thyIconRotate]=\"0\" class=\"quick-toolbar-icon\"></thy-icon>\n <span class=\"quick-toolbar-name\">{{ item?.name }}</span>\n </ng-container>\n </ng-template>\n <ng-template #tooltip let-data> {{ data.name }} {{ data.shortcutKey }} </ng-template>\n <ng-container #toolbarContainer></ng-container>\n ",
12299
+ template: "\n <ng-container *ngIf=\"itemMode === ToolbarItemMode.horizontal; else selectionItem\">\n <a\n thyIconNavLink\n [thyIconNavLinkIcon]=\"toolbarItem.icon\"\n [thyTooltip]=\"tooltip\"\n [thyTooltipTemplateContext]=\"{ name: toolbarItem.name, shortcutKey: toolbarItem.shortcutKey }\"\n thyTooltipPlacement=\"top\"\n [thyIconNavLinkActive]=\"active\"\n (mousedown)=\"execute($event)\"\n ></a>\n </ng-container>\n <ng-template #selectionItem>\n <ng-container *ngIf=\"!toolbarItem?.quickItemComponent\">\n <thy-icon [thyIconName]=\"toolbarItem?.icon\" [thyIconRotate]=\"0\" class=\"quick-toolbar-icon\"></thy-icon>\n <span class=\"quick-toolbar-name\">{{ toolbarItem?.name }}</span>\n </ng-container>\n </ng-template>\n <ng-template #tooltip let-data> {{ data.name }} {{ data.shortcutKey }} </ng-template>\n <ng-container #toolbarContainer></ng-container>\n ",
12240
12300
  host: {
12241
12301
  class: 'the-toolbar-item'
12242
12302
  }
12243
12303
  }]
12244
- }], ctorParameters: function () { return [{ type: i0__namespace.NgZone }, { type: i0__namespace.ComponentFactoryResolver }]; }, propDecorators: { editor: [{
12245
- type: i0.Input
12246
- }], item: [{
12247
- type: i0.Input
12248
- }], itemMode: [{
12304
+ }], ctorParameters: function () { return [{ type: i0__namespace.NgZone }, { type: i0__namespace.ComponentFactoryResolver }]; }, propDecorators: { itemMode: [{
12249
12305
  type: i0.Input
12250
12306
  }], toolbarContainer: [{
12251
12307
  type: i0.ViewChild,
@@ -12253,9 +12309,6 @@
12253
12309
  }], toggleDropdown: [{
12254
12310
  type: i0.HostListener,
12255
12311
  args: ['mousedown', ['$event']]
12256
- }], disabledState: [{
12257
- type: i0.HostBinding,
12258
- args: ['class.disabled']
12259
12312
  }] } });
12260
12313
 
12261
12314
  var TheQuickToolbarComponent = /** @class */ (function (_super) {
@@ -12309,7 +12362,7 @@
12309
12362
  return TheQuickToolbarComponent;
12310
12363
  }(core.mixinUnsubscribe(core.MixinBase)));
12311
12364
  TheQuickToolbarComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheQuickToolbarComponent, deps: [{ token: i0__namespace.ElementRef }, { token: i0__namespace.ChangeDetectorRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
12312
- TheQuickToolbarComponent.ɵcmp = i0__namespace.ɵɵ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__namespace, 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__namespace$7.ThySelectionListComponent, selector: "thy-selection-list,[thy-selection-list]", inputs: ["thyMultiple", "thyBindKeyEventContainer", "thyScrollContainer", "thyBeforeKeydown", "thyUniqueKey", "thyCompareWith", "thyLayout", "thyAutoActiveFirstItem", "thySize", "thySpaceKeyEnabled"], outputs: ["thySelectionChange"] }, { type: i5__namespace$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__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i10__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
12365
+ TheQuickToolbarComponent.ɵcmp = i0__namespace.ɵɵ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__namespace, 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__namespace$7.ThySelectionListComponent, selector: "thy-selection-list,[thy-selection-list]", inputs: ["thyMultiple", "thyBindKeyEventContainer", "thyScrollContainer", "thyBeforeKeydown", "thyUniqueKey", "thyCompareWith", "thyLayout", "thyAutoActiveFirstItem", "thySize", "thySpaceKeyEnabled"], outputs: ["thySelectionChange"] }, { type: i5__namespace$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__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i10__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
12313
12366
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheQuickToolbarComponent, decorators: [{
12314
12367
  type: i0.Component,
12315
12368
  args: [{
@@ -12549,123 +12602,11 @@
12549
12602
  execute: function (editor) { return InlineCodeEditor.toggleInlineCode(editor); },
12550
12603
  active: function (editor) { return InlineCodeEditor.isInlineCodeActive(editor); }
12551
12604
  }
12552
- ]
12553
- });
12554
-
12555
- var TheIndentToolbarComponent = /** @class */ (function (_super) {
12556
- __extends(TheIndentToolbarComponent, _super);
12557
- function TheIndentToolbarComponent(elementRef, thyPopover, viewContainerRef, overlay) {
12558
- var _this = _super.call(this) || this;
12559
- _this.elementRef = elementRef;
12560
- _this.thyPopover = thyPopover;
12561
- _this.viewContainerRef = viewContainerRef;
12562
- _this.overlay = overlay;
12563
- _this.mode = exports.DropdownMode.text;
12564
- _this.dropdownMode = exports.DropdownMode;
12565
- _this.disabled = false;
12566
- return _this;
12605
+ ],
12606
+ options: {
12607
+ disabledOperateTypes: [exports.ElementKinds.image, exports.ElementKinds.code]
12567
12608
  }
12568
- Object.defineProperty(TheIndentToolbarComponent.prototype, "isOpen", {
12569
- get: function () {
12570
- return this.dropdownPopoverRef && this.dropdownPopoverRef.getOverlayRef() && this.dropdownPopoverRef.getOverlayRef().hasAttached();
12571
- },
12572
- enumerable: false,
12573
- configurable: true
12574
- });
12575
- TheIndentToolbarComponent.prototype.toggleDropdown = function (event) {
12576
- var _a;
12577
- _super.prototype.execute.call(this, event);
12578
- if (((_a = this.editor) === null || _a === void 0 ? void 0 : _a.disabled) || this.disabled) {
12579
- return;
12580
- }
12581
- this.openDropdownPopover();
12582
- };
12583
- TheIndentToolbarComponent.prototype.handleDocumentMouseDown = function (event) {
12584
- if (!this.elementRef.nativeElement.contains(event.target)) {
12585
- this.closeDropdownPopover();
12586
- }
12587
- };
12588
- Object.defineProperty(TheIndentToolbarComponent.prototype, "disabledState", {
12589
- get: function () {
12590
- return this.disabled;
12591
- },
12592
- enumerable: false,
12593
- configurable: true
12594
- });
12595
- TheIndentToolbarComponent.prototype.ngOnInit = function () {
12596
- var _a;
12597
- if (!this.activeMenu) {
12598
- this.activeMenu = this.menus[0];
12599
- }
12600
- if (this.toolbarItem) {
12601
- this.elementRef.nativeElement.classList.add("" + ((_a = this.toolbarItem) === null || _a === void 0 ? void 0 : _a.key));
12602
- }
12603
- };
12604
- TheIndentToolbarComponent.prototype.statusChange = function (editor) {
12605
- var _a, _b;
12606
- 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;
12607
- };
12608
- TheIndentToolbarComponent.prototype.itemMousedown = function (event, item) {
12609
- _super.prototype.execute.call(this, event);
12610
- this.closeDropdownPopover();
12611
- if (item === null || item === void 0 ? void 0 : item.execute) {
12612
- item === null || item === void 0 ? void 0 : item.execute(this.editor);
12613
- }
12614
- };
12615
- TheIndentToolbarComponent.prototype.openDropdownPopover = function () {
12616
- var _a;
12617
- this.dropdownPopoverRef = this.thyPopover.open(this.dropdownTemplate, {
12618
- origin: this.elementRef,
12619
- panelClass: ['the-toolbar-dropdown-popover', (_a = this.toolbarItem) === null || _a === void 0 ? void 0 : _a.key],
12620
- placement: 'bottomLeft',
12621
- insideClosable: false,
12622
- backdropClosable: true,
12623
- hasBackdrop: false,
12624
- offset: 10,
12625
- viewContainerRef: this.viewContainerRef,
12626
- scrollStrategy: this.overlay.scrollStrategies.reposition()
12627
- });
12628
- };
12629
- TheIndentToolbarComponent.prototype.closeDropdownPopover = function () {
12630
- var _a;
12631
- if (this.dropdownPopoverRef) {
12632
- (_a = this.dropdownPopoverRef) === null || _a === void 0 ? void 0 : _a.close();
12633
- }
12634
- };
12635
- return TheIndentToolbarComponent;
12636
- }(TheToolbarBaseItemComponent));
12637
- TheIndentToolbarComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheIndentToolbarComponent, deps: [{ token: i0__namespace.ElementRef }, { token: i1__namespace$1.ThyPopover }, { token: i0__namespace.ViewContainerRef }, { token: i2__namespace.Overlay }], target: i0__namespace.ɵɵFactoryTarget.Component });
12638
- TheIndentToolbarComponent.ɵcmp = i0__namespace.ɵɵ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__namespace, 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__namespace.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i4__namespace.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { type: i2__namespace$1.ThyActionMenuComponent, selector: "thy-action-menu", inputs: ["thyTheme", "thyWidth"] }], directives: [{ type: i5__namespace$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { type: i10__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2__namespace$1.ThyActionMenuItemDirective, selector: "[thyActionMenuItem]", inputs: ["thyDisabled", "thyType"] }, { type: i2__namespace$1.ThyActionMenuItemIconDirective, selector: "[thyActionMenuItemIcon]" }, { type: i2__namespace$1.ThyActionMenuItemNameDirective, selector: "[thyActionMenuItemName]" }] });
12639
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheIndentToolbarComponent, decorators: [{
12640
- type: i0.Component,
12641
- args: [{
12642
- selector: 'the-indent-toolbar-item',
12643
- templateUrl: './toolbar-item.component.html',
12644
- host: {
12645
- class: 'the-toolbar-dropdown-container'
12646
- }
12647
- }]
12648
- }], ctorParameters: function () { return [{ type: i0__namespace.ElementRef }, { type: i1__namespace$1.ThyPopover }, { type: i0__namespace.ViewContainerRef }, { type: i2__namespace.Overlay }]; }, propDecorators: { toolbarItem: [{
12649
- type: i0.Input
12650
- }], menus: [{
12651
- type: i0.Input
12652
- }], mode: [{
12653
- type: i0.Input
12654
- }], item: [{
12655
- type: i0.Input
12656
- }], dropdownTemplate: [{
12657
- type: i0.ViewChild,
12658
- args: ['dropdownTemplate', { static: true }]
12659
- }], toggleDropdown: [{
12660
- type: i0.HostListener,
12661
- args: ['mousedown', ['$event']]
12662
- }], handleDocumentMouseDown: [{
12663
- type: i0.HostListener,
12664
- args: ['document: mousedown', ['$event']]
12665
- }], disabledState: [{
12666
- type: i0.HostBinding,
12667
- args: ['class.disabled']
12668
- }] } });
12609
+ });
12669
12610
 
12670
12611
  var IndentEditor = {
12671
12612
  getAllowedTypes: function (editor) {
@@ -12734,14 +12675,6 @@
12734
12675
  return true;
12735
12676
  }
12736
12677
  return false;
12737
- },
12738
- isDisabled: function (editor) {
12739
- if (editor.selection) {
12740
- var allowedTypes = IndentEditor.getAllowedTypes(editor);
12741
- var anchorBlock$1 = anchorBlock(editor);
12742
- return anchorBlock$1 && !allowedTypes.includes(anchorBlock$1 === null || anchorBlock$1 === void 0 ? void 0 : anchorBlock$1.type);
12743
- }
12744
- return false;
12745
12678
  }
12746
12679
  };
12747
12680
 
@@ -12815,8 +12748,10 @@
12815
12748
  {
12816
12749
  key: exports.ElementKinds.indent,
12817
12750
  includes: [exports.Indents.indentRight, exports.Indents.indentLeft],
12818
- iconComponent: TheIndentToolbarComponent,
12819
- disable: function (editor) { return IndentEditor.isDisabled(editor); }
12751
+ type: exports.ToolbarItemType.dropdown,
12752
+ dropdownMode: exports.DropdownMode.icon,
12753
+ dropdownItemKey: exports.Indents.indentRight,
12754
+ dropdownFixedIcon: true
12820
12755
  },
12821
12756
  {
12822
12757
  key: exports.Indents.indentRight,
@@ -12830,7 +12765,6 @@
12830
12765
  name: '减少缩进',
12831
12766
  icon: 'float-right',
12832
12767
  shortcutKey: 'Shift+Tab/BackSpace',
12833
- type: exports.ToolbarItemType.toolDropdown,
12834
12768
  execute: function (editor) { return IndentEditor.cancelIndent(editor); }
12835
12769
  }
12836
12770
  ],
@@ -12842,7 +12776,8 @@
12842
12776
  exports.ElementKinds.bulletedList,
12843
12777
  exports.ElementKinds.paragraph
12844
12778
  ], __read(HEADING_TYPES)),
12845
- disableIndentTypes: [exports.ElementKinds.bulletedList, exports.ElementKinds.numberedList, exports.ElementKinds.checkItem]
12779
+ disableIndentTypes: [exports.ElementKinds.bulletedList, exports.ElementKinds.numberedList, exports.ElementKinds.checkItem],
12780
+ disabledOperateTypes: [exports.ElementKinds.image, exports.ElementKinds.code]
12846
12781
  }
12847
12782
  });
12848
12783
 
@@ -12908,14 +12843,6 @@
12908
12843
  }
12909
12844
  }
12910
12845
  return false;
12911
- },
12912
- isDisabled: function (editor) {
12913
- if (editor.selection) {
12914
- var disableGroup = HEADING_TYPES;
12915
- var anchorBlock$1 = anchorBlock(editor);
12916
- return anchorBlock$1 && disableGroup.includes(anchorBlock$1 === null || anchorBlock$1 === void 0 ? void 0 : anchorBlock$1.type);
12917
- }
12918
- return false;
12919
12846
  }
12920
12847
  };
12921
12848
  var sizeOptions = function () {
@@ -12934,12 +12861,14 @@
12934
12861
  {
12935
12862
  key: exports.MarkTypes.fontSize,
12936
12863
  name: '字号',
12937
- type: exports.ToolbarItemType.toolDropdown,
12864
+ type: exports.ToolbarItemType.dropdown,
12938
12865
  dropdownItemKey: exports.FontSizes.fontSize14,
12939
- includes: FontSizeTypes,
12940
- disable: function (editor) { return FontSizeEditor.isDisabled(editor); }
12866
+ includes: FontSizeTypes
12941
12867
  }
12942
- ], __read(sizeOptions()))
12868
+ ], __read(sizeOptions())),
12869
+ options: {
12870
+ disabledOperateTypes: __spreadArray(__spreadArray([], __read(HEADING_TYPES)), [exports.ElementKinds.image, exports.ElementKinds.code])
12871
+ }
12943
12872
  });
12944
12873
 
12945
12874
  var TheVerticalToolbarItemComponent = /** @class */ (function (_super) {
@@ -12950,7 +12879,6 @@
12950
12879
  _this.thyPopover = thyPopover;
12951
12880
  _this.viewContainerRef = viewContainerRef;
12952
12881
  _this.isHide = true;
12953
- _this.active = false;
12954
12882
  return _this;
12955
12883
  }
12956
12884
  Object.defineProperty(TheVerticalToolbarItemComponent.prototype, "isOpened", {
@@ -12966,11 +12894,6 @@
12966
12894
  }
12967
12895
  };
12968
12896
  TheVerticalToolbarItemComponent.prototype.ngOnInit = function () { };
12969
- TheVerticalToolbarItemComponent.prototype.statusChange = function (editor) {
12970
- var _a, _b;
12971
- 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;
12972
- this.activeMenu = this.menusActive(editor);
12973
- };
12974
12897
  TheVerticalToolbarItemComponent.prototype.menusActive = function (editor) {
12975
12898
  var _this = this;
12976
12899
  return this.menus.find(function (i) {
@@ -13015,9 +12938,9 @@
13015
12938
  }
13016
12939
  };
13017
12940
  return TheVerticalToolbarItemComponent;
13018
- }(TheToolbarBaseItemComponent));
12941
+ }(TheBaseToolbarDropdown));
13019
12942
  TheVerticalToolbarItemComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheVerticalToolbarItemComponent, deps: [{ token: i0__namespace.ElementRef }, { token: i1__namespace$6.ThyPopover }, { token: i0__namespace.ViewContainerRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
13020
- TheVerticalToolbarItemComponent.ɵcmp = i0__namespace.ɵɵ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: i0.TemplateRef, static: true }], usesInheritance: true, ngImport: i0__namespace, 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__namespace.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i4__namespace.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { type: i2__namespace$1.ThyActionMenuComponent, selector: "thy-action-menu", inputs: ["thyTheme", "thyWidth"] }], directives: [{ type: i5__namespace$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { type: i10__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2__namespace$1.ThyActionMenuItemDirective, selector: "[thyActionMenuItem]", inputs: ["thyDisabled", "thyType"] }, { type: i2__namespace$1.ThyActionMenuItemActiveDirective, selector: "[thyActionMenuItemActive]", inputs: ["thyActionMenuItemActive"] }, { type: i10__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2__namespace$1.ThyActionMenuItemIconDirective, selector: "[thyActionMenuItemIcon]" }, { type: i2__namespace$1.ThyActionMenuItemNameDirective, selector: "[thyActionMenuItemName]" }] });
12943
+ TheVerticalToolbarItemComponent.ɵcmp = i0__namespace.ɵɵ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: i0.TemplateRef, static: true }], usesInheritance: true, ngImport: i0__namespace, 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__namespace$1.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i3__namespace.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { type: i2__namespace$1.ThyActionMenuComponent, selector: "thy-action-menu", inputs: ["thyTheme", "thyWidth"] }], directives: [{ type: i5__namespace$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { type: i10__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2__namespace$1.ThyActionMenuItemDirective, selector: "[thyActionMenuItem]", inputs: ["thyDisabled", "thyType"] }, { type: i2__namespace$1.ThyActionMenuItemActiveDirective, selector: "[thyActionMenuItemActive]", inputs: ["thyActionMenuItemActive"] }, { type: i10__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2__namespace$1.ThyActionMenuItemIconDirective, selector: "[thyActionMenuItemIcon]" }, { type: i2__namespace$1.ThyActionMenuItemNameDirective, selector: "[thyActionMenuItemName]" }] });
13021
12944
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheVerticalToolbarItemComponent, decorators: [{
13022
12945
  type: i0.Component,
13023
12946
  args: [{
@@ -13028,15 +12951,7 @@
13028
12951
  '[class.hide]': '!active'
13029
12952
  }
13030
12953
  }]
13031
- }], ctorParameters: function () { return [{ type: i0__namespace.ElementRef }, { type: i1__namespace$6.ThyPopover }, { type: i0__namespace.ViewContainerRef }]; }, propDecorators: { item: [{
13032
- type: i0.Input
13033
- }], menus: [{
13034
- type: i0.Input
13035
- }], editor: [{
13036
- type: i0.Input
13037
- }], toolbarItem: [{
13038
- type: i0.Input
13039
- }], template: [{
12954
+ }], ctorParameters: function () { return [{ type: i0__namespace.ElementRef }, { type: i1__namespace$6.ThyPopover }, { type: i0__namespace.ViewContainerRef }]; }, propDecorators: { template: [{
13040
12955
  type: i0.ViewChild,
13041
12956
  args: ['VerticalAlignItems', { read: i0.TemplateRef, static: true }]
13042
12957
  }], handleDocumentMouseDown: [{
@@ -13064,7 +12979,7 @@
13064
12979
  {
13065
12980
  key: exports.ToolbarActionTypes.verticalAlign,
13066
12981
  name: '垂直对齐',
13067
- type: exports.ToolbarItemType.toolDropdown,
12982
+ type: exports.ToolbarItemType.dropdown,
13068
12983
  dropdownMode: exports.DropdownMode.icon,
13069
12984
  iconComponent: TheVerticalToolbarItemComponent,
13070
12985
  includes: [exports.ToolbarActionTypes.verticalAlignTop, exports.ToolbarActionTypes.verticalAlignMiddle, exports.ToolbarActionTypes.verticalAlignBottom],
@@ -13272,7 +13187,6 @@
13272
13187
  function TheColorToolbarItemComponent(thyPopover) {
13273
13188
  var _this = _super.call(this) || this;
13274
13189
  _this.thyPopover = thyPopover;
13275
- _this.active = false;
13276
13190
  return _this;
13277
13191
  }
13278
13192
  Object.defineProperty(TheColorToolbarItemComponent.prototype, "isOpenColorSelect", {
@@ -13282,17 +13196,13 @@
13282
13196
  enumerable: false,
13283
13197
  configurable: true
13284
13198
  });
13285
- TheColorToolbarItemComponent.prototype.statusChange = function (editor) {
13286
- var _a;
13287
- this.active = (_a = this.item) === null || _a === void 0 ? void 0 : _a.active(editor);
13288
- };
13289
13199
  TheColorToolbarItemComponent.prototype.execute = function (event) {
13290
13200
  var _a;
13291
13201
  _super.prototype.execute.call(this, event);
13292
- if ((_a = this.editor) === null || _a === void 0 ? void 0 : _a.disabled) {
13202
+ if (((_a = this.editor) === null || _a === void 0 ? void 0 : _a.disabled) || this.disabled) {
13293
13203
  return;
13294
13204
  }
13295
- var type = this.item.key;
13205
+ var type = this.toolbarItem.key;
13296
13206
  this.toggleColorSelect(event, type);
13297
13207
  };
13298
13208
  TheColorToolbarItemComponent.prototype.toggleColorSelect = function (event, type) {
@@ -13332,23 +13242,19 @@
13332
13242
  }
13333
13243
  };
13334
13244
  return TheColorToolbarItemComponent;
13335
- }(TheToolbarBaseItemComponent));
13245
+ }(TheBaseToolbarItem));
13336
13246
  TheColorToolbarItemComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheColorToolbarItemComponent, deps: [{ token: i1__namespace$1.ThyPopover }], target: i0__namespace.ɵɵFactoryTarget.Component });
13337
- TheColorToolbarItemComponent.ɵcmp = i0__namespace.ɵɵ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__namespace, template: "\n <a\n class=\"link-width-down\"\n thyIconNavLink\n [ngStyle]=\"{\n width: item.key === 'color' ? '42px' : 'auto'\n }\"\n [thyTooltip]=\"item.name\"\n [thyIconNavLinkActive]=\"active\"\n thyTooltipPlacement=\"top\"\n (mousedown)=\"execute($event)\"\n >\n <thy-icon [thyIconName]=\"item.icon\" thyIconType=\"twotone\" [thyTwotoneColor]=\"active\"></thy-icon>\n <thy-icon\n [ngClass]=\"{\n 'link-down-icon': true,\n 'font-size-sm': true,\n 'text-desc': true\n }\"\n thyIconName=\"caret-down\"\n ></thy-icon>\n </a>\n ", isInline: true, components: [{ type: i3__namespace.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i4__namespace.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }], directives: [{ type: i10__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i5__namespace$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { type: i10__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
13247
+ TheColorToolbarItemComponent.ɵcmp = i0__namespace.ɵɵ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__namespace, template: "\n <a\n class=\"link-width-down\"\n thyIconNavLink\n [ngStyle]=\"{\n width: toolbarItem.key === 'color' ? '42px' : 'auto'\n }\"\n [thyTooltip]=\"toolbarItem.name\"\n [thyIconNavLinkActive]=\"active\"\n thyTooltipPlacement=\"top\"\n (mousedown)=\"execute($event)\"\n >\n <thy-icon [thyIconName]=\"toolbarItem.icon\" thyIconType=\"twotone\" [thyTwotoneColor]=\"active\"></thy-icon>\n <thy-icon\n [ngClass]=\"{\n 'link-down-icon': true,\n 'font-size-sm': true,\n 'text-desc': true\n }\"\n thyIconName=\"caret-down\"\n ></thy-icon>\n </a>\n ", isInline: true, components: [{ type: i3__namespace$1.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i3__namespace.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }], directives: [{ type: i10__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i5__namespace$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { type: i10__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
13338
13248
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheColorToolbarItemComponent, decorators: [{
13339
13249
  type: i0.Component,
13340
13250
  args: [{
13341
13251
  selector: 'the-color-toolbar-item',
13342
- template: "\n <a\n class=\"link-width-down\"\n thyIconNavLink\n [ngStyle]=\"{\n width: item.key === 'color' ? '42px' : 'auto'\n }\"\n [thyTooltip]=\"item.name\"\n [thyIconNavLinkActive]=\"active\"\n thyTooltipPlacement=\"top\"\n (mousedown)=\"execute($event)\"\n >\n <thy-icon [thyIconName]=\"item.icon\" thyIconType=\"twotone\" [thyTwotoneColor]=\"active\"></thy-icon>\n <thy-icon\n [ngClass]=\"{\n 'link-down-icon': true,\n 'font-size-sm': true,\n 'text-desc': true\n }\"\n thyIconName=\"caret-down\"\n ></thy-icon>\n </a>\n ",
13252
+ template: "\n <a\n class=\"link-width-down\"\n thyIconNavLink\n [ngStyle]=\"{\n width: toolbarItem.key === 'color' ? '42px' : 'auto'\n }\"\n [thyTooltip]=\"toolbarItem.name\"\n [thyIconNavLinkActive]=\"active\"\n thyTooltipPlacement=\"top\"\n (mousedown)=\"execute($event)\"\n >\n <thy-icon [thyIconName]=\"toolbarItem.icon\" thyIconType=\"twotone\" [thyTwotoneColor]=\"active\"></thy-icon>\n <thy-icon\n [ngClass]=\"{\n 'link-down-icon': true,\n 'font-size-sm': true,\n 'text-desc': true\n }\"\n thyIconName=\"caret-down\"\n ></thy-icon>\n </a>\n ",
13343
13253
  host: {
13344
13254
  class: 'the-toolbar-item'
13345
13255
  }
13346
13256
  }]
13347
- }], ctorParameters: function () { return [{ type: i1__namespace$1.ThyPopover }]; }, propDecorators: { item: [{
13348
- type: i0.Input
13349
- }], editor: [{
13350
- type: i0.Input
13351
- }] } });
13257
+ }], ctorParameters: function () { return [{ type: i1__namespace$1.ThyPopover }]; } });
13352
13258
 
13353
13259
  var createColorPlugin = createPluginFactory({
13354
13260
  key: exports.PluginKeys.color,
@@ -13367,7 +13273,10 @@
13367
13273
  iconComponent: TheColorToolbarItemComponent,
13368
13274
  active: function (editor) { return ColorEditor.getActiveColor(editor, exports.MarkTypes.backgroundColor); }
13369
13275
  }
13370
- ]
13276
+ ],
13277
+ options: {
13278
+ disabledOperateTypes: [exports.ElementKinds.image, exports.ElementKinds.code]
13279
+ }
13371
13280
  });
13372
13281
 
13373
13282
  var internalPlugins = function () { return [
@@ -13449,7 +13358,7 @@
13449
13358
  TheToolbarComponent.prototype.ngOnInit = function () {
13450
13359
  this.setToolbarClass();
13451
13360
  this.renderToolbarView();
13452
- this.statusChange(this.editor);
13361
+ this.selectionChange(this.editor);
13453
13362
  if (this.isMore) {
13454
13363
  this.resizeElement();
13455
13364
  }
@@ -13466,9 +13375,9 @@
13466
13375
  }
13467
13376
  };
13468
13377
  TheToolbarComponent.prototype.setToolbarClass = function () {
13469
- var _d;
13378
+ var _a;
13470
13379
  if (this.editor && !!this.containerClass.length) {
13471
- (_d = this.elementRef.nativeElement.classList).add.apply(_d, __spreadArray([], __read(this.containerClass)));
13380
+ (_a = this.elementRef.nativeElement.classList).add.apply(_a, __spreadArray([], __read(this.containerClass)));
13472
13381
  }
13473
13382
  };
13474
13383
  TheToolbarComponent.prototype.resizeElement = function () {
@@ -13476,7 +13385,7 @@
13476
13385
  var editableElement = this.elementRef.nativeElement;
13477
13386
  // @ts-ignore
13478
13387
  this.resizeObserver = new ResizeObserver(function (entries) {
13479
- var e_1, _d;
13388
+ var e_1, _a;
13480
13389
  try {
13481
13390
  for (var entries_1 = __values(entries), entries_1_1 = entries_1.next(); !entries_1_1.done; entries_1_1 = entries_1.next()) {
13482
13391
  var entry = entries_1_1.value;
@@ -13490,23 +13399,23 @@
13490
13399
  catch (e_1_1) { e_1 = { error: e_1_1 }; }
13491
13400
  finally {
13492
13401
  try {
13493
- if (entries_1_1 && !entries_1_1.done && (_d = entries_1.return)) _d.call(entries_1);
13402
+ if (entries_1_1 && !entries_1_1.done && (_a = entries_1.return)) _a.call(entries_1);
13494
13403
  }
13495
13404
  finally { if (e_1) throw e_1.error; }
13496
13405
  }
13497
13406
  });
13498
13407
  this.resizeObserver.observe(editableElement);
13499
13408
  };
13500
- TheToolbarComponent.prototype.statusChange = function (editor) {
13501
- var e_2, _d;
13409
+ TheToolbarComponent.prototype.selectionChange = function (editor) {
13410
+ var e_2, _a;
13502
13411
  var toolbarItems = __spreadArray(__spreadArray([], __read(this.toolbarItems)), [this.moreGroupMenu]);
13503
13412
  try {
13504
13413
  for (var toolbarItems_1 = __values(toolbarItems), toolbarItems_1_1 = toolbarItems_1.next(); !toolbarItems_1_1.done; toolbarItems_1_1 = toolbarItems_1.next()) {
13505
13414
  var item = toolbarItems_1_1.value;
13506
13415
  if (item.key !== exports.ToolbarActionTypes.split) {
13507
13416
  var itemComponent = this.components.get(item.key);
13508
- if (itemComponent) {
13509
- itemComponent.instance.statusChange(editor);
13417
+ if (itemComponent && itemComponent.instance.selectionChange) {
13418
+ itemComponent.instance.selectionChange(editor);
13510
13419
  }
13511
13420
  }
13512
13421
  }
@@ -13514,7 +13423,7 @@
13514
13423
  catch (e_2_1) { e_2 = { error: e_2_1 }; }
13515
13424
  finally {
13516
13425
  try {
13517
- if (toolbarItems_1_1 && !toolbarItems_1_1.done && (_d = toolbarItems_1.return)) _d.call(toolbarItems_1);
13426
+ if (toolbarItems_1_1 && !toolbarItems_1_1.done && (_a = toolbarItems_1.return)) _a.call(toolbarItems_1);
13518
13427
  }
13519
13428
  finally { if (e_2) throw e_2.error; }
13520
13429
  }
@@ -13526,7 +13435,7 @@
13526
13435
  var toolbarItems = this.toolbarItemsCompose();
13527
13436
  var items = toolbarItems.items, group = toolbarItems.group;
13528
13437
  this.ngZone.run(function () {
13529
- var e_3, _d;
13438
+ var e_3, _a;
13530
13439
  try {
13531
13440
  for (var items_1 = __values(items), items_1_1 = items_1.next(); !items_1_1.done; items_1_1 = items_1.next()) {
13532
13441
  var item = items_1_1.value;
@@ -13540,7 +13449,7 @@
13540
13449
  catch (e_3_1) { e_3 = { error: e_3_1 }; }
13541
13450
  finally {
13542
13451
  try {
13543
- if (items_1_1 && !items_1_1.done && (_d = items_1.return)) _d.call(items_1);
13452
+ if (items_1_1 && !items_1_1.done && (_a = items_1.return)) _a.call(items_1);
13544
13453
  }
13545
13454
  finally { if (e_3) throw e_3.error; }
13546
13455
  }
@@ -13564,7 +13473,7 @@
13564
13473
  * set aside 50px
13565
13474
  */
13566
13475
  TheToolbarComponent.prototype.toolbarItemsCompose = function () {
13567
- var e_4, _d;
13476
+ var e_4, _a;
13568
13477
  var elementWidth = this.isMore ? this.elementWidth : null;
13569
13478
  var maxItemWidth = 50;
13570
13479
  var defaultItemWidth = 35;
@@ -13574,8 +13483,8 @@
13574
13483
  var items = [];
13575
13484
  var group = [];
13576
13485
  try {
13577
- for (var _e = __values(this.toolbarItems), _f = _e.next(); !_f.done; _f = _e.next()) {
13578
- var item = _f.value;
13486
+ for (var _b = __values(this.toolbarItems), _c = _b.next(); !_c.done; _c = _b.next()) {
13487
+ var item = _c.value;
13579
13488
  if (!this.isMore) {
13580
13489
  items.push(item);
13581
13490
  continue;
@@ -13597,14 +13506,14 @@
13597
13506
  elementWidth -= headingWidth;
13598
13507
  continue;
13599
13508
  }
13600
- var isCustomComponent = (item === null || item === void 0 ? void 0 : item.type) === exports.ToolbarItemType.toolDropdown || !!(item === null || item === void 0 ? void 0 : item.iconComponent);
13509
+ var isCustomComponent = (item === null || item === void 0 ? void 0 : item.type) === exports.ToolbarItemType.dropdown || !!(item === null || item === void 0 ? void 0 : item.iconComponent);
13601
13510
  elementWidth -= isCustomComponent ? maxItemWidth : defaultItemWidth;
13602
13511
  }
13603
13512
  }
13604
13513
  catch (e_4_1) { e_4 = { error: e_4_1 }; }
13605
13514
  finally {
13606
13515
  try {
13607
- if (_f && !_f.done && (_d = _e.return)) _d.call(_e);
13516
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
13608
13517
  }
13609
13518
  finally { if (e_4) throw e_4.error; }
13610
13519
  }
@@ -13617,12 +13526,12 @@
13617
13526
  * externally designated more group
13618
13527
  */
13619
13528
  TheToolbarComponent.prototype.toolbarItemsAndMoreCompose = function () {
13620
- var e_5, _d;
13529
+ var e_5, _a;
13621
13530
  var items = [];
13622
13531
  var group = [];
13623
13532
  try {
13624
- for (var _e = __values(this.toolbarItems), _f = _e.next(); !_f.done; _f = _e.next()) {
13625
- var item = _f.value;
13533
+ for (var _b = __values(this.toolbarItems), _c = _b.next(); !_c.done; _c = _b.next()) {
13534
+ var item = _c.value;
13626
13535
  if (item.key === exports.ToolbarActionTypes.split) {
13627
13536
  items.push(item);
13628
13537
  continue;
@@ -13633,7 +13542,7 @@
13633
13542
  catch (e_5_1) { e_5 = { error: e_5_1 }; }
13634
13543
  finally {
13635
13544
  try {
13636
- if (_f && !_f.done && (_d = _e.return)) _d.call(_e);
13545
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
13637
13546
  }
13638
13547
  finally { if (e_5) throw e_5.error; }
13639
13548
  }
@@ -13662,15 +13571,17 @@
13662
13571
  TheToolbarComponent.prototype.createToolbarItem = function (item) {
13663
13572
  var iconComponent = item.iconComponent, type = item.type, dropdownMode = item.dropdownMode, dropdownItemKey = item.dropdownItemKey, includes = item.includes, args = __rest(item, ["iconComponent", "type", "dropdownMode", "dropdownItemKey", "includes"]);
13664
13573
  var viewComponent = this.viewComponentType(type);
13665
- var dropdownItem = this.getDropdownItem(item);
13666
13574
  var factory = this.cfr.resolveComponentFactory(iconComponent ? iconComponent : viewComponent);
13667
13575
  var compRef = this.toolbarContainer.createComponent(factory);
13668
13576
  compRef.instance.editor = this.editor;
13669
13577
  compRef.instance.toolbarItem = item;
13670
- compRef.instance.menus = includes;
13671
- compRef.instance.item = includes && dropdownItem ? dropdownItem : args;
13672
- compRef.instance.mode = dropdownMode;
13673
13578
  this.components.set(item.key, compRef);
13579
+ if (item.type === exports.ToolbarItemType.dropdown) {
13580
+ var dropdownRef = compRef;
13581
+ dropdownRef.instance.dropdownItemKey = item.dropdownItemKey;
13582
+ dropdownRef.instance.menus = includes;
13583
+ dropdownRef.instance.mode = dropdownMode;
13584
+ }
13674
13585
  };
13675
13586
  TheToolbarComponent.prototype.createToolbarSplit = function () {
13676
13587
  var navSplitLineFactory = this.cfr.resolveComponentFactory(NavSplitLineComponent);
@@ -13690,26 +13601,15 @@
13690
13601
  if (type === exports.ToolbarItemType.default) {
13691
13602
  return TheToolbarItemComponent;
13692
13603
  }
13693
- if (type === exports.ToolbarItemType.toolDropdown) {
13604
+ if (type === exports.ToolbarItemType.dropdown) {
13694
13605
  return TheToolbarDropdownComponent;
13695
13606
  }
13696
13607
  return TheToolbarItemComponent;
13697
13608
  };
13698
- TheToolbarComponent.prototype.getDropdownItem = function (item) {
13699
- var _a, _b, _c;
13700
- var dropdownKey = item === null || item === void 0 ? void 0 : item.dropdownItemKey;
13701
- // modify the fontsize option externally
13702
- var contextService = (_b = (_a = this.editor) === null || _a === void 0 ? void 0 : _a.injector) === null || _b === void 0 ? void 0 : _b.get(TheContextService);
13703
- var fontSize = contextService === null || contextService === void 0 ? void 0 : contextService.getDefaultFontSize();
13704
- if (contextService && item.key === exports.MarkTypes.fontSize && fontSize) {
13705
- dropdownKey = fontSize;
13706
- }
13707
- return (_c = item === null || item === void 0 ? void 0 : item.includes) === null || _c === void 0 ? void 0 : _c.find(function (item) { return item.key === dropdownKey; });
13708
- };
13709
13609
  return TheToolbarComponent;
13710
13610
  }());
13711
13611
  TheToolbarComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheToolbarComponent, deps: [{ token: i0__namespace.ComponentFactoryResolver }, { token: i0__namespace.ChangeDetectorRef }, { token: i0__namespace.ElementRef }, { token: i0__namespace.NgZone }, { token: TheToolbarGroupToken }], target: i0__namespace.ɵɵFactoryTarget.Component });
13712
- TheToolbarComponent.ɵcmp = i0__namespace.ɵɵ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: i0.ViewContainerRef, static: true }], usesOnChanges: true, ngImport: i0__namespace, 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__namespace.ThyIconNavComponent, selector: "thy-icon-nav", inputs: ["thyType"] }], directives: [{ type: i10__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i10__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }] });
13612
+ TheToolbarComponent.ɵcmp = i0__namespace.ɵɵ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: i0.ViewContainerRef, static: true }], usesOnChanges: true, ngImport: i0__namespace, 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__namespace$1.ThyIconNavComponent, selector: "thy-icon-nav", inputs: ["thyType"] }], directives: [{ type: i10__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i10__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }] });
13713
13613
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheToolbarComponent, decorators: [{
13714
13614
  type: i0.Component,
13715
13615
  args: [{
@@ -13765,7 +13665,7 @@
13765
13665
  .subscribe(function () {
13766
13666
  var _a;
13767
13667
  _this.updateInlineToolbar();
13768
- (_a = _this.inlineToolbar) === null || _a === void 0 ? void 0 : _a.statusChange(_this.editor);
13668
+ (_a = _this.inlineToolbar) === null || _a === void 0 ? void 0 : _a.selectionChange(_this.editor);
13769
13669
  _this.cdr.detectChanges();
13770
13670
  });
13771
13671
  });
@@ -13939,7 +13839,7 @@
13939
13839
  return TheQuickInsertComponent;
13940
13840
  }());
13941
13841
  TheQuickInsertComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheQuickInsertComponent, deps: [{ token: i0__namespace.Renderer2 }, { token: i0__namespace.ElementRef }, { token: i0__namespace.ChangeDetectorRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
13942
- TheQuickInsertComponent.ɵcmp = i0__namespace.ɵɵ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: i0.ElementRef }], ngImport: i0__namespace, 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__namespace.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }] });
13842
+ TheQuickInsertComponent.ɵcmp = i0__namespace.ɵɵ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: i0.ElementRef }], ngImport: i0__namespace, 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__namespace.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }] });
13943
13843
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheQuickInsertComponent, decorators: [{
13944
13844
  type: i0.Component,
13945
13845
  args: [{
@@ -14302,7 +14202,7 @@
14302
14202
  TheEditorComponent.prototype.valueChange = function (value) {
14303
14203
  var _a, _b, _c, _d, _e, _f;
14304
14204
  var isEditable = !((_a = this.theOptions) === null || _a === void 0 ? void 0 : _a.readonly) && !((_b = this.theOptions) === null || _b === void 0 ? void 0 : _b.disabled);
14305
- (_c = this.theGlobalToolbarInstance) === null || _c === void 0 ? void 0 : _c.statusChange(this.editor);
14205
+ (_c = this.theGlobalToolbarInstance) === null || _c === void 0 ? void 0 : _c.selectionChange(this.editor);
14306
14206
  // quick insert button
14307
14207
  if (isEditable) {
14308
14208
  (_d = this.quickInsertInstance) === null || _d === void 0 ? void 0 : _d.checkStatus();
@@ -14438,11 +14338,11 @@
14438
14338
  TheContextService,
14439
14339
  TheColorSelectService,
14440
14340
  {
14441
- provide: i4$1.NG_VALUE_ACCESSOR,
14341
+ provide: i4.NG_VALUE_ACCESSOR,
14442
14342
  useExisting: i0.forwardRef(function () { return TheEditorComponent; }),
14443
14343
  multi: true
14444
14344
  }
14445
- ], 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__namespace, 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__namespace.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__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i10__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i10__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i4__namespace$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4__namespace$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
14345
+ ], 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__namespace, 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__namespace.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__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i10__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i10__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i4__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4__namespace.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
14446
14346
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheEditorComponent, decorators: [{
14447
14347
  type: i0.Component,
14448
14348
  args: [{
@@ -14452,7 +14352,7 @@
14452
14352
  TheContextService,
14453
14353
  TheColorSelectService,
14454
14354
  {
14455
- provide: i4$1.NG_VALUE_ACCESSOR,
14355
+ provide: i4.NG_VALUE_ACCESSOR,
14456
14356
  useExisting: i0.forwardRef(function () { return TheEditorComponent; }),
14457
14357
  multi: true
14458
14358
  }
@@ -14538,7 +14438,7 @@
14538
14438
  },
14539
14439
  set: function (i) {
14540
14440
  this._item = i;
14541
- this.activeMenu = i;
14441
+ this.activeMenuItem = i;
14542
14442
  },
14543
14443
  enumerable: false,
14544
14444
  configurable: true
@@ -14573,9 +14473,9 @@
14573
14473
  this.openGroup(event);
14574
14474
  }
14575
14475
  };
14576
- TheToolbarGroupComponent.prototype.statusChange = function (editor) {
14476
+ TheToolbarGroupComponent.prototype.selectionChange = function (editor) {
14577
14477
  var activeItem = this.menusActive(editor);
14578
- this.activeMenu = activeItem ? activeItem : null;
14478
+ this.activeMenuItem = activeItem ? activeItem : null;
14579
14479
  this.activeChange();
14580
14480
  this.colseGroup();
14581
14481
  };
@@ -14620,7 +14520,7 @@
14620
14520
  return TheToolbarGroupComponent;
14621
14521
  }());
14622
14522
  TheToolbarGroupComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheToolbarGroupComponent, deps: [{ token: i0__namespace.ElementRef }, { token: i1__namespace$1.ThyPopover }, { token: i0__namespace.ViewContainerRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
14623
- TheToolbarGroupComponent.ɵcmp = i0__namespace.ɵɵ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: i0.TemplateRef, static: true }], ngImport: i0__namespace, 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__namespace.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: TheToolbarComponent, selector: "the-toolbar", inputs: ["editor", "toolbarItems", "align", "containerClass", "isMore", "afterTemplate"] }], directives: [{ type: i5__namespace$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }] });
14523
+ TheToolbarGroupComponent.ɵcmp = i0__namespace.ɵɵ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: i0.TemplateRef, static: true }], ngImport: i0__namespace, 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__namespace$1.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: TheToolbarComponent, selector: "the-toolbar", inputs: ["editor", "toolbarItems", "align", "containerClass", "isMore", "afterTemplate"] }], directives: [{ type: i5__namespace$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }] });
14624
14524
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheToolbarGroupComponent, decorators: [{
14625
14525
  type: i0.Component,
14626
14526
  args: [{
@@ -14646,9 +14546,9 @@
14646
14546
  }] } });
14647
14547
 
14648
14548
  var TETHYS = [
14649
- i4.ThyIconModule,
14549
+ i3.ThyIconModule,
14650
14550
  avatar.ThyAvatarModule,
14651
- i3.ThyNavModule,
14551
+ i3$1.ThyNavModule,
14652
14552
  i2$2.ThyFormModule,
14653
14553
  i5$3.ThySharedModule,
14654
14554
  i1$7.ThyListModule,
@@ -14683,7 +14583,6 @@
14683
14583
  TheTableToolbarItemComponent,
14684
14584
  TheConversionHintComponent,
14685
14585
  TheVerticalToolbarItemComponent,
14686
- TheIndentToolbarComponent,
14687
14586
  TheTableOptionsComponent
14688
14587
  ];
14689
14588
  var PLUGIN_COMPONENTS = [
@@ -14730,7 +14629,6 @@
14730
14629
  TheTableToolbarItemComponent,
14731
14630
  TheConversionHintComponent,
14732
14631
  TheVerticalToolbarItemComponent,
14733
- TheIndentToolbarComponent,
14734
14632
  TheTableOptionsComponent, TheImageComponent,
14735
14633
  TheTemplateComponent,
14736
14634
  TheHrComponent,
@@ -14747,9 +14645,9 @@
14747
14645
  TheTableComponent,
14748
14646
  TheTableRowComponent,
14749
14647
  TheTdComponent,
14750
- TheInlineCodeComponent], imports: [i10.CommonModule, i1.SlateModule, i4$1.FormsModule, i4.ThyIconModule,
14648
+ TheInlineCodeComponent], imports: [i10.CommonModule, i1.SlateModule, i4.FormsModule, i3.ThyIconModule,
14751
14649
  avatar.ThyAvatarModule,
14752
- i3.ThyNavModule,
14650
+ i3$1.ThyNavModule,
14753
14651
  i2$2.ThyFormModule,
14754
14652
  i5$3.ThySharedModule,
14755
14653
  i1$7.ThyListModule,
@@ -14770,12 +14668,12 @@
14770
14668
  useValue: TheToolbarGroupComponent
14771
14669
  },
14772
14670
  THE_MODE_PROVIDER
14773
- ], imports: [__spreadArray(__spreadArray([i10.CommonModule, i1.SlateModule, i4$1.FormsModule], __read(TETHYS)), [i8.CodemirrorModule, TheColumnSizeModule])] });
14671
+ ], imports: [__spreadArray(__spreadArray([i10.CommonModule, i1.SlateModule, i4.FormsModule], __read(TETHYS)), [i8.CodemirrorModule, TheColumnSizeModule])] });
14774
14672
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheEditorModule, decorators: [{
14775
14673
  type: i0.NgModule,
14776
14674
  args: [{
14777
14675
  declarations: __spreadArray(__spreadArray(__spreadArray([TheEditorComponent], __read(PIPES)), __read(COMPONENTS)), __read(PLUGIN_COMPONENTS)),
14778
- imports: __spreadArray(__spreadArray([i10.CommonModule, i1.SlateModule, i4$1.FormsModule], __read(TETHYS)), [i8.CodemirrorModule, TheColumnSizeModule]),
14676
+ imports: __spreadArray(__spreadArray([i10.CommonModule, i1.SlateModule, i4.FormsModule], __read(TETHYS)), [i8.CodemirrorModule, TheColumnSizeModule]),
14779
14677
  exports: [TheEditorComponent, TheToolbarComponent, TheToolbarDropdownComponent, TheToolbarItemComponent, TheDefaultElementComponent],
14780
14678
  entryComponents: __spreadArray(__spreadArray([], __read(COMPONENTS)), __read(PLUGIN_COMPONENTS)),
14781
14679
  providers: [
@@ -14896,16 +14794,16 @@
14896
14794
  exports.THE_UPLOAD_SERVICE_TOKEN = THE_UPLOAD_SERVICE_TOKEN;
14897
14795
  exports.TableEditor = TableEditor;
14898
14796
  exports.TheBaseElementComponent = TheBaseElementComponent;
14797
+ exports.TheBaseToolbarDropdown = TheBaseToolbarDropdown;
14798
+ exports.TheBaseToolbarItem = TheBaseToolbarItem;
14899
14799
  exports.TheContextService = TheContextService;
14900
14800
  exports.TheDefaultElementComponent = TheDefaultElementComponent;
14901
14801
  exports.TheEditor = TheEditor;
14902
14802
  exports.TheEditorComponent = TheEditorComponent;
14903
14803
  exports.TheEditorModule = TheEditorModule;
14904
14804
  exports.TheImageComponent = TheImageComponent;
14905
- exports.TheIndentToolbarComponent = TheIndentToolbarComponent;
14906
14805
  exports.TheModeConfig = TheModeConfig;
14907
14806
  exports.TheQueries = index$1;
14908
- exports.TheToolbarBaseItemComponent = TheToolbarBaseItemComponent;
14909
14807
  exports.TheToolbarComponent = TheToolbarComponent;
14910
14808
  exports.TheToolbarDropdownComponent = TheToolbarDropdownComponent;
14911
14809
  exports.TheToolbarGroupComponent = TheToolbarGroupComponent;
@@ -14928,9 +14826,9 @@
14928
14826
  exports.createVerticalAlignPlugin = createVerticalAlignPlugin;
14929
14827
  exports.dataDeserialize = dataDeserialize;
14930
14828
  exports.dataSerializing = dataSerializing;
14931
- exports.deleteColorAndBackgroundColorOfText = deleteColorAndBackgroundColorOfText;
14932
14829
  exports.deleteElementKey = deleteElementKey;
14933
14830
  exports.extractFragment = extractFragment;
14831
+ exports.filterTextFormat = filterTextFormat;
14934
14832
  exports.flattenDeepPlugins = flattenDeepPlugins;
14935
14833
  exports.getColsTotalWidth = getColsTotalWidth;
14936
14834
  exports.getEditorUUID = getEditorUUID;