@worktile/theia 2.2.2 → 2.2.3
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 +10 -21
- package/bundles/worktile-theia.umd.js.map +1 -1
- package/esm2015/plugins/indent/indent.editor.js +9 -3
- package/esm2015/plugins/indent/indent.plugin.js +1 -22
- package/esm2015/plugins/indent/options.js +3 -1
- package/esm2015/plugins/indent/toolbar-item.component.js +2 -2
- package/fesm2015/worktile-theia.js +11 -21
- package/fesm2015/worktile-theia.js.map +1 -1
- package/package.json +1 -1
|
@@ -12167,7 +12167,7 @@
|
|
|
12167
12167
|
return TheIndentToolbarComponent;
|
|
12168
12168
|
}(TheToolbarBaseItemComponent));
|
|
12169
12169
|
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$3.ThyPopover }, { token: i0__namespace.ViewContainerRef }, { token: i2__namespace.Overlay }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
12170
|
-
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
|
|
12170
|
+
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$1.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { type: i5__namespace$2.ThyActionMenuComponent, selector: "thy-action-menu", inputs: ["thyTheme", "thyWidth"] }], directives: [{ type: i5__namespace$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { type: i6__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i5__namespace$2.ThyActionMenuItemDirective, selector: "[thyActionMenuItem]", inputs: ["thyDisabled", "thyType"] }, { type: i5__namespace$2.ThyActionMenuItemIconDirective, selector: "[thyActionMenuItemIcon]" }, { type: i5__namespace$2.ThyActionMenuItemNameDirective, selector: "[thyActionMenuItemName]" }] });
|
|
12171
12171
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheIndentToolbarComponent, decorators: [{
|
|
12172
12172
|
type: i0.Component,
|
|
12173
12173
|
args: [{
|
|
@@ -12268,9 +12268,14 @@
|
|
|
12268
12268
|
},
|
|
12269
12269
|
isDisabled: function (editor) {
|
|
12270
12270
|
if (editor.selection) {
|
|
12271
|
-
var
|
|
12271
|
+
var allowGroup = __spreadArray([
|
|
12272
|
+
exports.ElementKinds.paragraph,
|
|
12273
|
+
exports.ElementKinds.numberedList,
|
|
12274
|
+
exports.ElementKinds.bulletedList,
|
|
12275
|
+
exports.ElementKinds.checkItem
|
|
12276
|
+
], __read(HEADING_TYPES));
|
|
12272
12277
|
var anchorBlock$1 = anchorBlock(editor);
|
|
12273
|
-
return anchorBlock$1 &&
|
|
12278
|
+
return anchorBlock$1 && !allowGroup.includes(anchorBlock$1 === null || anchorBlock$1 === void 0 ? void 0 : anchorBlock$1.type);
|
|
12274
12279
|
}
|
|
12275
12280
|
return false;
|
|
12276
12281
|
}
|
|
@@ -12287,12 +12292,14 @@
|
|
|
12287
12292
|
key: exports.Indents.indentRight,
|
|
12288
12293
|
name: '增加缩进',
|
|
12289
12294
|
icon: 'float-left',
|
|
12295
|
+
shortcutKey: 'Tab',
|
|
12290
12296
|
execute: function (editor) { return IndentEditor.setIndent(editor); }
|
|
12291
12297
|
},
|
|
12292
12298
|
{
|
|
12293
12299
|
key: exports.Indents.indentLeft,
|
|
12294
12300
|
name: '减少缩进',
|
|
12295
12301
|
icon: 'float-right',
|
|
12302
|
+
shortcutKey: 'Shift+Tab/BackSpace',
|
|
12296
12303
|
type: exports.ToolbarItemType.toolDropdown,
|
|
12297
12304
|
execute: function (editor) { return IndentEditor.cancelIndent(editor); }
|
|
12298
12305
|
}
|
|
@@ -12352,24 +12359,6 @@
|
|
|
12352
12359
|
var withIndent = function (kinds) { return function (editor) {
|
|
12353
12360
|
var onKeydown = editor.onKeydown;
|
|
12354
12361
|
editor.onKeydown = function (event) {
|
|
12355
|
-
var HOTKEYS = {
|
|
12356
|
-
'mod+]': exports.Indents.indentRight,
|
|
12357
|
-
'mod+[': exports.Indents.indentLeft
|
|
12358
|
-
};
|
|
12359
|
-
for (var hotkey in HOTKEYS) {
|
|
12360
|
-
if (isHotkey__default["default"](hotkey, event)) {
|
|
12361
|
-
event.preventDefault();
|
|
12362
|
-
var mark = HOTKEYS[hotkey];
|
|
12363
|
-
switch (mark) {
|
|
12364
|
-
case exports.Indents.indentRight:
|
|
12365
|
-
IndentEditor.setIndent(editor);
|
|
12366
|
-
break;
|
|
12367
|
-
case exports.Indents.indentLeft:
|
|
12368
|
-
IndentEditor.cancelIndent(editor);
|
|
12369
|
-
break;
|
|
12370
|
-
}
|
|
12371
|
-
}
|
|
12372
|
-
}
|
|
12373
12362
|
var isContinue = !onKeydownTextIndent(editor, event, kinds);
|
|
12374
12363
|
if (isContinue) {
|
|
12375
12364
|
onKeydown(event);
|