@worktile/theia 1.2.19 → 2.1.0
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 +49 -57
- package/bundles/worktile-theia.umd.js.map +1 -1
- package/esm2015/plugins/code/code.component.js +45 -52
- package/esm2015/plugins/font-size/toolbar-item.component.js +2 -2
- package/fesm2015/worktile-theia.js +38 -46
- package/fesm2015/worktile-theia.js.map +1 -1
- package/package.json +1 -1
- package/plugins/code/code.component.d.ts +6 -7
- package/plugins/font-size/toolbar-item.component.scss +12 -1
- package/styles/editor.scss +2 -1
|
@@ -34,22 +34,22 @@ import * as i3 from 'ngx-tethys/nav';
|
|
|
34
34
|
import { ThyNavModule } from 'ngx-tethys/nav';
|
|
35
35
|
import * as i5$1 from 'ngx-tethys/tooltip';
|
|
36
36
|
import { ThyTooltipModule } from 'ngx-tethys/tooltip';
|
|
37
|
-
import * as
|
|
37
|
+
import * as i8 from 'ng-codemirror';
|
|
38
38
|
import { CodeMirrorComponent, CodemirrorModule } from 'ng-codemirror';
|
|
39
39
|
import * as i1$4 from 'ngx-tethys/notify';
|
|
40
40
|
import { ThyNotifyModule } from 'ngx-tethys/notify';
|
|
41
41
|
import * as i5$2 from 'ngx-tethys/action-menu';
|
|
42
42
|
import { ThyActionMenuModule } from 'ngx-tethys/action-menu';
|
|
43
|
-
import * as
|
|
43
|
+
import * as i6$1 from 'ngx-tethys/switch';
|
|
44
44
|
import { ThySwitchModule } from 'ngx-tethys/switch';
|
|
45
|
-
import * as
|
|
45
|
+
import * as i9 from 'ngx-tethys/resizable';
|
|
46
46
|
import { ThyResizableModule } from 'ngx-tethys/resizable';
|
|
47
47
|
import isUrl from 'is-url';
|
|
48
48
|
import * as i1$5 from 'ngx-tethys/button';
|
|
49
49
|
import { ThyButtonModule } from 'ngx-tethys/button';
|
|
50
50
|
import * as i2$1 from 'ngx-tethys/form';
|
|
51
51
|
import { ThyFormModule } from 'ngx-tethys/form';
|
|
52
|
-
import * as i5$
|
|
52
|
+
import * as i5$3 from 'ngx-tethys/shared';
|
|
53
53
|
import { ThySharedModule } from 'ngx-tethys/shared';
|
|
54
54
|
import * as i1$6 from 'ngx-tethys';
|
|
55
55
|
import { coerceCssPixelValue } from '@angular/cdk/coercion';
|
|
@@ -6344,23 +6344,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImpor
|
|
|
6344
6344
|
}] } });
|
|
6345
6345
|
|
|
6346
6346
|
class TheCodeComponent extends TheBaseElementComponent {
|
|
6347
|
-
constructor(elementRef, cdr, thyNotifyService, ngZone, config) {
|
|
6347
|
+
constructor(elementRef, cdr, thyNotifyService, contextService, ngZone, config) {
|
|
6348
6348
|
super(elementRef, cdr);
|
|
6349
6349
|
this.elementRef = elementRef;
|
|
6350
6350
|
this.cdr = cdr;
|
|
6351
6351
|
this.thyNotifyService = thyNotifyService;
|
|
6352
|
+
this.contextService = contextService;
|
|
6352
6353
|
this.ngZone = ngZone;
|
|
6353
6354
|
this.config = config;
|
|
6354
6355
|
this.startRenderCodemirror = false;
|
|
6355
6356
|
this.dropdownMode = DropdownMode;
|
|
6356
|
-
this.codeMirrorFocused = false;
|
|
6357
6357
|
this.maxHeight = this.config.mode === CodeMode.default ? 350 - CODEMIRROR_PADDING_TOP * 2 : 0;
|
|
6358
6358
|
this.menus = CODE_MODES.map(item => {
|
|
6359
6359
|
return { key: item.value, name: item.showName };
|
|
6360
6360
|
});
|
|
6361
6361
|
this.ToolbarItemMode = ToolbarItemMode;
|
|
6362
|
-
this.
|
|
6363
|
-
this.isResizing = false;
|
|
6362
|
+
this.isFocusCode = false;
|
|
6364
6363
|
this.resizeHeight = null;
|
|
6365
6364
|
this.options = {
|
|
6366
6365
|
mode: this.menus[0].key,
|
|
@@ -6372,20 +6371,16 @@ class TheCodeComponent extends TheBaseElementComponent {
|
|
|
6372
6371
|
cursorBlinkRate: 500
|
|
6373
6372
|
};
|
|
6374
6373
|
this.actives = this.menus[0];
|
|
6374
|
+
this.resizeBounds = null;
|
|
6375
6375
|
this.onChangeLangulage = item => {
|
|
6376
6376
|
this.options = Object.assign(Object.assign({}, this.options), { mode: item.key });
|
|
6377
6377
|
this.actives = item;
|
|
6378
|
-
CodeEditor.setCodeAttribute(this.editor, this.element, {
|
|
6378
|
+
CodeEditor.setCodeAttribute(this.editor, this.element, { language: item.key });
|
|
6379
6379
|
};
|
|
6380
6380
|
}
|
|
6381
6381
|
get code() {
|
|
6382
6382
|
return this.element.content;
|
|
6383
6383
|
}
|
|
6384
|
-
handleCodeMousedown(event) {
|
|
6385
|
-
if (!(event.target instanceof HTMLElement && this.elementRef.nativeElement.contains(event.target))) {
|
|
6386
|
-
this.codeMirrorFocused = false;
|
|
6387
|
-
}
|
|
6388
|
-
}
|
|
6389
6384
|
onContextChange() {
|
|
6390
6385
|
super.onContextChange();
|
|
6391
6386
|
if (this.initialized) {
|
|
@@ -6395,8 +6390,14 @@ class TheCodeComponent extends TheBaseElementComponent {
|
|
|
6395
6390
|
if (this.options.mode !== this.element.language) {
|
|
6396
6391
|
this.useMode();
|
|
6397
6392
|
}
|
|
6398
|
-
if (
|
|
6399
|
-
this.
|
|
6393
|
+
if (this.options.lineWrapping !== this.element.autoWrap) {
|
|
6394
|
+
this.useAutoWrap();
|
|
6395
|
+
}
|
|
6396
|
+
if (this.resizeHeight !== this.element.height) {
|
|
6397
|
+
this.useHeight();
|
|
6398
|
+
}
|
|
6399
|
+
if (!this.isCollapsed) {
|
|
6400
|
+
this.isFocusCode = false;
|
|
6400
6401
|
}
|
|
6401
6402
|
}
|
|
6402
6403
|
}
|
|
@@ -6417,13 +6418,12 @@ class TheCodeComponent extends TheBaseElementComponent {
|
|
|
6417
6418
|
this.ngZone.onStable.pipe(take(1)).subscribe(() => {
|
|
6418
6419
|
this.renderCodemirror();
|
|
6419
6420
|
this.initializeCodemirrorFocus();
|
|
6421
|
+
this.resizeBounds = {
|
|
6422
|
+
nativeElement: this.contextService.getEditableElement()
|
|
6423
|
+
};
|
|
6420
6424
|
});
|
|
6421
6425
|
}
|
|
6422
6426
|
}
|
|
6423
|
-
focusChange(codeMirrorFocused) {
|
|
6424
|
-
if (codeMirrorFocused)
|
|
6425
|
-
this.codeMirrorFocused = codeMirrorFocused;
|
|
6426
|
-
}
|
|
6427
6427
|
renderCodemirror() {
|
|
6428
6428
|
this.startRenderCodemirror = true;
|
|
6429
6429
|
this.useReadonly();
|
|
@@ -6433,7 +6433,7 @@ class TheCodeComponent extends TheBaseElementComponent {
|
|
|
6433
6433
|
this.cdr.detectChanges();
|
|
6434
6434
|
}
|
|
6435
6435
|
initializeCodemirrorFocus() {
|
|
6436
|
-
if (this.isCollapsed
|
|
6436
|
+
if (this.isCollapsed) {
|
|
6437
6437
|
setTimeout(() => {
|
|
6438
6438
|
if (this.isCollapsed && this.codemirror && this.codemirror.editor && !this.codemirror.editor.hasFocus()) {
|
|
6439
6439
|
AngularEditor.blur(this.editor);
|
|
@@ -6448,7 +6448,7 @@ class TheCodeComponent extends TheBaseElementComponent {
|
|
|
6448
6448
|
}
|
|
6449
6449
|
onDelete(event) {
|
|
6450
6450
|
event.preventDefault();
|
|
6451
|
-
this.
|
|
6451
|
+
this.isFocusCode = false;
|
|
6452
6452
|
deleteElement(this.editor, this.element);
|
|
6453
6453
|
}
|
|
6454
6454
|
onCopy(event) {
|
|
@@ -6464,18 +6464,17 @@ class TheCodeComponent extends TheBaseElementComponent {
|
|
|
6464
6464
|
document.execCommand('copy');
|
|
6465
6465
|
this.thyNotifyService.success('复制成功');
|
|
6466
6466
|
AngularEditor.deselect(this.editor);
|
|
6467
|
-
|
|
6467
|
+
}
|
|
6468
|
+
focusChange(codeMirrorFocused) {
|
|
6469
|
+
if (codeMirrorFocused)
|
|
6470
|
+
this.isFocusCode = codeMirrorFocused;
|
|
6468
6471
|
}
|
|
6469
6472
|
useMode() {
|
|
6470
6473
|
this.options = Object.assign(Object.assign({}, this.options), { mode: this.element.language });
|
|
6471
6474
|
this.actives = this.menus.find(i => i.key === this.element.language);
|
|
6472
6475
|
}
|
|
6473
6476
|
useAutoWrap() {
|
|
6474
|
-
|
|
6475
|
-
this.cdr.detectChanges();
|
|
6476
|
-
this.isAutoWrap = this.element.autoWrap;
|
|
6477
|
-
this.codemirror.setOptionIfChanged('lineWrapping', this.element.autoWrap);
|
|
6478
|
-
}
|
|
6477
|
+
this.options = Object.assign(Object.assign({}, this.options), { lineWrapping: this.element.autoWrap || false });
|
|
6479
6478
|
}
|
|
6480
6479
|
useHeight() {
|
|
6481
6480
|
if (this.element.height) {
|
|
@@ -6488,39 +6487,32 @@ class TheCodeComponent extends TheBaseElementComponent {
|
|
|
6488
6487
|
}
|
|
6489
6488
|
onResize({ height }) {
|
|
6490
6489
|
this.resizeHeight = height;
|
|
6491
|
-
Transforms.select(this.editor, AngularEditor.findPath(this.editor, this.element));
|
|
6492
|
-
CodeEditor.setCodeAttribute(this.editor, this.element, { height });
|
|
6493
6490
|
this.maxHeight = height;
|
|
6494
6491
|
}
|
|
6495
|
-
onStartResize() {
|
|
6496
|
-
this.isResizing = true;
|
|
6497
|
-
}
|
|
6498
6492
|
onEndResize() {
|
|
6499
|
-
this.
|
|
6493
|
+
Transforms.select(this.editor, AngularEditor.findPath(this.editor, this.element));
|
|
6494
|
+
CodeEditor.setCodeAttribute(this.editor, this.element, { height: this.resizeHeight });
|
|
6500
6495
|
}
|
|
6501
6496
|
onChangeWrap(value) {
|
|
6502
|
-
|
|
6503
|
-
this.codemirror.setOptionIfChanged('lineWrapping', value);
|
|
6497
|
+
this.options = Object.assign(Object.assign({}, this.options), { lineWrapping: value || false });
|
|
6504
6498
|
CodeEditor.setCodeAttribute(this.editor, this.element, { autoWrap: value ? value : null });
|
|
6505
6499
|
}
|
|
6506
6500
|
}
|
|
6507
|
-
TheCodeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TheCodeComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i1$4.ThyNotifyService }, { token: i0.NgZone }, { token: THE_CODE_MODE_TOKEN }], target: i0.ɵɵFactoryTarget.Component });
|
|
6508
|
-
TheCodeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheCodeComponent, selector: "div[theCode]",
|
|
6501
|
+
TheCodeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TheCodeComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i1$4.ThyNotifyService }, { token: TheContextService }, { token: i0.NgZone }, { token: THE_CODE_MODE_TOKEN }], target: i0.ɵɵFactoryTarget.Component });
|
|
6502
|
+
TheCodeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheCodeComponent, selector: "div[theCode]", viewQueries: [{ propertyName: "codemirror", first: true, predicate: ["codemirror"], descendants: true, read: CodeMirrorComponent }], usesInheritance: true, ngImport: i0, template: "<div contenteditable=\"false\" class=\"the-code-block-operation\" *ngIf=\"isFocusCode && !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)]=\"element.autoWrap\"\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<div\n thyResizable\n [thyMinHeight]=\"42\"\n [thyBounds]=\"resizeBounds\"\n [style.height.px]=\"resizeHeight\"\n (thyResize)=\"onResize($event)\"\n (thyResizeEnd)=\"onEndResize()\"\n class=\"resize-code-container\"\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=\"isFocusCode && !options.readOnly\"></thy-resize-handle>\n</div>\n", components: [{ type: i3.ThyIconNavComponent, selector: "thy-icon-nav", inputs: ["thyType"] }, { type: TheToolbarDropdownComponent, selector: "the-toolbar-dropdown", inputs: ["toolbarItem", "menus", "mode", "item", "itemMousedownHandle"] }, { type: i3.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: NavSplitLineComponent, selector: "nav-split-line", inputs: ["mode"] }, { type: i6$1.ThySwitchComponent, selector: "thy-switch", inputs: ["thyType", "thySize", "thyDisabled"], outputs: ["thyChange"] }, { type: i1.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }, { type: i8.CodeMirrorComponent, selector: "ng-codemirror, [ngCodeMirror]", inputs: ["autoMaxHeight", "delayRefreshTime", "options"], outputs: ["focusChange"] }, { type: i9.ThyResizeHandleComponent, selector: "thy-resize-handle, [thy-resize-handle]", inputs: ["thyDirection"], outputs: ["thyMouseDown"], exportAs: ["thyResizeHandle"] }], directives: [{ type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { type: i4$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i9.ThyResizableDirective, selector: "[thyResizable]", inputs: ["thyBounds", "thyMaxHeight", "thyMaxWidth", "thyMinHeight", "thyMinWidth", "thyGridColumnCount", "thyMaxColumn", "thyMinColumn", "thyLockAspectRatio", "thyPreview", "thyDisabled"], outputs: ["thyResize", "thyResizeEnd", "thyResizeStart"] }, { type: i6.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
6509
6503
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TheCodeComponent, decorators: [{
|
|
6510
6504
|
type: Component,
|
|
6511
6505
|
args: [{
|
|
6512
6506
|
selector: 'div[theCode]',
|
|
6513
|
-
templateUrl: './code.component.html'
|
|
6507
|
+
templateUrl: './code.component.html',
|
|
6508
|
+
changeDetection: ChangeDetectionStrategy.OnPush
|
|
6514
6509
|
}]
|
|
6515
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i1$4.ThyNotifyService }, { type: i0.NgZone }, { type: TheCodeConfig, decorators: [{
|
|
6510
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i1$4.ThyNotifyService }, { type: TheContextService }, { type: i0.NgZone }, { type: TheCodeConfig, decorators: [{
|
|
6516
6511
|
type: Inject,
|
|
6517
6512
|
args: [THE_CODE_MODE_TOKEN]
|
|
6518
6513
|
}] }]; }, propDecorators: { codemirror: [{
|
|
6519
6514
|
type: ViewChild,
|
|
6520
6515
|
args: ['codemirror', { read: CodeMirrorComponent, static: false }]
|
|
6521
|
-
}], handleCodeMousedown: [{
|
|
6522
|
-
type: HostListener,
|
|
6523
|
-
args: ['document: mousedown', ['$event']]
|
|
6524
6516
|
}] } });
|
|
6525
6517
|
|
|
6526
6518
|
const withCode = (editor) => {
|
|
@@ -6731,7 +6723,7 @@ class TheLinkEditComponent {
|
|
|
6731
6723
|
}
|
|
6732
6724
|
}
|
|
6733
6725
|
TheLinkEditComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TheLinkEditComponent, deps: [{ token: i1$3.ThyPopoverRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
6734
|
-
TheLinkEditComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheLinkEditComponent, selector: "the-link-edit", inputs: { tag: "tag", node: "node", link: "link", text: "text", originSelection: "originSelection" }, host: { listeners: { "document: mousedown": "handleDocumentMouseDown($event)" }, properties: { "class": "this.className" } }, ngImport: i0, template: "<form\n thyForm\n #linkForm=\"thyForm\"\n [thyFormValidatorConfig]=\"validatorConfig\"\n name=\"linkForm\"\n>\n <thy-form-group thyLabelText=\"\u6587\u672C\">\n <input\n thyInput\n placeholder=\"\u8BF7\u8F93\u5165\u6587\u672C\"\n required\n name=\"text\"\n [(ngModel)]=\"text\"\n thyAutofocus\n type=\"text\"\n />\n </thy-form-group>\n <thy-form-group thyLabelText=\"\u94FE\u63A5\">\n <input\n name=\"link\"\n thyInput\n placeholder=\"\u8BF7\u8F93\u5165\u94FE\u63A5\"\n required\n type=\"text\"\n #linkControl=\"ngModel\"\n [(ngModel)]=\"link\"\n />\n </thy-form-group>\n <thy-form-group-footer>\n <div class=\"btn-pair\">\n <button\n thyButton=\"link-secondary\"\n thySize=\"sm\"\n (click)=\"closePopover()\"\n >\u53D6\u6D88</button>\n <button\n thyButton=\"primary-square\"\n thySize=\"sm\"\n (thyFormSubmit)=\"applyLink(linkForm)\"\n >\u5E94\u7528</button>\n </div>\n </thy-form-group-footer>\n</form>\n", components: [{ type: i2$1.ThyFormGroupComponent, selector: "thy-form-group", inputs: ["thyLabelText", "thyLabelTextTranslateKey", "thyLabelRequired", "thyLabelPaddingTopClear", "thyFeedbackIcon", "thyTips", "thyTipsTranslateKey", "thyRowFill"] }, { type: i2$1.ThyFormGroupFooterComponent, selector: "thy-form-group-footer", inputs: ["thyAlign"] }, { type: i1$5.ThyButtonComponent, selector: "thy-button,[thy-button],[thyButton]", inputs: ["thyButton", "thyType", "thyLoading", "thyLoadingText", "thySize", "thyIcon", "thySquare", "thyBlock"] }], directives: [{ type: i4$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i4$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i4$2.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i2$1.ThyFormDirective, selector: "[thyForm],[thy-form]", inputs: ["thyLayout", "thyEnterKeyMode", "thyFormValidatorConfig"], exportAs: ["thyForm"] }, { type: i5$
|
|
6726
|
+
TheLinkEditComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheLinkEditComponent, selector: "the-link-edit", inputs: { tag: "tag", node: "node", link: "link", text: "text", originSelection: "originSelection" }, host: { listeners: { "document: mousedown": "handleDocumentMouseDown($event)" }, properties: { "class": "this.className" } }, ngImport: i0, template: "<form\n thyForm\n #linkForm=\"thyForm\"\n [thyFormValidatorConfig]=\"validatorConfig\"\n name=\"linkForm\"\n>\n <thy-form-group thyLabelText=\"\u6587\u672C\">\n <input\n thyInput\n placeholder=\"\u8BF7\u8F93\u5165\u6587\u672C\"\n required\n name=\"text\"\n [(ngModel)]=\"text\"\n thyAutofocus\n type=\"text\"\n />\n </thy-form-group>\n <thy-form-group thyLabelText=\"\u94FE\u63A5\">\n <input\n name=\"link\"\n thyInput\n placeholder=\"\u8BF7\u8F93\u5165\u94FE\u63A5\"\n required\n type=\"text\"\n #linkControl=\"ngModel\"\n [(ngModel)]=\"link\"\n />\n </thy-form-group>\n <thy-form-group-footer>\n <div class=\"btn-pair\">\n <button\n thyButton=\"link-secondary\"\n thySize=\"sm\"\n (click)=\"closePopover()\"\n >\u53D6\u6D88</button>\n <button\n thyButton=\"primary-square\"\n thySize=\"sm\"\n (thyFormSubmit)=\"applyLink(linkForm)\"\n >\u5E94\u7528</button>\n </div>\n </thy-form-group-footer>\n</form>\n", components: [{ type: i2$1.ThyFormGroupComponent, selector: "thy-form-group", inputs: ["thyLabelText", "thyLabelTextTranslateKey", "thyLabelRequired", "thyLabelPaddingTopClear", "thyFeedbackIcon", "thyTips", "thyTipsTranslateKey", "thyRowFill"] }, { type: i2$1.ThyFormGroupFooterComponent, selector: "thy-form-group-footer", inputs: ["thyAlign"] }, { type: i1$5.ThyButtonComponent, selector: "thy-button,[thy-button],[thyButton]", inputs: ["thyButton", "thyType", "thyLoading", "thyLoadingText", "thySize", "thyIcon", "thySquare", "thyBlock"] }], directives: [{ type: i4$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i4$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i4$2.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i2$1.ThyFormDirective, selector: "[thyForm],[thy-form]", inputs: ["thyLayout", "thyEnterKeyMode", "thyFormValidatorConfig"], exportAs: ["thyForm"] }, { type: i5$3.ThyAutofocusDirective, selector: "input[thyAutofocus],textarea[thyAutofocus]", inputs: ["thyAutoSelect", "thyAutofocus"] }, { type: i4$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i5.ThyInputDirective, selector: "[thyInput]", inputs: ["thySize", "thyAutocomplete"] }, { type: i4$2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i4$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i2$1.ThyFormSubmitDirective, selector: "[thyFormSubmit],[thy-form-submit]", outputs: ["thyFormSubmit"] }] });
|
|
6735
6727
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TheLinkEditComponent, decorators: [{
|
|
6736
6728
|
type: Component,
|
|
6737
6729
|
args: [{
|
|
@@ -10774,7 +10766,7 @@ class TheQuickToolbarComponent extends mixinUnsubscribe(MixinBase) {
|
|
|
10774
10766
|
}
|
|
10775
10767
|
}
|
|
10776
10768
|
TheQuickToolbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TheQuickToolbarComponent, deps: [{ token: i1$3.ThyPopoverRef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
10777
|
-
TheQuickToolbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheQuickToolbarComponent, selector: "the-quick-toolbar", inputs: { editor: "editor", quickToolbarItems: "quickToolbarItems" }, host: { listeners: { "document: mousedown": "handleMouseDown($event)", "document: keydown.enter": "handleEnter()" } }, usesInheritance: true, ngImport: i0, template: "<thy-selection-list\n class=\"the-quick-toolbar\"\n [thyBindKeyEventContainer]=\"editorElement\"\n (thySelectionChange)=\"selectionChange($event)\"\n [thyMultiple]=\"false\"\n>\n <ng-container *ngFor=\"let item of quickToolbarItems\">\n <ng-container *ngIf=\"item.key !== ToolbarActionTypes.split; else splitLine\">\n <thy-list-option [thyValue]=\"item?.key\" (mousedown)=\"stopPropagation($event)\">\n <the-toolbar-item [editor]=\"editor\" [item]=\"item\" [itemMode]=\"ToolbarItemMode.vertical\"></the-toolbar-item>\n </thy-list-option>\n </ng-container>\n </ng-container>\n</thy-selection-list>\n\n<ng-template #splitLine>\n <nav-split-line [mode]=\"ToolbarItemMode.horizontal\"></nav-split-line>\n</ng-template>\n", components: [{ type: i2$2.ThySelectionListComponent, selector: "thy-selection-list,[thy-selection-list]", inputs: ["thyMultiple", "thyBindKeyEventContainer", "thyScrollContainer", "thyBeforeKeydown", "thyUniqueKey", "thyCompareWith", "thyLayout", "thyAutoActiveFirstItem", "thySize", "thySpaceKeyEnabled"], outputs: ["thySelectionChange"] }, { type: i5$
|
|
10769
|
+
TheQuickToolbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheQuickToolbarComponent, selector: "the-quick-toolbar", inputs: { editor: "editor", quickToolbarItems: "quickToolbarItems" }, host: { listeners: { "document: mousedown": "handleMouseDown($event)", "document: keydown.enter": "handleEnter()" } }, usesInheritance: true, ngImport: i0, template: "<thy-selection-list\n class=\"the-quick-toolbar\"\n [thyBindKeyEventContainer]=\"editorElement\"\n (thySelectionChange)=\"selectionChange($event)\"\n [thyMultiple]=\"false\"\n>\n <ng-container *ngFor=\"let item of quickToolbarItems\">\n <ng-container *ngIf=\"item.key !== ToolbarActionTypes.split; else splitLine\">\n <thy-list-option [thyValue]=\"item?.key\" (mousedown)=\"stopPropagation($event)\">\n <the-toolbar-item [editor]=\"editor\" [item]=\"item\" [itemMode]=\"ToolbarItemMode.vertical\"></the-toolbar-item>\n </thy-list-option>\n </ng-container>\n </ng-container>\n</thy-selection-list>\n\n<ng-template #splitLine>\n <nav-split-line [mode]=\"ToolbarItemMode.horizontal\"></nav-split-line>\n</ng-template>\n", components: [{ type: i2$2.ThySelectionListComponent, selector: "thy-selection-list,[thy-selection-list]", inputs: ["thyMultiple", "thyBindKeyEventContainer", "thyScrollContainer", "thyBeforeKeydown", "thyUniqueKey", "thyCompareWith", "thyLayout", "thyAutoActiveFirstItem", "thySize", "thySpaceKeyEnabled"], outputs: ["thySelectionChange"] }, { type: i5$3.ThyListOptionComponent, selector: "thy-list-option,[thy-list-option]", inputs: ["id", "thyValue", "thyDisabled"] }, { type: TheToolbarItemComponent, selector: "the-toolbar-item", inputs: ["item", "editor", "itemMode"] }, { type: NavSplitLineComponent, selector: "nav-split-line", inputs: ["mode"] }], directives: [{ type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
10778
10770
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TheQuickToolbarComponent, decorators: [{
|
|
10779
10771
|
type: Component,
|
|
10780
10772
|
args: [{
|
|
@@ -10977,7 +10969,7 @@ class TheFontSizeToolbarItemComponent extends TheToolbarBaseItemComponent {
|
|
|
10977
10969
|
}
|
|
10978
10970
|
}
|
|
10979
10971
|
TheFontSizeToolbarItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TheFontSizeToolbarItemComponent, deps: [{ token: i0.ElementRef }, { token: i1$3.ThyPopover }, { token: i0.ViewContainerRef }, { token: i2.Overlay }], target: i0.ɵɵFactoryTarget.Component });
|
|
10980
|
-
TheFontSizeToolbarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheFontSizeToolbarItemComponent, selector: "the-font-size-toolbar-item", inputs: { editor: "editor", item: "item" }, host: { listeners: { "mousedown": "toggleDropdown($event)", "document: mousedown": "handleDocumentMouseDown($event)" }, properties: { "class.the-toolbar-dropdown-container": "this.toolbarItemContainer", "class.the-font-size-toolbar-item": "this.fontSizeToolbarItem", "class.disabled": "this.disableClass" } }, viewQueries: [{ propertyName: "dropdownTemplate", first: true, predicate: ["dropdownTemplate"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<a thyIconNavLink class=\"text-mode\" [thyTooltip]=\"item?.name\" thyTooltipPlacement=\"top\">\n <span *ngIf=\"activeSize\" class=\"show-text\">{{ activeSize }}
|
|
10972
|
+
TheFontSizeToolbarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheFontSizeToolbarItemComponent, selector: "the-font-size-toolbar-item", inputs: { editor: "editor", item: "item" }, host: { listeners: { "mousedown": "toggleDropdown($event)", "document: mousedown": "handleDocumentMouseDown($event)" }, properties: { "class.the-toolbar-dropdown-container": "this.toolbarItemContainer", "class.the-font-size-toolbar-item": "this.fontSizeToolbarItem", "class.disabled": "this.disableClass" } }, viewQueries: [{ propertyName: "dropdownTemplate", first: true, predicate: ["dropdownTemplate"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<a thyIconNavLink class=\"text-mode\" [thyTooltip]=\"item?.name\" thyTooltipPlacement=\"top\">\n <span *ngIf=\"activeSize\" class=\"show-text\">{{ activeSize }}</span>\n <thy-icon class=\"text-caret-down-icon font-size-sm text-desc\" thyIconName=\"caret-down\"></thy-icon>\n</a>\n\n<ng-template #dropdownTemplate>\n <thy-action-menu class=\"dropdown\">\n <ng-container *ngFor=\"let size of fontSizes\">\n <a\n thyActionMenuItem\n href=\"javascript:;\"\n [thyActionMenuItemActive]=\"size === activeSize\"\n (mousedown)=\"itemMousedown($event, size)\"\n >\n <span thyActionMenuItemName>{{ size }}</span>\n </a>\n </ng-container>\n </thy-action-menu>\n</ng-template>\n", components: [{ type: i3.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i4$1.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { type: i5$2.ThyActionMenuComponent, selector: "thy-action-menu", inputs: ["thyTheme", "thyWidth"] }], directives: [{ type: i5$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i5$2.ThyActionMenuItemDirective, selector: "[thyActionMenuItem]", inputs: ["thyDisabled", "thyType"] }, { type: i5$2.ThyActionMenuItemActiveDirective, selector: "[thyActionMenuItemActive]", inputs: ["thyActionMenuItemActive"] }, { type: i5$2.ThyActionMenuItemNameDirective, selector: "[thyActionMenuItemName]" }] });
|
|
10981
10973
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TheFontSizeToolbarItemComponent, decorators: [{
|
|
10982
10974
|
type: Component,
|
|
10983
10975
|
args: [{
|