@worktile/theia 1.2.13 → 1.2.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/bundles/worktile-theia.umd.js +518 -179
  2. package/bundles/worktile-theia.umd.js.map +1 -1
  3. package/constants/code.d.ts +3 -3
  4. package/constants/default.d.ts +0 -1
  5. package/constants/node-types.d.ts +2 -1
  6. package/custom-types.d.ts +3 -1
  7. package/editor.module.d.ts +43 -39
  8. package/esm2015/components/text/text.component.js +7 -2
  9. package/esm2015/components/toolbar-item/toolbar-item.component.js +7 -3
  10. package/esm2015/constants/code.js +2 -2
  11. package/esm2015/constants/default.js +1 -2
  12. package/esm2015/constants/node-types.js +4 -2
  13. package/esm2015/constants/toolbar.js +2 -1
  14. package/esm2015/custom-types.js +1 -1
  15. package/esm2015/editor.component.js +5 -3
  16. package/esm2015/editor.module.js +14 -5
  17. package/esm2015/interfaces/editor.js +1 -1
  18. package/esm2015/interfaces/toolbar.js +1 -1
  19. package/esm2015/plugins/code/code.component.js +79 -33
  20. package/esm2015/plugins/code/code.editor.js +3 -9
  21. package/esm2015/plugins/common/block-card.plugin.js +51 -5
  22. package/esm2015/plugins/deserializers/deserialize-html.plugin.js +7 -1
  23. package/esm2015/plugins/deserializers/deserialize-md.plugin.js +7 -2
  24. package/esm2015/plugins/font-size/options.js +11 -0
  25. package/esm2015/plugins/font-size/toolbar-item.component.js +129 -0
  26. package/esm2015/plugins/index.js +16 -2
  27. package/esm2015/plugins/mark/options.js +6 -1
  28. package/esm2015/plugins/paint-format/options.js +4 -1
  29. package/esm2015/plugins/placeholder/placeholder.component.js +10 -6
  30. package/esm2015/plugins/soft-break/soft-break.plugin.js +18 -0
  31. package/esm2015/plugins/soft-break/soft-break.types.js +2 -0
  32. package/esm2015/plugins/table/table.editor.js +10 -2
  33. package/esm2015/plugins/table/table.plugin.js +53 -19
  34. package/esm2015/plugins/table/utils/calc-span.js +2 -2
  35. package/esm2015/plugins/table/utils/normalize-table.js +3 -3
  36. package/esm2015/plugins/table/utils/table-position.js +5 -2
  37. package/esm2015/queries/is-empty-content.js +2 -2
  38. package/esm2015/queries/is-empty-paragraph.js +6 -2
  39. package/esm2015/utils/common.js +3 -0
  40. package/esm2015/utils/index.js +2 -1
  41. package/fesm2015/worktile-theia.js +474 -144
  42. package/fesm2015/worktile-theia.js.map +1 -1
  43. package/interfaces/editor.d.ts +2 -0
  44. package/interfaces/toolbar.d.ts +1 -0
  45. package/package.json +1 -1
  46. package/plugins/code/code.component.d.ts +17 -5
  47. package/plugins/code/code.component.scss +46 -7
  48. package/plugins/code/code.editor.d.ts +3 -2
  49. package/plugins/font-size/options.d.ts +3 -0
  50. package/plugins/font-size/toolbar-item.component.d.ts +35 -0
  51. package/plugins/font-size/toolbar-item.component.scss +13 -0
  52. package/plugins/image/image.component.scss +172 -168
  53. package/plugins/placeholder/placeholder.component.d.ts +3 -2
  54. package/plugins/soft-break/soft-break.plugin.d.ts +4 -0
  55. package/plugins/soft-break/soft-break.types.d.ts +8 -0
  56. package/plugins/table/table.editor.d.ts +2 -0
  57. package/plugins/table/utils/calc-span.d.ts +1 -1
  58. package/queries/get-selection-marks.d.ts +1 -0
  59. package/styles/editor.scss +6 -0
  60. package/styles/index.scss +1 -0
  61. package/styles/typo.scss +13 -25
  62. package/transforms/set-marks.d.ts +1 -0
  63. package/utils/common.d.ts +2 -0
  64. package/utils/index.d.ts +1 -0
@@ -8,7 +8,7 @@ import * as i1 from 'slate-angular';
8
8
  import { BaseTextComponent, BaseElementComponent, AngularEditor, NODE_TO_PARENT, NODE_TO_INDEX, IS_SAFARI, hotkeys, getPlainText as getPlainText$1, hasBlockCard, isCardLeft, FAKE_RIGHT_BLOCK_CARD_OFFSET, ELEMENT_TO_COMPONENT, EDITOR_TO_ELEMENT, isComponentType, withAngular, SlateModule } from 'slate-angular';
9
9
  import { mixinUnsubscribe, MixinBase } from 'ngx-tethys/core';
10
10
  import isHotkey from 'is-hotkey';
11
- import { Element as Element$1, Editor, Range, Node, Span, Path, Text, Point, Transforms, createEditor } from 'slate';
11
+ import { Element as Element$1, Editor, Range, Node, Span, Path, Text, Point, Transforms, Operation, createEditor } from 'slate';
12
12
  import { HistoryEditor, withHistory } from 'slate-history';
13
13
  import { __rest, __awaiter } from 'tslib';
14
14
  import * as _lodash from 'lodash';
@@ -16,7 +16,7 @@ import marked from 'marked';
16
16
  import { TheiaConverter } from '@atinc/selene';
17
17
  import * as i1$3 from 'ngx-tethys/popover';
18
18
  import { ThyPopover } from 'ngx-tethys/popover';
19
- import * as i2$1 from '@angular/cdk/overlay';
19
+ import * as i2 from '@angular/cdk/overlay';
20
20
  import { Overlay, OverlayModule } from '@angular/cdk/overlay';
21
21
  import * as i1$1 from 'ngx-tethys/alert';
22
22
  import { ThyAlertModule } from 'ngx-tethys/alert';
@@ -30,27 +30,31 @@ import * as i4$1 from 'ngx-tethys/icon';
30
30
  import { ThyIconModule } from 'ngx-tethys/icon';
31
31
  import * as i5 from 'ngx-tethys/input';
32
32
  import { ThyInputModule } from 'ngx-tethys/input';
33
- import * as i2 from 'ngx-tethys/nav';
33
+ import * as i3 from 'ngx-tethys/nav';
34
34
  import { ThyNavModule } from 'ngx-tethys/nav';
35
- import * as i7 from 'ngx-tethys/tooltip';
35
+ import * as i5$1 from 'ngx-tethys/tooltip';
36
36
  import { ThyTooltipModule } from 'ngx-tethys/tooltip';
37
- import * as i5$2 from 'ng-codemirror';
37
+ import * as i7 from 'ng-codemirror';
38
38
  import { CodeMirrorComponent, CodemirrorModule } from 'ng-codemirror';
39
39
  import * as i1$4 from 'ngx-tethys/notify';
40
40
  import { ThyNotifyModule } from 'ngx-tethys/notify';
41
- import * as i5$1 from 'ngx-tethys/action-menu';
41
+ import * as i5$2 from 'ngx-tethys/action-menu';
42
42
  import { ThyActionMenuModule } from 'ngx-tethys/action-menu';
43
+ import * as i5$3 from 'ngx-tethys/switch';
44
+ import { ThySwitchModule } from 'ngx-tethys/switch';
45
+ import * as i8 from 'ngx-tethys/resizable';
46
+ import { ThyResizableModule } from 'ngx-tethys/resizable';
43
47
  import isUrl from 'is-url';
44
48
  import * as i1$5 from 'ngx-tethys/button';
45
49
  import { ThyButtonModule } from 'ngx-tethys/button';
46
- import * as i2$2 from 'ngx-tethys/form';
50
+ import * as i2$1 from 'ngx-tethys/form';
47
51
  import { ThyFormModule } from 'ngx-tethys/form';
48
- import * as i5$3 from 'ngx-tethys/shared';
52
+ import * as i5$4 from 'ngx-tethys/shared';
49
53
  import { ThySharedModule } from 'ngx-tethys/shared';
50
54
  import * as i1$6 from 'ngx-tethys';
51
55
  import { coerceCssPixelValue } from '@angular/cdk/coercion';
52
56
  import { PortalInjector, ComponentPortal } from '@angular/cdk/portal';
53
- import * as i2$3 from 'ngx-tethys/list';
57
+ import * as i2$2 from 'ngx-tethys/list';
54
58
  import { ThyListModule } from 'ngx-tethys/list';
55
59
  import { ThyAutocompleteModule } from 'ngx-tethys/autocomplete';
56
60
  import { ThyAvatarModule } from 'ngx-tethys/avatar';
@@ -64,7 +68,6 @@ const TAB_SPACE = ' ';
64
68
  const ZERO_WIDTH_CHAR = '\u200B';
65
69
  const CLIPBOARD_FORMAT_KEY = 'x-theia-fragment';
66
70
  const DEFAULT_SCROLL_CONTAINER = '.the-editable-container';
67
- const BLOCK_INSERT_ORIGIN = 'block-insert';
68
71
  const ELEMENT_UNIQUE_ID = 'key';
69
72
  var TheMode;
70
73
  (function (TheMode) {
@@ -118,6 +121,7 @@ var MarkTypes;
118
121
  MarkTypes["color"] = "color";
119
122
  MarkTypes["backgroundColor"] = "background-color";
120
123
  MarkTypes["codeLine"] = "code-line";
124
+ MarkTypes["fontSize"] = "font-size";
121
125
  })(MarkTypes || (MarkTypes = {}));
122
126
  var ToolbarActionTypes;
123
127
  (function (ToolbarActionTypes) {
@@ -146,7 +150,8 @@ const MarkProps = [
146
150
  MarkTypes.color,
147
151
  MarkTypes.italic,
148
152
  MarkTypes.strike,
149
- MarkTypes.underline
153
+ MarkTypes.underline,
154
+ MarkTypes.fontSize
150
155
  ];
151
156
  const THE_INLINE_TOOLBAR_TYPES = [ElementKinds.default, ElementKinds.listItem, ElementKinds.checkItem];
152
157
  const STANDARD_HEADING_TYPES = [
@@ -176,6 +181,7 @@ var ToolbarItemMode;
176
181
  })(ToolbarItemMode || (ToolbarItemMode = {}));
177
182
  const DefaultGlobalToolbarDefinition = [
178
183
  ElementKinds.headingList,
184
+ MarkTypes.fontSize,
179
185
  ToolbarActionTypes.split,
180
186
  MarkTypes.bold,
181
187
  MarkTypes.italic,
@@ -310,7 +316,7 @@ const CodeMode = {
310
316
  default: 'default',
311
317
  print: 'print'
312
318
  };
313
- class TheCodeMode {
319
+ class TheCodeConfig {
314
320
  }
315
321
  const THE_CODE_MODE_TOKEN = new InjectionToken('the-code-mode');
316
322
  const THE_CODE_MODE_PROVIDER = {
@@ -326,7 +332,7 @@ class TheTextComponent extends BaseTextComponent {
326
332
  super(elementRef, cdr);
327
333
  this.elementRef = elementRef;
328
334
  this.renderer2 = renderer2;
329
- this.excludes = ['color', 'background-color', 'text'];
335
+ this.excludes = ['color', 'font-size', 'background-color', 'text'];
330
336
  this.attributes = [];
331
337
  }
332
338
  applyTextMark() {
@@ -341,6 +347,11 @@ class TheTextComponent extends BaseTextComponent {
341
347
  this.attributes.push(attr);
342
348
  }
343
349
  }
350
+ const fontSize = this.text[MarkTypes.fontSize];
351
+ if (fontSize) {
352
+ const attr = `the-${MarkTypes.fontSize}`;
353
+ this.renderer2.setAttribute(this.elementRef.nativeElement, attr, fontSize);
354
+ }
344
355
  if (this.text[MarkTypes.color]) {
345
356
  this.renderer2.setStyle(this.elementRef.nativeElement, 'color', this.text[MarkTypes.color]);
346
357
  }
@@ -500,7 +511,11 @@ const getAnchorBlockEntry = (editor, at) => {
500
511
  };
501
512
 
502
513
  const isEmptyParagraph = (editor, at) => {
503
- const [block] = getAnchorBlockEntry(editor, at);
514
+ const entry = getAnchorBlockEntry(editor, at);
515
+ if (!entry) {
516
+ return false;
517
+ }
518
+ const [block] = entry;
504
519
  return Editor.isEmpty(editor, block) && block.type === ElementKinds.paragraph;
505
520
  };
506
521
 
@@ -1145,7 +1160,7 @@ const isEmptyContent = (children) => {
1145
1160
  }
1146
1161
  if (children && children.length === 1) {
1147
1162
  const firstNode = children[0];
1148
- if (firstNode.type === ElementKinds.default && !Node.string(firstNode)) {
1163
+ if (firstNode.type === ElementKinds.default && firstNode.children.length === 1 && !Node.string(firstNode)) {
1149
1164
  return true;
1150
1165
  }
1151
1166
  }
@@ -1957,6 +1972,9 @@ const getToolbarClass = (editor) => {
1957
1972
  return `the-toolbar-${uuid}`;
1958
1973
  };
1959
1974
 
1975
+ const IS_MAC = typeof window != 'undefined' && /Mac|iPod|iPhone|iPad/.test(window.navigator.platform);
1976
+ const CONTROL_KEY = IS_MAC ? '⌘' : 'Ctrl';
1977
+
1960
1978
  const withDeserializeMd = (options) => (editor) => {
1961
1979
  const { insertData, onKeydown } = editor;
1962
1980
  editor.onKeydown = (event) => {
@@ -1997,8 +2015,13 @@ const withDeserializeMd = (options) => (editor) => {
1997
2015
  });
1998
2016
  return;
1999
2017
  }
2018
+ else {
2019
+ closeConversionHint(editor);
2020
+ }
2021
+ }
2022
+ catch (error) {
2023
+ closeConversionHint(editor);
2000
2024
  }
2001
- catch (error) { }
2002
2025
  }
2003
2026
  },
2004
2027
  origin,
@@ -4197,20 +4220,66 @@ const withBlockCard = (editor) => {
4197
4220
  // block card cursor
4198
4221
  if (anchorNode && hasBlockCard(domSelection)) {
4199
4222
  const isCardLeftCursor = isCardLeft(anchorNode);
4200
- // + left-block-card 或者 → + right-block-card
4201
- if ((isMoveDown && isCardLeftCursor) || (isMoveForward && !isCardLeftCursor)) {
4223
+ if (isMoveUp) {
4224
+ const [, path] = AngularEditor.toSlateCardEntry(editor, anchorNode);
4225
+ const previousPath = Path.hasPrevious(path) && Path.previous(path);
4226
+ const previousNode = previousPath && getNode(editor, previousPath);
4227
+ if (previousNode && editor.isBlockCard(previousNode)) {
4228
+ AngularEditor.moveBlockCard(editor, previousNode, { direction: isCardLeftCursor ? 'left' : 'right' });
4229
+ }
4230
+ else {
4231
+ const before = Editor.before(editor, path);
4232
+ if (before) {
4233
+ Transforms.select(editor, before);
4234
+ }
4235
+ }
4236
+ nativeEvent.preventDefault();
4237
+ return;
4238
+ }
4239
+ if (isMoveDown) {
4240
+ const [, path] = AngularEditor.toSlateCardEntry(editor, anchorNode);
4241
+ const nextPath = Path.next(path);
4242
+ const nextNode = getNode(editor, nextPath);
4243
+ if (nextNode && editor.isBlockCard(nextNode)) {
4244
+ AngularEditor.moveBlockCard(editor, nextNode, { direction: isCardLeftCursor ? 'left' : 'right' });
4245
+ }
4246
+ else {
4247
+ const after = Editor.after(editor, path);
4248
+ if (after) {
4249
+ Transforms.select(editor, Editor.after(editor, path));
4250
+ }
4251
+ }
4252
+ nativeEvent.preventDefault();
4253
+ return;
4254
+ }
4255
+ // → + right-block-card
4256
+ if ((isMoveForward && !isCardLeftCursor)) {
4202
4257
  nativeEvent.preventDefault();
4203
4258
  const [, path] = AngularEditor.toSlateCardEntry(editor, anchorNode);
4259
+ const nextPath = Path.next(path);
4260
+ const nextNode = getNode(editor, nextPath);
4261
+ if (nextNode && editor.isBlockCard(nextNode)) {
4262
+ event.preventDefault();
4263
+ AngularEditor.moveBlockCard(editor, nextNode, { direction: 'left' });
4264
+ return;
4265
+ }
4204
4266
  const after = Editor.after(editor, path);
4205
4267
  if (after) {
4206
4268
  Transforms.select(editor, Editor.after(editor, path));
4207
4269
  }
4208
4270
  return;
4209
4271
  }
4210
- // ↑ + right-block-card 或者 ← + left-block-card
4211
- if ((isMoveUp && !isCardLeftCursor) || (isMoveBackward && isCardLeftCursor)) {
4272
+ // ← + left-block-card
4273
+ if (isMoveBackward && isCardLeftCursor) {
4212
4274
  nativeEvent.preventDefault();
4213
4275
  const [, path] = AngularEditor.toSlateCardEntry(editor, anchorNode);
4276
+ const previousPath = Path.hasPrevious(path) && Path.previous(path);
4277
+ const previousNode = previousPath && getNode(editor, previousPath);
4278
+ if (previousNode && editor.isBlockCard(previousNode)) {
4279
+ event.preventDefault();
4280
+ AngularEditor.moveBlockCard(editor, previousNode, { direction: 'right' });
4281
+ return;
4282
+ }
4214
4283
  const before = Editor.before(editor, path);
4215
4284
  if (before) {
4216
4285
  Transforms.select(editor, before);
@@ -4592,11 +4661,14 @@ class TablePosition {
4592
4661
  columnIndex++;
4593
4662
  nextCell = this.table.children[rowIndex].children[columnIndex];
4594
4663
  }
4595
- else {
4664
+ else if (rowIndex + 1 < this.getHeight()) {
4596
4665
  columnIndex = 0;
4597
4666
  rowIndex++;
4598
4667
  nextCell = this.table.children[rowIndex].children[columnIndex];
4599
4668
  }
4669
+ else {
4670
+ nextCell = null;
4671
+ }
4600
4672
  }
4601
4673
  return nextCell;
4602
4674
  }
@@ -4747,7 +4819,7 @@ function calcSpanForColumn(table, targetIndex) {
4747
4819
  return rowspans.some(rowspan => isInside(rowspan, rowIndx, targetIndex));
4748
4820
  });
4749
4821
  }
4750
- function calcOriginSpan(table, targetRowIndex, targetColumnIndex) {
4822
+ function getOriginCell(table, targetRowIndex, targetColumnIndex) {
4751
4823
  for (let rowIndex = 0; rowIndex <= targetRowIndex; rowIndex++) {
4752
4824
  const row = table.children[rowIndex];
4753
4825
  const originCell = row.children
@@ -5245,6 +5317,13 @@ const TableEditor = {
5245
5317
  isActiveHeader(editor) {
5246
5318
  const [tableRowEntry] = Editor.nodes(editor, { match: (n) => n.type === ElementKinds.tableRow });
5247
5319
  return tableRowEntry && tableRowEntry[0] && tableRowEntry[0].header;
5320
+ },
5321
+ selectOriginCell(editor, table, rowIndex, columnIndex, isStart) {
5322
+ const origin = getOriginCell(table, rowIndex, columnIndex);
5323
+ if (origin) {
5324
+ const path = AngularEditor.findPath(editor, origin);
5325
+ Transforms.select(editor, isStart ? Editor.start(editor, path) : Editor.end(editor, path));
5326
+ }
5248
5327
  }
5249
5328
  };
5250
5329
 
@@ -5280,6 +5359,7 @@ const MarkOptions = [
5280
5359
  key: MarkTypes.bold,
5281
5360
  icon: 'bold',
5282
5361
  name: '加粗',
5362
+ shortcutKey: `${CONTROL_KEY}+B`,
5283
5363
  execute: editor => MarkEditor.toggleMark(editor, MarkTypes.bold),
5284
5364
  active: editor => MarkEditor.isMarkActive(editor, MarkTypes.bold)
5285
5365
  },
@@ -5287,6 +5367,7 @@ const MarkOptions = [
5287
5367
  key: MarkTypes.italic,
5288
5368
  icon: 'italic',
5289
5369
  name: '斜体',
5370
+ shortcutKey: `${CONTROL_KEY}+I`,
5290
5371
  execute: editor => MarkEditor.toggleMark(editor, MarkTypes.italic),
5291
5372
  active: editor => MarkEditor.isMarkActive(editor, MarkTypes.italic)
5292
5373
  },
@@ -5301,6 +5382,7 @@ const MarkOptions = [
5301
5382
  key: MarkTypes.underline,
5302
5383
  icon: 'underline',
5303
5384
  name: '下划线',
5385
+ shortcutKey: `${CONTROL_KEY}+U`,
5304
5386
  execute: editor => MarkEditor.toggleMark(editor, MarkTypes.underline),
5305
5387
  active: editor => MarkEditor.isMarkActive(editor, MarkTypes.underline)
5306
5388
  },
@@ -5308,6 +5390,7 @@ const MarkOptions = [
5308
5390
  key: MarkTypes.codeLine,
5309
5391
  icon: 'code',
5310
5392
  name: '行内代码',
5393
+ shortcutKey: `${CONTROL_KEY}+E`,
5311
5394
  execute: editor => MarkEditor.toggleMark(editor, MarkTypes.codeLine),
5312
5395
  active: editor => MarkEditor.isMarkActive(editor, MarkTypes.codeLine)
5313
5396
  }
@@ -5919,7 +6002,7 @@ TheColorToolbarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12
5919
6002
  thyIconName="caret-down"
5920
6003
  ></thy-icon>
5921
6004
  </a>
5922
- `, isInline: true, components: [{ type: i2.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i4$1.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }], directives: [{ type: i6.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i7.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
6005
+ `, isInline: true, components: [{ type: i3.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i4$1.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }], directives: [{ type: i6.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i5$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
5923
6006
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TheColorToolbarItemComponent, decorators: [{
5924
6007
  type: Component,
5925
6008
  args: [{
@@ -6021,15 +6104,9 @@ const withRemoveVoid = (editor) => {
6021
6104
  };
6022
6105
 
6023
6106
  const CodeEditor = {
6024
- setLanguage(editor, language, element) {
6107
+ setCodeAttribute(editor, element, value) {
6025
6108
  const at = AngularEditor.findPath(editor, element);
6026
- Transforms.setNodes(editor, { language }, {
6027
- at
6028
- });
6029
- },
6030
- setCodeContent(editor, content, element) {
6031
- const at = AngularEditor.findPath(editor, element);
6032
- Transforms.setNodes(editor, { content }, {
6109
+ Transforms.setNodes(editor, value, {
6033
6110
  at
6034
6111
  });
6035
6112
  },
@@ -6194,8 +6271,8 @@ class TheToolbarDropdownComponent extends TheToolbarBaseItemComponent {
6194
6271
  .withPositions([bottomPosition, topPosition]);
6195
6272
  }
6196
6273
  }
6197
- TheToolbarDropdownComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TheToolbarDropdownComponent, deps: [{ token: i0.ElementRef }, { token: i1$3.ThyPopover }, { token: i0.ViewContainerRef }, { token: i2$1.Overlay }], target: i0.ɵɵFactoryTarget.Component });
6198
- TheToolbarDropdownComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheToolbarDropdownComponent, selector: "the-toolbar-dropdown", inputs: { toolbarItem: "toolbarItem", menus: "menus", mode: "mode", item: "item", itemMousedownHandle: "itemMousedownHandle" }, host: { listeners: { "mousedown": "toggleDropdown($event)", "document: mousedown": "handleDocumentMouseDown($event)" }, classAttribute: "the-toolbar-dropdown-container" }, viewQueries: [{ propertyName: "iconModeTemplate", first: true, predicate: ["iconModeTemplate"], descendants: true, static: true }, { propertyName: "textModeTemplate", first: true, predicate: ["textModeTemplate"], descendants: true, static: true }, { propertyName: "dropdownTemplate", first: true, predicate: ["dropdownTemplate"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<ng-template [ngTemplateOutlet]=\"template\"></ng-template>\n\n<ng-template #iconModeTemplate>\n <a thyIconNavLink class=\"icon-mode link-with-down\" [thyTooltip]=\"activeMenu?.name\" thyTooltipPlacement=\"top\">\n <thy-icon [thyIconName]=\"activeMenu?.icon\"></thy-icon>\n <thy-icon class=\"caret-down-icon font-size-sm text-desc\" thyIconName=\"caret-down\"></thy-icon>\n </a>\n</ng-template>\n\n<ng-template #textModeTemplate>\n <a thyIconNavLink class=\"text-mode\" [thyTooltip]=\"activeMenu?.name\" thyTooltipPlacement=\"top\">\n <span class=\"show-text\">{{ activeMenu?.name }}</span>\n <thy-icon class=\"text-caret-down-icon font-size-sm text-desc\" thyIconName=\"caret-down\"></thy-icon>\n </a>\n</ng-template>\n\n<ng-template #dropdownTemplate>\n <thy-action-menu class=\"dropdown\">\n <ng-container *ngFor=\"let menu of menus\">\n <a\n *ngIf=\"menu.key !== 'split'\"\n thyActionMenuItem\n href=\"javascript:;\"\n [thyActionMenuItemActive]=\"menu.key === activeMenu.key\"\n (mousedown)=\"itemMousedown($event, menu)\"\n [ngStyle]=\"menu?.styles\"\n >\n <span *ngIf=\"menu.icon && mode === dropdownMode.icon\" thyActionMenuItemIcon>\n <thy-icon [thyIconName]=\"menu.icon\"></thy-icon>\n </span>\n <span *ngIf=\"menu.name\" thyActionMenuItemName>{{ menu.name }}</span>\n </a>\n <thy-action-menu-divider *ngIf=\"menu.key === 'split'\"></thy-action-menu-divider>\n </ng-container>\n </thy-action-menu>\n</ng-template>\n", components: [{ type: i2.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i4$1.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { type: i5$1.ThyActionMenuComponent, selector: "thy-action-menu", inputs: ["thyTheme", "thyWidth"] }, { type: i5$1.ThyActionMenuDividerComponent, selector: "thy-action-menu-divider", inputs: ["thyTitle", "thyType"] }], directives: [{ type: i6.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i7.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5$1.ThyActionMenuItemDirective, selector: "[thyActionMenuItem]", inputs: ["thyDisabled", "thyType"] }, { type: i5$1.ThyActionMenuItemActiveDirective, selector: "[thyActionMenuItemActive]", inputs: ["thyActionMenuItemActive"] }, { type: i6.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i5$1.ThyActionMenuItemIconDirective, selector: "[thyActionMenuItemIcon]" }, { type: i5$1.ThyActionMenuItemNameDirective, selector: "[thyActionMenuItemName]" }] });
6274
+ TheToolbarDropdownComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TheToolbarDropdownComponent, deps: [{ token: i0.ElementRef }, { token: i1$3.ThyPopover }, { token: i0.ViewContainerRef }, { token: i2.Overlay }], target: i0.ɵɵFactoryTarget.Component });
6275
+ TheToolbarDropdownComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheToolbarDropdownComponent, selector: "the-toolbar-dropdown", inputs: { toolbarItem: "toolbarItem", menus: "menus", mode: "mode", item: "item", itemMousedownHandle: "itemMousedownHandle" }, host: { listeners: { "mousedown": "toggleDropdown($event)", "document: mousedown": "handleDocumentMouseDown($event)" }, classAttribute: "the-toolbar-dropdown-container" }, viewQueries: [{ propertyName: "iconModeTemplate", first: true, predicate: ["iconModeTemplate"], descendants: true, static: true }, { propertyName: "textModeTemplate", first: true, predicate: ["textModeTemplate"], descendants: true, static: true }, { propertyName: "dropdownTemplate", first: true, predicate: ["dropdownTemplate"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, 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.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i4$1.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { type: i5$2.ThyActionMenuComponent, selector: "thy-action-menu", inputs: ["thyTheme", "thyWidth"] }, { type: i5$2.ThyActionMenuDividerComponent, selector: "thy-action-menu-divider", inputs: ["thyTitle", "thyType"] }], directives: [{ type: i6.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i5$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5$2.ThyActionMenuItemDirective, selector: "[thyActionMenuItem]", inputs: ["thyDisabled", "thyType"] }, { type: i5$2.ThyActionMenuItemActiveDirective, selector: "[thyActionMenuItemActive]", inputs: ["thyActionMenuItemActive"] }, { type: i6.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i5$2.ThyActionMenuItemIconDirective, selector: "[thyActionMenuItemIcon]" }, { type: i5$2.ThyActionMenuItemNameDirective, selector: "[thyActionMenuItemName]" }] });
6199
6276
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TheToolbarDropdownComponent, decorators: [{
6200
6277
  type: Component,
6201
6278
  args: [{
@@ -6205,7 +6282,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImpor
6205
6282
  class: 'the-toolbar-dropdown-container'
6206
6283
  }
6207
6284
  }]
6208
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1$3.ThyPopover }, { type: i0.ViewContainerRef }, { type: i2$1.Overlay }]; }, propDecorators: { toolbarItem: [{
6285
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1$3.ThyPopover }, { type: i0.ViewContainerRef }, { type: i2.Overlay }]; }, propDecorators: { toolbarItem: [{
6209
6286
  type: Input
6210
6287
  }], menus: [{
6211
6288
  type: Input
@@ -6232,40 +6309,83 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImpor
6232
6309
  args: ['document: mousedown', ['$event']]
6233
6310
  }] } });
6234
6311
 
6312
+ class NavSplitLineComponent {
6313
+ constructor() {
6314
+ this.mode = ToolbarItemMode.vertical;
6315
+ this.theNavSplitLine = true;
6316
+ }
6317
+ get horizontal() {
6318
+ return this.mode === ToolbarItemMode.horizontal;
6319
+ }
6320
+ get vertical() {
6321
+ return this.mode === ToolbarItemMode.vertical;
6322
+ }
6323
+ ngOnInit() { }
6324
+ }
6325
+ NavSplitLineComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: NavSplitLineComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
6326
+ NavSplitLineComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: NavSplitLineComponent, selector: "nav-split-line", inputs: { mode: "mode" }, host: { properties: { "class.the-nav-split-line": "this.theNavSplitLine", "class.horizontal": "this.horizontal", "class.vertical": "this.vertical" } }, ngImport: i0, template: '', isInline: true });
6327
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: NavSplitLineComponent, decorators: [{
6328
+ type: Component,
6329
+ args: [{
6330
+ selector: 'nav-split-line',
6331
+ template: ''
6332
+ }]
6333
+ }], ctorParameters: function () { return []; }, propDecorators: { mode: [{
6334
+ type: Input
6335
+ }], theNavSplitLine: [{
6336
+ type: HostBinding,
6337
+ args: ['class.the-nav-split-line']
6338
+ }], horizontal: [{
6339
+ type: HostBinding,
6340
+ args: ['class.horizontal']
6341
+ }], vertical: [{
6342
+ type: HostBinding,
6343
+ args: ['class.vertical']
6344
+ }] } });
6345
+
6235
6346
  class TheCodeComponent extends TheBaseElementComponent {
6236
- constructor(elementRef, cdr, thyNotifyService, ngZone, mode) {
6347
+ constructor(elementRef, cdr, thyNotifyService, ngZone, config) {
6237
6348
  super(elementRef, cdr);
6238
6349
  this.elementRef = elementRef;
6239
6350
  this.cdr = cdr;
6240
6351
  this.thyNotifyService = thyNotifyService;
6241
6352
  this.ngZone = ngZone;
6242
- this.mode = mode;
6353
+ this.config = config;
6243
6354
  this.startRenderCodemirror = false;
6244
6355
  this.dropdownMode = DropdownMode;
6245
- this.maxHeight = this.mode === CodeMode.default ? 350 - CODEMIRROR_PADDING_TOP * 2 : 0;
6246
6356
  this.codeMirrorFocused = false;
6357
+ this.maxHeight = this.config.mode === CodeMode.default ? 350 - CODEMIRROR_PADDING_TOP * 2 : 0;
6247
6358
  this.menus = CODE_MODES.map(item => {
6248
6359
  return { key: item.value, name: item.showName };
6249
6360
  });
6361
+ this.ToolbarItemMode = ToolbarItemMode;
6362
+ this.isAutoWrap = false;
6363
+ this.isResizing = false;
6364
+ this.resizeHeight = null;
6250
6365
  this.options = {
6251
6366
  mode: this.menus[0].key,
6252
6367
  lineNumbers: false,
6253
6368
  readOnly: false,
6254
6369
  autofocus: false,
6255
6370
  lineWiseCopyCut: true,
6256
- lineWrapping: this.mode === CodeMode.default ? false : true,
6371
+ lineWrapping: this.config.mode === CodeMode.default ? false : true,
6257
6372
  cursorBlinkRate: 500
6258
6373
  };
6259
6374
  this.actives = this.menus[0];
6260
6375
  this.onChangeLangulage = item => {
6261
6376
  this.options = Object.assign(Object.assign({}, this.options), { mode: item.key });
6262
6377
  this.actives = item;
6263
- CodeEditor.setLanguage(this.editor, item.key, this.element);
6378
+ CodeEditor.setCodeAttribute(this.editor, this.element, { langulage: item.key });
6264
6379
  };
6265
6380
  }
6266
6381
  get code() {
6267
6382
  return this.element.content;
6268
6383
  }
6384
+ handleCodeMousedown(event) {
6385
+ if (!(event.target instanceof HTMLElement && this.elementRef.nativeElement.contains(event.target))) {
6386
+ this.codeMirrorFocused = false;
6387
+ }
6388
+ }
6269
6389
  onContextChange() {
6270
6390
  super.onContextChange();
6271
6391
  if (this.initialized) {
@@ -6275,6 +6395,9 @@ class TheCodeComponent extends TheBaseElementComponent {
6275
6395
  if (this.options.mode !== this.element.language) {
6276
6396
  this.useMode();
6277
6397
  }
6398
+ if (!this.readonly && this.isCollapsed) {
6399
+ this.initializeCodemirrorFocus();
6400
+ }
6278
6401
  }
6279
6402
  }
6280
6403
  ngOnInit() {
@@ -6294,9 +6417,15 @@ class TheCodeComponent extends TheBaseElementComponent {
6294
6417
  this.ngZone.onStable.pipe(take(1)).subscribe(() => {
6295
6418
  this.renderCodemirror();
6296
6419
  this.initializeCodemirrorFocus();
6420
+ this.useAutoWrap();
6421
+ this.useHeight();
6297
6422
  });
6298
6423
  }
6299
6424
  }
6425
+ focusChange(codeMirrorFocused) {
6426
+ if (codeMirrorFocused)
6427
+ this.codeMirrorFocused = codeMirrorFocused;
6428
+ }
6300
6429
  renderCodemirror() {
6301
6430
  this.startRenderCodemirror = true;
6302
6431
  this.useReadonly();
@@ -6304,7 +6433,7 @@ class TheCodeComponent extends TheBaseElementComponent {
6304
6433
  this.cdr.detectChanges();
6305
6434
  }
6306
6435
  initializeCodemirrorFocus() {
6307
- if (this.isCollapsed) {
6436
+ if (this.isCollapsed && !this.isResizing) {
6308
6437
  setTimeout(() => {
6309
6438
  if (this.isCollapsed && this.codemirror && this.codemirror.editor && !this.codemirror.editor.hasFocus()) {
6310
6439
  AngularEditor.blur(this.editor);
@@ -6315,13 +6444,11 @@ class TheCodeComponent extends TheBaseElementComponent {
6315
6444
  }
6316
6445
  }
6317
6446
  codeChange($event) {
6318
- CodeEditor.setCodeContent(this.editor, $event, this.element);
6319
- }
6320
- focusChange(codeMirrorFocused) {
6321
- this.codeMirrorFocused = codeMirrorFocused;
6447
+ CodeEditor.setCodeAttribute(this.editor, this.element, { content: $event });
6322
6448
  }
6323
6449
  onDelete(event) {
6324
6450
  event.preventDefault();
6451
+ this.codeMirrorFocused = false;
6325
6452
  deleteElement(this.editor, this.element);
6326
6453
  }
6327
6454
  onCopy(event) {
@@ -6332,40 +6459,67 @@ class TheCodeComponent extends TheBaseElementComponent {
6332
6459
  if (selection.rangeCount > 0) {
6333
6460
  selection.removeAllRanges();
6334
6461
  }
6335
- // focus the element
6336
- setTimeout(() => {
6337
- AngularEditor.focus(this.editor);
6338
- Transforms.select(this.editor, AngularEditor.findPath(this.editor, this.element));
6339
- });
6340
- // copy the element
6341
- setTimeout(() => {
6342
- document.execCommand('copy');
6343
- this.thyNotifyService.success('复制成功');
6344
- }, 200);
6462
+ AngularEditor.focus(this.editor);
6463
+ Transforms.select(this.editor, AngularEditor.findPath(this.editor, this.element));
6464
+ document.execCommand('copy');
6465
+ this.thyNotifyService.success('复制成功');
6466
+ AngularEditor.deselect(this.editor);
6467
+ this.codeMirrorFocused = false;
6345
6468
  }
6346
6469
  useMode() {
6347
6470
  this.options = Object.assign(Object.assign({}, this.options), { mode: this.element.language });
6348
6471
  this.actives = this.menus.find(i => i.key === this.element.language);
6349
6472
  }
6473
+ useAutoWrap() {
6474
+ if (this.element.autoWrap) {
6475
+ this.isAutoWrap = this.element.autoWrap;
6476
+ this.codemirror.setOptionIfChanged('lineWrapping', this.element.autoWrap);
6477
+ }
6478
+ }
6479
+ useHeight() {
6480
+ if (this.element.height) {
6481
+ this.resizeHeight = this.element.height;
6482
+ this.maxHeight = this.element.height;
6483
+ }
6484
+ }
6350
6485
  useReadonly() {
6351
6486
  this.options = Object.assign(Object.assign({}, this.options), { readOnly: this.readonly, cursorBlinkRate: this.readonly ? -1 : 500 });
6352
6487
  }
6488
+ onResize({ height }) {
6489
+ this.resizeHeight = height;
6490
+ Transforms.select(this.editor, AngularEditor.findPath(this.editor, this.element));
6491
+ CodeEditor.setCodeAttribute(this.editor, this.element, { height });
6492
+ this.maxHeight = height;
6493
+ }
6494
+ onStartResize() {
6495
+ this.isResizing = true;
6496
+ }
6497
+ onEndResize() {
6498
+ this.isResizing = false;
6499
+ }
6500
+ onChangeWrap(value) {
6501
+ AngularEditor.deselect(this.editor);
6502
+ this.codemirror.setOptionIfChanged('lineWrapping', value);
6503
+ CodeEditor.setCodeAttribute(this.editor, this.element, { autoWrap: value ? value : null });
6504
+ }
6353
6505
  }
6354
6506
  TheCodeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TheCodeComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i1$4.ThyNotifyService }, { token: i0.NgZone }, { token: THE_CODE_MODE_TOKEN }], target: i0.ɵɵFactoryTarget.Component });
6355
- TheCodeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheCodeComponent, selector: "div[theCode]", viewQueries: [{ propertyName: "codemirror", first: true, predicate: ["codemirror"], descendants: true, read: CodeMirrorComponent }], usesInheritance: true, ngImport: i0, template: "<div contenteditable=\"false\" class=\"the-block-operation\" *ngIf=\"codeMirrorFocused && !options.readOnly\">\n <thy-icon-nav>\n <the-toolbar-dropdown [menus]=\"menus\" [item]=\"actives\" [itemMousedownHandle]=\"onChangeLangulage\"></the-toolbar-dropdown>\n <a\n href=\"javascript:;\"\n thyIconNavLink\n thyIconNavLinkIcon=\"copy\"\n thyTooltip=\"\u590D\u5236\"\n thyTooltipPlacement=\"top\"\n (mousedown)=\"onCopy($event)\"\n ></a>\n <a\n href=\"javascript:;\"\n thyIconNavLink\n thyIconNavLinkIcon=\"trash\"\n thyTooltip=\"\u5220\u9664\"\n class=\"remove-link\"\n thyTooltipPlacement=\"top\"\n (mousedown)=\"onDelete($event)\"\n ></a>\n </thy-icon-nav>\n</div>\n\n<slate-children [children]=\"children\" [context]=\"childrenContext\" [viewContext]=\"viewContext\"></slate-children>\n<ng-codemirror\n *ngIf=\"startRenderCodemirror\"\n #codemirror\n contenteditable=\"false\"\n class=\"ng-codemirror-wrapper\"\n [ngStyle]=\"{ maxHeight: maxHeight > 0 ? maxHeight + 'px' : 'auto' }\"\n [options]=\"options\"\n [ngModel]=\"code\"\n [delayRefreshTime]=\"300\"\n (ngModelChange)=\"codeChange($event)\"\n (focusChange)=\"focusChange($event)\"\n [autoMaxHeight]=\"maxHeight\"\n></ng-codemirror>\n", components: [{ type: i2.ThyIconNavComponent, selector: "thy-icon-nav", inputs: ["thyType"] }, { type: TheToolbarDropdownComponent, selector: "the-toolbar-dropdown", inputs: ["toolbarItem", "menus", "mode", "item", "itemMousedownHandle"] }, { type: i2.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i1.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }, { type: i5$2.CodeMirrorComponent, selector: "ng-codemirror, [ngCodeMirror]", inputs: ["autoMaxHeight", "delayRefreshTime", "options"], outputs: ["focusChange"] }], directives: [{ type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i7.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { type: i6.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i4$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
6507
+ TheCodeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheCodeComponent, selector: "div[theCode]", host: { listeners: { "document: mousedown": "handleCodeMousedown($event)" } }, viewQueries: [{ propertyName: "codemirror", first: true, predicate: ["codemirror"], descendants: true, read: CodeMirrorComponent }], usesInheritance: true, ngImport: i0, template: "<div contenteditable=\"false\" class=\"the-block-operation\" *ngIf=\"codeMirrorFocused && !options.readOnly\">\n <thy-icon-nav>\n <the-toolbar-dropdown [menus]=\"menus\" [item]=\"actives\" [itemMousedownHandle]=\"onChangeLangulage\"> </the-toolbar-dropdown>\n <a\n href=\"javascript:;\"\n thyIconNavLink\n thyIconNavLinkIcon=\"copy\"\n thyTooltip=\"\u590D\u5236\"\n thyTooltipPlacement=\"top\"\n (mousedown)=\"onCopy($event)\"\n ></a>\n <a\n href=\"javascript:;\"\n thyIconNavLink\n thyIconNavLinkIcon=\"trash\"\n thyTooltip=\"\u5220\u9664\"\n class=\"remove-link\"\n thyTooltipPlacement=\"top\"\n (mousedown)=\"onDelete($event)\"\n ></a>\n <nav-split-line [mode]=\"ToolbarItemMode.vertical\"></nav-split-line>\n <span class=\"auto-wrap d-flex align-items-center\">\n <span>\u81EA\u52A8\u6362\u884C</span>\n <thy-switch\n class=\"auto-wrap-btn d-flex\"\n [(ngModel)]=\"isAutoWrap\"\n (ngModelChange)=\"onChangeWrap($event)\"\n thySize=\"sm\"\n ></thy-switch>\n </span>\n </thy-icon-nav>\n</div>\n\n<slate-children [children]=\"children\" [context]=\"childrenContext\" [viewContext]=\"viewContext\"></slate-children>\n<div\n thyResizable\n [thyMinHeight]=\"42\"\n [style.height.px]=\"resizeHeight\"\n (thyResize)=\"onResize($event)\"\n (thyResizeStart)=\"onStartResize()\"\n (thyResizeEnd)=\"onEndResize()\"\n class=\"resize-code-container\"\n>\n <ng-codemirror\n *ngIf=\"startRenderCodemirror\"\n #codemirror\n contenteditable=\"false\"\n class=\"ng-codemirror-wrapper\"\n [ngStyle]=\"{ maxHeight: maxHeight > 0 ? maxHeight + 'px' : 'auto' }\"\n [options]=\"options\"\n [ngModel]=\"code\"\n [delayRefreshTime]=\"300\"\n (ngModelChange)=\"codeChange($event)\"\n (focusChange)=\"focusChange($event)\"\n [autoMaxHeight]=\"maxHeight\"\n >\n </ng-codemirror>\n <thy-resize-handle thyDirection=\"bottom\" class=\"code-resize-icon\" *ngIf=\"codeMirrorFocused && !options.readOnly\"></thy-resize-handle>\n</div>\n", components: [{ type: i3.ThyIconNavComponent, selector: "thy-icon-nav", inputs: ["thyType"] }, { type: TheToolbarDropdownComponent, selector: "the-toolbar-dropdown", inputs: ["toolbarItem", "menus", "mode", "item", "itemMousedownHandle"] }, { type: i3.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: NavSplitLineComponent, selector: "nav-split-line", inputs: ["mode"] }, { type: i5$3.ThySwitchComponent, selector: "thy-switch", inputs: ["thyType", "thySize", "thyDisabled"], outputs: ["thyChange"] }, { type: i1.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }, { type: i7.CodeMirrorComponent, selector: "ng-codemirror, [ngCodeMirror]", inputs: ["autoMaxHeight", "delayRefreshTime", "options"], outputs: ["focusChange"] }, { type: i8.ThyResizeHandleComponent, selector: "thy-resize-handle, [thy-resize-handle]", inputs: ["thyDirection"], outputs: ["thyMouseDown"], exportAs: ["thyResizeHandle"] }], directives: [{ type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { type: i4$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i8.ThyResizableDirective, selector: "[thyResizable]", inputs: ["thyBounds", "thyMaxHeight", "thyMaxWidth", "thyMinHeight", "thyMinWidth", "thyGridColumnCount", "thyMaxColumn", "thyMinColumn", "thyLockAspectRatio", "thyPreview", "thyDisabled"], outputs: ["thyResize", "thyResizeEnd", "thyResizeStart"] }, { type: i6.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
6356
6508
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TheCodeComponent, decorators: [{
6357
6509
  type: Component,
6358
6510
  args: [{
6359
6511
  selector: 'div[theCode]',
6360
- templateUrl: './code.component.html',
6361
- changeDetection: ChangeDetectionStrategy.OnPush
6512
+ templateUrl: './code.component.html'
6362
6513
  }]
6363
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i1$4.ThyNotifyService }, { type: i0.NgZone }, { type: CodeMode, decorators: [{
6514
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i1$4.ThyNotifyService }, { type: i0.NgZone }, { type: TheCodeConfig, decorators: [{
6364
6515
  type: Inject,
6365
6516
  args: [THE_CODE_MODE_TOKEN]
6366
6517
  }] }]; }, propDecorators: { codemirror: [{
6367
6518
  type: ViewChild,
6368
6519
  args: ['codemirror', { read: CodeMirrorComponent, static: false }]
6520
+ }], handleCodeMousedown: [{
6521
+ type: HostListener,
6522
+ args: ['document: mousedown', ['$event']]
6369
6523
  }] } });
6370
6524
 
6371
6525
  const withCode = (editor) => {
@@ -6576,7 +6730,7 @@ class TheLinkEditComponent {
6576
6730
  }
6577
6731
  }
6578
6732
  TheLinkEditComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TheLinkEditComponent, deps: [{ token: i1$3.ThyPopoverRef }], target: i0.ɵɵFactoryTarget.Component });
6579
- TheLinkEditComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheLinkEditComponent, selector: "the-link-edit", inputs: { tag: "tag", node: "node", link: "link", text: "text", originSelection: "originSelection" }, host: { listeners: { "document: mousedown": "handleDocumentMouseDown($event)" }, properties: { "class": "this.className" } }, ngImport: i0, 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$2.ThyFormGroupComponent, selector: "thy-form-group", inputs: ["thyLabelText", "thyLabelTextTranslateKey", "thyLabelRequired", "thyLabelPaddingTopClear", "thyFeedbackIcon", "thyTips", "thyTipsTranslateKey", "thyRowFill"] }, { type: i2$2.ThyFormGroupFooterComponent, selector: "thy-form-group-footer", inputs: ["thyAlign"] }, { type: i1$5.ThyButtonComponent, selector: "thy-button,[thy-button],[thyButton]", inputs: ["thyButton", "thyType", "thyLoading", "thyLoadingText", "thySize", "thyIcon", "thySquare", "thyBlock"] }], directives: [{ type: i4$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i4$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i4$2.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i2$2.ThyFormDirective, selector: "[thyForm],[thy-form]", inputs: ["thyLayout", "thyEnterKeyMode", "thyFormValidatorConfig"], exportAs: ["thyForm"] }, { type: i5$3.ThyAutofocusDirective, selector: "input[thyAutofocus],textarea[thyAutofocus]", inputs: ["thyAutoSelect", "thyAutofocus"] }, { type: i4$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.ThyInputDirective, selector: "[thyInput]", inputs: ["thySize", "thyAutocomplete"] }, { type: i4$2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i4$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i2$2.ThyFormSubmitDirective, selector: "[thyFormSubmit],[thy-form-submit]", outputs: ["thyFormSubmit"] }] });
6733
+ TheLinkEditComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheLinkEditComponent, selector: "the-link-edit", inputs: { tag: "tag", node: "node", link: "link", text: "text", originSelection: "originSelection" }, host: { listeners: { "document: mousedown": "handleDocumentMouseDown($event)" }, properties: { "class": "this.className" } }, ngImport: i0, 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$1.ThyFormGroupComponent, selector: "thy-form-group", inputs: ["thyLabelText", "thyLabelTextTranslateKey", "thyLabelRequired", "thyLabelPaddingTopClear", "thyFeedbackIcon", "thyTips", "thyTipsTranslateKey", "thyRowFill"] }, { type: i2$1.ThyFormGroupFooterComponent, selector: "thy-form-group-footer", inputs: ["thyAlign"] }, { type: i1$5.ThyButtonComponent, selector: "thy-button,[thy-button],[thyButton]", inputs: ["thyButton", "thyType", "thyLoading", "thyLoadingText", "thySize", "thyIcon", "thySquare", "thyBlock"] }], directives: [{ type: i4$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i4$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i4$2.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i2$1.ThyFormDirective, selector: "[thyForm],[thy-form]", inputs: ["thyLayout", "thyEnterKeyMode", "thyFormValidatorConfig"], exportAs: ["thyForm"] }, { type: i5$4.ThyAutofocusDirective, selector: "input[thyAutofocus],textarea[thyAutofocus]", inputs: ["thyAutoSelect", "thyAutofocus"] }, { type: i4$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.ThyInputDirective, selector: "[thyInput]", inputs: ["thySize", "thyAutocomplete"] }, { type: i4$2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i4$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i2$1.ThyFormSubmitDirective, selector: "[thyFormSubmit],[thy-form-submit]", outputs: ["thyFormSubmit"] }] });
6580
6734
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TheLinkEditComponent, decorators: [{
6581
6735
  type: Component,
6582
6736
  args: [{
@@ -6716,7 +6870,7 @@ class TheBaseLinkComponent extends TheBaseElementComponent {
6716
6870
  this.close(LinkCloseTypes.destroy);
6717
6871
  }
6718
6872
  }
6719
- TheBaseLinkComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TheBaseLinkComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i1$3.ThyPopover }, { token: i2$1.Overlay }, { token: i0.ViewContainerRef }, { token: i1$6.ThyClickDispatcher }], target: i0.ɵɵFactoryTarget.Component });
6873
+ TheBaseLinkComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TheBaseLinkComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i1$3.ThyPopover }, { token: i2.Overlay }, { token: i0.ViewContainerRef }, { token: i1$6.ThyClickDispatcher }], target: i0.ɵɵFactoryTarget.Component });
6720
6874
  TheBaseLinkComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheBaseLinkComponent, selector: "[TheBaseLinkComponent]", host: { listeners: { "click": "mousedownHandle($event)" } }, usesInheritance: true, ngImport: i0, template: '', isInline: true });
6721
6875
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TheBaseLinkComponent, decorators: [{
6722
6876
  type: Component,
@@ -6724,7 +6878,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImpor
6724
6878
  selector: '[TheBaseLinkComponent]',
6725
6879
  template: ''
6726
6880
  }]
6727
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i1$3.ThyPopover }, { type: i2$1.Overlay }, { type: i0.ViewContainerRef }, { type: i1$6.ThyClickDispatcher }]; }, propDecorators: { mousedownHandle: [{
6881
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i1$3.ThyPopover }, { type: i2.Overlay }, { type: i0.ViewContainerRef }, { type: i1$6.ThyClickDispatcher }]; }, propDecorators: { mousedownHandle: [{
6728
6882
  type: HostListener,
6729
6883
  args: ['click', ['$event']]
6730
6884
  }] } });
@@ -6897,7 +7051,7 @@ class TheTableToolbarItemComponent extends TheToolbarBaseItemComponent {
6897
7051
  return this.tableSelectRef;
6898
7052
  }
6899
7053
  }
6900
- TheTableToolbarItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TheTableToolbarItemComponent, deps: [{ token: i1$6.ThyPopover }, { token: i2$1.Overlay }], target: i0.ɵɵFactoryTarget.Component });
7054
+ TheTableToolbarItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TheTableToolbarItemComponent, deps: [{ token: i1$6.ThyPopover }, { token: i2.Overlay }], target: i0.ɵɵFactoryTarget.Component });
6901
7055
  TheTableToolbarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheTableToolbarItemComponent, selector: "the-table-toolbar-item", inputs: { item: "item", editor: "editor" }, host: { classAttribute: "the-toolbar-dropdown-container" }, usesInheritance: true, ngImport: i0, template: `
6902
7056
  <a
6903
7057
  thyIconNavLink
@@ -6910,7 +7064,7 @@ TheTableToolbarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12
6910
7064
  <thy-icon [thyIconName]="item.icon"></thy-icon>
6911
7065
  <thy-icon class="link-down-icon font-size-sm text-desc table-down-icon" thyIconName="caret-down"> </thy-icon>
6912
7066
  </a>
6913
- `, isInline: true, components: [{ type: i2.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i4$1.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }], directives: [{ type: i7.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }] });
7067
+ `, isInline: true, components: [{ type: i3.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i4$1.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }], directives: [{ type: i5$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }] });
6914
7068
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TheTableToolbarItemComponent, decorators: [{
6915
7069
  type: Component,
6916
7070
  args: [{
@@ -6932,7 +7086,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImpor
6932
7086
  class: 'the-toolbar-dropdown-container'
6933
7087
  }
6934
7088
  }]
6935
- }], ctorParameters: function () { return [{ type: i1$6.ThyPopover }, { type: i2$1.Overlay }]; }, propDecorators: { item: [{
7089
+ }], ctorParameters: function () { return [{ type: i1$6.ThyPopover }, { type: i2.Overlay }]; }, propDecorators: { item: [{
6936
7090
  type: Input
6937
7091
  }], editor: [{
6938
7092
  type: Input
@@ -7621,40 +7775,6 @@ function setCellMenuInvisibility(editor, menuList, selectedCells, isActiveSelect
7621
7775
  });
7622
7776
  }
7623
7777
 
7624
- class NavSplitLineComponent {
7625
- constructor() {
7626
- this.mode = ToolbarItemMode.vertical;
7627
- this.theNavSplitLine = true;
7628
- }
7629
- get horizontal() {
7630
- return this.mode === ToolbarItemMode.horizontal;
7631
- }
7632
- get vertical() {
7633
- return this.mode === ToolbarItemMode.vertical;
7634
- }
7635
- ngOnInit() { }
7636
- }
7637
- NavSplitLineComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: NavSplitLineComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
7638
- NavSplitLineComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: NavSplitLineComponent, selector: "nav-split-line", inputs: { mode: "mode" }, host: { properties: { "class.the-nav-split-line": "this.theNavSplitLine", "class.horizontal": "this.horizontal", "class.vertical": "this.vertical" } }, ngImport: i0, template: '', isInline: true });
7639
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: NavSplitLineComponent, decorators: [{
7640
- type: Component,
7641
- args: [{
7642
- selector: 'nav-split-line',
7643
- template: ''
7644
- }]
7645
- }], ctorParameters: function () { return []; }, propDecorators: { mode: [{
7646
- type: Input
7647
- }], theNavSplitLine: [{
7648
- type: HostBinding,
7649
- args: ['class.the-nav-split-line']
7650
- }], horizontal: [{
7651
- type: HostBinding,
7652
- args: ['class.horizontal']
7653
- }], vertical: [{
7654
- type: HostBinding,
7655
- args: ['class.vertical']
7656
- }] } });
7657
-
7658
7778
  class TheTableToolbarComponent {
7659
7779
  constructor(ngZone, colorSelectService, popoverRef) {
7660
7780
  this.ngZone = ngZone;
@@ -7765,7 +7885,7 @@ class TheTableToolbarComponent {
7765
7885
  }
7766
7886
  }
7767
7887
  TheTableToolbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TheTableToolbarComponent, deps: [{ token: i0.NgZone }, { token: TheColorSelectService }, { token: i1$3.ThyPopoverRef }], target: i0.ɵɵFactoryTarget.Component });
7768
- TheTableToolbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheTableToolbarComponent, selector: "the-table-toolbar", inputs: { tableStore: "tableStore", isActiveSelect: "isActiveSelect" }, ngImport: i0, template: "<thy-icon-nav>\n <ng-container *ngFor=\"let item of cellMenuList\">\n <a href=\"javascript:;\" thyIconNavLink *ngIf=\"!item.invisibility\" [thyTooltip]=\"item.name\" (mousedown)=\"item.actionHandle()\">\n <thy-icon [thyIconName]=\"item.icon\"></thy-icon>\n </a>\n </ng-container>\n <nav-split-line *ngIf=\"!isActiveSelect && isShowSplitLine\"></nav-split-line>\n <a href=\"javascript:;\" thyIconNavLink thyTooltip=\"\u5355\u5143\u683C\u80CC\u666F\" (mousedown)=\"openSelectColor($event)\">\n <thy-icon thyIconName=\"background-tt\" thyIconType=\"twotone\" [thyTwotoneColor]=\"selectedColor\"></thy-icon>\n </a>\n <nav-split-line *ngIf=\"deleteIcon\"></nav-split-line>\n <a\n *ngIf=\"deleteIcon\"\n href=\"javascript:;\"\n thyIconNavLink\n [thyTooltip]=\"iconName\"\n class=\"danger\"\n [thyIconNavLinkIcon]=\"deleteIcon\"\n (mousedown)=\"onDelete($event)\"\n (mouseenter)=\"onEnterDelete($event)\"\n (mouseleave)=\"onLeaveDelete($event)\"\n ></a>\n</thy-icon-nav>\n", components: [{ type: i2.ThyIconNavComponent, selector: "thy-icon-nav", inputs: ["thyType"] }, { type: i2.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i4$1.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { type: NavSplitLineComponent, selector: "nav-split-line", inputs: ["mode"] }], directives: [{ type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i7.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }] });
7888
+ TheTableToolbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheTableToolbarComponent, selector: "the-table-toolbar", inputs: { tableStore: "tableStore", isActiveSelect: "isActiveSelect" }, ngImport: i0, 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.ThyIconNavComponent, selector: "thy-icon-nav", inputs: ["thyType"] }, { type: i3.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i4$1.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { type: NavSplitLineComponent, selector: "nav-split-line", inputs: ["mode"] }], directives: [{ type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }] });
7769
7889
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TheTableToolbarComponent, decorators: [{
7770
7890
  type: Component,
7771
7891
  args: [{
@@ -7828,7 +7948,7 @@ class TheContextMenuComponent {
7828
7948
  ngOnInit() { }
7829
7949
  }
7830
7950
  TheContextMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TheContextMenuComponent, deps: [{ token: i0.ElementRef }, { token: i1$3.ThyPopoverRef }], target: i0.ɵɵFactoryTarget.Component });
7831
- TheContextMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheContextMenuComponent, selector: "the-contextmenu", inputs: { menuEntities: "menuEntities", actionHandle: "actionHandle", activeHandle: "activeHandle", deactiveHandle: "deactiveHandle" }, host: { listeners: { "document: mousedown": "handleDocumentMouseDown($event)", "mousedown": "handleMouseDown($event)" }, properties: { "class.the-overlay-menu-wrap": "this.wrap" } }, ngImport: i0, 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$1.ThyActionMenuComponent, selector: "thy-action-menu", inputs: ["thyTheme", "thyWidth"] }, { type: i4$1.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { type: i5$1.ThyActionMenuDividerComponent, selector: "thy-action-menu-divider", inputs: ["thyTitle", "thyType"] }], directives: [{ type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5$1.ThyActionMenuItemDirective, selector: "[thyActionMenuItem]", inputs: ["thyDisabled", "thyType"] }, { type: i5$1.ThyActionMenuItemIconDirective, selector: "[thyActionMenuItemIcon]" }, { type: i5$1.ThyActionMenuItemNameDirective, selector: "[thyActionMenuItemName]" }, { type: i5$1.ThyActionMenuItemExtendIconDirective, selector: "[thyActionMenuItemExtendIcon]" }] });
7951
+ TheContextMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheContextMenuComponent, selector: "the-contextmenu", inputs: { menuEntities: "menuEntities", actionHandle: "actionHandle", activeHandle: "activeHandle", deactiveHandle: "deactiveHandle" }, host: { listeners: { "document: mousedown": "handleDocumentMouseDown($event)", "mousedown": "handleMouseDown($event)" }, properties: { "class.the-overlay-menu-wrap": "this.wrap" } }, ngImport: i0, 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$2.ThyActionMenuComponent, selector: "thy-action-menu", inputs: ["thyTheme", "thyWidth"] }, { type: i4$1.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { type: i5$2.ThyActionMenuDividerComponent, selector: "thy-action-menu-divider", inputs: ["thyTitle", "thyType"] }], directives: [{ type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5$2.ThyActionMenuItemDirective, selector: "[thyActionMenuItem]", inputs: ["thyDisabled", "thyType"] }, { type: i5$2.ThyActionMenuItemIconDirective, selector: "[thyActionMenuItemIcon]" }, { type: i5$2.ThyActionMenuItemNameDirective, selector: "[thyActionMenuItemName]" }, { type: i5$2.ThyActionMenuItemExtendIconDirective, selector: "[thyActionMenuItemExtendIcon]" }] });
7832
7952
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TheContextMenuComponent, decorators: [{
7833
7953
  type: Component,
7834
7954
  args: [{
@@ -8117,11 +8237,11 @@ class TableService {
8117
8237
  });
8118
8238
  }
8119
8239
  }
8120
- TableService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TableService, deps: [{ token: i1$3.ThyPopover }, { token: i2$1.Overlay }, { token: TableStore }, { token: TheTableContextMenuService }, { token: i0.NgZone }, { token: TheContextService }], target: i0.ɵɵFactoryTarget.Injectable });
8240
+ TableService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TableService, deps: [{ token: i1$3.ThyPopover }, { token: i2.Overlay }, { token: TableStore }, { token: TheTableContextMenuService }, { token: i0.NgZone }, { token: TheContextService }], target: i0.ɵɵFactoryTarget.Injectable });
8121
8241
  TableService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TableService });
8122
8242
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TableService, decorators: [{
8123
8243
  type: Injectable
8124
- }], ctorParameters: function () { return [{ type: i1$3.ThyPopover }, { type: i2$1.Overlay }, { type: TableStore }, { type: TheTableContextMenuService }, { type: i0.NgZone }, { type: TheContextService }]; } });
8244
+ }], ctorParameters: function () { return [{ type: i1$3.ThyPopover }, { type: i2.Overlay }, { type: TableStore }, { type: TheTableContextMenuService }, { type: i0.NgZone }, { type: TheContextService }]; } });
8125
8245
 
8126
8246
  const SLA_TABLE_SELECTOR = '.slate-element-table';
8127
8247
  const SLA_TABLE_CELL_SELECTOR = '.slate-element-table-cell';
@@ -8200,7 +8320,7 @@ class TheInsertMarkComponent {
8200
8320
  ngOnDestroy() { }
8201
8321
  }
8202
8322
  TheInsertMarkComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TheInsertMarkComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
8203
- TheInsertMarkComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheInsertMarkComponent, selector: "the-table-insert-mark", inputs: { type: "type", at: "at", tableStore: "tableStore" }, ngImport: i0, template: "<div\n [thyTooltip]=\"!disabled && tooltipContent\"\n class=\"the-table-controls-insert-wrapper\"\n [ngClass]=\"{ disabled: disabled }\"\n contenteditable=\"false\"\n (mousedown)=\"onMouseDown($event)\"\n (mouseenter)=\"onMouseEnter($event)\"\n (mouseleave)=\"onMouseLeave($event)\"\n>\n <div\n class=\"the-table-controls-insert-line\"\n *ngIf=\"dotWrapperHovered\"\n [attr.data-dot-type]=\"type\"\n [ngStyle]=\"{ height: type === 'column' && insertLength, width: type === 'row' && insertLength }\"\n ></div>\n</div>\n", directives: [{ type: i7.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
8323
+ TheInsertMarkComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheInsertMarkComponent, selector: "the-table-insert-mark", inputs: { type: "type", at: "at", tableStore: "tableStore" }, ngImport: i0, 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$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
8204
8324
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TheInsertMarkComponent, decorators: [{
8205
8325
  type: Component,
8206
8326
  args: [{
@@ -9746,7 +9866,7 @@ class TheTdComponent extends TheBaseElementComponent {
9746
9866
  this.destroy$.complete();
9747
9867
  }
9748
9868
  }
9749
- TheTdComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TheTdComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i0.Renderer2 }, { token: i0.ViewContainerRef }, { token: i0.NgZone }, { token: i0.Injector }, { token: i2$1.Overlay }, { token: ColumnResizingStore }, { token: i2$1.ScrollDispatcher }], target: i0.ɵɵFactoryTarget.Component });
9869
+ TheTdComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TheTdComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i0.Renderer2 }, { token: i0.ViewContainerRef }, { token: i0.NgZone }, { token: i0.Injector }, { token: i2.Overlay }, { token: ColumnResizingStore }, { token: i2.ScrollDispatcher }], target: i0.ɵɵFactoryTarget.Component });
9750
9870
  TheTdComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheTdComponent, selector: "td[theTd]", host: { properties: { "style.backgroundColor": "this.backgroundColor", "attr.colspan": "this.colspan", "attr.rowspan": "this.rowspan", "style.display": "this.display" } }, providers: [ColumnResizingStore], viewQueries: [{ propertyName: "cellInner", first: true, predicate: ["cellInner"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<div #cellInner>\n <slate-children [children]=\"children\" [context]=\"childrenContext\" [viewContext]=\"viewContext\"></slate-children>\n</div>\n", components: [{ type: i1.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }] });
9751
9871
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TheTdComponent, decorators: [{
9752
9872
  type: Component,
@@ -9755,7 +9875,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImpor
9755
9875
  templateUrl: './td.component.html',
9756
9876
  providers: [ColumnResizingStore]
9757
9877
  }]
9758
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i0.Renderer2 }, { type: i0.ViewContainerRef }, { type: i0.NgZone }, { type: i0.Injector }, { type: i2$1.Overlay }, { type: ColumnResizingStore }, { type: i2$1.ScrollDispatcher }]; }, propDecorators: { backgroundColor: [{
9878
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i0.Renderer2 }, { type: i0.ViewContainerRef }, { type: i0.NgZone }, { type: i0.Injector }, { type: i2.Overlay }, { type: ColumnResizingStore }, { type: i2.ScrollDispatcher }]; }, propDecorators: { backgroundColor: [{
9759
9879
  type: HostBinding,
9760
9880
  args: ['style.backgroundColor']
9761
9881
  }], colspan: [{
@@ -9792,7 +9912,7 @@ const normalizeTable = (table) => {
9792
9912
  }
9793
9913
  // case 2
9794
9914
  if (cell.hidden && !normalizedNodes.includes(cell)) {
9795
- const origin = calcOriginSpan(table, rowIndex, columnIndex);
9915
+ const origin = getOriginCell(table, rowIndex, columnIndex);
9796
9916
  if (!origin) {
9797
9917
  delete table.children[rowIndex].children[columnIndex].hidden;
9798
9918
  }
@@ -9803,7 +9923,7 @@ const normalizeTable = (table) => {
9803
9923
  };
9804
9924
 
9805
9925
  const withTable = (editor) => {
9806
- const { deleteBackward, deleteForward, onKeydown, setFragmentData, insertData, normalizeNode, isBlockCard, renderElement, deleteCutData, isContainer } = editor;
9926
+ const { deleteBackward, deleteForward, onKeydown, setFragmentData, insertData, normalizeNode, isBlockCard, renderElement, deleteCutData, isContainer, onChange } = editor;
9807
9927
  editor.deleteBackward = unit => {
9808
9928
  const opts = new TableOptions$1();
9809
9929
  if (!isSelectionInTable(opts, editor)) {
@@ -9874,13 +9994,11 @@ const withTable = (editor) => {
9874
9994
  const aboveCell = aboveRow && aboveRow.children[startPosition.getColumnIndex()];
9875
9995
  if (aboveCell) {
9876
9996
  if (aboveCell.hidden) {
9877
- const originSpan = calcOriginSpan(endPosition.table, startPosition.getRowIndex() - 1, startPosition.getColumnIndex());
9878
- if (originSpan) {
9879
- at = Editor.start(editor, TheEditor.findPath(editor, originSpan));
9880
- }
9997
+ TableEditor.selectOriginCell(editor, startPosition.table, startPosition.getRowIndex() - 1, startPosition.getColumnIndex(), false);
9998
+ return;
9881
9999
  }
9882
10000
  else {
9883
- at = Editor.start(editor, TheEditor.findPath(editor, aboveCell));
10001
+ at = Editor.end(editor, TheEditor.findPath(editor, aboveCell));
9884
10002
  }
9885
10003
  }
9886
10004
  else {
@@ -9909,10 +10027,8 @@ const withTable = (editor) => {
9909
10027
  const belowCell = belowRow && belowRow.children[startPosition.getColumnIndex()];
9910
10028
  if (belowCell) {
9911
10029
  if (belowCell.hidden) {
9912
- const originSpan = calcOriginSpan(endPosition.table, belowRowIndex, startPosition.getColumnIndex());
9913
- if (originSpan) {
9914
- at = Editor.start(editor, TheEditor.findPath(editor, originSpan));
9915
- }
10030
+ TableEditor.selectOriginCell(editor, startPosition.table, startPosition.getRowIndex() + 1, startPosition.getColumnIndex(), true);
10031
+ return;
9916
10032
  }
9917
10033
  else {
9918
10034
  at = Editor.start(editor, TheEditor.findPath(editor, belowCell));
@@ -9931,18 +10047,27 @@ const withTable = (editor) => {
9931
10047
  const beforePoint = Editor.before(editor, editor.selection);
9932
10048
  const beforePosition = beforePoint && TablePosition.create(opts, editor, beforePoint.path);
9933
10049
  if (beforePosition && beforePosition.cell && beforePosition.cell.hidden) {
10050
+ event.preventDefault();
9934
10051
  const at = Editor.end(editor, TheEditor.findPath(editor, beforePosition.findPrevious()));
9935
10052
  Transforms.select(editor, at);
9936
- event.preventDefault();
9937
10053
  }
9938
10054
  }
9939
10055
  if (isMoveForward) {
9940
10056
  const afterPoint = Editor.after(editor, editor.selection);
9941
10057
  const afterPosition = afterPoint && TablePosition.create(opts, editor, afterPoint.path);
9942
10058
  if (afterPosition.cell && afterPosition.cell.hidden) {
9943
- const at = Editor.start(editor, TheEditor.findPath(editor, afterPosition.findNext()));
9944
- Transforms.select(editor, at);
9945
10059
  event.preventDefault();
10060
+ const nextCell = afterPosition.findNext();
10061
+ if (nextCell) {
10062
+ const at = Editor.start(editor, TheEditor.findPath(editor, afterPosition.findNext()));
10063
+ Transforms.select(editor, at);
10064
+ event.preventDefault();
10065
+ }
10066
+ else {
10067
+ AngularEditor.moveBlockCard(editor, startPosition.tableEntry[0], { direction: 'right' });
10068
+ event.preventDefault();
10069
+ }
10070
+ return;
9946
10071
  }
9947
10072
  }
9948
10073
  // Prevent deleting cells in the table
@@ -10012,12 +10137,12 @@ const withTable = (editor) => {
10012
10137
  }
10013
10138
  if (tableFragment) {
10014
10139
  tableFragment = normalizeTable(_.cloneDeep(tableFragment));
10140
+ const plainText = Node.string(tableFragment);
10015
10141
  tableFragment = [tableFragment];
10016
10142
  const stringObj = JSON.stringify(tableFragment);
10017
10143
  const encoded = window.btoa(encodeURIComponent(stringObj));
10018
10144
  unit.setData(`application/${CLIPBOARD_FORMAT_KEY}`, encoded);
10019
- // unit.setData('text/html', div.innerHTML);
10020
- unit.setData('text/plain', Node.string(tableFragment));
10145
+ unit.setData('text/plain', plainText);
10021
10146
  return;
10022
10147
  }
10023
10148
  setFragmentData(unit);
@@ -10042,7 +10167,7 @@ const withTable = (editor) => {
10042
10167
  for (let j = selectColIndex; j <= lastColIndex; j++) {
10043
10168
  const row = tablePosition.table.children[i];
10044
10169
  if (row && row.children[j]) {
10045
- const originCell = calcOriginSpan(tablePosition.table, i, j);
10170
+ const originCell = getOriginCell(tablePosition.table, i, j);
10046
10171
  if (originCell && (originCell.colspan || originCell.rowspan)) {
10047
10172
  const path = TheEditor.findPath(editor, originCell).slice(-2);
10048
10173
  resetTableCell(editor, tablePosition.table, originCell, path[0], path[1]);
@@ -10100,6 +10225,21 @@ const withTable = (editor) => {
10100
10225
  Transforms.setNodes(editor, { columns }, { at: entry[1] });
10101
10226
  }
10102
10227
  }
10228
+ // adjust selection when selection is in hidden cell
10229
+ if (Element$1.isElement(entry[0]) && entry[0].type === ElementKinds.tableCell && entry[0].hidden) {
10230
+ if (editor.selection && Range.isCollapsed(editor.selection) && Path.isAncestor(entry[1], editor.selection.anchor.path)) {
10231
+ setTimeout(() => {
10232
+ const opts = new TableOptions$1();
10233
+ const tablePosition = TablePosition.create(opts, editor, editor.selection.anchor.path);
10234
+ const origin = getOriginCell(tablePosition.table, tablePosition.getRowIndex(), tablePosition.getColumnIndex());
10235
+ if (origin) {
10236
+ const path = AngularEditor.findPath(editor, origin);
10237
+ Transforms.select(editor, Editor.end(editor, path));
10238
+ }
10239
+ }, 0);
10240
+ return;
10241
+ }
10242
+ }
10103
10243
  normalizeNode(entry);
10104
10244
  };
10105
10245
  editor.isBlockCard = (element) => {
@@ -10147,6 +10287,20 @@ const withTable = (editor) => {
10147
10287
  editor.isContainer = (element) => {
10148
10288
  return element.type === ElementKinds.tableCell ? true : isContainer(element);
10149
10289
  };
10290
+ editor.onChange = () => {
10291
+ onChange();
10292
+ // adujst selection when selection is in hidden cell
10293
+ // just hook set_selection
10294
+ const isCollapsed = editor.selection && Range.isCollapsed(editor.selection);
10295
+ const isSelectionOperation = editor.operations.every(op => Operation.isSelectionOperation(op));
10296
+ if (isCollapsed && isSelectionOperation) {
10297
+ const opts = new TableOptions$1();
10298
+ const tablePosition = TablePosition.create(opts, editor, editor.selection.anchor.path);
10299
+ if (tablePosition.isInTable() && tablePosition.cell.hidden) {
10300
+ TableEditor.selectOriginCell(editor, tablePosition.table, tablePosition.getRowIndex(), tablePosition.getColumnIndex(), false);
10301
+ }
10302
+ }
10303
+ };
10150
10304
  return editor;
10151
10305
  };
10152
10306
 
@@ -10181,6 +10335,12 @@ const withDeserializeHMTL = (editor) => {
10181
10335
  insertData(data);
10182
10336
  return;
10183
10337
  }
10338
+ // 识出纯图片并且粘贴板中存在文件则不进行处理, hook 直接右键复制图片的场景,流转到上传图片流程
10339
+ // 后续需要做识别html图片后自动上传处理
10340
+ if (fragment.length === 1 && fragment[0].type === ElementKinds.image && data.files.length > 0) {
10341
+ insertData(data);
10342
+ return;
10343
+ }
10184
10344
  // 过滤 text 节点的 color/background-color 属性
10185
10345
  fragment.forEach((node) => deleteColorAndBackgroundColorOfText(node));
10186
10346
  Transforms.insertFragment(editor, fragment);
@@ -10273,7 +10433,7 @@ class TheVerticalToolbarItemComponent extends TheToolbarBaseItemComponent {
10273
10433
  }
10274
10434
  }
10275
10435
  TheVerticalToolbarItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TheVerticalToolbarItemComponent, deps: [{ token: i0.ElementRef }, { token: i1$6.ThyPopover }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component });
10276
- TheVerticalToolbarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheVerticalToolbarItemComponent, selector: "the-toolbar-vertical-align-item", inputs: { item: "item", menus: "menus", editor: "editor", toolbarItem: "toolbarItem" }, host: { listeners: { "document: mousedown": "handleDocumentMouseDown($event)" }, properties: { "class.hide": "!active" }, classAttribute: "the-toolbar-dropdown-container verticalAlign" }, viewQueries: [{ propertyName: "template", first: true, predicate: ["VerticalAlignItems"], descendants: true, read: TemplateRef, static: true }], usesInheritance: true, ngImport: i0, template: "<a\n thyIconNavLink\n class=\"icon-mode link-with-down\"\n [thyTooltip]=\"toolbarItem?.name\"\n [thyIconNavLinkActive]=\"isOpened\"\n thyTooltipPlacement=\"top\"\n (mousedown)=\"execute($event)\"\n>\n <thy-icon [thyIconName]=\"activeMenu?.icon\"></thy-icon>\n <thy-icon class=\"caret-down-icon font-size-sm text-desc\" thyIconName=\"caret-down\"></thy-icon>\n</a>\n\n<ng-template #VerticalAlignItems>\n <thy-action-menu class=\"dropdown\">\n <ng-container *ngFor=\"let menu of toolbarItem?.includes\">\n <a\n thyActionMenuItem\n href=\"javascript:;\"\n [thyActionMenuItemActive]=\"menu.key === activeMenu?.key\"\n [ngStyle]=\"menu?.styles\"\n (mousedown)=\"itemMousedown($event, menu)\"\n >\n <span *ngIf=\"menu.icon\" thyActionMenuItemIcon>\n <thy-icon [thyIconName]=\"menu?.icon\"></thy-icon>\n </span>\n <span thyActionMenuItemName>{{ menu.name }}</span>\n </a>\n </ng-container>\n </thy-action-menu>\n</ng-template>\n", components: [{ type: i2.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i4$1.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { type: i5$1.ThyActionMenuComponent, selector: "thy-action-menu", inputs: ["thyTheme", "thyWidth"] }], directives: [{ type: i7.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i5$1.ThyActionMenuItemDirective, selector: "[thyActionMenuItem]", inputs: ["thyDisabled", "thyType"] }, { type: i5$1.ThyActionMenuItemActiveDirective, selector: "[thyActionMenuItemActive]", inputs: ["thyActionMenuItemActive"] }, { type: i6.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5$1.ThyActionMenuItemIconDirective, selector: "[thyActionMenuItemIcon]" }, { type: i5$1.ThyActionMenuItemNameDirective, selector: "[thyActionMenuItemName]" }] });
10436
+ TheVerticalToolbarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheVerticalToolbarItemComponent, selector: "the-toolbar-vertical-align-item", inputs: { item: "item", menus: "menus", editor: "editor", toolbarItem: "toolbarItem" }, host: { listeners: { "document: mousedown": "handleDocumentMouseDown($event)" }, properties: { "class.hide": "!active" }, classAttribute: "the-toolbar-dropdown-container verticalAlign" }, viewQueries: [{ propertyName: "template", first: true, predicate: ["VerticalAlignItems"], descendants: true, read: TemplateRef, static: true }], usesInheritance: true, ngImport: i0, template: "<a\n thyIconNavLink\n class=\"icon-mode link-with-down\"\n [thyTooltip]=\"toolbarItem?.name\"\n [thyIconNavLinkActive]=\"isOpened\"\n thyTooltipPlacement=\"top\"\n (mousedown)=\"execute($event)\"\n>\n <thy-icon [thyIconName]=\"activeMenu?.icon\"></thy-icon>\n <thy-icon class=\"caret-down-icon font-size-sm text-desc\" thyIconName=\"caret-down\"></thy-icon>\n</a>\n\n<ng-template #VerticalAlignItems>\n <thy-action-menu class=\"dropdown\">\n <ng-container *ngFor=\"let menu of toolbarItem?.includes\">\n <a\n thyActionMenuItem\n href=\"javascript:;\"\n [thyActionMenuItemActive]=\"menu.key === activeMenu?.key\"\n [ngStyle]=\"menu?.styles\"\n (mousedown)=\"itemMousedown($event, menu)\"\n >\n <span *ngIf=\"menu.icon\" thyActionMenuItemIcon>\n <thy-icon [thyIconName]=\"menu?.icon\"></thy-icon>\n </span>\n <span thyActionMenuItemName>{{ menu.name }}</span>\n </a>\n </ng-container>\n </thy-action-menu>\n</ng-template>\n", components: [{ type: i3.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i4$1.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { type: i5$2.ThyActionMenuComponent, selector: "thy-action-menu", inputs: ["thyTheme", "thyWidth"] }], directives: [{ type: i5$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i5$2.ThyActionMenuItemDirective, selector: "[thyActionMenuItem]", inputs: ["thyDisabled", "thyType"] }, { type: i5$2.ThyActionMenuItemActiveDirective, selector: "[thyActionMenuItemActive]", inputs: ["thyActionMenuItemActive"] }, { type: i6.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5$2.ThyActionMenuItemIconDirective, selector: "[thyActionMenuItemIcon]" }, { type: i5$2.ThyActionMenuItemNameDirective, selector: "[thyActionMenuItemName]" }] });
10277
10437
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TheVerticalToolbarItemComponent, decorators: [{
10278
10438
  type: Component,
10279
10439
  args: [{
@@ -10396,12 +10556,14 @@ const PaintFormatOptions = [
10396
10556
  key: ToolbarActionTypes.undo,
10397
10557
  icon: 'undo',
10398
10558
  name: '撤销',
10559
+ shortcutKey: `${CONTROL_KEY}+Z`,
10399
10560
  execute: (editor) => editor.undo()
10400
10561
  },
10401
10562
  {
10402
10563
  key: ToolbarActionTypes.redo,
10403
10564
  icon: 'redo',
10404
10565
  name: '重做',
10566
+ shortcutKey: `${CONTROL_KEY}+Shift+Z`,
10405
10567
  execute: (editor) => editor.redo()
10406
10568
  },
10407
10569
  {
@@ -10512,7 +10674,8 @@ TheToolbarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0"
10512
10674
  <a
10513
10675
  thyIconNavLink
10514
10676
  [thyIconNavLinkIcon]="item.icon"
10515
- [thyTooltip]="item.name"
10677
+ [thyTooltip]="tooltip"
10678
+ [thyTooltipTemplateContext]="{ name: item.name, shortcutKey: item.shortcutKey }"
10516
10679
  thyTooltipPlacement="top"
10517
10680
  [thyIconNavLinkActive]="active"
10518
10681
  (mousedown)="execute($event)"
@@ -10524,8 +10687,9 @@ TheToolbarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0"
10524
10687
  <span class="quick-toolbar-name">{{ item?.name }}</span>
10525
10688
  </ng-container>
10526
10689
  </ng-template>
10690
+ <ng-template #tooltip let-data> {{ data.name }} {{ data.shortcutKey }} </ng-template>
10527
10691
  <ng-container #toolbarContainer></ng-container>
10528
- `, isInline: true, components: [{ type: i2.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i4$1.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }], directives: [{ type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i7.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }] });
10692
+ `, isInline: true, components: [{ type: i3.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i4$1.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }], directives: [{ type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }] });
10529
10693
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TheToolbarItemComponent, decorators: [{
10530
10694
  type: Component,
10531
10695
  args: [{
@@ -10535,7 +10699,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImpor
10535
10699
  <a
10536
10700
  thyIconNavLink
10537
10701
  [thyIconNavLinkIcon]="item.icon"
10538
- [thyTooltip]="item.name"
10702
+ [thyTooltip]="tooltip"
10703
+ [thyTooltipTemplateContext]="{ name: item.name, shortcutKey: item.shortcutKey }"
10539
10704
  thyTooltipPlacement="top"
10540
10705
  [thyIconNavLinkActive]="active"
10541
10706
  (mousedown)="execute($event)"
@@ -10547,6 +10712,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImpor
10547
10712
  <span class="quick-toolbar-name">{{ item?.name }}</span>
10548
10713
  </ng-container>
10549
10714
  </ng-template>
10715
+ <ng-template #tooltip let-data> {{ data.name }} {{ data.shortcutKey }} </ng-template>
10550
10716
  <ng-container #toolbarContainer></ng-container>
10551
10717
  `,
10552
10718
  host: {
@@ -10607,7 +10773,7 @@ class TheQuickToolbarComponent extends mixinUnsubscribe(MixinBase) {
10607
10773
  }
10608
10774
  }
10609
10775
  TheQuickToolbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TheQuickToolbarComponent, deps: [{ token: i1$3.ThyPopoverRef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
10610
- TheQuickToolbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheQuickToolbarComponent, selector: "the-quick-toolbar", inputs: { editor: "editor", quickToolbarItems: "quickToolbarItems" }, host: { listeners: { "document: mousedown": "handleMouseDown($event)", "document: keydown.enter": "handleEnter()" } }, usesInheritance: true, ngImport: i0, 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$3.ThySelectionListComponent, selector: "thy-selection-list,[thy-selection-list]", inputs: ["thyMultiple", "thyBindKeyEventContainer", "thyScrollContainer", "thyBeforeKeydown", "thyUniqueKey", "thyCompareWith", "thyLayout", "thyAutoActiveFirstItem", "thySize", "thySpaceKeyEnabled"], outputs: ["thySelectionChange"] }, { type: i5$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.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
10776
+ TheQuickToolbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheQuickToolbarComponent, selector: "the-quick-toolbar", inputs: { editor: "editor", quickToolbarItems: "quickToolbarItems" }, host: { listeners: { "document: mousedown": "handleMouseDown($event)", "document: keydown.enter": "handleEnter()" } }, usesInheritance: true, ngImport: i0, 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$2.ThySelectionListComponent, selector: "thy-selection-list,[thy-selection-list]", inputs: ["thyMultiple", "thyBindKeyEventContainer", "thyScrollContainer", "thyBeforeKeydown", "thyUniqueKey", "thyCompareWith", "thyLayout", "thyAutoActiveFirstItem", "thySize", "thySpaceKeyEnabled"], outputs: ["thySelectionChange"] }, { type: i5$4.ThyListOptionComponent, selector: "thy-list-option,[thy-list-option]", inputs: ["id", "thyValue", "thyDisabled"] }, { type: TheToolbarItemComponent, selector: "the-toolbar-item", inputs: ["item", "editor", "itemMode"] }, { type: NavSplitLineComponent, selector: "nav-split-line", inputs: ["mode"] }], directives: [{ type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
10611
10777
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TheQuickToolbarComponent, decorators: [{
10612
10778
  type: Component,
10613
10779
  args: [{
@@ -10710,6 +10876,146 @@ const withQuickInsert = (editor) => {
10710
10876
  return editor;
10711
10877
  };
10712
10878
 
10879
+ const withSoftBreak = (options = { rules: [{ hotkey: 'shift+enter' }] }) => (editor) => {
10880
+ const { onKeydown } = editor;
10881
+ editor.onKeydown = (event) => {
10882
+ const { rules } = options;
10883
+ const entry = getBlockAbove(editor);
10884
+ rules.forEach(({ hotkey, query }) => {
10885
+ if (isHotkey(hotkey, event) && isNodeType(entry, query)) {
10886
+ event.preventDefault();
10887
+ editor.insertText('\n');
10888
+ }
10889
+ });
10890
+ onKeydown(event);
10891
+ };
10892
+ return editor;
10893
+ };
10894
+
10895
+ class TheFontSizeToolbarItemComponent extends TheToolbarBaseItemComponent {
10896
+ constructor(elementRef, thyPopover, viewContainerRef, overlay) {
10897
+ super();
10898
+ this.elementRef = elementRef;
10899
+ this.thyPopover = thyPopover;
10900
+ this.viewContainerRef = viewContainerRef;
10901
+ this.overlay = overlay;
10902
+ this.fontSizes = FontSizes;
10903
+ this.disabled = false;
10904
+ this.disableGroup = HEADING_TYPES;
10905
+ this.toolbarItemContainer = true;
10906
+ this.fontSizeToolbarItem = true;
10907
+ }
10908
+ get isOpen() {
10909
+ return this.dropdownPopoverRef && this.dropdownPopoverRef.getOverlayRef() && this.dropdownPopoverRef.getOverlayRef().hasAttached();
10910
+ }
10911
+ get disableClass() {
10912
+ return this.disabled;
10913
+ }
10914
+ toggleDropdown(event) {
10915
+ var _a;
10916
+ super.execute(event);
10917
+ if (((_a = this.editor) === null || _a === void 0 ? void 0 : _a.disabled) || this.disabled) {
10918
+ return;
10919
+ }
10920
+ this.openDropdownPopover();
10921
+ }
10922
+ handleDocumentMouseDown(event) {
10923
+ if (!this.elementRef.nativeElement.contains(event.target)) {
10924
+ this.closeDropdownPopover();
10925
+ }
10926
+ }
10927
+ ngOnInit() {
10928
+ this.activeSize = this.fontSizes[2];
10929
+ }
10930
+ statusChange(editor) {
10931
+ if (editor.selection) {
10932
+ const anchorBlock$1 = anchorBlock(editor);
10933
+ if (anchorBlock$1 && this.disableGroup.includes(anchorBlock$1.type)) {
10934
+ this.activeSize = null;
10935
+ this.disabled = true;
10936
+ return;
10937
+ }
10938
+ const marks = getSelectionMarks(editor);
10939
+ const fontSizeMark = marks[MarkTypes.fontSize];
10940
+ this.activeSize = fontSizeMark ? fontSizeMark : this.fontSizes[2];
10941
+ this.disabled = false;
10942
+ }
10943
+ }
10944
+ itemMousedown(event, size) {
10945
+ var _a, _b;
10946
+ super.execute(event);
10947
+ this.closeDropdownPopover();
10948
+ if (((_a = this.editor) === null || _a === void 0 ? void 0 : _a.disabled) || ((_b = this.editor) === null || _b === void 0 ? void 0 : _b.readOnly)) {
10949
+ return;
10950
+ }
10951
+ const anchorBlock$1 = anchorBlock(this.editor);
10952
+ if (anchorBlock$1 && this.disableGroup.includes(anchorBlock$1.type)) {
10953
+ return;
10954
+ }
10955
+ Editor.addMark(this.editor, MarkTypes.fontSize, size);
10956
+ }
10957
+ openDropdownPopover() {
10958
+ var _a;
10959
+ this.dropdownPopoverRef = this.thyPopover.open(this.dropdownTemplate, {
10960
+ origin: this.elementRef,
10961
+ panelClass: ['the-toolbar-dropdown-popover', (_a = this.item) === null || _a === void 0 ? void 0 : _a.key],
10962
+ placement: 'bottomLeft',
10963
+ insideClosable: false,
10964
+ backdropClosable: true,
10965
+ hasBackdrop: false,
10966
+ offset: 10,
10967
+ viewContainerRef: this.viewContainerRef,
10968
+ scrollStrategy: this.overlay.scrollStrategies.reposition()
10969
+ });
10970
+ }
10971
+ closeDropdownPopover() {
10972
+ var _a;
10973
+ if (this.dropdownPopoverRef) {
10974
+ (_a = this.dropdownPopoverRef) === null || _a === void 0 ? void 0 : _a.close();
10975
+ }
10976
+ }
10977
+ }
10978
+ TheFontSizeToolbarItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TheFontSizeToolbarItemComponent, deps: [{ token: i0.ElementRef }, { token: i1$3.ThyPopover }, { token: i0.ViewContainerRef }, { token: i2.Overlay }], target: i0.ɵɵFactoryTarget.Component });
10979
+ TheFontSizeToolbarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheFontSizeToolbarItemComponent, selector: "the-font-size-toolbar-item", inputs: { editor: "editor", item: "item" }, host: { listeners: { "mousedown": "toggleDropdown($event)", "document: mousedown": "handleDocumentMouseDown($event)" }, properties: { "class.the-toolbar-dropdown-container": "this.toolbarItemContainer", "class.the-font-size-toolbar-item": "this.fontSizeToolbarItem", "class.disabled": "this.disableClass" } }, viewQueries: [{ propertyName: "dropdownTemplate", first: true, predicate: ["dropdownTemplate"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<a thyIconNavLink class=\"text-mode\" [thyTooltip]=\"item?.name\" thyTooltipPlacement=\"top\">\n <span *ngIf=\"activeSize\" class=\"show-text\">{{ activeSize }}px</span>\n <thy-icon class=\"text-caret-down-icon font-size-sm text-desc\" thyIconName=\"caret-down\"></thy-icon>\n</a>\n\n<ng-template #dropdownTemplate>\n <thy-action-menu class=\"dropdown\">\n <ng-container *ngFor=\"let size of fontSizes\">\n <a\n thyActionMenuItem\n href=\"javascript:;\"\n [thyActionMenuItemActive]=\"size === activeSize\"\n (mousedown)=\"itemMousedown($event, size)\"\n >\n <span thyActionMenuItemName>{{ size }}px</span>\n </a>\n </ng-container>\n </thy-action-menu>\n</ng-template>\n", components: [{ type: i3.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i4$1.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { type: i5$2.ThyActionMenuComponent, selector: "thy-action-menu", inputs: ["thyTheme", "thyWidth"] }], directives: [{ type: i5$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i5$2.ThyActionMenuItemDirective, selector: "[thyActionMenuItem]", inputs: ["thyDisabled", "thyType"] }, { type: i5$2.ThyActionMenuItemActiveDirective, selector: "[thyActionMenuItemActive]", inputs: ["thyActionMenuItemActive"] }, { type: i5$2.ThyActionMenuItemNameDirective, selector: "[thyActionMenuItemName]" }] });
10980
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TheFontSizeToolbarItemComponent, decorators: [{
10981
+ type: Component,
10982
+ args: [{
10983
+ selector: 'the-font-size-toolbar-item',
10984
+ templateUrl: './toolbar-item.component.html'
10985
+ }]
10986
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1$3.ThyPopover }, { type: i0.ViewContainerRef }, { type: i2.Overlay }]; }, propDecorators: { editor: [{
10987
+ type: Input
10988
+ }], item: [{
10989
+ type: Input
10990
+ }], dropdownTemplate: [{
10991
+ type: ViewChild,
10992
+ args: ['dropdownTemplate', { static: true }]
10993
+ }], toolbarItemContainer: [{
10994
+ type: HostBinding,
10995
+ args: ['class.the-toolbar-dropdown-container']
10996
+ }], fontSizeToolbarItem: [{
10997
+ type: HostBinding,
10998
+ args: ['class.the-font-size-toolbar-item']
10999
+ }], disableClass: [{
11000
+ type: HostBinding,
11001
+ args: ['class.disabled']
11002
+ }], toggleDropdown: [{
11003
+ type: HostListener,
11004
+ args: ['mousedown', ['$event']]
11005
+ }], handleDocumentMouseDown: [{
11006
+ type: HostListener,
11007
+ args: ['document: mousedown', ['$event']]
11008
+ }] } });
11009
+
11010
+ const FontSizes = [12, 13, 14, 15, 16, 19, 22, 24, 29, 32, 40, 48];
11011
+ const FontSizeOptions = [
11012
+ {
11013
+ key: MarkTypes.fontSize,
11014
+ name: '字号',
11015
+ iconComponent: TheFontSizeToolbarItemComponent
11016
+ }
11017
+ ];
11018
+
10713
11019
  const internalPlugins = [
10714
11020
  withTheHistory,
10715
11021
  withAutoInsertData(),
@@ -10727,6 +11033,17 @@ const internalPlugins = [
10727
11033
  withCode,
10728
11034
  withHeading,
10729
11035
  withMark(),
11036
+ withSoftBreak({
11037
+ rules: [
11038
+ { hotkey: 'shift+enter' },
11039
+ {
11040
+ hotkey: 'enter',
11041
+ query: {
11042
+ allow: [ElementKinds.blockquote]
11043
+ }
11044
+ }
11045
+ ]
11046
+ }),
10730
11047
  withBlockquote,
10731
11048
  withNodeID({ idKey: ELEMENT_UNIQUE_ID, idCreator }),
10732
11049
  withAutoFormat({ rules: autoFormatRules }),
@@ -10735,9 +11052,9 @@ const internalPlugins = [
10735
11052
  withMoveSelection,
10736
11053
  withInsertParagraphNodes(),
10737
11054
  withGetFragment(),
11055
+ withImage,
10738
11056
  withDeserializeHMTL,
10739
11057
  withDeserializeMd(),
10740
- withImage,
10741
11058
  withQuickInsert
10742
11059
  ];
10743
11060
  const internalToolbarItems = [
@@ -10745,6 +11062,7 @@ const internalToolbarItems = [
10745
11062
  ...MarkOptions,
10746
11063
  ...ColorOptions,
10747
11064
  ...HeadingOptions,
11065
+ ...FontSizeOptions,
10748
11066
  ...TodoItemOptions,
10749
11067
  ...ListOptions,
10750
11068
  ...ImageOptions,
@@ -11080,7 +11398,7 @@ class TheToolbarComponent {
11080
11398
  }
11081
11399
  }
11082
11400
  TheToolbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TheToolbarComponent, deps: [{ token: i0.ComponentFactoryResolver }, { token: i0.ElementRef }, { token: i0.NgZone }, { token: TheToolbarGroupToken }], target: i0.ɵɵFactoryTarget.Component });
11083
- TheToolbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheToolbarComponent, selector: "the-toolbar", inputs: { editor: "editor", toolbarItems: "toolbarItems", align: "align", containerClass: "containerClass", isMore: "isMore", afterTemplate: "afterTemplate" }, host: { classAttribute: "the-toolbar-container" }, viewQueries: [{ propertyName: "toolbarContainer", first: true, predicate: ["toolbarContainer"], descendants: true, read: ViewContainerRef, static: true }], usesOnChanges: true, ngImport: i0, template: "<thy-icon-nav [style.justifyContent]=\"align\">\n <ng-container #toolbarContainer></ng-container>\n <ng-content></ng-content>\n <ng-template *ngIf=\"afterTemplate\" [ngTemplateOutlet]=\"afterTemplate\"></ng-template>\n</thy-icon-nav>\n", components: [{ type: i2.ThyIconNavComponent, selector: "thy-icon-nav", inputs: ["thyType"] }], directives: [{ type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }] });
11401
+ TheToolbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheToolbarComponent, selector: "the-toolbar", inputs: { editor: "editor", toolbarItems: "toolbarItems", align: "align", containerClass: "containerClass", isMore: "isMore", afterTemplate: "afterTemplate" }, host: { classAttribute: "the-toolbar-container" }, viewQueries: [{ propertyName: "toolbarContainer", first: true, predicate: ["toolbarContainer"], descendants: true, read: ViewContainerRef, static: true }], usesOnChanges: true, ngImport: i0, 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.ThyIconNavComponent, selector: "thy-icon-nav", inputs: ["thyType"] }], directives: [{ type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }] });
11084
11402
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TheToolbarComponent, decorators: [{
11085
11403
  type: Component,
11086
11404
  args: [{
@@ -11205,7 +11523,7 @@ class TheInlineToolbarComponent {
11205
11523
  this.destroy$.complete();
11206
11524
  }
11207
11525
  }
11208
- TheInlineToolbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TheInlineToolbarComponent, deps: [{ token: i0.ElementRef }, { token: i2$1.ScrollDispatcher }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: TheContextService }], target: i0.ɵɵFactoryTarget.Component });
11526
+ TheInlineToolbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TheInlineToolbarComponent, deps: [{ token: i0.ElementRef }, { token: i2.ScrollDispatcher }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: TheContextService }], target: i0.ɵɵFactoryTarget.Component });
11209
11527
  TheInlineToolbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheInlineToolbarComponent, selector: "the-inline-toolbar", inputs: { editor: "editor", toolbarItems: "toolbarItems" }, host: { properties: { "class.hide": "toolbarItems.length === 0" } }, viewQueries: [{ propertyName: "inlineToolbar", first: true, predicate: ["inlineToolbar"], descendants: true }], ngImport: i0, template: `<the-toolbar
11210
11528
  #inlineToolbar
11211
11529
  class="the-inline-toolbar"
@@ -11229,7 +11547,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImpor
11229
11547
  },
11230
11548
  changeDetection: ChangeDetectionStrategy.OnPush
11231
11549
  }]
11232
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i2$1.ScrollDispatcher }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }, { type: TheContextService }]; }, propDecorators: { editor: [{
11550
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i2.ScrollDispatcher }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }, { type: TheContextService }]; }, propDecorators: { editor: [{
11233
11551
  type: Input
11234
11552
  }], toolbarItems: [{
11235
11553
  type: Input
@@ -11327,16 +11645,20 @@ class ThePlaceholderComponent {
11327
11645
  }
11328
11646
  }
11329
11647
  checkStatus() {
11648
+ var _a, _b, _c;
11330
11649
  const { editor } = this;
11650
+ const isEmptyShow = typeof ((_a = this.options) === null || _a === void 0 ? void 0 : _a.isEmptyShowPlaceholder) === 'undefined' ? true : this.options.isEmptyShowPlaceholder;
11651
+ const isMustShow = (_b = this.options) === null || _b === void 0 ? void 0 : _b.isMustShowPlaceholder;
11652
+ const isReadonly = (_c = this.options) === null || _c === void 0 ? void 0 : _c.readonly;
11331
11653
  // empty content and no selection processing
11332
- if (!editor.selection && isEmptyContent(editor.children)) {
11654
+ if (!isReadonly && isEmptyShow && isEmptyContent(editor.children)) {
11333
11655
  const firstElementChild = this.contextService.getFirstElementChild();
11334
11656
  const offsetTop = firstElementChild.offsetTop;
11335
11657
  const offsetLeft = firstElementChild.offsetLeft;
11336
11658
  this.updatePosition(offsetLeft, offsetTop);
11337
11659
  return;
11338
11660
  }
11339
- if (isCleanEmptyParagraph(editor)) {
11661
+ if (isMustShow && isCleanEmptyParagraph(editor)) {
11340
11662
  setTimeout(() => {
11341
11663
  var _a;
11342
11664
  const block = Node.ancestor(editor, [(_a = editor === null || editor === void 0 ? void 0 : editor.selection) === null || _a === void 0 ? void 0 : _a.anchor.path[0]]);
@@ -11357,12 +11679,12 @@ class ThePlaceholderComponent {
11357
11679
  }
11358
11680
  }
11359
11681
  ThePlaceholderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: ThePlaceholderComponent, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }, { token: TheContextService }], target: i0.ɵɵFactoryTarget.Component });
11360
- ThePlaceholderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: ThePlaceholderComponent, selector: "div[thePlaceholder]", inputs: { editor: "editor", placeholder: "placeholder" }, host: { listeners: { "document:compositionstart": "handleCompositionStart()", "document:compositionend": "handleCompositionEnd($event)" }, properties: { "class.hide": "isHide" }, classAttribute: "the-placeholder" }, ngImport: i0, template: `{{ placeholder }}`, isInline: true });
11682
+ ThePlaceholderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: ThePlaceholderComponent, selector: "div[thePlaceholder]", inputs: { editor: "editor", options: "options" }, host: { listeners: { "document:compositionstart": "handleCompositionStart()", "document:compositionend": "handleCompositionEnd($event)" }, properties: { "class.hide": "isHide" }, classAttribute: "the-placeholder" }, ngImport: i0, template: `{{ options?.placeholder }}`, isInline: true });
11361
11683
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: ThePlaceholderComponent, decorators: [{
11362
11684
  type: Component,
11363
11685
  args: [{
11364
11686
  selector: 'div[thePlaceholder]',
11365
- template: `{{ placeholder }}`,
11687
+ template: `{{ options?.placeholder }}`,
11366
11688
  host: {
11367
11689
  class: 'the-placeholder',
11368
11690
  '[class.hide]': 'isHide'
@@ -11370,7 +11692,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImpor
11370
11692
  }]
11371
11693
  }], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }, { type: TheContextService }]; }, propDecorators: { editor: [{
11372
11694
  type: Input
11373
- }], placeholder: [{
11695
+ }], options: [{
11374
11696
  type: Input
11375
11697
  }], handleCompositionStart: [{
11376
11698
  type: HostListener,
@@ -11571,7 +11893,7 @@ class TheEditorComponent extends mixinUnsubscribe(MixinBase) {
11571
11893
  if (options) {
11572
11894
  this.initializeOptions();
11573
11895
  }
11574
- if (((_a = options.currentValue) === null || _a === void 0 ? void 0 : _a.readonly) !== ((_b = options.previousValue) === null || _b === void 0 ? void 0 : _b.readonly)) {
11896
+ if (options && ((_a = options.currentValue) === null || _a === void 0 ? void 0 : _a.readonly) !== ((_b = options.previousValue) === null || _b === void 0 ? void 0 : _b.readonly)) {
11575
11897
  this.applyAutoFocus();
11576
11898
  }
11577
11899
  if (changes['theDecorate']) {
@@ -11594,7 +11916,9 @@ class TheEditorComponent extends mixinUnsubscribe(MixinBase) {
11594
11916
  this.theContextService.initialize({ nativeElement: this.elementRef.nativeElement, viewContainerRef: this.viewContainerRef });
11595
11917
  this.toolbarCalculate();
11596
11918
  setTimeout(() => {
11919
+ var _a;
11597
11920
  this.theEditorCreated.emit(this.editor);
11921
+ (_a = this.placeholderInstance) === null || _a === void 0 ? void 0 : _a.checkStatus();
11598
11922
  this.applyAutoFocus();
11599
11923
  });
11600
11924
  }
@@ -11776,7 +12100,7 @@ TheEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ver
11776
12100
  useExisting: forwardRef(() => TheEditorComponent),
11777
12101
  multi: true
11778
12102
  }
11779
- ], viewQueries: [{ propertyName: "templateInstance", first: true, predicate: ["templateInstance"], descendants: true, static: true }, { propertyName: "globalToolbarInstance", first: true, predicate: ["globalToolbar"], descendants: true }, { propertyName: "quickInsertInstance", first: true, predicate: ["quickInsert"], descendants: true, static: true }, { propertyName: "placeholderInstance", first: true, predicate: ["placeholder"], descendants: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<the-toolbar\n *ngIf=\"!theOptions?.readonly && !theGlobalToolbar\"\n [ngClass]=\"{\n 'the-toolbar-disabled': theOptions?.disabled\n }\"\n #globalToolbar\n [editor]=\"editor\"\n [toolbarItems]=\"toolbarEntity.global\"\n [containerClass]=\"globalToolbarClass\"\n [align]=\"theOptions?.toolbar?.align\"\n></the-toolbar>\n\n<div\n class=\"the-editable-container\"\n [ngClass]=\"{\n 'the-editor-disabled': theOptions?.disabled,\n 'max-height': maxHeight\n }\"\n [ngStyle]=\"{ 'max-height': maxHeight }\"\n>\n <slate-editable\n class=\"the-editor-typo\"\n [editor]=\"editor\"\n [ngModel]=\"editorValue\"\n (ngModelChange)=\"valueChange($event)\"\n [decorate]=\"decorate\"\n [renderElement]=\"renderElement\"\n [renderText]=\"renderText\"\n [renderLeaf]=\"renderLeaf\"\n [readonly]=\"theOptions?.readonly || theOptions?.disabled\"\n [keydown]=\"onKeyDown\"\n [click]=\"onClick\"\n [paste]=\"onSlaPaste\"\n [beforeInput]=\"onSlaBeforeInput\"\n [blur]=\"onSlaBlur\"\n [focus]=\"onSlaFocus\"\n [copy]=\"onSlaCopy\"\n [cut]=\"onSlaCut\"\n [isStrictDecorate]=\"false\"\n [compositionStart]=\"onSlaCompositionStart\"\n [compositionEnd]=\"onSlaCompositionEnd\"\n [dragStart]=\"onSlaDragStart\"\n [dragOver]=\"onSlaDragOver\"\n [drop]=\"onDrop\"\n (mousedown)=\"mousedown($event)\"\n ></slate-editable>\n <the-inline-toolbar *ngIf=\"!theOptions?.readonly\" [editor]=\"editor\" [toolbarItems]=\"toolbarEntity.inline\"></the-inline-toolbar>\n <div #quickInsert theQuickInsert [editor]=\"editor\" [quickToolbarItems]=\"quickToolbarItems\"></div>\n <div #placeholder thePlaceholder [editor]=\"editor\" [placeholder]=\"theOptions?.placeholder\"></div>\n <the-template #templateInstance></the-template>\n</div>\n", components: [{ type: TheToolbarComponent, selector: "the-toolbar", inputs: ["editor", "toolbarItems", "align", "containerClass", "isMore", "afterTemplate"] }, { type: i1.SlateEditableComponent, selector: "slate-editable", inputs: ["editor", "renderElement", "renderLeaf", "renderText", "decorate", "isStrictDecorate", "trackBy", "readonly", "beforeInput", "blur", "click", "compositionEnd", "compositionStart", "copy", "cut", "dragOver", "dragStart", "dragEnd", "drop", "focus", "keydown", "paste", "spellCheck", "autoCorrect", "autoCapitalize"] }, { type: TheInlineToolbarComponent, selector: "the-inline-toolbar", inputs: ["editor", "toolbarItems"] }, { type: TheQuickInsertComponent, selector: "[theQuickInsert]", inputs: ["editor", "quickToolbarItems"] }, { type: ThePlaceholderComponent, selector: "div[thePlaceholder]", inputs: ["editor", "placeholder"] }, { type: TheTemplateComponent, selector: "the-template,[theTemplate]" }], directives: [{ type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i6.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i4$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
12103
+ ], viewQueries: [{ propertyName: "templateInstance", first: true, predicate: ["templateInstance"], descendants: true, static: true }, { propertyName: "globalToolbarInstance", first: true, predicate: ["globalToolbar"], descendants: true }, { propertyName: "quickInsertInstance", first: true, predicate: ["quickInsert"], descendants: true, static: true }, { propertyName: "placeholderInstance", first: true, predicate: ["placeholder"], descendants: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<the-toolbar\n *ngIf=\"!theOptions?.readonly && !theGlobalToolbar\"\n [ngClass]=\"{\n 'the-toolbar-disabled': theOptions?.disabled\n }\"\n #globalToolbar\n [editor]=\"editor\"\n [toolbarItems]=\"toolbarEntity.global\"\n [containerClass]=\"globalToolbarClass\"\n [align]=\"theOptions?.toolbar?.align\"\n></the-toolbar>\n\n<div\n class=\"the-editable-container\"\n [ngClass]=\"{\n 'the-editor-disabled': theOptions?.disabled,\n 'max-height': maxHeight\n }\"\n [ngStyle]=\"{ 'max-height': maxHeight }\"\n>\n <slate-editable\n class=\"the-editor-typo\"\n [editor]=\"editor\"\n [ngModel]=\"editorValue\"\n (ngModelChange)=\"valueChange($event)\"\n [decorate]=\"decorate\"\n [renderElement]=\"renderElement\"\n [renderText]=\"renderText\"\n [renderLeaf]=\"renderLeaf\"\n [readonly]=\"theOptions?.readonly || theOptions?.disabled\"\n [keydown]=\"onKeyDown\"\n [click]=\"onClick\"\n [paste]=\"onSlaPaste\"\n [beforeInput]=\"onSlaBeforeInput\"\n [blur]=\"onSlaBlur\"\n [focus]=\"onSlaFocus\"\n [copy]=\"onSlaCopy\"\n [cut]=\"onSlaCut\"\n [isStrictDecorate]=\"false\"\n [compositionStart]=\"onSlaCompositionStart\"\n [compositionEnd]=\"onSlaCompositionEnd\"\n [dragStart]=\"onSlaDragStart\"\n [dragOver]=\"onSlaDragOver\"\n [drop]=\"onDrop\"\n (mousedown)=\"mousedown($event)\"\n ></slate-editable>\n <the-inline-toolbar *ngIf=\"!theOptions?.readonly\" [editor]=\"editor\" [toolbarItems]=\"toolbarEntity.inline\"></the-inline-toolbar>\n <div #quickInsert theQuickInsert [editor]=\"editor\" [quickToolbarItems]=\"quickToolbarItems\"></div>\n <div #placeholder thePlaceholder [editor]=\"editor\" [options]=\"theOptions\"></div>\n <the-template #templateInstance></the-template>\n</div>\n", components: [{ type: TheToolbarComponent, selector: "the-toolbar", inputs: ["editor", "toolbarItems", "align", "containerClass", "isMore", "afterTemplate"] }, { type: i1.SlateEditableComponent, selector: "slate-editable", inputs: ["editor", "renderElement", "renderLeaf", "renderText", "decorate", "placeholderDecorate", "isStrictDecorate", "trackBy", "readonly", "placeholder", "beforeInput", "blur", "click", "compositionEnd", "compositionStart", "copy", "cut", "dragOver", "dragStart", "dragEnd", "drop", "focus", "keydown", "paste", "spellCheck", "autoCorrect", "autoCapitalize"] }, { type: TheInlineToolbarComponent, selector: "the-inline-toolbar", inputs: ["editor", "toolbarItems"] }, { type: TheQuickInsertComponent, selector: "[theQuickInsert]", inputs: ["editor", "quickToolbarItems"] }, { type: ThePlaceholderComponent, selector: "div[thePlaceholder]", inputs: ["editor", "options"] }, { type: TheTemplateComponent, selector: "the-template,[theTemplate]" }], directives: [{ type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i6.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i4$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
11780
12104
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TheEditorComponent, decorators: [{
11781
12105
  type: Component,
11782
12106
  args: [{
@@ -11940,7 +12264,7 @@ class TheToolbarGroupComponent {
11940
12264
  }
11941
12265
  }
11942
12266
  TheToolbarGroupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TheToolbarGroupComponent, deps: [{ token: i0.ElementRef }, { token: i1$3.ThyPopover }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component });
11943
- TheToolbarGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheToolbarGroupComponent, selector: "the-toolbar-group", inputs: { menus: "menus", item: "item" }, host: { listeners: { "mousedown": "mousedownHandler($event)", "click": "clickHandle($event)" }, classAttribute: "the-toolbar-group" }, viewQueries: [{ propertyName: "groupTemplate", first: true, predicate: ["groupTemplate"], descendants: true, read: TemplateRef, static: true }], ngImport: i0, template: "<a thyIconNavLink [thyIconNavLinkIcon]=\"item.icon\" [thyTooltip]=\"item?.name\" thyTooltipPlacement=\"top\" [thyIconNavLinkActive]=\"active\"></a>\n\n<ng-template #groupTemplate>\n <the-toolbar class=\"group\" [editor]=\"editor\" [toolbarItems]=\"menus\" [isMore]=\"false\"></the-toolbar>\n</ng-template>\n", components: [{ type: i2.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: TheToolbarComponent, selector: "the-toolbar", inputs: ["editor", "toolbarItems", "align", "containerClass", "isMore", "afterTemplate"] }], directives: [{ type: i7.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }] });
12267
+ TheToolbarGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheToolbarGroupComponent, selector: "the-toolbar-group", inputs: { menus: "menus", item: "item" }, host: { listeners: { "mousedown": "mousedownHandler($event)", "click": "clickHandle($event)" }, classAttribute: "the-toolbar-group" }, viewQueries: [{ propertyName: "groupTemplate", first: true, predicate: ["groupTemplate"], descendants: true, read: TemplateRef, static: true }], ngImport: i0, 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.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: TheToolbarComponent, selector: "the-toolbar", inputs: ["editor", "toolbarItems", "align", "containerClass", "isMore", "afterTemplate"] }], directives: [{ type: i5$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }] });
11944
12268
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TheToolbarGroupComponent, decorators: [{
11945
12269
  type: Component,
11946
12270
  args: [{
@@ -11980,7 +12304,9 @@ const TETHYS = [
11980
12304
  ThySelectModule,
11981
12305
  ThyButtonModule,
11982
12306
  ThyNotifyModule,
11983
- ThyAlertModule
12307
+ ThyAlertModule,
12308
+ ThyResizableModule,
12309
+ ThySwitchModule
11984
12310
  ];
11985
12311
  const COMPONENTS = [
11986
12312
  TheToolbarComponent,
@@ -12000,7 +12326,8 @@ const COMPONENTS = [
12000
12326
  TheTableSelectComponent,
12001
12327
  TheTableToolbarItemComponent,
12002
12328
  TheConversionHintComponent,
12003
- TheVerticalToolbarItemComponent
12329
+ TheVerticalToolbarItemComponent,
12330
+ TheFontSizeToolbarItemComponent
12004
12331
  ];
12005
12332
  const PLUGIN_COMPONENTS = [
12006
12333
  TheImageComponent,
@@ -12043,7 +12370,8 @@ TheEditorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version
12043
12370
  TheTableSelectComponent,
12044
12371
  TheTableToolbarItemComponent,
12045
12372
  TheConversionHintComponent,
12046
- TheVerticalToolbarItemComponent, TheImageComponent,
12373
+ TheVerticalToolbarItemComponent,
12374
+ TheFontSizeToolbarItemComponent, TheImageComponent,
12047
12375
  TheTemplateComponent,
12048
12376
  TheHrComponent,
12049
12377
  TheBlockquoteComponent,
@@ -12074,7 +12402,9 @@ TheEditorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version
12074
12402
  ThySelectModule,
12075
12403
  ThyButtonModule,
12076
12404
  ThyNotifyModule,
12077
- ThyAlertModule, CodemirrorModule, TheColumnSizeModule], exports: [TheEditorComponent, TheToolbarComponent, TheToolbarDropdownComponent, TheToolbarItemComponent, TheDefaultElementComponent] });
12405
+ ThyAlertModule,
12406
+ ThyResizableModule,
12407
+ ThySwitchModule, CodemirrorModule, TheColumnSizeModule], exports: [TheEditorComponent, TheToolbarComponent, TheToolbarDropdownComponent, TheToolbarItemComponent, TheDefaultElementComponent] });
12078
12408
  TheEditorModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TheEditorModule, providers: [
12079
12409
  {
12080
12410
  provide: TheToolbarGroupToken,
@@ -12107,5 +12437,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImpor
12107
12437
  * Generated bundle index. Do not edit.
12108
12438
  */
12109
12439
 
12110
- export { ALIGN_BLOCK_TYPES, A_TAG_REL_ATTR, AlignEditor, Alignment, BLOCK_DELETEBACKWARD_TYPES, BLOCK_INSERT_ORIGIN, BlockquoteEditor, CLIPBOARD_FORMAT_KEY, CODEMIRROR_PADDING_TOP, CODE_MODES, COMPONENTS, CONTAINER_BLOCKS, CodeEditor, CodeMode, ColorEditor, DEFAULT_LANGUAGE, DEFAULT_SCROLL_CONTAINER, DefaultElementOptions, DefaultGlobalToolbarDefinition, DefaultInlineToolbarDefinition, DefaultQuickToolbarDefinition, DropdownMode, ELEMENT_UNIQUE_ID, ElementKinds, ErrorCodes, HEADING_TYPES, HeadingEditor, HrEditor, ImageEditor, LINK_DEFAULT_TEXT, LIST_BLOCK_TYPES, LinkEditor, ListEditor, MarkEditor, MarkProps, MarkTypes, PICTURE_ACCEPTED_UPLOAD_MIME, PICTURE_ACCEPTED_UPLOAD_SIZE, PLUGIN_COMPONENTS, QUICK_TOOLBAR_HOTKEY, QuickInsertEditor, STANDARD_HEADING_TYPES, TAB_SPACE, THE_CODE_MODE_PROVIDER, THE_CODE_MODE_TOKEN, THE_EDITOR_CONVERSION_HINT_REF, THE_EDITOR_QUICK_TOOLBAR_REF, THE_EDITOR_UUID, THE_INLINE_TOOLBAR_TYPES, THE_UPLOAD_SERVICE_TOKEN, TableEditor, TheBaseElementComponent, TheCodeMode, TheContextService, TheDataMode, TheDefaultElementComponent, TheEditor, TheEditorComponent, TheEditorModule, TheImageComponent, TheMode, index$1 as TheQueries, TheToolbarBaseItemComponent, TheToolbarComponent, TheToolbarDropdownComponent, TheToolbarGroupComponent, TheToolbarGroupToken, TheToolbarItemComponent, TheToolbarService, index as TheTransforms, TodoItemEditor, ToolbarActionTypes, ToolbarAlignment, ToolbarItemMode, ToolbarItemType, ToolbarMoreGroup, VOID_BLOCK_TYPES, VerticalAlignEditor, VerticalAlignment, ZERO_WIDTH_CHAR, createEmptyParagraph, dataDeserialize, dataSerializing, getToolbarClass, htmlToTheia, inValidTypes, plainToTheia, toolbarCompose, withTheEditor };
12440
+ export { ALIGN_BLOCK_TYPES, A_TAG_REL_ATTR, AlignEditor, Alignment, BLOCK_DELETEBACKWARD_TYPES, BlockquoteEditor, CLIPBOARD_FORMAT_KEY, CODEMIRROR_PADDING_TOP, CODE_MODES, COMPONENTS, CONTAINER_BLOCKS, CONTROL_KEY, CodeEditor, CodeMode, ColorEditor, DEFAULT_LANGUAGE, DEFAULT_SCROLL_CONTAINER, DefaultElementOptions, DefaultGlobalToolbarDefinition, DefaultInlineToolbarDefinition, DefaultQuickToolbarDefinition, DropdownMode, ELEMENT_UNIQUE_ID, ElementKinds, ErrorCodes, HEADING_TYPES, HeadingEditor, HrEditor, IS_MAC, ImageEditor, LINK_DEFAULT_TEXT, LIST_BLOCK_TYPES, LinkEditor, ListEditor, MarkEditor, MarkProps, MarkTypes, PICTURE_ACCEPTED_UPLOAD_MIME, PICTURE_ACCEPTED_UPLOAD_SIZE, PLUGIN_COMPONENTS, QUICK_TOOLBAR_HOTKEY, QuickInsertEditor, STANDARD_HEADING_TYPES, TAB_SPACE, THE_CODE_MODE_PROVIDER, THE_CODE_MODE_TOKEN, THE_EDITOR_CONVERSION_HINT_REF, THE_EDITOR_QUICK_TOOLBAR_REF, THE_EDITOR_UUID, THE_INLINE_TOOLBAR_TYPES, THE_UPLOAD_SERVICE_TOKEN, TableEditor, TheBaseElementComponent, TheCodeConfig, TheContextService, TheDataMode, TheDefaultElementComponent, TheEditor, TheEditorComponent, TheEditorModule, TheImageComponent, TheMode, index$1 as TheQueries, TheToolbarBaseItemComponent, TheToolbarComponent, TheToolbarDropdownComponent, TheToolbarGroupComponent, TheToolbarGroupToken, TheToolbarItemComponent, TheToolbarService, index as TheTransforms, TodoItemEditor, ToolbarActionTypes, ToolbarAlignment, ToolbarItemMode, ToolbarItemType, ToolbarMoreGroup, VOID_BLOCK_TYPES, VerticalAlignEditor, VerticalAlignment, ZERO_WIDTH_CHAR, createEmptyParagraph, dataDeserialize, dataSerializing, getToolbarClass, htmlToTheia, inValidTypes, plainToTheia, toolbarCompose, withTheEditor };
12111
12441
  //# sourceMappingURL=worktile-theia.js.map