@worktile/theia 2.0.1 → 2.1.3

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 (57) hide show
  1. package/bundles/worktile-theia.umd.js +366 -172
  2. package/bundles/worktile-theia.umd.js.map +1 -1
  3. package/components/toolbar/toolbar.component.d.ts +4 -1
  4. package/components/toolbar/toolbar.component.scss +2 -0
  5. package/components/toolbar-dropdown/toolbar-dropdown.component.d.ts +7 -5
  6. package/components/toolbar-dropdown/toolbar-dropdown.component.scss +2 -0
  7. package/components/toolbar-item/toolbar-item.component.d.ts +3 -0
  8. package/constants/code.d.ts +3 -3
  9. package/constants/default.d.ts +0 -1
  10. package/constants/node-types.d.ts +17 -1
  11. package/custom-types.d.ts +3 -1
  12. package/editor.module.d.ts +5 -3
  13. package/esm2015/components/inline-toolbar/inline-toolbar.component.js +1 -1
  14. package/esm2015/components/text/text.component.js +7 -2
  15. package/esm2015/components/toolbar/toolbar.component.js +18 -6
  16. package/esm2015/components/toolbar-dropdown/toolbar-dropdown.component.js +14 -5
  17. package/esm2015/components/toolbar-group/toolbar-group.component.js +1 -1
  18. package/esm2015/components/toolbar-item/toolbar-item.component.js +20 -6
  19. package/esm2015/constants/code.js +2 -2
  20. package/esm2015/constants/default.js +1 -2
  21. package/esm2015/constants/node-types.js +32 -2
  22. package/esm2015/constants/toolbar.js +2 -1
  23. package/esm2015/custom-types.js +1 -1
  24. package/esm2015/editor.component.js +7 -6
  25. package/esm2015/editor.module.js +9 -3
  26. package/esm2015/interfaces/editor.js +1 -1
  27. package/esm2015/interfaces/toolbar.js +1 -1
  28. package/esm2015/plugins/align/options.js +2 -1
  29. package/esm2015/plugins/code/code.component.js +69 -32
  30. package/esm2015/plugins/code/code.editor.js +3 -9
  31. package/esm2015/plugins/deserializers/deserialize-md.plugin.js +2 -2
  32. package/esm2015/plugins/font-size/font-size.editor.js +47 -0
  33. package/esm2015/plugins/font-size/options.js +25 -0
  34. package/esm2015/plugins/heading/heading.editor.js +13 -2
  35. package/esm2015/plugins/heading/options.js +2 -1
  36. package/esm2015/plugins/index.js +3 -1
  37. package/esm2015/plugins/mark/mark.plugin.js +15 -10
  38. package/esm2015/plugins/table/table.editor.js +1 -1
  39. package/esm2015/services/toolbar.service.js +2 -2
  40. package/fesm2015/worktile-theia.js +316 -127
  41. package/fesm2015/worktile-theia.js.map +1 -1
  42. package/interfaces/editor.d.ts +3 -1
  43. package/interfaces/toolbar.d.ts +2 -1
  44. package/package.json +1 -1
  45. package/plugins/code/code.component.d.ts +15 -4
  46. package/plugins/code/code.component.scss +46 -7
  47. package/plugins/code/code.editor.d.ts +3 -2
  48. package/plugins/font-size/font-size.editor.d.ts +8 -0
  49. package/plugins/font-size/options.d.ts +2 -0
  50. package/plugins/font-size/toolbar-item.component.scss +14 -0
  51. package/plugins/heading/heading.editor.d.ts +1 -1
  52. package/plugins/table/table.editor.d.ts +1 -1
  53. package/queries/get-selection-marks.d.ts +1 -0
  54. package/styles/editor.scss +20 -1
  55. package/styles/index.scss +1 -0
  56. package/styles/typo.scss +2 -1
  57. package/transforms/set-marks.d.ts +1 -0
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/forms'), require('slate-angular'), require('ngx-tethys/core'), require('is-hotkey'), require('slate'), require('slate-history'), require('lodash'), require('marked'), require('@atinc/selene'), require('ngx-tethys/popover'), require('@angular/cdk/overlay'), require('ngx-tethys/alert'), require('rxjs/operators'), require('ngx-tethys/uploader'), require('@angular/platform-browser'), require('rxjs'), require('ngx-tethys/progress'), require('ngx-tethys/icon'), require('ngx-tethys/input'), require('ngx-tethys/nav'), require('ngx-tethys/tooltip'), require('ng-codemirror'), require('ngx-tethys/notify'), require('ngx-tethys/action-menu'), require('is-url'), require('ngx-tethys/button'), require('ngx-tethys/form'), require('ngx-tethys/shared'), require('ngx-tethys'), require('@angular/cdk/coercion'), require('@angular/cdk/portal'), require('ngx-tethys/list'), require('ngx-tethys/autocomplete'), require('ngx-tethys/avatar'), require('ngx-tethys/select')) :
3
- typeof define === 'function' && define.amd ? define('@worktile/theia', ['exports', '@angular/core', '@angular/common', '@angular/forms', 'slate-angular', 'ngx-tethys/core', 'is-hotkey', 'slate', 'slate-history', 'lodash', 'marked', '@atinc/selene', 'ngx-tethys/popover', '@angular/cdk/overlay', 'ngx-tethys/alert', 'rxjs/operators', 'ngx-tethys/uploader', '@angular/platform-browser', 'rxjs', 'ngx-tethys/progress', 'ngx-tethys/icon', 'ngx-tethys/input', 'ngx-tethys/nav', 'ngx-tethys/tooltip', 'ng-codemirror', 'ngx-tethys/notify', 'ngx-tethys/action-menu', 'is-url', 'ngx-tethys/button', 'ngx-tethys/form', 'ngx-tethys/shared', 'ngx-tethys', '@angular/cdk/coercion', '@angular/cdk/portal', 'ngx-tethys/list', 'ngx-tethys/autocomplete', 'ngx-tethys/avatar', 'ngx-tethys/select'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.worktile = global.worktile || {}, global.worktile.theia = {}), global.ng.core, global.ng.common, global.ng.forms, global.i1, global.core, global.isHotkey, global.slate, global.slateHistory, global._lodash, global.marked, global.selene, global.i1$2, global.ng.cdk.overlay, global.i1$1, global.rxjs.operators, global.uploader, global.ng.platformBrowser, global.rxjs, global.i4, global.i4$1, global.i5, global.i2$1, global.i7, global.i5$2, global.i1$4, global.i5$1, global.isUrl, global.i1$5, global.i2$2, global.i5$3, global.i1$6, global.ng.cdk.coercion, global.ng.cdk.portal, global.i2$3, global.autocomplete, global.avatar, global.select));
5
- })(this, (function (exports, i0, i6, i4$2, i1, core, isHotkey, slate, slateHistory, _lodash, marked, selene, i1$2, i2, i1$1, operators, uploader, i1$3, rxjs, i4, i4$1, i5, i2$1, i7, i5$2, i1$4, i5$1, isUrl, i1$5, i2$2, i5$3, i1$6, coercion, portal, i2$3, autocomplete, avatar, select) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/forms'), require('slate-angular'), require('ngx-tethys/core'), require('is-hotkey'), require('slate'), require('slate-history'), require('lodash'), require('marked'), require('@atinc/selene'), require('ngx-tethys/popover'), require('@angular/cdk/overlay'), require('ngx-tethys/alert'), require('rxjs/operators'), require('ngx-tethys/uploader'), require('@angular/platform-browser'), require('rxjs'), require('ngx-tethys/progress'), require('ngx-tethys/icon'), require('ngx-tethys/input'), require('ngx-tethys/nav'), require('ngx-tethys/tooltip'), require('ng-codemirror'), require('ngx-tethys/notify'), require('ngx-tethys/action-menu'), require('ngx-tethys/switch'), require('ngx-tethys/resizable'), require('is-url'), require('ngx-tethys/button'), require('ngx-tethys/form'), require('ngx-tethys/shared'), require('ngx-tethys'), require('@angular/cdk/coercion'), require('@angular/cdk/portal'), require('ngx-tethys/list'), require('ngx-tethys/autocomplete'), require('ngx-tethys/avatar'), require('ngx-tethys/select')) :
3
+ typeof define === 'function' && define.amd ? define('@worktile/theia', ['exports', '@angular/core', '@angular/common', '@angular/forms', 'slate-angular', 'ngx-tethys/core', 'is-hotkey', 'slate', 'slate-history', 'lodash', 'marked', '@atinc/selene', 'ngx-tethys/popover', '@angular/cdk/overlay', 'ngx-tethys/alert', 'rxjs/operators', 'ngx-tethys/uploader', '@angular/platform-browser', 'rxjs', 'ngx-tethys/progress', 'ngx-tethys/icon', 'ngx-tethys/input', 'ngx-tethys/nav', 'ngx-tethys/tooltip', 'ng-codemirror', 'ngx-tethys/notify', 'ngx-tethys/action-menu', 'ngx-tethys/switch', 'ngx-tethys/resizable', 'is-url', 'ngx-tethys/button', 'ngx-tethys/form', 'ngx-tethys/shared', 'ngx-tethys', '@angular/cdk/coercion', '@angular/cdk/portal', 'ngx-tethys/list', 'ngx-tethys/autocomplete', 'ngx-tethys/avatar', 'ngx-tethys/select'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.worktile = global.worktile || {}, global.worktile.theia = {}), global.ng.core, global.ng.common, global.ng.forms, global.i1, global.core, global.isHotkey, global.slate, global.slateHistory, global._lodash, global.marked, global.selene, global.i1$2, global.ng.cdk.overlay, global.i1$1, global.rxjs.operators, global.uploader, global.ng.platformBrowser, global.rxjs, global.i4, global.i4$1, global.i5, global.i3, global.i5$1, global.i8, global.i1$4, global.i5$2, global.i6$1, global.i9, global.isUrl, global.i1$5, global.i2$1, global.i5$3, global.i1$6, global.ng.cdk.coercion, global.ng.cdk.portal, global.i2$2, global.autocomplete, global.avatar, global.select));
5
+ })(this, (function (exports, i0, i6, i4$2, i1, core, isHotkey, slate, slateHistory, _lodash, marked, selene, i1$2, i2, i1$1, operators, uploader, i1$3, rxjs, i4, i4$1, i5, i3, i5$1, i8, i1$4, i5$2, i6$1, i9, isUrl, i1$5, i2$1, i5$3, i1$6, coercion, portal, i2$2, autocomplete, avatar, select) { 'use strict';
6
6
 
7
7
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
8
8
 
@@ -32,23 +32,25 @@
32
32
  var _lodash__namespace = /*#__PURE__*/_interopNamespace(_lodash);
33
33
  var marked__default = /*#__PURE__*/_interopDefaultLegacy(marked);
34
34
  var i1__namespace$3 = /*#__PURE__*/_interopNamespace(i1$2);
35
- var i2__namespace$1 = /*#__PURE__*/_interopNamespace(i2);
35
+ var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
36
36
  var i1__namespace$1 = /*#__PURE__*/_interopNamespace(i1$1);
37
37
  var i1__namespace$2 = /*#__PURE__*/_interopNamespace(i1$3);
38
38
  var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
39
39
  var i4__namespace$1 = /*#__PURE__*/_interopNamespace(i4$1);
40
40
  var i5__namespace = /*#__PURE__*/_interopNamespace(i5);
41
- var i2__namespace = /*#__PURE__*/_interopNamespace(i2$1);
42
- var i7__namespace = /*#__PURE__*/_interopNamespace(i7);
43
- var i5__namespace$2 = /*#__PURE__*/_interopNamespace(i5$2);
44
- var i1__namespace$4 = /*#__PURE__*/_interopNamespace(i1$4);
41
+ var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
45
42
  var i5__namespace$1 = /*#__PURE__*/_interopNamespace(i5$1);
43
+ var i8__namespace = /*#__PURE__*/_interopNamespace(i8);
44
+ var i1__namespace$4 = /*#__PURE__*/_interopNamespace(i1$4);
45
+ var i5__namespace$2 = /*#__PURE__*/_interopNamespace(i5$2);
46
+ var i6__namespace$1 = /*#__PURE__*/_interopNamespace(i6$1);
47
+ var i9__namespace = /*#__PURE__*/_interopNamespace(i9);
46
48
  var isUrl__default = /*#__PURE__*/_interopDefaultLegacy(isUrl);
47
49
  var i1__namespace$5 = /*#__PURE__*/_interopNamespace(i1$5);
48
- var i2__namespace$2 = /*#__PURE__*/_interopNamespace(i2$2);
50
+ var i2__namespace$1 = /*#__PURE__*/_interopNamespace(i2$1);
49
51
  var i5__namespace$3 = /*#__PURE__*/_interopNamespace(i5$3);
50
52
  var i1__namespace$6 = /*#__PURE__*/_interopNamespace(i1$6);
51
- var i2__namespace$3 = /*#__PURE__*/_interopNamespace(i2$3);
53
+ var i2__namespace$2 = /*#__PURE__*/_interopNamespace(i2$2);
52
54
 
53
55
  /*! *****************************************************************************
54
56
  Copyright (c) Microsoft Corporation.
@@ -373,7 +375,6 @@
373
375
  var A_TAG_REL_ATTR = 'noopener noreferrer nofollow external ugc';
374
376
  var LINK_DEFAULT_TEXT = '链接';
375
377
  var TAB_SPACE = ' ';
376
- var ZERO_WIDTH_CHAR = '\u200B';
377
378
  var CLIPBOARD_FORMAT_KEY = 'x-theia-fragment';
378
379
  var DEFAULT_SCROLL_CONTAINER = '.the-editable-container';
379
380
  var ELEMENT_UNIQUE_ID = 'key';
@@ -420,6 +421,34 @@
420
421
  VerticalAlignment["middle"] = "middle";
421
422
  VerticalAlignment["bottom"] = "bottom";
422
423
  })(exports.VerticalAlignment || (exports.VerticalAlignment = {}));
424
+ exports.FontSizes = void 0;
425
+ (function (FontSizes) {
426
+ FontSizes["fontSize12"] = "12";
427
+ FontSizes["fontSize13"] = "13";
428
+ FontSizes["fontSize14"] = "14";
429
+ FontSizes["fontSize15"] = "15";
430
+ FontSizes["fontSize16"] = "16";
431
+ FontSizes["fontSize18"] = "18";
432
+ FontSizes["fontSize20"] = "20";
433
+ FontSizes["fontSize24"] = "24";
434
+ FontSizes["fontSize28"] = "28";
435
+ FontSizes["fontSize32"] = "32";
436
+ FontSizes["fontSize40"] = "40";
437
+ FontSizes["fontSize48"] = "48";
438
+ })(exports.FontSizes || (exports.FontSizes = {}));
439
+ var FontSizeTypes = [
440
+ exports.FontSizes.fontSize12,
441
+ exports.FontSizes.fontSize13,
442
+ exports.FontSizes.fontSize14,
443
+ exports.FontSizes.fontSize15,
444
+ exports.FontSizes.fontSize16,
445
+ exports.FontSizes.fontSize20,
446
+ exports.FontSizes.fontSize24,
447
+ exports.FontSizes.fontSize28,
448
+ exports.FontSizes.fontSize32,
449
+ exports.FontSizes.fontSize40,
450
+ exports.FontSizes.fontSize48
451
+ ];
423
452
  exports.MarkTypes = void 0;
424
453
  (function (MarkTypes) {
425
454
  MarkTypes["bold"] = "bold";
@@ -429,6 +458,7 @@
429
458
  MarkTypes["color"] = "color";
430
459
  MarkTypes["backgroundColor"] = "background-color";
431
460
  MarkTypes["codeLine"] = "code-line";
461
+ MarkTypes["fontSize"] = "font-size";
432
462
  })(exports.MarkTypes || (exports.MarkTypes = {}));
433
463
  exports.ToolbarActionTypes = void 0;
434
464
  (function (ToolbarActionTypes) {
@@ -457,7 +487,8 @@
457
487
  exports.MarkTypes.color,
458
488
  exports.MarkTypes.italic,
459
489
  exports.MarkTypes.strike,
460
- exports.MarkTypes.underline
490
+ exports.MarkTypes.underline,
491
+ exports.MarkTypes.fontSize
461
492
  ];
462
493
  var THE_INLINE_TOOLBAR_TYPES = [exports.ElementKinds.default, exports.ElementKinds.listItem, exports.ElementKinds.checkItem];
463
494
  var STANDARD_HEADING_TYPES = [
@@ -487,6 +518,7 @@
487
518
  })(exports.ToolbarItemMode || (exports.ToolbarItemMode = {}));
488
519
  var DefaultGlobalToolbarDefinition = [
489
520
  exports.ElementKinds.headingList,
521
+ exports.MarkTypes.fontSize,
490
522
  exports.ToolbarActionTypes.split,
491
523
  exports.MarkTypes.bold,
492
524
  exports.MarkTypes.italic,
@@ -620,10 +652,10 @@
620
652
  default: 'default',
621
653
  print: 'print'
622
654
  };
623
- var TheCodeMode = /** @class */ (function () {
624
- function TheCodeMode() {
655
+ var TheCodeConfig = /** @class */ (function () {
656
+ function TheCodeConfig() {
625
657
  }
626
- return TheCodeMode;
658
+ return TheCodeConfig;
627
659
  }());
628
660
  var THE_CODE_MODE_TOKEN = new i0.InjectionToken('the-code-mode');
629
661
  var THE_CODE_MODE_PROVIDER = {
@@ -640,7 +672,7 @@
640
672
  var _this = _super.call(this, elementRef, cdr) || this;
641
673
  _this.elementRef = elementRef;
642
674
  _this.renderer2 = renderer2;
643
- _this.excludes = ['color', 'background-color', 'text'];
675
+ _this.excludes = ['color', 'font-size', 'background-color', 'text'];
644
676
  _this.attributes = [];
645
677
  return _this;
646
678
  }
@@ -657,6 +689,11 @@
657
689
  this.attributes.push(attr);
658
690
  }
659
691
  }
692
+ var fontSize = this.text[exports.MarkTypes.fontSize];
693
+ if (fontSize) {
694
+ var attr = "the-" + exports.MarkTypes.fontSize;
695
+ this.renderer2.setAttribute(this.elementRef.nativeElement, attr, fontSize);
696
+ }
660
697
  if (this.text[exports.MarkTypes.color]) {
661
698
  this.renderer2.setStyle(this.elementRef.nativeElement, 'color', this.text[exports.MarkTypes.color]);
662
699
  }
@@ -2411,7 +2448,7 @@
2411
2448
  editor: editor,
2412
2449
  conversion: function () {
2413
2450
  try {
2414
- var html = marked__default["default"](plainFragment, { gfm: true });
2451
+ var html = marked__default["default"](plainFragment.replace(/\n```/g, "\n\n```"), { gfm: true });
2415
2452
  var htmlDom = new DOMParser().parseFromString(html, 'text/html');
2416
2453
  var fragment_1 = selene.TheiaConverter.convertToTheia(Array.from(htmlDom.body.children));
2417
2454
  if (!isUnformatted(fragment_1)) {
@@ -4312,11 +4349,14 @@
4312
4349
  delete marks[key];
4313
4350
  editor.marks = marks;
4314
4351
  var text = slate.Editor.string(e, selection.anchor.path);
4315
- if (text === ZERO_WIDTH_CHAR) {
4316
- slate.Transforms.unsetNodes(e, key, { at: selection.anchor.path });
4352
+ if (text !== '') {
4353
+ slate.Editor.setNormalizing(editor, false);
4354
+ e.insertText('');
4355
+ editor.marks = marks;
4356
+ slate.Editor.setNormalizing(editor, true);
4317
4357
  }
4318
- if (text !== ZERO_WIDTH_CHAR && text !== '') {
4319
- e.insertText(ZERO_WIDTH_CHAR);
4358
+ else {
4359
+ slate.Transforms.unsetNodes(e, key, { at: selection.anchor.path });
4320
4360
  }
4321
4361
  if (shouldChange) {
4322
4362
  editor.onChange();
@@ -4335,11 +4375,14 @@
4335
4375
  var marks = Object.assign(Object.assign({}, (slate.Editor.marks(e) || {})), (_b = {}, _b[key] = value, _b));
4336
4376
  editor.marks = marks;
4337
4377
  var text = slate.Editor.string(e, selection.anchor.path);
4338
- if (text === ZERO_WIDTH_CHAR) {
4339
- slate.Transforms.setNodes(e, (_c = {}, _c[key] = value, _c), { at: selection.anchor.path });
4378
+ if (text !== '') {
4379
+ slate.Editor.setNormalizing(editor, false);
4380
+ e.insertText('');
4381
+ editor.marks = marks;
4382
+ slate.Editor.setNormalizing(editor, true);
4340
4383
  }
4341
- if (text !== ZERO_WIDTH_CHAR && text !== '') {
4342
- e.insertText(ZERO_WIDTH_CHAR);
4384
+ else {
4385
+ slate.Transforms.setNodes(e, (_c = {}, _c[key] = value, _c), { at: selection.anchor.path });
4343
4386
  }
4344
4387
  }
4345
4388
  }
@@ -6008,6 +6051,7 @@
6008
6051
  var HeadingEditor = {
6009
6052
  setHeading: function (editor, heading) {
6010
6053
  slate.Editor.withoutNormalizing(editor, function () {
6054
+ var _a;
6011
6055
  var types = [exports.ElementKinds.bulletedList, exports.ElementKinds.numberedList, exports.ElementKinds.listItem];
6012
6056
  slate.Transforms.unwrapNodes(editor, {
6013
6057
  at: editor.selection,
@@ -6016,6 +6060,15 @@
6016
6060
  split: true
6017
6061
  });
6018
6062
  slate.Transforms.setNodes(editor, { type: heading });
6063
+ var entry = anchorBlockEntry(editor);
6064
+ var unMarks = (_a = {},
6065
+ _a[exports.MarkTypes.fontSize] = null,
6066
+ _a);
6067
+ if (entry) {
6068
+ setMarks(editor, unMarks, entry[1]);
6069
+ return;
6070
+ }
6071
+ setMarks(editor, unMarks, editor.selection);
6019
6072
  });
6020
6073
  },
6021
6074
  isHeadingActive: function (editor, heading) {
@@ -6032,6 +6085,7 @@
6032
6085
  name: '正文',
6033
6086
  key: exports.ElementKinds.headingList,
6034
6087
  type: exports.ToolbarItemType.toolDropdown,
6088
+ dropdownItemKey: exports.ElementKinds.paragraph,
6035
6089
  includes: __spreadArray([exports.ElementKinds.paragraph], __read(STANDARD_HEADING_TYPES))
6036
6090
  },
6037
6091
  {
@@ -6126,6 +6180,7 @@
6126
6180
  key: exports.ToolbarActionTypes.alignType,
6127
6181
  type: exports.ToolbarItemType.toolDropdown,
6128
6182
  dropdownMode: exports.DropdownMode.icon,
6183
+ dropdownItemKey: exports.ToolbarActionTypes.alignLeft,
6129
6184
  includes: [exports.ToolbarActionTypes.alignLeft, exports.ToolbarActionTypes.alignCenter, exports.ToolbarActionTypes.alignRight],
6130
6185
  name: '对齐方式'
6131
6186
  },
@@ -6569,7 +6624,7 @@
6569
6624
  return TheColorToolbarItemComponent;
6570
6625
  }(TheToolbarBaseItemComponent));
6571
6626
  TheColorToolbarItemComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheColorToolbarItemComponent, deps: [{ token: i1__namespace$3.ThyPopover }], target: i0__namespace.ɵɵFactoryTarget.Component });
6572
- TheColorToolbarItemComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheColorToolbarItemComponent, selector: "the-color-toolbar-item", inputs: { item: "item", editor: "editor" }, host: { classAttribute: "the-toolbar-item" }, usesInheritance: true, ngImport: i0__namespace, template: "\n <a\n class=\"link-width-down\"\n thyIconNavLink\n [ngStyle]=\"{\n width: item.key === 'color' ? '42px' : 'auto'\n }\"\n [thyTooltip]=\"item.name\"\n [thyIconNavLinkActive]=\"active\"\n thyTooltipPlacement=\"top\"\n (mousedown)=\"execute($event)\"\n >\n <thy-icon [thyIconName]=\"item.icon\" thyIconType=\"twotone\" [thyTwotoneColor]=\"active\"></thy-icon>\n <thy-icon\n [ngClass]=\"{\n 'link-down-icon': true,\n 'font-size-sm': true,\n 'text-desc': true\n }\"\n thyIconName=\"caret-down\"\n ></thy-icon>\n </a>\n ", isInline: true, components: [{ type: i2__namespace.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i4__namespace$1.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }], directives: [{ type: i6__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i7__namespace.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { type: i6__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
6627
+ TheColorToolbarItemComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheColorToolbarItemComponent, selector: "the-color-toolbar-item", inputs: { item: "item", editor: "editor" }, host: { classAttribute: "the-toolbar-item" }, usesInheritance: true, ngImport: i0__namespace, template: "\n <a\n class=\"link-width-down\"\n thyIconNavLink\n [ngStyle]=\"{\n width: item.key === 'color' ? '42px' : 'auto'\n }\"\n [thyTooltip]=\"item.name\"\n [thyIconNavLinkActive]=\"active\"\n thyTooltipPlacement=\"top\"\n (mousedown)=\"execute($event)\"\n >\n <thy-icon [thyIconName]=\"item.icon\" thyIconType=\"twotone\" [thyTwotoneColor]=\"active\"></thy-icon>\n <thy-icon\n [ngClass]=\"{\n 'link-down-icon': true,\n 'font-size-sm': true,\n 'text-desc': true\n }\"\n thyIconName=\"caret-down\"\n ></thy-icon>\n </a>\n ", isInline: true, components: [{ type: i3__namespace.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i4__namespace$1.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }], directives: [{ type: i6__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i5__namespace$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { type: i6__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
6573
6628
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheColorToolbarItemComponent, decorators: [{
6574
6629
  type: i0.Component,
6575
6630
  args: [{
@@ -6649,15 +6704,9 @@
6649
6704
  };
6650
6705
 
6651
6706
  var CodeEditor = {
6652
- setLanguage: function (editor, language, element) {
6707
+ setCodeAttribute: function (editor, element, value) {
6653
6708
  var at = i1.AngularEditor.findPath(editor, element);
6654
- slate.Transforms.setNodes(editor, { language: language }, {
6655
- at: at
6656
- });
6657
- },
6658
- setCodeContent: function (editor, content, element) {
6659
- var at = i1.AngularEditor.findPath(editor, element);
6660
- slate.Transforms.setNodes(editor, { content: content }, {
6709
+ slate.Transforms.setNodes(editor, value, {
6661
6710
  at: at
6662
6711
  });
6663
6712
  },
@@ -6730,6 +6779,7 @@
6730
6779
  _this.overlay = overlay;
6731
6780
  _this.mode = exports.DropdownMode.text;
6732
6781
  _this.dropdownMode = exports.DropdownMode;
6782
+ _this.disabled = false;
6733
6783
  return _this;
6734
6784
  }
6735
6785
  Object.defineProperty(TheToolbarDropdownComponent.prototype, "item", {
@@ -6753,7 +6803,7 @@
6753
6803
  TheToolbarDropdownComponent.prototype.toggleDropdown = function (event) {
6754
6804
  var _a;
6755
6805
  _super.prototype.execute.call(this, event);
6756
- if ((_a = this.editor) === null || _a === void 0 ? void 0 : _a.disabled) {
6806
+ if (((_a = this.editor) === null || _a === void 0 ? void 0 : _a.disabled) || this.disabled) {
6757
6807
  return;
6758
6808
  }
6759
6809
  this.openDropdownPopover();
@@ -6763,6 +6813,13 @@
6763
6813
  this.closeDropdownPopover();
6764
6814
  }
6765
6815
  };
6816
+ Object.defineProperty(TheToolbarDropdownComponent.prototype, "disabledState", {
6817
+ get: function () {
6818
+ return this.disabled;
6819
+ },
6820
+ enumerable: false,
6821
+ configurable: true
6822
+ });
6766
6823
  TheToolbarDropdownComponent.prototype.ngOnInit = function () {
6767
6824
  var _a;
6768
6825
  if (!this.template) {
@@ -6776,12 +6833,14 @@
6776
6833
  }
6777
6834
  };
6778
6835
  TheToolbarDropdownComponent.prototype.statusChange = function (editor) {
6836
+ var _a, _b;
6837
+ this.disabled = ((_a = this.toolbarItem) === null || _a === void 0 ? void 0 : _a.disable) ? (_b = this.toolbarItem) === null || _b === void 0 ? void 0 : _b.disable(editor) : false;
6779
6838
  var activeItem = this.menus.find(function (i) {
6780
6839
  if (i === null || i === void 0 ? void 0 : i.active) {
6781
6840
  return i === null || i === void 0 ? void 0 : i.active(editor);
6782
6841
  }
6783
6842
  });
6784
- this.activeMenu = activeItem ? activeItem : this.menus[0];
6843
+ this.activeMenu = activeItem ? activeItem : this.item;
6785
6844
  };
6786
6845
  TheToolbarDropdownComponent.prototype.itemMousedown = function (event, item) {
6787
6846
  _super.prototype.execute.call(this, event);
@@ -6835,8 +6894,8 @@
6835
6894
  };
6836
6895
  return TheToolbarDropdownComponent;
6837
6896
  }(TheToolbarBaseItemComponent));
6838
- TheToolbarDropdownComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheToolbarDropdownComponent, deps: [{ token: i0__namespace.ElementRef }, { token: i1__namespace$3.ThyPopover }, { token: i0__namespace.ViewContainerRef }, { token: i2__namespace$1.Overlay }], target: i0__namespace.ɵɵFactoryTarget.Component });
6839
- TheToolbarDropdownComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheToolbarDropdownComponent, selector: "the-toolbar-dropdown", inputs: { toolbarItem: "toolbarItem", menus: "menus", mode: "mode", item: "item", itemMousedownHandle: "itemMousedownHandle" }, host: { listeners: { "mousedown": "toggleDropdown($event)", "document: mousedown": "handleDocumentMouseDown($event)" }, classAttribute: "the-toolbar-dropdown-container" }, viewQueries: [{ propertyName: "iconModeTemplate", first: true, predicate: ["iconModeTemplate"], descendants: true, static: true }, { propertyName: "textModeTemplate", first: true, predicate: ["textModeTemplate"], descendants: true, static: true }, { propertyName: "dropdownTemplate", first: true, predicate: ["dropdownTemplate"], descendants: true, static: true }], usesInheritance: true, ngImport: i0__namespace, template: "<ng-template [ngTemplateOutlet]=\"template\"></ng-template>\n\n<ng-template #iconModeTemplate>\n <a thyIconNavLink class=\"icon-mode link-with-down\" [thyTooltip]=\"activeMenu?.name\" thyTooltipPlacement=\"top\">\n <thy-icon [thyIconName]=\"activeMenu?.icon\"></thy-icon>\n <thy-icon class=\"caret-down-icon font-size-sm text-desc\" thyIconName=\"caret-down\"></thy-icon>\n </a>\n</ng-template>\n\n<ng-template #textModeTemplate>\n <a thyIconNavLink class=\"text-mode\" [thyTooltip]=\"activeMenu?.name\" thyTooltipPlacement=\"top\">\n <span class=\"show-text\">{{ activeMenu?.name }}</span>\n <thy-icon class=\"text-caret-down-icon font-size-sm text-desc\" thyIconName=\"caret-down\"></thy-icon>\n </a>\n</ng-template>\n\n<ng-template #dropdownTemplate>\n <thy-action-menu class=\"dropdown\">\n <ng-container *ngFor=\"let menu of menus\">\n <a\n *ngIf=\"menu.key !== 'split'\"\n thyActionMenuItem\n href=\"javascript:;\"\n [thyActionMenuItemActive]=\"menu.key === activeMenu.key\"\n (mousedown)=\"itemMousedown($event, menu)\"\n [ngStyle]=\"menu?.styles\"\n >\n <span *ngIf=\"menu.icon && mode === dropdownMode.icon\" thyActionMenuItemIcon>\n <thy-icon [thyIconName]=\"menu.icon\"></thy-icon>\n </span>\n <span *ngIf=\"menu.name\" thyActionMenuItemName>{{ menu.name }}</span>\n </a>\n <thy-action-menu-divider *ngIf=\"menu.key === 'split'\"></thy-action-menu-divider>\n </ng-container>\n </thy-action-menu>\n</ng-template>\n", components: [{ type: i2__namespace.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i4__namespace$1.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { type: i5__namespace$1.ThyActionMenuComponent, selector: "thy-action-menu", inputs: ["thyTheme", "thyWidth"] }, { type: i5__namespace$1.ThyActionMenuDividerComponent, selector: "thy-action-menu-divider", inputs: ["thyTitle", "thyType"] }], directives: [{ type: i6__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i7__namespace.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { type: i6__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5__namespace$1.ThyActionMenuItemDirective, selector: "[thyActionMenuItem]", inputs: ["thyDisabled", "thyType"] }, { type: i5__namespace$1.ThyActionMenuItemActiveDirective, selector: "[thyActionMenuItemActive]", inputs: ["thyActionMenuItemActive"] }, { type: i6__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i5__namespace$1.ThyActionMenuItemIconDirective, selector: "[thyActionMenuItemIcon]" }, { type: i5__namespace$1.ThyActionMenuItemNameDirective, selector: "[thyActionMenuItemName]" }] });
6897
+ TheToolbarDropdownComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheToolbarDropdownComponent, deps: [{ token: i0__namespace.ElementRef }, { token: i1__namespace$3.ThyPopover }, { token: i0__namespace.ViewContainerRef }, { token: i2__namespace.Overlay }], target: i0__namespace.ɵɵFactoryTarget.Component });
6898
+ TheToolbarDropdownComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheToolbarDropdownComponent, selector: "the-toolbar-dropdown", inputs: { toolbarItem: "toolbarItem", menus: "menus", mode: "mode", item: "item", itemMousedownHandle: "itemMousedownHandle" }, host: { listeners: { "mousedown": "toggleDropdown($event)", "document: mousedown": "handleDocumentMouseDown($event)" }, properties: { "class.disabled": "this.disabledState" }, classAttribute: "the-toolbar-dropdown-container" }, viewQueries: [{ propertyName: "iconModeTemplate", first: true, predicate: ["iconModeTemplate"], descendants: true, static: true }, { propertyName: "textModeTemplate", first: true, predicate: ["textModeTemplate"], descendants: true, static: true }, { propertyName: "dropdownTemplate", first: true, predicate: ["dropdownTemplate"], descendants: true, static: true }], usesInheritance: true, ngImport: i0__namespace, template: "<ng-template [ngTemplateOutlet]=\"template\"></ng-template>\n\n<ng-template #iconModeTemplate>\n <a thyIconNavLink class=\"icon-mode link-with-down\" [thyTooltip]=\"activeMenu?.name\" thyTooltipPlacement=\"top\">\n <thy-icon [thyIconName]=\"activeMenu?.icon\"></thy-icon>\n <thy-icon class=\"caret-down-icon font-size-sm text-desc\" thyIconName=\"caret-down\"></thy-icon>\n </a>\n</ng-template>\n\n<ng-template #textModeTemplate>\n <a thyIconNavLink class=\"text-mode\" [thyTooltip]=\"activeMenu?.name\" thyTooltipPlacement=\"top\">\n <span class=\"show-text\">{{ activeMenu?.name }}</span>\n <thy-icon class=\"text-caret-down-icon font-size-sm text-desc\" thyIconName=\"caret-down\"></thy-icon>\n </a>\n</ng-template>\n\n<ng-template #dropdownTemplate>\n <thy-action-menu class=\"dropdown\">\n <ng-container *ngFor=\"let menu of menus\">\n <a\n *ngIf=\"menu.key !== 'split'\"\n thyActionMenuItem\n href=\"javascript:;\"\n [thyActionMenuItemActive]=\"menu.key === activeMenu.key\"\n (mousedown)=\"itemMousedown($event, menu)\"\n [ngStyle]=\"menu?.styles\"\n >\n <span *ngIf=\"menu.icon && mode === dropdownMode.icon\" thyActionMenuItemIcon>\n <thy-icon [thyIconName]=\"menu.icon\"></thy-icon>\n </span>\n <span *ngIf=\"menu.name\" thyActionMenuItemName>{{ menu.name }}</span>\n </a>\n <thy-action-menu-divider *ngIf=\"menu.key === 'split'\"></thy-action-menu-divider>\n </ng-container>\n </thy-action-menu>\n</ng-template>\n", components: [{ type: i3__namespace.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i4__namespace$1.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { type: i5__namespace$2.ThyActionMenuComponent, selector: "thy-action-menu", inputs: ["thyTheme", "thyWidth"] }, { type: i5__namespace$2.ThyActionMenuDividerComponent, selector: "thy-action-menu-divider", inputs: ["thyTitle", "thyType"] }], directives: [{ type: i6__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i5__namespace$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { type: i6__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5__namespace$2.ThyActionMenuItemDirective, selector: "[thyActionMenuItem]", inputs: ["thyDisabled", "thyType"] }, { type: i5__namespace$2.ThyActionMenuItemActiveDirective, selector: "[thyActionMenuItemActive]", inputs: ["thyActionMenuItemActive"] }, { type: i6__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i5__namespace$2.ThyActionMenuItemIconDirective, selector: "[thyActionMenuItemIcon]" }, { type: i5__namespace$2.ThyActionMenuItemNameDirective, selector: "[thyActionMenuItemName]" }] });
6840
6899
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheToolbarDropdownComponent, decorators: [{
6841
6900
  type: i0.Component,
6842
6901
  args: [{
@@ -6846,7 +6905,7 @@
6846
6905
  class: 'the-toolbar-dropdown-container'
6847
6906
  }
6848
6907
  }]
6849
- }], ctorParameters: function () { return [{ type: i0__namespace.ElementRef }, { type: i1__namespace$3.ThyPopover }, { type: i0__namespace.ViewContainerRef }, { type: i2__namespace$1.Overlay }]; }, propDecorators: { toolbarItem: [{
6908
+ }], ctorParameters: function () { return [{ type: i0__namespace.ElementRef }, { type: i1__namespace$3.ThyPopover }, { type: i0__namespace.ViewContainerRef }, { type: i2__namespace.Overlay }]; }, propDecorators: { toolbarItem: [{
6850
6909
  type: i0.Input
6851
6910
  }], menus: [{
6852
6911
  type: i0.Input
@@ -6871,24 +6930,73 @@
6871
6930
  }], handleDocumentMouseDown: [{
6872
6931
  type: i0.HostListener,
6873
6932
  args: ['document: mousedown', ['$event']]
6933
+ }], disabledState: [{
6934
+ type: i0.HostBinding,
6935
+ args: ['class.disabled']
6936
+ }] } });
6937
+
6938
+ var NavSplitLineComponent = /** @class */ (function () {
6939
+ function NavSplitLineComponent() {
6940
+ this.mode = exports.ToolbarItemMode.vertical;
6941
+ this.theNavSplitLine = true;
6942
+ }
6943
+ Object.defineProperty(NavSplitLineComponent.prototype, "horizontal", {
6944
+ get: function () {
6945
+ return this.mode === exports.ToolbarItemMode.horizontal;
6946
+ },
6947
+ enumerable: false,
6948
+ configurable: true
6949
+ });
6950
+ Object.defineProperty(NavSplitLineComponent.prototype, "vertical", {
6951
+ get: function () {
6952
+ return this.mode === exports.ToolbarItemMode.vertical;
6953
+ },
6954
+ enumerable: false,
6955
+ configurable: true
6956
+ });
6957
+ NavSplitLineComponent.prototype.ngOnInit = function () { };
6958
+ return NavSplitLineComponent;
6959
+ }());
6960
+ NavSplitLineComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: NavSplitLineComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
6961
+ NavSplitLineComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: NavSplitLineComponent, selector: "nav-split-line", inputs: { mode: "mode" }, host: { properties: { "class.the-nav-split-line": "this.theNavSplitLine", "class.horizontal": "this.horizontal", "class.vertical": "this.vertical" } }, ngImport: i0__namespace, template: '', isInline: true });
6962
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: NavSplitLineComponent, decorators: [{
6963
+ type: i0.Component,
6964
+ args: [{
6965
+ selector: 'nav-split-line',
6966
+ template: ''
6967
+ }]
6968
+ }], ctorParameters: function () { return []; }, propDecorators: { mode: [{
6969
+ type: i0.Input
6970
+ }], theNavSplitLine: [{
6971
+ type: i0.HostBinding,
6972
+ args: ['class.the-nav-split-line']
6973
+ }], horizontal: [{
6974
+ type: i0.HostBinding,
6975
+ args: ['class.horizontal']
6976
+ }], vertical: [{
6977
+ type: i0.HostBinding,
6978
+ args: ['class.vertical']
6874
6979
  }] } });
6875
6980
 
6876
6981
  var TheCodeComponent = /** @class */ (function (_super) {
6877
6982
  __extends(TheCodeComponent, _super);
6878
- function TheCodeComponent(elementRef, cdr, thyNotifyService, ngZone, config) {
6983
+ function TheCodeComponent(elementRef, cdr, thyNotifyService, contextService, ngZone, config) {
6879
6984
  var _this = _super.call(this, elementRef, cdr) || this;
6880
6985
  _this.elementRef = elementRef;
6881
6986
  _this.cdr = cdr;
6882
6987
  _this.thyNotifyService = thyNotifyService;
6988
+ _this.contextService = contextService;
6883
6989
  _this.ngZone = ngZone;
6884
6990
  _this.config = config;
6885
6991
  _this.startRenderCodemirror = false;
6886
6992
  _this.dropdownMode = exports.DropdownMode;
6887
6993
  _this.maxHeight = _this.config.mode === CodeMode.default ? 350 - CODEMIRROR_PADDING_TOP * 2 : 0;
6888
- _this.codeMirrorFocused = false;
6889
6994
  _this.menus = CODE_MODES.map(function (item) {
6890
6995
  return { key: item.value, name: item.showName };
6891
6996
  });
6997
+ _this.ToolbarItemMode = exports.ToolbarItemMode;
6998
+ _this.isFocusCode = false;
6999
+ _this.resizeHeight = null;
6892
7000
  _this.options = {
6893
7001
  mode: _this.menus[0].key,
6894
7002
  lineNumbers: false,
@@ -6899,10 +7007,11 @@
6899
7007
  cursorBlinkRate: 500
6900
7008
  };
6901
7009
  _this.actives = _this.menus[0];
7010
+ _this.resizeBounds = null;
6902
7011
  _this.onChangeLangulage = function (item) {
6903
7012
  _this.options = Object.assign(Object.assign({}, _this.options), { mode: item.key });
6904
7013
  _this.actives = item;
6905
- CodeEditor.setLanguage(_this.editor, item.key, _this.element);
7014
+ CodeEditor.setCodeAttribute(_this.editor, _this.element, { language: item.key });
6906
7015
  };
6907
7016
  return _this;
6908
7017
  }
@@ -6922,8 +7031,14 @@
6922
7031
  if (this.options.mode !== this.element.language) {
6923
7032
  this.useMode();
6924
7033
  }
6925
- if (!this.readonly && this.isCollapsed) {
6926
- this.initializeCodemirrorFocus();
7034
+ if (this.options.lineWrapping !== this.element.autoWrap) {
7035
+ this.useAutoWrap();
7036
+ }
7037
+ if (this.resizeHeight !== this.element.height) {
7038
+ this.useHeight();
7039
+ }
7040
+ if (!this.isCollapsed) {
7041
+ this.isFocusCode = false;
6927
7042
  }
6928
7043
  }
6929
7044
  };
@@ -6945,6 +7060,9 @@
6945
7060
  this.ngZone.onStable.pipe(operators.take(1)).subscribe(function () {
6946
7061
  _this.renderCodemirror();
6947
7062
  _this.initializeCodemirrorFocus();
7063
+ _this.resizeBounds = {
7064
+ nativeElement: _this.contextService.getEditableElement()
7065
+ };
6948
7066
  });
6949
7067
  }
6950
7068
  };
@@ -6952,6 +7070,8 @@
6952
7070
  this.startRenderCodemirror = true;
6953
7071
  this.useReadonly();
6954
7072
  this.useMode();
7073
+ this.useAutoWrap();
7074
+ this.useHeight();
6955
7075
  this.cdr.detectChanges();
6956
7076
  };
6957
7077
  TheCodeComponent.prototype.initializeCodemirrorFocus = function () {
@@ -6967,17 +7087,14 @@
6967
7087
  }
6968
7088
  };
6969
7089
  TheCodeComponent.prototype.codeChange = function ($event) {
6970
- CodeEditor.setCodeContent(this.editor, $event, this.element);
6971
- };
6972
- TheCodeComponent.prototype.focusChange = function (codeMirrorFocused) {
6973
- this.codeMirrorFocused = codeMirrorFocused;
7090
+ CodeEditor.setCodeAttribute(this.editor, this.element, { content: $event });
6974
7091
  };
6975
7092
  TheCodeComponent.prototype.onDelete = function (event) {
6976
7093
  event.preventDefault();
7094
+ this.isFocusCode = false;
6977
7095
  deleteElement(this.editor, this.element);
6978
7096
  };
6979
7097
  TheCodeComponent.prototype.onCopy = function (event) {
6980
- var _this = this;
6981
7098
  event.preventDefault();
6982
7099
  event.stopPropagation();
6983
7100
  // remove codemorrir selection
@@ -6985,29 +7102,50 @@
6985
7102
  if (selection.rangeCount > 0) {
6986
7103
  selection.removeAllRanges();
6987
7104
  }
6988
- // focus the element
6989
- setTimeout(function () {
6990
- i1.AngularEditor.focus(_this.editor);
6991
- slate.Transforms.select(_this.editor, i1.AngularEditor.findPath(_this.editor, _this.element));
6992
- });
6993
- // copy the element
6994
- setTimeout(function () {
6995
- document.execCommand('copy');
6996
- _this.thyNotifyService.success('复制成功');
6997
- }, 200);
7105
+ i1.AngularEditor.focus(this.editor);
7106
+ slate.Transforms.select(this.editor, i1.AngularEditor.findPath(this.editor, this.element));
7107
+ document.execCommand('copy');
7108
+ this.thyNotifyService.success('复制成功');
7109
+ i1.AngularEditor.deselect(this.editor);
7110
+ };
7111
+ TheCodeComponent.prototype.focusChange = function (codeMirrorFocused) {
7112
+ if (codeMirrorFocused)
7113
+ this.isFocusCode = codeMirrorFocused;
6998
7114
  };
6999
7115
  TheCodeComponent.prototype.useMode = function () {
7000
7116
  var _this = this;
7001
7117
  this.options = Object.assign(Object.assign({}, this.options), { mode: this.element.language });
7002
7118
  this.actives = this.menus.find(function (i) { return i.key === _this.element.language; });
7003
7119
  };
7120
+ TheCodeComponent.prototype.useAutoWrap = function () {
7121
+ this.options = Object.assign(Object.assign({}, this.options), { lineWrapping: this.element.autoWrap || false });
7122
+ };
7123
+ TheCodeComponent.prototype.useHeight = function () {
7124
+ if (this.element.height) {
7125
+ this.resizeHeight = this.element.height;
7126
+ this.maxHeight = this.element.height;
7127
+ }
7128
+ };
7004
7129
  TheCodeComponent.prototype.useReadonly = function () {
7005
7130
  this.options = Object.assign(Object.assign({}, this.options), { readOnly: this.readonly, cursorBlinkRate: this.readonly ? -1 : 500 });
7006
7131
  };
7132
+ TheCodeComponent.prototype.onResize = function (_a) {
7133
+ var height = _a.height;
7134
+ this.resizeHeight = height;
7135
+ this.maxHeight = height;
7136
+ };
7137
+ TheCodeComponent.prototype.onEndResize = function () {
7138
+ slate.Transforms.select(this.editor, i1.AngularEditor.findPath(this.editor, this.element));
7139
+ CodeEditor.setCodeAttribute(this.editor, this.element, { height: this.resizeHeight });
7140
+ };
7141
+ TheCodeComponent.prototype.onChangeWrap = function (value) {
7142
+ this.options = Object.assign(Object.assign({}, this.options), { lineWrapping: value || false });
7143
+ CodeEditor.setCodeAttribute(this.editor, this.element, { autoWrap: value ? value : null });
7144
+ };
7007
7145
  return TheCodeComponent;
7008
7146
  }(TheBaseElementComponent));
7009
- TheCodeComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheCodeComponent, deps: [{ token: i0__namespace.ElementRef }, { token: i0__namespace.ChangeDetectorRef }, { token: i1__namespace$4.ThyNotifyService }, { token: i0__namespace.NgZone }, { token: THE_CODE_MODE_TOKEN }], target: i0__namespace.ɵɵFactoryTarget.Component });
7010
- TheCodeComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheCodeComponent, selector: "div[theCode]", viewQueries: [{ propertyName: "codemirror", first: true, predicate: ["codemirror"], descendants: true, read: i5$2.CodeMirrorComponent }], usesInheritance: true, ngImport: i0__namespace, template: "<div contenteditable=\"false\" class=\"the-block-operation\" *ngIf=\"codeMirrorFocused && !options.readOnly\">\n <thy-icon-nav>\n <the-toolbar-dropdown [menus]=\"menus\" [item]=\"actives\" [itemMousedownHandle]=\"onChangeLangulage\"></the-toolbar-dropdown>\n <a\n href=\"javascript:;\"\n thyIconNavLink\n thyIconNavLinkIcon=\"copy\"\n thyTooltip=\"\u590D\u5236\"\n thyTooltipPlacement=\"top\"\n (mousedown)=\"onCopy($event)\"\n ></a>\n <a\n href=\"javascript:;\"\n thyIconNavLink\n thyIconNavLinkIcon=\"trash\"\n thyTooltip=\"\u5220\u9664\"\n class=\"remove-link\"\n thyTooltipPlacement=\"top\"\n (mousedown)=\"onDelete($event)\"\n ></a>\n </thy-icon-nav>\n</div>\n\n<slate-children [children]=\"children\" [context]=\"childrenContext\" [viewContext]=\"viewContext\"></slate-children>\n<ng-codemirror\n *ngIf=\"startRenderCodemirror\"\n #codemirror\n contenteditable=\"false\"\n class=\"ng-codemirror-wrapper\"\n [ngStyle]=\"{ maxHeight: maxHeight > 0 ? maxHeight + 'px' : 'auto' }\"\n [options]=\"options\"\n [ngModel]=\"code\"\n [delayRefreshTime]=\"300\"\n (ngModelChange)=\"codeChange($event)\"\n (focusChange)=\"focusChange($event)\"\n [autoMaxHeight]=\"maxHeight\"\n></ng-codemirror>\n", components: [{ type: i2__namespace.ThyIconNavComponent, selector: "thy-icon-nav", inputs: ["thyType"] }, { type: TheToolbarDropdownComponent, selector: "the-toolbar-dropdown", inputs: ["toolbarItem", "menus", "mode", "item", "itemMousedownHandle"] }, { type: i2__namespace.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i1__namespace.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }, { type: i5__namespace$2.CodeMirrorComponent, selector: "ng-codemirror, [ngCodeMirror]", inputs: ["autoMaxHeight", "delayRefreshTime", "options"], outputs: ["focusChange"] }], directives: [{ type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i7__namespace.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { type: i6__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i4__namespace$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4__namespace$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
7147
+ TheCodeComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheCodeComponent, deps: [{ token: i0__namespace.ElementRef }, { token: i0__namespace.ChangeDetectorRef }, { token: i1__namespace$4.ThyNotifyService }, { token: TheContextService }, { token: i0__namespace.NgZone }, { token: THE_CODE_MODE_TOKEN }], target: i0__namespace.ɵɵFactoryTarget.Component });
7148
+ TheCodeComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheCodeComponent, selector: "div[theCode]", viewQueries: [{ propertyName: "codemirror", first: true, predicate: ["codemirror"], descendants: true, read: i8.CodeMirrorComponent }], usesInheritance: true, ngImport: i0__namespace, template: "<div contenteditable=\"false\" class=\"the-code-block-operation\" *ngIf=\"isFocusCode && !options.readOnly\">\n <thy-icon-nav>\n <the-toolbar-dropdown [menus]=\"menus\" [item]=\"actives\" [itemMousedownHandle]=\"onChangeLangulage\"> </the-toolbar-dropdown>\n <a\n href=\"javascript:;\"\n thyIconNavLink\n thyIconNavLinkIcon=\"copy\"\n thyTooltip=\"\u590D\u5236\"\n thyTooltipPlacement=\"top\"\n (mousedown)=\"onCopy($event)\"\n ></a>\n <a\n href=\"javascript:;\"\n thyIconNavLink\n thyIconNavLinkIcon=\"trash\"\n thyTooltip=\"\u5220\u9664\"\n class=\"remove-link\"\n thyTooltipPlacement=\"top\"\n (mousedown)=\"onDelete($event)\"\n ></a>\n <nav-split-line [mode]=\"ToolbarItemMode.vertical\"></nav-split-line>\n <span class=\"auto-wrap d-flex align-items-center\">\n <span>\u81EA\u52A8\u6362\u884C</span>\n <thy-switch\n class=\"auto-wrap-btn d-flex\"\n [(ngModel)]=\"options.lineWrapping\"\n (ngModelChange)=\"onChangeWrap($event)\"\n thySize=\"sm\"\n ></thy-switch>\n </span>\n </thy-icon-nav>\n</div>\n\n<slate-children [children]=\"children\" [context]=\"childrenContext\" [viewContext]=\"viewContext\"></slate-children>\n<div\n thyResizable\n [thyMinHeight]=\"44\"\n [thyBounds]=\"resizeBounds\"\n [style.height.px]=\"resizeHeight\"\n (thyResize)=\"onResize($event)\"\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=\"isFocusCode && !options.readOnly\"></thy-resize-handle>\n</div>\n", components: [{ type: i3__namespace.ThyIconNavComponent, selector: "thy-icon-nav", inputs: ["thyType"] }, { type: TheToolbarDropdownComponent, selector: "the-toolbar-dropdown", inputs: ["toolbarItem", "menus", "mode", "item", "itemMousedownHandle"] }, { type: i3__namespace.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: NavSplitLineComponent, selector: "nav-split-line", inputs: ["mode"] }, { type: i6__namespace$1.ThySwitchComponent, selector: "thy-switch", inputs: ["thyType", "thySize", "thyDisabled"], outputs: ["thyChange"] }, { type: i1__namespace.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }, { type: i8__namespace.CodeMirrorComponent, selector: "ng-codemirror, [ngCodeMirror]", inputs: ["autoMaxHeight", "delayRefreshTime", "options"], outputs: ["focusChange"] }, { type: i9__namespace.ThyResizeHandleComponent, selector: "thy-resize-handle, [thy-resize-handle]", inputs: ["thyDirection"], outputs: ["thyMouseDown"], exportAs: ["thyResizeHandle"] }], directives: [{ type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5__namespace$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { type: i4__namespace$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4__namespace$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i9__namespace.ThyResizableDirective, selector: "[thyResizable]", inputs: ["thyBounds", "thyMaxHeight", "thyMaxWidth", "thyMinHeight", "thyMinWidth", "thyGridColumnCount", "thyMaxColumn", "thyMinColumn", "thyLockAspectRatio", "thyPreview", "thyDisabled"], outputs: ["thyResize", "thyResizeEnd", "thyResizeStart"] }, { type: i6__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
7011
7149
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheCodeComponent, decorators: [{
7012
7150
  type: i0.Component,
7013
7151
  args: [{
@@ -7016,13 +7154,13 @@
7016
7154
  changeDetection: i0.ChangeDetectionStrategy.OnPush
7017
7155
  }]
7018
7156
  }], ctorParameters: function () {
7019
- return [{ type: i0__namespace.ElementRef }, { type: i0__namespace.ChangeDetectorRef }, { type: i1__namespace$4.ThyNotifyService }, { type: i0__namespace.NgZone }, { type: TheCodeMode, decorators: [{
7157
+ return [{ type: i0__namespace.ElementRef }, { type: i0__namespace.ChangeDetectorRef }, { type: i1__namespace$4.ThyNotifyService }, { type: TheContextService }, { type: i0__namespace.NgZone }, { type: TheCodeConfig, decorators: [{
7020
7158
  type: i0.Inject,
7021
7159
  args: [THE_CODE_MODE_TOKEN]
7022
7160
  }] }];
7023
7161
  }, propDecorators: { codemirror: [{
7024
7162
  type: i0.ViewChild,
7025
- args: ['codemirror', { read: i5$2.CodeMirrorComponent, static: false }]
7163
+ args: ['codemirror', { read: i8.CodeMirrorComponent, static: false }]
7026
7164
  }] } });
7027
7165
 
7028
7166
  var withCode = function (editor) {
@@ -7236,7 +7374,7 @@
7236
7374
  return TheLinkEditComponent;
7237
7375
  }());
7238
7376
  TheLinkEditComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheLinkEditComponent, deps: [{ token: i1__namespace$3.ThyPopoverRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
7239
- TheLinkEditComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheLinkEditComponent, selector: "the-link-edit", inputs: { tag: "tag", node: "node", link: "link", text: "text", originSelection: "originSelection" }, host: { listeners: { "document: mousedown": "handleDocumentMouseDown($event)" }, properties: { "class": "this.className" } }, ngImport: i0__namespace, template: "<form\n thyForm\n #linkForm=\"thyForm\"\n [thyFormValidatorConfig]=\"validatorConfig\"\n name=\"linkForm\"\n>\n <thy-form-group thyLabelText=\"\u6587\u672C\">\n <input\n thyInput\n placeholder=\"\u8BF7\u8F93\u5165\u6587\u672C\"\n required\n name=\"text\"\n [(ngModel)]=\"text\"\n thyAutofocus\n type=\"text\"\n />\n </thy-form-group>\n <thy-form-group thyLabelText=\"\u94FE\u63A5\">\n <input\n name=\"link\"\n thyInput\n placeholder=\"\u8BF7\u8F93\u5165\u94FE\u63A5\"\n required\n type=\"text\"\n #linkControl=\"ngModel\"\n [(ngModel)]=\"link\"\n />\n </thy-form-group>\n <thy-form-group-footer>\n <div class=\"btn-pair\">\n <button\n thyButton=\"link-secondary\"\n thySize=\"sm\"\n (click)=\"closePopover()\"\n >\u53D6\u6D88</button>\n <button\n thyButton=\"primary-square\"\n thySize=\"sm\"\n (thyFormSubmit)=\"applyLink(linkForm)\"\n >\u5E94\u7528</button>\n </div>\n </thy-form-group-footer>\n</form>\n", components: [{ type: i2__namespace$2.ThyFormGroupComponent, selector: "thy-form-group", inputs: ["thyLabelText", "thyLabelTextTranslateKey", "thyLabelRequired", "thyLabelPaddingTopClear", "thyFeedbackIcon", "thyTips", "thyTipsTranslateKey", "thyRowFill"] }, { type: i2__namespace$2.ThyFormGroupFooterComponent, selector: "thy-form-group-footer", inputs: ["thyAlign"] }, { type: i1__namespace$5.ThyButtonComponent, selector: "thy-button,[thy-button],[thyButton]", inputs: ["thyButton", "thyType", "thyLoading", "thyLoadingText", "thySize", "thyIcon", "thySquare", "thyBlock"] }], directives: [{ type: i4__namespace$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i4__namespace$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i4__namespace$2.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i2__namespace$2.ThyFormDirective, selector: "[thyForm],[thy-form]", inputs: ["thyLayout", "thyEnterKeyMode", "thyFormValidatorConfig"], exportAs: ["thyForm"] }, { type: i5__namespace$3.ThyAutofocusDirective, selector: "input[thyAutofocus],textarea[thyAutofocus]", inputs: ["thyAutoSelect", "thyAutofocus"] }, { type: i4__namespace$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i5__namespace.ThyInputDirective, selector: "[thyInput]", inputs: ["thySize", "thyAutocomplete"] }, { type: i4__namespace$2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i4__namespace$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4__namespace$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i2__namespace$2.ThyFormSubmitDirective, selector: "[thyFormSubmit],[thy-form-submit]", outputs: ["thyFormSubmit"] }] });
7377
+ TheLinkEditComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheLinkEditComponent, selector: "the-link-edit", inputs: { tag: "tag", node: "node", link: "link", text: "text", originSelection: "originSelection" }, host: { listeners: { "document: mousedown": "handleDocumentMouseDown($event)" }, properties: { "class": "this.className" } }, ngImport: i0__namespace, template: "<form\n thyForm\n #linkForm=\"thyForm\"\n [thyFormValidatorConfig]=\"validatorConfig\"\n name=\"linkForm\"\n>\n <thy-form-group thyLabelText=\"\u6587\u672C\">\n <input\n thyInput\n placeholder=\"\u8BF7\u8F93\u5165\u6587\u672C\"\n required\n name=\"text\"\n [(ngModel)]=\"text\"\n thyAutofocus\n type=\"text\"\n />\n </thy-form-group>\n <thy-form-group thyLabelText=\"\u94FE\u63A5\">\n <input\n name=\"link\"\n thyInput\n placeholder=\"\u8BF7\u8F93\u5165\u94FE\u63A5\"\n required\n type=\"text\"\n #linkControl=\"ngModel\"\n [(ngModel)]=\"link\"\n />\n </thy-form-group>\n <thy-form-group-footer>\n <div class=\"btn-pair\">\n <button\n thyButton=\"link-secondary\"\n thySize=\"sm\"\n (click)=\"closePopover()\"\n >\u53D6\u6D88</button>\n <button\n thyButton=\"primary-square\"\n thySize=\"sm\"\n (thyFormSubmit)=\"applyLink(linkForm)\"\n >\u5E94\u7528</button>\n </div>\n </thy-form-group-footer>\n</form>\n", components: [{ type: i2__namespace$1.ThyFormGroupComponent, selector: "thy-form-group", inputs: ["thyLabelText", "thyLabelTextTranslateKey", "thyLabelRequired", "thyLabelPaddingTopClear", "thyFeedbackIcon", "thyTips", "thyTipsTranslateKey", "thyRowFill"] }, { type: i2__namespace$1.ThyFormGroupFooterComponent, selector: "thy-form-group-footer", inputs: ["thyAlign"] }, { type: i1__namespace$5.ThyButtonComponent, selector: "thy-button,[thy-button],[thyButton]", inputs: ["thyButton", "thyType", "thyLoading", "thyLoadingText", "thySize", "thyIcon", "thySquare", "thyBlock"] }], directives: [{ type: i4__namespace$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i4__namespace$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i4__namespace$2.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i2__namespace$1.ThyFormDirective, selector: "[thyForm],[thy-form]", inputs: ["thyLayout", "thyEnterKeyMode", "thyFormValidatorConfig"], exportAs: ["thyForm"] }, { type: i5__namespace$3.ThyAutofocusDirective, selector: "input[thyAutofocus],textarea[thyAutofocus]", inputs: ["thyAutoSelect", "thyAutofocus"] }, { type: i4__namespace$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i5__namespace.ThyInputDirective, selector: "[thyInput]", inputs: ["thySize", "thyAutocomplete"] }, { type: i4__namespace$2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i4__namespace$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4__namespace$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i2__namespace$1.ThyFormSubmitDirective, selector: "[thyFormSubmit],[thy-form-submit]", outputs: ["thyFormSubmit"] }] });
7240
7378
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheLinkEditComponent, decorators: [{
7241
7379
  type: i0.Component,
7242
7380
  args: [{
@@ -7389,7 +7527,7 @@
7389
7527
  };
7390
7528
  return TheBaseLinkComponent;
7391
7529
  }(TheBaseElementComponent));
7392
- TheBaseLinkComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheBaseLinkComponent, deps: [{ token: i0__namespace.ElementRef }, { token: i0__namespace.ChangeDetectorRef }, { token: i1__namespace$3.ThyPopover }, { token: i2__namespace$1.Overlay }, { token: i0__namespace.ViewContainerRef }, { token: i1__namespace$6.ThyClickDispatcher }], target: i0__namespace.ɵɵFactoryTarget.Component });
7530
+ TheBaseLinkComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheBaseLinkComponent, deps: [{ token: i0__namespace.ElementRef }, { token: i0__namespace.ChangeDetectorRef }, { token: i1__namespace$3.ThyPopover }, { token: i2__namespace.Overlay }, { token: i0__namespace.ViewContainerRef }, { token: i1__namespace$6.ThyClickDispatcher }], target: i0__namespace.ɵɵFactoryTarget.Component });
7393
7531
  TheBaseLinkComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheBaseLinkComponent, selector: "[TheBaseLinkComponent]", host: { listeners: { "click": "mousedownHandle($event)" } }, usesInheritance: true, ngImport: i0__namespace, template: '', isInline: true });
7394
7532
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheBaseLinkComponent, decorators: [{
7395
7533
  type: i0.Component,
@@ -7397,7 +7535,7 @@
7397
7535
  selector: '[TheBaseLinkComponent]',
7398
7536
  template: ''
7399
7537
  }]
7400
- }], ctorParameters: function () { return [{ type: i0__namespace.ElementRef }, { type: i0__namespace.ChangeDetectorRef }, { type: i1__namespace$3.ThyPopover }, { type: i2__namespace$1.Overlay }, { type: i0__namespace.ViewContainerRef }, { type: i1__namespace$6.ThyClickDispatcher }]; }, propDecorators: { mousedownHandle: [{
7538
+ }], ctorParameters: function () { return [{ type: i0__namespace.ElementRef }, { type: i0__namespace.ChangeDetectorRef }, { type: i1__namespace$3.ThyPopover }, { type: i2__namespace.Overlay }, { type: i0__namespace.ViewContainerRef }, { type: i1__namespace$6.ThyClickDispatcher }]; }, propDecorators: { mousedownHandle: [{
7401
7539
  type: i0.HostListener,
7402
7540
  args: ['click', ['$event']]
7403
7541
  }] } });
@@ -7589,8 +7727,8 @@
7589
7727
  };
7590
7728
  return TheTableToolbarItemComponent;
7591
7729
  }(TheToolbarBaseItemComponent));
7592
- TheTableToolbarItemComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheTableToolbarItemComponent, deps: [{ token: i1__namespace$6.ThyPopover }, { token: i2__namespace$1.Overlay }], target: i0__namespace.ɵɵFactoryTarget.Component });
7593
- TheTableToolbarItemComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheTableToolbarItemComponent, selector: "the-table-toolbar-item", inputs: { item: "item", editor: "editor" }, host: { classAttribute: "the-toolbar-dropdown-container" }, usesInheritance: true, ngImport: i0__namespace, template: "\n <a\n thyIconNavLink\n class=\"link-with-down\"\n [thyTooltip]=\"item?.name\"\n thyTooltipPlacement=\"top\"\n [thyIconNavLinkActive]=\"active\"\n (mousedown)=\"execute($event)\"\n >\n <thy-icon [thyIconName]=\"item.icon\"></thy-icon>\n <thy-icon class=\"link-down-icon font-size-sm text-desc table-down-icon\" thyIconName=\"caret-down\"> </thy-icon>\n </a>\n ", isInline: true, components: [{ type: i2__namespace.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i4__namespace$1.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }], directives: [{ type: i7__namespace.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }] });
7730
+ TheTableToolbarItemComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheTableToolbarItemComponent, deps: [{ token: i1__namespace$6.ThyPopover }, { token: i2__namespace.Overlay }], target: i0__namespace.ɵɵFactoryTarget.Component });
7731
+ TheTableToolbarItemComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheTableToolbarItemComponent, selector: "the-table-toolbar-item", inputs: { item: "item", editor: "editor" }, host: { classAttribute: "the-toolbar-dropdown-container" }, usesInheritance: true, ngImport: i0__namespace, template: "\n <a\n thyIconNavLink\n class=\"link-with-down\"\n [thyTooltip]=\"item?.name\"\n thyTooltipPlacement=\"top\"\n [thyIconNavLinkActive]=\"active\"\n (mousedown)=\"execute($event)\"\n >\n <thy-icon [thyIconName]=\"item.icon\"></thy-icon>\n <thy-icon class=\"link-down-icon font-size-sm text-desc table-down-icon\" thyIconName=\"caret-down\"> </thy-icon>\n </a>\n ", isInline: true, components: [{ type: i3__namespace.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i4__namespace$1.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }], directives: [{ type: i5__namespace$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }] });
7594
7732
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheTableToolbarItemComponent, decorators: [{
7595
7733
  type: i0.Component,
7596
7734
  args: [{
@@ -7600,7 +7738,7 @@
7600
7738
  class: 'the-toolbar-dropdown-container'
7601
7739
  }
7602
7740
  }]
7603
- }], ctorParameters: function () { return [{ type: i1__namespace$6.ThyPopover }, { type: i2__namespace$1.Overlay }]; }, propDecorators: { item: [{
7741
+ }], ctorParameters: function () { return [{ type: i1__namespace$6.ThyPopover }, { type: i2__namespace.Overlay }]; }, propDecorators: { item: [{
7604
7742
  type: i0.Input
7605
7743
  }], editor: [{
7606
7744
  type: i0.Input
@@ -8362,49 +8500,6 @@
8362
8500
  });
8363
8501
  }
8364
8502
 
8365
- var NavSplitLineComponent = /** @class */ (function () {
8366
- function NavSplitLineComponent() {
8367
- this.mode = exports.ToolbarItemMode.vertical;
8368
- this.theNavSplitLine = true;
8369
- }
8370
- Object.defineProperty(NavSplitLineComponent.prototype, "horizontal", {
8371
- get: function () {
8372
- return this.mode === exports.ToolbarItemMode.horizontal;
8373
- },
8374
- enumerable: false,
8375
- configurable: true
8376
- });
8377
- Object.defineProperty(NavSplitLineComponent.prototype, "vertical", {
8378
- get: function () {
8379
- return this.mode === exports.ToolbarItemMode.vertical;
8380
- },
8381
- enumerable: false,
8382
- configurable: true
8383
- });
8384
- NavSplitLineComponent.prototype.ngOnInit = function () { };
8385
- return NavSplitLineComponent;
8386
- }());
8387
- NavSplitLineComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: NavSplitLineComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
8388
- NavSplitLineComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: NavSplitLineComponent, selector: "nav-split-line", inputs: { mode: "mode" }, host: { properties: { "class.the-nav-split-line": "this.theNavSplitLine", "class.horizontal": "this.horizontal", "class.vertical": "this.vertical" } }, ngImport: i0__namespace, template: '', isInline: true });
8389
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: NavSplitLineComponent, decorators: [{
8390
- type: i0.Component,
8391
- args: [{
8392
- selector: 'nav-split-line',
8393
- template: ''
8394
- }]
8395
- }], ctorParameters: function () { return []; }, propDecorators: { mode: [{
8396
- type: i0.Input
8397
- }], theNavSplitLine: [{
8398
- type: i0.HostBinding,
8399
- args: ['class.the-nav-split-line']
8400
- }], horizontal: [{
8401
- type: i0.HostBinding,
8402
- args: ['class.horizontal']
8403
- }], vertical: [{
8404
- type: i0.HostBinding,
8405
- args: ['class.vertical']
8406
- }] } });
8407
-
8408
8503
  var TheTableToolbarComponent = /** @class */ (function () {
8409
8504
  function TheTableToolbarComponent(ngZone, colorSelectService, popoverRef) {
8410
8505
  var _this = this;
@@ -8526,7 +8621,7 @@
8526
8621
  return TheTableToolbarComponent;
8527
8622
  }());
8528
8623
  TheTableToolbarComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheTableToolbarComponent, deps: [{ token: i0__namespace.NgZone }, { token: TheColorSelectService }, { token: i1__namespace$3.ThyPopoverRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
8529
- TheTableToolbarComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheTableToolbarComponent, selector: "the-table-toolbar", inputs: { tableStore: "tableStore", isActiveSelect: "isActiveSelect" }, ngImport: i0__namespace, template: "<thy-icon-nav>\n <ng-container *ngFor=\"let item of cellMenuList\">\n <a href=\"javascript:;\" thyIconNavLink *ngIf=\"!item.invisibility\" [thyTooltip]=\"item.name\" (mousedown)=\"item.actionHandle()\">\n <thy-icon [thyIconName]=\"item.icon\"></thy-icon>\n </a>\n </ng-container>\n <nav-split-line *ngIf=\"!isActiveSelect && isShowSplitLine\"></nav-split-line>\n <a href=\"javascript:;\" thyIconNavLink thyTooltip=\"\u5355\u5143\u683C\u80CC\u666F\" (mousedown)=\"openSelectColor($event)\">\n <thy-icon thyIconName=\"background-tt\" thyIconType=\"twotone\" [thyTwotoneColor]=\"selectedColor\"></thy-icon>\n </a>\n <nav-split-line *ngIf=\"deleteIcon\"></nav-split-line>\n <a\n *ngIf=\"deleteIcon\"\n href=\"javascript:;\"\n thyIconNavLink\n [thyTooltip]=\"iconName\"\n class=\"danger\"\n [thyIconNavLinkIcon]=\"deleteIcon\"\n (mousedown)=\"onDelete($event)\"\n (mouseenter)=\"onEnterDelete($event)\"\n (mouseleave)=\"onLeaveDelete($event)\"\n ></a>\n</thy-icon-nav>\n", components: [{ type: i2__namespace.ThyIconNavComponent, selector: "thy-icon-nav", inputs: ["thyType"] }, { type: i2__namespace.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i4__namespace$1.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { type: NavSplitLineComponent, selector: "nav-split-line", inputs: ["mode"] }], directives: [{ type: i6__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i7__namespace.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }] });
8624
+ TheTableToolbarComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheTableToolbarComponent, selector: "the-table-toolbar", inputs: { tableStore: "tableStore", isActiveSelect: "isActiveSelect" }, ngImport: i0__namespace, template: "<thy-icon-nav>\n <ng-container *ngFor=\"let item of cellMenuList\">\n <a href=\"javascript:;\" thyIconNavLink *ngIf=\"!item.invisibility\" [thyTooltip]=\"item.name\" (mousedown)=\"item.actionHandle()\">\n <thy-icon [thyIconName]=\"item.icon\"></thy-icon>\n </a>\n </ng-container>\n <nav-split-line *ngIf=\"!isActiveSelect && isShowSplitLine\"></nav-split-line>\n <a href=\"javascript:;\" thyIconNavLink thyTooltip=\"\u5355\u5143\u683C\u80CC\u666F\" (mousedown)=\"openSelectColor($event)\">\n <thy-icon thyIconName=\"background-tt\" thyIconType=\"twotone\" [thyTwotoneColor]=\"selectedColor\"></thy-icon>\n </a>\n <nav-split-line *ngIf=\"deleteIcon\"></nav-split-line>\n <a\n *ngIf=\"deleteIcon\"\n href=\"javascript:;\"\n thyIconNavLink\n [thyTooltip]=\"iconName\"\n class=\"danger\"\n [thyIconNavLinkIcon]=\"deleteIcon\"\n (mousedown)=\"onDelete($event)\"\n (mouseenter)=\"onEnterDelete($event)\"\n (mouseleave)=\"onLeaveDelete($event)\"\n ></a>\n</thy-icon-nav>\n", components: [{ type: i3__namespace.ThyIconNavComponent, selector: "thy-icon-nav", inputs: ["thyType"] }, { type: i3__namespace.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i4__namespace$1.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { type: NavSplitLineComponent, selector: "nav-split-line", inputs: ["mode"] }], directives: [{ type: i6__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5__namespace$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }] });
8530
8625
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheTableToolbarComponent, decorators: [{
8531
8626
  type: i0.Component,
8532
8627
  args: [{
@@ -8590,7 +8685,7 @@
8590
8685
  return TheContextMenuComponent;
8591
8686
  }());
8592
8687
  TheContextMenuComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheContextMenuComponent, deps: [{ token: i0__namespace.ElementRef }, { token: i1__namespace$3.ThyPopoverRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
8593
- TheContextMenuComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheContextMenuComponent, selector: "the-contextmenu", inputs: { menuEntities: "menuEntities", actionHandle: "actionHandle", activeHandle: "activeHandle", deactiveHandle: "deactiveHandle" }, host: { listeners: { "document: mousedown": "handleDocumentMouseDown($event)", "mousedown": "handleMouseDown($event)" }, properties: { "class.the-overlay-menu-wrap": "this.wrap" } }, ngImport: i0__namespace, template: "<thy-action-menu>\n <ng-container *ngFor=\"let menuItem of menuEntities\">\n <a\n thyActionMenuItem\n href=\"javascript:;\"\n *ngIf=\"!menuItem.invisibility\"\n (mousedown)=\"itemMousedown($event, menuItem)\"\n (mouseenter)=\"itemMouseenter($event, menuItem)\"\n (mouseleave)=\"itemMouseleave($event, menuItem)\"\n >\n <span thyActionMenuItemIcon>\n <thy-icon\n *ngIf=\"menuItem.backgroundColor; else elseIcon\"\n [thyIconName]=\"menuItem.icon\"\n thyIconType=\"twotone\"\n [thyTwotoneColor]=\"menuItem.backgroundColor\"\n ></thy-icon>\n <ng-template #elseIcon>\n <thy-icon [thyIconName]=\"menuItem.icon\"></thy-icon>\n </ng-template>\n </span>\n <span thyActionMenuItemName>{{ menuItem.name }}</span>\n <span *ngIf=\"menuItem.extendIcon\" thyActionMenuItemExtendIcon>\n <thy-icon thyIconName=\"{{ menuItem.extendIcon }}\"></thy-icon>\n </span>\n </a>\n <thy-action-menu-divider *ngIf=\"menuItem.divider\"></thy-action-menu-divider>\n </ng-container>\n</thy-action-menu>\n", components: [{ type: i5__namespace$1.ThyActionMenuComponent, selector: "thy-action-menu", inputs: ["thyTheme", "thyWidth"] }, { type: i4__namespace$1.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { type: i5__namespace$1.ThyActionMenuDividerComponent, selector: "thy-action-menu-divider", inputs: ["thyTitle", "thyType"] }], directives: [{ type: i6__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5__namespace$1.ThyActionMenuItemDirective, selector: "[thyActionMenuItem]", inputs: ["thyDisabled", "thyType"] }, { type: i5__namespace$1.ThyActionMenuItemIconDirective, selector: "[thyActionMenuItemIcon]" }, { type: i5__namespace$1.ThyActionMenuItemNameDirective, selector: "[thyActionMenuItemName]" }, { type: i5__namespace$1.ThyActionMenuItemExtendIconDirective, selector: "[thyActionMenuItemExtendIcon]" }] });
8688
+ TheContextMenuComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheContextMenuComponent, selector: "the-contextmenu", inputs: { menuEntities: "menuEntities", actionHandle: "actionHandle", activeHandle: "activeHandle", deactiveHandle: "deactiveHandle" }, host: { listeners: { "document: mousedown": "handleDocumentMouseDown($event)", "mousedown": "handleMouseDown($event)" }, properties: { "class.the-overlay-menu-wrap": "this.wrap" } }, ngImport: i0__namespace, template: "<thy-action-menu>\n <ng-container *ngFor=\"let menuItem of menuEntities\">\n <a\n thyActionMenuItem\n href=\"javascript:;\"\n *ngIf=\"!menuItem.invisibility\"\n (mousedown)=\"itemMousedown($event, menuItem)\"\n (mouseenter)=\"itemMouseenter($event, menuItem)\"\n (mouseleave)=\"itemMouseleave($event, menuItem)\"\n >\n <span thyActionMenuItemIcon>\n <thy-icon\n *ngIf=\"menuItem.backgroundColor; else elseIcon\"\n [thyIconName]=\"menuItem.icon\"\n thyIconType=\"twotone\"\n [thyTwotoneColor]=\"menuItem.backgroundColor\"\n ></thy-icon>\n <ng-template #elseIcon>\n <thy-icon [thyIconName]=\"menuItem.icon\"></thy-icon>\n </ng-template>\n </span>\n <span thyActionMenuItemName>{{ menuItem.name }}</span>\n <span *ngIf=\"menuItem.extendIcon\" thyActionMenuItemExtendIcon>\n <thy-icon thyIconName=\"{{ menuItem.extendIcon }}\"></thy-icon>\n </span>\n </a>\n <thy-action-menu-divider *ngIf=\"menuItem.divider\"></thy-action-menu-divider>\n </ng-container>\n</thy-action-menu>\n", components: [{ type: i5__namespace$2.ThyActionMenuComponent, selector: "thy-action-menu", inputs: ["thyTheme", "thyWidth"] }, { type: i4__namespace$1.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { type: i5__namespace$2.ThyActionMenuDividerComponent, selector: "thy-action-menu-divider", inputs: ["thyTitle", "thyType"] }], directives: [{ type: i6__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5__namespace$2.ThyActionMenuItemDirective, selector: "[thyActionMenuItem]", inputs: ["thyDisabled", "thyType"] }, { type: i5__namespace$2.ThyActionMenuItemIconDirective, selector: "[thyActionMenuItemIcon]" }, { type: i5__namespace$2.ThyActionMenuItemNameDirective, selector: "[thyActionMenuItemName]" }, { type: i5__namespace$2.ThyActionMenuItemExtendIconDirective, selector: "[thyActionMenuItemExtendIcon]" }] });
8594
8689
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheContextMenuComponent, decorators: [{
8595
8690
  type: i0.Component,
8596
8691
  args: [{
@@ -8901,11 +8996,11 @@
8901
8996
  };
8902
8997
  return TableService;
8903
8998
  }());
8904
- TableService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TableService, deps: [{ token: i1__namespace$3.ThyPopover }, { token: i2__namespace$1.Overlay }, { token: TableStore }, { token: TheTableContextMenuService }, { token: i0__namespace.NgZone }, { token: TheContextService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
8999
+ TableService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TableService, deps: [{ token: i1__namespace$3.ThyPopover }, { token: i2__namespace.Overlay }, { token: TableStore }, { token: TheTableContextMenuService }, { token: i0__namespace.NgZone }, { token: TheContextService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
8905
9000
  TableService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TableService });
8906
9001
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TableService, decorators: [{
8907
9002
  type: i0.Injectable
8908
- }], ctorParameters: function () { return [{ type: i1__namespace$3.ThyPopover }, { type: i2__namespace$1.Overlay }, { type: TableStore }, { type: TheTableContextMenuService }, { type: i0__namespace.NgZone }, { type: TheContextService }]; } });
9003
+ }], ctorParameters: function () { return [{ type: i1__namespace$3.ThyPopover }, { type: i2__namespace.Overlay }, { type: TableStore }, { type: TheTableContextMenuService }, { type: i0__namespace.NgZone }, { type: TheContextService }]; } });
8909
9004
 
8910
9005
  var SLA_TABLE_SELECTOR = '.slate-element-table';
8911
9006
  var SLA_TABLE_CELL_SELECTOR = '.slate-element-table-cell';
@@ -8993,7 +9088,7 @@
8993
9088
  return TheInsertMarkComponent;
8994
9089
  }());
8995
9090
  TheInsertMarkComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheInsertMarkComponent, deps: [{ token: i0__namespace.ChangeDetectorRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
8996
- TheInsertMarkComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheInsertMarkComponent, selector: "the-table-insert-mark", inputs: { type: "type", at: "at", tableStore: "tableStore" }, ngImport: i0__namespace, template: "<div\n [thyTooltip]=\"!disabled && tooltipContent\"\n class=\"the-table-controls-insert-wrapper\"\n [ngClass]=\"{ disabled: disabled }\"\n contenteditable=\"false\"\n (mousedown)=\"onMouseDown($event)\"\n (mouseenter)=\"onMouseEnter($event)\"\n (mouseleave)=\"onMouseLeave($event)\"\n>\n <div\n class=\"the-table-controls-insert-line\"\n *ngIf=\"dotWrapperHovered\"\n [attr.data-dot-type]=\"type\"\n [ngStyle]=\"{ height: type === 'column' && insertLength, width: type === 'row' && insertLength }\"\n ></div>\n</div>\n", directives: [{ type: i7__namespace.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { type: i6__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
9091
+ TheInsertMarkComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheInsertMarkComponent, selector: "the-table-insert-mark", inputs: { type: "type", at: "at", tableStore: "tableStore" }, ngImport: i0__namespace, template: "<div\n [thyTooltip]=\"!disabled && tooltipContent\"\n class=\"the-table-controls-insert-wrapper\"\n [ngClass]=\"{ disabled: disabled }\"\n contenteditable=\"false\"\n (mousedown)=\"onMouseDown($event)\"\n (mouseenter)=\"onMouseEnter($event)\"\n (mouseleave)=\"onMouseLeave($event)\"\n>\n <div\n class=\"the-table-controls-insert-line\"\n *ngIf=\"dotWrapperHovered\"\n [attr.data-dot-type]=\"type\"\n [ngStyle]=\"{ height: type === 'column' && insertLength, width: type === 'row' && insertLength }\"\n ></div>\n</div>\n", directives: [{ type: i5__namespace$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { type: i6__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
8997
9092
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheInsertMarkComponent, decorators: [{
8998
9093
  type: i0.Component,
8999
9094
  args: [{
@@ -10658,7 +10753,7 @@
10658
10753
  };
10659
10754
  return TheTdComponent;
10660
10755
  }(TheBaseElementComponent));
10661
- TheTdComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheTdComponent, deps: [{ token: i0__namespace.ElementRef }, { token: i0__namespace.ChangeDetectorRef }, { token: i0__namespace.Renderer2 }, { token: i0__namespace.ViewContainerRef }, { token: i0__namespace.NgZone }, { token: i0__namespace.Injector }, { token: i2__namespace$1.Overlay }, { token: ColumnResizingStore }, { token: i2__namespace$1.ScrollDispatcher }], target: i0__namespace.ɵɵFactoryTarget.Component });
10756
+ TheTdComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheTdComponent, deps: [{ token: i0__namespace.ElementRef }, { token: i0__namespace.ChangeDetectorRef }, { token: i0__namespace.Renderer2 }, { token: i0__namespace.ViewContainerRef }, { token: i0__namespace.NgZone }, { token: i0__namespace.Injector }, { token: i2__namespace.Overlay }, { token: ColumnResizingStore }, { token: i2__namespace.ScrollDispatcher }], target: i0__namespace.ɵɵFactoryTarget.Component });
10662
10757
  TheTdComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheTdComponent, selector: "td[theTd]", host: { properties: { "style.backgroundColor": "this.backgroundColor", "attr.colspan": "this.colspan", "attr.rowspan": "this.rowspan", "style.display": "this.display" } }, providers: [ColumnResizingStore], viewQueries: [{ propertyName: "cellInner", first: true, predicate: ["cellInner"], descendants: true, static: true }], usesInheritance: true, ngImport: i0__namespace, template: "<div #cellInner>\n <slate-children [children]=\"children\" [context]=\"childrenContext\" [viewContext]=\"viewContext\"></slate-children>\n</div>\n", components: [{ type: i1__namespace.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }] });
10663
10758
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheTdComponent, decorators: [{
10664
10759
  type: i0.Component,
@@ -10667,7 +10762,7 @@
10667
10762
  templateUrl: './td.component.html',
10668
10763
  providers: [ColumnResizingStore]
10669
10764
  }]
10670
- }], ctorParameters: function () { return [{ type: i0__namespace.ElementRef }, { type: i0__namespace.ChangeDetectorRef }, { type: i0__namespace.Renderer2 }, { type: i0__namespace.ViewContainerRef }, { type: i0__namespace.NgZone }, { type: i0__namespace.Injector }, { type: i2__namespace$1.Overlay }, { type: ColumnResizingStore }, { type: i2__namespace$1.ScrollDispatcher }]; }, propDecorators: { backgroundColor: [{
10765
+ }], ctorParameters: function () { return [{ type: i0__namespace.ElementRef }, { type: i0__namespace.ChangeDetectorRef }, { type: i0__namespace.Renderer2 }, { type: i0__namespace.ViewContainerRef }, { type: i0__namespace.NgZone }, { type: i0__namespace.Injector }, { type: i2__namespace.Overlay }, { type: ColumnResizingStore }, { type: i2__namespace.ScrollDispatcher }]; }, propDecorators: { backgroundColor: [{
10671
10766
  type: i0.HostBinding,
10672
10767
  args: ['style.backgroundColor']
10673
10768
  }], colspan: [{
@@ -11248,7 +11343,7 @@
11248
11343
  return TheVerticalToolbarItemComponent;
11249
11344
  }(TheToolbarBaseItemComponent));
11250
11345
  TheVerticalToolbarItemComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheVerticalToolbarItemComponent, deps: [{ token: i0__namespace.ElementRef }, { token: i1__namespace$6.ThyPopover }, { token: i0__namespace.ViewContainerRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
11251
- TheVerticalToolbarItemComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheVerticalToolbarItemComponent, selector: "the-toolbar-vertical-align-item", inputs: { item: "item", menus: "menus", editor: "editor", toolbarItem: "toolbarItem" }, host: { listeners: { "document: mousedown": "handleDocumentMouseDown($event)" }, properties: { "class.hide": "!active" }, classAttribute: "the-toolbar-dropdown-container verticalAlign" }, viewQueries: [{ propertyName: "template", first: true, predicate: ["VerticalAlignItems"], descendants: true, read: i0.TemplateRef, static: true }], usesInheritance: true, ngImport: i0__namespace, template: "<a\n thyIconNavLink\n class=\"icon-mode link-with-down\"\n [thyTooltip]=\"toolbarItem?.name\"\n [thyIconNavLinkActive]=\"isOpened\"\n thyTooltipPlacement=\"top\"\n (mousedown)=\"execute($event)\"\n>\n <thy-icon [thyIconName]=\"activeMenu?.icon\"></thy-icon>\n <thy-icon class=\"caret-down-icon font-size-sm text-desc\" thyIconName=\"caret-down\"></thy-icon>\n</a>\n\n<ng-template #VerticalAlignItems>\n <thy-action-menu class=\"dropdown\">\n <ng-container *ngFor=\"let menu of toolbarItem?.includes\">\n <a\n thyActionMenuItem\n href=\"javascript:;\"\n [thyActionMenuItemActive]=\"menu.key === activeMenu?.key\"\n [ngStyle]=\"menu?.styles\"\n (mousedown)=\"itemMousedown($event, menu)\"\n >\n <span *ngIf=\"menu.icon\" thyActionMenuItemIcon>\n <thy-icon [thyIconName]=\"menu?.icon\"></thy-icon>\n </span>\n <span thyActionMenuItemName>{{ menu.name }}</span>\n </a>\n </ng-container>\n </thy-action-menu>\n</ng-template>\n", components: [{ type: i2__namespace.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i4__namespace$1.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { type: i5__namespace$1.ThyActionMenuComponent, selector: "thy-action-menu", inputs: ["thyTheme", "thyWidth"] }], directives: [{ type: i7__namespace.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { type: i6__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i5__namespace$1.ThyActionMenuItemDirective, selector: "[thyActionMenuItem]", inputs: ["thyDisabled", "thyType"] }, { type: i5__namespace$1.ThyActionMenuItemActiveDirective, selector: "[thyActionMenuItemActive]", inputs: ["thyActionMenuItemActive"] }, { type: i6__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5__namespace$1.ThyActionMenuItemIconDirective, selector: "[thyActionMenuItemIcon]" }, { type: i5__namespace$1.ThyActionMenuItemNameDirective, selector: "[thyActionMenuItemName]" }] });
11346
+ TheVerticalToolbarItemComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheVerticalToolbarItemComponent, selector: "the-toolbar-vertical-align-item", inputs: { item: "item", menus: "menus", editor: "editor", toolbarItem: "toolbarItem" }, host: { listeners: { "document: mousedown": "handleDocumentMouseDown($event)" }, properties: { "class.hide": "!active" }, classAttribute: "the-toolbar-dropdown-container verticalAlign" }, viewQueries: [{ propertyName: "template", first: true, predicate: ["VerticalAlignItems"], descendants: true, read: i0.TemplateRef, static: true }], usesInheritance: true, ngImport: i0__namespace, template: "<a\n thyIconNavLink\n class=\"icon-mode link-with-down\"\n [thyTooltip]=\"toolbarItem?.name\"\n [thyIconNavLinkActive]=\"isOpened\"\n thyTooltipPlacement=\"top\"\n (mousedown)=\"execute($event)\"\n>\n <thy-icon [thyIconName]=\"activeMenu?.icon\"></thy-icon>\n <thy-icon class=\"caret-down-icon font-size-sm text-desc\" thyIconName=\"caret-down\"></thy-icon>\n</a>\n\n<ng-template #VerticalAlignItems>\n <thy-action-menu class=\"dropdown\">\n <ng-container *ngFor=\"let menu of toolbarItem?.includes\">\n <a\n thyActionMenuItem\n href=\"javascript:;\"\n [thyActionMenuItemActive]=\"menu.key === activeMenu?.key\"\n [ngStyle]=\"menu?.styles\"\n (mousedown)=\"itemMousedown($event, menu)\"\n >\n <span *ngIf=\"menu.icon\" thyActionMenuItemIcon>\n <thy-icon [thyIconName]=\"menu?.icon\"></thy-icon>\n </span>\n <span thyActionMenuItemName>{{ menu.name }}</span>\n </a>\n </ng-container>\n </thy-action-menu>\n</ng-template>\n", components: [{ type: i3__namespace.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i4__namespace$1.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { type: i5__namespace$2.ThyActionMenuComponent, selector: "thy-action-menu", inputs: ["thyTheme", "thyWidth"] }], directives: [{ type: i5__namespace$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { type: i6__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i5__namespace$2.ThyActionMenuItemDirective, selector: "[thyActionMenuItem]", inputs: ["thyDisabled", "thyType"] }, { type: i5__namespace$2.ThyActionMenuItemActiveDirective, selector: "[thyActionMenuItemActive]", inputs: ["thyActionMenuItemActive"] }, { type: i6__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5__namespace$2.ThyActionMenuItemIconDirective, selector: "[thyActionMenuItemIcon]" }, { type: i5__namespace$2.ThyActionMenuItemNameDirective, selector: "[thyActionMenuItemName]" }] });
11252
11347
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheVerticalToolbarItemComponent, decorators: [{
11253
11348
  type: i0.Component,
11254
11349
  args: [{
@@ -11477,8 +11572,19 @@
11477
11572
  _this.itemMode = exports.ToolbarItemMode.horizontal;
11478
11573
  _this.ToolbarItemMode = exports.ToolbarItemMode;
11479
11574
  _this.active = false;
11575
+ _this.disabled = false;
11480
11576
  return _this;
11481
11577
  }
11578
+ TheToolbarItemComponent.prototype.toggleDropdown = function (event) {
11579
+ _super.prototype.execute.call(this, event);
11580
+ };
11581
+ Object.defineProperty(TheToolbarItemComponent.prototype, "disabledState", {
11582
+ get: function () {
11583
+ return this.disabled;
11584
+ },
11585
+ enumerable: false,
11586
+ configurable: true
11587
+ });
11482
11588
  TheToolbarItemComponent.prototype.ngOnInit = function () {
11483
11589
  var _a, _b;
11484
11590
  if (((_a = this.item) === null || _a === void 0 ? void 0 : _a.quickItemComponent) && i1.isComponentType((_b = this.item) === null || _b === void 0 ? void 0 : _b.quickItemComponent)) {
@@ -11486,13 +11592,14 @@
11486
11592
  }
11487
11593
  };
11488
11594
  TheToolbarItemComponent.prototype.statusChange = function (editor) {
11489
- var _a, _b;
11490
- this.active = ((_a = this.item) === null || _a === void 0 ? void 0 : _a.active) ? (_b = this.item) === null || _b === void 0 ? void 0 : _b.active(editor) : false;
11595
+ var _a, _b, _c, _d;
11596
+ this.disabled = ((_a = this.item) === null || _a === void 0 ? void 0 : _a.disable) ? (_b = this.item) === null || _b === void 0 ? void 0 : _b.disable(editor) : false;
11597
+ this.active = ((_c = this.item) === null || _c === void 0 ? void 0 : _c.active) ? (_d = this.item) === null || _d === void 0 ? void 0 : _d.active(editor) : false;
11491
11598
  };
11492
11599
  TheToolbarItemComponent.prototype.execute = function (event) {
11493
11600
  var _a, _b, _c;
11494
11601
  _super.prototype.execute.call(this, event);
11495
- if (!((_a = this.item) === null || _a === void 0 ? void 0 : _a.execute) || ((_b = this.editor) === null || _b === void 0 ? void 0 : _b.disabled)) {
11602
+ if (((_a = this.editor) === null || _a === void 0 ? void 0 : _a.disabled) || this.disabled || !((_b = this.item) === null || _b === void 0 ? void 0 : _b.execute)) {
11496
11603
  return;
11497
11604
  }
11498
11605
  (_c = this.item) === null || _c === void 0 ? void 0 : _c.execute(this.editor);
@@ -11510,7 +11617,7 @@
11510
11617
  return TheToolbarItemComponent;
11511
11618
  }(TheToolbarBaseItemComponent));
11512
11619
  TheToolbarItemComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheToolbarItemComponent, deps: [{ token: i0__namespace.NgZone }, { token: i0__namespace.ComponentFactoryResolver }], target: i0__namespace.ɵɵFactoryTarget.Component });
11513
- TheToolbarItemComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheToolbarItemComponent, selector: "the-toolbar-item", inputs: { item: "item", editor: "editor", itemMode: "itemMode" }, host: { classAttribute: "the-toolbar-item" }, viewQueries: [{ propertyName: "toolbarContainer", first: true, predicate: ["toolbarContainer"], descendants: true, read: i0.ViewContainerRef, static: true }], usesInheritance: true, ngImport: i0__namespace, template: "\n <ng-container *ngIf=\"itemMode === ToolbarItemMode.horizontal; else selectionItem\">\n <a\n thyIconNavLink\n [thyIconNavLinkIcon]=\"item.icon\"\n [thyTooltip]=\"tooltip\"\n [thyTooltipTemplateContext]=\"{ name: item.name, shortcutKey: item.shortcutKey }\"\n thyTooltipPlacement=\"top\"\n [thyIconNavLinkActive]=\"active\"\n (mousedown)=\"execute($event)\"\n ></a>\n </ng-container>\n <ng-template #selectionItem>\n <ng-container *ngIf=\"!item?.quickItemComponent\">\n <thy-icon [thyIconName]=\"item?.icon\" [thyIconRotate]=\"0\" class=\"quick-toolbar-icon\"></thy-icon>\n <span class=\"quick-toolbar-name\">{{ item?.name }}</span>\n </ng-container>\n </ng-template>\n <ng-template #tooltip let-data> {{ data.name }} {{ data.shortcutKey }} </ng-template>\n <ng-container #toolbarContainer></ng-container>\n ", isInline: true, components: [{ type: i2__namespace.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i4__namespace$1.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }], directives: [{ type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i7__namespace.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }] });
11620
+ TheToolbarItemComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheToolbarItemComponent, selector: "the-toolbar-item", inputs: { item: "item", editor: "editor", itemMode: "itemMode" }, host: { listeners: { "mousedown": "toggleDropdown($event)" }, properties: { "class.disabled": "this.disabledState" }, classAttribute: "the-toolbar-item" }, viewQueries: [{ propertyName: "toolbarContainer", first: true, predicate: ["toolbarContainer"], descendants: true, read: i0.ViewContainerRef, static: true }], usesInheritance: true, ngImport: i0__namespace, template: "\n <ng-container *ngIf=\"itemMode === ToolbarItemMode.horizontal; else selectionItem\">\n <a\n thyIconNavLink\n [thyIconNavLinkIcon]=\"item.icon\"\n [thyTooltip]=\"tooltip\"\n [thyTooltipTemplateContext]=\"{ name: item.name, shortcutKey: item.shortcutKey }\"\n thyTooltipPlacement=\"top\"\n [thyIconNavLinkActive]=\"active\"\n (mousedown)=\"execute($event)\"\n ></a>\n </ng-container>\n <ng-template #selectionItem>\n <ng-container *ngIf=\"!item?.quickItemComponent\">\n <thy-icon [thyIconName]=\"item?.icon\" [thyIconRotate]=\"0\" class=\"quick-toolbar-icon\"></thy-icon>\n <span class=\"quick-toolbar-name\">{{ item?.name }}</span>\n </ng-container>\n </ng-template>\n <ng-template #tooltip let-data> {{ data.name }} {{ data.shortcutKey }} </ng-template>\n <ng-container #toolbarContainer></ng-container>\n ", isInline: true, components: [{ type: i3__namespace.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i4__namespace$1.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }], directives: [{ type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5__namespace$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }] });
11514
11621
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheToolbarItemComponent, decorators: [{
11515
11622
  type: i0.Component,
11516
11623
  args: [{
@@ -11529,6 +11636,12 @@
11529
11636
  }], toolbarContainer: [{
11530
11637
  type: i0.ViewChild,
11531
11638
  args: ['toolbarContainer', { read: i0.ViewContainerRef, static: true }]
11639
+ }], toggleDropdown: [{
11640
+ type: i0.HostListener,
11641
+ args: ['mousedown', ['$event']]
11642
+ }], disabledState: [{
11643
+ type: i0.HostBinding,
11644
+ args: ['class.disabled']
11532
11645
  }] } });
11533
11646
 
11534
11647
  var TheQuickToolbarComponent = /** @class */ (function (_super) {
@@ -11577,7 +11690,7 @@
11577
11690
  return TheQuickToolbarComponent;
11578
11691
  }(core.mixinUnsubscribe(core.MixinBase)));
11579
11692
  TheQuickToolbarComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheQuickToolbarComponent, deps: [{ token: i1__namespace$3.ThyPopoverRef }, { token: i0__namespace.ElementRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
11580
- TheQuickToolbarComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheQuickToolbarComponent, selector: "the-quick-toolbar", inputs: { editor: "editor", quickToolbarItems: "quickToolbarItems" }, host: { listeners: { "document: mousedown": "handleMouseDown($event)", "document: keydown.enter": "handleEnter()" } }, usesInheritance: true, ngImport: i0__namespace, template: "<thy-selection-list\n class=\"the-quick-toolbar\"\n [thyBindKeyEventContainer]=\"editorElement\"\n (thySelectionChange)=\"selectionChange($event)\"\n [thyMultiple]=\"false\"\n>\n <ng-container *ngFor=\"let item of quickToolbarItems\">\n <ng-container *ngIf=\"item.key !== ToolbarActionTypes.split; else splitLine\">\n <thy-list-option [thyValue]=\"item?.key\" (mousedown)=\"stopPropagation($event)\">\n <the-toolbar-item [editor]=\"editor\" [item]=\"item\" [itemMode]=\"ToolbarItemMode.vertical\"></the-toolbar-item>\n </thy-list-option>\n </ng-container>\n </ng-container>\n</thy-selection-list>\n\n<ng-template #splitLine>\n <nav-split-line [mode]=\"ToolbarItemMode.horizontal\"></nav-split-line>\n</ng-template>\n", components: [{ type: i2__namespace$3.ThySelectionListComponent, selector: "thy-selection-list,[thy-selection-list]", inputs: ["thyMultiple", "thyBindKeyEventContainer", "thyScrollContainer", "thyBeforeKeydown", "thyUniqueKey", "thyCompareWith", "thyLayout", "thyAutoActiveFirstItem", "thySize", "thySpaceKeyEnabled"], outputs: ["thySelectionChange"] }, { type: i5__namespace$3.ThyListOptionComponent, selector: "thy-list-option,[thy-list-option]", inputs: ["id", "thyValue", "thyDisabled"] }, { type: TheToolbarItemComponent, selector: "the-toolbar-item", inputs: ["item", "editor", "itemMode"] }, { type: NavSplitLineComponent, selector: "nav-split-line", inputs: ["mode"] }], directives: [{ type: i6__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
11693
+ TheQuickToolbarComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheQuickToolbarComponent, selector: "the-quick-toolbar", inputs: { editor: "editor", quickToolbarItems: "quickToolbarItems" }, host: { listeners: { "document: mousedown": "handleMouseDown($event)", "document: keydown.enter": "handleEnter()" } }, usesInheritance: true, ngImport: i0__namespace, template: "<thy-selection-list\n class=\"the-quick-toolbar\"\n [thyBindKeyEventContainer]=\"editorElement\"\n (thySelectionChange)=\"selectionChange($event)\"\n [thyMultiple]=\"false\"\n>\n <ng-container *ngFor=\"let item of quickToolbarItems\">\n <ng-container *ngIf=\"item.key !== ToolbarActionTypes.split; else splitLine\">\n <thy-list-option [thyValue]=\"item?.key\" (mousedown)=\"stopPropagation($event)\">\n <the-toolbar-item [editor]=\"editor\" [item]=\"item\" [itemMode]=\"ToolbarItemMode.vertical\"></the-toolbar-item>\n </thy-list-option>\n </ng-container>\n </ng-container>\n</thy-selection-list>\n\n<ng-template #splitLine>\n <nav-split-line [mode]=\"ToolbarItemMode.horizontal\"></nav-split-line>\n</ng-template>\n", components: [{ type: i2__namespace$2.ThySelectionListComponent, selector: "thy-selection-list,[thy-selection-list]", inputs: ["thyMultiple", "thyBindKeyEventContainer", "thyScrollContainer", "thyBeforeKeydown", "thyUniqueKey", "thyCompareWith", "thyLayout", "thyAutoActiveFirstItem", "thySize", "thySpaceKeyEnabled"], outputs: ["thySelectionChange"] }, { type: i5__namespace$3.ThyListOptionComponent, selector: "thy-list-option,[thy-list-option]", inputs: ["id", "thyValue", "thyDisabled"] }, { type: TheToolbarItemComponent, selector: "the-toolbar-item", inputs: ["item", "editor", "itemMode"] }, { type: NavSplitLineComponent, selector: "nav-split-line", inputs: ["mode"] }], directives: [{ type: i6__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
11581
11694
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheQuickToolbarComponent, decorators: [{
11582
11695
  type: i0.Component,
11583
11696
  args: [{
@@ -11701,6 +11814,70 @@
11701
11814
  };
11702
11815
  };
11703
11816
 
11817
+ var FontSizeEditor = {
11818
+ setFontSize: function (editor, size) {
11819
+ if (TableEditor.toggleMark(editor, false, exports.MarkTypes.fontSize, Number(size))) {
11820
+ return;
11821
+ }
11822
+ slate.Editor.addMark(editor, exports.MarkTypes.fontSize, Number(size));
11823
+ },
11824
+ isFontSizeActive: function (editor, size) {
11825
+ if (editor.selection) {
11826
+ var anchorBlock$1 = anchorBlock(editor);
11827
+ switch (anchorBlock$1 === null || anchorBlock$1 === void 0 ? void 0 : anchorBlock$1.type) {
11828
+ case exports.ElementKinds.heading_1:
11829
+ return size === exports.FontSizes.fontSize28;
11830
+ case exports.ElementKinds.heading_2:
11831
+ return size === exports.FontSizes.fontSize24;
11832
+ case exports.ElementKinds.heading_3:
11833
+ return size === exports.FontSizes.fontSize20;
11834
+ case exports.ElementKinds.heading_4:
11835
+ return size === exports.FontSizes.fontSize18;
11836
+ case exports.ElementKinds.heading_5:
11837
+ return size === exports.FontSizes.fontSize16;
11838
+ case exports.ElementKinds.heading_6:
11839
+ return size === exports.FontSizes.fontSize14;
11840
+ case exports.ElementKinds.paragraph:
11841
+ var marks = getSelectionMarks(editor);
11842
+ var fontSizeMark = marks[exports.MarkTypes.fontSize];
11843
+ return Number(size) === fontSizeMark;
11844
+ default:
11845
+ return false;
11846
+ }
11847
+ }
11848
+ return false;
11849
+ },
11850
+ isDisabled: function (editor) {
11851
+ if (editor.selection) {
11852
+ var disableGroup = HEADING_TYPES;
11853
+ var anchorBlock$1 = anchorBlock(editor);
11854
+ return anchorBlock$1 && disableGroup.includes(anchorBlock$1 === null || anchorBlock$1 === void 0 ? void 0 : anchorBlock$1.type);
11855
+ }
11856
+ return false;
11857
+ }
11858
+ };
11859
+
11860
+ var sizeOptions = function () {
11861
+ return FontSizeTypes.map(function (fontSize) {
11862
+ return {
11863
+ key: fontSize,
11864
+ name: fontSize,
11865
+ execute: function (editor) { return FontSizeEditor.setFontSize(editor, fontSize); },
11866
+ active: function (editor) { return FontSizeEditor.isFontSizeActive(editor, fontSize); }
11867
+ };
11868
+ });
11869
+ };
11870
+ var FontSizeOptions = __spreadArray([
11871
+ {
11872
+ key: exports.MarkTypes.fontSize,
11873
+ name: '字号',
11874
+ type: exports.ToolbarItemType.toolDropdown,
11875
+ dropdownItemKey: exports.FontSizes.fontSize14,
11876
+ includes: FontSizeTypes,
11877
+ disable: function (editor) { return FontSizeEditor.isDisabled(editor); }
11878
+ }
11879
+ ], __read(sizeOptions()));
11880
+
11704
11881
  var internalPlugins = [
11705
11882
  withTheHistory,
11706
11883
  withAutoInsertData(),
@@ -11742,7 +11919,7 @@
11742
11919
  withDeserializeMd(),
11743
11920
  withQuickInsert
11744
11921
  ];
11745
- var internalToolbarItems = __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], __read(AlignOptions)), __read(MarkOptions)), __read(ColorOptions)), __read(HeadingOptions)), __read(TodoItemOptions)), __read(ListOptions)), __read(ImageOptions)), __read(HrOptions)), __read(BlockquoteOptions)), __read(CodeOptions)), __read(LinkOptions)), __read(TableOptions)), __read(VerticalAlignOptions)), __read(PaintFormatOptions));
11922
+ var internalToolbarItems = __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], __read(AlignOptions)), __read(MarkOptions)), __read(ColorOptions)), __read(HeadingOptions)), __read(FontSizeOptions)), __read(TodoItemOptions)), __read(ListOptions)), __read(ImageOptions)), __read(HrOptions)), __read(BlockquoteOptions)), __read(CodeOptions)), __read(LinkOptions)), __read(TableOptions)), __read(VerticalAlignOptions)), __read(PaintFormatOptions));
11746
11923
  var toolbarCompose = function (toolbarItems) {
11747
11924
  if (toolbarItems === void 0) { toolbarItems = []; }
11748
11925
  return __spreadArray(__spreadArray([], __read(internalToolbarItems)), __read(toolbarItems));
@@ -11904,9 +12081,9 @@
11904
12081
  }
11905
12082
  };
11906
12083
  TheToolbarComponent.prototype.setToolbarClass = function () {
11907
- var _a;
12084
+ var _b;
11908
12085
  if (this.editor && !!this.containerClass.length) {
11909
- (_a = this.elementRef.nativeElement.classList).add.apply(_a, __spreadArray([], __read(this.containerClass)));
12086
+ (_b = this.elementRef.nativeElement.classList).add.apply(_b, __spreadArray([], __read(this.containerClass)));
11910
12087
  }
11911
12088
  };
11912
12089
  TheToolbarComponent.prototype.resizeElement = function () {
@@ -11914,7 +12091,7 @@
11914
12091
  var editableElement = this.elementRef.nativeElement;
11915
12092
  // @ts-ignore
11916
12093
  this.resizeObserver = new ResizeObserver(function (entries) {
11917
- var e_1, _a;
12094
+ var e_1, _b;
11918
12095
  try {
11919
12096
  for (var entries_1 = __values(entries), entries_1_1 = entries_1.next(); !entries_1_1.done; entries_1_1 = entries_1.next()) {
11920
12097
  var entry = entries_1_1.value;
@@ -11928,7 +12105,7 @@
11928
12105
  catch (e_1_1) { e_1 = { error: e_1_1 }; }
11929
12106
  finally {
11930
12107
  try {
11931
- if (entries_1_1 && !entries_1_1.done && (_a = entries_1.return)) _a.call(entries_1);
12108
+ if (entries_1_1 && !entries_1_1.done && (_b = entries_1.return)) _b.call(entries_1);
11932
12109
  }
11933
12110
  finally { if (e_1) throw e_1.error; }
11934
12111
  }
@@ -11936,7 +12113,7 @@
11936
12113
  this.resizeObserver.observe(editableElement);
11937
12114
  };
11938
12115
  TheToolbarComponent.prototype.statusChange = function (editor) {
11939
- var e_2, _a;
12116
+ var e_2, _b;
11940
12117
  var toolbarItems = __spreadArray(__spreadArray([], __read(this.toolbarItems)), [this.moreGroupMenu]);
11941
12118
  try {
11942
12119
  for (var toolbarItems_1 = __values(toolbarItems), toolbarItems_1_1 = toolbarItems_1.next(); !toolbarItems_1_1.done; toolbarItems_1_1 = toolbarItems_1.next()) {
@@ -11952,7 +12129,7 @@
11952
12129
  catch (e_2_1) { e_2 = { error: e_2_1 }; }
11953
12130
  finally {
11954
12131
  try {
11955
- if (toolbarItems_1_1 && !toolbarItems_1_1.done && (_a = toolbarItems_1.return)) _a.call(toolbarItems_1);
12132
+ if (toolbarItems_1_1 && !toolbarItems_1_1.done && (_b = toolbarItems_1.return)) _b.call(toolbarItems_1);
11956
12133
  }
11957
12134
  finally { if (e_2) throw e_2.error; }
11958
12135
  }
@@ -11964,7 +12141,7 @@
11964
12141
  var toolbarItems = this.toolbarItemsCompose();
11965
12142
  var items = toolbarItems.items, group = toolbarItems.group;
11966
12143
  this.ngZone.run(function () {
11967
- var e_3, _a;
12144
+ var e_3, _b;
11968
12145
  try {
11969
12146
  for (var items_1 = __values(items), items_1_1 = items_1.next(); !items_1_1.done; items_1_1 = items_1.next()) {
11970
12147
  var item = items_1_1.value;
@@ -11978,7 +12155,7 @@
11978
12155
  catch (e_3_1) { e_3 = { error: e_3_1 }; }
11979
12156
  finally {
11980
12157
  try {
11981
- if (items_1_1 && !items_1_1.done && (_a = items_1.return)) _a.call(items_1);
12158
+ if (items_1_1 && !items_1_1.done && (_b = items_1.return)) _b.call(items_1);
11982
12159
  }
11983
12160
  finally { if (e_3) throw e_3.error; }
11984
12161
  }
@@ -12001,7 +12178,7 @@
12001
12178
  * set aside 50px
12002
12179
  */
12003
12180
  TheToolbarComponent.prototype.toolbarItemsCompose = function () {
12004
- var e_4, _a;
12181
+ var e_4, _b;
12005
12182
  var elementWidth = this.isMore ? this.elementWidth : null;
12006
12183
  var maxItemWidth = 50;
12007
12184
  var defaultItemWidth = 35;
@@ -12011,8 +12188,8 @@
12011
12188
  var items = [];
12012
12189
  var group = [];
12013
12190
  try {
12014
- for (var _b = __values(this.toolbarItems), _c = _b.next(); !_c.done; _c = _b.next()) {
12015
- var item = _c.value;
12191
+ for (var _c = __values(this.toolbarItems), _d = _c.next(); !_d.done; _d = _c.next()) {
12192
+ var item = _d.value;
12016
12193
  if (!this.isMore) {
12017
12194
  items.push(item);
12018
12195
  continue;
@@ -12041,7 +12218,7 @@
12041
12218
  catch (e_4_1) { e_4 = { error: e_4_1 }; }
12042
12219
  finally {
12043
12220
  try {
12044
- if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
12221
+ if (_d && !_d.done && (_b = _c.return)) _b.call(_c);
12045
12222
  }
12046
12223
  finally { if (e_4) throw e_4.error; }
12047
12224
  }
@@ -12054,12 +12231,12 @@
12054
12231
  * externally designated more group
12055
12232
  */
12056
12233
  TheToolbarComponent.prototype.toolbarItemsAndMoreCompose = function () {
12057
- var e_5, _a;
12234
+ var e_5, _b;
12058
12235
  var items = [];
12059
12236
  var group = [];
12060
12237
  try {
12061
- for (var _b = __values(this.toolbarItems), _c = _b.next(); !_c.done; _c = _b.next()) {
12062
- var item = _c.value;
12238
+ for (var _c = __values(this.toolbarItems), _d = _c.next(); !_d.done; _d = _c.next()) {
12239
+ var item = _d.value;
12063
12240
  if (item.key === exports.ToolbarActionTypes.split) {
12064
12241
  items.push(item);
12065
12242
  continue;
@@ -12070,7 +12247,7 @@
12070
12247
  catch (e_5_1) { e_5 = { error: e_5_1 }; }
12071
12248
  finally {
12072
12249
  try {
12073
- if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
12250
+ if (_d && !_d.done && (_b = _c.return)) _b.call(_c);
12074
12251
  }
12075
12252
  finally { if (e_5) throw e_5.error; }
12076
12253
  }
@@ -12097,14 +12274,15 @@
12097
12274
  });
12098
12275
  };
12099
12276
  TheToolbarComponent.prototype.createToolbarItem = function (item) {
12100
- var iconComponent = item.iconComponent, type = item.type, dropdownMode = item.dropdownMode, args = __rest(item, ["iconComponent", "type", "dropdownMode"]);
12277
+ var iconComponent = item.iconComponent, type = item.type, dropdownMode = item.dropdownMode, dropdownItemKey = item.dropdownItemKey, includes = item.includes, args = __rest(item, ["iconComponent", "type", "dropdownMode", "dropdownItemKey", "includes"]);
12101
12278
  var viewComponent = this.viewComponentType(type);
12279
+ var dropdownItem = this.getDropdownItem(item);
12102
12280
  var factory = this.cfr.resolveComponentFactory(iconComponent ? iconComponent : viewComponent);
12103
12281
  var compRef = this.toolbarContainer.createComponent(factory);
12104
12282
  compRef.instance.editor = this.editor;
12105
12283
  compRef.instance.toolbarItem = item;
12106
- compRef.instance.menus = args.includes;
12107
- compRef.instance.item = (args === null || args === void 0 ? void 0 : args.includes) && args.includes.length > 0 ? args.includes[0] : args;
12284
+ compRef.instance.menus = includes;
12285
+ compRef.instance.item = includes && dropdownItem ? dropdownItem : args;
12108
12286
  compRef.instance.mode = dropdownMode;
12109
12287
  this.components.set(item.key, compRef);
12110
12288
  };
@@ -12131,10 +12309,19 @@
12131
12309
  }
12132
12310
  return TheToolbarItemComponent;
12133
12311
  };
12312
+ TheToolbarComponent.prototype.getDropdownItem = function (item) {
12313
+ var _a;
12314
+ var dropdownKey = item === null || item === void 0 ? void 0 : item.dropdownItemKey;
12315
+ // modify the fontsize option externally
12316
+ if (item.key === exports.MarkTypes.fontSize && this.fontSize) {
12317
+ dropdownKey = this.fontSize;
12318
+ }
12319
+ return (_a = item === null || item === void 0 ? void 0 : item.includes) === null || _a === void 0 ? void 0 : _a.find(function (item) { return item.key === dropdownKey; });
12320
+ };
12134
12321
  return TheToolbarComponent;
12135
12322
  }());
12136
12323
  TheToolbarComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheToolbarComponent, deps: [{ token: i0__namespace.ComponentFactoryResolver }, { token: i0__namespace.ElementRef }, { token: i0__namespace.NgZone }, { token: TheToolbarGroupToken }], target: i0__namespace.ɵɵFactoryTarget.Component });
12137
- TheToolbarComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheToolbarComponent, selector: "the-toolbar", inputs: { editor: "editor", toolbarItems: "toolbarItems", align: "align", containerClass: "containerClass", isMore: "isMore", afterTemplate: "afterTemplate" }, host: { classAttribute: "the-toolbar-container" }, viewQueries: [{ propertyName: "toolbarContainer", first: true, predicate: ["toolbarContainer"], descendants: true, read: i0.ViewContainerRef, static: true }], usesOnChanges: true, ngImport: i0__namespace, template: "<thy-icon-nav [style.justifyContent]=\"align\">\n <ng-container #toolbarContainer></ng-container>\n <ng-content></ng-content>\n <ng-template *ngIf=\"afterTemplate\" [ngTemplateOutlet]=\"afterTemplate\"></ng-template>\n</thy-icon-nav>\n", components: [{ type: i2__namespace.ThyIconNavComponent, selector: "thy-icon-nav", inputs: ["thyType"] }], directives: [{ type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }] });
12324
+ TheToolbarComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheToolbarComponent, selector: "the-toolbar", inputs: { editor: "editor", toolbarItems: "toolbarItems", align: "align", fontSize: "fontSize", containerClass: "containerClass", isMore: "isMore", afterTemplate: "afterTemplate" }, host: { classAttribute: "the-toolbar-container" }, viewQueries: [{ propertyName: "toolbarContainer", first: true, predicate: ["toolbarContainer"], descendants: true, read: i0.ViewContainerRef, static: true }], usesOnChanges: true, ngImport: i0__namespace, template: "<thy-icon-nav [style.justifyContent]=\"align\">\n <ng-container #toolbarContainer></ng-container>\n <ng-content></ng-content>\n <ng-template *ngIf=\"afterTemplate\" [ngTemplateOutlet]=\"afterTemplate\"></ng-template>\n</thy-icon-nav>\n", components: [{ type: i3__namespace.ThyIconNavComponent, selector: "thy-icon-nav", inputs: ["thyType"] }], directives: [{ type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }] });
12138
12325
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheToolbarComponent, decorators: [{
12139
12326
  type: i0.Component,
12140
12327
  args: [{
@@ -12155,6 +12342,8 @@
12155
12342
  type: i0.Input
12156
12343
  }], align: [{
12157
12344
  type: i0.Input
12345
+ }], fontSize: [{
12346
+ type: i0.Input
12158
12347
  }], containerClass: [{
12159
12348
  type: i0.Input
12160
12349
  }], isMore: [{
@@ -12274,8 +12463,8 @@
12274
12463
  };
12275
12464
  return TheInlineToolbarComponent;
12276
12465
  }());
12277
- TheInlineToolbarComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheInlineToolbarComponent, deps: [{ token: i0__namespace.ElementRef }, { token: i2__namespace$1.ScrollDispatcher }, { token: i0__namespace.ChangeDetectorRef }, { token: i0__namespace.NgZone }, { token: TheContextService }], target: i0__namespace.ɵɵFactoryTarget.Component });
12278
- TheInlineToolbarComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheInlineToolbarComponent, selector: "the-inline-toolbar", inputs: { editor: "editor", toolbarItems: "toolbarItems" }, host: { properties: { "class.hide": "toolbarItems.length === 0" } }, viewQueries: [{ propertyName: "inlineToolbar", first: true, predicate: ["inlineToolbar"], descendants: true }], ngImport: i0__namespace, template: "<the-toolbar\n #inlineToolbar\n class=\"the-inline-toolbar\"\n [editor]=\"editor\"\n [toolbarItems]=\"toolbarItems\"\n [isMore]=\"false\"\n ></the-toolbar> ", isInline: true, components: [{ type: TheToolbarComponent, selector: "the-toolbar", inputs: ["editor", "toolbarItems", "align", "containerClass", "isMore", "afterTemplate"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
12466
+ TheInlineToolbarComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheInlineToolbarComponent, deps: [{ token: i0__namespace.ElementRef }, { token: i2__namespace.ScrollDispatcher }, { token: i0__namespace.ChangeDetectorRef }, { token: i0__namespace.NgZone }, { token: TheContextService }], target: i0__namespace.ɵɵFactoryTarget.Component });
12467
+ TheInlineToolbarComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheInlineToolbarComponent, selector: "the-inline-toolbar", inputs: { editor: "editor", toolbarItems: "toolbarItems" }, host: { properties: { "class.hide": "toolbarItems.length === 0" } }, viewQueries: [{ propertyName: "inlineToolbar", first: true, predicate: ["inlineToolbar"], descendants: true }], ngImport: i0__namespace, template: "<the-toolbar\n #inlineToolbar\n class=\"the-inline-toolbar\"\n [editor]=\"editor\"\n [toolbarItems]=\"toolbarItems\"\n [isMore]=\"false\"\n ></the-toolbar> ", isInline: true, components: [{ type: TheToolbarComponent, selector: "the-toolbar", inputs: ["editor", "toolbarItems", "align", "fontSize", "containerClass", "isMore", "afterTemplate"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
12279
12468
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheInlineToolbarComponent, decorators: [{
12280
12469
  type: i0.Component,
12281
12470
  args: [{
@@ -12286,7 +12475,7 @@
12286
12475
  },
12287
12476
  changeDetection: i0.ChangeDetectionStrategy.OnPush
12288
12477
  }]
12289
- }], ctorParameters: function () { return [{ type: i0__namespace.ElementRef }, { type: i2__namespace$1.ScrollDispatcher }, { type: i0__namespace.ChangeDetectorRef }, { type: i0__namespace.NgZone }, { type: TheContextService }]; }, propDecorators: { editor: [{
12478
+ }], ctorParameters: function () { return [{ type: i0__namespace.ElementRef }, { type: i2__namespace.ScrollDispatcher }, { type: i0__namespace.ChangeDetectorRef }, { type: i0__namespace.NgZone }, { type: TheContextService }]; }, propDecorators: { editor: [{
12290
12479
  type: i0.Input
12291
12480
  }], toolbarItems: [{
12292
12481
  type: i0.Input
@@ -12537,14 +12726,14 @@
12537
12726
  return leaf ? leaf : null;
12538
12727
  };
12539
12728
  _this.renderText = function (text) {
12540
- if (text.text.length === 0) {
12541
- return;
12542
- }
12543
12729
  for (var key in exports.MarkTypes) {
12544
12730
  if (text[exports.MarkTypes[key]]) {
12545
12731
  return TheTextComponent;
12546
12732
  }
12547
12733
  }
12734
+ if (text.text.length === 0) {
12735
+ return;
12736
+ }
12548
12737
  };
12549
12738
  _this.onKeyDown = function (event) {
12550
12739
  shortcuts(_this.editor, event);
@@ -12700,7 +12889,7 @@
12700
12889
  }
12701
12890
  };
12702
12891
  TheEditorComponent.prototype.toolbarCalculate = function () {
12703
- var _a;
12892
+ var _a, _b;
12704
12893
  var toolbar = (_a = this === null || this === void 0 ? void 0 : this.theOptions) === null || _a === void 0 ? void 0 : _a.toolbar;
12705
12894
  var toolbarItems = toolbarCompose(toolbar === null || toolbar === void 0 ? void 0 : toolbar.toolbarItems);
12706
12895
  var toolbarOption = this.toolbarService.initialize(toolbarItems, toolbar === null || toolbar === void 0 ? void 0 : toolbar.global, toolbar === null || toolbar === void 0 ? void 0 : toolbar.inline, toolbar === null || toolbar === void 0 ? void 0 : toolbar.quick);
@@ -12711,6 +12900,7 @@
12711
12900
  this.theGlobalToolbarInstance.toolbarItems = toolbarOption.toolbarEntity.global;
12712
12901
  this.theGlobalToolbarInstance.containerClass = this.globalToolbarClass;
12713
12902
  this.theGlobalToolbarInstance.align = toolbar === null || toolbar === void 0 ? void 0 : toolbar.align;
12903
+ this.theGlobalToolbarInstance.fontSize = (_b = this.theOptions) === null || _b === void 0 ? void 0 : _b.fontSize;
12714
12904
  this.theGlobalToolbarInstance.setToolbarClass();
12715
12905
  this.theGlobalToolbarInstance.renderToolbarView();
12716
12906
  }
@@ -12865,7 +13055,7 @@
12865
13055
  useExisting: i0.forwardRef(function () { return TheEditorComponent; }),
12866
13056
  multi: true
12867
13057
  }
12868
- ], viewQueries: [{ propertyName: "templateInstance", first: true, predicate: ["templateInstance"], descendants: true, static: true }, { propertyName: "globalToolbarInstance", first: true, predicate: ["globalToolbar"], descendants: true }, { propertyName: "quickInsertInstance", first: true, predicate: ["quickInsert"], descendants: true, static: true }, { propertyName: "placeholderInstance", first: true, predicate: ["placeholder"], descendants: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0__namespace, template: "<the-toolbar\n *ngIf=\"!theOptions?.readonly && !theGlobalToolbar\"\n [ngClass]=\"{\n 'the-toolbar-disabled': theOptions?.disabled\n }\"\n #globalToolbar\n [editor]=\"editor\"\n [toolbarItems]=\"toolbarEntity.global\"\n [containerClass]=\"globalToolbarClass\"\n [align]=\"theOptions?.toolbar?.align\"\n></the-toolbar>\n\n<div\n class=\"the-editable-container\"\n [ngClass]=\"{\n 'the-editor-disabled': theOptions?.disabled,\n 'max-height': maxHeight\n }\"\n [ngStyle]=\"{ 'max-height': maxHeight }\"\n>\n <slate-editable\n class=\"the-editor-typo\"\n [editor]=\"editor\"\n [ngModel]=\"editorValue\"\n (ngModelChange)=\"valueChange($event)\"\n [decorate]=\"decorate\"\n [renderElement]=\"renderElement\"\n [renderText]=\"renderText\"\n [renderLeaf]=\"renderLeaf\"\n [readonly]=\"theOptions?.readonly || theOptions?.disabled\"\n [keydown]=\"onKeyDown\"\n [click]=\"onClick\"\n [paste]=\"onSlaPaste\"\n [beforeInput]=\"onSlaBeforeInput\"\n [blur]=\"onSlaBlur\"\n [focus]=\"onSlaFocus\"\n [copy]=\"onSlaCopy\"\n [cut]=\"onSlaCut\"\n [isStrictDecorate]=\"false\"\n [compositionStart]=\"onSlaCompositionStart\"\n [compositionEnd]=\"onSlaCompositionEnd\"\n [dragStart]=\"onSlaDragStart\"\n [dragOver]=\"onSlaDragOver\"\n [drop]=\"onDrop\"\n (mousedown)=\"mousedown($event)\"\n ></slate-editable>\n <the-inline-toolbar *ngIf=\"!theOptions?.readonly\" [editor]=\"editor\" [toolbarItems]=\"toolbarEntity.inline\"></the-inline-toolbar>\n <div #quickInsert theQuickInsert [editor]=\"editor\" [quickToolbarItems]=\"quickToolbarItems\"></div>\n <div #placeholder thePlaceholder [editor]=\"editor\" [options]=\"theOptions\"></div>\n <the-template #templateInstance></the-template>\n</div>\n", components: [{ type: TheToolbarComponent, selector: "the-toolbar", inputs: ["editor", "toolbarItems", "align", "containerClass", "isMore", "afterTemplate"] }, { type: i1__namespace.SlateEditableComponent, selector: "slate-editable", inputs: ["editor", "renderElement", "renderLeaf", "renderText", "decorate", "placeholderDecorate", "isStrictDecorate", "trackBy", "readonly", "placeholder", "beforeInput", "blur", "click", "compositionEnd", "compositionStart", "copy", "cut", "dragOver", "dragStart", "dragEnd", "drop", "focus", "keydown", "paste", "spellCheck", "autoCorrect", "autoCapitalize"] }, { type: TheInlineToolbarComponent, selector: "the-inline-toolbar", inputs: ["editor", "toolbarItems"] }, { type: TheQuickInsertComponent, selector: "[theQuickInsert]", inputs: ["editor", "quickToolbarItems"] }, { type: ThePlaceholderComponent, selector: "div[thePlaceholder]", inputs: ["editor", "options"] }, { type: TheTemplateComponent, selector: "the-template,[theTemplate]" }], directives: [{ type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i6__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i4__namespace$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4__namespace$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
13058
+ ], viewQueries: [{ propertyName: "templateInstance", first: true, predicate: ["templateInstance"], descendants: true, static: true }, { propertyName: "globalToolbarInstance", first: true, predicate: ["globalToolbar"], descendants: true }, { propertyName: "quickInsertInstance", first: true, predicate: ["quickInsert"], descendants: true, static: true }, { propertyName: "placeholderInstance", first: true, predicate: ["placeholder"], descendants: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0__namespace, template: "<the-toolbar\n *ngIf=\"!theOptions?.readonly && !theGlobalToolbar\"\n [ngClass]=\"{\n 'the-toolbar-disabled': theOptions?.disabled\n }\"\n #globalToolbar\n [editor]=\"editor\"\n [toolbarItems]=\"toolbarEntity.global\"\n [containerClass]=\"globalToolbarClass\"\n [align]=\"theOptions?.toolbar?.align\"\n [fontSize]=\"theOptions?.fontSize\"\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", "fontSize", "containerClass", "isMore", "afterTemplate"] }, { type: i1__namespace.SlateEditableComponent, selector: "slate-editable", inputs: ["editor", "renderElement", "renderLeaf", "renderText", "decorate", "placeholderDecorate", "isStrictDecorate", "trackBy", "readonly", "placeholder", "beforeInput", "blur", "click", "compositionEnd", "compositionStart", "copy", "cut", "dragOver", "dragStart", "dragEnd", "drop", "focus", "keydown", "paste", "spellCheck", "autoCorrect", "autoCapitalize"] }, { type: TheInlineToolbarComponent, selector: "the-inline-toolbar", inputs: ["editor", "toolbarItems"] }, { type: TheQuickInsertComponent, selector: "[theQuickInsert]", inputs: ["editor", "quickToolbarItems"] }, { type: ThePlaceholderComponent, selector: "div[thePlaceholder]", inputs: ["editor", "options"] }, { type: TheTemplateComponent, selector: "the-template,[theTemplate]" }], directives: [{ type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i6__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i4__namespace$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4__namespace$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
12869
13059
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheEditorComponent, decorators: [{
12870
13060
  type: i0.Component,
12871
13061
  args: [{
@@ -13046,7 +13236,7 @@
13046
13236
  return TheToolbarGroupComponent;
13047
13237
  }());
13048
13238
  TheToolbarGroupComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheToolbarGroupComponent, deps: [{ token: i0__namespace.ElementRef }, { token: i1__namespace$3.ThyPopover }, { token: i0__namespace.ViewContainerRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
13049
- TheToolbarGroupComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheToolbarGroupComponent, selector: "the-toolbar-group", inputs: { menus: "menus", item: "item" }, host: { listeners: { "mousedown": "mousedownHandler($event)", "click": "clickHandle($event)" }, classAttribute: "the-toolbar-group" }, viewQueries: [{ propertyName: "groupTemplate", first: true, predicate: ["groupTemplate"], descendants: true, read: i0.TemplateRef, static: true }], ngImport: i0__namespace, template: "<a thyIconNavLink [thyIconNavLinkIcon]=\"item.icon\" [thyTooltip]=\"item?.name\" thyTooltipPlacement=\"top\" [thyIconNavLinkActive]=\"active\"></a>\n\n<ng-template #groupTemplate>\n <the-toolbar class=\"group\" [editor]=\"editor\" [toolbarItems]=\"menus\" [isMore]=\"false\"></the-toolbar>\n</ng-template>\n", components: [{ type: i2__namespace.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: TheToolbarComponent, selector: "the-toolbar", inputs: ["editor", "toolbarItems", "align", "containerClass", "isMore", "afterTemplate"] }], directives: [{ type: i7__namespace.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }] });
13239
+ TheToolbarGroupComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheToolbarGroupComponent, selector: "the-toolbar-group", inputs: { menus: "menus", item: "item" }, host: { listeners: { "mousedown": "mousedownHandler($event)", "click": "clickHandle($event)" }, classAttribute: "the-toolbar-group" }, viewQueries: [{ propertyName: "groupTemplate", first: true, predicate: ["groupTemplate"], descendants: true, read: i0.TemplateRef, static: true }], ngImport: i0__namespace, template: "<a thyIconNavLink [thyIconNavLinkIcon]=\"item.icon\" [thyTooltip]=\"item?.name\" thyTooltipPlacement=\"top\" [thyIconNavLinkActive]=\"active\"></a>\n\n<ng-template #groupTemplate>\n <the-toolbar class=\"group\" [editor]=\"editor\" [toolbarItems]=\"menus\" [isMore]=\"false\"></the-toolbar>\n</ng-template>\n", components: [{ type: i3__namespace.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: TheToolbarComponent, selector: "the-toolbar", inputs: ["editor", "toolbarItems", "align", "fontSize", "containerClass", "isMore", "afterTemplate"] }], directives: [{ type: i5__namespace$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }] });
13050
13240
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheToolbarGroupComponent, decorators: [{
13051
13241
  type: i0.Component,
13052
13242
  args: [{
@@ -13074,19 +13264,21 @@
13074
13264
  var TETHYS = [
13075
13265
  i4$1.ThyIconModule,
13076
13266
  avatar.ThyAvatarModule,
13077
- i2$1.ThyNavModule,
13078
- i2$2.ThyFormModule,
13267
+ i3.ThyNavModule,
13268
+ i2$1.ThyFormModule,
13079
13269
  i5$3.ThySharedModule,
13080
- i2$3.ThyListModule,
13081
- i7.ThyTooltipModule,
13270
+ i2$2.ThyListModule,
13271
+ i5$1.ThyTooltipModule,
13082
13272
  i4.ThyProgressModule,
13083
13273
  autocomplete.ThyAutocompleteModule,
13084
- i5$1.ThyActionMenuModule,
13274
+ i5$2.ThyActionMenuModule,
13085
13275
  i5.ThyInputModule,
13086
13276
  select.ThySelectModule,
13087
13277
  i1$5.ThyButtonModule,
13088
13278
  i1$4.ThyNotifyModule,
13089
- i1$1.ThyAlertModule
13279
+ i1$1.ThyAlertModule,
13280
+ i9.ThyResizableModule,
13281
+ i6$1.ThySwitchModule
13090
13282
  ];
13091
13283
  var COMPONENTS = [
13092
13284
  TheToolbarComponent,
@@ -13171,31 +13363,33 @@
13171
13363
  TheTdComponent,
13172
13364
  ThePlaceholderComponent], imports: [i6.CommonModule, i1.SlateModule, i4$2.FormsModule, i4$1.ThyIconModule,
13173
13365
  avatar.ThyAvatarModule,
13174
- i2$1.ThyNavModule,
13175
- i2$2.ThyFormModule,
13366
+ i3.ThyNavModule,
13367
+ i2$1.ThyFormModule,
13176
13368
  i5$3.ThySharedModule,
13177
- i2$3.ThyListModule,
13178
- i7.ThyTooltipModule,
13369
+ i2$2.ThyListModule,
13370
+ i5$1.ThyTooltipModule,
13179
13371
  i4.ThyProgressModule,
13180
13372
  autocomplete.ThyAutocompleteModule,
13181
- i5$1.ThyActionMenuModule,
13373
+ i5$2.ThyActionMenuModule,
13182
13374
  i5.ThyInputModule,
13183
13375
  select.ThySelectModule,
13184
13376
  i1$5.ThyButtonModule,
13185
13377
  i1$4.ThyNotifyModule,
13186
- i1$1.ThyAlertModule, i5$2.CodemirrorModule, TheColumnSizeModule], exports: [TheEditorComponent, TheToolbarComponent, TheToolbarDropdownComponent, TheToolbarItemComponent, TheDefaultElementComponent] });
13378
+ i1$1.ThyAlertModule,
13379
+ i9.ThyResizableModule,
13380
+ i6$1.ThySwitchModule, i8.CodemirrorModule, TheColumnSizeModule], exports: [TheEditorComponent, TheToolbarComponent, TheToolbarDropdownComponent, TheToolbarItemComponent, TheDefaultElementComponent] });
13187
13381
  TheEditorModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheEditorModule, providers: [
13188
13382
  {
13189
13383
  provide: TheToolbarGroupToken,
13190
13384
  useValue: TheToolbarGroupComponent
13191
13385
  },
13192
13386
  THE_CODE_MODE_PROVIDER
13193
- ], imports: [__spreadArray(__spreadArray([i6.CommonModule, i1.SlateModule, i4$2.FormsModule], __read(TETHYS)), [i5$2.CodemirrorModule, TheColumnSizeModule])] });
13387
+ ], imports: [__spreadArray(__spreadArray([i6.CommonModule, i1.SlateModule, i4$2.FormsModule], __read(TETHYS)), [i8.CodemirrorModule, TheColumnSizeModule])] });
13194
13388
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheEditorModule, decorators: [{
13195
13389
  type: i0.NgModule,
13196
13390
  args: [{
13197
13391
  declarations: __spreadArray(__spreadArray(__spreadArray([TheEditorComponent], __read(PIPES)), __read(COMPONENTS)), __read(PLUGIN_COMPONENTS)),
13198
- imports: __spreadArray(__spreadArray([i6.CommonModule, i1.SlateModule, i4$2.FormsModule], __read(TETHYS)), [i5$2.CodemirrorModule, TheColumnSizeModule]),
13392
+ imports: __spreadArray(__spreadArray([i6.CommonModule, i1.SlateModule, i4$2.FormsModule], __read(TETHYS)), [i8.CodemirrorModule, TheColumnSizeModule]),
13199
13393
  exports: [TheEditorComponent, TheToolbarComponent, TheToolbarDropdownComponent, TheToolbarItemComponent, TheDefaultElementComponent],
13200
13394
  entryComponents: __spreadArray(__spreadArray([], __read(COMPONENTS)), __read(PLUGIN_COMPONENTS)),
13201
13395
  providers: [
@@ -13237,6 +13431,7 @@
13237
13431
  exports.DefaultInlineToolbarDefinition = DefaultInlineToolbarDefinition;
13238
13432
  exports.DefaultQuickToolbarDefinition = DefaultQuickToolbarDefinition;
13239
13433
  exports.ELEMENT_UNIQUE_ID = ELEMENT_UNIQUE_ID;
13434
+ exports.FontSizeTypes = FontSizeTypes;
13240
13435
  exports.HEADING_TYPES = HEADING_TYPES;
13241
13436
  exports.HeadingEditor = HeadingEditor;
13242
13437
  exports.HrEditor = HrEditor;
@@ -13264,7 +13459,7 @@
13264
13459
  exports.THE_UPLOAD_SERVICE_TOKEN = THE_UPLOAD_SERVICE_TOKEN;
13265
13460
  exports.TableEditor = TableEditor;
13266
13461
  exports.TheBaseElementComponent = TheBaseElementComponent;
13267
- exports.TheCodeMode = TheCodeMode;
13462
+ exports.TheCodeConfig = TheCodeConfig;
13268
13463
  exports.TheContextService = TheContextService;
13269
13464
  exports.TheDefaultElementComponent = TheDefaultElementComponent;
13270
13465
  exports.TheEditor = TheEditor;
@@ -13284,7 +13479,6 @@
13284
13479
  exports.ToolbarMoreGroup = ToolbarMoreGroup;
13285
13480
  exports.VOID_BLOCK_TYPES = VOID_BLOCK_TYPES;
13286
13481
  exports.VerticalAlignEditor = VerticalAlignEditor;
13287
- exports.ZERO_WIDTH_CHAR = ZERO_WIDTH_CHAR;
13288
13482
  exports.createEmptyParagraph = createEmptyParagraph;
13289
13483
  exports.dataDeserialize = dataDeserialize;
13290
13484
  exports.dataSerializing = dataSerializing;