@worktile/theia 2.2.7 → 2.3.0-next.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/bundles/worktile-theia.umd.js +852 -249
  2. package/bundles/worktile-theia.umd.js.map +1 -1
  3. package/components/toolbar/toolbar.component.d.ts +3 -2
  4. package/components/toolbar-item/toolbar-item.component.d.ts +3 -4
  5. package/constants/default.d.ts +3 -0
  6. package/constants/node-types.d.ts +4 -0
  7. package/custom-types.d.ts +3 -1
  8. package/editor.component.d.ts +3 -1
  9. package/editor.module.d.ts +26 -24
  10. package/esm2015/components/toolbar/toolbar.component.js +6 -4
  11. package/esm2015/components/toolbar-item/toolbar-item.component.js +4 -4
  12. package/esm2015/constants/auto-format-rules.js +26 -7
  13. package/esm2015/constants/default.js +2 -1
  14. package/esm2015/constants/node-types.js +6 -1
  15. package/esm2015/custom-types.js +1 -1
  16. package/esm2015/editor.component.js +12 -6
  17. package/esm2015/editor.module.js +6 -3
  18. package/esm2015/interfaces/editor.js +1 -1
  19. package/esm2015/interfaces/image.js +1 -1
  20. package/esm2015/interfaces/valid-children-types.js +2 -1
  21. package/esm2015/plugins/align/align.editor.js +10 -2
  22. package/esm2015/plugins/align/options.js +3 -2
  23. package/esm2015/plugins/common/auto-insert-data..js +2 -18
  24. package/esm2015/plugins/dnd/component/dnd.component.js +260 -0
  25. package/esm2015/plugins/dnd/utils/get-current-target.js +19 -0
  26. package/esm2015/plugins/dnd/utils/get-hover-direction.js +13 -0
  27. package/esm2015/plugins/dnd/utils/is-valid-drag.js +38 -0
  28. package/esm2015/plugins/dnd/utils/move-drag-node.js +30 -0
  29. package/esm2015/plugins/dnd/utils/remove-drop-thumb-line.js +10 -0
  30. package/esm2015/plugins/image/image.component.js +167 -14
  31. package/esm2015/plugins/image/image.editor.js +4 -1
  32. package/esm2015/plugins/indent/on-keydown-indent.js +2 -3
  33. package/esm2015/plugins/list/list.editor.js +2 -2
  34. package/esm2015/plugins/quick-insert/components/quick-insert.component.js +13 -2
  35. package/esm2015/plugins/quick-insert/components/quick-toolbar/quick-toolbar.component.js +1 -1
  36. package/esm2015/services/context.service.js +5 -1
  37. package/esm2015/utils/dom.js +39 -1
  38. package/esm2015/utils/is-clean-empty-paragraph.js +4 -4
  39. package/esm2015/utils/merge-element-options.js +20 -0
  40. package/fesm2015/worktile-theia.js +786 -201
  41. package/fesm2015/worktile-theia.js.map +1 -1
  42. package/interfaces/editor.d.ts +9 -1
  43. package/interfaces/image.d.ts +7 -1
  44. package/interfaces/valid-children-types.d.ts +1 -0
  45. package/package.json +1 -1
  46. package/plugins/align/align.editor.d.ts +1 -0
  47. package/plugins/dnd/component/dnd.component.d.ts +42 -0
  48. package/plugins/dnd/component/dnd.component.scss +61 -0
  49. package/plugins/dnd/utils/get-current-target.d.ts +2 -0
  50. package/plugins/dnd/utils/get-hover-direction.d.ts +3 -0
  51. package/plugins/dnd/utils/is-valid-drag.d.ts +3 -0
  52. package/plugins/dnd/utils/move-drag-node.d.ts +2 -0
  53. package/plugins/dnd/utils/remove-drop-thumb-line.d.ts +2 -0
  54. package/plugins/image/image.component.d.ts +27 -3
  55. package/plugins/image/image.component.scss +9 -2
  56. package/plugins/image/image.editor.d.ts +6 -1
  57. package/plugins/quick-insert/components/quick-insert.component.d.ts +1 -0
  58. package/plugins/table/components/table.component.scss +1 -0
  59. package/services/context.service.d.ts +1 -0
  60. package/styles/editor.scss +4 -0
  61. package/styles/index.scss +1 -0
  62. package/styles/typo.scss +44 -0
  63. package/utils/dom.d.ts +5 -1
  64. package/utils/merge-element-options.d.ts +2 -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('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.i8, global.i1$4, global.i5$2, global.i6$1, global.i9, global.isUrl, global.i1$5, global.i2$1, global.i5$3, 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, i8, i1$4, i5$2, i6$1, i9, isUrl, i1$5, i2$1, i5$3, i1$6, coercion, portal, i2$2, 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('rxjs'), require('@angular/platform-browser'), require('ngx-tethys/progress'), require('ngx-tethys/icon'), require('ngx-tethys/nav'), require('ngx-tethys/tooltip'), require('ngx-tethys/input'), 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', 'rxjs', '@angular/platform-browser', 'ngx-tethys/progress', 'ngx-tethys/icon', 'ngx-tethys/nav', 'ngx-tethys/tooltip', 'ngx-tethys/input', '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.rxjs, global.ng.platformBrowser, global.i6, global.i4, global.i3, global.i5, global.i5$1, global.i8, global.i1$4, global.i5$2, global.i6$1, global.i9, global.isUrl, global.i1$5, global.i2$1, global.i5$3, 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, i10, i4$1, i1, core, isHotkey, slate, slateHistory, _lodash, marked, selene, i1$2, i2, i1$1, operators, uploader, rxjs, i1$3, i6, i4, i3, i5, i5$1, i8, i1$4, i5$2, i6$1, i9, isUrl, i1$5, i2$1, i5$3, 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
 
@@ -25,8 +25,8 @@
25
25
  }
26
26
 
27
27
  var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
28
- var i6__namespace = /*#__PURE__*/_interopNamespace(i6);
29
- var i4__namespace$2 = /*#__PURE__*/_interopNamespace(i4$2);
28
+ var i10__namespace = /*#__PURE__*/_interopNamespace(i10);
29
+ var i4__namespace$1 = /*#__PURE__*/_interopNamespace(i4$1);
30
30
  var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
31
31
  var isHotkey__default = /*#__PURE__*/_interopDefaultLegacy(isHotkey);
32
32
  var _lodash__namespace = /*#__PURE__*/_interopNamespace(_lodash);
@@ -35,10 +35,10 @@
35
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
+ var i6__namespace = /*#__PURE__*/_interopNamespace(i6);
38
39
  var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
39
- var i4__namespace$1 = /*#__PURE__*/_interopNamespace(i4$1);
40
- var i5__namespace = /*#__PURE__*/_interopNamespace(i5);
41
40
  var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
41
+ var i5__namespace = /*#__PURE__*/_interopNamespace(i5);
42
42
  var i5__namespace$1 = /*#__PURE__*/_interopNamespace(i5$1);
43
43
  var i8__namespace = /*#__PURE__*/_interopNamespace(i8);
44
44
  var i1__namespace$4 = /*#__PURE__*/_interopNamespace(i1$4);
@@ -379,6 +379,7 @@
379
379
  var DEFAULT_SCROLL_CONTAINER = '.the-editable-container';
380
380
  var ELEMENT_UNIQUE_ID = 'key';
381
381
  var ZERO_WIDTH_CHAR = '\u200B';
382
+ var DROP_THUMB_LINE = 'drop-thumb-line';
382
383
  exports.TheMode = void 0;
383
384
  (function (TheMode) {
384
385
  TheMode["fullMode"] = "full";
@@ -424,6 +425,11 @@
424
425
  VerticalAlignment["middle"] = "middle";
425
426
  VerticalAlignment["bottom"] = "bottom";
426
427
  })(exports.VerticalAlignment || (exports.VerticalAlignment = {}));
428
+ exports.LayoutTypes = void 0;
429
+ (function (LayoutTypes) {
430
+ LayoutTypes["wrapLeft"] = "wrap-left";
431
+ LayoutTypes["wrapRight"] = "wrap-right";
432
+ })(exports.LayoutTypes || (exports.LayoutTypes = {}));
427
433
  exports.FontSizes = void 0;
428
434
  (function (FontSizes) {
429
435
  FontSizes["fontSize12"] = "12";
@@ -831,6 +837,7 @@
831
837
  },
832
838
  {
833
839
  type: exports.ElementKinds.tableCell,
840
+ isSecondaryContainer: true,
834
841
  inValidChildrenTypes: [exports.ElementKinds.table, exports.ElementKinds.tableCell]
835
842
  }
836
843
  ];
@@ -2097,7 +2104,7 @@
2097
2104
  else if (slate.Element.isElement(node) && node.type === exports.ElementKinds.paragraph) {
2098
2105
  var textIndent = node.textIndent;
2099
2106
  if (textIndent) {
2100
- slate.Transforms.setNodes(editor, { textIndent: undefined }, // remove textIndent
2107
+ slate.Transforms.setNodes(editor, { textIndent: undefined, indent: undefined }, // remove indent
2101
2108
  { at: path });
2102
2109
  }
2103
2110
  }
@@ -2228,30 +2235,80 @@
2228
2235
  }
2229
2236
  };
2230
2237
 
2238
+ var HeadingEditor = {
2239
+ setHeading: function (editor, heading) {
2240
+ slate.Editor.withoutNormalizing(editor, function () {
2241
+ var _a;
2242
+ var types = [exports.ElementKinds.bulletedList, exports.ElementKinds.numberedList, exports.ElementKinds.listItem];
2243
+ slate.Transforms.unwrapNodes(editor, {
2244
+ at: editor.selection,
2245
+ match: function (n) { return slate.Element.isElement(n) && types.includes(n.type); },
2246
+ mode: 'all',
2247
+ split: true
2248
+ });
2249
+ slate.Transforms.setNodes(editor, { type: heading });
2250
+ var entry = anchorBlockEntry(editor);
2251
+ var unMarks = (_a = {},
2252
+ _a[exports.MarkTypes.fontSize] = null,
2253
+ _a);
2254
+ if (entry) {
2255
+ setMarks(editor, unMarks, entry[1]);
2256
+ return;
2257
+ }
2258
+ setMarks(editor, unMarks, editor.selection);
2259
+ });
2260
+ },
2261
+ isHeadingActive: function (editor, heading) {
2262
+ var _a = __read(slate.Editor.nodes(editor, {
2263
+ match: function (n) { return slate.Element.isElement(n) && n.type === heading; },
2264
+ universal: true
2265
+ }), 1), match = _a[0];
2266
+ return !!match;
2267
+ }
2268
+ };
2269
+
2231
2270
  var autoFormatRules = [
2232
2271
  {
2233
2272
  type: exports.ElementKinds.heading_1,
2234
- markup: '#'
2273
+ markup: '#',
2274
+ format: function (editor) {
2275
+ HeadingEditor.setHeading(editor, exports.ElementKinds.heading_1);
2276
+ }
2235
2277
  },
2236
2278
  {
2237
2279
  type: exports.ElementKinds.heading_2,
2238
- markup: '##'
2280
+ markup: '##',
2281
+ format: function (editor) {
2282
+ HeadingEditor.setHeading(editor, exports.ElementKinds.heading_2);
2283
+ }
2239
2284
  },
2240
2285
  {
2241
2286
  type: exports.ElementKinds.heading_3,
2242
- markup: '###'
2287
+ markup: '###',
2288
+ format: function (editor) {
2289
+ HeadingEditor.setHeading(editor, exports.ElementKinds.heading_3);
2290
+ }
2243
2291
  },
2244
2292
  {
2245
2293
  type: exports.ElementKinds.heading_4,
2246
- markup: '####'
2294
+ markup: '####',
2295
+ format: function (editor) {
2296
+ HeadingEditor.setHeading(editor, exports.ElementKinds.heading_4);
2297
+ }
2247
2298
  },
2248
2299
  {
2249
2300
  type: exports.ElementKinds.heading_5,
2250
- markup: '#####'
2301
+ markup: '#####',
2302
+ format: function (editor) {
2303
+ HeadingEditor.setHeading(editor, exports.ElementKinds.heading_5);
2304
+ }
2251
2305
  },
2252
2306
  {
2253
2307
  type: exports.ElementKinds.heading_6,
2254
- markup: '######'
2308
+ markup: '######',
2309
+ format: function (editor) {
2310
+ HeadingEditor.setHeading(editor, exports.ElementKinds.heading_6);
2311
+ }
2255
2312
  },
2256
2313
  {
2257
2314
  type: exports.ElementKinds.blockquote,
@@ -2504,7 +2561,7 @@
2504
2561
  var textIndent = 'textIndent';
2505
2562
  var align = 'align';
2506
2563
  var hasTextIndent = block[textIndent];
2507
- var hasAlign = block[align];
2564
+ var alignValue = block[align];
2508
2565
  var hasIndent = block[exports.ElementKinds.indent];
2509
2566
  if (slate.Node.string(block) === '' &&
2510
2567
  slate.Element.isElement(block) &&
@@ -2514,7 +2571,7 @@
2514
2571
  !slate.Editor.isVoid(editor, block) &&
2515
2572
  !hasIndent &&
2516
2573
  !hasTextIndent &&
2517
- !hasAlign) {
2574
+ (!alignValue || alignValue === exports.Alignment.left)) {
2518
2575
  return true;
2519
2576
  }
2520
2577
  return false;
@@ -2624,6 +2681,25 @@
2624
2681
  return regexps.some(function (regexp) { return regexp.test(content); });
2625
2682
  };
2626
2683
 
2684
+ var mergeElementOptions = function (elementOptions) {
2685
+ elementOptions = elementOptions.filter(function (item) { return item.inValidChildrenTypes.length > 0; });
2686
+ var combinationData = __spreadArray(__spreadArray([], __read(DefaultElementOptions)), __read(elementOptions));
2687
+ var dataInfo = {};
2688
+ combinationData.forEach(function (item) {
2689
+ var type = item.type, inValidChildrenTypes = item.inValidChildrenTypes, isIndivisible = item.isIndivisible, isSecondaryContainer = item.isSecondaryContainer;
2690
+ if (!dataInfo[type]) {
2691
+ dataInfo[type] = {
2692
+ type: type,
2693
+ inValidChildrenTypes: inValidChildrenTypes,
2694
+ isIndivisible: isIndivisible,
2695
+ isSecondaryContainer: isSecondaryContainer
2696
+ };
2697
+ }
2698
+ dataInfo[type].inValidChildrenTypes = Array.from(new Set(__spreadArray(__spreadArray([], __read(inValidChildrenTypes)), __read(dataInfo[type].inValidChildrenTypes))));
2699
+ });
2700
+ return dataInfo;
2701
+ };
2702
+
2627
2703
  var withAutoInsertData = function (validChildren) { return function (editor) {
2628
2704
  var insertData = editor.insertData;
2629
2705
  var allElementOptions = DefaultElementOptions;
@@ -2689,23 +2765,6 @@
2689
2765
  };
2690
2766
  return editor;
2691
2767
  }; };
2692
- var mergeElementOptions = function (elementOptions) {
2693
- elementOptions = elementOptions.filter(function (item) { return item.inValidChildrenTypes.length > 0; });
2694
- var combinationData = __spreadArray(__spreadArray([], __read(DefaultElementOptions)), __read(elementOptions));
2695
- var dataInfo = {};
2696
- combinationData.forEach(function (item) {
2697
- var type = item.type, inValidChildrenTypes = item.inValidChildrenTypes, isIndivisible = item.isIndivisible;
2698
- if (!dataInfo[type]) {
2699
- dataInfo[type] = {
2700
- type: type,
2701
- inValidChildrenTypes: inValidChildrenTypes,
2702
- isIndivisible: isIndivisible
2703
- };
2704
- }
2705
- dataInfo[type].inValidChildrenTypes = Array.from(new Set(__spreadArray(__spreadArray([], __read(inValidChildrenTypes)), __read(dataInfo[type].inValidChildrenTypes))));
2706
- });
2707
- return dataInfo;
2708
- };
2709
2768
 
2710
2769
  var withRemoveEmpty = function (editor) {
2711
2770
  var deleteBackward = editor.deleteBackward, deleteForward = editor.deleteForward;
@@ -2821,6 +2880,10 @@
2821
2880
  var editableElement = this.getEditableElement();
2822
2881
  return editableElement === null || editableElement === void 0 ? void 0 : editableElement.firstElementChild;
2823
2882
  };
2883
+ TheContextService.prototype.layoutDefaultWidth = function () {
2884
+ var firstElementChild = this.getFirstElementChild();
2885
+ return 0.48 * firstElementChild.clientWidth;
2886
+ };
2824
2887
  TheContextService.prototype.setUploadFileList = function (file) {
2825
2888
  this.fileList.push(file);
2826
2889
  };
@@ -2835,18 +2898,178 @@
2835
2898
  type: i0.Injectable
2836
2899
  }], ctorParameters: function () { return [{ type: i0__namespace.NgZone }]; } });
2837
2900
 
2901
+ var ImageEditor = {
2902
+ openUpload: function (editor) {
2903
+ var inputFile = document.createElement('input');
2904
+ inputFile.setAttribute('type', 'file');
2905
+ inputFile.setAttribute('accept', 'image/*');
2906
+ inputFile.onchange = function (event) {
2907
+ ImageEditor.insertImages(editor, event.target.files);
2908
+ };
2909
+ inputFile.click();
2910
+ },
2911
+ insertImages: function (editor, imageFiles) {
2912
+ var e_1, _a;
2913
+ var contextService = editor.injector.get(TheContextService);
2914
+ var imageNodes = [];
2915
+ var text = { text: '' };
2916
+ try {
2917
+ for (var imageFiles_1 = __values(imageFiles), imageFiles_1_1 = imageFiles_1.next(); !imageFiles_1_1.done; imageFiles_1_1 = imageFiles_1.next()) {
2918
+ var image = imageFiles_1_1.value;
2919
+ var verify = ImageEditor.verifyImage(editor, image);
2920
+ if (verify) {
2921
+ var url = URL.createObjectURL(image);
2922
+ contextService.setUploadFileList({
2923
+ url: url,
2924
+ file: image
2925
+ });
2926
+ imageNodes.push({ type: exports.ElementKinds.image, url: url, children: [text] });
2927
+ }
2928
+ }
2929
+ }
2930
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
2931
+ finally {
2932
+ try {
2933
+ if (imageFiles_1_1 && !imageFiles_1_1.done && (_a = imageFiles_1.return)) _a.call(imageFiles_1);
2934
+ }
2935
+ finally { if (e_1) throw e_1.error; }
2936
+ }
2937
+ if (imageNodes.length > 0) {
2938
+ var at = editor.selection;
2939
+ slate.Transforms.insertNodes(editor, imageNodes, { at: at });
2940
+ if (isCollapsed(editor.selection) && isEmptyParagraph(editor)) {
2941
+ slate.Transforms.removeNodes(editor, { at: at });
2942
+ slate.Transforms.select(editor, at);
2943
+ }
2944
+ }
2945
+ },
2946
+ verifyImage: function (editor, image) {
2947
+ if (!PICTURE_ACCEPTED_UPLOAD_MIME.includes(image.type)) {
2948
+ editor.onError({
2949
+ code: exports.ErrorCodes.IMAGE_ERR_MIME_FORMAT
2950
+ });
2951
+ return false;
2952
+ }
2953
+ if (image.size / 1000000 >= PICTURE_ACCEPTED_UPLOAD_SIZE) {
2954
+ editor.onError({
2955
+ code: exports.ErrorCodes.IMAGE_ERR_SIZE_LIMIT
2956
+ });
2957
+ return false;
2958
+ }
2959
+ return true;
2960
+ },
2961
+ isImageActive: function (editor) {
2962
+ var _a = __read(slate.Editor.nodes(editor, {
2963
+ match: function (n) { return slate.Element.isElement(n) && n.type === exports.ElementKinds.image; },
2964
+ universal: true
2965
+ }), 1), match = _a[0];
2966
+ return !!match;
2967
+ },
2968
+ setImageNode: function (editor, path, partial) {
2969
+ slate.Transforms.setNodes(editor, partial, { at: path });
2970
+ }
2971
+ };
2972
+
2973
+ var NavSplitLineComponent = /** @class */ (function () {
2974
+ function NavSplitLineComponent() {
2975
+ this.mode = exports.ToolbarItemMode.vertical;
2976
+ this.theNavSplitLine = true;
2977
+ }
2978
+ Object.defineProperty(NavSplitLineComponent.prototype, "horizontal", {
2979
+ get: function () {
2980
+ return this.mode === exports.ToolbarItemMode.horizontal;
2981
+ },
2982
+ enumerable: false,
2983
+ configurable: true
2984
+ });
2985
+ Object.defineProperty(NavSplitLineComponent.prototype, "vertical", {
2986
+ get: function () {
2987
+ return this.mode === exports.ToolbarItemMode.vertical;
2988
+ },
2989
+ enumerable: false,
2990
+ configurable: true
2991
+ });
2992
+ NavSplitLineComponent.prototype.ngOnInit = function () { };
2993
+ return NavSplitLineComponent;
2994
+ }());
2995
+ NavSplitLineComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: NavSplitLineComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
2996
+ NavSplitLineComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", 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 });
2997
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: NavSplitLineComponent, decorators: [{
2998
+ type: i0.Component,
2999
+ args: [{
3000
+ selector: 'nav-split-line',
3001
+ template: ''
3002
+ }]
3003
+ }], ctorParameters: function () { return []; }, propDecorators: { mode: [{
3004
+ type: i0.Input
3005
+ }], theNavSplitLine: [{
3006
+ type: i0.HostBinding,
3007
+ args: ['class.the-nav-split-line']
3008
+ }], horizontal: [{
3009
+ type: i0.HostBinding,
3010
+ args: ['class.horizontal']
3011
+ }], vertical: [{
3012
+ type: i0.HostBinding,
3013
+ args: ['class.vertical']
3014
+ }] } });
3015
+
2838
3016
  var TheImageComponent = /** @class */ (function (_super) {
2839
3017
  __extends(TheImageComponent, _super);
2840
- function TheImageComponent(elementRef, sanitizer, imageUploaderService, cdr, theContextService) {
3018
+ function TheImageComponent(elementRef, sanitizer, imageUploaderService, cdr, theContextService, thyPopover, overlay, viewContainerRef) {
2841
3019
  var _this = _super.call(this, elementRef, cdr) || this;
2842
3020
  _this.elementRef = elementRef;
2843
3021
  _this.sanitizer = sanitizer;
2844
3022
  _this.imageUploaderService = imageUploaderService;
2845
3023
  _this.cdr = cdr;
2846
3024
  _this.theContextService = theContextService;
3025
+ _this.thyPopover = thyPopover;
3026
+ _this.overlay = overlay;
3027
+ _this.viewContainerRef = viewContainerRef;
2847
3028
  _this.imageEntry = {};
2848
3029
  _this.uploading = false;
2849
3030
  _this.percentage = 0;
3031
+ _this.layoutDefaultWidth = 368;
3032
+ _this.layoutOptions = [
3033
+ {
3034
+ key: exports.Alignment.left,
3035
+ icon: 'image-left',
3036
+ name: '左对齐',
3037
+ handle: function (e, key) { return _this.setImageNode(e, { align: key, layout: undefined }); }
3038
+ },
3039
+ {
3040
+ key: exports.Alignment.center,
3041
+ icon: 'image-center',
3042
+ name: '居中',
3043
+ handle: function (e, key) { return _this.setImageNode(e, { align: key, layout: undefined }); }
3044
+ },
3045
+ {
3046
+ key: exports.Alignment.right,
3047
+ icon: 'image-right',
3048
+ name: '右对齐',
3049
+ handle: function (e, key) { return _this.setImageNode(e, { align: key, layout: undefined }); }
3050
+ },
3051
+ {
3052
+ key: exports.ToolbarActionTypes.split
3053
+ },
3054
+ {
3055
+ key: exports.LayoutTypes.wrapLeft,
3056
+ icon: 'wrap-left',
3057
+ name: '隐藏左边',
3058
+ handle: function (e, key) { return _this.setImageNode(e, { layout: key }); }
3059
+ },
3060
+ {
3061
+ key: exports.LayoutTypes.wrapRight,
3062
+ icon: 'wrap-right',
3063
+ name: '隐藏右边',
3064
+ handle: function (e, key) { return _this.setImageNode(e, { layout: key }); }
3065
+ },
3066
+ {
3067
+ key: 'remove',
3068
+ icon: 'trash',
3069
+ name: '删除',
3070
+ handle: function (e) { return _this.onDelete(e); }
3071
+ }
3072
+ ];
2850
3073
  _this.dragable = false;
2851
3074
  _this.beforeContextChange = function (value) {
2852
3075
  if (value.element !== _this.element && value.element.thumbUrl) {
@@ -2856,21 +3079,43 @@
2856
3079
  height: value.element.height,
2857
3080
  thumbUrl: value.element.thumbUrl,
2858
3081
  originUrl: value.element.originUrl,
2859
- align: value.element.align || exports.Alignment.left
3082
+ align: value.element.align || exports.Alignment.left,
3083
+ layout: value.element.layout,
3084
+ reSized: value.element.reSized || false
2860
3085
  };
3086
+ _this.setBlockCardLayoutAttr();
2861
3087
  }
2862
3088
  };
2863
3089
  return _this;
2864
3090
  }
3091
+ Object.defineProperty(TheImageComponent.prototype, "isOpen", {
3092
+ get: function () {
3093
+ return this.layoutToolbarRef && this.layoutToolbarRef.getOverlayRef() && this.layoutToolbarRef.getOverlayRef().hasAttached();
3094
+ },
3095
+ enumerable: false,
3096
+ configurable: true
3097
+ });
2865
3098
  TheImageComponent.prototype.ngOnInit = function () {
2866
3099
  var _this = this;
2867
3100
  var _a;
3101
+ this.layoutDefaultWidth = this.theContextService.layoutDefaultWidth();
2868
3102
  this.file = (_a = this.theContextService.fileList.find(function (item) { return item.url === _this.element.url; })) === null || _a === void 0 ? void 0 : _a.file;
2869
3103
  if (this.file && this.file instanceof File) {
2870
3104
  this.uploadImage(this.file);
2871
3105
  }
2872
3106
  _super.prototype.ngOnInit.call(this);
2873
3107
  };
3108
+ TheImageComponent.prototype.onContextChange = function () {
3109
+ _super.prototype.onContextChange.call(this);
3110
+ if (this.initialized) {
3111
+ if (this.isShouldOpen()) {
3112
+ this.openLayoutToolbar();
3113
+ }
3114
+ if (this.isShouldClose()) {
3115
+ this.closeLayoutToolbar();
3116
+ }
3117
+ }
3118
+ };
2874
3119
  TheImageComponent.prototype.ngOnDestroy = function () {
2875
3120
  this.uploadingSubscription.unsubscribe();
2876
3121
  this.mouseUpSubscription.unsubscribe();
@@ -2952,18 +3197,20 @@
2952
3197
  axis: axis,
2953
3198
  printerPositionX: event.pageX,
2954
3199
  printerPositionY: event.pageY,
2955
- internalWidth: this.imageEntry.width | imgElement.width,
2956
- internalHeight: this.imageEntry.height | imgElement.height,
3200
+ internalWidth: imgElement.width || this.imageEntry.width,
3201
+ internalHeight: imgElement.height || this.imageEntry.height,
2957
3202
  maxWidth: this.theContextService.getOptions().width
2958
3203
  };
2959
3204
  this.mouseMoveSubscription = this.theContextService.onMouseMove$.subscribe(function (e) { return _this.mouseMoveHandle(e, options); });
2960
3205
  };
2961
3206
  TheImageComponent.prototype.mouseMoveHandle = function (event, options) {
3207
+ var _a;
2962
3208
  if (this.dragable) {
2963
3209
  var axis = options.axis, printerPositionX = options.printerPositionX, printerPositionY = options.printerPositionY, internalWidth = options.internalWidth, internalHeight = options.internalHeight, maxWidth = options.maxWidth;
2964
3210
  var isReversal = axis.includes('-');
2965
3211
  var offsetX = event.pageX - printerPositionX;
2966
3212
  var offsetY = event.pageY - printerPositionY;
3213
+ var _b = this.element, width = _b.width, height = _b.height;
2967
3214
  if (isReversal) {
2968
3215
  offsetX = -offsetX;
2969
3216
  offsetY = -offsetY;
@@ -2971,11 +3218,15 @@
2971
3218
  if (this.element.align === 'center') {
2972
3219
  offsetX = offsetX * 2;
2973
3220
  }
2974
- var _b = this.element, width = _b.width, height = _b.height;
2975
3221
  if (axis.includes('x')) {
2976
3222
  width = offsetX + internalWidth;
2977
3223
  if (width >= maxWidth) {
2978
3224
  width = maxWidth;
3225
+ // clear `layout` when the image is adjusted to the maximum value under rich media
3226
+ if ((_a = this.imageEntry) === null || _a === void 0 ? void 0 : _a.layout) {
3227
+ var path = findPath(this.editor, this.element);
3228
+ ImageEditor.setImageNode(this.editor, path, { layout: undefined });
3229
+ }
2979
3230
  }
2980
3231
  if (width <= 100) {
2981
3232
  width = 100;
@@ -2998,6 +3249,9 @@
2998
3249
  width = internalWidth / ratio;
2999
3250
  }
3000
3251
  }
3252
+ if (!this.imageEntry.reSized && this.imageEntry.width !== width) {
3253
+ this.imageEntry.reSized = true;
3254
+ }
3001
3255
  this.imageContent.nativeElement.style.width = width + 'px';
3002
3256
  this.imageContent.nativeElement.style.height = height + 'px';
3003
3257
  this.imageEntry.width = width;
@@ -3020,97 +3274,102 @@
3020
3274
  }
3021
3275
  $event.stopPropagation();
3022
3276
  };
3023
- return TheImageComponent;
3024
- }(TheBaseElementComponent));
3025
- TheImageComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheImageComponent, deps: [{ token: i0__namespace.ElementRef }, { token: i1__namespace$2.DomSanitizer }, { token: THE_UPLOAD_SERVICE_TOKEN }, { token: i0__namespace.ChangeDetectorRef }, { token: TheContextService }], target: i0__namespace.ɵɵFactoryTarget.Component });
3026
- TheImageComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheImageComponent, selector: "the-image, [theImage]", viewQueries: [{ propertyName: "imageContent", first: true, predicate: ["imageContent"], descendants: true }, { propertyName: "img", first: true, predicate: ["img"], descendants: true }], usesInheritance: true, ngImport: i0__namespace, template: "<slate-children [children]=\"children\" [context]=\"childrenContext\" [viewContext]=\"viewContext\"></slate-children>\n<div class=\"image-container\" contenteditable=\"false\" [style.textAlign]=\"imageEntry.align\">\n <div\n #imageContent\n *ngIf=\"imageEntry.thumbUrl\"\n class=\"image-content\"\n [class.pointer]=\"!selection\"\n [ngStyle]=\"{ width: imageEntry.width + 'px', height: imageEntry.height + 'px' }\"\n >\n <img #img class=\"main-image\" [src]=\"imageEntry.thumbUrl\" [alt]=\"imageEntry.name\" />\n <div *ngIf=\"selection\" class=\"image-profile\" [class.outline]=\"selection\">\n <span *ngIf=\"isCollapsed\" (mousedown)=\"startDrag($event, '-xl')\" class=\"image-pointer left top\"></span>\n <span *ngIf=\"isCollapsed\" (mousedown)=\"startDrag($event, 'xl')\" class=\"image-pointer right top\"></span>\n <span *ngIf=\"isCollapsed\" (mousedown)=\"startDrag($event, 'xl')\" class=\"image-pointer right bottom\"></span>\n <span *ngIf=\"isCollapsed\" (mousedown)=\"startDrag($event, '-xl')\" class=\"image-pointer left bottom\"></span>\n </div>\n <div *ngIf=\"uploading\" class=\"uploading\">\n <div class=\"uploading-percentage\">\n <thy-progress thyType=\"primary\" [thyValue]=\"percentage\" thySize=\"sm\"></thy-progress>\n <thy-icon (click)=\"cancelUpload($event)\" thyIconName=\"close-circle-bold-fill\" thyIconLegging=\"true\"></thy-icon>\n </div>\n </div>\n <div *ngIf=\"!uploading\" class=\"layer\" (mousedown)=\"preview($event)\" [class.readonly]=\"readonly\"></div>\n </div>\n <div *ngIf=\"!imageEntry.thumbUrl\" class=\"image-loading\" contenteditable=\"false\">\n <thy-icon thyIconName=\"image\"></thy-icon>\n </div>\n</div>\n", components: [{ type: i1__namespace.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }, { type: i4__namespace.ThyProgressComponent, selector: "thy-progress", inputs: ["thyType", "thySize", "thyValue", "thyMax", "thyTips"] }, { 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: i6__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
3027
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheImageComponent, decorators: [{
3028
- type: i0.Component,
3029
- args: [{
3030
- selector: 'the-image, [theImage]',
3031
- templateUrl: './image.component.html'
3032
- }]
3033
- }], ctorParameters: function () {
3034
- return [{ type: i0__namespace.ElementRef }, { type: i1__namespace$2.DomSanitizer }, { type: undefined, decorators: [{
3035
- type: i0.Inject,
3036
- args: [THE_UPLOAD_SERVICE_TOKEN]
3037
- }] }, { type: i0__namespace.ChangeDetectorRef }, { type: TheContextService }];
3038
- }, propDecorators: { imageContent: [{
3039
- type: i0.ViewChild,
3040
- args: ['imageContent']
3041
- }], img: [{
3042
- type: i0.ViewChild,
3043
- args: ['img', { static: false }]
3044
- }] } });
3045
-
3046
- var ImageEditor = {
3047
- openUpload: function (editor) {
3048
- var inputFile = document.createElement('input');
3049
- inputFile.setAttribute('type', 'file');
3050
- inputFile.setAttribute('accept', 'image/*');
3051
- inputFile.onchange = function (event) {
3052
- ImageEditor.insertImages(editor, event.target.files);
3053
- };
3054
- inputFile.click();
3055
- },
3056
- insertImages: function (editor, imageFiles) {
3057
- var e_1, _a;
3058
- var contextService = editor.injector.get(TheContextService);
3059
- var imageNodes = [];
3060
- var text = { text: '' };
3061
- try {
3062
- for (var imageFiles_1 = __values(imageFiles), imageFiles_1_1 = imageFiles_1.next(); !imageFiles_1_1.done; imageFiles_1_1 = imageFiles_1.next()) {
3063
- var image = imageFiles_1_1.value;
3064
- var verify = ImageEditor.verifyImage(editor, image);
3065
- if (verify) {
3066
- var url = URL.createObjectURL(image);
3067
- contextService.setUploadFileList({
3068
- url: url,
3069
- file: image
3070
- });
3071
- imageNodes.push({ type: exports.ElementKinds.image, url: url, children: [text] });
3072
- }
3073
- }
3074
- }
3075
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
3076
- finally {
3077
- try {
3078
- if (imageFiles_1_1 && !imageFiles_1_1.done && (_a = imageFiles_1.return)) _a.call(imageFiles_1);
3277
+ TheImageComponent.prototype.isShouldOpen = function () {
3278
+ return !(this === null || this === void 0 ? void 0 : this.readonly) && (this === null || this === void 0 ? void 0 : this.isCollapsed) && !this.uploading && !this.isOpen;
3279
+ };
3280
+ TheImageComponent.prototype.isShouldClose = function () {
3281
+ return this.isOpen && ((this === null || this === void 0 ? void 0 : this.readonly) || !(this === null || this === void 0 ? void 0 : this.isCollapsed) || this.uploading);
3282
+ };
3283
+ TheImageComponent.prototype.openLayoutToolbar = function () {
3284
+ var _a;
3285
+ this.layoutToolbarRef = this.thyPopover.open(this.layoutToolbar, {
3286
+ origin: this.imageContent,
3287
+ panelClass: ['the-image-toolbar'],
3288
+ placement: 'bottom',
3289
+ insideClosable: false,
3290
+ backdropClosable: true,
3291
+ hasBackdrop: false,
3292
+ offset: 60,
3293
+ viewContainerRef: this.viewContainerRef,
3294
+ scrollStrategy: this.overlay.scrollStrategies.reposition()
3295
+ });
3296
+ (_a = this.layoutToolbarRef) === null || _a === void 0 ? void 0 : _a.getOverlayRef().updatePositionStrategy(this.createPositionStrategy());
3297
+ };
3298
+ TheImageComponent.prototype.closeLayoutToolbar = function () {
3299
+ var _a;
3300
+ (_a = this.layoutToolbarRef) === null || _a === void 0 ? void 0 : _a.close();
3301
+ };
3302
+ TheImageComponent.prototype.layoutActive = function (key) {
3303
+ var _b = this.imageEntry, layout = _b.layout, align = _b.align;
3304
+ return key && ((key === align && !layout) || key === layout);
3305
+ };
3306
+ TheImageComponent.prototype.setImageNode = function (e, partial) {
3307
+ e.preventDefault();
3308
+ var path = findPath(this.editor, this.element);
3309
+ ImageEditor.setImageNode(this.editor, path, partial);
3310
+ };
3311
+ TheImageComponent.prototype.setBlockCardLayoutAttr = function () {
3312
+ var _this = this;
3313
+ Promise.resolve().then(function () {
3314
+ var _a;
3315
+ var currentElement = i1.AngularEditor.toDOMNode(_this.editor, _this.element);
3316
+ var blockCard = currentElement.closest('.slate-block-card');
3317
+ var layout = _this.element.layout;
3318
+ if (blockCard && layout) {
3319
+ blockCard.setAttribute('layout', layout);
3079
3320
  }
3080
- finally { if (e_1) throw e_1.error; }
3081
- }
3082
- if (imageNodes.length > 0) {
3083
- var at = editor.selection;
3084
- slate.Transforms.insertNodes(editor, imageNodes, { at: at });
3085
- if (isCollapsed(editor.selection) && isEmptyParagraph(editor)) {
3086
- slate.Transforms.removeNodes(editor, { at: at });
3087
- slate.Transforms.select(editor, at);
3321
+ else if (blockCard && !layout) {
3322
+ blockCard.removeAttribute('layout');
3088
3323
  }
3089
- }
3090
- },
3091
- verifyImage: function (editor, image) {
3092
- if (!PICTURE_ACCEPTED_UPLOAD_MIME.includes(image.type)) {
3093
- editor.onError({
3094
- code: exports.ErrorCodes.IMAGE_ERR_MIME_FORMAT
3095
- });
3096
- return false;
3097
- }
3098
- if (image.size / 1000000 >= PICTURE_ACCEPTED_UPLOAD_SIZE) {
3099
- editor.onError({
3100
- code: exports.ErrorCodes.IMAGE_ERR_SIZE_LIMIT
3101
- });
3102
- return false;
3103
- }
3104
- return true;
3105
- },
3106
- isImageActive: function (editor) {
3107
- var _a = __read(slate.Editor.nodes(editor, {
3108
- match: function (n) { return slate.Element.isElement(n) && n.type === exports.ElementKinds.image; },
3109
- universal: true
3110
- }), 1), match = _a[0];
3111
- return !!match;
3112
- }
3113
- };
3324
+ (_a = _this.layoutToolbarRef) === null || _a === void 0 ? void 0 : _a.getOverlayRef().updatePosition();
3325
+ });
3326
+ };
3327
+ TheImageComponent.prototype.onDelete = function (event) {
3328
+ event.preventDefault();
3329
+ deleteElement(this.editor, this.element);
3330
+ };
3331
+ TheImageComponent.prototype.createPositionStrategy = function () {
3332
+ var bottomPosition = {
3333
+ originX: 'center',
3334
+ originY: 'bottom',
3335
+ overlayX: 'center',
3336
+ overlayY: 'top',
3337
+ offsetX: 0,
3338
+ offsetY: 60
3339
+ };
3340
+ return this.overlay
3341
+ .position()
3342
+ .flexibleConnectedTo(this.imageContent)
3343
+ .withFlexibleDimensions(false)
3344
+ .withGrowAfterOpen(false)
3345
+ .withPush(false)
3346
+ .withPositions([bottomPosition]);
3347
+ };
3348
+ return TheImageComponent;
3349
+ }(TheBaseElementComponent));
3350
+ TheImageComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheImageComponent, deps: [{ token: i0__namespace.ElementRef }, { token: i1__namespace$2.DomSanitizer }, { token: THE_UPLOAD_SERVICE_TOKEN }, { token: i0__namespace.ChangeDetectorRef }, { token: TheContextService }, { token: i1__namespace$3.ThyPopover }, { token: i2__namespace.Overlay }, { token: i0__namespace.ViewContainerRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
3351
+ TheImageComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheImageComponent, selector: "the-image, [theImage]", viewQueries: [{ propertyName: "imageContent", first: true, predicate: ["imageContent"], descendants: true }, { propertyName: "img", first: true, predicate: ["img"], descendants: true }, { propertyName: "layoutToolbar", first: true, predicate: ["layoutToolbar"], descendants: true, static: true }], usesInheritance: true, ngImport: i0__namespace, template: "<slate-children [children]=\"children\" [context]=\"childrenContext\" [viewContext]=\"viewContext\"></slate-children>\n\n<div class=\"image-container\" contenteditable=\"false\" [style.textAlign]=\"imageEntry.align\">\n <div\n #imageContent\n *ngIf=\"imageEntry.thumbUrl\"\n class=\"image-content\"\n [class.pointer]=\"!selection\"\n [ngStyle]=\"{\n 'width.px':\n imageEntry?.layout && imageEntry?.width > layoutDefaultWidth && !imageEntry?.reSized\n ? layoutDefaultWidth\n : imageEntry.width,\n 'height.px': imageEntry.height\n }\"\n >\n <img #img class=\"main-image\" [src]=\"imageEntry.thumbUrl\" [alt]=\"imageEntry.name\" />\n <div *ngIf=\"selection\" class=\"image-profile\" [class.outline]=\"selection\">\n <span *ngIf=\"isCollapsed\" (mousedown)=\"startDrag($event, '-xl')\" class=\"image-pointer left top\"></span>\n <span *ngIf=\"isCollapsed\" (mousedown)=\"startDrag($event, 'xl')\" class=\"image-pointer right top\"></span>\n <span *ngIf=\"isCollapsed\" (mousedown)=\"startDrag($event, 'xl')\" class=\"image-pointer right bottom\"></span>\n <span *ngIf=\"isCollapsed\" (mousedown)=\"startDrag($event, '-xl')\" class=\"image-pointer left bottom\"></span>\n </div>\n <div *ngIf=\"uploading\" class=\"uploading\">\n <div class=\"uploading-percentage\">\n <thy-progress thyType=\"primary\" [thyValue]=\"percentage\" thySize=\"sm\"></thy-progress>\n <thy-icon (click)=\"cancelUpload($event)\" thyIconName=\"close-circle-bold-fill\" thyIconLegging=\"true\"></thy-icon>\n </div>\n </div>\n <div *ngIf=\"!uploading\" class=\"layer\" (mousedown)=\"preview($event)\" [class.readonly]=\"readonly\"></div>\n </div>\n <div *ngIf=\"!imageEntry.thumbUrl\" class=\"image-loading\" contenteditable=\"false\">\n <thy-icon thyIconName=\"image\"></thy-icon>\n </div>\n</div>\n\n<ng-template #layoutToolbar>\n <div class=\"the-block-operate\" contenteditable=\"false\">\n <thy-icon-nav>\n <ng-container *ngFor=\"let item of layoutOptions\">\n <a\n *ngIf=\"item.key !== 'split'\"\n href=\"javascript:;\"\n thyIconNavLink\n [ngClass]=\"{ 'remove-link': item.key === 'remove' }\"\n [thyIconNavLinkIcon]=\"item.icon\"\n [thyTooltip]=\"item.name\"\n [thyIconNavLinkActive]=\"layoutActive(item.key)\"\n thyTooltipPlacement=\"top\"\n (mousedown)=\"item?.handle($event, item.key)\"\n ></a>\n <nav-split-line *ngIf=\"item.key === 'split'\"></nav-split-line>\n </ng-container>\n </thy-icon-nav>\n </div>\n</ng-template>\n", components: [{ type: i1__namespace.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }, { type: i6__namespace.ThyProgressComponent, selector: "thy-progress", inputs: ["thyType", "thySize", "thyValue", "thyMax", "thyTips"] }, { type: i4__namespace.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { type: i3__namespace.ThyIconNavComponent, selector: "thy-icon-nav", inputs: ["thyType"] }, { type: i3__namespace.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: NavSplitLineComponent, selector: "nav-split-line", inputs: ["mode"] }], directives: [{ type: i10__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i10__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i10__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i10__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i5__namespace.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }] });
3352
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheImageComponent, decorators: [{
3353
+ type: i0.Component,
3354
+ args: [{
3355
+ selector: 'the-image, [theImage]',
3356
+ templateUrl: './image.component.html'
3357
+ }]
3358
+ }], ctorParameters: function () {
3359
+ return [{ type: i0__namespace.ElementRef }, { type: i1__namespace$2.DomSanitizer }, { type: undefined, decorators: [{
3360
+ type: i0.Inject,
3361
+ args: [THE_UPLOAD_SERVICE_TOKEN]
3362
+ }] }, { type: i0__namespace.ChangeDetectorRef }, { type: TheContextService }, { type: i1__namespace$3.ThyPopover }, { type: i2__namespace.Overlay }, { type: i0__namespace.ViewContainerRef }];
3363
+ }, propDecorators: { imageContent: [{
3364
+ type: i0.ViewChild,
3365
+ args: ['imageContent']
3366
+ }], img: [{
3367
+ type: i0.ViewChild,
3368
+ args: ['img', { static: false }]
3369
+ }], layoutToolbar: [{
3370
+ type: i0.ViewChild,
3371
+ args: ['layoutToolbar', { static: true }]
3372
+ }] } });
3114
3373
 
3115
3374
  var withImage = function (editor) {
3116
3375
  var insertData = editor.insertData, isVoid = editor.isVoid, renderElement = editor.renderElement, isBlockCard = editor.isBlockCard;
@@ -4259,7 +4518,7 @@
4259
4518
  return TheHrComponent;
4260
4519
  }(TheBaseElementComponent));
4261
4520
  TheHrComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheHrComponent, deps: [{ token: i0__namespace.ElementRef }, { token: i0__namespace.ChangeDetectorRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
4262
- TheHrComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheHrComponent, selector: "the-hr, [theHr]", usesInheritance: true, ngImport: i0__namespace, template: "\n <div class=\"the-hr\" contenteditable=\"false\" [ngClass]=\"{ active: selection }\">\n <hr class=\"the-hr\" />\n <slate-children [children]=\"children\" [context]=\"childrenContext\" [viewContext]=\"viewContext\"></slate-children>\n </div>\n ", isInline: true, components: [{ type: i1__namespace.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }], directives: [{ type: i6__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
4521
+ TheHrComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheHrComponent, selector: "the-hr, [theHr]", usesInheritance: true, ngImport: i0__namespace, template: "\n <div class=\"the-hr\" contenteditable=\"false\" [ngClass]=\"{ active: selection }\">\n <hr class=\"the-hr\" />\n <slate-children [children]=\"children\" [context]=\"childrenContext\" [viewContext]=\"viewContext\"></slate-children>\n </div>\n ", isInline: true, components: [{ type: i1__namespace.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }], directives: [{ type: i10__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
4263
4522
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheHrComponent, decorators: [{
4264
4523
  type: i0.Component,
4265
4524
  args: [{
@@ -6106,38 +6365,6 @@
6106
6365
  }
6107
6366
  ];
6108
6367
 
6109
- var HeadingEditor = {
6110
- setHeading: function (editor, heading) {
6111
- slate.Editor.withoutNormalizing(editor, function () {
6112
- var _a;
6113
- var types = [exports.ElementKinds.bulletedList, exports.ElementKinds.numberedList, exports.ElementKinds.listItem];
6114
- slate.Transforms.unwrapNodes(editor, {
6115
- at: editor.selection,
6116
- match: function (n) { return slate.Element.isElement(n) && types.includes(n.type); },
6117
- mode: 'all',
6118
- split: true
6119
- });
6120
- slate.Transforms.setNodes(editor, { type: heading });
6121
- var entry = anchorBlockEntry(editor);
6122
- var unMarks = (_a = {},
6123
- _a[exports.MarkTypes.fontSize] = null,
6124
- _a);
6125
- if (entry) {
6126
- setMarks(editor, unMarks, entry[1]);
6127
- return;
6128
- }
6129
- setMarks(editor, unMarks, editor.selection);
6130
- });
6131
- },
6132
- isHeadingActive: function (editor, heading) {
6133
- var _a = __read(slate.Editor.nodes(editor, {
6134
- match: function (n) { return slate.Element.isElement(n) && n.type === heading; },
6135
- universal: true
6136
- }), 1), match = _a[0];
6137
- return !!match;
6138
- }
6139
- };
6140
-
6141
6368
  var HeadingOptions = [
6142
6369
  {
6143
6370
  name: '正文',
@@ -6219,6 +6446,14 @@
6219
6446
  }
6220
6447
  return false;
6221
6448
  },
6449
+ isDisabled: function (editor) {
6450
+ if (editor.selection) {
6451
+ var disableGroup = [exports.ElementKinds.image];
6452
+ var anchorBlock$1 = anchorBlock(editor);
6453
+ return anchorBlock$1 && disableGroup.includes(anchorBlock$1 === null || anchorBlock$1 === void 0 ? void 0 : anchorBlock$1.type);
6454
+ }
6455
+ return false;
6456
+ },
6222
6457
  setAlign: function (editor, alignment) {
6223
6458
  if (TableEditor.setAlign(editor, alignment)) {
6224
6459
  return;
@@ -6240,7 +6475,8 @@
6240
6475
  dropdownMode: exports.DropdownMode.icon,
6241
6476
  dropdownItemKey: exports.ToolbarActionTypes.alignLeft,
6242
6477
  includes: [exports.ToolbarActionTypes.alignLeft, exports.ToolbarActionTypes.alignCenter, exports.ToolbarActionTypes.alignRight],
6243
- name: '对齐方式'
6478
+ name: '对齐方式',
6479
+ disable: function (editor) { return AlignEditor.isDisabled(editor); }
6244
6480
  },
6245
6481
  {
6246
6482
  key: exports.ToolbarActionTypes.alignLeft,
@@ -6474,7 +6710,7 @@
6474
6710
  return TheColorSelectComponent;
6475
6711
  }());
6476
6712
  TheColorSelectComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheColorSelectComponent, deps: [{ token: i1__namespace$3.ThyPopoverRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
6477
- TheColorSelectComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheColorSelectComponent, selector: "the-color-select", inputs: { selectedColor: "selectedColor", selectAction: "selectAction", showCustom: "showCustom", colors: "colors", option: "option" }, host: { listeners: { "document: mousedown": "handleDocumentMouseDown($event)", "mousedown": "handleMouseDown($event)", "keydown": "handleKeydown($event)" } }, ngImport: i0__namespace, template: "<div class=\"color-container\">\n <div class=\"colors\">\n <div *ngFor=\"let row of selectColors; let rowIndex = index\">\n <span\n class=\"color-item\"\n *ngFor=\"let _color of row.rowValue; let i = index\"\n [ngClass]=\"_color.classMaps\"\n (mousedown)=\"_selectColor($event, _color.value)\"\n >\n <span [ngStyle]=\"{ background: _color.value }\">\n <thy-icon thyIconName=\"check\" [ngStyle]=\"{ color: row.tickColor }\"></thy-icon>\n </span>\n </span>\n </div>\n </div>\n <div *ngIf=\"option.showCustom\" class=\"select-color\">\n <span class=\"color\" [ngStyle]=\"{ background: selectedColor }\"></span>\n #\n <input\n thyInput\n maxlength=\"6\"\n (keydown.enter)=\"customInputColorEnter($event)\"\n onkeyup=\"value=value.replace(/[^0-9A-Fa-f]/g,'')\"\n class=\"value\"\n [(ngModel)]=\"customColor\"\n (ngModelChange)=\"colorChange(false)\"\n />\n </div>\n</div>\n", components: [{ type: i4__namespace$1.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }], directives: [{ type: i6__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i6__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4__namespace$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i5__namespace.ThyInputDirective, selector: "[thyInput]", inputs: ["thySize", "thyAutocomplete"] }, { type: i4__namespace$2.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { type: i4__namespace$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4__namespace$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
6713
+ TheColorSelectComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheColorSelectComponent, selector: "the-color-select", inputs: { selectedColor: "selectedColor", selectAction: "selectAction", showCustom: "showCustom", colors: "colors", option: "option" }, host: { listeners: { "document: mousedown": "handleDocumentMouseDown($event)", "mousedown": "handleMouseDown($event)", "keydown": "handleKeydown($event)" } }, ngImport: i0__namespace, template: "<div class=\"color-container\">\n <div class=\"colors\">\n <div *ngFor=\"let row of selectColors; let rowIndex = index\">\n <span\n class=\"color-item\"\n *ngFor=\"let _color of row.rowValue; let i = index\"\n [ngClass]=\"_color.classMaps\"\n (mousedown)=\"_selectColor($event, _color.value)\"\n >\n <span [ngStyle]=\"{ background: _color.value }\">\n <thy-icon thyIconName=\"check\" [ngStyle]=\"{ color: row.tickColor }\"></thy-icon>\n </span>\n </span>\n </div>\n </div>\n <div *ngIf=\"option.showCustom\" class=\"select-color\">\n <span class=\"color\" [ngStyle]=\"{ background: selectedColor }\"></span>\n #\n <input\n thyInput\n maxlength=\"6\"\n (keydown.enter)=\"customInputColorEnter($event)\"\n onkeyup=\"value=value.replace(/[^0-9A-Fa-f]/g,'')\"\n class=\"value\"\n [(ngModel)]=\"customColor\"\n (ngModelChange)=\"colorChange(false)\"\n />\n </div>\n</div>\n", components: [{ type: i4__namespace.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }], directives: [{ type: i10__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i10__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i10__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i10__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4__namespace$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i5__namespace$1.ThyInputDirective, selector: "[thyInput]", inputs: ["thySize", "thyAutocomplete"] }, { type: i4__namespace$1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { type: i4__namespace$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4__namespace$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
6478
6714
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheColorSelectComponent, decorators: [{
6479
6715
  type: i0.Component,
6480
6716
  args: [{
@@ -6682,7 +6918,7 @@
6682
6918
  return TheColorToolbarItemComponent;
6683
6919
  }(TheToolbarBaseItemComponent));
6684
6920
  TheColorToolbarItemComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheColorToolbarItemComponent, deps: [{ token: i1__namespace$3.ThyPopover }], target: i0__namespace.ɵɵFactoryTarget.Component });
6685
- TheColorToolbarItemComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheColorToolbarItemComponent, selector: "the-color-toolbar-item", inputs: { item: "item", editor: "editor" }, host: { classAttribute: "the-toolbar-item" }, usesInheritance: true, ngImport: i0__namespace, template: "\n <a\n class=\"link-width-down\"\n thyIconNavLink\n [ngStyle]=\"{\n width: item.key === 'color' ? '42px' : 'auto'\n }\"\n [thyTooltip]=\"item.name\"\n [thyIconNavLinkActive]=\"active\"\n thyTooltipPlacement=\"top\"\n (mousedown)=\"execute($event)\"\n >\n <thy-icon [thyIconName]=\"item.icon\" thyIconType=\"twotone\" [thyTwotoneColor]=\"active\"></thy-icon>\n <thy-icon\n [ngClass]=\"{\n 'link-down-icon': true,\n 'font-size-sm': true,\n 'text-desc': true\n }\"\n thyIconName=\"caret-down\"\n ></thy-icon>\n </a>\n ", isInline: true, components: [{ type: i3__namespace.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i4__namespace$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"] }] });
6921
+ TheColorToolbarItemComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheColorToolbarItemComponent, selector: "the-color-toolbar-item", inputs: { item: "item", editor: "editor" }, host: { classAttribute: "the-toolbar-item" }, usesInheritance: true, ngImport: i0__namespace, template: "\n <a\n class=\"link-width-down\"\n thyIconNavLink\n [ngStyle]=\"{\n width: item.key === 'color' ? '42px' : 'auto'\n }\"\n [thyTooltip]=\"item.name\"\n [thyIconNavLinkActive]=\"active\"\n thyTooltipPlacement=\"top\"\n (mousedown)=\"execute($event)\"\n >\n <thy-icon [thyIconName]=\"item.icon\" thyIconType=\"twotone\" [thyTwotoneColor]=\"active\"></thy-icon>\n <thy-icon\n [ngClass]=\"{\n 'link-down-icon': true,\n 'font-size-sm': true,\n 'text-desc': true\n }\"\n thyIconName=\"caret-down\"\n ></thy-icon>\n </a>\n ", isInline: true, components: [{ type: i3__namespace.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i4__namespace.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }], directives: [{ type: i10__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i5__namespace.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { type: i10__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
6686
6922
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheColorToolbarItemComponent, decorators: [{
6687
6923
  type: i0.Component,
6688
6924
  args: [{
@@ -6953,7 +7189,7 @@
6953
7189
  return TheToolbarDropdownComponent;
6954
7190
  }(TheToolbarBaseItemComponent));
6955
7191
  TheToolbarDropdownComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheToolbarDropdownComponent, deps: [{ token: i0__namespace.ElementRef }, { token: i1__namespace$3.ThyPopover }, { token: i0__namespace.ViewContainerRef }, { token: i2__namespace.Overlay }], target: i0__namespace.ɵɵFactoryTarget.Component });
6956
- TheToolbarDropdownComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheToolbarDropdownComponent, selector: "the-toolbar-dropdown", inputs: { toolbarItem: "toolbarItem", menus: "menus", mode: "mode", item: "item", itemMousedownHandle: "itemMousedownHandle" }, host: { listeners: { "mousedown": "toggleDropdown($event)", "document: mousedown": "handleDocumentMouseDown($event)" }, properties: { "class.disabled": "this.disabledState" }, classAttribute: "the-toolbar-dropdown-container" }, viewQueries: [{ propertyName: "iconModeTemplate", first: true, predicate: ["iconModeTemplate"], descendants: true, static: true }, { propertyName: "textModeTemplate", first: true, predicate: ["textModeTemplate"], descendants: true, static: true }, { propertyName: "dropdownTemplate", first: true, predicate: ["dropdownTemplate"], descendants: true, static: true }], usesInheritance: true, ngImport: i0__namespace, template: "<ng-template [ngTemplateOutlet]=\"template\"></ng-template>\n\n<ng-template #iconModeTemplate>\n <a thyIconNavLink class=\"icon-mode link-with-down\" [thyTooltip]=\"activeMenu?.name\" thyTooltipPlacement=\"top\">\n <thy-icon [thyIconName]=\"activeMenu?.icon\"></thy-icon>\n <thy-icon class=\"caret-down-icon font-size-sm text-desc\" thyIconName=\"caret-down\"></thy-icon>\n </a>\n</ng-template>\n\n<ng-template #textModeTemplate>\n <a thyIconNavLink class=\"text-mode\" [thyTooltip]=\"activeMenu?.name\" thyTooltipPlacement=\"top\">\n <span class=\"show-text\">{{ activeMenu?.name }}</span>\n <thy-icon class=\"text-caret-down-icon font-size-sm text-desc\" thyIconName=\"caret-down\"></thy-icon>\n </a>\n</ng-template>\n\n<ng-template #dropdownTemplate>\n <thy-action-menu class=\"dropdown\">\n <ng-container *ngFor=\"let menu of menus\">\n <a\n *ngIf=\"menu.key !== 'split'\"\n thyActionMenuItem\n href=\"javascript:;\"\n [thyActionMenuItemActive]=\"menu.key === activeMenu.key\"\n (mousedown)=\"itemMousedown($event, menu)\"\n [ngStyle]=\"menu?.styles\"\n >\n <span *ngIf=\"menu.icon && mode === dropdownMode.icon\" thyActionMenuItemIcon>\n <thy-icon [thyIconName]=\"menu.icon\"></thy-icon>\n </span>\n <span *ngIf=\"menu.name\" thyActionMenuItemName>{{ menu.name }}</span>\n </a>\n <thy-action-menu-divider *ngIf=\"menu.key === 'split'\"></thy-action-menu-divider>\n </ng-container>\n </thy-action-menu>\n</ng-template>\n", components: [{ type: i3__namespace.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i4__namespace$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]" }] });
7192
+ TheToolbarDropdownComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheToolbarDropdownComponent, selector: "the-toolbar-dropdown", inputs: { toolbarItem: "toolbarItem", menus: "menus", mode: "mode", item: "item", itemMousedownHandle: "itemMousedownHandle" }, host: { listeners: { "mousedown": "toggleDropdown($event)", "document: mousedown": "handleDocumentMouseDown($event)" }, properties: { "class.disabled": "this.disabledState" }, classAttribute: "the-toolbar-dropdown-container" }, viewQueries: [{ propertyName: "iconModeTemplate", first: true, predicate: ["iconModeTemplate"], descendants: true, static: true }, { propertyName: "textModeTemplate", first: true, predicate: ["textModeTemplate"], descendants: true, static: true }, { propertyName: "dropdownTemplate", first: true, predicate: ["dropdownTemplate"], descendants: true, static: true }], usesInheritance: true, ngImport: i0__namespace, template: "<ng-template [ngTemplateOutlet]=\"template\"></ng-template>\n\n<ng-template #iconModeTemplate>\n <a thyIconNavLink class=\"icon-mode link-with-down\" [thyTooltip]=\"activeMenu?.name\" thyTooltipPlacement=\"top\">\n <thy-icon [thyIconName]=\"activeMenu?.icon\"></thy-icon>\n <thy-icon class=\"caret-down-icon font-size-sm text-desc\" thyIconName=\"caret-down\"></thy-icon>\n </a>\n</ng-template>\n\n<ng-template #textModeTemplate>\n <a thyIconNavLink class=\"text-mode\" [thyTooltip]=\"activeMenu?.name\" thyTooltipPlacement=\"top\">\n <span class=\"show-text\">{{ activeMenu?.name }}</span>\n <thy-icon class=\"text-caret-down-icon font-size-sm text-desc\" thyIconName=\"caret-down\"></thy-icon>\n </a>\n</ng-template>\n\n<ng-template #dropdownTemplate>\n <thy-action-menu class=\"dropdown\">\n <ng-container *ngFor=\"let menu of menus\">\n <a\n *ngIf=\"menu.key !== 'split'\"\n thyActionMenuItem\n href=\"javascript:;\"\n [thyActionMenuItemActive]=\"menu.key === activeMenu.key\"\n (mousedown)=\"itemMousedown($event, menu)\"\n [ngStyle]=\"menu?.styles\"\n >\n <span *ngIf=\"menu.icon && mode === dropdownMode.icon\" thyActionMenuItemIcon>\n <thy-icon [thyIconName]=\"menu.icon\"></thy-icon>\n </span>\n <span *ngIf=\"menu.name\" thyActionMenuItemName>{{ menu.name }}</span>\n </a>\n <thy-action-menu-divider *ngIf=\"menu.key === 'split'\"></thy-action-menu-divider>\n </ng-container>\n </thy-action-menu>\n</ng-template>\n", components: [{ type: i3__namespace.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i4__namespace.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { type: 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: i10__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i5__namespace.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { type: i10__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i10__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5__namespace$2.ThyActionMenuItemDirective, selector: "[thyActionMenuItem]", inputs: ["thyDisabled", "thyType"] }, { type: i5__namespace$2.ThyActionMenuItemActiveDirective, selector: "[thyActionMenuItemActive]", inputs: ["thyActionMenuItemActive"] }, { type: i10__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i5__namespace$2.ThyActionMenuItemIconDirective, selector: "[thyActionMenuItemIcon]" }, { type: i5__namespace$2.ThyActionMenuItemNameDirective, selector: "[thyActionMenuItemName]" }] });
6957
7193
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheToolbarDropdownComponent, decorators: [{
6958
7194
  type: i0.Component,
6959
7195
  args: [{
@@ -6993,49 +7229,6 @@
6993
7229
  args: ['class.disabled']
6994
7230
  }] } });
6995
7231
 
6996
- var NavSplitLineComponent = /** @class */ (function () {
6997
- function NavSplitLineComponent() {
6998
- this.mode = exports.ToolbarItemMode.vertical;
6999
- this.theNavSplitLine = true;
7000
- }
7001
- Object.defineProperty(NavSplitLineComponent.prototype, "horizontal", {
7002
- get: function () {
7003
- return this.mode === exports.ToolbarItemMode.horizontal;
7004
- },
7005
- enumerable: false,
7006
- configurable: true
7007
- });
7008
- Object.defineProperty(NavSplitLineComponent.prototype, "vertical", {
7009
- get: function () {
7010
- return this.mode === exports.ToolbarItemMode.vertical;
7011
- },
7012
- enumerable: false,
7013
- configurable: true
7014
- });
7015
- NavSplitLineComponent.prototype.ngOnInit = function () { };
7016
- return NavSplitLineComponent;
7017
- }());
7018
- NavSplitLineComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: NavSplitLineComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
7019
- NavSplitLineComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", 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 });
7020
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: NavSplitLineComponent, decorators: [{
7021
- type: i0.Component,
7022
- args: [{
7023
- selector: 'nav-split-line',
7024
- template: ''
7025
- }]
7026
- }], ctorParameters: function () { return []; }, propDecorators: { mode: [{
7027
- type: i0.Input
7028
- }], theNavSplitLine: [{
7029
- type: i0.HostBinding,
7030
- args: ['class.the-nav-split-line']
7031
- }], horizontal: [{
7032
- type: i0.HostBinding,
7033
- args: ['class.horizontal']
7034
- }], vertical: [{
7035
- type: i0.HostBinding,
7036
- args: ['class.vertical']
7037
- }] } });
7038
-
7039
7232
  var TheCodeComponent = /** @class */ (function (_super) {
7040
7233
  __extends(TheCodeComponent, _super);
7041
7234
  function TheCodeComponent(elementRef, cdr, thyNotifyService, contextService, ngZone, config) {
@@ -7250,7 +7443,7 @@
7250
7443
  return TheCodeComponent;
7251
7444
  }(TheBaseElementComponent));
7252
7445
  TheCodeComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheCodeComponent, deps: [{ token: i0__namespace.ElementRef }, { token: i0__namespace.ChangeDetectorRef }, { token: i1__namespace$4.ThyNotifyService }, { token: TheContextService }, { token: i0__namespace.NgZone }, { token: THE_CODE_MODE_TOKEN }], target: i0__namespace.ɵɵFactoryTarget.Component });
7253
- TheCodeComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheCodeComponent, selector: "div[theCode]", viewQueries: [{ propertyName: "codemirror", first: true, predicate: ["codemirror"], descendants: true, read: i8.CodeMirrorComponent }], usesInheritance: true, ngImport: i0__namespace, template: "<div contenteditable=\"false\" class=\"the-code-block-operation\" *ngIf=\"isCollapsed && codemirror && !options.readOnly\">\n <thy-icon-nav>\n <the-toolbar-dropdown [menus]=\"menus\" [item]=\"actives\" [itemMousedownHandle]=\"onChangeLangulage\"> </the-toolbar-dropdown>\n <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)]=\"options.lineWrapping\"\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\n<!-- \u53EA\u8BFB\u6A21\u5F0F\u4E0BCodeMirror-sizer\u9AD8\u5EA6\u6BD4\u7F16\u8F91\u6A21\u5F0F\u4E0B\u591A2px\uFF0C\u8BBE\u7F6EthyMinHeight\u4E3A46px\u9632\u6B62\u62D6\u62FD\u5230\u6700\u5C0F\u9AD8\u5EA6\u65F6\u53EA\u8BFB\u6A21\u5F0F\u4E0B\u51FA\u73B0\u6EDA\u52A8\u6761 -->\n<div\n thyResizable\n [thyMinHeight]=\"46\"\n [thyBounds]=\"resizeBounds\"\n [style.height.px]=\"resizeHeight\"\n (thyResize)=\"onResize($event)\"\n (thyResizeEnd)=\"onEndResize()\"\n class=\"resize-code-container\"\n [ngClass]=\"{ focus: isCollapsed, readonly: options.readOnly, active: isHightLight && isCollapsed }\"\n>\n <ng-codemirror\n *ngIf=\"startRenderCodemirror\"\n #codemirror\n contenteditable=\"false\"\n class=\"ng-codemirror-wrapper\"\n [ngStyle]=\"{ maxHeight: maxHeight > 0 ? maxHeight + 'px' : 'auto' }\"\n [options]=\"options\"\n [ngModel]=\"code\"\n [delayRefreshTime]=\"300\"\n (ngModelChange)=\"codeChange($event)\"\n (focusChange)=\"focusChange($event)\"\n [autoMaxHeight]=\"maxHeight\"\n >\n </ng-codemirror>\n <thy-resize-handle thyDirection=\"bottom\" class=\"code-resize-icon\" *ngIf=\"isCollapsed && !options.readOnly\"></thy-resize-handle>\n</div>\n", components: [{ type: i3__namespace.ThyIconNavComponent, selector: "thy-icon-nav", inputs: ["thyType"] }, { type: TheToolbarDropdownComponent, selector: "the-toolbar-dropdown", inputs: ["toolbarItem", "menus", "mode", "item", "itemMousedownHandle"] }, { type: i3__namespace.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: NavSplitLineComponent, selector: "nav-split-line", inputs: ["mode"] }, { type: i6__namespace$1.ThySwitchComponent, selector: "thy-switch", inputs: ["thyType", "thySize", "thyDisabled"], outputs: ["thyChange"] }, { type: i1__namespace.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }, { type: i8__namespace.CodeMirrorComponent, selector: "ng-codemirror, [ngCodeMirror]", inputs: ["autoMaxHeight", "delayRefreshTime", "options"], outputs: ["focusChange"] }, { type: i9__namespace.ThyResizeHandleComponent, selector: "thy-resize-handle, [thy-resize-handle]", inputs: ["thyDirection"], outputs: ["thyMouseDown"], exportAs: ["thyResizeHandle"] }], directives: [{ type: 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: i9__namespace.ThyResizableDirective, selector: "[thyResizable]", inputs: ["thyBounds", "thyMaxHeight", "thyMaxWidth", "thyMinHeight", "thyMinWidth", "thyGridColumnCount", "thyMaxColumn", "thyMinColumn", "thyLockAspectRatio", "thyPreview", "thyDisabled"], outputs: ["thyResize", "thyResizeEnd", "thyResizeStart"] }, { type: i6__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i6__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
7446
+ TheCodeComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheCodeComponent, selector: "div[theCode]", viewQueries: [{ propertyName: "codemirror", first: true, predicate: ["codemirror"], descendants: true, read: i8.CodeMirrorComponent }], usesInheritance: true, ngImport: i0__namespace, template: "<div contenteditable=\"false\" class=\"the-code-block-operation\" *ngIf=\"isCollapsed && codemirror && !options.readOnly\">\n <thy-icon-nav>\n <the-toolbar-dropdown [menus]=\"menus\" [item]=\"actives\" [itemMousedownHandle]=\"onChangeLangulage\"> </the-toolbar-dropdown>\n <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)]=\"options.lineWrapping\"\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\n<!-- \u53EA\u8BFB\u6A21\u5F0F\u4E0BCodeMirror-sizer\u9AD8\u5EA6\u6BD4\u7F16\u8F91\u6A21\u5F0F\u4E0B\u591A2px\uFF0C\u8BBE\u7F6EthyMinHeight\u4E3A46px\u9632\u6B62\u62D6\u62FD\u5230\u6700\u5C0F\u9AD8\u5EA6\u65F6\u53EA\u8BFB\u6A21\u5F0F\u4E0B\u51FA\u73B0\u6EDA\u52A8\u6761 -->\n<div\n thyResizable\n [thyMinHeight]=\"46\"\n [thyBounds]=\"resizeBounds\"\n [style.height.px]=\"resizeHeight\"\n (thyResize)=\"onResize($event)\"\n (thyResizeEnd)=\"onEndResize()\"\n class=\"resize-code-container\"\n [ngClass]=\"{ focus: isCollapsed, readonly: options.readOnly, active: isHightLight && isCollapsed }\"\n>\n <ng-codemirror\n *ngIf=\"startRenderCodemirror\"\n #codemirror\n contenteditable=\"false\"\n class=\"ng-codemirror-wrapper\"\n [ngStyle]=\"{ maxHeight: maxHeight > 0 ? maxHeight + 'px' : 'auto' }\"\n [options]=\"options\"\n [ngModel]=\"code\"\n [delayRefreshTime]=\"300\"\n (ngModelChange)=\"codeChange($event)\"\n (focusChange)=\"focusChange($event)\"\n [autoMaxHeight]=\"maxHeight\"\n >\n </ng-codemirror>\n <thy-resize-handle thyDirection=\"bottom\" class=\"code-resize-icon\" *ngIf=\"isCollapsed && !options.readOnly\"></thy-resize-handle>\n</div>\n", components: [{ type: i3__namespace.ThyIconNavComponent, selector: "thy-icon-nav", inputs: ["thyType"] }, { type: TheToolbarDropdownComponent, selector: "the-toolbar-dropdown", inputs: ["toolbarItem", "menus", "mode", "item", "itemMousedownHandle"] }, { type: i3__namespace.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: NavSplitLineComponent, selector: "nav-split-line", inputs: ["mode"] }, { type: i6__namespace$1.ThySwitchComponent, selector: "thy-switch", inputs: ["thyType", "thySize", "thyDisabled"], outputs: ["thyChange"] }, { type: i1__namespace.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }, { type: i8__namespace.CodeMirrorComponent, selector: "ng-codemirror, [ngCodeMirror]", inputs: ["autoMaxHeight", "delayRefreshTime", "options"], outputs: ["focusChange"] }, { type: i9__namespace.ThyResizeHandleComponent, selector: "thy-resize-handle, [thy-resize-handle]", inputs: ["thyDirection"], outputs: ["thyMouseDown"], exportAs: ["thyResizeHandle"] }], directives: [{ type: i10__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5__namespace.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { type: i4__namespace$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4__namespace$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i9__namespace.ThyResizableDirective, selector: "[thyResizable]", inputs: ["thyBounds", "thyMaxHeight", "thyMaxWidth", "thyMinHeight", "thyMinWidth", "thyGridColumnCount", "thyMaxColumn", "thyMinColumn", "thyLockAspectRatio", "thyPreview", "thyDisabled"], outputs: ["thyResize", "thyResizeEnd", "thyResizeStart"] }, { type: i10__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i10__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
7254
7447
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheCodeComponent, decorators: [{
7255
7448
  type: i0.Component,
7256
7449
  args: [{
@@ -7479,7 +7672,7 @@
7479
7672
  return TheLinkEditComponent;
7480
7673
  }());
7481
7674
  TheLinkEditComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheLinkEditComponent, deps: [{ token: i1__namespace$3.ThyPopoverRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
7482
- TheLinkEditComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheLinkEditComponent, selector: "the-link-edit", inputs: { tag: "tag", node: "node", link: "link", text: "text", originSelection: "originSelection" }, host: { listeners: { "document: mousedown": "handleDocumentMouseDown($event)" }, properties: { "class": "this.className" } }, ngImport: i0__namespace, template: "<form\n thyForm\n #linkForm=\"thyForm\"\n [thyFormValidatorConfig]=\"validatorConfig\"\n name=\"linkForm\"\n>\n <thy-form-group thyLabelText=\"\u6587\u672C\">\n <input\n thyInput\n placeholder=\"\u8BF7\u8F93\u5165\u6587\u672C\"\n required\n name=\"text\"\n [(ngModel)]=\"text\"\n thyAutofocus\n type=\"text\"\n />\n </thy-form-group>\n <thy-form-group thyLabelText=\"\u94FE\u63A5\">\n <input\n name=\"link\"\n thyInput\n placeholder=\"\u8BF7\u8F93\u5165\u94FE\u63A5\"\n required\n type=\"text\"\n #linkControl=\"ngModel\"\n [(ngModel)]=\"link\"\n />\n </thy-form-group>\n <thy-form-group-footer>\n <div class=\"btn-pair\">\n <button\n thyButton=\"link-secondary\"\n thySize=\"sm\"\n (click)=\"closePopover()\"\n >\u53D6\u6D88</button>\n <button\n thyButton=\"primary-square\"\n thySize=\"sm\"\n (thyFormSubmit)=\"applyLink(linkForm)\"\n >\u5E94\u7528</button>\n </div>\n </thy-form-group-footer>\n</form>\n", components: [{ type: i2__namespace$1.ThyFormGroupComponent, selector: "thy-form-group", inputs: ["thyLabelText", "thyLabelTextTranslateKey", "thyLabelRequired", "thyLabelPaddingTopClear", "thyFeedbackIcon", "thyTipsMode", "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$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$1.ThyFormSubmitDirective, selector: "[thyFormSubmit],[thy-form-submit]", outputs: ["thyFormSubmit"] }] });
7675
+ TheLinkEditComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheLinkEditComponent, selector: "the-link-edit", inputs: { tag: "tag", node: "node", link: "link", text: "text", originSelection: "originSelection" }, host: { listeners: { "document: mousedown": "handleDocumentMouseDown($event)" }, properties: { "class": "this.className" } }, ngImport: i0__namespace, template: "<form\n thyForm\n #linkForm=\"thyForm\"\n [thyFormValidatorConfig]=\"validatorConfig\"\n name=\"linkForm\"\n>\n <thy-form-group thyLabelText=\"\u6587\u672C\">\n <input\n thyInput\n placeholder=\"\u8BF7\u8F93\u5165\u6587\u672C\"\n required\n name=\"text\"\n [(ngModel)]=\"text\"\n thyAutofocus\n type=\"text\"\n />\n </thy-form-group>\n <thy-form-group thyLabelText=\"\u94FE\u63A5\">\n <input\n name=\"link\"\n thyInput\n placeholder=\"\u8BF7\u8F93\u5165\u94FE\u63A5\"\n required\n type=\"text\"\n #linkControl=\"ngModel\"\n [(ngModel)]=\"link\"\n />\n </thy-form-group>\n <thy-form-group-footer>\n <div class=\"btn-pair\">\n <button\n thyButton=\"link-secondary\"\n thySize=\"sm\"\n (click)=\"closePopover()\"\n >\u53D6\u6D88</button>\n <button\n thyButton=\"primary-square\"\n thySize=\"sm\"\n (thyFormSubmit)=\"applyLink(linkForm)\"\n >\u5E94\u7528</button>\n </div>\n </thy-form-group-footer>\n</form>\n", components: [{ type: i2__namespace$1.ThyFormGroupComponent, selector: "thy-form-group", inputs: ["thyLabelText", "thyLabelTextTranslateKey", "thyLabelRequired", "thyLabelPaddingTopClear", "thyFeedbackIcon", "thyTipsMode", "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$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i4__namespace$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i4__namespace$1.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i2__namespace$1.ThyFormDirective, selector: "[thyForm],[thy-form]", inputs: ["thyLayout", "thyEnterKeyMode", "thyFormValidatorConfig"], exportAs: ["thyForm"] }, { type: i5__namespace$3.ThyAutofocusDirective, selector: "input[thyAutofocus],textarea[thyAutofocus]", inputs: ["thyAutoSelect", "thyAutofocus"] }, { type: i4__namespace$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i5__namespace$1.ThyInputDirective, selector: "[thyInput]", inputs: ["thySize", "thyAutocomplete"] }, { type: i4__namespace$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i4__namespace$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4__namespace$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i2__namespace$1.ThyFormSubmitDirective, selector: "[thyFormSubmit],[thy-form-submit]", outputs: ["thyFormSubmit"] }] });
7483
7676
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheLinkEditComponent, decorators: [{
7484
7677
  type: i0.Component,
7485
7678
  args: [{
@@ -7770,7 +7963,7 @@
7770
7963
  return TheTableSelectComponent;
7771
7964
  }());
7772
7965
  TheTableSelectComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheTableSelectComponent, deps: [{ token: i1__namespace$6.ThyPopoverRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
7773
- TheTableSelectComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheTableSelectComponent, selector: "table-select", inputs: { optionsParam: "optionsParam", editor: "editor" }, host: { listeners: { "document: mousedown": "handleDocumentMouseDown($event)" } }, ngImport: i0__namespace, template: "<div class=\"table-selector-container\">\n <div\n *ngFor=\"let item of tableData, let rowIndex = index\"\n class=\"selector-row\"\n (mousedown)=\"executeTable($event)\"\n >\n <span\n *ngFor=\"let item of tableData, let colIndex = index\"\n [ngClass]=\"{'active-cell': rowIndex<= maxRowIndex && colIndex <= maxColIndex, 'selector-cell': true}\"\n (mouseenter)=\"onSelectCells(rowIndex, colIndex)\"\n >\n </span>\n </div>\n <span class=\"selector-text\">{{maxRowIndex+1}} x {{maxColIndex+1}}</span>\n</div>\n", directives: [{ type: i6__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
7966
+ TheTableSelectComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheTableSelectComponent, selector: "table-select", inputs: { optionsParam: "optionsParam", editor: "editor" }, host: { listeners: { "document: mousedown": "handleDocumentMouseDown($event)" } }, ngImport: i0__namespace, template: "<div class=\"table-selector-container\">\n <div\n *ngFor=\"let item of tableData, let rowIndex = index\"\n class=\"selector-row\"\n (mousedown)=\"executeTable($event)\"\n >\n <span\n *ngFor=\"let item of tableData, let colIndex = index\"\n [ngClass]=\"{'active-cell': rowIndex<= maxRowIndex && colIndex <= maxColIndex, 'selector-cell': true}\"\n (mouseenter)=\"onSelectCells(rowIndex, colIndex)\"\n >\n </span>\n </div>\n <span class=\"selector-text\">{{maxRowIndex+1}} x {{maxColIndex+1}}</span>\n</div>\n", directives: [{ type: i10__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i10__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
7774
7967
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheTableSelectComponent, decorators: [{
7775
7968
  type: i0.Component,
7776
7969
  args: [{
@@ -7839,7 +8032,7 @@
7839
8032
  return TheTableToolbarItemComponent;
7840
8033
  }(TheToolbarBaseItemComponent));
7841
8034
  TheTableToolbarItemComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheTableToolbarItemComponent, deps: [{ token: i1__namespace$6.ThyPopover }, { token: i2__namespace.Overlay }], target: i0__namespace.ɵɵFactoryTarget.Component });
7842
- TheTableToolbarItemComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheTableToolbarItemComponent, selector: "the-table-toolbar-item", inputs: { item: "item", editor: "editor" }, host: { classAttribute: "the-toolbar-dropdown-container" }, usesInheritance: true, ngImport: i0__namespace, template: "\n <a\n thyIconNavLink\n class=\"link-with-down\"\n [thyTooltip]=\"item?.name\"\n thyTooltipPlacement=\"top\"\n [thyIconNavLinkActive]=\"active\"\n (mousedown)=\"execute($event)\"\n >\n <thy-icon [thyIconName]=\"item.icon\"></thy-icon>\n <thy-icon class=\"link-down-icon font-size-sm text-desc table-down-icon\" thyIconName=\"caret-down\"> </thy-icon>\n </a>\n ", isInline: true, components: [{ type: i3__namespace.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i4__namespace$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"] }] });
8035
+ TheTableToolbarItemComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheTableToolbarItemComponent, selector: "the-table-toolbar-item", inputs: { item: "item", editor: "editor" }, host: { classAttribute: "the-toolbar-dropdown-container" }, usesInheritance: true, ngImport: i0__namespace, template: "\n <a\n thyIconNavLink\n class=\"link-with-down\"\n [thyTooltip]=\"item?.name\"\n thyTooltipPlacement=\"top\"\n [thyIconNavLinkActive]=\"active\"\n (mousedown)=\"execute($event)\"\n >\n <thy-icon [thyIconName]=\"item.icon\"></thy-icon>\n <thy-icon class=\"link-down-icon font-size-sm text-desc table-down-icon\" thyIconName=\"caret-down\"> </thy-icon>\n </a>\n ", isInline: true, components: [{ type: i3__namespace.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i4__namespace.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }], directives: [{ type: i5__namespace.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }] });
7843
8036
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheTableToolbarItemComponent, decorators: [{
7844
8037
  type: i0.Component,
7845
8038
  args: [{
@@ -8615,6 +8808,43 @@
8615
8808
  });
8616
8809
  return matchClass;
8617
8810
  }
8811
+ function findRelativeElementByPoint(editor, x, y, mode) {
8812
+ var editableElement = i1.EDITOR_TO_ELEMENT.get(editor);
8813
+ var rectEditable = editableElement.getBoundingClientRect();
8814
+ if (x > rectEditable.x && x < rectEditable.x + rectEditable.width) {
8815
+ var centerX = rectEditable.x + rectEditable.width / 2;
8816
+ var relativeElement = document.elementFromPoint(mode === 'highest' ? centerX : x, y);
8817
+ return relativeElement;
8818
+ }
8819
+ return null;
8820
+ }
8821
+ function findNodeEntryByPoint(editor, x, y, mode) {
8822
+ var editableElement = i1.EDITOR_TO_ELEMENT.get(editor);
8823
+ var rootElement = null;
8824
+ var relativeElement = findRelativeElementByPoint(editor, x, y, mode);
8825
+ // 获取最顶层的DOM
8826
+ if (mode === 'highest') {
8827
+ while (relativeElement && editableElement.contains(relativeElement)) {
8828
+ relativeElement = relativeElement.closest('[data-slate-node="element"]');
8829
+ if (relativeElement) {
8830
+ rootElement = relativeElement;
8831
+ relativeElement = relativeElement.parentElement;
8832
+ }
8833
+ }
8834
+ }
8835
+ if (!mode) {
8836
+ if (relativeElement && editableElement.contains(relativeElement)) {
8837
+ relativeElement = relativeElement.closest('[data-slate-node="element"]');
8838
+ rootElement = relativeElement;
8839
+ }
8840
+ }
8841
+ if (rootElement) {
8842
+ var node = i1.AngularEditor.toSlateNode(editor, rootElement);
8843
+ var path = i1.AngularEditor.findPath(editor, node);
8844
+ return [node, path];
8845
+ }
8846
+ return null;
8847
+ }
8618
8848
 
8619
8849
  function splitCell(editor) {
8620
8850
  var opts = new TableOptions$1();
@@ -8778,7 +9008,7 @@
8778
9008
  return TheTableToolbarComponent;
8779
9009
  }());
8780
9010
  TheTableToolbarComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheTableToolbarComponent, deps: [{ token: i0__namespace.NgZone }, { token: TheColorSelectService }, { token: i1__namespace$3.ThyPopoverRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
8781
- TheTableToolbarComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheTableToolbarComponent, selector: "the-table-toolbar", inputs: { tableStore: "tableStore", isActiveSelect: "isActiveSelect" }, ngImport: i0__namespace, template: "<thy-icon-nav>\n <ng-container *ngFor=\"let item of cellMenuList\">\n <a href=\"javascript:;\" thyIconNavLink *ngIf=\"!item.invisibility\" [thyTooltip]=\"item.name\" (mousedown)=\"item.actionHandle()\">\n <thy-icon [thyIconName]=\"item.icon\"></thy-icon>\n </a>\n </ng-container>\n <nav-split-line *ngIf=\"!isActiveSelect && isShowSplitLine\"></nav-split-line>\n <a href=\"javascript:;\" thyIconNavLink thyTooltip=\"\u5355\u5143\u683C\u80CC\u666F\" (mousedown)=\"openSelectColor($event)\">\n <thy-icon thyIconName=\"background-tt\" thyIconType=\"twotone\" [thyTwotoneColor]=\"selectedColor\"></thy-icon>\n </a>\n <nav-split-line *ngIf=\"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"] }] });
9011
+ TheTableToolbarComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheTableToolbarComponent, selector: "the-table-toolbar", inputs: { tableStore: "tableStore", isActiveSelect: "isActiveSelect" }, ngImport: i0__namespace, template: "<thy-icon-nav>\n <ng-container *ngFor=\"let item of cellMenuList\">\n <a href=\"javascript:;\" thyIconNavLink *ngIf=\"!item.invisibility\" [thyTooltip]=\"item.name\" (mousedown)=\"item.actionHandle()\">\n <thy-icon [thyIconName]=\"item.icon\"></thy-icon>\n </a>\n </ng-container>\n <nav-split-line *ngIf=\"!isActiveSelect && isShowSplitLine\"></nav-split-line>\n <a href=\"javascript:;\" thyIconNavLink thyTooltip=\"\u5355\u5143\u683C\u80CC\u666F\" (mousedown)=\"openSelectColor($event)\">\n <thy-icon thyIconName=\"background-tt\" thyIconType=\"twotone\" [thyTwotoneColor]=\"selectedColor\"></thy-icon>\n </a>\n <nav-split-line *ngIf=\"deleteIcon\"></nav-split-line>\n <a\n *ngIf=\"deleteIcon\"\n href=\"javascript:;\"\n thyIconNavLink\n [thyTooltip]=\"iconName\"\n class=\"danger\"\n [thyIconNavLinkIcon]=\"deleteIcon\"\n (mousedown)=\"onDelete($event)\"\n (mouseenter)=\"onEnterDelete($event)\"\n (mouseleave)=\"onLeaveDelete($event)\"\n ></a>\n</thy-icon-nav>\n", components: [{ type: i3__namespace.ThyIconNavComponent, selector: "thy-icon-nav", inputs: ["thyType"] }, { type: i3__namespace.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i4__namespace.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { type: NavSplitLineComponent, selector: "nav-split-line", inputs: ["mode"] }], directives: [{ type: i10__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i10__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5__namespace.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }] });
8782
9012
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheTableToolbarComponent, decorators: [{
8783
9013
  type: i0.Component,
8784
9014
  args: [{
@@ -8842,7 +9072,7 @@
8842
9072
  return TheContextMenuComponent;
8843
9073
  }());
8844
9074
  TheContextMenuComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheContextMenuComponent, deps: [{ token: i0__namespace.ElementRef }, { token: i1__namespace$3.ThyPopoverRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
8845
- TheContextMenuComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheContextMenuComponent, selector: "the-contextmenu", inputs: { menuEntities: "menuEntities", actionHandle: "actionHandle", activeHandle: "activeHandle", deactiveHandle: "deactiveHandle" }, host: { listeners: { "document: mousedown": "handleDocumentMouseDown($event)", "mousedown": "handleMouseDown($event)" }, properties: { "class.the-overlay-menu-wrap": "this.wrap" } }, ngImport: i0__namespace, template: "<thy-action-menu>\n <ng-container *ngFor=\"let menuItem of menuEntities\">\n <a\n thyActionMenuItem\n href=\"javascript:;\"\n *ngIf=\"!menuItem.invisibility\"\n (mousedown)=\"itemMousedown($event, menuItem)\"\n (mouseenter)=\"itemMouseenter($event, menuItem)\"\n (mouseleave)=\"itemMouseleave($event, menuItem)\"\n >\n <span thyActionMenuItemIcon>\n <thy-icon\n *ngIf=\"menuItem.backgroundColor; else elseIcon\"\n [thyIconName]=\"menuItem.icon\"\n thyIconType=\"twotone\"\n [thyTwotoneColor]=\"menuItem.backgroundColor\"\n ></thy-icon>\n <ng-template #elseIcon>\n <thy-icon [thyIconName]=\"menuItem.icon\"></thy-icon>\n </ng-template>\n </span>\n <span thyActionMenuItemName>{{ menuItem.name }}</span>\n <span *ngIf=\"menuItem.extendIcon\" thyActionMenuItemExtendIcon>\n <thy-icon thyIconName=\"{{ menuItem.extendIcon }}\"></thy-icon>\n </span>\n </a>\n <thy-action-menu-divider *ngIf=\"menuItem.divider\"></thy-action-menu-divider>\n </ng-container>\n</thy-action-menu>\n", components: [{ type: 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]" }] });
9075
+ TheContextMenuComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheContextMenuComponent, selector: "the-contextmenu", inputs: { menuEntities: "menuEntities", actionHandle: "actionHandle", activeHandle: "activeHandle", deactiveHandle: "deactiveHandle" }, host: { listeners: { "document: mousedown": "handleDocumentMouseDown($event)", "mousedown": "handleMouseDown($event)" }, properties: { "class.the-overlay-menu-wrap": "this.wrap" } }, ngImport: i0__namespace, template: "<thy-action-menu>\n <ng-container *ngFor=\"let menuItem of menuEntities\">\n <a\n thyActionMenuItem\n href=\"javascript:;\"\n *ngIf=\"!menuItem.invisibility\"\n (mousedown)=\"itemMousedown($event, menuItem)\"\n (mouseenter)=\"itemMouseenter($event, menuItem)\"\n (mouseleave)=\"itemMouseleave($event, menuItem)\"\n >\n <span thyActionMenuItemIcon>\n <thy-icon\n *ngIf=\"menuItem.backgroundColor; else elseIcon\"\n [thyIconName]=\"menuItem.icon\"\n thyIconType=\"twotone\"\n [thyTwotoneColor]=\"menuItem.backgroundColor\"\n ></thy-icon>\n <ng-template #elseIcon>\n <thy-icon [thyIconName]=\"menuItem.icon\"></thy-icon>\n </ng-template>\n </span>\n <span thyActionMenuItemName>{{ menuItem.name }}</span>\n <span *ngIf=\"menuItem.extendIcon\" thyActionMenuItemExtendIcon>\n <thy-icon thyIconName=\"{{ menuItem.extendIcon }}\"></thy-icon>\n </span>\n </a>\n <thy-action-menu-divider *ngIf=\"menuItem.divider\"></thy-action-menu-divider>\n </ng-container>\n</thy-action-menu>\n", components: [{ type: i5__namespace$2.ThyActionMenuComponent, selector: "thy-action-menu", inputs: ["thyTheme", "thyWidth"] }, { type: i4__namespace.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: i10__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i10__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]" }] });
8846
9076
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheContextMenuComponent, decorators: [{
8847
9077
  type: i0.Component,
8848
9078
  args: [{
@@ -9245,7 +9475,7 @@
9245
9475
  return TheInsertMarkComponent;
9246
9476
  }());
9247
9477
  TheInsertMarkComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheInsertMarkComponent, deps: [{ token: i0__namespace.ChangeDetectorRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
9248
- TheInsertMarkComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", 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"] }] });
9478
+ TheInsertMarkComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", 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.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { type: i10__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i10__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i10__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
9249
9479
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheInsertMarkComponent, decorators: [{
9250
9480
  type: i0.Component,
9251
9481
  args: [{
@@ -9761,7 +9991,7 @@
9761
9991
  provide: TheTableToken,
9762
9992
  useExisting: TheTableComponent
9763
9993
  }
9764
- ], viewQueries: [{ propertyName: "tableWrapper", first: true, predicate: ["tableWrapper"], descendants: true, read: i0.ElementRef, static: true }, { propertyName: "theTableElement", first: true, predicate: ["theTable"], descendants: true, read: i0.ElementRef, static: true }, { propertyName: "tbodyElement", first: true, predicate: ["tbody"], descendants: true, read: i0.ElementRef, static: true }], usesInheritance: true, ngImport: i0__namespace, template: "<div\n class=\"the-table-container\"\n theColumnResize\n [ngClass]=\"{\n 'the-table-with-controls': isInTable,\n 'the-table-selection-hide': tableStore.isCellSelecting || tableStore.isRightClicking\n }\"\n>\n <div class=\"the-table-row-controls-wrapper\" *ngIf=\"!readonly && isInTable\">\n <div>\n <div\n class=\"the-table-corner-controls\"\n [ngClass]=\"{ active: isSelectedAllCell, dangerous: tableStore.isSelectedTable && tableStore.dangerousCells.length > 0 }\"\n >\n <button type=\"button\" class=\"the-table-corner-button\" (mousedown)=\"onSelectTable($event)\"></button>\n <div class=\"the-table-corner-controls-insert-row-marker\">\n <the-table-insert-mark type=\"row\" [at]=\"0\" [tableStore]=\"tableStore\"></the-table-insert-mark>\n </div>\n <div class=\"the-table-corner-controls-insert-column-marker\">\n <the-table-insert-mark type=\"column\" [at]=\"0\" [tableStore]=\"tableStore\"></the-table-insert-mark>\n </div>\n </div>\n <div class=\"the-table-row-controls\">\n <div class=\"the-table-row-controls-inner\">\n <div\n class=\"the-table-row-controls-button-wrap\"\n *ngFor=\"let control of rowControls; let i = index; trackBy: trackByFnRowCotrols\"\n [ngClass]=\"{\n active: tableStore.selectedRowsIndex.includes(control.rowIndex),\n dangerous: tableStore.dangerousRowsIndex.includes(control.rowIndex) && tableStore.dangerousCells.length > 0\n }\"\n >\n <button\n (mousedown)=\"onRowMouseDown($event, control.rowIndex)\"\n type=\"button\"\n [ngStyle]=\"{ height: control.height + 1 + 'px' }\"\n class=\"the-table-row-controls-button the-table-controls-button\"\n ></button>\n <the-table-insert-mark type=\"row\" [at]=\"control.rowIndex + 1\" [tableStore]=\"tableStore\"></the-table-insert-mark>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"the-table-wrapper\" #tableWrapper>\n <table class=\"the-table\" #theTable [ngClass]=\"{ 'the-table-with-controls': isInTable }\">\n <colgroup *ngIf=\"columns\">\n <col *ngFor=\"let col of columns\" [ngStyle]=\"{ width: col.width + 'px' }\" />\n </colgroup>\n <thead>\n <tr class=\"the-table-col-controls-wrapper\">\n <th\n class=\"the-table-col-controls\"\n (mousedown)=\"onColMouseDown($event, i)\"\n *ngFor=\"let control of colControls; let i = index; trackBy: trackByFnColCotrols\"\n >\n <the-table-insert-mark\n *ngIf=\"isInTable\"\n type=\"column\"\n [at]=\"i + 1\"\n [tableStore]=\"tableStore\"\n ></the-table-insert-mark>\n <div\n class=\"the-table-col-controls-inner\"\n [ngClass]=\"{\n active: tableStore.selectedColumnsIndex.includes(i),\n dangerous: tableStore.dangerousColumnsIndex.includes(i) && tableStore.dangerousCells.length > 0\n }\"\n ></div>\n </th>\n </tr>\n </thead>\n <tbody #tbody>\n <slate-children [children]=\"children\" [context]=\"childrenContext\" [viewContext]=\"viewContext\"> </slate-children>\n </tbody>\n </table>\n </div>\n</div>\n", components: [{ type: TheInsertMarkComponent, selector: "the-table-insert-mark", inputs: ["type", "at", "tableStore"] }, { type: i1__namespace.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }], directives: [{ type: TheColumnResizeDirective, selector: "div[theColumnResize]" }, { type: i6__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
9994
+ ], viewQueries: [{ propertyName: "tableWrapper", first: true, predicate: ["tableWrapper"], descendants: true, read: i0.ElementRef, static: true }, { propertyName: "theTableElement", first: true, predicate: ["theTable"], descendants: true, read: i0.ElementRef, static: true }, { propertyName: "tbodyElement", first: true, predicate: ["tbody"], descendants: true, read: i0.ElementRef, static: true }], usesInheritance: true, ngImport: i0__namespace, template: "<div\n class=\"the-table-container\"\n theColumnResize\n [ngClass]=\"{\n 'the-table-with-controls': isInTable,\n 'the-table-selection-hide': tableStore.isCellSelecting || tableStore.isRightClicking\n }\"\n>\n <div class=\"the-table-row-controls-wrapper\" *ngIf=\"!readonly && isInTable\">\n <div>\n <div\n class=\"the-table-corner-controls\"\n [ngClass]=\"{ active: isSelectedAllCell, dangerous: tableStore.isSelectedTable && tableStore.dangerousCells.length > 0 }\"\n >\n <button type=\"button\" class=\"the-table-corner-button\" (mousedown)=\"onSelectTable($event)\"></button>\n <div class=\"the-table-corner-controls-insert-row-marker\">\n <the-table-insert-mark type=\"row\" [at]=\"0\" [tableStore]=\"tableStore\"></the-table-insert-mark>\n </div>\n <div class=\"the-table-corner-controls-insert-column-marker\">\n <the-table-insert-mark type=\"column\" [at]=\"0\" [tableStore]=\"tableStore\"></the-table-insert-mark>\n </div>\n </div>\n <div class=\"the-table-row-controls\">\n <div class=\"the-table-row-controls-inner\">\n <div\n class=\"the-table-row-controls-button-wrap\"\n *ngFor=\"let control of rowControls; let i = index; trackBy: trackByFnRowCotrols\"\n [ngClass]=\"{\n active: tableStore.selectedRowsIndex.includes(control.rowIndex),\n dangerous: tableStore.dangerousRowsIndex.includes(control.rowIndex) && tableStore.dangerousCells.length > 0\n }\"\n >\n <button\n (mousedown)=\"onRowMouseDown($event, control.rowIndex)\"\n type=\"button\"\n [ngStyle]=\"{ height: control.height + 1 + 'px' }\"\n class=\"the-table-row-controls-button the-table-controls-button\"\n ></button>\n <the-table-insert-mark type=\"row\" [at]=\"control.rowIndex + 1\" [tableStore]=\"tableStore\"></the-table-insert-mark>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"the-table-wrapper\" #tableWrapper>\n <table class=\"the-table\" #theTable [ngClass]=\"{ 'the-table-with-controls': isInTable }\">\n <colgroup *ngIf=\"columns\">\n <col *ngFor=\"let col of columns\" [ngStyle]=\"{ width: col.width + 'px' }\" />\n </colgroup>\n <thead>\n <tr class=\"the-table-col-controls-wrapper\">\n <th\n class=\"the-table-col-controls\"\n (mousedown)=\"onColMouseDown($event, i)\"\n *ngFor=\"let control of colControls; let i = index; trackBy: trackByFnColCotrols\"\n >\n <the-table-insert-mark\n *ngIf=\"isInTable\"\n type=\"column\"\n [at]=\"i + 1\"\n [tableStore]=\"tableStore\"\n ></the-table-insert-mark>\n <div\n class=\"the-table-col-controls-inner\"\n [ngClass]=\"{\n active: tableStore.selectedColumnsIndex.includes(i),\n dangerous: tableStore.dangerousColumnsIndex.includes(i) && tableStore.dangerousCells.length > 0\n }\"\n ></div>\n </th>\n </tr>\n </thead>\n <tbody #tbody>\n <slate-children [children]=\"children\" [context]=\"childrenContext\" [viewContext]=\"viewContext\"> </slate-children>\n </tbody>\n </table>\n </div>\n</div>\n", components: [{ type: TheInsertMarkComponent, selector: "the-table-insert-mark", inputs: ["type", "at", "tableStore"] }, { type: i1__namespace.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }], directives: [{ type: TheColumnResizeDirective, selector: "div[theColumnResize]" }, { type: i10__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i10__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i10__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i10__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
9765
9995
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheTableComponent, decorators: [{
9766
9996
  type: i0.Component,
9767
9997
  args: [{
@@ -10195,7 +10425,7 @@
10195
10425
  };
10196
10426
  return TheColumnResizeOverlayHandleComponent;
10197
10427
  }());
10198
- TheColumnResizeOverlayHandleComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheColumnResizeOverlayHandleComponent, deps: [{ token: i0__namespace.ElementRef }, { token: i0__namespace.ViewContainerRef }, { token: i0__namespace.ChangeDetectorRef }, { token: i0__namespace.NgZone }, { token: ResizeRef }, { token: TableCellEventDispatcher }, { token: i6.DOCUMENT }, { token: ColumnResizeNotifierSource }], target: i0__namespace.ɵɵFactoryTarget.Component });
10428
+ TheColumnResizeOverlayHandleComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheColumnResizeOverlayHandleComponent, deps: [{ token: i0__namespace.ElementRef }, { token: i0__namespace.ViewContainerRef }, { token: i0__namespace.ChangeDetectorRef }, { token: i0__namespace.NgZone }, { token: ResizeRef }, { token: TableCellEventDispatcher }, { token: i10.DOCUMENT }, { token: ColumnResizeNotifierSource }], target: i0__namespace.ɵɵFactoryTarget.Component });
10199
10429
  TheColumnResizeOverlayHandleComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheColumnResizeOverlayHandleComponent, selector: "ng-component", host: { classAttribute: "the-table-resize-overlay-thumb" }, ngImport: i0__namespace, template: '', isInline: true, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
10200
10430
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheColumnResizeOverlayHandleComponent, decorators: [{
10201
10431
  type: i0.Component,
@@ -10207,7 +10437,7 @@
10207
10437
  }], ctorParameters: function () {
10208
10438
  return [{ type: i0__namespace.ElementRef }, { type: i0__namespace.ViewContainerRef }, { type: i0__namespace.ChangeDetectorRef }, { type: i0__namespace.NgZone }, { type: ResizeRef }, { type: TableCellEventDispatcher }, { type: undefined, decorators: [{
10209
10439
  type: i0.Inject,
10210
- args: [i6.DOCUMENT]
10440
+ args: [i10.DOCUMENT]
10211
10441
  }] }, { type: ColumnResizeNotifierSource }];
10212
10442
  } });
10213
10443
 
@@ -11513,7 +11743,7 @@
11513
11743
  return TheVerticalToolbarItemComponent;
11514
11744
  }(TheToolbarBaseItemComponent));
11515
11745
  TheVerticalToolbarItemComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheVerticalToolbarItemComponent, deps: [{ token: i0__namespace.ElementRef }, { token: i1__namespace$6.ThyPopover }, { token: i0__namespace.ViewContainerRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
11516
- TheVerticalToolbarItemComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheVerticalToolbarItemComponent, selector: "the-toolbar-vertical-align-item", inputs: { item: "item", menus: "menus", editor: "editor", toolbarItem: "toolbarItem" }, host: { listeners: { "document: mousedown": "handleDocumentMouseDown($event)" }, properties: { "class.hide": "!active" }, classAttribute: "the-toolbar-dropdown-container verticalAlign" }, viewQueries: [{ propertyName: "template", first: true, predicate: ["VerticalAlignItems"], descendants: true, read: i0.TemplateRef, static: true }], usesInheritance: true, ngImport: i0__namespace, template: "<a\n thyIconNavLink\n class=\"icon-mode link-with-down\"\n [thyTooltip]=\"toolbarItem?.name\"\n [thyIconNavLinkActive]=\"isOpened\"\n thyTooltipPlacement=\"top\"\n (mousedown)=\"execute($event)\"\n>\n <thy-icon [thyIconName]=\"activeMenu?.icon\"></thy-icon>\n <thy-icon class=\"caret-down-icon font-size-sm text-desc\" thyIconName=\"caret-down\"></thy-icon>\n</a>\n\n<ng-template #VerticalAlignItems>\n <thy-action-menu class=\"dropdown\">\n <ng-container *ngFor=\"let menu of toolbarItem?.includes\">\n <a\n thyActionMenuItem\n href=\"javascript:;\"\n [thyActionMenuItemActive]=\"menu.key === activeMenu?.key\"\n (mousedown)=\"itemMousedown($event, menu)\"\n >\n <span *ngIf=\"menu.icon\" thyActionMenuItemIcon>\n <thy-icon [thyIconName]=\"menu?.icon\"></thy-icon>\n </span>\n <span thyActionMenuItemName>{{ menu.name }}</span>\n </a>\n </ng-container>\n </thy-action-menu>\n</ng-template>\n", components: [{ type: i3__namespace.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i4__namespace$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.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5__namespace$2.ThyActionMenuItemIconDirective, selector: "[thyActionMenuItemIcon]" }, { type: i5__namespace$2.ThyActionMenuItemNameDirective, selector: "[thyActionMenuItemName]" }] });
11746
+ TheVerticalToolbarItemComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheVerticalToolbarItemComponent, selector: "the-toolbar-vertical-align-item", inputs: { item: "item", menus: "menus", editor: "editor", toolbarItem: "toolbarItem" }, host: { listeners: { "document: mousedown": "handleDocumentMouseDown($event)" }, properties: { "class.hide": "!active" }, classAttribute: "the-toolbar-dropdown-container verticalAlign" }, viewQueries: [{ propertyName: "template", first: true, predicate: ["VerticalAlignItems"], descendants: true, read: i0.TemplateRef, static: true }], usesInheritance: true, ngImport: i0__namespace, template: "<a\n thyIconNavLink\n class=\"icon-mode link-with-down\"\n [thyTooltip]=\"toolbarItem?.name\"\n [thyIconNavLinkActive]=\"isOpened\"\n thyTooltipPlacement=\"top\"\n (mousedown)=\"execute($event)\"\n>\n <thy-icon [thyIconName]=\"activeMenu?.icon\"></thy-icon>\n <thy-icon class=\"caret-down-icon font-size-sm text-desc\" thyIconName=\"caret-down\"></thy-icon>\n</a>\n\n<ng-template #VerticalAlignItems>\n <thy-action-menu class=\"dropdown\">\n <ng-container *ngFor=\"let menu of toolbarItem?.includes\">\n <a\n thyActionMenuItem\n href=\"javascript:;\"\n [thyActionMenuItemActive]=\"menu.key === activeMenu?.key\"\n (mousedown)=\"itemMousedown($event, menu)\"\n >\n <span *ngIf=\"menu.icon\" thyActionMenuItemIcon>\n <thy-icon [thyIconName]=\"menu?.icon\"></thy-icon>\n </span>\n <span thyActionMenuItemName>{{ menu.name }}</span>\n </a>\n </ng-container>\n </thy-action-menu>\n</ng-template>\n", components: [{ type: i3__namespace.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i4__namespace.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { type: i5__namespace$2.ThyActionMenuComponent, selector: "thy-action-menu", inputs: ["thyTheme", "thyWidth"] }], directives: [{ type: i5__namespace.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { type: i10__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i5__namespace$2.ThyActionMenuItemDirective, selector: "[thyActionMenuItem]", inputs: ["thyDisabled", "thyType"] }, { type: i5__namespace$2.ThyActionMenuItemActiveDirective, selector: "[thyActionMenuItemActive]", inputs: ["thyActionMenuItemActive"] }, { type: i10__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5__namespace$2.ThyActionMenuItemIconDirective, selector: "[thyActionMenuItemIcon]" }, { type: i5__namespace$2.ThyActionMenuItemNameDirective, selector: "[thyActionMenuItemName]" }] });
11517
11747
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheVerticalToolbarItemComponent, decorators: [{
11518
11748
  type: i0.Component,
11519
11749
  args: [{
@@ -11758,7 +11988,7 @@
11758
11988
  return TheToolbarItemComponent;
11759
11989
  }(TheToolbarBaseItemComponent));
11760
11990
  TheToolbarItemComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheToolbarItemComponent, deps: [{ token: i0__namespace.NgZone }, { token: i0__namespace.ComponentFactoryResolver }], target: i0__namespace.ɵɵFactoryTarget.Component });
11761
- TheToolbarItemComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheToolbarItemComponent, selector: "the-toolbar-item", inputs: { item: "item", editor: "editor", itemMode: "itemMode" }, host: { listeners: { "mousedown": "toggleDropdown($event)" }, properties: { "class.disabled": "this.disabledState" }, classAttribute: "the-toolbar-item" }, viewQueries: [{ propertyName: "toolbarContainer", first: true, predicate: ["toolbarContainer"], descendants: true, read: i0.ViewContainerRef, static: true }], usesInheritance: true, ngImport: i0__namespace, template: "\n <ng-container *ngIf=\"itemMode === ToolbarItemMode.horizontal; else selectionItem\">\n <a\n thyIconNavLink\n [thyIconNavLinkIcon]=\"item.icon\"\n [thyTooltip]=\"tooltip\"\n [thyTooltipTemplateContext]=\"{ name: item.name, shortcutKey: item.shortcutKey }\"\n thyTooltipPlacement=\"top\"\n [thyIconNavLinkActive]=\"active\"\n (mousedown)=\"execute($event)\"\n ></a>\n </ng-container>\n <ng-template #selectionItem>\n <ng-container *ngIf=\"!item?.quickItemComponent\">\n <thy-icon [thyIconName]=\"item?.icon\" [thyIconRotate]=\"0\" class=\"quick-toolbar-icon\"></thy-icon>\n <span class=\"quick-toolbar-name\">{{ item?.name }}</span>\n </ng-container>\n </ng-template>\n <ng-template #tooltip let-data> {{ data.name }} {{ data.shortcutKey }} </ng-template>\n <ng-container #toolbarContainer></ng-container>\n ", isInline: true, components: [{ type: i3__namespace.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i4__namespace$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"] }] });
11991
+ TheToolbarItemComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheToolbarItemComponent, selector: "the-toolbar-item", inputs: { editor: "editor", item: "item", itemMode: "itemMode" }, host: { listeners: { "mousedown": "toggleDropdown($event)" }, properties: { "class.disabled": "this.disabledState" }, classAttribute: "the-toolbar-item" }, viewQueries: [{ propertyName: "toolbarContainer", first: true, predicate: ["toolbarContainer"], descendants: true, read: i0.ViewContainerRef, static: true }], usesInheritance: true, ngImport: i0__namespace, template: "\n <ng-container *ngIf=\"itemMode === ToolbarItemMode.horizontal; else selectionItem\">\n <a\n thyIconNavLink\n [thyIconNavLinkIcon]=\"item.icon\"\n [thyTooltip]=\"tooltip\"\n [thyTooltipTemplateContext]=\"{ name: item.name, shortcutKey: item.shortcutKey }\"\n thyTooltipPlacement=\"top\"\n [thyIconNavLinkActive]=\"active\"\n (mousedown)=\"execute($event)\"\n ></a>\n </ng-container>\n <ng-template #selectionItem>\n <ng-container *ngIf=\"!item?.quickItemComponent\">\n <thy-icon [thyIconName]=\"item?.icon\" [thyIconRotate]=\"0\" class=\"quick-toolbar-icon\"></thy-icon>\n <span class=\"quick-toolbar-name\">{{ item?.name }}</span>\n </ng-container>\n </ng-template>\n <ng-template #tooltip let-data> {{ data.name }} {{ data.shortcutKey }} </ng-template>\n <ng-container #toolbarContainer></ng-container>\n ", isInline: true, components: [{ type: i3__namespace.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i4__namespace.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }], directives: [{ type: i10__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5__namespace.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }] });
11762
11992
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheToolbarItemComponent, decorators: [{
11763
11993
  type: i0.Component,
11764
11994
  args: [{
@@ -11768,9 +11998,9 @@
11768
11998
  class: 'the-toolbar-item'
11769
11999
  }
11770
12000
  }]
11771
- }], ctorParameters: function () { return [{ type: i0__namespace.NgZone }, { type: i0__namespace.ComponentFactoryResolver }]; }, propDecorators: { item: [{
12001
+ }], ctorParameters: function () { return [{ type: i0__namespace.NgZone }, { type: i0__namespace.ComponentFactoryResolver }]; }, propDecorators: { editor: [{
11772
12002
  type: i0.Input
11773
- }], editor: [{
12003
+ }], item: [{
11774
12004
  type: i0.Input
11775
12005
  }], itemMode: [{
11776
12006
  type: i0.Input
@@ -11834,7 +12064,7 @@
11834
12064
  return TheQuickToolbarComponent;
11835
12065
  }(core.mixinUnsubscribe(core.MixinBase)));
11836
12066
  TheQuickToolbarComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheQuickToolbarComponent, deps: [{ token: i1__namespace$3.ThyPopoverRef }, { token: i0__namespace.ElementRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
11837
- TheQuickToolbarComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheQuickToolbarComponent, selector: "the-quick-toolbar", inputs: { editor: "editor", quickToolbarItems: "quickToolbarItems" }, host: { listeners: { "document: mousedown": "handleMouseDown($event)", "document: keydown.enter": "handleEnter()", "document: keydown.escape": "handleEsc()" } }, usesInheritance: true, ngImport: i0__namespace, template: "<thy-selection-list\n class=\"the-quick-toolbar\"\n [thyBindKeyEventContainer]=\"editorElement\"\n (thySelectionChange)=\"selectionChange($event)\"\n [thyMultiple]=\"false\"\n>\n <ng-container *ngFor=\"let item of quickToolbarItems\">\n <ng-container *ngIf=\"item.key !== ToolbarActionTypes.split; else splitLine\">\n <thy-list-option [thyValue]=\"item?.key\" (mousedown)=\"stopPropagation($event)\">\n <the-toolbar-item [editor]=\"editor\" [item]=\"item\" [itemMode]=\"ToolbarItemMode.vertical\"></the-toolbar-item>\n </thy-list-option>\n </ng-container>\n </ng-container>\n</thy-selection-list>\n\n<ng-template #splitLine>\n <nav-split-line [mode]=\"ToolbarItemMode.horizontal\"></nav-split-line>\n</ng-template>\n", components: [{ type: 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$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"] }] });
12067
+ TheQuickToolbarComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheQuickToolbarComponent, selector: "the-quick-toolbar", inputs: { editor: "editor", quickToolbarItems: "quickToolbarItems" }, host: { listeners: { "document: mousedown": "handleMouseDown($event)", "document: keydown.enter": "handleEnter()", "document: keydown.escape": "handleEsc()" } }, usesInheritance: true, ngImport: i0__namespace, template: "<thy-selection-list\n class=\"the-quick-toolbar\"\n [thyBindKeyEventContainer]=\"editorElement\"\n (thySelectionChange)=\"selectionChange($event)\"\n [thyMultiple]=\"false\"\n>\n <ng-container *ngFor=\"let item of quickToolbarItems\">\n <ng-container *ngIf=\"item.key !== ToolbarActionTypes.split; else splitLine\">\n <thy-list-option [thyValue]=\"item?.key\" (mousedown)=\"stopPropagation($event)\">\n <the-toolbar-item [editor]=\"editor\" [item]=\"item\" [itemMode]=\"ToolbarItemMode.vertical\"></the-toolbar-item>\n </thy-list-option>\n </ng-container>\n </ng-container>\n</thy-selection-list>\n\n<ng-template #splitLine>\n <nav-split-line [mode]=\"ToolbarItemMode.horizontal\"></nav-split-line>\n</ng-template>\n", components: [{ type: 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$3.ThyListOptionComponent, selector: "thy-list-option,[thy-list-option]", inputs: ["id", "thyValue", "thyDisabled"] }, { type: TheToolbarItemComponent, selector: "the-toolbar-item", inputs: ["editor", "item", "itemMode"] }, { type: NavSplitLineComponent, selector: "nav-split-line", inputs: ["mode"] }], directives: [{ type: i10__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i10__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
11838
12068
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheQuickToolbarComponent, decorators: [{
11839
12069
  type: i0.Component,
11840
12070
  args: [{
@@ -12211,7 +12441,7 @@
12211
12441
  return TheIndentToolbarComponent;
12212
12442
  }(TheToolbarBaseItemComponent));
12213
12443
  TheIndentToolbarComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheIndentToolbarComponent, deps: [{ token: i0__namespace.ElementRef }, { token: i1__namespace$3.ThyPopover }, { token: i0__namespace.ViewContainerRef }, { token: i2__namespace.Overlay }], target: i0__namespace.ɵɵFactoryTarget.Component });
12214
- TheIndentToolbarComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheIndentToolbarComponent, selector: "the-indent-toolbar-item", inputs: { toolbarItem: "toolbarItem", menus: "menus", mode: "mode", item: "item" }, host: { listeners: { "mousedown": "toggleDropdown($event)", "document: mousedown": "handleDocumentMouseDown($event)" }, properties: { "class.disabled": "this.disabledState" }, classAttribute: "the-toolbar-dropdown-container" }, viewQueries: [{ propertyName: "dropdownTemplate", first: true, predicate: ["dropdownTemplate"], descendants: true, static: true }], usesInheritance: true, ngImport: i0__namespace, template: "<a thyIconNavLink class=\"icon-mode link-with-down\" [thyTooltip]=\"activeMenu?.name\" thyTooltipPlacement=\"top\">\n <thy-icon [thyIconName]=\"activeMenu?.icon\"></thy-icon>\n <thy-icon class=\"caret-down-icon font-size-sm text-desc\" thyIconName=\"caret-down\"></thy-icon>\n</a>\n\n<ng-template #dropdownTemplate>\n <thy-action-menu class=\"dropdown-menu\">\n <ng-container *ngFor=\"let menu of menus\">\n <a\n thyActionMenuItem\n href=\"javascript:;\"\n [thyTooltip]=\"tooltip\"\n [thyTooltipTemplateContext]=\"{ name: menu.name, shortcutKey: menu.shortcutKey }\"\n thyTooltipPlacement=\"right\"\n (mousedown)=\"itemMousedown($event, menu)\"\n >\n <span thyActionMenuItemIcon>\n <thy-icon [thyIconName]=\"menu.icon\"></thy-icon>\n </span>\n <span thyActionMenuItemName>{{ menu.name }}</span>\n </a>\n </ng-container>\n </thy-action-menu>\n</ng-template>\n\n<ng-template #tooltip let-data>{{ data?.shortcutKey }}</ng-template>\n", components: [{ type: i3__namespace.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i4__namespace$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.ThyActionMenuItemIconDirective, selector: "[thyActionMenuItemIcon]" }, { type: i5__namespace$2.ThyActionMenuItemNameDirective, selector: "[thyActionMenuItemName]" }] });
12444
+ TheIndentToolbarComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheIndentToolbarComponent, selector: "the-indent-toolbar-item", inputs: { toolbarItem: "toolbarItem", menus: "menus", mode: "mode", item: "item" }, host: { listeners: { "mousedown": "toggleDropdown($event)", "document: mousedown": "handleDocumentMouseDown($event)" }, properties: { "class.disabled": "this.disabledState" }, classAttribute: "the-toolbar-dropdown-container" }, viewQueries: [{ propertyName: "dropdownTemplate", first: true, predicate: ["dropdownTemplate"], descendants: true, static: true }], usesInheritance: true, ngImport: i0__namespace, template: "<a thyIconNavLink class=\"icon-mode link-with-down\" [thyTooltip]=\"activeMenu?.name\" thyTooltipPlacement=\"top\">\n <thy-icon [thyIconName]=\"activeMenu?.icon\"></thy-icon>\n <thy-icon class=\"caret-down-icon font-size-sm text-desc\" thyIconName=\"caret-down\"></thy-icon>\n</a>\n\n<ng-template #dropdownTemplate>\n <thy-action-menu class=\"dropdown-menu\">\n <ng-container *ngFor=\"let menu of menus\">\n <a\n thyActionMenuItem\n href=\"javascript:;\"\n [thyTooltip]=\"tooltip\"\n [thyTooltipTemplateContext]=\"{ name: menu.name, shortcutKey: menu.shortcutKey }\"\n thyTooltipPlacement=\"right\"\n (mousedown)=\"itemMousedown($event, menu)\"\n >\n <span thyActionMenuItemIcon>\n <thy-icon [thyIconName]=\"menu.icon\"></thy-icon>\n </span>\n <span thyActionMenuItemName>{{ menu.name }}</span>\n </a>\n </ng-container>\n </thy-action-menu>\n</ng-template>\n\n<ng-template #tooltip let-data>{{ data?.shortcutKey }}</ng-template>\n", components: [{ type: i3__namespace.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i4__namespace.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { type: i5__namespace$2.ThyActionMenuComponent, selector: "thy-action-menu", inputs: ["thyTheme", "thyWidth"] }], directives: [{ type: i5__namespace.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { type: i10__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i5__namespace$2.ThyActionMenuItemDirective, selector: "[thyActionMenuItem]", inputs: ["thyDisabled", "thyType"] }, { type: i5__namespace$2.ThyActionMenuItemIconDirective, selector: "[thyActionMenuItemIcon]" }, { type: i5__namespace$2.ThyActionMenuItemNameDirective, selector: "[thyActionMenuItemName]" }] });
12215
12445
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheIndentToolbarComponent, decorators: [{
12216
12446
  type: i0.Component,
12217
12447
  args: [{
@@ -12361,8 +12591,7 @@
12361
12591
  return false;
12362
12592
  }
12363
12593
  var _b = __read(startBlock, 2), block = _b[0], path = _b[1];
12364
- var currentPath = [path[0]];
12365
- var isStart = slate.Editor.isStart(editor, selection.anchor, currentPath);
12594
+ var isStart = slate.Editor.isStart(editor, selection.anchor, path);
12366
12595
  var textIndentDisable = [exports.ElementKinds.bulletedList, exports.ElementKinds.numberedList, exports.ElementKinds.checkItem];
12367
12596
  if (isHotkey.isKeyHotkey('Tab', event)) {
12368
12597
  event.preventDefault();
@@ -12588,8 +12817,9 @@
12588
12817
  };
12589
12818
 
12590
12819
  var TheToolbarComponent = /** @class */ (function () {
12591
- function TheToolbarComponent(cfr, elementRef, ngZone, toolbarGroupComponent) {
12820
+ function TheToolbarComponent(cfr, cdr, elementRef, ngZone, toolbarGroupComponent) {
12592
12821
  this.cfr = cfr;
12822
+ this.cdr = cdr;
12593
12823
  this.elementRef = elementRef;
12594
12824
  this.ngZone = ngZone;
12595
12825
  this.toolbarGroupComponent = toolbarGroupComponent;
@@ -12700,6 +12930,7 @@
12700
12930
  }
12701
12931
  _this.createMoreGroup(group);
12702
12932
  });
12933
+ this.cdr.markForCheck();
12703
12934
  };
12704
12935
  /**
12705
12936
  * calculation display toolbar and more grouped toolbars
@@ -12861,8 +13092,8 @@
12861
13092
  };
12862
13093
  return TheToolbarComponent;
12863
13094
  }());
12864
- TheToolbarComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheToolbarComponent, deps: [{ token: i0__namespace.ComponentFactoryResolver }, { token: i0__namespace.ElementRef }, { token: i0__namespace.NgZone }, { token: TheToolbarGroupToken }], target: i0__namespace.ɵɵFactoryTarget.Component });
12865
- TheToolbarComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheToolbarComponent, selector: "the-toolbar", inputs: { editor: "editor", toolbarItems: "toolbarItems", align: "align", containerClass: "containerClass", isMore: "isMore", afterTemplate: "afterTemplate" }, host: { classAttribute: "the-toolbar-container" }, viewQueries: [{ propertyName: "toolbarContainer", first: true, predicate: ["toolbarContainer"], descendants: true, read: i0.ViewContainerRef, static: true }], usesOnChanges: true, ngImport: i0__namespace, template: "<thy-icon-nav [style.justifyContent]=\"align\">\n <ng-container #toolbarContainer></ng-container>\n <ng-content></ng-content>\n <ng-template *ngIf=\"afterTemplate\" [ngTemplateOutlet]=\"afterTemplate\"></ng-template>\n</thy-icon-nav>\n", components: [{ type: i3__namespace.ThyIconNavComponent, selector: "thy-icon-nav", inputs: ["thyType"] }], directives: [{ type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }] });
13095
+ TheToolbarComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheToolbarComponent, deps: [{ token: i0__namespace.ComponentFactoryResolver }, { token: i0__namespace.ChangeDetectorRef }, { token: i0__namespace.ElementRef }, { token: i0__namespace.NgZone }, { token: TheToolbarGroupToken }], target: i0__namespace.ɵɵFactoryTarget.Component });
13096
+ TheToolbarComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheToolbarComponent, selector: "the-toolbar", inputs: { editor: "editor", toolbarItems: "toolbarItems", align: "align", containerClass: "containerClass", isMore: "isMore", afterTemplate: "afterTemplate" }, host: { classAttribute: "the-toolbar-container" }, viewQueries: [{ propertyName: "toolbarContainer", first: true, predicate: ["toolbarContainer"], descendants: true, read: i0.ViewContainerRef, static: true }], usesOnChanges: true, ngImport: i0__namespace, template: "<thy-icon-nav [style.justifyContent]=\"align\">\n <ng-container #toolbarContainer></ng-container>\n <ng-content></ng-content>\n <ng-template *ngIf=\"afterTemplate\" [ngTemplateOutlet]=\"afterTemplate\"></ng-template>\n</thy-icon-nav>\n", components: [{ type: i3__namespace.ThyIconNavComponent, selector: "thy-icon-nav", inputs: ["thyType"] }], directives: [{ type: i10__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i10__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }] });
12866
13097
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheToolbarComponent, decorators: [{
12867
13098
  type: i0.Component,
12868
13099
  args: [{
@@ -12873,7 +13104,7 @@
12873
13104
  }
12874
13105
  }]
12875
13106
  }], ctorParameters: function () {
12876
- return [{ type: i0__namespace.ComponentFactoryResolver }, { type: i0__namespace.ElementRef }, { type: i0__namespace.NgZone }, { type: undefined, decorators: [{
13107
+ return [{ type: i0__namespace.ComponentFactoryResolver }, { type: i0__namespace.ChangeDetectorRef }, { type: i0__namespace.ElementRef }, { type: i0__namespace.NgZone }, { type: undefined, decorators: [{
12877
13108
  type: i0.Inject,
12878
13109
  args: [TheToolbarGroupToken]
12879
13110
  }] }];
@@ -13041,7 +13272,7 @@
13041
13272
  TheQuickInsertComponent.prototype.checkStatus = function () {
13042
13273
  var _a;
13043
13274
  var editor = this.editor;
13044
- if (this.isVisible && isCleanEmptyParagraph(editor) && !this.hasExcludeAttribute()) {
13275
+ if (this.isVisible && isCleanEmptyParagraph(editor) && !this.hasExcludeAttribute() && !this.isRichMediaScope()) {
13045
13276
  var block = slate.Node.ancestor(editor, [(_a = editor === null || editor === void 0 ? void 0 : editor.selection) === null || _a === void 0 ? void 0 : _a.anchor.path[0]]);
13046
13277
  var rootNode = i1.AngularEditor.toDOMNode(editor, block);
13047
13278
  this.updatePosition(rootNode.offsetLeft, rootNode.offsetTop);
@@ -13049,6 +13280,17 @@
13049
13280
  }
13050
13281
  this.isHide = true;
13051
13282
  };
13283
+ TheQuickInsertComponent.prototype.isRichMediaScope = function () {
13284
+ var _a;
13285
+ var editor = this.editor;
13286
+ if (editor === null || editor === void 0 ? void 0 : editor.selection) {
13287
+ var block = slate.Node.ancestor(editor, [(_a = editor === null || editor === void 0 ? void 0 : editor.selection) === null || _a === void 0 ? void 0 : _a.anchor.path[0]]);
13288
+ var rootNode = i1.AngularEditor.toDOMNode(editor, block);
13289
+ var firstElementChild = rootNode.firstElementChild;
13290
+ return (firstElementChild === null || firstElementChild === void 0 ? void 0 : firstElementChild.offsetLeft) > 0;
13291
+ }
13292
+ return false;
13293
+ };
13052
13294
  TheQuickInsertComponent.prototype.hasExcludeAttribute = function () {
13053
13295
  var marks = getSelectionMarks(this.editor);
13054
13296
  var fontSizeMark = marks[exports.MarkTypes.fontSize];
@@ -13075,7 +13317,7 @@
13075
13317
  return TheQuickInsertComponent;
13076
13318
  }());
13077
13319
  TheQuickInsertComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheQuickInsertComponent, deps: [{ token: i0__namespace.Renderer2 }, { token: i0__namespace.ElementRef }, { token: i0__namespace.ChangeDetectorRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
13078
- TheQuickInsertComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheQuickInsertComponent, selector: "[theQuickInsert]", inputs: { editor: "editor", quickToolbarItems: "quickToolbarItems", isVisible: "isVisible" }, host: { listeners: { "mousedown": "handleMousedownNativeElement($event)" }, properties: { "class.hide": "isHide" }, classAttribute: "the-quick-insert" }, viewQueries: [{ propertyName: "iconElement", first: true, predicate: ["iconElement"], descendants: true, read: i0.ElementRef }], ngImport: i0__namespace, template: "<thy-icon\n #iconElement\n [thyIconName]=\"displayIconName\"\n class=\"quick-insert-icon text-desc font-size-xlg\"\n (mouseenter)=\"mouseEnter($event)\"\n (mouseleave)=\"mouseLeave($event)\"\n (mousedown)=\"handleClick($event)\"\n></thy-icon>\n", components: [{ type: i4__namespace$1.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }] });
13320
+ TheQuickInsertComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheQuickInsertComponent, selector: "[theQuickInsert]", inputs: { editor: "editor", quickToolbarItems: "quickToolbarItems", isVisible: "isVisible" }, host: { listeners: { "mousedown": "handleMousedownNativeElement($event)" }, properties: { "class.hide": "isHide" }, classAttribute: "the-quick-insert" }, viewQueries: [{ propertyName: "iconElement", first: true, predicate: ["iconElement"], descendants: true, read: i0.ElementRef }], ngImport: i0__namespace, template: "<thy-icon\n #iconElement\n [thyIconName]=\"displayIconName\"\n class=\"quick-insert-icon text-desc font-size-xlg\"\n (mouseenter)=\"mouseEnter($event)\"\n (mouseleave)=\"mouseLeave($event)\"\n (mousedown)=\"handleClick($event)\"\n></thy-icon>\n", components: [{ type: i4__namespace.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }] });
13079
13321
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheQuickInsertComponent, decorators: [{
13080
13322
  type: i0.Component,
13081
13323
  args: [{
@@ -13100,6 +13342,359 @@
13100
13342
  args: ['mousedown', ['$event']]
13101
13343
  }] } });
13102
13344
 
13345
+ var getCurrentTarget = function (editor, event) {
13346
+ var editorElement = i1.EDITOR_TO_ELEMENT.get(editor);
13347
+ var _a = editorElement.getBoundingClientRect(), left = _a.left, right = _a.right;
13348
+ var _b = window.getComputedStyle(editorElement, null), paddingLeft = _b.paddingLeft, paddingRight = _b.paddingRight;
13349
+ var paddingLeftPixels = coercePixelsFromCssValue(paddingLeft);
13350
+ var paddingRightPixels = coercePixelsFromCssValue(paddingRight);
13351
+ var x = event.x;
13352
+ if (event.x <= left + paddingLeftPixels || event.x >= right - paddingRightPixels) {
13353
+ x = left + paddingLeftPixels;
13354
+ }
13355
+ var nodeEntry = findNodeEntryByPoint(editor, x, event.y);
13356
+ if (nodeEntry) {
13357
+ return TheEditor.toDOMNode(editor, nodeEntry[0]);
13358
+ }
13359
+ };
13360
+
13361
+ var getHoverDirection = function (editor, event) {
13362
+ var rootNode = getCurrentTarget(editor, event);
13363
+ if (rootNode) {
13364
+ var _a = rootNode.getBoundingClientRect(), top = _a.top, bottom = _a.bottom;
13365
+ var middleHeight = (bottom - top) / 2;
13366
+ if (top + middleHeight > event.clientY) {
13367
+ return 'top';
13368
+ }
13369
+ return 'bottom';
13370
+ }
13371
+ };
13372
+
13373
+ var removeDropThumbLine = function (editor) {
13374
+ var element = i1.EDITOR_TO_ELEMENT.get(editor);
13375
+ var dropThumbLine = element.querySelector('.' + DROP_THUMB_LINE);
13376
+ if (dropThumbLine) {
13377
+ dropThumbLine.remove();
13378
+ }
13379
+ };
13380
+
13381
+ var moveDragNode = function (editor, dragNode, event) {
13382
+ event.stopPropagation();
13383
+ var element = i1.EDITOR_TO_ELEMENT.get(editor);
13384
+ var dropThumbLine = element.querySelector('.' + DROP_THUMB_LINE);
13385
+ var parentElement = dropThumbLine && dropThumbLine.parentNode;
13386
+ if (parentElement) {
13387
+ var node = TheEditor.toSlateNode(editor, parentElement);
13388
+ var dropPath_1 = node && TheEditor.findPath(editor, node);
13389
+ if (dropPath_1.length) {
13390
+ var dragPath_1 = dragNode.path;
13391
+ var before = slate.Path.isBefore(dragPath_1, dropPath_1) && slate.Path.isSibling(dragPath_1, dropPath_1);
13392
+ dropPath_1 = before ? dropPath_1 : slate.Path.next(dropPath_1);
13393
+ if (dropPath_1.length) {
13394
+ slate.Editor.withoutNormalizing(editor, function () {
13395
+ slate.Transforms.moveNodes(editor, {
13396
+ at: dragPath_1,
13397
+ to: dropPath_1
13398
+ });
13399
+ });
13400
+ }
13401
+ }
13402
+ }
13403
+ removeDropThumbLine(editor);
13404
+ };
13405
+
13406
+ var isValidDrag = function (editor, dragNode, currentTarget) {
13407
+ var _a;
13408
+ var node = TheEditor.toSlateNode(editor, currentTarget);
13409
+ var dropPath = TheEditor.findPath(editor, node);
13410
+ var dragPath = TheEditor.findPath(editor, dragNode);
13411
+ if (dragPath[0] === dropPath[0] && dropPath.length > 1) {
13412
+ // 阻止list元素拖入自身
13413
+ return false;
13414
+ }
13415
+ var allElementOptions = DefaultElementOptions;
13416
+ if ((_a = editor.extraElementOptions) === null || _a === void 0 ? void 0 : _a.length) {
13417
+ var extraInfo = mergeElementOptions(editor.extraElementOptions);
13418
+ allElementOptions = Object.values(extraInfo);
13419
+ }
13420
+ var types = allElementOptions.map(function (item) { return item.type; });
13421
+ if (types.indexOf(node.type) > -1 && allElementOptions[types.indexOf(node.type)].isSecondaryContainer) {
13422
+ // 阻止向table-celld等二级容器中拖入
13423
+ return false;
13424
+ }
13425
+ var containerParent = slate.Editor.above(editor, {
13426
+ at: dropPath,
13427
+ mode: 'lowest',
13428
+ match: function (node) {
13429
+ return node && node.type && types.includes(node.type);
13430
+ }
13431
+ });
13432
+ if (containerParent) {
13433
+ var inValidChildrenTypes = allElementOptions.find(function (item) { return item.type === containerParent[0].type; }).inValidChildrenTypes;
13434
+ if (inValidChildrenTypes.includes(dragNode.type)) {
13435
+ return false;
13436
+ }
13437
+ }
13438
+ return true;
13439
+ };
13440
+
13441
+ var SNAPSHOT_PADDING_WIDTH = 5;
13442
+ var SNAPSHOT_LIMI_HEIGHT = 70;
13443
+ var DRAG_ICON_SIZE = 24;
13444
+ var DRAG_ICON_OFFSET = 5;
13445
+ var TheDndComponent = /** @class */ (function () {
13446
+ function TheDndComponent(renderer, elementRef, ngZone, cdr) {
13447
+ this.renderer = renderer;
13448
+ this.elementRef = elementRef;
13449
+ this.ngZone = ngZone;
13450
+ this.cdr = cdr;
13451
+ this.isDraging = false;
13452
+ this.destroy$ = new rxjs.Subject();
13453
+ this.dragChange = new i0.EventEmitter();
13454
+ this.dropThumbLine = document.createElement('div');
13455
+ this.dropThumbLine.className = DROP_THUMB_LINE;
13456
+ }
13457
+ Object.defineProperty(TheDndComponent.prototype, "nativeElement", {
13458
+ get: function () {
13459
+ return this.elementRef.nativeElement;
13460
+ },
13461
+ enumerable: false,
13462
+ configurable: true
13463
+ });
13464
+ Object.defineProperty(TheDndComponent.prototype, "editableElement", {
13465
+ get: function () {
13466
+ return this.editor && i1.EDITOR_TO_ELEMENT.get(this.editor);
13467
+ },
13468
+ enumerable: false,
13469
+ configurable: true
13470
+ });
13471
+ TheDndComponent.prototype.ngAfterViewInit = function () {
13472
+ var _this = this;
13473
+ var contextService = this.editor.injector.get(TheContextService);
13474
+ this.ngZone.runOutsideAngular(function () {
13475
+ rxjs.merge(rxjs.fromEvent(_this.editableElement, "mousemove"), rxjs.fromEvent(_this.editableElement, "mouseleave"))
13476
+ .pipe(operators.takeUntil(_this.destroy$), operators.filter(function () {
13477
+ return !contextService.getOptions().theOptions.readonly && contextService.getOptions().theOptions.dragAndDrop;
13478
+ }))
13479
+ .subscribe(function (e) { return _this.setDragIcon(e); });
13480
+ rxjs.fromEvent(document, "drop")
13481
+ .pipe(operators.takeUntil(_this.destroy$), operators.filter(function () {
13482
+ return !contextService.getOptions().theOptions.readonly && contextService.getOptions().theOptions.dragAndDrop;
13483
+ }))
13484
+ .subscribe(function (e) { return _this.onDrop(e); });
13485
+ rxjs.fromEvent(document, "dragover")
13486
+ .pipe(operators.takeUntil(_this.destroy$), operators.filter(function () {
13487
+ return !contextService.getOptions().theOptions.readonly && contextService.getOptions().theOptions.dragAndDrop;
13488
+ }))
13489
+ .subscribe(function (e) { return _this.onDragover(e); });
13490
+ rxjs.fromEvent(document, "scroll")
13491
+ .pipe(operators.takeUntil(_this.destroy$), operators.filter(function () {
13492
+ return !contextService.getOptions().theOptions.readonly && contextService.getOptions().theOptions.dragAndDrop;
13493
+ }))
13494
+ .subscribe(function (e) {
13495
+ e.preventDefault();
13496
+ var scrollPosition = window.scrollY;
13497
+ if (!_this.isScrolling && _this.isDraging) {
13498
+ window.requestAnimationFrame(function () {
13499
+ if (_this.editableTop) {
13500
+ // 滚动过程中,通过设置父级元素来设置snapshot位置
13501
+ _this.updateDndContainerPosition(null, scrollPosition + _this.editableTop + 'px');
13502
+ }
13503
+ _this.isScrolling = false;
13504
+ });
13505
+ _this.isScrolling = true;
13506
+ }
13507
+ });
13508
+ });
13509
+ this.setVisibility(false);
13510
+ this.valueChangeHandle();
13511
+ };
13512
+ TheDndComponent.prototype.valueChangeHandle = function () {
13513
+ var _this = this;
13514
+ var onChange = this.editor.onChange;
13515
+ this.editor.onChange = function () {
13516
+ var ops = _this.editor.operations;
13517
+ var skip = ops.length === 1 && slate.Operation.isSelectionOperation(ops[0]);
13518
+ if (!skip) {
13519
+ _this.setVisibility(false);
13520
+ }
13521
+ onChange();
13522
+ };
13523
+ };
13524
+ TheDndComponent.prototype.updateDndContainerPosition = function (left, top) {
13525
+ var element = this.elementRef.nativeElement;
13526
+ var parentElement = element.parentElement;
13527
+ top && this.renderer.setStyle(parentElement, 'top', top);
13528
+ left && this.renderer.setStyle(parentElement, 'left', left);
13529
+ };
13530
+ TheDndComponent.prototype.getEditableTop = function (event) {
13531
+ var offsetHeight = document.documentElement.offsetHeight;
13532
+ var height = this.editableElement.getBoundingClientRect().height;
13533
+ if (event.clientY < this.dragElementHeight) {
13534
+ this.editableTop = -this.editableElement.offsetTop;
13535
+ return;
13536
+ }
13537
+ if (height > event.pageY && event.clientY + this.dragElementHeight >= offsetHeight) {
13538
+ this.editableTop = event.clientY - this.editableElement.offsetTop;
13539
+ return;
13540
+ }
13541
+ this.editableTop = null;
13542
+ };
13543
+ TheDndComponent.prototype.onDragStart = function (event) {
13544
+ this.isDraging = true;
13545
+ this.dragChange.emit(this.isDraging);
13546
+ this.dragSnapshotContent = document.querySelector('.drag-snapshot-container');
13547
+ this.dragSnapshotContent.className = 'the-editor-typo drag-snapshot-container';
13548
+ this.dragSnapshotContent.appendChild(this.dragElement.cloneNode(true));
13549
+ this.dragElement.style.opacity = '0.3';
13550
+ };
13551
+ TheDndComponent.prototype.onDragEnd = function (event) {
13552
+ this.dragElement.style.opacity = '';
13553
+ this.isDraging = false;
13554
+ this.setVisibility(false);
13555
+ this.resetDragSnapshotContent();
13556
+ this.dragChange.emit(this.isDraging);
13557
+ };
13558
+ TheDndComponent.prototype.onDrop = function (event) {
13559
+ event.preventDefault();
13560
+ if (this.isDraging) {
13561
+ moveDragNode(this.editor, this.dragNode, event);
13562
+ }
13563
+ };
13564
+ TheDndComponent.prototype.onDragover = function (event) {
13565
+ event.preventDefault();
13566
+ if (this.isDraging && !this.isScrolling) {
13567
+ this.getEditableTop(event);
13568
+ var offsetWidth = document.documentElement.offsetWidth;
13569
+ var _b = this.editableElement.getBoundingClientRect(), editorLeft = _b.left, editorTop = _b.top, height = _b.height;
13570
+ var top = 0;
13571
+ var left = 0;
13572
+ if (editorLeft > 0) {
13573
+ if (event.clientX + this.dragElementWidth / 2 > offsetWidth) {
13574
+ left = event.pageX - editorLeft - this.elementRef.nativeElement.offsetWidth;
13575
+ }
13576
+ else {
13577
+ left = Math.max(event.pageX - editorLeft, -editorLeft) + 10;
13578
+ }
13579
+ }
13580
+ var paddingTop = 0; // paddingTop: 编辑器距离顶部的距离
13581
+ if (editorTop >= 0) {
13582
+ // 无滚动情况下
13583
+ top = event.clientY - this.editableElement.offsetTop;
13584
+ paddingTop = editorTop - this.editableElement.offsetTop;
13585
+ }
13586
+ else {
13587
+ // 有滚动距离
13588
+ top = Math.abs(editorTop) + event.clientY; // 滚动距离 + 鼠标clientY
13589
+ paddingTop = event.pageY - this.editableElement.offsetTop - top;
13590
+ // 防止底部出现滚动条
13591
+ if (paddingTop < height - top) {
13592
+ top = top + paddingTop;
13593
+ }
13594
+ }
13595
+ this.updateDndContainerPosition(left + 'px', top + 'px');
13596
+ this.setSnapshotStyle(event);
13597
+ this.setDropThumbLine(event);
13598
+ }
13599
+ };
13600
+ TheDndComponent.prototype.setDropThumbLine = function (event) {
13601
+ var _a;
13602
+ var element = getCurrentTarget(this.editor, event);
13603
+ var direction = getHoverDirection(this.editor, event);
13604
+ if (element) {
13605
+ if (direction && direction === 'top') {
13606
+ element = (_a = element.previousElementSibling) === null || _a === void 0 ? void 0 : _a.querySelector('[data-slate-node="element"]');
13607
+ }
13608
+ if (element && isValidDrag(this.editor, this.dragNode.node, element)) {
13609
+ element.appendChild(this.dropThumbLine);
13610
+ }
13611
+ }
13612
+ };
13613
+ TheDndComponent.prototype.setDragIcon = function (event) {
13614
+ if (!this.isDraging) {
13615
+ var nodeEntry = findNodeEntryByPoint(this.editor, event.x, event.y, 'highest');
13616
+ if (nodeEntry && !slate.Editor.isEmpty(this.editor, nodeEntry[0])) {
13617
+ var rootNode = i1.AngularEditor.toDOMNode(this.editor, nodeEntry[0]);
13618
+ this.dragNode = {
13619
+ node: nodeEntry[0],
13620
+ path: nodeEntry[1]
13621
+ };
13622
+ this.dragElement = rootNode;
13623
+ var lineHeight = coercePixelsFromCssValue(window.getComputedStyle(rootNode)['lineHeight']);
13624
+ var offsetTop = rootNode.offsetTop + rootNode.offsetParent.offsetTop + (lineHeight - DRAG_ICON_SIZE) / 2;
13625
+ var offsetLeft = rootNode.offsetLeft + rootNode.offsetParent.offsetLeft;
13626
+ this.updateDndContainerPosition(offsetLeft - DRAG_ICON_SIZE - DRAG_ICON_OFFSET + 'px', offsetTop + 'px');
13627
+ this.setVisibility(true);
13628
+ }
13629
+ else {
13630
+ this.setVisibility(false);
13631
+ }
13632
+ }
13633
+ };
13634
+ TheDndComponent.prototype.setSnapshotStyle = function (event) {
13635
+ var _b = this.dragElement.getBoundingClientRect(), width = _b.width, height = _b.height;
13636
+ this.dragElementHeight = height;
13637
+ this.dragElementWidth = width;
13638
+ var dragSnapshotContentStyle = "visibility: visible; width: " + (width + SNAPSHOT_PADDING_WIDTH * 2) + "px;";
13639
+ if (height > SNAPSHOT_LIMI_HEIGHT) {
13640
+ dragSnapshotContentStyle = dragSnapshotContentStyle + 'transform: scale(0.45);';
13641
+ this.dragElementHeight = this.dragElementHeight * 0.45;
13642
+ this.dragElementWidth = this.dragElementWidth * 0.45;
13643
+ }
13644
+ var snapshotTop = 0;
13645
+ var snapshotLeft = 0;
13646
+ // 上下移动:超出屏幕高度,重新设置snapshot的位置
13647
+ if (event.clientY + this.dragElementHeight > document.documentElement.offsetHeight) {
13648
+ snapshotTop = this.dragElementHeight;
13649
+ }
13650
+ else {
13651
+ snapshotTop = 0;
13652
+ }
13653
+ // 左右移动:超出屏幕宽度,重新设置snapshot的位置
13654
+ if (event.clientX + this.dragElementWidth / 2 > document.documentElement.offsetWidth) {
13655
+ snapshotLeft = this.dragElementWidth;
13656
+ }
13657
+ else {
13658
+ snapshotLeft = 0;
13659
+ }
13660
+ dragSnapshotContentStyle = dragSnapshotContentStyle + ("top: " + -snapshotTop + "px; left: " + -snapshotLeft + "px;");
13661
+ this.dragSnapshotContent.setAttribute('style', dragSnapshotContentStyle);
13662
+ };
13663
+ TheDndComponent.prototype.resetDragSnapshotContent = function () {
13664
+ this.dragSnapshotContent.className = 'drag-snapshot-container';
13665
+ this.dragSnapshotContent.setAttribute('style', '');
13666
+ this.dragSnapshotContent.innerHTML = '';
13667
+ };
13668
+ TheDndComponent.prototype.setVisibility = function (visible) {
13669
+ if (visible === void 0) { visible = true; }
13670
+ this.nativeElement.parentNode.style.visibility = visible ? 'visible' : 'hidden';
13671
+ };
13672
+ TheDndComponent.prototype.ngOnDestroy = function () {
13673
+ this.destroy$.next();
13674
+ this.destroy$.complete();
13675
+ };
13676
+ return TheDndComponent;
13677
+ }());
13678
+ TheDndComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheDndComponent, deps: [{ token: i0__namespace.Renderer2 }, { token: i0__namespace.ElementRef }, { token: i0__namespace.NgZone }, { token: i0__namespace.ChangeDetectorRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
13679
+ TheDndComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheDndComponent, selector: "[theDnd]", inputs: { editor: "editor" }, outputs: { dragChange: "dragChange" }, host: { classAttribute: "the-drag-drop" }, viewQueries: [{ propertyName: "content", first: true, predicate: ["content"], descendants: true }], ngImport: i0__namespace, template: "<div\n draggable=\"true\"\n class=\"the-drag-drop-icon\"\n [ngStyle]=\"{ opacity: isDraging ? 0 : '' }\"\n (dragstart)=\"onDragStart($event)\"\n (dragend)=\"onDragEnd($event)\"\n>\n <thy-icon thyIconName=\"drag\"> </thy-icon>\n</div>\n", components: [{ type: i4__namespace.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }], directives: [{ type: i10__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
13680
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheDndComponent, decorators: [{
13681
+ type: i0.Component,
13682
+ args: [{
13683
+ selector: '[theDnd]',
13684
+ templateUrl: './dnd.component.html',
13685
+ host: {
13686
+ class: 'the-drag-drop'
13687
+ }
13688
+ }]
13689
+ }], ctorParameters: function () { return [{ type: i0__namespace.Renderer2 }, { type: i0__namespace.ElementRef }, { type: i0__namespace.NgZone }, { type: i0__namespace.ChangeDetectorRef }]; }, propDecorators: { editor: [{
13690
+ type: i0.Input
13691
+ }], dragChange: [{
13692
+ type: i0.Output
13693
+ }], content: [{
13694
+ type: i0.ViewChild,
13695
+ args: ['content', { static: false }]
13696
+ }] } });
13697
+
13103
13698
  var ElementStylePipe = /** @class */ (function () {
13104
13699
  function ElementStylePipe() {
13105
13700
  }
@@ -13176,7 +13771,7 @@
13176
13771
  return TheTemplateComponent;
13177
13772
  }());
13178
13773
  TheTemplateComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheTemplateComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
13179
- TheTemplateComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheTemplateComponent, selector: "the-template,[theTemplate]", viewQueries: [{ propertyName: "paragraphTemplate", first: true, predicate: ["paragraph"], descendants: true, read: i0.TemplateRef, static: true }, { propertyName: "headingOneTemplate", first: true, predicate: ["headingOne"], descendants: true, read: i0.TemplateRef, static: true }, { propertyName: "headingTwoTemplate", first: true, predicate: ["headingTwo"], descendants: true, read: i0.TemplateRef, static: true }, { propertyName: "headingThreeTemplate", first: true, predicate: ["headingThree"], descendants: true, read: i0.TemplateRef, static: true }, { propertyName: "headingFourTemplate", first: true, predicate: ["headingFour"], descendants: true, read: i0.TemplateRef, static: true }, { propertyName: "headingFiveTemplate", first: true, predicate: ["headingFive"], descendants: true, read: i0.TemplateRef, static: true }, { propertyName: "headingSixTemplate", first: true, predicate: ["headingSix"], descendants: true, read: i0.TemplateRef, static: true }], ngImport: i0__namespace, template: "<ng-template #paragraph let-context=\"context\" let-viewContext=\"viewContext\">\n <div theDefaultElement [context]=\"context\" [viewContext]=\"viewContext\" [ngStyle]=\"context.element | elementStyle\"></div>\n</ng-template>\n<ng-template #headingOne let-context=\"context\" let-viewContext=\"viewContext\">\n <h1\n theDefaultElement\n [context]=\"context\"\n [viewContext]=\"viewContext\"\n [attr.id]=\"context.element.key\"\n [ngStyle]=\"context.element | elementStyle\"\n ></h1>\n</ng-template>\n<ng-template #headingTwo let-context=\"context\" let-viewContext=\"viewContext\">\n <h2\n theDefaultElement\n [context]=\"context\"\n [viewContext]=\"viewContext\"\n [attr.id]=\"context.element.key\"\n [ngStyle]=\"context.element | elementStyle\"\n ></h2>\n</ng-template>\n<ng-template #headingThree let-context=\"context\" let-viewContext=\"viewContext\">\n <h3\n theDefaultElement\n [context]=\"context\"\n [viewContext]=\"viewContext\"\n [attr.id]=\"context.element.key\"\n [ngStyle]=\"context.element | elementStyle\"\n ></h3>\n</ng-template>\n<ng-template #headingFour let-context=\"context\" let-viewContext=\"viewContext\">\n <h4\n theDefaultElement\n [context]=\"context\"\n [viewContext]=\"viewContext\"\n [attr.id]=\"context.element.key\"\n [ngStyle]=\"context.element | elementStyle\"\n ></h4>\n</ng-template>\n<ng-template #headingFive let-context=\"context\" let-viewContext=\"viewContext\">\n <h5\n theDefaultElement\n [context]=\"context\"\n [viewContext]=\"viewContext\"\n [attr.id]=\"context.element.key\"\n [ngStyle]=\"context.element | elementStyle\"\n ></h5>\n</ng-template>\n<ng-template #headingSix let-context=\"context\" let-viewContext=\"viewContext\">\n <h6\n theDefaultElement\n [context]=\"context\"\n [viewContext]=\"viewContext\"\n [attr.id]=\"context.element.key\"\n [ngStyle]=\"context.element | elementStyle\"\n ></h6>\n</ng-template>\n", components: [{ type: TheDefaultElementComponent, selector: "[theDefaultElement]" }], directives: [{ type: i6__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], pipes: { "elementStyle": ElementStylePipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
13774
+ TheTemplateComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheTemplateComponent, selector: "the-template,[theTemplate]", viewQueries: [{ propertyName: "paragraphTemplate", first: true, predicate: ["paragraph"], descendants: true, read: i0.TemplateRef, static: true }, { propertyName: "headingOneTemplate", first: true, predicate: ["headingOne"], descendants: true, read: i0.TemplateRef, static: true }, { propertyName: "headingTwoTemplate", first: true, predicate: ["headingTwo"], descendants: true, read: i0.TemplateRef, static: true }, { propertyName: "headingThreeTemplate", first: true, predicate: ["headingThree"], descendants: true, read: i0.TemplateRef, static: true }, { propertyName: "headingFourTemplate", first: true, predicate: ["headingFour"], descendants: true, read: i0.TemplateRef, static: true }, { propertyName: "headingFiveTemplate", first: true, predicate: ["headingFive"], descendants: true, read: i0.TemplateRef, static: true }, { propertyName: "headingSixTemplate", first: true, predicate: ["headingSix"], descendants: true, read: i0.TemplateRef, static: true }], ngImport: i0__namespace, template: "<ng-template #paragraph let-context=\"context\" let-viewContext=\"viewContext\">\n <div theDefaultElement [context]=\"context\" [viewContext]=\"viewContext\" [ngStyle]=\"context.element | elementStyle\"></div>\n</ng-template>\n<ng-template #headingOne let-context=\"context\" let-viewContext=\"viewContext\">\n <h1\n theDefaultElement\n [context]=\"context\"\n [viewContext]=\"viewContext\"\n [attr.id]=\"context.element.key\"\n [ngStyle]=\"context.element | elementStyle\"\n ></h1>\n</ng-template>\n<ng-template #headingTwo let-context=\"context\" let-viewContext=\"viewContext\">\n <h2\n theDefaultElement\n [context]=\"context\"\n [viewContext]=\"viewContext\"\n [attr.id]=\"context.element.key\"\n [ngStyle]=\"context.element | elementStyle\"\n ></h2>\n</ng-template>\n<ng-template #headingThree let-context=\"context\" let-viewContext=\"viewContext\">\n <h3\n theDefaultElement\n [context]=\"context\"\n [viewContext]=\"viewContext\"\n [attr.id]=\"context.element.key\"\n [ngStyle]=\"context.element | elementStyle\"\n ></h3>\n</ng-template>\n<ng-template #headingFour let-context=\"context\" let-viewContext=\"viewContext\">\n <h4\n theDefaultElement\n [context]=\"context\"\n [viewContext]=\"viewContext\"\n [attr.id]=\"context.element.key\"\n [ngStyle]=\"context.element | elementStyle\"\n ></h4>\n</ng-template>\n<ng-template #headingFive let-context=\"context\" let-viewContext=\"viewContext\">\n <h5\n theDefaultElement\n [context]=\"context\"\n [viewContext]=\"viewContext\"\n [attr.id]=\"context.element.key\"\n [ngStyle]=\"context.element | elementStyle\"\n ></h5>\n</ng-template>\n<ng-template #headingSix let-context=\"context\" let-viewContext=\"viewContext\">\n <h6\n theDefaultElement\n [context]=\"context\"\n [viewContext]=\"viewContext\"\n [attr.id]=\"context.element.key\"\n [ngStyle]=\"context.element | elementStyle\"\n ></h6>\n</ng-template>\n", components: [{ type: TheDefaultElementComponent, selector: "[theDefaultElement]" }], directives: [{ type: i10__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], pipes: { "elementStyle": ElementStylePipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
13180
13775
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheTemplateComponent, decorators: [{
13181
13776
  type: i0.Component,
13182
13777
  args: [{
@@ -13313,11 +13908,16 @@
13313
13908
  _this.onSlaDragStart = function (event) { };
13314
13909
  _this.onSlaDragOver = function (event) { };
13315
13910
  _this.onDrop = function (event) {
13316
- event.stopPropagation();
13911
+ if (_this.isDraging) {
13912
+ event.preventDefault();
13913
+ }
13317
13914
  _this.theOnDOMEvent.emit({
13318
13915
  nativeEvent: event
13319
13916
  });
13320
13917
  };
13918
+ _this.onDragChange = function (isDraging) {
13919
+ _this.isDraging = isDraging;
13920
+ };
13321
13921
  return _this;
13322
13922
  }
13323
13923
  Object.defineProperty(TheEditorComponent.prototype, "theGlobalToolbarInstance", {
@@ -13574,11 +14174,11 @@
13574
14174
  TheContextService,
13575
14175
  TheColorSelectService,
13576
14176
  {
13577
- provide: i4$2.NG_VALUE_ACCESSOR,
14177
+ provide: i4$1.NG_VALUE_ACCESSOR,
13578
14178
  useExisting: i0.forwardRef(function () { return TheEditorComponent; }),
13579
14179
  multi: true
13580
14180
  }
13581
- ], viewQueries: [{ propertyName: "templateInstance", first: true, predicate: ["templateInstance"], descendants: true, static: true }, { propertyName: "globalToolbarInstance", first: true, predicate: ["globalToolbar"], descendants: true }, { propertyName: "quickInsertInstance", first: true, predicate: ["quickInsert"], descendants: true, static: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0__namespace, template: "<the-toolbar\n *ngIf=\"!theOptions?.readonly && !theGlobalToolbar\"\n [ngClass]=\"{\n 'the-toolbar-disabled': theOptions?.disabled\n }\"\n #globalToolbar\n [editor]=\"editor\"\n [toolbarItems]=\"toolbarEntity.global\"\n [containerClass]=\"globalToolbarClass\"\n [align]=\"theOptions?.toolbar?.align\"\n></the-toolbar>\n\n<div\n class=\"the-editable-container\"\n [ngClass]=\"{\n 'the-editor-disabled': theOptions?.disabled,\n 'max-height': maxHeight\n }\"\n [ngStyle]=\"{ 'max-height': maxHeight }\"\n>\n <slate-editable\n class=\"the-editor-typo\"\n [editor]=\"editor\"\n [ngModel]=\"editorValue\"\n (ngModelChange)=\"valueChange($event)\"\n [decorate]=\"decorate\"\n [placeholder]=\"theOptions?.placeholder\"\n [placeholderDecorate]=\"theOptions?.placeholderDecorate ? theOptions?.placeholderDecorate : null\"\n [renderElement]=\"renderElement\"\n [renderText]=\"renderText\"\n [renderLeaf]=\"renderLeaf\"\n [readonly]=\"theOptions?.readonly || theOptions?.disabled\"\n [keydown]=\"onKeyDown\"\n [click]=\"onClick\"\n [paste]=\"onSlaPaste\"\n [beforeInput]=\"onSlaBeforeInput\"\n [blur]=\"onSlaBlur\"\n [focus]=\"onSlaFocus\"\n [copy]=\"onSlaCopy\"\n [cut]=\"onSlaCut\"\n [isStrictDecorate]=\"false\"\n [compositionStart]=\"onSlaCompositionStart\"\n [compositionEnd]=\"onSlaCompositionEnd\"\n [dragStart]=\"onSlaDragStart\"\n [dragOver]=\"onSlaDragOver\"\n [drop]=\"onDrop\"\n (mousedown)=\"mousedown($event)\"\n ></slate-editable>\n <the-inline-toolbar\n *ngIf=\"!theOptions?.readonly && theOptions?.inlineToobarVisible\"\n [editor]=\"editor\"\n [toolbarItems]=\"toolbarEntity.inline\"\n ></the-inline-toolbar>\n <div\n #quickInsert\n theQuickInsert\n [editor]=\"editor\"\n [quickToolbarItems]=\"quickToolbarItems\"\n [isVisible]=\"theOptions?.quickInsertVisible\"\n ></div>\n <the-template #templateInstance></the-template>\n</div>\n", components: [{ type: TheToolbarComponent, selector: "the-toolbar", inputs: ["editor", "toolbarItems", "align", "containerClass", "isMore", "afterTemplate"] }, { type: i1__namespace.SlateEditableComponent, selector: "slate-editable", inputs: ["editor", "renderElement", "renderLeaf", "renderText", "decorate", "placeholderDecorate", "isStrictDecorate", "trackBy", "readonly", "placeholder", "beforeInput", "blur", "click", "compositionEnd", "compositionStart", "copy", "cut", "dragOver", "dragStart", "dragEnd", "drop", "focus", "keydown", "paste", "spellCheck", "autoCorrect", "autoCapitalize"] }, { type: TheInlineToolbarComponent, selector: "the-inline-toolbar", inputs: ["editor", "toolbarItems"] }, { type: TheQuickInsertComponent, selector: "[theQuickInsert]", inputs: ["editor", "quickToolbarItems", "isVisible"] }, { type: TheTemplateComponent, selector: "the-template,[theTemplate]" }], directives: [{ type: 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"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
14181
+ ], viewQueries: [{ propertyName: "templateInstance", first: true, predicate: ["templateInstance"], descendants: true, static: true }, { propertyName: "globalToolbarInstance", first: true, predicate: ["globalToolbar"], descendants: true }, { propertyName: "quickInsertInstance", first: true, predicate: ["quickInsert"], descendants: true, static: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0__namespace, template: "<the-toolbar\n *ngIf=\"!theOptions?.readonly && !theGlobalToolbar\"\n [ngClass]=\"{\n 'the-toolbar-disabled': theOptions?.disabled\n }\"\n #globalToolbar\n [editor]=\"editor\"\n [toolbarItems]=\"toolbarEntity.global\"\n [containerClass]=\"globalToolbarClass\"\n [align]=\"theOptions?.toolbar?.align\"\n></the-toolbar>\n\n<div\n class=\"the-editable-container\"\n [ngClass]=\"{\n 'the-editor-disabled': theOptions?.disabled,\n 'max-height': maxHeight\n }\"\n [ngStyle]=\"{ 'max-height': maxHeight }\"\n>\n <slate-editable\n class=\"the-editor-typo\"\n [editor]=\"editor\"\n [ngModel]=\"editorValue\"\n (ngModelChange)=\"valueChange($event)\"\n [decorate]=\"decorate\"\n [placeholder]=\"theOptions?.placeholder\"\n [placeholderDecorate]=\"theOptions?.placeholderDecorate ? theOptions?.placeholderDecorate : null\"\n [renderElement]=\"renderElement\"\n [renderText]=\"renderText\"\n [renderLeaf]=\"renderLeaf\"\n [readonly]=\"theOptions?.readonly || theOptions?.disabled\"\n [keydown]=\"onKeyDown\"\n [click]=\"onClick\"\n [paste]=\"onSlaPaste\"\n [beforeInput]=\"onSlaBeforeInput\"\n [blur]=\"onSlaBlur\"\n [focus]=\"onSlaFocus\"\n [copy]=\"onSlaCopy\"\n [cut]=\"onSlaCut\"\n [isStrictDecorate]=\"false\"\n [compositionStart]=\"onSlaCompositionStart\"\n [compositionEnd]=\"onSlaCompositionEnd\"\n [dragStart]=\"onSlaDragStart\"\n [dragOver]=\"onSlaDragOver\"\n [drop]=\"onDrop\"\n (mousedown)=\"mousedown($event)\"\n ></slate-editable>\n <the-inline-toolbar\n *ngIf=\"!theOptions?.readonly && theOptions?.inlineToobarVisible\"\n [editor]=\"editor\"\n [toolbarItems]=\"toolbarEntity.inline\"\n ></the-inline-toolbar>\n <div\n #quickInsert\n theQuickInsert\n [editor]=\"editor\"\n [quickToolbarItems]=\"quickToolbarItems\"\n [isVisible]=\"theOptions?.quickInsertVisible\"\n ></div>\n <div class=\"drag-container\">\n <div #drag theDnd [editor]=\"editor\" (dragChange)=\"onDragChange($event)\"></div>\n <div class=\"drag-snapshot-container\"></div>\n </div>\n <the-template #templateInstance></the-template>\n</div>\n", components: [{ type: TheToolbarComponent, selector: "the-toolbar", inputs: ["editor", "toolbarItems", "align", "containerClass", "isMore", "afterTemplate"] }, { type: i1__namespace.SlateEditableComponent, selector: "slate-editable", inputs: ["editor", "renderElement", "renderLeaf", "renderText", "decorate", "placeholderDecorate", "isStrictDecorate", "trackBy", "readonly", "placeholder", "beforeInput", "blur", "click", "compositionEnd", "compositionStart", "copy", "cut", "dragOver", "dragStart", "dragEnd", "drop", "focus", "keydown", "paste", "spellCheck", "autoCorrect", "autoCapitalize"] }, { type: TheInlineToolbarComponent, selector: "the-inline-toolbar", inputs: ["editor", "toolbarItems"] }, { type: TheQuickInsertComponent, selector: "[theQuickInsert]", inputs: ["editor", "quickToolbarItems", "isVisible"] }, { type: TheDndComponent, selector: "[theDnd]", inputs: ["editor"], outputs: ["dragChange"] }, { type: TheTemplateComponent, selector: "the-template,[theTemplate]" }], directives: [{ type: i10__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i10__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i10__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i4__namespace$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4__namespace$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
13582
14182
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheEditorComponent, decorators: [{
13583
14183
  type: i0.Component,
13584
14184
  args: [{
@@ -13590,7 +14190,7 @@
13590
14190
  TheContextService,
13591
14191
  TheColorSelectService,
13592
14192
  {
13593
- provide: i4$2.NG_VALUE_ACCESSOR,
14193
+ provide: i4$1.NG_VALUE_ACCESSOR,
13594
14194
  useExisting: i0.forwardRef(function () { return TheEditorComponent; }),
13595
14195
  multi: true
13596
14196
  }
@@ -13757,7 +14357,7 @@
13757
14357
  return TheToolbarGroupComponent;
13758
14358
  }());
13759
14359
  TheToolbarGroupComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheToolbarGroupComponent, deps: [{ token: i0__namespace.ElementRef }, { token: i1__namespace$3.ThyPopover }, { token: i0__namespace.ViewContainerRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
13760
- TheToolbarGroupComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheToolbarGroupComponent, selector: "the-toolbar-group", inputs: { menus: "menus", item: "item" }, host: { listeners: { "mousedown": "mousedownHandler($event)", "click": "clickHandle($event)" }, classAttribute: "the-toolbar-group" }, viewQueries: [{ propertyName: "groupTemplate", first: true, predicate: ["groupTemplate"], descendants: true, read: i0.TemplateRef, static: true }], ngImport: i0__namespace, template: "<a thyIconNavLink [thyIconNavLinkIcon]=\"item.icon\" [thyTooltip]=\"item?.name\" thyTooltipPlacement=\"top\" [thyIconNavLinkActive]=\"active\"></a>\n\n<ng-template #groupTemplate>\n <the-toolbar class=\"group\" [editor]=\"editor\" [toolbarItems]=\"menus\" [isMore]=\"false\"></the-toolbar>\n</ng-template>\n", components: [{ type: i3__namespace.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: TheToolbarComponent, selector: "the-toolbar", inputs: ["editor", "toolbarItems", "align", "containerClass", "isMore", "afterTemplate"] }], directives: [{ type: i5__namespace$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }] });
14360
+ TheToolbarGroupComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheToolbarGroupComponent, selector: "the-toolbar-group", inputs: { menus: "menus", item: "item" }, host: { listeners: { "mousedown": "mousedownHandler($event)", "click": "clickHandle($event)" }, classAttribute: "the-toolbar-group" }, viewQueries: [{ propertyName: "groupTemplate", first: true, predicate: ["groupTemplate"], descendants: true, read: i0.TemplateRef, static: true }], ngImport: i0__namespace, template: "<a thyIconNavLink [thyIconNavLinkIcon]=\"item.icon\" [thyTooltip]=\"item?.name\" thyTooltipPlacement=\"top\" [thyIconNavLinkActive]=\"active\"></a>\n\n<ng-template #groupTemplate>\n <the-toolbar class=\"group\" [editor]=\"editor\" [toolbarItems]=\"menus\" [isMore]=\"false\"></the-toolbar>\n</ng-template>\n", components: [{ type: i3__namespace.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: TheToolbarComponent, selector: "the-toolbar", inputs: ["editor", "toolbarItems", "align", "containerClass", "isMore", "afterTemplate"] }], directives: [{ type: i5__namespace.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }] });
13761
14361
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheToolbarGroupComponent, decorators: [{
13762
14362
  type: i0.Component,
13763
14363
  args: [{
@@ -13783,17 +14383,17 @@
13783
14383
  }] } });
13784
14384
 
13785
14385
  var TETHYS = [
13786
- i4$1.ThyIconModule,
14386
+ i4.ThyIconModule,
13787
14387
  avatar.ThyAvatarModule,
13788
14388
  i3.ThyNavModule,
13789
14389
  i2$1.ThyFormModule,
13790
14390
  i5$3.ThySharedModule,
13791
14391
  i2$2.ThyListModule,
13792
- i5$1.ThyTooltipModule,
13793
- i4.ThyProgressModule,
14392
+ i5.ThyTooltipModule,
14393
+ i6.ThyProgressModule,
13794
14394
  autocomplete.ThyAutocompleteModule,
13795
14395
  i5$2.ThyActionMenuModule,
13796
- i5.ThyInputModule,
14396
+ i5$1.ThyInputModule,
13797
14397
  select.ThySelectModule,
13798
14398
  i1$5.ThyButtonModule,
13799
14399
  i1$4.ThyNotifyModule,
@@ -13840,7 +14440,8 @@
13840
14440
  TheTableComponent,
13841
14441
  TheTableRowComponent,
13842
14442
  TheTdComponent,
13843
- TheInlineCodeComponent
14443
+ TheInlineCodeComponent,
14444
+ TheDndComponent
13844
14445
  ];
13845
14446
  var PIPES = [ElementStylePipe, ElementClassPipe];
13846
14447
  var TheEditorModule = /** @class */ (function () {
@@ -13884,17 +14485,18 @@
13884
14485
  TheTableComponent,
13885
14486
  TheTableRowComponent,
13886
14487
  TheTdComponent,
13887
- TheInlineCodeComponent], imports: [i6.CommonModule, i1.SlateModule, i4$2.FormsModule, i4$1.ThyIconModule,
14488
+ TheInlineCodeComponent,
14489
+ TheDndComponent], imports: [i10.CommonModule, i1.SlateModule, i4$1.FormsModule, i4.ThyIconModule,
13888
14490
  avatar.ThyAvatarModule,
13889
14491
  i3.ThyNavModule,
13890
14492
  i2$1.ThyFormModule,
13891
14493
  i5$3.ThySharedModule,
13892
14494
  i2$2.ThyListModule,
13893
- i5$1.ThyTooltipModule,
13894
- i4.ThyProgressModule,
14495
+ i5.ThyTooltipModule,
14496
+ i6.ThyProgressModule,
13895
14497
  autocomplete.ThyAutocompleteModule,
13896
14498
  i5$2.ThyActionMenuModule,
13897
- i5.ThyInputModule,
14499
+ i5$1.ThyInputModule,
13898
14500
  select.ThySelectModule,
13899
14501
  i1$5.ThyButtonModule,
13900
14502
  i1$4.ThyNotifyModule,
@@ -13907,12 +14509,12 @@
13907
14509
  useValue: TheToolbarGroupComponent
13908
14510
  },
13909
14511
  THE_CODE_MODE_PROVIDER
13910
- ], imports: [__spreadArray(__spreadArray([i6.CommonModule, i1.SlateModule, i4$2.FormsModule], __read(TETHYS)), [i8.CodemirrorModule, TheColumnSizeModule])] });
14512
+ ], imports: [__spreadArray(__spreadArray([i10.CommonModule, i1.SlateModule, i4$1.FormsModule], __read(TETHYS)), [i8.CodemirrorModule, TheColumnSizeModule])] });
13911
14513
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheEditorModule, decorators: [{
13912
14514
  type: i0.NgModule,
13913
14515
  args: [{
13914
14516
  declarations: __spreadArray(__spreadArray(__spreadArray([TheEditorComponent], __read(PIPES)), __read(COMPONENTS)), __read(PLUGIN_COMPONENTS)),
13915
- imports: __spreadArray(__spreadArray([i6.CommonModule, i1.SlateModule, i4$2.FormsModule], __read(TETHYS)), [i8.CodemirrorModule, TheColumnSizeModule]),
14517
+ imports: __spreadArray(__spreadArray([i10.CommonModule, i1.SlateModule, i4$1.FormsModule], __read(TETHYS)), [i8.CodemirrorModule, TheColumnSizeModule]),
13916
14518
  exports: [TheEditorComponent, TheToolbarComponent, TheToolbarDropdownComponent, TheToolbarItemComponent, TheDefaultElementComponent],
13917
14519
  entryComponents: __spreadArray(__spreadArray([], __read(COMPONENTS)), __read(PLUGIN_COMPONENTS)),
13918
14520
  providers: [
@@ -13949,6 +14551,7 @@
13949
14551
  exports.ColorEditor = ColorEditor;
13950
14552
  exports.DEFAULT_LANGUAGE = DEFAULT_LANGUAGE;
13951
14553
  exports.DEFAULT_SCROLL_CONTAINER = DEFAULT_SCROLL_CONTAINER;
14554
+ exports.DROP_THUMB_LINE = DROP_THUMB_LINE;
13952
14555
  exports.DefaultElementOptions = DefaultElementOptions;
13953
14556
  exports.DefaultGlobalToolbarDefinition = DefaultGlobalToolbarDefinition;
13954
14557
  exports.DefaultInlineToolbarDefinition = DefaultInlineToolbarDefinition;