@worktile/theia 1.2.11 → 1.2.12

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 (29) hide show
  1. package/bundles/worktile-theia.umd.js +57 -49
  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.scss +6 -5
  5. package/components/toolbar/toolbar.component.d.ts +2 -1
  6. package/custom-types.d.ts +2 -0
  7. package/editor.component.d.ts +1 -0
  8. package/esm2015/components/column-resize/column-resize.directive.js +1 -1
  9. package/esm2015/components/inline-toolbar/inline-toolbar.component.js +1 -1
  10. package/esm2015/components/toolbar/toolbar.component.js +7 -6
  11. package/esm2015/components/toolbar-group/toolbar-group.component.js +1 -1
  12. package/esm2015/custom-types.js +1 -1
  13. package/esm2015/editor.component.js +11 -8
  14. package/esm2015/plugins/deserializers/deserialize-html.plugin.js +6 -4
  15. package/esm2015/plugins/deserializers/deserialize-md.plugin.js +2 -2
  16. package/esm2015/plugins/placeholder/placeholder.component.js +8 -7
  17. package/esm2015/plugins/quick-insert/quick-insert.plugint.js +3 -2
  18. package/esm2015/plugins/table/table.types.js +1 -1
  19. package/esm2015/queries/is-container-type.js +2 -2
  20. package/esm2015/transforms/index.js +2 -3
  21. package/esm2015/utils/fragment.js +20 -1
  22. package/fesm2015/worktile-theia.js +50 -44
  23. package/fesm2015/worktile-theia.js.map +1 -1
  24. package/package.json +1 -1
  25. package/plugins/table/table.types.d.ts +7 -0
  26. package/transforms/index.d.ts +1 -2
  27. package/utils/fragment.d.ts +5 -0
  28. package/esm2015/transforms/insert-elements.js +0 -22
  29. package/transforms/insert-elements.d.ts +0 -2
@@ -1440,6 +1440,25 @@
1440
1440
  });
1441
1441
  return nodes;
1442
1442
  }
1443
+ /**
1444
+ * 删除 text 节点的 颜色/背景色
1445
+ * @param node
1446
+ */
1447
+ function deleteColorAndBackgroundColorOfText(node) {
1448
+ node.children.forEach(function (child) {
1449
+ if (slate.Text.isText(child)) {
1450
+ if (child['color']) {
1451
+ delete child['color'];
1452
+ }
1453
+ if (child['background-color']) {
1454
+ delete child['background-color'];
1455
+ }
1456
+ }
1457
+ else {
1458
+ deleteColorAndBackgroundColorOfText(child);
1459
+ }
1460
+ });
1461
+ }
1443
1462
 
1444
1463
  var isAcrossBlocks = function (editor, fragment) {
1445
1464
  var startBlock = getStartBlock(editor, fragment[0]);
@@ -1569,7 +1588,7 @@
1569
1588
  return marks;
1570
1589
  };
1571
1590
 
1572
- var isContainer = function (editor, value) { return slate.Element.isElement(value) && editor.isContainer(value); };
1591
+ var isContainer = function (editor, value) { return slate.Element.isElement(value) && editor.isContainer && editor.isContainer(value); };
1573
1592
 
1574
1593
  var getContainerBlocks = function (editor) {
1575
1594
  var containerNode = slate.Editor.above(editor, {
@@ -1845,26 +1864,6 @@
1845
1864
  i1.AngularEditor.focus(editor);
1846
1865
  };
1847
1866
 
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
1867
  var THE_EDITOR_UUID = new WeakMap();
1869
1868
  var THE_EDITOR_CONVERSION_HINT_REF = new WeakMap();
1870
1869
  var THE_EDITOR_QUICK_TOOLBAR_REF = new WeakMap();
@@ -1929,7 +1928,6 @@
1929
1928
  splitNode: splitNode,
1930
1929
  deleteElement: deleteElement,
1931
1930
  setEndSelection: setEndSelection,
1932
- insertTheElements: insertTheElements,
1933
1931
  closeConversionHint: closeConversionHint,
1934
1932
  handleContinualDeleteBackward: handleContinualDeleteBackward,
1935
1933
  handleContinualInsertBreak: handleContinualInsertBreak
@@ -2412,7 +2410,7 @@
2412
2410
  editor.undo();
2413
2411
  setTimeout(function () {
2414
2412
  slate.Transforms.select(editor, oldRange);
2415
- insertTheElements(editor, fragment_1);
2413
+ slate.Transforms.insertFragment(editor, fragment_1);
2416
2414
  i1.AngularEditor.focus(editor);
2417
2415
  });
2418
2416
  return;
@@ -11020,7 +11018,9 @@
11020
11018
  insertData(data);
11021
11019
  return;
11022
11020
  }
11023
- insertTheElements(editor, fragment);
11021
+ // 过滤 text 节点的 color/background-color 属性
11022
+ fragment.forEach(function (node) { return deleteColorAndBackgroundColorOfText(node); });
11023
+ slate.Transforms.insertFragment(editor, fragment);
11024
11024
  return;
11025
11025
  }
11026
11026
  insertData(data);
@@ -11535,10 +11535,11 @@
11535
11535
  deleteBackward(unit);
11536
11536
  };
11537
11537
  editor.onChange = function () {
11538
+ var _a;
11538
11539
  onChange();
11539
11540
  if (editor.selection) {
11540
11541
  var editorComponent = editor.injector.get(TheEditorComponent);
11541
- editorComponent.quickInsertInstance.checkStatus();
11542
+ (_a = editorComponent.quickInsertInstance) === null || _a === void 0 ? void 0 : _a.checkStatus();
11542
11543
  var block = slate.Node.ancestor(editor, [editor.selection.anchor.path[0]]);
11543
11544
  if (!isCleanEmptyParagraph(editor) && slate.Node.string(block) !== QUICK_TOOLBAR_HOTKEY) {
11544
11545
  QuickInsertEditor.closeQuickToolbar(editor);
@@ -11714,6 +11715,7 @@
11714
11715
  this.ngZone = ngZone;
11715
11716
  this.toolbarGroupComponent = toolbarGroupComponent;
11716
11717
  this.toolbarItems = [];
11718
+ this.containerClass = [];
11717
11719
  this.isMore = true;
11718
11720
  this.components = new Map();
11719
11721
  this.moreGroupMenu = ToolbarMoreGroup;
@@ -11739,9 +11741,9 @@
11739
11741
  }
11740
11742
  };
11741
11743
  TheToolbarComponent.prototype.setToolbarClass = function () {
11742
- if (this.editor) {
11743
- var toolbarClass = getToolbarClass(this.editor);
11744
- this.elementRef.nativeElement.classList.add(toolbarClass);
11744
+ var _a;
11745
+ if (this.editor && !!this.containerClass.length) {
11746
+ (_a = this.elementRef.nativeElement.classList).add.apply(_a, __spreadArray([], __read(this.containerClass)));
11745
11747
  }
11746
11748
  };
11747
11749
  TheToolbarComponent.prototype.resizeElement = function () {
@@ -11969,7 +11971,7 @@
11969
11971
  return TheToolbarComponent;
11970
11972
  }());
11971
11973
  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"] }] });
11974
+ 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
11975
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheToolbarComponent, decorators: [{
11974
11976
  type: i0.Component,
11975
11977
  args: [{
@@ -11990,6 +11992,8 @@
11990
11992
  type: i0.Input
11991
11993
  }], align: [{
11992
11994
  type: i0.Input
11995
+ }], containerClass: [{
11996
+ type: i0.Input
11993
11997
  }], isMore: [{
11994
11998
  type: i0.Input
11995
11999
  }], afterTemplate: [{
@@ -12106,7 +12110,7 @@
12106
12110
  return TheInlineToolbarComponent;
12107
12111
  }());
12108
12112
  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 });
12113
+ 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
12114
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheInlineToolbarComponent, decorators: [{
12111
12115
  type: i0.Component,
12112
12116
  args: [{
@@ -12214,20 +12218,22 @@
12214
12218
  }
12215
12219
  };
12216
12220
  ThePlaceholderComponent.prototype.checkStatus = function () {
12217
- var _a, _b, _c;
12221
+ var _this = this;
12222
+ var _a, _b;
12218
12223
  var editor = this.editor;
12219
12224
  // 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)) {
12225
+ if (!(editor === null || editor === void 0 ? void 0 : editor.selection) && isEmptyContent(editor.children)) {
12221
12226
  // 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;
12227
+ var firstTop = ((_a = this.options) === null || _a === void 0 ? void 0 : _a.maxHeight) ? 69 : 28;
12223
12228
  this.updatePosition(30, firstTop);
12224
12229
  return;
12225
12230
  }
12226
12231
  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);
12232
+ var block = slate.Node.ancestor(editor, [(_b = editor === null || editor === void 0 ? void 0 : editor.selection) === null || _b === void 0 ? void 0 : _b.anchor.path[0]]);
12233
+ var rootNode_1 = i1.AngularEditor.toDOMNode(editor, block);
12234
+ setTimeout(function () {
12235
+ _this.updatePosition(rootNode_1.offsetLeft, rootNode_1.offsetTop);
12236
+ });
12231
12237
  return;
12232
12238
  }
12233
12239
  this.isHide = true;
@@ -12514,10 +12520,12 @@
12514
12520
  var toolbar = (_a = this === null || this === void 0 ? void 0 : this.theOptions) === null || _a === void 0 ? void 0 : _a.toolbar;
12515
12521
  var toolbarItems = toolbarCompose(toolbar === null || toolbar === void 0 ? void 0 : toolbar.toolbarItems);
12516
12522
  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);
12523
+ this.globalToolbarClass = ['the-global-toolbar', getToolbarClass(this.editor)];
12517
12524
  this.toolbarEntity = toolbarOption.toolbarEntity;
12518
12525
  if (this.theGlobalToolbar) {
12519
12526
  this.theGlobalToolbarInstance.editor = this.editor;
12520
12527
  this.theGlobalToolbarInstance.toolbarItems = toolbarOption.toolbarEntity.global;
12528
+ this.theGlobalToolbarInstance.containerClass = this.globalToolbarClass;
12521
12529
  this.theGlobalToolbarInstance.align = toolbar === null || toolbar === void 0 ? void 0 : toolbar.align;
12522
12530
  this.theGlobalToolbarInstance.setToolbarClass();
12523
12531
  this.theGlobalToolbarInstance.renderToolbarView();
@@ -12536,14 +12544,14 @@
12536
12544
  this.onTouchedCallback = fn;
12537
12545
  };
12538
12546
  TheEditorComponent.prototype.valueChange = function (value) {
12539
- var _a, _b, _c, _d;
12547
+ var _a, _b, _c, _d, _e;
12540
12548
  (_a = this.theGlobalToolbarInstance) === null || _a === void 0 ? void 0 : _a.statusChange(this.editor);
12541
- this.quickInsertInstance.checkStatus();
12549
+ (_b = this.quickInsertInstance) === null || _b === void 0 ? void 0 : _b.checkStatus();
12542
12550
  this.placeholderInstance.checkStatus();
12543
12551
  // 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)) {
12552
+ var scrollContainer = (_c = this.theOptions) === null || _c === void 0 ? void 0 : _c.scrollContainer;
12553
+ var maxHeight = (_d = this.theOptions) === null || _d === void 0 ? void 0 : _d.maxHeight;
12554
+ if (!((_e = this.theOptions) === null || _e === void 0 ? void 0 : _e.readonly) && (scrollContainer || maxHeight)) {
12547
12555
  var container = maxHeight ? DEFAULT_SCROLL_CONTAINER : scrollContainer;
12548
12556
  this.autoScrollView(this.editor, container);
12549
12557
  }
@@ -12619,18 +12627,18 @@
12619
12627
  }
12620
12628
  };
12621
12629
  TheEditorComponent.prototype.handleSelectAll = function () {
12622
- var _e;
12630
+ var _f;
12623
12631
  var node;
12624
12632
  if (!this.editor.selection) {
12625
12633
  setEndSelection(this.editor);
12626
12634
  }
12627
- var _f = __read(slate.Range.edges(this.editor.selection), 2), start = _f[0], end = _f[1];
12635
+ var _g = __read(slate.Range.edges(this.editor.selection), 2), start = _g[0], end = _g[1];
12628
12636
  var selectionRange = slate.Editor.range(this.editor, start, end);
12629
12637
  var containerBlocks = getContainerBlocks(this.editor);
12630
12638
  for (var i = 0; i < containerBlocks.length; i++) {
12631
- _e = __read(getNodesByType(this.editor, containerBlocks[i]), 1), node = _e[0];
12639
+ _f = __read(getNodesByType(this.editor, containerBlocks[i]), 1), node = _f[0];
12632
12640
  if (node) {
12633
- var _g = __read(node, 2), path = _g[1];
12641
+ var _h = __read(node, 2), path = _h[1];
12634
12642
  var isStartParent = slate.Path.equals(path, start.path.slice(0, path.length));
12635
12643
  var isEndParent = slate.Path.equals(path, end.path.slice(0, path.length));
12636
12644
  if (isStartParent && isEndParent) {
@@ -12673,7 +12681,7 @@
12673
12681
  useExisting: i0.forwardRef(function () { return TheEditorComponent; }),
12674
12682
  multi: true
12675
12683
  }
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"] }] });
12684
+ ], 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 (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
12685
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheEditorComponent, decorators: [{
12678
12686
  type: i0.Component,
12679
12687
  args: [{
@@ -12718,7 +12726,7 @@
12718
12726
  args: ['globalToolbar']
12719
12727
  }], quickInsertInstance: [{
12720
12728
  type: i0.ViewChild,
12721
- args: ['quickInsert']
12729
+ args: ['quickInsert', { static: true }]
12722
12730
  }], placeholderInstance: [{
12723
12731
  type: i0.ViewChild,
12724
12732
  args: ['placeholder']
@@ -12854,7 +12862,7 @@
12854
12862
  return TheToolbarGroupComponent;
12855
12863
  }());
12856
12864
  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"] }] });
12865
+ 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
12866
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheToolbarGroupComponent, decorators: [{
12859
12867
  type: i0.Component,
12860
12868
  args: [{