@worktile/theia 1.2.9 → 1.2.10

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 (73) hide show
  1. package/bundles/worktile-theia.umd.js +731 -133
  2. package/bundles/worktile-theia.umd.js.map +1 -1
  3. package/components/inline-toolbar/inline-toolbar.component.d.ts +24 -0
  4. package/components/inline-toolbar/inline-toolbar.component.scss +18 -0
  5. package/components/nav-split-line/nav-split-line.component.d.ts +6 -1
  6. package/components/toolbar-dropdown/toolbar-dropdown.component.scss +3 -0
  7. package/components/toolbar-item/toolbar-item.component.d.ts +14 -5
  8. package/constants/node-types.d.ts +0 -1
  9. package/constants/toolbar.d.ts +6 -2
  10. package/custom-types.d.ts +1 -0
  11. package/editor.component.d.ts +6 -4
  12. package/editor.module.d.ts +59 -52
  13. package/esm2015/components/color-select/color-select.component.js +3 -2
  14. package/esm2015/components/inline-toolbar/inline-toolbar.component.js +123 -0
  15. package/esm2015/components/nav-split-line/nav-split-line.component.js +26 -5
  16. package/esm2015/components/toolbar-base-item/toolbar-base-item.component.js +3 -2
  17. package/esm2015/components/toolbar-item/toolbar-item.component.js +70 -24
  18. package/esm2015/constants/node-types.js +1 -2
  19. package/esm2015/constants/toolbar.js +37 -5
  20. package/esm2015/custom-types.js +1 -1
  21. package/esm2015/editor.component.js +24 -19
  22. package/esm2015/editor.module.js +15 -6
  23. package/esm2015/interfaces/toolbar.js +1 -1
  24. package/esm2015/plugins/deserializers/deserialize-html.plugin.js +8 -1
  25. package/esm2015/plugins/image/image.plugin.js +1 -2
  26. package/esm2015/plugins/index.js +8 -4
  27. package/esm2015/plugins/link/link.plugin.js +7 -2
  28. package/esm2015/plugins/list/list.plugin.js +7 -7
  29. package/esm2015/plugins/list/queries/get-start-list-item.js +9 -2
  30. package/esm2015/plugins/list/queries/is-selection-in-same-list-item.js +17 -0
  31. package/esm2015/plugins/paint-format/options.js +54 -0
  32. package/esm2015/plugins/paint-format/paint-format.editor.js +67 -0
  33. package/esm2015/plugins/placeholder/placeholder.component.js +75 -0
  34. package/esm2015/plugins/public-api.js +2 -1
  35. package/esm2015/plugins/quick-insert/components/quick-insert.component.js +76 -0
  36. package/esm2015/plugins/quick-insert/components/quick-toolbar/quick-toolbar.component.js +75 -0
  37. package/esm2015/plugins/quick-insert/quick-insert.editor.js +61 -0
  38. package/esm2015/plugins/quick-insert/quick-insert.plugint.js +37 -0
  39. package/esm2015/plugins/table/components/row/row.component.js +3 -1
  40. package/esm2015/plugins/table/components/table.component.js +6 -3
  41. package/esm2015/plugins/table/components/td/td.component.js +2 -1
  42. package/esm2015/plugins/table/components/toolbar/table-toolbar.component.js +1 -1
  43. package/esm2015/public-api.js +2 -1
  44. package/esm2015/services/context.service.js +2 -2
  45. package/esm2015/services/toolbar.service.js +5 -5
  46. package/esm2015/utils/auto-focus.js +2 -2
  47. package/esm2015/utils/is-clean-empty-paragraph.js +32 -0
  48. package/esm2015/utils/weak-maps.js +2 -1
  49. package/fesm2015/worktile-theia.js +726 -136
  50. package/fesm2015/worktile-theia.js.map +1 -1
  51. package/interfaces/toolbar.d.ts +3 -2
  52. package/package.json +1 -1
  53. package/plugins/list/queries/get-start-list-item.d.ts +8 -2
  54. package/plugins/list/queries/is-selection-in-same-list-item.d.ts +5 -0
  55. package/plugins/paint-format/options.d.ts +2 -0
  56. package/plugins/paint-format/paint-format.editor.d.ts +7 -0
  57. package/{components → plugins}/placeholder/placeholder.component.d.ts +5 -6
  58. package/{components → plugins}/placeholder/placeholder.component.scss +0 -0
  59. package/plugins/public-api.d.ts +1 -0
  60. package/plugins/quick-insert/components/quick-insert.component.d.ts +25 -0
  61. package/plugins/quick-insert/components/quick-insert.component.scss +21 -0
  62. package/plugins/quick-insert/components/quick-toolbar/quick-toolbar.component.d.ts +29 -0
  63. package/plugins/quick-insert/components/quick-toolbar/quick-toolbar.component.scss +21 -0
  64. package/plugins/quick-insert/quick-insert.editor.d.ts +8 -0
  65. package/plugins/quick-insert/quick-insert.plugint.d.ts +2 -0
  66. package/plugins/table/components/table.component.d.ts +1 -0
  67. package/public-api.d.ts +1 -0
  68. package/services/toolbar.service.d.ts +1 -1
  69. package/styles/editor.scss +31 -9
  70. package/styles/index.scss +5 -2
  71. package/utils/is-clean-empty-paragraph.d.ts +8 -0
  72. package/utils/weak-maps.d.ts +1 -0
  73. package/esm2015/components/placeholder/placeholder.component.js +0 -88
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
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('lodash'), require('marked'), require('@atinc/selene'), require('ngx-tethys/popover'), require('@angular/cdk/overlay'), require('ngx-tethys/alert'), require('rxjs/operators'), require('ngx-tethys/uploader'), require('@angular/platform-browser'), require('rxjs'), require('ngx-tethys/progress'), require('ngx-tethys/icon'), require('ngx-tethys/input'), require('ngx-tethys/nav'), require('ngx-tethys/tooltip'), require('ng-codemirror'), require('ngx-tethys/notify'), require('ngx-tethys/action-menu'), require('is-url'), require('ngx-tethys/button'), require('ngx-tethys/form'), require('ngx-tethys/shared'), require('ngx-tethys'), require('@angular/cdk/coercion'), require('@angular/cdk/portal'), require('ngx-tethys/autocomplete'), require('ngx-tethys/avatar'), require('ngx-tethys/list'), require('ngx-tethys/select')) :
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', 'lodash', 'marked', '@atinc/selene', 'ngx-tethys/popover', '@angular/cdk/overlay', 'ngx-tethys/alert', 'rxjs/operators', 'ngx-tethys/uploader', '@angular/platform-browser', 'rxjs', 'ngx-tethys/progress', 'ngx-tethys/icon', 'ngx-tethys/input', 'ngx-tethys/nav', 'ngx-tethys/tooltip', 'ng-codemirror', 'ngx-tethys/notify', 'ngx-tethys/action-menu', 'is-url', 'ngx-tethys/button', 'ngx-tethys/form', 'ngx-tethys/shared', 'ngx-tethys', '@angular/cdk/coercion', '@angular/cdk/portal', 'ngx-tethys/autocomplete', 'ngx-tethys/avatar', 'ngx-tethys/list', '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._lodash, global.marked, global.selene, global.i1$2, global.ng.cdk.overlay, global.i1$1, global.rxjs.operators, global.uploader, global.ng.platformBrowser, global.rxjs, global.i4, global.i4$1, global.i5, global.i2$1, global.i7, global.i5$2, global.i1$4, global.i5$1, global.isUrl, global.i1$5, global.i2$2, global.i5$3, global.i1$6, global.ng.cdk.coercion, global.ng.cdk.portal, global.autocomplete, global.avatar, global.list, global.select));
5
- })(this, (function (exports, i0, i6, i4$2, i1, core, isHotkey, slate, slateHistory, _lodash, marked, selene, i1$2, i2, i1$1, operators, uploader, i1$3, rxjs, i4, i4$1, i5, i2$1, i7, i5$2, i1$4, i5$1, isUrl, i1$5, i2$2, i5$3, i1$6, coercion, portal, autocomplete, avatar, list, select) { 'use strict';
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('lodash'), require('marked'), require('@atinc/selene'), require('ngx-tethys/popover'), require('@angular/cdk/overlay'), require('ngx-tethys/alert'), require('rxjs/operators'), require('ngx-tethys/uploader'), require('@angular/platform-browser'), require('rxjs'), require('ngx-tethys/progress'), require('ngx-tethys/icon'), require('ngx-tethys/input'), require('ngx-tethys/nav'), require('ngx-tethys/tooltip'), require('ng-codemirror'), require('ngx-tethys/notify'), require('ngx-tethys/action-menu'), require('is-url'), require('ngx-tethys/button'), require('ngx-tethys/form'), require('ngx-tethys/shared'), require('ngx-tethys'), 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
+ 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', 'lodash', 'marked', '@atinc/selene', 'ngx-tethys/popover', '@angular/cdk/overlay', 'ngx-tethys/alert', 'rxjs/operators', 'ngx-tethys/uploader', '@angular/platform-browser', 'rxjs', 'ngx-tethys/progress', 'ngx-tethys/icon', 'ngx-tethys/input', 'ngx-tethys/nav', 'ngx-tethys/tooltip', 'ng-codemirror', 'ngx-tethys/notify', 'ngx-tethys/action-menu', 'is-url', 'ngx-tethys/button', 'ngx-tethys/form', 'ngx-tethys/shared', 'ngx-tethys', '@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._lodash, global.marked, global.selene, global.i1$2, global.ng.cdk.overlay, global.i1$1, global.rxjs.operators, global.uploader, global.ng.platformBrowser, global.rxjs, global.i4, global.i4$1, global.i5, global.i2$1, global.i7, global.i5$2, global.i1$4, global.i5$1, global.isUrl, global.i1$5, global.i2$2, global.i5$3, global.i1$6, global.ng.cdk.coercion, global.ng.cdk.portal, global.i2$3, global.autocomplete, global.avatar, global.select));
5
+ })(this, (function (exports, i0, i6, i4$2, i1, core, isHotkey, slate, slateHistory, _lodash, marked, selene, i1$2, i2, i1$1, operators, uploader, i1$3, rxjs, i4, i4$1, i5, i2$1, i7, i5$2, i1$4, i5$1, isUrl, i1$5, i2$2, i5$3, i1$6, coercion, portal, i2$3, 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
 
@@ -48,6 +48,7 @@
48
48
  var i2__namespace$2 = /*#__PURE__*/_interopNamespace(i2$2);
49
49
  var i5__namespace$3 = /*#__PURE__*/_interopNamespace(i5$3);
50
50
  var i1__namespace$6 = /*#__PURE__*/_interopNamespace(i1$6);
51
+ var i2__namespace$3 = /*#__PURE__*/_interopNamespace(i2$3);
51
52
 
52
53
  /*! *****************************************************************************
53
54
  Copyright (c) Microsoft Corporation.
@@ -433,7 +434,6 @@
433
434
  exports.ToolbarActionTypes = void 0;
434
435
  (function (ToolbarActionTypes) {
435
436
  ToolbarActionTypes["split"] = "split";
436
- ToolbarActionTypes["save"] = "save";
437
437
  ToolbarActionTypes["undo"] = "undo";
438
438
  ToolbarActionTypes["redo"] = "redo";
439
439
  ToolbarActionTypes["paintformat"] = "paintformat";
@@ -475,12 +475,17 @@
475
475
  var BLOCK_DELETEBACKWARD_TYPES = [exports.ElementKinds.tableCell];
476
476
 
477
477
  var TheToolbarGroupToken = new i0.InjectionToken('the-toolbar-group-token');
478
- var BLOCK_TOOLBAR_HOTKEY = '/';
478
+ var QUICK_TOOLBAR_HOTKEY = '/';
479
479
  exports.DropdownMode = void 0;
480
480
  (function (DropdownMode) {
481
481
  DropdownMode["icon"] = "icon-mode";
482
482
  DropdownMode["text"] = "text-mode";
483
483
  })(exports.DropdownMode || (exports.DropdownMode = {}));
484
+ exports.ToolbarItemMode = void 0;
485
+ (function (ToolbarItemMode) {
486
+ ToolbarItemMode[ToolbarItemMode["horizontal"] = 0] = "horizontal";
487
+ ToolbarItemMode[ToolbarItemMode["vertical"] = 1] = "vertical";
488
+ })(exports.ToolbarItemMode || (exports.ToolbarItemMode = {}));
484
489
  var DefaultGlobalToolbarDefinition = [
485
490
  exports.ElementKinds.headingList,
486
491
  exports.ToolbarActionTypes.split,
@@ -505,8 +510,34 @@
505
510
  exports.ElementKinds.blockquote,
506
511
  exports.ElementKinds.code
507
512
  ];
508
- var DefaultInlineToolbarDefinition = [];
509
- var DefaultBlockToolbarDefinition = [exports.ElementKinds.image];
513
+ var DefaultInlineToolbarDefinition = [
514
+ exports.ToolbarActionTypes.clean,
515
+ exports.ToolbarActionTypes.split,
516
+ exports.MarkTypes.bold,
517
+ exports.MarkTypes.italic,
518
+ exports.MarkTypes.underline,
519
+ exports.MarkTypes.strike,
520
+ exports.MarkTypes.codeLine,
521
+ exports.MarkTypes.color,
522
+ exports.MarkTypes.backgroundColor,
523
+ exports.ToolbarActionTypes.split,
524
+ exports.ToolbarActionTypes.alignType,
525
+ exports.ToolbarActionTypes.split,
526
+ exports.ElementKinds.link
527
+ ];
528
+ var DefaultQuickToolbarDefinition = __spreadArray(__spreadArray([], __read(STANDARD_HEADING_TYPES)), [
529
+ exports.ToolbarActionTypes.split,
530
+ exports.ElementKinds.numberedList,
531
+ exports.ElementKinds.bulletedList,
532
+ exports.ElementKinds.checkItem,
533
+ exports.ToolbarActionTypes.split,
534
+ exports.ElementKinds.link,
535
+ exports.ElementKinds.image,
536
+ exports.ElementKinds.table,
537
+ exports.ElementKinds.blockquote,
538
+ exports.ElementKinds.hr,
539
+ exports.ElementKinds.code
540
+ ]);
510
541
  var ToolbarMoreGroup = {
511
542
  key: 'more',
512
543
  icon: 'more'
@@ -1836,6 +1867,7 @@
1836
1867
 
1837
1868
  var THE_EDITOR_UUID = new WeakMap();
1838
1869
  var THE_EDITOR_CONVERSION_HINT_REF = new WeakMap();
1870
+ var THE_EDITOR_QUICK_TOOLBAR_REF = new WeakMap();
1839
1871
 
1840
1872
  var closeConversionHint = function (editor) {
1841
1873
  var hintRef = THE_EDITOR_CONVERSION_HINT_REF.get(editor);
@@ -2622,7 +2654,7 @@
2622
2654
  };
2623
2655
  TheContextService.prototype.getOptions = function () {
2624
2656
  if (!this.options.width) {
2625
- this.options.width = this.options.nativeElement.querySelector('.slate-editable-container').offsetWidth - 30;
2657
+ this.options.width = this.options.nativeElement.querySelector('.slate-editable-container').firstElementChild.offsetWidth;
2626
2658
  }
2627
2659
  return this.options;
2628
2660
  };
@@ -2923,7 +2955,6 @@
2923
2955
  };
2924
2956
  editor.insertData = function (data) {
2925
2957
  var e_1, _a;
2926
- // TODO:: 底层有点问题,粘贴多张图片时只能识别一张
2927
2958
  if (data.files.length) {
2928
2959
  var imageFiles = [];
2929
2960
  try {
@@ -3063,13 +3094,19 @@
3063
3094
  return [exports.ElementKinds.bulletedList, exports.ElementKinds.numberedList];
3064
3095
  };
3065
3096
 
3097
+ /**
3098
+ * 获取 List 中 ListItems,过滤掉空列表嵌套
3099
+ * @param node
3100
+ * @param initialValue
3101
+ * @returns
3102
+ */
3066
3103
  var getStartListItem = function (node, initialValue) {
3067
3104
  if (!initialValue) {
3068
3105
  initialValue = [];
3069
3106
  }
3070
3107
  if (node) {
3071
3108
  return node.reduce(function (result, current) {
3072
- if (current.type == exports.ElementKinds.listItem && current.children[0].type === exports.ElementKinds.default) {
3109
+ if ((current.type === exports.ElementKinds.listItem && !getListTypes().includes(current.children[0].type))) {
3073
3110
  result.push(current);
3074
3111
  }
3075
3112
  else {
@@ -3759,6 +3796,20 @@
3759
3796
  }]
3760
3797
  }], ctorParameters: function () { return [{ type: i0__namespace.ElementRef }, { type: i0__namespace.ChangeDetectorRef }]; } });
3761
3798
 
3799
+ /**
3800
+ * Is the selection in same li
3801
+ */
3802
+ var isSelectionInSameListItem = function (editor) {
3803
+ var selection = editor.selection;
3804
+ if (!selection) {
3805
+ return false;
3806
+ }
3807
+ var _a = __read(slate.Range.edges(selection), 2), start = _a[0], end = _a[1];
3808
+ var startListItemEntry = getAboveByType(editor, exports.ElementKinds.listItem, { at: start.path });
3809
+ var endListItemEntry = getAboveByType(editor, exports.ElementKinds.listItem, { at: end.path });
3810
+ return startListItemEntry && endListItemEntry && slate.Path.equals(startListItemEntry[1], endListItemEntry[1]);
3811
+ };
3812
+
3762
3813
  var withList = function (_a) {
3763
3814
  var _b = _a === void 0 ? {} : _a, validLiChildrenTypes = _b.validLiChildrenTypes;
3764
3815
  return function (editor) {
@@ -3843,15 +3894,14 @@
3843
3894
  var fragmentElement = fragmentData[0];
3844
3895
  if (getListTypes().includes(fragmentElement.type)) {
3845
3896
  var startNodes = getStartListItem([fragmentElement.children[0]]);
3846
- // 复制列表中的图片时startNodes长度为零
3847
- if (startNodes.length === 0) {
3848
- setFragmentData(unit);
3849
- return;
3850
- }
3851
3897
  var children = startNodes.concat(fragmentElement.children.slice(1));
3852
3898
  var fragmentNodes = [
3853
3899
  Object.assign(Object.assign({}, fragmentElement), { children: children })
3854
3900
  ];
3901
+ if (isSelectionInSameListItem(editor)) {
3902
+ // 仅仅复制列表中的内容
3903
+ fragmentNodes = children[0].children;
3904
+ }
3855
3905
  var fragment = fragmentNodes.concat(fragmentData.slice(1));
3856
3906
  var domRange = i1.AngularEditor.toDOMRange(editor, selection);
3857
3907
  var contents = domRange.cloneContents();
@@ -6199,6 +6249,7 @@
6199
6249
  }
6200
6250
  };
6201
6251
  TheColorSelectComponent.prototype._selectColor = function (event, color) {
6252
+ event.preventDefault();
6202
6253
  event.stopPropagation();
6203
6254
  if (this.option.specialColor && color === this.option.specialColor) {
6204
6255
  color = '';
@@ -6230,7 +6281,7 @@
6230
6281
  return TheColorSelectComponent;
6231
6282
  }());
6232
6283
  TheColorSelectComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheColorSelectComponent, deps: [{ token: i1__namespace$3.ThyPopoverRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
6233
- TheColorSelectComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", 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\n thyIconName=\"check\"\n [ngStyle]=\"{ color: row.tickColor }\"\n ></thy-icon>\n </span>\n </span>\n </div>\n </div>\n <div\n *ngIf=\"option.showCustom\"\n class=\"select-color\"\n >\n <span\n class=\"color\"\n [ngStyle]=\"{ background: selectedColor }\"\n ></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$1.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }], directives: [{ type: i6__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i6__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4__namespace$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i5__namespace.ThyInputDirective, selector: "[thyInput]", inputs: ["thySize", "thyAutocomplete"] }, { type: i4__namespace$2.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { type: i4__namespace$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4__namespace$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
6284
+ TheColorSelectComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", 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$1.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }], directives: [{ type: i6__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i6__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4__namespace$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i5__namespace.ThyInputDirective, selector: "[thyInput]", inputs: ["thySize", "thyAutocomplete"] }, { type: i4__namespace$2.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { type: i4__namespace$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4__namespace$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
6234
6285
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheColorSelectComponent, decorators: [{
6235
6286
  type: i0.Component,
6236
6287
  args: [{
@@ -6353,9 +6404,10 @@
6353
6404
  function TheToolbarBaseItemComponent() {
6354
6405
  }
6355
6406
  TheToolbarBaseItemComponent.prototype.execute = function (event) {
6407
+ var _a;
6356
6408
  event.preventDefault();
6357
6409
  event.stopPropagation();
6358
- if (!this.itemMousedownHandle && !this.editor.selection) {
6410
+ if (!this.itemMousedownHandle && !((_a = this.editor) === null || _a === void 0 ? void 0 : _a.selection)) {
6359
6411
  var lastNode = getLastNode(this.editor, 1);
6360
6412
  var end = slate.Editor.end(this.editor, lastNode[1]);
6361
6413
  slate.Transforms.select(this.editor, end);
@@ -7328,6 +7380,7 @@
7328
7380
  editor.insertText = function (text) {
7329
7381
  if (text && isUrl__default["default"](text)) {
7330
7382
  LinkEditor.wrapLink(editor, text, text);
7383
+ slate.Transforms.move(editor, { distance: 1, unit: "offset" });
7331
7384
  }
7332
7385
  else {
7333
7386
  insertText(text);
@@ -7335,8 +7388,10 @@
7335
7388
  };
7336
7389
  editor.insertData = function (data) {
7337
7390
  var text = data.getData('text/plain');
7338
- if (text && isUrl__default["default"](text)) {
7391
+ var fragment = data.getData("application/" + CLIPBOARD_FORMAT_KEY);
7392
+ if (text && isUrl__default["default"](text) && !fragment) {
7339
7393
  LinkEditor.wrapLink(editor, text, text);
7394
+ slate.Transforms.move(editor, { distance: 1, unit: "offset" });
7340
7395
  }
7341
7396
  else {
7342
7397
  insertData(data);
@@ -8226,19 +8281,46 @@
8226
8281
 
8227
8282
  var NavSplitLineComponent = /** @class */ (function () {
8228
8283
  function NavSplitLineComponent() {
8284
+ this.mode = exports.ToolbarItemMode.vertical;
8285
+ this.theNavSplitLine = true;
8229
8286
  }
8287
+ Object.defineProperty(NavSplitLineComponent.prototype, "horizontal", {
8288
+ get: function () {
8289
+ return this.mode === exports.ToolbarItemMode.horizontal;
8290
+ },
8291
+ enumerable: false,
8292
+ configurable: true
8293
+ });
8294
+ Object.defineProperty(NavSplitLineComponent.prototype, "vertical", {
8295
+ get: function () {
8296
+ return this.mode === exports.ToolbarItemMode.vertical;
8297
+ },
8298
+ enumerable: false,
8299
+ configurable: true
8300
+ });
8230
8301
  NavSplitLineComponent.prototype.ngOnInit = function () { };
8231
8302
  return NavSplitLineComponent;
8232
8303
  }());
8233
8304
  NavSplitLineComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: NavSplitLineComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
8234
- NavSplitLineComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: NavSplitLineComponent, selector: "nav-split-line", ngImport: i0__namespace, template: '', isInline: true });
8305
+ NavSplitLineComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: NavSplitLineComponent, selector: "nav-split-line", inputs: { mode: "mode" }, host: { properties: { "class.the-nav-split-line": "this.theNavSplitLine", "class.horizontal": "this.horizontal", "class.vertical": "this.vertical" } }, ngImport: i0__namespace, template: '', isInline: true });
8235
8306
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: NavSplitLineComponent, decorators: [{
8236
8307
  type: i0.Component,
8237
8308
  args: [{
8238
8309
  selector: 'nav-split-line',
8239
8310
  template: ''
8240
8311
  }]
8241
- }], ctorParameters: function () { return []; } });
8312
+ }], ctorParameters: function () { return []; }, propDecorators: { mode: [{
8313
+ type: i0.Input
8314
+ }], theNavSplitLine: [{
8315
+ type: i0.HostBinding,
8316
+ args: ['class.the-nav-split-line']
8317
+ }], horizontal: [{
8318
+ type: i0.HostBinding,
8319
+ args: ['class.horizontal']
8320
+ }], vertical: [{
8321
+ type: i0.HostBinding,
8322
+ args: ['class.vertical']
8323
+ }] } });
8242
8324
 
8243
8325
  var TheTableToolbarComponent = /** @class */ (function () {
8244
8326
  function TheTableToolbarComponent(ngZone, colorSelectService, popoverRef) {
@@ -8361,7 +8443,7 @@
8361
8443
  return TheTableToolbarComponent;
8362
8444
  }());
8363
8445
  TheTableToolbarComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheTableToolbarComponent, deps: [{ token: i0__namespace.NgZone }, { token: TheColorSelectService }, { token: i1__namespace$3.ThyPopoverRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
8364
- TheTableToolbarComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", 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=\"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: i2__namespace.ThyIconNavComponent, selector: "thy-icon-nav", inputs: ["thyType"] }, { type: i2__namespace.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i4__namespace$1.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { type: NavSplitLineComponent, selector: "nav-split-line" }], directives: [{ type: i6__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i7__namespace.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }] });
8446
+ TheTableToolbarComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", 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=\"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: i2__namespace.ThyIconNavComponent, selector: "thy-icon-nav", inputs: ["thyType"] }, { type: i2__namespace.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i4__namespace$1.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { type: NavSplitLineComponent, selector: "nav-split-line", inputs: ["mode"] }], directives: [{ type: i6__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i7__namespace.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }] });
8365
8447
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheTableToolbarComponent, decorators: [{
8366
8448
  type: i0.Component,
8367
8449
  args: [{
@@ -9070,9 +9152,12 @@
9070
9152
  TheTableComponent.prototype.useRowControls = function () {
9071
9153
  if (this.selection) {
9072
9154
  this.rowControls = this.calculateRowControls();
9073
- this.cdr.detectChanges();
9155
+ this.cdr.markForCheck();
9074
9156
  }
9075
9157
  };
9158
+ TheTableComponent.prototype.detectChanges = function () {
9159
+ this.cdr.detectChanges();
9160
+ };
9076
9161
  TheTableComponent.prototype.calculateMinRowSpanCellForRows = function () {
9077
9162
  var table = this.element;
9078
9163
  var cells = table.children.map(function (row, index) {
@@ -9341,7 +9426,7 @@
9341
9426
  provide: TheTableToken,
9342
9427
  useExisting: TheTableComponent
9343
9428
  }
9344
- ], viewQueries: [{ propertyName: "tableWrapper", first: true, predicate: ["tableWrapper"], descendants: true, read: i0.ElementRef, static: true }, { propertyName: "theTableElement", first: true, predicate: ["theTable"], descendants: true, read: i0.ElementRef, static: true }, { propertyName: "tbodyElement", first: true, predicate: ["tbody"], descendants: true, read: i0.ElementRef, static: true }], usesInheritance: true, ngImport: i0__namespace, template: "<div\n class=\"the-table-container\"\n theColumnResize\n [ngClass]=\"{\n 'the-table-with-controls': isInTable,\n 'the-table-selection-hide': tableStore.isCellSelecting || tableStore.isRightClicking\n }\"\n>\n <div class=\"the-table-row-controls-wrapper\" *ngIf=\"!readonly\">\n <div>\n <div\n class=\"the-table-corner-controls\"\n [ngClass]=\"{ active: isSelectedAllCell, dangerous: tableStore.isSelectedTable && tableStore.dangerousCells.length > 0 }\"\n >\n <button type=\"button\" class=\"the-table-corner-button\" (mousedown)=\"onSelectTable($event)\"></button>\n <div class=\"the-table-corner-controls-insert-row-marker\">\n <the-table-insert-mark type=\"row\" [at]=\"0\" [tableStore]=\"tableStore\"></the-table-insert-mark>\n </div>\n <div class=\"the-table-corner-controls-insert-column-marker\">\n <the-table-insert-mark type=\"column\" [at]=\"0\" [tableStore]=\"tableStore\"></the-table-insert-mark>\n </div>\n </div>\n <div class=\"the-table-row-controls\">\n <div class=\"the-table-row-controls-inner\">\n <div\n class=\"the-table-row-controls-button-wrap\"\n *ngFor=\"let control of rowControls; let i = index; trackBy: trackByFnRowCotrols\"\n [ngClass]=\"{\n active: tableStore.selectedRowsIndex.includes(control.rowIndex),\n dangerous: tableStore.dangerousRowsIndex.includes(control.rowIndex) && tableStore.dangerousCells.length > 0\n }\"\n >\n <button\n (mousedown)=\"onRowMouseDown($event, control.rowIndex)\"\n type=\"button\"\n [ngStyle]=\"{ height: control.height + 1 + 'px' }\"\n class=\"the-table-row-controls-button the-table-controls-button\"\n ></button>\n <the-table-insert-mark type=\"row\" [at]=\"control.rowIndex + 1\" [tableStore]=\"tableStore\"></the-table-insert-mark>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"the-table-wrapper\" #tableWrapper>\n <table class=\"the-table\" #theTable [ngClass]=\"{ 'the-table-with-controls': isInTable }\">\n <colgroup *ngIf=\"columns\">\n <col *ngFor=\"let col of columns\" [ngStyle]=\"{ width: col.width + 'px' }\" />\n </colgroup>\n <thead>\n <tr class=\"the-table-col-controls-wrapper\">\n <th\n class=\"the-table-col-controls\"\n (mousedown)=\"onColMouseDown($event, i)\"\n *ngFor=\"let control of colControls; let i = index; trackBy: trackByFnColCotrols\"\n >\n <the-table-insert-mark\n *ngIf=\"isInTable\"\n type=\"column\"\n [at]=\"i + 1\"\n [tableStore]=\"tableStore\"\n ></the-table-insert-mark>\n <div\n class=\"the-table-col-controls-inner\"\n [ngClass]=\"{\n active: tableStore.selectedColumnsIndex.includes(i),\n dangerous: tableStore.dangerousColumnsIndex.includes(i) && tableStore.dangerousCells.length > 0\n }\"\n ></div>\n </th>\n </tr>\n </thead>\n <tbody #tbody>\n <slate-children [children]=\"children\" [context]=\"childrenContext\" [viewContext]=\"viewContext\"> </slate-children>\n </tbody>\n </table>\n </div>\n</div>\n", components: [{ type: TheInsertMarkComponent, selector: "the-table-insert-mark", inputs: ["type", "at", "tableStore"] }, { type: i1__namespace.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }], directives: [{ type: TheColumnResizeDirective, selector: "div[theColumnResize]" }, { type: i6__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
9429
+ ], viewQueries: [{ propertyName: "tableWrapper", first: true, predicate: ["tableWrapper"], descendants: true, read: i0.ElementRef, static: true }, { propertyName: "theTableElement", first: true, predicate: ["theTable"], descendants: true, read: i0.ElementRef, static: true }, { propertyName: "tbodyElement", first: true, predicate: ["tbody"], descendants: true, read: i0.ElementRef, static: true }], usesInheritance: true, ngImport: i0__namespace, template: "<div\n class=\"the-table-container\"\n theColumnResize\n [ngClass]=\"{\n 'the-table-with-controls': isInTable,\n 'the-table-selection-hide': tableStore.isCellSelecting || tableStore.isRightClicking\n }\"\n>\n <div class=\"the-table-row-controls-wrapper\" *ngIf=\"!readonly && isInTable\">\n <div>\n <div\n class=\"the-table-corner-controls\"\n [ngClass]=\"{ active: isSelectedAllCell, dangerous: tableStore.isSelectedTable && tableStore.dangerousCells.length > 0 }\"\n >\n <button type=\"button\" class=\"the-table-corner-button\" (mousedown)=\"onSelectTable($event)\"></button>\n <div class=\"the-table-corner-controls-insert-row-marker\">\n <the-table-insert-mark type=\"row\" [at]=\"0\" [tableStore]=\"tableStore\"></the-table-insert-mark>\n </div>\n <div class=\"the-table-corner-controls-insert-column-marker\">\n <the-table-insert-mark type=\"column\" [at]=\"0\" [tableStore]=\"tableStore\"></the-table-insert-mark>\n </div>\n </div>\n <div class=\"the-table-row-controls\">\n <div class=\"the-table-row-controls-inner\">\n <div\n class=\"the-table-row-controls-button-wrap\"\n *ngFor=\"let control of rowControls; let i = index; trackBy: trackByFnRowCotrols\"\n [ngClass]=\"{\n active: tableStore.selectedRowsIndex.includes(control.rowIndex),\n dangerous: tableStore.dangerousRowsIndex.includes(control.rowIndex) && tableStore.dangerousCells.length > 0\n }\"\n >\n <button\n (mousedown)=\"onRowMouseDown($event, control.rowIndex)\"\n type=\"button\"\n [ngStyle]=\"{ height: control.height + 1 + 'px' }\"\n class=\"the-table-row-controls-button the-table-controls-button\"\n ></button>\n <the-table-insert-mark type=\"row\" [at]=\"control.rowIndex + 1\" [tableStore]=\"tableStore\"></the-table-insert-mark>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"the-table-wrapper\" #tableWrapper>\n <table class=\"the-table\" #theTable [ngClass]=\"{ 'the-table-with-controls': isInTable }\">\n <colgroup *ngIf=\"columns\">\n <col *ngFor=\"let col of columns\" [ngStyle]=\"{ width: col.width + 'px' }\" />\n </colgroup>\n <thead>\n <tr class=\"the-table-col-controls-wrapper\">\n <th\n class=\"the-table-col-controls\"\n (mousedown)=\"onColMouseDown($event, i)\"\n *ngFor=\"let control of colControls; let i = index; trackBy: trackByFnColCotrols\"\n >\n <the-table-insert-mark\n *ngIf=\"isInTable\"\n type=\"column\"\n [at]=\"i + 1\"\n [tableStore]=\"tableStore\"\n ></the-table-insert-mark>\n <div\n class=\"the-table-col-controls-inner\"\n [ngClass]=\"{\n active: tableStore.selectedColumnsIndex.includes(i),\n dangerous: tableStore.dangerousColumnsIndex.includes(i) && tableStore.dangerousCells.length > 0\n }\"\n ></div>\n </th>\n </tr>\n </thead>\n <tbody #tbody>\n <slate-children [children]=\"children\" [context]=\"childrenContext\" [viewContext]=\"viewContext\"> </slate-children>\n </tbody>\n </table>\n </div>\n</div>\n", components: [{ type: TheInsertMarkComponent, selector: "the-table-insert-mark", inputs: ["type", "at", "tableStore"] }, { type: i1__namespace.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }], directives: [{ type: TheColumnResizeDirective, selector: "div[theColumnResize]" }, { type: i6__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
9345
9430
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheTableComponent, decorators: [{
9346
9431
  type: i0.Component,
9347
9432
  args: [{
@@ -9429,11 +9514,13 @@
9429
9514
  _super.prototype.onContextChange.call(this);
9430
9515
  if (this.initialized) {
9431
9516
  this.useBackground();
9517
+ this.useHeight();
9432
9518
  }
9433
9519
  };
9434
9520
  TheTableRowComponent.prototype.ngOnInit = function () {
9435
9521
  _super.prototype.ngOnInit.call(this);
9436
9522
  this.useBackground();
9523
+ this.useHeight();
9437
9524
  };
9438
9525
  TheTableRowComponent.prototype.useBackground = function () {
9439
9526
  if (this.element.header && !this.backgroundColor) {
@@ -10256,6 +10343,7 @@
10256
10343
  this.applyRowSize(deltaSize);
10257
10344
  }
10258
10345
  this.tableComponent.useRowControls();
10346
+ this.tableComponent.detectChanges();
10259
10347
  this.updateOverlayHandleSizeAndOffset();
10260
10348
  };
10261
10349
  TheTdComponent.prototype._createOverlayForHandle = function () {
@@ -10927,6 +11015,11 @@
10927
11015
  if (html && !slateFragment) {
10928
11016
  var htmlDom = new DOMParser().parseFromString(html, 'text/html');
10929
11017
  var fragment = selene.TheiaConverter.convertToTheia(Array.from(htmlDom.body.children));
11018
+ // 无法识别HTML内容时后退一下:识别纯文本
11019
+ if (fragment.length === 1 && slate.Editor.isEmpty(editor, fragment[0]) && fragment[0].type === exports.ElementKinds.paragraph) {
11020
+ insertData(data);
11021
+ return;
11022
+ }
10930
11023
  insertTheElements(editor, fragment);
10931
11024
  return;
10932
11025
  }
@@ -11085,6 +11178,376 @@
11085
11178
  }
11086
11179
  ];
11087
11180
 
11181
+ var PaintFormatEditor = {
11182
+ formatBrush: function (editor) {
11183
+ var e_1, _a;
11184
+ var contextService = editor.injector.get(TheContextService);
11185
+ var obj = {};
11186
+ try {
11187
+ for (var MarkProps_1 = __values(MarkProps), MarkProps_1_1 = MarkProps_1.next(); !MarkProps_1_1.done; MarkProps_1_1 = MarkProps_1.next()) {
11188
+ var key = MarkProps_1_1.value;
11189
+ var k = contextService.paintFormatStatus.marks[key];
11190
+ obj[key] = k || null;
11191
+ }
11192
+ }
11193
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
11194
+ finally {
11195
+ try {
11196
+ if (MarkProps_1_1 && !MarkProps_1_1.done && (_a = MarkProps_1.return)) _a.call(MarkProps_1);
11197
+ }
11198
+ finally { if (e_1) throw e_1.error; }
11199
+ }
11200
+ var block = anchorBlock(editor);
11201
+ if (block && slate.Range.isCollapsed(editor.selection)) {
11202
+ // TODO:: 在撤销时有bug, 临时使用withoutSaving处理
11203
+ slateHistory.HistoryEditor.withoutSaving(editor, function () {
11204
+ var path = TheEditor.findPath(editor, block);
11205
+ setMarks(editor, obj, path);
11206
+ });
11207
+ }
11208
+ else {
11209
+ setMarks(editor, obj);
11210
+ }
11211
+ PaintFormatEditor.cancelFormatBrushStatus(editor);
11212
+ },
11213
+ isActive: function (editor) {
11214
+ var contextService = editor.injector.get(TheContextService);
11215
+ var res = contextService.paintFormatStatus.isActive;
11216
+ return res;
11217
+ },
11218
+ enableFormatBrush: function (editor) {
11219
+ var contextService = editor.injector.get(TheContextService);
11220
+ if (contextService.paintFormatStatus.isActive) {
11221
+ return PaintFormatEditor.cancelFormatBrushStatus(editor);
11222
+ }
11223
+ contextService.paintFormatStatus = {
11224
+ isActive: true,
11225
+ marks: getSelectionMarks(editor)
11226
+ };
11227
+ var element = i1.EDITOR_TO_ELEMENT.get(editor);
11228
+ element.classList.add('pointer-paint');
11229
+ contextService.onMouseUp$
11230
+ .pipe(operators.skip(1), operators.filter(function (event) { return element.contains(event.target); }), operators.take(1))
11231
+ .subscribe(function (event) {
11232
+ if (contextService.paintFormatStatus.isActive) {
11233
+ PaintFormatEditor.formatBrush(editor);
11234
+ }
11235
+ });
11236
+ editor.onChange();
11237
+ },
11238
+ cancelFormatBrushStatus: function (editor) {
11239
+ var contextService = editor.injector.get(TheContextService);
11240
+ contextService.paintFormatStatus = {
11241
+ isActive: false,
11242
+ marks: {}
11243
+ };
11244
+ var element = i1.EDITOR_TO_ELEMENT.get(editor);
11245
+ element.classList.remove('pointer-paint');
11246
+ editor.onChange();
11247
+ }
11248
+ };
11249
+
11250
+ var PaintFormatOptions = [
11251
+ {
11252
+ key: exports.ToolbarActionTypes.undo,
11253
+ icon: 'undo',
11254
+ name: '撤销',
11255
+ execute: function (editor) { return editor.undo(); }
11256
+ },
11257
+ {
11258
+ key: exports.ToolbarActionTypes.redo,
11259
+ icon: 'redo',
11260
+ name: '重做',
11261
+ execute: function (editor) { return editor.redo(); }
11262
+ },
11263
+ {
11264
+ key: exports.ToolbarActionTypes.paintformat,
11265
+ icon: 'paintformat',
11266
+ name: '格式刷',
11267
+ execute: PaintFormatEditor.enableFormatBrush,
11268
+ active: PaintFormatEditor.isActive
11269
+ },
11270
+ {
11271
+ key: exports.ToolbarActionTypes.clean,
11272
+ icon: 'clean',
11273
+ name: '清除格式',
11274
+ execute: function (editor) {
11275
+ var e_1, _a;
11276
+ var selection = editor.selection;
11277
+ if (!selection) {
11278
+ return;
11279
+ }
11280
+ if (TableEditor.clearMark(editor)) {
11281
+ return;
11282
+ }
11283
+ if (slate.Range.isCollapsed(selection)) {
11284
+ var marks = slate.Editor.marks(editor);
11285
+ try {
11286
+ for (var _b = __values(Object.keys(marks)), _c = _b.next(); !_c.done; _c = _b.next()) {
11287
+ var key = _c.value;
11288
+ slate.Editor.removeMark(editor, key);
11289
+ }
11290
+ }
11291
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
11292
+ finally {
11293
+ try {
11294
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
11295
+ }
11296
+ finally { if (e_1) throw e_1.error; }
11297
+ }
11298
+ }
11299
+ else {
11300
+ var unsetMarks_1 = {};
11301
+ MarkProps.forEach(function (key) {
11302
+ unsetMarks_1[key] = null;
11303
+ });
11304
+ setMarks(editor, unsetMarks_1);
11305
+ }
11306
+ }
11307
+ }
11308
+ ];
11309
+
11310
+ /**
11311
+ * whether the current node is a clean paragraph
11312
+ * @param editor
11313
+ * @param text
11314
+ * @returns boolean
11315
+ */
11316
+ var isCleanEmptyParagraph = function (editor) {
11317
+ var isCollapsedCursor = TheEditor.isFocused(editor) && editor.selection && slate.Range.isCollapsed(editor.selection);
11318
+ if (!isCollapsedCursor) {
11319
+ return false;
11320
+ }
11321
+ var block = slate.Node.ancestor(editor, [editor.selection.anchor.path[0]]);
11322
+ var textIndent = 'textIndent';
11323
+ var align = 'align';
11324
+ var hasTextIndent = block[textIndent];
11325
+ var hasAlign = block[align];
11326
+ if (slate.Node.string(block) === '' &&
11327
+ slate.Element.isElement(block) &&
11328
+ block.type === exports.ElementKinds.paragraph &&
11329
+ block.children.length === 1 &&
11330
+ slate.Text.isText(block.children[0]) &&
11331
+ !slate.Editor.isVoid(editor, block) &&
11332
+ !hasTextIndent &&
11333
+ !hasAlign) {
11334
+ return true;
11335
+ }
11336
+ return false;
11337
+ };
11338
+
11339
+ var TheToolbarItemComponent = /** @class */ (function (_super) {
11340
+ __extends(TheToolbarItemComponent, _super);
11341
+ function TheToolbarItemComponent(ngZone, cfr) {
11342
+ var _this = _super.call(this) || this;
11343
+ _this.ngZone = ngZone;
11344
+ _this.cfr = cfr;
11345
+ _this.itemMode = exports.ToolbarItemMode.horizontal;
11346
+ _this.ToolbarItemMode = exports.ToolbarItemMode;
11347
+ _this.active = false;
11348
+ return _this;
11349
+ }
11350
+ TheToolbarItemComponent.prototype.ngOnInit = function () {
11351
+ var _a, _b;
11352
+ 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)) {
11353
+ this.renderToolbarItem();
11354
+ }
11355
+ };
11356
+ TheToolbarItemComponent.prototype.statusChange = function (editor) {
11357
+ var _a, _b;
11358
+ this.active = ((_a = this.item) === null || _a === void 0 ? void 0 : _a.active) ? (_b = this.item) === null || _b === void 0 ? void 0 : _b.active(editor) : false;
11359
+ };
11360
+ TheToolbarItemComponent.prototype.execute = function (event) {
11361
+ var _a, _b, _c;
11362
+ _super.prototype.execute.call(this, event);
11363
+ if (!((_a = this.item) === null || _a === void 0 ? void 0 : _a.execute) || ((_b = this.editor) === null || _b === void 0 ? void 0 : _b.disabled)) {
11364
+ return;
11365
+ }
11366
+ (_c = this.item) === null || _c === void 0 ? void 0 : _c.execute(this.editor);
11367
+ };
11368
+ TheToolbarItemComponent.prototype.renderToolbarItem = function () {
11369
+ var _this = this;
11370
+ this.ngZone.run(function () {
11371
+ var toolbarItemFactory = _this.cfr.resolveComponentFactory(_this.item.quickItemComponent);
11372
+ var tollbarItemRef = _this.toolbarContainer.createComponent(toolbarItemFactory);
11373
+ tollbarItemRef.instance.editor = _this.editor;
11374
+ tollbarItemRef.instance.item = _this.item;
11375
+ tollbarItemRef.instance.itemMode = exports.ToolbarItemMode.vertical;
11376
+ });
11377
+ };
11378
+ return TheToolbarItemComponent;
11379
+ }(TheToolbarBaseItemComponent));
11380
+ TheToolbarItemComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheToolbarItemComponent, deps: [{ token: i0__namespace.NgZone }, { token: i0__namespace.ComponentFactoryResolver }], target: i0__namespace.ɵɵFactoryTarget.Component });
11381
+ TheToolbarItemComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheToolbarItemComponent, selector: "the-toolbar-item", inputs: { item: "item", editor: "editor", itemMode: "itemMode" }, host: { 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]=\"item.name\"\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-container #toolbarContainer></ng-container>\n ", isInline: true, components: [{ type: i2__namespace.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i4__namespace$1.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }], directives: [{ type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i7__namespace.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }] });
11382
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheToolbarItemComponent, decorators: [{
11383
+ type: i0.Component,
11384
+ args: [{
11385
+ selector: 'the-toolbar-item',
11386
+ template: "\n <ng-container *ngIf=\"itemMode === ToolbarItemMode.horizontal; else selectionItem\">\n <a\n thyIconNavLink\n [thyIconNavLinkIcon]=\"item.icon\"\n [thyTooltip]=\"item.name\"\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-container #toolbarContainer></ng-container>\n ",
11387
+ host: {
11388
+ class: 'the-toolbar-item'
11389
+ }
11390
+ }]
11391
+ }], ctorParameters: function () { return [{ type: i0__namespace.NgZone }, { type: i0__namespace.ComponentFactoryResolver }]; }, propDecorators: { item: [{
11392
+ type: i0.Input
11393
+ }], editor: [{
11394
+ type: i0.Input
11395
+ }], itemMode: [{
11396
+ type: i0.Input
11397
+ }], toolbarContainer: [{
11398
+ type: i0.ViewChild,
11399
+ args: ['toolbarContainer', { read: i0.ViewContainerRef, static: true }]
11400
+ }] } });
11401
+
11402
+ var TheQuickToolbarComponent = /** @class */ (function (_super) {
11403
+ __extends(TheQuickToolbarComponent, _super);
11404
+ function TheQuickToolbarComponent(popoverRef, elementRef) {
11405
+ var _this = _super.call(this) || this;
11406
+ _this.popoverRef = popoverRef;
11407
+ _this.elementRef = elementRef;
11408
+ _this.ToolbarItemMode = exports.ToolbarItemMode;
11409
+ _this.ToolbarActionTypes = exports.ToolbarActionTypes;
11410
+ return _this;
11411
+ }
11412
+ TheQuickToolbarComponent.prototype.handleMouseDown = function (event) {
11413
+ if (!this.elementRef.nativeElement.contains(event.target)) {
11414
+ this.popoverRef.close();
11415
+ }
11416
+ else {
11417
+ event.preventDefault();
11418
+ }
11419
+ };
11420
+ TheQuickToolbarComponent.prototype.handleEnter = function () {
11421
+ this.popoverRef.close();
11422
+ };
11423
+ TheQuickToolbarComponent.prototype.ngOnInit = function () {
11424
+ this.editorElement = i1.AngularEditor.toDOMNode(this.editor, this.editor);
11425
+ };
11426
+ TheQuickToolbarComponent.prototype.stopPropagation = function (event) {
11427
+ event.preventDefault();
11428
+ };
11429
+ TheQuickToolbarComponent.prototype.selectionChange = function (event) {
11430
+ this.removeHotKey();
11431
+ var toolbarItem = this.quickToolbarItems.find(function (item) { return item.key === event.value; });
11432
+ if (toolbarItem === null || toolbarItem === void 0 ? void 0 : toolbarItem.execute) {
11433
+ toolbarItem.execute(this.editor);
11434
+ }
11435
+ };
11436
+ TheQuickToolbarComponent.prototype.removeHotKey = function () {
11437
+ var node = slate.Node.get(this.editor, this.editor.selection.anchor.path);
11438
+ if (node && slate.Text.equals({ text: QUICK_TOOLBAR_HOTKEY }, node)) {
11439
+ slate.Editor.deleteBackward(this.editor);
11440
+ }
11441
+ };
11442
+ TheQuickToolbarComponent.prototype.ngOnDestroy = function () {
11443
+ _super.prototype.ngOnDestroy.call(this);
11444
+ };
11445
+ return TheQuickToolbarComponent;
11446
+ }(core.mixinUnsubscribe(core.MixinBase)));
11447
+ TheQuickToolbarComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheQuickToolbarComponent, deps: [{ token: i1__namespace$3.ThyPopoverRef }, { token: i0__namespace.ElementRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
11448
+ TheQuickToolbarComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheQuickToolbarComponent, selector: "the-quick-toolbar", inputs: { editor: "editor", quickToolbarItems: "quickToolbarItems" }, host: { listeners: { "document: mousedown": "handleMouseDown($event)", "document: keydown.enter": "handleEnter()" } }, 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: i2__namespace$3.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: ["item", "editor", "itemMode"] }, { type: NavSplitLineComponent, selector: "nav-split-line", inputs: ["mode"] }], directives: [{ type: i6__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
11449
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheQuickToolbarComponent, decorators: [{
11450
+ type: i0.Component,
11451
+ args: [{
11452
+ selector: 'the-quick-toolbar',
11453
+ templateUrl: 'quick-toolbar.component.html'
11454
+ }]
11455
+ }], ctorParameters: function () { return [{ type: i1__namespace$3.ThyPopoverRef }, { type: i0__namespace.ElementRef }]; }, propDecorators: { editor: [{
11456
+ type: i0.Input
11457
+ }], quickToolbarItems: [{
11458
+ type: i0.Input
11459
+ }], handleMouseDown: [{
11460
+ type: i0.HostListener,
11461
+ args: ['document: mousedown', ['$event']]
11462
+ }], handleEnter: [{
11463
+ type: i0.HostListener,
11464
+ args: ['document: keydown.enter']
11465
+ }] } });
11466
+
11467
+ var OperationTypes = ['insert_text', 'remove_node', 'merge_node'];
11468
+ var QuickInsertEditor = {
11469
+ openQuickToolbar: function (editor, toolbarItems, origin) {
11470
+ var overlay = editor.injector.get(i2.Overlay);
11471
+ var viewContainerRef = editor.injector.get(i0.ViewContainerRef);
11472
+ var thyPopover = editor.injector.get(i1$2.ThyPopover);
11473
+ var quickToolbarRef = thyPopover.open(TheQuickToolbarComponent, {
11474
+ initialState: {
11475
+ editor: editor,
11476
+ quickToolbarItems: toolbarItems
11477
+ },
11478
+ origin: origin,
11479
+ viewContainerRef: viewContainerRef,
11480
+ backdropClosable: true,
11481
+ placement: 'bottomLeft',
11482
+ offset: 4,
11483
+ hasBackdrop: false,
11484
+ insideClosable: true,
11485
+ panelClass: 'the-quick-toolbar-container',
11486
+ scrollStrategy: overlay.scrollStrategies.reposition(),
11487
+ manualClosure: true
11488
+ });
11489
+ THE_EDITOR_QUICK_TOOLBAR_REF.set(editor, quickToolbarRef);
11490
+ },
11491
+ closeQuickToolbar: function (editor) {
11492
+ var quickToolbarRef = THE_EDITOR_QUICK_TOOLBAR_REF.get(editor);
11493
+ if (quickToolbarRef) {
11494
+ quickToolbarRef.close();
11495
+ THE_EDITOR_QUICK_TOOLBAR_REF.set(editor, null);
11496
+ }
11497
+ },
11498
+ isOpenToolbar: function (editor, opTypes) {
11499
+ if (opTypes === void 0) { opTypes = OperationTypes; }
11500
+ var isCollapsedCursor = TheEditor.isFocused(editor) && editor.selection && slate.Range.isCollapsed(editor.selection);
11501
+ if (!isCollapsedCursor) {
11502
+ return false;
11503
+ }
11504
+ var block = slate.Node.ancestor(editor, [editor.selection.anchor.path[0]]);
11505
+ var undos = editor.history.undos;
11506
+ var lastBatch = undos[undos.length - 1];
11507
+ var lastOp = lastBatch && lastBatch[lastBatch.length - 1];
11508
+ if (lastOp &&
11509
+ block.children.length === 1 &&
11510
+ block.type === exports.ElementKinds.paragraph &&
11511
+ slate.Node.string(block) === QUICK_TOOLBAR_HOTKEY &&
11512
+ opTypes.includes(lastOp.type) &&
11513
+ (lastOp.text === QUICK_TOOLBAR_HOTKEY || lastOp.text === undefined)) {
11514
+ return true;
11515
+ }
11516
+ return false;
11517
+ }
11518
+ };
11519
+
11520
+ var withQuickInsert = function (editor) {
11521
+ var onKeydown = editor.onKeydown, deleteBackward = editor.deleteBackward, onChange = editor.onChange;
11522
+ editor.onKeydown = function (event) {
11523
+ if (event.key === QUICK_TOOLBAR_HOTKEY && isCleanEmptyParagraph(editor)) {
11524
+ var rootNode = i1.AngularEditor.toDOMNode(editor, slate.Node.ancestor(editor, [editor.selection.anchor.path[0]]));
11525
+ var theEditorComponent = editor.injector.get(TheEditorComponent);
11526
+ var quickToolbars = theEditorComponent.quickToolbarItems;
11527
+ QuickInsertEditor.openQuickToolbar(editor, quickToolbars, rootNode);
11528
+ }
11529
+ onKeydown(event);
11530
+ };
11531
+ editor.deleteBackward = function (unit) {
11532
+ if (!QuickInsertEditor.isOpenToolbar(editor, ['remove_text'])) {
11533
+ QuickInsertEditor.closeQuickToolbar(editor);
11534
+ }
11535
+ deleteBackward(unit);
11536
+ };
11537
+ editor.onChange = function () {
11538
+ onChange();
11539
+ if (editor.selection) {
11540
+ var editorComponent = editor.injector.get(TheEditorComponent);
11541
+ editorComponent.quickInsertInstance.checkStatus();
11542
+ var block = slate.Node.ancestor(editor, [editor.selection.anchor.path[0]]);
11543
+ if (!isCleanEmptyParagraph(editor) && slate.Node.string(block) !== QUICK_TOOLBAR_HOTKEY) {
11544
+ QuickInsertEditor.closeQuickToolbar(editor);
11545
+ }
11546
+ }
11547
+ };
11548
+ return editor;
11549
+ };
11550
+
11088
11551
  var internalPlugins = [
11089
11552
  withTheHistory,
11090
11553
  withAutoInsertData(),
@@ -11092,7 +11555,6 @@
11092
11555
  withRemoveVoid,
11093
11556
  withBlockCard,
11094
11557
  withResetType,
11095
- withImage,
11096
11558
  withIndent(__spreadArray([exports.ElementKinds.checkItem, exports.ElementKinds.numberedList, exports.ElementKinds.bulletedList, exports.ElementKinds.paragraph], __read(HEADING_TYPES))),
11097
11559
  withList({ validLiChildrenTypes: [exports.ElementKinds.image] }),
11098
11560
  withLink,
@@ -11112,9 +11574,11 @@
11112
11574
  withInsertParagraphNodes(),
11113
11575
  withGetFragment(),
11114
11576
  withDeserializeHMTL,
11115
- withDeserializeMd()
11577
+ withDeserializeMd(),
11578
+ withImage,
11579
+ withQuickInsert
11116
11580
  ];
11117
- var internalToolbarItems = __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], __read(AlignOptions)), __read(MarkOptions)), __read(ColorOptions)), __read(HeadingOptions)), __read(TodoItemOptions)), __read(ListOptions)), __read(ImageOptions)), __read(HrOptions)), __read(BlockquoteOptions)), __read(CodeOptions)), __read(LinkOptions)), __read(TableOptions)), __read(VerticalAlignOptions));
11581
+ var internalToolbarItems = __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], __read(AlignOptions)), __read(MarkOptions)), __read(ColorOptions)), __read(HeadingOptions)), __read(TodoItemOptions)), __read(ListOptions)), __read(ImageOptions)), __read(HrOptions)), __read(BlockquoteOptions)), __read(CodeOptions)), __read(LinkOptions)), __read(TableOptions)), __read(VerticalAlignOptions)), __read(PaintFormatOptions));
11118
11582
  var toolbarCompose = function (toolbarItems) {
11119
11583
  if (toolbarItems === void 0) { toolbarItems = []; }
11120
11584
  return __spreadArray(__spreadArray([], __read(internalToolbarItems)), __read(toolbarItems));
@@ -11155,14 +11619,14 @@
11155
11619
  var TheToolbarService = /** @class */ (function () {
11156
11620
  function TheToolbarService() {
11157
11621
  }
11158
- TheToolbarService.prototype.initialize = function (toolbarItems, global, inline, block) {
11622
+ TheToolbarService.prototype.initialize = function (toolbarItems, global, inline, quick) {
11159
11623
  if (global === void 0) { global = DefaultGlobalToolbarDefinition; }
11160
11624
  if (inline === void 0) { inline = DefaultInlineToolbarDefinition; }
11161
- if (block === void 0) { block = DefaultBlockToolbarDefinition; }
11625
+ if (quick === void 0) { quick = DefaultQuickToolbarDefinition; }
11162
11626
  var toolbarDefinition = {
11163
11627
  global: global,
11164
- block: block,
11165
- inline: inline
11628
+ inline: inline,
11629
+ quick: quick
11166
11630
  };
11167
11631
  var toolbarOperations = new Map();
11168
11632
  toolbarItems.forEach(function (i) { return toolbarOperations.set(i.key, i); });
@@ -11206,7 +11670,7 @@
11206
11670
 
11207
11671
  var autoFocus = function (editor, isFocus) {
11208
11672
  setTimeout(function () {
11209
- if (editor && isFocus) {
11673
+ if (editor && editor.children.length > 0 && isFocus) {
11210
11674
  slateHistory.HistoryEditor.withoutMerging(editor, function () {
11211
11675
  i1.AngularEditor.focus(editor);
11212
11676
  slate.Transforms.select(editor, slate.Editor.start(editor, [0]));
@@ -11243,44 +11707,6 @@
11243
11707
  previousHeight = currentHeight;
11244
11708
  };
11245
11709
 
11246
- var TheToolbarItemComponent = /** @class */ (function (_super) {
11247
- __extends(TheToolbarItemComponent, _super);
11248
- function TheToolbarItemComponent() {
11249
- var _this = _super.call(this) || this;
11250
- _this.active = false;
11251
- return _this;
11252
- }
11253
- TheToolbarItemComponent.prototype.statusChange = function (editor) {
11254
- var _a, _b;
11255
- this.active = ((_a = this.item) === null || _a === void 0 ? void 0 : _a.active) ? (_b = this.item) === null || _b === void 0 ? void 0 : _b.active(editor) : false;
11256
- };
11257
- TheToolbarItemComponent.prototype.execute = function (event) {
11258
- var _a, _b, _c;
11259
- _super.prototype.execute.call(this, event);
11260
- if (!((_a = this.item) === null || _a === void 0 ? void 0 : _a.execute) || ((_b = this.editor) === null || _b === void 0 ? void 0 : _b.disabled)) {
11261
- return;
11262
- }
11263
- (_c = this.item) === null || _c === void 0 ? void 0 : _c.execute(this.editor);
11264
- };
11265
- return TheToolbarItemComponent;
11266
- }(TheToolbarBaseItemComponent));
11267
- TheToolbarItemComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheToolbarItemComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
11268
- TheToolbarItemComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheToolbarItemComponent, selector: "the-toolbar-item", inputs: { item: "item", editor: "editor" }, host: { classAttribute: "the-toolbar-item" }, usesInheritance: true, ngImport: i0__namespace, template: "\n <a\n thyIconNavLink\n [thyIconNavLinkIcon]=\"item.icon\"\n [thyTooltip]=\"item.name\"\n thyTooltipPlacement=\"top\"\n [thyIconNavLinkActive]=\"active\"\n (mousedown)=\"execute($event)\"\n ></a>\n ", isInline: true, components: [{ type: i2__namespace.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }], directives: [{ type: i7__namespace.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }] });
11269
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheToolbarItemComponent, decorators: [{
11270
- type: i0.Component,
11271
- args: [{
11272
- selector: 'the-toolbar-item',
11273
- template: "\n <a\n thyIconNavLink\n [thyIconNavLinkIcon]=\"item.icon\"\n [thyTooltip]=\"item.name\"\n thyTooltipPlacement=\"top\"\n [thyIconNavLinkActive]=\"active\"\n (mousedown)=\"execute($event)\"\n ></a>\n ",
11274
- host: {
11275
- class: 'the-toolbar-item'
11276
- }
11277
- }]
11278
- }], ctorParameters: function () { return []; }, propDecorators: { item: [{
11279
- type: i0.Input
11280
- }], editor: [{
11281
- type: i0.Input
11282
- }] } });
11283
-
11284
11710
  var TheToolbarComponent = /** @class */ (function () {
11285
11711
  function TheToolbarComponent(cfr, elementRef, ngZone, toolbarGroupComponent) {
11286
11712
  this.cfr = cfr;
@@ -11573,56 +11999,214 @@
11573
11999
  args: ['toolbarContainer', { read: i0.ViewContainerRef, static: true }]
11574
12000
  }] } });
11575
12001
 
12002
+ var TheInlineToolbarComponent = /** @class */ (function () {
12003
+ function TheInlineToolbarComponent(elementRef, scrollDispatcher, cdr, ngZone) {
12004
+ this.elementRef = elementRef;
12005
+ this.scrollDispatcher = scrollDispatcher;
12006
+ this.cdr = cdr;
12007
+ this.ngZone = ngZone;
12008
+ this.destroy$ = new rxjs.Subject();
12009
+ }
12010
+ TheInlineToolbarComponent.prototype.ngOnInit = function () {
12011
+ var _this = this;
12012
+ this.scrollDispatcher
12013
+ .scrolled()
12014
+ .pipe(operators.takeUntil(this.destroy$))
12015
+ .subscribe(function () {
12016
+ _this.updateInlineToolbar();
12017
+ _this.cdr.detectChanges();
12018
+ });
12019
+ this.ngZone.runOutsideAngular(function () {
12020
+ rxjs.merge(rxjs.fromEvent(document, 'mouseup').pipe(operators.filter(function (e) { return e.button !== 2; })), rxjs.fromEvent(document, 'keyup').pipe(operators.filter(function (e) { return !e.shiftKey; })))
12021
+ .pipe(operators.debounceTime(200), operators.takeUntil(_this.destroy$))
12022
+ .subscribe(function () {
12023
+ var _a;
12024
+ _this.updateInlineToolbar();
12025
+ (_a = _this.inlineToolbar) === null || _a === void 0 ? void 0 : _a.statusChange(_this.editor);
12026
+ _this.cdr.detectChanges();
12027
+ });
12028
+ });
12029
+ };
12030
+ TheInlineToolbarComponent.prototype.updateInlineToolbar = function () {
12031
+ var inlineToolbar = this.elementRef.nativeElement.firstElementChild;
12032
+ if (!this.editor.selection) {
12033
+ inlineToolbar.removeAttribute('style');
12034
+ return;
12035
+ }
12036
+ var anchorBlock$1 = anchorBlock(this.editor);
12037
+ if (!inlineToolbar || !anchorBlock$1) {
12038
+ return;
12039
+ }
12040
+ var editor = this.editor;
12041
+ var selection = editor.selection;
12042
+ if (!selection || !i1.AngularEditor.isFocused(editor) || slate.Range.isCollapsed(selection) || slate.Editor.string(editor, selection) === '') {
12043
+ inlineToolbar.removeAttribute('style');
12044
+ return;
12045
+ }
12046
+ if (!THE_INLINE_TOOLBAR_TYPES.includes(anchorBlock$1.type)) {
12047
+ return;
12048
+ }
12049
+ var native = window.getSelection();
12050
+ if (native.type !== 'None') {
12051
+ var range = native.getRangeAt(0);
12052
+ this.updatePosition(inlineToolbar, range);
12053
+ }
12054
+ };
12055
+ TheInlineToolbarComponent.prototype.updatePosition = function (toolbarElement, range) {
12056
+ var boundary = range.getBoundingClientRect();
12057
+ if (!boundary || (boundary.height === 0 && boundary.width === 0 && range.startContainer === range.endContainer)) {
12058
+ if (range.startContainer.nodeType === 1 && range.startContainer.querySelector('img')) {
12059
+ boundary = range.startContainer.querySelector('img').getBoundingClientRect();
12060
+ }
12061
+ else {
12062
+ boundary = range.startContainer.getBoundingClientRect();
12063
+ }
12064
+ }
12065
+ var toolbarHeight = toolbarElement.offsetHeight;
12066
+ var toolbarWidth = toolbarElement.offsetWidth;
12067
+ var halfOffsetWidth = toolbarWidth / 2;
12068
+ var defaultLeft = -halfOffsetWidth;
12069
+ var positions = {};
12070
+ positions.top = boundary.top - toolbarHeight;
12071
+ positions.left = boundary.left + boundary.width / 2 + defaultLeft;
12072
+ positions.right = 'initial';
12073
+ ['top', 'left', 'right'].forEach(function (key) {
12074
+ toolbarElement.style[key] = positions[key] + (isNaN(positions[key]) ? '' : 'px');
12075
+ });
12076
+ toolbarElement.style.opacity = '1';
12077
+ };
12078
+ TheInlineToolbarComponent.prototype.ngOnDestroy = function () {
12079
+ this.destroy$.next();
12080
+ this.destroy$.complete();
12081
+ };
12082
+ return TheInlineToolbarComponent;
12083
+ }());
12084
+ TheInlineToolbarComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheInlineToolbarComponent, deps: [{ token: i0__namespace.ElementRef }, { token: i2__namespace$1.ScrollDispatcher }, { token: i0__namespace.ChangeDetectorRef }, { token: i0__namespace.NgZone }], target: i0__namespace.ɵɵFactoryTarget.Component });
12085
+ TheInlineToolbarComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheInlineToolbarComponent, selector: "the-inline-toolbar", inputs: { editor: "editor", toolbarItems: "toolbarItems" }, host: { properties: { "class.hide": "toolbarItems.length === 0" } }, viewQueries: [{ propertyName: "inlineToolbar", first: true, predicate: ["inlineToolbar"], descendants: true }], ngImport: i0__namespace, template: "<the-toolbar\n #inlineToolbar\n class=\"the-inline-toolbar\"\n [editor]=\"editor\"\n [toolbarItems]=\"toolbarItems\"\n [isMore]=\"false\"\n ></the-toolbar> ", isInline: true, components: [{ type: TheToolbarComponent, selector: "the-toolbar", inputs: ["editor", "toolbarItems", "align", "isMore", "afterTemplate"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
12086
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheInlineToolbarComponent, decorators: [{
12087
+ type: i0.Component,
12088
+ args: [{
12089
+ selector: 'the-inline-toolbar',
12090
+ template: "<the-toolbar\n #inlineToolbar\n class=\"the-inline-toolbar\"\n [editor]=\"editor\"\n [toolbarItems]=\"toolbarItems\"\n [isMore]=\"false\"\n ></the-toolbar> ",
12091
+ host: {
12092
+ '[class.hide]': 'toolbarItems.length === 0'
12093
+ },
12094
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
12095
+ }]
12096
+ }], ctorParameters: function () { return [{ type: i0__namespace.ElementRef }, { type: i2__namespace$1.ScrollDispatcher }, { type: i0__namespace.ChangeDetectorRef }, { type: i0__namespace.NgZone }]; }, propDecorators: { editor: [{
12097
+ type: i0.Input
12098
+ }], toolbarItems: [{
12099
+ type: i0.Input
12100
+ }], inlineToolbar: [{
12101
+ type: i0.ViewChild,
12102
+ args: ['inlineToolbar']
12103
+ }] } });
12104
+
12105
+ var TheQuickInsertComponent = /** @class */ (function () {
12106
+ function TheQuickInsertComponent(renderer, elementRef, cdr) {
12107
+ this.renderer = renderer;
12108
+ this.elementRef = elementRef;
12109
+ this.cdr = cdr;
12110
+ this.isHide = true;
12111
+ this.defaultIconName = 'plus-circle-thin';
12112
+ this.iconNameFill = 'plus-circle-thin-fill';
12113
+ this.displayIconName = this.defaultIconName;
12114
+ }
12115
+ TheQuickInsertComponent.prototype.handleMousedownNativeElement = function (event) {
12116
+ event.preventDefault();
12117
+ event.stopPropagation();
12118
+ };
12119
+ TheQuickInsertComponent.prototype.checkStatus = function () {
12120
+ var _a;
12121
+ var editor = this.editor;
12122
+ if (isCleanEmptyParagraph(editor)) {
12123
+ var block = slate.Node.ancestor(editor, [(_a = editor === null || editor === void 0 ? void 0 : editor.selection) === null || _a === void 0 ? void 0 : _a.anchor.path[0]]);
12124
+ var rootNode = i1.AngularEditor.toDOMNode(editor, block);
12125
+ this.isHide = false;
12126
+ this.updatePosition(rootNode.offsetLeft, rootNode.offsetTop);
12127
+ return;
12128
+ }
12129
+ this.isHide = true;
12130
+ };
12131
+ TheQuickInsertComponent.prototype.updatePosition = function (left, top) {
12132
+ this.isHide = false;
12133
+ this.renderer.setStyle(this.elementRef.nativeElement, 'top', top + "px");
12134
+ this.renderer.setStyle(this.elementRef.nativeElement, 'left', left + "px");
12135
+ };
12136
+ TheQuickInsertComponent.prototype.mouseEnter = function (event) {
12137
+ this.displayIconName = this.iconNameFill;
12138
+ this.cdr.markForCheck();
12139
+ };
12140
+ TheQuickInsertComponent.prototype.mouseLeave = function (event) {
12141
+ this.displayIconName = this.defaultIconName;
12142
+ this.cdr.markForCheck();
12143
+ };
12144
+ TheQuickInsertComponent.prototype.handleClick = function (event) {
12145
+ event.stopPropagation();
12146
+ event.preventDefault();
12147
+ QuickInsertEditor.openQuickToolbar(this.editor, this.quickToolbarItems, this.iconElement.nativeElement);
12148
+ };
12149
+ return TheQuickInsertComponent;
12150
+ }());
12151
+ TheQuickInsertComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheQuickInsertComponent, deps: [{ token: i0__namespace.Renderer2 }, { token: i0__namespace.ElementRef }, { token: i0__namespace.ChangeDetectorRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
12152
+ TheQuickInsertComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheQuickInsertComponent, selector: "[theQuickInsert]", inputs: { editor: "editor", quickToolbarItems: "quickToolbarItems" }, 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$1.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }] });
12153
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheQuickInsertComponent, decorators: [{
12154
+ type: i0.Component,
12155
+ args: [{
12156
+ selector: '[theQuickInsert]',
12157
+ templateUrl: './quick-insert.component.html',
12158
+ host: {
12159
+ class: 'the-quick-insert',
12160
+ '[class.hide]': 'isHide'
12161
+ }
12162
+ }]
12163
+ }], ctorParameters: function () { return [{ type: i0__namespace.Renderer2 }, { type: i0__namespace.ElementRef }, { type: i0__namespace.ChangeDetectorRef }]; }, propDecorators: { editor: [{
12164
+ type: i0.Input
12165
+ }], quickToolbarItems: [{
12166
+ type: i0.Input
12167
+ }], iconElement: [{
12168
+ type: i0.ViewChild,
12169
+ args: ['iconElement', { read: i0.ElementRef, static: false }]
12170
+ }], handleMousedownNativeElement: [{
12171
+ type: i0.HostListener,
12172
+ args: ['mousedown', ['$event']]
12173
+ }] } });
12174
+
11576
12175
  var ThePlaceholderComponent = /** @class */ (function () {
11577
12176
  function ThePlaceholderComponent(renderer, elementRef) {
11578
12177
  this.renderer = renderer;
11579
12178
  this.elementRef = elementRef;
11580
12179
  this.isHide = true;
11581
12180
  }
11582
- Object.defineProperty(ThePlaceholderComponent.prototype, "selection", {
11583
- get: function () {
11584
- return this.editor.selection;
11585
- },
11586
- enumerable: false,
11587
- configurable: true
11588
- });
11589
12181
  ThePlaceholderComponent.prototype.handleCompositionStart = function () {
11590
- this.hide();
12182
+ var _a;
12183
+ if ((_a = this.editor) === null || _a === void 0 ? void 0 : _a.selection) {
12184
+ this.hide();
12185
+ }
11591
12186
  };
11592
12187
  ThePlaceholderComponent.prototype.handleCompositionEnd = function (event) {
11593
12188
  if (!event.data) {
11594
12189
  this.checkStatus();
11595
12190
  }
11596
12191
  };
11597
- ThePlaceholderComponent.prototype.checkStatus = function (value) {
12192
+ ThePlaceholderComponent.prototype.checkStatus = function () {
12193
+ var _a, _b, _c;
11598
12194
  var editor = this.editor;
11599
- var children = value ? value : editor.children;
11600
12195
  // empty content and no selection processing
11601
- if (this.autoFocus && !this.selection && isEmptyContent(children)) {
11602
- this.updatePosition(30, 51);
11603
- this.isHide = false;
12196
+ if (((_a = this.options) === null || _a === void 0 ? void 0 : _a.autoFocus) && !(editor === null || editor === void 0 ? void 0 : editor.selection) && isEmptyContent(editor.children)) {
12197
+ // normal top is 28, but margin-top: -41px is set when maxHeight is set, so top is 69
12198
+ var firstTop = ((_b = this.options) === null || _b === void 0 ? void 0 : _b.maxHeight) ? 69 : 28;
12199
+ this.updatePosition(30, firstTop);
11604
12200
  return;
11605
12201
  }
11606
- if (i1.AngularEditor.isFocused(editor) && this.selection && slate.Range.isCollapsed(this.selection)) {
11607
- var block = slate.Node.ancestor(editor, [this.selection.anchor.path[0]]);
11608
- var textIndent = 'textIndent';
11609
- var align = 'align';
11610
- var hasTextIndent = block[textIndent];
11611
- var hasAlign = block[align];
11612
- if (slate.Node.string(block) === '' &&
11613
- slate.Element.isElement(block) &&
11614
- block.type === exports.ElementKinds.paragraph &&
11615
- block.children.length === 1 &&
11616
- slate.Text.isText(block.children[0]) &&
11617
- !slate.Editor.isVoid(editor, block) &&
11618
- !hasTextIndent &&
11619
- !hasAlign) {
11620
- var rootNode = i1.AngularEditor.toDOMNode(this.editor, block);
11621
- this.updatePosition(rootNode.offsetLeft, rootNode.offsetTop);
11622
- return;
11623
- }
12202
+ if (isCleanEmptyParagraph(editor)) {
12203
+ var block = slate.Node.ancestor(editor, [(_c = editor === null || editor === void 0 ? void 0 : editor.selection) === null || _c === void 0 ? void 0 : _c.anchor.path[0]]);
12204
+ var rootNode = i1.AngularEditor.toDOMNode(editor, block);
12205
+ this.isHide = false;
12206
+ this.updatePosition(rootNode.offsetLeft, rootNode.offsetTop);
12207
+ return;
11624
12208
  }
11625
- this.hide();
12209
+ this.isHide = true;
11626
12210
  };
11627
12211
  ThePlaceholderComponent.prototype.updatePosition = function (left, top) {
11628
12212
  this.isHide = false;
@@ -11635,12 +12219,12 @@
11635
12219
  return ThePlaceholderComponent;
11636
12220
  }());
11637
12221
  ThePlaceholderComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: ThePlaceholderComponent, deps: [{ token: i0__namespace.Renderer2 }, { token: i0__namespace.ElementRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
11638
- ThePlaceholderComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: ThePlaceholderComponent, selector: "div[thePlaceholder]", inputs: { editor: "editor", autoFocus: "autoFocus", placeholder: "placeholder" }, host: { listeners: { "document:compositionstart": "handleCompositionStart()", "document:compositionend": "handleCompositionEnd($event)" }, properties: { "class.hide": "isHide" }, classAttribute: "the-placeholder" }, ngImport: i0__namespace, template: "{{ placeholder }}", isInline: true });
12222
+ ThePlaceholderComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: ThePlaceholderComponent, selector: "div[thePlaceholder]", inputs: { editor: "editor", options: "options" }, host: { listeners: { "document:compositionstart": "handleCompositionStart()", "document:compositionend": "handleCompositionEnd($event)" }, properties: { "class.hide": "isHide" }, classAttribute: "the-placeholder" }, ngImport: i0__namespace, template: "{{ options?.placeholder }}", isInline: true });
11639
12223
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: ThePlaceholderComponent, decorators: [{
11640
12224
  type: i0.Component,
11641
12225
  args: [{
11642
12226
  selector: 'div[thePlaceholder]',
11643
- template: "{{ placeholder }}",
12227
+ template: "{{ options?.placeholder }}",
11644
12228
  host: {
11645
12229
  class: 'the-placeholder',
11646
12230
  '[class.hide]': 'isHide'
@@ -11648,9 +12232,7 @@
11648
12232
  }]
11649
12233
  }], ctorParameters: function () { return [{ type: i0__namespace.Renderer2 }, { type: i0__namespace.ElementRef }]; }, propDecorators: { editor: [{
11650
12234
  type: i0.Input
11651
- }], autoFocus: [{
11652
- type: i0.Input
11653
- }], placeholder: [{
12235
+ }], options: [{
11654
12236
  type: i0.Input
11655
12237
  }], handleCompositionStart: [{
11656
12238
  type: i0.HostListener,
@@ -11736,7 +12318,6 @@
11736
12318
  _this.theOnDOMEvent = new i0.EventEmitter();
11737
12319
  _this.theEditorCreated = new i0.EventEmitter();
11738
12320
  _this._plugins = [];
11739
- _this.globalToolbarItems = [];
11740
12321
  _this.autoScrollView = _.debounce(function (editor, scrollContainer) {
11741
12322
  return autoScrollViewHandle(editor, scrollContainer);
11742
12323
  }, 80);
@@ -11827,9 +12408,6 @@
11827
12408
  _this.onSlaCompositionEnd = function (event) { };
11828
12409
  _this.onSlaDragStart = function (event) { };
11829
12410
  _this.onSlaDragOver = function (event) { };
11830
- _this.trackBy = function (element) {
11831
- return element.key;
11832
- };
11833
12411
  return _this;
11834
12412
  }
11835
12413
  Object.defineProperty(TheEditorComponent.prototype, "theGlobalToolbarInstance", {
@@ -11847,6 +12425,14 @@
11847
12425
  enumerable: false,
11848
12426
  configurable: true
11849
12427
  });
12428
+ Object.defineProperty(TheEditorComponent.prototype, "quickToolbarItems", {
12429
+ get: function () {
12430
+ var _a;
12431
+ return (_a = this.toolbarEntity) === null || _a === void 0 ? void 0 : _a.quick;
12432
+ },
12433
+ enumerable: false,
12434
+ configurable: true
12435
+ });
11850
12436
  TheEditorComponent.prototype.ngOnInit = function () {
11851
12437
  this.initialize();
11852
12438
  this.onErrorHandler();
@@ -11903,8 +12489,8 @@
11903
12489
  var _a;
11904
12490
  var toolbar = (_a = this === null || this === void 0 ? void 0 : this.theOptions) === null || _a === void 0 ? void 0 : _a.toolbar;
11905
12491
  var toolbarItems = toolbarCompose(toolbar === null || toolbar === void 0 ? void 0 : toolbar.toolbarItems);
11906
- var toolbarOption = this.toolbarService.initialize(toolbarItems, toolbar === null || toolbar === void 0 ? void 0 : toolbar.global, toolbar === null || toolbar === void 0 ? void 0 : toolbar.block, toolbar === null || toolbar === void 0 ? void 0 : toolbar.inline);
11907
- this.globalToolbarItems = toolbarOption.toolbarEntity.global;
12492
+ var toolbarOption = this.toolbarService.initialize(toolbarItems, toolbar === null || toolbar === void 0 ? void 0 : toolbar.global, toolbar === null || toolbar === void 0 ? void 0 : toolbar.inline, toolbar === null || toolbar === void 0 ? void 0 : toolbar.quick);
12493
+ this.toolbarEntity = toolbarOption.toolbarEntity;
11908
12494
  if (this.theGlobalToolbar) {
11909
12495
  this.theGlobalToolbarInstance.editor = this.editor;
11910
12496
  this.theGlobalToolbarInstance.toolbarItems = toolbarOption.toolbarEntity.global;
@@ -11914,11 +12500,10 @@
11914
12500
  }
11915
12501
  };
11916
12502
  TheEditorComponent.prototype.writeValue = function (value) {
11917
- var _a, _b;
12503
+ var _a;
11918
12504
  var data = dataDeserialize((_a = this.theOptions) === null || _a === void 0 ? void 0 : _a.mode, value);
11919
12505
  // data-deserialize
11920
12506
  this.editorValue = data;
11921
- (_b = this.placeholderInstance) === null || _b === void 0 ? void 0 : _b.checkStatus(data);
11922
12507
  };
11923
12508
  TheEditorComponent.prototype.registerOnChange = function (fn) {
11924
12509
  this.onChangeCallback = fn;
@@ -11927,13 +12512,14 @@
11927
12512
  this.onTouchedCallback = fn;
11928
12513
  };
11929
12514
  TheEditorComponent.prototype.valueChange = function (value) {
11930
- var _a, _b, _c, _d, _e;
12515
+ var _a, _b, _c, _d;
11931
12516
  (_a = this.theGlobalToolbarInstance) === null || _a === void 0 ? void 0 : _a.statusChange(this.editor);
11932
- (_b = this.placeholderInstance) === null || _b === void 0 ? void 0 : _b.checkStatus();
12517
+ this.quickInsertInstance.checkStatus();
12518
+ this.placeholderInstance.checkStatus();
11933
12519
  // auto scroll view
11934
- var scrollContainer = (_c = this.theOptions) === null || _c === void 0 ? void 0 : _c.scrollContainer;
11935
- var maxHeight = (_d = this.theOptions) === null || _d === void 0 ? void 0 : _d.maxHeight;
11936
- if (!((_e = this.theOptions) === null || _e === void 0 ? void 0 : _e.readonly) && (scrollContainer || maxHeight)) {
12520
+ var scrollContainer = (_b = this.theOptions) === null || _b === void 0 ? void 0 : _b.scrollContainer;
12521
+ var maxHeight = (_c = this.theOptions) === null || _c === void 0 ? void 0 : _c.maxHeight;
12522
+ if (!((_d = this.theOptions) === null || _d === void 0 ? void 0 : _d.readonly) && (scrollContainer || maxHeight)) {
11937
12523
  var container = maxHeight ? DEFAULT_SCROLL_CONTAINER : scrollContainer;
11938
12524
  this.autoScrollView(this.editor, container);
11939
12525
  }
@@ -12009,18 +12595,18 @@
12009
12595
  }
12010
12596
  };
12011
12597
  TheEditorComponent.prototype.handleSelectAll = function () {
12012
- var _f;
12598
+ var _e;
12013
12599
  var node;
12014
12600
  if (!this.editor.selection) {
12015
12601
  setEndSelection(this.editor);
12016
12602
  }
12017
- var _g = __read(slate.Range.edges(this.editor.selection), 2), start = _g[0], end = _g[1];
12603
+ var _f = __read(slate.Range.edges(this.editor.selection), 2), start = _f[0], end = _f[1];
12018
12604
  var selectionRange = slate.Editor.range(this.editor, start, end);
12019
12605
  var containerBlocks = getContainerBlocks(this.editor);
12020
12606
  for (var i = 0; i < containerBlocks.length; i++) {
12021
- _f = __read(getNodesByType(this.editor, containerBlocks[i]), 1), node = _f[0];
12607
+ _e = __read(getNodesByType(this.editor, containerBlocks[i]), 1), node = _e[0];
12022
12608
  if (node) {
12023
- var _h = __read(node, 2), path = _h[1];
12609
+ var _g = __read(node, 2), path = _g[1];
12024
12610
  var isStartParent = slate.Path.equals(path, start.path.slice(0, path.length));
12025
12611
  var isEndParent = slate.Path.equals(path, end.path.slice(0, path.length));
12026
12612
  if (isStartParent && isEndParent) {
@@ -12063,7 +12649,7 @@
12063
12649
  useExisting: i0.forwardRef(function () { return TheEditorComponent; }),
12064
12650
  multi: true
12065
12651
  }
12066
- ], viewQueries: [{ propertyName: "templateInstance", first: true, predicate: ["templateInstance"], descendants: true, static: true }, { propertyName: "globalToolbarInstance", first: true, predicate: ["globalToolbar"], descendants: true }, { propertyName: "placeholderInstance", first: true, predicate: ["placeholder"], descendants: 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]=\"globalToolbarItems\"\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 [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 [trackBy]=\"trackBy\"\n (mousedown)=\"mousedown($event)\"\n ></slate-editable>\n <div\n *ngIf=\"theOptions?.placeholder\"\n #placeholder\n thePlaceholder\n [editor]=\"editor\"\n [autoFocus]=\"theOptions?.placeholder?.autoFocus\"\n [placeholder]=\"theOptions?.placeholder\"\n ></div>\n <the-template #templateInstance></the-template>\n</div>\n", components: [{ type: TheToolbarComponent, selector: "the-toolbar", inputs: ["editor", "toolbarItems", "align", "isMore", "afterTemplate"] }, { type: i1__namespace.SlateEditableComponent, selector: "slate-editable", inputs: ["editor", "renderElement", "renderLeaf", "renderText", "decorate", "isStrictDecorate", "trackBy", "readonly", "beforeInput", "blur", "click", "compositionEnd", "compositionStart", "copy", "cut", "dragOver", "dragStart", "dragEnd", "drop", "focus", "keydown", "paste", "spellCheck", "autoCorrect", "autoCapitalize"] }, { type: ThePlaceholderComponent, selector: "div[thePlaceholder]", inputs: ["editor", "autoFocus", "placeholder"] }, { type: TheTemplateComponent, selector: "the-template,[theTemplate]" }], directives: [{ type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i6__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i4__namespace$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4__namespace$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
12652
+ ], 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 }, { propertyName: "placeholderInstance", first: true, predicate: ["placeholder"], descendants: 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 [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 [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 (mousedown)=\"mousedown($event)\"\n ></slate-editable>\n <the-inline-toolbar *ngIf=\"!theOptions.readonly\" [editor]=\"editor\" [toolbarItems]=\"toolbarEntity.inline\"></the-inline-toolbar>\n <div #quickInsert theQuickInsert [editor]=\"editor\" [quickToolbarItems]=\"quickToolbarItems\"></div>\n <div #placeholder thePlaceholder [editor]=\"editor\" [options]=\"theOptions\"></div>\n <the-template #templateInstance></the-template>\n</div>\n", components: [{ type: TheToolbarComponent, selector: "the-toolbar", inputs: ["editor", "toolbarItems", "align", "isMore", "afterTemplate"] }, { type: i1__namespace.SlateEditableComponent, selector: "slate-editable", inputs: ["editor", "renderElement", "renderLeaf", "renderText", "decorate", "isStrictDecorate", "trackBy", "readonly", "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"] }, { type: ThePlaceholderComponent, selector: "div[thePlaceholder]", inputs: ["editor", "options"] }, { type: TheTemplateComponent, selector: "the-template,[theTemplate]" }], directives: [{ type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i6__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i4__namespace$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4__namespace$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
12067
12653
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheEditorComponent, decorators: [{
12068
12654
  type: i0.Component,
12069
12655
  args: [{
@@ -12106,6 +12692,9 @@
12106
12692
  }], globalToolbarInstance: [{
12107
12693
  type: i0.ViewChild,
12108
12694
  args: ['globalToolbar']
12695
+ }], quickInsertInstance: [{
12696
+ type: i0.ViewChild,
12697
+ args: ['quickInsert']
12109
12698
  }], placeholderInstance: [{
12110
12699
  type: i0.ViewChild,
12111
12700
  args: ['placeholder']
@@ -12272,7 +12861,7 @@
12272
12861
  i2$1.ThyNavModule,
12273
12862
  i2$2.ThyFormModule,
12274
12863
  i5$3.ThySharedModule,
12275
- list.ThyListModule,
12864
+ i2$3.ThyListModule,
12276
12865
  i7.ThyTooltipModule,
12277
12866
  i4.ThyProgressModule,
12278
12867
  autocomplete.ThyAutocompleteModule,
@@ -12288,10 +12877,12 @@
12288
12877
  TheToolbarDropdownComponent,
12289
12878
  TheToolbarGroupComponent,
12290
12879
  TheToolbarItemComponent,
12880
+ TheInlineToolbarComponent,
12291
12881
  NavSplitLineComponent,
12292
12882
  TheTextComponent,
12293
12883
  TheDefaultElementComponent,
12294
- ThePlaceholderComponent,
12884
+ TheQuickInsertComponent,
12885
+ TheQuickToolbarComponent,
12295
12886
  TheColorSelectComponent,
12296
12887
  TheColorToolbarItemComponent,
12297
12888
  TheContextMenuComponent,
@@ -12318,7 +12909,8 @@
12318
12909
  TheTableToolbarComponent,
12319
12910
  TheTableComponent,
12320
12911
  TheTableRowComponent,
12321
- TheTdComponent
12912
+ TheTdComponent,
12913
+ ThePlaceholderComponent
12322
12914
  ];
12323
12915
  var PIPES = [ElementStylePipe, ElementClassPipe];
12324
12916
  var TheEditorModule = /** @class */ (function () {
@@ -12331,10 +12923,12 @@
12331
12923
  TheToolbarDropdownComponent,
12332
12924
  TheToolbarGroupComponent,
12333
12925
  TheToolbarItemComponent,
12926
+ TheInlineToolbarComponent,
12334
12927
  NavSplitLineComponent,
12335
12928
  TheTextComponent,
12336
12929
  TheDefaultElementComponent,
12337
- ThePlaceholderComponent,
12930
+ TheQuickInsertComponent,
12931
+ TheQuickToolbarComponent,
12338
12932
  TheColorSelectComponent,
12339
12933
  TheColorToolbarItemComponent,
12340
12934
  TheContextMenuComponent,
@@ -12358,12 +12952,13 @@
12358
12952
  TheTableToolbarComponent,
12359
12953
  TheTableComponent,
12360
12954
  TheTableRowComponent,
12361
- TheTdComponent], imports: [i6.CommonModule, i1.SlateModule, i4$2.FormsModule, i4$1.ThyIconModule,
12955
+ TheTdComponent,
12956
+ ThePlaceholderComponent], imports: [i6.CommonModule, i1.SlateModule, i4$2.FormsModule, i4$1.ThyIconModule,
12362
12957
  avatar.ThyAvatarModule,
12363
12958
  i2$1.ThyNavModule,
12364
12959
  i2$2.ThyFormModule,
12365
12960
  i5$3.ThySharedModule,
12366
- list.ThyListModule,
12961
+ i2$3.ThyListModule,
12367
12962
  i7.ThyTooltipModule,
12368
12963
  i4.ThyProgressModule,
12369
12964
  autocomplete.ThyAutocompleteModule,
@@ -12410,7 +13005,6 @@
12410
13005
  exports.AlignEditor = AlignEditor;
12411
13006
  exports.BLOCK_DELETEBACKWARD_TYPES = BLOCK_DELETEBACKWARD_TYPES;
12412
13007
  exports.BLOCK_INSERT_ORIGIN = BLOCK_INSERT_ORIGIN;
12413
- exports.BLOCK_TOOLBAR_HOTKEY = BLOCK_TOOLBAR_HOTKEY;
12414
13008
  exports.BlockquoteEditor = BlockquoteEditor;
12415
13009
  exports.CLIPBOARD_FORMAT_KEY = CLIPBOARD_FORMAT_KEY;
12416
13010
  exports.CODEMIRROR_PADDING_TOP = CODEMIRROR_PADDING_TOP;
@@ -12422,10 +13016,10 @@
12422
13016
  exports.ColorEditor = ColorEditor;
12423
13017
  exports.DEFAULT_LANGUAGE = DEFAULT_LANGUAGE;
12424
13018
  exports.DEFAULT_SCROLL_CONTAINER = DEFAULT_SCROLL_CONTAINER;
12425
- exports.DefaultBlockToolbarDefinition = DefaultBlockToolbarDefinition;
12426
13019
  exports.DefaultElementOptions = DefaultElementOptions;
12427
13020
  exports.DefaultGlobalToolbarDefinition = DefaultGlobalToolbarDefinition;
12428
13021
  exports.DefaultInlineToolbarDefinition = DefaultInlineToolbarDefinition;
13022
+ exports.DefaultQuickToolbarDefinition = DefaultQuickToolbarDefinition;
12429
13023
  exports.ELEMENT_UNIQUE_ID = ELEMENT_UNIQUE_ID;
12430
13024
  exports.HEADING_TYPES = HEADING_TYPES;
12431
13025
  exports.HeadingEditor = HeadingEditor;
@@ -12440,11 +13034,14 @@
12440
13034
  exports.PICTURE_ACCEPTED_UPLOAD_MIME = PICTURE_ACCEPTED_UPLOAD_MIME;
12441
13035
  exports.PICTURE_ACCEPTED_UPLOAD_SIZE = PICTURE_ACCEPTED_UPLOAD_SIZE;
12442
13036
  exports.PLUGIN_COMPONENTS = PLUGIN_COMPONENTS;
13037
+ exports.QUICK_TOOLBAR_HOTKEY = QUICK_TOOLBAR_HOTKEY;
13038
+ exports.QuickInsertEditor = QuickInsertEditor;
12443
13039
  exports.STANDARD_HEADING_TYPES = STANDARD_HEADING_TYPES;
12444
13040
  exports.TAB_SPACE = TAB_SPACE;
12445
13041
  exports.THE_CODE_MODE_PROVIDER = THE_CODE_MODE_PROVIDER;
12446
13042
  exports.THE_CODE_MODE_TOKEN = THE_CODE_MODE_TOKEN;
12447
13043
  exports.THE_EDITOR_CONVERSION_HINT_REF = THE_EDITOR_CONVERSION_HINT_REF;
13044
+ exports.THE_EDITOR_QUICK_TOOLBAR_REF = THE_EDITOR_QUICK_TOOLBAR_REF;
12448
13045
  exports.THE_EDITOR_UUID = THE_EDITOR_UUID;
12449
13046
  exports.THE_INLINE_TOOLBAR_TYPES = THE_INLINE_TOOLBAR_TYPES;
12450
13047
  exports.THE_UPLOAD_SERVICE_TOKEN = THE_UPLOAD_SERVICE_TOKEN;
@@ -12458,6 +13055,7 @@
12458
13055
  exports.TheEditorModule = TheEditorModule;
12459
13056
  exports.TheImageComponent = TheImageComponent;
12460
13057
  exports.TheQueries = index$1;
13058
+ exports.TheToolbarBaseItemComponent = TheToolbarBaseItemComponent;
12461
13059
  exports.TheToolbarComponent = TheToolbarComponent;
12462
13060
  exports.TheToolbarDropdownComponent = TheToolbarDropdownComponent;
12463
13061
  exports.TheToolbarGroupComponent = TheToolbarGroupComponent;