@worktile/theia 1.2.15 → 1.2.20

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 (43) hide show
  1. package/bundles/worktile-theia.umd.js +457 -167
  2. package/bundles/worktile-theia.umd.js.map +1 -1
  3. package/constants/code.d.ts +3 -3
  4. package/constants/node-types.d.ts +2 -1
  5. package/custom-types.d.ts +3 -1
  6. package/editor.module.d.ts +43 -39
  7. package/esm2015/components/text/text.component.js +7 -2
  8. package/esm2015/constants/code.js +2 -2
  9. package/esm2015/constants/node-types.js +4 -2
  10. package/esm2015/constants/toolbar.js +2 -1
  11. package/esm2015/custom-types.js +1 -1
  12. package/esm2015/editor.component.js +1 -1
  13. package/esm2015/editor.module.js +14 -5
  14. package/esm2015/plugins/code/code.component.js +88 -34
  15. package/esm2015/plugins/code/code.editor.js +3 -9
  16. package/esm2015/plugins/common/block-card.plugin.js +51 -5
  17. package/esm2015/plugins/font-size/options.js +11 -0
  18. package/esm2015/plugins/font-size/toolbar-item.component.js +129 -0
  19. package/esm2015/plugins/index.js +3 -1
  20. package/esm2015/plugins/placeholder/placeholder.component.js +4 -3
  21. package/esm2015/plugins/table/table.editor.js +10 -2
  22. package/esm2015/plugins/table/table.plugin.js +53 -19
  23. package/esm2015/plugins/table/utils/calc-span.js +2 -2
  24. package/esm2015/plugins/table/utils/normalize-table.js +3 -3
  25. package/esm2015/plugins/table/utils/table-position.js +5 -2
  26. package/esm2015/queries/is-empty-content.js +2 -2
  27. package/esm2015/queries/is-empty-paragraph.js +6 -2
  28. package/fesm2015/worktile-theia.js +415 -133
  29. package/fesm2015/worktile-theia.js.map +1 -1
  30. package/package.json +1 -1
  31. package/plugins/code/code.component.d.ts +20 -5
  32. package/plugins/code/code.component.scss +46 -7
  33. package/plugins/code/code.editor.d.ts +3 -2
  34. package/plugins/font-size/options.d.ts +3 -0
  35. package/plugins/font-size/toolbar-item.component.d.ts +35 -0
  36. package/plugins/font-size/toolbar-item.component.scss +24 -0
  37. package/plugins/table/table.editor.d.ts +2 -0
  38. package/plugins/table/utils/calc-span.d.ts +1 -1
  39. package/queries/get-selection-marks.d.ts +1 -0
  40. package/styles/editor.scss +6 -0
  41. package/styles/index.scss +1 -0
  42. package/styles/typo.scss +8 -23
  43. package/transforms/set-marks.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 i8 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 i6$1 from 'ngx-tethys/switch';
44
+ import { ThySwitchModule } from 'ngx-tethys/switch';
45
+ import * as i9 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
52
  import * as i5$3 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';
@@ -117,6 +121,7 @@ var MarkTypes;
117
121
  MarkTypes["color"] = "color";
118
122
  MarkTypes["backgroundColor"] = "background-color";
119
123
  MarkTypes["codeLine"] = "code-line";
124
+ MarkTypes["fontSize"] = "font-size";
120
125
  })(MarkTypes || (MarkTypes = {}));
121
126
  var ToolbarActionTypes;
122
127
  (function (ToolbarActionTypes) {
@@ -145,7 +150,8 @@ const MarkProps = [
145
150
  MarkTypes.color,
146
151
  MarkTypes.italic,
147
152
  MarkTypes.strike,
148
- MarkTypes.underline
153
+ MarkTypes.underline,
154
+ MarkTypes.fontSize
149
155
  ];
150
156
  const THE_INLINE_TOOLBAR_TYPES = [ElementKinds.default, ElementKinds.listItem, ElementKinds.checkItem];
151
157
  const STANDARD_HEADING_TYPES = [
@@ -175,6 +181,7 @@ var ToolbarItemMode;
175
181
  })(ToolbarItemMode || (ToolbarItemMode = {}));
176
182
  const DefaultGlobalToolbarDefinition = [
177
183
  ElementKinds.headingList,
184
+ MarkTypes.fontSize,
178
185
  ToolbarActionTypes.split,
179
186
  MarkTypes.bold,
180
187
  MarkTypes.italic,
@@ -309,7 +316,7 @@ const CodeMode = {
309
316
  default: 'default',
310
317
  print: 'print'
311
318
  };
312
- class TheCodeMode {
319
+ class TheCodeConfig {
313
320
  }
314
321
  const THE_CODE_MODE_TOKEN = new InjectionToken('the-code-mode');
315
322
  const THE_CODE_MODE_PROVIDER = {
@@ -325,7 +332,7 @@ class TheTextComponent extends BaseTextComponent {
325
332
  super(elementRef, cdr);
326
333
  this.elementRef = elementRef;
327
334
  this.renderer2 = renderer2;
328
- this.excludes = ['color', 'background-color', 'text'];
335
+ this.excludes = ['color', 'font-size', 'background-color', 'text'];
329
336
  this.attributes = [];
330
337
  }
331
338
  applyTextMark() {
@@ -340,6 +347,11 @@ class TheTextComponent extends BaseTextComponent {
340
347
  this.attributes.push(attr);
341
348
  }
342
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
+ }
343
355
  if (this.text[MarkTypes.color]) {
344
356
  this.renderer2.setStyle(this.elementRef.nativeElement, 'color', this.text[MarkTypes.color]);
345
357
  }
@@ -499,7 +511,11 @@ const getAnchorBlockEntry = (editor, at) => {
499
511
  };
500
512
 
501
513
  const isEmptyParagraph = (editor, at) => {
502
- const [block] = getAnchorBlockEntry(editor, at);
514
+ const entry = getAnchorBlockEntry(editor, at);
515
+ if (!entry) {
516
+ return false;
517
+ }
518
+ const [block] = entry;
503
519
  return Editor.isEmpty(editor, block) && block.type === ElementKinds.paragraph;
504
520
  };
505
521
 
@@ -1144,7 +1160,7 @@ const isEmptyContent = (children) => {
1144
1160
  }
1145
1161
  if (children && children.length === 1) {
1146
1162
  const firstNode = children[0];
1147
- if (firstNode.type === ElementKinds.default && !Node.string(firstNode)) {
1163
+ if (firstNode.type === ElementKinds.default && firstNode.children.length === 1 && !Node.string(firstNode)) {
1148
1164
  return true;
1149
1165
  }
1150
1166
  }
@@ -4204,20 +4220,66 @@ const withBlockCard = (editor) => {
4204
4220
  // block card cursor
4205
4221
  if (anchorNode && hasBlockCard(domSelection)) {
4206
4222
  const isCardLeftCursor = isCardLeft(anchorNode);
4207
- // + left-block-card 或者 → + right-block-card
4208
- 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
+ }
4209
4236
  nativeEvent.preventDefault();
4237
+ return;
4238
+ }
4239
+ if (isMoveDown) {
4210
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)) {
4257
+ nativeEvent.preventDefault();
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
+ }
4211
4266
  const after = Editor.after(editor, path);
4212
4267
  if (after) {
4213
4268
  Transforms.select(editor, Editor.after(editor, path));
4214
4269
  }
4215
4270
  return;
4216
4271
  }
4217
- // ↑ + right-block-card 或者 ← + left-block-card
4218
- if ((isMoveUp && !isCardLeftCursor) || (isMoveBackward && isCardLeftCursor)) {
4272
+ // ← + left-block-card
4273
+ if (isMoveBackward && isCardLeftCursor) {
4219
4274
  nativeEvent.preventDefault();
4220
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
+ }
4221
4283
  const before = Editor.before(editor, path);
4222
4284
  if (before) {
4223
4285
  Transforms.select(editor, before);
@@ -4599,11 +4661,14 @@ class TablePosition {
4599
4661
  columnIndex++;
4600
4662
  nextCell = this.table.children[rowIndex].children[columnIndex];
4601
4663
  }
4602
- else {
4664
+ else if (rowIndex + 1 < this.getHeight()) {
4603
4665
  columnIndex = 0;
4604
4666
  rowIndex++;
4605
4667
  nextCell = this.table.children[rowIndex].children[columnIndex];
4606
4668
  }
4669
+ else {
4670
+ nextCell = null;
4671
+ }
4607
4672
  }
4608
4673
  return nextCell;
4609
4674
  }
@@ -4754,7 +4819,7 @@ function calcSpanForColumn(table, targetIndex) {
4754
4819
  return rowspans.some(rowspan => isInside(rowspan, rowIndx, targetIndex));
4755
4820
  });
4756
4821
  }
4757
- function calcOriginSpan(table, targetRowIndex, targetColumnIndex) {
4822
+ function getOriginCell(table, targetRowIndex, targetColumnIndex) {
4758
4823
  for (let rowIndex = 0; rowIndex <= targetRowIndex; rowIndex++) {
4759
4824
  const row = table.children[rowIndex];
4760
4825
  const originCell = row.children
@@ -5252,6 +5317,13 @@ const TableEditor = {
5252
5317
  isActiveHeader(editor) {
5253
5318
  const [tableRowEntry] = Editor.nodes(editor, { match: (n) => n.type === ElementKinds.tableRow });
5254
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
+ }
5255
5327
  }
5256
5328
  };
5257
5329
 
@@ -5930,7 +6002,7 @@ TheColorToolbarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12
5930
6002
  thyIconName="caret-down"
5931
6003
  ></thy-icon>
5932
6004
  </a>
5933
- `, 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"] }] });
5934
6006
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TheColorToolbarItemComponent, decorators: [{
5935
6007
  type: Component,
5936
6008
  args: [{
@@ -6032,15 +6104,9 @@ const withRemoveVoid = (editor) => {
6032
6104
  };
6033
6105
 
6034
6106
  const CodeEditor = {
6035
- setLanguage(editor, language, element) {
6036
- const at = AngularEditor.findPath(editor, element);
6037
- Transforms.setNodes(editor, { language }, {
6038
- at
6039
- });
6040
- },
6041
- setCodeContent(editor, content, element) {
6107
+ setCodeAttribute(editor, element, value) {
6042
6108
  const at = AngularEditor.findPath(editor, element);
6043
- Transforms.setNodes(editor, { content }, {
6109
+ Transforms.setNodes(editor, value, {
6044
6110
  at
6045
6111
  });
6046
6112
  },
@@ -6205,8 +6271,8 @@ class TheToolbarDropdownComponent extends TheToolbarBaseItemComponent {
6205
6271
  .withPositions([bottomPosition, topPosition]);
6206
6272
  }
6207
6273
  }
6208
- 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 });
6209
- 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]" }] });
6210
6276
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TheToolbarDropdownComponent, decorators: [{
6211
6277
  type: Component,
6212
6278
  args: [{
@@ -6216,7 +6282,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImpor
6216
6282
  class: 'the-toolbar-dropdown-container'
6217
6283
  }
6218
6284
  }]
6219
- }], 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: [{
6220
6286
  type: Input
6221
6287
  }], menus: [{
6222
6288
  type: Input
@@ -6243,40 +6309,85 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImpor
6243
6309
  args: ['document: mousedown', ['$event']]
6244
6310
  }] } });
6245
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
+
6246
6346
  class TheCodeComponent extends TheBaseElementComponent {
6247
- constructor(elementRef, cdr, thyNotifyService, ngZone, mode) {
6347
+ constructor(elementRef, cdr, thyNotifyService, contextService, ngZone, config) {
6248
6348
  super(elementRef, cdr);
6249
6349
  this.elementRef = elementRef;
6250
6350
  this.cdr = cdr;
6251
6351
  this.thyNotifyService = thyNotifyService;
6352
+ this.contextService = contextService;
6252
6353
  this.ngZone = ngZone;
6253
- this.mode = mode;
6354
+ this.config = config;
6254
6355
  this.startRenderCodemirror = false;
6255
6356
  this.dropdownMode = DropdownMode;
6256
- this.maxHeight = this.mode === CodeMode.default ? 350 - CODEMIRROR_PADDING_TOP * 2 : 0;
6257
6357
  this.codeMirrorFocused = false;
6358
+ this.maxHeight = this.config.mode === CodeMode.default ? 350 - CODEMIRROR_PADDING_TOP * 2 : 0;
6258
6359
  this.menus = CODE_MODES.map(item => {
6259
6360
  return { key: item.value, name: item.showName };
6260
6361
  });
6362
+ this.ToolbarItemMode = ToolbarItemMode;
6363
+ this.isAutoWrap = false;
6364
+ this.isResizing = false;
6365
+ this.resizeHeight = null;
6261
6366
  this.options = {
6262
6367
  mode: this.menus[0].key,
6263
6368
  lineNumbers: false,
6264
6369
  readOnly: false,
6265
6370
  autofocus: false,
6266
6371
  lineWiseCopyCut: true,
6267
- lineWrapping: this.mode === CodeMode.default ? false : true,
6372
+ lineWrapping: this.config.mode === CodeMode.default ? false : true,
6268
6373
  cursorBlinkRate: 500
6269
6374
  };
6270
6375
  this.actives = this.menus[0];
6376
+ this.resizeBounds = null;
6271
6377
  this.onChangeLangulage = item => {
6272
6378
  this.options = Object.assign(Object.assign({}, this.options), { mode: item.key });
6273
6379
  this.actives = item;
6274
- CodeEditor.setLanguage(this.editor, item.key, this.element);
6380
+ CodeEditor.setCodeAttribute(this.editor, this.element, { langulage: item.key });
6275
6381
  };
6276
6382
  }
6277
6383
  get code() {
6278
6384
  return this.element.content;
6279
6385
  }
6386
+ handleCodeMousedown(event) {
6387
+ if (!(event.target instanceof HTMLElement && this.elementRef.nativeElement.contains(event.target))) {
6388
+ this.codeMirrorFocused = false;
6389
+ }
6390
+ }
6280
6391
  onContextChange() {
6281
6392
  super.onContextChange();
6282
6393
  if (this.initialized) {
@@ -6286,6 +6397,9 @@ class TheCodeComponent extends TheBaseElementComponent {
6286
6397
  if (this.options.mode !== this.element.language) {
6287
6398
  this.useMode();
6288
6399
  }
6400
+ if (!this.readonly && this.isCollapsed) {
6401
+ this.initializeCodemirrorFocus();
6402
+ }
6289
6403
  }
6290
6404
  }
6291
6405
  ngOnInit() {
@@ -6305,17 +6419,26 @@ class TheCodeComponent extends TheBaseElementComponent {
6305
6419
  this.ngZone.onStable.pipe(take(1)).subscribe(() => {
6306
6420
  this.renderCodemirror();
6307
6421
  this.initializeCodemirrorFocus();
6422
+ this.resizeBounds = {
6423
+ nativeElement: this.contextService.getEditableElement()
6424
+ };
6308
6425
  });
6309
6426
  }
6310
6427
  }
6428
+ focusChange(codeMirrorFocused) {
6429
+ if (codeMirrorFocused)
6430
+ this.codeMirrorFocused = codeMirrorFocused;
6431
+ }
6311
6432
  renderCodemirror() {
6312
6433
  this.startRenderCodemirror = true;
6313
6434
  this.useReadonly();
6314
6435
  this.useMode();
6436
+ this.useAutoWrap();
6437
+ this.useHeight();
6315
6438
  this.cdr.detectChanges();
6316
6439
  }
6317
6440
  initializeCodemirrorFocus() {
6318
- if (this.isCollapsed) {
6441
+ if (this.isCollapsed && !this.isResizing) {
6319
6442
  setTimeout(() => {
6320
6443
  if (this.isCollapsed && this.codemirror && this.codemirror.editor && !this.codemirror.editor.hasFocus()) {
6321
6444
  AngularEditor.blur(this.editor);
@@ -6326,13 +6449,11 @@ class TheCodeComponent extends TheBaseElementComponent {
6326
6449
  }
6327
6450
  }
6328
6451
  codeChange($event) {
6329
- CodeEditor.setCodeContent(this.editor, $event, this.element);
6330
- }
6331
- focusChange(codeMirrorFocused) {
6332
- this.codeMirrorFocused = codeMirrorFocused;
6452
+ CodeEditor.setCodeAttribute(this.editor, this.element, { content: $event });
6333
6453
  }
6334
6454
  onDelete(event) {
6335
6455
  event.preventDefault();
6456
+ this.codeMirrorFocused = false;
6336
6457
  deleteElement(this.editor, this.element);
6337
6458
  }
6338
6459
  onCopy(event) {
@@ -6343,27 +6464,53 @@ class TheCodeComponent extends TheBaseElementComponent {
6343
6464
  if (selection.rangeCount > 0) {
6344
6465
  selection.removeAllRanges();
6345
6466
  }
6346
- // focus the element
6347
- setTimeout(() => {
6348
- AngularEditor.focus(this.editor);
6349
- Transforms.select(this.editor, AngularEditor.findPath(this.editor, this.element));
6350
- });
6351
- // copy the element
6352
- setTimeout(() => {
6353
- document.execCommand('copy');
6354
- this.thyNotifyService.success('复制成功');
6355
- }, 200);
6467
+ AngularEditor.focus(this.editor);
6468
+ Transforms.select(this.editor, AngularEditor.findPath(this.editor, this.element));
6469
+ document.execCommand('copy');
6470
+ this.thyNotifyService.success('复制成功');
6471
+ AngularEditor.deselect(this.editor);
6472
+ this.codeMirrorFocused = false;
6356
6473
  }
6357
6474
  useMode() {
6358
6475
  this.options = Object.assign(Object.assign({}, this.options), { mode: this.element.language });
6359
6476
  this.actives = this.menus.find(i => i.key === this.element.language);
6360
6477
  }
6478
+ useAutoWrap() {
6479
+ if (this.element.autoWrap) {
6480
+ this.cdr.detectChanges();
6481
+ this.isAutoWrap = this.element.autoWrap;
6482
+ this.codemirror.setOptionIfChanged('lineWrapping', this.element.autoWrap);
6483
+ }
6484
+ }
6485
+ useHeight() {
6486
+ if (this.element.height) {
6487
+ this.resizeHeight = this.element.height;
6488
+ this.maxHeight = this.element.height;
6489
+ }
6490
+ }
6361
6491
  useReadonly() {
6362
6492
  this.options = Object.assign(Object.assign({}, this.options), { readOnly: this.readonly, cursorBlinkRate: this.readonly ? -1 : 500 });
6363
6493
  }
6494
+ onResize({ height }) {
6495
+ this.resizeHeight = height;
6496
+ Transforms.select(this.editor, AngularEditor.findPath(this.editor, this.element));
6497
+ CodeEditor.setCodeAttribute(this.editor, this.element, { height });
6498
+ this.maxHeight = height;
6499
+ }
6500
+ onStartResize() {
6501
+ this.isResizing = true;
6502
+ }
6503
+ onEndResize() {
6504
+ this.isResizing = false;
6505
+ }
6506
+ onChangeWrap(value) {
6507
+ AngularEditor.deselect(this.editor);
6508
+ this.codemirror.setOptionIfChanged('lineWrapping', value);
6509
+ CodeEditor.setCodeAttribute(this.editor, this.element, { autoWrap: value ? value : null });
6510
+ }
6364
6511
  }
6365
- 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 });
6366
- 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 });
6512
+ 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: TheContextService }, { token: i0.NgZone }, { token: THE_CODE_MODE_TOKEN }], target: i0.ɵɵFactoryTarget.Component });
6513
+ 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 [thyBounds]=\"resizeBounds\"\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: i6$1.ThySwitchComponent, selector: "thy-switch", inputs: ["thyType", "thySize", "thyDisabled"], outputs: ["thyChange"] }, { type: i1.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }, { type: i8.CodeMirrorComponent, selector: "ng-codemirror, [ngCodeMirror]", inputs: ["autoMaxHeight", "delayRefreshTime", "options"], outputs: ["focusChange"] }, { type: i9.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: i9.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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
6367
6514
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TheCodeComponent, decorators: [{
6368
6515
  type: Component,
6369
6516
  args: [{
@@ -6371,12 +6518,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImpor
6371
6518
  templateUrl: './code.component.html',
6372
6519
  changeDetection: ChangeDetectionStrategy.OnPush
6373
6520
  }]
6374
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i1$4.ThyNotifyService }, { type: i0.NgZone }, { type: CodeMode, decorators: [{
6521
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i1$4.ThyNotifyService }, { type: TheContextService }, { type: i0.NgZone }, { type: TheCodeConfig, decorators: [{
6375
6522
  type: Inject,
6376
6523
  args: [THE_CODE_MODE_TOKEN]
6377
6524
  }] }]; }, propDecorators: { codemirror: [{
6378
6525
  type: ViewChild,
6379
6526
  args: ['codemirror', { read: CodeMirrorComponent, static: false }]
6527
+ }], handleCodeMousedown: [{
6528
+ type: HostListener,
6529
+ args: ['document: mousedown', ['$event']]
6380
6530
  }] } });
6381
6531
 
6382
6532
  const withCode = (editor) => {
@@ -6587,7 +6737,7 @@ class TheLinkEditComponent {
6587
6737
  }
6588
6738
  }
6589
6739
  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 });
6590
- 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"] }] });
6740
+ 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$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$1.ThyFormSubmitDirective, selector: "[thyFormSubmit],[thy-form-submit]", outputs: ["thyFormSubmit"] }] });
6591
6741
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TheLinkEditComponent, decorators: [{
6592
6742
  type: Component,
6593
6743
  args: [{
@@ -6727,7 +6877,7 @@ class TheBaseLinkComponent extends TheBaseElementComponent {
6727
6877
  this.close(LinkCloseTypes.destroy);
6728
6878
  }
6729
6879
  }
6730
- 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 });
6880
+ 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 });
6731
6881
  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 });
6732
6882
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TheBaseLinkComponent, decorators: [{
6733
6883
  type: Component,
@@ -6735,7 +6885,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImpor
6735
6885
  selector: '[TheBaseLinkComponent]',
6736
6886
  template: ''
6737
6887
  }]
6738
- }], 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: [{
6888
+ }], 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: [{
6739
6889
  type: HostListener,
6740
6890
  args: ['click', ['$event']]
6741
6891
  }] } });
@@ -6908,7 +7058,7 @@ class TheTableToolbarItemComponent extends TheToolbarBaseItemComponent {
6908
7058
  return this.tableSelectRef;
6909
7059
  }
6910
7060
  }
6911
- 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 });
7061
+ 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 });
6912
7062
  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: `
6913
7063
  <a
6914
7064
  thyIconNavLink
@@ -6921,7 +7071,7 @@ TheTableToolbarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12
6921
7071
  <thy-icon [thyIconName]="item.icon"></thy-icon>
6922
7072
  <thy-icon class="link-down-icon font-size-sm text-desc table-down-icon" thyIconName="caret-down"> </thy-icon>
6923
7073
  </a>
6924
- `, 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"] }] });
7074
+ `, 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"] }] });
6925
7075
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TheTableToolbarItemComponent, decorators: [{
6926
7076
  type: Component,
6927
7077
  args: [{
@@ -6943,7 +7093,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImpor
6943
7093
  class: 'the-toolbar-dropdown-container'
6944
7094
  }
6945
7095
  }]
6946
- }], ctorParameters: function () { return [{ type: i1$6.ThyPopover }, { type: i2$1.Overlay }]; }, propDecorators: { item: [{
7096
+ }], ctorParameters: function () { return [{ type: i1$6.ThyPopover }, { type: i2.Overlay }]; }, propDecorators: { item: [{
6947
7097
  type: Input
6948
7098
  }], editor: [{
6949
7099
  type: Input
@@ -7632,40 +7782,6 @@ function setCellMenuInvisibility(editor, menuList, selectedCells, isActiveSelect
7632
7782
  });
7633
7783
  }
7634
7784
 
7635
- class NavSplitLineComponent {
7636
- constructor() {
7637
- this.mode = ToolbarItemMode.vertical;
7638
- this.theNavSplitLine = true;
7639
- }
7640
- get horizontal() {
7641
- return this.mode === ToolbarItemMode.horizontal;
7642
- }
7643
- get vertical() {
7644
- return this.mode === ToolbarItemMode.vertical;
7645
- }
7646
- ngOnInit() { }
7647
- }
7648
- NavSplitLineComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: NavSplitLineComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
7649
- 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 });
7650
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: NavSplitLineComponent, decorators: [{
7651
- type: Component,
7652
- args: [{
7653
- selector: 'nav-split-line',
7654
- template: ''
7655
- }]
7656
- }], ctorParameters: function () { return []; }, propDecorators: { mode: [{
7657
- type: Input
7658
- }], theNavSplitLine: [{
7659
- type: HostBinding,
7660
- args: ['class.the-nav-split-line']
7661
- }], horizontal: [{
7662
- type: HostBinding,
7663
- args: ['class.horizontal']
7664
- }], vertical: [{
7665
- type: HostBinding,
7666
- args: ['class.vertical']
7667
- }] } });
7668
-
7669
7785
  class TheTableToolbarComponent {
7670
7786
  constructor(ngZone, colorSelectService, popoverRef) {
7671
7787
  this.ngZone = ngZone;
@@ -7776,7 +7892,7 @@ class TheTableToolbarComponent {
7776
7892
  }
7777
7893
  }
7778
7894
  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 });
7779
- 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"] }] });
7895
+ 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"] }] });
7780
7896
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TheTableToolbarComponent, decorators: [{
7781
7897
  type: Component,
7782
7898
  args: [{
@@ -7839,7 +7955,7 @@ class TheContextMenuComponent {
7839
7955
  ngOnInit() { }
7840
7956
  }
7841
7957
  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 });
7842
- 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]" }] });
7958
+ 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]" }] });
7843
7959
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TheContextMenuComponent, decorators: [{
7844
7960
  type: Component,
7845
7961
  args: [{
@@ -8128,11 +8244,11 @@ class TableService {
8128
8244
  });
8129
8245
  }
8130
8246
  }
8131
- 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 });
8247
+ 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 });
8132
8248
  TableService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TableService });
8133
8249
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TableService, decorators: [{
8134
8250
  type: Injectable
8135
- }], ctorParameters: function () { return [{ type: i1$3.ThyPopover }, { type: i2$1.Overlay }, { type: TableStore }, { type: TheTableContextMenuService }, { type: i0.NgZone }, { type: TheContextService }]; } });
8251
+ }], ctorParameters: function () { return [{ type: i1$3.ThyPopover }, { type: i2.Overlay }, { type: TableStore }, { type: TheTableContextMenuService }, { type: i0.NgZone }, { type: TheContextService }]; } });
8136
8252
 
8137
8253
  const SLA_TABLE_SELECTOR = '.slate-element-table';
8138
8254
  const SLA_TABLE_CELL_SELECTOR = '.slate-element-table-cell';
@@ -8211,7 +8327,7 @@ class TheInsertMarkComponent {
8211
8327
  ngOnDestroy() { }
8212
8328
  }
8213
8329
  TheInsertMarkComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TheInsertMarkComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
8214
- 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"] }] });
8330
+ 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"] }] });
8215
8331
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TheInsertMarkComponent, decorators: [{
8216
8332
  type: Component,
8217
8333
  args: [{
@@ -9757,7 +9873,7 @@ class TheTdComponent extends TheBaseElementComponent {
9757
9873
  this.destroy$.complete();
9758
9874
  }
9759
9875
  }
9760
- 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 });
9876
+ 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 });
9761
9877
  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"] }] });
9762
9878
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TheTdComponent, decorators: [{
9763
9879
  type: Component,
@@ -9766,7 +9882,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImpor
9766
9882
  templateUrl: './td.component.html',
9767
9883
  providers: [ColumnResizingStore]
9768
9884
  }]
9769
- }], 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: [{
9885
+ }], 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: [{
9770
9886
  type: HostBinding,
9771
9887
  args: ['style.backgroundColor']
9772
9888
  }], colspan: [{
@@ -9803,7 +9919,7 @@ const normalizeTable = (table) => {
9803
9919
  }
9804
9920
  // case 2
9805
9921
  if (cell.hidden && !normalizedNodes.includes(cell)) {
9806
- const origin = calcOriginSpan(table, rowIndex, columnIndex);
9922
+ const origin = getOriginCell(table, rowIndex, columnIndex);
9807
9923
  if (!origin) {
9808
9924
  delete table.children[rowIndex].children[columnIndex].hidden;
9809
9925
  }
@@ -9814,7 +9930,7 @@ const normalizeTable = (table) => {
9814
9930
  };
9815
9931
 
9816
9932
  const withTable = (editor) => {
9817
- const { deleteBackward, deleteForward, onKeydown, setFragmentData, insertData, normalizeNode, isBlockCard, renderElement, deleteCutData, isContainer } = editor;
9933
+ const { deleteBackward, deleteForward, onKeydown, setFragmentData, insertData, normalizeNode, isBlockCard, renderElement, deleteCutData, isContainer, onChange } = editor;
9818
9934
  editor.deleteBackward = unit => {
9819
9935
  const opts = new TableOptions$1();
9820
9936
  if (!isSelectionInTable(opts, editor)) {
@@ -9885,13 +10001,11 @@ const withTable = (editor) => {
9885
10001
  const aboveCell = aboveRow && aboveRow.children[startPosition.getColumnIndex()];
9886
10002
  if (aboveCell) {
9887
10003
  if (aboveCell.hidden) {
9888
- const originSpan = calcOriginSpan(endPosition.table, startPosition.getRowIndex() - 1, startPosition.getColumnIndex());
9889
- if (originSpan) {
9890
- at = Editor.start(editor, TheEditor.findPath(editor, originSpan));
9891
- }
10004
+ TableEditor.selectOriginCell(editor, startPosition.table, startPosition.getRowIndex() - 1, startPosition.getColumnIndex(), false);
10005
+ return;
9892
10006
  }
9893
10007
  else {
9894
- at = Editor.start(editor, TheEditor.findPath(editor, aboveCell));
10008
+ at = Editor.end(editor, TheEditor.findPath(editor, aboveCell));
9895
10009
  }
9896
10010
  }
9897
10011
  else {
@@ -9920,10 +10034,8 @@ const withTable = (editor) => {
9920
10034
  const belowCell = belowRow && belowRow.children[startPosition.getColumnIndex()];
9921
10035
  if (belowCell) {
9922
10036
  if (belowCell.hidden) {
9923
- const originSpan = calcOriginSpan(endPosition.table, belowRowIndex, startPosition.getColumnIndex());
9924
- if (originSpan) {
9925
- at = Editor.start(editor, TheEditor.findPath(editor, originSpan));
9926
- }
10037
+ TableEditor.selectOriginCell(editor, startPosition.table, startPosition.getRowIndex() + 1, startPosition.getColumnIndex(), true);
10038
+ return;
9927
10039
  }
9928
10040
  else {
9929
10041
  at = Editor.start(editor, TheEditor.findPath(editor, belowCell));
@@ -9942,18 +10054,27 @@ const withTable = (editor) => {
9942
10054
  const beforePoint = Editor.before(editor, editor.selection);
9943
10055
  const beforePosition = beforePoint && TablePosition.create(opts, editor, beforePoint.path);
9944
10056
  if (beforePosition && beforePosition.cell && beforePosition.cell.hidden) {
10057
+ event.preventDefault();
9945
10058
  const at = Editor.end(editor, TheEditor.findPath(editor, beforePosition.findPrevious()));
9946
10059
  Transforms.select(editor, at);
9947
- event.preventDefault();
9948
10060
  }
9949
10061
  }
9950
10062
  if (isMoveForward) {
9951
10063
  const afterPoint = Editor.after(editor, editor.selection);
9952
10064
  const afterPosition = afterPoint && TablePosition.create(opts, editor, afterPoint.path);
9953
10065
  if (afterPosition.cell && afterPosition.cell.hidden) {
9954
- const at = Editor.start(editor, TheEditor.findPath(editor, afterPosition.findNext()));
9955
- Transforms.select(editor, at);
9956
10066
  event.preventDefault();
10067
+ const nextCell = afterPosition.findNext();
10068
+ if (nextCell) {
10069
+ const at = Editor.start(editor, TheEditor.findPath(editor, afterPosition.findNext()));
10070
+ Transforms.select(editor, at);
10071
+ event.preventDefault();
10072
+ }
10073
+ else {
10074
+ AngularEditor.moveBlockCard(editor, startPosition.tableEntry[0], { direction: 'right' });
10075
+ event.preventDefault();
10076
+ }
10077
+ return;
9957
10078
  }
9958
10079
  }
9959
10080
  // Prevent deleting cells in the table
@@ -10023,12 +10144,12 @@ const withTable = (editor) => {
10023
10144
  }
10024
10145
  if (tableFragment) {
10025
10146
  tableFragment = normalizeTable(_.cloneDeep(tableFragment));
10147
+ const plainText = Node.string(tableFragment);
10026
10148
  tableFragment = [tableFragment];
10027
10149
  const stringObj = JSON.stringify(tableFragment);
10028
10150
  const encoded = window.btoa(encodeURIComponent(stringObj));
10029
10151
  unit.setData(`application/${CLIPBOARD_FORMAT_KEY}`, encoded);
10030
- // unit.setData('text/html', div.innerHTML);
10031
- unit.setData('text/plain', Node.string(tableFragment));
10152
+ unit.setData('text/plain', plainText);
10032
10153
  return;
10033
10154
  }
10034
10155
  setFragmentData(unit);
@@ -10053,7 +10174,7 @@ const withTable = (editor) => {
10053
10174
  for (let j = selectColIndex; j <= lastColIndex; j++) {
10054
10175
  const row = tablePosition.table.children[i];
10055
10176
  if (row && row.children[j]) {
10056
- const originCell = calcOriginSpan(tablePosition.table, i, j);
10177
+ const originCell = getOriginCell(tablePosition.table, i, j);
10057
10178
  if (originCell && (originCell.colspan || originCell.rowspan)) {
10058
10179
  const path = TheEditor.findPath(editor, originCell).slice(-2);
10059
10180
  resetTableCell(editor, tablePosition.table, originCell, path[0], path[1]);
@@ -10111,6 +10232,21 @@ const withTable = (editor) => {
10111
10232
  Transforms.setNodes(editor, { columns }, { at: entry[1] });
10112
10233
  }
10113
10234
  }
10235
+ // adjust selection when selection is in hidden cell
10236
+ if (Element$1.isElement(entry[0]) && entry[0].type === ElementKinds.tableCell && entry[0].hidden) {
10237
+ if (editor.selection && Range.isCollapsed(editor.selection) && Path.isAncestor(entry[1], editor.selection.anchor.path)) {
10238
+ setTimeout(() => {
10239
+ const opts = new TableOptions$1();
10240
+ const tablePosition = TablePosition.create(opts, editor, editor.selection.anchor.path);
10241
+ const origin = getOriginCell(tablePosition.table, tablePosition.getRowIndex(), tablePosition.getColumnIndex());
10242
+ if (origin) {
10243
+ const path = AngularEditor.findPath(editor, origin);
10244
+ Transforms.select(editor, Editor.end(editor, path));
10245
+ }
10246
+ }, 0);
10247
+ return;
10248
+ }
10249
+ }
10114
10250
  normalizeNode(entry);
10115
10251
  };
10116
10252
  editor.isBlockCard = (element) => {
@@ -10158,6 +10294,20 @@ const withTable = (editor) => {
10158
10294
  editor.isContainer = (element) => {
10159
10295
  return element.type === ElementKinds.tableCell ? true : isContainer(element);
10160
10296
  };
10297
+ editor.onChange = () => {
10298
+ onChange();
10299
+ // adujst selection when selection is in hidden cell
10300
+ // just hook set_selection
10301
+ const isCollapsed = editor.selection && Range.isCollapsed(editor.selection);
10302
+ const isSelectionOperation = editor.operations.every(op => Operation.isSelectionOperation(op));
10303
+ if (isCollapsed && isSelectionOperation) {
10304
+ const opts = new TableOptions$1();
10305
+ const tablePosition = TablePosition.create(opts, editor, editor.selection.anchor.path);
10306
+ if (tablePosition.isInTable() && tablePosition.cell.hidden) {
10307
+ TableEditor.selectOriginCell(editor, tablePosition.table, tablePosition.getRowIndex(), tablePosition.getColumnIndex(), false);
10308
+ }
10309
+ }
10310
+ };
10161
10311
  return editor;
10162
10312
  };
10163
10313
 
@@ -10290,7 +10440,7 @@ class TheVerticalToolbarItemComponent extends TheToolbarBaseItemComponent {
10290
10440
  }
10291
10441
  }
10292
10442
  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 });
10293
- 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]" }] });
10443
+ 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]" }] });
10294
10444
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TheVerticalToolbarItemComponent, decorators: [{
10295
10445
  type: Component,
10296
10446
  args: [{
@@ -10546,7 +10696,7 @@ TheToolbarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0"
10546
10696
  </ng-template>
10547
10697
  <ng-template #tooltip let-data> {{ data.name }} {{ data.shortcutKey }} </ng-template>
10548
10698
  <ng-container #toolbarContainer></ng-container>
10549
- `, 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"] }] });
10699
+ `, 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"] }] });
10550
10700
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TheToolbarItemComponent, decorators: [{
10551
10701
  type: Component,
10552
10702
  args: [{
@@ -10630,7 +10780,7 @@ class TheQuickToolbarComponent extends mixinUnsubscribe(MixinBase) {
10630
10780
  }
10631
10781
  }
10632
10782
  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 });
10633
- 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"] }] });
10783
+ 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$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"] }] });
10634
10784
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TheQuickToolbarComponent, decorators: [{
10635
10785
  type: Component,
10636
10786
  args: [{
@@ -10749,6 +10899,130 @@ const withSoftBreak = (options = { rules: [{ hotkey: 'shift+enter' }] }) => (edi
10749
10899
  return editor;
10750
10900
  };
10751
10901
 
10902
+ class TheFontSizeToolbarItemComponent extends TheToolbarBaseItemComponent {
10903
+ constructor(elementRef, thyPopover, viewContainerRef, overlay) {
10904
+ super();
10905
+ this.elementRef = elementRef;
10906
+ this.thyPopover = thyPopover;
10907
+ this.viewContainerRef = viewContainerRef;
10908
+ this.overlay = overlay;
10909
+ this.fontSizes = FontSizes;
10910
+ this.disabled = false;
10911
+ this.disableGroup = HEADING_TYPES;
10912
+ this.toolbarItemContainer = true;
10913
+ this.fontSizeToolbarItem = true;
10914
+ }
10915
+ get isOpen() {
10916
+ return this.dropdownPopoverRef && this.dropdownPopoverRef.getOverlayRef() && this.dropdownPopoverRef.getOverlayRef().hasAttached();
10917
+ }
10918
+ get disableClass() {
10919
+ return this.disabled;
10920
+ }
10921
+ toggleDropdown(event) {
10922
+ var _a;
10923
+ super.execute(event);
10924
+ if (((_a = this.editor) === null || _a === void 0 ? void 0 : _a.disabled) || this.disabled) {
10925
+ return;
10926
+ }
10927
+ this.openDropdownPopover();
10928
+ }
10929
+ handleDocumentMouseDown(event) {
10930
+ if (!this.elementRef.nativeElement.contains(event.target)) {
10931
+ this.closeDropdownPopover();
10932
+ }
10933
+ }
10934
+ ngOnInit() {
10935
+ this.activeSize = this.fontSizes[2];
10936
+ }
10937
+ statusChange(editor) {
10938
+ if (editor.selection) {
10939
+ const anchorBlock$1 = anchorBlock(editor);
10940
+ if (anchorBlock$1 && this.disableGroup.includes(anchorBlock$1.type)) {
10941
+ this.activeSize = null;
10942
+ this.disabled = true;
10943
+ return;
10944
+ }
10945
+ const marks = getSelectionMarks(editor);
10946
+ const fontSizeMark = marks[MarkTypes.fontSize];
10947
+ this.activeSize = fontSizeMark ? fontSizeMark : this.fontSizes[2];
10948
+ this.disabled = false;
10949
+ }
10950
+ }
10951
+ itemMousedown(event, size) {
10952
+ var _a, _b;
10953
+ super.execute(event);
10954
+ this.closeDropdownPopover();
10955
+ if (((_a = this.editor) === null || _a === void 0 ? void 0 : _a.disabled) || ((_b = this.editor) === null || _b === void 0 ? void 0 : _b.readOnly)) {
10956
+ return;
10957
+ }
10958
+ const anchorBlock$1 = anchorBlock(this.editor);
10959
+ if (anchorBlock$1 && this.disableGroup.includes(anchorBlock$1.type)) {
10960
+ return;
10961
+ }
10962
+ Editor.addMark(this.editor, MarkTypes.fontSize, size);
10963
+ }
10964
+ openDropdownPopover() {
10965
+ var _a;
10966
+ this.dropdownPopoverRef = this.thyPopover.open(this.dropdownTemplate, {
10967
+ origin: this.elementRef,
10968
+ panelClass: ['the-toolbar-dropdown-popover', (_a = this.item) === null || _a === void 0 ? void 0 : _a.key],
10969
+ placement: 'bottomLeft',
10970
+ insideClosable: false,
10971
+ backdropClosable: true,
10972
+ hasBackdrop: false,
10973
+ offset: 10,
10974
+ viewContainerRef: this.viewContainerRef,
10975
+ scrollStrategy: this.overlay.scrollStrategies.reposition()
10976
+ });
10977
+ }
10978
+ closeDropdownPopover() {
10979
+ var _a;
10980
+ if (this.dropdownPopoverRef) {
10981
+ (_a = this.dropdownPopoverRef) === null || _a === void 0 ? void 0 : _a.close();
10982
+ }
10983
+ }
10984
+ }
10985
+ 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 });
10986
+ 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 }}</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 }}</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]" }] });
10987
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TheFontSizeToolbarItemComponent, decorators: [{
10988
+ type: Component,
10989
+ args: [{
10990
+ selector: 'the-font-size-toolbar-item',
10991
+ templateUrl: './toolbar-item.component.html'
10992
+ }]
10993
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1$3.ThyPopover }, { type: i0.ViewContainerRef }, { type: i2.Overlay }]; }, propDecorators: { editor: [{
10994
+ type: Input
10995
+ }], item: [{
10996
+ type: Input
10997
+ }], dropdownTemplate: [{
10998
+ type: ViewChild,
10999
+ args: ['dropdownTemplate', { static: true }]
11000
+ }], toolbarItemContainer: [{
11001
+ type: HostBinding,
11002
+ args: ['class.the-toolbar-dropdown-container']
11003
+ }], fontSizeToolbarItem: [{
11004
+ type: HostBinding,
11005
+ args: ['class.the-font-size-toolbar-item']
11006
+ }], disableClass: [{
11007
+ type: HostBinding,
11008
+ args: ['class.disabled']
11009
+ }], toggleDropdown: [{
11010
+ type: HostListener,
11011
+ args: ['mousedown', ['$event']]
11012
+ }], handleDocumentMouseDown: [{
11013
+ type: HostListener,
11014
+ args: ['document: mousedown', ['$event']]
11015
+ }] } });
11016
+
11017
+ const FontSizes = [12, 13, 14, 15, 16, 19, 22, 24, 29, 32, 40, 48];
11018
+ const FontSizeOptions = [
11019
+ {
11020
+ key: MarkTypes.fontSize,
11021
+ name: '字号',
11022
+ iconComponent: TheFontSizeToolbarItemComponent
11023
+ }
11024
+ ];
11025
+
10752
11026
  const internalPlugins = [
10753
11027
  withTheHistory,
10754
11028
  withAutoInsertData(),
@@ -10795,6 +11069,7 @@ const internalToolbarItems = [
10795
11069
  ...MarkOptions,
10796
11070
  ...ColorOptions,
10797
11071
  ...HeadingOptions,
11072
+ ...FontSizeOptions,
10798
11073
  ...TodoItemOptions,
10799
11074
  ...ListOptions,
10800
11075
  ...ImageOptions,
@@ -11130,7 +11405,7 @@ class TheToolbarComponent {
11130
11405
  }
11131
11406
  }
11132
11407
  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 });
11133
- 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"] }] });
11408
+ 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"] }] });
11134
11409
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TheToolbarComponent, decorators: [{
11135
11410
  type: Component,
11136
11411
  args: [{
@@ -11255,7 +11530,7 @@ class TheInlineToolbarComponent {
11255
11530
  this.destroy$.complete();
11256
11531
  }
11257
11532
  }
11258
- 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 });
11533
+ 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 });
11259
11534
  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
11260
11535
  #inlineToolbar
11261
11536
  class="the-inline-toolbar"
@@ -11279,7 +11554,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImpor
11279
11554
  },
11280
11555
  changeDetection: ChangeDetectionStrategy.OnPush
11281
11556
  }]
11282
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i2$1.ScrollDispatcher }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }, { type: TheContextService }]; }, propDecorators: { editor: [{
11557
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i2.ScrollDispatcher }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }, { type: TheContextService }]; }, propDecorators: { editor: [{
11283
11558
  type: Input
11284
11559
  }], toolbarItems: [{
11285
11560
  type: Input
@@ -11377,12 +11652,13 @@ class ThePlaceholderComponent {
11377
11652
  }
11378
11653
  }
11379
11654
  checkStatus() {
11380
- var _a, _b;
11655
+ var _a, _b, _c;
11381
11656
  const { editor } = this;
11382
11657
  const isEmptyShow = typeof ((_a = this.options) === null || _a === void 0 ? void 0 : _a.isEmptyShowPlaceholder) === 'undefined' ? true : this.options.isEmptyShowPlaceholder;
11383
11658
  const isMustShow = (_b = this.options) === null || _b === void 0 ? void 0 : _b.isMustShowPlaceholder;
11659
+ const isReadonly = (_c = this.options) === null || _c === void 0 ? void 0 : _c.readonly;
11384
11660
  // empty content and no selection processing
11385
- if (isEmptyShow && isEmptyContent(editor.children)) {
11661
+ if (!isReadonly && isEmptyShow && isEmptyContent(editor.children)) {
11386
11662
  const firstElementChild = this.contextService.getFirstElementChild();
11387
11663
  const offsetTop = firstElementChild.offsetTop;
11388
11664
  const offsetLeft = firstElementChild.offsetLeft;
@@ -11831,7 +12107,7 @@ TheEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ver
11831
12107
  useExisting: forwardRef(() => TheEditorComponent),
11832
12108
  multi: true
11833
12109
  }
11834
- ], 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", "isStrictDecorate", "trackBy", "readonly", "beforeInput", "blur", "click", "compositionEnd", "compositionStart", "copy", "cut", "dragOver", "dragStart", "dragEnd", "drop", "focus", "keydown", "paste", "spellCheck", "autoCorrect", "autoCapitalize"] }, { type: TheInlineToolbarComponent, selector: "the-inline-toolbar", inputs: ["editor", "toolbarItems"] }, { type: TheQuickInsertComponent, selector: "[theQuickInsert]", inputs: ["editor", "quickToolbarItems"] }, { type: ThePlaceholderComponent, selector: "div[thePlaceholder]", inputs: ["editor", "options"] }, { type: TheTemplateComponent, selector: "the-template,[theTemplate]" }], directives: [{ type: i6.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"] }] });
12110
+ ], 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"] }] });
11835
12111
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TheEditorComponent, decorators: [{
11836
12112
  type: Component,
11837
12113
  args: [{
@@ -11995,7 +12271,7 @@ class TheToolbarGroupComponent {
11995
12271
  }
11996
12272
  }
11997
12273
  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 });
11998
- 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"] }] });
12274
+ 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"] }] });
11999
12275
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TheToolbarGroupComponent, decorators: [{
12000
12276
  type: Component,
12001
12277
  args: [{
@@ -12035,7 +12311,9 @@ const TETHYS = [
12035
12311
  ThySelectModule,
12036
12312
  ThyButtonModule,
12037
12313
  ThyNotifyModule,
12038
- ThyAlertModule
12314
+ ThyAlertModule,
12315
+ ThyResizableModule,
12316
+ ThySwitchModule
12039
12317
  ];
12040
12318
  const COMPONENTS = [
12041
12319
  TheToolbarComponent,
@@ -12055,7 +12333,8 @@ const COMPONENTS = [
12055
12333
  TheTableSelectComponent,
12056
12334
  TheTableToolbarItemComponent,
12057
12335
  TheConversionHintComponent,
12058
- TheVerticalToolbarItemComponent
12336
+ TheVerticalToolbarItemComponent,
12337
+ TheFontSizeToolbarItemComponent
12059
12338
  ];
12060
12339
  const PLUGIN_COMPONENTS = [
12061
12340
  TheImageComponent,
@@ -12098,7 +12377,8 @@ TheEditorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version
12098
12377
  TheTableSelectComponent,
12099
12378
  TheTableToolbarItemComponent,
12100
12379
  TheConversionHintComponent,
12101
- TheVerticalToolbarItemComponent, TheImageComponent,
12380
+ TheVerticalToolbarItemComponent,
12381
+ TheFontSizeToolbarItemComponent, TheImageComponent,
12102
12382
  TheTemplateComponent,
12103
12383
  TheHrComponent,
12104
12384
  TheBlockquoteComponent,
@@ -12129,7 +12409,9 @@ TheEditorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version
12129
12409
  ThySelectModule,
12130
12410
  ThyButtonModule,
12131
12411
  ThyNotifyModule,
12132
- ThyAlertModule, CodemirrorModule, TheColumnSizeModule], exports: [TheEditorComponent, TheToolbarComponent, TheToolbarDropdownComponent, TheToolbarItemComponent, TheDefaultElementComponent] });
12412
+ ThyAlertModule,
12413
+ ThyResizableModule,
12414
+ ThySwitchModule, CodemirrorModule, TheColumnSizeModule], exports: [TheEditorComponent, TheToolbarComponent, TheToolbarDropdownComponent, TheToolbarItemComponent, TheDefaultElementComponent] });
12133
12415
  TheEditorModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TheEditorModule, providers: [
12134
12416
  {
12135
12417
  provide: TheToolbarGroupToken,
@@ -12162,5 +12444,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImpor
12162
12444
  * Generated bundle index. Do not edit.
12163
12445
  */
12164
12446
 
12165
- 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, 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 };
12447
+ 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 };
12166
12448
  //# sourceMappingURL=worktile-theia.js.map