@worktile/theia 2.4.10 → 2.5.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 +97 -75
- package/bundles/worktile-theia.umd.js.map +1 -1
- package/esm2015/constants/auto-format-rules.js +5 -2
- package/esm2015/constants/code.js +28 -8
- package/esm2015/plugins/code/code.component.js +6 -6
- package/fesm2015/worktile-theia.js +89 -67
- package/fesm2015/worktile-theia.js.map +1 -1
- package/package.json +1 -1
- package/plugins/code/code.component.scss +1 -1
- package/styles/editor.scss +1 -3
|
@@ -40,7 +40,7 @@ import * as i1$4 from 'ngx-tethys/notify';
|
|
|
40
40
|
import { ThyNotifyModule } from 'ngx-tethys/notify';
|
|
41
41
|
import * as i2$1 from 'ngx-tethys/action-menu';
|
|
42
42
|
import { ThyActionMenuModule } from 'ngx-tethys/action-menu';
|
|
43
|
-
import * as
|
|
43
|
+
import * as i5$2 from 'ngx-tethys/switch';
|
|
44
44
|
import { ThySwitchModule } from 'ngx-tethys/switch';
|
|
45
45
|
import * as i9 from 'ngx-tethys/resizable';
|
|
46
46
|
import { ThyResizableModule } from 'ngx-tethys/resizable';
|
|
@@ -49,7 +49,7 @@ import * as i1$5 from 'ngx-tethys/button';
|
|
|
49
49
|
import { ThyButtonModule } from 'ngx-tethys/button';
|
|
50
50
|
import * as i2$2 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';
|
|
@@ -218,11 +218,22 @@ const CODE_MODES = [
|
|
|
218
218
|
showName: 'Plain Text',
|
|
219
219
|
value: ''
|
|
220
220
|
},
|
|
221
|
+
{
|
|
222
|
+
showName: 'C',
|
|
223
|
+
value: 'text/x-csrc'
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
showName: 'C#',
|
|
227
|
+
value: 'text/x-csharp'
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
showName: 'C++',
|
|
231
|
+
value: 'text/x-c++src'
|
|
232
|
+
},
|
|
221
233
|
{
|
|
222
234
|
showName: 'C-like',
|
|
223
235
|
value: 'clike'
|
|
224
236
|
},
|
|
225
|
-
DEFAULT_LANGUAGE,
|
|
226
237
|
{
|
|
227
238
|
showName: 'CSS',
|
|
228
239
|
value: 'css'
|
|
@@ -243,6 +254,15 @@ const CODE_MODES = [
|
|
|
243
254
|
showName: 'Go',
|
|
244
255
|
value: 'go'
|
|
245
256
|
},
|
|
257
|
+
{
|
|
258
|
+
showName: 'HTML',
|
|
259
|
+
value: 'htmlmixed'
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
showName: 'Java',
|
|
263
|
+
value: 'text/x-java'
|
|
264
|
+
},
|
|
265
|
+
DEFAULT_LANGUAGE,
|
|
246
266
|
{
|
|
247
267
|
showName: 'Markdown',
|
|
248
268
|
value: 'markdown'
|
|
@@ -251,14 +271,14 @@ const CODE_MODES = [
|
|
|
251
271
|
showName: 'Nginx',
|
|
252
272
|
value: 'nginx'
|
|
253
273
|
},
|
|
254
|
-
{
|
|
255
|
-
showName: 'PHP',
|
|
256
|
-
value: 'php'
|
|
257
|
-
},
|
|
258
274
|
{
|
|
259
275
|
showName: 'Python',
|
|
260
276
|
value: 'python'
|
|
261
277
|
},
|
|
278
|
+
{
|
|
279
|
+
showName: 'PHP',
|
|
280
|
+
value: 'php'
|
|
281
|
+
},
|
|
262
282
|
{
|
|
263
283
|
showName: 'Shell',
|
|
264
284
|
value: 'shell'
|
|
@@ -272,8 +292,8 @@ const CODE_MODES = [
|
|
|
272
292
|
value: 'swift'
|
|
273
293
|
},
|
|
274
294
|
{
|
|
275
|
-
showName: '
|
|
276
|
-
value: '
|
|
295
|
+
showName: 'TypeScript',
|
|
296
|
+
value: 'text/typescript'
|
|
277
297
|
}
|
|
278
298
|
];
|
|
279
299
|
const CODEMIRROR_PADDING_TOP = 10;
|
|
@@ -4230,6 +4250,60 @@ const HeadingEditor = {
|
|
|
4230
4250
|
}
|
|
4231
4251
|
};
|
|
4232
4252
|
|
|
4253
|
+
const CodeEditor = {
|
|
4254
|
+
setCodeAttribute(editor, element, value) {
|
|
4255
|
+
const at = AngularEditor.findPath(editor, element);
|
|
4256
|
+
Transforms.setNodes(editor, value, {
|
|
4257
|
+
at
|
|
4258
|
+
});
|
|
4259
|
+
},
|
|
4260
|
+
insertCode(editor) {
|
|
4261
|
+
const isSelectContent = Editor.string(editor, editor.selection);
|
|
4262
|
+
const [startPoint, endPoint] = Range.edges(editor.selection);
|
|
4263
|
+
const elementEntryIterator = Node.elements(editor, {
|
|
4264
|
+
from: startPoint.path,
|
|
4265
|
+
to: endPoint.path,
|
|
4266
|
+
pass: ([node, path]) => {
|
|
4267
|
+
return Editor.isBlock(editor, node);
|
|
4268
|
+
}
|
|
4269
|
+
});
|
|
4270
|
+
const elementEntrys = Array.from(elementEntryIterator);
|
|
4271
|
+
const isAllParagraph = elementEntrys.every(item => item[0].type === ElementKinds.paragraph);
|
|
4272
|
+
if (isSelectContent && editor.selection.anchor.path.length === 2 && isAllParagraph) {
|
|
4273
|
+
let content = elementEntrys.reduce((content, [element, path], index) => {
|
|
4274
|
+
const text = Node.string(element);
|
|
4275
|
+
return content + (elementEntrys.length - 1 === index ? `${text}` : `${text}\n`);
|
|
4276
|
+
}, '');
|
|
4277
|
+
const codeElement = {
|
|
4278
|
+
type: ElementKinds.code,
|
|
4279
|
+
content,
|
|
4280
|
+
language: DEFAULT_LANGUAGE.value,
|
|
4281
|
+
children: [{ text: '' }]
|
|
4282
|
+
};
|
|
4283
|
+
Editor.withoutNormalizing(editor, () => {
|
|
4284
|
+
const lastPath = elementEntrys[elementEntrys.length - 1][1];
|
|
4285
|
+
Transforms.insertNodes(editor, codeElement, { at: Path.next(lastPath) });
|
|
4286
|
+
Transforms.select(editor, Path.next(lastPath));
|
|
4287
|
+
Transforms.removeNodes(editor, {
|
|
4288
|
+
at: {
|
|
4289
|
+
anchor: Editor.start(editor, elementEntrys[0][1]),
|
|
4290
|
+
focus: Editor.end(editor, lastPath)
|
|
4291
|
+
}
|
|
4292
|
+
});
|
|
4293
|
+
});
|
|
4294
|
+
}
|
|
4295
|
+
else {
|
|
4296
|
+
const codeElement = {
|
|
4297
|
+
type: ElementKinds.code,
|
|
4298
|
+
content: '',
|
|
4299
|
+
language: DEFAULT_LANGUAGE.value,
|
|
4300
|
+
children: [{ text: '' }]
|
|
4301
|
+
};
|
|
4302
|
+
insertElement(editor, codeElement);
|
|
4303
|
+
}
|
|
4304
|
+
}
|
|
4305
|
+
};
|
|
4306
|
+
|
|
4233
4307
|
const defaultAutoFormatRules = [
|
|
4234
4308
|
{
|
|
4235
4309
|
type: ElementKinds.heading_1,
|
|
@@ -4322,7 +4396,9 @@ const defaultAutoFormatRules = [
|
|
|
4322
4396
|
{
|
|
4323
4397
|
type: ElementKinds.code,
|
|
4324
4398
|
markup: '```',
|
|
4325
|
-
|
|
4399
|
+
format: (editor) => {
|
|
4400
|
+
CodeEditor.insertCode(editor);
|
|
4401
|
+
}
|
|
4326
4402
|
},
|
|
4327
4403
|
{
|
|
4328
4404
|
type: ElementKinds.listItem,
|
|
@@ -6536,60 +6612,6 @@ const withRemoveVoid = (editor) => {
|
|
|
6536
6612
|
return editor;
|
|
6537
6613
|
};
|
|
6538
6614
|
|
|
6539
|
-
const CodeEditor = {
|
|
6540
|
-
setCodeAttribute(editor, element, value) {
|
|
6541
|
-
const at = AngularEditor.findPath(editor, element);
|
|
6542
|
-
Transforms.setNodes(editor, value, {
|
|
6543
|
-
at
|
|
6544
|
-
});
|
|
6545
|
-
},
|
|
6546
|
-
insertCode(editor) {
|
|
6547
|
-
const isSelectContent = Editor.string(editor, editor.selection);
|
|
6548
|
-
const [startPoint, endPoint] = Range.edges(editor.selection);
|
|
6549
|
-
const elementEntryIterator = Node.elements(editor, {
|
|
6550
|
-
from: startPoint.path,
|
|
6551
|
-
to: endPoint.path,
|
|
6552
|
-
pass: ([node, path]) => {
|
|
6553
|
-
return Editor.isBlock(editor, node);
|
|
6554
|
-
}
|
|
6555
|
-
});
|
|
6556
|
-
const elementEntrys = Array.from(elementEntryIterator);
|
|
6557
|
-
const isAllParagraph = elementEntrys.every(item => item[0].type === ElementKinds.paragraph);
|
|
6558
|
-
if (isSelectContent && editor.selection.anchor.path.length === 2 && isAllParagraph) {
|
|
6559
|
-
let content = elementEntrys.reduce((content, [element, path], index) => {
|
|
6560
|
-
const text = Node.string(element);
|
|
6561
|
-
return content + (elementEntrys.length - 1 === index ? `${text}` : `${text}\n`);
|
|
6562
|
-
}, '');
|
|
6563
|
-
const codeElement = {
|
|
6564
|
-
type: ElementKinds.code,
|
|
6565
|
-
content,
|
|
6566
|
-
language: DEFAULT_LANGUAGE.value,
|
|
6567
|
-
children: [{ text: '' }]
|
|
6568
|
-
};
|
|
6569
|
-
Editor.withoutNormalizing(editor, () => {
|
|
6570
|
-
const lastPath = elementEntrys[elementEntrys.length - 1][1];
|
|
6571
|
-
Transforms.insertNodes(editor, codeElement, { at: Path.next(lastPath) });
|
|
6572
|
-
Transforms.select(editor, Path.next(lastPath));
|
|
6573
|
-
Transforms.removeNodes(editor, {
|
|
6574
|
-
at: {
|
|
6575
|
-
anchor: Editor.start(editor, elementEntrys[0][1]),
|
|
6576
|
-
focus: Editor.end(editor, lastPath)
|
|
6577
|
-
}
|
|
6578
|
-
});
|
|
6579
|
-
});
|
|
6580
|
-
}
|
|
6581
|
-
else {
|
|
6582
|
-
const codeElement = {
|
|
6583
|
-
type: ElementKinds.code,
|
|
6584
|
-
content: '',
|
|
6585
|
-
language: DEFAULT_LANGUAGE.value,
|
|
6586
|
-
children: [{ text: '' }]
|
|
6587
|
-
};
|
|
6588
|
-
insertElement(editor, codeElement);
|
|
6589
|
-
}
|
|
6590
|
-
}
|
|
6591
|
-
};
|
|
6592
|
-
|
|
6593
6615
|
const CodeOptions = [
|
|
6594
6616
|
{
|
|
6595
6617
|
key: ElementKinds.code,
|
|
@@ -6953,7 +6975,7 @@ class TheCodeComponent extends TheBaseElementComponent {
|
|
|
6953
6975
|
}
|
|
6954
6976
|
}
|
|
6955
6977
|
TheCodeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheCodeComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i1$4.ThyNotifyService }, { token: TheContextService }, { token: i0.NgZone }, { token: THE_MODE_TOKEN }], target: i0.ɵɵFactoryTarget.Component });
|
|
6956
|
-
TheCodeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", 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=\"isCollapsed && codemirror && !options.readOnly\">\n <thy-icon-nav>\n <the-toolbar-dropdown [menus]=\"menus\" [item]=\"actives\" [itemMousedownHandle]=\"onChangeLangulage\"> </the-toolbar-dropdown>\n <
|
|
6978
|
+
TheCodeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", 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=\"isCollapsed && codemirror && !options.readOnly\">\n <thy-icon-nav>\n <the-toolbar-dropdown [menus]=\"menus\" [item]=\"actives\" [itemMousedownHandle]=\"onChangeLangulage\"> </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$1.ThyIconNavComponent, selector: "thy-icon-nav", inputs: ["thyType"] }, { type: TheToolbarDropdownComponent, selector: "the-toolbar-dropdown", inputs: ["toolbarItem", "menus", "mode", "item", "itemMousedownHandle"] }, { type: i5$2.ThySwitchComponent, selector: "thy-switch", inputs: ["thyType", "thySize", "thyDisabled"], outputs: ["thyChange"] }, { type: i3$1.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: NavSplitLineComponent, selector: "nav-split-line", inputs: ["mode"] }, { 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: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i5.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { type: i9.ThyResizableDirective, selector: "[thyResizable]", inputs: ["thyBounds", "thyMaxHeight", "thyMaxWidth", "thyMinHeight", "thyMinWidth", "thyGridColumnCount", "thyMaxColumn", "thyMinColumn", "thyLockAspectRatio", "thyPreview", "thyDisabled"], outputs: ["thyResize", "thyResizeEnd", "thyResizeStart"] }, { type: i10.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i10.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
6957
6979
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheCodeComponent, decorators: [{
|
|
6958
6980
|
type: Component,
|
|
6959
6981
|
args: [{
|
|
@@ -7177,7 +7199,7 @@ class TheLinkEditComponent {
|
|
|
7177
7199
|
}
|
|
7178
7200
|
}
|
|
7179
7201
|
TheLinkEditComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheLinkEditComponent, deps: [{ token: i1$3.ThyPopoverRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
7180
|
-
TheLinkEditComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", 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$2.ThyFormGroupComponent, selector: "thy-form-group", inputs: ["thyLabelText", "thyLabelTextTranslateKey", "thyLabelRequired", "thyLabelPaddingTopClear", "thyFeedbackIcon", "thyTipsMode", "thyTips", "thyTipsTranslateKey", "thyRowFill"] }, { type: i2$2.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.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i4.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i2$2.ThyFormDirective, selector: "[thyForm],[thy-form]", inputs: ["thyLayout", "thyEnterKeyMode", "thyFormValidatorConfig"], exportAs: ["thyForm"] }, { type: i5$
|
|
7202
|
+
TheLinkEditComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", 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$2.ThyFormGroupComponent, selector: "thy-form-group", inputs: ["thyLabelText", "thyLabelTextTranslateKey", "thyLabelRequired", "thyLabelPaddingTopClear", "thyFeedbackIcon", "thyTipsMode", "thyTips", "thyTipsTranslateKey", "thyRowFill"] }, { type: i2$2.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.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i4.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i2$2.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.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$1.ThyInputDirective, selector: "[thyInput]", inputs: ["thySize", "thyAutocomplete"] }, { type: i4.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i2$2.ThyFormSubmitDirective, selector: "[thyFormSubmit],[thy-form-submit]", outputs: ["thyFormSubmit"] }] });
|
|
7181
7203
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheLinkEditComponent, decorators: [{
|
|
7182
7204
|
type: Component,
|
|
7183
7205
|
args: [{
|
|
@@ -11394,7 +11416,7 @@ class TheQuickToolbarComponent extends mixinUnsubscribe(MixinBase) {
|
|
|
11394
11416
|
}
|
|
11395
11417
|
}
|
|
11396
11418
|
TheQuickToolbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheQuickToolbarComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
11397
|
-
TheQuickToolbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheQuickToolbarComponent, selector: "the-quick-toolbar", inputs: { editor: "editor", quickToolbarItems: "quickToolbarItems" }, host: { listeners: { "document: mousedown": "handleMouseDown($event)", "document: keydown.enter": "handleEnter()", "document: keydown.escape": "handleEsc()" } }, 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: i1$7.ThySelectionListComponent, selector: "thy-selection-list,[thy-selection-list]", inputs: ["thyMultiple", "thyBindKeyEventContainer", "thyScrollContainer", "thyBeforeKeydown", "thyUniqueKey", "thyCompareWith", "thyLayout", "thyAutoActiveFirstItem", "thySize", "thySpaceKeyEnabled"], outputs: ["thySelectionChange"] }, { type: i5$
|
|
11419
|
+
TheQuickToolbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheQuickToolbarComponent, selector: "the-quick-toolbar", inputs: { editor: "editor", quickToolbarItems: "quickToolbarItems" }, host: { listeners: { "document: mousedown": "handleMouseDown($event)", "document: keydown.enter": "handleEnter()", "document: keydown.escape": "handleEsc()" } }, 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: i1$7.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: ["editor", "item", "itemMode"] }, { type: NavSplitLineComponent, selector: "nav-split-line", inputs: ["mode"] }], directives: [{ type: i10.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
11398
11420
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheQuickToolbarComponent, decorators: [{
|
|
11399
11421
|
type: Component,
|
|
11400
11422
|
args: [{
|