@worktile/theia 3.0.1 → 3.0.4
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 +313 -377
- package/bundles/worktile-theia.umd.js.map +1 -1
- package/components/toolbar/toolbar.component.d.ts +1 -2
- package/components/toolbar-dropdown/toolbar-dropdown.component.d.ts +3 -13
- package/components/toolbar-group/toolbar-group.component.d.ts +2 -2
- package/components/toolbar-item/toolbar-item.component.d.ts +3 -11
- package/core/toolbar-item/base-toolbar-item.d.ts +29 -0
- package/core/utils/index.d.ts +1 -0
- package/core/utils/merge-array.d.ts +1 -0
- package/editor.module.d.ts +42 -44
- package/esm2015/components/inline-toolbar/inline-toolbar.component.js +2 -2
- package/esm2015/components/toolbar/toolbar.component.js +14 -24
- package/esm2015/components/toolbar-dropdown/toolbar-dropdown.component.js +11 -41
- package/esm2015/components/toolbar-group/toolbar-group.component.js +4 -4
- package/esm2015/components/toolbar-item/toolbar-item.component.js +24 -41
- package/esm2015/constants/auto-format-rules.js +19 -2
- package/esm2015/core/toolbar-item/base-toolbar-item.js +92 -0
- package/esm2015/core/utils/index.js +2 -1
- package/esm2015/core/utils/merge-array.js +18 -0
- package/esm2015/core/utils/merge-deep-plugins.js +1 -3
- package/esm2015/core/utils/merge-options.js +9 -8
- package/esm2015/editor.component.js +4 -3
- package/esm2015/editor.module.js +1 -4
- package/esm2015/interfaces/plugins/plugins.js +1 -1
- package/esm2015/interfaces/toolbar.js +2 -2
- package/esm2015/plugins/align/align.editor.js +3 -7
- package/esm2015/plugins/align/align.plugin.js +7 -4
- package/esm2015/plugins/autoformat/autoformat.plugin.js +1 -1
- package/esm2015/plugins/code/code.component.js +3 -3
- package/esm2015/plugins/color/color.plugin.js +6 -3
- package/esm2015/plugins/color/toolbar-item.component.js +14 -23
- package/esm2015/plugins/deserializers/deserialize-html.plugin.js +3 -3
- package/esm2015/plugins/font-size/font-size.editor.js +7 -13
- package/esm2015/plugins/heading/heading.editor.js +2 -1
- package/esm2015/plugins/heading/heading.plugin.js +2 -2
- package/esm2015/plugins/indent/indent.editor.js +1 -10
- package/esm2015/plugins/indent/indent.plugin.js +8 -7
- package/esm2015/plugins/index.js +2 -2
- package/esm2015/plugins/inline-code/inline-code.plugin.js +5 -2
- package/esm2015/plugins/link/link.plugin.js +5 -2
- package/esm2015/plugins/mark/mark.plugin.js +6 -3
- package/esm2015/plugins/public-api.js +1 -2
- package/esm2015/plugins/quick-insert/components/quick-toolbar/quick-toolbar.component.js +2 -2
- package/esm2015/plugins/table/components/table.component.js +4 -1
- package/esm2015/plugins/table/toolbar-item.component.js +10 -20
- package/esm2015/plugins/vertical-align/toolbar-item.component.js +6 -20
- package/esm2015/plugins/vertical-align/vertical-align.editor.js +2 -2
- package/esm2015/public-api.js +2 -2
- package/esm2015/queries/get-insert-elements-path.js +1 -1
- package/esm2015/queries/get-plugin-key-by-toolbar-key.js +10 -0
- package/esm2015/queries/get-toolbar-disabled.js +14 -0
- package/esm2015/queries/index.js +4 -2
- package/esm2015/utils/fragment.js +7 -4
- package/fesm2015/worktile-theia.js +277 -342
- package/fesm2015/worktile-theia.js.map +1 -1
- package/interfaces/plugins/plugins.d.ts +8 -2
- package/interfaces/toolbar.d.ts +2 -1
- package/package.json +1 -1
- package/plugins/autoformat/autoformat.plugin.d.ts +1 -1
- package/plugins/code/code.component.d.ts +1 -1
- package/plugins/color/toolbar-item.component.d.ts +3 -9
- package/plugins/font-size/font-size.editor.d.ts +0 -1
- package/plugins/heading/heading.plugin.d.ts +3 -3
- package/plugins/indent/indent.editor.d.ts +0 -1
- package/plugins/index.d.ts +1 -1
- package/plugins/public-api.d.ts +0 -1
- package/plugins/table/toolbar-item.component.d.ts +3 -9
- package/plugins/vertical-align/toolbar-item.component.d.ts +5 -13
- package/public-api.d.ts +1 -1
- package/queries/get-plugin-key-by-toolbar-key.d.ts +3 -0
- package/queries/get-toolbar-disabled.d.ts +4 -0
- package/queries/index.d.ts +3 -1
- package/utils/fragment.d.ts +2 -2
- package/components/toolbar-base-item/toolbar-base-item.component.d.ts +0 -11
- package/esm2015/components/toolbar-base-item/toolbar-base-item.component.js +0 -24
- package/esm2015/plugins/indent/toolbar-item.component.js +0 -115
- package/plugins/indent/toolbar-item.component.d.ts +0 -36
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
2
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/forms'), require('slate-angular'), require('ngx-tethys/core'), require('is-hotkey'), require('slate'), require('slate-history'), require('rxjs'), require('ngx-tethys/popover'), require('ngx-tethys/icon'), require('ngx-tethys/input'), require('@atinc/selene'), require('lodash'), require('ngx-tethys/util'), require('@angular/cdk/overlay'), require('marked'), require('ngx-tethys'), require('ngx-tethys/alert'), require('rxjs/operators'), require('ngx-tethys/uploader'), require('@angular/platform-browser'), require('ngx-tethys/progress'), require('ngx-tethys/nav'), require('ngx-tethys/tooltip'), require('ng-codemirror'), require('ngx-tethys/notify'), require('ngx-tethys/action-menu'), require('ngx-tethys/switch'), require('ngx-tethys/resizable'), require('is-url'), require('ngx-tethys/button'), require('ngx-tethys/form'), require('ngx-tethys/shared'), require('@angular/cdk/coercion'), require('@angular/cdk/portal'), require('ngx-tethys/list'), require('ngx-tethys/autocomplete'), require('ngx-tethys/avatar'), require('ngx-tethys/select')) :
|
|
3
3
|
typeof define === 'function' && define.amd ? define('@worktile/theia', ['exports', '@angular/core', '@angular/common', '@angular/forms', 'slate-angular', 'ngx-tethys/core', 'is-hotkey', 'slate', 'slate-history', 'rxjs', 'ngx-tethys/popover', 'ngx-tethys/icon', 'ngx-tethys/input', '@atinc/selene', 'lodash', 'ngx-tethys/util', '@angular/cdk/overlay', 'marked', 'ngx-tethys', 'ngx-tethys/alert', 'rxjs/operators', 'ngx-tethys/uploader', '@angular/platform-browser', 'ngx-tethys/progress', 'ngx-tethys/nav', 'ngx-tethys/tooltip', 'ng-codemirror', 'ngx-tethys/notify', 'ngx-tethys/action-menu', 'ngx-tethys/switch', 'ngx-tethys/resizable', 'is-url', 'ngx-tethys/button', 'ngx-tethys/form', 'ngx-tethys/shared', '@angular/cdk/coercion', '@angular/cdk/portal', 'ngx-tethys/list', 'ngx-tethys/autocomplete', 'ngx-tethys/avatar', 'ngx-tethys/select'], factory) :
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.worktile = global.worktile || {}, global.worktile.theia = {}), global.ng.core, global.ng.common, global.ng.forms, global.i1, global.core, global.isHotkey, global.slate, global.slateHistory, global.rxjs, global.i1$1, global.
|
|
5
|
-
})(this, (function (exports, i0, i10, i4
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.worktile = global.worktile || {}, global.worktile.theia = {}), global.ng.core, global.ng.common, global.ng.forms, global.i1, global.core, global.isHotkey, global.slate, global.slateHistory, global.rxjs, global.i1$1, global.i3, global.i5, global.selene, global._lodash, global.util, global.ng.cdk.overlay, global.marked, global.i1$2, global.i1$3, global.rxjs.operators, global.uploader, global.ng.platformBrowser, global.i6, global.i3$1, global.i5$1, global.i8, global.i1$5, global.i2$1, global.i5$2, global.i9, global.isUrl, global.i1$6, global.i2$2, global.i5$3, global.ng.cdk.coercion, global.ng.cdk.portal, global.i1$7, global.autocomplete, global.avatar, global.select));
|
|
5
|
+
})(this, (function (exports, i0, i10, i4, i1, core, isHotkey, slate, slateHistory, rxjs, i1$1, i3, i5, selene, _lodash, util, i2, marked, i1$2, i1$3, operators, uploader, i1$4, i6, i3$1, i5$1, i8, i1$5, i2$1, i5$2, i9, isUrl, i1$6, i2$2, i5$3, coercion, portal, i1$7, autocomplete, avatar, select) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
8
|
|
|
@@ -26,11 +26,11 @@
|
|
|
26
26
|
|
|
27
27
|
var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
|
|
28
28
|
var i10__namespace = /*#__PURE__*/_interopNamespace(i10);
|
|
29
|
-
var i4__namespace
|
|
29
|
+
var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
|
|
30
30
|
var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
|
|
31
31
|
var isHotkey__default = /*#__PURE__*/_interopDefaultLegacy(isHotkey);
|
|
32
32
|
var i1__namespace$1 = /*#__PURE__*/_interopNamespace(i1$1);
|
|
33
|
-
var
|
|
33
|
+
var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
|
|
34
34
|
var i5__namespace = /*#__PURE__*/_interopNamespace(i5);
|
|
35
35
|
var _lodash__namespace = /*#__PURE__*/_interopNamespace(_lodash);
|
|
36
36
|
var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
var i1__namespace$2 = /*#__PURE__*/_interopNamespace(i1$3);
|
|
40
40
|
var i1__namespace$3 = /*#__PURE__*/_interopNamespace(i1$4);
|
|
41
41
|
var i6__namespace = /*#__PURE__*/_interopNamespace(i6);
|
|
42
|
-
var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
|
|
42
|
+
var i3__namespace$1 = /*#__PURE__*/_interopNamespace(i3$1);
|
|
43
43
|
var i5__namespace$1 = /*#__PURE__*/_interopNamespace(i5$1);
|
|
44
44
|
var i8__namespace = /*#__PURE__*/_interopNamespace(i8);
|
|
45
45
|
var i1__namespace$4 = /*#__PURE__*/_interopNamespace(i1$5);
|
|
@@ -810,7 +810,7 @@
|
|
|
810
810
|
exports.ToolbarItemType = void 0;
|
|
811
811
|
(function (ToolbarItemType) {
|
|
812
812
|
ToolbarItemType["default"] = "default";
|
|
813
|
-
ToolbarItemType["
|
|
813
|
+
ToolbarItemType["dropdown"] = "dropdown";
|
|
814
814
|
})(exports.ToolbarItemType || (exports.ToolbarItemType = {}));
|
|
815
815
|
exports.ToolbarAlignment = void 0;
|
|
816
816
|
(function (ToolbarAlignment) {
|
|
@@ -1034,7 +1034,7 @@
|
|
|
1034
1034
|
return TheColorSelectComponent;
|
|
1035
1035
|
}());
|
|
1036
1036
|
TheColorSelectComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheColorSelectComponent, deps: [{ token: i1__namespace$1.ThyPopoverRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1037
|
-
TheColorSelectComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheColorSelectComponent, selector: "the-color-select", inputs: { selectedColor: "selectedColor", selectAction: "selectAction", showCustom: "showCustom", colors: "colors", option: "option" }, host: { listeners: { "document: mousedown": "handleDocumentMouseDown($event)", "mousedown": "handleMouseDown($event)", "keydown": "handleKeydown($event)" } }, ngImport: i0__namespace, template: "<div class=\"color-container\">\n <div class=\"colors\">\n <div *ngFor=\"let row of selectColors; let rowIndex = index\">\n <span\n class=\"color-item\"\n *ngFor=\"let _color of row.rowValue; let i = index\"\n [ngClass]=\"_color.classMaps\"\n (mousedown)=\"_selectColor($event, _color.value)\"\n >\n <span [ngStyle]=\"{ background: _color.value }\">\n <thy-icon thyIconName=\"check\" [ngStyle]=\"{ color: row.tickColor }\"></thy-icon>\n </span>\n </span>\n </div>\n </div>\n <div *ngIf=\"option.showCustom\" class=\"select-color\">\n <span class=\"color\" [ngStyle]=\"{ background: selectedColor }\"></span>\n #\n <input\n thyInput\n maxlength=\"6\"\n (keydown.enter)=\"customInputColorEnter($event)\"\n onkeyup=\"value=value.replace(/[^0-9A-Fa-f]/g,'')\"\n class=\"value\"\n [(ngModel)]=\"customColor\"\n (ngModelChange)=\"colorChange(false)\"\n />\n </div>\n</div>\n", components: [{ type:
|
|
1037
|
+
TheColorSelectComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheColorSelectComponent, selector: "the-color-select", inputs: { selectedColor: "selectedColor", selectAction: "selectAction", showCustom: "showCustom", colors: "colors", option: "option" }, host: { listeners: { "document: mousedown": "handleDocumentMouseDown($event)", "mousedown": "handleMouseDown($event)", "keydown": "handleKeydown($event)" } }, ngImport: i0__namespace, template: "<div class=\"color-container\">\n <div class=\"colors\">\n <div *ngFor=\"let row of selectColors; let rowIndex = index\">\n <span\n class=\"color-item\"\n *ngFor=\"let _color of row.rowValue; let i = index\"\n [ngClass]=\"_color.classMaps\"\n (mousedown)=\"_selectColor($event, _color.value)\"\n >\n <span [ngStyle]=\"{ background: _color.value }\">\n <thy-icon thyIconName=\"check\" [ngStyle]=\"{ color: row.tickColor }\"></thy-icon>\n </span>\n </span>\n </div>\n </div>\n <div *ngIf=\"option.showCustom\" class=\"select-color\">\n <span class=\"color\" [ngStyle]=\"{ background: selectedColor }\"></span>\n #\n <input\n thyInput\n maxlength=\"6\"\n (keydown.enter)=\"customInputColorEnter($event)\"\n onkeyup=\"value=value.replace(/[^0-9A-Fa-f]/g,'')\"\n class=\"value\"\n [(ngModel)]=\"customColor\"\n (ngModelChange)=\"colorChange(false)\"\n />\n </div>\n</div>\n", components: [{ type: i3__namespace.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }], directives: [{ type: i10__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i10__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i10__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i10__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4__namespace.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__namespace.ThyInputDirective, selector: "[thyInput]", inputs: ["thySize", "thyAutocomplete"] }, { type: i4__namespace.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { type: i4__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4__namespace.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
1038
1038
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheColorSelectComponent, decorators: [{
|
|
1039
1039
|
type: i0.Component,
|
|
1040
1040
|
args: [{
|
|
@@ -1342,10 +1342,10 @@
|
|
|
1342
1342
|
return nodes;
|
|
1343
1343
|
}
|
|
1344
1344
|
/**
|
|
1345
|
-
*
|
|
1345
|
+
* 过滤文本格式:颜色/背景色/字体大小
|
|
1346
1346
|
* @param node
|
|
1347
1347
|
*/
|
|
1348
|
-
function
|
|
1348
|
+
function filterTextFormat(node) {
|
|
1349
1349
|
node.children.forEach(function (child) {
|
|
1350
1350
|
if (slate.Text.isText(child)) {
|
|
1351
1351
|
if (child['color']) {
|
|
@@ -1354,9 +1354,12 @@
|
|
|
1354
1354
|
if (child['background-color']) {
|
|
1355
1355
|
delete child['background-color'];
|
|
1356
1356
|
}
|
|
1357
|
+
if (child['font-size']) {
|
|
1358
|
+
delete child['font-size'];
|
|
1359
|
+
}
|
|
1357
1360
|
}
|
|
1358
1361
|
else {
|
|
1359
|
-
|
|
1362
|
+
filterTextFormat(child);
|
|
1360
1363
|
}
|
|
1361
1364
|
});
|
|
1362
1365
|
}
|
|
@@ -1429,19 +1432,39 @@
|
|
|
1429
1432
|
|
|
1430
1433
|
var getPluginOptions = function (editor, key) { var _a, _b; return (_b = (_a = getPlugin(editor, key)) === null || _a === void 0 ? void 0 : _a.options) !== null && _b !== void 0 ? _b : {}; };
|
|
1431
1434
|
|
|
1435
|
+
var mergeArray = function (origin, source) {
|
|
1436
|
+
if (!Array.isArray(source))
|
|
1437
|
+
return source;
|
|
1438
|
+
var _loop_1 = function (i) {
|
|
1439
|
+
var value = source[i];
|
|
1440
|
+
if (util.isObject(value) && (value === null || value === void 0 ? void 0 : value.key) && origin.some(function (item) { return (item === null || item === void 0 ? void 0 : item.key) === (value === null || value === void 0 ? void 0 : value.key); })) {
|
|
1441
|
+
var index = origin.findIndex(function (item) { return (item === null || item === void 0 ? void 0 : item.key) === (value === null || value === void 0 ? void 0 : value.key); });
|
|
1442
|
+
origin[index] = Object.assign(Object.assign({}, origin[index]), value);
|
|
1443
|
+
return "continue";
|
|
1444
|
+
}
|
|
1445
|
+
if (origin.includes(source[i]))
|
|
1446
|
+
return "continue";
|
|
1447
|
+
origin.push(source[i]);
|
|
1448
|
+
};
|
|
1449
|
+
for (var i = 0; i < source.length; i++) {
|
|
1450
|
+
_loop_1(i);
|
|
1451
|
+
}
|
|
1452
|
+
return origin;
|
|
1453
|
+
};
|
|
1454
|
+
|
|
1432
1455
|
var mergeOptions = function (plugin, override) {
|
|
1433
1456
|
var options = plugin.options;
|
|
1434
|
-
var newOptions =
|
|
1435
|
-
for (var option in options) {
|
|
1436
|
-
if (Array.isArray(options[option])) {
|
|
1437
|
-
newOptions[option] =
|
|
1457
|
+
var newOptions = options;
|
|
1458
|
+
for (var option in override.options) {
|
|
1459
|
+
if (Array.isArray(override.options[option]) && newOptions[option]) {
|
|
1460
|
+
newOptions[option] = mergeArray(newOptions[option], override.options[option]);
|
|
1438
1461
|
continue;
|
|
1439
1462
|
}
|
|
1440
|
-
if (util.isObject(options[option])) {
|
|
1441
|
-
newOptions[option] = _.assign(
|
|
1463
|
+
if (util.isObject(override.options[option]) && newOptions[option]) {
|
|
1464
|
+
newOptions[option] = _.assign(newOptions[option], override.options[option]);
|
|
1442
1465
|
continue;
|
|
1443
1466
|
}
|
|
1444
|
-
newOptions[option] = override.options[option]
|
|
1467
|
+
newOptions[option] = override.options[option];
|
|
1445
1468
|
}
|
|
1446
1469
|
plugin.options = newOptions;
|
|
1447
1470
|
};
|
|
@@ -1463,7 +1486,6 @@
|
|
|
1463
1486
|
newPlugins.forEach(function (p) {
|
|
1464
1487
|
if (editor.pluginsByKey[p.key]) {
|
|
1465
1488
|
mergeOptions(p, plugin.overrideByKey[p.key]);
|
|
1466
|
-
editor.pluginsByKey[p.key] = _.defaultsDeep(p, plugin.overrideByKey[p.key]);
|
|
1467
1489
|
}
|
|
1468
1490
|
});
|
|
1469
1491
|
}
|
|
@@ -2426,6 +2448,28 @@
|
|
|
2426
2448
|
return false;
|
|
2427
2449
|
};
|
|
2428
2450
|
|
|
2451
|
+
var getToolbarItemDisabled = function (editor, key, customTypes) {
|
|
2452
|
+
var _a, _b;
|
|
2453
|
+
if (editor.selection) {
|
|
2454
|
+
var disabledOperateTypes = (_b = (_a = getPluginOptions(editor, key)) === null || _a === void 0 ? void 0 : _a.disabledOperateTypes) !== null && _b !== void 0 ? _b : [];
|
|
2455
|
+
if (customTypes === null || customTypes === void 0 ? void 0 : customTypes.length) {
|
|
2456
|
+
disabledOperateTypes = Array.from(new Set(__spreadArray(__spreadArray([], __read(disabledOperateTypes)), __read(customTypes))));
|
|
2457
|
+
}
|
|
2458
|
+
var anchorNode = anchorBlock(editor);
|
|
2459
|
+
return anchorNode && disabledOperateTypes.includes(anchorNode === null || anchorNode === void 0 ? void 0 : anchorNode.type);
|
|
2460
|
+
}
|
|
2461
|
+
};
|
|
2462
|
+
|
|
2463
|
+
var getPluginKeyByToolbarKey = function (editor, toolbarKey) {
|
|
2464
|
+
for (var key in editor.pluginsByKey) {
|
|
2465
|
+
var toolbarItems = editor.pluginsByKey[key].toolbarItems;
|
|
2466
|
+
if (toolbarItems && toolbarItems.some(function (item) { return item.key === toolbarKey; })) {
|
|
2467
|
+
toolbarKey = key;
|
|
2468
|
+
}
|
|
2469
|
+
}
|
|
2470
|
+
return toolbarKey;
|
|
2471
|
+
};
|
|
2472
|
+
|
|
2429
2473
|
var index$1 = /*#__PURE__*/Object.freeze({
|
|
2430
2474
|
__proto__: null,
|
|
2431
2475
|
getLastNode: getLastNode,
|
|
@@ -2482,7 +2526,9 @@
|
|
|
2482
2526
|
findPath: findPath,
|
|
2483
2527
|
findNode: findNode,
|
|
2484
2528
|
findDescendant: findDescendant,
|
|
2485
|
-
someNode: someNode
|
|
2529
|
+
someNode: someNode,
|
|
2530
|
+
getToolbarItemDisabled: getToolbarItemDisabled,
|
|
2531
|
+
getPluginKeyByToolbarKey: getPluginKeyByToolbarKey
|
|
2486
2532
|
});
|
|
2487
2533
|
|
|
2488
2534
|
var insertElements = function (editor, elements) {
|
|
@@ -3494,7 +3540,7 @@
|
|
|
3494
3540
|
return TheImageComponent;
|
|
3495
3541
|
}(TheBaseElementComponent));
|
|
3496
3542
|
TheImageComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheImageComponent, deps: [{ token: i0__namespace.ElementRef }, { token: i1__namespace$3.DomSanitizer }, { token: THE_UPLOAD_SERVICE_TOKEN }, { token: i0__namespace.ChangeDetectorRef }, { token: TheContextService }, { token: i1__namespace$1.ThyPopover }, { token: i2__namespace.Overlay }, { token: i0__namespace.ViewContainerRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
3497
|
-
TheImageComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheImageComponent, selector: "the-image, [theImage]", viewQueries: [{ propertyName: "imageContent", first: true, predicate: ["imageContent"], descendants: true }, { propertyName: "img", first: true, predicate: ["img"], descendants: true }, { propertyName: "layoutToolbar", first: true, predicate: ["layoutToolbar"], descendants: true, static: true }], usesInheritance: true, ngImport: i0__namespace, template: "<slate-children [children]=\"children\" [context]=\"childrenContext\" [viewContext]=\"viewContext\"></slate-children>\n\n<div class=\"image-container\" contenteditable=\"false\" [style.textAlign]=\"imageEntry.align\">\n <div\n #imageContent\n *ngIf=\"imageEntry.thumbUrl\"\n class=\"image-content\"\n [class.pointer]=\"!selection\"\n [ngStyle]=\"{\n 'width.px':\n imageEntry?.layout && imageEntry?.width > layoutDefaultWidth && !imageEntry?.reSized\n ? layoutDefaultWidth\n : imageEntry.width,\n 'height.px': imageEntry.height\n }\"\n >\n <img #img class=\"main-image\" [src]=\"imageEntry.thumbUrl\" [alt]=\"imageEntry.name\" />\n <div *ngIf=\"selection\" class=\"image-profile\" [class.outline]=\"selection\">\n <span *ngIf=\"isCollapsed\" (mousedown)=\"startDrag($event, '-xl')\" class=\"image-pointer left top\"></span>\n <span *ngIf=\"isCollapsed\" (mousedown)=\"startDrag($event, 'xl')\" class=\"image-pointer right top\"></span>\n <span *ngIf=\"isCollapsed\" (mousedown)=\"startDrag($event, 'xl')\" class=\"image-pointer right bottom\"></span>\n <span *ngIf=\"isCollapsed\" (mousedown)=\"startDrag($event, '-xl')\" class=\"image-pointer left bottom\"></span>\n </div>\n <div *ngIf=\"uploading\" class=\"uploading\">\n <div class=\"uploading-percentage\">\n <thy-progress thyType=\"primary\" [thyValue]=\"percentage\" thySize=\"sm\"></thy-progress>\n <thy-icon (click)=\"cancelUpload($event)\" thyIconName=\"close-circle-bold-fill\" thyIconLegging=\"true\"></thy-icon>\n </div>\n </div>\n <div *ngIf=\"!uploading\" class=\"layer\" (mousedown)=\"preview($event)\" [class.readonly]=\"readonly\"></div>\n </div>\n <div *ngIf=\"!imageEntry.thumbUrl\" class=\"image-loading\" contenteditable=\"false\">\n <thy-icon thyIconName=\"image\"></thy-icon>\n </div>\n</div>\n\n<ng-template #layoutToolbar>\n <div class=\"the-block-toolbar-popover\" contenteditable=\"false\">\n <thy-icon-nav>\n <ng-container *ngFor=\"let item of layoutOptions\">\n <a\n *ngIf=\"item.key !== 'split'\"\n href=\"javascript:;\"\n thyIconNavLink\n [ngClass]=\"{ 'remove-link': item.key === 'remove' }\"\n [thyIconNavLinkIcon]=\"item.icon\"\n [thyTooltip]=\"item.name\"\n [thyIconNavLinkActive]=\"layoutActive(item.key)\"\n thyTooltipPlacement=\"top\"\n (mousedown)=\"item?.handle($event, item.key)\"\n ></a>\n <nav-split-line *ngIf=\"item.key === 'split'\"></nav-split-line>\n </ng-container>\n </thy-icon-nav>\n </div>\n</ng-template>\n", components: [{ type: i1__namespace.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }, { type: i6__namespace.ThyProgressComponent, selector: "thy-progress", inputs: ["thyType", "thySize", "thyValue", "thyMax", "thyTips"] }, { type:
|
|
3543
|
+
TheImageComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheImageComponent, selector: "the-image, [theImage]", viewQueries: [{ propertyName: "imageContent", first: true, predicate: ["imageContent"], descendants: true }, { propertyName: "img", first: true, predicate: ["img"], descendants: true }, { propertyName: "layoutToolbar", first: true, predicate: ["layoutToolbar"], descendants: true, static: true }], usesInheritance: true, ngImport: i0__namespace, template: "<slate-children [children]=\"children\" [context]=\"childrenContext\" [viewContext]=\"viewContext\"></slate-children>\n\n<div class=\"image-container\" contenteditable=\"false\" [style.textAlign]=\"imageEntry.align\">\n <div\n #imageContent\n *ngIf=\"imageEntry.thumbUrl\"\n class=\"image-content\"\n [class.pointer]=\"!selection\"\n [ngStyle]=\"{\n 'width.px':\n imageEntry?.layout && imageEntry?.width > layoutDefaultWidth && !imageEntry?.reSized\n ? layoutDefaultWidth\n : imageEntry.width,\n 'height.px': imageEntry.height\n }\"\n >\n <img #img class=\"main-image\" [src]=\"imageEntry.thumbUrl\" [alt]=\"imageEntry.name\" />\n <div *ngIf=\"selection\" class=\"image-profile\" [class.outline]=\"selection\">\n <span *ngIf=\"isCollapsed\" (mousedown)=\"startDrag($event, '-xl')\" class=\"image-pointer left top\"></span>\n <span *ngIf=\"isCollapsed\" (mousedown)=\"startDrag($event, 'xl')\" class=\"image-pointer right top\"></span>\n <span *ngIf=\"isCollapsed\" (mousedown)=\"startDrag($event, 'xl')\" class=\"image-pointer right bottom\"></span>\n <span *ngIf=\"isCollapsed\" (mousedown)=\"startDrag($event, '-xl')\" class=\"image-pointer left bottom\"></span>\n </div>\n <div *ngIf=\"uploading\" class=\"uploading\">\n <div class=\"uploading-percentage\">\n <thy-progress thyType=\"primary\" [thyValue]=\"percentage\" thySize=\"sm\"></thy-progress>\n <thy-icon (click)=\"cancelUpload($event)\" thyIconName=\"close-circle-bold-fill\" thyIconLegging=\"true\"></thy-icon>\n </div>\n </div>\n <div *ngIf=\"!uploading\" class=\"layer\" (mousedown)=\"preview($event)\" [class.readonly]=\"readonly\"></div>\n </div>\n <div *ngIf=\"!imageEntry.thumbUrl\" class=\"image-loading\" contenteditable=\"false\">\n <thy-icon thyIconName=\"image\"></thy-icon>\n </div>\n</div>\n\n<ng-template #layoutToolbar>\n <div class=\"the-block-toolbar-popover\" contenteditable=\"false\">\n <thy-icon-nav>\n <ng-container *ngFor=\"let item of layoutOptions\">\n <a\n *ngIf=\"item.key !== 'split'\"\n href=\"javascript:;\"\n thyIconNavLink\n [ngClass]=\"{ 'remove-link': item.key === 'remove' }\"\n [thyIconNavLinkIcon]=\"item.icon\"\n [thyTooltip]=\"item.name\"\n [thyIconNavLinkActive]=\"layoutActive(item.key)\"\n thyTooltipPlacement=\"top\"\n (mousedown)=\"item?.handle($event, item.key)\"\n ></a>\n <nav-split-line *ngIf=\"item.key === 'split'\"></nav-split-line>\n </ng-container>\n </thy-icon-nav>\n </div>\n</ng-template>\n", components: [{ type: i1__namespace.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }, { type: i6__namespace.ThyProgressComponent, selector: "thy-progress", inputs: ["thyType", "thySize", "thyValue", "thyMax", "thyTips"] }, { type: i3__namespace.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { type: i3__namespace$1.ThyIconNavComponent, selector: "thy-icon-nav", inputs: ["thyType"] }, { type: i3__namespace$1.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: NavSplitLineComponent, selector: "nav-split-line", inputs: ["mode"] }], directives: [{ type: i10__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i10__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i10__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i10__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i5__namespace$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }] });
|
|
3498
3544
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheImageComponent, decorators: [{
|
|
3499
3545
|
type: i0.Component,
|
|
3500
3546
|
args: [{
|
|
@@ -5945,12 +5991,7 @@
|
|
|
5945
5991
|
var _a;
|
|
5946
5992
|
var contextService = (_a = editor === null || editor === void 0 ? void 0 : editor.injector) === null || _a === void 0 ? void 0 : _a.get(TheContextService);
|
|
5947
5993
|
var richMedia = contextService.getOptions().theOptions.richMedia;
|
|
5948
|
-
|
|
5949
|
-
var disableGroup = [exports.ElementKinds.image];
|
|
5950
|
-
var anchorBlock$1 = anchorBlock(editor);
|
|
5951
|
-
return anchorBlock$1 && disableGroup.includes(anchorBlock$1 === null || anchorBlock$1 === void 0 ? void 0 : anchorBlock$1.type);
|
|
5952
|
-
}
|
|
5953
|
-
return false;
|
|
5994
|
+
return getToolbarItemDisabled(editor, exports.PluginKeys.align, richMedia ? [exports.ElementKinds.image] : []);
|
|
5954
5995
|
},
|
|
5955
5996
|
setAlign: function (editor, alignment) {
|
|
5956
5997
|
if (TableEditor.setAlign(editor, alignment)) {
|
|
@@ -5990,7 +6031,7 @@
|
|
|
5990
6031
|
toolbarItems: [
|
|
5991
6032
|
{
|
|
5992
6033
|
key: exports.ToolbarActionTypes.alignType,
|
|
5993
|
-
type: exports.ToolbarItemType.
|
|
6034
|
+
type: exports.ToolbarItemType.dropdown,
|
|
5994
6035
|
dropdownMode: exports.DropdownMode.icon,
|
|
5995
6036
|
dropdownItemKey: exports.ToolbarActionTypes.alignLeft,
|
|
5996
6037
|
includes: [exports.ToolbarActionTypes.alignLeft, exports.ToolbarActionTypes.alignCenter, exports.ToolbarActionTypes.alignRight],
|
|
@@ -6018,11 +6059,15 @@
|
|
|
6018
6059
|
execute: function (editor) { return AlignEditor.setAlign(editor, exports.Alignment.right); },
|
|
6019
6060
|
active: function (editor) { return AlignEditor.isActive(editor, exports.Alignment.right); }
|
|
6020
6061
|
}
|
|
6021
|
-
]
|
|
6062
|
+
],
|
|
6063
|
+
options: {
|
|
6064
|
+
disabledOperateTypes: [exports.ElementKinds.code]
|
|
6065
|
+
}
|
|
6022
6066
|
});
|
|
6023
6067
|
|
|
6024
6068
|
var headingOptions = {
|
|
6025
6069
|
allowParentTypes: [exports.ElementKinds.tableCell, exports.ElementKinds.blockquote],
|
|
6070
|
+
disabledOperateTypes: [exports.ElementKinds.image, exports.ElementKinds.code],
|
|
6026
6071
|
cleanupTypes: [exports.ElementKinds.bulletedList, exports.ElementKinds.numberedList, exports.ElementKinds.listItem]
|
|
6027
6072
|
};
|
|
6028
6073
|
var HeadingEditor = {
|
|
@@ -6101,7 +6146,7 @@
|
|
|
6101
6146
|
{
|
|
6102
6147
|
key: exports.ElementKinds.headingList,
|
|
6103
6148
|
name: '正文',
|
|
6104
|
-
type: exports.ToolbarItemType.
|
|
6149
|
+
type: exports.ToolbarItemType.dropdown,
|
|
6105
6150
|
dropdownItemKey: exports.ElementKinds.paragraph,
|
|
6106
6151
|
includes: __spreadArray([exports.ElementKinds.paragraph], __read(STANDARD_HEADING_TYPES))
|
|
6107
6152
|
},
|
|
@@ -6267,7 +6312,10 @@
|
|
|
6267
6312
|
execute: function (editor) { return MarkEditor.toggleMark(editor, exports.MarkTypes.underline); },
|
|
6268
6313
|
active: function (editor) { return MarkEditor.isMarkActive(editor, exports.MarkTypes.underline); }
|
|
6269
6314
|
}
|
|
6270
|
-
]
|
|
6315
|
+
],
|
|
6316
|
+
options: {
|
|
6317
|
+
disabledOperateTypes: [exports.ElementKinds.image, exports.ElementKinds.code]
|
|
6318
|
+
}
|
|
6271
6319
|
});
|
|
6272
6320
|
|
|
6273
6321
|
var withNodeID = function (e) {
|
|
@@ -6537,6 +6585,7 @@
|
|
|
6537
6585
|
|
|
6538
6586
|
var defaultAutoFormatRules = [
|
|
6539
6587
|
{
|
|
6588
|
+
key: exports.ElementKinds.heading_1,
|
|
6540
6589
|
type: exports.ElementKinds.heading_1,
|
|
6541
6590
|
markup: '#',
|
|
6542
6591
|
format: function (editor) {
|
|
@@ -6544,6 +6593,7 @@
|
|
|
6544
6593
|
}
|
|
6545
6594
|
},
|
|
6546
6595
|
{
|
|
6596
|
+
key: exports.ElementKinds.heading_2,
|
|
6547
6597
|
type: exports.ElementKinds.heading_2,
|
|
6548
6598
|
markup: '##',
|
|
6549
6599
|
format: function (editor) {
|
|
@@ -6551,6 +6601,7 @@
|
|
|
6551
6601
|
}
|
|
6552
6602
|
},
|
|
6553
6603
|
{
|
|
6604
|
+
key: exports.ElementKinds.heading_3,
|
|
6554
6605
|
type: exports.ElementKinds.heading_3,
|
|
6555
6606
|
markup: '###',
|
|
6556
6607
|
format: function (editor) {
|
|
@@ -6558,6 +6609,7 @@
|
|
|
6558
6609
|
}
|
|
6559
6610
|
},
|
|
6560
6611
|
{
|
|
6612
|
+
key: exports.ElementKinds.heading_4,
|
|
6561
6613
|
type: exports.ElementKinds.heading_4,
|
|
6562
6614
|
markup: '####',
|
|
6563
6615
|
format: function (editor) {
|
|
@@ -6565,6 +6617,7 @@
|
|
|
6565
6617
|
}
|
|
6566
6618
|
},
|
|
6567
6619
|
{
|
|
6620
|
+
key: exports.ElementKinds.heading_5,
|
|
6568
6621
|
type: exports.ElementKinds.heading_5,
|
|
6569
6622
|
markup: '#####',
|
|
6570
6623
|
format: function (editor) {
|
|
@@ -6572,6 +6625,7 @@
|
|
|
6572
6625
|
}
|
|
6573
6626
|
},
|
|
6574
6627
|
{
|
|
6628
|
+
key: exports.ElementKinds.heading_6,
|
|
6575
6629
|
type: exports.ElementKinds.heading_6,
|
|
6576
6630
|
markup: '######',
|
|
6577
6631
|
format: function (editor) {
|
|
@@ -6579,6 +6633,7 @@
|
|
|
6579
6633
|
}
|
|
6580
6634
|
},
|
|
6581
6635
|
{
|
|
6636
|
+
key: exports.ElementKinds.blockquote,
|
|
6582
6637
|
type: exports.ElementKinds.blockquote,
|
|
6583
6638
|
markup: ['>'],
|
|
6584
6639
|
format: function (editor) {
|
|
@@ -6586,30 +6641,35 @@
|
|
|
6586
6641
|
}
|
|
6587
6642
|
},
|
|
6588
6643
|
{
|
|
6644
|
+
key: exports.MarkTypes.bold,
|
|
6589
6645
|
type: exports.MarkTypes.bold,
|
|
6590
6646
|
between: ['**', '**'],
|
|
6591
6647
|
mode: 'inline',
|
|
6592
6648
|
insertTrigger: true
|
|
6593
6649
|
},
|
|
6594
6650
|
{
|
|
6651
|
+
key: exports.MarkTypes.bold + "__",
|
|
6595
6652
|
type: exports.MarkTypes.bold,
|
|
6596
6653
|
between: ['__', '__'],
|
|
6597
6654
|
mode: 'inline',
|
|
6598
6655
|
insertTrigger: true
|
|
6599
6656
|
},
|
|
6600
6657
|
{
|
|
6658
|
+
key: exports.MarkTypes.italic,
|
|
6601
6659
|
type: exports.MarkTypes.italic,
|
|
6602
6660
|
between: ['*', '*'],
|
|
6603
6661
|
mode: 'inline',
|
|
6604
6662
|
insertTrigger: true
|
|
6605
6663
|
},
|
|
6606
6664
|
{
|
|
6665
|
+
key: exports.MarkTypes.italic + "_",
|
|
6607
6666
|
type: exports.MarkTypes.italic,
|
|
6608
6667
|
between: ['_', '_'],
|
|
6609
6668
|
mode: 'inline',
|
|
6610
6669
|
insertTrigger: true
|
|
6611
6670
|
},
|
|
6612
6671
|
{
|
|
6672
|
+
key: exports.ElementKinds.inlineCode,
|
|
6613
6673
|
type: exports.ElementKinds.inlineCode,
|
|
6614
6674
|
between: ['`', '`'],
|
|
6615
6675
|
mode: 'inline',
|
|
@@ -6619,12 +6679,14 @@
|
|
|
6619
6679
|
}
|
|
6620
6680
|
},
|
|
6621
6681
|
{
|
|
6682
|
+
key: exports.MarkTypes.strike,
|
|
6622
6683
|
type: exports.MarkTypes.strike,
|
|
6623
6684
|
between: ['~~', '~~'],
|
|
6624
6685
|
mode: 'inline',
|
|
6625
6686
|
insertTrigger: true
|
|
6626
6687
|
},
|
|
6627
6688
|
{
|
|
6689
|
+
key: exports.ElementKinds.code,
|
|
6628
6690
|
type: exports.ElementKinds.code,
|
|
6629
6691
|
markup: '```',
|
|
6630
6692
|
format: function (editor) {
|
|
@@ -6632,6 +6694,7 @@
|
|
|
6632
6694
|
}
|
|
6633
6695
|
},
|
|
6634
6696
|
{
|
|
6697
|
+
key: exports.ElementKinds.listItem,
|
|
6635
6698
|
type: exports.ElementKinds.listItem,
|
|
6636
6699
|
markup: [],
|
|
6637
6700
|
match: function (editor) {
|
|
@@ -6642,8 +6705,8 @@
|
|
|
6642
6705
|
}
|
|
6643
6706
|
},
|
|
6644
6707
|
{
|
|
6645
|
-
type: exports.ElementKinds.listItem,
|
|
6646
6708
|
key: exports.ElementKinds.numberedList,
|
|
6709
|
+
type: exports.ElementKinds.listItem,
|
|
6647
6710
|
markup: [],
|
|
6648
6711
|
match: function (editor, textFromBlockStart) {
|
|
6649
6712
|
return isParagraph(editor) && /^-?\d+(\.|\))$/.test(textFromBlockStart) ? [textFromBlockStart] : [];
|
|
@@ -6660,6 +6723,7 @@
|
|
|
6660
6723
|
}
|
|
6661
6724
|
},
|
|
6662
6725
|
{
|
|
6726
|
+
key: exports.ElementKinds.checkItem,
|
|
6663
6727
|
type: exports.ElementKinds.checkItem,
|
|
6664
6728
|
markup: [],
|
|
6665
6729
|
match: function (editor) {
|
|
@@ -6670,6 +6734,7 @@
|
|
|
6670
6734
|
}
|
|
6671
6735
|
},
|
|
6672
6736
|
{
|
|
6737
|
+
key: exports.ElementKinds.hr,
|
|
6673
6738
|
type: exports.ElementKinds.hr,
|
|
6674
6739
|
markup: '---',
|
|
6675
6740
|
insertTrigger: true
|
|
@@ -7360,10 +7425,34 @@
|
|
|
7360
7425
|
withOverrides: withRemoveVoid
|
|
7361
7426
|
});
|
|
7362
7427
|
|
|
7363
|
-
var
|
|
7364
|
-
function
|
|
7428
|
+
var TheBaseToolbarItem = /** @class */ (function () {
|
|
7429
|
+
function TheBaseToolbarItem() {
|
|
7365
7430
|
}
|
|
7366
|
-
|
|
7431
|
+
Object.defineProperty(TheBaseToolbarItem.prototype, "toolbarItem", {
|
|
7432
|
+
get: function () {
|
|
7433
|
+
return this._toolbarItem;
|
|
7434
|
+
},
|
|
7435
|
+
set: function (value) {
|
|
7436
|
+
this._toolbarItem = value;
|
|
7437
|
+
},
|
|
7438
|
+
enumerable: false,
|
|
7439
|
+
configurable: true
|
|
7440
|
+
});
|
|
7441
|
+
Object.defineProperty(TheBaseToolbarItem.prototype, "disabledState", {
|
|
7442
|
+
get: function () {
|
|
7443
|
+
return this.disabled;
|
|
7444
|
+
},
|
|
7445
|
+
enumerable: false,
|
|
7446
|
+
configurable: true
|
|
7447
|
+
});
|
|
7448
|
+
Object.defineProperty(TheBaseToolbarItem.prototype, "activeState", {
|
|
7449
|
+
get: function () {
|
|
7450
|
+
return this.active;
|
|
7451
|
+
},
|
|
7452
|
+
enumerable: false,
|
|
7453
|
+
configurable: true
|
|
7454
|
+
});
|
|
7455
|
+
TheBaseToolbarItem.prototype.execute = function (event) {
|
|
7367
7456
|
var _a;
|
|
7368
7457
|
event.preventDefault();
|
|
7369
7458
|
event.stopPropagation();
|
|
@@ -7374,13 +7463,76 @@
|
|
|
7374
7463
|
i1.AngularEditor.focus(this.editor);
|
|
7375
7464
|
}
|
|
7376
7465
|
};
|
|
7377
|
-
|
|
7466
|
+
TheBaseToolbarItem.prototype.selectionChange = function (editor) {
|
|
7467
|
+
var _a, _b, _c, _d, _e, _f;
|
|
7468
|
+
if (editor.selection) {
|
|
7469
|
+
this.active = ((_a = this._toolbarItem) === null || _a === void 0 ? void 0 : _a.active) ? (_b = this._toolbarItem) === null || _b === void 0 ? void 0 : _b.active(editor) : false;
|
|
7470
|
+
if ((_c = this._toolbarItem) === null || _c === void 0 ? void 0 : _c.disable) {
|
|
7471
|
+
this.disabled = ((_d = this._toolbarItem) === null || _d === void 0 ? void 0 : _d.disable) ? (_e = this._toolbarItem) === null || _e === void 0 ? void 0 : _e.disable(editor) : false;
|
|
7472
|
+
}
|
|
7473
|
+
else {
|
|
7474
|
+
var pluginKey = getPluginKeyByToolbarKey(editor, (_f = this._toolbarItem) === null || _f === void 0 ? void 0 : _f.key);
|
|
7475
|
+
this.disabled = pluginKey && getToolbarItemDisabled(editor, pluginKey);
|
|
7476
|
+
}
|
|
7477
|
+
}
|
|
7478
|
+
};
|
|
7479
|
+
return TheBaseToolbarItem;
|
|
7378
7480
|
}());
|
|
7379
|
-
|
|
7380
|
-
|
|
7381
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type:
|
|
7481
|
+
TheBaseToolbarItem.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheBaseToolbarItem, deps: [], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
7482
|
+
TheBaseToolbarItem.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.15", type: TheBaseToolbarItem, inputs: { toolbarItem: "toolbarItem", editor: "editor" }, host: { properties: { "class.disabled": "this.disabledState", "class.active": "this.activeState" } }, ngImport: i0__namespace });
|
|
7483
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheBaseToolbarItem, decorators: [{
|
|
7382
7484
|
type: i0.Directive
|
|
7383
|
-
}]
|
|
7485
|
+
}], propDecorators: { toolbarItem: [{
|
|
7486
|
+
type: i0.Input
|
|
7487
|
+
}], editor: [{
|
|
7488
|
+
type: i0.Input
|
|
7489
|
+
}], disabledState: [{
|
|
7490
|
+
type: i0.HostBinding,
|
|
7491
|
+
args: ['class.disabled']
|
|
7492
|
+
}], activeState: [{
|
|
7493
|
+
type: i0.HostBinding,
|
|
7494
|
+
args: ['class.active']
|
|
7495
|
+
}] } });
|
|
7496
|
+
var TheBaseToolbarDropdown = /** @class */ (function (_super) {
|
|
7497
|
+
__extends(TheBaseToolbarDropdown, _super);
|
|
7498
|
+
function TheBaseToolbarDropdown() {
|
|
7499
|
+
var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
|
|
7500
|
+
_this.mode = exports.DropdownMode.text;
|
|
7501
|
+
return _this;
|
|
7502
|
+
}
|
|
7503
|
+
Object.defineProperty(TheBaseToolbarDropdown.prototype, "defaultDropdownItem", {
|
|
7504
|
+
get: function () {
|
|
7505
|
+
var _this = this;
|
|
7506
|
+
var activeItem = this.dropdownItemKey && this.menus.find(function (item) { return item.key === _this.dropdownItemKey; });
|
|
7507
|
+
return activeItem ? activeItem : this.menus[0];
|
|
7508
|
+
},
|
|
7509
|
+
enumerable: false,
|
|
7510
|
+
configurable: true
|
|
7511
|
+
});
|
|
7512
|
+
TheBaseToolbarDropdown.prototype.selectionChange = function (editor) {
|
|
7513
|
+
_super.prototype.selectionChange.call(this, editor);
|
|
7514
|
+
var activeItem = this.menus.find(function (i) {
|
|
7515
|
+
if (i === null || i === void 0 ? void 0 : i.active) {
|
|
7516
|
+
return i === null || i === void 0 ? void 0 : i.active(editor);
|
|
7517
|
+
}
|
|
7518
|
+
});
|
|
7519
|
+
if (!this.toolbarItem.dropdownFixedIcon) {
|
|
7520
|
+
this.activeMenuItem = activeItem ? activeItem : this.defaultDropdownItem;
|
|
7521
|
+
}
|
|
7522
|
+
};
|
|
7523
|
+
return TheBaseToolbarDropdown;
|
|
7524
|
+
}(TheBaseToolbarItem));
|
|
7525
|
+
TheBaseToolbarDropdown.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheBaseToolbarDropdown, deps: null, target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
7526
|
+
TheBaseToolbarDropdown.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.15", type: TheBaseToolbarDropdown, inputs: { menus: "menus", mode: "mode", dropdownItemKey: "dropdownItemKey" }, usesInheritance: true, ngImport: i0__namespace });
|
|
7527
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheBaseToolbarDropdown, decorators: [{
|
|
7528
|
+
type: i0.Directive
|
|
7529
|
+
}], propDecorators: { menus: [{
|
|
7530
|
+
type: i0.Input
|
|
7531
|
+
}], mode: [{
|
|
7532
|
+
type: i0.Input
|
|
7533
|
+
}], dropdownItemKey: [{
|
|
7534
|
+
type: i0.Input
|
|
7535
|
+
}] } });
|
|
7384
7536
|
|
|
7385
7537
|
var TheToolbarDropdownComponent = /** @class */ (function (_super) {
|
|
7386
7538
|
__extends(TheToolbarDropdownComponent, _super);
|
|
@@ -7390,22 +7542,9 @@
|
|
|
7390
7542
|
_this.thyPopover = thyPopover;
|
|
7391
7543
|
_this.viewContainerRef = viewContainerRef;
|
|
7392
7544
|
_this.overlay = overlay;
|
|
7393
|
-
_this.mode = exports.DropdownMode.text;
|
|
7394
7545
|
_this.dropdownMode = exports.DropdownMode;
|
|
7395
|
-
_this.disabled = false;
|
|
7396
7546
|
return _this;
|
|
7397
7547
|
}
|
|
7398
|
-
Object.defineProperty(TheToolbarDropdownComponent.prototype, "item", {
|
|
7399
|
-
get: function () {
|
|
7400
|
-
return this._item;
|
|
7401
|
-
},
|
|
7402
|
-
set: function (i) {
|
|
7403
|
-
this._item = i;
|
|
7404
|
-
this.activeMenu = i;
|
|
7405
|
-
},
|
|
7406
|
-
enumerable: false,
|
|
7407
|
-
configurable: true
|
|
7408
|
-
});
|
|
7409
7548
|
Object.defineProperty(TheToolbarDropdownComponent.prototype, "isOpen", {
|
|
7410
7549
|
get: function () {
|
|
7411
7550
|
return this.dropdownPopoverRef && this.dropdownPopoverRef.getOverlayRef() && this.dropdownPopoverRef.getOverlayRef().hasAttached();
|
|
@@ -7426,38 +7565,24 @@
|
|
|
7426
7565
|
this.closeDropdownPopover();
|
|
7427
7566
|
}
|
|
7428
7567
|
};
|
|
7429
|
-
Object.defineProperty(TheToolbarDropdownComponent.prototype, "disabledState", {
|
|
7430
|
-
get: function () {
|
|
7431
|
-
return this.disabled;
|
|
7432
|
-
},
|
|
7433
|
-
enumerable: false,
|
|
7434
|
-
configurable: true
|
|
7435
|
-
});
|
|
7436
7568
|
TheToolbarDropdownComponent.prototype.ngOnInit = function () {
|
|
7437
7569
|
var _a;
|
|
7438
7570
|
if (!this.template) {
|
|
7439
7571
|
this.template = this.mode === this.dropdownMode.icon ? this.iconModeTemplate : this.textModeTemplate;
|
|
7440
7572
|
}
|
|
7441
|
-
if (!this.
|
|
7442
|
-
this.
|
|
7573
|
+
if (!this.activeMenuItem) {
|
|
7574
|
+
this.activeMenuItem = this.defaultDropdownItem;
|
|
7443
7575
|
}
|
|
7444
7576
|
if (this.toolbarItem) {
|
|
7445
7577
|
this.elementRef.nativeElement.classList.add("" + ((_a = this.toolbarItem) === null || _a === void 0 ? void 0 : _a.key));
|
|
7446
7578
|
}
|
|
7447
7579
|
};
|
|
7448
|
-
TheToolbarDropdownComponent.prototype.statusChange = function (editor) {
|
|
7449
|
-
var _a, _b;
|
|
7450
|
-
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;
|
|
7451
|
-
var activeItem = this.menus.find(function (i) {
|
|
7452
|
-
if (i === null || i === void 0 ? void 0 : i.active) {
|
|
7453
|
-
return i === null || i === void 0 ? void 0 : i.active(editor);
|
|
7454
|
-
}
|
|
7455
|
-
});
|
|
7456
|
-
this.activeMenu = activeItem ? activeItem : this.item;
|
|
7457
|
-
};
|
|
7458
7580
|
TheToolbarDropdownComponent.prototype.itemMousedown = function (event, item) {
|
|
7459
7581
|
_super.prototype.execute.call(this, event);
|
|
7460
7582
|
this.closeDropdownPopover();
|
|
7583
|
+
if (!this.toolbarItem.dropdownFixedIcon) {
|
|
7584
|
+
this.activeMenuItem = item;
|
|
7585
|
+
}
|
|
7461
7586
|
if (this.itemMousedownHandle) {
|
|
7462
7587
|
this.itemMousedownHandle(item);
|
|
7463
7588
|
return;
|
|
@@ -7506,9 +7631,9 @@
|
|
|
7506
7631
|
.withPositions([bottomPosition, topPosition]);
|
|
7507
7632
|
};
|
|
7508
7633
|
return TheToolbarDropdownComponent;
|
|
7509
|
-
}(
|
|
7634
|
+
}(TheBaseToolbarDropdown));
|
|
7510
7635
|
TheToolbarDropdownComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheToolbarDropdownComponent, deps: [{ token: i0__namespace.ElementRef }, { token: i1__namespace$1.ThyPopover }, { token: i0__namespace.ViewContainerRef }, { token: i2__namespace.Overlay }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
7511
|
-
TheToolbarDropdownComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheToolbarDropdownComponent, selector: "the-toolbar-dropdown", inputs: {
|
|
7636
|
+
TheToolbarDropdownComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheToolbarDropdownComponent, selector: "the-toolbar-dropdown", inputs: { 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]=\"activeMenuItem?.name\" thyTooltipPlacement=\"top\">\n <thy-icon [thyIconName]=\"activeMenuItem?.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]=\"activeMenuItem?.name\" thyTooltipPlacement=\"top\">\n <span class=\"show-text\">{{ activeMenuItem?.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 === activeMenuItem.key && !toolbarItem.dropdownFixedIcon\"\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$1.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i3__namespace.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { type: i2__namespace$1.ThyActionMenuComponent, selector: "thy-action-menu", inputs: ["thyTheme", "thyWidth"] }, { type: i2__namespace$1.ThyActionMenuDividerComponent, selector: "thy-action-menu-divider", inputs: ["thyTitle", "thyType"] }], directives: [{ type: i10__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: i10__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i10__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2__namespace$1.ThyActionMenuItemDirective, selector: "[thyActionMenuItem]", inputs: ["thyDisabled", "thyType"] }, { type: i2__namespace$1.ThyActionMenuItemActiveDirective, selector: "[thyActionMenuItemActive]", inputs: ["thyActionMenuItemActive"] }, { type: i10__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i2__namespace$1.ThyActionMenuItemIconDirective, selector: "[thyActionMenuItemIcon]" }, { type: i2__namespace$1.ThyActionMenuItemNameDirective, selector: "[thyActionMenuItemName]" }] });
|
|
7512
7637
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheToolbarDropdownComponent, decorators: [{
|
|
7513
7638
|
type: i0.Component,
|
|
7514
7639
|
args: [{
|
|
@@ -7518,15 +7643,7 @@
|
|
|
7518
7643
|
class: 'the-toolbar-dropdown-container'
|
|
7519
7644
|
}
|
|
7520
7645
|
}]
|
|
7521
|
-
}], ctorParameters: function () { return [{ type: i0__namespace.ElementRef }, { type: i1__namespace$1.ThyPopover }, { type: i0__namespace.ViewContainerRef }, { type: i2__namespace.Overlay }]; }, propDecorators: {
|
|
7522
|
-
type: i0.Input
|
|
7523
|
-
}], menus: [{
|
|
7524
|
-
type: i0.Input
|
|
7525
|
-
}], mode: [{
|
|
7526
|
-
type: i0.Input
|
|
7527
|
-
}], item: [{
|
|
7528
|
-
type: i0.Input
|
|
7529
|
-
}], itemMousedownHandle: [{
|
|
7646
|
+
}], ctorParameters: function () { return [{ type: i0__namespace.ElementRef }, { type: i1__namespace$1.ThyPopover }, { type: i0__namespace.ViewContainerRef }, { type: i2__namespace.Overlay }]; }, propDecorators: { itemMousedownHandle: [{
|
|
7530
7647
|
type: i0.Input
|
|
7531
7648
|
}], iconModeTemplate: [{
|
|
7532
7649
|
type: i0.ViewChild,
|
|
@@ -7543,9 +7660,6 @@
|
|
|
7543
7660
|
}], handleDocumentMouseDown: [{
|
|
7544
7661
|
type: i0.HostListener,
|
|
7545
7662
|
args: ['document: mousedown', ['$event']]
|
|
7546
|
-
}], disabledState: [{
|
|
7547
|
-
type: i0.HostBinding,
|
|
7548
|
-
args: ['class.disabled']
|
|
7549
7663
|
}] } });
|
|
7550
7664
|
|
|
7551
7665
|
var TheCodeComponent = /** @class */ (function (_super) {
|
|
@@ -7579,7 +7693,7 @@
|
|
|
7579
7693
|
};
|
|
7580
7694
|
_this.actives = _this.menus[0];
|
|
7581
7695
|
_this.resizeBounds = null;
|
|
7582
|
-
_this.
|
|
7696
|
+
_this.onChangeLanguage = function (item) {
|
|
7583
7697
|
_this.options = Object.assign(Object.assign({}, _this.options), { mode: item.key });
|
|
7584
7698
|
_this.actives = item;
|
|
7585
7699
|
CodeEditor.setCodeAttribute(_this.editor, _this.element, { language: item.key });
|
|
@@ -7762,7 +7876,7 @@
|
|
|
7762
7876
|
return TheCodeComponent;
|
|
7763
7877
|
}(TheBaseElementComponent));
|
|
7764
7878
|
TheCodeComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", 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_MODE_TOKEN }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
7765
|
-
TheCodeComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", 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=\"isCollapsed && codemirror && !options.readOnly\">\n <thy-icon-nav>\n <the-toolbar-dropdown [menus]=\"menus\" [
|
|
7879
|
+
TheCodeComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", 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=\"isCollapsed && codemirror && !options.readOnly\">\n <thy-icon-nav>\n <the-toolbar-dropdown [menus]=\"menus\" [toolbarItem]=\"actives\" [itemMousedownHandle]=\"onChangeLanguage\"> </the-toolbar-dropdown>\n <span class=\"auto-wrap d-flex align-items-center\">\n <span>\u81EA\u52A8\u6362\u884C</span>\n <thy-switch\n class=\"auto-wrap-btn d-flex\"\n [(ngModel)]=\"options.lineWrapping\"\n (ngModelChange)=\"onChangeWrap($event)\"\n thySize=\"sm\"\n ></thy-switch>\n </span>\n <a\n href=\"javascript:;\"\n thyIconNavLink\n thyIconNavLinkIcon=\"copy\"\n thyTooltip=\"\u590D\u5236\"\n thyTooltipPlacement=\"top\"\n (mousedown)=\"onCopy($event)\"\n ></a>\n <nav-split-line [mode]=\"ToolbarItemMode.vertical\"></nav-split-line>\n <a\n href=\"javascript:;\"\n thyIconNavLink\n thyIconNavLinkIcon=\"trash\"\n thyTooltip=\"\u5220\u9664\"\n class=\"remove-link\"\n thyTooltipPlacement=\"top\"\n (mousedown)=\"onDelete($event)\"\n ></a>\n </thy-icon-nav>\n</div>\n\n<slate-children [children]=\"children\" [context]=\"childrenContext\" [viewContext]=\"viewContext\"></slate-children>\n\n<!-- \u53EA\u8BFB\u6A21\u5F0F\u4E0BCodeMirror-sizer\u9AD8\u5EA6\u6BD4\u7F16\u8F91\u6A21\u5F0F\u4E0B\u591A2px\uFF0C\u8BBE\u7F6EthyMinHeight\u4E3A46px\u9632\u6B62\u62D6\u62FD\u5230\u6700\u5C0F\u9AD8\u5EA6\u65F6\u53EA\u8BFB\u6A21\u5F0F\u4E0B\u51FA\u73B0\u6EDA\u52A8\u6761 -->\n<div\n thyResizable\n [thyMinHeight]=\"46\"\n [thyBounds]=\"resizeBounds\"\n [style.height.px]=\"resizeHeight\"\n (thyResize)=\"onResize($event)\"\n (thyResizeEnd)=\"onEndResize()\"\n class=\"resize-code-container\"\n [ngClass]=\"{ focus: isCollapsed, readonly: options.readOnly, active: isHightLight && isCollapsed }\"\n>\n <ng-codemirror\n *ngIf=\"startRenderCodemirror\"\n #codemirror\n contenteditable=\"false\"\n class=\"ng-codemirror-wrapper\"\n [ngStyle]=\"{ maxHeight: maxHeight > 0 ? maxHeight + 'px' : 'auto' }\"\n [options]=\"options\"\n [ngModel]=\"code\"\n [delayRefreshTime]=\"300\"\n (ngModelChange)=\"codeChange($event)\"\n (focusChange)=\"focusChange($event)\"\n [autoMaxHeight]=\"maxHeight\"\n >\n </ng-codemirror>\n <thy-resize-handle thyDirection=\"bottom\" class=\"code-resize-icon\" *ngIf=\"isCollapsed && !options.readOnly\"></thy-resize-handle>\n</div>\n", components: [{ type: i3__namespace$1.ThyIconNavComponent, selector: "thy-icon-nav", inputs: ["thyType"] }, { type: TheToolbarDropdownComponent, selector: "the-toolbar-dropdown", inputs: ["itemMousedownHandle"] }, { type: i5__namespace$2.ThySwitchComponent, selector: "thy-switch", inputs: ["thyType", "thySize", "thyDisabled"], outputs: ["thyChange"] }, { type: i3__namespace$1.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: NavSplitLineComponent, selector: "nav-split-line", inputs: ["mode"] }, { 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: i10__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4__namespace.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i5__namespace$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { type: i9__namespace.ThyResizableDirective, selector: "[thyResizable]", inputs: ["thyBounds", "thyMaxHeight", "thyMaxWidth", "thyMinHeight", "thyMinWidth", "thyGridColumnCount", "thyMaxColumn", "thyMinColumn", "thyLockAspectRatio", "thyPreview", "thyDisabled"], outputs: ["thyResize", "thyResizeEnd", "thyResizeStart"] }, { type: i10__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i10__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
7766
7880
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheCodeComponent, decorators: [{
|
|
7767
7881
|
type: i0.Component,
|
|
7768
7882
|
args: [{
|
|
@@ -8014,7 +8128,7 @@
|
|
|
8014
8128
|
return TheLinkEditComponent;
|
|
8015
8129
|
}());
|
|
8016
8130
|
TheLinkEditComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheLinkEditComponent, deps: [{ token: i1__namespace$1.ThyPopoverRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
8017
|
-
TheLinkEditComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheLinkEditComponent, selector: "the-link-edit", inputs: { tag: "tag", node: "node", link: "link", text: "text", originSelection: "originSelection" }, host: { listeners: { "document: mousedown": "handleDocumentMouseDown($event)" }, properties: { "class": "this.className" } }, ngImport: i0__namespace, 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__namespace$2.ThyFormGroupComponent, selector: "thy-form-group", inputs: ["thyLabelText", "thyLabelTextTranslateKey", "thyLabelRequired", "thyLabelPaddingTopClear", "thyFeedbackIcon", "thyTipsMode", "thyTips", "thyTipsTranslateKey", "thyRowFill"] }, { type: i2__namespace$2.ThyFormGroupFooterComponent, selector: "thy-form-group-footer", inputs: ["thyAlign"] }, { type: i1__namespace$5.ThyButtonComponent, selector: "thy-button,[thy-button],[thyButton]", inputs: ["thyButton", "thyType", "thyLoading", "thyLoadingText", "thySize", "thyIcon", "thySquare", "thyBlock"] }], directives: [{ type: i4__namespace
|
|
8131
|
+
TheLinkEditComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheLinkEditComponent, selector: "the-link-edit", inputs: { tag: "tag", node: "node", link: "link", text: "text", originSelection: "originSelection" }, host: { listeners: { "document: mousedown": "handleDocumentMouseDown($event)" }, properties: { "class": "this.className" } }, ngImport: i0__namespace, 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__namespace$2.ThyFormGroupComponent, selector: "thy-form-group", inputs: ["thyLabelText", "thyLabelTextTranslateKey", "thyLabelRequired", "thyLabelPaddingTopClear", "thyFeedbackIcon", "thyTipsMode", "thyTips", "thyTipsTranslateKey", "thyRowFill"] }, { type: i2__namespace$2.ThyFormGroupFooterComponent, selector: "thy-form-group-footer", inputs: ["thyAlign"] }, { type: i1__namespace$5.ThyButtonComponent, selector: "thy-button,[thy-button],[thyButton]", inputs: ["thyButton", "thyType", "thyLoading", "thyLoadingText", "thySize", "thyIcon", "thySquare", "thyBlock"] }], directives: [{ type: i4__namespace.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i4__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i4__namespace.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i2__namespace$2.ThyFormDirective, selector: "[thyForm],[thy-form]", inputs: ["thyLayout", "thyEnterKeyMode", "thyFormValidatorConfig"], exportAs: ["thyForm"] }, { type: i5__namespace$3.ThyAutofocusDirective, selector: "input[thyAutofocus],textarea[thyAutofocus]", inputs: ["thyAutoSelect", "thyAutofocus"] }, { type: i4__namespace.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__namespace.ThyInputDirective, selector: "[thyInput]", inputs: ["thySize", "thyAutocomplete"] }, { type: i4__namespace.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i4__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4__namespace.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i2__namespace$2.ThyFormSubmitDirective, selector: "[thyFormSubmit],[thy-form-submit]", outputs: ["thyFormSubmit"] }] });
|
|
8018
8132
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheLinkEditComponent, decorators: [{
|
|
8019
8133
|
type: i0.Component,
|
|
8020
8134
|
args: [{
|
|
@@ -8250,7 +8364,10 @@
|
|
|
8250
8364
|
execute: function (editor) { return LinkEditor.insertLink(editor); },
|
|
8251
8365
|
active: function (editor) { return LinkEditor.isLinkActive(editor); }
|
|
8252
8366
|
}
|
|
8253
|
-
]
|
|
8367
|
+
],
|
|
8368
|
+
options: {
|
|
8369
|
+
disabledOperateTypes: [exports.ElementKinds.image, exports.ElementKinds.code]
|
|
8370
|
+
}
|
|
8254
8371
|
});
|
|
8255
8372
|
|
|
8256
8373
|
/**
|
|
@@ -9128,7 +9245,7 @@
|
|
|
9128
9245
|
return TheTableOptionsComponent;
|
|
9129
9246
|
}());
|
|
9130
9247
|
TheTableOptionsComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheTableOptionsComponent, deps: [{ token: i1__namespace$6.ThyPopoverRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
9131
|
-
TheTableOptionsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheTableOptionsComponent, selector: "the-table-options", inputs: { tableStore: "tableStore", editor: "editor" }, host: { listeners: { "document: mousedown": "handleDocumentMouseDown($event)" } }, ngImport: i0__namespace, template: "\n <thy-action-menu class=\"table-drop-menu\">\n <ng-container *ngFor=\"let option of tableDropdownList\">\n <a thyActionMenuItem href=\"javascript:;\" (mousedown)=\"setTableOptions($event, option)\">\n <span thyActionMenuItemName>{{ option.name }}</span>\n <span thyActionMenuItemExtendIcon class=\"text-primary\" *ngIf=\"option.isActive\">\n <thy-icon thyIconName=\"check\"></thy-icon>\n </span>\n </a>\n </ng-container>\n </thy-action-menu>\n ", isInline: true, components: [{ type: i2__namespace$1.ThyActionMenuComponent, selector: "thy-action-menu", inputs: ["thyTheme", "thyWidth"] }, { type:
|
|
9248
|
+
TheTableOptionsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheTableOptionsComponent, selector: "the-table-options", inputs: { tableStore: "tableStore", editor: "editor" }, host: { listeners: { "document: mousedown": "handleDocumentMouseDown($event)" } }, ngImport: i0__namespace, template: "\n <thy-action-menu class=\"table-drop-menu\">\n <ng-container *ngFor=\"let option of tableDropdownList\">\n <a thyActionMenuItem href=\"javascript:;\" (mousedown)=\"setTableOptions($event, option)\">\n <span thyActionMenuItemName>{{ option.name }}</span>\n <span thyActionMenuItemExtendIcon class=\"text-primary\" *ngIf=\"option.isActive\">\n <thy-icon thyIconName=\"check\"></thy-icon>\n </span>\n </a>\n </ng-container>\n </thy-action-menu>\n ", isInline: true, components: [{ type: i2__namespace$1.ThyActionMenuComponent, selector: "thy-action-menu", inputs: ["thyTheme", "thyWidth"] }, { type: i3__namespace.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }], directives: [{ type: i10__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2__namespace$1.ThyActionMenuItemDirective, selector: "[thyActionMenuItem]", inputs: ["thyDisabled", "thyType"] }, { type: i2__namespace$1.ThyActionMenuItemNameDirective, selector: "[thyActionMenuItemName]" }, { type: i10__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2__namespace$1.ThyActionMenuItemExtendIconDirective, selector: "[thyActionMenuItemExtendIcon]" }] });
|
|
9132
9249
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheTableOptionsComponent, decorators: [{
|
|
9133
9250
|
type: i0.Component,
|
|
9134
9251
|
args: [{
|
|
@@ -9282,7 +9399,7 @@
|
|
|
9282
9399
|
return TheTableToolbarComponent;
|
|
9283
9400
|
}());
|
|
9284
9401
|
TheTableToolbarComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheTableToolbarComponent, deps: [{ token: i0__namespace.NgZone }, { token: TheColorSelectService }, { token: i1__namespace$1.ThyPopover }, { token: i1__namespace$1.ThyPopoverRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
9285
|
-
TheTableToolbarComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheTableToolbarComponent, selector: "the-table-toolbar", inputs: { tableStore: "tableStore", isActiveSelect: "isActiveSelect" }, ngImport: i0__namespace, 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=\"tableStore.isSelectedTable\"></nav-split-line>\n <button\n thyButton=\"default\"\n *ngIf=\"tableStore.isSelectedTable\"\n class=\"mr-2\"\n thySize=\"md\"\n class=\"table-options\"\n (mousedown)=\"openTableOptionMenu($event)\"\n >\n <span>\u8868\u683C\u9009\u9879</span>\n <thy-icon thyIconName=\"caret-down\"></thy-icon>\n </button>\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__namespace.ThyIconNavComponent, selector: "thy-icon-nav", inputs: ["thyType"] }, { type: i3__namespace.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type:
|
|
9402
|
+
TheTableToolbarComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheTableToolbarComponent, selector: "the-table-toolbar", inputs: { tableStore: "tableStore", isActiveSelect: "isActiveSelect" }, ngImport: i0__namespace, 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=\"tableStore.isSelectedTable\"></nav-split-line>\n <button\n thyButton=\"default\"\n *ngIf=\"tableStore.isSelectedTable\"\n class=\"mr-2\"\n thySize=\"md\"\n class=\"table-options\"\n (mousedown)=\"openTableOptionMenu($event)\"\n >\n <span>\u8868\u683C\u9009\u9879</span>\n <thy-icon thyIconName=\"caret-down\"></thy-icon>\n </button>\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__namespace$1.ThyIconNavComponent, selector: "thy-icon-nav", inputs: ["thyType"] }, { type: i3__namespace$1.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i3__namespace.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { type: NavSplitLineComponent, selector: "nav-split-line", inputs: ["mode"] }, { type: i1__namespace$5.ThyButtonComponent, selector: "thy-button,[thy-button],[thyButton]", inputs: ["thyButton", "thyType", "thyLoading", "thyLoadingText", "thySize", "thyIcon", "thySquare", "thyBlock"] }], directives: [{ type: i10__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i10__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"] }] });
|
|
9286
9403
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheTableToolbarComponent, decorators: [{
|
|
9287
9404
|
type: i0.Component,
|
|
9288
9405
|
args: [{
|
|
@@ -9346,7 +9463,7 @@
|
|
|
9346
9463
|
return TheContextMenuComponent;
|
|
9347
9464
|
}());
|
|
9348
9465
|
TheContextMenuComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheContextMenuComponent, deps: [{ token: i0__namespace.ElementRef }, { token: i1__namespace$1.ThyPopoverRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
9349
|
-
TheContextMenuComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", 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__namespace, 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: i2__namespace$1.ThyActionMenuComponent, selector: "thy-action-menu", inputs: ["thyTheme", "thyWidth"] }, { type:
|
|
9466
|
+
TheContextMenuComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", 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__namespace, 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: i2__namespace$1.ThyActionMenuComponent, selector: "thy-action-menu", inputs: ["thyTheme", "thyWidth"] }, { type: i3__namespace.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { type: i2__namespace$1.ThyActionMenuDividerComponent, selector: "thy-action-menu-divider", inputs: ["thyTitle", "thyType"] }], directives: [{ type: i10__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i10__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2__namespace$1.ThyActionMenuItemDirective, selector: "[thyActionMenuItem]", inputs: ["thyDisabled", "thyType"] }, { type: i2__namespace$1.ThyActionMenuItemIconDirective, selector: "[thyActionMenuItemIcon]" }, { type: i2__namespace$1.ThyActionMenuItemNameDirective, selector: "[thyActionMenuItemName]" }, { type: i2__namespace$1.ThyActionMenuItemExtendIconDirective, selector: "[thyActionMenuItemExtendIcon]" }] });
|
|
9350
9467
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheContextMenuComponent, decorators: [{
|
|
9351
9468
|
type: i0.Component,
|
|
9352
9469
|
args: [{
|
|
@@ -10127,6 +10244,9 @@
|
|
|
10127
10244
|
image.onload = function () {
|
|
10128
10245
|
resolve(true);
|
|
10129
10246
|
};
|
|
10247
|
+
image.onerror = function () {
|
|
10248
|
+
resolve(true);
|
|
10249
|
+
};
|
|
10130
10250
|
image.src = item.getAttribute('src');
|
|
10131
10251
|
});
|
|
10132
10252
|
imageResolves_1.push(imageLoad);
|
|
@@ -11609,7 +11729,6 @@
|
|
|
11609
11729
|
var _this = _super.call(this) || this;
|
|
11610
11730
|
_this.thyPopover = thyPopover;
|
|
11611
11731
|
_this.overlay = overlay;
|
|
11612
|
-
_this.active = false;
|
|
11613
11732
|
return _this;
|
|
11614
11733
|
}
|
|
11615
11734
|
Object.defineProperty(TheTableToolbarItemComponent.prototype, "isOpenTableSelect", {
|
|
@@ -11619,17 +11738,12 @@
|
|
|
11619
11738
|
enumerable: false,
|
|
11620
11739
|
configurable: true
|
|
11621
11740
|
});
|
|
11622
|
-
TheTableToolbarItemComponent.prototype.statusChange = function (editor) {
|
|
11623
|
-
var _a;
|
|
11624
|
-
this.active = (_a = this.item) === null || _a === void 0 ? void 0 : _a.active(editor);
|
|
11625
|
-
};
|
|
11626
11741
|
TheTableToolbarItemComponent.prototype.execute = function (event) {
|
|
11627
11742
|
var _a;
|
|
11628
11743
|
_super.prototype.execute.call(this, event);
|
|
11629
11744
|
if ((_a = this.editor) === null || _a === void 0 ? void 0 : _a.disabled) {
|
|
11630
11745
|
return;
|
|
11631
11746
|
}
|
|
11632
|
-
var type = this.item.key;
|
|
11633
11747
|
this.toggleTableSelect(event);
|
|
11634
11748
|
};
|
|
11635
11749
|
TheTableToolbarItemComponent.prototype.toggleTableSelect = function (event, optionsParam) {
|
|
@@ -11654,23 +11768,19 @@
|
|
|
11654
11768
|
return this.tableSelectRef;
|
|
11655
11769
|
};
|
|
11656
11770
|
return TheTableToolbarItemComponent;
|
|
11657
|
-
}(
|
|
11771
|
+
}(TheBaseToolbarItem));
|
|
11658
11772
|
TheTableToolbarItemComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheTableToolbarItemComponent, deps: [{ token: i1__namespace$6.ThyPopover }, { token: i2__namespace.Overlay }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
11659
|
-
TheTableToolbarItemComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheTableToolbarItemComponent, selector: "the-table-toolbar-item",
|
|
11773
|
+
TheTableToolbarItemComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheTableToolbarItemComponent, selector: "the-table-toolbar-item", host: { classAttribute: "the-toolbar-dropdown-container" }, usesInheritance: true, ngImport: i0__namespace, template: "\n <a\n thyIconNavLink\n class=\"link-with-down\"\n [thyTooltip]=\"toolbarItem?.name\"\n thyTooltipPlacement=\"top\"\n [thyIconNavLinkActive]=\"active\"\n (mousedown)=\"execute($event)\"\n >\n <thy-icon [thyIconName]=\"toolbarItem.icon\"></thy-icon>\n <thy-icon class=\"link-down-icon font-size-sm text-desc table-down-icon\" thyIconName=\"caret-down\"> </thy-icon>\n </a>\n ", isInline: true, components: [{ type: i3__namespace$1.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i3__namespace.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }], directives: [{ type: i5__namespace$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }] });
|
|
11660
11774
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheTableToolbarItemComponent, decorators: [{
|
|
11661
11775
|
type: i0.Component,
|
|
11662
11776
|
args: [{
|
|
11663
11777
|
selector: 'the-table-toolbar-item',
|
|
11664
|
-
template: "\n <a\n thyIconNavLink\n class=\"link-with-down\"\n [thyTooltip]=\"
|
|
11778
|
+
template: "\n <a\n thyIconNavLink\n class=\"link-with-down\"\n [thyTooltip]=\"toolbarItem?.name\"\n thyTooltipPlacement=\"top\"\n [thyIconNavLinkActive]=\"active\"\n (mousedown)=\"execute($event)\"\n >\n <thy-icon [thyIconName]=\"toolbarItem.icon\"></thy-icon>\n <thy-icon class=\"link-down-icon font-size-sm text-desc table-down-icon\" thyIconName=\"caret-down\"> </thy-icon>\n </a>\n ",
|
|
11665
11779
|
host: {
|
|
11666
11780
|
class: 'the-toolbar-dropdown-container'
|
|
11667
11781
|
}
|
|
11668
11782
|
}]
|
|
11669
|
-
}], ctorParameters: function () { return [{ type: i1__namespace$6.ThyPopover }, { type: i2__namespace.Overlay }]; }
|
|
11670
|
-
type: i0.Input
|
|
11671
|
-
}], editor: [{
|
|
11672
|
-
type: i0.Input
|
|
11673
|
-
}] } });
|
|
11783
|
+
}], ctorParameters: function () { return [{ type: i1__namespace$6.ThyPopover }, { type: i2__namespace.Overlay }]; } });
|
|
11674
11784
|
|
|
11675
11785
|
var _a;
|
|
11676
11786
|
var withTable = function (editor) {
|
|
@@ -12128,7 +12238,7 @@
|
|
|
12128
12238
|
return;
|
|
12129
12239
|
}
|
|
12130
12240
|
// 过滤 text 节点的 color/background-color 属性
|
|
12131
|
-
fragment.forEach(function (node) { return
|
|
12241
|
+
fragment.forEach(function (node) { return filterTextFormat(node); });
|
|
12132
12242
|
slate.Transforms.insertFragment(editor, fragment);
|
|
12133
12243
|
return;
|
|
12134
12244
|
}
|
|
@@ -12149,67 +12259,49 @@
|
|
|
12149
12259
|
_this.cfr = cfr;
|
|
12150
12260
|
_this.itemMode = exports.ToolbarItemMode.horizontal;
|
|
12151
12261
|
_this.ToolbarItemMode = exports.ToolbarItemMode;
|
|
12152
|
-
_this.active = false;
|
|
12153
|
-
_this.disabled = false;
|
|
12154
12262
|
return _this;
|
|
12155
12263
|
}
|
|
12156
12264
|
TheToolbarItemComponent.prototype.toggleDropdown = function (event) {
|
|
12157
12265
|
_super.prototype.execute.call(this, event);
|
|
12158
12266
|
};
|
|
12159
|
-
Object.defineProperty(TheToolbarItemComponent.prototype, "disabledState", {
|
|
12160
|
-
get: function () {
|
|
12161
|
-
return this.disabled;
|
|
12162
|
-
},
|
|
12163
|
-
enumerable: false,
|
|
12164
|
-
configurable: true
|
|
12165
|
-
});
|
|
12166
12267
|
TheToolbarItemComponent.prototype.ngOnInit = function () {
|
|
12167
12268
|
var _a, _b;
|
|
12168
|
-
if (((_a = this.
|
|
12269
|
+
if (((_a = this.toolbarItem) === null || _a === void 0 ? void 0 : _a.quickItemComponent) && i1.isComponentType((_b = this.toolbarItem) === null || _b === void 0 ? void 0 : _b.quickItemComponent)) {
|
|
12169
12270
|
this.renderToolbarItem();
|
|
12170
12271
|
}
|
|
12171
12272
|
};
|
|
12172
|
-
TheToolbarItemComponent.prototype.statusChange = function (editor) {
|
|
12173
|
-
var _a, _b, _c, _d;
|
|
12174
|
-
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;
|
|
12175
|
-
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;
|
|
12176
|
-
};
|
|
12177
12273
|
TheToolbarItemComponent.prototype.execute = function (event) {
|
|
12178
12274
|
var _a, _b, _c;
|
|
12179
12275
|
_super.prototype.execute.call(this, event);
|
|
12180
|
-
if (((_a = this.editor) === null || _a === void 0 ? void 0 : _a.disabled) || this.disabled || !((_b = this.
|
|
12276
|
+
if (((_a = this.editor) === null || _a === void 0 ? void 0 : _a.disabled) || this.disabled || !((_b = this.toolbarItem) === null || _b === void 0 ? void 0 : _b.execute)) {
|
|
12181
12277
|
return;
|
|
12182
12278
|
}
|
|
12183
|
-
(_c = this.
|
|
12279
|
+
(_c = this.toolbarItem) === null || _c === void 0 ? void 0 : _c.execute(this.editor);
|
|
12184
12280
|
};
|
|
12185
12281
|
TheToolbarItemComponent.prototype.renderToolbarItem = function () {
|
|
12186
12282
|
var _this = this;
|
|
12187
12283
|
this.ngZone.run(function () {
|
|
12188
|
-
var toolbarItemFactory = _this.cfr.resolveComponentFactory(_this.
|
|
12189
|
-
var
|
|
12190
|
-
|
|
12191
|
-
|
|
12192
|
-
|
|
12284
|
+
var toolbarItemFactory = _this.cfr.resolveComponentFactory(_this.toolbarItem.quickItemComponent);
|
|
12285
|
+
var toolbarItemRef = _this.toolbarContainer.createComponent(toolbarItemFactory);
|
|
12286
|
+
toolbarItemRef.instance.editor = _this.editor;
|
|
12287
|
+
toolbarItemRef.instance.item = _this.toolbarItem;
|
|
12288
|
+
toolbarItemRef.instance.itemMode = exports.ToolbarItemMode.vertical;
|
|
12193
12289
|
});
|
|
12194
12290
|
};
|
|
12195
12291
|
return TheToolbarItemComponent;
|
|
12196
|
-
}(
|
|
12292
|
+
}(TheBaseToolbarItem));
|
|
12197
12293
|
TheToolbarItemComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheToolbarItemComponent, deps: [{ token: i0__namespace.NgZone }, { token: i0__namespace.ComponentFactoryResolver }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
12198
|
-
TheToolbarItemComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheToolbarItemComponent, selector: "the-toolbar-item", inputs: {
|
|
12294
|
+
TheToolbarItemComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheToolbarItemComponent, selector: "the-toolbar-item", inputs: { itemMode: "itemMode" }, host: { listeners: { "mousedown": "toggleDropdown($event)" }, 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]=\"toolbarItem.icon\"\n [thyTooltip]=\"tooltip\"\n [thyTooltipTemplateContext]=\"{ name: toolbarItem.name, shortcutKey: toolbarItem.shortcutKey }\"\n thyTooltipPlacement=\"top\"\n [thyIconNavLinkActive]=\"active\"\n (mousedown)=\"execute($event)\"\n ></a>\n </ng-container>\n <ng-template #selectionItem>\n <ng-container *ngIf=\"!toolbarItem?.quickItemComponent\">\n <thy-icon [thyIconName]=\"toolbarItem?.icon\" [thyIconRotate]=\"0\" class=\"quick-toolbar-icon\"></thy-icon>\n <span class=\"quick-toolbar-name\">{{ toolbarItem?.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$1.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i3__namespace.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }], directives: [{ type: i10__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"] }] });
|
|
12199
12295
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheToolbarItemComponent, decorators: [{
|
|
12200
12296
|
type: i0.Component,
|
|
12201
12297
|
args: [{
|
|
12202
12298
|
selector: 'the-toolbar-item',
|
|
12203
|
-
template: "\n <ng-container *ngIf=\"itemMode === ToolbarItemMode.horizontal; else selectionItem\">\n <a\n thyIconNavLink\n [thyIconNavLinkIcon]=\"
|
|
12299
|
+
template: "\n <ng-container *ngIf=\"itemMode === ToolbarItemMode.horizontal; else selectionItem\">\n <a\n thyIconNavLink\n [thyIconNavLinkIcon]=\"toolbarItem.icon\"\n [thyTooltip]=\"tooltip\"\n [thyTooltipTemplateContext]=\"{ name: toolbarItem.name, shortcutKey: toolbarItem.shortcutKey }\"\n thyTooltipPlacement=\"top\"\n [thyIconNavLinkActive]=\"active\"\n (mousedown)=\"execute($event)\"\n ></a>\n </ng-container>\n <ng-template #selectionItem>\n <ng-container *ngIf=\"!toolbarItem?.quickItemComponent\">\n <thy-icon [thyIconName]=\"toolbarItem?.icon\" [thyIconRotate]=\"0\" class=\"quick-toolbar-icon\"></thy-icon>\n <span class=\"quick-toolbar-name\">{{ toolbarItem?.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 ",
|
|
12204
12300
|
host: {
|
|
12205
12301
|
class: 'the-toolbar-item'
|
|
12206
12302
|
}
|
|
12207
12303
|
}]
|
|
12208
|
-
}], ctorParameters: function () { return [{ type: i0__namespace.NgZone }, { type: i0__namespace.ComponentFactoryResolver }]; }, propDecorators: {
|
|
12209
|
-
type: i0.Input
|
|
12210
|
-
}], item: [{
|
|
12211
|
-
type: i0.Input
|
|
12212
|
-
}], itemMode: [{
|
|
12304
|
+
}], ctorParameters: function () { return [{ type: i0__namespace.NgZone }, { type: i0__namespace.ComponentFactoryResolver }]; }, propDecorators: { itemMode: [{
|
|
12213
12305
|
type: i0.Input
|
|
12214
12306
|
}], toolbarContainer: [{
|
|
12215
12307
|
type: i0.ViewChild,
|
|
@@ -12217,9 +12309,6 @@
|
|
|
12217
12309
|
}], toggleDropdown: [{
|
|
12218
12310
|
type: i0.HostListener,
|
|
12219
12311
|
args: ['mousedown', ['$event']]
|
|
12220
|
-
}], disabledState: [{
|
|
12221
|
-
type: i0.HostBinding,
|
|
12222
|
-
args: ['class.disabled']
|
|
12223
12312
|
}] } });
|
|
12224
12313
|
|
|
12225
12314
|
var TheQuickToolbarComponent = /** @class */ (function (_super) {
|
|
@@ -12273,7 +12362,7 @@
|
|
|
12273
12362
|
return TheQuickToolbarComponent;
|
|
12274
12363
|
}(core.mixinUnsubscribe(core.MixinBase)));
|
|
12275
12364
|
TheQuickToolbarComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheQuickToolbarComponent, deps: [{ token: i0__namespace.ElementRef }, { token: i0__namespace.ChangeDetectorRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
12276
|
-
TheQuickToolbarComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheQuickToolbarComponent, selector: "the-quick-toolbar", inputs: { editor: "editor", quickToolbarItems: "quickToolbarItems" }, host: { listeners: { "document: mousedown": "handleMouseDown($event)", "document: keydown.enter": "handleEnter()", "document: keydown.escape": "handleEsc()" } }, usesInheritance: true, ngImport: i0__namespace, 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\" [
|
|
12365
|
+
TheQuickToolbarComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheQuickToolbarComponent, selector: "the-quick-toolbar", inputs: { editor: "editor", quickToolbarItems: "quickToolbarItems" }, host: { listeners: { "document: mousedown": "handleMouseDown($event)", "document: keydown.enter": "handleEnter()", "document: keydown.escape": "handleEsc()" } }, usesInheritance: true, ngImport: i0__namespace, 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\" [toolbarItem]=\"item\" [itemMode]=\"ToolbarItemMode.vertical\"></the-toolbar-item>\n </thy-list-option>\n </ng-container>\n </ng-container>\n</thy-selection-list>\n\n<ng-template #splitLine>\n <nav-split-line [mode]=\"ToolbarItemMode.horizontal\"></nav-split-line>\n</ng-template>\n", components: [{ type: i1__namespace$7.ThySelectionListComponent, selector: "thy-selection-list,[thy-selection-list]", inputs: ["thyMultiple", "thyBindKeyEventContainer", "thyScrollContainer", "thyBeforeKeydown", "thyUniqueKey", "thyCompareWith", "thyLayout", "thyAutoActiveFirstItem", "thySize", "thySpaceKeyEnabled"], outputs: ["thySelectionChange"] }, { type: i5__namespace$3.ThyListOptionComponent, selector: "thy-list-option,[thy-list-option]", inputs: ["id", "thyValue", "thyDisabled"] }, { type: TheToolbarItemComponent, selector: "the-toolbar-item", inputs: ["itemMode"] }, { type: NavSplitLineComponent, selector: "nav-split-line", inputs: ["mode"] }], directives: [{ type: i10__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i10__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
12277
12366
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheQuickToolbarComponent, decorators: [{
|
|
12278
12367
|
type: i0.Component,
|
|
12279
12368
|
args: [{
|
|
@@ -12513,123 +12602,11 @@
|
|
|
12513
12602
|
execute: function (editor) { return InlineCodeEditor.toggleInlineCode(editor); },
|
|
12514
12603
|
active: function (editor) { return InlineCodeEditor.isInlineCodeActive(editor); }
|
|
12515
12604
|
}
|
|
12516
|
-
]
|
|
12517
|
-
|
|
12518
|
-
|
|
12519
|
-
var TheIndentToolbarComponent = /** @class */ (function (_super) {
|
|
12520
|
-
__extends(TheIndentToolbarComponent, _super);
|
|
12521
|
-
function TheIndentToolbarComponent(elementRef, thyPopover, viewContainerRef, overlay) {
|
|
12522
|
-
var _this = _super.call(this) || this;
|
|
12523
|
-
_this.elementRef = elementRef;
|
|
12524
|
-
_this.thyPopover = thyPopover;
|
|
12525
|
-
_this.viewContainerRef = viewContainerRef;
|
|
12526
|
-
_this.overlay = overlay;
|
|
12527
|
-
_this.mode = exports.DropdownMode.text;
|
|
12528
|
-
_this.dropdownMode = exports.DropdownMode;
|
|
12529
|
-
_this.disabled = false;
|
|
12530
|
-
return _this;
|
|
12605
|
+
],
|
|
12606
|
+
options: {
|
|
12607
|
+
disabledOperateTypes: [exports.ElementKinds.image, exports.ElementKinds.code]
|
|
12531
12608
|
}
|
|
12532
|
-
|
|
12533
|
-
get: function () {
|
|
12534
|
-
return this.dropdownPopoverRef && this.dropdownPopoverRef.getOverlayRef() && this.dropdownPopoverRef.getOverlayRef().hasAttached();
|
|
12535
|
-
},
|
|
12536
|
-
enumerable: false,
|
|
12537
|
-
configurable: true
|
|
12538
|
-
});
|
|
12539
|
-
TheIndentToolbarComponent.prototype.toggleDropdown = function (event) {
|
|
12540
|
-
var _a;
|
|
12541
|
-
_super.prototype.execute.call(this, event);
|
|
12542
|
-
if (((_a = this.editor) === null || _a === void 0 ? void 0 : _a.disabled) || this.disabled) {
|
|
12543
|
-
return;
|
|
12544
|
-
}
|
|
12545
|
-
this.openDropdownPopover();
|
|
12546
|
-
};
|
|
12547
|
-
TheIndentToolbarComponent.prototype.handleDocumentMouseDown = function (event) {
|
|
12548
|
-
if (!this.elementRef.nativeElement.contains(event.target)) {
|
|
12549
|
-
this.closeDropdownPopover();
|
|
12550
|
-
}
|
|
12551
|
-
};
|
|
12552
|
-
Object.defineProperty(TheIndentToolbarComponent.prototype, "disabledState", {
|
|
12553
|
-
get: function () {
|
|
12554
|
-
return this.disabled;
|
|
12555
|
-
},
|
|
12556
|
-
enumerable: false,
|
|
12557
|
-
configurable: true
|
|
12558
|
-
});
|
|
12559
|
-
TheIndentToolbarComponent.prototype.ngOnInit = function () {
|
|
12560
|
-
var _a;
|
|
12561
|
-
if (!this.activeMenu) {
|
|
12562
|
-
this.activeMenu = this.menus[0];
|
|
12563
|
-
}
|
|
12564
|
-
if (this.toolbarItem) {
|
|
12565
|
-
this.elementRef.nativeElement.classList.add("" + ((_a = this.toolbarItem) === null || _a === void 0 ? void 0 : _a.key));
|
|
12566
|
-
}
|
|
12567
|
-
};
|
|
12568
|
-
TheIndentToolbarComponent.prototype.statusChange = function (editor) {
|
|
12569
|
-
var _a, _b;
|
|
12570
|
-
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;
|
|
12571
|
-
};
|
|
12572
|
-
TheIndentToolbarComponent.prototype.itemMousedown = function (event, item) {
|
|
12573
|
-
_super.prototype.execute.call(this, event);
|
|
12574
|
-
this.closeDropdownPopover();
|
|
12575
|
-
if (item === null || item === void 0 ? void 0 : item.execute) {
|
|
12576
|
-
item === null || item === void 0 ? void 0 : item.execute(this.editor);
|
|
12577
|
-
}
|
|
12578
|
-
};
|
|
12579
|
-
TheIndentToolbarComponent.prototype.openDropdownPopover = function () {
|
|
12580
|
-
var _a;
|
|
12581
|
-
this.dropdownPopoverRef = this.thyPopover.open(this.dropdownTemplate, {
|
|
12582
|
-
origin: this.elementRef,
|
|
12583
|
-
panelClass: ['the-toolbar-dropdown-popover', (_a = this.toolbarItem) === null || _a === void 0 ? void 0 : _a.key],
|
|
12584
|
-
placement: 'bottomLeft',
|
|
12585
|
-
insideClosable: false,
|
|
12586
|
-
backdropClosable: true,
|
|
12587
|
-
hasBackdrop: false,
|
|
12588
|
-
offset: 10,
|
|
12589
|
-
viewContainerRef: this.viewContainerRef,
|
|
12590
|
-
scrollStrategy: this.overlay.scrollStrategies.reposition()
|
|
12591
|
-
});
|
|
12592
|
-
};
|
|
12593
|
-
TheIndentToolbarComponent.prototype.closeDropdownPopover = function () {
|
|
12594
|
-
var _a;
|
|
12595
|
-
if (this.dropdownPopoverRef) {
|
|
12596
|
-
(_a = this.dropdownPopoverRef) === null || _a === void 0 ? void 0 : _a.close();
|
|
12597
|
-
}
|
|
12598
|
-
};
|
|
12599
|
-
return TheIndentToolbarComponent;
|
|
12600
|
-
}(TheToolbarBaseItemComponent));
|
|
12601
|
-
TheIndentToolbarComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheIndentToolbarComponent, deps: [{ token: i0__namespace.ElementRef }, { token: i1__namespace$1.ThyPopover }, { token: i0__namespace.ViewContainerRef }, { token: i2__namespace.Overlay }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
12602
|
-
TheIndentToolbarComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheIndentToolbarComponent, selector: "the-indent-toolbar-item", inputs: { toolbarItem: "toolbarItem", menus: "menus", mode: "mode", item: "item" }, host: { listeners: { "mousedown": "toggleDropdown($event)", "document: mousedown": "handleDocumentMouseDown($event)" }, properties: { "class.disabled": "this.disabledState" }, classAttribute: "the-toolbar-dropdown-container" }, viewQueries: [{ propertyName: "dropdownTemplate", first: true, predicate: ["dropdownTemplate"], descendants: true, static: true }], usesInheritance: true, ngImport: i0__namespace, template: "<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\n<ng-template #dropdownTemplate>\n <thy-action-menu class=\"dropdown-menu\">\n <ng-container *ngFor=\"let menu of menus\">\n <a\n thyActionMenuItem\n href=\"javascript:;\"\n [thyTooltip]=\"tooltip\"\n [thyTooltipTemplateContext]=\"{ name: menu.name, shortcutKey: menu.shortcutKey }\"\n thyTooltipPlacement=\"right\"\n (mousedown)=\"itemMousedown($event, menu)\"\n >\n <span 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\n<ng-template #tooltip let-data>{{ data?.shortcutKey }}</ng-template>\n", components: [{ type: i3__namespace.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i4__namespace.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { type: i2__namespace$1.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: i10__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2__namespace$1.ThyActionMenuItemDirective, selector: "[thyActionMenuItem]", inputs: ["thyDisabled", "thyType"] }, { type: i2__namespace$1.ThyActionMenuItemIconDirective, selector: "[thyActionMenuItemIcon]" }, { type: i2__namespace$1.ThyActionMenuItemNameDirective, selector: "[thyActionMenuItemName]" }] });
|
|
12603
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheIndentToolbarComponent, decorators: [{
|
|
12604
|
-
type: i0.Component,
|
|
12605
|
-
args: [{
|
|
12606
|
-
selector: 'the-indent-toolbar-item',
|
|
12607
|
-
templateUrl: './toolbar-item.component.html',
|
|
12608
|
-
host: {
|
|
12609
|
-
class: 'the-toolbar-dropdown-container'
|
|
12610
|
-
}
|
|
12611
|
-
}]
|
|
12612
|
-
}], ctorParameters: function () { return [{ type: i0__namespace.ElementRef }, { type: i1__namespace$1.ThyPopover }, { type: i0__namespace.ViewContainerRef }, { type: i2__namespace.Overlay }]; }, propDecorators: { toolbarItem: [{
|
|
12613
|
-
type: i0.Input
|
|
12614
|
-
}], menus: [{
|
|
12615
|
-
type: i0.Input
|
|
12616
|
-
}], mode: [{
|
|
12617
|
-
type: i0.Input
|
|
12618
|
-
}], item: [{
|
|
12619
|
-
type: i0.Input
|
|
12620
|
-
}], dropdownTemplate: [{
|
|
12621
|
-
type: i0.ViewChild,
|
|
12622
|
-
args: ['dropdownTemplate', { static: true }]
|
|
12623
|
-
}], toggleDropdown: [{
|
|
12624
|
-
type: i0.HostListener,
|
|
12625
|
-
args: ['mousedown', ['$event']]
|
|
12626
|
-
}], handleDocumentMouseDown: [{
|
|
12627
|
-
type: i0.HostListener,
|
|
12628
|
-
args: ['document: mousedown', ['$event']]
|
|
12629
|
-
}], disabledState: [{
|
|
12630
|
-
type: i0.HostBinding,
|
|
12631
|
-
args: ['class.disabled']
|
|
12632
|
-
}] } });
|
|
12609
|
+
});
|
|
12633
12610
|
|
|
12634
12611
|
var IndentEditor = {
|
|
12635
12612
|
getAllowedTypes: function (editor) {
|
|
@@ -12698,14 +12675,6 @@
|
|
|
12698
12675
|
return true;
|
|
12699
12676
|
}
|
|
12700
12677
|
return false;
|
|
12701
|
-
},
|
|
12702
|
-
isDisabled: function (editor) {
|
|
12703
|
-
if (editor.selection) {
|
|
12704
|
-
var allowedTypes = IndentEditor.getAllowedTypes(editor);
|
|
12705
|
-
var anchorBlock$1 = anchorBlock(editor);
|
|
12706
|
-
return anchorBlock$1 && !allowedTypes.includes(anchorBlock$1 === null || anchorBlock$1 === void 0 ? void 0 : anchorBlock$1.type);
|
|
12707
|
-
}
|
|
12708
|
-
return false;
|
|
12709
12678
|
}
|
|
12710
12679
|
};
|
|
12711
12680
|
|
|
@@ -12779,8 +12748,10 @@
|
|
|
12779
12748
|
{
|
|
12780
12749
|
key: exports.ElementKinds.indent,
|
|
12781
12750
|
includes: [exports.Indents.indentRight, exports.Indents.indentLeft],
|
|
12782
|
-
|
|
12783
|
-
|
|
12751
|
+
type: exports.ToolbarItemType.dropdown,
|
|
12752
|
+
dropdownMode: exports.DropdownMode.icon,
|
|
12753
|
+
dropdownItemKey: exports.Indents.indentRight,
|
|
12754
|
+
dropdownFixedIcon: true
|
|
12784
12755
|
},
|
|
12785
12756
|
{
|
|
12786
12757
|
key: exports.Indents.indentRight,
|
|
@@ -12794,7 +12765,6 @@
|
|
|
12794
12765
|
name: '减少缩进',
|
|
12795
12766
|
icon: 'float-right',
|
|
12796
12767
|
shortcutKey: 'Shift+Tab/BackSpace',
|
|
12797
|
-
type: exports.ToolbarItemType.toolDropdown,
|
|
12798
12768
|
execute: function (editor) { return IndentEditor.cancelIndent(editor); }
|
|
12799
12769
|
}
|
|
12800
12770
|
],
|
|
@@ -12806,7 +12776,8 @@
|
|
|
12806
12776
|
exports.ElementKinds.bulletedList,
|
|
12807
12777
|
exports.ElementKinds.paragraph
|
|
12808
12778
|
], __read(HEADING_TYPES)),
|
|
12809
|
-
disableIndentTypes: [exports.ElementKinds.bulletedList, exports.ElementKinds.numberedList, exports.ElementKinds.checkItem]
|
|
12779
|
+
disableIndentTypes: [exports.ElementKinds.bulletedList, exports.ElementKinds.numberedList, exports.ElementKinds.checkItem],
|
|
12780
|
+
disabledOperateTypes: [exports.ElementKinds.image, exports.ElementKinds.code]
|
|
12810
12781
|
}
|
|
12811
12782
|
});
|
|
12812
12783
|
|
|
@@ -12872,14 +12843,6 @@
|
|
|
12872
12843
|
}
|
|
12873
12844
|
}
|
|
12874
12845
|
return false;
|
|
12875
|
-
},
|
|
12876
|
-
isDisabled: function (editor) {
|
|
12877
|
-
if (editor.selection) {
|
|
12878
|
-
var disableGroup = HEADING_TYPES;
|
|
12879
|
-
var anchorBlock$1 = anchorBlock(editor);
|
|
12880
|
-
return anchorBlock$1 && disableGroup.includes(anchorBlock$1 === null || anchorBlock$1 === void 0 ? void 0 : anchorBlock$1.type);
|
|
12881
|
-
}
|
|
12882
|
-
return false;
|
|
12883
12846
|
}
|
|
12884
12847
|
};
|
|
12885
12848
|
var sizeOptions = function () {
|
|
@@ -12898,12 +12861,14 @@
|
|
|
12898
12861
|
{
|
|
12899
12862
|
key: exports.MarkTypes.fontSize,
|
|
12900
12863
|
name: '字号',
|
|
12901
|
-
type: exports.ToolbarItemType.
|
|
12864
|
+
type: exports.ToolbarItemType.dropdown,
|
|
12902
12865
|
dropdownItemKey: exports.FontSizes.fontSize14,
|
|
12903
|
-
includes: FontSizeTypes
|
|
12904
|
-
disable: function (editor) { return FontSizeEditor.isDisabled(editor); }
|
|
12866
|
+
includes: FontSizeTypes
|
|
12905
12867
|
}
|
|
12906
|
-
], __read(sizeOptions()))
|
|
12868
|
+
], __read(sizeOptions())),
|
|
12869
|
+
options: {
|
|
12870
|
+
disabledOperateTypes: __spreadArray(__spreadArray([], __read(HEADING_TYPES)), [exports.ElementKinds.image, exports.ElementKinds.code])
|
|
12871
|
+
}
|
|
12907
12872
|
});
|
|
12908
12873
|
|
|
12909
12874
|
var TheVerticalToolbarItemComponent = /** @class */ (function (_super) {
|
|
@@ -12914,7 +12879,6 @@
|
|
|
12914
12879
|
_this.thyPopover = thyPopover;
|
|
12915
12880
|
_this.viewContainerRef = viewContainerRef;
|
|
12916
12881
|
_this.isHide = true;
|
|
12917
|
-
_this.active = false;
|
|
12918
12882
|
return _this;
|
|
12919
12883
|
}
|
|
12920
12884
|
Object.defineProperty(TheVerticalToolbarItemComponent.prototype, "isOpened", {
|
|
@@ -12930,11 +12894,6 @@
|
|
|
12930
12894
|
}
|
|
12931
12895
|
};
|
|
12932
12896
|
TheVerticalToolbarItemComponent.prototype.ngOnInit = function () { };
|
|
12933
|
-
TheVerticalToolbarItemComponent.prototype.statusChange = function (editor) {
|
|
12934
|
-
var _a, _b;
|
|
12935
|
-
this.active = ((_a = this.toolbarItem) === null || _a === void 0 ? void 0 : _a.active) ? (_b = this.toolbarItem) === null || _b === void 0 ? void 0 : _b.active(editor) : false;
|
|
12936
|
-
this.activeMenu = this.menusActive(editor);
|
|
12937
|
-
};
|
|
12938
12897
|
TheVerticalToolbarItemComponent.prototype.menusActive = function (editor) {
|
|
12939
12898
|
var _this = this;
|
|
12940
12899
|
return this.menus.find(function (i) {
|
|
@@ -12979,9 +12938,9 @@
|
|
|
12979
12938
|
}
|
|
12980
12939
|
};
|
|
12981
12940
|
return TheVerticalToolbarItemComponent;
|
|
12982
|
-
}(
|
|
12941
|
+
}(TheBaseToolbarDropdown));
|
|
12983
12942
|
TheVerticalToolbarItemComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheVerticalToolbarItemComponent, deps: [{ token: i0__namespace.ElementRef }, { token: i1__namespace$6.ThyPopover }, { token: i0__namespace.ViewContainerRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
12984
|
-
TheVerticalToolbarItemComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheVerticalToolbarItemComponent, selector: "the-toolbar-vertical-align-item",
|
|
12943
|
+
TheVerticalToolbarItemComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheVerticalToolbarItemComponent, selector: "the-toolbar-vertical-align-item", 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: i0.TemplateRef, static: true }], usesInheritance: true, ngImport: i0__namespace, 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]=\"activeMenuItem?.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 === activeMenuItem?.key\"\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__namespace$1.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i3__namespace.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { type: i2__namespace$1.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: i10__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2__namespace$1.ThyActionMenuItemDirective, selector: "[thyActionMenuItem]", inputs: ["thyDisabled", "thyType"] }, { type: i2__namespace$1.ThyActionMenuItemActiveDirective, selector: "[thyActionMenuItemActive]", inputs: ["thyActionMenuItemActive"] }, { type: i10__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2__namespace$1.ThyActionMenuItemIconDirective, selector: "[thyActionMenuItemIcon]" }, { type: i2__namespace$1.ThyActionMenuItemNameDirective, selector: "[thyActionMenuItemName]" }] });
|
|
12985
12944
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheVerticalToolbarItemComponent, decorators: [{
|
|
12986
12945
|
type: i0.Component,
|
|
12987
12946
|
args: [{
|
|
@@ -12992,15 +12951,7 @@
|
|
|
12992
12951
|
'[class.hide]': '!active'
|
|
12993
12952
|
}
|
|
12994
12953
|
}]
|
|
12995
|
-
}], ctorParameters: function () { return [{ type: i0__namespace.ElementRef }, { type: i1__namespace$6.ThyPopover }, { type: i0__namespace.ViewContainerRef }]; }, propDecorators: {
|
|
12996
|
-
type: i0.Input
|
|
12997
|
-
}], menus: [{
|
|
12998
|
-
type: i0.Input
|
|
12999
|
-
}], editor: [{
|
|
13000
|
-
type: i0.Input
|
|
13001
|
-
}], toolbarItem: [{
|
|
13002
|
-
type: i0.Input
|
|
13003
|
-
}], template: [{
|
|
12954
|
+
}], ctorParameters: function () { return [{ type: i0__namespace.ElementRef }, { type: i1__namespace$6.ThyPopover }, { type: i0__namespace.ViewContainerRef }]; }, propDecorators: { template: [{
|
|
13004
12955
|
type: i0.ViewChild,
|
|
13005
12956
|
args: ['VerticalAlignItems', { read: i0.TemplateRef, static: true }]
|
|
13006
12957
|
}], handleDocumentMouseDown: [{
|
|
@@ -13028,7 +12979,7 @@
|
|
|
13028
12979
|
{
|
|
13029
12980
|
key: exports.ToolbarActionTypes.verticalAlign,
|
|
13030
12981
|
name: '垂直对齐',
|
|
13031
|
-
type: exports.ToolbarItemType.
|
|
12982
|
+
type: exports.ToolbarItemType.dropdown,
|
|
13032
12983
|
dropdownMode: exports.DropdownMode.icon,
|
|
13033
12984
|
iconComponent: TheVerticalToolbarItemComponent,
|
|
13034
12985
|
includes: [exports.ToolbarActionTypes.verticalAlignTop, exports.ToolbarActionTypes.verticalAlignMiddle, exports.ToolbarActionTypes.verticalAlignBottom],
|
|
@@ -13236,7 +13187,6 @@
|
|
|
13236
13187
|
function TheColorToolbarItemComponent(thyPopover) {
|
|
13237
13188
|
var _this = _super.call(this) || this;
|
|
13238
13189
|
_this.thyPopover = thyPopover;
|
|
13239
|
-
_this.active = false;
|
|
13240
13190
|
return _this;
|
|
13241
13191
|
}
|
|
13242
13192
|
Object.defineProperty(TheColorToolbarItemComponent.prototype, "isOpenColorSelect", {
|
|
@@ -13246,17 +13196,13 @@
|
|
|
13246
13196
|
enumerable: false,
|
|
13247
13197
|
configurable: true
|
|
13248
13198
|
});
|
|
13249
|
-
TheColorToolbarItemComponent.prototype.statusChange = function (editor) {
|
|
13250
|
-
var _a;
|
|
13251
|
-
this.active = (_a = this.item) === null || _a === void 0 ? void 0 : _a.active(editor);
|
|
13252
|
-
};
|
|
13253
13199
|
TheColorToolbarItemComponent.prototype.execute = function (event) {
|
|
13254
13200
|
var _a;
|
|
13255
13201
|
_super.prototype.execute.call(this, event);
|
|
13256
|
-
if ((_a = this.editor) === null || _a === void 0 ? void 0 : _a.disabled) {
|
|
13202
|
+
if (((_a = this.editor) === null || _a === void 0 ? void 0 : _a.disabled) || this.disabled) {
|
|
13257
13203
|
return;
|
|
13258
13204
|
}
|
|
13259
|
-
var type = this.
|
|
13205
|
+
var type = this.toolbarItem.key;
|
|
13260
13206
|
this.toggleColorSelect(event, type);
|
|
13261
13207
|
};
|
|
13262
13208
|
TheColorToolbarItemComponent.prototype.toggleColorSelect = function (event, type) {
|
|
@@ -13296,23 +13242,19 @@
|
|
|
13296
13242
|
}
|
|
13297
13243
|
};
|
|
13298
13244
|
return TheColorToolbarItemComponent;
|
|
13299
|
-
}(
|
|
13245
|
+
}(TheBaseToolbarItem));
|
|
13300
13246
|
TheColorToolbarItemComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheColorToolbarItemComponent, deps: [{ token: i1__namespace$1.ThyPopover }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
13301
|
-
TheColorToolbarItemComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheColorToolbarItemComponent, selector: "the-color-toolbar-item",
|
|
13247
|
+
TheColorToolbarItemComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheColorToolbarItemComponent, selector: "the-color-toolbar-item", host: { classAttribute: "the-toolbar-item" }, usesInheritance: true, ngImport: i0__namespace, template: "\n <a\n class=\"link-width-down\"\n thyIconNavLink\n [ngStyle]=\"{\n width: toolbarItem.key === 'color' ? '42px' : 'auto'\n }\"\n [thyTooltip]=\"toolbarItem.name\"\n [thyIconNavLinkActive]=\"active\"\n thyTooltipPlacement=\"top\"\n (mousedown)=\"execute($event)\"\n >\n <thy-icon [thyIconName]=\"toolbarItem.icon\" thyIconType=\"twotone\" [thyTwotoneColor]=\"active\"></thy-icon>\n <thy-icon\n [ngClass]=\"{\n 'link-down-icon': true,\n 'font-size-sm': true,\n 'text-desc': true\n }\"\n thyIconName=\"caret-down\"\n ></thy-icon>\n </a>\n ", isInline: true, components: [{ type: i3__namespace$1.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i3__namespace.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }], directives: [{ type: i10__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i5__namespace$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { type: i10__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
13302
13248
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheColorToolbarItemComponent, decorators: [{
|
|
13303
13249
|
type: i0.Component,
|
|
13304
13250
|
args: [{
|
|
13305
13251
|
selector: 'the-color-toolbar-item',
|
|
13306
|
-
template: "\n <a\n class=\"link-width-down\"\n thyIconNavLink\n [ngStyle]=\"{\n width:
|
|
13252
|
+
template: "\n <a\n class=\"link-width-down\"\n thyIconNavLink\n [ngStyle]=\"{\n width: toolbarItem.key === 'color' ? '42px' : 'auto'\n }\"\n [thyTooltip]=\"toolbarItem.name\"\n [thyIconNavLinkActive]=\"active\"\n thyTooltipPlacement=\"top\"\n (mousedown)=\"execute($event)\"\n >\n <thy-icon [thyIconName]=\"toolbarItem.icon\" thyIconType=\"twotone\" [thyTwotoneColor]=\"active\"></thy-icon>\n <thy-icon\n [ngClass]=\"{\n 'link-down-icon': true,\n 'font-size-sm': true,\n 'text-desc': true\n }\"\n thyIconName=\"caret-down\"\n ></thy-icon>\n </a>\n ",
|
|
13307
13253
|
host: {
|
|
13308
13254
|
class: 'the-toolbar-item'
|
|
13309
13255
|
}
|
|
13310
13256
|
}]
|
|
13311
|
-
}], ctorParameters: function () { return [{ type: i1__namespace$1.ThyPopover }]; }
|
|
13312
|
-
type: i0.Input
|
|
13313
|
-
}], editor: [{
|
|
13314
|
-
type: i0.Input
|
|
13315
|
-
}] } });
|
|
13257
|
+
}], ctorParameters: function () { return [{ type: i1__namespace$1.ThyPopover }]; } });
|
|
13316
13258
|
|
|
13317
13259
|
var createColorPlugin = createPluginFactory({
|
|
13318
13260
|
key: exports.PluginKeys.color,
|
|
@@ -13331,10 +13273,13 @@
|
|
|
13331
13273
|
iconComponent: TheColorToolbarItemComponent,
|
|
13332
13274
|
active: function (editor) { return ColorEditor.getActiveColor(editor, exports.MarkTypes.backgroundColor); }
|
|
13333
13275
|
}
|
|
13334
|
-
]
|
|
13276
|
+
],
|
|
13277
|
+
options: {
|
|
13278
|
+
disabledOperateTypes: [exports.ElementKinds.image, exports.ElementKinds.code]
|
|
13279
|
+
}
|
|
13335
13280
|
});
|
|
13336
13281
|
|
|
13337
|
-
var internalPlugins = [
|
|
13282
|
+
var internalPlugins = function () { return [
|
|
13338
13283
|
createTheHistoryPlugin(),
|
|
13339
13284
|
createAutoInsertDataPlugin(),
|
|
13340
13285
|
createRemoveEmptyPlugin(),
|
|
@@ -13369,7 +13314,7 @@
|
|
|
13369
13314
|
createDeserializeMdPlugin(),
|
|
13370
13315
|
createQuickInsertPlugin(),
|
|
13371
13316
|
createInlineCodePlugin()
|
|
13372
|
-
];
|
|
13317
|
+
]; };
|
|
13373
13318
|
|
|
13374
13319
|
var HOTKEYS = {
|
|
13375
13320
|
'mod+b': exports.MarkTypes.bold,
|
|
@@ -13413,7 +13358,7 @@
|
|
|
13413
13358
|
TheToolbarComponent.prototype.ngOnInit = function () {
|
|
13414
13359
|
this.setToolbarClass();
|
|
13415
13360
|
this.renderToolbarView();
|
|
13416
|
-
this.
|
|
13361
|
+
this.selectionChange(this.editor);
|
|
13417
13362
|
if (this.isMore) {
|
|
13418
13363
|
this.resizeElement();
|
|
13419
13364
|
}
|
|
@@ -13430,9 +13375,9 @@
|
|
|
13430
13375
|
}
|
|
13431
13376
|
};
|
|
13432
13377
|
TheToolbarComponent.prototype.setToolbarClass = function () {
|
|
13433
|
-
var
|
|
13378
|
+
var _a;
|
|
13434
13379
|
if (this.editor && !!this.containerClass.length) {
|
|
13435
|
-
(
|
|
13380
|
+
(_a = this.elementRef.nativeElement.classList).add.apply(_a, __spreadArray([], __read(this.containerClass)));
|
|
13436
13381
|
}
|
|
13437
13382
|
};
|
|
13438
13383
|
TheToolbarComponent.prototype.resizeElement = function () {
|
|
@@ -13440,7 +13385,7 @@
|
|
|
13440
13385
|
var editableElement = this.elementRef.nativeElement;
|
|
13441
13386
|
// @ts-ignore
|
|
13442
13387
|
this.resizeObserver = new ResizeObserver(function (entries) {
|
|
13443
|
-
var e_1,
|
|
13388
|
+
var e_1, _a;
|
|
13444
13389
|
try {
|
|
13445
13390
|
for (var entries_1 = __values(entries), entries_1_1 = entries_1.next(); !entries_1_1.done; entries_1_1 = entries_1.next()) {
|
|
13446
13391
|
var entry = entries_1_1.value;
|
|
@@ -13454,23 +13399,23 @@
|
|
|
13454
13399
|
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
13455
13400
|
finally {
|
|
13456
13401
|
try {
|
|
13457
|
-
if (entries_1_1 && !entries_1_1.done && (
|
|
13402
|
+
if (entries_1_1 && !entries_1_1.done && (_a = entries_1.return)) _a.call(entries_1);
|
|
13458
13403
|
}
|
|
13459
13404
|
finally { if (e_1) throw e_1.error; }
|
|
13460
13405
|
}
|
|
13461
13406
|
});
|
|
13462
13407
|
this.resizeObserver.observe(editableElement);
|
|
13463
13408
|
};
|
|
13464
|
-
TheToolbarComponent.prototype.
|
|
13465
|
-
var e_2,
|
|
13409
|
+
TheToolbarComponent.prototype.selectionChange = function (editor) {
|
|
13410
|
+
var e_2, _a;
|
|
13466
13411
|
var toolbarItems = __spreadArray(__spreadArray([], __read(this.toolbarItems)), [this.moreGroupMenu]);
|
|
13467
13412
|
try {
|
|
13468
13413
|
for (var toolbarItems_1 = __values(toolbarItems), toolbarItems_1_1 = toolbarItems_1.next(); !toolbarItems_1_1.done; toolbarItems_1_1 = toolbarItems_1.next()) {
|
|
13469
13414
|
var item = toolbarItems_1_1.value;
|
|
13470
13415
|
if (item.key !== exports.ToolbarActionTypes.split) {
|
|
13471
13416
|
var itemComponent = this.components.get(item.key);
|
|
13472
|
-
if (itemComponent) {
|
|
13473
|
-
itemComponent.instance.
|
|
13417
|
+
if (itemComponent && itemComponent.instance.selectionChange) {
|
|
13418
|
+
itemComponent.instance.selectionChange(editor);
|
|
13474
13419
|
}
|
|
13475
13420
|
}
|
|
13476
13421
|
}
|
|
@@ -13478,7 +13423,7 @@
|
|
|
13478
13423
|
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
13479
13424
|
finally {
|
|
13480
13425
|
try {
|
|
13481
|
-
if (toolbarItems_1_1 && !toolbarItems_1_1.done && (
|
|
13426
|
+
if (toolbarItems_1_1 && !toolbarItems_1_1.done && (_a = toolbarItems_1.return)) _a.call(toolbarItems_1);
|
|
13482
13427
|
}
|
|
13483
13428
|
finally { if (e_2) throw e_2.error; }
|
|
13484
13429
|
}
|
|
@@ -13490,7 +13435,7 @@
|
|
|
13490
13435
|
var toolbarItems = this.toolbarItemsCompose();
|
|
13491
13436
|
var items = toolbarItems.items, group = toolbarItems.group;
|
|
13492
13437
|
this.ngZone.run(function () {
|
|
13493
|
-
var e_3,
|
|
13438
|
+
var e_3, _a;
|
|
13494
13439
|
try {
|
|
13495
13440
|
for (var items_1 = __values(items), items_1_1 = items_1.next(); !items_1_1.done; items_1_1 = items_1.next()) {
|
|
13496
13441
|
var item = items_1_1.value;
|
|
@@ -13504,7 +13449,7 @@
|
|
|
13504
13449
|
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
13505
13450
|
finally {
|
|
13506
13451
|
try {
|
|
13507
|
-
if (items_1_1 && !items_1_1.done && (
|
|
13452
|
+
if (items_1_1 && !items_1_1.done && (_a = items_1.return)) _a.call(items_1);
|
|
13508
13453
|
}
|
|
13509
13454
|
finally { if (e_3) throw e_3.error; }
|
|
13510
13455
|
}
|
|
@@ -13528,7 +13473,7 @@
|
|
|
13528
13473
|
* set aside 50px
|
|
13529
13474
|
*/
|
|
13530
13475
|
TheToolbarComponent.prototype.toolbarItemsCompose = function () {
|
|
13531
|
-
var e_4,
|
|
13476
|
+
var e_4, _a;
|
|
13532
13477
|
var elementWidth = this.isMore ? this.elementWidth : null;
|
|
13533
13478
|
var maxItemWidth = 50;
|
|
13534
13479
|
var defaultItemWidth = 35;
|
|
@@ -13538,8 +13483,8 @@
|
|
|
13538
13483
|
var items = [];
|
|
13539
13484
|
var group = [];
|
|
13540
13485
|
try {
|
|
13541
|
-
for (var
|
|
13542
|
-
var item =
|
|
13486
|
+
for (var _b = __values(this.toolbarItems), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
13487
|
+
var item = _c.value;
|
|
13543
13488
|
if (!this.isMore) {
|
|
13544
13489
|
items.push(item);
|
|
13545
13490
|
continue;
|
|
@@ -13561,14 +13506,14 @@
|
|
|
13561
13506
|
elementWidth -= headingWidth;
|
|
13562
13507
|
continue;
|
|
13563
13508
|
}
|
|
13564
|
-
var isCustomComponent = (item === null || item === void 0 ? void 0 : item.type) === exports.ToolbarItemType.
|
|
13509
|
+
var isCustomComponent = (item === null || item === void 0 ? void 0 : item.type) === exports.ToolbarItemType.dropdown || !!(item === null || item === void 0 ? void 0 : item.iconComponent);
|
|
13565
13510
|
elementWidth -= isCustomComponent ? maxItemWidth : defaultItemWidth;
|
|
13566
13511
|
}
|
|
13567
13512
|
}
|
|
13568
13513
|
catch (e_4_1) { e_4 = { error: e_4_1 }; }
|
|
13569
13514
|
finally {
|
|
13570
13515
|
try {
|
|
13571
|
-
if (
|
|
13516
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
13572
13517
|
}
|
|
13573
13518
|
finally { if (e_4) throw e_4.error; }
|
|
13574
13519
|
}
|
|
@@ -13581,12 +13526,12 @@
|
|
|
13581
13526
|
* externally designated more group
|
|
13582
13527
|
*/
|
|
13583
13528
|
TheToolbarComponent.prototype.toolbarItemsAndMoreCompose = function () {
|
|
13584
|
-
var e_5,
|
|
13529
|
+
var e_5, _a;
|
|
13585
13530
|
var items = [];
|
|
13586
13531
|
var group = [];
|
|
13587
13532
|
try {
|
|
13588
|
-
for (var
|
|
13589
|
-
var item =
|
|
13533
|
+
for (var _b = __values(this.toolbarItems), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
13534
|
+
var item = _c.value;
|
|
13590
13535
|
if (item.key === exports.ToolbarActionTypes.split) {
|
|
13591
13536
|
items.push(item);
|
|
13592
13537
|
continue;
|
|
@@ -13597,7 +13542,7 @@
|
|
|
13597
13542
|
catch (e_5_1) { e_5 = { error: e_5_1 }; }
|
|
13598
13543
|
finally {
|
|
13599
13544
|
try {
|
|
13600
|
-
if (
|
|
13545
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
13601
13546
|
}
|
|
13602
13547
|
finally { if (e_5) throw e_5.error; }
|
|
13603
13548
|
}
|
|
@@ -13626,15 +13571,17 @@
|
|
|
13626
13571
|
TheToolbarComponent.prototype.createToolbarItem = function (item) {
|
|
13627
13572
|
var iconComponent = item.iconComponent, type = item.type, dropdownMode = item.dropdownMode, dropdownItemKey = item.dropdownItemKey, includes = item.includes, args = __rest(item, ["iconComponent", "type", "dropdownMode", "dropdownItemKey", "includes"]);
|
|
13628
13573
|
var viewComponent = this.viewComponentType(type);
|
|
13629
|
-
var dropdownItem = this.getDropdownItem(item);
|
|
13630
13574
|
var factory = this.cfr.resolveComponentFactory(iconComponent ? iconComponent : viewComponent);
|
|
13631
13575
|
var compRef = this.toolbarContainer.createComponent(factory);
|
|
13632
13576
|
compRef.instance.editor = this.editor;
|
|
13633
13577
|
compRef.instance.toolbarItem = item;
|
|
13634
|
-
compRef.instance.menus = includes;
|
|
13635
|
-
compRef.instance.item = includes && dropdownItem ? dropdownItem : args;
|
|
13636
|
-
compRef.instance.mode = dropdownMode;
|
|
13637
13578
|
this.components.set(item.key, compRef);
|
|
13579
|
+
if (item.type === exports.ToolbarItemType.dropdown) {
|
|
13580
|
+
var dropdownRef = compRef;
|
|
13581
|
+
dropdownRef.instance.dropdownItemKey = item.dropdownItemKey;
|
|
13582
|
+
dropdownRef.instance.menus = includes;
|
|
13583
|
+
dropdownRef.instance.mode = dropdownMode;
|
|
13584
|
+
}
|
|
13638
13585
|
};
|
|
13639
13586
|
TheToolbarComponent.prototype.createToolbarSplit = function () {
|
|
13640
13587
|
var navSplitLineFactory = this.cfr.resolveComponentFactory(NavSplitLineComponent);
|
|
@@ -13654,26 +13601,15 @@
|
|
|
13654
13601
|
if (type === exports.ToolbarItemType.default) {
|
|
13655
13602
|
return TheToolbarItemComponent;
|
|
13656
13603
|
}
|
|
13657
|
-
if (type === exports.ToolbarItemType.
|
|
13604
|
+
if (type === exports.ToolbarItemType.dropdown) {
|
|
13658
13605
|
return TheToolbarDropdownComponent;
|
|
13659
13606
|
}
|
|
13660
13607
|
return TheToolbarItemComponent;
|
|
13661
13608
|
};
|
|
13662
|
-
TheToolbarComponent.prototype.getDropdownItem = function (item) {
|
|
13663
|
-
var _a, _b, _c;
|
|
13664
|
-
var dropdownKey = item === null || item === void 0 ? void 0 : item.dropdownItemKey;
|
|
13665
|
-
// modify the fontsize option externally
|
|
13666
|
-
var contextService = (_b = (_a = this.editor) === null || _a === void 0 ? void 0 : _a.injector) === null || _b === void 0 ? void 0 : _b.get(TheContextService);
|
|
13667
|
-
var fontSize = contextService === null || contextService === void 0 ? void 0 : contextService.getDefaultFontSize();
|
|
13668
|
-
if (contextService && item.key === exports.MarkTypes.fontSize && fontSize) {
|
|
13669
|
-
dropdownKey = fontSize;
|
|
13670
|
-
}
|
|
13671
|
-
return (_c = item === null || item === void 0 ? void 0 : item.includes) === null || _c === void 0 ? void 0 : _c.find(function (item) { return item.key === dropdownKey; });
|
|
13672
|
-
};
|
|
13673
13609
|
return TheToolbarComponent;
|
|
13674
13610
|
}());
|
|
13675
13611
|
TheToolbarComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheToolbarComponent, deps: [{ token: i0__namespace.ComponentFactoryResolver }, { token: i0__namespace.ChangeDetectorRef }, { token: i0__namespace.ElementRef }, { token: i0__namespace.NgZone }, { token: TheToolbarGroupToken }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
13676
|
-
TheToolbarComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", 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: i10__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i10__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }] });
|
|
13612
|
+
TheToolbarComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", 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$1.ThyIconNavComponent, selector: "thy-icon-nav", inputs: ["thyType"] }], directives: [{ type: i10__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i10__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }] });
|
|
13677
13613
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheToolbarComponent, decorators: [{
|
|
13678
13614
|
type: i0.Component,
|
|
13679
13615
|
args: [{
|
|
@@ -13729,7 +13665,7 @@
|
|
|
13729
13665
|
.subscribe(function () {
|
|
13730
13666
|
var _a;
|
|
13731
13667
|
_this.updateInlineToolbar();
|
|
13732
|
-
(_a = _this.inlineToolbar) === null || _a === void 0 ? void 0 : _a.
|
|
13668
|
+
(_a = _this.inlineToolbar) === null || _a === void 0 ? void 0 : _a.selectionChange(_this.editor);
|
|
13733
13669
|
_this.cdr.detectChanges();
|
|
13734
13670
|
});
|
|
13735
13671
|
});
|
|
@@ -13903,7 +13839,7 @@
|
|
|
13903
13839
|
return TheQuickInsertComponent;
|
|
13904
13840
|
}());
|
|
13905
13841
|
TheQuickInsertComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheQuickInsertComponent, deps: [{ token: i0__namespace.Renderer2 }, { token: i0__namespace.ElementRef }, { token: i0__namespace.ChangeDetectorRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
13906
|
-
TheQuickInsertComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheQuickInsertComponent, selector: "[theQuickInsert]", inputs: { editor: "editor", quickToolbarItems: "quickToolbarItems", isVisible: "isVisible" }, host: { listeners: { "mousedown": "handleMousedownNativeElement($event)" }, properties: { "class.hide": "isHide" }, classAttribute: "the-quick-insert" }, viewQueries: [{ propertyName: "iconElement", first: true, predicate: ["iconElement"], descendants: true, read: i0.ElementRef }], ngImport: i0__namespace, template: "<thy-icon\n #iconElement\n [thyIconName]=\"displayIconName\"\n class=\"quick-insert-icon text-desc font-size-xlg\"\n (mouseenter)=\"mouseEnter($event)\"\n (mouseleave)=\"mouseLeave($event)\"\n (mousedown)=\"handleClick($event)\"\n></thy-icon>\n", components: [{ type:
|
|
13842
|
+
TheQuickInsertComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheQuickInsertComponent, selector: "[theQuickInsert]", inputs: { editor: "editor", quickToolbarItems: "quickToolbarItems", isVisible: "isVisible" }, host: { listeners: { "mousedown": "handleMousedownNativeElement($event)" }, properties: { "class.hide": "isHide" }, classAttribute: "the-quick-insert" }, viewQueries: [{ propertyName: "iconElement", first: true, predicate: ["iconElement"], descendants: true, read: i0.ElementRef }], ngImport: i0__namespace, template: "<thy-icon\n #iconElement\n [thyIconName]=\"displayIconName\"\n class=\"quick-insert-icon text-desc font-size-xlg\"\n (mouseenter)=\"mouseEnter($event)\"\n (mouseleave)=\"mouseLeave($event)\"\n (mousedown)=\"handleClick($event)\"\n></thy-icon>\n", components: [{ type: i3__namespace.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }] });
|
|
13907
13843
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheQuickInsertComponent, decorators: [{
|
|
13908
13844
|
type: i0.Component,
|
|
13909
13845
|
args: [{
|
|
@@ -14194,7 +14130,8 @@
|
|
|
14194
14130
|
TheEditorComponent.prototype.initialize = function () {
|
|
14195
14131
|
var _this = this;
|
|
14196
14132
|
var _a, _b;
|
|
14197
|
-
var
|
|
14133
|
+
var defaultPlugins = internalPlugins();
|
|
14134
|
+
var plugins = __spreadArray(__spreadArray([], __read(defaultPlugins)), __read(this.thePlugins));
|
|
14198
14135
|
this.editor = withTheia(slateHistory.withHistory(i1.withAngular(slate.createEditor(), CLIPBOARD_FORMAT_KEY)), plugins);
|
|
14199
14136
|
this.generateDecorate();
|
|
14200
14137
|
this.editor.disabled = (_a = this.theOptions) === null || _a === void 0 ? void 0 : _a.disabled;
|
|
@@ -14265,7 +14202,7 @@
|
|
|
14265
14202
|
TheEditorComponent.prototype.valueChange = function (value) {
|
|
14266
14203
|
var _a, _b, _c, _d, _e, _f;
|
|
14267
14204
|
var isEditable = !((_a = this.theOptions) === null || _a === void 0 ? void 0 : _a.readonly) && !((_b = this.theOptions) === null || _b === void 0 ? void 0 : _b.disabled);
|
|
14268
|
-
(_c = this.theGlobalToolbarInstance) === null || _c === void 0 ? void 0 : _c.
|
|
14205
|
+
(_c = this.theGlobalToolbarInstance) === null || _c === void 0 ? void 0 : _c.selectionChange(this.editor);
|
|
14269
14206
|
// quick insert button
|
|
14270
14207
|
if (isEditable) {
|
|
14271
14208
|
(_d = this.quickInsertInstance) === null || _d === void 0 ? void 0 : _d.checkStatus();
|
|
@@ -14401,11 +14338,11 @@
|
|
|
14401
14338
|
TheContextService,
|
|
14402
14339
|
TheColorSelectService,
|
|
14403
14340
|
{
|
|
14404
|
-
provide: i4
|
|
14341
|
+
provide: i4.NG_VALUE_ACCESSOR,
|
|
14405
14342
|
useExisting: i0.forwardRef(function () { return TheEditorComponent; }),
|
|
14406
14343
|
multi: true
|
|
14407
14344
|
}
|
|
14408
|
-
], 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 }], 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 [placeholder]=\"theOptions?.placeholder\"\n [placeholderDecorate]=\"theOptions?.placeholderDecorate ? theOptions?.placeholderDecorate : null\"\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\n *ngIf=\"!theOptions?.readonly && theOptions?.inlineToobarVisible\"\n [editor]=\"editor\"\n [toolbarItems]=\"toolbarEntity.inline\"\n ></the-inline-toolbar>\n <div\n #quickInsert\n theQuickInsert\n [editor]=\"editor\"\n [quickToolbarItems]=\"quickToolbarItems\"\n [isVisible]=\"theOptions?.quickInsertVisible\"\n ></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", "isVisible"] }, { type: TheTemplateComponent, selector: "the-template,[theTemplate]" }], directives: [{ type: i10__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i10__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i10__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i4__namespace
|
|
14345
|
+
], 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 }], 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 [placeholder]=\"theOptions?.placeholder\"\n [placeholderDecorate]=\"theOptions?.placeholderDecorate ? theOptions?.placeholderDecorate : null\"\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\n *ngIf=\"!theOptions?.readonly && theOptions?.inlineToobarVisible\"\n [editor]=\"editor\"\n [toolbarItems]=\"toolbarEntity.inline\"\n ></the-inline-toolbar>\n <div\n #quickInsert\n theQuickInsert\n [editor]=\"editor\"\n [quickToolbarItems]=\"quickToolbarItems\"\n [isVisible]=\"theOptions?.quickInsertVisible\"\n ></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", "isVisible"] }, { type: TheTemplateComponent, selector: "the-template,[theTemplate]" }], directives: [{ type: i10__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i10__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i10__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i4__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4__namespace.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
14409
14346
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheEditorComponent, decorators: [{
|
|
14410
14347
|
type: i0.Component,
|
|
14411
14348
|
args: [{
|
|
@@ -14415,7 +14352,7 @@
|
|
|
14415
14352
|
TheContextService,
|
|
14416
14353
|
TheColorSelectService,
|
|
14417
14354
|
{
|
|
14418
|
-
provide: i4
|
|
14355
|
+
provide: i4.NG_VALUE_ACCESSOR,
|
|
14419
14356
|
useExisting: i0.forwardRef(function () { return TheEditorComponent; }),
|
|
14420
14357
|
multi: true
|
|
14421
14358
|
}
|
|
@@ -14501,7 +14438,7 @@
|
|
|
14501
14438
|
},
|
|
14502
14439
|
set: function (i) {
|
|
14503
14440
|
this._item = i;
|
|
14504
|
-
this.
|
|
14441
|
+
this.activeMenuItem = i;
|
|
14505
14442
|
},
|
|
14506
14443
|
enumerable: false,
|
|
14507
14444
|
configurable: true
|
|
@@ -14536,9 +14473,9 @@
|
|
|
14536
14473
|
this.openGroup(event);
|
|
14537
14474
|
}
|
|
14538
14475
|
};
|
|
14539
|
-
TheToolbarGroupComponent.prototype.
|
|
14476
|
+
TheToolbarGroupComponent.prototype.selectionChange = function (editor) {
|
|
14540
14477
|
var activeItem = this.menusActive(editor);
|
|
14541
|
-
this.
|
|
14478
|
+
this.activeMenuItem = activeItem ? activeItem : null;
|
|
14542
14479
|
this.activeChange();
|
|
14543
14480
|
this.colseGroup();
|
|
14544
14481
|
};
|
|
@@ -14583,7 +14520,7 @@
|
|
|
14583
14520
|
return TheToolbarGroupComponent;
|
|
14584
14521
|
}());
|
|
14585
14522
|
TheToolbarGroupComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheToolbarGroupComponent, deps: [{ token: i0__namespace.ElementRef }, { token: i1__namespace$1.ThyPopover }, { token: i0__namespace.ViewContainerRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
14586
|
-
TheToolbarGroupComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", 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"] }] });
|
|
14523
|
+
TheToolbarGroupComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", 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$1.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"] }] });
|
|
14587
14524
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheToolbarGroupComponent, decorators: [{
|
|
14588
14525
|
type: i0.Component,
|
|
14589
14526
|
args: [{
|
|
@@ -14609,9 +14546,9 @@
|
|
|
14609
14546
|
}] } });
|
|
14610
14547
|
|
|
14611
14548
|
var TETHYS = [
|
|
14612
|
-
|
|
14549
|
+
i3.ThyIconModule,
|
|
14613
14550
|
avatar.ThyAvatarModule,
|
|
14614
|
-
i3.ThyNavModule,
|
|
14551
|
+
i3$1.ThyNavModule,
|
|
14615
14552
|
i2$2.ThyFormModule,
|
|
14616
14553
|
i5$3.ThySharedModule,
|
|
14617
14554
|
i1$7.ThyListModule,
|
|
@@ -14646,7 +14583,6 @@
|
|
|
14646
14583
|
TheTableToolbarItemComponent,
|
|
14647
14584
|
TheConversionHintComponent,
|
|
14648
14585
|
TheVerticalToolbarItemComponent,
|
|
14649
|
-
TheIndentToolbarComponent,
|
|
14650
14586
|
TheTableOptionsComponent
|
|
14651
14587
|
];
|
|
14652
14588
|
var PLUGIN_COMPONENTS = [
|
|
@@ -14693,7 +14629,6 @@
|
|
|
14693
14629
|
TheTableToolbarItemComponent,
|
|
14694
14630
|
TheConversionHintComponent,
|
|
14695
14631
|
TheVerticalToolbarItemComponent,
|
|
14696
|
-
TheIndentToolbarComponent,
|
|
14697
14632
|
TheTableOptionsComponent, TheImageComponent,
|
|
14698
14633
|
TheTemplateComponent,
|
|
14699
14634
|
TheHrComponent,
|
|
@@ -14710,9 +14645,9 @@
|
|
|
14710
14645
|
TheTableComponent,
|
|
14711
14646
|
TheTableRowComponent,
|
|
14712
14647
|
TheTdComponent,
|
|
14713
|
-
TheInlineCodeComponent], imports: [i10.CommonModule, i1.SlateModule, i4
|
|
14648
|
+
TheInlineCodeComponent], imports: [i10.CommonModule, i1.SlateModule, i4.FormsModule, i3.ThyIconModule,
|
|
14714
14649
|
avatar.ThyAvatarModule,
|
|
14715
|
-
i3.ThyNavModule,
|
|
14650
|
+
i3$1.ThyNavModule,
|
|
14716
14651
|
i2$2.ThyFormModule,
|
|
14717
14652
|
i5$3.ThySharedModule,
|
|
14718
14653
|
i1$7.ThyListModule,
|
|
@@ -14733,12 +14668,12 @@
|
|
|
14733
14668
|
useValue: TheToolbarGroupComponent
|
|
14734
14669
|
},
|
|
14735
14670
|
THE_MODE_PROVIDER
|
|
14736
|
-
], imports: [__spreadArray(__spreadArray([i10.CommonModule, i1.SlateModule, i4
|
|
14671
|
+
], imports: [__spreadArray(__spreadArray([i10.CommonModule, i1.SlateModule, i4.FormsModule], __read(TETHYS)), [i8.CodemirrorModule, TheColumnSizeModule])] });
|
|
14737
14672
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheEditorModule, decorators: [{
|
|
14738
14673
|
type: i0.NgModule,
|
|
14739
14674
|
args: [{
|
|
14740
14675
|
declarations: __spreadArray(__spreadArray(__spreadArray([TheEditorComponent], __read(PIPES)), __read(COMPONENTS)), __read(PLUGIN_COMPONENTS)),
|
|
14741
|
-
imports: __spreadArray(__spreadArray([i10.CommonModule, i1.SlateModule, i4
|
|
14676
|
+
imports: __spreadArray(__spreadArray([i10.CommonModule, i1.SlateModule, i4.FormsModule], __read(TETHYS)), [i8.CodemirrorModule, TheColumnSizeModule]),
|
|
14742
14677
|
exports: [TheEditorComponent, TheToolbarComponent, TheToolbarDropdownComponent, TheToolbarItemComponent, TheDefaultElementComponent],
|
|
14743
14678
|
entryComponents: __spreadArray(__spreadArray([], __read(COMPONENTS)), __read(PLUGIN_COMPONENTS)),
|
|
14744
14679
|
providers: [
|
|
@@ -14859,16 +14794,16 @@
|
|
|
14859
14794
|
exports.THE_UPLOAD_SERVICE_TOKEN = THE_UPLOAD_SERVICE_TOKEN;
|
|
14860
14795
|
exports.TableEditor = TableEditor;
|
|
14861
14796
|
exports.TheBaseElementComponent = TheBaseElementComponent;
|
|
14797
|
+
exports.TheBaseToolbarDropdown = TheBaseToolbarDropdown;
|
|
14798
|
+
exports.TheBaseToolbarItem = TheBaseToolbarItem;
|
|
14862
14799
|
exports.TheContextService = TheContextService;
|
|
14863
14800
|
exports.TheDefaultElementComponent = TheDefaultElementComponent;
|
|
14864
14801
|
exports.TheEditor = TheEditor;
|
|
14865
14802
|
exports.TheEditorComponent = TheEditorComponent;
|
|
14866
14803
|
exports.TheEditorModule = TheEditorModule;
|
|
14867
14804
|
exports.TheImageComponent = TheImageComponent;
|
|
14868
|
-
exports.TheIndentToolbarComponent = TheIndentToolbarComponent;
|
|
14869
14805
|
exports.TheModeConfig = TheModeConfig;
|
|
14870
14806
|
exports.TheQueries = index$1;
|
|
14871
|
-
exports.TheToolbarBaseItemComponent = TheToolbarBaseItemComponent;
|
|
14872
14807
|
exports.TheToolbarComponent = TheToolbarComponent;
|
|
14873
14808
|
exports.TheToolbarDropdownComponent = TheToolbarDropdownComponent;
|
|
14874
14809
|
exports.TheToolbarGroupComponent = TheToolbarGroupComponent;
|
|
@@ -14891,9 +14826,9 @@
|
|
|
14891
14826
|
exports.createVerticalAlignPlugin = createVerticalAlignPlugin;
|
|
14892
14827
|
exports.dataDeserialize = dataDeserialize;
|
|
14893
14828
|
exports.dataSerializing = dataSerializing;
|
|
14894
|
-
exports.deleteColorAndBackgroundColorOfText = deleteColorAndBackgroundColorOfText;
|
|
14895
14829
|
exports.deleteElementKey = deleteElementKey;
|
|
14896
14830
|
exports.extractFragment = extractFragment;
|
|
14831
|
+
exports.filterTextFormat = filterTextFormat;
|
|
14897
14832
|
exports.flattenDeepPlugins = flattenDeepPlugins;
|
|
14898
14833
|
exports.getColsTotalWidth = getColsTotalWidth;
|
|
14899
14834
|
exports.getEditorUUID = getEditorUUID;
|
|
@@ -14914,6 +14849,7 @@
|
|
|
14914
14849
|
exports.internalPlugins = internalPlugins;
|
|
14915
14850
|
exports.isCleanEmptyParagraph = isCleanEmptyParagraph;
|
|
14916
14851
|
exports.isPureEmptyParagraph = isPureEmptyParagraph;
|
|
14852
|
+
exports.mergeArray = mergeArray;
|
|
14917
14853
|
exports.mergeDeepPlugins = mergeDeepPlugins;
|
|
14918
14854
|
exports.mergeElementOptions = mergeElementOptions;
|
|
14919
14855
|
exports.mergeOptions = mergeOptions;
|