@worktile/theia 2.1.5 → 2.1.9

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 (38) hide show
  1. package/bundles/worktile-theia.umd.js +170 -191
  2. package/bundles/worktile-theia.umd.js.map +1 -1
  3. package/editor.component.d.ts +3 -4
  4. package/editor.module.d.ts +26 -28
  5. package/esm2015/components/toolbar/toolbar.component.js +6 -6
  6. package/esm2015/constants/toolbar.js +1 -4
  7. package/esm2015/editor.component.js +19 -20
  8. package/esm2015/editor.module.js +1 -4
  9. package/esm2015/interfaces/editor.js +1 -1
  10. package/esm2015/plugins/common/move-selection.plugin.js +48 -3
  11. package/esm2015/plugins/image/image.component.js +1 -1
  12. package/esm2015/plugins/inline-code/inline-code.component.js +14 -15
  13. package/esm2015/plugins/inline-code/inline-code.editor.js +7 -3
  14. package/esm2015/plugins/inline-code/inline-code.plugin.js +2 -2
  15. package/esm2015/plugins/link/edit/link-edit.component.js +1 -1
  16. package/esm2015/plugins/link/link.component.js +13 -3
  17. package/esm2015/plugins/list/transforms/insert-list-item.js +11 -7
  18. package/esm2015/plugins/quick-insert/components/quick-insert.component.js +17 -9
  19. package/esm2015/plugins/table/transforms/insert-table.js +2 -2
  20. package/esm2015/transforms/handle-continual-insert-break.js +1 -4
  21. package/esm2015/utils/index.js +2 -1
  22. package/esm2015/utils/is-inline.js +10 -0
  23. package/fesm2015/worktile-theia.js +162 -171
  24. package/fesm2015/worktile-theia.js.map +1 -1
  25. package/interfaces/editor.d.ts +3 -3
  26. package/package.json +1 -1
  27. package/plugins/inline-code/inline-code.component.d.ts +2 -7
  28. package/plugins/inline-code/inline-code.editor.d.ts +2 -2
  29. package/plugins/link/link.component.d.ts +1 -0
  30. package/plugins/quick-insert/components/quick-insert.component.d.ts +3 -1
  31. package/plugins/table/transforms/insert-table.d.ts +1 -1
  32. package/styles/index.scss +0 -1
  33. package/styles/typo.scss +4 -1
  34. package/utils/index.d.ts +1 -0
  35. package/utils/is-inline.d.ts +2 -0
  36. package/esm2015/plugins/placeholder/placeholder.component.js +0 -83
  37. package/plugins/placeholder/placeholder.component.d.ts +0 -21
  38. package/plugins/placeholder/placeholder.component.scss +0 -10
@@ -520,7 +520,6 @@
520
520
  })(exports.ToolbarItemMode || (exports.ToolbarItemMode = {}));
521
521
  var DefaultGlobalToolbarDefinition = [
522
522
  exports.ElementKinds.headingList,
523
- exports.MarkTypes.fontSize,
524
523
  exports.ToolbarActionTypes.split,
525
524
  exports.MarkTypes.bold,
526
525
  exports.MarkTypes.italic,
@@ -535,7 +534,6 @@
535
534
  exports.ToolbarActionTypes.split,
536
535
  exports.ElementKinds.numberedList,
537
536
  exports.ElementKinds.bulletedList,
538
- // ElementKinds.checkItem,
539
537
  exports.ToolbarActionTypes.split,
540
538
  exports.ElementKinds.link,
541
539
  exports.ElementKinds.image,
@@ -562,7 +560,6 @@
562
560
  exports.ToolbarActionTypes.split,
563
561
  exports.ElementKinds.numberedList,
564
562
  exports.ElementKinds.bulletedList,
565
- // ElementKinds.checkItem,
566
563
  exports.ToolbarActionTypes.split,
567
564
  exports.ElementKinds.link,
568
565
  exports.ElementKinds.image,
@@ -1941,9 +1938,6 @@
1941
1938
  var aboveResult = slate.Editor.above(editor, {
1942
1939
  match: function (n) { return slate.Editor.isBlock(editor, n) && n.type === type; }
1943
1940
  });
1944
- if (isEnd) {
1945
- editor.marks = {};
1946
- }
1947
1941
  if (aboveResult && aboveResult[0] && isEnd && isEmpty) {
1948
1942
  var wrapBlock = aboveResult[0];
1949
1943
  if (wrapBlock.type === type) {
@@ -2203,8 +2197,12 @@
2203
2197
  unwrapInlineCode: function (editor) {
2204
2198
  slate.Transforms.unwrapNodes(editor, { match: function (n) { return slate.Element.isElement(n) && n.type === exports.ElementKinds.inlineCode; } });
2205
2199
  },
2206
- isInlineCodeActive: function (editor) {
2207
- var _a = __read(slate.Editor.nodes(editor, { match: function (n) { return slate.Element.isElement(n) && n.type === exports.ElementKinds.inlineCode; } }), 1), inlineCode = _a[0];
2200
+ isInlineCodeActive: function (editor, path) {
2201
+ var _a;
2202
+ var _b = __read(slate.Editor.nodes(editor, {
2203
+ at: path ? path : (_a = editor.selection) === null || _a === void 0 ? void 0 : _a.anchor.path,
2204
+ match: function (n) { return slate.Element.isElement(n) && n.type === exports.ElementKinds.inlineCode; }
2205
+ }), 1), inlineCode = _b[0];
2208
2206
  return !!inlineCode;
2209
2207
  }
2210
2208
  };
@@ -2470,6 +2468,35 @@
2470
2468
  var IS_MAC = typeof window != 'undefined' && /Mac|iPod|iPhone|iPad/.test(window.navigator.platform);
2471
2469
  var CONTROL_KEY = IS_MAC ? '⌘' : 'Ctrl';
2472
2470
 
2471
+ /**
2472
+ * whether the current node is a clean paragraph
2473
+ * @param editor
2474
+ * @param text
2475
+ * @returns boolean
2476
+ */
2477
+ var isCleanEmptyParagraph = function (editor) {
2478
+ var isCollapsedCursor = TheEditor.isFocused(editor) && editor.selection && slate.Range.isCollapsed(editor.selection);
2479
+ if (!isCollapsedCursor) {
2480
+ return false;
2481
+ }
2482
+ var block = slate.Node.ancestor(editor, [editor.selection.anchor.path[0]]);
2483
+ var textIndent = 'textIndent';
2484
+ var align = 'align';
2485
+ var hasTextIndent = block[textIndent];
2486
+ var hasAlign = block[align];
2487
+ if (slate.Node.string(block) === '' &&
2488
+ slate.Element.isElement(block) &&
2489
+ block.type === exports.ElementKinds.paragraph &&
2490
+ block.children.length === 1 &&
2491
+ slate.Text.isText(block.children[0]) &&
2492
+ !slate.Editor.isVoid(editor, block) &&
2493
+ !hasTextIndent &&
2494
+ !hasAlign) {
2495
+ return true;
2496
+ }
2497
+ return false;
2498
+ };
2499
+
2473
2500
  var withDeserializeMd = function (options) { return function (editor) {
2474
2501
  var insertData = editor.insertData, onKeydown = editor.onKeydown;
2475
2502
  editor.onKeydown = function (event) {
@@ -2972,7 +2999,7 @@
2972
2999
  return TheImageComponent;
2973
3000
  }(TheBaseElementComponent));
2974
3001
  TheImageComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheImageComponent, deps: [{ token: i0__namespace.ElementRef }, { token: i1__namespace$2.DomSanitizer }, { token: THE_UPLOAD_SERVICE_TOKEN }, { token: i0__namespace.ChangeDetectorRef }, { token: TheContextService }], target: i0__namespace.ɵɵFactoryTarget.Component });
2975
- TheImageComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheImageComponent, selector: "the-image, [theImage]", viewQueries: [{ propertyName: "imageContent", first: true, predicate: ["imageContent"], descendants: true }, { propertyName: "img", first: true, predicate: ["img"], descendants: true }], usesInheritance: true, ngImport: i0__namespace, template: "<slate-children [children]=\"children\" [context]=\"childrenContext\" [viewContext]=\"viewContext\"></slate-children>\n<div class=\"image-container\" contenteditable=\"false\" [style.textAlign]=\"imageEntry.align || 'center'\">\n <div\n #imageContent\n *ngIf=\"imageEntry.thumbUrl\"\n class=\"image-content\"\n [class.pointer]=\"!selection\"\n [ngStyle]=\"{ width: imageEntry.width + 'px', height: imageEntry.height + 'px' }\"\n >\n <img #img class=\"main-image\" [src]=\"imageEntry.thumbUrl\" [alt]=\"imageEntry.name\" />\n <div *ngIf=\"selection\" class=\"image-profile\" [class.outline]=\"selection\">\n <span *ngIf=\"isCollapsed\" (mousedown)=\"startDrag($event, '-xl')\" class=\"image-pointer left top\"></span>\n <span *ngIf=\"isCollapsed\" (mousedown)=\"startDrag($event, 'xl')\" class=\"image-pointer right top\"></span>\n <span *ngIf=\"isCollapsed\" (mousedown)=\"startDrag($event, 'xl')\" class=\"image-pointer right bottom\"></span>\n <span *ngIf=\"isCollapsed\" (mousedown)=\"startDrag($event, '-xl')\" class=\"image-pointer left bottom\"></span>\n </div>\n <div *ngIf=\"uploading\" class=\"uploading\">\n <div class=\"uploading-percentage\">\n <thy-progress thyType=\"primary\" [thyValue]=\"percentage\" thySize=\"sm\"></thy-progress>\n <thy-icon (click)=\"cancelUpload($event)\" thyIconName=\"close-circle-bold-fill\" thyIconLegging=\"true\"></thy-icon>\n </div>\n </div>\n <div *ngIf=\"!uploading\" class=\"layer\" (mousedown)=\"preview($event)\" [class.readonly]=\"readonly\"></div>\n </div>\n <div *ngIf=\"!imageEntry.thumbUrl\" class=\"image-loading\" contenteditable=\"false\">\n <thy-icon thyIconName=\"image\"></thy-icon>\n </div>\n</div>\n", components: [{ type: i1__namespace.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }, { type: i4__namespace.ThyProgressComponent, selector: "thy-progress", inputs: ["thyType", "thyTips", "thyValue", "thySize", "thyMax"] }, { 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: i6__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
3002
+ TheImageComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheImageComponent, selector: "the-image, [theImage]", viewQueries: [{ propertyName: "imageContent", first: true, predicate: ["imageContent"], descendants: true }, { propertyName: "img", first: true, predicate: ["img"], descendants: true }], usesInheritance: true, ngImport: i0__namespace, template: "<slate-children [children]=\"children\" [context]=\"childrenContext\" [viewContext]=\"viewContext\"></slate-children>\n<div class=\"image-container\" contenteditable=\"false\" [style.textAlign]=\"imageEntry.align || 'center'\">\n <div\n #imageContent\n *ngIf=\"imageEntry.thumbUrl\"\n class=\"image-content\"\n [class.pointer]=\"!selection\"\n [ngStyle]=\"{ width: imageEntry.width + 'px', height: imageEntry.height + 'px' }\"\n >\n <img #img class=\"main-image\" [src]=\"imageEntry.thumbUrl\" [alt]=\"imageEntry.name\" />\n <div *ngIf=\"selection\" class=\"image-profile\" [class.outline]=\"selection\">\n <span *ngIf=\"isCollapsed\" (mousedown)=\"startDrag($event, '-xl')\" class=\"image-pointer left top\"></span>\n <span *ngIf=\"isCollapsed\" (mousedown)=\"startDrag($event, 'xl')\" class=\"image-pointer right top\"></span>\n <span *ngIf=\"isCollapsed\" (mousedown)=\"startDrag($event, 'xl')\" class=\"image-pointer right bottom\"></span>\n <span *ngIf=\"isCollapsed\" (mousedown)=\"startDrag($event, '-xl')\" class=\"image-pointer left bottom\"></span>\n </div>\n <div *ngIf=\"uploading\" class=\"uploading\">\n <div class=\"uploading-percentage\">\n <thy-progress thyType=\"primary\" [thyValue]=\"percentage\" thySize=\"sm\"></thy-progress>\n <thy-icon (click)=\"cancelUpload($event)\" thyIconName=\"close-circle-bold-fill\" thyIconLegging=\"true\"></thy-icon>\n </div>\n </div>\n <div *ngIf=\"!uploading\" class=\"layer\" (mousedown)=\"preview($event)\" [class.readonly]=\"readonly\"></div>\n </div>\n <div *ngIf=\"!imageEntry.thumbUrl\" class=\"image-loading\" contenteditable=\"false\">\n <thy-icon thyIconName=\"image\"></thy-icon>\n </div>\n</div>\n", components: [{ type: i1__namespace.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }, { type: i4__namespace.ThyProgressComponent, selector: "thy-progress", inputs: ["thyType", "thySize", "thyValue", "thyMax", "thyTips"] }, { 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: i6__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
2976
3003
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheImageComponent, decorators: [{
2977
3004
  type: i0.Component,
2978
3005
  args: [{
@@ -3484,14 +3511,17 @@
3484
3511
  }
3485
3512
  else {
3486
3513
  /**
3487
- * If end, insert a list item after and select it
3514
+ * If end, split nodes
3488
3515
  */
3489
3516
  slate.Editor.withoutNormalizing(editor, function () {
3490
- slate.Transforms.insertNodes(editor, {
3491
- type: exports.ElementKinds.listItem,
3492
- children: [{ type: exports.ElementKinds.paragraph, children: [{ text: '' }] }]
3493
- }, { at: nextListItemPath_1 });
3494
- slate.Transforms.select(editor, nextListItemPath_1);
3517
+ slate.Transforms.splitNodes(editor, {
3518
+ always: true,
3519
+ mode: 'highest',
3520
+ match: function (node) {
3521
+ var path = node && TheEditor.findPath(editor, node);
3522
+ return path && path.length === nextListItemPath_1.length;
3523
+ }
3524
+ });
3495
3525
  });
3496
3526
  }
3497
3527
  /**
@@ -5075,8 +5105,17 @@
5075
5105
  return editor;
5076
5106
  };
5077
5107
 
5108
+ var isInline = function (editor, path) {
5109
+ var _a;
5110
+ var _b = __read(slate.Editor.nodes(editor, {
5111
+ at: path ? path : (_a = editor.selection) === null || _a === void 0 ? void 0 : _a.anchor.path,
5112
+ match: function (n) { return slate.Element.isElement(n) && slate.Editor.isInline(editor, n) && !slate.Editor.isVoid(editor, n); }
5113
+ }), 1), inlineNode = _b[0];
5114
+ return !!inlineNode;
5115
+ };
5116
+
5078
5117
  var withMoveSelection = function (editor) {
5079
- var onClick = editor.onClick, deleteBackward = editor.deleteBackward;
5118
+ var onClick = editor.onClick, deleteBackward = editor.deleteBackward, onKeydown = editor.onKeydown;
5080
5119
  editor.onClick = function (event) {
5081
5120
  var domSelection = window.getSelection();
5082
5121
  if (domSelection && !domSelection.isCollapsed && event.detail >= 2 && editor.selection) {
@@ -5107,6 +5146,50 @@
5107
5146
  }
5108
5147
  deleteBackward(unit);
5109
5148
  };
5149
+ editor.onKeydown = function (event) {
5150
+ var selection = editor.selection;
5151
+ if (!selection || !selection.anchor || !selection.focus) {
5152
+ onKeydown(event);
5153
+ return;
5154
+ }
5155
+ var isMoveBackward = i1.hotkeys.isMoveBackward(event);
5156
+ var isMoveForward = i1.hotkeys.isMoveForward(event);
5157
+ var isCollapsed$1 = selection && isCollapsed(selection);
5158
+ var isInlineNode = isInline(editor);
5159
+ if (isCollapsed$1 && isMoveForward) {
5160
+ var isInlineCodeBefore = false;
5161
+ if (!isInlineNode) {
5162
+ try {
5163
+ var path = slate.Editor.after(editor, selection).path;
5164
+ if (path) {
5165
+ isInlineCodeBefore = isInline(editor, path);
5166
+ }
5167
+ }
5168
+ catch (error) { }
5169
+ }
5170
+ if (isInlineNode || isInlineCodeBefore) {
5171
+ event.preventDefault();
5172
+ slate.Transforms.move(editor, { unit: 'offset' });
5173
+ return;
5174
+ }
5175
+ }
5176
+ if (isCollapsed$1 && isMoveBackward) {
5177
+ var isInlineCodeAfter = false;
5178
+ if (!isInlineNode) {
5179
+ try {
5180
+ var path = slate.Editor.before(editor, selection).path;
5181
+ isInlineCodeAfter = isInline(editor, path);
5182
+ }
5183
+ catch (error) { }
5184
+ }
5185
+ if (isInlineNode || isInlineCodeAfter) {
5186
+ event.preventDefault();
5187
+ slate.Transforms.move(editor, { unit: 'offset', reverse: true });
5188
+ return;
5189
+ }
5190
+ }
5191
+ onKeydown(event);
5192
+ };
5110
5193
  return editor;
5111
5194
  };
5112
5195
 
@@ -5709,9 +5792,9 @@
5709
5792
  /**
5710
5793
  * Insert a new table
5711
5794
  */
5712
- function insertTable(opts, editor, columns, rows, getCellContent) {
5713
- if (columns === void 0) { columns = 3; }
5795
+ function insertTable(opts, editor, rows, columns, getCellContent) {
5714
5796
  if (rows === void 0) { rows = 3; }
5797
+ if (columns === void 0) { columns = 3; }
5715
5798
  var selection = editor.selection;
5716
5799
  if (!(selection === null || selection === void 0 ? void 0 : selection.anchor)) {
5717
5800
  return;
@@ -7527,7 +7610,7 @@
7527
7610
  return TheLinkEditComponent;
7528
7611
  }());
7529
7612
  TheLinkEditComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheLinkEditComponent, deps: [{ token: i1__namespace$3.ThyPopoverRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
7530
- TheLinkEditComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheLinkEditComponent, selector: "the-link-edit", inputs: { tag: "tag", node: "node", link: "link", text: "text", originSelection: "originSelection" }, host: { listeners: { "document: mousedown": "handleDocumentMouseDown($event)" }, properties: { "class": "this.className" } }, ngImport: i0__namespace, template: "<form\n thyForm\n #linkForm=\"thyForm\"\n [thyFormValidatorConfig]=\"validatorConfig\"\n name=\"linkForm\"\n>\n <thy-form-group thyLabelText=\"\u6587\u672C\">\n <input\n thyInput\n placeholder=\"\u8BF7\u8F93\u5165\u6587\u672C\"\n required\n name=\"text\"\n [(ngModel)]=\"text\"\n thyAutofocus\n type=\"text\"\n />\n </thy-form-group>\n <thy-form-group thyLabelText=\"\u94FE\u63A5\">\n <input\n name=\"link\"\n thyInput\n placeholder=\"\u8BF7\u8F93\u5165\u94FE\u63A5\"\n required\n type=\"text\"\n #linkControl=\"ngModel\"\n [(ngModel)]=\"link\"\n />\n </thy-form-group>\n <thy-form-group-footer>\n <div class=\"btn-pair\">\n <button\n thyButton=\"link-secondary\"\n thySize=\"sm\"\n (click)=\"closePopover()\"\n >\u53D6\u6D88</button>\n <button\n thyButton=\"primary-square\"\n thySize=\"sm\"\n (thyFormSubmit)=\"applyLink(linkForm)\"\n >\u5E94\u7528</button>\n </div>\n </thy-form-group-footer>\n</form>\n", components: [{ type: i2__namespace$1.ThyFormGroupComponent, selector: "thy-form-group", inputs: ["thyLabelText", "thyLabelTextTranslateKey", "thyLabelRequired", "thyLabelPaddingTopClear", "thyFeedbackIcon", "thyTips", "thyTipsTranslateKey", "thyRowFill"] }, { type: i2__namespace$1.ThyFormGroupFooterComponent, selector: "thy-form-group-footer", inputs: ["thyAlign"] }, { type: i1__namespace$5.ThyButtonComponent, selector: "thy-button,[thy-button],[thyButton]", inputs: ["thyButton", "thyType", "thyLoading", "thyLoadingText", "thySize", "thyIcon", "thySquare", "thyBlock"] }], directives: [{ type: i4__namespace$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i4__namespace$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i4__namespace$2.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i2__namespace$1.ThyFormDirective, selector: "[thyForm],[thy-form]", inputs: ["thyLayout", "thyEnterKeyMode", "thyFormValidatorConfig"], exportAs: ["thyForm"] }, { type: i5__namespace$3.ThyAutofocusDirective, selector: "input[thyAutofocus],textarea[thyAutofocus]", inputs: ["thyAutoSelect", "thyAutofocus"] }, { type: i4__namespace$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i5__namespace.ThyInputDirective, selector: "[thyInput]", inputs: ["thySize", "thyAutocomplete"] }, { type: i4__namespace$2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i4__namespace$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4__namespace$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i2__namespace$1.ThyFormSubmitDirective, selector: "[thyFormSubmit],[thy-form-submit]", outputs: ["thyFormSubmit"] }] });
7613
+ TheLinkEditComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheLinkEditComponent, selector: "the-link-edit", inputs: { tag: "tag", node: "node", link: "link", text: "text", originSelection: "originSelection" }, host: { listeners: { "document: mousedown": "handleDocumentMouseDown($event)" }, properties: { "class": "this.className" } }, ngImport: i0__namespace, template: "<form\n thyForm\n #linkForm=\"thyForm\"\n [thyFormValidatorConfig]=\"validatorConfig\"\n name=\"linkForm\"\n>\n <thy-form-group thyLabelText=\"\u6587\u672C\">\n <input\n thyInput\n placeholder=\"\u8BF7\u8F93\u5165\u6587\u672C\"\n required\n name=\"text\"\n [(ngModel)]=\"text\"\n thyAutofocus\n type=\"text\"\n />\n </thy-form-group>\n <thy-form-group thyLabelText=\"\u94FE\u63A5\">\n <input\n name=\"link\"\n thyInput\n placeholder=\"\u8BF7\u8F93\u5165\u94FE\u63A5\"\n required\n type=\"text\"\n #linkControl=\"ngModel\"\n [(ngModel)]=\"link\"\n />\n </thy-form-group>\n <thy-form-group-footer>\n <div class=\"btn-pair\">\n <button\n thyButton=\"link-secondary\"\n thySize=\"sm\"\n (click)=\"closePopover()\"\n >\u53D6\u6D88</button>\n <button\n thyButton=\"primary-square\"\n thySize=\"sm\"\n (thyFormSubmit)=\"applyLink(linkForm)\"\n >\u5E94\u7528</button>\n </div>\n </thy-form-group-footer>\n</form>\n", components: [{ type: i2__namespace$1.ThyFormGroupComponent, selector: "thy-form-group", inputs: ["thyLabelText", "thyLabelTextTranslateKey", "thyLabelRequired", "thyLabelPaddingTopClear", "thyFeedbackIcon", "thyTipsMode", "thyTips", "thyTipsTranslateKey", "thyRowFill"] }, { type: i2__namespace$1.ThyFormGroupFooterComponent, selector: "thy-form-group-footer", inputs: ["thyAlign"] }, { type: i1__namespace$5.ThyButtonComponent, selector: "thy-button,[thy-button],[thyButton]", inputs: ["thyButton", "thyType", "thyLoading", "thyLoadingText", "thySize", "thyIcon", "thySquare", "thyBlock"] }], directives: [{ type: i4__namespace$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i4__namespace$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i4__namespace$2.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i2__namespace$1.ThyFormDirective, selector: "[thyForm],[thy-form]", inputs: ["thyLayout", "thyEnterKeyMode", "thyFormValidatorConfig"], exportAs: ["thyForm"] }, { type: i5__namespace$3.ThyAutofocusDirective, selector: "input[thyAutofocus],textarea[thyAutofocus]", inputs: ["thyAutoSelect", "thyAutofocus"] }, { type: i4__namespace$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i5__namespace.ThyInputDirective, selector: "[thyInput]", inputs: ["thySize", "thyAutocomplete"] }, { type: i4__namespace$2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i4__namespace$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4__namespace$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i2__namespace$1.ThyFormSubmitDirective, selector: "[thyFormSubmit],[thy-form-submit]", outputs: ["thyFormSubmit"] }] });
7531
7614
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheLinkEditComponent, decorators: [{
7532
7615
  type: i0.Component,
7533
7616
  args: [{
@@ -7697,17 +7780,21 @@
7697
7780
  var TheLinkComponent = /** @class */ (function (_super) {
7698
7781
  __extends(TheLinkComponent, _super);
7699
7782
  function TheLinkComponent() {
7700
- return _super !== null && _super.apply(this, arguments) || this;
7783
+ var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
7784
+ // Put this at the start and end of an inline component to work around this Chromium bug:
7785
+ // https://bugs.chromium.org/p/chromium/issues/detail?id=1249405
7786
+ _this.inlineChromiumBugfix = '$' + String.fromCodePoint(160);
7787
+ return _this;
7701
7788
  }
7702
7789
  return TheLinkComponent;
7703
7790
  }(TheBaseLinkComponent));
7704
7791
  TheLinkComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheLinkComponent, deps: null, target: i0__namespace.ɵɵFactoryTarget.Component });
7705
- TheLinkComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheLinkComponent, selector: "span[theLink]", usesInheritance: true, ngImport: i0__namespace, template: "<slate-children [children]=\"children\" [context]=\"childrenContext\" [viewContext]=\"viewContext\"></slate-children>", isInline: true, components: [{ type: i1__namespace.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }] });
7792
+ TheLinkComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheLinkComponent, selector: "span[theLink]", usesInheritance: true, ngImport: i0__namespace, template: " <span contenteditable=\"false\" style=\"font-size: 0;\">{{ inlineChromiumBugfix }}</span>\n <slate-children [children]=\"children\" [context]=\"childrenContext\" [viewContext]=\"viewContext\"></slate-children>\n <span contenteditable=\"false\" style=\"font-size: 0;\">{{ inlineChromiumBugfix }}</span>", isInline: true, components: [{ type: i1__namespace.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }] });
7706
7793
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheLinkComponent, decorators: [{
7707
7794
  type: i0.Component,
7708
7795
  args: [{
7709
7796
  selector: 'span[theLink]',
7710
- template: "<slate-children [children]=\"children\" [context]=\"childrenContext\" [viewContext]=\"viewContext\"></slate-children>"
7797
+ template: " <span contenteditable=\"false\" style=\"font-size: 0;\">{{ inlineChromiumBugfix }}</span>\n <slate-children [children]=\"children\" [context]=\"childrenContext\" [viewContext]=\"viewContext\"></slate-children>\n <span contenteditable=\"false\" style=\"font-size: 0;\">{{ inlineChromiumBugfix }}</span>"
7711
7798
  }]
7712
7799
  }] });
7713
7800
  var TheReadonlyLinkComponent = /** @class */ (function (_super) {
@@ -11689,35 +11776,6 @@
11689
11776
  }
11690
11777
  ];
11691
11778
 
11692
- /**
11693
- * whether the current node is a clean paragraph
11694
- * @param editor
11695
- * @param text
11696
- * @returns boolean
11697
- */
11698
- var isCleanEmptyParagraph = function (editor) {
11699
- var isCollapsedCursor = TheEditor.isFocused(editor) && editor.selection && slate.Range.isCollapsed(editor.selection);
11700
- if (!isCollapsedCursor) {
11701
- return false;
11702
- }
11703
- var block = slate.Node.ancestor(editor, [editor.selection.anchor.path[0]]);
11704
- var textIndent = 'textIndent';
11705
- var align = 'align';
11706
- var hasTextIndent = block[textIndent];
11707
- var hasAlign = block[align];
11708
- if (slate.Node.string(block) === '' &&
11709
- slate.Element.isElement(block) &&
11710
- block.type === exports.ElementKinds.paragraph &&
11711
- block.children.length === 1 &&
11712
- slate.Text.isText(block.children[0]) &&
11713
- !slate.Editor.isVoid(editor, block) &&
11714
- !hasTextIndent &&
11715
- !hasAlign) {
11716
- return true;
11717
- }
11718
- return false;
11719
- };
11720
-
11721
11779
  var TheToolbarItemComponent = /** @class */ (function (_super) {
11722
11780
  __extends(TheToolbarItemComponent, _super);
11723
11781
  function TheToolbarItemComponent(ngZone, cfr) {
@@ -12079,32 +12137,27 @@
12079
12137
 
12080
12138
  var TheInlineCodeComponent = /** @class */ (function (_super) {
12081
12139
  __extends(TheInlineCodeComponent, _super);
12082
- function TheInlineCodeComponent(elementRef, cdr) {
12083
- var _this = _super.call(this, elementRef, cdr) || this;
12084
- _this.elementRef = elementRef;
12085
- _this.cdr = cdr;
12140
+ function TheInlineCodeComponent() {
12141
+ var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
12142
+ // Put this at the start and end of an inline component to work around this Chromium bug:
12143
+ // https://bugs.chromium.org/p/chromium/issues/detail?id=1249405
12144
+ _this.inlineChromiumBugfix = '$' + String.fromCodePoint(160);
12086
12145
  return _this;
12087
12146
  }
12088
- TheInlineCodeComponent.prototype.ngOnInit = function () {
12089
- _super.prototype.ngOnInit.call(this);
12090
- };
12091
- TheInlineCodeComponent.prototype.ngOnDestroy = function () {
12092
- _super.prototype.ngOnDestroy.call(this);
12093
- };
12094
12147
  return TheInlineCodeComponent;
12095
12148
  }(TheBaseElementComponent));
12096
- TheInlineCodeComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheInlineCodeComponent, deps: [{ token: i0__namespace.ElementRef }, { token: i0__namespace.ChangeDetectorRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
12097
- TheInlineCodeComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheInlineCodeComponent, selector: "span[theInlineCode]", usesInheritance: true, ngImport: i0__namespace, template: '<slate-children [children]="children" [context]="childrenContext" [viewContext]="viewContext"></slate-children>', isInline: true, components: [{ type: i1__namespace.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }] });
12149
+ TheInlineCodeComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheInlineCodeComponent, deps: null, target: i0__namespace.ɵɵFactoryTarget.Component });
12150
+ TheInlineCodeComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheInlineCodeComponent, selector: "span[theInlineCode]", usesInheritance: true, ngImport: i0__namespace, template: " <span contenteditable=\"false\" style=\"font-size: 0;\">{{ inlineChromiumBugfix }}</span>\n <slate-children [children]=\"children\" [context]=\"childrenContext\" [viewContext]=\"viewContext\"></slate-children>\n <span contenteditable=\"false\" style=\"font-size: 0;\">{{ inlineChromiumBugfix }}</span>", isInline: true, components: [{ type: i1__namespace.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }] });
12098
12151
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheInlineCodeComponent, decorators: [{
12099
12152
  type: i0.Component,
12100
12153
  args: [{
12101
12154
  selector: 'span[theInlineCode]',
12102
- template: '<slate-children [children]="children" [context]="childrenContext" [viewContext]="viewContext"></slate-children>'
12155
+ template: " <span contenteditable=\"false\" style=\"font-size: 0;\">{{ inlineChromiumBugfix }}</span>\n <slate-children [children]=\"children\" [context]=\"childrenContext\" [viewContext]=\"viewContext\"></slate-children>\n <span contenteditable=\"false\" style=\"font-size: 0;\">{{ inlineChromiumBugfix }}</span>"
12103
12156
  }]
12104
- }], ctorParameters: function () { return [{ type: i0__namespace.ElementRef }, { type: i0__namespace.ChangeDetectorRef }]; } });
12157
+ }] });
12105
12158
 
12106
12159
  var withInlineCode = function (editor) {
12107
- var isInline = editor.isInline, renderElement = editor.renderElement, insertText = editor.insertText;
12160
+ var isInline = editor.isInline, renderElement = editor.renderElement, insertText = editor.insertText, onKeydown = editor.onKeydown;
12108
12161
  editor.isInline = function (element) {
12109
12162
  return element.type === exports.ElementKinds.inlineCode ? true : isInline(element);
12110
12163
  };
@@ -12353,9 +12406,9 @@
12353
12406
  }
12354
12407
  };
12355
12408
  TheToolbarComponent.prototype.setToolbarClass = function () {
12356
- var _b;
12409
+ var _d;
12357
12410
  if (this.editor && !!this.containerClass.length) {
12358
- (_b = this.elementRef.nativeElement.classList).add.apply(_b, __spreadArray([], __read(this.containerClass)));
12411
+ (_d = this.elementRef.nativeElement.classList).add.apply(_d, __spreadArray([], __read(this.containerClass)));
12359
12412
  }
12360
12413
  };
12361
12414
  TheToolbarComponent.prototype.resizeElement = function () {
@@ -12363,7 +12416,7 @@
12363
12416
  var editableElement = this.elementRef.nativeElement;
12364
12417
  // @ts-ignore
12365
12418
  this.resizeObserver = new ResizeObserver(function (entries) {
12366
- var e_1, _b;
12419
+ var e_1, _d;
12367
12420
  try {
12368
12421
  for (var entries_1 = __values(entries), entries_1_1 = entries_1.next(); !entries_1_1.done; entries_1_1 = entries_1.next()) {
12369
12422
  var entry = entries_1_1.value;
@@ -12377,7 +12430,7 @@
12377
12430
  catch (e_1_1) { e_1 = { error: e_1_1 }; }
12378
12431
  finally {
12379
12432
  try {
12380
- if (entries_1_1 && !entries_1_1.done && (_b = entries_1.return)) _b.call(entries_1);
12433
+ if (entries_1_1 && !entries_1_1.done && (_d = entries_1.return)) _d.call(entries_1);
12381
12434
  }
12382
12435
  finally { if (e_1) throw e_1.error; }
12383
12436
  }
@@ -12385,7 +12438,7 @@
12385
12438
  this.resizeObserver.observe(editableElement);
12386
12439
  };
12387
12440
  TheToolbarComponent.prototype.statusChange = function (editor) {
12388
- var e_2, _b;
12441
+ var e_2, _d;
12389
12442
  var toolbarItems = __spreadArray(__spreadArray([], __read(this.toolbarItems)), [this.moreGroupMenu]);
12390
12443
  try {
12391
12444
  for (var toolbarItems_1 = __values(toolbarItems), toolbarItems_1_1 = toolbarItems_1.next(); !toolbarItems_1_1.done; toolbarItems_1_1 = toolbarItems_1.next()) {
@@ -12401,7 +12454,7 @@
12401
12454
  catch (e_2_1) { e_2 = { error: e_2_1 }; }
12402
12455
  finally {
12403
12456
  try {
12404
- if (toolbarItems_1_1 && !toolbarItems_1_1.done && (_b = toolbarItems_1.return)) _b.call(toolbarItems_1);
12457
+ if (toolbarItems_1_1 && !toolbarItems_1_1.done && (_d = toolbarItems_1.return)) _d.call(toolbarItems_1);
12405
12458
  }
12406
12459
  finally { if (e_2) throw e_2.error; }
12407
12460
  }
@@ -12413,7 +12466,7 @@
12413
12466
  var toolbarItems = this.toolbarItemsCompose();
12414
12467
  var items = toolbarItems.items, group = toolbarItems.group;
12415
12468
  this.ngZone.run(function () {
12416
- var e_3, _b;
12469
+ var e_3, _d;
12417
12470
  try {
12418
12471
  for (var items_1 = __values(items), items_1_1 = items_1.next(); !items_1_1.done; items_1_1 = items_1.next()) {
12419
12472
  var item = items_1_1.value;
@@ -12427,7 +12480,7 @@
12427
12480
  catch (e_3_1) { e_3 = { error: e_3_1 }; }
12428
12481
  finally {
12429
12482
  try {
12430
- if (items_1_1 && !items_1_1.done && (_b = items_1.return)) _b.call(items_1);
12483
+ if (items_1_1 && !items_1_1.done && (_d = items_1.return)) _d.call(items_1);
12431
12484
  }
12432
12485
  finally { if (e_3) throw e_3.error; }
12433
12486
  }
@@ -12450,7 +12503,7 @@
12450
12503
  * set aside 50px
12451
12504
  */
12452
12505
  TheToolbarComponent.prototype.toolbarItemsCompose = function () {
12453
- var e_4, _b;
12506
+ var e_4, _d;
12454
12507
  var elementWidth = this.isMore ? this.elementWidth : null;
12455
12508
  var maxItemWidth = 50;
12456
12509
  var defaultItemWidth = 35;
@@ -12460,8 +12513,8 @@
12460
12513
  var items = [];
12461
12514
  var group = [];
12462
12515
  try {
12463
- for (var _c = __values(this.toolbarItems), _d = _c.next(); !_d.done; _d = _c.next()) {
12464
- var item = _d.value;
12516
+ for (var _e = __values(this.toolbarItems), _f = _e.next(); !_f.done; _f = _e.next()) {
12517
+ var item = _f.value;
12465
12518
  if (!this.isMore) {
12466
12519
  items.push(item);
12467
12520
  continue;
@@ -12490,7 +12543,7 @@
12490
12543
  catch (e_4_1) { e_4 = { error: e_4_1 }; }
12491
12544
  finally {
12492
12545
  try {
12493
- if (_d && !_d.done && (_b = _c.return)) _b.call(_c);
12546
+ if (_f && !_f.done && (_d = _e.return)) _d.call(_e);
12494
12547
  }
12495
12548
  finally { if (e_4) throw e_4.error; }
12496
12549
  }
@@ -12503,12 +12556,12 @@
12503
12556
  * externally designated more group
12504
12557
  */
12505
12558
  TheToolbarComponent.prototype.toolbarItemsAndMoreCompose = function () {
12506
- var e_5, _b;
12559
+ var e_5, _d;
12507
12560
  var items = [];
12508
12561
  var group = [];
12509
12562
  try {
12510
- for (var _c = __values(this.toolbarItems), _d = _c.next(); !_d.done; _d = _c.next()) {
12511
- var item = _d.value;
12563
+ for (var _e = __values(this.toolbarItems), _f = _e.next(); !_f.done; _f = _e.next()) {
12564
+ var item = _f.value;
12512
12565
  if (item.key === exports.ToolbarActionTypes.split) {
12513
12566
  items.push(item);
12514
12567
  continue;
@@ -12519,7 +12572,7 @@
12519
12572
  catch (e_5_1) { e_5 = { error: e_5_1 }; }
12520
12573
  finally {
12521
12574
  try {
12522
- if (_d && !_d.done && (_b = _c.return)) _b.call(_c);
12575
+ if (_f && !_f.done && (_d = _e.return)) _d.call(_e);
12523
12576
  }
12524
12577
  finally { if (e_5) throw e_5.error; }
12525
12578
  }
@@ -12582,15 +12635,15 @@
12582
12635
  return TheToolbarItemComponent;
12583
12636
  };
12584
12637
  TheToolbarComponent.prototype.getDropdownItem = function (item) {
12585
- var _a;
12638
+ var _a, _b, _c;
12586
12639
  var dropdownKey = item === null || item === void 0 ? void 0 : item.dropdownItemKey;
12587
12640
  // modify the fontsize option externally
12588
- var contextService = this.editor.injector.get(TheContextService);
12589
- var fontSize = contextService.getDefaultFontSize();
12590
- if (item.key === exports.MarkTypes.fontSize && fontSize) {
12641
+ var contextService = (_b = (_a = this.editor) === null || _a === void 0 ? void 0 : _a.injector) === null || _b === void 0 ? void 0 : _b.get(TheContextService);
12642
+ var fontSize = contextService === null || contextService === void 0 ? void 0 : contextService.getDefaultFontSize();
12643
+ if (contextService && item.key === exports.MarkTypes.fontSize && fontSize) {
12591
12644
  dropdownKey = fontSize;
12592
12645
  }
12593
- return (_a = item === null || item === void 0 ? void 0 : item.includes) === null || _a === void 0 ? void 0 : _a.find(function (item) { return item.key === dropdownKey; });
12646
+ return (_c = item === null || item === void 0 ? void 0 : item.includes) === null || _c === void 0 ? void 0 : _c.find(function (item) { return item.key === dropdownKey; });
12594
12647
  };
12595
12648
  return TheToolbarComponent;
12596
12649
  }());
@@ -12761,6 +12814,7 @@
12761
12814
  this.renderer = renderer;
12762
12815
  this.elementRef = elementRef;
12763
12816
  this.cdr = cdr;
12817
+ this.isVisible = false;
12764
12818
  this.isHide = true;
12765
12819
  this.defaultIconName = 'plus-circle-thin';
12766
12820
  this.iconNameFill = 'plus-circle-thin-fill';
@@ -12771,19 +12825,21 @@
12771
12825
  event.stopPropagation();
12772
12826
  };
12773
12827
  TheQuickInsertComponent.prototype.checkStatus = function () {
12774
- var _this = this;
12828
+ var _a;
12775
12829
  var editor = this.editor;
12776
- if (isCleanEmptyParagraph(editor)) {
12777
- setTimeout(function () {
12778
- var _a;
12779
- 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]]);
12780
- var rootNode = i1.AngularEditor.toDOMNode(editor, block);
12781
- _this.updatePosition(rootNode.offsetLeft, rootNode.offsetTop);
12782
- });
12830
+ if (this.isVisible && isCleanEmptyParagraph(editor) && !this.hasExcludeAttribute()) {
12831
+ 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]]);
12832
+ var rootNode = i1.AngularEditor.toDOMNode(editor, block);
12833
+ this.updatePosition(rootNode.offsetLeft, rootNode.offsetTop);
12783
12834
  return;
12784
12835
  }
12785
12836
  this.isHide = true;
12786
12837
  };
12838
+ TheQuickInsertComponent.prototype.hasExcludeAttribute = function () {
12839
+ var marks = getSelectionMarks(this.editor);
12840
+ var fontSizeMark = marks[exports.MarkTypes.fontSize];
12841
+ return fontSizeMark;
12842
+ };
12787
12843
  TheQuickInsertComponent.prototype.updatePosition = function (left, top) {
12788
12844
  this.isHide = false;
12789
12845
  this.renderer.setStyle(this.elementRef.nativeElement, 'top', top + "px");
@@ -12805,7 +12861,7 @@
12805
12861
  return TheQuickInsertComponent;
12806
12862
  }());
12807
12863
  TheQuickInsertComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheQuickInsertComponent, deps: [{ token: i0__namespace.Renderer2 }, { token: i0__namespace.ElementRef }, { token: i0__namespace.ChangeDetectorRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
12808
- TheQuickInsertComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheQuickInsertComponent, selector: "[theQuickInsert]", inputs: { editor: "editor", quickToolbarItems: "quickToolbarItems" }, host: { listeners: { "mousedown": "handleMousedownNativeElement($event)" }, properties: { "class.hide": "isHide" }, classAttribute: "the-quick-insert" }, viewQueries: [{ propertyName: "iconElement", first: true, predicate: ["iconElement"], descendants: true, read: i0.ElementRef }], ngImport: i0__namespace, template: "<thy-icon\n #iconElement\n [thyIconName]=\"displayIconName\"\n class=\"quick-insert-icon text-desc font-size-xlg\"\n (mouseenter)=\"mouseEnter($event)\"\n (mouseleave)=\"mouseLeave($event)\"\n (mousedown)=\"handleClick($event)\"\n></thy-icon>\n", components: [{ type: i4__namespace$1.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }] });
12864
+ TheQuickInsertComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheQuickInsertComponent, selector: "[theQuickInsert]", inputs: { editor: "editor", quickToolbarItems: "quickToolbarItems", isVisible: "isVisible" }, host: { listeners: { "mousedown": "handleMousedownNativeElement($event)" }, properties: { "class.hide": "isHide" }, classAttribute: "the-quick-insert" }, viewQueries: [{ propertyName: "iconElement", first: true, predicate: ["iconElement"], descendants: true, read: i0.ElementRef }], ngImport: i0__namespace, template: "<thy-icon\n #iconElement\n [thyIconName]=\"displayIconName\"\n class=\"quick-insert-icon text-desc font-size-xlg\"\n (mouseenter)=\"mouseEnter($event)\"\n (mouseleave)=\"mouseLeave($event)\"\n (mousedown)=\"handleClick($event)\"\n></thy-icon>\n", components: [{ type: i4__namespace$1.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }] });
12809
12865
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheQuickInsertComponent, decorators: [{
12810
12866
  type: i0.Component,
12811
12867
  args: [{
@@ -12820,6 +12876,8 @@
12820
12876
  type: i0.Input
12821
12877
  }], quickToolbarItems: [{
12822
12878
  type: i0.Input
12879
+ }], isVisible: [{
12880
+ type: i0.Input
12823
12881
  }], iconElement: [{
12824
12882
  type: i0.ViewChild,
12825
12883
  args: ['iconElement', { read: i0.ElementRef, static: false }]
@@ -12828,84 +12886,6 @@
12828
12886
  args: ['mousedown', ['$event']]
12829
12887
  }] } });
12830
12888
 
12831
- var ThePlaceholderComponent = /** @class */ (function () {
12832
- function ThePlaceholderComponent(renderer, elementRef, contextService) {
12833
- this.renderer = renderer;
12834
- this.elementRef = elementRef;
12835
- this.contextService = contextService;
12836
- this.isHide = true;
12837
- }
12838
- ThePlaceholderComponent.prototype.handleCompositionStart = function () {
12839
- var _a;
12840
- if ((_a = this.editor) === null || _a === void 0 ? void 0 : _a.selection) {
12841
- this.hide();
12842
- }
12843
- };
12844
- ThePlaceholderComponent.prototype.handleCompositionEnd = function (event) {
12845
- if (!event.data) {
12846
- this.checkStatus();
12847
- }
12848
- };
12849
- ThePlaceholderComponent.prototype.checkStatus = function () {
12850
- var _this = this;
12851
- var _a, _b, _c;
12852
- var editor = this.editor;
12853
- var isEmptyShow = typeof ((_a = this.options) === null || _a === void 0 ? void 0 : _a.isEmptyShowPlaceholder) === 'undefined' ? true : this.options.isEmptyShowPlaceholder;
12854
- var isMustShow = (_b = this.options) === null || _b === void 0 ? void 0 : _b.isMustShowPlaceholder;
12855
- var isReadonly = (_c = this.options) === null || _c === void 0 ? void 0 : _c.readonly;
12856
- // empty content and no selection processing
12857
- if (!isReadonly && isEmptyShow && isEmptyContent(editor.children)) {
12858
- var firstElementChild = this.contextService.getFirstElementChild();
12859
- var offsetTop = firstElementChild.offsetTop;
12860
- var offsetLeft = firstElementChild.offsetLeft;
12861
- this.updatePosition(offsetLeft, offsetTop);
12862
- return;
12863
- }
12864
- if (isMustShow && isCleanEmptyParagraph(editor)) {
12865
- setTimeout(function () {
12866
- var _a;
12867
- 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]]);
12868
- var rootNode = i1.AngularEditor.toDOMNode(editor, block);
12869
- _this.updatePosition(rootNode.offsetLeft, rootNode.offsetTop);
12870
- });
12871
- return;
12872
- }
12873
- this.isHide = true;
12874
- };
12875
- ThePlaceholderComponent.prototype.updatePosition = function (left, top) {
12876
- this.isHide = false;
12877
- this.renderer.setStyle(this.elementRef.nativeElement, 'top', top + "px");
12878
- this.renderer.setStyle(this.elementRef.nativeElement, 'left', left + "px");
12879
- };
12880
- ThePlaceholderComponent.prototype.hide = function () {
12881
- this.isHide = true;
12882
- };
12883
- return ThePlaceholderComponent;
12884
- }());
12885
- 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 });
12886
- 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 });
12887
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: ThePlaceholderComponent, decorators: [{
12888
- type: i0.Component,
12889
- args: [{
12890
- selector: 'div[thePlaceholder]',
12891
- template: "{{ options?.placeholder }}",
12892
- host: {
12893
- class: 'the-placeholder',
12894
- '[class.hide]': 'isHide'
12895
- }
12896
- }]
12897
- }], ctorParameters: function () { return [{ type: i0__namespace.Renderer2 }, { type: i0__namespace.ElementRef }, { type: TheContextService }]; }, propDecorators: { editor: [{
12898
- type: i0.Input
12899
- }], options: [{
12900
- type: i0.Input
12901
- }], handleCompositionStart: [{
12902
- type: i0.HostListener,
12903
- args: ['document:compositionstart']
12904
- }], handleCompositionEnd: [{
12905
- type: i0.HostListener,
12906
- args: ['document:compositionend', ['$event']]
12907
- }] } });
12908
-
12909
12889
  var TheTemplateComponent = /** @class */ (function () {
12910
12890
  function TheTemplateComponent() {
12911
12891
  var _this = this;
@@ -12970,13 +12950,14 @@
12970
12950
 
12971
12951
  var TheEditorComponent = /** @class */ (function (_super) {
12972
12952
  __extends(TheEditorComponent, _super);
12973
- function TheEditorComponent(toolbarService, theContextService, viewContainerRef, elementRef, ngZone) {
12953
+ function TheEditorComponent(toolbarService, theContextService, viewContainerRef, elementRef, ngZone, cdr) {
12974
12954
  var _this = _super.call(this) || this;
12975
12955
  _this.toolbarService = toolbarService;
12976
12956
  _this.theContextService = theContextService;
12977
12957
  _this.viewContainerRef = viewContainerRef;
12978
12958
  _this.elementRef = elementRef;
12979
12959
  _this.ngZone = ngZone;
12960
+ _this.cdr = cdr;
12980
12961
  _this.thePlugins = [];
12981
12962
  _this.theOnSave = new i0.EventEmitter();
12982
12963
  _this.theOnDOMEvent = new i0.EventEmitter();
@@ -13141,9 +13122,7 @@
13141
13122
  });
13142
13123
  this.toolbarCalculate();
13143
13124
  setTimeout(function () {
13144
- var _a;
13145
13125
  _this.theEditorCreated.emit(_this.editor);
13146
- (_a = _this.placeholderInstance) === null || _a === void 0 ? void 0 : _a.checkStatus();
13147
13126
  _this.applyAutoFocus();
13148
13127
  });
13149
13128
  };
@@ -13185,6 +13164,7 @@
13185
13164
  var data = dataDeserialize((_a = this.theOptions) === null || _a === void 0 ? void 0 : _a.mode, value);
13186
13165
  // data-deserialize
13187
13166
  this.editorValue = data;
13167
+ this.cdr.markForCheck();
13188
13168
  };
13189
13169
  TheEditorComponent.prototype.registerOnChange = function (fn) {
13190
13170
  this.onChangeCallback = fn;
@@ -13194,13 +13174,16 @@
13194
13174
  };
13195
13175
  TheEditorComponent.prototype.valueChange = function (value) {
13196
13176
  var _a, _b, _c, _d, _e, _f;
13197
- (_a = this.theGlobalToolbarInstance) === null || _a === void 0 ? void 0 : _a.statusChange(this.editor);
13198
- (_b = this.quickInsertInstance) === null || _b === void 0 ? void 0 : _b.checkStatus();
13199
- (_c = this.placeholderInstance) === null || _c === void 0 ? void 0 : _c.checkStatus();
13177
+ var isEditable = !((_a = this.theOptions) === null || _a === void 0 ? void 0 : _a.readonly) && !((_b = this.theOptions) === null || _b === void 0 ? void 0 : _b.disabled);
13178
+ (_c = this.theGlobalToolbarInstance) === null || _c === void 0 ? void 0 : _c.statusChange(this.editor);
13179
+ // quick insert button
13180
+ if (isEditable) {
13181
+ (_d = this.quickInsertInstance) === null || _d === void 0 ? void 0 : _d.checkStatus();
13182
+ }
13200
13183
  // auto scroll view
13201
- var scrollContainer = (_d = this.theOptions) === null || _d === void 0 ? void 0 : _d.scrollContainer;
13202
- var maxHeight = (_e = this.theOptions) === null || _e === void 0 ? void 0 : _e.maxHeight;
13203
- if (!((_f = this.theOptions) === null || _f === void 0 ? void 0 : _f.readonly) && (scrollContainer || maxHeight)) {
13184
+ var scrollContainer = (_e = this.theOptions) === null || _e === void 0 ? void 0 : _e.scrollContainer;
13185
+ var maxHeight = (_f = this.theOptions) === null || _f === void 0 ? void 0 : _f.maxHeight;
13186
+ if (isEditable && (scrollContainer || maxHeight)) {
13204
13187
  var container = maxHeight ? DEFAULT_SCROLL_CONTAINER : scrollContainer;
13205
13188
  this.autoScrollView(this.editor, container);
13206
13189
  }
@@ -13320,7 +13303,7 @@
13320
13303
  };
13321
13304
  return TheEditorComponent;
13322
13305
  }(core.mixinUnsubscribe(core.MixinBase)));
13323
- TheEditorComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheEditorComponent, deps: [{ token: TheToolbarService }, { token: TheContextService }, { token: i0__namespace.ViewContainerRef }, { token: i0__namespace.ElementRef }, { token: i0__namespace.NgZone }], target: i0__namespace.ɵɵFactoryTarget.Component });
13306
+ TheEditorComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheEditorComponent, deps: [{ token: TheToolbarService }, { token: TheContextService }, { token: i0__namespace.ViewContainerRef }, { token: i0__namespace.ElementRef }, { token: i0__namespace.NgZone }, { token: i0__namespace.ChangeDetectorRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
13324
13307
  TheEditorComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheEditorComponent, selector: "the-editor, theEditor", inputs: { theOptions: "theOptions", thePlugins: "thePlugins", theGlobalToolbar: "theGlobalToolbar", theDecorate: "theDecorate", theOnError: "theOnError" }, outputs: { theOnSave: "theOnSave", theOnDOMEvent: "theOnDOMEvent", theEditorCreated: "theEditorCreated" }, host: { properties: { "class.the-editor-readonly": "theOptions?.readonly" }, classAttribute: "the-editor" }, providers: [
13325
13308
  TheToolbarService,
13326
13309
  TheContextService,
@@ -13330,7 +13313,7 @@
13330
13313
  useExisting: i0.forwardRef(function () { return TheEditorComponent; }),
13331
13314
  multi: true
13332
13315
  }
13333
- ], viewQueries: [{ propertyName: "templateInstance", first: true, predicate: ["templateInstance"], descendants: true, static: true }, { propertyName: "globalToolbarInstance", first: true, predicate: ["globalToolbar"], descendants: true }, { propertyName: "quickInsertInstance", first: true, predicate: ["quickInsert"], descendants: true, static: true }, { propertyName: "placeholderInstance", first: true, predicate: ["placeholder"], descendants: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0__namespace, template: "<the-toolbar\n *ngIf=\"!theOptions?.readonly && !theGlobalToolbar\"\n [ngClass]=\"{\n 'the-toolbar-disabled': theOptions?.disabled\n }\"\n #globalToolbar\n [editor]=\"editor\"\n [toolbarItems]=\"toolbarEntity.global\"\n [containerClass]=\"globalToolbarClass\"\n [align]=\"theOptions?.toolbar?.align\"\n></the-toolbar>\n\n<div\n class=\"the-editable-container\"\n [ngClass]=\"{\n 'the-editor-disabled': theOptions?.disabled,\n 'max-height': maxHeight\n }\"\n [ngStyle]=\"{ 'max-height': maxHeight }\"\n>\n <slate-editable\n class=\"the-editor-typo\"\n [editor]=\"editor\"\n [ngModel]=\"editorValue\"\n (ngModelChange)=\"valueChange($event)\"\n [decorate]=\"decorate\"\n [renderElement]=\"renderElement\"\n [renderText]=\"renderText\"\n [renderLeaf]=\"renderLeaf\"\n [readonly]=\"theOptions?.readonly || theOptions?.disabled\"\n [keydown]=\"onKeyDown\"\n [click]=\"onClick\"\n [paste]=\"onSlaPaste\"\n [beforeInput]=\"onSlaBeforeInput\"\n [blur]=\"onSlaBlur\"\n [focus]=\"onSlaFocus\"\n [copy]=\"onSlaCopy\"\n [cut]=\"onSlaCut\"\n [isStrictDecorate]=\"false\"\n [compositionStart]=\"onSlaCompositionStart\"\n [compositionEnd]=\"onSlaCompositionEnd\"\n [dragStart]=\"onSlaDragStart\"\n [dragOver]=\"onSlaDragOver\"\n [drop]=\"onDrop\"\n (mousedown)=\"mousedown($event)\"\n ></slate-editable>\n <the-inline-toolbar *ngIf=\"!theOptions?.readonly\" [editor]=\"editor\" [toolbarItems]=\"toolbarEntity.inline\"></the-inline-toolbar>\n <div #quickInsert theQuickInsert [editor]=\"editor\" [quickToolbarItems]=\"quickToolbarItems\"></div>\n <div #placeholder thePlaceholder [editor]=\"editor\" [options]=\"theOptions\"></div>\n <the-template #templateInstance></the-template>\n</div>\n", components: [{ type: TheToolbarComponent, selector: "the-toolbar", inputs: ["editor", "toolbarItems", "align", "containerClass", "isMore", "afterTemplate"] }, { type: i1__namespace.SlateEditableComponent, selector: "slate-editable", inputs: ["editor", "renderElement", "renderLeaf", "renderText", "decorate", "placeholderDecorate", "isStrictDecorate", "trackBy", "readonly", "placeholder", "beforeInput", "blur", "click", "compositionEnd", "compositionStart", "copy", "cut", "dragOver", "dragStart", "dragEnd", "drop", "focus", "keydown", "paste", "spellCheck", "autoCorrect", "autoCapitalize"] }, { type: TheInlineToolbarComponent, selector: "the-inline-toolbar", inputs: ["editor", "toolbarItems"] }, { type: TheQuickInsertComponent, selector: "[theQuickInsert]", inputs: ["editor", "quickToolbarItems"] }, { type: ThePlaceholderComponent, selector: "div[thePlaceholder]", inputs: ["editor", "options"] }, { type: TheTemplateComponent, selector: "the-template,[theTemplate]" }], directives: [{ type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i6__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i4__namespace$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4__namespace$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
13316
+ ], 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 }], 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 [placeholder]=\"theOptions?.placeholder\"\n [placeholderDecorate]=\"theOptions?.placeholderDecorate ? theOptions?.placeholderDecorate : null\"\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\n #quickInsert\n theQuickInsert\n [editor]=\"editor\"\n [quickToolbarItems]=\"quickToolbarItems\"\n [isVisible]=\"theOptions?.quickInsertVisible\"\n ></div>\n <the-template #templateInstance></the-template>\n</div>\n", components: [{ type: TheToolbarComponent, selector: "the-toolbar", inputs: ["editor", "toolbarItems", "align", "containerClass", "isMore", "afterTemplate"] }, { type: i1__namespace.SlateEditableComponent, selector: "slate-editable", inputs: ["editor", "renderElement", "renderLeaf", "renderText", "decorate", "placeholderDecorate", "isStrictDecorate", "trackBy", "readonly", "placeholder", "beforeInput", "blur", "click", "compositionEnd", "compositionStart", "copy", "cut", "dragOver", "dragStart", "dragEnd", "drop", "focus", "keydown", "paste", "spellCheck", "autoCorrect", "autoCapitalize"] }, { type: TheInlineToolbarComponent, selector: "the-inline-toolbar", inputs: ["editor", "toolbarItems"] }, { type: TheQuickInsertComponent, selector: "[theQuickInsert]", inputs: ["editor", "quickToolbarItems", "isVisible"] }, { 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"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
13334
13317
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheEditorComponent, decorators: [{
13335
13318
  type: i0.Component,
13336
13319
  args: [{
@@ -13352,7 +13335,7 @@
13352
13335
  '[class.the-editor-readonly]': 'theOptions?.readonly'
13353
13336
  }
13354
13337
  }]
13355
- }], ctorParameters: function () { return [{ type: TheToolbarService }, { type: TheContextService }, { type: i0__namespace.ViewContainerRef }, { type: i0__namespace.ElementRef }, { type: i0__namespace.NgZone }]; }, propDecorators: { theOptions: [{
13338
+ }], ctorParameters: function () { return [{ type: TheToolbarService }, { type: TheContextService }, { type: i0__namespace.ViewContainerRef }, { type: i0__namespace.ElementRef }, { type: i0__namespace.NgZone }, { type: i0__namespace.ChangeDetectorRef }]; }, propDecorators: { theOptions: [{
13356
13339
  type: i0.Input
13357
13340
  }], thePlugins: [{
13358
13341
  type: i0.Input
@@ -13377,9 +13360,6 @@
13377
13360
  }], quickInsertInstance: [{
13378
13361
  type: i0.ViewChild,
13379
13362
  args: ['quickInsert', { static: true }]
13380
- }], placeholderInstance: [{
13381
- type: i0.ViewChild,
13382
- args: ['placeholder']
13383
13363
  }] } });
13384
13364
 
13385
13365
  var ENTRY_COMMON_COMPONENTS = [TheColumnResizeOverlayHandleComponent];
@@ -13594,7 +13574,6 @@
13594
13574
  TheTableComponent,
13595
13575
  TheTableRowComponent,
13596
13576
  TheTdComponent,
13597
- ThePlaceholderComponent,
13598
13577
  TheInlineCodeComponent
13599
13578
  ];
13600
13579
  var PIPES = [ElementStylePipe, ElementClassPipe];
@@ -13638,7 +13617,6 @@
13638
13617
  TheTableComponent,
13639
13618
  TheTableRowComponent,
13640
13619
  TheTdComponent,
13641
- ThePlaceholderComponent,
13642
13620
  TheInlineCodeComponent], imports: [i6.CommonModule, i1.SlateModule, i4$2.FormsModule, i4$1.ThyIconModule,
13643
13621
  avatar.ThyAvatarModule,
13644
13622
  i3.ThyNavModule,
@@ -13764,6 +13742,7 @@
13764
13742
  exports.getToolbarClass = getToolbarClass;
13765
13743
  exports.htmlToTheia = htmlToTheia;
13766
13744
  exports.inValidTypes = inValidTypes;
13745
+ exports.isCleanEmptyParagraph = isCleanEmptyParagraph;
13767
13746
  exports.plainToTheia = plainToTheia;
13768
13747
  exports.toolbarCompose = toolbarCompose;
13769
13748
  exports.withTheEditor = withTheEditor;