@worktile/theia 1.2.13 → 1.2.18

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 (64) hide show
  1. package/bundles/worktile-theia.umd.js +518 -179
  2. package/bundles/worktile-theia.umd.js.map +1 -1
  3. package/constants/code.d.ts +3 -3
  4. package/constants/default.d.ts +0 -1
  5. package/constants/node-types.d.ts +2 -1
  6. package/custom-types.d.ts +3 -1
  7. package/editor.module.d.ts +43 -39
  8. package/esm2015/components/text/text.component.js +7 -2
  9. package/esm2015/components/toolbar-item/toolbar-item.component.js +7 -3
  10. package/esm2015/constants/code.js +2 -2
  11. package/esm2015/constants/default.js +1 -2
  12. package/esm2015/constants/node-types.js +4 -2
  13. package/esm2015/constants/toolbar.js +2 -1
  14. package/esm2015/custom-types.js +1 -1
  15. package/esm2015/editor.component.js +5 -3
  16. package/esm2015/editor.module.js +14 -5
  17. package/esm2015/interfaces/editor.js +1 -1
  18. package/esm2015/interfaces/toolbar.js +1 -1
  19. package/esm2015/plugins/code/code.component.js +79 -33
  20. package/esm2015/plugins/code/code.editor.js +3 -9
  21. package/esm2015/plugins/common/block-card.plugin.js +51 -5
  22. package/esm2015/plugins/deserializers/deserialize-html.plugin.js +7 -1
  23. package/esm2015/plugins/deserializers/deserialize-md.plugin.js +7 -2
  24. package/esm2015/plugins/font-size/options.js +11 -0
  25. package/esm2015/plugins/font-size/toolbar-item.component.js +129 -0
  26. package/esm2015/plugins/index.js +16 -2
  27. package/esm2015/plugins/mark/options.js +6 -1
  28. package/esm2015/plugins/paint-format/options.js +4 -1
  29. package/esm2015/plugins/placeholder/placeholder.component.js +10 -6
  30. package/esm2015/plugins/soft-break/soft-break.plugin.js +18 -0
  31. package/esm2015/plugins/soft-break/soft-break.types.js +2 -0
  32. package/esm2015/plugins/table/table.editor.js +10 -2
  33. package/esm2015/plugins/table/table.plugin.js +53 -19
  34. package/esm2015/plugins/table/utils/calc-span.js +2 -2
  35. package/esm2015/plugins/table/utils/normalize-table.js +3 -3
  36. package/esm2015/plugins/table/utils/table-position.js +5 -2
  37. package/esm2015/queries/is-empty-content.js +2 -2
  38. package/esm2015/queries/is-empty-paragraph.js +6 -2
  39. package/esm2015/utils/common.js +3 -0
  40. package/esm2015/utils/index.js +2 -1
  41. package/fesm2015/worktile-theia.js +474 -144
  42. package/fesm2015/worktile-theia.js.map +1 -1
  43. package/interfaces/editor.d.ts +2 -0
  44. package/interfaces/toolbar.d.ts +1 -0
  45. package/package.json +1 -1
  46. package/plugins/code/code.component.d.ts +17 -5
  47. package/plugins/code/code.component.scss +46 -7
  48. package/plugins/code/code.editor.d.ts +3 -2
  49. package/plugins/font-size/options.d.ts +3 -0
  50. package/plugins/font-size/toolbar-item.component.d.ts +35 -0
  51. package/plugins/font-size/toolbar-item.component.scss +13 -0
  52. package/plugins/image/image.component.scss +172 -168
  53. package/plugins/placeholder/placeholder.component.d.ts +3 -2
  54. package/plugins/soft-break/soft-break.plugin.d.ts +4 -0
  55. package/plugins/soft-break/soft-break.types.d.ts +8 -0
  56. package/plugins/table/table.editor.d.ts +2 -0
  57. package/plugins/table/utils/calc-span.d.ts +1 -1
  58. package/queries/get-selection-marks.d.ts +1 -0
  59. package/styles/editor.scss +6 -0
  60. package/styles/index.scss +1 -0
  61. package/styles/typo.scss +13 -25
  62. package/transforms/set-marks.d.ts +1 -0
  63. package/utils/common.d.ts +2 -0
  64. package/utils/index.d.ts +1 -0
@@ -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/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';
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('ngx-tethys/switch'), require('ngx-tethys/resizable'), 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', 'ngx-tethys/switch', 'ngx-tethys/resizable', '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.i3, global.i5$1, global.i7, global.i1$4, global.i5$2, global.i5$3, global.i8, global.isUrl, global.i1$5, global.i2$1, global.i5$4, global.i1$6, global.ng.cdk.coercion, global.ng.cdk.portal, global.i2$2, 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, i3, i5$1, i7, i1$4, i5$2, i5$3, i8, isUrl, i1$5, i2$1, i5$4, i1$6, coercion, portal, i2$2, 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
 
@@ -32,23 +32,25 @@
32
32
  var _lodash__namespace = /*#__PURE__*/_interopNamespace(_lodash);
33
33
  var marked__default = /*#__PURE__*/_interopDefaultLegacy(marked);
34
34
  var i1__namespace$3 = /*#__PURE__*/_interopNamespace(i1$2);
35
- var i2__namespace$1 = /*#__PURE__*/_interopNamespace(i2);
35
+ var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
36
36
  var i1__namespace$1 = /*#__PURE__*/_interopNamespace(i1$1);
37
37
  var i1__namespace$2 = /*#__PURE__*/_interopNamespace(i1$3);
38
38
  var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
39
39
  var i4__namespace$1 = /*#__PURE__*/_interopNamespace(i4$1);
40
40
  var i5__namespace = /*#__PURE__*/_interopNamespace(i5);
41
- var i2__namespace = /*#__PURE__*/_interopNamespace(i2$1);
41
+ var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
42
+ var i5__namespace$1 = /*#__PURE__*/_interopNamespace(i5$1);
42
43
  var i7__namespace = /*#__PURE__*/_interopNamespace(i7);
43
- var i5__namespace$2 = /*#__PURE__*/_interopNamespace(i5$2);
44
44
  var i1__namespace$4 = /*#__PURE__*/_interopNamespace(i1$4);
45
- var i5__namespace$1 = /*#__PURE__*/_interopNamespace(i5$1);
45
+ var i5__namespace$2 = /*#__PURE__*/_interopNamespace(i5$2);
46
+ var i5__namespace$3 = /*#__PURE__*/_interopNamespace(i5$3);
47
+ var i8__namespace = /*#__PURE__*/_interopNamespace(i8);
46
48
  var isUrl__default = /*#__PURE__*/_interopDefaultLegacy(isUrl);
47
49
  var i1__namespace$5 = /*#__PURE__*/_interopNamespace(i1$5);
48
- var i2__namespace$2 = /*#__PURE__*/_interopNamespace(i2$2);
49
- var i5__namespace$3 = /*#__PURE__*/_interopNamespace(i5$3);
50
+ var i2__namespace$1 = /*#__PURE__*/_interopNamespace(i2$1);
51
+ var i5__namespace$4 = /*#__PURE__*/_interopNamespace(i5$4);
50
52
  var i1__namespace$6 = /*#__PURE__*/_interopNamespace(i1$6);
51
- var i2__namespace$3 = /*#__PURE__*/_interopNamespace(i2$3);
53
+ var i2__namespace$2 = /*#__PURE__*/_interopNamespace(i2$2);
52
54
 
53
55
  /*! *****************************************************************************
54
56
  Copyright (c) Microsoft Corporation.
@@ -376,7 +378,6 @@
376
378
  var ZERO_WIDTH_CHAR = '\u200B';
377
379
  var CLIPBOARD_FORMAT_KEY = 'x-theia-fragment';
378
380
  var DEFAULT_SCROLL_CONTAINER = '.the-editable-container';
379
- var BLOCK_INSERT_ORIGIN = 'block-insert';
380
381
  var ELEMENT_UNIQUE_ID = 'key';
381
382
  exports.TheMode = void 0;
382
383
  (function (TheMode) {
@@ -430,6 +431,7 @@
430
431
  MarkTypes["color"] = "color";
431
432
  MarkTypes["backgroundColor"] = "background-color";
432
433
  MarkTypes["codeLine"] = "code-line";
434
+ MarkTypes["fontSize"] = "font-size";
433
435
  })(exports.MarkTypes || (exports.MarkTypes = {}));
434
436
  exports.ToolbarActionTypes = void 0;
435
437
  (function (ToolbarActionTypes) {
@@ -458,7 +460,8 @@
458
460
  exports.MarkTypes.color,
459
461
  exports.MarkTypes.italic,
460
462
  exports.MarkTypes.strike,
461
- exports.MarkTypes.underline
463
+ exports.MarkTypes.underline,
464
+ exports.MarkTypes.fontSize
462
465
  ];
463
466
  var THE_INLINE_TOOLBAR_TYPES = [exports.ElementKinds.default, exports.ElementKinds.listItem, exports.ElementKinds.checkItem];
464
467
  var STANDARD_HEADING_TYPES = [
@@ -488,6 +491,7 @@
488
491
  })(exports.ToolbarItemMode || (exports.ToolbarItemMode = {}));
489
492
  var DefaultGlobalToolbarDefinition = [
490
493
  exports.ElementKinds.headingList,
494
+ exports.MarkTypes.fontSize,
491
495
  exports.ToolbarActionTypes.split,
492
496
  exports.MarkTypes.bold,
493
497
  exports.MarkTypes.italic,
@@ -621,10 +625,10 @@
621
625
  default: 'default',
622
626
  print: 'print'
623
627
  };
624
- var TheCodeMode = /** @class */ (function () {
625
- function TheCodeMode() {
628
+ var TheCodeConfig = /** @class */ (function () {
629
+ function TheCodeConfig() {
626
630
  }
627
- return TheCodeMode;
631
+ return TheCodeConfig;
628
632
  }());
629
633
  var THE_CODE_MODE_TOKEN = new i0.InjectionToken('the-code-mode');
630
634
  var THE_CODE_MODE_PROVIDER = {
@@ -641,7 +645,7 @@
641
645
  var _this = _super.call(this, elementRef, cdr) || this;
642
646
  _this.elementRef = elementRef;
643
647
  _this.renderer2 = renderer2;
644
- _this.excludes = ['color', 'background-color', 'text'];
648
+ _this.excludes = ['color', 'font-size', 'background-color', 'text'];
645
649
  _this.attributes = [];
646
650
  return _this;
647
651
  }
@@ -658,6 +662,11 @@
658
662
  this.attributes.push(attr);
659
663
  }
660
664
  }
665
+ var fontSize = this.text[exports.MarkTypes.fontSize];
666
+ if (fontSize) {
667
+ var attr = "the-" + exports.MarkTypes.fontSize;
668
+ this.renderer2.setAttribute(this.elementRef.nativeElement, attr, fontSize);
669
+ }
661
670
  if (this.text[exports.MarkTypes.color]) {
662
671
  this.renderer2.setStyle(this.elementRef.nativeElement, 'color', this.text[exports.MarkTypes.color]);
663
672
  }
@@ -829,7 +838,11 @@
829
838
  };
830
839
 
831
840
  var isEmptyParagraph = function (editor, at) {
832
- var _a = __read(getAnchorBlockEntry(editor, at), 1), block = _a[0];
841
+ var entry = getAnchorBlockEntry(editor, at);
842
+ if (!entry) {
843
+ return false;
844
+ }
845
+ var _a = __read(entry, 1), block = _a[0];
833
846
  return slate.Editor.isEmpty(editor, block) && block.type === exports.ElementKinds.paragraph;
834
847
  };
835
848
 
@@ -1527,7 +1540,7 @@
1527
1540
  }
1528
1541
  if (children && children.length === 1) {
1529
1542
  var firstNode = children[0];
1530
- if (firstNode.type === exports.ElementKinds.default && !slate.Node.string(firstNode)) {
1543
+ if (firstNode.type === exports.ElementKinds.default && firstNode.children.length === 1 && !slate.Node.string(firstNode)) {
1531
1544
  return true;
1532
1545
  }
1533
1546
  }
@@ -2378,6 +2391,9 @@
2378
2391
  return "the-toolbar-" + uuid;
2379
2392
  };
2380
2393
 
2394
+ var IS_MAC = typeof window != 'undefined' && /Mac|iPod|iPhone|iPad/.test(window.navigator.platform);
2395
+ var CONTROL_KEY = IS_MAC ? '⌘' : 'Ctrl';
2396
+
2381
2397
  var withDeserializeMd = function (options) { return function (editor) {
2382
2398
  var insertData = editor.insertData, onKeydown = editor.onKeydown;
2383
2399
  editor.onKeydown = function (event) {
@@ -2418,8 +2434,13 @@
2418
2434
  });
2419
2435
  return;
2420
2436
  }
2437
+ else {
2438
+ closeConversionHint(editor);
2439
+ }
2440
+ }
2441
+ catch (error) {
2442
+ closeConversionHint(editor);
2421
2443
  }
2422
- catch (error) { }
2423
2444
  }
2424
2445
  },
2425
2446
  origin: origin,
@@ -4720,20 +4741,66 @@
4720
4741
  // block card cursor
4721
4742
  if (anchorNode && i1.hasBlockCard(domSelection)) {
4722
4743
  var isCardLeftCursor = i1.isCardLeft(anchorNode);
4723
- // + left-block-card 或者 → + right-block-card
4724
- if ((isMoveDown && isCardLeftCursor) || (isMoveForward && !isCardLeftCursor)) {
4725
- nativeEvent.preventDefault();
4744
+ if (isMoveUp) {
4726
4745
  var _a = __read(i1.AngularEditor.toSlateCardEntry(editor, anchorNode), 2), path = _a[1];
4746
+ var previousPath = slate.Path.hasPrevious(path) && slate.Path.previous(path);
4747
+ var previousNode = previousPath && getNode(editor, previousPath);
4748
+ if (previousNode && editor.isBlockCard(previousNode)) {
4749
+ i1.AngularEditor.moveBlockCard(editor, previousNode, { direction: isCardLeftCursor ? 'left' : 'right' });
4750
+ }
4751
+ else {
4752
+ var before = slate.Editor.before(editor, path);
4753
+ if (before) {
4754
+ slate.Transforms.select(editor, before);
4755
+ }
4756
+ }
4757
+ nativeEvent.preventDefault();
4758
+ return;
4759
+ }
4760
+ if (isMoveDown) {
4761
+ var _b = __read(i1.AngularEditor.toSlateCardEntry(editor, anchorNode), 2), path = _b[1];
4762
+ var nextPath = slate.Path.next(path);
4763
+ var nextNode = getNode(editor, nextPath);
4764
+ if (nextNode && editor.isBlockCard(nextNode)) {
4765
+ i1.AngularEditor.moveBlockCard(editor, nextNode, { direction: isCardLeftCursor ? 'left' : 'right' });
4766
+ }
4767
+ else {
4768
+ var after = slate.Editor.after(editor, path);
4769
+ if (after) {
4770
+ slate.Transforms.select(editor, slate.Editor.after(editor, path));
4771
+ }
4772
+ }
4773
+ nativeEvent.preventDefault();
4774
+ return;
4775
+ }
4776
+ // → + right-block-card
4777
+ if ((isMoveForward && !isCardLeftCursor)) {
4778
+ nativeEvent.preventDefault();
4779
+ var _c = __read(i1.AngularEditor.toSlateCardEntry(editor, anchorNode), 2), path = _c[1];
4780
+ var nextPath = slate.Path.next(path);
4781
+ var nextNode = getNode(editor, nextPath);
4782
+ if (nextNode && editor.isBlockCard(nextNode)) {
4783
+ event.preventDefault();
4784
+ i1.AngularEditor.moveBlockCard(editor, nextNode, { direction: 'left' });
4785
+ return;
4786
+ }
4727
4787
  var after = slate.Editor.after(editor, path);
4728
4788
  if (after) {
4729
4789
  slate.Transforms.select(editor, slate.Editor.after(editor, path));
4730
4790
  }
4731
4791
  return;
4732
4792
  }
4733
- // ↑ + right-block-card 或者 ← + left-block-card
4734
- if ((isMoveUp && !isCardLeftCursor) || (isMoveBackward && isCardLeftCursor)) {
4793
+ // ← + left-block-card
4794
+ if (isMoveBackward && isCardLeftCursor) {
4735
4795
  nativeEvent.preventDefault();
4736
- var _b = __read(i1.AngularEditor.toSlateCardEntry(editor, anchorNode), 2), path = _b[1];
4796
+ var _d = __read(i1.AngularEditor.toSlateCardEntry(editor, anchorNode), 2), path = _d[1];
4797
+ var previousPath = slate.Path.hasPrevious(path) && slate.Path.previous(path);
4798
+ var previousNode = previousPath && getNode(editor, previousPath);
4799
+ if (previousNode && editor.isBlockCard(previousNode)) {
4800
+ event.preventDefault();
4801
+ i1.AngularEditor.moveBlockCard(editor, previousNode, { direction: 'right' });
4802
+ return;
4803
+ }
4737
4804
  var before = slate.Editor.before(editor, path);
4738
4805
  if (before) {
4739
4806
  slate.Transforms.select(editor, before);
@@ -4743,14 +4810,14 @@
4743
4810
  // move to card center
4744
4811
  if ((isCardLeftCursor && isMoveForward) || (!isCardLeftCursor && isMoveBackward)) {
4745
4812
  nativeEvent.preventDefault();
4746
- var _c = __read(i1.AngularEditor.toSlateCardEntry(editor, anchorNode), 2), path = _c[1];
4813
+ var _e = __read(i1.AngularEditor.toSlateCardEntry(editor, anchorNode), 2), path = _e[1];
4747
4814
  slate.Transforms.select(editor, isCardLeftCursor ? slate.Editor.start(editor, path) : slate.Editor.end(editor, path));
4748
4815
  return;
4749
4816
  }
4750
4817
  }
4751
4818
  // block card center
4752
4819
  if (isCollapsed && (isMoveUp || isMoveDown) && anchorEntry) {
4753
- var _d = __read(anchorEntry, 2), block = _d[0], path = _d[1];
4820
+ var _f = __read(anchorEntry, 2), block = _f[0], path = _f[1];
4754
4821
  if (editor.isBlockCard(block)) {
4755
4822
  event.preventDefault();
4756
4823
  slate.Transforms.select(editor, isMoveUp ? slate.Editor.before(editor, path) : slate.Editor.after(editor, path));
@@ -4758,7 +4825,7 @@
4758
4825
  }
4759
4826
  }
4760
4827
  if (isCollapsed && (isMoveBackward || isMoveForward) && anchorEntry) {
4761
- var _e = __read(anchorEntry, 1), block = _e[0];
4828
+ var _g = __read(anchorEntry, 1), block = _g[0];
4762
4829
  if (editor.isBlockCard(block)) {
4763
4830
  event.preventDefault();
4764
4831
  i1.AngularEditor.moveBlockCard(editor, block, { direction: isMoveBackward ? 'left' : 'right' });
@@ -5144,11 +5211,14 @@
5144
5211
  columnIndex++;
5145
5212
  nextCell = this.table.children[rowIndex].children[columnIndex];
5146
5213
  }
5147
- else {
5214
+ else if (rowIndex + 1 < this.getHeight()) {
5148
5215
  columnIndex = 0;
5149
5216
  rowIndex++;
5150
5217
  nextCell = this.table.children[rowIndex].children[columnIndex];
5151
5218
  }
5219
+ else {
5220
+ nextCell = null;
5221
+ }
5152
5222
  }
5153
5223
  return nextCell;
5154
5224
  };
@@ -5300,7 +5370,7 @@
5300
5370
  return rowspans.some(function (rowspan) { return isInside(rowspan, rowIndx, targetIndex); });
5301
5371
  });
5302
5372
  }
5303
- function calcOriginSpan(table, targetRowIndex, targetColumnIndex) {
5373
+ function getOriginCell(table, targetRowIndex, targetColumnIndex) {
5304
5374
  var _loop_1 = function (rowIndex) {
5305
5375
  var row = table.children[rowIndex];
5306
5376
  var originCell = row.children
@@ -5823,6 +5893,13 @@
5823
5893
  isActiveHeader: function (editor) {
5824
5894
  var _a = __read(slate.Editor.nodes(editor, { match: function (n) { return n.type === exports.ElementKinds.tableRow; } }), 1), tableRowEntry = _a[0];
5825
5895
  return tableRowEntry && tableRowEntry[0] && tableRowEntry[0].header;
5896
+ },
5897
+ selectOriginCell: function (editor, table, rowIndex, columnIndex, isStart) {
5898
+ var origin = getOriginCell(table, rowIndex, columnIndex);
5899
+ if (origin) {
5900
+ var path = i1.AngularEditor.findPath(editor, origin);
5901
+ slate.Transforms.select(editor, isStart ? slate.Editor.start(editor, path) : slate.Editor.end(editor, path));
5902
+ }
5826
5903
  }
5827
5904
  };
5828
5905
 
@@ -5858,6 +5935,7 @@
5858
5935
  key: exports.MarkTypes.bold,
5859
5936
  icon: 'bold',
5860
5937
  name: '加粗',
5938
+ shortcutKey: CONTROL_KEY + "+B",
5861
5939
  execute: function (editor) { return MarkEditor.toggleMark(editor, exports.MarkTypes.bold); },
5862
5940
  active: function (editor) { return MarkEditor.isMarkActive(editor, exports.MarkTypes.bold); }
5863
5941
  },
@@ -5865,6 +5943,7 @@
5865
5943
  key: exports.MarkTypes.italic,
5866
5944
  icon: 'italic',
5867
5945
  name: '斜体',
5946
+ shortcutKey: CONTROL_KEY + "+I",
5868
5947
  execute: function (editor) { return MarkEditor.toggleMark(editor, exports.MarkTypes.italic); },
5869
5948
  active: function (editor) { return MarkEditor.isMarkActive(editor, exports.MarkTypes.italic); }
5870
5949
  },
@@ -5879,6 +5958,7 @@
5879
5958
  key: exports.MarkTypes.underline,
5880
5959
  icon: 'underline',
5881
5960
  name: '下划线',
5961
+ shortcutKey: CONTROL_KEY + "+U",
5882
5962
  execute: function (editor) { return MarkEditor.toggleMark(editor, exports.MarkTypes.underline); },
5883
5963
  active: function (editor) { return MarkEditor.isMarkActive(editor, exports.MarkTypes.underline); }
5884
5964
  },
@@ -5886,6 +5966,7 @@
5886
5966
  key: exports.MarkTypes.codeLine,
5887
5967
  icon: 'code',
5888
5968
  name: '行内代码',
5969
+ shortcutKey: CONTROL_KEY + "+E",
5889
5970
  execute: function (editor) { return MarkEditor.toggleMark(editor, exports.MarkTypes.codeLine); },
5890
5971
  active: function (editor) { return MarkEditor.isMarkActive(editor, exports.MarkTypes.codeLine); }
5891
5972
  }
@@ -6498,7 +6579,7 @@
6498
6579
  return TheColorToolbarItemComponent;
6499
6580
  }(TheToolbarBaseItemComponent));
6500
6581
  TheColorToolbarItemComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheColorToolbarItemComponent, deps: [{ token: i1__namespace$3.ThyPopover }], target: i0__namespace.ɵɵFactoryTarget.Component });
6501
- TheColorToolbarItemComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheColorToolbarItemComponent, selector: "the-color-toolbar-item", inputs: { item: "item", editor: "editor" }, host: { classAttribute: "the-toolbar-item" }, usesInheritance: true, ngImport: i0__namespace, template: "\n <a\n class=\"link-width-down\"\n thyIconNavLink\n [ngStyle]=\"{\n width: item.key === 'color' ? '42px' : 'auto'\n }\"\n [thyTooltip]=\"item.name\"\n [thyIconNavLinkActive]=\"active\"\n thyTooltipPlacement=\"top\"\n (mousedown)=\"execute($event)\"\n >\n <thy-icon [thyIconName]=\"item.icon\" thyIconType=\"twotone\" [thyTwotoneColor]=\"active\"></thy-icon>\n <thy-icon\n [ngClass]=\"{\n 'link-down-icon': true,\n 'font-size-sm': true,\n 'text-desc': true\n }\"\n thyIconName=\"caret-down\"\n ></thy-icon>\n </a>\n ", isInline: true, components: [{ type: 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.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i7__namespace.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { type: i6__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
6582
+ TheColorToolbarItemComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheColorToolbarItemComponent, selector: "the-color-toolbar-item", inputs: { item: "item", editor: "editor" }, host: { classAttribute: "the-toolbar-item" }, usesInheritance: true, ngImport: i0__namespace, template: "\n <a\n class=\"link-width-down\"\n thyIconNavLink\n [ngStyle]=\"{\n width: item.key === 'color' ? '42px' : 'auto'\n }\"\n [thyTooltip]=\"item.name\"\n [thyIconNavLinkActive]=\"active\"\n thyTooltipPlacement=\"top\"\n (mousedown)=\"execute($event)\"\n >\n <thy-icon [thyIconName]=\"item.icon\" thyIconType=\"twotone\" [thyTwotoneColor]=\"active\"></thy-icon>\n <thy-icon\n [ngClass]=\"{\n 'link-down-icon': true,\n 'font-size-sm': true,\n 'text-desc': true\n }\"\n thyIconName=\"caret-down\"\n ></thy-icon>\n </a>\n ", isInline: true, components: [{ type: i3__namespace.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i4__namespace$1.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }], directives: [{ type: i6__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i5__namespace$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { type: i6__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
6502
6583
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheColorToolbarItemComponent, decorators: [{
6503
6584
  type: i0.Component,
6504
6585
  args: [{
@@ -6578,15 +6659,9 @@
6578
6659
  };
6579
6660
 
6580
6661
  var CodeEditor = {
6581
- setLanguage: function (editor, language, element) {
6662
+ setCodeAttribute: function (editor, element, value) {
6582
6663
  var at = i1.AngularEditor.findPath(editor, element);
6583
- slate.Transforms.setNodes(editor, { language: language }, {
6584
- at: at
6585
- });
6586
- },
6587
- setCodeContent: function (editor, content, element) {
6588
- var at = i1.AngularEditor.findPath(editor, element);
6589
- slate.Transforms.setNodes(editor, { content: content }, {
6664
+ slate.Transforms.setNodes(editor, value, {
6590
6665
  at: at
6591
6666
  });
6592
6667
  },
@@ -6764,8 +6839,8 @@
6764
6839
  };
6765
6840
  return TheToolbarDropdownComponent;
6766
6841
  }(TheToolbarBaseItemComponent));
6767
- TheToolbarDropdownComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheToolbarDropdownComponent, deps: [{ token: i0__namespace.ElementRef }, { token: i1__namespace$3.ThyPopover }, { token: i0__namespace.ViewContainerRef }, { token: i2__namespace$1.Overlay }], target: i0__namespace.ɵɵFactoryTarget.Component });
6768
- TheToolbarDropdownComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheToolbarDropdownComponent, selector: "the-toolbar-dropdown", inputs: { toolbarItem: "toolbarItem", menus: "menus", mode: "mode", item: "item", itemMousedownHandle: "itemMousedownHandle" }, host: { listeners: { "mousedown": "toggleDropdown($event)", "document: mousedown": "handleDocumentMouseDown($event)" }, classAttribute: "the-toolbar-dropdown-container" }, viewQueries: [{ propertyName: "iconModeTemplate", first: true, predicate: ["iconModeTemplate"], descendants: true, static: true }, { propertyName: "textModeTemplate", first: true, predicate: ["textModeTemplate"], descendants: true, static: true }, { propertyName: "dropdownTemplate", first: true, predicate: ["dropdownTemplate"], descendants: true, static: true }], usesInheritance: true, ngImport: i0__namespace, template: "<ng-template [ngTemplateOutlet]=\"template\"></ng-template>\n\n<ng-template #iconModeTemplate>\n <a thyIconNavLink class=\"icon-mode link-with-down\" [thyTooltip]=\"activeMenu?.name\" thyTooltipPlacement=\"top\">\n <thy-icon [thyIconName]=\"activeMenu?.icon\"></thy-icon>\n <thy-icon class=\"caret-down-icon font-size-sm text-desc\" thyIconName=\"caret-down\"></thy-icon>\n </a>\n</ng-template>\n\n<ng-template #textModeTemplate>\n <a thyIconNavLink class=\"text-mode\" [thyTooltip]=\"activeMenu?.name\" thyTooltipPlacement=\"top\">\n <span class=\"show-text\">{{ activeMenu?.name }}</span>\n <thy-icon class=\"text-caret-down-icon font-size-sm text-desc\" thyIconName=\"caret-down\"></thy-icon>\n </a>\n</ng-template>\n\n<ng-template #dropdownTemplate>\n <thy-action-menu class=\"dropdown\">\n <ng-container *ngFor=\"let menu of menus\">\n <a\n *ngIf=\"menu.key !== 'split'\"\n thyActionMenuItem\n href=\"javascript:;\"\n [thyActionMenuItemActive]=\"menu.key === activeMenu.key\"\n (mousedown)=\"itemMousedown($event, menu)\"\n [ngStyle]=\"menu?.styles\"\n >\n <span *ngIf=\"menu.icon && mode === dropdownMode.icon\" thyActionMenuItemIcon>\n <thy-icon [thyIconName]=\"menu.icon\"></thy-icon>\n </span>\n <span *ngIf=\"menu.name\" thyActionMenuItemName>{{ menu.name }}</span>\n </a>\n <thy-action-menu-divider *ngIf=\"menu.key === 'split'\"></thy-action-menu-divider>\n </ng-container>\n </thy-action-menu>\n</ng-template>\n", components: [{ type: 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: i5__namespace$1.ThyActionMenuComponent, selector: "thy-action-menu", inputs: ["thyTheme", "thyWidth"] }, { type: i5__namespace$1.ThyActionMenuDividerComponent, selector: "thy-action-menu-divider", inputs: ["thyTitle", "thyType"] }], directives: [{ type: i6__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i7__namespace.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { type: i6__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5__namespace$1.ThyActionMenuItemDirective, selector: "[thyActionMenuItem]", inputs: ["thyDisabled", "thyType"] }, { type: i5__namespace$1.ThyActionMenuItemActiveDirective, selector: "[thyActionMenuItemActive]", inputs: ["thyActionMenuItemActive"] }, { type: i6__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i5__namespace$1.ThyActionMenuItemIconDirective, selector: "[thyActionMenuItemIcon]" }, { type: i5__namespace$1.ThyActionMenuItemNameDirective, selector: "[thyActionMenuItemName]" }] });
6842
+ TheToolbarDropdownComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheToolbarDropdownComponent, deps: [{ token: i0__namespace.ElementRef }, { token: i1__namespace$3.ThyPopover }, { token: i0__namespace.ViewContainerRef }, { token: i2__namespace.Overlay }], target: i0__namespace.ɵɵFactoryTarget.Component });
6843
+ TheToolbarDropdownComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheToolbarDropdownComponent, selector: "the-toolbar-dropdown", inputs: { toolbarItem: "toolbarItem", menus: "menus", mode: "mode", item: "item", itemMousedownHandle: "itemMousedownHandle" }, host: { listeners: { "mousedown": "toggleDropdown($event)", "document: mousedown": "handleDocumentMouseDown($event)" }, classAttribute: "the-toolbar-dropdown-container" }, viewQueries: [{ propertyName: "iconModeTemplate", first: true, predicate: ["iconModeTemplate"], descendants: true, static: true }, { propertyName: "textModeTemplate", first: true, predicate: ["textModeTemplate"], descendants: true, static: true }, { propertyName: "dropdownTemplate", first: true, predicate: ["dropdownTemplate"], descendants: true, static: true }], usesInheritance: true, ngImport: i0__namespace, template: "<ng-template [ngTemplateOutlet]=\"template\"></ng-template>\n\n<ng-template #iconModeTemplate>\n <a thyIconNavLink class=\"icon-mode link-with-down\" [thyTooltip]=\"activeMenu?.name\" thyTooltipPlacement=\"top\">\n <thy-icon [thyIconName]=\"activeMenu?.icon\"></thy-icon>\n <thy-icon class=\"caret-down-icon font-size-sm text-desc\" thyIconName=\"caret-down\"></thy-icon>\n </a>\n</ng-template>\n\n<ng-template #textModeTemplate>\n <a thyIconNavLink class=\"text-mode\" [thyTooltip]=\"activeMenu?.name\" thyTooltipPlacement=\"top\">\n <span class=\"show-text\">{{ activeMenu?.name }}</span>\n <thy-icon class=\"text-caret-down-icon font-size-sm text-desc\" thyIconName=\"caret-down\"></thy-icon>\n </a>\n</ng-template>\n\n<ng-template #dropdownTemplate>\n <thy-action-menu class=\"dropdown\">\n <ng-container *ngFor=\"let menu of menus\">\n <a\n *ngIf=\"menu.key !== 'split'\"\n thyActionMenuItem\n href=\"javascript:;\"\n [thyActionMenuItemActive]=\"menu.key === activeMenu.key\"\n (mousedown)=\"itemMousedown($event, menu)\"\n [ngStyle]=\"menu?.styles\"\n >\n <span *ngIf=\"menu.icon && mode === dropdownMode.icon\" thyActionMenuItemIcon>\n <thy-icon [thyIconName]=\"menu.icon\"></thy-icon>\n </span>\n <span *ngIf=\"menu.name\" thyActionMenuItemName>{{ menu.name }}</span>\n </a>\n <thy-action-menu-divider *ngIf=\"menu.key === 'split'\"></thy-action-menu-divider>\n </ng-container>\n </thy-action-menu>\n</ng-template>\n", components: [{ type: i3__namespace.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i4__namespace$1.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { type: i5__namespace$2.ThyActionMenuComponent, selector: "thy-action-menu", inputs: ["thyTheme", "thyWidth"] }, { type: i5__namespace$2.ThyActionMenuDividerComponent, selector: "thy-action-menu-divider", inputs: ["thyTitle", "thyType"] }], directives: [{ type: i6__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i5__namespace$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { type: i6__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5__namespace$2.ThyActionMenuItemDirective, selector: "[thyActionMenuItem]", inputs: ["thyDisabled", "thyType"] }, { type: i5__namespace$2.ThyActionMenuItemActiveDirective, selector: "[thyActionMenuItemActive]", inputs: ["thyActionMenuItemActive"] }, { type: i6__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i5__namespace$2.ThyActionMenuItemIconDirective, selector: "[thyActionMenuItemIcon]" }, { type: i5__namespace$2.ThyActionMenuItemNameDirective, selector: "[thyActionMenuItemName]" }] });
6769
6844
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheToolbarDropdownComponent, decorators: [{
6770
6845
  type: i0.Component,
6771
6846
  args: [{
@@ -6775,7 +6850,7 @@
6775
6850
  class: 'the-toolbar-dropdown-container'
6776
6851
  }
6777
6852
  }]
6778
- }], ctorParameters: function () { return [{ type: i0__namespace.ElementRef }, { type: i1__namespace$3.ThyPopover }, { type: i0__namespace.ViewContainerRef }, { type: i2__namespace$1.Overlay }]; }, propDecorators: { toolbarItem: [{
6853
+ }], ctorParameters: function () { return [{ type: i0__namespace.ElementRef }, { type: i1__namespace$3.ThyPopover }, { type: i0__namespace.ViewContainerRef }, { type: i2__namespace.Overlay }]; }, propDecorators: { toolbarItem: [{
6779
6854
  type: i0.Input
6780
6855
  }], menus: [{
6781
6856
  type: i0.Input
@@ -6802,36 +6877,83 @@
6802
6877
  args: ['document: mousedown', ['$event']]
6803
6878
  }] } });
6804
6879
 
6880
+ var NavSplitLineComponent = /** @class */ (function () {
6881
+ function NavSplitLineComponent() {
6882
+ this.mode = exports.ToolbarItemMode.vertical;
6883
+ this.theNavSplitLine = true;
6884
+ }
6885
+ Object.defineProperty(NavSplitLineComponent.prototype, "horizontal", {
6886
+ get: function () {
6887
+ return this.mode === exports.ToolbarItemMode.horizontal;
6888
+ },
6889
+ enumerable: false,
6890
+ configurable: true
6891
+ });
6892
+ Object.defineProperty(NavSplitLineComponent.prototype, "vertical", {
6893
+ get: function () {
6894
+ return this.mode === exports.ToolbarItemMode.vertical;
6895
+ },
6896
+ enumerable: false,
6897
+ configurable: true
6898
+ });
6899
+ NavSplitLineComponent.prototype.ngOnInit = function () { };
6900
+ return NavSplitLineComponent;
6901
+ }());
6902
+ NavSplitLineComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: NavSplitLineComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
6903
+ 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 });
6904
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: NavSplitLineComponent, decorators: [{
6905
+ type: i0.Component,
6906
+ args: [{
6907
+ selector: 'nav-split-line',
6908
+ template: ''
6909
+ }]
6910
+ }], ctorParameters: function () { return []; }, propDecorators: { mode: [{
6911
+ type: i0.Input
6912
+ }], theNavSplitLine: [{
6913
+ type: i0.HostBinding,
6914
+ args: ['class.the-nav-split-line']
6915
+ }], horizontal: [{
6916
+ type: i0.HostBinding,
6917
+ args: ['class.horizontal']
6918
+ }], vertical: [{
6919
+ type: i0.HostBinding,
6920
+ args: ['class.vertical']
6921
+ }] } });
6922
+
6805
6923
  var TheCodeComponent = /** @class */ (function (_super) {
6806
6924
  __extends(TheCodeComponent, _super);
6807
- function TheCodeComponent(elementRef, cdr, thyNotifyService, ngZone, mode) {
6925
+ function TheCodeComponent(elementRef, cdr, thyNotifyService, ngZone, config) {
6808
6926
  var _this = _super.call(this, elementRef, cdr) || this;
6809
6927
  _this.elementRef = elementRef;
6810
6928
  _this.cdr = cdr;
6811
6929
  _this.thyNotifyService = thyNotifyService;
6812
6930
  _this.ngZone = ngZone;
6813
- _this.mode = mode;
6931
+ _this.config = config;
6814
6932
  _this.startRenderCodemirror = false;
6815
6933
  _this.dropdownMode = exports.DropdownMode;
6816
- _this.maxHeight = _this.mode === CodeMode.default ? 350 - CODEMIRROR_PADDING_TOP * 2 : 0;
6817
6934
  _this.codeMirrorFocused = false;
6935
+ _this.maxHeight = _this.config.mode === CodeMode.default ? 350 - CODEMIRROR_PADDING_TOP * 2 : 0;
6818
6936
  _this.menus = CODE_MODES.map(function (item) {
6819
6937
  return { key: item.value, name: item.showName };
6820
6938
  });
6939
+ _this.ToolbarItemMode = exports.ToolbarItemMode;
6940
+ _this.isAutoWrap = false;
6941
+ _this.isResizing = false;
6942
+ _this.resizeHeight = null;
6821
6943
  _this.options = {
6822
6944
  mode: _this.menus[0].key,
6823
6945
  lineNumbers: false,
6824
6946
  readOnly: false,
6825
6947
  autofocus: false,
6826
6948
  lineWiseCopyCut: true,
6827
- lineWrapping: _this.mode === CodeMode.default ? false : true,
6949
+ lineWrapping: _this.config.mode === CodeMode.default ? false : true,
6828
6950
  cursorBlinkRate: 500
6829
6951
  };
6830
6952
  _this.actives = _this.menus[0];
6831
6953
  _this.onChangeLangulage = function (item) {
6832
6954
  _this.options = Object.assign(Object.assign({}, _this.options), { mode: item.key });
6833
6955
  _this.actives = item;
6834
- CodeEditor.setLanguage(_this.editor, item.key, _this.element);
6956
+ CodeEditor.setCodeAttribute(_this.editor, _this.element, { langulage: item.key });
6835
6957
  };
6836
6958
  return _this;
6837
6959
  }
@@ -6842,6 +6964,11 @@
6842
6964
  enumerable: false,
6843
6965
  configurable: true
6844
6966
  });
6967
+ TheCodeComponent.prototype.handleCodeMousedown = function (event) {
6968
+ if (!(event.target instanceof HTMLElement && this.elementRef.nativeElement.contains(event.target))) {
6969
+ this.codeMirrorFocused = false;
6970
+ }
6971
+ };
6845
6972
  TheCodeComponent.prototype.onContextChange = function () {
6846
6973
  _super.prototype.onContextChange.call(this);
6847
6974
  if (this.initialized) {
@@ -6851,6 +6978,9 @@
6851
6978
  if (this.options.mode !== this.element.language) {
6852
6979
  this.useMode();
6853
6980
  }
6981
+ if (!this.readonly && this.isCollapsed) {
6982
+ this.initializeCodemirrorFocus();
6983
+ }
6854
6984
  }
6855
6985
  };
6856
6986
  TheCodeComponent.prototype.ngOnInit = function () {
@@ -6871,9 +7001,15 @@
6871
7001
  this.ngZone.onStable.pipe(operators.take(1)).subscribe(function () {
6872
7002
  _this.renderCodemirror();
6873
7003
  _this.initializeCodemirrorFocus();
7004
+ _this.useAutoWrap();
7005
+ _this.useHeight();
6874
7006
  });
6875
7007
  }
6876
7008
  };
7009
+ TheCodeComponent.prototype.focusChange = function (codeMirrorFocused) {
7010
+ if (codeMirrorFocused)
7011
+ this.codeMirrorFocused = codeMirrorFocused;
7012
+ };
6877
7013
  TheCodeComponent.prototype.renderCodemirror = function () {
6878
7014
  this.startRenderCodemirror = true;
6879
7015
  this.useReadonly();
@@ -6882,7 +7018,7 @@
6882
7018
  };
6883
7019
  TheCodeComponent.prototype.initializeCodemirrorFocus = function () {
6884
7020
  var _this = this;
6885
- if (this.isCollapsed) {
7021
+ if (this.isCollapsed && !this.isResizing) {
6886
7022
  setTimeout(function () {
6887
7023
  if (_this.isCollapsed && _this.codemirror && _this.codemirror.editor && !_this.codemirror.editor.hasFocus()) {
6888
7024
  i1.AngularEditor.blur(_this.editor);
@@ -6893,17 +7029,14 @@
6893
7029
  }
6894
7030
  };
6895
7031
  TheCodeComponent.prototype.codeChange = function ($event) {
6896
- CodeEditor.setCodeContent(this.editor, $event, this.element);
6897
- };
6898
- TheCodeComponent.prototype.focusChange = function (codeMirrorFocused) {
6899
- this.codeMirrorFocused = codeMirrorFocused;
7032
+ CodeEditor.setCodeAttribute(this.editor, this.element, { content: $event });
6900
7033
  };
6901
7034
  TheCodeComponent.prototype.onDelete = function (event) {
6902
7035
  event.preventDefault();
7036
+ this.codeMirrorFocused = false;
6903
7037
  deleteElement(this.editor, this.element);
6904
7038
  };
6905
7039
  TheCodeComponent.prototype.onCopy = function (event) {
6906
- var _this = this;
6907
7040
  event.preventDefault();
6908
7041
  event.stopPropagation();
6909
7042
  // remove codemorrir selection
@@ -6911,44 +7044,72 @@
6911
7044
  if (selection.rangeCount > 0) {
6912
7045
  selection.removeAllRanges();
6913
7046
  }
6914
- // focus the element
6915
- setTimeout(function () {
6916
- i1.AngularEditor.focus(_this.editor);
6917
- slate.Transforms.select(_this.editor, i1.AngularEditor.findPath(_this.editor, _this.element));
6918
- });
6919
- // copy the element
6920
- setTimeout(function () {
6921
- document.execCommand('copy');
6922
- _this.thyNotifyService.success('复制成功');
6923
- }, 200);
7047
+ i1.AngularEditor.focus(this.editor);
7048
+ slate.Transforms.select(this.editor, i1.AngularEditor.findPath(this.editor, this.element));
7049
+ document.execCommand('copy');
7050
+ this.thyNotifyService.success('复制成功');
7051
+ i1.AngularEditor.deselect(this.editor);
7052
+ this.codeMirrorFocused = false;
6924
7053
  };
6925
7054
  TheCodeComponent.prototype.useMode = function () {
6926
7055
  var _this = this;
6927
7056
  this.options = Object.assign(Object.assign({}, this.options), { mode: this.element.language });
6928
7057
  this.actives = this.menus.find(function (i) { return i.key === _this.element.language; });
6929
7058
  };
7059
+ TheCodeComponent.prototype.useAutoWrap = function () {
7060
+ if (this.element.autoWrap) {
7061
+ this.isAutoWrap = this.element.autoWrap;
7062
+ this.codemirror.setOptionIfChanged('lineWrapping', this.element.autoWrap);
7063
+ }
7064
+ };
7065
+ TheCodeComponent.prototype.useHeight = function () {
7066
+ if (this.element.height) {
7067
+ this.resizeHeight = this.element.height;
7068
+ this.maxHeight = this.element.height;
7069
+ }
7070
+ };
6930
7071
  TheCodeComponent.prototype.useReadonly = function () {
6931
7072
  this.options = Object.assign(Object.assign({}, this.options), { readOnly: this.readonly, cursorBlinkRate: this.readonly ? -1 : 500 });
6932
7073
  };
7074
+ TheCodeComponent.prototype.onResize = function (_a) {
7075
+ var height = _a.height;
7076
+ this.resizeHeight = height;
7077
+ slate.Transforms.select(this.editor, i1.AngularEditor.findPath(this.editor, this.element));
7078
+ CodeEditor.setCodeAttribute(this.editor, this.element, { height: height });
7079
+ this.maxHeight = height;
7080
+ };
7081
+ TheCodeComponent.prototype.onStartResize = function () {
7082
+ this.isResizing = true;
7083
+ };
7084
+ TheCodeComponent.prototype.onEndResize = function () {
7085
+ this.isResizing = false;
7086
+ };
7087
+ TheCodeComponent.prototype.onChangeWrap = function (value) {
7088
+ i1.AngularEditor.deselect(this.editor);
7089
+ this.codemirror.setOptionIfChanged('lineWrapping', value);
7090
+ CodeEditor.setCodeAttribute(this.editor, this.element, { autoWrap: value ? value : null });
7091
+ };
6933
7092
  return TheCodeComponent;
6934
7093
  }(TheBaseElementComponent));
6935
7094
  TheCodeComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheCodeComponent, deps: [{ token: i0__namespace.ElementRef }, { token: i0__namespace.ChangeDetectorRef }, { token: i1__namespace$4.ThyNotifyService }, { token: i0__namespace.NgZone }, { token: THE_CODE_MODE_TOKEN }], target: i0__namespace.ɵɵFactoryTarget.Component });
6936
- TheCodeComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheCodeComponent, selector: "div[theCode]", viewQueries: [{ propertyName: "codemirror", first: true, predicate: ["codemirror"], descendants: true, read: i5$2.CodeMirrorComponent }], usesInheritance: true, ngImport: i0__namespace, template: "<div contenteditable=\"false\" class=\"the-block-operation\" *ngIf=\"codeMirrorFocused && !options.readOnly\">\n <thy-icon-nav>\n <the-toolbar-dropdown [menus]=\"menus\" [item]=\"actives\" [itemMousedownHandle]=\"onChangeLangulage\"></the-toolbar-dropdown>\n <a\n href=\"javascript:;\"\n thyIconNavLink\n thyIconNavLinkIcon=\"copy\"\n thyTooltip=\"\u590D\u5236\"\n thyTooltipPlacement=\"top\"\n (mousedown)=\"onCopy($event)\"\n ></a>\n <a\n href=\"javascript:;\"\n thyIconNavLink\n thyIconNavLinkIcon=\"trash\"\n thyTooltip=\"\u5220\u9664\"\n class=\"remove-link\"\n thyTooltipPlacement=\"top\"\n (mousedown)=\"onDelete($event)\"\n ></a>\n </thy-icon-nav>\n</div>\n\n<slate-children [children]=\"children\" [context]=\"childrenContext\" [viewContext]=\"viewContext\"></slate-children>\n<ng-codemirror\n *ngIf=\"startRenderCodemirror\"\n #codemirror\n contenteditable=\"false\"\n class=\"ng-codemirror-wrapper\"\n [ngStyle]=\"{ maxHeight: maxHeight > 0 ? maxHeight + 'px' : 'auto' }\"\n [options]=\"options\"\n [ngModel]=\"code\"\n [delayRefreshTime]=\"300\"\n (ngModelChange)=\"codeChange($event)\"\n (focusChange)=\"focusChange($event)\"\n [autoMaxHeight]=\"maxHeight\"\n></ng-codemirror>\n", components: [{ type: i2__namespace.ThyIconNavComponent, selector: "thy-icon-nav", inputs: ["thyType"] }, { type: TheToolbarDropdownComponent, selector: "the-toolbar-dropdown", inputs: ["toolbarItem", "menus", "mode", "item", "itemMousedownHandle"] }, { type: i2__namespace.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i1__namespace.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }, { type: i5__namespace$2.CodeMirrorComponent, selector: "ng-codemirror, [ngCodeMirror]", inputs: ["autoMaxHeight", "delayRefreshTime", "options"], outputs: ["focusChange"] }], 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"] }, { 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"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
7095
+ TheCodeComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheCodeComponent, selector: "div[theCode]", host: { listeners: { "document: mousedown": "handleCodeMousedown($event)" } }, viewQueries: [{ propertyName: "codemirror", first: true, predicate: ["codemirror"], descendants: true, read: i7.CodeMirrorComponent }], usesInheritance: true, ngImport: i0__namespace, template: "<div contenteditable=\"false\" class=\"the-block-operation\" *ngIf=\"codeMirrorFocused && !options.readOnly\">\n <thy-icon-nav>\n <the-toolbar-dropdown [menus]=\"menus\" [item]=\"actives\" [itemMousedownHandle]=\"onChangeLangulage\"> </the-toolbar-dropdown>\n <a\n href=\"javascript:;\"\n thyIconNavLink\n thyIconNavLinkIcon=\"copy\"\n thyTooltip=\"\u590D\u5236\"\n thyTooltipPlacement=\"top\"\n (mousedown)=\"onCopy($event)\"\n ></a>\n <a\n href=\"javascript:;\"\n thyIconNavLink\n thyIconNavLinkIcon=\"trash\"\n thyTooltip=\"\u5220\u9664\"\n class=\"remove-link\"\n thyTooltipPlacement=\"top\"\n (mousedown)=\"onDelete($event)\"\n ></a>\n <nav-split-line [mode]=\"ToolbarItemMode.vertical\"></nav-split-line>\n <span class=\"auto-wrap d-flex align-items-center\">\n <span>\u81EA\u52A8\u6362\u884C</span>\n <thy-switch\n class=\"auto-wrap-btn d-flex\"\n [(ngModel)]=\"isAutoWrap\"\n (ngModelChange)=\"onChangeWrap($event)\"\n thySize=\"sm\"\n ></thy-switch>\n </span>\n </thy-icon-nav>\n</div>\n\n<slate-children [children]=\"children\" [context]=\"childrenContext\" [viewContext]=\"viewContext\"></slate-children>\n<div\n thyResizable\n [thyMinHeight]=\"42\"\n [style.height.px]=\"resizeHeight\"\n (thyResize)=\"onResize($event)\"\n (thyResizeStart)=\"onStartResize()\"\n (thyResizeEnd)=\"onEndResize()\"\n class=\"resize-code-container\"\n>\n <ng-codemirror\n *ngIf=\"startRenderCodemirror\"\n #codemirror\n contenteditable=\"false\"\n class=\"ng-codemirror-wrapper\"\n [ngStyle]=\"{ maxHeight: maxHeight > 0 ? maxHeight + 'px' : 'auto' }\"\n [options]=\"options\"\n [ngModel]=\"code\"\n [delayRefreshTime]=\"300\"\n (ngModelChange)=\"codeChange($event)\"\n (focusChange)=\"focusChange($event)\"\n [autoMaxHeight]=\"maxHeight\"\n >\n </ng-codemirror>\n <thy-resize-handle thyDirection=\"bottom\" class=\"code-resize-icon\" *ngIf=\"codeMirrorFocused && !options.readOnly\"></thy-resize-handle>\n</div>\n", components: [{ type: i3__namespace.ThyIconNavComponent, selector: "thy-icon-nav", inputs: ["thyType"] }, { type: TheToolbarDropdownComponent, selector: "the-toolbar-dropdown", inputs: ["toolbarItem", "menus", "mode", "item", "itemMousedownHandle"] }, { type: i3__namespace.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: NavSplitLineComponent, selector: "nav-split-line", inputs: ["mode"] }, { type: i5__namespace$3.ThySwitchComponent, selector: "thy-switch", inputs: ["thyType", "thySize", "thyDisabled"], outputs: ["thyChange"] }, { type: i1__namespace.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }, { type: i7__namespace.CodeMirrorComponent, selector: "ng-codemirror, [ngCodeMirror]", inputs: ["autoMaxHeight", "delayRefreshTime", "options"], outputs: ["focusChange"] }, { type: i8__namespace.ThyResizeHandleComponent, selector: "thy-resize-handle, [thy-resize-handle]", inputs: ["thyDirection"], outputs: ["thyMouseDown"], exportAs: ["thyResizeHandle"] }], directives: [{ type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5__namespace$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { 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"] }, { type: i8__namespace.ThyResizableDirective, selector: "[thyResizable]", inputs: ["thyBounds", "thyMaxHeight", "thyMaxWidth", "thyMinHeight", "thyMinWidth", "thyGridColumnCount", "thyMaxColumn", "thyMinColumn", "thyLockAspectRatio", "thyPreview", "thyDisabled"], outputs: ["thyResize", "thyResizeEnd", "thyResizeStart"] }, { type: i6__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
6937
7096
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheCodeComponent, decorators: [{
6938
7097
  type: i0.Component,
6939
7098
  args: [{
6940
7099
  selector: 'div[theCode]',
6941
- templateUrl: './code.component.html',
6942
- changeDetection: i0.ChangeDetectionStrategy.OnPush
7100
+ templateUrl: './code.component.html'
6943
7101
  }]
6944
7102
  }], ctorParameters: function () {
6945
- return [{ type: i0__namespace.ElementRef }, { type: i0__namespace.ChangeDetectorRef }, { type: i1__namespace$4.ThyNotifyService }, { type: i0__namespace.NgZone }, { type: CodeMode, decorators: [{
7103
+ return [{ type: i0__namespace.ElementRef }, { type: i0__namespace.ChangeDetectorRef }, { type: i1__namespace$4.ThyNotifyService }, { type: i0__namespace.NgZone }, { type: TheCodeConfig, decorators: [{
6946
7104
  type: i0.Inject,
6947
7105
  args: [THE_CODE_MODE_TOKEN]
6948
7106
  }] }];
6949
7107
  }, propDecorators: { codemirror: [{
6950
7108
  type: i0.ViewChild,
6951
- args: ['codemirror', { read: i5$2.CodeMirrorComponent, static: false }]
7109
+ args: ['codemirror', { read: i7.CodeMirrorComponent, static: false }]
7110
+ }], handleCodeMousedown: [{
7111
+ type: i0.HostListener,
7112
+ args: ['document: mousedown', ['$event']]
6952
7113
  }] } });
6953
7114
 
6954
7115
  var withCode = function (editor) {
@@ -7162,7 +7323,7 @@
7162
7323
  return TheLinkEditComponent;
7163
7324
  }());
7164
7325
  TheLinkEditComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheLinkEditComponent, deps: [{ token: i1__namespace$3.ThyPopoverRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
7165
- TheLinkEditComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheLinkEditComponent, selector: "the-link-edit", inputs: { tag: "tag", node: "node", link: "link", text: "text", originSelection: "originSelection" }, host: { listeners: { "document: mousedown": "handleDocumentMouseDown($event)" }, properties: { "class": "this.className" } }, ngImport: i0__namespace, template: "<form\n thyForm\n #linkForm=\"thyForm\"\n [thyFormValidatorConfig]=\"validatorConfig\"\n name=\"linkForm\"\n>\n <thy-form-group thyLabelText=\"\u6587\u672C\">\n <input\n thyInput\n placeholder=\"\u8BF7\u8F93\u5165\u6587\u672C\"\n required\n name=\"text\"\n [(ngModel)]=\"text\"\n thyAutofocus\n type=\"text\"\n />\n </thy-form-group>\n <thy-form-group thyLabelText=\"\u94FE\u63A5\">\n <input\n name=\"link\"\n thyInput\n placeholder=\"\u8BF7\u8F93\u5165\u94FE\u63A5\"\n required\n type=\"text\"\n #linkControl=\"ngModel\"\n [(ngModel)]=\"link\"\n />\n </thy-form-group>\n <thy-form-group-footer>\n <div class=\"btn-pair\">\n <button\n thyButton=\"link-secondary\"\n thySize=\"sm\"\n (click)=\"closePopover()\"\n >\u53D6\u6D88</button>\n <button\n thyButton=\"primary-square\"\n thySize=\"sm\"\n (thyFormSubmit)=\"applyLink(linkForm)\"\n >\u5E94\u7528</button>\n </div>\n </thy-form-group-footer>\n</form>\n", components: [{ type: i2__namespace$2.ThyFormGroupComponent, selector: "thy-form-group", inputs: ["thyLabelText", "thyLabelTextTranslateKey", "thyLabelRequired", "thyLabelPaddingTopClear", "thyFeedbackIcon", "thyTips", "thyTipsTranslateKey", "thyRowFill"] }, { type: i2__namespace$2.ThyFormGroupFooterComponent, selector: "thy-form-group-footer", inputs: ["thyAlign"] }, { type: i1__namespace$5.ThyButtonComponent, selector: "thy-button,[thy-button],[thyButton]", inputs: ["thyButton", "thyType", "thyLoading", "thyLoadingText", "thySize", "thyIcon", "thySquare", "thyBlock"] }], directives: [{ type: i4__namespace$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i4__namespace$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i4__namespace$2.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i2__namespace$2.ThyFormDirective, selector: "[thyForm],[thy-form]", inputs: ["thyLayout", "thyEnterKeyMode", "thyFormValidatorConfig"], exportAs: ["thyForm"] }, { type: i5__namespace$3.ThyAutofocusDirective, selector: "input[thyAutofocus],textarea[thyAutofocus]", inputs: ["thyAutoSelect", "thyAutofocus"] }, { type: i4__namespace$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.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { 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"] }, { type: i2__namespace$2.ThyFormSubmitDirective, selector: "[thyFormSubmit],[thy-form-submit]", outputs: ["thyFormSubmit"] }] });
7326
+ TheLinkEditComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheLinkEditComponent, selector: "the-link-edit", inputs: { tag: "tag", node: "node", link: "link", text: "text", originSelection: "originSelection" }, host: { listeners: { "document: mousedown": "handleDocumentMouseDown($event)" }, properties: { "class": "this.className" } }, ngImport: i0__namespace, template: "<form\n thyForm\n #linkForm=\"thyForm\"\n [thyFormValidatorConfig]=\"validatorConfig\"\n name=\"linkForm\"\n>\n <thy-form-group thyLabelText=\"\u6587\u672C\">\n <input\n thyInput\n placeholder=\"\u8BF7\u8F93\u5165\u6587\u672C\"\n required\n name=\"text\"\n [(ngModel)]=\"text\"\n thyAutofocus\n type=\"text\"\n />\n </thy-form-group>\n <thy-form-group thyLabelText=\"\u94FE\u63A5\">\n <input\n name=\"link\"\n thyInput\n placeholder=\"\u8BF7\u8F93\u5165\u94FE\u63A5\"\n required\n type=\"text\"\n #linkControl=\"ngModel\"\n [(ngModel)]=\"link\"\n />\n </thy-form-group>\n <thy-form-group-footer>\n <div class=\"btn-pair\">\n <button\n thyButton=\"link-secondary\"\n thySize=\"sm\"\n (click)=\"closePopover()\"\n >\u53D6\u6D88</button>\n <button\n thyButton=\"primary-square\"\n thySize=\"sm\"\n (thyFormSubmit)=\"applyLink(linkForm)\"\n >\u5E94\u7528</button>\n </div>\n </thy-form-group-footer>\n</form>\n", components: [{ type: i2__namespace$1.ThyFormGroupComponent, selector: "thy-form-group", inputs: ["thyLabelText", "thyLabelTextTranslateKey", "thyLabelRequired", "thyLabelPaddingTopClear", "thyFeedbackIcon", "thyTips", "thyTipsTranslateKey", "thyRowFill"] }, { type: i2__namespace$1.ThyFormGroupFooterComponent, selector: "thy-form-group-footer", inputs: ["thyAlign"] }, { type: i1__namespace$5.ThyButtonComponent, selector: "thy-button,[thy-button],[thyButton]", inputs: ["thyButton", "thyType", "thyLoading", "thyLoadingText", "thySize", "thyIcon", "thySquare", "thyBlock"] }], directives: [{ type: i4__namespace$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i4__namespace$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i4__namespace$2.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i2__namespace$1.ThyFormDirective, selector: "[thyForm],[thy-form]", inputs: ["thyLayout", "thyEnterKeyMode", "thyFormValidatorConfig"], exportAs: ["thyForm"] }, { type: i5__namespace$4.ThyAutofocusDirective, selector: "input[thyAutofocus],textarea[thyAutofocus]", inputs: ["thyAutoSelect", "thyAutofocus"] }, { 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.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { 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"] }, { type: i2__namespace$1.ThyFormSubmitDirective, selector: "[thyFormSubmit],[thy-form-submit]", outputs: ["thyFormSubmit"] }] });
7166
7327
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheLinkEditComponent, decorators: [{
7167
7328
  type: i0.Component,
7168
7329
  args: [{
@@ -7315,7 +7476,7 @@
7315
7476
  };
7316
7477
  return TheBaseLinkComponent;
7317
7478
  }(TheBaseElementComponent));
7318
- TheBaseLinkComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheBaseLinkComponent, deps: [{ token: i0__namespace.ElementRef }, { token: i0__namespace.ChangeDetectorRef }, { token: i1__namespace$3.ThyPopover }, { token: i2__namespace$1.Overlay }, { token: i0__namespace.ViewContainerRef }, { token: i1__namespace$6.ThyClickDispatcher }], target: i0__namespace.ɵɵFactoryTarget.Component });
7479
+ TheBaseLinkComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheBaseLinkComponent, deps: [{ token: i0__namespace.ElementRef }, { token: i0__namespace.ChangeDetectorRef }, { token: i1__namespace$3.ThyPopover }, { token: i2__namespace.Overlay }, { token: i0__namespace.ViewContainerRef }, { token: i1__namespace$6.ThyClickDispatcher }], target: i0__namespace.ɵɵFactoryTarget.Component });
7319
7480
  TheBaseLinkComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheBaseLinkComponent, selector: "[TheBaseLinkComponent]", host: { listeners: { "click": "mousedownHandle($event)" } }, usesInheritance: true, ngImport: i0__namespace, template: '', isInline: true });
7320
7481
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheBaseLinkComponent, decorators: [{
7321
7482
  type: i0.Component,
@@ -7323,7 +7484,7 @@
7323
7484
  selector: '[TheBaseLinkComponent]',
7324
7485
  template: ''
7325
7486
  }]
7326
- }], ctorParameters: function () { return [{ type: i0__namespace.ElementRef }, { type: i0__namespace.ChangeDetectorRef }, { type: i1__namespace$3.ThyPopover }, { type: i2__namespace$1.Overlay }, { type: i0__namespace.ViewContainerRef }, { type: i1__namespace$6.ThyClickDispatcher }]; }, propDecorators: { mousedownHandle: [{
7487
+ }], ctorParameters: function () { return [{ type: i0__namespace.ElementRef }, { type: i0__namespace.ChangeDetectorRef }, { type: i1__namespace$3.ThyPopover }, { type: i2__namespace.Overlay }, { type: i0__namespace.ViewContainerRef }, { type: i1__namespace$6.ThyClickDispatcher }]; }, propDecorators: { mousedownHandle: [{
7327
7488
  type: i0.HostListener,
7328
7489
  args: ['click', ['$event']]
7329
7490
  }] } });
@@ -7515,8 +7676,8 @@
7515
7676
  };
7516
7677
  return TheTableToolbarItemComponent;
7517
7678
  }(TheToolbarBaseItemComponent));
7518
- TheTableToolbarItemComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheTableToolbarItemComponent, deps: [{ token: i1__namespace$6.ThyPopover }, { token: i2__namespace$1.Overlay }], target: i0__namespace.ɵɵFactoryTarget.Component });
7519
- TheTableToolbarItemComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheTableToolbarItemComponent, selector: "the-table-toolbar-item", inputs: { item: "item", editor: "editor" }, host: { classAttribute: "the-toolbar-dropdown-container" }, usesInheritance: true, ngImport: i0__namespace, template: "\n <a\n thyIconNavLink\n class=\"link-with-down\"\n [thyTooltip]=\"item?.name\"\n thyTooltipPlacement=\"top\"\n [thyIconNavLinkActive]=\"active\"\n (mousedown)=\"execute($event)\"\n >\n <thy-icon [thyIconName]=\"item.icon\"></thy-icon>\n <thy-icon class=\"link-down-icon font-size-sm text-desc table-down-icon\" thyIconName=\"caret-down\"> </thy-icon>\n </a>\n ", isInline: true, components: [{ type: 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: i7__namespace.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }] });
7679
+ TheTableToolbarItemComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheTableToolbarItemComponent, deps: [{ token: i1__namespace$6.ThyPopover }, { token: i2__namespace.Overlay }], target: i0__namespace.ɵɵFactoryTarget.Component });
7680
+ TheTableToolbarItemComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheTableToolbarItemComponent, selector: "the-table-toolbar-item", inputs: { item: "item", editor: "editor" }, host: { classAttribute: "the-toolbar-dropdown-container" }, usesInheritance: true, ngImport: i0__namespace, template: "\n <a\n thyIconNavLink\n class=\"link-with-down\"\n [thyTooltip]=\"item?.name\"\n thyTooltipPlacement=\"top\"\n [thyIconNavLinkActive]=\"active\"\n (mousedown)=\"execute($event)\"\n >\n <thy-icon [thyIconName]=\"item.icon\"></thy-icon>\n <thy-icon class=\"link-down-icon font-size-sm text-desc table-down-icon\" thyIconName=\"caret-down\"> </thy-icon>\n </a>\n ", isInline: true, components: [{ type: i3__namespace.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i4__namespace$1.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }], directives: [{ type: i5__namespace$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }] });
7520
7681
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheTableToolbarItemComponent, decorators: [{
7521
7682
  type: i0.Component,
7522
7683
  args: [{
@@ -7526,7 +7687,7 @@
7526
7687
  class: 'the-toolbar-dropdown-container'
7527
7688
  }
7528
7689
  }]
7529
- }], ctorParameters: function () { return [{ type: i1__namespace$6.ThyPopover }, { type: i2__namespace$1.Overlay }]; }, propDecorators: { item: [{
7690
+ }], ctorParameters: function () { return [{ type: i1__namespace$6.ThyPopover }, { type: i2__namespace.Overlay }]; }, propDecorators: { item: [{
7530
7691
  type: i0.Input
7531
7692
  }], editor: [{
7532
7693
  type: i0.Input
@@ -8288,49 +8449,6 @@
8288
8449
  });
8289
8450
  }
8290
8451
 
8291
- var NavSplitLineComponent = /** @class */ (function () {
8292
- function NavSplitLineComponent() {
8293
- this.mode = exports.ToolbarItemMode.vertical;
8294
- this.theNavSplitLine = true;
8295
- }
8296
- Object.defineProperty(NavSplitLineComponent.prototype, "horizontal", {
8297
- get: function () {
8298
- return this.mode === exports.ToolbarItemMode.horizontal;
8299
- },
8300
- enumerable: false,
8301
- configurable: true
8302
- });
8303
- Object.defineProperty(NavSplitLineComponent.prototype, "vertical", {
8304
- get: function () {
8305
- return this.mode === exports.ToolbarItemMode.vertical;
8306
- },
8307
- enumerable: false,
8308
- configurable: true
8309
- });
8310
- NavSplitLineComponent.prototype.ngOnInit = function () { };
8311
- return NavSplitLineComponent;
8312
- }());
8313
- NavSplitLineComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: NavSplitLineComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
8314
- 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 });
8315
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: NavSplitLineComponent, decorators: [{
8316
- type: i0.Component,
8317
- args: [{
8318
- selector: 'nav-split-line',
8319
- template: ''
8320
- }]
8321
- }], ctorParameters: function () { return []; }, propDecorators: { mode: [{
8322
- type: i0.Input
8323
- }], theNavSplitLine: [{
8324
- type: i0.HostBinding,
8325
- args: ['class.the-nav-split-line']
8326
- }], horizontal: [{
8327
- type: i0.HostBinding,
8328
- args: ['class.horizontal']
8329
- }], vertical: [{
8330
- type: i0.HostBinding,
8331
- args: ['class.vertical']
8332
- }] } });
8333
-
8334
8452
  var TheTableToolbarComponent = /** @class */ (function () {
8335
8453
  function TheTableToolbarComponent(ngZone, colorSelectService, popoverRef) {
8336
8454
  var _this = this;
@@ -8452,7 +8570,7 @@
8452
8570
  return TheTableToolbarComponent;
8453
8571
  }());
8454
8572
  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 });
8455
- 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"] }] });
8573
+ 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: i3__namespace.ThyIconNavComponent, selector: "thy-icon-nav", inputs: ["thyType"] }, { type: i3__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: i5__namespace$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }] });
8456
8574
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheTableToolbarComponent, decorators: [{
8457
8575
  type: i0.Component,
8458
8576
  args: [{
@@ -8516,7 +8634,7 @@
8516
8634
  return TheContextMenuComponent;
8517
8635
  }());
8518
8636
  TheContextMenuComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheContextMenuComponent, deps: [{ token: i0__namespace.ElementRef }, { token: i1__namespace$3.ThyPopoverRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
8519
- TheContextMenuComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheContextMenuComponent, selector: "the-contextmenu", inputs: { menuEntities: "menuEntities", actionHandle: "actionHandle", activeHandle: "activeHandle", deactiveHandle: "deactiveHandle" }, host: { listeners: { "document: mousedown": "handleDocumentMouseDown($event)", "mousedown": "handleMouseDown($event)" }, properties: { "class.the-overlay-menu-wrap": "this.wrap" } }, ngImport: i0__namespace, template: "<thy-action-menu>\n <ng-container *ngFor=\"let menuItem of menuEntities\">\n <a\n thyActionMenuItem\n href=\"javascript:;\"\n *ngIf=\"!menuItem.invisibility\"\n (mousedown)=\"itemMousedown($event, menuItem)\"\n (mouseenter)=\"itemMouseenter($event, menuItem)\"\n (mouseleave)=\"itemMouseleave($event, menuItem)\"\n >\n <span thyActionMenuItemIcon>\n <thy-icon\n *ngIf=\"menuItem.backgroundColor; else elseIcon\"\n [thyIconName]=\"menuItem.icon\"\n thyIconType=\"twotone\"\n [thyTwotoneColor]=\"menuItem.backgroundColor\"\n ></thy-icon>\n <ng-template #elseIcon>\n <thy-icon [thyIconName]=\"menuItem.icon\"></thy-icon>\n </ng-template>\n </span>\n <span thyActionMenuItemName>{{ menuItem.name }}</span>\n <span *ngIf=\"menuItem.extendIcon\" thyActionMenuItemExtendIcon>\n <thy-icon thyIconName=\"{{ menuItem.extendIcon }}\"></thy-icon>\n </span>\n </a>\n <thy-action-menu-divider *ngIf=\"menuItem.divider\"></thy-action-menu-divider>\n </ng-container>\n</thy-action-menu>\n", components: [{ type: i5__namespace$1.ThyActionMenuComponent, selector: "thy-action-menu", inputs: ["thyTheme", "thyWidth"] }, { type: i4__namespace$1.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { type: i5__namespace$1.ThyActionMenuDividerComponent, selector: "thy-action-menu-divider", inputs: ["thyTitle", "thyType"] }], directives: [{ type: i6__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5__namespace$1.ThyActionMenuItemDirective, selector: "[thyActionMenuItem]", inputs: ["thyDisabled", "thyType"] }, { type: i5__namespace$1.ThyActionMenuItemIconDirective, selector: "[thyActionMenuItemIcon]" }, { type: i5__namespace$1.ThyActionMenuItemNameDirective, selector: "[thyActionMenuItemName]" }, { type: i5__namespace$1.ThyActionMenuItemExtendIconDirective, selector: "[thyActionMenuItemExtendIcon]" }] });
8637
+ TheContextMenuComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheContextMenuComponent, selector: "the-contextmenu", inputs: { menuEntities: "menuEntities", actionHandle: "actionHandle", activeHandle: "activeHandle", deactiveHandle: "deactiveHandle" }, host: { listeners: { "document: mousedown": "handleDocumentMouseDown($event)", "mousedown": "handleMouseDown($event)" }, properties: { "class.the-overlay-menu-wrap": "this.wrap" } }, ngImport: i0__namespace, template: "<thy-action-menu>\n <ng-container *ngFor=\"let menuItem of menuEntities\">\n <a\n thyActionMenuItem\n href=\"javascript:;\"\n *ngIf=\"!menuItem.invisibility\"\n (mousedown)=\"itemMousedown($event, menuItem)\"\n (mouseenter)=\"itemMouseenter($event, menuItem)\"\n (mouseleave)=\"itemMouseleave($event, menuItem)\"\n >\n <span thyActionMenuItemIcon>\n <thy-icon\n *ngIf=\"menuItem.backgroundColor; else elseIcon\"\n [thyIconName]=\"menuItem.icon\"\n thyIconType=\"twotone\"\n [thyTwotoneColor]=\"menuItem.backgroundColor\"\n ></thy-icon>\n <ng-template #elseIcon>\n <thy-icon [thyIconName]=\"menuItem.icon\"></thy-icon>\n </ng-template>\n </span>\n <span thyActionMenuItemName>{{ menuItem.name }}</span>\n <span *ngIf=\"menuItem.extendIcon\" thyActionMenuItemExtendIcon>\n <thy-icon thyIconName=\"{{ menuItem.extendIcon }}\"></thy-icon>\n </span>\n </a>\n <thy-action-menu-divider *ngIf=\"menuItem.divider\"></thy-action-menu-divider>\n </ng-container>\n</thy-action-menu>\n", components: [{ type: i5__namespace$2.ThyActionMenuComponent, selector: "thy-action-menu", inputs: ["thyTheme", "thyWidth"] }, { type: i4__namespace$1.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { type: i5__namespace$2.ThyActionMenuDividerComponent, selector: "thy-action-menu-divider", inputs: ["thyTitle", "thyType"] }], directives: [{ type: i6__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5__namespace$2.ThyActionMenuItemDirective, selector: "[thyActionMenuItem]", inputs: ["thyDisabled", "thyType"] }, { type: i5__namespace$2.ThyActionMenuItemIconDirective, selector: "[thyActionMenuItemIcon]" }, { type: i5__namespace$2.ThyActionMenuItemNameDirective, selector: "[thyActionMenuItemName]" }, { type: i5__namespace$2.ThyActionMenuItemExtendIconDirective, selector: "[thyActionMenuItemExtendIcon]" }] });
8520
8638
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheContextMenuComponent, decorators: [{
8521
8639
  type: i0.Component,
8522
8640
  args: [{
@@ -8827,11 +8945,11 @@
8827
8945
  };
8828
8946
  return TableService;
8829
8947
  }());
8830
- TableService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TableService, deps: [{ token: i1__namespace$3.ThyPopover }, { token: i2__namespace$1.Overlay }, { token: TableStore }, { token: TheTableContextMenuService }, { token: i0__namespace.NgZone }, { token: TheContextService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
8948
+ TableService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TableService, deps: [{ token: i1__namespace$3.ThyPopover }, { token: i2__namespace.Overlay }, { token: TableStore }, { token: TheTableContextMenuService }, { token: i0__namespace.NgZone }, { token: TheContextService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
8831
8949
  TableService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TableService });
8832
8950
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TableService, decorators: [{
8833
8951
  type: i0.Injectable
8834
- }], ctorParameters: function () { return [{ type: i1__namespace$3.ThyPopover }, { type: i2__namespace$1.Overlay }, { type: TableStore }, { type: TheTableContextMenuService }, { type: i0__namespace.NgZone }, { type: TheContextService }]; } });
8952
+ }], ctorParameters: function () { return [{ type: i1__namespace$3.ThyPopover }, { type: i2__namespace.Overlay }, { type: TableStore }, { type: TheTableContextMenuService }, { type: i0__namespace.NgZone }, { type: TheContextService }]; } });
8835
8953
 
8836
8954
  var SLA_TABLE_SELECTOR = '.slate-element-table';
8837
8955
  var SLA_TABLE_CELL_SELECTOR = '.slate-element-table-cell';
@@ -8919,7 +9037,7 @@
8919
9037
  return TheInsertMarkComponent;
8920
9038
  }());
8921
9039
  TheInsertMarkComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheInsertMarkComponent, deps: [{ token: i0__namespace.ChangeDetectorRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
8922
- TheInsertMarkComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheInsertMarkComponent, selector: "the-table-insert-mark", inputs: { type: "type", at: "at", tableStore: "tableStore" }, ngImport: i0__namespace, template: "<div\n [thyTooltip]=\"!disabled && tooltipContent\"\n class=\"the-table-controls-insert-wrapper\"\n [ngClass]=\"{ disabled: disabled }\"\n contenteditable=\"false\"\n (mousedown)=\"onMouseDown($event)\"\n (mouseenter)=\"onMouseEnter($event)\"\n (mouseleave)=\"onMouseLeave($event)\"\n>\n <div\n class=\"the-table-controls-insert-line\"\n *ngIf=\"dotWrapperHovered\"\n [attr.data-dot-type]=\"type\"\n [ngStyle]=\"{ height: type === 'column' && insertLength, width: type === 'row' && insertLength }\"\n ></div>\n</div>\n", directives: [{ type: i7__namespace.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { type: i6__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
9040
+ TheInsertMarkComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheInsertMarkComponent, selector: "the-table-insert-mark", inputs: { type: "type", at: "at", tableStore: "tableStore" }, ngImport: i0__namespace, template: "<div\n [thyTooltip]=\"!disabled && tooltipContent\"\n class=\"the-table-controls-insert-wrapper\"\n [ngClass]=\"{ disabled: disabled }\"\n contenteditable=\"false\"\n (mousedown)=\"onMouseDown($event)\"\n (mouseenter)=\"onMouseEnter($event)\"\n (mouseleave)=\"onMouseLeave($event)\"\n>\n <div\n class=\"the-table-controls-insert-line\"\n *ngIf=\"dotWrapperHovered\"\n [attr.data-dot-type]=\"type\"\n [ngStyle]=\"{ height: type === 'column' && insertLength, width: type === 'row' && insertLength }\"\n ></div>\n</div>\n", directives: [{ type: i5__namespace$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { type: i6__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
8923
9041
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheInsertMarkComponent, decorators: [{
8924
9042
  type: i0.Component,
8925
9043
  args: [{
@@ -10584,7 +10702,7 @@
10584
10702
  };
10585
10703
  return TheTdComponent;
10586
10704
  }(TheBaseElementComponent));
10587
- TheTdComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheTdComponent, deps: [{ token: i0__namespace.ElementRef }, { token: i0__namespace.ChangeDetectorRef }, { token: i0__namespace.Renderer2 }, { token: i0__namespace.ViewContainerRef }, { token: i0__namespace.NgZone }, { token: i0__namespace.Injector }, { token: i2__namespace$1.Overlay }, { token: ColumnResizingStore }, { token: i2__namespace$1.ScrollDispatcher }], target: i0__namespace.ɵɵFactoryTarget.Component });
10705
+ TheTdComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheTdComponent, deps: [{ token: i0__namespace.ElementRef }, { token: i0__namespace.ChangeDetectorRef }, { token: i0__namespace.Renderer2 }, { token: i0__namespace.ViewContainerRef }, { token: i0__namespace.NgZone }, { token: i0__namespace.Injector }, { token: i2__namespace.Overlay }, { token: ColumnResizingStore }, { token: i2__namespace.ScrollDispatcher }], target: i0__namespace.ɵɵFactoryTarget.Component });
10588
10706
  TheTdComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheTdComponent, selector: "td[theTd]", host: { properties: { "style.backgroundColor": "this.backgroundColor", "attr.colspan": "this.colspan", "attr.rowspan": "this.rowspan", "style.display": "this.display" } }, providers: [ColumnResizingStore], viewQueries: [{ propertyName: "cellInner", first: true, predicate: ["cellInner"], descendants: true, static: true }], usesInheritance: true, ngImport: i0__namespace, template: "<div #cellInner>\n <slate-children [children]=\"children\" [context]=\"childrenContext\" [viewContext]=\"viewContext\"></slate-children>\n</div>\n", components: [{ type: i1__namespace.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }] });
10589
10707
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheTdComponent, decorators: [{
10590
10708
  type: i0.Component,
@@ -10593,7 +10711,7 @@
10593
10711
  templateUrl: './td.component.html',
10594
10712
  providers: [ColumnResizingStore]
10595
10713
  }]
10596
- }], ctorParameters: function () { return [{ type: i0__namespace.ElementRef }, { type: i0__namespace.ChangeDetectorRef }, { type: i0__namespace.Renderer2 }, { type: i0__namespace.ViewContainerRef }, { type: i0__namespace.NgZone }, { type: i0__namespace.Injector }, { type: i2__namespace$1.Overlay }, { type: ColumnResizingStore }, { type: i2__namespace$1.ScrollDispatcher }]; }, propDecorators: { backgroundColor: [{
10714
+ }], ctorParameters: function () { return [{ type: i0__namespace.ElementRef }, { type: i0__namespace.ChangeDetectorRef }, { type: i0__namespace.Renderer2 }, { type: i0__namespace.ViewContainerRef }, { type: i0__namespace.NgZone }, { type: i0__namespace.Injector }, { type: i2__namespace.Overlay }, { type: ColumnResizingStore }, { type: i2__namespace.ScrollDispatcher }]; }, propDecorators: { backgroundColor: [{
10597
10715
  type: i0.HostBinding,
10598
10716
  args: ['style.backgroundColor']
10599
10717
  }], colspan: [{
@@ -10630,7 +10748,7 @@
10630
10748
  }
10631
10749
  // case 2
10632
10750
  if (cell.hidden && !normalizedNodes.includes(cell)) {
10633
- var origin = calcOriginSpan(table, rowIndex, columnIndex);
10751
+ var origin = getOriginCell(table, rowIndex, columnIndex);
10634
10752
  if (!origin) {
10635
10753
  delete table.children[rowIndex].children[columnIndex].hidden;
10636
10754
  }
@@ -10641,7 +10759,7 @@
10641
10759
  };
10642
10760
 
10643
10761
  var withTable = function (editor) {
10644
- var deleteBackward = editor.deleteBackward, deleteForward = editor.deleteForward, onKeydown = editor.onKeydown, setFragmentData = editor.setFragmentData, insertData = editor.insertData, normalizeNode = editor.normalizeNode, isBlockCard = editor.isBlockCard, renderElement = editor.renderElement, deleteCutData = editor.deleteCutData, isContainer = editor.isContainer;
10762
+ var deleteBackward = editor.deleteBackward, deleteForward = editor.deleteForward, onKeydown = editor.onKeydown, setFragmentData = editor.setFragmentData, insertData = editor.insertData, normalizeNode = editor.normalizeNode, isBlockCard = editor.isBlockCard, renderElement = editor.renderElement, deleteCutData = editor.deleteCutData, isContainer = editor.isContainer, onChange = editor.onChange;
10645
10763
  editor.deleteBackward = function (unit) {
10646
10764
  var opts = new TableOptions$1();
10647
10765
  if (!isSelectionInTable(opts, editor)) {
@@ -10712,13 +10830,11 @@
10712
10830
  var aboveCell = aboveRow && aboveRow.children[startPosition.getColumnIndex()];
10713
10831
  if (aboveCell) {
10714
10832
  if (aboveCell.hidden) {
10715
- var originSpan = calcOriginSpan(endPosition.table, startPosition.getRowIndex() - 1, startPosition.getColumnIndex());
10716
- if (originSpan) {
10717
- at = slate.Editor.start(editor, TheEditor.findPath(editor, originSpan));
10718
- }
10833
+ TableEditor.selectOriginCell(editor, startPosition.table, startPosition.getRowIndex() - 1, startPosition.getColumnIndex(), false);
10834
+ return;
10719
10835
  }
10720
10836
  else {
10721
- at = slate.Editor.start(editor, TheEditor.findPath(editor, aboveCell));
10837
+ at = slate.Editor.end(editor, TheEditor.findPath(editor, aboveCell));
10722
10838
  }
10723
10839
  }
10724
10840
  else {
@@ -10747,10 +10863,8 @@
10747
10863
  var belowCell = belowRow && belowRow.children[startPosition.getColumnIndex()];
10748
10864
  if (belowCell) {
10749
10865
  if (belowCell.hidden) {
10750
- var originSpan = calcOriginSpan(endPosition.table, belowRowIndex, startPosition.getColumnIndex());
10751
- if (originSpan) {
10752
- at = slate.Editor.start(editor, TheEditor.findPath(editor, originSpan));
10753
- }
10866
+ TableEditor.selectOriginCell(editor, startPosition.table, startPosition.getRowIndex() + 1, startPosition.getColumnIndex(), true);
10867
+ return;
10754
10868
  }
10755
10869
  else {
10756
10870
  at = slate.Editor.start(editor, TheEditor.findPath(editor, belowCell));
@@ -10769,18 +10883,27 @@
10769
10883
  var beforePoint = slate.Editor.before(editor, editor.selection);
10770
10884
  var beforePosition = beforePoint && TablePosition.create(opts, editor, beforePoint.path);
10771
10885
  if (beforePosition && beforePosition.cell && beforePosition.cell.hidden) {
10886
+ event.preventDefault();
10772
10887
  var at = slate.Editor.end(editor, TheEditor.findPath(editor, beforePosition.findPrevious()));
10773
10888
  slate.Transforms.select(editor, at);
10774
- event.preventDefault();
10775
10889
  }
10776
10890
  }
10777
10891
  if (isMoveForward) {
10778
10892
  var afterPoint = slate.Editor.after(editor, editor.selection);
10779
10893
  var afterPosition = afterPoint && TablePosition.create(opts, editor, afterPoint.path);
10780
10894
  if (afterPosition.cell && afterPosition.cell.hidden) {
10781
- var at = slate.Editor.start(editor, TheEditor.findPath(editor, afterPosition.findNext()));
10782
- slate.Transforms.select(editor, at);
10783
10895
  event.preventDefault();
10896
+ var nextCell = afterPosition.findNext();
10897
+ if (nextCell) {
10898
+ var at = slate.Editor.start(editor, TheEditor.findPath(editor, afterPosition.findNext()));
10899
+ slate.Transforms.select(editor, at);
10900
+ event.preventDefault();
10901
+ }
10902
+ else {
10903
+ i1.AngularEditor.moveBlockCard(editor, startPosition.tableEntry[0], { direction: 'right' });
10904
+ event.preventDefault();
10905
+ }
10906
+ return;
10784
10907
  }
10785
10908
  }
10786
10909
  // Prevent deleting cells in the table
@@ -10861,12 +10984,12 @@
10861
10984
  }
10862
10985
  if (tableFragment) {
10863
10986
  tableFragment = normalizeTable(_.cloneDeep(tableFragment));
10987
+ var plainText = slate.Node.string(tableFragment);
10864
10988
  tableFragment = [tableFragment];
10865
10989
  var stringObj = JSON.stringify(tableFragment);
10866
10990
  var encoded = window.btoa(encodeURIComponent(stringObj));
10867
10991
  unit.setData("application/" + CLIPBOARD_FORMAT_KEY, encoded);
10868
- // unit.setData('text/html', div.innerHTML);
10869
- unit.setData('text/plain', slate.Node.string(tableFragment));
10992
+ unit.setData('text/plain', plainText);
10870
10993
  return;
10871
10994
  }
10872
10995
  setFragmentData(unit);
@@ -10891,7 +11014,7 @@
10891
11014
  for (var j = selectColIndex_1; j <= lastColIndex_1; j++) {
10892
11015
  var row = tablePosition_1.table.children[i];
10893
11016
  if (row && row.children[j]) {
10894
- var originCell = calcOriginSpan(tablePosition_1.table, i, j);
11017
+ var originCell = getOriginCell(tablePosition_1.table, i, j);
10895
11018
  if (originCell && (originCell.colspan || originCell.rowspan)) {
10896
11019
  var path = TheEditor.findPath(editor, originCell).slice(-2);
10897
11020
  resetTableCell(editor, tablePosition_1.table, originCell, path[0], path[1]);
@@ -10949,6 +11072,21 @@
10949
11072
  slate.Transforms.setNodes(editor, { columns: columns }, { at: entry[1] });
10950
11073
  }
10951
11074
  }
11075
+ // adjust selection when selection is in hidden cell
11076
+ if (slate.Element.isElement(entry[0]) && entry[0].type === exports.ElementKinds.tableCell && entry[0].hidden) {
11077
+ if (editor.selection && slate.Range.isCollapsed(editor.selection) && slate.Path.isAncestor(entry[1], editor.selection.anchor.path)) {
11078
+ setTimeout(function () {
11079
+ var opts = new TableOptions$1();
11080
+ var tablePosition = TablePosition.create(opts, editor, editor.selection.anchor.path);
11081
+ var origin = getOriginCell(tablePosition.table, tablePosition.getRowIndex(), tablePosition.getColumnIndex());
11082
+ if (origin) {
11083
+ var path = i1.AngularEditor.findPath(editor, origin);
11084
+ slate.Transforms.select(editor, slate.Editor.end(editor, path));
11085
+ }
11086
+ }, 0);
11087
+ return;
11088
+ }
11089
+ }
10952
11090
  normalizeNode(entry);
10953
11091
  };
10954
11092
  editor.isBlockCard = function (element) {
@@ -10996,6 +11134,20 @@
10996
11134
  editor.isContainer = function (element) {
10997
11135
  return element.type === exports.ElementKinds.tableCell ? true : isContainer(element);
10998
11136
  };
11137
+ editor.onChange = function () {
11138
+ onChange();
11139
+ // adujst selection when selection is in hidden cell
11140
+ // just hook set_selection
11141
+ var isCollapsed = editor.selection && slate.Range.isCollapsed(editor.selection);
11142
+ var isSelectionOperation = editor.operations.every(function (op) { return slate.Operation.isSelectionOperation(op); });
11143
+ if (isCollapsed && isSelectionOperation) {
11144
+ var opts = new TableOptions$1();
11145
+ var tablePosition = TablePosition.create(opts, editor, editor.selection.anchor.path);
11146
+ if (tablePosition.isInTable() && tablePosition.cell.hidden) {
11147
+ TableEditor.selectOriginCell(editor, tablePosition.table, tablePosition.getRowIndex(), tablePosition.getColumnIndex(), false);
11148
+ }
11149
+ }
11150
+ };
10999
11151
  return editor;
11000
11152
  };
11001
11153
 
@@ -11034,6 +11186,12 @@
11034
11186
  insertData(data);
11035
11187
  return;
11036
11188
  }
11189
+ // 识出纯图片并且粘贴板中存在文件则不进行处理, hook 直接右键复制图片的场景,流转到上传图片流程
11190
+ // 后续需要做识别html图片后自动上传处理
11191
+ if (fragment.length === 1 && fragment[0].type === exports.ElementKinds.image && data.files.length > 0) {
11192
+ insertData(data);
11193
+ return;
11194
+ }
11037
11195
  // 过滤 text 节点的 color/background-color 属性
11038
11196
  fragment.forEach(function (node) { return deleteColorAndBackgroundColorOfText(node); });
11039
11197
  slate.Transforms.insertFragment(editor, fragment);
@@ -11134,7 +11292,7 @@
11134
11292
  return TheVerticalToolbarItemComponent;
11135
11293
  }(TheToolbarBaseItemComponent));
11136
11294
  TheVerticalToolbarItemComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheVerticalToolbarItemComponent, deps: [{ token: i0__namespace.ElementRef }, { token: i1__namespace$6.ThyPopover }, { token: i0__namespace.ViewContainerRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
11137
- TheVerticalToolbarItemComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheVerticalToolbarItemComponent, selector: "the-toolbar-vertical-align-item", inputs: { item: "item", menus: "menus", editor: "editor", toolbarItem: "toolbarItem" }, host: { listeners: { "document: mousedown": "handleDocumentMouseDown($event)" }, properties: { "class.hide": "!active" }, classAttribute: "the-toolbar-dropdown-container verticalAlign" }, viewQueries: [{ propertyName: "template", first: true, predicate: ["VerticalAlignItems"], descendants: true, read: i0.TemplateRef, static: true }], usesInheritance: true, ngImport: i0__namespace, template: "<a\n thyIconNavLink\n class=\"icon-mode link-with-down\"\n [thyTooltip]=\"toolbarItem?.name\"\n [thyIconNavLinkActive]=\"isOpened\"\n thyTooltipPlacement=\"top\"\n (mousedown)=\"execute($event)\"\n>\n <thy-icon [thyIconName]=\"activeMenu?.icon\"></thy-icon>\n <thy-icon class=\"caret-down-icon font-size-sm text-desc\" thyIconName=\"caret-down\"></thy-icon>\n</a>\n\n<ng-template #VerticalAlignItems>\n <thy-action-menu class=\"dropdown\">\n <ng-container *ngFor=\"let menu of toolbarItem?.includes\">\n <a\n thyActionMenuItem\n href=\"javascript:;\"\n [thyActionMenuItemActive]=\"menu.key === activeMenu?.key\"\n [ngStyle]=\"menu?.styles\"\n (mousedown)=\"itemMousedown($event, menu)\"\n >\n <span *ngIf=\"menu.icon\" thyActionMenuItemIcon>\n <thy-icon [thyIconName]=\"menu?.icon\"></thy-icon>\n </span>\n <span thyActionMenuItemName>{{ menu.name }}</span>\n </a>\n </ng-container>\n </thy-action-menu>\n</ng-template>\n", components: [{ type: 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: i5__namespace$1.ThyActionMenuComponent, selector: "thy-action-menu", inputs: ["thyTheme", "thyWidth"] }], directives: [{ type: i7__namespace.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { type: i6__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i5__namespace$1.ThyActionMenuItemDirective, selector: "[thyActionMenuItem]", inputs: ["thyDisabled", "thyType"] }, { type: i5__namespace$1.ThyActionMenuItemActiveDirective, selector: "[thyActionMenuItemActive]", inputs: ["thyActionMenuItemActive"] }, { type: i6__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5__namespace$1.ThyActionMenuItemIconDirective, selector: "[thyActionMenuItemIcon]" }, { type: i5__namespace$1.ThyActionMenuItemNameDirective, selector: "[thyActionMenuItemName]" }] });
11295
+ TheVerticalToolbarItemComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheVerticalToolbarItemComponent, selector: "the-toolbar-vertical-align-item", inputs: { item: "item", menus: "menus", editor: "editor", toolbarItem: "toolbarItem" }, host: { listeners: { "document: mousedown": "handleDocumentMouseDown($event)" }, properties: { "class.hide": "!active" }, classAttribute: "the-toolbar-dropdown-container verticalAlign" }, viewQueries: [{ propertyName: "template", first: true, predicate: ["VerticalAlignItems"], descendants: true, read: i0.TemplateRef, static: true }], usesInheritance: true, ngImport: i0__namespace, template: "<a\n thyIconNavLink\n class=\"icon-mode link-with-down\"\n [thyTooltip]=\"toolbarItem?.name\"\n [thyIconNavLinkActive]=\"isOpened\"\n thyTooltipPlacement=\"top\"\n (mousedown)=\"execute($event)\"\n>\n <thy-icon [thyIconName]=\"activeMenu?.icon\"></thy-icon>\n <thy-icon class=\"caret-down-icon font-size-sm text-desc\" thyIconName=\"caret-down\"></thy-icon>\n</a>\n\n<ng-template #VerticalAlignItems>\n <thy-action-menu class=\"dropdown\">\n <ng-container *ngFor=\"let menu of toolbarItem?.includes\">\n <a\n thyActionMenuItem\n href=\"javascript:;\"\n [thyActionMenuItemActive]=\"menu.key === activeMenu?.key\"\n [ngStyle]=\"menu?.styles\"\n (mousedown)=\"itemMousedown($event, menu)\"\n >\n <span *ngIf=\"menu.icon\" thyActionMenuItemIcon>\n <thy-icon [thyIconName]=\"menu?.icon\"></thy-icon>\n </span>\n <span thyActionMenuItemName>{{ menu.name }}</span>\n </a>\n </ng-container>\n </thy-action-menu>\n</ng-template>\n", components: [{ type: i3__namespace.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i4__namespace$1.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { type: i5__namespace$2.ThyActionMenuComponent, selector: "thy-action-menu", inputs: ["thyTheme", "thyWidth"] }], directives: [{ type: i5__namespace$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { type: i6__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i5__namespace$2.ThyActionMenuItemDirective, selector: "[thyActionMenuItem]", inputs: ["thyDisabled", "thyType"] }, { type: i5__namespace$2.ThyActionMenuItemActiveDirective, selector: "[thyActionMenuItemActive]", inputs: ["thyActionMenuItemActive"] }, { type: i6__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5__namespace$2.ThyActionMenuItemIconDirective, selector: "[thyActionMenuItemIcon]" }, { type: i5__namespace$2.ThyActionMenuItemNameDirective, selector: "[thyActionMenuItemName]" }] });
11138
11296
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheVerticalToolbarItemComponent, decorators: [{
11139
11297
  type: i0.Component,
11140
11298
  args: [{
@@ -11268,12 +11426,14 @@
11268
11426
  key: exports.ToolbarActionTypes.undo,
11269
11427
  icon: 'undo',
11270
11428
  name: '撤销',
11429
+ shortcutKey: CONTROL_KEY + "+Z",
11271
11430
  execute: function (editor) { return editor.undo(); }
11272
11431
  },
11273
11432
  {
11274
11433
  key: exports.ToolbarActionTypes.redo,
11275
11434
  icon: 'redo',
11276
11435
  name: '重做',
11436
+ shortcutKey: CONTROL_KEY + "+Shift+Z",
11277
11437
  execute: function (editor) { return editor.redo(); }
11278
11438
  },
11279
11439
  {
@@ -11394,12 +11554,12 @@
11394
11554
  return TheToolbarItemComponent;
11395
11555
  }(TheToolbarBaseItemComponent));
11396
11556
  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 });
11397
- 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"] }] });
11557
+ 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]=\"tooltip\"\n [thyTooltipTemplateContext]=\"{ name: item.name, shortcutKey: item.shortcutKey }\"\n thyTooltipPlacement=\"top\"\n [thyIconNavLinkActive]=\"active\"\n (mousedown)=\"execute($event)\"\n ></a>\n </ng-container>\n <ng-template #selectionItem>\n <ng-container *ngIf=\"!item?.quickItemComponent\">\n <thy-icon [thyIconName]=\"item?.icon\" [thyIconRotate]=\"0\" class=\"quick-toolbar-icon\"></thy-icon>\n <span class=\"quick-toolbar-name\">{{ item?.name }}</span>\n </ng-container>\n </ng-template>\n <ng-template #tooltip let-data> {{ data.name }} {{ data.shortcutKey }} </ng-template>\n <ng-container #toolbarContainer></ng-container>\n ", isInline: true, components: [{ type: i3__namespace.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i4__namespace$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: i5__namespace$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }] });
11398
11558
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheToolbarItemComponent, decorators: [{
11399
11559
  type: i0.Component,
11400
11560
  args: [{
11401
11561
  selector: 'the-toolbar-item',
11402
- 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 ",
11562
+ template: "\n <ng-container *ngIf=\"itemMode === ToolbarItemMode.horizontal; else selectionItem\">\n <a\n thyIconNavLink\n [thyIconNavLinkIcon]=\"item.icon\"\n [thyTooltip]=\"tooltip\"\n [thyTooltipTemplateContext]=\"{ name: item.name, shortcutKey: item.shortcutKey }\"\n thyTooltipPlacement=\"top\"\n [thyIconNavLinkActive]=\"active\"\n (mousedown)=\"execute($event)\"\n ></a>\n </ng-container>\n <ng-template #selectionItem>\n <ng-container *ngIf=\"!item?.quickItemComponent\">\n <thy-icon [thyIconName]=\"item?.icon\" [thyIconRotate]=\"0\" class=\"quick-toolbar-icon\"></thy-icon>\n <span class=\"quick-toolbar-name\">{{ item?.name }}</span>\n </ng-container>\n </ng-template>\n <ng-template #tooltip let-data> {{ data.name }} {{ data.shortcutKey }} </ng-template>\n <ng-container #toolbarContainer></ng-container>\n ",
11403
11563
  host: {
11404
11564
  class: 'the-toolbar-item'
11405
11565
  }
@@ -11461,7 +11621,7 @@
11461
11621
  return TheQuickToolbarComponent;
11462
11622
  }(core.mixinUnsubscribe(core.MixinBase)));
11463
11623
  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 });
11464
- 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"] }] });
11624
+ 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$2.ThySelectionListComponent, selector: "thy-selection-list,[thy-selection-list]", inputs: ["thyMultiple", "thyBindKeyEventContainer", "thyScrollContainer", "thyBeforeKeydown", "thyUniqueKey", "thyCompareWith", "thyLayout", "thyAutoActiveFirstItem", "thySize", "thySpaceKeyEnabled"], outputs: ["thySelectionChange"] }, { type: i5__namespace$4.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"] }] });
11465
11625
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheQuickToolbarComponent, decorators: [{
11466
11626
  type: i0.Component,
11467
11627
  args: [{
@@ -11565,6 +11725,161 @@
11565
11725
  return editor;
11566
11726
  };
11567
11727
 
11728
+ var withSoftBreak = function (options) {
11729
+ if (options === void 0) { options = { rules: [{ hotkey: 'shift+enter' }] }; }
11730
+ return function (editor) {
11731
+ var onKeydown = editor.onKeydown;
11732
+ editor.onKeydown = function (event) {
11733
+ var rules = options.rules;
11734
+ var entry = getBlockAbove(editor);
11735
+ rules.forEach(function (_a) {
11736
+ var hotkey = _a.hotkey, query = _a.query;
11737
+ if (isHotkey__default["default"](hotkey, event) && isNodeType(entry, query)) {
11738
+ event.preventDefault();
11739
+ editor.insertText('\n');
11740
+ }
11741
+ });
11742
+ onKeydown(event);
11743
+ };
11744
+ return editor;
11745
+ };
11746
+ };
11747
+
11748
+ var TheFontSizeToolbarItemComponent = /** @class */ (function (_super) {
11749
+ __extends(TheFontSizeToolbarItemComponent, _super);
11750
+ function TheFontSizeToolbarItemComponent(elementRef, thyPopover, viewContainerRef, overlay) {
11751
+ var _this = _super.call(this) || this;
11752
+ _this.elementRef = elementRef;
11753
+ _this.thyPopover = thyPopover;
11754
+ _this.viewContainerRef = viewContainerRef;
11755
+ _this.overlay = overlay;
11756
+ _this.fontSizes = FontSizes;
11757
+ _this.disabled = false;
11758
+ _this.disableGroup = HEADING_TYPES;
11759
+ _this.toolbarItemContainer = true;
11760
+ _this.fontSizeToolbarItem = true;
11761
+ return _this;
11762
+ }
11763
+ Object.defineProperty(TheFontSizeToolbarItemComponent.prototype, "isOpen", {
11764
+ get: function () {
11765
+ return this.dropdownPopoverRef && this.dropdownPopoverRef.getOverlayRef() && this.dropdownPopoverRef.getOverlayRef().hasAttached();
11766
+ },
11767
+ enumerable: false,
11768
+ configurable: true
11769
+ });
11770
+ Object.defineProperty(TheFontSizeToolbarItemComponent.prototype, "disableClass", {
11771
+ get: function () {
11772
+ return this.disabled;
11773
+ },
11774
+ enumerable: false,
11775
+ configurable: true
11776
+ });
11777
+ TheFontSizeToolbarItemComponent.prototype.toggleDropdown = function (event) {
11778
+ var _a;
11779
+ _super.prototype.execute.call(this, event);
11780
+ if (((_a = this.editor) === null || _a === void 0 ? void 0 : _a.disabled) || this.disabled) {
11781
+ return;
11782
+ }
11783
+ this.openDropdownPopover();
11784
+ };
11785
+ TheFontSizeToolbarItemComponent.prototype.handleDocumentMouseDown = function (event) {
11786
+ if (!this.elementRef.nativeElement.contains(event.target)) {
11787
+ this.closeDropdownPopover();
11788
+ }
11789
+ };
11790
+ TheFontSizeToolbarItemComponent.prototype.ngOnInit = function () {
11791
+ this.activeSize = this.fontSizes[2];
11792
+ };
11793
+ TheFontSizeToolbarItemComponent.prototype.statusChange = function (editor) {
11794
+ if (editor.selection) {
11795
+ var anchorBlock$1 = anchorBlock(editor);
11796
+ if (anchorBlock$1 && this.disableGroup.includes(anchorBlock$1.type)) {
11797
+ this.activeSize = null;
11798
+ this.disabled = true;
11799
+ return;
11800
+ }
11801
+ var marks = getSelectionMarks(editor);
11802
+ var fontSizeMark = marks[exports.MarkTypes.fontSize];
11803
+ this.activeSize = fontSizeMark ? fontSizeMark : this.fontSizes[2];
11804
+ this.disabled = false;
11805
+ }
11806
+ };
11807
+ TheFontSizeToolbarItemComponent.prototype.itemMousedown = function (event, size) {
11808
+ var _a, _b;
11809
+ _super.prototype.execute.call(this, event);
11810
+ this.closeDropdownPopover();
11811
+ if (((_a = this.editor) === null || _a === void 0 ? void 0 : _a.disabled) || ((_b = this.editor) === null || _b === void 0 ? void 0 : _b.readOnly)) {
11812
+ return;
11813
+ }
11814
+ var anchorBlock$1 = anchorBlock(this.editor);
11815
+ if (anchorBlock$1 && this.disableGroup.includes(anchorBlock$1.type)) {
11816
+ return;
11817
+ }
11818
+ slate.Editor.addMark(this.editor, exports.MarkTypes.fontSize, size);
11819
+ };
11820
+ TheFontSizeToolbarItemComponent.prototype.openDropdownPopover = function () {
11821
+ var _a;
11822
+ this.dropdownPopoverRef = this.thyPopover.open(this.dropdownTemplate, {
11823
+ origin: this.elementRef,
11824
+ panelClass: ['the-toolbar-dropdown-popover', (_a = this.item) === null || _a === void 0 ? void 0 : _a.key],
11825
+ placement: 'bottomLeft',
11826
+ insideClosable: false,
11827
+ backdropClosable: true,
11828
+ hasBackdrop: false,
11829
+ offset: 10,
11830
+ viewContainerRef: this.viewContainerRef,
11831
+ scrollStrategy: this.overlay.scrollStrategies.reposition()
11832
+ });
11833
+ };
11834
+ TheFontSizeToolbarItemComponent.prototype.closeDropdownPopover = function () {
11835
+ var _a;
11836
+ if (this.dropdownPopoverRef) {
11837
+ (_a = this.dropdownPopoverRef) === null || _a === void 0 ? void 0 : _a.close();
11838
+ }
11839
+ };
11840
+ return TheFontSizeToolbarItemComponent;
11841
+ }(TheToolbarBaseItemComponent));
11842
+ TheFontSizeToolbarItemComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheFontSizeToolbarItemComponent, deps: [{ token: i0__namespace.ElementRef }, { token: i1__namespace$3.ThyPopover }, { token: i0__namespace.ViewContainerRef }, { token: i2__namespace.Overlay }], target: i0__namespace.ɵɵFactoryTarget.Component });
11843
+ TheFontSizeToolbarItemComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheFontSizeToolbarItemComponent, selector: "the-font-size-toolbar-item", inputs: { editor: "editor", item: "item" }, host: { listeners: { "mousedown": "toggleDropdown($event)", "document: mousedown": "handleDocumentMouseDown($event)" }, properties: { "class.the-toolbar-dropdown-container": "this.toolbarItemContainer", "class.the-font-size-toolbar-item": "this.fontSizeToolbarItem", "class.disabled": "this.disableClass" } }, viewQueries: [{ propertyName: "dropdownTemplate", first: true, predicate: ["dropdownTemplate"], descendants: true, static: true }], usesInheritance: true, ngImport: i0__namespace, template: "<a thyIconNavLink class=\"text-mode\" [thyTooltip]=\"item?.name\" thyTooltipPlacement=\"top\">\n <span *ngIf=\"activeSize\" class=\"show-text\">{{ activeSize }}px</span>\n <thy-icon class=\"text-caret-down-icon font-size-sm text-desc\" thyIconName=\"caret-down\"></thy-icon>\n</a>\n\n<ng-template #dropdownTemplate>\n <thy-action-menu class=\"dropdown\">\n <ng-container *ngFor=\"let size of fontSizes\">\n <a\n thyActionMenuItem\n href=\"javascript:;\"\n [thyActionMenuItemActive]=\"size === activeSize\"\n (mousedown)=\"itemMousedown($event, size)\"\n >\n <span thyActionMenuItemName>{{ size }}px</span>\n </a>\n </ng-container>\n </thy-action-menu>\n</ng-template>\n", components: [{ type: i3__namespace.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i4__namespace$1.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { type: i5__namespace$2.ThyActionMenuComponent, selector: "thy-action-menu", inputs: ["thyTheme", "thyWidth"] }], directives: [{ type: i5__namespace$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i5__namespace$2.ThyActionMenuItemDirective, selector: "[thyActionMenuItem]", inputs: ["thyDisabled", "thyType"] }, { type: i5__namespace$2.ThyActionMenuItemActiveDirective, selector: "[thyActionMenuItemActive]", inputs: ["thyActionMenuItemActive"] }, { type: i5__namespace$2.ThyActionMenuItemNameDirective, selector: "[thyActionMenuItemName]" }] });
11844
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheFontSizeToolbarItemComponent, decorators: [{
11845
+ type: i0.Component,
11846
+ args: [{
11847
+ selector: 'the-font-size-toolbar-item',
11848
+ templateUrl: './toolbar-item.component.html'
11849
+ }]
11850
+ }], ctorParameters: function () { return [{ type: i0__namespace.ElementRef }, { type: i1__namespace$3.ThyPopover }, { type: i0__namespace.ViewContainerRef }, { type: i2__namespace.Overlay }]; }, propDecorators: { editor: [{
11851
+ type: i0.Input
11852
+ }], item: [{
11853
+ type: i0.Input
11854
+ }], dropdownTemplate: [{
11855
+ type: i0.ViewChild,
11856
+ args: ['dropdownTemplate', { static: true }]
11857
+ }], toolbarItemContainer: [{
11858
+ type: i0.HostBinding,
11859
+ args: ['class.the-toolbar-dropdown-container']
11860
+ }], fontSizeToolbarItem: [{
11861
+ type: i0.HostBinding,
11862
+ args: ['class.the-font-size-toolbar-item']
11863
+ }], disableClass: [{
11864
+ type: i0.HostBinding,
11865
+ args: ['class.disabled']
11866
+ }], toggleDropdown: [{
11867
+ type: i0.HostListener,
11868
+ args: ['mousedown', ['$event']]
11869
+ }], handleDocumentMouseDown: [{
11870
+ type: i0.HostListener,
11871
+ args: ['document: mousedown', ['$event']]
11872
+ }] } });
11873
+
11874
+ var FontSizes = [12, 13, 14, 15, 16, 19, 22, 24, 29, 32, 40, 48];
11875
+ var FontSizeOptions = [
11876
+ {
11877
+ key: exports.MarkTypes.fontSize,
11878
+ name: '字号',
11879
+ iconComponent: TheFontSizeToolbarItemComponent
11880
+ }
11881
+ ];
11882
+
11568
11883
  var internalPlugins = [
11569
11884
  withTheHistory,
11570
11885
  withAutoInsertData(),
@@ -11582,6 +11897,17 @@
11582
11897
  withCode,
11583
11898
  withHeading,
11584
11899
  withMark(),
11900
+ withSoftBreak({
11901
+ rules: [
11902
+ { hotkey: 'shift+enter' },
11903
+ {
11904
+ hotkey: 'enter',
11905
+ query: {
11906
+ allow: [exports.ElementKinds.blockquote]
11907
+ }
11908
+ }
11909
+ ]
11910
+ }),
11585
11911
  withBlockquote,
11586
11912
  withNodeID({ idKey: ELEMENT_UNIQUE_ID, idCreator: idCreator }),
11587
11913
  withAutoFormat({ rules: autoFormatRules }),
@@ -11590,12 +11916,12 @@
11590
11916
  withMoveSelection,
11591
11917
  withInsertParagraphNodes(),
11592
11918
  withGetFragment(),
11919
+ withImage,
11593
11920
  withDeserializeHMTL,
11594
11921
  withDeserializeMd(),
11595
- withImage,
11596
11922
  withQuickInsert
11597
11923
  ];
11598
- 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));
11924
+ var internalToolbarItems = __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], __read(AlignOptions)), __read(MarkOptions)), __read(ColorOptions)), __read(HeadingOptions)), __read(FontSizeOptions)), __read(TodoItemOptions)), __read(ListOptions)), __read(ImageOptions)), __read(HrOptions)), __read(BlockquoteOptions)), __read(CodeOptions)), __read(LinkOptions)), __read(TableOptions)), __read(VerticalAlignOptions)), __read(PaintFormatOptions));
11599
11925
  var toolbarCompose = function (toolbarItems) {
11600
11926
  if (toolbarItems === void 0) { toolbarItems = []; }
11601
11927
  return __spreadArray(__spreadArray([], __read(internalToolbarItems)), __read(toolbarItems));
@@ -11987,7 +12313,7 @@
11987
12313
  return TheToolbarComponent;
11988
12314
  }());
11989
12315
  TheToolbarComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheToolbarComponent, deps: [{ token: i0__namespace.ComponentFactoryResolver }, { token: i0__namespace.ElementRef }, { token: i0__namespace.NgZone }, { token: TheToolbarGroupToken }], target: i0__namespace.ɵɵFactoryTarget.Component });
11990
- TheToolbarComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheToolbarComponent, selector: "the-toolbar", inputs: { editor: "editor", toolbarItems: "toolbarItems", align: "align", containerClass: "containerClass", isMore: "isMore", afterTemplate: "afterTemplate" }, host: { classAttribute: "the-toolbar-container" }, viewQueries: [{ propertyName: "toolbarContainer", first: true, predicate: ["toolbarContainer"], descendants: true, read: i0.ViewContainerRef, static: true }], usesOnChanges: true, ngImport: i0__namespace, template: "<thy-icon-nav [style.justifyContent]=\"align\">\n <ng-container #toolbarContainer></ng-container>\n <ng-content></ng-content>\n <ng-template *ngIf=\"afterTemplate\" [ngTemplateOutlet]=\"afterTemplate\"></ng-template>\n</thy-icon-nav>\n", components: [{ type: i2__namespace.ThyIconNavComponent, selector: "thy-icon-nav", inputs: ["thyType"] }], directives: [{ type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }] });
12316
+ TheToolbarComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheToolbarComponent, selector: "the-toolbar", inputs: { editor: "editor", toolbarItems: "toolbarItems", align: "align", containerClass: "containerClass", isMore: "isMore", afterTemplate: "afterTemplate" }, host: { classAttribute: "the-toolbar-container" }, viewQueries: [{ propertyName: "toolbarContainer", first: true, predicate: ["toolbarContainer"], descendants: true, read: i0.ViewContainerRef, static: true }], usesOnChanges: true, ngImport: i0__namespace, template: "<thy-icon-nav [style.justifyContent]=\"align\">\n <ng-container #toolbarContainer></ng-container>\n <ng-content></ng-content>\n <ng-template *ngIf=\"afterTemplate\" [ngTemplateOutlet]=\"afterTemplate\"></ng-template>\n</thy-icon-nav>\n", components: [{ type: i3__namespace.ThyIconNavComponent, selector: "thy-icon-nav", inputs: ["thyType"] }], directives: [{ type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }] });
11991
12317
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheToolbarComponent, decorators: [{
11992
12318
  type: i0.Component,
11993
12319
  args: [{
@@ -12127,7 +12453,7 @@
12127
12453
  };
12128
12454
  return TheInlineToolbarComponent;
12129
12455
  }());
12130
- 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 }, { token: TheContextService }], target: i0__namespace.ɵɵFactoryTarget.Component });
12456
+ 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.ScrollDispatcher }, { token: i0__namespace.ChangeDetectorRef }, { token: i0__namespace.NgZone }, { token: TheContextService }], target: i0__namespace.ɵɵFactoryTarget.Component });
12131
12457
  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", "containerClass", "isMore", "afterTemplate"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
12132
12458
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheInlineToolbarComponent, decorators: [{
12133
12459
  type: i0.Component,
@@ -12139,7 +12465,7 @@
12139
12465
  },
12140
12466
  changeDetection: i0.ChangeDetectionStrategy.OnPush
12141
12467
  }]
12142
- }], ctorParameters: function () { return [{ type: i0__namespace.ElementRef }, { type: i2__namespace$1.ScrollDispatcher }, { type: i0__namespace.ChangeDetectorRef }, { type: i0__namespace.NgZone }, { type: TheContextService }]; }, propDecorators: { editor: [{
12468
+ }], ctorParameters: function () { return [{ type: i0__namespace.ElementRef }, { type: i2__namespace.ScrollDispatcher }, { type: i0__namespace.ChangeDetectorRef }, { type: i0__namespace.NgZone }, { type: TheContextService }]; }, propDecorators: { editor: [{
12143
12469
  type: i0.Input
12144
12470
  }], toolbarItems: [{
12145
12471
  type: i0.Input
@@ -12240,16 +12566,20 @@
12240
12566
  };
12241
12567
  ThePlaceholderComponent.prototype.checkStatus = function () {
12242
12568
  var _this = this;
12569
+ var _a, _b, _c;
12243
12570
  var editor = this.editor;
12571
+ var isEmptyShow = typeof ((_a = this.options) === null || _a === void 0 ? void 0 : _a.isEmptyShowPlaceholder) === 'undefined' ? true : this.options.isEmptyShowPlaceholder;
12572
+ var isMustShow = (_b = this.options) === null || _b === void 0 ? void 0 : _b.isMustShowPlaceholder;
12573
+ var isReadonly = (_c = this.options) === null || _c === void 0 ? void 0 : _c.readonly;
12244
12574
  // empty content and no selection processing
12245
- if (!editor.selection && isEmptyContent(editor.children)) {
12575
+ if (!isReadonly && isEmptyShow && isEmptyContent(editor.children)) {
12246
12576
  var firstElementChild = this.contextService.getFirstElementChild();
12247
12577
  var offsetTop = firstElementChild.offsetTop;
12248
12578
  var offsetLeft = firstElementChild.offsetLeft;
12249
12579
  this.updatePosition(offsetLeft, offsetTop);
12250
12580
  return;
12251
12581
  }
12252
- if (isCleanEmptyParagraph(editor)) {
12582
+ if (isMustShow && isCleanEmptyParagraph(editor)) {
12253
12583
  setTimeout(function () {
12254
12584
  var _a;
12255
12585
  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]]);
@@ -12271,12 +12601,12 @@
12271
12601
  return ThePlaceholderComponent;
12272
12602
  }());
12273
12603
  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 }, { token: TheContextService }], target: i0__namespace.ɵɵFactoryTarget.Component });
12274
- ThePlaceholderComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: ThePlaceholderComponent, selector: "div[thePlaceholder]", inputs: { editor: "editor", 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 });
12604
+ 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 });
12275
12605
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: ThePlaceholderComponent, decorators: [{
12276
12606
  type: i0.Component,
12277
12607
  args: [{
12278
12608
  selector: 'div[thePlaceholder]',
12279
- template: "{{ placeholder }}",
12609
+ template: "{{ options?.placeholder }}",
12280
12610
  host: {
12281
12611
  class: 'the-placeholder',
12282
12612
  '[class.hide]': 'isHide'
@@ -12284,7 +12614,7 @@
12284
12614
  }]
12285
12615
  }], ctorParameters: function () { return [{ type: i0__namespace.Renderer2 }, { type: i0__namespace.ElementRef }, { type: TheContextService }]; }, propDecorators: { editor: [{
12286
12616
  type: i0.Input
12287
- }], placeholder: [{
12617
+ }], options: [{
12288
12618
  type: i0.Input
12289
12619
  }], handleCompositionStart: [{
12290
12620
  type: i0.HostListener,
@@ -12501,7 +12831,7 @@
12501
12831
  if (options) {
12502
12832
  this.initializeOptions();
12503
12833
  }
12504
- if (((_a = options.currentValue) === null || _a === void 0 ? void 0 : _a.readonly) !== ((_b = options.previousValue) === null || _b === void 0 ? void 0 : _b.readonly)) {
12834
+ if (options && ((_a = options.currentValue) === null || _a === void 0 ? void 0 : _a.readonly) !== ((_b = options.previousValue) === null || _b === void 0 ? void 0 : _b.readonly)) {
12505
12835
  this.applyAutoFocus();
12506
12836
  }
12507
12837
  if (changes['theDecorate']) {
@@ -12525,7 +12855,9 @@
12525
12855
  this.theContextService.initialize({ nativeElement: this.elementRef.nativeElement, viewContainerRef: this.viewContainerRef });
12526
12856
  this.toolbarCalculate();
12527
12857
  setTimeout(function () {
12858
+ var _a;
12528
12859
  _this.theEditorCreated.emit(_this.editor);
12860
+ (_a = _this.placeholderInstance) === null || _a === void 0 ? void 0 : _a.checkStatus();
12529
12861
  _this.applyAutoFocus();
12530
12862
  });
12531
12863
  };
@@ -12712,7 +13044,7 @@
12712
13044
  useExisting: i0.forwardRef(function () { return TheEditorComponent; }),
12713
13045
  multi: true
12714
13046
  }
12715
- ], viewQueries: [{ propertyName: "templateInstance", first: true, predicate: ["templateInstance"], descendants: true, static: true }, { propertyName: "globalToolbarInstance", first: true, predicate: ["globalToolbar"], descendants: true }, { propertyName: "quickInsertInstance", first: true, predicate: ["quickInsert"], descendants: true, static: true }, { 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 [containerClass]=\"globalToolbarClass\"\n [align]=\"theOptions?.toolbar?.align\"\n></the-toolbar>\n\n<div\n class=\"the-editable-container\"\n [ngClass]=\"{\n 'the-editor-disabled': theOptions?.disabled,\n 'max-height': maxHeight\n }\"\n [ngStyle]=\"{ 'max-height': maxHeight }\"\n>\n <slate-editable\n class=\"the-editor-typo\"\n [editor]=\"editor\"\n [ngModel]=\"editorValue\"\n (ngModelChange)=\"valueChange($event)\"\n [decorate]=\"decorate\"\n [renderElement]=\"renderElement\"\n [renderText]=\"renderText\"\n [renderLeaf]=\"renderLeaf\"\n [readonly]=\"theOptions?.readonly || theOptions?.disabled\"\n [keydown]=\"onKeyDown\"\n [click]=\"onClick\"\n [paste]=\"onSlaPaste\"\n [beforeInput]=\"onSlaBeforeInput\"\n [blur]=\"onSlaBlur\"\n [focus]=\"onSlaFocus\"\n [copy]=\"onSlaCopy\"\n [cut]=\"onSlaCut\"\n [isStrictDecorate]=\"false\"\n [compositionStart]=\"onSlaCompositionStart\"\n [compositionEnd]=\"onSlaCompositionEnd\"\n [dragStart]=\"onSlaDragStart\"\n [dragOver]=\"onSlaDragOver\"\n [drop]=\"onDrop\"\n (mousedown)=\"mousedown($event)\"\n ></slate-editable>\n <the-inline-toolbar *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\" [placeholder]=\"theOptions?.placeholder\"></div>\n <the-template #templateInstance></the-template>\n</div>\n", components: [{ type: TheToolbarComponent, selector: "the-toolbar", inputs: ["editor", "toolbarItems", "align", "containerClass", "isMore", "afterTemplate"] }, { type: i1__namespace.SlateEditableComponent, selector: "slate-editable", inputs: ["editor", "renderElement", "renderLeaf", "renderText", "decorate", "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", "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"] }] });
13047
+ ], viewQueries: [{ propertyName: "templateInstance", first: true, predicate: ["templateInstance"], descendants: true, static: true }, { propertyName: "globalToolbarInstance", first: true, predicate: ["globalToolbar"], descendants: true }, { propertyName: "quickInsertInstance", first: true, predicate: ["quickInsert"], descendants: true, static: true }, { 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 [containerClass]=\"globalToolbarClass\"\n [align]=\"theOptions?.toolbar?.align\"\n></the-toolbar>\n\n<div\n class=\"the-editable-container\"\n [ngClass]=\"{\n 'the-editor-disabled': theOptions?.disabled,\n 'max-height': maxHeight\n }\"\n [ngStyle]=\"{ 'max-height': maxHeight }\"\n>\n <slate-editable\n class=\"the-editor-typo\"\n [editor]=\"editor\"\n [ngModel]=\"editorValue\"\n (ngModelChange)=\"valueChange($event)\"\n [decorate]=\"decorate\"\n [renderElement]=\"renderElement\"\n [renderText]=\"renderText\"\n [renderLeaf]=\"renderLeaf\"\n [readonly]=\"theOptions?.readonly || theOptions?.disabled\"\n [keydown]=\"onKeyDown\"\n [click]=\"onClick\"\n [paste]=\"onSlaPaste\"\n [beforeInput]=\"onSlaBeforeInput\"\n [blur]=\"onSlaBlur\"\n [focus]=\"onSlaFocus\"\n [copy]=\"onSlaCopy\"\n [cut]=\"onSlaCut\"\n [isStrictDecorate]=\"false\"\n [compositionStart]=\"onSlaCompositionStart\"\n [compositionEnd]=\"onSlaCompositionEnd\"\n [dragStart]=\"onSlaDragStart\"\n [dragOver]=\"onSlaDragOver\"\n [drop]=\"onDrop\"\n (mousedown)=\"mousedown($event)\"\n ></slate-editable>\n <the-inline-toolbar *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", "containerClass", "isMore", "afterTemplate"] }, { type: i1__namespace.SlateEditableComponent, selector: "slate-editable", inputs: ["editor", "renderElement", "renderLeaf", "renderText", "decorate", "placeholderDecorate", "isStrictDecorate", "trackBy", "readonly", "placeholder", "beforeInput", "blur", "click", "compositionEnd", "compositionStart", "copy", "cut", "dragOver", "dragStart", "dragEnd", "drop", "focus", "keydown", "paste", "spellCheck", "autoCorrect", "autoCapitalize"] }, { type: TheInlineToolbarComponent, selector: "the-inline-toolbar", inputs: ["editor", "toolbarItems"] }, { type: TheQuickInsertComponent, selector: "[theQuickInsert]", inputs: ["editor", "quickToolbarItems"] }, { 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"] }] });
12716
13048
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheEditorComponent, decorators: [{
12717
13049
  type: i0.Component,
12718
13050
  args: [{
@@ -12893,7 +13225,7 @@
12893
13225
  return TheToolbarGroupComponent;
12894
13226
  }());
12895
13227
  TheToolbarGroupComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheToolbarGroupComponent, deps: [{ token: i0__namespace.ElementRef }, { token: i1__namespace$3.ThyPopover }, { token: i0__namespace.ViewContainerRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
12896
- TheToolbarGroupComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheToolbarGroupComponent, selector: "the-toolbar-group", inputs: { menus: "menus", item: "item" }, host: { listeners: { "mousedown": "mousedownHandler($event)", "click": "clickHandle($event)" }, classAttribute: "the-toolbar-group" }, viewQueries: [{ propertyName: "groupTemplate", first: true, predicate: ["groupTemplate"], descendants: true, read: i0.TemplateRef, static: true }], ngImport: i0__namespace, template: "<a thyIconNavLink [thyIconNavLinkIcon]=\"item.icon\" [thyTooltip]=\"item?.name\" thyTooltipPlacement=\"top\" [thyIconNavLinkActive]=\"active\"></a>\n\n<ng-template #groupTemplate>\n <the-toolbar class=\"group\" [editor]=\"editor\" [toolbarItems]=\"menus\" [isMore]=\"false\"></the-toolbar>\n</ng-template>\n", components: [{ type: i2__namespace.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: TheToolbarComponent, selector: "the-toolbar", inputs: ["editor", "toolbarItems", "align", "containerClass", "isMore", "afterTemplate"] }], directives: [{ type: i7__namespace.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }] });
13228
+ TheToolbarGroupComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheToolbarGroupComponent, selector: "the-toolbar-group", inputs: { menus: "menus", item: "item" }, host: { listeners: { "mousedown": "mousedownHandler($event)", "click": "clickHandle($event)" }, classAttribute: "the-toolbar-group" }, viewQueries: [{ propertyName: "groupTemplate", first: true, predicate: ["groupTemplate"], descendants: true, read: i0.TemplateRef, static: true }], ngImport: i0__namespace, template: "<a thyIconNavLink [thyIconNavLinkIcon]=\"item.icon\" [thyTooltip]=\"item?.name\" thyTooltipPlacement=\"top\" [thyIconNavLinkActive]=\"active\"></a>\n\n<ng-template #groupTemplate>\n <the-toolbar class=\"group\" [editor]=\"editor\" [toolbarItems]=\"menus\" [isMore]=\"false\"></the-toolbar>\n</ng-template>\n", components: [{ type: i3__namespace.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: TheToolbarComponent, selector: "the-toolbar", inputs: ["editor", "toolbarItems", "align", "containerClass", "isMore", "afterTemplate"] }], directives: [{ type: i5__namespace$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }] });
12897
13229
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheToolbarGroupComponent, decorators: [{
12898
13230
  type: i0.Component,
12899
13231
  args: [{
@@ -12921,19 +13253,21 @@
12921
13253
  var TETHYS = [
12922
13254
  i4$1.ThyIconModule,
12923
13255
  avatar.ThyAvatarModule,
12924
- i2$1.ThyNavModule,
12925
- i2$2.ThyFormModule,
12926
- i5$3.ThySharedModule,
12927
- i2$3.ThyListModule,
12928
- i7.ThyTooltipModule,
13256
+ i3.ThyNavModule,
13257
+ i2$1.ThyFormModule,
13258
+ i5$4.ThySharedModule,
13259
+ i2$2.ThyListModule,
13260
+ i5$1.ThyTooltipModule,
12929
13261
  i4.ThyProgressModule,
12930
13262
  autocomplete.ThyAutocompleteModule,
12931
- i5$1.ThyActionMenuModule,
13263
+ i5$2.ThyActionMenuModule,
12932
13264
  i5.ThyInputModule,
12933
13265
  select.ThySelectModule,
12934
13266
  i1$5.ThyButtonModule,
12935
13267
  i1$4.ThyNotifyModule,
12936
- i1$1.ThyAlertModule
13268
+ i1$1.ThyAlertModule,
13269
+ i8.ThyResizableModule,
13270
+ i5$3.ThySwitchModule
12937
13271
  ];
12938
13272
  var COMPONENTS = [
12939
13273
  TheToolbarComponent,
@@ -12953,7 +13287,8 @@
12953
13287
  TheTableSelectComponent,
12954
13288
  TheTableToolbarItemComponent,
12955
13289
  TheConversionHintComponent,
12956
- TheVerticalToolbarItemComponent
13290
+ TheVerticalToolbarItemComponent,
13291
+ TheFontSizeToolbarItemComponent
12957
13292
  ];
12958
13293
  var PLUGIN_COMPONENTS = [
12959
13294
  TheImageComponent,
@@ -12999,7 +13334,8 @@
12999
13334
  TheTableSelectComponent,
13000
13335
  TheTableToolbarItemComponent,
13001
13336
  TheConversionHintComponent,
13002
- TheVerticalToolbarItemComponent, TheImageComponent,
13337
+ TheVerticalToolbarItemComponent,
13338
+ TheFontSizeToolbarItemComponent, TheImageComponent,
13003
13339
  TheTemplateComponent,
13004
13340
  TheHrComponent,
13005
13341
  TheBlockquoteComponent,
@@ -13018,31 +13354,33 @@
13018
13354
  TheTdComponent,
13019
13355
  ThePlaceholderComponent], imports: [i6.CommonModule, i1.SlateModule, i4$2.FormsModule, i4$1.ThyIconModule,
13020
13356
  avatar.ThyAvatarModule,
13021
- i2$1.ThyNavModule,
13022
- i2$2.ThyFormModule,
13023
- i5$3.ThySharedModule,
13024
- i2$3.ThyListModule,
13025
- i7.ThyTooltipModule,
13357
+ i3.ThyNavModule,
13358
+ i2$1.ThyFormModule,
13359
+ i5$4.ThySharedModule,
13360
+ i2$2.ThyListModule,
13361
+ i5$1.ThyTooltipModule,
13026
13362
  i4.ThyProgressModule,
13027
13363
  autocomplete.ThyAutocompleteModule,
13028
- i5$1.ThyActionMenuModule,
13364
+ i5$2.ThyActionMenuModule,
13029
13365
  i5.ThyInputModule,
13030
13366
  select.ThySelectModule,
13031
13367
  i1$5.ThyButtonModule,
13032
13368
  i1$4.ThyNotifyModule,
13033
- i1$1.ThyAlertModule, i5$2.CodemirrorModule, TheColumnSizeModule], exports: [TheEditorComponent, TheToolbarComponent, TheToolbarDropdownComponent, TheToolbarItemComponent, TheDefaultElementComponent] });
13369
+ i1$1.ThyAlertModule,
13370
+ i8.ThyResizableModule,
13371
+ i5$3.ThySwitchModule, i7.CodemirrorModule, TheColumnSizeModule], exports: [TheEditorComponent, TheToolbarComponent, TheToolbarDropdownComponent, TheToolbarItemComponent, TheDefaultElementComponent] });
13034
13372
  TheEditorModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheEditorModule, providers: [
13035
13373
  {
13036
13374
  provide: TheToolbarGroupToken,
13037
13375
  useValue: TheToolbarGroupComponent
13038
13376
  },
13039
13377
  THE_CODE_MODE_PROVIDER
13040
- ], imports: [__spreadArray(__spreadArray([i6.CommonModule, i1.SlateModule, i4$2.FormsModule], __read(TETHYS)), [i5$2.CodemirrorModule, TheColumnSizeModule])] });
13378
+ ], imports: [__spreadArray(__spreadArray([i6.CommonModule, i1.SlateModule, i4$2.FormsModule], __read(TETHYS)), [i7.CodemirrorModule, TheColumnSizeModule])] });
13041
13379
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheEditorModule, decorators: [{
13042
13380
  type: i0.NgModule,
13043
13381
  args: [{
13044
13382
  declarations: __spreadArray(__spreadArray(__spreadArray([TheEditorComponent], __read(PIPES)), __read(COMPONENTS)), __read(PLUGIN_COMPONENTS)),
13045
- imports: __spreadArray(__spreadArray([i6.CommonModule, i1.SlateModule, i4$2.FormsModule], __read(TETHYS)), [i5$2.CodemirrorModule, TheColumnSizeModule]),
13383
+ imports: __spreadArray(__spreadArray([i6.CommonModule, i1.SlateModule, i4$2.FormsModule], __read(TETHYS)), [i7.CodemirrorModule, TheColumnSizeModule]),
13046
13384
  exports: [TheEditorComponent, TheToolbarComponent, TheToolbarDropdownComponent, TheToolbarItemComponent, TheDefaultElementComponent],
13047
13385
  entryComponents: __spreadArray(__spreadArray([], __read(COMPONENTS)), __read(PLUGIN_COMPONENTS)),
13048
13386
  providers: [
@@ -13067,13 +13405,13 @@
13067
13405
  exports.A_TAG_REL_ATTR = A_TAG_REL_ATTR;
13068
13406
  exports.AlignEditor = AlignEditor;
13069
13407
  exports.BLOCK_DELETEBACKWARD_TYPES = BLOCK_DELETEBACKWARD_TYPES;
13070
- exports.BLOCK_INSERT_ORIGIN = BLOCK_INSERT_ORIGIN;
13071
13408
  exports.BlockquoteEditor = BlockquoteEditor;
13072
13409
  exports.CLIPBOARD_FORMAT_KEY = CLIPBOARD_FORMAT_KEY;
13073
13410
  exports.CODEMIRROR_PADDING_TOP = CODEMIRROR_PADDING_TOP;
13074
13411
  exports.CODE_MODES = CODE_MODES;
13075
13412
  exports.COMPONENTS = COMPONENTS;
13076
13413
  exports.CONTAINER_BLOCKS = CONTAINER_BLOCKS;
13414
+ exports.CONTROL_KEY = CONTROL_KEY;
13077
13415
  exports.CodeEditor = CodeEditor;
13078
13416
  exports.CodeMode = CodeMode;
13079
13417
  exports.ColorEditor = ColorEditor;
@@ -13087,6 +13425,7 @@
13087
13425
  exports.HEADING_TYPES = HEADING_TYPES;
13088
13426
  exports.HeadingEditor = HeadingEditor;
13089
13427
  exports.HrEditor = HrEditor;
13428
+ exports.IS_MAC = IS_MAC;
13090
13429
  exports.ImageEditor = ImageEditor;
13091
13430
  exports.LINK_DEFAULT_TEXT = LINK_DEFAULT_TEXT;
13092
13431
  exports.LIST_BLOCK_TYPES = LIST_BLOCK_TYPES;
@@ -13110,7 +13449,7 @@
13110
13449
  exports.THE_UPLOAD_SERVICE_TOKEN = THE_UPLOAD_SERVICE_TOKEN;
13111
13450
  exports.TableEditor = TableEditor;
13112
13451
  exports.TheBaseElementComponent = TheBaseElementComponent;
13113
- exports.TheCodeMode = TheCodeMode;
13452
+ exports.TheCodeConfig = TheCodeConfig;
13114
13453
  exports.TheContextService = TheContextService;
13115
13454
  exports.TheDefaultElementComponent = TheDefaultElementComponent;
13116
13455
  exports.TheEditor = TheEditor;