@worktile/theia 20.1.0-next.13 → 20.1.0-next.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.
@@ -7091,7 +7091,7 @@ class TheCode extends TheBaseElement {
7091
7091
  this.destroy$ = new Subject();
7092
7092
  this.isHightLight = false;
7093
7093
  this.resizeHeight = null;
7094
- this.options = {
7094
+ this.options = signal({
7095
7095
  mode: DEFAULT_LANGUAGE.value,
7096
7096
  lineNumbers: false,
7097
7097
  readonly: false,
@@ -7099,7 +7099,7 @@ class TheCode extends TheBaseElement {
7099
7099
  lineWiseCopyCut: true,
7100
7100
  lineWrapping: false,
7101
7101
  cursorBlinkRate: 500
7102
- };
7102
+ }, ...(ngDevMode ? [{ debugName: "options" }] : []));
7103
7103
  this.resizeBounds = null;
7104
7104
  this.isDelayRender = signal(false, ...(ngDevMode ? [{ debugName: "isDelayRender" }] : []));
7105
7105
  this.thyNotifyService = inject(ThyNotifyService);
@@ -7108,7 +7108,7 @@ class TheCode extends TheBaseElement {
7108
7108
  this.thyPopover = inject(ThyPopover);
7109
7109
  this.overlay = inject(Overlay);
7110
7110
  this.onChangeLanguage = item => {
7111
- this.options = { ...this.options, mode: item.key };
7111
+ this.options.set({ ...this.options(), mode: item.key });
7112
7112
  this.activeLanguage = item;
7113
7113
  CodeEditor.setCodeAttribute(this.editor, { language: item.key }, this.element);
7114
7114
  };
@@ -7128,13 +7128,13 @@ class TheCode extends TheBaseElement {
7128
7128
  this.closeToolbar();
7129
7129
  }
7130
7130
  if (this.initialized) {
7131
- if (this.options.readonly !== this.readonly) {
7131
+ if (this.options().readonly !== this.readonly) {
7132
7132
  this.useReadonly();
7133
7133
  }
7134
- if (this.options.mode !== this.element.language) {
7134
+ if (this.options().mode !== this.element.language) {
7135
7135
  this.useMode();
7136
7136
  }
7137
- if (this.options.lineWrapping !== this.element.autoWrap) {
7137
+ if (this.options().lineWrapping !== this.element.autoWrap) {
7138
7138
  this.useAutoWrap();
7139
7139
  }
7140
7140
  if (this.resizeHeight !== this.element.height) {
@@ -7171,9 +7171,13 @@ class TheCode extends TheBaseElement {
7171
7171
  }
7172
7172
  }
7173
7173
  ngAfterViewInit() {
7174
- if (this.isCollapsedAndNonReadonly) {
7175
- this.useAutofocus();
7176
- }
7174
+ this.codemirror.view.requestMeasure({
7175
+ read: view => {
7176
+ if (this.isCollapsedAndNonReadonly) {
7177
+ this.useAutofocus();
7178
+ }
7179
+ }
7180
+ });
7177
7181
  }
7178
7182
  initMaxHeight() {
7179
7183
  this.maxHeight = isPrintMode(this.editor) ? 0 : 350 - CODEMIRROR_PADDING_TOP * 2;
@@ -7226,7 +7230,7 @@ class TheCode extends TheBaseElement {
7226
7230
  }
7227
7231
  }
7228
7232
  useMode() {
7229
- this.options = { ...this.options, mode: this.element.language };
7233
+ this.options.set({ ...this.options(), mode: this.element.language });
7230
7234
  const menuItem = this.menus.find(i => i.key === this.element.language);
7231
7235
  if (menuItem) {
7232
7236
  this.activeLanguage = menuItem;
@@ -7235,7 +7239,7 @@ class TheCode extends TheBaseElement {
7235
7239
  useAutoWrap() {
7236
7240
  const isPrint = isPrintMode(this.editor);
7237
7241
  const lineWrapping = isPrint ? true : this.element.autoWrap || false;
7238
- this.options = { ...this.options, lineWrapping };
7242
+ this.options.set({ ...this.options(), lineWrapping });
7239
7243
  }
7240
7244
  useHeight() {
7241
7245
  if (this.element.height && !isPrintMode(this.editor)) {
@@ -7244,10 +7248,10 @@ class TheCode extends TheBaseElement {
7244
7248
  }
7245
7249
  }
7246
7250
  useReadonly() {
7247
- this.options = { ...this.options, readonly: this.readonly, cursorBlinkRate: this.readonly ? -1 : 500 };
7251
+ this.options.set({ ...this.options(), readonly: this.readonly, cursorBlinkRate: this.readonly ? -1 : 500 });
7248
7252
  }
7249
7253
  useAutofocus() {
7250
- this.options = { ...this.options, autofocus: true };
7254
+ this.options.set({ ...this.options(), autofocus: true });
7251
7255
  }
7252
7256
  onResize({ height }) {
7253
7257
  this.resizeHeight = height;
@@ -7259,7 +7263,7 @@ class TheCode extends TheBaseElement {
7259
7263
  }
7260
7264
  onChangeWrap(value) {
7261
7265
  this.isHightLight = false;
7262
- this.options = { ...this.options, lineWrapping: value || false };
7266
+ this.options.set({ ...this.options(), lineWrapping: value || false });
7263
7267
  CodeEditor.setCodeAttribute(this.editor, { autoWrap: value ? value : null }, this.element);
7264
7268
  }
7265
7269
  ngOnDestroy() {
@@ -7267,7 +7271,7 @@ class TheCode extends TheBaseElement {
7267
7271
  this.destroy$.complete();
7268
7272
  }
7269
7273
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: TheCode, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
7270
- 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 }); }
7274
+ 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 }); }
7271
7275
  }
7272
7276
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: TheCode, decorators: [{
7273
7277
  type: Component,
@@ -7290,7 +7294,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
7290
7294
  ThyResizeHandle,
7291
7295
  TheToolbarDropdown,
7292
7296
  ThePreventDefaultDirective
7293
- ], 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" }]
7297
+ ], 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" }]
7294
7298
  }], propDecorators: { toolbar: [{
7295
7299
  type: ViewChild,
7296
7300
  args: ['toolbar', { read: TemplateRef, static: true }]