@worktile/theia 1.2.14 → 1.2.19

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 (60) hide show
  1. package/bundles/worktile-theia.umd.js +503 -174
  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 +1 -1
  16. package/esm2015/editor.module.js +14 -5
  17. package/esm2015/interfaces/toolbar.js +1 -1
  18. package/esm2015/plugins/code/code.component.js +80 -33
  19. package/esm2015/plugins/code/code.editor.js +3 -9
  20. package/esm2015/plugins/common/block-card.plugin.js +51 -5
  21. package/esm2015/plugins/deserializers/deserialize-md.plugin.js +7 -2
  22. package/esm2015/plugins/font-size/options.js +11 -0
  23. package/esm2015/plugins/font-size/toolbar-item.component.js +129 -0
  24. package/esm2015/plugins/index.js +15 -1
  25. package/esm2015/plugins/mark/options.js +6 -1
  26. package/esm2015/plugins/paint-format/options.js +4 -1
  27. package/esm2015/plugins/placeholder/placeholder.component.js +4 -3
  28. package/esm2015/plugins/soft-break/soft-break.plugin.js +18 -0
  29. package/esm2015/plugins/soft-break/soft-break.types.js +2 -0
  30. package/esm2015/plugins/table/table.editor.js +10 -2
  31. package/esm2015/plugins/table/table.plugin.js +53 -19
  32. package/esm2015/plugins/table/utils/calc-span.js +2 -2
  33. package/esm2015/plugins/table/utils/normalize-table.js +3 -3
  34. package/esm2015/plugins/table/utils/table-position.js +5 -2
  35. package/esm2015/queries/is-empty-content.js +2 -2
  36. package/esm2015/queries/is-empty-paragraph.js +6 -2
  37. package/esm2015/utils/common.js +3 -0
  38. package/esm2015/utils/index.js +2 -1
  39. package/fesm2015/worktile-theia.js +459 -139
  40. package/fesm2015/worktile-theia.js.map +1 -1
  41. package/interfaces/toolbar.d.ts +1 -0
  42. package/package.json +1 -1
  43. package/plugins/code/code.component.d.ts +17 -5
  44. package/plugins/code/code.component.scss +46 -7
  45. package/plugins/code/code.editor.d.ts +3 -2
  46. package/plugins/font-size/options.d.ts +3 -0
  47. package/plugins/font-size/toolbar-item.component.d.ts +35 -0
  48. package/plugins/font-size/toolbar-item.component.scss +13 -0
  49. package/plugins/image/image.component.scss +172 -168
  50. package/plugins/soft-break/soft-break.plugin.d.ts +4 -0
  51. package/plugins/soft-break/soft-break.types.d.ts +8 -0
  52. package/plugins/table/table.editor.d.ts +2 -0
  53. package/plugins/table/utils/calc-span.d.ts +1 -1
  54. package/queries/get-selection-marks.d.ts +1 -0
  55. package/styles/editor.scss +6 -0
  56. package/styles/index.scss +1 -0
  57. package/styles/typo.scss +13 -25
  58. package/transforms/set-marks.d.ts +1 -0
  59. package/utils/common.d.ts +2 -0
  60. 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 () {
@@ -6874,15 +7004,21 @@
6874
7004
  });
6875
7005
  }
6876
7006
  };
7007
+ TheCodeComponent.prototype.focusChange = function (codeMirrorFocused) {
7008
+ if (codeMirrorFocused)
7009
+ this.codeMirrorFocused = codeMirrorFocused;
7010
+ };
6877
7011
  TheCodeComponent.prototype.renderCodemirror = function () {
6878
7012
  this.startRenderCodemirror = true;
6879
7013
  this.useReadonly();
6880
7014
  this.useMode();
7015
+ this.useAutoWrap();
7016
+ this.useHeight();
6881
7017
  this.cdr.detectChanges();
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,73 @@
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.cdr.detectChanges();
7062
+ this.isAutoWrap = this.element.autoWrap;
7063
+ this.codemirror.setOptionIfChanged('lineWrapping', this.element.autoWrap);
7064
+ }
7065
+ };
7066
+ TheCodeComponent.prototype.useHeight = function () {
7067
+ if (this.element.height) {
7068
+ this.resizeHeight = this.element.height;
7069
+ this.maxHeight = this.element.height;
7070
+ }
7071
+ };
6930
7072
  TheCodeComponent.prototype.useReadonly = function () {
6931
7073
  this.options = Object.assign(Object.assign({}, this.options), { readOnly: this.readonly, cursorBlinkRate: this.readonly ? -1 : 500 });
6932
7074
  };
7075
+ TheCodeComponent.prototype.onResize = function (_a) {
7076
+ var height = _a.height;
7077
+ this.resizeHeight = height;
7078
+ slate.Transforms.select(this.editor, i1.AngularEditor.findPath(this.editor, this.element));
7079
+ CodeEditor.setCodeAttribute(this.editor, this.element, { height: height });
7080
+ this.maxHeight = height;
7081
+ };
7082
+ TheCodeComponent.prototype.onStartResize = function () {
7083
+ this.isResizing = true;
7084
+ };
7085
+ TheCodeComponent.prototype.onEndResize = function () {
7086
+ this.isResizing = false;
7087
+ };
7088
+ TheCodeComponent.prototype.onChangeWrap = function (value) {
7089
+ i1.AngularEditor.deselect(this.editor);
7090
+ this.codemirror.setOptionIfChanged('lineWrapping', value);
7091
+ CodeEditor.setCodeAttribute(this.editor, this.element, { autoWrap: value ? value : null });
7092
+ };
6933
7093
  return TheCodeComponent;
6934
7094
  }(TheBaseElementComponent));
6935
7095
  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 });
7096
+ 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
7097
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheCodeComponent, decorators: [{
6938
7098
  type: i0.Component,
6939
7099
  args: [{
6940
7100
  selector: 'div[theCode]',
6941
- templateUrl: './code.component.html',
6942
- changeDetection: i0.ChangeDetectionStrategy.OnPush
7101
+ templateUrl: './code.component.html'
6943
7102
  }]
6944
7103
  }], ctorParameters: function () {
6945
- return [{ type: i0__namespace.ElementRef }, { type: i0__namespace.ChangeDetectorRef }, { type: i1__namespace$4.ThyNotifyService }, { type: i0__namespace.NgZone }, { type: CodeMode, decorators: [{
7104
+ return [{ type: i0__namespace.ElementRef }, { type: i0__namespace.ChangeDetectorRef }, { type: i1__namespace$4.ThyNotifyService }, { type: i0__namespace.NgZone }, { type: TheCodeConfig, decorators: [{
6946
7105
  type: i0.Inject,
6947
7106
  args: [THE_CODE_MODE_TOKEN]
6948
7107
  }] }];
6949
7108
  }, propDecorators: { codemirror: [{
6950
7109
  type: i0.ViewChild,
6951
- args: ['codemirror', { read: i5$2.CodeMirrorComponent, static: false }]
7110
+ args: ['codemirror', { read: i7.CodeMirrorComponent, static: false }]
7111
+ }], handleCodeMousedown: [{
7112
+ type: i0.HostListener,
7113
+ args: ['document: mousedown', ['$event']]
6952
7114
  }] } });
6953
7115
 
6954
7116
  var withCode = function (editor) {
@@ -7162,7 +7324,7 @@
7162
7324
  return TheLinkEditComponent;
7163
7325
  }());
7164
7326
  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"] }] });
7327
+ 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
7328
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheLinkEditComponent, decorators: [{
7167
7329
  type: i0.Component,
7168
7330
  args: [{
@@ -7315,7 +7477,7 @@
7315
7477
  };
7316
7478
  return TheBaseLinkComponent;
7317
7479
  }(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 });
7480
+ 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
7481
  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
7482
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheBaseLinkComponent, decorators: [{
7321
7483
  type: i0.Component,
@@ -7323,7 +7485,7 @@
7323
7485
  selector: '[TheBaseLinkComponent]',
7324
7486
  template: ''
7325
7487
  }]
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: [{
7488
+ }], 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
7489
  type: i0.HostListener,
7328
7490
  args: ['click', ['$event']]
7329
7491
  }] } });
@@ -7515,8 +7677,8 @@
7515
7677
  };
7516
7678
  return TheTableToolbarItemComponent;
7517
7679
  }(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"] }] });
7680
+ 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 });
7681
+ 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
7682
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheTableToolbarItemComponent, decorators: [{
7521
7683
  type: i0.Component,
7522
7684
  args: [{
@@ -7526,7 +7688,7 @@
7526
7688
  class: 'the-toolbar-dropdown-container'
7527
7689
  }
7528
7690
  }]
7529
- }], ctorParameters: function () { return [{ type: i1__namespace$6.ThyPopover }, { type: i2__namespace$1.Overlay }]; }, propDecorators: { item: [{
7691
+ }], ctorParameters: function () { return [{ type: i1__namespace$6.ThyPopover }, { type: i2__namespace.Overlay }]; }, propDecorators: { item: [{
7530
7692
  type: i0.Input
7531
7693
  }], editor: [{
7532
7694
  type: i0.Input
@@ -8288,49 +8450,6 @@
8288
8450
  });
8289
8451
  }
8290
8452
 
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
8453
  var TheTableToolbarComponent = /** @class */ (function () {
8335
8454
  function TheTableToolbarComponent(ngZone, colorSelectService, popoverRef) {
8336
8455
  var _this = this;
@@ -8452,7 +8571,7 @@
8452
8571
  return TheTableToolbarComponent;
8453
8572
  }());
8454
8573
  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"] }] });
8574
+ 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
8575
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheTableToolbarComponent, decorators: [{
8457
8576
  type: i0.Component,
8458
8577
  args: [{
@@ -8516,7 +8635,7 @@
8516
8635
  return TheContextMenuComponent;
8517
8636
  }());
8518
8637
  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]" }] });
8638
+ 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
8639
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheContextMenuComponent, decorators: [{
8521
8640
  type: i0.Component,
8522
8641
  args: [{
@@ -8827,11 +8946,11 @@
8827
8946
  };
8828
8947
  return TableService;
8829
8948
  }());
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 });
8949
+ 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
8950
  TableService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TableService });
8832
8951
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TableService, decorators: [{
8833
8952
  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 }]; } });
8953
+ }], ctorParameters: function () { return [{ type: i1__namespace$3.ThyPopover }, { type: i2__namespace.Overlay }, { type: TableStore }, { type: TheTableContextMenuService }, { type: i0__namespace.NgZone }, { type: TheContextService }]; } });
8835
8954
 
8836
8955
  var SLA_TABLE_SELECTOR = '.slate-element-table';
8837
8956
  var SLA_TABLE_CELL_SELECTOR = '.slate-element-table-cell';
@@ -8919,7 +9038,7 @@
8919
9038
  return TheInsertMarkComponent;
8920
9039
  }());
8921
9040
  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"] }] });
9041
+ 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
9042
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheInsertMarkComponent, decorators: [{
8924
9043
  type: i0.Component,
8925
9044
  args: [{
@@ -10584,7 +10703,7 @@
10584
10703
  };
10585
10704
  return TheTdComponent;
10586
10705
  }(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 });
10706
+ 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
10707
  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
10708
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheTdComponent, decorators: [{
10590
10709
  type: i0.Component,
@@ -10593,7 +10712,7 @@
10593
10712
  templateUrl: './td.component.html',
10594
10713
  providers: [ColumnResizingStore]
10595
10714
  }]
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: [{
10715
+ }], 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
10716
  type: i0.HostBinding,
10598
10717
  args: ['style.backgroundColor']
10599
10718
  }], colspan: [{
@@ -10630,7 +10749,7 @@
10630
10749
  }
10631
10750
  // case 2
10632
10751
  if (cell.hidden && !normalizedNodes.includes(cell)) {
10633
- var origin = calcOriginSpan(table, rowIndex, columnIndex);
10752
+ var origin = getOriginCell(table, rowIndex, columnIndex);
10634
10753
  if (!origin) {
10635
10754
  delete table.children[rowIndex].children[columnIndex].hidden;
10636
10755
  }
@@ -10641,7 +10760,7 @@
10641
10760
  };
10642
10761
 
10643
10762
  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;
10763
+ 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
10764
  editor.deleteBackward = function (unit) {
10646
10765
  var opts = new TableOptions$1();
10647
10766
  if (!isSelectionInTable(opts, editor)) {
@@ -10712,13 +10831,11 @@
10712
10831
  var aboveCell = aboveRow && aboveRow.children[startPosition.getColumnIndex()];
10713
10832
  if (aboveCell) {
10714
10833
  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
- }
10834
+ TableEditor.selectOriginCell(editor, startPosition.table, startPosition.getRowIndex() - 1, startPosition.getColumnIndex(), false);
10835
+ return;
10719
10836
  }
10720
10837
  else {
10721
- at = slate.Editor.start(editor, TheEditor.findPath(editor, aboveCell));
10838
+ at = slate.Editor.end(editor, TheEditor.findPath(editor, aboveCell));
10722
10839
  }
10723
10840
  }
10724
10841
  else {
@@ -10747,10 +10864,8 @@
10747
10864
  var belowCell = belowRow && belowRow.children[startPosition.getColumnIndex()];
10748
10865
  if (belowCell) {
10749
10866
  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
- }
10867
+ TableEditor.selectOriginCell(editor, startPosition.table, startPosition.getRowIndex() + 1, startPosition.getColumnIndex(), true);
10868
+ return;
10754
10869
  }
10755
10870
  else {
10756
10871
  at = slate.Editor.start(editor, TheEditor.findPath(editor, belowCell));
@@ -10769,18 +10884,27 @@
10769
10884
  var beforePoint = slate.Editor.before(editor, editor.selection);
10770
10885
  var beforePosition = beforePoint && TablePosition.create(opts, editor, beforePoint.path);
10771
10886
  if (beforePosition && beforePosition.cell && beforePosition.cell.hidden) {
10887
+ event.preventDefault();
10772
10888
  var at = slate.Editor.end(editor, TheEditor.findPath(editor, beforePosition.findPrevious()));
10773
10889
  slate.Transforms.select(editor, at);
10774
- event.preventDefault();
10775
10890
  }
10776
10891
  }
10777
10892
  if (isMoveForward) {
10778
10893
  var afterPoint = slate.Editor.after(editor, editor.selection);
10779
10894
  var afterPosition = afterPoint && TablePosition.create(opts, editor, afterPoint.path);
10780
10895
  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
10896
  event.preventDefault();
10897
+ var nextCell = afterPosition.findNext();
10898
+ if (nextCell) {
10899
+ var at = slate.Editor.start(editor, TheEditor.findPath(editor, afterPosition.findNext()));
10900
+ slate.Transforms.select(editor, at);
10901
+ event.preventDefault();
10902
+ }
10903
+ else {
10904
+ i1.AngularEditor.moveBlockCard(editor, startPosition.tableEntry[0], { direction: 'right' });
10905
+ event.preventDefault();
10906
+ }
10907
+ return;
10784
10908
  }
10785
10909
  }
10786
10910
  // Prevent deleting cells in the table
@@ -10861,12 +10985,12 @@
10861
10985
  }
10862
10986
  if (tableFragment) {
10863
10987
  tableFragment = normalizeTable(_.cloneDeep(tableFragment));
10988
+ var plainText = slate.Node.string(tableFragment);
10864
10989
  tableFragment = [tableFragment];
10865
10990
  var stringObj = JSON.stringify(tableFragment);
10866
10991
  var encoded = window.btoa(encodeURIComponent(stringObj));
10867
10992
  unit.setData("application/" + CLIPBOARD_FORMAT_KEY, encoded);
10868
- // unit.setData('text/html', div.innerHTML);
10869
- unit.setData('text/plain', slate.Node.string(tableFragment));
10993
+ unit.setData('text/plain', plainText);
10870
10994
  return;
10871
10995
  }
10872
10996
  setFragmentData(unit);
@@ -10891,7 +11015,7 @@
10891
11015
  for (var j = selectColIndex_1; j <= lastColIndex_1; j++) {
10892
11016
  var row = tablePosition_1.table.children[i];
10893
11017
  if (row && row.children[j]) {
10894
- var originCell = calcOriginSpan(tablePosition_1.table, i, j);
11018
+ var originCell = getOriginCell(tablePosition_1.table, i, j);
10895
11019
  if (originCell && (originCell.colspan || originCell.rowspan)) {
10896
11020
  var path = TheEditor.findPath(editor, originCell).slice(-2);
10897
11021
  resetTableCell(editor, tablePosition_1.table, originCell, path[0], path[1]);
@@ -10949,6 +11073,21 @@
10949
11073
  slate.Transforms.setNodes(editor, { columns: columns }, { at: entry[1] });
10950
11074
  }
10951
11075
  }
11076
+ // adjust selection when selection is in hidden cell
11077
+ if (slate.Element.isElement(entry[0]) && entry[0].type === exports.ElementKinds.tableCell && entry[0].hidden) {
11078
+ if (editor.selection && slate.Range.isCollapsed(editor.selection) && slate.Path.isAncestor(entry[1], editor.selection.anchor.path)) {
11079
+ setTimeout(function () {
11080
+ var opts = new TableOptions$1();
11081
+ var tablePosition = TablePosition.create(opts, editor, editor.selection.anchor.path);
11082
+ var origin = getOriginCell(tablePosition.table, tablePosition.getRowIndex(), tablePosition.getColumnIndex());
11083
+ if (origin) {
11084
+ var path = i1.AngularEditor.findPath(editor, origin);
11085
+ slate.Transforms.select(editor, slate.Editor.end(editor, path));
11086
+ }
11087
+ }, 0);
11088
+ return;
11089
+ }
11090
+ }
10952
11091
  normalizeNode(entry);
10953
11092
  };
10954
11093
  editor.isBlockCard = function (element) {
@@ -10996,6 +11135,20 @@
10996
11135
  editor.isContainer = function (element) {
10997
11136
  return element.type === exports.ElementKinds.tableCell ? true : isContainer(element);
10998
11137
  };
11138
+ editor.onChange = function () {
11139
+ onChange();
11140
+ // adujst selection when selection is in hidden cell
11141
+ // just hook set_selection
11142
+ var isCollapsed = editor.selection && slate.Range.isCollapsed(editor.selection);
11143
+ var isSelectionOperation = editor.operations.every(function (op) { return slate.Operation.isSelectionOperation(op); });
11144
+ if (isCollapsed && isSelectionOperation) {
11145
+ var opts = new TableOptions$1();
11146
+ var tablePosition = TablePosition.create(opts, editor, editor.selection.anchor.path);
11147
+ if (tablePosition.isInTable() && tablePosition.cell.hidden) {
11148
+ TableEditor.selectOriginCell(editor, tablePosition.table, tablePosition.getRowIndex(), tablePosition.getColumnIndex(), false);
11149
+ }
11150
+ }
11151
+ };
10999
11152
  return editor;
11000
11153
  };
11001
11154
 
@@ -11140,7 +11293,7 @@
11140
11293
  return TheVerticalToolbarItemComponent;
11141
11294
  }(TheToolbarBaseItemComponent));
11142
11295
  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 });
11143
- 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]" }] });
11296
+ 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]" }] });
11144
11297
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheVerticalToolbarItemComponent, decorators: [{
11145
11298
  type: i0.Component,
11146
11299
  args: [{
@@ -11274,12 +11427,14 @@
11274
11427
  key: exports.ToolbarActionTypes.undo,
11275
11428
  icon: 'undo',
11276
11429
  name: '撤销',
11430
+ shortcutKey: CONTROL_KEY + "+Z",
11277
11431
  execute: function (editor) { return editor.undo(); }
11278
11432
  },
11279
11433
  {
11280
11434
  key: exports.ToolbarActionTypes.redo,
11281
11435
  icon: 'redo',
11282
11436
  name: '重做',
11437
+ shortcutKey: CONTROL_KEY + "+Shift+Z",
11283
11438
  execute: function (editor) { return editor.redo(); }
11284
11439
  },
11285
11440
  {
@@ -11400,12 +11555,12 @@
11400
11555
  return TheToolbarItemComponent;
11401
11556
  }(TheToolbarBaseItemComponent));
11402
11557
  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 });
11403
- 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"] }] });
11558
+ 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"] }] });
11404
11559
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheToolbarItemComponent, decorators: [{
11405
11560
  type: i0.Component,
11406
11561
  args: [{
11407
11562
  selector: 'the-toolbar-item',
11408
- 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 ",
11563
+ 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 ",
11409
11564
  host: {
11410
11565
  class: 'the-toolbar-item'
11411
11566
  }
@@ -11467,7 +11622,7 @@
11467
11622
  return TheQuickToolbarComponent;
11468
11623
  }(core.mixinUnsubscribe(core.MixinBase)));
11469
11624
  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 });
11470
- 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"] }] });
11625
+ 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"] }] });
11471
11626
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheQuickToolbarComponent, decorators: [{
11472
11627
  type: i0.Component,
11473
11628
  args: [{
@@ -11571,6 +11726,161 @@
11571
11726
  return editor;
11572
11727
  };
11573
11728
 
11729
+ var withSoftBreak = function (options) {
11730
+ if (options === void 0) { options = { rules: [{ hotkey: 'shift+enter' }] }; }
11731
+ return function (editor) {
11732
+ var onKeydown = editor.onKeydown;
11733
+ editor.onKeydown = function (event) {
11734
+ var rules = options.rules;
11735
+ var entry = getBlockAbove(editor);
11736
+ rules.forEach(function (_a) {
11737
+ var hotkey = _a.hotkey, query = _a.query;
11738
+ if (isHotkey__default["default"](hotkey, event) && isNodeType(entry, query)) {
11739
+ event.preventDefault();
11740
+ editor.insertText('\n');
11741
+ }
11742
+ });
11743
+ onKeydown(event);
11744
+ };
11745
+ return editor;
11746
+ };
11747
+ };
11748
+
11749
+ var TheFontSizeToolbarItemComponent = /** @class */ (function (_super) {
11750
+ __extends(TheFontSizeToolbarItemComponent, _super);
11751
+ function TheFontSizeToolbarItemComponent(elementRef, thyPopover, viewContainerRef, overlay) {
11752
+ var _this = _super.call(this) || this;
11753
+ _this.elementRef = elementRef;
11754
+ _this.thyPopover = thyPopover;
11755
+ _this.viewContainerRef = viewContainerRef;
11756
+ _this.overlay = overlay;
11757
+ _this.fontSizes = FontSizes;
11758
+ _this.disabled = false;
11759
+ _this.disableGroup = HEADING_TYPES;
11760
+ _this.toolbarItemContainer = true;
11761
+ _this.fontSizeToolbarItem = true;
11762
+ return _this;
11763
+ }
11764
+ Object.defineProperty(TheFontSizeToolbarItemComponent.prototype, "isOpen", {
11765
+ get: function () {
11766
+ return this.dropdownPopoverRef && this.dropdownPopoverRef.getOverlayRef() && this.dropdownPopoverRef.getOverlayRef().hasAttached();
11767
+ },
11768
+ enumerable: false,
11769
+ configurable: true
11770
+ });
11771
+ Object.defineProperty(TheFontSizeToolbarItemComponent.prototype, "disableClass", {
11772
+ get: function () {
11773
+ return this.disabled;
11774
+ },
11775
+ enumerable: false,
11776
+ configurable: true
11777
+ });
11778
+ TheFontSizeToolbarItemComponent.prototype.toggleDropdown = function (event) {
11779
+ var _a;
11780
+ _super.prototype.execute.call(this, event);
11781
+ if (((_a = this.editor) === null || _a === void 0 ? void 0 : _a.disabled) || this.disabled) {
11782
+ return;
11783
+ }
11784
+ this.openDropdownPopover();
11785
+ };
11786
+ TheFontSizeToolbarItemComponent.prototype.handleDocumentMouseDown = function (event) {
11787
+ if (!this.elementRef.nativeElement.contains(event.target)) {
11788
+ this.closeDropdownPopover();
11789
+ }
11790
+ };
11791
+ TheFontSizeToolbarItemComponent.prototype.ngOnInit = function () {
11792
+ this.activeSize = this.fontSizes[2];
11793
+ };
11794
+ TheFontSizeToolbarItemComponent.prototype.statusChange = function (editor) {
11795
+ if (editor.selection) {
11796
+ var anchorBlock$1 = anchorBlock(editor);
11797
+ if (anchorBlock$1 && this.disableGroup.includes(anchorBlock$1.type)) {
11798
+ this.activeSize = null;
11799
+ this.disabled = true;
11800
+ return;
11801
+ }
11802
+ var marks = getSelectionMarks(editor);
11803
+ var fontSizeMark = marks[exports.MarkTypes.fontSize];
11804
+ this.activeSize = fontSizeMark ? fontSizeMark : this.fontSizes[2];
11805
+ this.disabled = false;
11806
+ }
11807
+ };
11808
+ TheFontSizeToolbarItemComponent.prototype.itemMousedown = function (event, size) {
11809
+ var _a, _b;
11810
+ _super.prototype.execute.call(this, event);
11811
+ this.closeDropdownPopover();
11812
+ if (((_a = this.editor) === null || _a === void 0 ? void 0 : _a.disabled) || ((_b = this.editor) === null || _b === void 0 ? void 0 : _b.readOnly)) {
11813
+ return;
11814
+ }
11815
+ var anchorBlock$1 = anchorBlock(this.editor);
11816
+ if (anchorBlock$1 && this.disableGroup.includes(anchorBlock$1.type)) {
11817
+ return;
11818
+ }
11819
+ slate.Editor.addMark(this.editor, exports.MarkTypes.fontSize, size);
11820
+ };
11821
+ TheFontSizeToolbarItemComponent.prototype.openDropdownPopover = function () {
11822
+ var _a;
11823
+ this.dropdownPopoverRef = this.thyPopover.open(this.dropdownTemplate, {
11824
+ origin: this.elementRef,
11825
+ panelClass: ['the-toolbar-dropdown-popover', (_a = this.item) === null || _a === void 0 ? void 0 : _a.key],
11826
+ placement: 'bottomLeft',
11827
+ insideClosable: false,
11828
+ backdropClosable: true,
11829
+ hasBackdrop: false,
11830
+ offset: 10,
11831
+ viewContainerRef: this.viewContainerRef,
11832
+ scrollStrategy: this.overlay.scrollStrategies.reposition()
11833
+ });
11834
+ };
11835
+ TheFontSizeToolbarItemComponent.prototype.closeDropdownPopover = function () {
11836
+ var _a;
11837
+ if (this.dropdownPopoverRef) {
11838
+ (_a = this.dropdownPopoverRef) === null || _a === void 0 ? void 0 : _a.close();
11839
+ }
11840
+ };
11841
+ return TheFontSizeToolbarItemComponent;
11842
+ }(TheToolbarBaseItemComponent));
11843
+ 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 });
11844
+ 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]" }] });
11845
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheFontSizeToolbarItemComponent, decorators: [{
11846
+ type: i0.Component,
11847
+ args: [{
11848
+ selector: 'the-font-size-toolbar-item',
11849
+ templateUrl: './toolbar-item.component.html'
11850
+ }]
11851
+ }], ctorParameters: function () { return [{ type: i0__namespace.ElementRef }, { type: i1__namespace$3.ThyPopover }, { type: i0__namespace.ViewContainerRef }, { type: i2__namespace.Overlay }]; }, propDecorators: { editor: [{
11852
+ type: i0.Input
11853
+ }], item: [{
11854
+ type: i0.Input
11855
+ }], dropdownTemplate: [{
11856
+ type: i0.ViewChild,
11857
+ args: ['dropdownTemplate', { static: true }]
11858
+ }], toolbarItemContainer: [{
11859
+ type: i0.HostBinding,
11860
+ args: ['class.the-toolbar-dropdown-container']
11861
+ }], fontSizeToolbarItem: [{
11862
+ type: i0.HostBinding,
11863
+ args: ['class.the-font-size-toolbar-item']
11864
+ }], disableClass: [{
11865
+ type: i0.HostBinding,
11866
+ args: ['class.disabled']
11867
+ }], toggleDropdown: [{
11868
+ type: i0.HostListener,
11869
+ args: ['mousedown', ['$event']]
11870
+ }], handleDocumentMouseDown: [{
11871
+ type: i0.HostListener,
11872
+ args: ['document: mousedown', ['$event']]
11873
+ }] } });
11874
+
11875
+ var FontSizes = [12, 13, 14, 15, 16, 19, 22, 24, 29, 32, 40, 48];
11876
+ var FontSizeOptions = [
11877
+ {
11878
+ key: exports.MarkTypes.fontSize,
11879
+ name: '字号',
11880
+ iconComponent: TheFontSizeToolbarItemComponent
11881
+ }
11882
+ ];
11883
+
11574
11884
  var internalPlugins = [
11575
11885
  withTheHistory,
11576
11886
  withAutoInsertData(),
@@ -11588,6 +11898,17 @@
11588
11898
  withCode,
11589
11899
  withHeading,
11590
11900
  withMark(),
11901
+ withSoftBreak({
11902
+ rules: [
11903
+ { hotkey: 'shift+enter' },
11904
+ {
11905
+ hotkey: 'enter',
11906
+ query: {
11907
+ allow: [exports.ElementKinds.blockquote]
11908
+ }
11909
+ }
11910
+ ]
11911
+ }),
11591
11912
  withBlockquote,
11592
11913
  withNodeID({ idKey: ELEMENT_UNIQUE_ID, idCreator: idCreator }),
11593
11914
  withAutoFormat({ rules: autoFormatRules }),
@@ -11601,7 +11922,7 @@
11601
11922
  withDeserializeMd(),
11602
11923
  withQuickInsert
11603
11924
  ];
11604
- 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));
11925
+ 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));
11605
11926
  var toolbarCompose = function (toolbarItems) {
11606
11927
  if (toolbarItems === void 0) { toolbarItems = []; }
11607
11928
  return __spreadArray(__spreadArray([], __read(internalToolbarItems)), __read(toolbarItems));
@@ -11993,7 +12314,7 @@
11993
12314
  return TheToolbarComponent;
11994
12315
  }());
11995
12316
  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 });
11996
- 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"] }] });
12317
+ 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"] }] });
11997
12318
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheToolbarComponent, decorators: [{
11998
12319
  type: i0.Component,
11999
12320
  args: [{
@@ -12133,7 +12454,7 @@
12133
12454
  };
12134
12455
  return TheInlineToolbarComponent;
12135
12456
  }());
12136
- 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 });
12457
+ 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 });
12137
12458
  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 });
12138
12459
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheInlineToolbarComponent, decorators: [{
12139
12460
  type: i0.Component,
@@ -12145,7 +12466,7 @@
12145
12466
  },
12146
12467
  changeDetection: i0.ChangeDetectionStrategy.OnPush
12147
12468
  }]
12148
- }], ctorParameters: function () { return [{ type: i0__namespace.ElementRef }, { type: i2__namespace$1.ScrollDispatcher }, { type: i0__namespace.ChangeDetectorRef }, { type: i0__namespace.NgZone }, { type: TheContextService }]; }, propDecorators: { editor: [{
12469
+ }], ctorParameters: function () { return [{ type: i0__namespace.ElementRef }, { type: i2__namespace.ScrollDispatcher }, { type: i0__namespace.ChangeDetectorRef }, { type: i0__namespace.NgZone }, { type: TheContextService }]; }, propDecorators: { editor: [{
12149
12470
  type: i0.Input
12150
12471
  }], toolbarItems: [{
12151
12472
  type: i0.Input
@@ -12246,12 +12567,13 @@
12246
12567
  };
12247
12568
  ThePlaceholderComponent.prototype.checkStatus = function () {
12248
12569
  var _this = this;
12249
- var _a, _b;
12570
+ var _a, _b, _c;
12250
12571
  var editor = this.editor;
12251
12572
  var isEmptyShow = typeof ((_a = this.options) === null || _a === void 0 ? void 0 : _a.isEmptyShowPlaceholder) === 'undefined' ? true : this.options.isEmptyShowPlaceholder;
12252
12573
  var isMustShow = (_b = this.options) === null || _b === void 0 ? void 0 : _b.isMustShowPlaceholder;
12574
+ var isReadonly = (_c = this.options) === null || _c === void 0 ? void 0 : _c.readonly;
12253
12575
  // empty content and no selection processing
12254
- if (isEmptyShow && isEmptyContent(editor.children)) {
12576
+ if (!isReadonly && isEmptyShow && isEmptyContent(editor.children)) {
12255
12577
  var firstElementChild = this.contextService.getFirstElementChild();
12256
12578
  var offsetTop = firstElementChild.offsetTop;
12257
12579
  var offsetLeft = firstElementChild.offsetLeft;
@@ -12723,7 +13045,7 @@
12723
13045
  useExisting: i0.forwardRef(function () { return TheEditorComponent; }),
12724
13046
  multi: true
12725
13047
  }
12726
- ], 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", "isStrictDecorate", "trackBy", "readonly", "beforeInput", "blur", "click", "compositionEnd", "compositionStart", "copy", "cut", "dragOver", "dragStart", "dragEnd", "drop", "focus", "keydown", "paste", "spellCheck", "autoCorrect", "autoCapitalize"] }, { type: TheInlineToolbarComponent, selector: "the-inline-toolbar", inputs: ["editor", "toolbarItems"] }, { type: TheQuickInsertComponent, selector: "[theQuickInsert]", inputs: ["editor", "quickToolbarItems"] }, { type: ThePlaceholderComponent, selector: "div[thePlaceholder]", inputs: ["editor", "options"] }, { type: TheTemplateComponent, selector: "the-template,[theTemplate]" }], directives: [{ type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i6__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i4__namespace$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4__namespace$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
13048
+ ], 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"] }] });
12727
13049
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheEditorComponent, decorators: [{
12728
13050
  type: i0.Component,
12729
13051
  args: [{
@@ -12904,7 +13226,7 @@
12904
13226
  return TheToolbarGroupComponent;
12905
13227
  }());
12906
13228
  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 });
12907
- 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"] }] });
13229
+ 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"] }] });
12908
13230
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheToolbarGroupComponent, decorators: [{
12909
13231
  type: i0.Component,
12910
13232
  args: [{
@@ -12932,19 +13254,21 @@
12932
13254
  var TETHYS = [
12933
13255
  i4$1.ThyIconModule,
12934
13256
  avatar.ThyAvatarModule,
12935
- i2$1.ThyNavModule,
12936
- i2$2.ThyFormModule,
12937
- i5$3.ThySharedModule,
12938
- i2$3.ThyListModule,
12939
- i7.ThyTooltipModule,
13257
+ i3.ThyNavModule,
13258
+ i2$1.ThyFormModule,
13259
+ i5$4.ThySharedModule,
13260
+ i2$2.ThyListModule,
13261
+ i5$1.ThyTooltipModule,
12940
13262
  i4.ThyProgressModule,
12941
13263
  autocomplete.ThyAutocompleteModule,
12942
- i5$1.ThyActionMenuModule,
13264
+ i5$2.ThyActionMenuModule,
12943
13265
  i5.ThyInputModule,
12944
13266
  select.ThySelectModule,
12945
13267
  i1$5.ThyButtonModule,
12946
13268
  i1$4.ThyNotifyModule,
12947
- i1$1.ThyAlertModule
13269
+ i1$1.ThyAlertModule,
13270
+ i8.ThyResizableModule,
13271
+ i5$3.ThySwitchModule
12948
13272
  ];
12949
13273
  var COMPONENTS = [
12950
13274
  TheToolbarComponent,
@@ -12964,7 +13288,8 @@
12964
13288
  TheTableSelectComponent,
12965
13289
  TheTableToolbarItemComponent,
12966
13290
  TheConversionHintComponent,
12967
- TheVerticalToolbarItemComponent
13291
+ TheVerticalToolbarItemComponent,
13292
+ TheFontSizeToolbarItemComponent
12968
13293
  ];
12969
13294
  var PLUGIN_COMPONENTS = [
12970
13295
  TheImageComponent,
@@ -13010,7 +13335,8 @@
13010
13335
  TheTableSelectComponent,
13011
13336
  TheTableToolbarItemComponent,
13012
13337
  TheConversionHintComponent,
13013
- TheVerticalToolbarItemComponent, TheImageComponent,
13338
+ TheVerticalToolbarItemComponent,
13339
+ TheFontSizeToolbarItemComponent, TheImageComponent,
13014
13340
  TheTemplateComponent,
13015
13341
  TheHrComponent,
13016
13342
  TheBlockquoteComponent,
@@ -13029,31 +13355,33 @@
13029
13355
  TheTdComponent,
13030
13356
  ThePlaceholderComponent], imports: [i6.CommonModule, i1.SlateModule, i4$2.FormsModule, i4$1.ThyIconModule,
13031
13357
  avatar.ThyAvatarModule,
13032
- i2$1.ThyNavModule,
13033
- i2$2.ThyFormModule,
13034
- i5$3.ThySharedModule,
13035
- i2$3.ThyListModule,
13036
- i7.ThyTooltipModule,
13358
+ i3.ThyNavModule,
13359
+ i2$1.ThyFormModule,
13360
+ i5$4.ThySharedModule,
13361
+ i2$2.ThyListModule,
13362
+ i5$1.ThyTooltipModule,
13037
13363
  i4.ThyProgressModule,
13038
13364
  autocomplete.ThyAutocompleteModule,
13039
- i5$1.ThyActionMenuModule,
13365
+ i5$2.ThyActionMenuModule,
13040
13366
  i5.ThyInputModule,
13041
13367
  select.ThySelectModule,
13042
13368
  i1$5.ThyButtonModule,
13043
13369
  i1$4.ThyNotifyModule,
13044
- i1$1.ThyAlertModule, i5$2.CodemirrorModule, TheColumnSizeModule], exports: [TheEditorComponent, TheToolbarComponent, TheToolbarDropdownComponent, TheToolbarItemComponent, TheDefaultElementComponent] });
13370
+ i1$1.ThyAlertModule,
13371
+ i8.ThyResizableModule,
13372
+ i5$3.ThySwitchModule, i7.CodemirrorModule, TheColumnSizeModule], exports: [TheEditorComponent, TheToolbarComponent, TheToolbarDropdownComponent, TheToolbarItemComponent, TheDefaultElementComponent] });
13045
13373
  TheEditorModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheEditorModule, providers: [
13046
13374
  {
13047
13375
  provide: TheToolbarGroupToken,
13048
13376
  useValue: TheToolbarGroupComponent
13049
13377
  },
13050
13378
  THE_CODE_MODE_PROVIDER
13051
- ], imports: [__spreadArray(__spreadArray([i6.CommonModule, i1.SlateModule, i4$2.FormsModule], __read(TETHYS)), [i5$2.CodemirrorModule, TheColumnSizeModule])] });
13379
+ ], imports: [__spreadArray(__spreadArray([i6.CommonModule, i1.SlateModule, i4$2.FormsModule], __read(TETHYS)), [i7.CodemirrorModule, TheColumnSizeModule])] });
13052
13380
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheEditorModule, decorators: [{
13053
13381
  type: i0.NgModule,
13054
13382
  args: [{
13055
13383
  declarations: __spreadArray(__spreadArray(__spreadArray([TheEditorComponent], __read(PIPES)), __read(COMPONENTS)), __read(PLUGIN_COMPONENTS)),
13056
- imports: __spreadArray(__spreadArray([i6.CommonModule, i1.SlateModule, i4$2.FormsModule], __read(TETHYS)), [i5$2.CodemirrorModule, TheColumnSizeModule]),
13384
+ imports: __spreadArray(__spreadArray([i6.CommonModule, i1.SlateModule, i4$2.FormsModule], __read(TETHYS)), [i7.CodemirrorModule, TheColumnSizeModule]),
13057
13385
  exports: [TheEditorComponent, TheToolbarComponent, TheToolbarDropdownComponent, TheToolbarItemComponent, TheDefaultElementComponent],
13058
13386
  entryComponents: __spreadArray(__spreadArray([], __read(COMPONENTS)), __read(PLUGIN_COMPONENTS)),
13059
13387
  providers: [
@@ -13078,13 +13406,13 @@
13078
13406
  exports.A_TAG_REL_ATTR = A_TAG_REL_ATTR;
13079
13407
  exports.AlignEditor = AlignEditor;
13080
13408
  exports.BLOCK_DELETEBACKWARD_TYPES = BLOCK_DELETEBACKWARD_TYPES;
13081
- exports.BLOCK_INSERT_ORIGIN = BLOCK_INSERT_ORIGIN;
13082
13409
  exports.BlockquoteEditor = BlockquoteEditor;
13083
13410
  exports.CLIPBOARD_FORMAT_KEY = CLIPBOARD_FORMAT_KEY;
13084
13411
  exports.CODEMIRROR_PADDING_TOP = CODEMIRROR_PADDING_TOP;
13085
13412
  exports.CODE_MODES = CODE_MODES;
13086
13413
  exports.COMPONENTS = COMPONENTS;
13087
13414
  exports.CONTAINER_BLOCKS = CONTAINER_BLOCKS;
13415
+ exports.CONTROL_KEY = CONTROL_KEY;
13088
13416
  exports.CodeEditor = CodeEditor;
13089
13417
  exports.CodeMode = CodeMode;
13090
13418
  exports.ColorEditor = ColorEditor;
@@ -13098,6 +13426,7 @@
13098
13426
  exports.HEADING_TYPES = HEADING_TYPES;
13099
13427
  exports.HeadingEditor = HeadingEditor;
13100
13428
  exports.HrEditor = HrEditor;
13429
+ exports.IS_MAC = IS_MAC;
13101
13430
  exports.ImageEditor = ImageEditor;
13102
13431
  exports.LINK_DEFAULT_TEXT = LINK_DEFAULT_TEXT;
13103
13432
  exports.LIST_BLOCK_TYPES = LIST_BLOCK_TYPES;
@@ -13121,7 +13450,7 @@
13121
13450
  exports.THE_UPLOAD_SERVICE_TOKEN = THE_UPLOAD_SERVICE_TOKEN;
13122
13451
  exports.TableEditor = TableEditor;
13123
13452
  exports.TheBaseElementComponent = TheBaseElementComponent;
13124
- exports.TheCodeMode = TheCodeMode;
13453
+ exports.TheCodeConfig = TheCodeConfig;
13125
13454
  exports.TheContextService = TheContextService;
13126
13455
  exports.TheDefaultElementComponent = TheDefaultElementComponent;
13127
13456
  exports.TheEditor = TheEditor;