@worktile/theia 20.2.12 → 20.2.14
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/fesm2022/worktile-theia.mjs +22 -22
- package/fesm2022/worktile-theia.mjs.map +1 -1
- package/index.d.ts +3 -3
- package/package.json +3 -3
|
@@ -7116,7 +7116,7 @@ class TheCode extends TheBaseElement {
|
|
|
7116
7116
|
this.destroy$ = new Subject();
|
|
7117
7117
|
this.isHightLight = false;
|
|
7118
7118
|
this.resizeHeight = null;
|
|
7119
|
-
this.options = {
|
|
7119
|
+
this.options = signal({
|
|
7120
7120
|
mode: DEFAULT_LANGUAGE.value,
|
|
7121
7121
|
lineNumbers: false,
|
|
7122
7122
|
readonly: false,
|
|
@@ -7124,7 +7124,7 @@ class TheCode extends TheBaseElement {
|
|
|
7124
7124
|
lineWiseCopyCut: true,
|
|
7125
7125
|
lineWrapping: false,
|
|
7126
7126
|
cursorBlinkRate: 500
|
|
7127
|
-
};
|
|
7127
|
+
}, ...(ngDevMode ? [{ debugName: "options" }] : []));
|
|
7128
7128
|
this.resizeBounds = null;
|
|
7129
7129
|
this.isDelayRender = signal(false, ...(ngDevMode ? [{ debugName: "isDelayRender" }] : []));
|
|
7130
7130
|
this.thyNotifyService = inject(ThyNotifyService);
|
|
@@ -7133,7 +7133,7 @@ class TheCode extends TheBaseElement {
|
|
|
7133
7133
|
this.thyPopover = inject(ThyPopover);
|
|
7134
7134
|
this.overlay = inject(Overlay);
|
|
7135
7135
|
this.onChangeLanguage = item => {
|
|
7136
|
-
this.options
|
|
7136
|
+
this.options.set({ ...this.options(), mode: item.key });
|
|
7137
7137
|
this.activeLanguage = item;
|
|
7138
7138
|
CodeEditor.setCodeAttribute(this.editor, { language: item.key }, this.element);
|
|
7139
7139
|
};
|
|
@@ -7146,20 +7146,20 @@ class TheCode extends TheBaseElement {
|
|
|
7146
7146
|
}
|
|
7147
7147
|
onContextChange() {
|
|
7148
7148
|
super.onContextChange();
|
|
7149
|
-
if (this.isCollapsedAndNonReadonly && !isMobileMode(this.editor)) {
|
|
7150
|
-
this.openToolbar();
|
|
7151
|
-
}
|
|
7152
|
-
else {
|
|
7153
|
-
this.closeToolbar();
|
|
7154
|
-
}
|
|
7155
7149
|
if (this.initialized) {
|
|
7156
|
-
if (this.
|
|
7150
|
+
if (this.isCollapsedAndNonReadonly && !isMobileMode(this.editor)) {
|
|
7151
|
+
this.openToolbar();
|
|
7152
|
+
}
|
|
7153
|
+
else {
|
|
7154
|
+
this.closeToolbar();
|
|
7155
|
+
}
|
|
7156
|
+
if (this.options().readonly !== this.readonly) {
|
|
7157
7157
|
this.useReadonly();
|
|
7158
7158
|
}
|
|
7159
|
-
if (this.options.mode !== this.element.language) {
|
|
7159
|
+
if (this.options().mode !== this.element.language) {
|
|
7160
7160
|
this.useMode();
|
|
7161
7161
|
}
|
|
7162
|
-
if (this.options.lineWrapping !== this.element.autoWrap) {
|
|
7162
|
+
if (this.options().lineWrapping !== this.element.autoWrap) {
|
|
7163
7163
|
this.useAutoWrap();
|
|
7164
7164
|
}
|
|
7165
7165
|
if (this.resizeHeight !== this.element.height) {
|
|
@@ -7229,9 +7229,7 @@ class TheCode extends TheBaseElement {
|
|
|
7229
7229
|
this.useMode();
|
|
7230
7230
|
this.useAutoWrap();
|
|
7231
7231
|
this.useHeight();
|
|
7232
|
-
|
|
7233
|
-
this.useAutofocus();
|
|
7234
|
-
}
|
|
7232
|
+
this.useAutofocus();
|
|
7235
7233
|
}
|
|
7236
7234
|
codeChange($event) {
|
|
7237
7235
|
this.isHightLight = false;
|
|
@@ -7251,7 +7249,7 @@ class TheCode extends TheBaseElement {
|
|
|
7251
7249
|
}
|
|
7252
7250
|
}
|
|
7253
7251
|
useMode() {
|
|
7254
|
-
this.options
|
|
7252
|
+
this.options.set({ ...this.options(), mode: this.element.language });
|
|
7255
7253
|
const menuItem = this.menus.find(i => i.key === this.element.language);
|
|
7256
7254
|
if (menuItem) {
|
|
7257
7255
|
this.activeLanguage = menuItem;
|
|
@@ -7260,7 +7258,7 @@ class TheCode extends TheBaseElement {
|
|
|
7260
7258
|
useAutoWrap() {
|
|
7261
7259
|
const isPrint = isPrintMode(this.editor);
|
|
7262
7260
|
const lineWrapping = isPrint ? true : this.element.autoWrap || false;
|
|
7263
|
-
this.options
|
|
7261
|
+
this.options.set({ ...this.options(), lineWrapping });
|
|
7264
7262
|
}
|
|
7265
7263
|
useHeight() {
|
|
7266
7264
|
if (this.element.height && !isPrintMode(this.editor)) {
|
|
@@ -7269,10 +7267,12 @@ class TheCode extends TheBaseElement {
|
|
|
7269
7267
|
}
|
|
7270
7268
|
}
|
|
7271
7269
|
useReadonly() {
|
|
7272
|
-
this.options
|
|
7270
|
+
this.options.set({ ...this.options(), readonly: this.readonly, cursorBlinkRate: this.readonly ? -1 : 500 });
|
|
7273
7271
|
}
|
|
7274
7272
|
useAutofocus() {
|
|
7275
|
-
this.
|
|
7273
|
+
if (this.isCollapsedAndNonReadonly && Range.isCollapsed(this.editor.selection)) {
|
|
7274
|
+
this.options.set({ ...this.options(), autofocus: this.readonly ? false : true });
|
|
7275
|
+
}
|
|
7276
7276
|
}
|
|
7277
7277
|
onResize({ height }) {
|
|
7278
7278
|
this.resizeHeight = height;
|
|
@@ -7284,7 +7284,7 @@ class TheCode extends TheBaseElement {
|
|
|
7284
7284
|
}
|
|
7285
7285
|
onChangeWrap(value) {
|
|
7286
7286
|
this.isHightLight = false;
|
|
7287
|
-
this.options
|
|
7287
|
+
this.options.set({ ...this.options(), lineWrapping: value || false });
|
|
7288
7288
|
CodeEditor.setCodeAttribute(this.editor, { autoWrap: value ? value : null }, this.element);
|
|
7289
7289
|
}
|
|
7290
7290
|
ngOnDestroy() {
|
|
@@ -7292,7 +7292,7 @@ class TheCode extends TheBaseElement {
|
|
|
7292
7292
|
this.destroy$.complete();
|
|
7293
7293
|
}
|
|
7294
7294
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: TheCode, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
7295
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.14", type: TheCode, isStandalone: true, selector: "div[theCode]", host: { classAttribute: "the-code-container" }, viewQueries: [{ propertyName: "toolbar", first: true, predicate: ["toolbar"], descendants: true, read: TemplateRef, static: true }, { propertyName: "codemirror", first: true, predicate: ["codemirror"], descendants: true, read: CodeMirrorComponent }, { propertyName: "toolbarDropdown", first: true, predicate: TheToolbarDropdown, descendants: true, read: TheToolbarDropdown }], usesInheritance: true, ngImport: i0, template: "<!-- \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: isCollapsedAndNonReadonly, readonly: options.readonly, active: isHightLight && isCollapsedAndNonReadonly }\"\n>\n <ng-codemirror\n #codemirror\n [isDelayRender]=\"isDelayRender()\"\n contenteditable=\"false\"\n class=\"ng-codemirror-wrapper\"\n [ngStyle]=\"{ maxHeight: maxHeight > 0 ? maxHeight + 'px' : 'auto' }\"\n [options]=\"options\"\n [ngModel]=\"code\"\n (ngModelChange)=\"codeChange($event)\"\n (focusChange)=\"focusChange($event)\"\n >\n </ng-codemirror>\n @if (isCollapsedAndNonReadonly) {\n <thy-resize-handle thyDirection=\"bottom\" class=\"code-resize-icon\"></thy-resize-handle>\n }\n</div>\n\n<ng-template #toolbar>\n <thy-actions thySize=\"xxs\" thePreventDefault>\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 px-2 text-secondary\">\n <span>{{ locale().autoWrap }}</span>\n <thy-switch\n class=\"auto-wrap-btn d-flex ml-1\"\n [(ngModel)]=\"options.lineWrapping\"\n (ngModelChange)=\"onChangeWrap($event)\"\n thySize=\"sm\"\n ></thy-switch>\n </span>\n <a\n href=\"javascript:;\"\n thyAction\n thyActionIcon=\"copy\"\n [thyTooltip]=\"locale().copy\"\n thyTooltipPlacement=\"top\"\n (click)=\"onCopy($event)\"\n ></a>\n <thy-divider class=\"mr-2 ml-1 align-self-center\" [thyVertical]=\"true\" thyColor=\"light\"></thy-divider>\n <a\n href=\"javascript:;\"\n thyAction\n thyType=\"danger\"\n thyActionIcon=\"trash\"\n [thyTooltip]=\"locale().delete\"\n thyTooltipPlacement=\"top\"\n (click)=\"onDelete($event)\"\n ></a>\n </thy-actions>\n</ng-template>\n", dependencies: [{ kind: "directive", type: ThyResizableDirective, selector: "[thyResizable]", inputs: ["thyBounds", "thyMaxHeight", "thyMaxWidth", "thyMinHeight", "thyMinWidth", "thyGridColumnCount", "thyMaxColumn", "thyMinColumn", "thyLockAspectRatio", "thyPreview", "thyDisabled"], outputs: ["thyResize", "thyResizeStart", "thyResizeEnd"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: SlateModule }, { kind: "ngmodule", type: CodemirrorModule }, { kind: "component", type: i2$2.CodeMirrorComponent, selector: "ng-codemirror, [ngCodeMirror]", inputs: ["options", "extensions", "languages", "isDelayRender"], outputs: ["focusChange"] }, { kind: "component", type: ThySwitch, selector: "thy-switch", inputs: ["thyType", "thySize", "thyDisabled", "thyLoading"], outputs: ["thyChange"] }, { kind: "component", type: ThyAction, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }, { kind: "component", type: ThyDivider, selector: "thy-divider", inputs: ["thyVertical", "thyStyle", "thyColor", "thyText", "thyTextDirection", "thyDeeper"] }, { kind: "component", type: ThyActions, selector: "thy-actions", inputs: ["thySize"] }, { kind: "directive", type: ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { kind: "component", type: ThyResizeHandle, selector: "thy-resize-handle, [thy-resize-handle]", inputs: ["thyDirection", "thyLine"], outputs: ["thyMouseDown"], exportAs: ["thyResizeHandle"] }, { kind: "component", type: TheToolbarDropdown, selector: "the-toolbar-dropdown" }, { kind: "directive", type: ThePreventDefaultDirective, selector: "[thePreventDefault]", exportAs: ["thePreventDefault"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
7295
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.14", type: TheCode, isStandalone: true, selector: "div[theCode]", host: { classAttribute: "the-code-container" }, viewQueries: [{ propertyName: "toolbar", first: true, predicate: ["toolbar"], descendants: true, read: TemplateRef, static: true }, { propertyName: "codemirror", first: true, predicate: ["codemirror"], descendants: true, read: CodeMirrorComponent }, { propertyName: "toolbarDropdown", first: true, predicate: TheToolbarDropdown, descendants: true, read: TheToolbarDropdown }], usesInheritance: true, ngImport: i0, template: "<!-- \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: isCollapsedAndNonReadonly, readonly: options().readonly, active: isHightLight && isCollapsedAndNonReadonly }\"\n>\n <ng-codemirror\n #codemirror\n [isDelayRender]=\"isDelayRender()\"\n contenteditable=\"false\"\n class=\"ng-codemirror-wrapper\"\n [ngStyle]=\"{ maxHeight: maxHeight > 0 ? maxHeight + 'px' : 'auto' }\"\n [options]=\"options()\"\n [ngModel]=\"code\"\n (ngModelChange)=\"codeChange($event)\"\n (focusChange)=\"focusChange($event)\"\n >\n </ng-codemirror>\n @if (isCollapsedAndNonReadonly) {\n <thy-resize-handle thyDirection=\"bottom\" class=\"code-resize-icon\"></thy-resize-handle>\n }\n</div>\n\n<ng-template #toolbar>\n <thy-actions thySize=\"xxs\" thePreventDefault>\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 px-2 text-secondary\">\n <span>{{ locale().autoWrap }}</span>\n <thy-switch\n class=\"auto-wrap-btn d-flex ml-1\"\n [(ngModel)]=\"options().lineWrapping\"\n (ngModelChange)=\"onChangeWrap($event)\"\n thySize=\"sm\"\n ></thy-switch>\n </span>\n <a\n href=\"javascript:;\"\n thyAction\n thyActionIcon=\"copy\"\n [thyTooltip]=\"locale().copy\"\n thyTooltipPlacement=\"top\"\n (click)=\"onCopy($event)\"\n ></a>\n <thy-divider class=\"mr-2 ml-1 align-self-center\" [thyVertical]=\"true\" thyColor=\"light\"></thy-divider>\n <a\n href=\"javascript:;\"\n thyAction\n thyType=\"danger\"\n thyActionIcon=\"trash\"\n [thyTooltip]=\"locale().delete\"\n thyTooltipPlacement=\"top\"\n (click)=\"onDelete($event)\"\n ></a>\n </thy-actions>\n</ng-template>\n", dependencies: [{ kind: "directive", type: ThyResizableDirective, selector: "[thyResizable]", inputs: ["thyBounds", "thyMaxHeight", "thyMaxWidth", "thyMinHeight", "thyMinWidth", "thyGridColumnCount", "thyMaxColumn", "thyMinColumn", "thyLockAspectRatio", "thyPreview", "thyDisabled"], outputs: ["thyResize", "thyResizeStart", "thyResizeEnd"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: SlateModule }, { kind: "ngmodule", type: CodemirrorModule }, { kind: "component", type: i2$2.CodeMirrorComponent, selector: "ng-codemirror, [ngCodeMirror]", inputs: ["options", "extensions", "languages", "isDelayRender"], outputs: ["focusChange"] }, { kind: "component", type: ThySwitch, selector: "thy-switch", inputs: ["thyType", "thySize", "thyDisabled", "thyLoading"], outputs: ["thyChange"] }, { kind: "component", type: ThyAction, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }, { kind: "component", type: ThyDivider, selector: "thy-divider", inputs: ["thyVertical", "thyStyle", "thyColor", "thyText", "thyTextDirection", "thyDeeper"] }, { kind: "component", type: ThyActions, selector: "thy-actions", inputs: ["thySize"] }, { kind: "directive", type: ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { kind: "component", type: ThyResizeHandle, selector: "thy-resize-handle, [thy-resize-handle]", inputs: ["thyDirection", "thyLine"], outputs: ["thyMouseDown"], exportAs: ["thyResizeHandle"] }, { kind: "component", type: TheToolbarDropdown, selector: "the-toolbar-dropdown" }, { kind: "directive", type: ThePreventDefaultDirective, selector: "[thePreventDefault]", exportAs: ["thePreventDefault"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
7296
7296
|
}
|
|
7297
7297
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: TheCode, decorators: [{
|
|
7298
7298
|
type: Component,
|
|
@@ -7315,7 +7315,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
|
|
|
7315
7315
|
ThyResizeHandle,
|
|
7316
7316
|
TheToolbarDropdown,
|
|
7317
7317
|
ThePreventDefaultDirective
|
|
7318
|
-
], template: "<!-- \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: isCollapsedAndNonReadonly, readonly: options.readonly, active: isHightLight && isCollapsedAndNonReadonly }\"\n>\n <ng-codemirror\n #codemirror\n [isDelayRender]=\"isDelayRender()\"\n contenteditable=\"false\"\n class=\"ng-codemirror-wrapper\"\n [ngStyle]=\"{ maxHeight: maxHeight > 0 ? maxHeight + 'px' : 'auto' }\"\n [options]=\"options\"\n [ngModel]=\"code\"\n (ngModelChange)=\"codeChange($event)\"\n (focusChange)=\"focusChange($event)\"\n >\n </ng-codemirror>\n @if (isCollapsedAndNonReadonly) {\n <thy-resize-handle thyDirection=\"bottom\" class=\"code-resize-icon\"></thy-resize-handle>\n }\n</div>\n\n<ng-template #toolbar>\n <thy-actions thySize=\"xxs\" thePreventDefault>\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 px-2 text-secondary\">\n <span>{{ locale().autoWrap }}</span>\n <thy-switch\n class=\"auto-wrap-btn d-flex ml-1\"\n [(ngModel)]=\"options.lineWrapping\"\n (ngModelChange)=\"onChangeWrap($event)\"\n thySize=\"sm\"\n ></thy-switch>\n </span>\n <a\n href=\"javascript:;\"\n thyAction\n thyActionIcon=\"copy\"\n [thyTooltip]=\"locale().copy\"\n thyTooltipPlacement=\"top\"\n (click)=\"onCopy($event)\"\n ></a>\n <thy-divider class=\"mr-2 ml-1 align-self-center\" [thyVertical]=\"true\" thyColor=\"light\"></thy-divider>\n <a\n href=\"javascript:;\"\n thyAction\n thyType=\"danger\"\n thyActionIcon=\"trash\"\n [thyTooltip]=\"locale().delete\"\n thyTooltipPlacement=\"top\"\n (click)=\"onDelete($event)\"\n ></a>\n </thy-actions>\n</ng-template>\n" }]
|
|
7318
|
+
], template: "<!-- \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: isCollapsedAndNonReadonly, readonly: options().readonly, active: isHightLight && isCollapsedAndNonReadonly }\"\n>\n <ng-codemirror\n #codemirror\n [isDelayRender]=\"isDelayRender()\"\n contenteditable=\"false\"\n class=\"ng-codemirror-wrapper\"\n [ngStyle]=\"{ maxHeight: maxHeight > 0 ? maxHeight + 'px' : 'auto' }\"\n [options]=\"options()\"\n [ngModel]=\"code\"\n (ngModelChange)=\"codeChange($event)\"\n (focusChange)=\"focusChange($event)\"\n >\n </ng-codemirror>\n @if (isCollapsedAndNonReadonly) {\n <thy-resize-handle thyDirection=\"bottom\" class=\"code-resize-icon\"></thy-resize-handle>\n }\n</div>\n\n<ng-template #toolbar>\n <thy-actions thySize=\"xxs\" thePreventDefault>\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 px-2 text-secondary\">\n <span>{{ locale().autoWrap }}</span>\n <thy-switch\n class=\"auto-wrap-btn d-flex ml-1\"\n [(ngModel)]=\"options().lineWrapping\"\n (ngModelChange)=\"onChangeWrap($event)\"\n thySize=\"sm\"\n ></thy-switch>\n </span>\n <a\n href=\"javascript:;\"\n thyAction\n thyActionIcon=\"copy\"\n [thyTooltip]=\"locale().copy\"\n thyTooltipPlacement=\"top\"\n (click)=\"onCopy($event)\"\n ></a>\n <thy-divider class=\"mr-2 ml-1 align-self-center\" [thyVertical]=\"true\" thyColor=\"light\"></thy-divider>\n <a\n href=\"javascript:;\"\n thyAction\n thyType=\"danger\"\n thyActionIcon=\"trash\"\n [thyTooltip]=\"locale().delete\"\n thyTooltipPlacement=\"top\"\n (click)=\"onDelete($event)\"\n ></a>\n </thy-actions>\n</ng-template>\n" }]
|
|
7319
7319
|
}], propDecorators: { toolbar: [{
|
|
7320
7320
|
type: ViewChild,
|
|
7321
7321
|
args: ['toolbar', { read: TemplateRef, static: true }]
|