@worktile/theia 3.0.4 → 3.0.5

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.
@@ -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) {
@@ -3064,7 +3065,7 @@
3064
3065
  editor.onKeydown = function (event) {
3065
3066
  var selection = editor.selection;
3066
3067
  if (i1.IS_SAFARI && selection && slate.Range.isCollapsed(selection) && i1.hotkeys.isDeleteBackward(event)) {
3067
- var blockEntry = getAboveByType(editor, BLOCK_DELETEBACKWARD_TYPES);
3068
+ var blockEntry = getAboveByType(editor, BLOCK_DELETE_BACKWARD_TYPES);
3068
3069
  if (blockEntry && blockEntry[0]) {
3069
3070
  var isStart = slate.Editor.isStart(editor, selection.anchor, blockEntry[1]);
3070
3071
  if (isStart) {
@@ -6061,13 +6062,13 @@
6061
6062
  }
6062
6063
  ],
6063
6064
  options: {
6064
- disabledOperateTypes: [exports.ElementKinds.code]
6065
+ disabledOperateTypes: __spreadArray([], __read(DISABLED_OPERATE_TYPES))
6065
6066
  }
6066
6067
  });
6067
6068
 
6068
6069
  var headingOptions = {
6069
6070
  allowParentTypes: [exports.ElementKinds.tableCell, exports.ElementKinds.blockquote],
6070
- disabledOperateTypes: [exports.ElementKinds.image, exports.ElementKinds.code],
6071
+ disabledOperateTypes: __spreadArray([exports.ElementKinds.image], __read(DISABLED_OPERATE_TYPES)),
6071
6072
  cleanupTypes: [exports.ElementKinds.bulletedList, exports.ElementKinds.numberedList, exports.ElementKinds.listItem]
6072
6073
  };
6073
6074
  var HeadingEditor = {
@@ -6314,7 +6315,7 @@
6314
6315
  }
6315
6316
  ],
6316
6317
  options: {
6317
- disabledOperateTypes: [exports.ElementKinds.image, exports.ElementKinds.code]
6318
+ disabledOperateTypes: __spreadArray([exports.ElementKinds.image], __read(DISABLED_OPERATE_TYPES))
6318
6319
  }
6319
6320
  });
6320
6321
 
@@ -7691,11 +7692,11 @@
7691
7692
  lineWrapping: _this.config.mode === exports.TheMode.default ? false : true,
7692
7693
  cursorBlinkRate: 500
7693
7694
  };
7694
- _this.actives = _this.menus[0];
7695
+ _this.activeLanguage = _this.menus[0];
7695
7696
  _this.resizeBounds = null;
7696
7697
  _this.onChangeLanguage = function (item) {
7697
7698
  _this.options = Object.assign(Object.assign({}, _this.options), { mode: item.key });
7698
- _this.actives = item;
7699
+ _this.activeLanguage = item;
7699
7700
  CodeEditor.setCodeAttribute(_this.editor, _this.element, { language: item.key });
7700
7701
  };
7701
7702
  return _this;
@@ -7841,7 +7842,7 @@
7841
7842
  TheCodeComponent.prototype.useMode = function () {
7842
7843
  var _this = this;
7843
7844
  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; });
7845
+ this.activeLanguage = this.menus.find(function (i) { return i.key === _this.element.language; });
7845
7846
  };
7846
7847
  TheCodeComponent.prototype.useAutoWrap = function () {
7847
7848
  this.options = Object.assign(Object.assign({}, this.options), { lineWrapping: this.element.autoWrap || false });
@@ -7876,7 +7877,7 @@
7876
7877
  return TheCodeComponent;
7877
7878
  }(TheBaseElementComponent));
7878
7879
  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 });
7880
+ 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
7881
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheCodeComponent, decorators: [{
7881
7882
  type: i0.Component,
7882
7883
  args: [{
@@ -8366,7 +8367,7 @@
8366
8367
  }
8367
8368
  ],
8368
8369
  options: {
8369
- disabledOperateTypes: [exports.ElementKinds.image, exports.ElementKinds.code]
8370
+ disabledOperateTypes: __spreadArray([exports.ElementKinds.image], __read(DISABLED_OPERATE_TYPES))
8370
8371
  }
8371
8372
  });
8372
8373
 
@@ -12604,7 +12605,7 @@
12604
12605
  }
12605
12606
  ],
12606
12607
  options: {
12607
- disabledOperateTypes: [exports.ElementKinds.image, exports.ElementKinds.code]
12608
+ disabledOperateTypes: __spreadArray([exports.ElementKinds.image], __read(DISABLED_OPERATE_TYPES))
12608
12609
  }
12609
12610
  });
12610
12611
 
@@ -12777,7 +12778,7 @@
12777
12778
  exports.ElementKinds.paragraph
12778
12779
  ], __read(HEADING_TYPES)),
12779
12780
  disableIndentTypes: [exports.ElementKinds.bulletedList, exports.ElementKinds.numberedList, exports.ElementKinds.checkItem],
12780
- disabledOperateTypes: [exports.ElementKinds.image, exports.ElementKinds.code]
12781
+ disabledOperateTypes: __spreadArray([exports.ElementKinds.image], __read(DISABLED_OPERATE_TYPES))
12781
12782
  }
12782
12783
  });
12783
12784
 
@@ -12867,7 +12868,7 @@
12867
12868
  }
12868
12869
  ], __read(sizeOptions())),
12869
12870
  options: {
12870
- disabledOperateTypes: __spreadArray(__spreadArray([], __read(HEADING_TYPES)), [exports.ElementKinds.image, exports.ElementKinds.code])
12871
+ disabledOperateTypes: __spreadArray(__spreadArray(__spreadArray([], __read(HEADING_TYPES)), [exports.ElementKinds.image]), __read(DISABLED_OPERATE_TYPES))
12871
12872
  }
12872
12873
  });
12873
12874
 
@@ -13275,7 +13276,7 @@
13275
13276
  }
13276
13277
  ],
13277
13278
  options: {
13278
- disabledOperateTypes: [exports.ElementKinds.image, exports.ElementKinds.code]
13279
+ disabledOperateTypes: __spreadArray([exports.ElementKinds.image], __read(DISABLED_OPERATE_TYPES))
13279
13280
  }
13280
13281
  });
13281
13282
 
@@ -14749,7 +14750,7 @@
14749
14750
  exports.ALIGN_BLOCK_TYPES = ALIGN_BLOCK_TYPES;
14750
14751
  exports.A_TAG_REL_ATTR = A_TAG_REL_ATTR;
14751
14752
  exports.AlignEditor = AlignEditor;
14752
- exports.BLOCK_DELETEBACKWARD_TYPES = BLOCK_DELETEBACKWARD_TYPES;
14753
+ exports.BLOCK_DELETE_BACKWARD_TYPES = BLOCK_DELETE_BACKWARD_TYPES;
14753
14754
  exports.BlockquoteEditor = BlockquoteEditor;
14754
14755
  exports.CLIPBOARD_FORMAT_KEY = CLIPBOARD_FORMAT_KEY;
14755
14756
  exports.CODEMIRROR_PADDING_TOP = CODEMIRROR_PADDING_TOP;
@@ -14761,6 +14762,7 @@
14761
14762
  exports.ColorEditor = ColorEditor;
14762
14763
  exports.DEFAULT_LANGUAGE = DEFAULT_LANGUAGE;
14763
14764
  exports.DEFAULT_SCROLL_CONTAINER = DEFAULT_SCROLL_CONTAINER;
14765
+ exports.DISABLED_OPERATE_TYPES = DISABLED_OPERATE_TYPES;
14764
14766
  exports.DefaultElementOptions = DefaultElementOptions;
14765
14767
  exports.DefaultGlobalToolbarDefinition = DefaultGlobalToolbarDefinition;
14766
14768
  exports.DefaultInlineToolbarDefinition = DefaultInlineToolbarDefinition;