@worktile/theia 13.1.1 → 13.1.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/esm2020/components/toolbar-dropdown/toolbar-dropdown.component.mjs +3 -4
- package/esm2020/plugins/hr/hr.component.mjs +3 -3
- package/esm2020/plugins/table/components/td/td.component.mjs +3 -2
- package/esm2020/queries/index.mjs +3 -2
- package/esm2020/queries/is-global-collapsed.mjs +5 -0
- package/fesm2015/worktile-theia.mjs +11 -6
- package/fesm2015/worktile-theia.mjs.map +1 -1
- package/fesm2020/worktile-theia.mjs +11 -6
- package/fesm2020/worktile-theia.mjs.map +1 -1
- package/package.json +1 -1
- package/queries/index.d.ts +2 -1
- package/queries/is-global-collapsed.d.ts +2 -0
|
@@ -2089,6 +2089,10 @@ const isEmptyContent = (children) => {
|
|
|
2089
2089
|
return false;
|
|
2090
2090
|
};
|
|
2091
2091
|
|
|
2092
|
+
const isGlobalCollapsed = (editor) => {
|
|
2093
|
+
return editor && editor.selection && Range.isCollapsed(editor.selection);
|
|
2094
|
+
};
|
|
2095
|
+
|
|
2092
2096
|
var index$1 = /*#__PURE__*/Object.freeze({
|
|
2093
2097
|
__proto__: null,
|
|
2094
2098
|
getLastNode: getLastNode,
|
|
@@ -2148,7 +2152,8 @@ var index$1 = /*#__PURE__*/Object.freeze({
|
|
|
2148
2152
|
findDescendant: findDescendant,
|
|
2149
2153
|
someNode: someNode,
|
|
2150
2154
|
getToolbarItemDisabled: getToolbarItemDisabled,
|
|
2151
|
-
getPluginByToolbarItem: getPluginByToolbarItem
|
|
2155
|
+
getPluginByToolbarItem: getPluginByToolbarItem,
|
|
2156
|
+
isGlobalCollapsed: isGlobalCollapsed
|
|
2152
2157
|
});
|
|
2153
2158
|
|
|
2154
2159
|
const insertElements = (editor, elements) => {
|
|
@@ -4391,7 +4396,7 @@ class TheHrComponent extends TheBaseElementComponent {
|
|
|
4391
4396
|
}
|
|
4392
4397
|
TheHrComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: TheHrComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
4393
4398
|
TheHrComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: TheHrComponent, selector: "the-hr, [theHr]", usesInheritance: true, ngImport: i0, template: `
|
|
4394
|
-
<div class="the-hr" contenteditable="false" [ngClass]="{ active:
|
|
4399
|
+
<div class="the-hr" contenteditable="false" [ngClass]="{ active: isCollapsedAndNonReadonly }">
|
|
4395
4400
|
<hr class="the-hr" />
|
|
4396
4401
|
<slate-children [children]="children" [context]="childrenContext" [viewContext]="viewContext"></slate-children>
|
|
4397
4402
|
</div>
|
|
@@ -4401,7 +4406,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
4401
4406
|
args: [{
|
|
4402
4407
|
selector: 'the-hr, [theHr]',
|
|
4403
4408
|
template: `
|
|
4404
|
-
<div class="the-hr" contenteditable="false" [ngClass]="{ active:
|
|
4409
|
+
<div class="the-hr" contenteditable="false" [ngClass]="{ active: isCollapsedAndNonReadonly }">
|
|
4405
4410
|
<hr class="the-hr" />
|
|
4406
4411
|
<slate-children [children]="children" [context]="childrenContext" [viewContext]="viewContext"></slate-children>
|
|
4407
4412
|
</div>
|
|
@@ -6955,10 +6960,10 @@ class TheToolbarDropdownComponent extends TheBaseToolbarDropdown {
|
|
|
6955
6960
|
}
|
|
6956
6961
|
}
|
|
6957
6962
|
TheToolbarDropdownComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: TheToolbarDropdownComponent, deps: [{ token: i0.ElementRef }, { token: i1$1.ThyPopover }, { token: i0.ViewContainerRef }, { token: i2$1.Overlay }], target: i0.ɵɵFactoryTarget.Component });
|
|
6958
|
-
TheToolbarDropdownComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: TheToolbarDropdownComponent, selector: "the-toolbar-dropdown", inputs: { itemMousedownHandle: "itemMousedownHandle" }, host: { properties: { "class": "this.className" } }, viewQueries: [{ propertyName: "iconModeTemplate", first: true, predicate: ["iconModeTemplate"], descendants: true, static: true }, { propertyName: "textModeTemplate", first: true, predicate: ["textModeTemplate"], descendants: true, static: true }, { propertyName: "dropdownTemplate", first: true, predicate: ["dropdownTemplate"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<a\n *ngIf=\"mode === dropdownMode.icon\"\n href=\"javascript:;\"\n class=\"icon-mode link-with-down\"\n thyAction\n [thyActionIcon]=\"activeMenuItem?.icon\"\n
|
|
6963
|
+
TheToolbarDropdownComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: TheToolbarDropdownComponent, selector: "the-toolbar-dropdown", inputs: { itemMousedownHandle: "itemMousedownHandle" }, host: { properties: { "class": "this.className" } }, viewQueries: [{ propertyName: "iconModeTemplate", first: true, predicate: ["iconModeTemplate"], descendants: true, static: true }, { propertyName: "textModeTemplate", first: true, predicate: ["textModeTemplate"], descendants: true, static: true }, { propertyName: "dropdownTemplate", first: true, predicate: ["dropdownTemplate"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<a\n *ngIf=\"mode === dropdownMode.icon\"\n href=\"javascript:;\"\n class=\"icon-mode link-with-down\"\n thyAction\n [thyActionIcon]=\"activeMenuItem?.icon\"\n thyTooltipPlacement=\"top\"\n (mousedown)=\"preventDefault($event)\"\n (click)=\"toggleDropdown($event)\"\n>\n <thy-icon class=\"caret-down-icon font-size-sm text-desc\" thyIconName=\"caret-down\"></thy-icon>\n</a>\n<a\n *ngIf=\"mode !== dropdownMode.icon\"\n href=\"javascript:;\"\n class=\"text-mode\"\n thyAction\n thyTooltipPlacement=\"top\"\n (mousedown)=\"preventDefault($event)\"\n (click)=\"toggleDropdown($event)\"\n>\n <span class=\"show-text\">{{ activeMenuItem?.name }}</span>\n <thy-icon class=\"font-size-sm text-desc\" thyIconName=\"caret-down\"></thy-icon>\n</a>\n\n<ng-template #dropdownTemplate>\n <div class=\"thy-dropdown-menu\">\n <ng-container *ngFor=\"let menu of menus\">\n <a\n *ngIf=\"menu.key !== 'split'\"\n href=\"javascript:;\"\n thyDropdownMenuItem\n [ngStyle]=\"menu?.styles\"\n [thyDropdownMenuItemActive]=\"menu.key === activeMenuItem?.key && !toolbarItem?.dropdownFixedIcon\"\n (mousedown)=\"preventDefault($event)\"\n (click)=\"itemMousedown($event, menu)\"\n >\n <thy-icon *ngIf=\"menu.icon && mode === dropdownMode.icon\" thyDropdownMenuItemIcon [thyIconName]=\"menu.icon\"></thy-icon>\n <span *ngIf=\"menu.name\" thyDropdownMenuItemName>{{ menu.name }}</span>\n </a>\n <thy-dropdown-menu-divider *ngIf=\"menu.key === 'split'\"></thy-dropdown-menu-divider>\n </ng-container>\n </div>\n</ng-template>\n", components: [{ type: i3.ThyActionComponent, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }, { type: i2.ThyIconComponent, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { type: i5$1.ThyDropdownMenuDividerComponent, selector: "thy-dropdown-menu-divider" }], directives: [{ type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i10.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i5$1.ThyDropdownMenuItemDirective, selector: "[thyDropdownMenuItem]", inputs: ["thyType", "thyDisabled"] }, { type: i10.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i5$1.ThyDropdownMenuItemActiveDirective, selector: "[thyDropdownMenuItemActive]", inputs: ["thyDropdownMenuItemActive"] }, { type: i5$1.ThyDropdownMenuItemIconDirective, selector: "[thyDropdownMenuItemIcon]" }, { type: i5$1.ThyDropdownMenuItemNameDirective, selector: "[thyDropdownMenuItemName]" }] });
|
|
6959
6964
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: TheToolbarDropdownComponent, decorators: [{
|
|
6960
6965
|
type: Component,
|
|
6961
|
-
args: [{ selector: 'the-toolbar-dropdown', template: "<a\n *ngIf=\"mode === dropdownMode.icon\"\n href=\"javascript:;\"\n class=\"icon-mode link-with-down\"\n thyAction\n [thyActionIcon]=\"activeMenuItem?.icon\"\n
|
|
6966
|
+
args: [{ selector: 'the-toolbar-dropdown', template: "<a\n *ngIf=\"mode === dropdownMode.icon\"\n href=\"javascript:;\"\n class=\"icon-mode link-with-down\"\n thyAction\n [thyActionIcon]=\"activeMenuItem?.icon\"\n thyTooltipPlacement=\"top\"\n (mousedown)=\"preventDefault($event)\"\n (click)=\"toggleDropdown($event)\"\n>\n <thy-icon class=\"caret-down-icon font-size-sm text-desc\" thyIconName=\"caret-down\"></thy-icon>\n</a>\n<a\n *ngIf=\"mode !== dropdownMode.icon\"\n href=\"javascript:;\"\n class=\"text-mode\"\n thyAction\n thyTooltipPlacement=\"top\"\n (mousedown)=\"preventDefault($event)\"\n (click)=\"toggleDropdown($event)\"\n>\n <span class=\"show-text\">{{ activeMenuItem?.name }}</span>\n <thy-icon class=\"font-size-sm text-desc\" thyIconName=\"caret-down\"></thy-icon>\n</a>\n\n<ng-template #dropdownTemplate>\n <div class=\"thy-dropdown-menu\">\n <ng-container *ngFor=\"let menu of menus\">\n <a\n *ngIf=\"menu.key !== 'split'\"\n href=\"javascript:;\"\n thyDropdownMenuItem\n [ngStyle]=\"menu?.styles\"\n [thyDropdownMenuItemActive]=\"menu.key === activeMenuItem?.key && !toolbarItem?.dropdownFixedIcon\"\n (mousedown)=\"preventDefault($event)\"\n (click)=\"itemMousedown($event, menu)\"\n >\n <thy-icon *ngIf=\"menu.icon && mode === dropdownMode.icon\" thyDropdownMenuItemIcon [thyIconName]=\"menu.icon\"></thy-icon>\n <span *ngIf=\"menu.name\" thyDropdownMenuItemName>{{ menu.name }}</span>\n </a>\n <thy-dropdown-menu-divider *ngIf=\"menu.key === 'split'\"></thy-dropdown-menu-divider>\n </ng-container>\n </div>\n</ng-template>\n" }]
|
|
6962
6967
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1$1.ThyPopover }, { type: i0.ViewContainerRef }, { type: i2$1.Overlay }]; }, propDecorators: { className: [{
|
|
6963
6968
|
type: HostBinding,
|
|
6964
6969
|
args: ['class']
|
|
@@ -10263,7 +10268,7 @@ class TheTdComponent extends TheBaseElementComponent {
|
|
|
10263
10268
|
this.display = this.element.hidden ? 'none' : '';
|
|
10264
10269
|
}
|
|
10265
10270
|
useFocus() {
|
|
10266
|
-
if (this.isCollapsedAndNonReadonly) {
|
|
10271
|
+
if (this.isCollapsedAndNonReadonly && isGlobalCollapsed(this.editor)) {
|
|
10267
10272
|
this.renderer.addClass(this.elementRef.nativeElement, 'focused-cell');
|
|
10268
10273
|
}
|
|
10269
10274
|
else {
|