@worktile/theia 2.1.1 → 2.1.2
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 +166 -157
- package/bundles/worktile-theia.umd.js.map +1 -1
- package/components/toolbar/toolbar.component.d.ts +4 -1
- package/components/toolbar/toolbar.component.scss +2 -0
- package/components/toolbar-dropdown/toolbar-dropdown.component.d.ts +7 -5
- package/components/toolbar-dropdown/toolbar-dropdown.component.scss +2 -0
- package/components/toolbar-item/toolbar-item.component.d.ts +3 -0
- package/constants/node-types.d.ts +15 -0
- package/editor.module.d.ts +41 -43
- package/esm2015/components/inline-toolbar/inline-toolbar.component.js +1 -1
- package/esm2015/components/toolbar/toolbar.component.js +18 -6
- package/esm2015/components/toolbar-dropdown/toolbar-dropdown.component.js +14 -5
- package/esm2015/components/toolbar-group/toolbar-group.component.js +1 -1
- package/esm2015/components/toolbar-item/toolbar-item.component.js +20 -6
- package/esm2015/constants/node-types.js +29 -1
- package/esm2015/editor.component.js +2 -2
- package/esm2015/editor.module.js +3 -6
- package/esm2015/interfaces/editor.js +1 -1
- package/esm2015/interfaces/toolbar.js +1 -1
- package/esm2015/plugins/align/options.js +2 -1
- package/esm2015/plugins/code/code.component.js +2 -2
- package/esm2015/plugins/font-size/font-size.editor.js +47 -0
- package/esm2015/plugins/font-size/options.js +20 -6
- package/esm2015/plugins/heading/heading.editor.js +11 -2
- package/esm2015/plugins/heading/options.js +2 -1
- package/esm2015/plugins/table/table.editor.js +1 -1
- package/esm2015/services/toolbar.service.js +2 -2
- package/fesm2015/worktile-theia.js +141 -130
- package/fesm2015/worktile-theia.js.map +1 -1
- package/interfaces/editor.d.ts +3 -1
- package/interfaces/toolbar.d.ts +2 -1
- package/package.json +1 -1
- package/plugins/code/code.component.scss +0 -1
- package/plugins/font-size/font-size.editor.d.ts +8 -0
- package/plugins/font-size/options.d.ts +0 -1
- package/plugins/font-size/toolbar-item.component.scss +1 -11
- package/plugins/heading/heading.editor.d.ts +1 -1
- package/plugins/table/table.editor.d.ts +1 -1
- package/styles/editor.scss +13 -1
- package/styles/typo.scss +2 -1
- package/esm2015/plugins/font-size/toolbar-item.component.js +0 -129
- package/plugins/font-size/toolbar-item.component.d.ts +0 -35
|
@@ -422,6 +422,34 @@
|
|
|
422
422
|
VerticalAlignment["middle"] = "middle";
|
|
423
423
|
VerticalAlignment["bottom"] = "bottom";
|
|
424
424
|
})(exports.VerticalAlignment || (exports.VerticalAlignment = {}));
|
|
425
|
+
exports.FontSizes = void 0;
|
|
426
|
+
(function (FontSizes) {
|
|
427
|
+
FontSizes["fontSize12"] = "12";
|
|
428
|
+
FontSizes["fontSize13"] = "13";
|
|
429
|
+
FontSizes["fontSize14"] = "14";
|
|
430
|
+
FontSizes["fontSize15"] = "15";
|
|
431
|
+
FontSizes["fontSize16"] = "16";
|
|
432
|
+
FontSizes["fontSize18"] = "18";
|
|
433
|
+
FontSizes["fontSize20"] = "20";
|
|
434
|
+
FontSizes["fontSize24"] = "24";
|
|
435
|
+
FontSizes["fontSize28"] = "28";
|
|
436
|
+
FontSizes["fontSize32"] = "32";
|
|
437
|
+
FontSizes["fontSize40"] = "40";
|
|
438
|
+
FontSizes["fontSize48"] = "48";
|
|
439
|
+
})(exports.FontSizes || (exports.FontSizes = {}));
|
|
440
|
+
var FontSizeTypes = [
|
|
441
|
+
exports.FontSizes.fontSize12,
|
|
442
|
+
exports.FontSizes.fontSize13,
|
|
443
|
+
exports.FontSizes.fontSize14,
|
|
444
|
+
exports.FontSizes.fontSize15,
|
|
445
|
+
exports.FontSizes.fontSize16,
|
|
446
|
+
exports.FontSizes.fontSize20,
|
|
447
|
+
exports.FontSizes.fontSize24,
|
|
448
|
+
exports.FontSizes.fontSize28,
|
|
449
|
+
exports.FontSizes.fontSize32,
|
|
450
|
+
exports.FontSizes.fontSize40,
|
|
451
|
+
exports.FontSizes.fontSize48
|
|
452
|
+
];
|
|
425
453
|
exports.MarkTypes = void 0;
|
|
426
454
|
(function (MarkTypes) {
|
|
427
455
|
MarkTypes["bold"] = "bold";
|
|
@@ -6018,6 +6046,7 @@
|
|
|
6018
6046
|
var HeadingEditor = {
|
|
6019
6047
|
setHeading: function (editor, heading) {
|
|
6020
6048
|
slate.Editor.withoutNormalizing(editor, function () {
|
|
6049
|
+
var _a;
|
|
6021
6050
|
var types = [exports.ElementKinds.bulletedList, exports.ElementKinds.numberedList, exports.ElementKinds.listItem];
|
|
6022
6051
|
slate.Transforms.unwrapNodes(editor, {
|
|
6023
6052
|
at: editor.selection,
|
|
@@ -6026,6 +6055,13 @@
|
|
|
6026
6055
|
split: true
|
|
6027
6056
|
});
|
|
6028
6057
|
slate.Transforms.setNodes(editor, { type: heading });
|
|
6058
|
+
var entry = anchorBlockEntry(editor);
|
|
6059
|
+
var unMarks = (_a = {},
|
|
6060
|
+
_a[exports.MarkTypes.fontSize] = null,
|
|
6061
|
+
_a);
|
|
6062
|
+
if (entry) {
|
|
6063
|
+
setMarks(editor, unMarks, entry[1]);
|
|
6064
|
+
}
|
|
6029
6065
|
});
|
|
6030
6066
|
},
|
|
6031
6067
|
isHeadingActive: function (editor, heading) {
|
|
@@ -6042,6 +6078,7 @@
|
|
|
6042
6078
|
name: '正文',
|
|
6043
6079
|
key: exports.ElementKinds.headingList,
|
|
6044
6080
|
type: exports.ToolbarItemType.toolDropdown,
|
|
6081
|
+
dropdownItemKey: exports.ElementKinds.paragraph,
|
|
6045
6082
|
includes: __spreadArray([exports.ElementKinds.paragraph], __read(STANDARD_HEADING_TYPES))
|
|
6046
6083
|
},
|
|
6047
6084
|
{
|
|
@@ -6136,6 +6173,7 @@
|
|
|
6136
6173
|
key: exports.ToolbarActionTypes.alignType,
|
|
6137
6174
|
type: exports.ToolbarItemType.toolDropdown,
|
|
6138
6175
|
dropdownMode: exports.DropdownMode.icon,
|
|
6176
|
+
dropdownItemKey: exports.ToolbarActionTypes.alignLeft,
|
|
6139
6177
|
includes: [exports.ToolbarActionTypes.alignLeft, exports.ToolbarActionTypes.alignCenter, exports.ToolbarActionTypes.alignRight],
|
|
6140
6178
|
name: '对齐方式'
|
|
6141
6179
|
},
|
|
@@ -6734,6 +6772,7 @@
|
|
|
6734
6772
|
_this.overlay = overlay;
|
|
6735
6773
|
_this.mode = exports.DropdownMode.text;
|
|
6736
6774
|
_this.dropdownMode = exports.DropdownMode;
|
|
6775
|
+
_this.disabled = false;
|
|
6737
6776
|
return _this;
|
|
6738
6777
|
}
|
|
6739
6778
|
Object.defineProperty(TheToolbarDropdownComponent.prototype, "item", {
|
|
@@ -6757,7 +6796,7 @@
|
|
|
6757
6796
|
TheToolbarDropdownComponent.prototype.toggleDropdown = function (event) {
|
|
6758
6797
|
var _a;
|
|
6759
6798
|
_super.prototype.execute.call(this, event);
|
|
6760
|
-
if ((_a = this.editor) === null || _a === void 0 ? void 0 : _a.disabled) {
|
|
6799
|
+
if (((_a = this.editor) === null || _a === void 0 ? void 0 : _a.disabled) || this.disabled) {
|
|
6761
6800
|
return;
|
|
6762
6801
|
}
|
|
6763
6802
|
this.openDropdownPopover();
|
|
@@ -6767,6 +6806,13 @@
|
|
|
6767
6806
|
this.closeDropdownPopover();
|
|
6768
6807
|
}
|
|
6769
6808
|
};
|
|
6809
|
+
Object.defineProperty(TheToolbarDropdownComponent.prototype, "disabledState", {
|
|
6810
|
+
get: function () {
|
|
6811
|
+
return this.disabled;
|
|
6812
|
+
},
|
|
6813
|
+
enumerable: false,
|
|
6814
|
+
configurable: true
|
|
6815
|
+
});
|
|
6770
6816
|
TheToolbarDropdownComponent.prototype.ngOnInit = function () {
|
|
6771
6817
|
var _a;
|
|
6772
6818
|
if (!this.template) {
|
|
@@ -6780,12 +6826,14 @@
|
|
|
6780
6826
|
}
|
|
6781
6827
|
};
|
|
6782
6828
|
TheToolbarDropdownComponent.prototype.statusChange = function (editor) {
|
|
6829
|
+
var _a, _b;
|
|
6830
|
+
this.disabled = ((_a = this.toolbarItem) === null || _a === void 0 ? void 0 : _a.disable) ? (_b = this.toolbarItem) === null || _b === void 0 ? void 0 : _b.disable(editor) : false;
|
|
6783
6831
|
var activeItem = this.menus.find(function (i) {
|
|
6784
6832
|
if (i === null || i === void 0 ? void 0 : i.active) {
|
|
6785
6833
|
return i === null || i === void 0 ? void 0 : i.active(editor);
|
|
6786
6834
|
}
|
|
6787
6835
|
});
|
|
6788
|
-
this.activeMenu = activeItem ? activeItem : this.
|
|
6836
|
+
this.activeMenu = activeItem ? activeItem : this.item;
|
|
6789
6837
|
};
|
|
6790
6838
|
TheToolbarDropdownComponent.prototype.itemMousedown = function (event, item) {
|
|
6791
6839
|
_super.prototype.execute.call(this, event);
|
|
@@ -6840,7 +6888,7 @@
|
|
|
6840
6888
|
return TheToolbarDropdownComponent;
|
|
6841
6889
|
}(TheToolbarBaseItemComponent));
|
|
6842
6890
|
TheToolbarDropdownComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheToolbarDropdownComponent, deps: [{ token: i0__namespace.ElementRef }, { token: i1__namespace$3.ThyPopover }, { token: i0__namespace.ViewContainerRef }, { token: i2__namespace.Overlay }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
6843
|
-
TheToolbarDropdownComponent.ɵcmp = i0__namespace.ɵɵ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__namespace, 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__namespace.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i4__namespace$1.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { type: i5__namespace$2.ThyActionMenuComponent, selector: "thy-action-menu", inputs: ["thyTheme", "thyWidth"] }, { type: i5__namespace$2.ThyActionMenuDividerComponent, selector: "thy-action-menu-divider", inputs: ["thyTitle", "thyType"] }], directives: [{ type: i6__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i5__namespace$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { type: i6__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5__namespace$2.ThyActionMenuItemDirective, selector: "[thyActionMenuItem]", inputs: ["thyDisabled", "thyType"] }, { type: i5__namespace$2.ThyActionMenuItemActiveDirective, selector: "[thyActionMenuItemActive]", inputs: ["thyActionMenuItemActive"] }, { type: i6__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i5__namespace$2.ThyActionMenuItemIconDirective, selector: "[thyActionMenuItemIcon]" }, { type: i5__namespace$2.ThyActionMenuItemNameDirective, selector: "[thyActionMenuItemName]" }] });
|
|
6891
|
+
TheToolbarDropdownComponent.ɵcmp = i0__namespace.ɵɵ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)" }, properties: { "class.disabled": "this.disabledState" }, 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__namespace, 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__namespace.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i4__namespace$1.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { type: i5__namespace$2.ThyActionMenuComponent, selector: "thy-action-menu", inputs: ["thyTheme", "thyWidth"] }, { type: i5__namespace$2.ThyActionMenuDividerComponent, selector: "thy-action-menu-divider", inputs: ["thyTitle", "thyType"] }], directives: [{ type: i6__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i5__namespace$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { type: i6__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5__namespace$2.ThyActionMenuItemDirective, selector: "[thyActionMenuItem]", inputs: ["thyDisabled", "thyType"] }, { type: i5__namespace$2.ThyActionMenuItemActiveDirective, selector: "[thyActionMenuItemActive]", inputs: ["thyActionMenuItemActive"] }, { type: i6__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i5__namespace$2.ThyActionMenuItemIconDirective, selector: "[thyActionMenuItemIcon]" }, { type: i5__namespace$2.ThyActionMenuItemNameDirective, selector: "[thyActionMenuItemName]" }] });
|
|
6844
6892
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheToolbarDropdownComponent, decorators: [{
|
|
6845
6893
|
type: i0.Component,
|
|
6846
6894
|
args: [{
|
|
@@ -6875,6 +6923,9 @@
|
|
|
6875
6923
|
}], handleDocumentMouseDown: [{
|
|
6876
6924
|
type: i0.HostListener,
|
|
6877
6925
|
args: ['document: mousedown', ['$event']]
|
|
6926
|
+
}], disabledState: [{
|
|
6927
|
+
type: i0.HostBinding,
|
|
6928
|
+
args: ['class.disabled']
|
|
6878
6929
|
}] } });
|
|
6879
6930
|
|
|
6880
6931
|
var NavSplitLineComponent = /** @class */ (function () {
|
|
@@ -7087,7 +7138,7 @@
|
|
|
7087
7138
|
return TheCodeComponent;
|
|
7088
7139
|
}(TheBaseElementComponent));
|
|
7089
7140
|
TheCodeComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheCodeComponent, deps: [{ token: i0__namespace.ElementRef }, { token: i0__namespace.ChangeDetectorRef }, { token: i1__namespace$4.ThyNotifyService }, { token: TheContextService }, { token: i0__namespace.NgZone }, { token: THE_CODE_MODE_TOKEN }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
7090
|
-
TheCodeComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheCodeComponent, selector: "div[theCode]", viewQueries: [{ propertyName: "codemirror", first: true, predicate: ["codemirror"], descendants: true, read: i8.CodeMirrorComponent }], usesInheritance: true, ngImport: i0__namespace, 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)]=\"options.lineWrapping\"\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]=\"
|
|
7141
|
+
TheCodeComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheCodeComponent, selector: "div[theCode]", viewQueries: [{ propertyName: "codemirror", first: true, predicate: ["codemirror"], descendants: true, read: i8.CodeMirrorComponent }], usesInheritance: true, ngImport: i0__namespace, 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)]=\"options.lineWrapping\"\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]=\"43\"\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__namespace.ThyIconNavComponent, selector: "thy-icon-nav", inputs: ["thyType"] }, { type: TheToolbarDropdownComponent, selector: "the-toolbar-dropdown", inputs: ["toolbarItem", "menus", "mode", "item", "itemMousedownHandle"] }, { type: i3__namespace.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: NavSplitLineComponent, selector: "nav-split-line", inputs: ["mode"] }, { type: i6__namespace$1.ThySwitchComponent, selector: "thy-switch", inputs: ["thyType", "thySize", "thyDisabled"], outputs: ["thyChange"] }, { type: i1__namespace.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }, { type: i8__namespace.CodeMirrorComponent, selector: "ng-codemirror, [ngCodeMirror]", inputs: ["autoMaxHeight", "delayRefreshTime", "options"], outputs: ["focusChange"] }, { type: i9__namespace.ThyResizeHandleComponent, selector: "thy-resize-handle, [thy-resize-handle]", inputs: ["thyDirection"], outputs: ["thyMouseDown"], exportAs: ["thyResizeHandle"] }], directives: [{ type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5__namespace$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { type: i4__namespace$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4__namespace$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i9__namespace.ThyResizableDirective, selector: "[thyResizable]", inputs: ["thyBounds", "thyMaxHeight", "thyMaxWidth", "thyMinHeight", "thyMinWidth", "thyGridColumnCount", "thyMaxColumn", "thyMinColumn", "thyLockAspectRatio", "thyPreview", "thyDisabled"], outputs: ["thyResize", "thyResizeEnd", "thyResizeStart"] }, { type: i6__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
7091
7142
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheCodeComponent, decorators: [{
|
|
7092
7143
|
type: i0.Component,
|
|
7093
7144
|
args: [{
|
|
@@ -11514,8 +11565,19 @@
|
|
|
11514
11565
|
_this.itemMode = exports.ToolbarItemMode.horizontal;
|
|
11515
11566
|
_this.ToolbarItemMode = exports.ToolbarItemMode;
|
|
11516
11567
|
_this.active = false;
|
|
11568
|
+
_this.disabled = false;
|
|
11517
11569
|
return _this;
|
|
11518
11570
|
}
|
|
11571
|
+
TheToolbarItemComponent.prototype.toggleDropdown = function (event) {
|
|
11572
|
+
_super.prototype.execute.call(this, event);
|
|
11573
|
+
};
|
|
11574
|
+
Object.defineProperty(TheToolbarItemComponent.prototype, "disabledState", {
|
|
11575
|
+
get: function () {
|
|
11576
|
+
return this.disabled;
|
|
11577
|
+
},
|
|
11578
|
+
enumerable: false,
|
|
11579
|
+
configurable: true
|
|
11580
|
+
});
|
|
11519
11581
|
TheToolbarItemComponent.prototype.ngOnInit = function () {
|
|
11520
11582
|
var _a, _b;
|
|
11521
11583
|
if (((_a = this.item) === null || _a === void 0 ? void 0 : _a.quickItemComponent) && i1.isComponentType((_b = this.item) === null || _b === void 0 ? void 0 : _b.quickItemComponent)) {
|
|
@@ -11523,13 +11585,14 @@
|
|
|
11523
11585
|
}
|
|
11524
11586
|
};
|
|
11525
11587
|
TheToolbarItemComponent.prototype.statusChange = function (editor) {
|
|
11526
|
-
var _a, _b;
|
|
11527
|
-
this.
|
|
11588
|
+
var _a, _b, _c, _d;
|
|
11589
|
+
this.disabled = ((_a = this.item) === null || _a === void 0 ? void 0 : _a.disable) ? (_b = this.item) === null || _b === void 0 ? void 0 : _b.disable(editor) : false;
|
|
11590
|
+
this.active = ((_c = this.item) === null || _c === void 0 ? void 0 : _c.active) ? (_d = this.item) === null || _d === void 0 ? void 0 : _d.active(editor) : false;
|
|
11528
11591
|
};
|
|
11529
11592
|
TheToolbarItemComponent.prototype.execute = function (event) {
|
|
11530
11593
|
var _a, _b, _c;
|
|
11531
11594
|
_super.prototype.execute.call(this, event);
|
|
11532
|
-
if (
|
|
11595
|
+
if (((_a = this.editor) === null || _a === void 0 ? void 0 : _a.disabled) || this.disabled || !((_b = this.item) === null || _b === void 0 ? void 0 : _b.execute)) {
|
|
11533
11596
|
return;
|
|
11534
11597
|
}
|
|
11535
11598
|
(_c = this.item) === null || _c === void 0 ? void 0 : _c.execute(this.editor);
|
|
@@ -11547,7 +11610,7 @@
|
|
|
11547
11610
|
return TheToolbarItemComponent;
|
|
11548
11611
|
}(TheToolbarBaseItemComponent));
|
|
11549
11612
|
TheToolbarItemComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheToolbarItemComponent, deps: [{ token: i0__namespace.NgZone }, { token: i0__namespace.ComponentFactoryResolver }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
11550
|
-
TheToolbarItemComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheToolbarItemComponent, selector: "the-toolbar-item", inputs: { item: "item", editor: "editor", itemMode: "itemMode" }, host: { classAttribute: "the-toolbar-item" }, viewQueries: [{ propertyName: "toolbarContainer", first: true, predicate: ["toolbarContainer"], descendants: true, read: i0.ViewContainerRef, static: true }], usesInheritance: true, ngImport: i0__namespace, template: "\n <ng-container *ngIf=\"itemMode === ToolbarItemMode.horizontal; else selectionItem\">\n <a\n thyIconNavLink\n [thyIconNavLinkIcon]=\"item.icon\"\n [thyTooltip]=\"tooltip\"\n [thyTooltipTemplateContext]=\"{ name: item.name, shortcutKey: item.shortcutKey }\"\n thyTooltipPlacement=\"top\"\n [thyIconNavLinkActive]=\"active\"\n (mousedown)=\"execute($event)\"\n ></a>\n </ng-container>\n <ng-template #selectionItem>\n <ng-container *ngIf=\"!item?.quickItemComponent\">\n <thy-icon [thyIconName]=\"item?.icon\" [thyIconRotate]=\"0\" class=\"quick-toolbar-icon\"></thy-icon>\n <span class=\"quick-toolbar-name\">{{ item?.name }}</span>\n </ng-container>\n </ng-template>\n <ng-template #tooltip let-data> {{ data.name }} {{ data.shortcutKey }} </ng-template>\n <ng-container #toolbarContainer></ng-container>\n ", isInline: true, components: [{ type: i3__namespace.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i4__namespace$1.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }], directives: [{ type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5__namespace$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }] });
|
|
11613
|
+
TheToolbarItemComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheToolbarItemComponent, selector: "the-toolbar-item", inputs: { item: "item", editor: "editor", itemMode: "itemMode" }, host: { listeners: { "mousedown": "toggleDropdown($event)" }, properties: { "class.disabled": "this.disabledState" }, classAttribute: "the-toolbar-item" }, viewQueries: [{ propertyName: "toolbarContainer", first: true, predicate: ["toolbarContainer"], descendants: true, read: i0.ViewContainerRef, static: true }], usesInheritance: true, ngImport: i0__namespace, template: "\n <ng-container *ngIf=\"itemMode === ToolbarItemMode.horizontal; else selectionItem\">\n <a\n thyIconNavLink\n [thyIconNavLinkIcon]=\"item.icon\"\n [thyTooltip]=\"tooltip\"\n [thyTooltipTemplateContext]=\"{ name: item.name, shortcutKey: item.shortcutKey }\"\n thyTooltipPlacement=\"top\"\n [thyIconNavLinkActive]=\"active\"\n (mousedown)=\"execute($event)\"\n ></a>\n </ng-container>\n <ng-template #selectionItem>\n <ng-container *ngIf=\"!item?.quickItemComponent\">\n <thy-icon [thyIconName]=\"item?.icon\" [thyIconRotate]=\"0\" class=\"quick-toolbar-icon\"></thy-icon>\n <span class=\"quick-toolbar-name\">{{ item?.name }}</span>\n </ng-container>\n </ng-template>\n <ng-template #tooltip let-data> {{ data.name }} {{ data.shortcutKey }} </ng-template>\n <ng-container #toolbarContainer></ng-container>\n ", isInline: true, components: [{ type: i3__namespace.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i4__namespace$1.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }], directives: [{ type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5__namespace$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }] });
|
|
11551
11614
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheToolbarItemComponent, decorators: [{
|
|
11552
11615
|
type: i0.Component,
|
|
11553
11616
|
args: [{
|
|
@@ -11566,6 +11629,12 @@
|
|
|
11566
11629
|
}], toolbarContainer: [{
|
|
11567
11630
|
type: i0.ViewChild,
|
|
11568
11631
|
args: ['toolbarContainer', { read: i0.ViewContainerRef, static: true }]
|
|
11632
|
+
}], toggleDropdown: [{
|
|
11633
|
+
type: i0.HostListener,
|
|
11634
|
+
args: ['mousedown', ['$event']]
|
|
11635
|
+
}], disabledState: [{
|
|
11636
|
+
type: i0.HostBinding,
|
|
11637
|
+
args: ['class.disabled']
|
|
11569
11638
|
}] } });
|
|
11570
11639
|
|
|
11571
11640
|
var TheQuickToolbarComponent = /** @class */ (function (_super) {
|
|
@@ -11738,140 +11807,69 @@
|
|
|
11738
11807
|
};
|
|
11739
11808
|
};
|
|
11740
11809
|
|
|
11741
|
-
var
|
|
11742
|
-
|
|
11743
|
-
|
|
11744
|
-
var _this = _super.call(this) || this;
|
|
11745
|
-
_this.elementRef = elementRef;
|
|
11746
|
-
_this.thyPopover = thyPopover;
|
|
11747
|
-
_this.viewContainerRef = viewContainerRef;
|
|
11748
|
-
_this.overlay = overlay;
|
|
11749
|
-
_this.fontSizes = FontSizes;
|
|
11750
|
-
_this.disabled = false;
|
|
11751
|
-
_this.disableGroup = HEADING_TYPES;
|
|
11752
|
-
_this.toolbarItemContainer = true;
|
|
11753
|
-
_this.fontSizeToolbarItem = true;
|
|
11754
|
-
return _this;
|
|
11755
|
-
}
|
|
11756
|
-
Object.defineProperty(TheFontSizeToolbarItemComponent.prototype, "isOpen", {
|
|
11757
|
-
get: function () {
|
|
11758
|
-
return this.dropdownPopoverRef && this.dropdownPopoverRef.getOverlayRef() && this.dropdownPopoverRef.getOverlayRef().hasAttached();
|
|
11759
|
-
},
|
|
11760
|
-
enumerable: false,
|
|
11761
|
-
configurable: true
|
|
11762
|
-
});
|
|
11763
|
-
Object.defineProperty(TheFontSizeToolbarItemComponent.prototype, "disableClass", {
|
|
11764
|
-
get: function () {
|
|
11765
|
-
return this.disabled;
|
|
11766
|
-
},
|
|
11767
|
-
enumerable: false,
|
|
11768
|
-
configurable: true
|
|
11769
|
-
});
|
|
11770
|
-
TheFontSizeToolbarItemComponent.prototype.toggleDropdown = function (event) {
|
|
11771
|
-
var _a;
|
|
11772
|
-
_super.prototype.execute.call(this, event);
|
|
11773
|
-
if (((_a = this.editor) === null || _a === void 0 ? void 0 : _a.disabled) || this.disabled) {
|
|
11810
|
+
var FontSizeEditor = {
|
|
11811
|
+
setFontSize: function (editor, size) {
|
|
11812
|
+
if (TableEditor.toggleMark(editor, false, exports.MarkTypes.fontSize, Number(size))) {
|
|
11774
11813
|
return;
|
|
11775
11814
|
}
|
|
11776
|
-
|
|
11777
|
-
}
|
|
11778
|
-
|
|
11779
|
-
if (!this.elementRef.nativeElement.contains(event.target)) {
|
|
11780
|
-
this.closeDropdownPopover();
|
|
11781
|
-
}
|
|
11782
|
-
};
|
|
11783
|
-
TheFontSizeToolbarItemComponent.prototype.ngOnInit = function () {
|
|
11784
|
-
this.activeSize = this.fontSizes[2];
|
|
11785
|
-
};
|
|
11786
|
-
TheFontSizeToolbarItemComponent.prototype.statusChange = function (editor) {
|
|
11815
|
+
slate.Editor.addMark(editor, exports.MarkTypes.fontSize, Number(size));
|
|
11816
|
+
},
|
|
11817
|
+
isFontSizeActive: function (editor, size) {
|
|
11787
11818
|
if (editor.selection) {
|
|
11788
11819
|
var anchorBlock$1 = anchorBlock(editor);
|
|
11789
|
-
|
|
11790
|
-
|
|
11791
|
-
|
|
11792
|
-
|
|
11820
|
+
switch (anchorBlock$1 === null || anchorBlock$1 === void 0 ? void 0 : anchorBlock$1.type) {
|
|
11821
|
+
case exports.ElementKinds.heading_1:
|
|
11822
|
+
return size === exports.FontSizes.fontSize28;
|
|
11823
|
+
case exports.ElementKinds.heading_2:
|
|
11824
|
+
return size === exports.FontSizes.fontSize24;
|
|
11825
|
+
case exports.ElementKinds.heading_3:
|
|
11826
|
+
return size === exports.FontSizes.fontSize20;
|
|
11827
|
+
case exports.ElementKinds.heading_4:
|
|
11828
|
+
return size === exports.FontSizes.fontSize18;
|
|
11829
|
+
case exports.ElementKinds.heading_5:
|
|
11830
|
+
return size === exports.FontSizes.fontSize16;
|
|
11831
|
+
case exports.ElementKinds.heading_6:
|
|
11832
|
+
return size === exports.FontSizes.fontSize14;
|
|
11833
|
+
case exports.ElementKinds.paragraph:
|
|
11834
|
+
var marks = getSelectionMarks(editor);
|
|
11835
|
+
var fontSizeMark = marks[exports.MarkTypes.fontSize];
|
|
11836
|
+
return Number(size) === fontSizeMark;
|
|
11837
|
+
default:
|
|
11838
|
+
return false;
|
|
11793
11839
|
}
|
|
11794
|
-
var marks = getSelectionMarks(editor);
|
|
11795
|
-
var fontSizeMark = marks[exports.MarkTypes.fontSize];
|
|
11796
|
-
this.activeSize = fontSizeMark ? fontSizeMark : this.fontSizes[2];
|
|
11797
|
-
this.disabled = false;
|
|
11798
|
-
}
|
|
11799
|
-
};
|
|
11800
|
-
TheFontSizeToolbarItemComponent.prototype.itemMousedown = function (event, size) {
|
|
11801
|
-
var _a, _b;
|
|
11802
|
-
_super.prototype.execute.call(this, event);
|
|
11803
|
-
this.closeDropdownPopover();
|
|
11804
|
-
if (((_a = this.editor) === null || _a === void 0 ? void 0 : _a.disabled) || ((_b = this.editor) === null || _b === void 0 ? void 0 : _b.readOnly)) {
|
|
11805
|
-
return;
|
|
11806
11840
|
}
|
|
11807
|
-
|
|
11808
|
-
|
|
11809
|
-
|
|
11810
|
-
|
|
11811
|
-
|
|
11812
|
-
|
|
11813
|
-
|
|
11814
|
-
var _a;
|
|
11815
|
-
this.dropdownPopoverRef = this.thyPopover.open(this.dropdownTemplate, {
|
|
11816
|
-
origin: this.elementRef,
|
|
11817
|
-
panelClass: ['the-toolbar-dropdown-popover', (_a = this.item) === null || _a === void 0 ? void 0 : _a.key],
|
|
11818
|
-
placement: 'bottomLeft',
|
|
11819
|
-
insideClosable: false,
|
|
11820
|
-
backdropClosable: true,
|
|
11821
|
-
hasBackdrop: false,
|
|
11822
|
-
offset: 10,
|
|
11823
|
-
viewContainerRef: this.viewContainerRef,
|
|
11824
|
-
scrollStrategy: this.overlay.scrollStrategies.reposition()
|
|
11825
|
-
});
|
|
11826
|
-
};
|
|
11827
|
-
TheFontSizeToolbarItemComponent.prototype.closeDropdownPopover = function () {
|
|
11828
|
-
var _a;
|
|
11829
|
-
if (this.dropdownPopoverRef) {
|
|
11830
|
-
(_a = this.dropdownPopoverRef) === null || _a === void 0 ? void 0 : _a.close();
|
|
11841
|
+
return false;
|
|
11842
|
+
},
|
|
11843
|
+
isDisabled: function (editor) {
|
|
11844
|
+
if (editor.selection) {
|
|
11845
|
+
var disableGroup = HEADING_TYPES;
|
|
11846
|
+
var anchorBlock$1 = anchorBlock(editor);
|
|
11847
|
+
return anchorBlock$1 && disableGroup.includes(anchorBlock$1 === null || anchorBlock$1 === void 0 ? void 0 : anchorBlock$1.type);
|
|
11831
11848
|
}
|
|
11832
|
-
|
|
11833
|
-
|
|
11834
|
-
}
|
|
11835
|
-
TheFontSizeToolbarItemComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheFontSizeToolbarItemComponent, deps: [{ token: i0__namespace.ElementRef }, { token: i1__namespace$3.ThyPopover }, { token: i0__namespace.ViewContainerRef }, { token: i2__namespace.Overlay }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
11836
|
-
TheFontSizeToolbarItemComponent.ɵcmp = i0__namespace.ɵɵ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__namespace, 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__namespace.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i4__namespace$1.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { type: i5__namespace$2.ThyActionMenuComponent, selector: "thy-action-menu", inputs: ["thyTheme", "thyWidth"] }], directives: [{ type: i5__namespace$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i5__namespace$2.ThyActionMenuItemDirective, selector: "[thyActionMenuItem]", inputs: ["thyDisabled", "thyType"] }, { type: i5__namespace$2.ThyActionMenuItemActiveDirective, selector: "[thyActionMenuItemActive]", inputs: ["thyActionMenuItemActive"] }, { type: i5__namespace$2.ThyActionMenuItemNameDirective, selector: "[thyActionMenuItemName]" }] });
|
|
11837
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheFontSizeToolbarItemComponent, decorators: [{
|
|
11838
|
-
type: i0.Component,
|
|
11839
|
-
args: [{
|
|
11840
|
-
selector: 'the-font-size-toolbar-item',
|
|
11841
|
-
templateUrl: './toolbar-item.component.html'
|
|
11842
|
-
}]
|
|
11843
|
-
}], ctorParameters: function () { return [{ type: i0__namespace.ElementRef }, { type: i1__namespace$3.ThyPopover }, { type: i0__namespace.ViewContainerRef }, { type: i2__namespace.Overlay }]; }, propDecorators: { editor: [{
|
|
11844
|
-
type: i0.Input
|
|
11845
|
-
}], item: [{
|
|
11846
|
-
type: i0.Input
|
|
11847
|
-
}], dropdownTemplate: [{
|
|
11848
|
-
type: i0.ViewChild,
|
|
11849
|
-
args: ['dropdownTemplate', { static: true }]
|
|
11850
|
-
}], toolbarItemContainer: [{
|
|
11851
|
-
type: i0.HostBinding,
|
|
11852
|
-
args: ['class.the-toolbar-dropdown-container']
|
|
11853
|
-
}], fontSizeToolbarItem: [{
|
|
11854
|
-
type: i0.HostBinding,
|
|
11855
|
-
args: ['class.the-font-size-toolbar-item']
|
|
11856
|
-
}], disableClass: [{
|
|
11857
|
-
type: i0.HostBinding,
|
|
11858
|
-
args: ['class.disabled']
|
|
11859
|
-
}], toggleDropdown: [{
|
|
11860
|
-
type: i0.HostListener,
|
|
11861
|
-
args: ['mousedown', ['$event']]
|
|
11862
|
-
}], handleDocumentMouseDown: [{
|
|
11863
|
-
type: i0.HostListener,
|
|
11864
|
-
args: ['document: mousedown', ['$event']]
|
|
11865
|
-
}] } });
|
|
11849
|
+
return false;
|
|
11850
|
+
}
|
|
11851
|
+
};
|
|
11866
11852
|
|
|
11867
|
-
var
|
|
11868
|
-
|
|
11853
|
+
var sizeOptions = function () {
|
|
11854
|
+
return FontSizeTypes.map(function (fontSize) {
|
|
11855
|
+
return {
|
|
11856
|
+
key: fontSize,
|
|
11857
|
+
name: fontSize,
|
|
11858
|
+
execute: function (editor) { return FontSizeEditor.setFontSize(editor, fontSize); },
|
|
11859
|
+
active: function (editor) { return FontSizeEditor.isFontSizeActive(editor, fontSize); }
|
|
11860
|
+
};
|
|
11861
|
+
});
|
|
11862
|
+
};
|
|
11863
|
+
var FontSizeOptions = __spreadArray([
|
|
11869
11864
|
{
|
|
11870
11865
|
key: exports.MarkTypes.fontSize,
|
|
11871
11866
|
name: '字号',
|
|
11872
|
-
|
|
11867
|
+
type: exports.ToolbarItemType.toolDropdown,
|
|
11868
|
+
dropdownItemKey: exports.FontSizes.fontSize14,
|
|
11869
|
+
includes: FontSizeTypes,
|
|
11870
|
+
disable: function (editor) { return FontSizeEditor.isDisabled(editor); }
|
|
11873
11871
|
}
|
|
11874
|
-
];
|
|
11872
|
+
], __read(sizeOptions()));
|
|
11875
11873
|
|
|
11876
11874
|
var internalPlugins = [
|
|
11877
11875
|
withTheHistory,
|
|
@@ -12076,9 +12074,9 @@
|
|
|
12076
12074
|
}
|
|
12077
12075
|
};
|
|
12078
12076
|
TheToolbarComponent.prototype.setToolbarClass = function () {
|
|
12079
|
-
var
|
|
12077
|
+
var _b;
|
|
12080
12078
|
if (this.editor && !!this.containerClass.length) {
|
|
12081
|
-
(
|
|
12079
|
+
(_b = this.elementRef.nativeElement.classList).add.apply(_b, __spreadArray([], __read(this.containerClass)));
|
|
12082
12080
|
}
|
|
12083
12081
|
};
|
|
12084
12082
|
TheToolbarComponent.prototype.resizeElement = function () {
|
|
@@ -12086,7 +12084,7 @@
|
|
|
12086
12084
|
var editableElement = this.elementRef.nativeElement;
|
|
12087
12085
|
// @ts-ignore
|
|
12088
12086
|
this.resizeObserver = new ResizeObserver(function (entries) {
|
|
12089
|
-
var e_1,
|
|
12087
|
+
var e_1, _b;
|
|
12090
12088
|
try {
|
|
12091
12089
|
for (var entries_1 = __values(entries), entries_1_1 = entries_1.next(); !entries_1_1.done; entries_1_1 = entries_1.next()) {
|
|
12092
12090
|
var entry = entries_1_1.value;
|
|
@@ -12100,7 +12098,7 @@
|
|
|
12100
12098
|
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
12101
12099
|
finally {
|
|
12102
12100
|
try {
|
|
12103
|
-
if (entries_1_1 && !entries_1_1.done && (
|
|
12101
|
+
if (entries_1_1 && !entries_1_1.done && (_b = entries_1.return)) _b.call(entries_1);
|
|
12104
12102
|
}
|
|
12105
12103
|
finally { if (e_1) throw e_1.error; }
|
|
12106
12104
|
}
|
|
@@ -12108,7 +12106,7 @@
|
|
|
12108
12106
|
this.resizeObserver.observe(editableElement);
|
|
12109
12107
|
};
|
|
12110
12108
|
TheToolbarComponent.prototype.statusChange = function (editor) {
|
|
12111
|
-
var e_2,
|
|
12109
|
+
var e_2, _b;
|
|
12112
12110
|
var toolbarItems = __spreadArray(__spreadArray([], __read(this.toolbarItems)), [this.moreGroupMenu]);
|
|
12113
12111
|
try {
|
|
12114
12112
|
for (var toolbarItems_1 = __values(toolbarItems), toolbarItems_1_1 = toolbarItems_1.next(); !toolbarItems_1_1.done; toolbarItems_1_1 = toolbarItems_1.next()) {
|
|
@@ -12124,7 +12122,7 @@
|
|
|
12124
12122
|
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
12125
12123
|
finally {
|
|
12126
12124
|
try {
|
|
12127
|
-
if (toolbarItems_1_1 && !toolbarItems_1_1.done && (
|
|
12125
|
+
if (toolbarItems_1_1 && !toolbarItems_1_1.done && (_b = toolbarItems_1.return)) _b.call(toolbarItems_1);
|
|
12128
12126
|
}
|
|
12129
12127
|
finally { if (e_2) throw e_2.error; }
|
|
12130
12128
|
}
|
|
@@ -12136,7 +12134,7 @@
|
|
|
12136
12134
|
var toolbarItems = this.toolbarItemsCompose();
|
|
12137
12135
|
var items = toolbarItems.items, group = toolbarItems.group;
|
|
12138
12136
|
this.ngZone.run(function () {
|
|
12139
|
-
var e_3,
|
|
12137
|
+
var e_3, _b;
|
|
12140
12138
|
try {
|
|
12141
12139
|
for (var items_1 = __values(items), items_1_1 = items_1.next(); !items_1_1.done; items_1_1 = items_1.next()) {
|
|
12142
12140
|
var item = items_1_1.value;
|
|
@@ -12150,7 +12148,7 @@
|
|
|
12150
12148
|
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
12151
12149
|
finally {
|
|
12152
12150
|
try {
|
|
12153
|
-
if (items_1_1 && !items_1_1.done && (
|
|
12151
|
+
if (items_1_1 && !items_1_1.done && (_b = items_1.return)) _b.call(items_1);
|
|
12154
12152
|
}
|
|
12155
12153
|
finally { if (e_3) throw e_3.error; }
|
|
12156
12154
|
}
|
|
@@ -12173,7 +12171,7 @@
|
|
|
12173
12171
|
* set aside 50px
|
|
12174
12172
|
*/
|
|
12175
12173
|
TheToolbarComponent.prototype.toolbarItemsCompose = function () {
|
|
12176
|
-
var e_4,
|
|
12174
|
+
var e_4, _b;
|
|
12177
12175
|
var elementWidth = this.isMore ? this.elementWidth : null;
|
|
12178
12176
|
var maxItemWidth = 50;
|
|
12179
12177
|
var defaultItemWidth = 35;
|
|
@@ -12183,8 +12181,8 @@
|
|
|
12183
12181
|
var items = [];
|
|
12184
12182
|
var group = [];
|
|
12185
12183
|
try {
|
|
12186
|
-
for (var
|
|
12187
|
-
var item =
|
|
12184
|
+
for (var _c = __values(this.toolbarItems), _d = _c.next(); !_d.done; _d = _c.next()) {
|
|
12185
|
+
var item = _d.value;
|
|
12188
12186
|
if (!this.isMore) {
|
|
12189
12187
|
items.push(item);
|
|
12190
12188
|
continue;
|
|
@@ -12213,7 +12211,7 @@
|
|
|
12213
12211
|
catch (e_4_1) { e_4 = { error: e_4_1 }; }
|
|
12214
12212
|
finally {
|
|
12215
12213
|
try {
|
|
12216
|
-
if (
|
|
12214
|
+
if (_d && !_d.done && (_b = _c.return)) _b.call(_c);
|
|
12217
12215
|
}
|
|
12218
12216
|
finally { if (e_4) throw e_4.error; }
|
|
12219
12217
|
}
|
|
@@ -12226,12 +12224,12 @@
|
|
|
12226
12224
|
* externally designated more group
|
|
12227
12225
|
*/
|
|
12228
12226
|
TheToolbarComponent.prototype.toolbarItemsAndMoreCompose = function () {
|
|
12229
|
-
var e_5,
|
|
12227
|
+
var e_5, _b;
|
|
12230
12228
|
var items = [];
|
|
12231
12229
|
var group = [];
|
|
12232
12230
|
try {
|
|
12233
|
-
for (var
|
|
12234
|
-
var item =
|
|
12231
|
+
for (var _c = __values(this.toolbarItems), _d = _c.next(); !_d.done; _d = _c.next()) {
|
|
12232
|
+
var item = _d.value;
|
|
12235
12233
|
if (item.key === exports.ToolbarActionTypes.split) {
|
|
12236
12234
|
items.push(item);
|
|
12237
12235
|
continue;
|
|
@@ -12242,7 +12240,7 @@
|
|
|
12242
12240
|
catch (e_5_1) { e_5 = { error: e_5_1 }; }
|
|
12243
12241
|
finally {
|
|
12244
12242
|
try {
|
|
12245
|
-
if (
|
|
12243
|
+
if (_d && !_d.done && (_b = _c.return)) _b.call(_c);
|
|
12246
12244
|
}
|
|
12247
12245
|
finally { if (e_5) throw e_5.error; }
|
|
12248
12246
|
}
|
|
@@ -12269,14 +12267,15 @@
|
|
|
12269
12267
|
});
|
|
12270
12268
|
};
|
|
12271
12269
|
TheToolbarComponent.prototype.createToolbarItem = function (item) {
|
|
12272
|
-
var iconComponent = item.iconComponent, type = item.type, dropdownMode = item.dropdownMode, args = __rest(item, ["iconComponent", "type", "dropdownMode"]);
|
|
12270
|
+
var iconComponent = item.iconComponent, type = item.type, dropdownMode = item.dropdownMode, dropdownItemKey = item.dropdownItemKey, includes = item.includes, args = __rest(item, ["iconComponent", "type", "dropdownMode", "dropdownItemKey", "includes"]);
|
|
12273
12271
|
var viewComponent = this.viewComponentType(type);
|
|
12272
|
+
var dropdownItem = this.getDropdownItem(item);
|
|
12274
12273
|
var factory = this.cfr.resolveComponentFactory(iconComponent ? iconComponent : viewComponent);
|
|
12275
12274
|
var compRef = this.toolbarContainer.createComponent(factory);
|
|
12276
12275
|
compRef.instance.editor = this.editor;
|
|
12277
12276
|
compRef.instance.toolbarItem = item;
|
|
12278
|
-
compRef.instance.menus =
|
|
12279
|
-
compRef.instance.item =
|
|
12277
|
+
compRef.instance.menus = includes;
|
|
12278
|
+
compRef.instance.item = includes && dropdownItem ? dropdownItem : args;
|
|
12280
12279
|
compRef.instance.mode = dropdownMode;
|
|
12281
12280
|
this.components.set(item.key, compRef);
|
|
12282
12281
|
};
|
|
@@ -12303,10 +12302,19 @@
|
|
|
12303
12302
|
}
|
|
12304
12303
|
return TheToolbarItemComponent;
|
|
12305
12304
|
};
|
|
12305
|
+
TheToolbarComponent.prototype.getDropdownItem = function (item) {
|
|
12306
|
+
var _a;
|
|
12307
|
+
var dropdownKey = item === null || item === void 0 ? void 0 : item.dropdownItemKey;
|
|
12308
|
+
// modify the fontsize option externally
|
|
12309
|
+
if (item.key === exports.MarkTypes.fontSize && this.fontSize) {
|
|
12310
|
+
dropdownKey = this.fontSize;
|
|
12311
|
+
}
|
|
12312
|
+
return (_a = item === null || item === void 0 ? void 0 : item.includes) === null || _a === void 0 ? void 0 : _a.find(function (item) { return item.key === dropdownKey; });
|
|
12313
|
+
};
|
|
12306
12314
|
return TheToolbarComponent;
|
|
12307
12315
|
}());
|
|
12308
12316
|
TheToolbarComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheToolbarComponent, deps: [{ token: i0__namespace.ComponentFactoryResolver }, { token: i0__namespace.ElementRef }, { token: i0__namespace.NgZone }, { token: TheToolbarGroupToken }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
12309
|
-
TheToolbarComponent.ɵcmp = i0__namespace.ɵɵ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: i0.ViewContainerRef, static: true }], usesOnChanges: true, ngImport: i0__namespace, 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__namespace.ThyIconNavComponent, selector: "thy-icon-nav", inputs: ["thyType"] }], directives: [{ type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }] });
|
|
12317
|
+
TheToolbarComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: TheToolbarComponent, selector: "the-toolbar", inputs: { editor: "editor", toolbarItems: "toolbarItems", align: "align", fontSize: "fontSize", containerClass: "containerClass", isMore: "isMore", afterTemplate: "afterTemplate" }, host: { classAttribute: "the-toolbar-container" }, viewQueries: [{ propertyName: "toolbarContainer", first: true, predicate: ["toolbarContainer"], descendants: true, read: i0.ViewContainerRef, static: true }], usesOnChanges: true, ngImport: i0__namespace, 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__namespace.ThyIconNavComponent, selector: "thy-icon-nav", inputs: ["thyType"] }], directives: [{ type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }] });
|
|
12310
12318
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheToolbarComponent, decorators: [{
|
|
12311
12319
|
type: i0.Component,
|
|
12312
12320
|
args: [{
|
|
@@ -12327,6 +12335,8 @@
|
|
|
12327
12335
|
type: i0.Input
|
|
12328
12336
|
}], align: [{
|
|
12329
12337
|
type: i0.Input
|
|
12338
|
+
}], fontSize: [{
|
|
12339
|
+
type: i0.Input
|
|
12330
12340
|
}], containerClass: [{
|
|
12331
12341
|
type: i0.Input
|
|
12332
12342
|
}], isMore: [{
|
|
@@ -12447,7 +12457,7 @@
|
|
|
12447
12457
|
return TheInlineToolbarComponent;
|
|
12448
12458
|
}());
|
|
12449
12459
|
TheInlineToolbarComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheInlineToolbarComponent, deps: [{ token: i0__namespace.ElementRef }, { token: i2__namespace.ScrollDispatcher }, { token: i0__namespace.ChangeDetectorRef }, { token: i0__namespace.NgZone }, { token: TheContextService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
12450
|
-
TheInlineToolbarComponent.ɵcmp = i0__namespace.ɵɵ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__namespace, template: "<the-toolbar\n #inlineToolbar\n class=\"the-inline-toolbar\"\n [editor]=\"editor\"\n [toolbarItems]=\"toolbarItems\"\n [isMore]=\"false\"\n ></the-toolbar> ", isInline: true, components: [{ type: TheToolbarComponent, selector: "the-toolbar", inputs: ["editor", "toolbarItems", "align", "containerClass", "isMore", "afterTemplate"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
12460
|
+
TheInlineToolbarComponent.ɵcmp = i0__namespace.ɵɵ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__namespace, template: "<the-toolbar\n #inlineToolbar\n class=\"the-inline-toolbar\"\n [editor]=\"editor\"\n [toolbarItems]=\"toolbarItems\"\n [isMore]=\"false\"\n ></the-toolbar> ", isInline: true, components: [{ type: TheToolbarComponent, selector: "the-toolbar", inputs: ["editor", "toolbarItems", "align", "fontSize", "containerClass", "isMore", "afterTemplate"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
12451
12461
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheInlineToolbarComponent, decorators: [{
|
|
12452
12462
|
type: i0.Component,
|
|
12453
12463
|
args: [{
|
|
@@ -13037,7 +13047,7 @@
|
|
|
13037
13047
|
useExisting: i0.forwardRef(function () { return TheEditorComponent; }),
|
|
13038
13048
|
multi: true
|
|
13039
13049
|
}
|
|
13040
|
-
], viewQueries: [{ propertyName: "templateInstance", first: true, predicate: ["templateInstance"], descendants: true, static: true }, { propertyName: "globalToolbarInstance", first: true, predicate: ["globalToolbar"], descendants: true }, { propertyName: "quickInsertInstance", first: true, predicate: ["quickInsert"], descendants: true, static: true }, { propertyName: "placeholderInstance", first: true, predicate: ["placeholder"], descendants: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0__namespace, template: "<the-toolbar\n *ngIf=\"!theOptions?.readonly && !theGlobalToolbar\"\n [ngClass]=\"{\n 'the-toolbar-disabled': theOptions?.disabled\n }\"\n #globalToolbar\n [editor]=\"editor\"\n [toolbarItems]=\"toolbarEntity.global\"\n [containerClass]=\"globalToolbarClass\"\n [align]=\"theOptions?.toolbar?.align\"\n></the-toolbar>\n\n<div\n class=\"the-editable-container\"\n [ngClass]=\"{\n 'the-editor-disabled': theOptions?.disabled,\n 'max-height': maxHeight\n }\"\n [ngStyle]=\"{ 'max-height': maxHeight }\"\n>\n <slate-editable\n class=\"the-editor-typo\"\n [editor]=\"editor\"\n [ngModel]=\"editorValue\"\n (ngModelChange)=\"valueChange($event)\"\n [decorate]=\"decorate\"\n [renderElement]=\"renderElement\"\n [renderText]=\"renderText\"\n [renderLeaf]=\"renderLeaf\"\n [readonly]=\"theOptions?.readonly || theOptions?.disabled\"\n [keydown]=\"onKeyDown\"\n [click]=\"onClick\"\n [paste]=\"onSlaPaste\"\n [beforeInput]=\"onSlaBeforeInput\"\n [blur]=\"onSlaBlur\"\n [focus]=\"onSlaFocus\"\n [copy]=\"onSlaCopy\"\n [cut]=\"onSlaCut\"\n [isStrictDecorate]=\"false\"\n [compositionStart]=\"onSlaCompositionStart\"\n [compositionEnd]=\"onSlaCompositionEnd\"\n [dragStart]=\"onSlaDragStart\"\n [dragOver]=\"onSlaDragOver\"\n [drop]=\"onDrop\"\n (mousedown)=\"mousedown($event)\"\n ></slate-editable>\n <the-inline-toolbar *ngIf=\"!theOptions?.readonly\" [editor]=\"editor\" [toolbarItems]=\"toolbarEntity.inline\"></the-inline-toolbar>\n <div #quickInsert theQuickInsert [editor]=\"editor\" [quickToolbarItems]=\"quickToolbarItems\"></div>\n <div #placeholder thePlaceholder [editor]=\"editor\" [options]=\"theOptions\"></div>\n <the-template #templateInstance></the-template>\n</div>\n", components: [{ type: TheToolbarComponent, selector: "the-toolbar", inputs: ["editor", "toolbarItems", "align", "containerClass", "isMore", "afterTemplate"] }, { type: i1__namespace.SlateEditableComponent, selector: "slate-editable", inputs: ["editor", "renderElement", "renderLeaf", "renderText", "decorate", "placeholderDecorate", "isStrictDecorate", "trackBy", "readonly", "placeholder", "beforeInput", "blur", "click", "compositionEnd", "compositionStart", "copy", "cut", "dragOver", "dragStart", "dragEnd", "drop", "focus", "keydown", "paste", "spellCheck", "autoCorrect", "autoCapitalize"] }, { type: TheInlineToolbarComponent, selector: "the-inline-toolbar", inputs: ["editor", "toolbarItems"] }, { type: TheQuickInsertComponent, selector: "[theQuickInsert]", inputs: ["editor", "quickToolbarItems"] }, { type: ThePlaceholderComponent, selector: "div[thePlaceholder]", inputs: ["editor", "options"] }, { type: TheTemplateComponent, selector: "the-template,[theTemplate]" }], directives: [{ type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i6__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i4__namespace$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4__namespace$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
|
|
13050
|
+
], viewQueries: [{ propertyName: "templateInstance", first: true, predicate: ["templateInstance"], descendants: true, static: true }, { propertyName: "globalToolbarInstance", first: true, predicate: ["globalToolbar"], descendants: true }, { propertyName: "quickInsertInstance", first: true, predicate: ["quickInsert"], descendants: true, static: true }, { propertyName: "placeholderInstance", first: true, predicate: ["placeholder"], descendants: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0__namespace, template: "<the-toolbar\n *ngIf=\"!theOptions?.readonly && !theGlobalToolbar\"\n [ngClass]=\"{\n 'the-toolbar-disabled': theOptions?.disabled\n }\"\n #globalToolbar\n [editor]=\"editor\"\n [toolbarItems]=\"toolbarEntity.global\"\n [containerClass]=\"globalToolbarClass\"\n [align]=\"theOptions?.toolbar?.align\"\n [fontSize]=\"theOptions?.fontSize\"\n></the-toolbar>\n\n<div\n class=\"the-editable-container\"\n [ngClass]=\"{\n 'the-editor-disabled': theOptions?.disabled,\n 'max-height': maxHeight\n }\"\n [ngStyle]=\"{ 'max-height': maxHeight }\"\n>\n <slate-editable\n class=\"the-editor-typo\"\n [editor]=\"editor\"\n [ngModel]=\"editorValue\"\n (ngModelChange)=\"valueChange($event)\"\n [decorate]=\"decorate\"\n [renderElement]=\"renderElement\"\n [renderText]=\"renderText\"\n [renderLeaf]=\"renderLeaf\"\n [readonly]=\"theOptions?.readonly || theOptions?.disabled\"\n [keydown]=\"onKeyDown\"\n [click]=\"onClick\"\n [paste]=\"onSlaPaste\"\n [beforeInput]=\"onSlaBeforeInput\"\n [blur]=\"onSlaBlur\"\n [focus]=\"onSlaFocus\"\n [copy]=\"onSlaCopy\"\n [cut]=\"onSlaCut\"\n [isStrictDecorate]=\"false\"\n [compositionStart]=\"onSlaCompositionStart\"\n [compositionEnd]=\"onSlaCompositionEnd\"\n [dragStart]=\"onSlaDragStart\"\n [dragOver]=\"onSlaDragOver\"\n [drop]=\"onDrop\"\n (mousedown)=\"mousedown($event)\"\n ></slate-editable>\n <the-inline-toolbar *ngIf=\"!theOptions?.readonly\" [editor]=\"editor\" [toolbarItems]=\"toolbarEntity.inline\"></the-inline-toolbar>\n <div #quickInsert theQuickInsert [editor]=\"editor\" [quickToolbarItems]=\"quickToolbarItems\"></div>\n <div #placeholder thePlaceholder [editor]=\"editor\" [options]=\"theOptions\"></div>\n <the-template #templateInstance></the-template>\n</div>\n", components: [{ type: TheToolbarComponent, selector: "the-toolbar", inputs: ["editor", "toolbarItems", "align", "fontSize", "containerClass", "isMore", "afterTemplate"] }, { type: i1__namespace.SlateEditableComponent, selector: "slate-editable", inputs: ["editor", "renderElement", "renderLeaf", "renderText", "decorate", "placeholderDecorate", "isStrictDecorate", "trackBy", "readonly", "placeholder", "beforeInput", "blur", "click", "compositionEnd", "compositionStart", "copy", "cut", "dragOver", "dragStart", "dragEnd", "drop", "focus", "keydown", "paste", "spellCheck", "autoCorrect", "autoCapitalize"] }, { type: TheInlineToolbarComponent, selector: "the-inline-toolbar", inputs: ["editor", "toolbarItems"] }, { type: TheQuickInsertComponent, selector: "[theQuickInsert]", inputs: ["editor", "quickToolbarItems"] }, { type: ThePlaceholderComponent, selector: "div[thePlaceholder]", inputs: ["editor", "options"] }, { type: TheTemplateComponent, selector: "the-template,[theTemplate]" }], directives: [{ type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i6__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i4__namespace$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4__namespace$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
|
|
13041
13051
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheEditorComponent, decorators: [{
|
|
13042
13052
|
type: i0.Component,
|
|
13043
13053
|
args: [{
|
|
@@ -13218,7 +13228,7 @@
|
|
|
13218
13228
|
return TheToolbarGroupComponent;
|
|
13219
13229
|
}());
|
|
13220
13230
|
TheToolbarGroupComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheToolbarGroupComponent, deps: [{ token: i0__namespace.ElementRef }, { token: i1__namespace$3.ThyPopover }, { token: i0__namespace.ViewContainerRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
13221
|
-
TheToolbarGroupComponent.ɵcmp = i0__namespace.ɵɵ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: i0.TemplateRef, static: true }], ngImport: i0__namespace, 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__namespace.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: TheToolbarComponent, selector: "the-toolbar", inputs: ["editor", "toolbarItems", "align", "containerClass", "isMore", "afterTemplate"] }], directives: [{ type: i5__namespace$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }] });
|
|
13231
|
+
TheToolbarGroupComponent.ɵcmp = i0__namespace.ɵɵ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: i0.TemplateRef, static: true }], ngImport: i0__namespace, 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__namespace.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: TheToolbarComponent, selector: "the-toolbar", inputs: ["editor", "toolbarItems", "align", "fontSize", "containerClass", "isMore", "afterTemplate"] }], directives: [{ type: i5__namespace$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }] });
|
|
13222
13232
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: TheToolbarGroupComponent, decorators: [{
|
|
13223
13233
|
type: i0.Component,
|
|
13224
13234
|
args: [{
|
|
@@ -13280,8 +13290,7 @@
|
|
|
13280
13290
|
TheTableSelectComponent,
|
|
13281
13291
|
TheTableToolbarItemComponent,
|
|
13282
13292
|
TheConversionHintComponent,
|
|
13283
|
-
TheVerticalToolbarItemComponent
|
|
13284
|
-
TheFontSizeToolbarItemComponent
|
|
13293
|
+
TheVerticalToolbarItemComponent
|
|
13285
13294
|
];
|
|
13286
13295
|
var PLUGIN_COMPONENTS = [
|
|
13287
13296
|
TheImageComponent,
|
|
@@ -13327,8 +13336,7 @@
|
|
|
13327
13336
|
TheTableSelectComponent,
|
|
13328
13337
|
TheTableToolbarItemComponent,
|
|
13329
13338
|
TheConversionHintComponent,
|
|
13330
|
-
TheVerticalToolbarItemComponent,
|
|
13331
|
-
TheFontSizeToolbarItemComponent, TheImageComponent,
|
|
13339
|
+
TheVerticalToolbarItemComponent, TheImageComponent,
|
|
13332
13340
|
TheTemplateComponent,
|
|
13333
13341
|
TheHrComponent,
|
|
13334
13342
|
TheBlockquoteComponent,
|
|
@@ -13415,6 +13423,7 @@
|
|
|
13415
13423
|
exports.DefaultInlineToolbarDefinition = DefaultInlineToolbarDefinition;
|
|
13416
13424
|
exports.DefaultQuickToolbarDefinition = DefaultQuickToolbarDefinition;
|
|
13417
13425
|
exports.ELEMENT_UNIQUE_ID = ELEMENT_UNIQUE_ID;
|
|
13426
|
+
exports.FontSizeTypes = FontSizeTypes;
|
|
13418
13427
|
exports.HEADING_TYPES = HEADING_TYPES;
|
|
13419
13428
|
exports.HeadingEditor = HeadingEditor;
|
|
13420
13429
|
exports.HrEditor = HrEditor;
|