@worktile/theia 3.0.4 → 3.0.7

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 (42) hide show
  1. package/bundles/worktile-theia.umd.js +46 -24
  2. package/bundles/worktile-theia.umd.js.map +1 -1
  3. package/constants/node-types.d.ts +2 -1
  4. package/esm2015/components/toolbar-dropdown/toolbar-dropdown.component.js +3 -2
  5. package/esm2015/components/toolbar-group/toolbar-group.component.js +2 -1
  6. package/esm2015/constants/node-types.js +3 -2
  7. package/esm2015/core/toolbar-item/base-toolbar-item.js +4 -4
  8. package/esm2015/interfaces/toolbar.js +1 -1
  9. package/esm2015/plugins/align/align.plugin.js +3 -3
  10. package/esm2015/plugins/code/code.component.js +8 -5
  11. package/esm2015/plugins/color/color.plugin.js +3 -3
  12. package/esm2015/plugins/color/toolbar-item.component.js +2 -1
  13. package/esm2015/plugins/common/reset-type.plugin.js +3 -3
  14. package/esm2015/plugins/deserializers/deserialize-md.plugin.js +2 -1
  15. package/esm2015/plugins/font-size/font-size.editor.js +3 -3
  16. package/esm2015/plugins/heading/heading.editor.js +3 -3
  17. package/esm2015/plugins/image/image.component.js +2 -1
  18. package/esm2015/plugins/indent/indent.plugin.js +3 -3
  19. package/esm2015/plugins/inline-code/inline-code.plugin.js +3 -3
  20. package/esm2015/plugins/link/link.component.js +3 -1
  21. package/esm2015/plugins/link/link.plugin.js +3 -3
  22. package/esm2015/plugins/mark/mark.plugin.js +3 -3
  23. package/esm2015/plugins/quick-insert/quick-insert.editor.js +2 -1
  24. package/esm2015/plugins/table/components/toolbar/table-toolbar.component.js +2 -1
  25. package/esm2015/plugins/table/table.service.js +2 -1
  26. package/esm2015/plugins/table/toolbar-item.component.js +2 -1
  27. package/esm2015/plugins/vertical-align/toolbar-item.component.js +2 -1
  28. package/esm2015/queries/get-plugin-by-toolbar.js +13 -0
  29. package/esm2015/queries/get-toolbar-disabled.js +1 -1
  30. package/esm2015/queries/index.js +3 -3
  31. package/esm2015/services/color-select.service.js +2 -1
  32. package/esm2015/services/table-contextmenu.service.js +2 -1
  33. package/fesm2015/worktile-theia.js +45 -24
  34. package/fesm2015/worktile-theia.js.map +1 -1
  35. package/interfaces/toolbar.d.ts +2 -0
  36. package/package.json +1 -1
  37. package/plugins/code/code.component.d.ts +1 -1
  38. package/queries/get-plugin-by-toolbar.d.ts +3 -0
  39. package/queries/get-toolbar-disabled.d.ts +2 -2
  40. package/queries/index.d.ts +2 -2
  41. package/esm2015/queries/get-plugin-key-by-toolbar-key.js +0 -10
  42. package/queries/get-plugin-key-by-toolbar-key.d.ts +0 -3
@@ -510,7 +510,8 @@
510
510
  var CONTAINER_BLOCKS = [exports.ElementKinds.blockquote, exports.ElementKinds.tableCell];
511
511
  var LIST_BLOCK_TYPES = [exports.ElementKinds.numberedList, exports.ElementKinds.bulletedList];
512
512
  var VOID_BLOCK_TYPES = [exports.ElementKinds.image, exports.ElementKinds.hr];
513
- var BLOCK_DELETEBACKWARD_TYPES = [exports.ElementKinds.tableCell];
513
+ var BLOCK_DELETE_BACKWARD_TYPES = [exports.ElementKinds.tableCell];
514
+ var DISABLED_OPERATE_TYPES = [exports.ElementKinds.code, exports.ElementKinds.hr];
514
515
 
515
516
  exports.ErrorCodes = void 0;
516
517
  (function (ErrorCodes) {
@@ -1091,6 +1092,7 @@
1091
1092
  option: option
1092
1093
  },
1093
1094
  origin: origin,
1095
+ minWidth: 0,
1094
1096
  backdropClosable: this.backdropClosable,
1095
1097
  placement: placement || this.placement,
1096
1098
  offset: offset !== null ? offset : this.offset,
@@ -2460,14 +2462,17 @@
2460
2462
  }
2461
2463
  };
2462
2464
 
2463
- var getPluginKeyByToolbarKey = function (editor, toolbarKey) {
2465
+ var getPluginByToolbarItem = function (editor, toolbarItem) {
2466
+ var pluginKey = toolbarItem.pluginKey;
2467
+ if (pluginKey) {
2468
+ return editor.pluginsByKey[pluginKey];
2469
+ }
2464
2470
  for (var key in editor.pluginsByKey) {
2465
2471
  var toolbarItems = editor.pluginsByKey[key].toolbarItems;
2466
- if (toolbarItems && toolbarItems.some(function (item) { return item.key === toolbarKey; })) {
2467
- toolbarKey = key;
2472
+ if (toolbarItems && toolbarItems.some(function (item) { return item.key === toolbarItem.key; })) {
2473
+ return editor.pluginsByKey[key];
2468
2474
  }
2469
2475
  }
2470
- return toolbarKey;
2471
2476
  };
2472
2477
 
2473
2478
  var index$1 = /*#__PURE__*/Object.freeze({
@@ -2528,7 +2533,7 @@
2528
2533
  findDescendant: findDescendant,
2529
2534
  someNode: someNode,
2530
2535
  getToolbarItemDisabled: getToolbarItemDisabled,
2531
- getPluginKeyByToolbarKey: getPluginKeyByToolbarKey
2536
+ getPluginByToolbarItem: getPluginByToolbarItem
2532
2537
  });
2533
2538
 
2534
2539
  var insertElements = function (editor, elements) {
@@ -2880,6 +2885,7 @@
2880
2885
  viewContainerRef: viewContainerRef,
2881
2886
  placement: placement,
2882
2887
  offset: -100,
2888
+ minWidth: 0,
2883
2889
  hasBackdrop: false,
2884
2890
  backdropClosable: false,
2885
2891
  closeOnNavigation: false,
@@ -3064,7 +3070,7 @@
3064
3070
  editor.onKeydown = function (event) {
3065
3071
  var selection = editor.selection;
3066
3072
  if (i1.IS_SAFARI && selection && slate.Range.isCollapsed(selection) && i1.hotkeys.isDeleteBackward(event)) {
3067
- var blockEntry = getAboveByType(editor, BLOCK_DELETEBACKWARD_TYPES);
3073
+ var blockEntry = getAboveByType(editor, BLOCK_DELETE_BACKWARD_TYPES);
3068
3074
  if (blockEntry && blockEntry[0]) {
3069
3075
  var isStart = slate.Editor.isStart(editor, selection.anchor, blockEntry[1]);
3070
3076
  if (isStart) {
@@ -3478,6 +3484,7 @@
3478
3484
  backdropClosable: true,
3479
3485
  hasBackdrop: false,
3480
3486
  offset: 10,
3487
+ minWidth: 0,
3481
3488
  viewContainerRef: this.viewContainerRef,
3482
3489
  scrollStrategy: this.overlay.scrollStrategies.reposition()
3483
3490
  });
@@ -6061,13 +6068,13 @@
6061
6068
  }
6062
6069
  ],
6063
6070
  options: {
6064
- disabledOperateTypes: [exports.ElementKinds.code]
6071
+ disabledOperateTypes: __spreadArray([], __read(DISABLED_OPERATE_TYPES))
6065
6072
  }
6066
6073
  });
6067
6074
 
6068
6075
  var headingOptions = {
6069
6076
  allowParentTypes: [exports.ElementKinds.tableCell, exports.ElementKinds.blockquote],
6070
- disabledOperateTypes: [exports.ElementKinds.image, exports.ElementKinds.code],
6077
+ disabledOperateTypes: __spreadArray([exports.ElementKinds.image], __read(DISABLED_OPERATE_TYPES)),
6071
6078
  cleanupTypes: [exports.ElementKinds.bulletedList, exports.ElementKinds.numberedList, exports.ElementKinds.listItem]
6072
6079
  };
6073
6080
  var HeadingEditor = {
@@ -6314,7 +6321,7 @@
6314
6321
  }
6315
6322
  ],
6316
6323
  options: {
6317
- disabledOperateTypes: [exports.ElementKinds.image, exports.ElementKinds.code]
6324
+ disabledOperateTypes: __spreadArray([exports.ElementKinds.image], __read(DISABLED_OPERATE_TYPES))
6318
6325
  }
6319
6326
  });
6320
6327
 
@@ -7464,15 +7471,15 @@
7464
7471
  }
7465
7472
  };
7466
7473
  TheBaseToolbarItem.prototype.selectionChange = function (editor) {
7467
- var _a, _b, _c, _d, _e, _f;
7474
+ var _a, _b, _c, _d, _e;
7468
7475
  if (editor.selection) {
7469
7476
  this.active = ((_a = this._toolbarItem) === null || _a === void 0 ? void 0 : _a.active) ? (_b = this._toolbarItem) === null || _b === void 0 ? void 0 : _b.active(editor) : false;
7470
7477
  if ((_c = this._toolbarItem) === null || _c === void 0 ? void 0 : _c.disable) {
7471
7478
  this.disabled = ((_d = this._toolbarItem) === null || _d === void 0 ? void 0 : _d.disable) ? (_e = this._toolbarItem) === null || _e === void 0 ? void 0 : _e.disable(editor) : false;
7472
7479
  }
7473
7480
  else {
7474
- var pluginKey = getPluginKeyByToolbarKey(editor, (_f = this._toolbarItem) === null || _f === void 0 ? void 0 : _f.key);
7475
- this.disabled = pluginKey && getToolbarItemDisabled(editor, pluginKey);
7481
+ var thePlugin = getPluginByToolbarItem(editor, this._toolbarItem);
7482
+ this.disabled = thePlugin && getToolbarItemDisabled(editor, thePlugin.key);
7476
7483
  }
7477
7484
  }
7478
7485
  };
@@ -7601,6 +7608,7 @@
7601
7608
  backdropClosable: true,
7602
7609
  hasBackdrop: false,
7603
7610
  offset: 10,
7611
+ minWidth: 0,
7604
7612
  viewContainerRef: this.viewContainerRef,
7605
7613
  scrollStrategy: this.overlay.scrollStrategies.reposition()
7606
7614
  });
@@ -7633,7 +7641,7 @@
7633
7641
  return TheToolbarDropdownComponent;
7634
7642
  }(TheBaseToolbarDropdown));
7635
7643
  TheToolbarDropdownComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheToolbarDropdownComponent, deps: [{ token: i0__namespace.ElementRef }, { token: i1__namespace$1.ThyPopover }, { token: i0__namespace.ViewContainerRef }, { token: i2__namespace.Overlay }], target: i0__namespace.ɵɵFactoryTarget.Component });
7636
- TheToolbarDropdownComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheToolbarDropdownComponent, selector: "the-toolbar-dropdown", inputs: { itemMousedownHandle: "itemMousedownHandle" }, host: { listeners: { "mousedown": "toggleDropdown($event)", "document: mousedown": "handleDocumentMouseDown($event)" }, classAttribute: "the-toolbar-dropdown-container" }, viewQueries: [{ propertyName: "iconModeTemplate", first: true, predicate: ["iconModeTemplate"], descendants: true, static: true }, { propertyName: "textModeTemplate", first: true, predicate: ["textModeTemplate"], descendants: true, static: true }, { propertyName: "dropdownTemplate", first: true, predicate: ["dropdownTemplate"], descendants: true, static: true }], usesInheritance: true, ngImport: i0__namespace, template: "<ng-template [ngTemplateOutlet]=\"template\"></ng-template>\n\n<ng-template #iconModeTemplate>\n <a thyIconNavLink class=\"icon-mode link-with-down\" [thyTooltip]=\"activeMenuItem?.name\" thyTooltipPlacement=\"top\">\n <thy-icon [thyIconName]=\"activeMenuItem?.icon\"></thy-icon>\n <thy-icon class=\"caret-down-icon font-size-sm text-desc\" thyIconName=\"caret-down\"></thy-icon>\n </a>\n</ng-template>\n\n<ng-template #textModeTemplate>\n <a thyIconNavLink class=\"text-mode\" [thyTooltip]=\"activeMenuItem?.name\" thyTooltipPlacement=\"top\">\n <span class=\"show-text\">{{ activeMenuItem?.name }}</span>\n <thy-icon class=\"text-caret-down-icon font-size-sm text-desc\" thyIconName=\"caret-down\"></thy-icon>\n </a>\n</ng-template>\n\n<ng-template #dropdownTemplate>\n <thy-action-menu class=\"dropdown\">\n <ng-container *ngFor=\"let menu of menus\">\n <a\n *ngIf=\"menu.key !== 'split'\"\n thyActionMenuItem\n href=\"javascript:;\"\n [thyActionMenuItemActive]=\"menu.key === activeMenuItem.key && !toolbarItem.dropdownFixedIcon\"\n (mousedown)=\"itemMousedown($event, menu)\"\n [ngStyle]=\"menu?.styles\"\n >\n <span *ngIf=\"menu.icon && mode === dropdownMode.icon\" thyActionMenuItemIcon>\n <thy-icon [thyIconName]=\"menu.icon\"></thy-icon>\n </span>\n <span *ngIf=\"menu.name\" thyActionMenuItemName>{{ menu.name }}</span>\n </a>\n <thy-action-menu-divider *ngIf=\"menu.key === 'split'\"></thy-action-menu-divider>\n </ng-container>\n </thy-action-menu>\n</ng-template>\n", components: [{ type: i3__namespace$1.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i3__namespace.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { type: i2__namespace$1.ThyActionMenuComponent, selector: "thy-action-menu", inputs: ["thyTheme", "thyWidth"] }, { type: i2__namespace$1.ThyActionMenuDividerComponent, selector: "thy-action-menu-divider", inputs: ["thyTitle", "thyType"] }], directives: [{ type: i10__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i5__namespace$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { type: i10__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i10__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2__namespace$1.ThyActionMenuItemDirective, selector: "[thyActionMenuItem]", inputs: ["thyDisabled", "thyType"] }, { type: i2__namespace$1.ThyActionMenuItemActiveDirective, selector: "[thyActionMenuItemActive]", inputs: ["thyActionMenuItemActive"] }, { type: i10__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i2__namespace$1.ThyActionMenuItemIconDirective, selector: "[thyActionMenuItemIcon]" }, { type: i2__namespace$1.ThyActionMenuItemNameDirective, selector: "[thyActionMenuItemName]" }] });
7644
+ TheToolbarDropdownComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheToolbarDropdownComponent, selector: "the-toolbar-dropdown", inputs: { itemMousedownHandle: "itemMousedownHandle" }, host: { listeners: { "mousedown": "toggleDropdown($event)", "document: mousedown": "handleDocumentMouseDown($event)" }, classAttribute: "the-toolbar-dropdown-container" }, viewQueries: [{ propertyName: "iconModeTemplate", first: true, predicate: ["iconModeTemplate"], descendants: true, static: true }, { propertyName: "textModeTemplate", first: true, predicate: ["textModeTemplate"], descendants: true, static: true }, { propertyName: "dropdownTemplate", first: true, predicate: ["dropdownTemplate"], descendants: true, static: true }], usesInheritance: true, ngImport: i0__namespace, template: "<ng-template [ngTemplateOutlet]=\"template\"></ng-template>\n\n<ng-template #iconModeTemplate>\n <a thyIconNavLink class=\"icon-mode link-with-down\" [thyTooltip]=\"activeMenuItem?.name\" thyTooltipPlacement=\"top\">\n <thy-icon [thyIconName]=\"activeMenuItem?.icon\"></thy-icon>\n <thy-icon class=\"caret-down-icon font-size-sm text-desc\" thyIconName=\"caret-down\"></thy-icon>\n </a>\n</ng-template>\n\n<ng-template #textModeTemplate>\n <a thyIconNavLink class=\"text-mode\" [thyTooltip]=\"activeMenuItem?.name\" thyTooltipPlacement=\"top\">\n <span class=\"show-text\">{{ activeMenuItem?.name }}</span>\n <thy-icon class=\"text-caret-down-icon font-size-sm text-desc\" thyIconName=\"caret-down\"></thy-icon>\n </a>\n</ng-template>\n\n<ng-template #dropdownTemplate>\n <thy-action-menu class=\"dropdown\">\n <ng-container *ngFor=\"let menu of menus\">\n <a\n *ngIf=\"menu.key !== 'split'\"\n thyActionMenuItem\n href=\"javascript:;\"\n [thyActionMenuItemActive]=\"menu.key === activeMenuItem?.key && !toolbarItem?.dropdownFixedIcon\"\n (mousedown)=\"itemMousedown($event, menu)\"\n [ngStyle]=\"menu?.styles\"\n >\n <span *ngIf=\"menu.icon && mode === dropdownMode.icon\" thyActionMenuItemIcon>\n <thy-icon [thyIconName]=\"menu.icon\"></thy-icon>\n </span>\n <span *ngIf=\"menu.name\" thyActionMenuItemName>{{ menu.name }}</span>\n </a>\n <thy-action-menu-divider *ngIf=\"menu.key === 'split'\"></thy-action-menu-divider>\n </ng-container>\n </thy-action-menu>\n</ng-template>\n", components: [{ type: i3__namespace$1.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i3__namespace.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { type: i2__namespace$1.ThyActionMenuComponent, selector: "thy-action-menu", inputs: ["thyTheme", "thyWidth"] }, { type: i2__namespace$1.ThyActionMenuDividerComponent, selector: "thy-action-menu-divider", inputs: ["thyTitle", "thyType"] }], directives: [{ type: i10__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i5__namespace$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { type: i10__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i10__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2__namespace$1.ThyActionMenuItemDirective, selector: "[thyActionMenuItem]", inputs: ["thyDisabled", "thyType"] }, { type: i2__namespace$1.ThyActionMenuItemActiveDirective, selector: "[thyActionMenuItemActive]", inputs: ["thyActionMenuItemActive"] }, { type: i10__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i2__namespace$1.ThyActionMenuItemIconDirective, selector: "[thyActionMenuItemIcon]" }, { type: i2__namespace$1.ThyActionMenuItemNameDirective, selector: "[thyActionMenuItemName]" }] });
7637
7645
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheToolbarDropdownComponent, decorators: [{
7638
7646
  type: i0.Component,
7639
7647
  args: [{
@@ -7691,11 +7699,11 @@
7691
7699
  lineWrapping: _this.config.mode === exports.TheMode.default ? false : true,
7692
7700
  cursorBlinkRate: 500
7693
7701
  };
7694
- _this.actives = _this.menus[0];
7702
+ _this.activeLanguage = _this.menus[0];
7695
7703
  _this.resizeBounds = null;
7696
7704
  _this.onChangeLanguage = function (item) {
7697
7705
  _this.options = Object.assign(Object.assign({}, _this.options), { mode: item.key });
7698
- _this.actives = item;
7706
+ _this.activeLanguage = item;
7699
7707
  CodeEditor.setCodeAttribute(_this.editor, _this.element, { language: item.key });
7700
7708
  };
7701
7709
  return _this;
@@ -7841,7 +7849,10 @@
7841
7849
  TheCodeComponent.prototype.useMode = function () {
7842
7850
  var _this = this;
7843
7851
  this.options = Object.assign(Object.assign({}, this.options), { mode: this.element.language });
7844
- this.actives = this.menus.find(function (i) { return i.key === _this.element.language; });
7852
+ var menuItem = this.menus.find(function (i) { return i.key === _this.element.language; });
7853
+ if (menuItem) {
7854
+ this.activeLanguage = menuItem;
7855
+ }
7845
7856
  };
7846
7857
  TheCodeComponent.prototype.useAutoWrap = function () {
7847
7858
  this.options = Object.assign(Object.assign({}, this.options), { lineWrapping: this.element.autoWrap || false });
@@ -7876,7 +7887,7 @@
7876
7887
  return TheCodeComponent;
7877
7888
  }(TheBaseElementComponent));
7878
7889
  TheCodeComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheCodeComponent, deps: [{ token: i0__namespace.ElementRef }, { token: i0__namespace.ChangeDetectorRef }, { token: i1__namespace$4.ThyNotifyService }, { token: TheContextService }, { token: i0__namespace.NgZone }, { token: THE_MODE_TOKEN }], target: i0__namespace.ɵɵFactoryTarget.Component });
7879
- TheCodeComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheCodeComponent, selector: "div[theCode]", viewQueries: [{ propertyName: "codemirror", first: true, predicate: ["codemirror"], descendants: true, read: i8.CodeMirrorComponent }], usesInheritance: true, ngImport: i0__namespace, template: "<div contenteditable=\"false\" class=\"the-code-block-operation\" *ngIf=\"isCollapsed && codemirror && !options.readOnly\">\n <thy-icon-nav>\n <the-toolbar-dropdown [menus]=\"menus\" [toolbarItem]=\"actives\" [itemMousedownHandle]=\"onChangeLanguage\"> </the-toolbar-dropdown>\n <span class=\"auto-wrap d-flex align-items-center\">\n <span>\u81EA\u52A8\u6362\u884C</span>\n <thy-switch\n class=\"auto-wrap-btn d-flex\"\n [(ngModel)]=\"options.lineWrapping\"\n (ngModelChange)=\"onChangeWrap($event)\"\n thySize=\"sm\"\n ></thy-switch>\n </span>\n <a\n href=\"javascript:;\"\n thyIconNavLink\n thyIconNavLinkIcon=\"copy\"\n thyTooltip=\"\u590D\u5236\"\n thyTooltipPlacement=\"top\"\n (mousedown)=\"onCopy($event)\"\n ></a>\n <nav-split-line [mode]=\"ToolbarItemMode.vertical\"></nav-split-line>\n <a\n href=\"javascript:;\"\n thyIconNavLink\n thyIconNavLinkIcon=\"trash\"\n thyTooltip=\"\u5220\u9664\"\n class=\"remove-link\"\n thyTooltipPlacement=\"top\"\n (mousedown)=\"onDelete($event)\"\n ></a>\n </thy-icon-nav>\n</div>\n\n<slate-children [children]=\"children\" [context]=\"childrenContext\" [viewContext]=\"viewContext\"></slate-children>\n\n<!-- \u53EA\u8BFB\u6A21\u5F0F\u4E0BCodeMirror-sizer\u9AD8\u5EA6\u6BD4\u7F16\u8F91\u6A21\u5F0F\u4E0B\u591A2px\uFF0C\u8BBE\u7F6EthyMinHeight\u4E3A46px\u9632\u6B62\u62D6\u62FD\u5230\u6700\u5C0F\u9AD8\u5EA6\u65F6\u53EA\u8BFB\u6A21\u5F0F\u4E0B\u51FA\u73B0\u6EDA\u52A8\u6761 -->\n<div\n thyResizable\n [thyMinHeight]=\"46\"\n [thyBounds]=\"resizeBounds\"\n [style.height.px]=\"resizeHeight\"\n (thyResize)=\"onResize($event)\"\n (thyResizeEnd)=\"onEndResize()\"\n class=\"resize-code-container\"\n [ngClass]=\"{ focus: isCollapsed, readonly: options.readOnly, active: isHightLight && isCollapsed }\"\n>\n <ng-codemirror\n *ngIf=\"startRenderCodemirror\"\n #codemirror\n contenteditable=\"false\"\n class=\"ng-codemirror-wrapper\"\n [ngStyle]=\"{ maxHeight: maxHeight > 0 ? maxHeight + 'px' : 'auto' }\"\n [options]=\"options\"\n [ngModel]=\"code\"\n [delayRefreshTime]=\"300\"\n (ngModelChange)=\"codeChange($event)\"\n (focusChange)=\"focusChange($event)\"\n [autoMaxHeight]=\"maxHeight\"\n >\n </ng-codemirror>\n <thy-resize-handle thyDirection=\"bottom\" class=\"code-resize-icon\" *ngIf=\"isCollapsed && !options.readOnly\"></thy-resize-handle>\n</div>\n", components: [{ type: i3__namespace$1.ThyIconNavComponent, selector: "thy-icon-nav", inputs: ["thyType"] }, { type: TheToolbarDropdownComponent, selector: "the-toolbar-dropdown", inputs: ["itemMousedownHandle"] }, { type: i5__namespace$2.ThySwitchComponent, selector: "thy-switch", inputs: ["thyType", "thySize", "thyDisabled"], outputs: ["thyChange"] }, { type: i3__namespace$1.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: NavSplitLineComponent, selector: "nav-split-line", inputs: ["mode"] }, { type: i1__namespace.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }, { type: i8__namespace.CodeMirrorComponent, selector: "ng-codemirror, [ngCodeMirror]", inputs: ["autoMaxHeight", "delayRefreshTime", "options"], outputs: ["focusChange"] }, { type: i9__namespace.ThyResizeHandleComponent, selector: "thy-resize-handle, [thy-resize-handle]", inputs: ["thyDirection"], outputs: ["thyMouseDown"], exportAs: ["thyResizeHandle"] }], directives: [{ type: i10__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4__namespace.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i5__namespace$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { type: i9__namespace.ThyResizableDirective, selector: "[thyResizable]", inputs: ["thyBounds", "thyMaxHeight", "thyMaxWidth", "thyMinHeight", "thyMinWidth", "thyGridColumnCount", "thyMaxColumn", "thyMinColumn", "thyLockAspectRatio", "thyPreview", "thyDisabled"], outputs: ["thyResize", "thyResizeEnd", "thyResizeStart"] }, { type: i10__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i10__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
7890
+ TheCodeComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheCodeComponent, selector: "div[theCode]", viewQueries: [{ propertyName: "codemirror", first: true, predicate: ["codemirror"], descendants: true, read: i8.CodeMirrorComponent }], usesInheritance: true, ngImport: i0__namespace, template: "<div contenteditable=\"false\" class=\"the-code-block-operation\" *ngIf=\"isCollapsed && codemirror && !options.readOnly\">\n <thy-icon-nav>\n <the-toolbar-dropdown\n [menus]=\"menus\"\n [toolbarItem]=\"activeLanguage\"\n [dropdownItemKey]=\"activeLanguage?.key\"\n [itemMousedownHandle]=\"onChangeLanguage\"\n >\n </the-toolbar-dropdown>\n <span class=\"auto-wrap d-flex align-items-center\">\n <span>\u81EA\u52A8\u6362\u884C</span>\n <thy-switch\n class=\"auto-wrap-btn d-flex\"\n [(ngModel)]=\"options.lineWrapping\"\n (ngModelChange)=\"onChangeWrap($event)\"\n thySize=\"sm\"\n ></thy-switch>\n </span>\n <a\n href=\"javascript:;\"\n thyIconNavLink\n thyIconNavLinkIcon=\"copy\"\n thyTooltip=\"\u590D\u5236\"\n thyTooltipPlacement=\"top\"\n (mousedown)=\"onCopy($event)\"\n ></a>\n <nav-split-line [mode]=\"ToolbarItemMode.vertical\"></nav-split-line>\n <a\n href=\"javascript:;\"\n thyIconNavLink\n thyIconNavLinkIcon=\"trash\"\n thyTooltip=\"\u5220\u9664\"\n class=\"remove-link\"\n thyTooltipPlacement=\"top\"\n (mousedown)=\"onDelete($event)\"\n ></a>\n </thy-icon-nav>\n</div>\n\n<slate-children [children]=\"children\" [context]=\"childrenContext\" [viewContext]=\"viewContext\"></slate-children>\n\n<!-- \u53EA\u8BFB\u6A21\u5F0F\u4E0BCodeMirror-sizer\u9AD8\u5EA6\u6BD4\u7F16\u8F91\u6A21\u5F0F\u4E0B\u591A2px\uFF0C\u8BBE\u7F6EthyMinHeight\u4E3A46px\u9632\u6B62\u62D6\u62FD\u5230\u6700\u5C0F\u9AD8\u5EA6\u65F6\u53EA\u8BFB\u6A21\u5F0F\u4E0B\u51FA\u73B0\u6EDA\u52A8\u6761 -->\n<div\n thyResizable\n [thyMinHeight]=\"46\"\n [thyBounds]=\"resizeBounds\"\n [style.height.px]=\"resizeHeight\"\n (thyResize)=\"onResize($event)\"\n (thyResizeEnd)=\"onEndResize()\"\n class=\"resize-code-container\"\n [ngClass]=\"{ focus: isCollapsed, readonly: options.readOnly, active: isHightLight && isCollapsed }\"\n>\n <ng-codemirror\n *ngIf=\"startRenderCodemirror\"\n #codemirror\n contenteditable=\"false\"\n class=\"ng-codemirror-wrapper\"\n [ngStyle]=\"{ maxHeight: maxHeight > 0 ? maxHeight + 'px' : 'auto' }\"\n [options]=\"options\"\n [ngModel]=\"code\"\n [delayRefreshTime]=\"300\"\n (ngModelChange)=\"codeChange($event)\"\n (focusChange)=\"focusChange($event)\"\n [autoMaxHeight]=\"maxHeight\"\n >\n </ng-codemirror>\n <thy-resize-handle thyDirection=\"bottom\" class=\"code-resize-icon\" *ngIf=\"isCollapsed && !options.readOnly\"></thy-resize-handle>\n</div>\n", components: [{ type: i3__namespace$1.ThyIconNavComponent, selector: "thy-icon-nav", inputs: ["thyType"] }, { type: TheToolbarDropdownComponent, selector: "the-toolbar-dropdown", inputs: ["itemMousedownHandle"] }, { type: i5__namespace$2.ThySwitchComponent, selector: "thy-switch", inputs: ["thyType", "thySize", "thyDisabled"], outputs: ["thyChange"] }, { type: i3__namespace$1.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: NavSplitLineComponent, selector: "nav-split-line", inputs: ["mode"] }, { type: i1__namespace.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }, { type: i8__namespace.CodeMirrorComponent, selector: "ng-codemirror, [ngCodeMirror]", inputs: ["autoMaxHeight", "delayRefreshTime", "options"], outputs: ["focusChange"] }, { type: i9__namespace.ThyResizeHandleComponent, selector: "thy-resize-handle, [thy-resize-handle]", inputs: ["thyDirection"], outputs: ["thyMouseDown"], exportAs: ["thyResizeHandle"] }], directives: [{ type: i10__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4__namespace.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i5__namespace$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { type: i9__namespace.ThyResizableDirective, selector: "[thyResizable]", inputs: ["thyBounds", "thyMaxHeight", "thyMaxWidth", "thyMinHeight", "thyMinWidth", "thyGridColumnCount", "thyMaxColumn", "thyMinColumn", "thyLockAspectRatio", "thyPreview", "thyDisabled"], outputs: ["thyResize", "thyResizeEnd", "thyResizeStart"] }, { type: i10__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i10__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
7880
7891
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheCodeComponent, decorators: [{
7881
7892
  type: i0.Component,
7882
7893
  args: [{
@@ -8241,6 +8252,7 @@
8241
8252
  origin: dom,
8242
8253
  placement: 'bottomLeft',
8243
8254
  offset: 8,
8255
+ minWidth: 0,
8244
8256
  hasBackdrop: false,
8245
8257
  outsideClosable: true,
8246
8258
  viewContainerRef: this.viewContainerRef,
@@ -8260,6 +8272,7 @@
8260
8272
  link: link,
8261
8273
  originSelection: this.editor.selection
8262
8274
  },
8275
+ minWidth: 0,
8263
8276
  origin: this.elementRef.nativeElement,
8264
8277
  backdropClosable: true,
8265
8278
  placement: 'bottomLeft',
@@ -8366,7 +8379,7 @@
8366
8379
  }
8367
8380
  ],
8368
8381
  options: {
8369
- disabledOperateTypes: [exports.ElementKinds.image, exports.ElementKinds.code]
8382
+ disabledOperateTypes: __spreadArray([exports.ElementKinds.image], __read(DISABLED_OPERATE_TYPES))
8370
8383
  }
8371
8384
  });
8372
8385
 
@@ -9389,6 +9402,7 @@
9389
9402
  tableStore: this.tableStore,
9390
9403
  editor: this.editor
9391
9404
  },
9405
+ minWidth: 0,
9392
9406
  insideClosable: false,
9393
9407
  hasBackdrop: false,
9394
9408
  placement: 'bottomLeft',
@@ -9657,6 +9671,7 @@
9657
9671
  y: event.y
9658
9672
  },
9659
9673
  hasBackdrop: false,
9674
+ minWidth: 0,
9660
9675
  placement: 'bottomLeft',
9661
9676
  viewContainerRef: _this.theContextService.getOptions().viewContainerRef,
9662
9677
  manualClosure: true,
@@ -9723,6 +9738,7 @@
9723
9738
  offset: this.offset,
9724
9739
  hasBackdrop: this.hasBackdrop,
9725
9740
  insideClosable: this.insideClosable,
9741
+ minWidth: 0,
9726
9742
  panelClass: 'the-temp-table-toolbar-wrap',
9727
9743
  scrollStrategy: this.overlay.scrollStrategies.reposition(),
9728
9744
  manualClosure: true
@@ -11757,6 +11773,7 @@
11757
11773
  editor: this.editor,
11758
11774
  optionsParam: optionsParam
11759
11775
  },
11776
+ minWidth: 0,
11760
11777
  backdropClosable: false,
11761
11778
  hasBackdrop: false,
11762
11779
  insideClosable: false,
@@ -12409,6 +12426,7 @@
12409
12426
  offset: 4,
12410
12427
  hasBackdrop: false,
12411
12428
  insideClosable: true,
12429
+ minWidth: 0,
12412
12430
  panelClass: 'the-quick-toolbar-container',
12413
12431
  scrollStrategy: overlay.scrollStrategies.reposition(),
12414
12432
  manualClosure: true
@@ -12604,7 +12622,7 @@
12604
12622
  }
12605
12623
  ],
12606
12624
  options: {
12607
- disabledOperateTypes: [exports.ElementKinds.image, exports.ElementKinds.code]
12625
+ disabledOperateTypes: __spreadArray([exports.ElementKinds.image], __read(DISABLED_OPERATE_TYPES))
12608
12626
  }
12609
12627
  });
12610
12628
 
@@ -12777,7 +12795,7 @@
12777
12795
  exports.ElementKinds.paragraph
12778
12796
  ], __read(HEADING_TYPES)),
12779
12797
  disableIndentTypes: [exports.ElementKinds.bulletedList, exports.ElementKinds.numberedList, exports.ElementKinds.checkItem],
12780
- disabledOperateTypes: [exports.ElementKinds.image, exports.ElementKinds.code]
12798
+ disabledOperateTypes: __spreadArray([exports.ElementKinds.image], __read(DISABLED_OPERATE_TYPES))
12781
12799
  }
12782
12800
  });
12783
12801
 
@@ -12867,7 +12885,7 @@
12867
12885
  }
12868
12886
  ], __read(sizeOptions())),
12869
12887
  options: {
12870
- disabledOperateTypes: __spreadArray(__spreadArray([], __read(HEADING_TYPES)), [exports.ElementKinds.image, exports.ElementKinds.code])
12888
+ disabledOperateTypes: __spreadArray(__spreadArray(__spreadArray([], __read(HEADING_TYPES)), [exports.ElementKinds.image]), __read(DISABLED_OPERATE_TYPES))
12871
12889
  }
12872
12890
  });
12873
12891
 
@@ -12926,6 +12944,7 @@
12926
12944
  panelClass: ['the-toolbar-dropdown-popover', (_a = this.toolbarItem) === null || _a === void 0 ? void 0 : _a.key],
12927
12945
  placement: 'bottomLeft',
12928
12946
  offset: 10,
12947
+ minWidth: 0,
12929
12948
  viewContainerRef: this.viewContainerRef,
12930
12949
  insideClosable: false,
12931
12950
  backdropClosable: false,
@@ -13230,6 +13249,7 @@
13230
13249
  backdropClosable: false,
13231
13250
  placement: 'bottomLeft',
13232
13251
  offset: 10,
13252
+ minWidth: 0,
13233
13253
  hasBackdrop: false,
13234
13254
  insideClosable: false,
13235
13255
  panelClass: 'color-select-container'
@@ -13275,7 +13295,7 @@
13275
13295
  }
13276
13296
  ],
13277
13297
  options: {
13278
- disabledOperateTypes: [exports.ElementKinds.image, exports.ElementKinds.code]
13298
+ disabledOperateTypes: __spreadArray([exports.ElementKinds.image], __read(DISABLED_OPERATE_TYPES))
13279
13299
  }
13280
13300
  });
13281
13301
 
@@ -14502,6 +14522,7 @@
14502
14522
  this.groupPopoverRef = this.thyPopover.open(this.groupTemplate, {
14503
14523
  panelClass: 'the-toolbar-group-container',
14504
14524
  offset: 10,
14525
+ minWidth: 0,
14505
14526
  placement: 'bottomRight',
14506
14527
  origin: event.currentTarget,
14507
14528
  viewContainerRef: this.viewContainerRef,
@@ -14749,7 +14770,7 @@
14749
14770
  exports.ALIGN_BLOCK_TYPES = ALIGN_BLOCK_TYPES;
14750
14771
  exports.A_TAG_REL_ATTR = A_TAG_REL_ATTR;
14751
14772
  exports.AlignEditor = AlignEditor;
14752
- exports.BLOCK_DELETEBACKWARD_TYPES = BLOCK_DELETEBACKWARD_TYPES;
14773
+ exports.BLOCK_DELETE_BACKWARD_TYPES = BLOCK_DELETE_BACKWARD_TYPES;
14753
14774
  exports.BlockquoteEditor = BlockquoteEditor;
14754
14775
  exports.CLIPBOARD_FORMAT_KEY = CLIPBOARD_FORMAT_KEY;
14755
14776
  exports.CODEMIRROR_PADDING_TOP = CODEMIRROR_PADDING_TOP;
@@ -14761,6 +14782,7 @@
14761
14782
  exports.ColorEditor = ColorEditor;
14762
14783
  exports.DEFAULT_LANGUAGE = DEFAULT_LANGUAGE;
14763
14784
  exports.DEFAULT_SCROLL_CONTAINER = DEFAULT_SCROLL_CONTAINER;
14785
+ exports.DISABLED_OPERATE_TYPES = DISABLED_OPERATE_TYPES;
14764
14786
  exports.DefaultElementOptions = DefaultElementOptions;
14765
14787
  exports.DefaultGlobalToolbarDefinition = DefaultGlobalToolbarDefinition;
14766
14788
  exports.DefaultInlineToolbarDefinition = DefaultInlineToolbarDefinition;