@worktile/theia 2.4.7 → 2.4.8
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.
- package/bundles/worktile-theia.umd.js +27 -32
- package/bundles/worktile-theia.umd.js.map +1 -1
- package/constants/code.d.ts +0 -16
- package/constants/default.d.ts +0 -4
- package/esm2015/constants/code.js +1 -15
- package/esm2015/constants/default.js +1 -6
- package/esm2015/editor.module.js +4 -4
- package/esm2015/interfaces/editor.js +16 -1
- package/esm2015/plugins/code/code.component.js +9 -9
- package/fesm2015/worktile-theia.js +22 -26
- package/fesm2015/worktile-theia.js.map +1 -1
- package/interfaces/editor.d.ts +15 -0
- package/package.json +1 -1
- package/plugins/code/code.component.d.ts +3 -3
|
@@ -379,11 +379,6 @@
|
|
|
379
379
|
var DEFAULT_SCROLL_CONTAINER = '.the-editable-container';
|
|
380
380
|
var ELEMENT_UNIQUE_ID = 'key';
|
|
381
381
|
var ZERO_WIDTH_CHAR = '\u200B';
|
|
382
|
-
exports.TheMode = void 0;
|
|
383
|
-
(function (TheMode) {
|
|
384
|
-
TheMode["fullMode"] = "full";
|
|
385
|
-
TheMode["liteMode"] = "lite";
|
|
386
|
-
})(exports.TheMode || (exports.TheMode = {}));
|
|
387
382
|
|
|
388
383
|
exports.ElementKinds = void 0;
|
|
389
384
|
(function (ElementKinds) {
|
|
@@ -591,22 +586,6 @@
|
|
|
591
586
|
value: 'htmlmixed'
|
|
592
587
|
}
|
|
593
588
|
];
|
|
594
|
-
var CodeMode = {
|
|
595
|
-
default: 'default',
|
|
596
|
-
print: 'print'
|
|
597
|
-
};
|
|
598
|
-
var TheCodeConfig = /** @class */ (function () {
|
|
599
|
-
function TheCodeConfig() {
|
|
600
|
-
}
|
|
601
|
-
return TheCodeConfig;
|
|
602
|
-
}());
|
|
603
|
-
var THE_CODE_MODE_TOKEN = new i0.InjectionToken('the-code-mode');
|
|
604
|
-
var THE_CODE_MODE_PROVIDER = {
|
|
605
|
-
provide: THE_CODE_MODE_TOKEN,
|
|
606
|
-
useValue: {
|
|
607
|
-
mode: CodeMode.default
|
|
608
|
-
}
|
|
609
|
-
};
|
|
610
589
|
var CODEMIRROR_PADDING_TOP = 10;
|
|
611
590
|
|
|
612
591
|
var TheToolbarGroupToken = new i0.InjectionToken('the-toolbar-group-token');
|
|
@@ -791,6 +770,23 @@
|
|
|
791
770
|
TheDataMode["json"] = "json";
|
|
792
771
|
TheDataMode["html"] = "html";
|
|
793
772
|
})(exports.TheDataMode || (exports.TheDataMode = {}));
|
|
773
|
+
exports.TheMode = void 0;
|
|
774
|
+
(function (TheMode) {
|
|
775
|
+
TheMode["default"] = "default";
|
|
776
|
+
TheMode["print"] = "print";
|
|
777
|
+
})(exports.TheMode || (exports.TheMode = {}));
|
|
778
|
+
var TheModeConfig = /** @class */ (function () {
|
|
779
|
+
function TheModeConfig() {
|
|
780
|
+
}
|
|
781
|
+
return TheModeConfig;
|
|
782
|
+
}());
|
|
783
|
+
var THE_MODE_TOKEN = new i0.InjectionToken('the-mode');
|
|
784
|
+
var THE_MODE_PROVIDER = {
|
|
785
|
+
provide: THE_MODE_TOKEN,
|
|
786
|
+
useValue: {
|
|
787
|
+
mode: exports.TheMode.default
|
|
788
|
+
}
|
|
789
|
+
};
|
|
794
790
|
|
|
795
791
|
exports.ToolbarItemType = void 0;
|
|
796
792
|
(function (ToolbarItemType) {
|
|
@@ -7366,7 +7362,7 @@
|
|
|
7366
7362
|
_this.config = config;
|
|
7367
7363
|
_this.startRenderCodemirror = false;
|
|
7368
7364
|
_this.dropdownMode = exports.DropdownMode;
|
|
7369
|
-
_this.maxHeight = _this.config.mode ===
|
|
7365
|
+
_this.maxHeight = _this.config.mode === exports.TheMode.default ? 350 - CODEMIRROR_PADDING_TOP * 2 : 0;
|
|
7370
7366
|
_this.menus = CODE_MODES.map(function (item) {
|
|
7371
7367
|
return { key: item.value, name: item.showName };
|
|
7372
7368
|
});
|
|
@@ -7380,7 +7376,7 @@
|
|
|
7380
7376
|
readOnly: false,
|
|
7381
7377
|
autofocus: false,
|
|
7382
7378
|
lineWiseCopyCut: true,
|
|
7383
|
-
lineWrapping: _this.config.mode ===
|
|
7379
|
+
lineWrapping: _this.config.mode === exports.TheMode.default ? false : true,
|
|
7384
7380
|
cursorBlinkRate: 500
|
|
7385
7381
|
};
|
|
7386
7382
|
_this.actives = _this.menus[0];
|
|
@@ -7567,7 +7563,7 @@
|
|
|
7567
7563
|
};
|
|
7568
7564
|
return TheCodeComponent;
|
|
7569
7565
|
}(TheBaseElementComponent));
|
|
7570
|
-
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:
|
|
7566
|
+
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 });
|
|
7571
7567
|
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\" [item]=\"actives\" [itemMousedownHandle]=\"onChangeLangulage\"> </the-toolbar-dropdown>\n <a\n href=\"javascript:;\"\n thyIconNavLink\n thyIconNavLinkIcon=\"copy\"\n thyTooltip=\"\u590D\u5236\"\n thyTooltipPlacement=\"top\"\n (mousedown)=\"onCopy($event)\"\n ></a>\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 <nav-split-line [mode]=\"ToolbarItemMode.vertical\"></nav-split-line>\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 </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: ["toolbarItem", "menus", "mode", "item", "itemMousedownHandle"] }, { type: i3__namespace$1.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: NavSplitLineComponent, selector: "nav-split-line", inputs: ["mode"] }, { type: i6__namespace$1.ThySwitchComponent, selector: "thy-switch", inputs: ["thyType", "thySize", "thyDisabled"], outputs: ["thyChange"] }, { 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: i5__namespace.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { 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: 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 });
|
|
7572
7568
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheCodeComponent, decorators: [{
|
|
7573
7569
|
type: i0.Component,
|
|
@@ -7577,9 +7573,9 @@
|
|
|
7577
7573
|
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
7578
7574
|
}]
|
|
7579
7575
|
}], ctorParameters: function () {
|
|
7580
|
-
return [{ type: i0__namespace.ElementRef }, { type: i0__namespace.ChangeDetectorRef }, { type: i1__namespace$4.ThyNotifyService }, { type: TheContextService }, { type: i0__namespace.NgZone }, { type:
|
|
7576
|
+
return [{ type: i0__namespace.ElementRef }, { type: i0__namespace.ChangeDetectorRef }, { type: i1__namespace$4.ThyNotifyService }, { type: TheContextService }, { type: i0__namespace.NgZone }, { type: TheModeConfig, decorators: [{
|
|
7581
7577
|
type: i0.Inject,
|
|
7582
|
-
args: [
|
|
7578
|
+
args: [THE_MODE_TOKEN]
|
|
7583
7579
|
}] }];
|
|
7584
7580
|
}, propDecorators: { codemirror: [{
|
|
7585
7581
|
type: i0.ViewChild,
|
|
@@ -14377,7 +14373,7 @@
|
|
|
14377
14373
|
provide: TheToolbarGroupToken,
|
|
14378
14374
|
useValue: TheToolbarGroupComponent
|
|
14379
14375
|
},
|
|
14380
|
-
|
|
14376
|
+
THE_MODE_PROVIDER
|
|
14381
14377
|
], imports: [__spreadArray(__spreadArray([i10.CommonModule, i1.SlateModule, i4.FormsModule], __read(TETHYS)), [i8.CodemirrorModule, TheColumnSizeModule])] });
|
|
14382
14378
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheEditorModule, decorators: [{
|
|
14383
14379
|
type: i0.NgModule,
|
|
@@ -14391,7 +14387,7 @@
|
|
|
14391
14387
|
provide: TheToolbarGroupToken,
|
|
14392
14388
|
useValue: TheToolbarGroupComponent
|
|
14393
14389
|
},
|
|
14394
|
-
|
|
14390
|
+
THE_MODE_PROVIDER
|
|
14395
14391
|
]
|
|
14396
14392
|
}]
|
|
14397
14393
|
}] });
|
|
@@ -14416,7 +14412,6 @@
|
|
|
14416
14412
|
exports.CONTAINER_BLOCKS = CONTAINER_BLOCKS;
|
|
14417
14413
|
exports.CONTROL_KEY = CONTROL_KEY;
|
|
14418
14414
|
exports.CodeEditor = CodeEditor;
|
|
14419
|
-
exports.CodeMode = CodeMode;
|
|
14420
14415
|
exports.ColorEditor = ColorEditor;
|
|
14421
14416
|
exports.DEFAULT_LANGUAGE = DEFAULT_LANGUAGE;
|
|
14422
14417
|
exports.DEFAULT_SCROLL_CONTAINER = DEFAULT_SCROLL_CONTAINER;
|
|
@@ -14445,16 +14440,15 @@
|
|
|
14445
14440
|
exports.QuickInsertEditor = QuickInsertEditor;
|
|
14446
14441
|
exports.STANDARD_HEADING_TYPES = STANDARD_HEADING_TYPES;
|
|
14447
14442
|
exports.TAB_SPACE = TAB_SPACE;
|
|
14448
|
-
exports.THE_CODE_MODE_PROVIDER = THE_CODE_MODE_PROVIDER;
|
|
14449
|
-
exports.THE_CODE_MODE_TOKEN = THE_CODE_MODE_TOKEN;
|
|
14450
14443
|
exports.THE_EDITOR_CONVERSION_HINT_REF = THE_EDITOR_CONVERSION_HINT_REF;
|
|
14451
14444
|
exports.THE_EDITOR_QUICK_TOOLBAR_REF = THE_EDITOR_QUICK_TOOLBAR_REF;
|
|
14452
14445
|
exports.THE_EDITOR_UUID = THE_EDITOR_UUID;
|
|
14453
14446
|
exports.THE_INLINE_TOOLBAR_TYPES = THE_INLINE_TOOLBAR_TYPES;
|
|
14447
|
+
exports.THE_MODE_PROVIDER = THE_MODE_PROVIDER;
|
|
14448
|
+
exports.THE_MODE_TOKEN = THE_MODE_TOKEN;
|
|
14454
14449
|
exports.THE_UPLOAD_SERVICE_TOKEN = THE_UPLOAD_SERVICE_TOKEN;
|
|
14455
14450
|
exports.TableEditor = TableEditor;
|
|
14456
14451
|
exports.TheBaseElementComponent = TheBaseElementComponent;
|
|
14457
|
-
exports.TheCodeConfig = TheCodeConfig;
|
|
14458
14452
|
exports.TheContextService = TheContextService;
|
|
14459
14453
|
exports.TheDefaultElementComponent = TheDefaultElementComponent;
|
|
14460
14454
|
exports.TheEditor = TheEditor;
|
|
@@ -14462,6 +14456,7 @@
|
|
|
14462
14456
|
exports.TheEditorModule = TheEditorModule;
|
|
14463
14457
|
exports.TheImageComponent = TheImageComponent;
|
|
14464
14458
|
exports.TheIndentToolbarComponent = TheIndentToolbarComponent;
|
|
14459
|
+
exports.TheModeConfig = TheModeConfig;
|
|
14465
14460
|
exports.TheQueries = index$1;
|
|
14466
14461
|
exports.TheToolbarBaseItemComponent = TheToolbarBaseItemComponent;
|
|
14467
14462
|
exports.TheToolbarComponent = TheToolbarComponent;
|