@worktile/theia 2.0.1 → 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 +311 -133
- package/bundles/worktile-theia.umd.js.map +1 -1
- package/constants/code.d.ts +3 -3
- package/constants/node-types.d.ts +2 -1
- package/custom-types.d.ts +3 -1
- package/editor.module.d.ts +43 -39
- package/esm2015/components/text/text.component.js +7 -2
- package/esm2015/constants/code.js +2 -2
- package/esm2015/constants/node-types.js +4 -2
- package/esm2015/constants/toolbar.js +2 -1
- package/esm2015/custom-types.js +1 -1
- package/esm2015/editor.module.js +14 -5
- package/esm2015/plugins/code/code.component.js +69 -32
- package/esm2015/plugins/code/code.editor.js +3 -9
- package/esm2015/plugins/font-size/options.js +11 -0
- package/esm2015/plugins/font-size/toolbar-item.component.js +129 -0
- package/esm2015/plugins/index.js +3 -1
- package/fesm2015/worktile-theia.js +273 -103
- package/fesm2015/worktile-theia.js.map +1 -1
- package/package.json +1 -1
- package/plugins/code/code.component.d.ts +15 -4
- package/plugins/code/code.component.scss +46 -7
- package/plugins/code/code.editor.d.ts +3 -2
- package/plugins/font-size/options.d.ts +3 -0
- package/plugins/font-size/toolbar-item.component.d.ts +35 -0
- package/plugins/font-size/toolbar-item.component.scss +24 -0
- package/queries/get-selection-marks.d.ts +1 -0
- package/styles/editor.scss +8 -1
- package/styles/index.scss +1 -0
- package/transforms/set-marks.d.ts +1 -0
|
@@ -16,7 +16,7 @@ import marked from 'marked';
|
|
|
16
16
|
import { TheiaConverter } from '@atinc/selene';
|
|
17
17
|
import * as i1$3 from 'ngx-tethys/popover';
|
|
18
18
|
import { ThyPopover } from 'ngx-tethys/popover';
|
|
19
|
-
import * as i2
|
|
19
|
+
import * as i2 from '@angular/cdk/overlay';
|
|
20
20
|
import { Overlay, OverlayModule } from '@angular/cdk/overlay';
|
|
21
21
|
import * as i1$1 from 'ngx-tethys/alert';
|
|
22
22
|
import { ThyAlertModule } from 'ngx-tethys/alert';
|
|
@@ -30,27 +30,31 @@ import * as i4$1 from 'ngx-tethys/icon';
|
|
|
30
30
|
import { ThyIconModule } from 'ngx-tethys/icon';
|
|
31
31
|
import * as i5 from 'ngx-tethys/input';
|
|
32
32
|
import { ThyInputModule } from 'ngx-tethys/input';
|
|
33
|
-
import * as
|
|
33
|
+
import * as i3 from 'ngx-tethys/nav';
|
|
34
34
|
import { ThyNavModule } from 'ngx-tethys/nav';
|
|
35
|
-
import * as
|
|
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
|
-
import * as i5$
|
|
41
|
+
import * as i5$2 from 'ngx-tethys/action-menu';
|
|
42
42
|
import { ThyActionMenuModule } from 'ngx-tethys/action-menu';
|
|
43
|
+
import * as i6$1 from 'ngx-tethys/switch';
|
|
44
|
+
import { ThySwitchModule } from 'ngx-tethys/switch';
|
|
45
|
+
import * as i9 from 'ngx-tethys/resizable';
|
|
46
|
+
import { ThyResizableModule } from 'ngx-tethys/resizable';
|
|
43
47
|
import isUrl from 'is-url';
|
|
44
48
|
import * as i1$5 from 'ngx-tethys/button';
|
|
45
49
|
import { ThyButtonModule } from 'ngx-tethys/button';
|
|
46
|
-
import * as i2$
|
|
50
|
+
import * as i2$1 from 'ngx-tethys/form';
|
|
47
51
|
import { ThyFormModule } from 'ngx-tethys/form';
|
|
48
52
|
import * as i5$3 from 'ngx-tethys/shared';
|
|
49
53
|
import { ThySharedModule } from 'ngx-tethys/shared';
|
|
50
54
|
import * as i1$6 from 'ngx-tethys';
|
|
51
55
|
import { coerceCssPixelValue } from '@angular/cdk/coercion';
|
|
52
56
|
import { PortalInjector, ComponentPortal } from '@angular/cdk/portal';
|
|
53
|
-
import * as i2$
|
|
57
|
+
import * as i2$2 from 'ngx-tethys/list';
|
|
54
58
|
import { ThyListModule } from 'ngx-tethys/list';
|
|
55
59
|
import { ThyAutocompleteModule } from 'ngx-tethys/autocomplete';
|
|
56
60
|
import { ThyAvatarModule } from 'ngx-tethys/avatar';
|
|
@@ -117,6 +121,7 @@ var MarkTypes;
|
|
|
117
121
|
MarkTypes["color"] = "color";
|
|
118
122
|
MarkTypes["backgroundColor"] = "background-color";
|
|
119
123
|
MarkTypes["codeLine"] = "code-line";
|
|
124
|
+
MarkTypes["fontSize"] = "font-size";
|
|
120
125
|
})(MarkTypes || (MarkTypes = {}));
|
|
121
126
|
var ToolbarActionTypes;
|
|
122
127
|
(function (ToolbarActionTypes) {
|
|
@@ -145,7 +150,8 @@ const MarkProps = [
|
|
|
145
150
|
MarkTypes.color,
|
|
146
151
|
MarkTypes.italic,
|
|
147
152
|
MarkTypes.strike,
|
|
148
|
-
MarkTypes.underline
|
|
153
|
+
MarkTypes.underline,
|
|
154
|
+
MarkTypes.fontSize
|
|
149
155
|
];
|
|
150
156
|
const THE_INLINE_TOOLBAR_TYPES = [ElementKinds.default, ElementKinds.listItem, ElementKinds.checkItem];
|
|
151
157
|
const STANDARD_HEADING_TYPES = [
|
|
@@ -175,6 +181,7 @@ var ToolbarItemMode;
|
|
|
175
181
|
})(ToolbarItemMode || (ToolbarItemMode = {}));
|
|
176
182
|
const DefaultGlobalToolbarDefinition = [
|
|
177
183
|
ElementKinds.headingList,
|
|
184
|
+
MarkTypes.fontSize,
|
|
178
185
|
ToolbarActionTypes.split,
|
|
179
186
|
MarkTypes.bold,
|
|
180
187
|
MarkTypes.italic,
|
|
@@ -309,7 +316,7 @@ const CodeMode = {
|
|
|
309
316
|
default: 'default',
|
|
310
317
|
print: 'print'
|
|
311
318
|
};
|
|
312
|
-
class
|
|
319
|
+
class TheCodeConfig {
|
|
313
320
|
}
|
|
314
321
|
const THE_CODE_MODE_TOKEN = new InjectionToken('the-code-mode');
|
|
315
322
|
const THE_CODE_MODE_PROVIDER = {
|
|
@@ -325,7 +332,7 @@ class TheTextComponent extends BaseTextComponent {
|
|
|
325
332
|
super(elementRef, cdr);
|
|
326
333
|
this.elementRef = elementRef;
|
|
327
334
|
this.renderer2 = renderer2;
|
|
328
|
-
this.excludes = ['color', 'background-color', 'text'];
|
|
335
|
+
this.excludes = ['color', 'font-size', 'background-color', 'text'];
|
|
329
336
|
this.attributes = [];
|
|
330
337
|
}
|
|
331
338
|
applyTextMark() {
|
|
@@ -340,6 +347,11 @@ class TheTextComponent extends BaseTextComponent {
|
|
|
340
347
|
this.attributes.push(attr);
|
|
341
348
|
}
|
|
342
349
|
}
|
|
350
|
+
const fontSize = this.text[MarkTypes.fontSize];
|
|
351
|
+
if (fontSize) {
|
|
352
|
+
const attr = `the-${MarkTypes.fontSize}`;
|
|
353
|
+
this.renderer2.setAttribute(this.elementRef.nativeElement, attr, fontSize);
|
|
354
|
+
}
|
|
343
355
|
if (this.text[MarkTypes.color]) {
|
|
344
356
|
this.renderer2.setStyle(this.elementRef.nativeElement, 'color', this.text[MarkTypes.color]);
|
|
345
357
|
}
|
|
@@ -5990,7 +6002,7 @@ TheColorToolbarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12
|
|
|
5990
6002
|
thyIconName="caret-down"
|
|
5991
6003
|
></thy-icon>
|
|
5992
6004
|
</a>
|
|
5993
|
-
`, isInline: true, components: [{ type:
|
|
6005
|
+
`, isInline: true, components: [{ type: i3.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i4$1.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }], directives: [{ type: i6.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i5$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
5994
6006
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TheColorToolbarItemComponent, decorators: [{
|
|
5995
6007
|
type: Component,
|
|
5996
6008
|
args: [{
|
|
@@ -6092,15 +6104,9 @@ const withRemoveVoid = (editor) => {
|
|
|
6092
6104
|
};
|
|
6093
6105
|
|
|
6094
6106
|
const CodeEditor = {
|
|
6095
|
-
|
|
6096
|
-
const at = AngularEditor.findPath(editor, element);
|
|
6097
|
-
Transforms.setNodes(editor, { language }, {
|
|
6098
|
-
at
|
|
6099
|
-
});
|
|
6100
|
-
},
|
|
6101
|
-
setCodeContent(editor, content, element) {
|
|
6107
|
+
setCodeAttribute(editor, element, value) {
|
|
6102
6108
|
const at = AngularEditor.findPath(editor, element);
|
|
6103
|
-
Transforms.setNodes(editor,
|
|
6109
|
+
Transforms.setNodes(editor, value, {
|
|
6104
6110
|
at
|
|
6105
6111
|
});
|
|
6106
6112
|
},
|
|
@@ -6265,8 +6271,8 @@ class TheToolbarDropdownComponent extends TheToolbarBaseItemComponent {
|
|
|
6265
6271
|
.withPositions([bottomPosition, topPosition]);
|
|
6266
6272
|
}
|
|
6267
6273
|
}
|
|
6268
|
-
TheToolbarDropdownComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TheToolbarDropdownComponent, deps: [{ token: i0.ElementRef }, { token: i1$3.ThyPopover }, { token: i0.ViewContainerRef }, { token: i2
|
|
6269
|
-
TheToolbarDropdownComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheToolbarDropdownComponent, selector: "the-toolbar-dropdown", inputs: { toolbarItem: "toolbarItem", menus: "menus", mode: "mode", item: "item", itemMousedownHandle: "itemMousedownHandle" }, host: { listeners: { "mousedown": "toggleDropdown($event)", "document: mousedown": "handleDocumentMouseDown($event)" }, classAttribute: "the-toolbar-dropdown-container" }, viewQueries: [{ propertyName: "iconModeTemplate", first: true, predicate: ["iconModeTemplate"], descendants: true, static: true }, { propertyName: "textModeTemplate", first: true, predicate: ["textModeTemplate"], descendants: true, static: true }, { propertyName: "dropdownTemplate", first: true, predicate: ["dropdownTemplate"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<ng-template [ngTemplateOutlet]=\"template\"></ng-template>\n\n<ng-template #iconModeTemplate>\n <a thyIconNavLink class=\"icon-mode link-with-down\" [thyTooltip]=\"activeMenu?.name\" thyTooltipPlacement=\"top\">\n <thy-icon [thyIconName]=\"activeMenu?.icon\"></thy-icon>\n <thy-icon class=\"caret-down-icon font-size-sm text-desc\" thyIconName=\"caret-down\"></thy-icon>\n </a>\n</ng-template>\n\n<ng-template #textModeTemplate>\n <a thyIconNavLink class=\"text-mode\" [thyTooltip]=\"activeMenu?.name\" thyTooltipPlacement=\"top\">\n <span class=\"show-text\">{{ activeMenu?.name }}</span>\n <thy-icon class=\"text-caret-down-icon font-size-sm text-desc\" thyIconName=\"caret-down\"></thy-icon>\n </a>\n</ng-template>\n\n<ng-template #dropdownTemplate>\n <thy-action-menu class=\"dropdown\">\n <ng-container *ngFor=\"let menu of menus\">\n <a\n *ngIf=\"menu.key !== 'split'\"\n thyActionMenuItem\n href=\"javascript:;\"\n [thyActionMenuItemActive]=\"menu.key === activeMenu.key\"\n (mousedown)=\"itemMousedown($event, menu)\"\n [ngStyle]=\"menu?.styles\"\n >\n <span *ngIf=\"menu.icon && mode === dropdownMode.icon\" thyActionMenuItemIcon>\n <thy-icon [thyIconName]=\"menu.icon\"></thy-icon>\n </span>\n <span *ngIf=\"menu.name\" thyActionMenuItemName>{{ menu.name }}</span>\n </a>\n <thy-action-menu-divider *ngIf=\"menu.key === 'split'\"></thy-action-menu-divider>\n </ng-container>\n </thy-action-menu>\n</ng-template>\n", components: [{ type:
|
|
6274
|
+
TheToolbarDropdownComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TheToolbarDropdownComponent, deps: [{ token: i0.ElementRef }, { token: i1$3.ThyPopover }, { token: i0.ViewContainerRef }, { token: i2.Overlay }], target: i0.ɵɵFactoryTarget.Component });
|
|
6275
|
+
TheToolbarDropdownComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheToolbarDropdownComponent, selector: "the-toolbar-dropdown", inputs: { toolbarItem: "toolbarItem", menus: "menus", mode: "mode", item: "item", itemMousedownHandle: "itemMousedownHandle" }, host: { listeners: { "mousedown": "toggleDropdown($event)", "document: mousedown": "handleDocumentMouseDown($event)" }, classAttribute: "the-toolbar-dropdown-container" }, viewQueries: [{ propertyName: "iconModeTemplate", first: true, predicate: ["iconModeTemplate"], descendants: true, static: true }, { propertyName: "textModeTemplate", first: true, predicate: ["textModeTemplate"], descendants: true, static: true }, { propertyName: "dropdownTemplate", first: true, predicate: ["dropdownTemplate"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<ng-template [ngTemplateOutlet]=\"template\"></ng-template>\n\n<ng-template #iconModeTemplate>\n <a thyIconNavLink class=\"icon-mode link-with-down\" [thyTooltip]=\"activeMenu?.name\" thyTooltipPlacement=\"top\">\n <thy-icon [thyIconName]=\"activeMenu?.icon\"></thy-icon>\n <thy-icon class=\"caret-down-icon font-size-sm text-desc\" thyIconName=\"caret-down\"></thy-icon>\n </a>\n</ng-template>\n\n<ng-template #textModeTemplate>\n <a thyIconNavLink class=\"text-mode\" [thyTooltip]=\"activeMenu?.name\" thyTooltipPlacement=\"top\">\n <span class=\"show-text\">{{ activeMenu?.name }}</span>\n <thy-icon class=\"text-caret-down-icon font-size-sm text-desc\" thyIconName=\"caret-down\"></thy-icon>\n </a>\n</ng-template>\n\n<ng-template #dropdownTemplate>\n <thy-action-menu class=\"dropdown\">\n <ng-container *ngFor=\"let menu of menus\">\n <a\n *ngIf=\"menu.key !== 'split'\"\n thyActionMenuItem\n href=\"javascript:;\"\n [thyActionMenuItemActive]=\"menu.key === activeMenu.key\"\n (mousedown)=\"itemMousedown($event, menu)\"\n [ngStyle]=\"menu?.styles\"\n >\n <span *ngIf=\"menu.icon && mode === dropdownMode.icon\" thyActionMenuItemIcon>\n <thy-icon [thyIconName]=\"menu.icon\"></thy-icon>\n </span>\n <span *ngIf=\"menu.name\" thyActionMenuItemName>{{ menu.name }}</span>\n </a>\n <thy-action-menu-divider *ngIf=\"menu.key === 'split'\"></thy-action-menu-divider>\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"] }, { type: i5$2.ThyActionMenuDividerComponent, selector: "thy-action-menu-divider", inputs: ["thyTitle", "thyType"] }], directives: [{ type: i6.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i5$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5$2.ThyActionMenuItemDirective, selector: "[thyActionMenuItem]", inputs: ["thyDisabled", "thyType"] }, { type: i5$2.ThyActionMenuItemActiveDirective, selector: "[thyActionMenuItemActive]", inputs: ["thyActionMenuItemActive"] }, { type: i6.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i5$2.ThyActionMenuItemIconDirective, selector: "[thyActionMenuItemIcon]" }, { type: i5$2.ThyActionMenuItemNameDirective, selector: "[thyActionMenuItemName]" }] });
|
|
6270
6276
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TheToolbarDropdownComponent, decorators: [{
|
|
6271
6277
|
type: Component,
|
|
6272
6278
|
args: [{
|
|
@@ -6276,7 +6282,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImpor
|
|
|
6276
6282
|
class: 'the-toolbar-dropdown-container'
|
|
6277
6283
|
}
|
|
6278
6284
|
}]
|
|
6279
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1$3.ThyPopover }, { type: i0.ViewContainerRef }, { type: i2
|
|
6285
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1$3.ThyPopover }, { type: i0.ViewContainerRef }, { type: i2.Overlay }]; }, propDecorators: { toolbarItem: [{
|
|
6280
6286
|
type: Input
|
|
6281
6287
|
}], menus: [{
|
|
6282
6288
|
type: Input
|
|
@@ -6303,21 +6309,58 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImpor
|
|
|
6303
6309
|
args: ['document: mousedown', ['$event']]
|
|
6304
6310
|
}] } });
|
|
6305
6311
|
|
|
6312
|
+
class NavSplitLineComponent {
|
|
6313
|
+
constructor() {
|
|
6314
|
+
this.mode = ToolbarItemMode.vertical;
|
|
6315
|
+
this.theNavSplitLine = true;
|
|
6316
|
+
}
|
|
6317
|
+
get horizontal() {
|
|
6318
|
+
return this.mode === ToolbarItemMode.horizontal;
|
|
6319
|
+
}
|
|
6320
|
+
get vertical() {
|
|
6321
|
+
return this.mode === ToolbarItemMode.vertical;
|
|
6322
|
+
}
|
|
6323
|
+
ngOnInit() { }
|
|
6324
|
+
}
|
|
6325
|
+
NavSplitLineComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: NavSplitLineComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6326
|
+
NavSplitLineComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: NavSplitLineComponent, selector: "nav-split-line", inputs: { mode: "mode" }, host: { properties: { "class.the-nav-split-line": "this.theNavSplitLine", "class.horizontal": "this.horizontal", "class.vertical": "this.vertical" } }, ngImport: i0, template: '', isInline: true });
|
|
6327
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: NavSplitLineComponent, decorators: [{
|
|
6328
|
+
type: Component,
|
|
6329
|
+
args: [{
|
|
6330
|
+
selector: 'nav-split-line',
|
|
6331
|
+
template: ''
|
|
6332
|
+
}]
|
|
6333
|
+
}], ctorParameters: function () { return []; }, propDecorators: { mode: [{
|
|
6334
|
+
type: Input
|
|
6335
|
+
}], theNavSplitLine: [{
|
|
6336
|
+
type: HostBinding,
|
|
6337
|
+
args: ['class.the-nav-split-line']
|
|
6338
|
+
}], horizontal: [{
|
|
6339
|
+
type: HostBinding,
|
|
6340
|
+
args: ['class.horizontal']
|
|
6341
|
+
}], vertical: [{
|
|
6342
|
+
type: HostBinding,
|
|
6343
|
+
args: ['class.vertical']
|
|
6344
|
+
}] } });
|
|
6345
|
+
|
|
6306
6346
|
class TheCodeComponent extends TheBaseElementComponent {
|
|
6307
|
-
constructor(elementRef, cdr, thyNotifyService, ngZone, config) {
|
|
6347
|
+
constructor(elementRef, cdr, thyNotifyService, contextService, ngZone, config) {
|
|
6308
6348
|
super(elementRef, cdr);
|
|
6309
6349
|
this.elementRef = elementRef;
|
|
6310
6350
|
this.cdr = cdr;
|
|
6311
6351
|
this.thyNotifyService = thyNotifyService;
|
|
6352
|
+
this.contextService = contextService;
|
|
6312
6353
|
this.ngZone = ngZone;
|
|
6313
6354
|
this.config = config;
|
|
6314
6355
|
this.startRenderCodemirror = false;
|
|
6315
6356
|
this.dropdownMode = DropdownMode;
|
|
6316
6357
|
this.maxHeight = this.config.mode === CodeMode.default ? 350 - CODEMIRROR_PADDING_TOP * 2 : 0;
|
|
6317
|
-
this.codeMirrorFocused = false;
|
|
6318
6358
|
this.menus = CODE_MODES.map(item => {
|
|
6319
6359
|
return { key: item.value, name: item.showName };
|
|
6320
6360
|
});
|
|
6361
|
+
this.ToolbarItemMode = ToolbarItemMode;
|
|
6362
|
+
this.isFocusCode = false;
|
|
6363
|
+
this.resizeHeight = null;
|
|
6321
6364
|
this.options = {
|
|
6322
6365
|
mode: this.menus[0].key,
|
|
6323
6366
|
lineNumbers: false,
|
|
@@ -6328,10 +6371,11 @@ class TheCodeComponent extends TheBaseElementComponent {
|
|
|
6328
6371
|
cursorBlinkRate: 500
|
|
6329
6372
|
};
|
|
6330
6373
|
this.actives = this.menus[0];
|
|
6374
|
+
this.resizeBounds = null;
|
|
6331
6375
|
this.onChangeLangulage = item => {
|
|
6332
6376
|
this.options = Object.assign(Object.assign({}, this.options), { mode: item.key });
|
|
6333
6377
|
this.actives = item;
|
|
6334
|
-
CodeEditor.
|
|
6378
|
+
CodeEditor.setCodeAttribute(this.editor, this.element, { language: item.key });
|
|
6335
6379
|
};
|
|
6336
6380
|
}
|
|
6337
6381
|
get code() {
|
|
@@ -6346,8 +6390,14 @@ class TheCodeComponent extends TheBaseElementComponent {
|
|
|
6346
6390
|
if (this.options.mode !== this.element.language) {
|
|
6347
6391
|
this.useMode();
|
|
6348
6392
|
}
|
|
6349
|
-
if (
|
|
6350
|
-
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;
|
|
6351
6401
|
}
|
|
6352
6402
|
}
|
|
6353
6403
|
}
|
|
@@ -6368,6 +6418,9 @@ class TheCodeComponent extends TheBaseElementComponent {
|
|
|
6368
6418
|
this.ngZone.onStable.pipe(take(1)).subscribe(() => {
|
|
6369
6419
|
this.renderCodemirror();
|
|
6370
6420
|
this.initializeCodemirrorFocus();
|
|
6421
|
+
this.resizeBounds = {
|
|
6422
|
+
nativeElement: this.contextService.getEditableElement()
|
|
6423
|
+
};
|
|
6371
6424
|
});
|
|
6372
6425
|
}
|
|
6373
6426
|
}
|
|
@@ -6375,6 +6428,8 @@ class TheCodeComponent extends TheBaseElementComponent {
|
|
|
6375
6428
|
this.startRenderCodemirror = true;
|
|
6376
6429
|
this.useReadonly();
|
|
6377
6430
|
this.useMode();
|
|
6431
|
+
this.useAutoWrap();
|
|
6432
|
+
this.useHeight();
|
|
6378
6433
|
this.cdr.detectChanges();
|
|
6379
6434
|
}
|
|
6380
6435
|
initializeCodemirrorFocus() {
|
|
@@ -6389,13 +6444,11 @@ class TheCodeComponent extends TheBaseElementComponent {
|
|
|
6389
6444
|
}
|
|
6390
6445
|
}
|
|
6391
6446
|
codeChange($event) {
|
|
6392
|
-
CodeEditor.
|
|
6393
|
-
}
|
|
6394
|
-
focusChange(codeMirrorFocused) {
|
|
6395
|
-
this.codeMirrorFocused = codeMirrorFocused;
|
|
6447
|
+
CodeEditor.setCodeAttribute(this.editor, this.element, { content: $event });
|
|
6396
6448
|
}
|
|
6397
6449
|
onDelete(event) {
|
|
6398
6450
|
event.preventDefault();
|
|
6451
|
+
this.isFocusCode = false;
|
|
6399
6452
|
deleteElement(this.editor, this.element);
|
|
6400
6453
|
}
|
|
6401
6454
|
onCopy(event) {
|
|
@@ -6406,27 +6459,47 @@ class TheCodeComponent extends TheBaseElementComponent {
|
|
|
6406
6459
|
if (selection.rangeCount > 0) {
|
|
6407
6460
|
selection.removeAllRanges();
|
|
6408
6461
|
}
|
|
6409
|
-
|
|
6410
|
-
|
|
6411
|
-
|
|
6412
|
-
|
|
6413
|
-
|
|
6414
|
-
|
|
6415
|
-
|
|
6416
|
-
|
|
6417
|
-
this.
|
|
6418
|
-
}, 200);
|
|
6462
|
+
AngularEditor.focus(this.editor);
|
|
6463
|
+
Transforms.select(this.editor, AngularEditor.findPath(this.editor, this.element));
|
|
6464
|
+
document.execCommand('copy');
|
|
6465
|
+
this.thyNotifyService.success('复制成功');
|
|
6466
|
+
AngularEditor.deselect(this.editor);
|
|
6467
|
+
}
|
|
6468
|
+
focusChange(codeMirrorFocused) {
|
|
6469
|
+
if (codeMirrorFocused)
|
|
6470
|
+
this.isFocusCode = codeMirrorFocused;
|
|
6419
6471
|
}
|
|
6420
6472
|
useMode() {
|
|
6421
6473
|
this.options = Object.assign(Object.assign({}, this.options), { mode: this.element.language });
|
|
6422
6474
|
this.actives = this.menus.find(i => i.key === this.element.language);
|
|
6423
6475
|
}
|
|
6476
|
+
useAutoWrap() {
|
|
6477
|
+
this.options = Object.assign(Object.assign({}, this.options), { lineWrapping: this.element.autoWrap || false });
|
|
6478
|
+
}
|
|
6479
|
+
useHeight() {
|
|
6480
|
+
if (this.element.height) {
|
|
6481
|
+
this.resizeHeight = this.element.height;
|
|
6482
|
+
this.maxHeight = this.element.height;
|
|
6483
|
+
}
|
|
6484
|
+
}
|
|
6424
6485
|
useReadonly() {
|
|
6425
6486
|
this.options = Object.assign(Object.assign({}, this.options), { readOnly: this.readonly, cursorBlinkRate: this.readonly ? -1 : 500 });
|
|
6426
6487
|
}
|
|
6488
|
+
onResize({ height }) {
|
|
6489
|
+
this.resizeHeight = height;
|
|
6490
|
+
this.maxHeight = height;
|
|
6491
|
+
}
|
|
6492
|
+
onEndResize() {
|
|
6493
|
+
Transforms.select(this.editor, AngularEditor.findPath(this.editor, this.element));
|
|
6494
|
+
CodeEditor.setCodeAttribute(this.editor, this.element, { height: this.resizeHeight });
|
|
6495
|
+
}
|
|
6496
|
+
onChangeWrap(value) {
|
|
6497
|
+
this.options = Object.assign(Object.assign({}, this.options), { lineWrapping: value || false });
|
|
6498
|
+
CodeEditor.setCodeAttribute(this.editor, this.element, { autoWrap: value ? value : null });
|
|
6499
|
+
}
|
|
6427
6500
|
}
|
|
6428
|
-
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 });
|
|
6429
|
-
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-block-operation\" *ngIf=\"
|
|
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 });
|
|
6430
6503
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TheCodeComponent, decorators: [{
|
|
6431
6504
|
type: Component,
|
|
6432
6505
|
args: [{
|
|
@@ -6434,7 +6507,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImpor
|
|
|
6434
6507
|
templateUrl: './code.component.html',
|
|
6435
6508
|
changeDetection: ChangeDetectionStrategy.OnPush
|
|
6436
6509
|
}]
|
|
6437
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i1$4.ThyNotifyService }, { type: i0.NgZone }, { type:
|
|
6510
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i1$4.ThyNotifyService }, { type: TheContextService }, { type: i0.NgZone }, { type: TheCodeConfig, decorators: [{
|
|
6438
6511
|
type: Inject,
|
|
6439
6512
|
args: [THE_CODE_MODE_TOKEN]
|
|
6440
6513
|
}] }]; }, propDecorators: { codemirror: [{
|
|
@@ -6650,7 +6723,7 @@ class TheLinkEditComponent {
|
|
|
6650
6723
|
}
|
|
6651
6724
|
}
|
|
6652
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 });
|
|
6653
|
-
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$
|
|
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"] }] });
|
|
6654
6727
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TheLinkEditComponent, decorators: [{
|
|
6655
6728
|
type: Component,
|
|
6656
6729
|
args: [{
|
|
@@ -6790,7 +6863,7 @@ class TheBaseLinkComponent extends TheBaseElementComponent {
|
|
|
6790
6863
|
this.close(LinkCloseTypes.destroy);
|
|
6791
6864
|
}
|
|
6792
6865
|
}
|
|
6793
|
-
TheBaseLinkComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TheBaseLinkComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i1$3.ThyPopover }, { token: i2
|
|
6866
|
+
TheBaseLinkComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TheBaseLinkComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i1$3.ThyPopover }, { token: i2.Overlay }, { token: i0.ViewContainerRef }, { token: i1$6.ThyClickDispatcher }], target: i0.ɵɵFactoryTarget.Component });
|
|
6794
6867
|
TheBaseLinkComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheBaseLinkComponent, selector: "[TheBaseLinkComponent]", host: { listeners: { "click": "mousedownHandle($event)" } }, usesInheritance: true, ngImport: i0, template: '', isInline: true });
|
|
6795
6868
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TheBaseLinkComponent, decorators: [{
|
|
6796
6869
|
type: Component,
|
|
@@ -6798,7 +6871,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImpor
|
|
|
6798
6871
|
selector: '[TheBaseLinkComponent]',
|
|
6799
6872
|
template: ''
|
|
6800
6873
|
}]
|
|
6801
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i1$3.ThyPopover }, { type: i2
|
|
6874
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i1$3.ThyPopover }, { type: i2.Overlay }, { type: i0.ViewContainerRef }, { type: i1$6.ThyClickDispatcher }]; }, propDecorators: { mousedownHandle: [{
|
|
6802
6875
|
type: HostListener,
|
|
6803
6876
|
args: ['click', ['$event']]
|
|
6804
6877
|
}] } });
|
|
@@ -6971,7 +7044,7 @@ class TheTableToolbarItemComponent extends TheToolbarBaseItemComponent {
|
|
|
6971
7044
|
return this.tableSelectRef;
|
|
6972
7045
|
}
|
|
6973
7046
|
}
|
|
6974
|
-
TheTableToolbarItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TheTableToolbarItemComponent, deps: [{ token: i1$6.ThyPopover }, { token: i2
|
|
7047
|
+
TheTableToolbarItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TheTableToolbarItemComponent, deps: [{ token: i1$6.ThyPopover }, { token: i2.Overlay }], target: i0.ɵɵFactoryTarget.Component });
|
|
6975
7048
|
TheTableToolbarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheTableToolbarItemComponent, selector: "the-table-toolbar-item", inputs: { item: "item", editor: "editor" }, host: { classAttribute: "the-toolbar-dropdown-container" }, usesInheritance: true, ngImport: i0, template: `
|
|
6976
7049
|
<a
|
|
6977
7050
|
thyIconNavLink
|
|
@@ -6984,7 +7057,7 @@ TheTableToolbarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12
|
|
|
6984
7057
|
<thy-icon [thyIconName]="item.icon"></thy-icon>
|
|
6985
7058
|
<thy-icon class="link-down-icon font-size-sm text-desc table-down-icon" thyIconName="caret-down"> </thy-icon>
|
|
6986
7059
|
</a>
|
|
6987
|
-
`, isInline: true, components: [{ type:
|
|
7060
|
+
`, isInline: true, components: [{ type: i3.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i4$1.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }], directives: [{ type: i5$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }] });
|
|
6988
7061
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TheTableToolbarItemComponent, decorators: [{
|
|
6989
7062
|
type: Component,
|
|
6990
7063
|
args: [{
|
|
@@ -7006,7 +7079,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImpor
|
|
|
7006
7079
|
class: 'the-toolbar-dropdown-container'
|
|
7007
7080
|
}
|
|
7008
7081
|
}]
|
|
7009
|
-
}], ctorParameters: function () { return [{ type: i1$6.ThyPopover }, { type: i2
|
|
7082
|
+
}], ctorParameters: function () { return [{ type: i1$6.ThyPopover }, { type: i2.Overlay }]; }, propDecorators: { item: [{
|
|
7010
7083
|
type: Input
|
|
7011
7084
|
}], editor: [{
|
|
7012
7085
|
type: Input
|
|
@@ -7695,40 +7768,6 @@ function setCellMenuInvisibility(editor, menuList, selectedCells, isActiveSelect
|
|
|
7695
7768
|
});
|
|
7696
7769
|
}
|
|
7697
7770
|
|
|
7698
|
-
class NavSplitLineComponent {
|
|
7699
|
-
constructor() {
|
|
7700
|
-
this.mode = ToolbarItemMode.vertical;
|
|
7701
|
-
this.theNavSplitLine = true;
|
|
7702
|
-
}
|
|
7703
|
-
get horizontal() {
|
|
7704
|
-
return this.mode === ToolbarItemMode.horizontal;
|
|
7705
|
-
}
|
|
7706
|
-
get vertical() {
|
|
7707
|
-
return this.mode === ToolbarItemMode.vertical;
|
|
7708
|
-
}
|
|
7709
|
-
ngOnInit() { }
|
|
7710
|
-
}
|
|
7711
|
-
NavSplitLineComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: NavSplitLineComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
7712
|
-
NavSplitLineComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: NavSplitLineComponent, selector: "nav-split-line", inputs: { mode: "mode" }, host: { properties: { "class.the-nav-split-line": "this.theNavSplitLine", "class.horizontal": "this.horizontal", "class.vertical": "this.vertical" } }, ngImport: i0, template: '', isInline: true });
|
|
7713
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: NavSplitLineComponent, decorators: [{
|
|
7714
|
-
type: Component,
|
|
7715
|
-
args: [{
|
|
7716
|
-
selector: 'nav-split-line',
|
|
7717
|
-
template: ''
|
|
7718
|
-
}]
|
|
7719
|
-
}], ctorParameters: function () { return []; }, propDecorators: { mode: [{
|
|
7720
|
-
type: Input
|
|
7721
|
-
}], theNavSplitLine: [{
|
|
7722
|
-
type: HostBinding,
|
|
7723
|
-
args: ['class.the-nav-split-line']
|
|
7724
|
-
}], horizontal: [{
|
|
7725
|
-
type: HostBinding,
|
|
7726
|
-
args: ['class.horizontal']
|
|
7727
|
-
}], vertical: [{
|
|
7728
|
-
type: HostBinding,
|
|
7729
|
-
args: ['class.vertical']
|
|
7730
|
-
}] } });
|
|
7731
|
-
|
|
7732
7771
|
class TheTableToolbarComponent {
|
|
7733
7772
|
constructor(ngZone, colorSelectService, popoverRef) {
|
|
7734
7773
|
this.ngZone = ngZone;
|
|
@@ -7839,7 +7878,7 @@ class TheTableToolbarComponent {
|
|
|
7839
7878
|
}
|
|
7840
7879
|
}
|
|
7841
7880
|
TheTableToolbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TheTableToolbarComponent, deps: [{ token: i0.NgZone }, { token: TheColorSelectService }, { token: i1$3.ThyPopoverRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
7842
|
-
TheTableToolbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheTableToolbarComponent, selector: "the-table-toolbar", inputs: { tableStore: "tableStore", isActiveSelect: "isActiveSelect" }, ngImport: i0, template: "<thy-icon-nav>\n <ng-container *ngFor=\"let item of cellMenuList\">\n <a href=\"javascript:;\" thyIconNavLink *ngIf=\"!item.invisibility\" [thyTooltip]=\"item.name\" (mousedown)=\"item.actionHandle()\">\n <thy-icon [thyIconName]=\"item.icon\"></thy-icon>\n </a>\n </ng-container>\n <nav-split-line *ngIf=\"!isActiveSelect && isShowSplitLine\"></nav-split-line>\n <a href=\"javascript:;\" thyIconNavLink thyTooltip=\"\u5355\u5143\u683C\u80CC\u666F\" (mousedown)=\"openSelectColor($event)\">\n <thy-icon thyIconName=\"background-tt\" thyIconType=\"twotone\" [thyTwotoneColor]=\"selectedColor\"></thy-icon>\n </a>\n <nav-split-line *ngIf=\"deleteIcon\"></nav-split-line>\n <a\n *ngIf=\"deleteIcon\"\n href=\"javascript:;\"\n thyIconNavLink\n [thyTooltip]=\"iconName\"\n class=\"danger\"\n [thyIconNavLinkIcon]=\"deleteIcon\"\n (mousedown)=\"onDelete($event)\"\n (mouseenter)=\"onEnterDelete($event)\"\n (mouseleave)=\"onLeaveDelete($event)\"\n ></a>\n</thy-icon-nav>\n", components: [{ type:
|
|
7881
|
+
TheTableToolbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheTableToolbarComponent, selector: "the-table-toolbar", inputs: { tableStore: "tableStore", isActiveSelect: "isActiveSelect" }, ngImport: i0, template: "<thy-icon-nav>\n <ng-container *ngFor=\"let item of cellMenuList\">\n <a href=\"javascript:;\" thyIconNavLink *ngIf=\"!item.invisibility\" [thyTooltip]=\"item.name\" (mousedown)=\"item.actionHandle()\">\n <thy-icon [thyIconName]=\"item.icon\"></thy-icon>\n </a>\n </ng-container>\n <nav-split-line *ngIf=\"!isActiveSelect && isShowSplitLine\"></nav-split-line>\n <a href=\"javascript:;\" thyIconNavLink thyTooltip=\"\u5355\u5143\u683C\u80CC\u666F\" (mousedown)=\"openSelectColor($event)\">\n <thy-icon thyIconName=\"background-tt\" thyIconType=\"twotone\" [thyTwotoneColor]=\"selectedColor\"></thy-icon>\n </a>\n <nav-split-line *ngIf=\"deleteIcon\"></nav-split-line>\n <a\n *ngIf=\"deleteIcon\"\n href=\"javascript:;\"\n thyIconNavLink\n [thyTooltip]=\"iconName\"\n class=\"danger\"\n [thyIconNavLinkIcon]=\"deleteIcon\"\n (mousedown)=\"onDelete($event)\"\n (mouseenter)=\"onEnterDelete($event)\"\n (mouseleave)=\"onLeaveDelete($event)\"\n ></a>\n</thy-icon-nav>\n", components: [{ type: i3.ThyIconNavComponent, selector: "thy-icon-nav", inputs: ["thyType"] }, { type: i3.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i4$1.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { 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"] }, { type: i5$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }] });
|
|
7843
7882
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TheTableToolbarComponent, decorators: [{
|
|
7844
7883
|
type: Component,
|
|
7845
7884
|
args: [{
|
|
@@ -7902,7 +7941,7 @@ class TheContextMenuComponent {
|
|
|
7902
7941
|
ngOnInit() { }
|
|
7903
7942
|
}
|
|
7904
7943
|
TheContextMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TheContextMenuComponent, deps: [{ token: i0.ElementRef }, { token: i1$3.ThyPopoverRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
7905
|
-
TheContextMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheContextMenuComponent, selector: "the-contextmenu", inputs: { menuEntities: "menuEntities", actionHandle: "actionHandle", activeHandle: "activeHandle", deactiveHandle: "deactiveHandle" }, host: { listeners: { "document: mousedown": "handleDocumentMouseDown($event)", "mousedown": "handleMouseDown($event)" }, properties: { "class.the-overlay-menu-wrap": "this.wrap" } }, ngImport: i0, template: "<thy-action-menu>\n <ng-container *ngFor=\"let menuItem of menuEntities\">\n <a\n thyActionMenuItem\n href=\"javascript:;\"\n *ngIf=\"!menuItem.invisibility\"\n (mousedown)=\"itemMousedown($event, menuItem)\"\n (mouseenter)=\"itemMouseenter($event, menuItem)\"\n (mouseleave)=\"itemMouseleave($event, menuItem)\"\n >\n <span thyActionMenuItemIcon>\n <thy-icon\n *ngIf=\"menuItem.backgroundColor; else elseIcon\"\n [thyIconName]=\"menuItem.icon\"\n thyIconType=\"twotone\"\n [thyTwotoneColor]=\"menuItem.backgroundColor\"\n ></thy-icon>\n <ng-template #elseIcon>\n <thy-icon [thyIconName]=\"menuItem.icon\"></thy-icon>\n </ng-template>\n </span>\n <span thyActionMenuItemName>{{ menuItem.name }}</span>\n <span *ngIf=\"menuItem.extendIcon\" thyActionMenuItemExtendIcon>\n <thy-icon thyIconName=\"{{ menuItem.extendIcon }}\"></thy-icon>\n </span>\n </a>\n <thy-action-menu-divider *ngIf=\"menuItem.divider\"></thy-action-menu-divider>\n </ng-container>\n</thy-action-menu>\n", components: [{ type: i5$
|
|
7944
|
+
TheContextMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheContextMenuComponent, selector: "the-contextmenu", inputs: { menuEntities: "menuEntities", actionHandle: "actionHandle", activeHandle: "activeHandle", deactiveHandle: "deactiveHandle" }, host: { listeners: { "document: mousedown": "handleDocumentMouseDown($event)", "mousedown": "handleMouseDown($event)" }, properties: { "class.the-overlay-menu-wrap": "this.wrap" } }, ngImport: i0, template: "<thy-action-menu>\n <ng-container *ngFor=\"let menuItem of menuEntities\">\n <a\n thyActionMenuItem\n href=\"javascript:;\"\n *ngIf=\"!menuItem.invisibility\"\n (mousedown)=\"itemMousedown($event, menuItem)\"\n (mouseenter)=\"itemMouseenter($event, menuItem)\"\n (mouseleave)=\"itemMouseleave($event, menuItem)\"\n >\n <span thyActionMenuItemIcon>\n <thy-icon\n *ngIf=\"menuItem.backgroundColor; else elseIcon\"\n [thyIconName]=\"menuItem.icon\"\n thyIconType=\"twotone\"\n [thyTwotoneColor]=\"menuItem.backgroundColor\"\n ></thy-icon>\n <ng-template #elseIcon>\n <thy-icon [thyIconName]=\"menuItem.icon\"></thy-icon>\n </ng-template>\n </span>\n <span thyActionMenuItemName>{{ menuItem.name }}</span>\n <span *ngIf=\"menuItem.extendIcon\" thyActionMenuItemExtendIcon>\n <thy-icon thyIconName=\"{{ menuItem.extendIcon }}\"></thy-icon>\n </span>\n </a>\n <thy-action-menu-divider *ngIf=\"menuItem.divider\"></thy-action-menu-divider>\n </ng-container>\n</thy-action-menu>\n", components: [{ type: i5$2.ThyActionMenuComponent, selector: "thy-action-menu", inputs: ["thyTheme", "thyWidth"] }, { type: i4$1.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { type: i5$2.ThyActionMenuDividerComponent, selector: "thy-action-menu-divider", inputs: ["thyTitle", "thyType"] }], directives: [{ type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5$2.ThyActionMenuItemDirective, selector: "[thyActionMenuItem]", inputs: ["thyDisabled", "thyType"] }, { type: i5$2.ThyActionMenuItemIconDirective, selector: "[thyActionMenuItemIcon]" }, { type: i5$2.ThyActionMenuItemNameDirective, selector: "[thyActionMenuItemName]" }, { type: i5$2.ThyActionMenuItemExtendIconDirective, selector: "[thyActionMenuItemExtendIcon]" }] });
|
|
7906
7945
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TheContextMenuComponent, decorators: [{
|
|
7907
7946
|
type: Component,
|
|
7908
7947
|
args: [{
|
|
@@ -8191,11 +8230,11 @@ class TableService {
|
|
|
8191
8230
|
});
|
|
8192
8231
|
}
|
|
8193
8232
|
}
|
|
8194
|
-
TableService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TableService, deps: [{ token: i1$3.ThyPopover }, { token: i2
|
|
8233
|
+
TableService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TableService, deps: [{ token: i1$3.ThyPopover }, { token: i2.Overlay }, { token: TableStore }, { token: TheTableContextMenuService }, { token: i0.NgZone }, { token: TheContextService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
8195
8234
|
TableService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TableService });
|
|
8196
8235
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TableService, decorators: [{
|
|
8197
8236
|
type: Injectable
|
|
8198
|
-
}], ctorParameters: function () { return [{ type: i1$3.ThyPopover }, { type: i2
|
|
8237
|
+
}], ctorParameters: function () { return [{ type: i1$3.ThyPopover }, { type: i2.Overlay }, { type: TableStore }, { type: TheTableContextMenuService }, { type: i0.NgZone }, { type: TheContextService }]; } });
|
|
8199
8238
|
|
|
8200
8239
|
const SLA_TABLE_SELECTOR = '.slate-element-table';
|
|
8201
8240
|
const SLA_TABLE_CELL_SELECTOR = '.slate-element-table-cell';
|
|
@@ -8274,7 +8313,7 @@ class TheInsertMarkComponent {
|
|
|
8274
8313
|
ngOnDestroy() { }
|
|
8275
8314
|
}
|
|
8276
8315
|
TheInsertMarkComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TheInsertMarkComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
8277
|
-
TheInsertMarkComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheInsertMarkComponent, selector: "the-table-insert-mark", inputs: { type: "type", at: "at", tableStore: "tableStore" }, ngImport: i0, template: "<div\n [thyTooltip]=\"!disabled && tooltipContent\"\n class=\"the-table-controls-insert-wrapper\"\n [ngClass]=\"{ disabled: disabled }\"\n contenteditable=\"false\"\n (mousedown)=\"onMouseDown($event)\"\n (mouseenter)=\"onMouseEnter($event)\"\n (mouseleave)=\"onMouseLeave($event)\"\n>\n <div\n class=\"the-table-controls-insert-line\"\n *ngIf=\"dotWrapperHovered\"\n [attr.data-dot-type]=\"type\"\n [ngStyle]=\"{ height: type === 'column' && insertLength, width: type === 'row' && insertLength }\"\n ></div>\n</div>\n", directives: [{ type:
|
|
8316
|
+
TheInsertMarkComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheInsertMarkComponent, selector: "the-table-insert-mark", inputs: { type: "type", at: "at", tableStore: "tableStore" }, ngImport: i0, template: "<div\n [thyTooltip]=\"!disabled && tooltipContent\"\n class=\"the-table-controls-insert-wrapper\"\n [ngClass]=\"{ disabled: disabled }\"\n contenteditable=\"false\"\n (mousedown)=\"onMouseDown($event)\"\n (mouseenter)=\"onMouseEnter($event)\"\n (mouseleave)=\"onMouseLeave($event)\"\n>\n <div\n class=\"the-table-controls-insert-line\"\n *ngIf=\"dotWrapperHovered\"\n [attr.data-dot-type]=\"type\"\n [ngStyle]=\"{ height: type === 'column' && insertLength, width: type === 'row' && insertLength }\"\n ></div>\n</div>\n", directives: [{ type: i5$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
|
|
8278
8317
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TheInsertMarkComponent, decorators: [{
|
|
8279
8318
|
type: Component,
|
|
8280
8319
|
args: [{
|
|
@@ -9820,7 +9859,7 @@ class TheTdComponent extends TheBaseElementComponent {
|
|
|
9820
9859
|
this.destroy$.complete();
|
|
9821
9860
|
}
|
|
9822
9861
|
}
|
|
9823
|
-
TheTdComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TheTdComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i0.Renderer2 }, { token: i0.ViewContainerRef }, { token: i0.NgZone }, { token: i0.Injector }, { token: i2
|
|
9862
|
+
TheTdComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TheTdComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i0.Renderer2 }, { token: i0.ViewContainerRef }, { token: i0.NgZone }, { token: i0.Injector }, { token: i2.Overlay }, { token: ColumnResizingStore }, { token: i2.ScrollDispatcher }], target: i0.ɵɵFactoryTarget.Component });
|
|
9824
9863
|
TheTdComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheTdComponent, selector: "td[theTd]", host: { properties: { "style.backgroundColor": "this.backgroundColor", "attr.colspan": "this.colspan", "attr.rowspan": "this.rowspan", "style.display": "this.display" } }, providers: [ColumnResizingStore], viewQueries: [{ propertyName: "cellInner", first: true, predicate: ["cellInner"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<div #cellInner>\n <slate-children [children]=\"children\" [context]=\"childrenContext\" [viewContext]=\"viewContext\"></slate-children>\n</div>\n", components: [{ type: i1.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }] });
|
|
9825
9864
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TheTdComponent, decorators: [{
|
|
9826
9865
|
type: Component,
|
|
@@ -9829,7 +9868,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImpor
|
|
|
9829
9868
|
templateUrl: './td.component.html',
|
|
9830
9869
|
providers: [ColumnResizingStore]
|
|
9831
9870
|
}]
|
|
9832
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i0.Renderer2 }, { type: i0.ViewContainerRef }, { type: i0.NgZone }, { type: i0.Injector }, { type: i2
|
|
9871
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i0.Renderer2 }, { type: i0.ViewContainerRef }, { type: i0.NgZone }, { type: i0.Injector }, { type: i2.Overlay }, { type: ColumnResizingStore }, { type: i2.ScrollDispatcher }]; }, propDecorators: { backgroundColor: [{
|
|
9833
9872
|
type: HostBinding,
|
|
9834
9873
|
args: ['style.backgroundColor']
|
|
9835
9874
|
}], colspan: [{
|
|
@@ -10387,7 +10426,7 @@ class TheVerticalToolbarItemComponent extends TheToolbarBaseItemComponent {
|
|
|
10387
10426
|
}
|
|
10388
10427
|
}
|
|
10389
10428
|
TheVerticalToolbarItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TheVerticalToolbarItemComponent, deps: [{ token: i0.ElementRef }, { token: i1$6.ThyPopover }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
10390
|
-
TheVerticalToolbarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheVerticalToolbarItemComponent, selector: "the-toolbar-vertical-align-item", inputs: { item: "item", menus: "menus", editor: "editor", toolbarItem: "toolbarItem" }, host: { listeners: { "document: mousedown": "handleDocumentMouseDown($event)" }, properties: { "class.hide": "!active" }, classAttribute: "the-toolbar-dropdown-container verticalAlign" }, viewQueries: [{ propertyName: "template", first: true, predicate: ["VerticalAlignItems"], descendants: true, read: TemplateRef, static: true }], usesInheritance: true, ngImport: i0, template: "<a\n thyIconNavLink\n class=\"icon-mode link-with-down\"\n [thyTooltip]=\"toolbarItem?.name\"\n [thyIconNavLinkActive]=\"isOpened\"\n thyTooltipPlacement=\"top\"\n (mousedown)=\"execute($event)\"\n>\n <thy-icon [thyIconName]=\"activeMenu?.icon\"></thy-icon>\n <thy-icon class=\"caret-down-icon font-size-sm text-desc\" thyIconName=\"caret-down\"></thy-icon>\n</a>\n\n<ng-template #VerticalAlignItems>\n <thy-action-menu class=\"dropdown\">\n <ng-container *ngFor=\"let menu of toolbarItem?.includes\">\n <a\n thyActionMenuItem\n href=\"javascript:;\"\n [thyActionMenuItemActive]=\"menu.key === activeMenu?.key\"\n [ngStyle]=\"menu?.styles\"\n (mousedown)=\"itemMousedown($event, menu)\"\n >\n <span *ngIf=\"menu.icon\" thyActionMenuItemIcon>\n <thy-icon [thyIconName]=\"menu?.icon\"></thy-icon>\n </span>\n <span thyActionMenuItemName>{{ menu.name }}</span>\n </a>\n </ng-container>\n </thy-action-menu>\n</ng-template>\n", components: [{ type:
|
|
10429
|
+
TheVerticalToolbarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheVerticalToolbarItemComponent, selector: "the-toolbar-vertical-align-item", inputs: { item: "item", menus: "menus", editor: "editor", toolbarItem: "toolbarItem" }, host: { listeners: { "document: mousedown": "handleDocumentMouseDown($event)" }, properties: { "class.hide": "!active" }, classAttribute: "the-toolbar-dropdown-container verticalAlign" }, viewQueries: [{ propertyName: "template", first: true, predicate: ["VerticalAlignItems"], descendants: true, read: TemplateRef, static: true }], usesInheritance: true, ngImport: i0, template: "<a\n thyIconNavLink\n class=\"icon-mode link-with-down\"\n [thyTooltip]=\"toolbarItem?.name\"\n [thyIconNavLinkActive]=\"isOpened\"\n thyTooltipPlacement=\"top\"\n (mousedown)=\"execute($event)\"\n>\n <thy-icon [thyIconName]=\"activeMenu?.icon\"></thy-icon>\n <thy-icon class=\"caret-down-icon font-size-sm text-desc\" thyIconName=\"caret-down\"></thy-icon>\n</a>\n\n<ng-template #VerticalAlignItems>\n <thy-action-menu class=\"dropdown\">\n <ng-container *ngFor=\"let menu of toolbarItem?.includes\">\n <a\n thyActionMenuItem\n href=\"javascript:;\"\n [thyActionMenuItemActive]=\"menu.key === activeMenu?.key\"\n [ngStyle]=\"menu?.styles\"\n (mousedown)=\"itemMousedown($event, menu)\"\n >\n <span *ngIf=\"menu.icon\" thyActionMenuItemIcon>\n <thy-icon [thyIconName]=\"menu?.icon\"></thy-icon>\n </span>\n <span thyActionMenuItemName>{{ menu.name }}</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.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: i6.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5$2.ThyActionMenuItemIconDirective, selector: "[thyActionMenuItemIcon]" }, { type: i5$2.ThyActionMenuItemNameDirective, selector: "[thyActionMenuItemName]" }] });
|
|
10391
10430
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TheVerticalToolbarItemComponent, decorators: [{
|
|
10392
10431
|
type: Component,
|
|
10393
10432
|
args: [{
|
|
@@ -10643,7 +10682,7 @@ TheToolbarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0"
|
|
|
10643
10682
|
</ng-template>
|
|
10644
10683
|
<ng-template #tooltip let-data> {{ data.name }} {{ data.shortcutKey }} </ng-template>
|
|
10645
10684
|
<ng-container #toolbarContainer></ng-container>
|
|
10646
|
-
`, isInline: true, components: [{ type:
|
|
10685
|
+
`, isInline: true, components: [{ type: i3.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i4$1.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }], 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"] }] });
|
|
10647
10686
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TheToolbarItemComponent, decorators: [{
|
|
10648
10687
|
type: Component,
|
|
10649
10688
|
args: [{
|
|
@@ -10727,7 +10766,7 @@ class TheQuickToolbarComponent extends mixinUnsubscribe(MixinBase) {
|
|
|
10727
10766
|
}
|
|
10728
10767
|
}
|
|
10729
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 });
|
|
10730
|
-
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$
|
|
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"] }] });
|
|
10731
10770
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TheQuickToolbarComponent, decorators: [{
|
|
10732
10771
|
type: Component,
|
|
10733
10772
|
args: [{
|
|
@@ -10846,6 +10885,130 @@ const withSoftBreak = (options = { rules: [{ hotkey: 'shift+enter' }] }) => (edi
|
|
|
10846
10885
|
return editor;
|
|
10847
10886
|
};
|
|
10848
10887
|
|
|
10888
|
+
class TheFontSizeToolbarItemComponent extends TheToolbarBaseItemComponent {
|
|
10889
|
+
constructor(elementRef, thyPopover, viewContainerRef, overlay) {
|
|
10890
|
+
super();
|
|
10891
|
+
this.elementRef = elementRef;
|
|
10892
|
+
this.thyPopover = thyPopover;
|
|
10893
|
+
this.viewContainerRef = viewContainerRef;
|
|
10894
|
+
this.overlay = overlay;
|
|
10895
|
+
this.fontSizes = FontSizes;
|
|
10896
|
+
this.disabled = false;
|
|
10897
|
+
this.disableGroup = HEADING_TYPES;
|
|
10898
|
+
this.toolbarItemContainer = true;
|
|
10899
|
+
this.fontSizeToolbarItem = true;
|
|
10900
|
+
}
|
|
10901
|
+
get isOpen() {
|
|
10902
|
+
return this.dropdownPopoverRef && this.dropdownPopoverRef.getOverlayRef() && this.dropdownPopoverRef.getOverlayRef().hasAttached();
|
|
10903
|
+
}
|
|
10904
|
+
get disableClass() {
|
|
10905
|
+
return this.disabled;
|
|
10906
|
+
}
|
|
10907
|
+
toggleDropdown(event) {
|
|
10908
|
+
var _a;
|
|
10909
|
+
super.execute(event);
|
|
10910
|
+
if (((_a = this.editor) === null || _a === void 0 ? void 0 : _a.disabled) || this.disabled) {
|
|
10911
|
+
return;
|
|
10912
|
+
}
|
|
10913
|
+
this.openDropdownPopover();
|
|
10914
|
+
}
|
|
10915
|
+
handleDocumentMouseDown(event) {
|
|
10916
|
+
if (!this.elementRef.nativeElement.contains(event.target)) {
|
|
10917
|
+
this.closeDropdownPopover();
|
|
10918
|
+
}
|
|
10919
|
+
}
|
|
10920
|
+
ngOnInit() {
|
|
10921
|
+
this.activeSize = this.fontSizes[2];
|
|
10922
|
+
}
|
|
10923
|
+
statusChange(editor) {
|
|
10924
|
+
if (editor.selection) {
|
|
10925
|
+
const anchorBlock$1 = anchorBlock(editor);
|
|
10926
|
+
if (anchorBlock$1 && this.disableGroup.includes(anchorBlock$1.type)) {
|
|
10927
|
+
this.activeSize = null;
|
|
10928
|
+
this.disabled = true;
|
|
10929
|
+
return;
|
|
10930
|
+
}
|
|
10931
|
+
const marks = getSelectionMarks(editor);
|
|
10932
|
+
const fontSizeMark = marks[MarkTypes.fontSize];
|
|
10933
|
+
this.activeSize = fontSizeMark ? fontSizeMark : this.fontSizes[2];
|
|
10934
|
+
this.disabled = false;
|
|
10935
|
+
}
|
|
10936
|
+
}
|
|
10937
|
+
itemMousedown(event, size) {
|
|
10938
|
+
var _a, _b;
|
|
10939
|
+
super.execute(event);
|
|
10940
|
+
this.closeDropdownPopover();
|
|
10941
|
+
if (((_a = this.editor) === null || _a === void 0 ? void 0 : _a.disabled) || ((_b = this.editor) === null || _b === void 0 ? void 0 : _b.readOnly)) {
|
|
10942
|
+
return;
|
|
10943
|
+
}
|
|
10944
|
+
const anchorBlock$1 = anchorBlock(this.editor);
|
|
10945
|
+
if (anchorBlock$1 && this.disableGroup.includes(anchorBlock$1.type)) {
|
|
10946
|
+
return;
|
|
10947
|
+
}
|
|
10948
|
+
Editor.addMark(this.editor, MarkTypes.fontSize, size);
|
|
10949
|
+
}
|
|
10950
|
+
openDropdownPopover() {
|
|
10951
|
+
var _a;
|
|
10952
|
+
this.dropdownPopoverRef = this.thyPopover.open(this.dropdownTemplate, {
|
|
10953
|
+
origin: this.elementRef,
|
|
10954
|
+
panelClass: ['the-toolbar-dropdown-popover', (_a = this.item) === null || _a === void 0 ? void 0 : _a.key],
|
|
10955
|
+
placement: 'bottomLeft',
|
|
10956
|
+
insideClosable: false,
|
|
10957
|
+
backdropClosable: true,
|
|
10958
|
+
hasBackdrop: false,
|
|
10959
|
+
offset: 10,
|
|
10960
|
+
viewContainerRef: this.viewContainerRef,
|
|
10961
|
+
scrollStrategy: this.overlay.scrollStrategies.reposition()
|
|
10962
|
+
});
|
|
10963
|
+
}
|
|
10964
|
+
closeDropdownPopover() {
|
|
10965
|
+
var _a;
|
|
10966
|
+
if (this.dropdownPopoverRef) {
|
|
10967
|
+
(_a = this.dropdownPopoverRef) === null || _a === void 0 ? void 0 : _a.close();
|
|
10968
|
+
}
|
|
10969
|
+
}
|
|
10970
|
+
}
|
|
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 });
|
|
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]" }] });
|
|
10973
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TheFontSizeToolbarItemComponent, decorators: [{
|
|
10974
|
+
type: Component,
|
|
10975
|
+
args: [{
|
|
10976
|
+
selector: 'the-font-size-toolbar-item',
|
|
10977
|
+
templateUrl: './toolbar-item.component.html'
|
|
10978
|
+
}]
|
|
10979
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1$3.ThyPopover }, { type: i0.ViewContainerRef }, { type: i2.Overlay }]; }, propDecorators: { editor: [{
|
|
10980
|
+
type: Input
|
|
10981
|
+
}], item: [{
|
|
10982
|
+
type: Input
|
|
10983
|
+
}], dropdownTemplate: [{
|
|
10984
|
+
type: ViewChild,
|
|
10985
|
+
args: ['dropdownTemplate', { static: true }]
|
|
10986
|
+
}], toolbarItemContainer: [{
|
|
10987
|
+
type: HostBinding,
|
|
10988
|
+
args: ['class.the-toolbar-dropdown-container']
|
|
10989
|
+
}], fontSizeToolbarItem: [{
|
|
10990
|
+
type: HostBinding,
|
|
10991
|
+
args: ['class.the-font-size-toolbar-item']
|
|
10992
|
+
}], disableClass: [{
|
|
10993
|
+
type: HostBinding,
|
|
10994
|
+
args: ['class.disabled']
|
|
10995
|
+
}], toggleDropdown: [{
|
|
10996
|
+
type: HostListener,
|
|
10997
|
+
args: ['mousedown', ['$event']]
|
|
10998
|
+
}], handleDocumentMouseDown: [{
|
|
10999
|
+
type: HostListener,
|
|
11000
|
+
args: ['document: mousedown', ['$event']]
|
|
11001
|
+
}] } });
|
|
11002
|
+
|
|
11003
|
+
const FontSizes = [12, 13, 14, 15, 16, 19, 22, 24, 29, 32, 40, 48];
|
|
11004
|
+
const FontSizeOptions = [
|
|
11005
|
+
{
|
|
11006
|
+
key: MarkTypes.fontSize,
|
|
11007
|
+
name: '字号',
|
|
11008
|
+
iconComponent: TheFontSizeToolbarItemComponent
|
|
11009
|
+
}
|
|
11010
|
+
];
|
|
11011
|
+
|
|
10849
11012
|
const internalPlugins = [
|
|
10850
11013
|
withTheHistory,
|
|
10851
11014
|
withAutoInsertData(),
|
|
@@ -10892,6 +11055,7 @@ const internalToolbarItems = [
|
|
|
10892
11055
|
...MarkOptions,
|
|
10893
11056
|
...ColorOptions,
|
|
10894
11057
|
...HeadingOptions,
|
|
11058
|
+
...FontSizeOptions,
|
|
10895
11059
|
...TodoItemOptions,
|
|
10896
11060
|
...ListOptions,
|
|
10897
11061
|
...ImageOptions,
|
|
@@ -11227,7 +11391,7 @@ class TheToolbarComponent {
|
|
|
11227
11391
|
}
|
|
11228
11392
|
}
|
|
11229
11393
|
TheToolbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TheToolbarComponent, deps: [{ token: i0.ComponentFactoryResolver }, { token: i0.ElementRef }, { token: i0.NgZone }, { token: TheToolbarGroupToken }], target: i0.ɵɵFactoryTarget.Component });
|
|
11230
|
-
TheToolbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheToolbarComponent, selector: "the-toolbar", inputs: { editor: "editor", toolbarItems: "toolbarItems", align: "align", containerClass: "containerClass", isMore: "isMore", afterTemplate: "afterTemplate" }, host: { classAttribute: "the-toolbar-container" }, viewQueries: [{ propertyName: "toolbarContainer", first: true, predicate: ["toolbarContainer"], descendants: true, read: ViewContainerRef, static: true }], usesOnChanges: true, ngImport: i0, template: "<thy-icon-nav [style.justifyContent]=\"align\">\n <ng-container #toolbarContainer></ng-container>\n <ng-content></ng-content>\n <ng-template *ngIf=\"afterTemplate\" [ngTemplateOutlet]=\"afterTemplate\"></ng-template>\n</thy-icon-nav>\n", components: [{ type:
|
|
11394
|
+
TheToolbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheToolbarComponent, selector: "the-toolbar", inputs: { editor: "editor", toolbarItems: "toolbarItems", align: "align", containerClass: "containerClass", isMore: "isMore", afterTemplate: "afterTemplate" }, host: { classAttribute: "the-toolbar-container" }, viewQueries: [{ propertyName: "toolbarContainer", first: true, predicate: ["toolbarContainer"], descendants: true, read: ViewContainerRef, static: true }], usesOnChanges: true, ngImport: i0, template: "<thy-icon-nav [style.justifyContent]=\"align\">\n <ng-container #toolbarContainer></ng-container>\n <ng-content></ng-content>\n <ng-template *ngIf=\"afterTemplate\" [ngTemplateOutlet]=\"afterTemplate\"></ng-template>\n</thy-icon-nav>\n", components: [{ type: i3.ThyIconNavComponent, selector: "thy-icon-nav", inputs: ["thyType"] }], directives: [{ type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }] });
|
|
11231
11395
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TheToolbarComponent, decorators: [{
|
|
11232
11396
|
type: Component,
|
|
11233
11397
|
args: [{
|
|
@@ -11352,7 +11516,7 @@ class TheInlineToolbarComponent {
|
|
|
11352
11516
|
this.destroy$.complete();
|
|
11353
11517
|
}
|
|
11354
11518
|
}
|
|
11355
|
-
TheInlineToolbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TheInlineToolbarComponent, deps: [{ token: i0.ElementRef }, { token: i2
|
|
11519
|
+
TheInlineToolbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TheInlineToolbarComponent, deps: [{ token: i0.ElementRef }, { token: i2.ScrollDispatcher }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: TheContextService }], target: i0.ɵɵFactoryTarget.Component });
|
|
11356
11520
|
TheInlineToolbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheInlineToolbarComponent, selector: "the-inline-toolbar", inputs: { editor: "editor", toolbarItems: "toolbarItems" }, host: { properties: { "class.hide": "toolbarItems.length === 0" } }, viewQueries: [{ propertyName: "inlineToolbar", first: true, predicate: ["inlineToolbar"], descendants: true }], ngImport: i0, template: `<the-toolbar
|
|
11357
11521
|
#inlineToolbar
|
|
11358
11522
|
class="the-inline-toolbar"
|
|
@@ -11376,7 +11540,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImpor
|
|
|
11376
11540
|
},
|
|
11377
11541
|
changeDetection: ChangeDetectionStrategy.OnPush
|
|
11378
11542
|
}]
|
|
11379
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i2
|
|
11543
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i2.ScrollDispatcher }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }, { type: TheContextService }]; }, propDecorators: { editor: [{
|
|
11380
11544
|
type: Input
|
|
11381
11545
|
}], toolbarItems: [{
|
|
11382
11546
|
type: Input
|
|
@@ -12093,7 +12257,7 @@ class TheToolbarGroupComponent {
|
|
|
12093
12257
|
}
|
|
12094
12258
|
}
|
|
12095
12259
|
TheToolbarGroupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TheToolbarGroupComponent, deps: [{ token: i0.ElementRef }, { token: i1$3.ThyPopover }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
12096
|
-
TheToolbarGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheToolbarGroupComponent, selector: "the-toolbar-group", inputs: { menus: "menus", item: "item" }, host: { listeners: { "mousedown": "mousedownHandler($event)", "click": "clickHandle($event)" }, classAttribute: "the-toolbar-group" }, viewQueries: [{ propertyName: "groupTemplate", first: true, predicate: ["groupTemplate"], descendants: true, read: TemplateRef, static: true }], ngImport: i0, template: "<a thyIconNavLink [thyIconNavLinkIcon]=\"item.icon\" [thyTooltip]=\"item?.name\" thyTooltipPlacement=\"top\" [thyIconNavLinkActive]=\"active\"></a>\n\n<ng-template #groupTemplate>\n <the-toolbar class=\"group\" [editor]=\"editor\" [toolbarItems]=\"menus\" [isMore]=\"false\"></the-toolbar>\n</ng-template>\n", components: [{ type:
|
|
12260
|
+
TheToolbarGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheToolbarGroupComponent, selector: "the-toolbar-group", inputs: { menus: "menus", item: "item" }, host: { listeners: { "mousedown": "mousedownHandler($event)", "click": "clickHandle($event)" }, classAttribute: "the-toolbar-group" }, viewQueries: [{ propertyName: "groupTemplate", first: true, predicate: ["groupTemplate"], descendants: true, read: TemplateRef, static: true }], ngImport: i0, template: "<a thyIconNavLink [thyIconNavLinkIcon]=\"item.icon\" [thyTooltip]=\"item?.name\" thyTooltipPlacement=\"top\" [thyIconNavLinkActive]=\"active\"></a>\n\n<ng-template #groupTemplate>\n <the-toolbar class=\"group\" [editor]=\"editor\" [toolbarItems]=\"menus\" [isMore]=\"false\"></the-toolbar>\n</ng-template>\n", components: [{ type: i3.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: TheToolbarComponent, selector: "the-toolbar", inputs: ["editor", "toolbarItems", "align", "containerClass", "isMore", "afterTemplate"] }], directives: [{ type: i5$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }] });
|
|
12097
12261
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TheToolbarGroupComponent, decorators: [{
|
|
12098
12262
|
type: Component,
|
|
12099
12263
|
args: [{
|
|
@@ -12133,7 +12297,9 @@ const TETHYS = [
|
|
|
12133
12297
|
ThySelectModule,
|
|
12134
12298
|
ThyButtonModule,
|
|
12135
12299
|
ThyNotifyModule,
|
|
12136
|
-
ThyAlertModule
|
|
12300
|
+
ThyAlertModule,
|
|
12301
|
+
ThyResizableModule,
|
|
12302
|
+
ThySwitchModule
|
|
12137
12303
|
];
|
|
12138
12304
|
const COMPONENTS = [
|
|
12139
12305
|
TheToolbarComponent,
|
|
@@ -12153,7 +12319,8 @@ const COMPONENTS = [
|
|
|
12153
12319
|
TheTableSelectComponent,
|
|
12154
12320
|
TheTableToolbarItemComponent,
|
|
12155
12321
|
TheConversionHintComponent,
|
|
12156
|
-
TheVerticalToolbarItemComponent
|
|
12322
|
+
TheVerticalToolbarItemComponent,
|
|
12323
|
+
TheFontSizeToolbarItemComponent
|
|
12157
12324
|
];
|
|
12158
12325
|
const PLUGIN_COMPONENTS = [
|
|
12159
12326
|
TheImageComponent,
|
|
@@ -12196,7 +12363,8 @@ TheEditorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version
|
|
|
12196
12363
|
TheTableSelectComponent,
|
|
12197
12364
|
TheTableToolbarItemComponent,
|
|
12198
12365
|
TheConversionHintComponent,
|
|
12199
|
-
TheVerticalToolbarItemComponent,
|
|
12366
|
+
TheVerticalToolbarItemComponent,
|
|
12367
|
+
TheFontSizeToolbarItemComponent, TheImageComponent,
|
|
12200
12368
|
TheTemplateComponent,
|
|
12201
12369
|
TheHrComponent,
|
|
12202
12370
|
TheBlockquoteComponent,
|
|
@@ -12227,7 +12395,9 @@ TheEditorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version
|
|
|
12227
12395
|
ThySelectModule,
|
|
12228
12396
|
ThyButtonModule,
|
|
12229
12397
|
ThyNotifyModule,
|
|
12230
|
-
ThyAlertModule,
|
|
12398
|
+
ThyAlertModule,
|
|
12399
|
+
ThyResizableModule,
|
|
12400
|
+
ThySwitchModule, CodemirrorModule, TheColumnSizeModule], exports: [TheEditorComponent, TheToolbarComponent, TheToolbarDropdownComponent, TheToolbarItemComponent, TheDefaultElementComponent] });
|
|
12231
12401
|
TheEditorModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: TheEditorModule, providers: [
|
|
12232
12402
|
{
|
|
12233
12403
|
provide: TheToolbarGroupToken,
|
|
@@ -12260,5 +12430,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImpor
|
|
|
12260
12430
|
* Generated bundle index. Do not edit.
|
|
12261
12431
|
*/
|
|
12262
12432
|
|
|
12263
|
-
export { ALIGN_BLOCK_TYPES, A_TAG_REL_ATTR, AlignEditor, Alignment, BLOCK_DELETEBACKWARD_TYPES, BlockquoteEditor, CLIPBOARD_FORMAT_KEY, CODEMIRROR_PADDING_TOP, CODE_MODES, COMPONENTS, CONTAINER_BLOCKS, CONTROL_KEY, CodeEditor, CodeMode, ColorEditor, DEFAULT_LANGUAGE, DEFAULT_SCROLL_CONTAINER, DefaultElementOptions, DefaultGlobalToolbarDefinition, DefaultInlineToolbarDefinition, DefaultQuickToolbarDefinition, DropdownMode, ELEMENT_UNIQUE_ID, ElementKinds, ErrorCodes, HEADING_TYPES, HeadingEditor, HrEditor, IS_MAC, ImageEditor, LINK_DEFAULT_TEXT, LIST_BLOCK_TYPES, LinkEditor, ListEditor, MarkEditor, MarkProps, MarkTypes, PICTURE_ACCEPTED_UPLOAD_MIME, PICTURE_ACCEPTED_UPLOAD_SIZE, PLUGIN_COMPONENTS, QUICK_TOOLBAR_HOTKEY, QuickInsertEditor, STANDARD_HEADING_TYPES, TAB_SPACE, THE_CODE_MODE_PROVIDER, THE_CODE_MODE_TOKEN, THE_EDITOR_CONVERSION_HINT_REF, THE_EDITOR_QUICK_TOOLBAR_REF, THE_EDITOR_UUID, THE_INLINE_TOOLBAR_TYPES, THE_UPLOAD_SERVICE_TOKEN, TableEditor, TheBaseElementComponent,
|
|
12433
|
+
export { ALIGN_BLOCK_TYPES, A_TAG_REL_ATTR, AlignEditor, Alignment, BLOCK_DELETEBACKWARD_TYPES, BlockquoteEditor, CLIPBOARD_FORMAT_KEY, CODEMIRROR_PADDING_TOP, CODE_MODES, COMPONENTS, CONTAINER_BLOCKS, CONTROL_KEY, CodeEditor, CodeMode, ColorEditor, DEFAULT_LANGUAGE, DEFAULT_SCROLL_CONTAINER, DefaultElementOptions, DefaultGlobalToolbarDefinition, DefaultInlineToolbarDefinition, DefaultQuickToolbarDefinition, DropdownMode, ELEMENT_UNIQUE_ID, ElementKinds, ErrorCodes, HEADING_TYPES, HeadingEditor, HrEditor, IS_MAC, ImageEditor, LINK_DEFAULT_TEXT, LIST_BLOCK_TYPES, LinkEditor, ListEditor, MarkEditor, MarkProps, MarkTypes, PICTURE_ACCEPTED_UPLOAD_MIME, PICTURE_ACCEPTED_UPLOAD_SIZE, PLUGIN_COMPONENTS, QUICK_TOOLBAR_HOTKEY, QuickInsertEditor, STANDARD_HEADING_TYPES, TAB_SPACE, THE_CODE_MODE_PROVIDER, THE_CODE_MODE_TOKEN, THE_EDITOR_CONVERSION_HINT_REF, THE_EDITOR_QUICK_TOOLBAR_REF, THE_EDITOR_UUID, THE_INLINE_TOOLBAR_TYPES, THE_UPLOAD_SERVICE_TOKEN, TableEditor, TheBaseElementComponent, TheCodeConfig, TheContextService, TheDataMode, TheDefaultElementComponent, TheEditor, TheEditorComponent, TheEditorModule, TheImageComponent, TheMode, index$1 as TheQueries, TheToolbarBaseItemComponent, TheToolbarComponent, TheToolbarDropdownComponent, TheToolbarGroupComponent, TheToolbarGroupToken, TheToolbarItemComponent, TheToolbarService, index as TheTransforms, TodoItemEditor, ToolbarActionTypes, ToolbarAlignment, ToolbarItemMode, ToolbarItemType, ToolbarMoreGroup, VOID_BLOCK_TYPES, VerticalAlignEditor, VerticalAlignment, ZERO_WIDTH_CHAR, createEmptyParagraph, dataDeserialize, dataSerializing, getToolbarClass, htmlToTheia, inValidTypes, plainToTheia, toolbarCompose, withTheEditor };
|
|
12264
12434
|
//# sourceMappingURL=worktile-theia.js.map
|