@worktile/theia 14.2.3 → 14.2.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/components/plugin-menu/plugin-menu.component.d.ts +5 -4
- package/esm2020/components/plugin-menu/plugin-menu.component.mjs +28 -16
- package/fesm2015/worktile-theia.mjs +29 -15
- package/fesm2015/worktile-theia.mjs.map +1 -1
- package/fesm2020/worktile-theia.mjs +27 -15
- package/fesm2020/worktile-theia.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -25,7 +25,7 @@ import * as i4 from 'ngx-tethys/tooltip';
|
|
|
25
25
|
import { ThyTooltipModule } from 'ngx-tethys/tooltip';
|
|
26
26
|
import * as i7 from 'ngx-tethys/divider';
|
|
27
27
|
import { ThyDividerComponent, ThyDividerModule } from 'ngx-tethys/divider';
|
|
28
|
-
import { mixinUnsubscribe, MixinBase } from 'ngx-tethys/core';
|
|
28
|
+
import { mixinUnsubscribe, MixinBase, ScrollToService } from 'ngx-tethys/core';
|
|
29
29
|
import { isKeyHotkey } from 'is-hotkey';
|
|
30
30
|
import { Subject, fromEvent, timer, combineLatest, Observable, BehaviorSubject, merge, ReplaySubject } from 'rxjs';
|
|
31
31
|
import * as i5 from 'ngx-tethys/input';
|
|
@@ -10173,7 +10173,7 @@ class ThePluginMenuComponent extends mixinUnsubscribe(MixinBase) {
|
|
|
10173
10173
|
width: '266px'
|
|
10174
10174
|
};
|
|
10175
10175
|
this.containerClassName = `the-plugin-menu-container`;
|
|
10176
|
-
this.
|
|
10176
|
+
this.theDisplaySearch = false;
|
|
10177
10177
|
this.removeKeywords = () => {
|
|
10178
10178
|
const hotkey = getPluginOptions(this.editor, PluginKeys.quickInsert)?.hotkey;
|
|
10179
10179
|
const node = Node.get(this.editor, this.editor.selection.anchor.path);
|
|
@@ -10186,29 +10186,36 @@ class ThePluginMenuComponent extends mixinUnsubscribe(MixinBase) {
|
|
|
10186
10186
|
this.editorElement = AngularEditor.toDOMNode(this.editor, this.editor);
|
|
10187
10187
|
let currentMenu = this.editor.options.menu ? this.editor.options.menu : DefaultPluginMenu;
|
|
10188
10188
|
const menuItemsMap = buildPluginMenuItemMap(this.editor);
|
|
10189
|
-
this.
|
|
10189
|
+
this._pluginMenu = buildPluginMenu(menuItemsMap, currentMenu);
|
|
10190
10190
|
this.buildMenus();
|
|
10191
10191
|
}
|
|
10192
10192
|
buildMenus() {
|
|
10193
|
-
if (this.displaySearch) {
|
|
10194
|
-
this.pluginMenu = this.pluginMenu.filter((item) => {
|
|
10195
|
-
return item?.type !== ThePluginMenuItemType.icon;
|
|
10196
|
-
});
|
|
10197
|
-
}
|
|
10198
10193
|
if (this.keyWords) {
|
|
10199
10194
|
this.iconMenu = [];
|
|
10200
|
-
this.groupMenu =
|
|
10201
|
-
|
|
10195
|
+
this.groupMenu = [];
|
|
10196
|
+
this._pluginMenu.forEach((item) => {
|
|
10197
|
+
if (ThePluginMenu.isMenuItem(item)) {
|
|
10198
|
+
if (item.keywords && item.keywords?.includes(this.keyWords)) {
|
|
10199
|
+
this.groupMenu.push(item);
|
|
10200
|
+
}
|
|
10201
|
+
if (item.children && item.children.length > 0) {
|
|
10202
|
+
item.children.forEach((child) => {
|
|
10203
|
+
if (child.keywords && item.keywords?.includes(this.keyWords)) {
|
|
10204
|
+
this.groupMenu.push(child);
|
|
10205
|
+
}
|
|
10206
|
+
});
|
|
10207
|
+
}
|
|
10208
|
+
}
|
|
10202
10209
|
});
|
|
10203
10210
|
if (this.groupMenu.length > 0) {
|
|
10204
10211
|
this.groupMenu.unshift(this.searchGroup);
|
|
10205
10212
|
}
|
|
10206
10213
|
}
|
|
10207
10214
|
else {
|
|
10208
|
-
this.iconMenu = this.
|
|
10215
|
+
this.iconMenu = this._pluginMenu.filter((item) => {
|
|
10209
10216
|
return item?.type === ThePluginMenuItemType.icon;
|
|
10210
10217
|
});
|
|
10211
|
-
this.groupMenu = this.
|
|
10218
|
+
this.groupMenu = this._pluginMenu.filter((item) => {
|
|
10212
10219
|
return item?.type !== ThePluginMenuItemType.icon;
|
|
10213
10220
|
});
|
|
10214
10221
|
}
|
|
@@ -10237,6 +10244,9 @@ class ThePluginMenuComponent extends mixinUnsubscribe(MixinBase) {
|
|
|
10237
10244
|
const dropdown = this.findDropdownTrigger(event.option);
|
|
10238
10245
|
dropdown.hide();
|
|
10239
10246
|
}
|
|
10247
|
+
if (event.type === 'turn') {
|
|
10248
|
+
ScrollToService.scrollToElement(event.option.elementRef.nativeElement, this.elementRef.nativeElement);
|
|
10249
|
+
}
|
|
10240
10250
|
}
|
|
10241
10251
|
findDropdownTrigger(option) {
|
|
10242
10252
|
const dropdown = this.dropdownTriggers.find(value => {
|
|
@@ -10249,10 +10259,10 @@ class ThePluginMenuComponent extends mixinUnsubscribe(MixinBase) {
|
|
|
10249
10259
|
}
|
|
10250
10260
|
}
|
|
10251
10261
|
ThePluginMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ThePluginMenuComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
|
10252
|
-
ThePluginMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: ThePluginMenuComponent, selector: "the-plugin-menu", inputs: { editor: "editor", displaySearch: "displaySearch" }, host: { properties: { "class": "this.containerClassName" } }, viewQueries: [{ propertyName: "dropdownTriggers", predicate: ["dropdownTriggers"], descendants: true, read: ThyDropdownDirective }], usesInheritance: true, ngImport: i0, template: "<div *ngIf=\"displaySearch\" class=\"menu-search px-5 pt-5\">\n <thy-input-search [(ngModel)]=\"keyWords\" placeholder=\"\u641C\u7D22\" thyIconPosition=\"after\" (ngModelChange)=\"buildMenus()\"> </thy-input-search>\n</div>\n\n<div\n *ngIf=\"groupMenu.length > 0; else thyEmpty\"\n theListBox\n [keyboardContainer]=\"editorElement\"\n (theListboxChange)=\"theListboxChange($event)\"\n class=\"thy-dropdown-menu py-2\"\n>\n <div *ngIf=\"iconMenu?.length > 0\" theListboxGroup [horizontalColumn]=\"6\" class=\"icon-menu d-flex px-5 py-1\">\n <ng-container *ngFor=\"let item of iconMenu\">\n <a\n *ngIf=\"item.type === ThePluginMenuItemType.icon\"\n href=\"javascript:;\"\n class=\"mt-2\"\n thyAction\n theListboxOption\n [theOptionValue]=\"item\"\n [thyActionIcon]=\"item.icon\"\n [thyTooltip]=\"item.name\"\n thePreventDefault\n (click)=\"handleItemSelection(item)\"\n ></a>\n </ng-container>\n </div>\n\n <thy-divider *ngIf=\"this.iconMenu?.length\" class=\"my-2\"></thy-divider>\n <div theListboxGroup>\n <ng-container *ngFor=\"let item of groupMenu\">\n <ng-container *ngIf=\"ThePluginMenu.isMenuItem(item) && !item.isExpanded\">\n <div\n thyDropdownMenuItem\n theListboxOption\n [theOptionValue]=\"item\"\n class=\"insert-menu-item mb-1 py-0\"\n thePreventDefault\n (click)=\"handleItemSelection(item)\"\n >\n <div class=\"menu-icon mr-2\">\n <thy-icon [thyIconName]=\"item.menuIcon\"></thy-icon>\n </div>\n <div class=\"menu-content d-flex align-items-center\">\n <div class=\"menu-item-title w-100\">\n <span *ngIf=\"!item?.isExpanded\" class=\"menu-item-display-key font-size-sm text-placeholder\">\n {{ item.displayKey }}</span\n >\n {{ item.name }}\n </div>\n <div class=\"text-muted font-size-sm\">{{ item.description }}</div>\n </div>\n </div>\n </ng-container>\n <ng-container *ngIf=\"ThePluginMenu.isMenuItem(item) && item.isExpanded\" #hasExpanded>\n <div\n #dropdownTriggers\n [thyDropdown]=\"expand\"\n thyTrigger=\"hover\"\n thyDropdownMenuItem\n theListboxOption\n [theOptionValue]=\"item\"\n [thyPopoverOptions]=\"expandPopoverOptions\"\n class=\"insert-menu-item mb-1 py-0\"\n thePreventDefault\n (click)=\"handleItemSelection(item)\"\n >\n <div class=\"menu-icon mr-2\">\n <thy-icon [thyIconName]=\"item.menuIcon\"></thy-icon>\n </div>\n <div class=\"menu-content d-flex align-items-center\">\n <div class=\"menu-item-title w-100\">\n <span *ngIf=\"!item?.isExpanded\" class=\"menu-item-display-key font-size-sm text-placeholder\">\n {{ item.displayKey }}</span\n >\n {{ item.name }}\n </div>\n <div class=\"text-muted font-size-sm\">{{ item.description }}</div>\n </div>\n <div *ngIf=\"item?.isExpanded\">\n <thy-icon class=\"text-muted\" thyIconName=\"angle-right\"></thy-icon>\n </div>\n <thy-dropdown-menu class=\"expand-menu\" #expand>\n <div class=\"the-plugin-menu-container\" theListboxGroup>\n <div\n *ngFor=\"let child of item.children\"\n thyDropdownMenuItem\n theListboxOption\n class=\"insert-menu-item mb-1 py-0\"\n thePreventDefault\n (click)=\"handleItemSelection(child)\"\n [theOptionValue]=\"child\"\n >\n <div class=\"menu-icon mr-2\">\n <thy-icon [thyIconName]=\"child.menuIcon\"></thy-icon>\n </div>\n <div class=\"menu-content d-flex align-items-center\">\n <div class=\"menu-item-title w-100\">\n <span class=\"menu-item-display-key font-size-sm text-placeholder\"> {{ child.displayKey }}</span>\n {{ child.name }}\n </div>\n <div class=\"text-muted font-size-sm\">{{ child.description }}</div>\n </div>\n </div>\n </div>\n <table-select\n *ngIf=\"item.key === 'table'\"\n class=\"plugin-menu-table the-table-selector-panel\"\n [editor]=\"editor\"\n [beforeInsert]=\"removeKeywords\"\n ></table-select>\n </thy-dropdown-menu>\n </div>\n </ng-container>\n <ng-container *ngIf=\"!ThePluginMenu.isMenuItem(item)\" #menuGroup>\n <thy-dropdown-menu-group class=\"font-size-sm\" [thyTitle]=\"item.groupName\"></thy-dropdown-menu-group>\n </ng-container>\n </ng-container>\n </div>\n</div>\n\n<ng-template #thyEmpty>\n <div class=\"empty d-flex align-items-center justify-content-center\">\n <thy-empty [thyMessage]=\"thyMessage\"></thy-empty>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3.ThyIconComponent, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { kind: "directive", type: i4.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { kind: "component", type: i5.ThyInputSearchComponent, selector: "thy-input-search", inputs: ["name", "placeholder", "thyTheme", "thySearchFocus", "thyIconPosition", "thySize"], outputs: ["clear", "thyClear"] }, { kind: "component", type: i6.ThyActionComponent, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }, { kind: "component", type: i7.ThyDividerComponent, selector: "thy-divider", inputs: ["thyVertical", "thyStyle", "thyColor", "thyText", "thyTextDirection", "thyDeeper"] }, { kind: "directive", type: i6$1.ThyDropdownDirective, selector: "[thyDropdown]", inputs: ["thyDropdownMenu", "thyDropdown", "thyTrigger", "thyActiveClass", "thyPopoverOptions"], outputs: ["thyActiveChange"] }, { kind: "component", type: i6$1.ThyDropdownMenuComponent, selector: "thy-dropdown-menu", inputs: ["thyWidth"] }, { kind: "component", type: i6$1.ThyDropdownMenuGroupComponent, selector: "thy-dropdown-menu-group", inputs: ["thyTitle"] }, { kind: "directive", type: i6$1.ThyDropdownMenuItemDirective, selector: "[thyDropdownMenuItem]", inputs: ["thyType", "thyDisabled"] }, { kind: "component", type: i9$2.ThyEmptyComponent, selector: "thy-empty", inputs: ["thyMessage", "thyTranslationKey", "thyTranslationValues", "thyEntityName", "thyEntityNameTranslateKey", "thyIconName", "thySize", "thyMarginTop", "thyTopAuto", "thyContainer", "thyImageUrl", "thyImageLoading", "thyImageFetchPriority", "thyDescription"] }, { kind: "component", type: TheTableSelectComponent, selector: "table-select", inputs: ["optionsParam", "editor", "beforeInsert"] }, { kind: "directive", type: TheListboxOptionDirective, selector: "[theListboxOption]", inputs: ["theOptionValue"], exportAs: ["theListboxOption"] }, { kind: "directive", type: TheListboxGroupDirective, selector: "[theListboxGroup]", inputs: ["horizontalColumn"], exportAs: ["theListboxGroup"] }, { kind: "directive", type: TheListboxDirective, selector: "[theListBox]", inputs: ["keyboardContainer"], outputs: ["theListboxChange"], exportAs: ["theListBox"] }, { kind: "directive", type: ThePreventDefaultDirective, selector: "[thePreventDefault]", exportAs: ["thePreventDefault"] }] });
|
|
10262
|
+
ThePluginMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: ThePluginMenuComponent, selector: "the-plugin-menu", inputs: { editor: "editor", theDisplaySearch: "theDisplaySearch", thePluginMenu: "thePluginMenu" }, host: { properties: { "class": "this.containerClassName" } }, viewQueries: [{ propertyName: "dropdownTriggers", predicate: ["dropdownTriggers"], descendants: true, read: ThyDropdownDirective }], usesInheritance: true, ngImport: i0, template: "<div *ngIf=\"theDisplaySearch\" class=\"menu-search px-5 pt-5\">\n <thy-input-search [(ngModel)]=\"keyWords\" placeholder=\"\u641C\u7D22\" thyIconPosition=\"after\" (ngModelChange)=\"buildMenus()\"> </thy-input-search>\n</div>\n\n<div\n *ngIf=\"groupMenu.length > 0; else thyEmpty\"\n theListBox\n [keyboardContainer]=\"editorElement\"\n (theListboxChange)=\"theListboxChange($event)\"\n class=\"thy-dropdown-menu py-2\"\n>\n <div *ngIf=\"iconMenu?.length > 0\" theListboxGroup [horizontalColumn]=\"6\" class=\"icon-menu d-flex px-5 py-1\">\n <ng-container *ngFor=\"let item of iconMenu\">\n <a\n *ngIf=\"item.type === ThePluginMenuItemType.icon\"\n href=\"javascript:;\"\n class=\"mt-2\"\n thyAction\n theListboxOption\n [theOptionValue]=\"item\"\n [thyActionIcon]=\"item.icon\"\n [thyTooltip]=\"item.name\"\n thePreventDefault\n (click)=\"handleItemSelection(item)\"\n ></a>\n </ng-container>\n </div>\n\n <thy-divider *ngIf=\"this.iconMenu?.length\" class=\"my-2\"></thy-divider>\n <div theListboxGroup>\n <ng-container *ngFor=\"let item of groupMenu\">\n <ng-container *ngIf=\"ThePluginMenu.isMenuItem(item) && !item.isExpanded\">\n <div\n thyDropdownMenuItem\n theListboxOption\n [theOptionValue]=\"item\"\n class=\"insert-menu-item mb-1 py-0\"\n thePreventDefault\n (click)=\"handleItemSelection(item)\"\n >\n <div class=\"menu-icon mr-2\">\n <thy-icon [thyIconName]=\"item.menuIcon\"></thy-icon>\n </div>\n <div class=\"menu-content d-flex align-items-center\">\n <div class=\"menu-item-title w-100\">\n <span *ngIf=\"!item?.isExpanded\" class=\"menu-item-display-key font-size-sm text-placeholder\">\n {{ item.displayKey }}</span\n >\n {{ item.name }}\n </div>\n <div class=\"text-muted font-size-sm\">{{ item.description }}</div>\n </div>\n </div>\n </ng-container>\n <ng-container *ngIf=\"ThePluginMenu.isMenuItem(item) && item.isExpanded\" #hasExpanded>\n <div\n #dropdownTriggers\n [thyDropdown]=\"expand\"\n thyTrigger=\"hover\"\n thyDropdownMenuItem\n theListboxOption\n [theOptionValue]=\"item\"\n [thyPopoverOptions]=\"expandPopoverOptions\"\n class=\"insert-menu-item mb-1 py-0\"\n thePreventDefault\n (click)=\"handleItemSelection(item)\"\n >\n <div class=\"menu-icon mr-2\">\n <thy-icon [thyIconName]=\"item.menuIcon\"></thy-icon>\n </div>\n <div class=\"menu-content d-flex align-items-center\">\n <div class=\"menu-item-title w-100\">\n <span *ngIf=\"!item?.isExpanded\" class=\"menu-item-display-key font-size-sm text-placeholder\">\n {{ item.displayKey }}</span\n >\n {{ item.name }}\n </div>\n <div class=\"text-muted font-size-sm\">{{ item.description }}</div>\n </div>\n <div *ngIf=\"item?.isExpanded\">\n <thy-icon class=\"text-muted\" thyIconName=\"angle-right\"></thy-icon>\n </div>\n <thy-dropdown-menu class=\"expand-menu\" #expand>\n <div class=\"the-plugin-menu-container\" theListboxGroup>\n <div\n *ngFor=\"let child of item.children\"\n thyDropdownMenuItem\n theListboxOption\n class=\"insert-menu-item mb-1 py-0\"\n thePreventDefault\n (click)=\"handleItemSelection(child)\"\n [theOptionValue]=\"child\"\n >\n <div class=\"menu-icon mr-2\">\n <thy-icon [thyIconName]=\"child.menuIcon\"></thy-icon>\n </div>\n <div class=\"menu-content d-flex align-items-center\">\n <div class=\"menu-item-title w-100\">\n <span class=\"menu-item-display-key font-size-sm text-placeholder\"> {{ child.displayKey }}</span>\n {{ child.name }}\n </div>\n <div class=\"text-muted font-size-sm\">{{ child.description }}</div>\n </div>\n </div>\n </div>\n <table-select\n *ngIf=\"item.key === 'table'\"\n class=\"plugin-menu-table the-table-selector-panel\"\n [editor]=\"editor\"\n [beforeInsert]=\"removeKeywords\"\n ></table-select>\n </thy-dropdown-menu>\n </div>\n </ng-container>\n <ng-container *ngIf=\"!ThePluginMenu.isMenuItem(item)\" #menuGroup>\n <thy-dropdown-menu-group class=\"font-size-sm\" [thyTitle]=\"item.groupName\"></thy-dropdown-menu-group>\n </ng-container>\n </ng-container>\n </div>\n</div>\n\n<ng-template #thyEmpty>\n <div class=\"empty d-flex align-items-center justify-content-center\">\n <thy-empty [thyMessage]=\"thyMessage\"></thy-empty>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3.ThyIconComponent, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { kind: "directive", type: i4.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { kind: "component", type: i5.ThyInputSearchComponent, selector: "thy-input-search", inputs: ["name", "placeholder", "thyTheme", "thySearchFocus", "thyIconPosition", "thySize"], outputs: ["clear", "thyClear"] }, { kind: "component", type: i6.ThyActionComponent, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }, { kind: "component", type: i7.ThyDividerComponent, selector: "thy-divider", inputs: ["thyVertical", "thyStyle", "thyColor", "thyText", "thyTextDirection", "thyDeeper"] }, { kind: "directive", type: i6$1.ThyDropdownDirective, selector: "[thyDropdown]", inputs: ["thyDropdownMenu", "thyDropdown", "thyTrigger", "thyActiveClass", "thyPopoverOptions"], outputs: ["thyActiveChange"] }, { kind: "component", type: i6$1.ThyDropdownMenuComponent, selector: "thy-dropdown-menu", inputs: ["thyWidth"] }, { kind: "component", type: i6$1.ThyDropdownMenuGroupComponent, selector: "thy-dropdown-menu-group", inputs: ["thyTitle"] }, { kind: "directive", type: i6$1.ThyDropdownMenuItemDirective, selector: "[thyDropdownMenuItem]", inputs: ["thyType", "thyDisabled"] }, { kind: "component", type: i9$2.ThyEmptyComponent, selector: "thy-empty", inputs: ["thyMessage", "thyTranslationKey", "thyTranslationValues", "thyEntityName", "thyEntityNameTranslateKey", "thyIconName", "thySize", "thyMarginTop", "thyTopAuto", "thyContainer", "thyImageUrl", "thyImageLoading", "thyImageFetchPriority", "thyDescription"] }, { kind: "component", type: TheTableSelectComponent, selector: "table-select", inputs: ["optionsParam", "editor", "beforeInsert"] }, { kind: "directive", type: TheListboxOptionDirective, selector: "[theListboxOption]", inputs: ["theOptionValue"], exportAs: ["theListboxOption"] }, { kind: "directive", type: TheListboxGroupDirective, selector: "[theListboxGroup]", inputs: ["horizontalColumn"], exportAs: ["theListboxGroup"] }, { kind: "directive", type: TheListboxDirective, selector: "[theListBox]", inputs: ["keyboardContainer"], outputs: ["theListboxChange"], exportAs: ["theListBox"] }, { kind: "directive", type: ThePreventDefaultDirective, selector: "[thePreventDefault]", exportAs: ["thePreventDefault"] }] });
|
|
10253
10263
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ThePluginMenuComponent, decorators: [{
|
|
10254
10264
|
type: Component,
|
|
10255
|
-
args: [{ selector: 'the-plugin-menu', template: "<div *ngIf=\"
|
|
10265
|
+
args: [{ selector: 'the-plugin-menu', template: "<div *ngIf=\"theDisplaySearch\" class=\"menu-search px-5 pt-5\">\n <thy-input-search [(ngModel)]=\"keyWords\" placeholder=\"\u641C\u7D22\" thyIconPosition=\"after\" (ngModelChange)=\"buildMenus()\"> </thy-input-search>\n</div>\n\n<div\n *ngIf=\"groupMenu.length > 0; else thyEmpty\"\n theListBox\n [keyboardContainer]=\"editorElement\"\n (theListboxChange)=\"theListboxChange($event)\"\n class=\"thy-dropdown-menu py-2\"\n>\n <div *ngIf=\"iconMenu?.length > 0\" theListboxGroup [horizontalColumn]=\"6\" class=\"icon-menu d-flex px-5 py-1\">\n <ng-container *ngFor=\"let item of iconMenu\">\n <a\n *ngIf=\"item.type === ThePluginMenuItemType.icon\"\n href=\"javascript:;\"\n class=\"mt-2\"\n thyAction\n theListboxOption\n [theOptionValue]=\"item\"\n [thyActionIcon]=\"item.icon\"\n [thyTooltip]=\"item.name\"\n thePreventDefault\n (click)=\"handleItemSelection(item)\"\n ></a>\n </ng-container>\n </div>\n\n <thy-divider *ngIf=\"this.iconMenu?.length\" class=\"my-2\"></thy-divider>\n <div theListboxGroup>\n <ng-container *ngFor=\"let item of groupMenu\">\n <ng-container *ngIf=\"ThePluginMenu.isMenuItem(item) && !item.isExpanded\">\n <div\n thyDropdownMenuItem\n theListboxOption\n [theOptionValue]=\"item\"\n class=\"insert-menu-item mb-1 py-0\"\n thePreventDefault\n (click)=\"handleItemSelection(item)\"\n >\n <div class=\"menu-icon mr-2\">\n <thy-icon [thyIconName]=\"item.menuIcon\"></thy-icon>\n </div>\n <div class=\"menu-content d-flex align-items-center\">\n <div class=\"menu-item-title w-100\">\n <span *ngIf=\"!item?.isExpanded\" class=\"menu-item-display-key font-size-sm text-placeholder\">\n {{ item.displayKey }}</span\n >\n {{ item.name }}\n </div>\n <div class=\"text-muted font-size-sm\">{{ item.description }}</div>\n </div>\n </div>\n </ng-container>\n <ng-container *ngIf=\"ThePluginMenu.isMenuItem(item) && item.isExpanded\" #hasExpanded>\n <div\n #dropdownTriggers\n [thyDropdown]=\"expand\"\n thyTrigger=\"hover\"\n thyDropdownMenuItem\n theListboxOption\n [theOptionValue]=\"item\"\n [thyPopoverOptions]=\"expandPopoverOptions\"\n class=\"insert-menu-item mb-1 py-0\"\n thePreventDefault\n (click)=\"handleItemSelection(item)\"\n >\n <div class=\"menu-icon mr-2\">\n <thy-icon [thyIconName]=\"item.menuIcon\"></thy-icon>\n </div>\n <div class=\"menu-content d-flex align-items-center\">\n <div class=\"menu-item-title w-100\">\n <span *ngIf=\"!item?.isExpanded\" class=\"menu-item-display-key font-size-sm text-placeholder\">\n {{ item.displayKey }}</span\n >\n {{ item.name }}\n </div>\n <div class=\"text-muted font-size-sm\">{{ item.description }}</div>\n </div>\n <div *ngIf=\"item?.isExpanded\">\n <thy-icon class=\"text-muted\" thyIconName=\"angle-right\"></thy-icon>\n </div>\n <thy-dropdown-menu class=\"expand-menu\" #expand>\n <div class=\"the-plugin-menu-container\" theListboxGroup>\n <div\n *ngFor=\"let child of item.children\"\n thyDropdownMenuItem\n theListboxOption\n class=\"insert-menu-item mb-1 py-0\"\n thePreventDefault\n (click)=\"handleItemSelection(child)\"\n [theOptionValue]=\"child\"\n >\n <div class=\"menu-icon mr-2\">\n <thy-icon [thyIconName]=\"child.menuIcon\"></thy-icon>\n </div>\n <div class=\"menu-content d-flex align-items-center\">\n <div class=\"menu-item-title w-100\">\n <span class=\"menu-item-display-key font-size-sm text-placeholder\"> {{ child.displayKey }}</span>\n {{ child.name }}\n </div>\n <div class=\"text-muted font-size-sm\">{{ child.description }}</div>\n </div>\n </div>\n </div>\n <table-select\n *ngIf=\"item.key === 'table'\"\n class=\"plugin-menu-table the-table-selector-panel\"\n [editor]=\"editor\"\n [beforeInsert]=\"removeKeywords\"\n ></table-select>\n </thy-dropdown-menu>\n </div>\n </ng-container>\n <ng-container *ngIf=\"!ThePluginMenu.isMenuItem(item)\" #menuGroup>\n <thy-dropdown-menu-group class=\"font-size-sm\" [thyTitle]=\"item.groupName\"></thy-dropdown-menu-group>\n </ng-container>\n </ng-container>\n </div>\n</div>\n\n<ng-template #thyEmpty>\n <div class=\"empty d-flex align-items-center justify-content-center\">\n <thy-empty [thyMessage]=\"thyMessage\"></thy-empty>\n </div>\n</ng-template>\n" }]
|
|
10256
10266
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }]; }, propDecorators: { dropdownTriggers: [{
|
|
10257
10267
|
type: ViewChildren,
|
|
10258
10268
|
args: ['dropdownTriggers', { read: ThyDropdownDirective }]
|
|
@@ -10261,7 +10271,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
|
|
|
10261
10271
|
args: ['class']
|
|
10262
10272
|
}], editor: [{
|
|
10263
10273
|
type: Input
|
|
10264
|
-
}],
|
|
10274
|
+
}], theDisplaySearch: [{
|
|
10275
|
+
type: Input
|
|
10276
|
+
}], thePluginMenu: [{
|
|
10265
10277
|
type: Input
|
|
10266
10278
|
}] } });
|
|
10267
10279
|
|