@worktile/theia 1.2.11 → 1.2.15

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 (59) hide show
  1. package/bundles/worktile-theia.umd.js +230 -135
  2. package/bundles/worktile-theia.umd.js.map +1 -1
  3. package/components/column-resize/column-resize.directive.d.ts +3 -3
  4. package/components/inline-toolbar/inline-toolbar.component.d.ts +3 -1
  5. package/components/inline-toolbar/inline-toolbar.component.scss +6 -5
  6. package/components/toolbar/toolbar.component.d.ts +2 -1
  7. package/constants/default.d.ts +0 -1
  8. package/custom-types.d.ts +2 -0
  9. package/editor.component.d.ts +2 -0
  10. package/esm2015/components/column-resize/column-resize.directive.js +1 -1
  11. package/esm2015/components/inline-toolbar/inline-toolbar.component.js +10 -7
  12. package/esm2015/components/toolbar/toolbar.component.js +7 -6
  13. package/esm2015/components/toolbar-group/toolbar-group.component.js +1 -1
  14. package/esm2015/components/toolbar-item/toolbar-item.component.js +7 -3
  15. package/esm2015/constants/default.js +1 -2
  16. package/esm2015/custom-types.js +1 -1
  17. package/esm2015/editor.component.js +28 -14
  18. package/esm2015/interfaces/editor.js +1 -1
  19. package/esm2015/interfaces/toolbar.js +1 -1
  20. package/esm2015/plugins/deserializers/deserialize-html.plugin.js +12 -4
  21. package/esm2015/plugins/deserializers/deserialize-md.plugin.js +8 -3
  22. package/esm2015/plugins/index.js +14 -2
  23. package/esm2015/plugins/mark/options.js +6 -1
  24. package/esm2015/plugins/paint-format/options.js +4 -1
  25. package/esm2015/plugins/placeholder/placeholder.component.js +21 -14
  26. package/esm2015/plugins/quick-insert/components/quick-insert.component.js +7 -6
  27. package/esm2015/plugins/quick-insert/quick-insert.plugint.js +3 -2
  28. package/esm2015/plugins/soft-break/soft-break.plugin.js +18 -0
  29. package/esm2015/plugins/soft-break/soft-break.types.js +2 -0
  30. package/esm2015/plugins/table/table.plugin.js +34 -55
  31. package/esm2015/plugins/table/table.types.js +1 -1
  32. package/esm2015/plugins/table/utils/normalize-table.js +31 -0
  33. package/esm2015/queries/is-container-type.js +2 -2
  34. package/esm2015/services/context.service.js +10 -2
  35. package/esm2015/transforms/index.js +2 -3
  36. package/esm2015/utils/auto-focus.js +2 -2
  37. package/esm2015/utils/common.js +3 -0
  38. package/esm2015/utils/fragment.js +24 -2
  39. package/esm2015/utils/index.js +2 -1
  40. package/fesm2015/worktile-theia.js +221 -127
  41. package/fesm2015/worktile-theia.js.map +1 -1
  42. package/interfaces/editor.d.ts +2 -0
  43. package/interfaces/toolbar.d.ts +1 -0
  44. package/package.json +1 -1
  45. package/plugins/image/image.component.scss +172 -168
  46. package/plugins/placeholder/placeholder.component.d.ts +4 -2
  47. package/plugins/soft-break/soft-break.plugin.d.ts +4 -0
  48. package/plugins/soft-break/soft-break.types.d.ts +8 -0
  49. package/plugins/table/table.types.d.ts +7 -0
  50. package/plugins/table/utils/normalize-table.d.ts +2 -0
  51. package/services/context.service.d.ts +2 -0
  52. package/styles/editor.scss +3 -3
  53. package/styles/typo.scss +5 -2
  54. package/transforms/index.d.ts +1 -2
  55. package/utils/common.d.ts +2 -0
  56. package/utils/fragment.d.ts +5 -0
  57. package/utils/index.d.ts +1 -0
  58. package/esm2015/transforms/insert-elements.js +0 -22
  59. package/transforms/insert-elements.d.ts +0 -2
@@ -376,7 +376,6 @@
376
376
  var ZERO_WIDTH_CHAR = '\u200B';
377
377
  var CLIPBOARD_FORMAT_KEY = 'x-theia-fragment';
378
378
  var DEFAULT_SCROLL_CONTAINER = '.the-editable-container';
379
- var BLOCK_INSERT_ORIGIN = 'block-insert';
380
379
  var ELEMENT_UNIQUE_ID = 'key';
381
380
  exports.TheMode = void 0;
382
381
  (function (TheMode) {
@@ -1421,6 +1420,9 @@
1421
1420
  if (fragment) {
1422
1421
  var decoded = decodeURIComponent(window.atob(fragment));
1423
1422
  var nodes = JSON.parse(decoded);
1423
+ if (!Array.isArray(nodes)) {
1424
+ nodes = [nodes];
1425
+ }
1424
1426
  // delete key to avoid duplicate keys
1425
1427
  if (deleteKey) {
1426
1428
  deleteElementKey(nodes, deleteKey);
@@ -1440,6 +1442,25 @@
1440
1442
  });
1441
1443
  return nodes;
1442
1444
  }
1445
+ /**
1446
+ * 删除 text 节点的 颜色/背景色
1447
+ * @param node
1448
+ */
1449
+ function deleteColorAndBackgroundColorOfText(node) {
1450
+ node.children.forEach(function (child) {
1451
+ if (slate.Text.isText(child)) {
1452
+ if (child['color']) {
1453
+ delete child['color'];
1454
+ }
1455
+ if (child['background-color']) {
1456
+ delete child['background-color'];
1457
+ }
1458
+ }
1459
+ else {
1460
+ deleteColorAndBackgroundColorOfText(child);
1461
+ }
1462
+ });
1463
+ }
1443
1464
 
1444
1465
  var isAcrossBlocks = function (editor, fragment) {
1445
1466
  var startBlock = getStartBlock(editor, fragment[0]);
@@ -1569,7 +1590,7 @@
1569
1590
  return marks;
1570
1591
  };
1571
1592
 
1572
- var isContainer = function (editor, value) { return slate.Element.isElement(value) && editor.isContainer(value); };
1593
+ var isContainer = function (editor, value) { return slate.Element.isElement(value) && editor.isContainer && editor.isContainer(value); };
1573
1594
 
1574
1595
  var getContainerBlocks = function (editor) {
1575
1596
  var containerNode = slate.Editor.above(editor, {
@@ -1845,26 +1866,6 @@
1845
1866
  i1.AngularEditor.focus(editor);
1846
1867
  };
1847
1868
 
1848
- var insertTheElements = function (editor, nodes) {
1849
- if (slate.Range.isExpanded(editor.selection)) {
1850
- slate.Editor.deleteFragment(editor);
1851
- }
1852
- var isEmptyParagraph$1 = isEmptyParagraph(editor, editor.selection.anchor);
1853
- var parentPath = slate.Path.parent(editor.selection.anchor.path);
1854
- slate.Editor.withoutNormalizing(editor, function () {
1855
- slate.Transforms.insertNodes(editor, nodes);
1856
- if (parentPath.length && isEmptyParagraph$1) {
1857
- slate.Transforms.delete(editor, { at: parentPath });
1858
- var lastPath = parentPath.pop();
1859
- slate.Transforms.select(editor, slate.Editor.end(editor, __spreadArray(__spreadArray([], __read(parentPath)), [lastPath + nodes.length - 1])));
1860
- }
1861
- else {
1862
- var lastPath = parentPath.pop();
1863
- slate.Transforms.select(editor, slate.Editor.end(editor, __spreadArray(__spreadArray([], __read(parentPath)), [lastPath + nodes.length])));
1864
- }
1865
- });
1866
- };
1867
-
1868
1869
  var THE_EDITOR_UUID = new WeakMap();
1869
1870
  var THE_EDITOR_CONVERSION_HINT_REF = new WeakMap();
1870
1871
  var THE_EDITOR_QUICK_TOOLBAR_REF = new WeakMap();
@@ -1929,7 +1930,6 @@
1929
1930
  splitNode: splitNode,
1930
1931
  deleteElement: deleteElement,
1931
1932
  setEndSelection: setEndSelection,
1932
- insertTheElements: insertTheElements,
1933
1933
  closeConversionHint: closeConversionHint,
1934
1934
  handleContinualDeleteBackward: handleContinualDeleteBackward,
1935
1935
  handleContinualInsertBreak: handleContinualInsertBreak
@@ -2377,6 +2377,9 @@
2377
2377
  return "the-toolbar-" + uuid;
2378
2378
  };
2379
2379
 
2380
+ var IS_MAC = typeof window != 'undefined' && /Mac|iPod|iPhone|iPad/.test(window.navigator.platform);
2381
+ var CONTROL_KEY = IS_MAC ? '⌘' : 'Ctrl';
2382
+
2380
2383
  var withDeserializeMd = function (options) { return function (editor) {
2381
2384
  var insertData = editor.insertData, onKeydown = editor.onKeydown;
2382
2385
  editor.onKeydown = function (event) {
@@ -2412,13 +2415,18 @@
2412
2415
  editor.undo();
2413
2416
  setTimeout(function () {
2414
2417
  slate.Transforms.select(editor, oldRange);
2415
- insertTheElements(editor, fragment_1);
2418
+ slate.Transforms.insertFragment(editor, fragment_1);
2416
2419
  i1.AngularEditor.focus(editor);
2417
2420
  });
2418
2421
  return;
2419
2422
  }
2423
+ else {
2424
+ closeConversionHint(editor);
2425
+ }
2426
+ }
2427
+ catch (error) {
2428
+ closeConversionHint(editor);
2420
2429
  }
2421
- catch (error) { }
2422
2430
  }
2423
2431
  },
2424
2432
  origin: origin,
@@ -2654,10 +2662,18 @@
2654
2662
  };
2655
2663
  TheContextService.prototype.getOptions = function () {
2656
2664
  if (!this.options.width) {
2657
- this.options.width = this.options.nativeElement.querySelector('.slate-editable-container').firstElementChild.offsetWidth;
2665
+ var firstElementChild = this.getFirstElementChild();
2666
+ this.options.width = firstElementChild.offsetWidth;
2658
2667
  }
2659
2668
  return this.options;
2660
2669
  };
2670
+ TheContextService.prototype.getEditableElement = function () {
2671
+ return this.options.nativeElement.querySelector('.the-editor-typo');
2672
+ };
2673
+ TheContextService.prototype.getFirstElementChild = function () {
2674
+ var editableElement = this.getEditableElement();
2675
+ return editableElement === null || editableElement === void 0 ? void 0 : editableElement.firstElementChild;
2676
+ };
2661
2677
  TheContextService.prototype.setUploadFileList = function (file) {
2662
2678
  this.fileList.push(file);
2663
2679
  };
@@ -5849,6 +5865,7 @@
5849
5865
  key: exports.MarkTypes.bold,
5850
5866
  icon: 'bold',
5851
5867
  name: '加粗',
5868
+ shortcutKey: CONTROL_KEY + "+B",
5852
5869
  execute: function (editor) { return MarkEditor.toggleMark(editor, exports.MarkTypes.bold); },
5853
5870
  active: function (editor) { return MarkEditor.isMarkActive(editor, exports.MarkTypes.bold); }
5854
5871
  },
@@ -5856,6 +5873,7 @@
5856
5873
  key: exports.MarkTypes.italic,
5857
5874
  icon: 'italic',
5858
5875
  name: '斜体',
5876
+ shortcutKey: CONTROL_KEY + "+I",
5859
5877
  execute: function (editor) { return MarkEditor.toggleMark(editor, exports.MarkTypes.italic); },
5860
5878
  active: function (editor) { return MarkEditor.isMarkActive(editor, exports.MarkTypes.italic); }
5861
5879
  },
@@ -5870,6 +5888,7 @@
5870
5888
  key: exports.MarkTypes.underline,
5871
5889
  icon: 'underline',
5872
5890
  name: '下划线',
5891
+ shortcutKey: CONTROL_KEY + "+U",
5873
5892
  execute: function (editor) { return MarkEditor.toggleMark(editor, exports.MarkTypes.underline); },
5874
5893
  active: function (editor) { return MarkEditor.isMarkActive(editor, exports.MarkTypes.underline); }
5875
5894
  },
@@ -5877,6 +5896,7 @@
5877
5896
  key: exports.MarkTypes.codeLine,
5878
5897
  icon: 'code',
5879
5898
  name: '行内代码',
5899
+ shortcutKey: CONTROL_KEY + "+E",
5880
5900
  execute: function (editor) { return MarkEditor.toggleMark(editor, exports.MarkTypes.codeLine); },
5881
5901
  active: function (editor) { return MarkEditor.isMarkActive(editor, exports.MarkTypes.codeLine); }
5882
5902
  }
@@ -10601,6 +10621,36 @@
10601
10621
  args: ['cellInner', { static: true }]
10602
10622
  }] } });
10603
10623
 
10624
+ var normalizeTable = function (table) {
10625
+ var normalizedNodes = [];
10626
+ var rowHeight = table.children.length;
10627
+ var columnWidth = table.children[0].children.length;
10628
+ table.children.forEach(function (row, rowIndex) {
10629
+ row.children.forEach(function (cell, columnIndex) {
10630
+ // case 1
10631
+ if (cell.colspan || cell.rowspan) {
10632
+ var rowspan = cell.rowspan || 1;
10633
+ var colspan = cell.colspan || 1;
10634
+ if (rowspan > rowHeight - rowIndex) {
10635
+ cell.rowspan = rowHeight - rowIndex;
10636
+ }
10637
+ if (colspan > columnWidth - columnIndex) {
10638
+ cell.colspan = columnWidth - columnIndex;
10639
+ }
10640
+ return;
10641
+ }
10642
+ // case 2
10643
+ if (cell.hidden && !normalizedNodes.includes(cell)) {
10644
+ var origin = calcOriginSpan(table, rowIndex, columnIndex);
10645
+ if (!origin) {
10646
+ delete table.children[rowIndex].children[columnIndex].hidden;
10647
+ }
10648
+ }
10649
+ });
10650
+ });
10651
+ return table;
10652
+ };
10653
+
10604
10654
  var withTable = function (editor) {
10605
10655
  var deleteBackward = editor.deleteBackward, deleteForward = editor.deleteForward, onKeydown = editor.onKeydown, setFragmentData = editor.setFragmentData, insertData = editor.insertData, normalizeNode = editor.normalizeNode, isBlockCard = editor.isBlockCard, renderElement = editor.renderElement, deleteCutData = editor.deleteCutData, isContainer = editor.isContainer;
10606
10656
  editor.deleteBackward = function (unit) {
@@ -10779,49 +10829,26 @@
10779
10829
  return;
10780
10830
  }
10781
10831
  var selection = editor.selection;
10782
- var element = TablePosition.create(opts, editor, selection.anchor.path);
10783
- var tableComponent = i1.ELEMENT_TO_COMPONENT.get(element.table);
10832
+ var tablePosition = TablePosition.create(opts, editor, selection.anchor.path);
10833
+ var tableComponent = i1.ELEMENT_TO_COMPONENT.get(tablePosition.table);
10784
10834
  var cells = tableComponent.tableStore.selectedCells;
10785
- var tableContent = {};
10786
- var contents;
10787
- var cellNode;
10788
- var fragment;
10789
- if (cells.length > 0) {
10790
- var selectNodes = getSelectCellNode(editor, cells);
10791
- var selectedColumnsIndex = tableComponent.tableStore.selectedColumnsIndex || [];
10792
- var selectedRowsIndex = tableComponent.tableStore.selectedRowsIndex || [];
10793
- var _loop_1 = function (cell) {
10794
- var row = cell.row, col = cell.col;
10795
- var cellPath = __spreadArray(__spreadArray([], __read(element.tableEntry[1])), [row, col]);
10796
- cellNode = slate.Node.get(editor, cellPath);
10797
- var cellRange = slate.Editor.range(editor, cellPath);
10798
- var domRange = i1.AngularEditor.toDOMRange(editor, cellRange);
10799
- if (!contents) {
10800
- contents = domRange.cloneContents();
10801
- }
10802
- else {
10803
- contents.append(domRange.cloneContents());
10804
- }
10805
- if ((selectedColumnsIndex.length === 1 && cellNode.colspan > 1) ||
10806
- (selectedRowsIndex.length === 1 && cellNode.rowspan > 1)) {
10807
- cellNode = Object.assign(Object.assign({}, cellNode), { colspan: selectedColumnsIndex.length === 1 ? null : cellNode.colspan, rowspan: selectedRowsIndex.length === 1 ? null : cellNode.rowspan });
10808
- }
10809
- if (cellNode.hidden) {
10810
- var origin_1 = calcOriginSpan(element.table, row, col);
10811
- var selectedOrigin = origin_1 && selectNodes.filter(function (item) { return item.node.key === origin_1.key; });
10812
- if (!selectedOrigin || !selectedOrigin.length) {
10813
- cellNode = Object.assign(Object.assign({}, cellNode), { hidden: null });
10814
- }
10815
- }
10816
- if (!tableContent[row]) {
10817
- tableContent[row] = [];
10818
- }
10819
- tableContent[row].push(cellNode);
10820
- };
10835
+ var tableFragment = null;
10836
+ if (tableComponent.tableStore.selectedRowsIndex.length > 0) {
10837
+ var rows = tablePosition.table.children.slice(tableComponent.tableStore.selectedRowsIndex[0], tableComponent.tableStore.selectedRowsIndex[tableComponent.tableStore.selectedRowsIndex.length - 1] + 1);
10838
+ tableFragment = Object.assign(Object.assign({}, tablePosition.table), { children: rows });
10839
+ }
10840
+ else if (cells.length > 0) {
10841
+ var tempRows = {};
10821
10842
  try {
10822
10843
  for (var cells_1 = __values(cells), cells_1_1 = cells_1.next(); !cells_1_1.done; cells_1_1 = cells_1.next()) {
10823
10844
  var cell = cells_1_1.value;
10824
- _loop_1(cell);
10845
+ var row = cell.row, col = cell.col;
10846
+ var cellPath = __spreadArray(__spreadArray([], __read(tablePosition.tableEntry[1])), [row, col]);
10847
+ var cellNode = slate.Node.get(editor, cellPath);
10848
+ if (!tempRows[row]) {
10849
+ tempRows[row] = [];
10850
+ }
10851
+ tempRows[row].push(cellNode);
10825
10852
  }
10826
10853
  }
10827
10854
  catch (e_1_1) { e_1 = { error: e_1_1 }; }
@@ -10831,28 +10858,26 @@
10831
10858
  }
10832
10859
  finally { if (e_1) throw e_1.error; }
10833
10860
  }
10834
- var tableFragment = [
10861
+ var rows = Object.values(tempRows).map(function (item) {
10862
+ return {
10863
+ type: exports.ElementKinds.tableRow,
10864
+ children: item
10865
+ };
10866
+ });
10867
+ tableFragment =
10835
10868
  {
10836
10869
  type: exports.ElementKinds.table,
10837
- children: Object.values(tableContent).map(function (item) {
10838
- return {
10839
- type: exports.ElementKinds.tableRow,
10840
- children: item
10841
- };
10842
- })
10843
- }
10844
- ];
10845
- fragment = tableFragment;
10846
- var stringObj = JSON.stringify(fragment);
10870
+ children: rows
10871
+ };
10872
+ }
10873
+ if (tableFragment) {
10874
+ tableFragment = normalizeTable(_.cloneDeep(tableFragment));
10875
+ tableFragment = [tableFragment];
10876
+ var stringObj = JSON.stringify(tableFragment);
10847
10877
  var encoded = window.btoa(encodeURIComponent(stringObj));
10848
10878
  unit.setData("application/" + CLIPBOARD_FORMAT_KEY, encoded);
10849
- var div = document.createElement('div');
10850
- div.appendChild(contents);
10851
- div.setAttribute('hidden', 'true');
10852
- document.body.appendChild(div);
10853
- unit.setData('text/html', div.innerHTML);
10854
- unit.setData('text/plain', i1.getPlainText(div));
10855
- document.body.removeChild(div);
10879
+ // unit.setData('text/html', div.innerHTML);
10880
+ unit.setData('text/plain', slate.Node.string(tableFragment));
10856
10881
  return;
10857
10882
  }
10858
10883
  setFragmentData(unit);
@@ -11020,7 +11045,15 @@
11020
11045
  insertData(data);
11021
11046
  return;
11022
11047
  }
11023
- insertTheElements(editor, fragment);
11048
+ // 识出纯图片并且粘贴板中存在文件则不进行处理, hook 直接右键复制图片的场景,流转到上传图片流程
11049
+ // 后续需要做识别html图片后自动上传处理
11050
+ if (fragment.length === 1 && fragment[0].type === exports.ElementKinds.image && data.files.length > 0) {
11051
+ insertData(data);
11052
+ return;
11053
+ }
11054
+ // 过滤 text 节点的 color/background-color 属性
11055
+ fragment.forEach(function (node) { return deleteColorAndBackgroundColorOfText(node); });
11056
+ slate.Transforms.insertFragment(editor, fragment);
11024
11057
  return;
11025
11058
  }
11026
11059
  insertData(data);
@@ -11252,12 +11285,14 @@
11252
11285
  key: exports.ToolbarActionTypes.undo,
11253
11286
  icon: 'undo',
11254
11287
  name: '撤销',
11288
+ shortcutKey: CONTROL_KEY + "+Z",
11255
11289
  execute: function (editor) { return editor.undo(); }
11256
11290
  },
11257
11291
  {
11258
11292
  key: exports.ToolbarActionTypes.redo,
11259
11293
  icon: 'redo',
11260
11294
  name: '重做',
11295
+ shortcutKey: CONTROL_KEY + "+Shift+Z",
11261
11296
  execute: function (editor) { return editor.redo(); }
11262
11297
  },
11263
11298
  {
@@ -11378,12 +11413,12 @@
11378
11413
  return TheToolbarItemComponent;
11379
11414
  }(TheToolbarBaseItemComponent));
11380
11415
  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 });
11381
- TheToolbarItemComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheToolbarItemComponent, selector: "the-toolbar-item", inputs: { item: "item", editor: "editor", itemMode: "itemMode" }, host: { classAttribute: "the-toolbar-item" }, viewQueries: [{ propertyName: "toolbarContainer", first: true, predicate: ["toolbarContainer"], descendants: true, read: i0.ViewContainerRef, static: true }], usesInheritance: true, ngImport: i0__namespace, template: "\n <ng-container *ngIf=\"itemMode === ToolbarItemMode.horizontal; else selectionItem\">\n <a\n thyIconNavLink\n [thyIconNavLinkIcon]=\"item.icon\"\n [thyTooltip]=\"item.name\"\n thyTooltipPlacement=\"top\"\n [thyIconNavLinkActive]=\"active\"\n (mousedown)=\"execute($event)\"\n ></a>\n </ng-container>\n <ng-template #selectionItem>\n <ng-container *ngIf=\"!item?.quickItemComponent\">\n <thy-icon [thyIconName]=\"item?.icon\" [thyIconRotate]=\"0\" class=\"quick-toolbar-icon\"></thy-icon>\n <span class=\"quick-toolbar-name\">{{ item?.name }}</span>\n </ng-container>\n </ng-template>\n <ng-container #toolbarContainer></ng-container>\n ", isInline: true, components: [{ type: i2__namespace.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i4__namespace$1.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }], directives: [{ type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i7__namespace.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }] });
11416
+ 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"] }] });
11382
11417
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheToolbarItemComponent, decorators: [{
11383
11418
  type: i0.Component,
11384
11419
  args: [{
11385
11420
  selector: 'the-toolbar-item',
11386
- template: "\n <ng-container *ngIf=\"itemMode === ToolbarItemMode.horizontal; else selectionItem\">\n <a\n thyIconNavLink\n [thyIconNavLinkIcon]=\"item.icon\"\n [thyTooltip]=\"item.name\"\n thyTooltipPlacement=\"top\"\n [thyIconNavLinkActive]=\"active\"\n (mousedown)=\"execute($event)\"\n ></a>\n </ng-container>\n <ng-template #selectionItem>\n <ng-container *ngIf=\"!item?.quickItemComponent\">\n <thy-icon [thyIconName]=\"item?.icon\" [thyIconRotate]=\"0\" class=\"quick-toolbar-icon\"></thy-icon>\n <span class=\"quick-toolbar-name\">{{ item?.name }}</span>\n </ng-container>\n </ng-template>\n <ng-container #toolbarContainer></ng-container>\n ",
11421
+ 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 ",
11387
11422
  host: {
11388
11423
  class: 'the-toolbar-item'
11389
11424
  }
@@ -11535,10 +11570,11 @@
11535
11570
  deleteBackward(unit);
11536
11571
  };
11537
11572
  editor.onChange = function () {
11573
+ var _a;
11538
11574
  onChange();
11539
11575
  if (editor.selection) {
11540
11576
  var editorComponent = editor.injector.get(TheEditorComponent);
11541
- editorComponent.quickInsertInstance.checkStatus();
11577
+ (_a = editorComponent.quickInsertInstance) === null || _a === void 0 ? void 0 : _a.checkStatus();
11542
11578
  var block = slate.Node.ancestor(editor, [editor.selection.anchor.path[0]]);
11543
11579
  if (!isCleanEmptyParagraph(editor) && slate.Node.string(block) !== QUICK_TOOLBAR_HOTKEY) {
11544
11580
  QuickInsertEditor.closeQuickToolbar(editor);
@@ -11548,6 +11584,26 @@
11548
11584
  return editor;
11549
11585
  };
11550
11586
 
11587
+ var withSoftBreak = function (options) {
11588
+ if (options === void 0) { options = { rules: [{ hotkey: 'shift+enter' }] }; }
11589
+ return function (editor) {
11590
+ var onKeydown = editor.onKeydown;
11591
+ editor.onKeydown = function (event) {
11592
+ var rules = options.rules;
11593
+ var entry = getBlockAbove(editor);
11594
+ rules.forEach(function (_a) {
11595
+ var hotkey = _a.hotkey, query = _a.query;
11596
+ if (isHotkey__default["default"](hotkey, event) && isNodeType(entry, query)) {
11597
+ event.preventDefault();
11598
+ editor.insertText('\n');
11599
+ }
11600
+ });
11601
+ onKeydown(event);
11602
+ };
11603
+ return editor;
11604
+ };
11605
+ };
11606
+
11551
11607
  var internalPlugins = [
11552
11608
  withTheHistory,
11553
11609
  withAutoInsertData(),
@@ -11565,6 +11621,17 @@
11565
11621
  withCode,
11566
11622
  withHeading,
11567
11623
  withMark(),
11624
+ withSoftBreak({
11625
+ rules: [
11626
+ { hotkey: 'shift+enter' },
11627
+ {
11628
+ hotkey: 'enter',
11629
+ query: {
11630
+ allow: [exports.ElementKinds.blockquote]
11631
+ }
11632
+ }
11633
+ ]
11634
+ }),
11568
11635
  withBlockquote,
11569
11636
  withNodeID({ idKey: ELEMENT_UNIQUE_ID, idCreator: idCreator }),
11570
11637
  withAutoFormat({ rules: autoFormatRules }),
@@ -11573,9 +11640,9 @@
11573
11640
  withMoveSelection,
11574
11641
  withInsertParagraphNodes(),
11575
11642
  withGetFragment(),
11643
+ withImage,
11576
11644
  withDeserializeHMTL,
11577
11645
  withDeserializeMd(),
11578
- withImage,
11579
11646
  withQuickInsert
11580
11647
  ];
11581
11648
  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));
@@ -11672,8 +11739,8 @@
11672
11739
  setTimeout(function () {
11673
11740
  if (editor && editor.children.length > 0 && isFocus) {
11674
11741
  slateHistory.HistoryEditor.withoutMerging(editor, function () {
11675
- i1.AngularEditor.focus(editor);
11676
11742
  slate.Transforms.select(editor, slate.Editor.start(editor, [0]));
11743
+ i1.AngularEditor.focus(editor);
11677
11744
  });
11678
11745
  }
11679
11746
  });
@@ -11714,6 +11781,7 @@
11714
11781
  this.ngZone = ngZone;
11715
11782
  this.toolbarGroupComponent = toolbarGroupComponent;
11716
11783
  this.toolbarItems = [];
11784
+ this.containerClass = [];
11717
11785
  this.isMore = true;
11718
11786
  this.components = new Map();
11719
11787
  this.moreGroupMenu = ToolbarMoreGroup;
@@ -11739,9 +11807,9 @@
11739
11807
  }
11740
11808
  };
11741
11809
  TheToolbarComponent.prototype.setToolbarClass = function () {
11742
- if (this.editor) {
11743
- var toolbarClass = getToolbarClass(this.editor);
11744
- this.elementRef.nativeElement.classList.add(toolbarClass);
11810
+ var _a;
11811
+ if (this.editor && !!this.containerClass.length) {
11812
+ (_a = this.elementRef.nativeElement.classList).add.apply(_a, __spreadArray([], __read(this.containerClass)));
11745
11813
  }
11746
11814
  };
11747
11815
  TheToolbarComponent.prototype.resizeElement = function () {
@@ -11969,7 +12037,7 @@
11969
12037
  return TheToolbarComponent;
11970
12038
  }());
11971
12039
  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 });
11972
- 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", 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"] }] });
12040
+ 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"] }] });
11973
12041
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheToolbarComponent, decorators: [{
11974
12042
  type: i0.Component,
11975
12043
  args: [{
@@ -11990,6 +12058,8 @@
11990
12058
  type: i0.Input
11991
12059
  }], align: [{
11992
12060
  type: i0.Input
12061
+ }], containerClass: [{
12062
+ type: i0.Input
11993
12063
  }], isMore: [{
11994
12064
  type: i0.Input
11995
12065
  }], afterTemplate: [{
@@ -12000,11 +12070,12 @@
12000
12070
  }] } });
12001
12071
 
12002
12072
  var TheInlineToolbarComponent = /** @class */ (function () {
12003
- function TheInlineToolbarComponent(elementRef, scrollDispatcher, cdr, ngZone) {
12073
+ function TheInlineToolbarComponent(elementRef, scrollDispatcher, cdr, ngZone, contextService) {
12004
12074
  this.elementRef = elementRef;
12005
12075
  this.scrollDispatcher = scrollDispatcher;
12006
12076
  this.cdr = cdr;
12007
12077
  this.ngZone = ngZone;
12078
+ this.contextService = contextService;
12008
12079
  this.destroy$ = new rxjs.Subject();
12009
12080
  }
12010
12081
  TheInlineToolbarComponent.prototype.ngOnInit = function () {
@@ -12066,7 +12137,8 @@
12066
12137
  boundary = range.startContainer.getBoundingClientRect();
12067
12138
  }
12068
12139
  }
12069
- var editableRect = document.querySelector('.the-editor-typo').getBoundingClientRect();
12140
+ var editableElement = this.contextService.getEditableElement();
12141
+ var editableRect = editableElement.getBoundingClientRect();
12070
12142
  var toolbarHeight = toolbarElement.offsetHeight;
12071
12143
  var toolbarWidth = toolbarElement.offsetWidth;
12072
12144
  var halfOffsetWidth = toolbarWidth / 2;
@@ -12105,8 +12177,8 @@
12105
12177
  };
12106
12178
  return TheInlineToolbarComponent;
12107
12179
  }());
12108
- 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 }], target: i0__namespace.ɵɵFactoryTarget.Component });
12109
- 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", "isMore", "afterTemplate"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
12180
+ 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 });
12181
+ 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 });
12110
12182
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheInlineToolbarComponent, decorators: [{
12111
12183
  type: i0.Component,
12112
12184
  args: [{
@@ -12117,7 +12189,7 @@
12117
12189
  },
12118
12190
  changeDetection: i0.ChangeDetectionStrategy.OnPush
12119
12191
  }]
12120
- }], ctorParameters: function () { return [{ type: i0__namespace.ElementRef }, { type: i2__namespace$1.ScrollDispatcher }, { type: i0__namespace.ChangeDetectorRef }, { type: i0__namespace.NgZone }]; }, propDecorators: { editor: [{
12192
+ }], ctorParameters: function () { return [{ type: i0__namespace.ElementRef }, { type: i2__namespace$1.ScrollDispatcher }, { type: i0__namespace.ChangeDetectorRef }, { type: i0__namespace.NgZone }, { type: TheContextService }]; }, propDecorators: { editor: [{
12121
12193
  type: i0.Input
12122
12194
  }], toolbarItems: [{
12123
12195
  type: i0.Input
@@ -12141,13 +12213,15 @@
12141
12213
  event.stopPropagation();
12142
12214
  };
12143
12215
  TheQuickInsertComponent.prototype.checkStatus = function () {
12144
- var _a;
12216
+ var _this = this;
12145
12217
  var editor = this.editor;
12146
12218
  if (isCleanEmptyParagraph(editor)) {
12147
- var block = slate.Node.ancestor(editor, [(_a = editor === null || editor === void 0 ? void 0 : editor.selection) === null || _a === void 0 ? void 0 : _a.anchor.path[0]]);
12148
- var rootNode = i1.AngularEditor.toDOMNode(editor, block);
12149
- this.isHide = false;
12150
- this.updatePosition(rootNode.offsetLeft, rootNode.offsetTop);
12219
+ setTimeout(function () {
12220
+ var _a;
12221
+ var block = slate.Node.ancestor(editor, [(_a = editor === null || editor === void 0 ? void 0 : editor.selection) === null || _a === void 0 ? void 0 : _a.anchor.path[0]]);
12222
+ var rootNode = i1.AngularEditor.toDOMNode(editor, block);
12223
+ _this.updatePosition(rootNode.offsetLeft, rootNode.offsetTop);
12224
+ });
12151
12225
  return;
12152
12226
  }
12153
12227
  this.isHide = true;
@@ -12197,9 +12271,10 @@
12197
12271
  }] } });
12198
12272
 
12199
12273
  var ThePlaceholderComponent = /** @class */ (function () {
12200
- function ThePlaceholderComponent(renderer, elementRef) {
12274
+ function ThePlaceholderComponent(renderer, elementRef, contextService) {
12201
12275
  this.renderer = renderer;
12202
12276
  this.elementRef = elementRef;
12277
+ this.contextService = contextService;
12203
12278
  this.isHide = true;
12204
12279
  }
12205
12280
  ThePlaceholderComponent.prototype.handleCompositionStart = function () {
@@ -12214,20 +12289,26 @@
12214
12289
  }
12215
12290
  };
12216
12291
  ThePlaceholderComponent.prototype.checkStatus = function () {
12217
- var _a, _b, _c;
12292
+ var _this = this;
12293
+ var _a, _b;
12218
12294
  var editor = this.editor;
12295
+ var isEmptyShow = typeof ((_a = this.options) === null || _a === void 0 ? void 0 : _a.isEmptyShowPlaceholder) === 'undefined' ? true : this.options.isEmptyShowPlaceholder;
12296
+ var isMustShow = (_b = this.options) === null || _b === void 0 ? void 0 : _b.isMustShowPlaceholder;
12219
12297
  // empty content and no selection processing
12220
- if (((_a = this.options) === null || _a === void 0 ? void 0 : _a.autoFocus) && !(editor === null || editor === void 0 ? void 0 : editor.selection) && isEmptyContent(editor.children)) {
12221
- // normal top is 28, but margin-top: -41px is set when maxHeight is set, so top is 69
12222
- var firstTop = ((_b = this.options) === null || _b === void 0 ? void 0 : _b.maxHeight) ? 69 : 28;
12223
- this.updatePosition(30, firstTop);
12298
+ if (isEmptyShow && isEmptyContent(editor.children)) {
12299
+ var firstElementChild = this.contextService.getFirstElementChild();
12300
+ var offsetTop = firstElementChild.offsetTop;
12301
+ var offsetLeft = firstElementChild.offsetLeft;
12302
+ this.updatePosition(offsetLeft, offsetTop);
12224
12303
  return;
12225
12304
  }
12226
- if (isCleanEmptyParagraph(editor)) {
12227
- var block = slate.Node.ancestor(editor, [(_c = editor === null || editor === void 0 ? void 0 : editor.selection) === null || _c === void 0 ? void 0 : _c.anchor.path[0]]);
12228
- var rootNode = i1.AngularEditor.toDOMNode(editor, block);
12229
- this.isHide = false;
12230
- this.updatePosition(rootNode.offsetLeft, rootNode.offsetTop);
12305
+ if (isMustShow && isCleanEmptyParagraph(editor)) {
12306
+ setTimeout(function () {
12307
+ var _a;
12308
+ var block = slate.Node.ancestor(editor, [(_a = editor === null || editor === void 0 ? void 0 : editor.selection) === null || _a === void 0 ? void 0 : _a.anchor.path[0]]);
12309
+ var rootNode = i1.AngularEditor.toDOMNode(editor, block);
12310
+ _this.updatePosition(rootNode.offsetLeft, rootNode.offsetTop);
12311
+ });
12231
12312
  return;
12232
12313
  }
12233
12314
  this.isHide = true;
@@ -12242,7 +12323,7 @@
12242
12323
  };
12243
12324
  return ThePlaceholderComponent;
12244
12325
  }());
12245
- ThePlaceholderComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: ThePlaceholderComponent, deps: [{ token: i0__namespace.Renderer2 }, { token: i0__namespace.ElementRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
12326
+ ThePlaceholderComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: ThePlaceholderComponent, deps: [{ token: i0__namespace.Renderer2 }, { token: i0__namespace.ElementRef }, { token: TheContextService }], target: i0__namespace.ɵɵFactoryTarget.Component });
12246
12327
  ThePlaceholderComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: ThePlaceholderComponent, selector: "div[thePlaceholder]", inputs: { editor: "editor", options: "options" }, host: { listeners: { "document:compositionstart": "handleCompositionStart()", "document:compositionend": "handleCompositionEnd($event)" }, properties: { "class.hide": "isHide" }, classAttribute: "the-placeholder" }, ngImport: i0__namespace, template: "{{ options?.placeholder }}", isInline: true });
12247
12328
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: ThePlaceholderComponent, decorators: [{
12248
12329
  type: i0.Component,
@@ -12254,7 +12335,7 @@
12254
12335
  '[class.hide]': 'isHide'
12255
12336
  }
12256
12337
  }]
12257
- }], ctorParameters: function () { return [{ type: i0__namespace.Renderer2 }, { type: i0__namespace.ElementRef }]; }, propDecorators: { editor: [{
12338
+ }], ctorParameters: function () { return [{ type: i0__namespace.Renderer2 }, { type: i0__namespace.ElementRef }, { type: TheContextService }]; }, propDecorators: { editor: [{
12258
12339
  type: i0.Input
12259
12340
  }], options: [{
12260
12341
  type: i0.Input
@@ -12432,6 +12513,12 @@
12432
12513
  _this.onSlaCompositionEnd = function (event) { };
12433
12514
  _this.onSlaDragStart = function (event) { };
12434
12515
  _this.onSlaDragOver = function (event) { };
12516
+ _this.onDrop = function (event) {
12517
+ event.stopPropagation();
12518
+ _this.theOnDOMEvent.emit({
12519
+ nativeEvent: event
12520
+ });
12521
+ };
12435
12522
  return _this;
12436
12523
  }
12437
12524
  Object.defineProperty(TheEditorComponent.prototype, "theGlobalToolbarInstance", {
@@ -12462,15 +12549,18 @@
12462
12549
  this.onErrorHandler();
12463
12550
  };
12464
12551
  TheEditorComponent.prototype.ngOnChanges = function (changes) {
12465
- var _a, _b, _c;
12552
+ var _a, _b, _c, _d, _e;
12466
12553
  var options = changes.theOptions;
12467
12554
  if (options) {
12468
12555
  this.initializeOptions();
12469
12556
  }
12557
+ if (options && ((_a = options.currentValue) === null || _a === void 0 ? void 0 : _a.readonly) !== ((_b = options.previousValue) === null || _b === void 0 ? void 0 : _b.readonly)) {
12558
+ this.applyAutoFocus();
12559
+ }
12470
12560
  if (changes['theDecorate']) {
12471
12561
  this.generateDecorate();
12472
12562
  }
12473
- if (((_a = this.editor) === null || _a === void 0 ? void 0 : _a.selection) && (((_b = options === null || options === void 0 ? void 0 : options.currentValue) === null || _b === void 0 ? void 0 : _b.readonly) || ((_c = options === null || options === void 0 ? void 0 : options.currentValue) === null || _c === void 0 ? void 0 : _c.disabled))) {
12563
+ if (((_c = this.editor) === null || _c === void 0 ? void 0 : _c.selection) && (((_d = options === null || options === void 0 ? void 0 : options.currentValue) === null || _d === void 0 ? void 0 : _d.readonly) || ((_e = options === null || options === void 0 ? void 0 : options.currentValue) === null || _e === void 0 ? void 0 : _e.disabled))) {
12474
12564
  slate.Transforms.deselect(this.editor);
12475
12565
  }
12476
12566
  };
@@ -12488,7 +12578,9 @@
12488
12578
  this.theContextService.initialize({ nativeElement: this.elementRef.nativeElement, viewContainerRef: this.viewContainerRef });
12489
12579
  this.toolbarCalculate();
12490
12580
  setTimeout(function () {
12581
+ var _a;
12491
12582
  _this.theEditorCreated.emit(_this.editor);
12583
+ (_a = _this.placeholderInstance) === null || _a === void 0 ? void 0 : _a.checkStatus();
12492
12584
  _this.applyAutoFocus();
12493
12585
  });
12494
12586
  };
@@ -12504,9 +12596,9 @@
12504
12596
  }
12505
12597
  };
12506
12598
  TheEditorComponent.prototype.applyAutoFocus = function () {
12507
- var _a, _b, _c, _d;
12508
- if (((_a = this.theOptions) === null || _a === void 0 ? void 0 : _a.autoFocus) && !((_b = this.theOptions) === null || _b === void 0 ? void 0 : _b.readonly) && !((_c = this.theOptions) === null || _c === void 0 ? void 0 : _c.disabled)) {
12509
- autoFocus(this.editor, (_d = this.theOptions) === null || _d === void 0 ? void 0 : _d.autoFocus);
12599
+ var _a, _b, _c;
12600
+ if (!((_a = this.theOptions) === null || _a === void 0 ? void 0 : _a.disabled) && !((_b = this.theOptions) === null || _b === void 0 ? void 0 : _b.readonly)) {
12601
+ autoFocus(this.editor, (_c = this.theOptions) === null || _c === void 0 ? void 0 : _c.autoFocus);
12510
12602
  }
12511
12603
  };
12512
12604
  TheEditorComponent.prototype.toolbarCalculate = function () {
@@ -12514,10 +12606,12 @@
12514
12606
  var toolbar = (_a = this === null || this === void 0 ? void 0 : this.theOptions) === null || _a === void 0 ? void 0 : _a.toolbar;
12515
12607
  var toolbarItems = toolbarCompose(toolbar === null || toolbar === void 0 ? void 0 : toolbar.toolbarItems);
12516
12608
  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);
12609
+ this.globalToolbarClass = ['the-global-toolbar', getToolbarClass(this.editor)];
12517
12610
  this.toolbarEntity = toolbarOption.toolbarEntity;
12518
12611
  if (this.theGlobalToolbar) {
12519
12612
  this.theGlobalToolbarInstance.editor = this.editor;
12520
12613
  this.theGlobalToolbarInstance.toolbarItems = toolbarOption.toolbarEntity.global;
12614
+ this.theGlobalToolbarInstance.containerClass = this.globalToolbarClass;
12521
12615
  this.theGlobalToolbarInstance.align = toolbar === null || toolbar === void 0 ? void 0 : toolbar.align;
12522
12616
  this.theGlobalToolbarInstance.setToolbarClass();
12523
12617
  this.theGlobalToolbarInstance.renderToolbarView();
@@ -12536,14 +12630,14 @@
12536
12630
  this.onTouchedCallback = fn;
12537
12631
  };
12538
12632
  TheEditorComponent.prototype.valueChange = function (value) {
12539
- var _a, _b, _c, _d;
12633
+ var _a, _b, _c, _d, _e, _f;
12540
12634
  (_a = this.theGlobalToolbarInstance) === null || _a === void 0 ? void 0 : _a.statusChange(this.editor);
12541
- this.quickInsertInstance.checkStatus();
12542
- this.placeholderInstance.checkStatus();
12635
+ (_b = this.quickInsertInstance) === null || _b === void 0 ? void 0 : _b.checkStatus();
12636
+ (_c = this.placeholderInstance) === null || _c === void 0 ? void 0 : _c.checkStatus();
12543
12637
  // auto scroll view
12544
- var scrollContainer = (_b = this.theOptions) === null || _b === void 0 ? void 0 : _b.scrollContainer;
12545
- var maxHeight = (_c = this.theOptions) === null || _c === void 0 ? void 0 : _c.maxHeight;
12546
- if (!((_d = this.theOptions) === null || _d === void 0 ? void 0 : _d.readonly) && (scrollContainer || maxHeight)) {
12638
+ var scrollContainer = (_d = this.theOptions) === null || _d === void 0 ? void 0 : _d.scrollContainer;
12639
+ var maxHeight = (_e = this.theOptions) === null || _e === void 0 ? void 0 : _e.maxHeight;
12640
+ if (!((_f = this.theOptions) === null || _f === void 0 ? void 0 : _f.readonly) && (scrollContainer || maxHeight)) {
12547
12641
  var container = maxHeight ? DEFAULT_SCROLL_CONTAINER : scrollContainer;
12548
12642
  this.autoScrollView(this.editor, container);
12549
12643
  }
@@ -12619,18 +12713,18 @@
12619
12713
  }
12620
12714
  };
12621
12715
  TheEditorComponent.prototype.handleSelectAll = function () {
12622
- var _e;
12716
+ var _g;
12623
12717
  var node;
12624
12718
  if (!this.editor.selection) {
12625
12719
  setEndSelection(this.editor);
12626
12720
  }
12627
- var _f = __read(slate.Range.edges(this.editor.selection), 2), start = _f[0], end = _f[1];
12721
+ var _h = __read(slate.Range.edges(this.editor.selection), 2), start = _h[0], end = _h[1];
12628
12722
  var selectionRange = slate.Editor.range(this.editor, start, end);
12629
12723
  var containerBlocks = getContainerBlocks(this.editor);
12630
12724
  for (var i = 0; i < containerBlocks.length; i++) {
12631
- _e = __read(getNodesByType(this.editor, containerBlocks[i]), 1), node = _e[0];
12725
+ _g = __read(getNodesByType(this.editor, containerBlocks[i]), 1), node = _g[0];
12632
12726
  if (node) {
12633
- var _g = __read(node, 2), path = _g[1];
12727
+ var _j = __read(node, 2), path = _j[1];
12634
12728
  var isStartParent = slate.Path.equals(path, start.path.slice(0, path.length));
12635
12729
  var isEndParent = slate.Path.equals(path, end.path.slice(0, path.length));
12636
12730
  if (isStartParent && isEndParent) {
@@ -12673,7 +12767,7 @@
12673
12767
  useExisting: i0.forwardRef(function () { return TheEditorComponent; }),
12674
12768
  multi: true
12675
12769
  }
12676
- ], 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 }, { propertyName: "placeholderInstance", first: true, predicate: ["placeholder"], descendants: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0__namespace, template: "<the-toolbar\n *ngIf=\"!theOptions?.readonly && !theGlobalToolbar\"\n class=\"the-global-toolbar\"\n [ngClass]=\"{\n 'the-toolbar-disabled': theOptions?.disabled\n }\"\n #globalToolbar\n [editor]=\"editor\"\n [toolbarItems]=\"toolbarEntity.global\"\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 (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", "isMore", "afterTemplate"] }, { type: i1__namespace.SlateEditableComponent, selector: "slate-editable", inputs: ["editor", "renderElement", "renderLeaf", "renderText", "decorate", "isStrictDecorate", "trackBy", "readonly", "beforeInput", "blur", "click", "compositionEnd", "compositionStart", "copy", "cut", "dragOver", "dragStart", "dragEnd", "drop", "focus", "keydown", "paste", "spellCheck", "autoCorrect", "autoCapitalize"] }, { type: TheInlineToolbarComponent, selector: "the-inline-toolbar", inputs: ["editor", "toolbarItems"] }, { type: TheQuickInsertComponent, selector: "[theQuickInsert]", inputs: ["editor", "quickToolbarItems"] }, { type: ThePlaceholderComponent, selector: "div[thePlaceholder]", inputs: ["editor", "options"] }, { type: TheTemplateComponent, selector: "the-template,[theTemplate]" }], directives: [{ type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i6__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i4__namespace$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4__namespace$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
12770
+ ], viewQueries: [{ propertyName: "templateInstance", first: true, predicate: ["templateInstance"], descendants: true, static: true }, { propertyName: "globalToolbarInstance", first: true, predicate: ["globalToolbar"], descendants: true }, { propertyName: "quickInsertInstance", first: true, predicate: ["quickInsert"], descendants: true, static: true }, { propertyName: "placeholderInstance", first: true, predicate: ["placeholder"], descendants: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0__namespace, template: "<the-toolbar\n *ngIf=\"!theOptions?.readonly && !theGlobalToolbar\"\n [ngClass]=\"{\n 'the-toolbar-disabled': theOptions?.disabled\n }\"\n #globalToolbar\n [editor]=\"editor\"\n [toolbarItems]=\"toolbarEntity.global\"\n [containerClass]=\"globalToolbarClass\"\n [align]=\"theOptions?.toolbar?.align\"\n></the-toolbar>\n\n<div\n class=\"the-editable-container\"\n [ngClass]=\"{\n 'the-editor-disabled': theOptions?.disabled,\n 'max-height': maxHeight\n }\"\n [ngStyle]=\"{ 'max-height': maxHeight }\"\n>\n <slate-editable\n class=\"the-editor-typo\"\n [editor]=\"editor\"\n [ngModel]=\"editorValue\"\n (ngModelChange)=\"valueChange($event)\"\n [decorate]=\"decorate\"\n [renderElement]=\"renderElement\"\n [renderText]=\"renderText\"\n [renderLeaf]=\"renderLeaf\"\n [readonly]=\"theOptions?.readonly || theOptions?.disabled\"\n [keydown]=\"onKeyDown\"\n [click]=\"onClick\"\n [paste]=\"onSlaPaste\"\n [beforeInput]=\"onSlaBeforeInput\"\n [blur]=\"onSlaBlur\"\n [focus]=\"onSlaFocus\"\n [copy]=\"onSlaCopy\"\n [cut]=\"onSlaCut\"\n [isStrictDecorate]=\"false\"\n [compositionStart]=\"onSlaCompositionStart\"\n [compositionEnd]=\"onSlaCompositionEnd\"\n [dragStart]=\"onSlaDragStart\"\n [dragOver]=\"onSlaDragOver\"\n [drop]=\"onDrop\"\n (mousedown)=\"mousedown($event)\"\n ></slate-editable>\n <the-inline-toolbar *ngIf=\"!theOptions?.readonly\" [editor]=\"editor\" [toolbarItems]=\"toolbarEntity.inline\"></the-inline-toolbar>\n <div #quickInsert theQuickInsert [editor]=\"editor\" [quickToolbarItems]=\"quickToolbarItems\"></div>\n <div #placeholder thePlaceholder [editor]=\"editor\" [options]=\"theOptions\"></div>\n <the-template #templateInstance></the-template>\n</div>\n", components: [{ type: TheToolbarComponent, selector: "the-toolbar", inputs: ["editor", "toolbarItems", "align", "containerClass", "isMore", "afterTemplate"] }, { type: i1__namespace.SlateEditableComponent, selector: "slate-editable", inputs: ["editor", "renderElement", "renderLeaf", "renderText", "decorate", "isStrictDecorate", "trackBy", "readonly", "beforeInput", "blur", "click", "compositionEnd", "compositionStart", "copy", "cut", "dragOver", "dragStart", "dragEnd", "drop", "focus", "keydown", "paste", "spellCheck", "autoCorrect", "autoCapitalize"] }, { type: TheInlineToolbarComponent, selector: "the-inline-toolbar", inputs: ["editor", "toolbarItems"] }, { type: TheQuickInsertComponent, selector: "[theQuickInsert]", inputs: ["editor", "quickToolbarItems"] }, { type: ThePlaceholderComponent, selector: "div[thePlaceholder]", inputs: ["editor", "options"] }, { type: TheTemplateComponent, selector: "the-template,[theTemplate]" }], directives: [{ type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i6__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i4__namespace$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4__namespace$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
12677
12771
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheEditorComponent, decorators: [{
12678
12772
  type: i0.Component,
12679
12773
  args: [{
@@ -12718,7 +12812,7 @@
12718
12812
  args: ['globalToolbar']
12719
12813
  }], quickInsertInstance: [{
12720
12814
  type: i0.ViewChild,
12721
- args: ['quickInsert']
12815
+ args: ['quickInsert', { static: true }]
12722
12816
  }], placeholderInstance: [{
12723
12817
  type: i0.ViewChild,
12724
12818
  args: ['placeholder']
@@ -12854,7 +12948,7 @@
12854
12948
  return TheToolbarGroupComponent;
12855
12949
  }());
12856
12950
  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 });
12857
- 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", "isMore", "afterTemplate"] }], directives: [{ type: i7__namespace.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }] });
12951
+ 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"] }] });
12858
12952
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheToolbarGroupComponent, decorators: [{
12859
12953
  type: i0.Component,
12860
12954
  args: [{
@@ -13028,13 +13122,13 @@
13028
13122
  exports.A_TAG_REL_ATTR = A_TAG_REL_ATTR;
13029
13123
  exports.AlignEditor = AlignEditor;
13030
13124
  exports.BLOCK_DELETEBACKWARD_TYPES = BLOCK_DELETEBACKWARD_TYPES;
13031
- exports.BLOCK_INSERT_ORIGIN = BLOCK_INSERT_ORIGIN;
13032
13125
  exports.BlockquoteEditor = BlockquoteEditor;
13033
13126
  exports.CLIPBOARD_FORMAT_KEY = CLIPBOARD_FORMAT_KEY;
13034
13127
  exports.CODEMIRROR_PADDING_TOP = CODEMIRROR_PADDING_TOP;
13035
13128
  exports.CODE_MODES = CODE_MODES;
13036
13129
  exports.COMPONENTS = COMPONENTS;
13037
13130
  exports.CONTAINER_BLOCKS = CONTAINER_BLOCKS;
13131
+ exports.CONTROL_KEY = CONTROL_KEY;
13038
13132
  exports.CodeEditor = CodeEditor;
13039
13133
  exports.CodeMode = CodeMode;
13040
13134
  exports.ColorEditor = ColorEditor;
@@ -13048,6 +13142,7 @@
13048
13142
  exports.HEADING_TYPES = HEADING_TYPES;
13049
13143
  exports.HeadingEditor = HeadingEditor;
13050
13144
  exports.HrEditor = HrEditor;
13145
+ exports.IS_MAC = IS_MAC;
13051
13146
  exports.ImageEditor = ImageEditor;
13052
13147
  exports.LINK_DEFAULT_TEXT = LINK_DEFAULT_TEXT;
13053
13148
  exports.LIST_BLOCK_TYPES = LIST_BLOCK_TYPES;