@worktile/theia 13.0.27 → 13.0.28

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.
@@ -3033,7 +3033,7 @@ class TheImageComponent extends TheBaseElementComponent {
3033
3033
  }
3034
3034
  }
3035
3035
  TheImageComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: TheImageComponent, deps: [{ token: i0.ElementRef }, { token: THE_UPLOAD_SERVICE_TOKEN }, { token: i0.ChangeDetectorRef }, { token: TheContextService }, { token: i1$1.ThyPopover }, { token: i2$1.Overlay }, { token: i4$1.ThyImageService }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component });
3036
- TheImageComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", 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, 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 #imageContent *ngIf=\"imageEntry.thumbUrl\" class=\"image-content\" [class.pointer]=\"!selection\">\n <img\n #img\n thyImage\n [ngStyle]=\"{ 'width.px': imageBindingWidth }\"\n [class.image-collapsed]=\"selection && !uploading\"\n class=\"main-image\"\n (load)=\"imageLoaded($event)\"\n (mousedown)=\"preventDefault($event)\"\n [thySrc]=\"imageEntry.thumbUrl\"\n [thyPreviewSrc]=\"imageEntry.thumbUrl\"\n [thyOriginSrc]=\"imageEntry.originUrl\"\n [thyImageMeta]=\"{ name: imageEntry.name, size: imageEntry.size }\"\n [alt]=\"imageEntry.name\"\n />\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\" [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 <thy-actions contenteditable=\"false\" thySize=\"xxs\">\n <ng-container *ngFor=\"let item of layoutOptions\">\n <a\n *ngIf=\"item.key !== 'split'\"\n href=\"javascript:;\"\n thyAction\n [thyType]=\"item.key === 'remove' ? 'danger' : 'primary'\"\n [thyActionIcon]=\"item.icon\"\n [thyActionActive]=\"layoutActive(item.key)\"\n [thyTooltip]=\"item.name\"\n thyTooltipPlacement=\"top\"\n (mousedown)=\"item?.handle($event, item.key)\"\n ></a>\n <thy-divider *ngIf=\"item.key === 'split'\" class=\"mx-2 align-self-center\" [thyVertical]=\"true\"></thy-divider>\n </ng-container>\n </thy-actions>\n</ng-template>\n", components: [{ type: i1.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }, { type: i6.ThyProgressComponent, selector: "thy-progress", inputs: ["thyType", "thySize", "thyValue", "thyMax", "thyTips"] }, { type: i2.ThyIconComponent, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { type: i3.ThyActionsComponent, selector: "thy-actions", inputs: ["thySize"] }, { type: i3.ThyActionComponent, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }, { type: i4$2.ThyDividerComponent, selector: "thy-divider", inputs: ["thyVertical", "thyStyle", "thyColor", "thyText", "thyTextDirection", "thyDeeper"] }], directives: [{ type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4$1.ThyImageDirective, selector: "img[thyImage]", inputs: ["thySrc", "thyPreviewSrc", "thyOriginSrc", "thyImageMeta", "thyDisablePreview"], exportAs: ["thyImage"] }, { type: i10.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i10.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i4$3.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }] });
3036
+ TheImageComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", 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, 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 #imageContent *ngIf=\"imageEntry.thumbUrl\" class=\"image-content\" [class.pointer]=\"!selection\">\n <img\n #img\n thyImage\n [ngStyle]=\"{ 'width.px': imageBindingWidth }\"\n [class.image-collapsed]=\"selection && !uploading\"\n class=\"main-image\"\n (load)=\"imageLoaded($event)\"\n (mousedown)=\"preventDefault($event)\"\n [thySrc]=\"imageEntry.thumbUrl\"\n [thyPreviewSrc]=\"imageEntry.thumbUrl\"\n [thyOriginSrc]=\"imageEntry.originUrl\"\n [thyImageMeta]=\"{ name: imageEntry.name, size: imageEntry.size }\"\n [alt]=\"imageEntry.name\"\n />\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\" [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 <thy-actions contenteditable=\"false\" thySize=\"xxs\">\n <ng-container *ngFor=\"let item of layoutOptions\">\n <a\n *ngIf=\"item.key !== 'split'\"\n href=\"javascript:;\"\n thyAction\n [thyType]=\"item.key === 'remove' ? 'danger' : 'primary'\"\n [thyActionIcon]=\"item.icon\"\n [thyActionActive]=\"layoutActive(item.key)\"\n [thyTooltip]=\"item.name\"\n thyTooltipPlacement=\"top\"\n (mousedown)=\"item?.handle($event, item.key)\"\n ></a>\n <thy-divider *ngIf=\"item.key === 'split'\" class=\"mx-2 align-self-center\" [thyVertical]=\"true\"></thy-divider>\n </ng-container>\n </thy-actions>\n</ng-template>\n", components: [{ type: i1.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }, { type: i6.ThyProgressComponent, selector: "thy-progress", inputs: ["thyType", "thySize", "thyValue", "thyMax", "thyTips"] }, { type: i2.ThyIconComponent, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { type: i3.ThyActionsComponent, selector: "thy-actions", inputs: ["thySize"] }, { type: i3.ThyActionComponent, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }, { type: i4$2.ThyDividerComponent, selector: "thy-divider", inputs: ["thyVertical", "thyStyle", "thyColor", "thyText", "thyTextDirection", "thyDeeper"] }], directives: [{ type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4$1.ThyImageDirective, selector: "img[thyImage]", inputs: ["thySrc", "thyPreviewSrc", "thyOriginSrc", "thyImageMeta", "thyDisablePreview", "thyResolveSize"], exportAs: ["thyImage"] }, { type: i10.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i10.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i4$3.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }] });
3037
3037
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: TheImageComponent, decorators: [{
3038
3038
  type: Component,
3039
3039
  args: [{ selector: 'the-image, [theImage]', 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 #imageContent *ngIf=\"imageEntry.thumbUrl\" class=\"image-content\" [class.pointer]=\"!selection\">\n <img\n #img\n thyImage\n [ngStyle]=\"{ 'width.px': imageBindingWidth }\"\n [class.image-collapsed]=\"selection && !uploading\"\n class=\"main-image\"\n (load)=\"imageLoaded($event)\"\n (mousedown)=\"preventDefault($event)\"\n [thySrc]=\"imageEntry.thumbUrl\"\n [thyPreviewSrc]=\"imageEntry.thumbUrl\"\n [thyOriginSrc]=\"imageEntry.originUrl\"\n [thyImageMeta]=\"{ name: imageEntry.name, size: imageEntry.size }\"\n [alt]=\"imageEntry.name\"\n />\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\" [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 <thy-actions contenteditable=\"false\" thySize=\"xxs\">\n <ng-container *ngFor=\"let item of layoutOptions\">\n <a\n *ngIf=\"item.key !== 'split'\"\n href=\"javascript:;\"\n thyAction\n [thyType]=\"item.key === 'remove' ? 'danger' : 'primary'\"\n [thyActionIcon]=\"item.icon\"\n [thyActionActive]=\"layoutActive(item.key)\"\n [thyTooltip]=\"item.name\"\n thyTooltipPlacement=\"top\"\n (mousedown)=\"item?.handle($event, item.key)\"\n ></a>\n <thy-divider *ngIf=\"item.key === 'split'\" class=\"mx-2 align-self-center\" [thyVertical]=\"true\"></thy-divider>\n </ng-container>\n </thy-actions>\n</ng-template>\n" }]
@@ -7830,7 +7830,6 @@ class TableStore {
7830
7830
  this.dangerousRowsIndex = [];
7831
7831
  this.isPrepareSelecting = false;
7832
7832
  this.isCellSelecting = false;
7833
- this.singleSelecting = false;
7834
7833
  this.isRightClicking = false;
7835
7834
  }
7836
7835
  get selectedCells() {
@@ -8058,7 +8057,6 @@ class TableStore {
8058
8057
  this.selectedRowsIndex = [];
8059
8058
  this.isSelectedTable = false;
8060
8059
  this.isCellSelecting = false;
8061
- this.singleSelecting = false;
8062
8060
  this.isRightClicking = false;
8063
8061
  this.selectedCells$.next([]);
8064
8062
  }
@@ -8103,10 +8101,6 @@ class TableStore {
8103
8101
  selectCellEnd(editor) {
8104
8102
  if (this.isCellSelecting) {
8105
8103
  this.focusCell(editor, this.focusCellPath);
8106
- this.singleSelecting = false;
8107
- }
8108
- if (this.preFocusCellPath === this.anchorCellPath) {
8109
- this.singleSelecting = true;
8110
8104
  }
8111
8105
  this.isPrepareSelecting = false;
8112
8106
  this.preFocusCellPath = null;
@@ -8382,15 +8376,15 @@ function resetTableCell(editor, table, cell, cellRow, cellCol) {
8382
8376
  });
8383
8377
  }
8384
8378
 
8385
- function setCellMenuInvisibility(editor, menuList, selectedCells, isActiveSelect) {
8379
+ function setCellMenuVisibility(editor, menuList, selectedCells, isActiveSelect) {
8386
8380
  const isCellMerged = isSelectedCellMerged(editor);
8387
8381
  const selectCellNodes = getSelectCellNode(editor, selectedCells).filter(item => !item.node.hidden);
8388
8382
  menuList.forEach(item => {
8389
8383
  if (item.key === 'merge-cells') {
8390
- item.invisibility = !(selectCellNodes && selectCellNodes.length > 1 && !isActiveSelect);
8384
+ item.visibility = selectCellNodes && selectCellNodes.length > 1 && !isActiveSelect;
8391
8385
  }
8392
8386
  if (item.key === 'split-cells') {
8393
- item.invisibility = !(selectCellNodes && selectCellNodes.length === 1 && isCellMerged && !isActiveSelect);
8387
+ item.visibility = selectCellNodes && selectCellNodes.length === 1 && isCellMerged && !isActiveSelect;
8394
8388
  }
8395
8389
  });
8396
8390
  }
@@ -8416,11 +8410,6 @@ class TheTableOptionsComponent {
8416
8410
  get table() {
8417
8411
  return this.tableStore && this.tableStore.getTableEntry(this.editor)[0];
8418
8412
  }
8419
- handleDocumentMouseDown(event) {
8420
- if (this.popoverRef && !document.querySelector('.table-options-pannel').contains(event.target)) {
8421
- this.popoverRef.close();
8422
- }
8423
- }
8424
8413
  ngOnInit() {
8425
8414
  this.setColumnOptions();
8426
8415
  }
@@ -8437,11 +8426,10 @@ class TheTableOptionsComponent {
8437
8426
  const tableOption = {};
8438
8427
  tableOption[option.key] = currentOption.isActive || null;
8439
8428
  this.tableStore.setTableOptions(this.editor, Object.assign(Object.assign({}, this.table.options), tableOption));
8440
- this.popoverRef.close();
8441
8429
  }
8442
8430
  }
8443
8431
  TheTableOptionsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: TheTableOptionsComponent, deps: [{ token: i1$1.ThyPopoverRef }], target: i0.ɵɵFactoryTarget.Component });
8444
- TheTableOptionsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", type: TheTableOptionsComponent, selector: "the-table-options", inputs: { tableStore: "tableStore", editor: "editor" }, host: { listeners: { "document: mousedown": "handleDocumentMouseDown($event)" } }, ngImport: i0, template: `
8432
+ TheTableOptionsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", type: TheTableOptionsComponent, selector: "the-table-options", inputs: { tableStore: "tableStore", editor: "editor" }, ngImport: i0, template: `
8445
8433
  <div class="thy-dropdown-menu table-drop-menu">
8446
8434
  <ng-container *ngFor="let option of tableDropdownList">
8447
8435
  <a thyDropdownMenuItem href="javascript:;" (mousedown)="setTableOptions($event, option)">
@@ -8474,9 +8462,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImpor
8474
8462
  type: Input
8475
8463
  }], editor: [{
8476
8464
  type: Input
8477
- }], handleDocumentMouseDown: [{
8478
- type: HostListener,
8479
- args: ['document: mousedown', ['$event']]
8480
8465
  }] } });
8481
8466
 
8482
8467
  class TheTableToolbarComponent {
@@ -8489,7 +8474,7 @@ class TheTableToolbarComponent {
8489
8474
  {
8490
8475
  key: 'merge-cells',
8491
8476
  name: '合并单元格',
8492
- invisibility: false,
8477
+ visibility: true,
8493
8478
  icon: 'table-merge-cells',
8494
8479
  actionHandle: () => {
8495
8480
  event.preventDefault();
@@ -8502,7 +8487,7 @@ class TheTableToolbarComponent {
8502
8487
  {
8503
8488
  key: 'split-cells',
8504
8489
  name: '拆分单元格',
8505
- invisibility: false,
8490
+ visibility: true,
8506
8491
  icon: 'table-unmerge-cells',
8507
8492
  actionHandle: () => {
8508
8493
  event.preventDefault();
@@ -8517,23 +8502,28 @@ class TheTableToolbarComponent {
8517
8502
  get editor() {
8518
8503
  return this.tableStore && this.tableStore.editor;
8519
8504
  }
8520
- get singleSelecting() {
8521
- return this.tableStore.singleSelecting;
8505
+ get deleteIcon() {
8506
+ this.getIconName(DeleteIcon[this.getDeleteIcon()]);
8507
+ return DeleteIcon[this.getDeleteIcon()];
8522
8508
  }
8523
8509
  get isShowSplitLine() {
8524
- return this.cellMenuList.filter(item => !item.invisibility).length > 1;
8510
+ return this.cellMenuList.filter(item => item.visibility).length > 1;
8511
+ }
8512
+ get hasSelectedCells() {
8513
+ return this.tableStore.selectedCells && this.tableStore.selectedCells.length > 0;
8525
8514
  }
8526
8515
  get tableOptions() {
8527
8516
  return getPluginOptions(this.editor, PluginKeys.table);
8528
8517
  }
8529
8518
  ngOnInit() {
8530
- this.deleteIcon = DeleteIcon[this.getDeleteIcon()];
8531
- this.getIconName(this.deleteIcon);
8532
- setCellMenuInvisibility(this.editor, this.cellMenuList, this.tableStore.selectedCells, this.isActiveSelect);
8533
8519
  this.selectedColor = this.tableStore.getSelectedCellBackgroundColor();
8520
+ setCellMenuVisibility(this.editor, this.cellMenuList, this.tableStore.selectedCells, false);
8534
8521
  }
8535
8522
  ngOnDestroy() {
8536
8523
  this.colorSelectService.closeColorSelect();
8524
+ if (this.optionsPopoverRef) {
8525
+ this.optionsPopoverRef.close();
8526
+ }
8537
8527
  }
8538
8528
  getIconName(key) {
8539
8529
  switch (key) {
@@ -8600,14 +8590,14 @@ class TheTableToolbarComponent {
8600
8590
  openTableOptionMenu(event) {
8601
8591
  event.preventDefault();
8602
8592
  event.stopPropagation();
8603
- this.thyPopover.open(TheTableOptionsComponent, {
8593
+ this.optionsPopoverRef = this.thyPopover.open(TheTableOptionsComponent, {
8604
8594
  origin: event.currentTarget,
8605
8595
  initialState: {
8606
8596
  tableStore: this.tableStore,
8607
8597
  editor: this.editor
8608
8598
  },
8609
8599
  minWidth: 0,
8610
- insideClosable: false,
8600
+ insideClosable: true,
8611
8601
  hasBackdrop: false,
8612
8602
  placement: 'bottomLeft',
8613
8603
  originActiveClass: 'active',
@@ -8616,14 +8606,12 @@ class TheTableToolbarComponent {
8616
8606
  }
8617
8607
  }
8618
8608
  TheTableToolbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: TheTableToolbarComponent, deps: [{ token: i0.NgZone }, { token: TheColorSelectService }, { token: i1$1.ThyPopover }, { token: i1$1.ThyPopoverRef }], target: i0.ɵɵFactoryTarget.Component });
8619
- TheTableToolbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", type: TheTableToolbarComponent, selector: "the-table-toolbar", inputs: { tableStore: "tableStore", isActiveSelect: "isActiveSelect", tableElement: "tableElement" }, ngImport: i0, template: "<thy-actions thySize=\"xxs\">\n <ng-container *ngFor=\"let item of cellMenuList\">\n <a\n *ngIf=\"!item.invisibility\"\n href=\"javascript:;\"\n thyAction\n [thyActionIcon]=\"item.icon\"\n [thyTooltip]=\"item.name\"\n (mousedown)=\"item.actionHandle()\"\n ></a>\n </ng-container>\n <thy-divider *ngIf=\"!isActiveSelect && isShowSplitLine\" class=\"mx-2 align-self-center\" [thyVertical]=\"true\"> </thy-divider>\n <a href=\"javascript:;\" *ngIf=\"!singleSelecting\" thyAction thyTooltip=\"\u5355\u5143\u683C\u80CC\u666F\" (mousedown)=\"openSelectColor($event)\">\n <thy-icon thyIconName=\"background-tt\" thyIconType=\"twotone\" [thyTwotoneColor]=\"selectedColor\"></thy-icon>\n </a>\n <a href=\"javascript:;\" *ngIf=\"tableOptions?.showFullscreen\" thyAction thyTooltip=\"\u5168\u5C4F\" (mousedown)=\"setFullscreen($event)\">\n <thy-icon thyIconName=\"arrows-alt\"></thy-icon>\n </a>\n\n <ng-container *ngIf=\"tableStore.isSelectedTable\">\n <thy-divider class=\"mx-2 align-self-center\" [thyVertical]=\"true\"></thy-divider>\n <a href=\"javascript:;\" class=\"link-with-down\" thyAction (mousedown)=\"openTableOptionMenu($event)\">\n <span>\u8868\u683C\u9009\u9879</span>\n <thy-icon thyIconName=\"caret-down\"></thy-icon>\n </a>\n </ng-container>\n\n <ng-container *ngIf=\"tableOptions?.showFullscreen ? deleteIcon : deleteIcon && !tableStore.isSelectedTable\">\n <thy-divider class=\"mx-2 align-self-center\" [thyVertical]=\"true\"></thy-divider>\n <a\n href=\"javascript:;\"\n thyAction\n thyType=\"danger\"\n [thyActionIcon]=\"deleteIcon\"\n [thyTooltip]=\"iconName\"\n (mousedown)=\"onDelete($event)\"\n (mouseenter)=\"onEnterDelete($event)\"\n (mouseleave)=\"onLeaveDelete($event)\"\n ></a>\n </ng-container>\n</thy-actions>\n", components: [{ type: i3.ThyActionsComponent, selector: "thy-actions", inputs: ["thySize"] }, { type: i3.ThyActionComponent, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }, { type: i4$2.ThyDividerComponent, selector: "thy-divider", inputs: ["thyVertical", "thyStyle", "thyColor", "thyText", "thyTextDirection", "thyDeeper"] }, { type: i2.ThyIconComponent, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }], directives: [{ type: i10.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4$3.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }] });
8609
+ TheTableToolbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", type: TheTableToolbarComponent, selector: "the-table-toolbar", inputs: { tableStore: "tableStore", tableElement: "tableElement" }, ngImport: i0, template: "<thy-actions thySize=\"xxs\">\n <ng-container *ngFor=\"let item of cellMenuList\">\n <a\n *ngIf=\"item.visibility\"\n href=\"javascript:;\"\n thyAction\n [thyActionIcon]=\"item.icon\"\n [thyTooltip]=\"item.name\"\n (mousedown)=\"item.actionHandle()\"\n ></a>\n </ng-container>\n <thy-divider *ngIf=\"isShowSplitLine && hasSelectedCells\" class=\"mx-2 align-self-center\" [thyVertical]=\"true\"> </thy-divider>\n <a *ngIf=\"hasSelectedCells\" href=\"javascript:;\" thyAction thyTooltip=\"\u5355\u5143\u683C\u80CC\u666F\" (mousedown)=\"openSelectColor($event)\">\n <thy-icon thyIconName=\"background-tt\" thyIconType=\"twotone\" [thyTwotoneColor]=\"selectedColor\"></thy-icon>\n </a>\n <a href=\"javascript:;\" *ngIf=\"tableOptions?.showFullscreen\" thyAction thyTooltip=\"\u5168\u5C4F\" (mousedown)=\"setFullscreen($event)\">\n <thy-icon thyIconName=\"arrows-alt\"></thy-icon>\n </a>\n\n <thy-divider *ngIf=\"tableOptions?.showFullscreen || hasSelectedCells\" class=\"mx-2 align-self-center\" [thyVertical]=\"true\"></thy-divider>\n <a href=\"javascript:;\" class=\"link-with-down\" thyAction (mousedown)=\"openTableOptionMenu($event)\">\n <span>\u8868\u683C\u9009\u9879</span>\n <thy-icon thyIconName=\"caret-down\"></thy-icon>\n </a>\n\n <ng-container *ngIf=\"tableOptions?.showFullscreen ? deleteIcon : deleteIcon && !tableStore.isSelectedTable\">\n <thy-divider class=\"mx-2 align-self-center\" [thyVertical]=\"true\"></thy-divider>\n <a\n href=\"javascript:;\"\n thyAction\n thyType=\"danger\"\n [thyActionIcon]=\"deleteIcon\"\n [thyTooltip]=\"iconName\"\n (mousedown)=\"onDelete($event)\"\n (mouseenter)=\"onEnterDelete($event)\"\n (mouseleave)=\"onLeaveDelete($event)\"\n ></a>\n </ng-container>\n</thy-actions>\n", components: [{ type: i3.ThyActionsComponent, selector: "thy-actions", inputs: ["thySize"] }, { type: i3.ThyActionComponent, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }, { type: i4$2.ThyDividerComponent, selector: "thy-divider", inputs: ["thyVertical", "thyStyle", "thyColor", "thyText", "thyTextDirection", "thyDeeper"] }, { type: i2.ThyIconComponent, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }], directives: [{ type: i10.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4$3.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }] });
8620
8610
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: TheTableToolbarComponent, decorators: [{
8621
8611
  type: Component,
8622
- args: [{ selector: 'the-table-toolbar', template: "<thy-actions thySize=\"xxs\">\n <ng-container *ngFor=\"let item of cellMenuList\">\n <a\n *ngIf=\"!item.invisibility\"\n href=\"javascript:;\"\n thyAction\n [thyActionIcon]=\"item.icon\"\n [thyTooltip]=\"item.name\"\n (mousedown)=\"item.actionHandle()\"\n ></a>\n </ng-container>\n <thy-divider *ngIf=\"!isActiveSelect && isShowSplitLine\" class=\"mx-2 align-self-center\" [thyVertical]=\"true\"> </thy-divider>\n <a href=\"javascript:;\" *ngIf=\"!singleSelecting\" thyAction thyTooltip=\"\u5355\u5143\u683C\u80CC\u666F\" (mousedown)=\"openSelectColor($event)\">\n <thy-icon thyIconName=\"background-tt\" thyIconType=\"twotone\" [thyTwotoneColor]=\"selectedColor\"></thy-icon>\n </a>\n <a href=\"javascript:;\" *ngIf=\"tableOptions?.showFullscreen\" thyAction thyTooltip=\"\u5168\u5C4F\" (mousedown)=\"setFullscreen($event)\">\n <thy-icon thyIconName=\"arrows-alt\"></thy-icon>\n </a>\n\n <ng-container *ngIf=\"tableStore.isSelectedTable\">\n <thy-divider class=\"mx-2 align-self-center\" [thyVertical]=\"true\"></thy-divider>\n <a href=\"javascript:;\" class=\"link-with-down\" thyAction (mousedown)=\"openTableOptionMenu($event)\">\n <span>\u8868\u683C\u9009\u9879</span>\n <thy-icon thyIconName=\"caret-down\"></thy-icon>\n </a>\n </ng-container>\n\n <ng-container *ngIf=\"tableOptions?.showFullscreen ? deleteIcon : deleteIcon && !tableStore.isSelectedTable\">\n <thy-divider class=\"mx-2 align-self-center\" [thyVertical]=\"true\"></thy-divider>\n <a\n href=\"javascript:;\"\n thyAction\n thyType=\"danger\"\n [thyActionIcon]=\"deleteIcon\"\n [thyTooltip]=\"iconName\"\n (mousedown)=\"onDelete($event)\"\n (mouseenter)=\"onEnterDelete($event)\"\n (mouseleave)=\"onLeaveDelete($event)\"\n ></a>\n </ng-container>\n</thy-actions>\n" }]
8612
+ args: [{ selector: 'the-table-toolbar', template: "<thy-actions thySize=\"xxs\">\n <ng-container *ngFor=\"let item of cellMenuList\">\n <a\n *ngIf=\"item.visibility\"\n href=\"javascript:;\"\n thyAction\n [thyActionIcon]=\"item.icon\"\n [thyTooltip]=\"item.name\"\n (mousedown)=\"item.actionHandle()\"\n ></a>\n </ng-container>\n <thy-divider *ngIf=\"isShowSplitLine && hasSelectedCells\" class=\"mx-2 align-self-center\" [thyVertical]=\"true\"> </thy-divider>\n <a *ngIf=\"hasSelectedCells\" href=\"javascript:;\" thyAction thyTooltip=\"\u5355\u5143\u683C\u80CC\u666F\" (mousedown)=\"openSelectColor($event)\">\n <thy-icon thyIconName=\"background-tt\" thyIconType=\"twotone\" [thyTwotoneColor]=\"selectedColor\"></thy-icon>\n </a>\n <a href=\"javascript:;\" *ngIf=\"tableOptions?.showFullscreen\" thyAction thyTooltip=\"\u5168\u5C4F\" (mousedown)=\"setFullscreen($event)\">\n <thy-icon thyIconName=\"arrows-alt\"></thy-icon>\n </a>\n\n <thy-divider *ngIf=\"tableOptions?.showFullscreen || hasSelectedCells\" class=\"mx-2 align-self-center\" [thyVertical]=\"true\"></thy-divider>\n <a href=\"javascript:;\" class=\"link-with-down\" thyAction (mousedown)=\"openTableOptionMenu($event)\">\n <span>\u8868\u683C\u9009\u9879</span>\n <thy-icon thyIconName=\"caret-down\"></thy-icon>\n </a>\n\n <ng-container *ngIf=\"tableOptions?.showFullscreen ? deleteIcon : deleteIcon && !tableStore.isSelectedTable\">\n <thy-divider class=\"mx-2 align-self-center\" [thyVertical]=\"true\"></thy-divider>\n <a\n href=\"javascript:;\"\n thyAction\n thyType=\"danger\"\n [thyActionIcon]=\"deleteIcon\"\n [thyTooltip]=\"iconName\"\n (mousedown)=\"onDelete($event)\"\n (mouseenter)=\"onEnterDelete($event)\"\n (mouseleave)=\"onLeaveDelete($event)\"\n ></a>\n </ng-container>\n</thy-actions>\n" }]
8623
8613
  }], ctorParameters: function () { return [{ type: i0.NgZone }, { type: TheColorSelectService }, { type: i1$1.ThyPopover }, { type: i1$1.ThyPopoverRef }]; }, propDecorators: { tableStore: [{
8624
8614
  type: Input
8625
- }], isActiveSelect: [{
8626
- type: Input
8627
8615
  }], tableElement: [{
8628
8616
  type: Input
8629
8617
  }] } });
@@ -8678,10 +8666,10 @@ class TheContextMenuComponent {
8678
8666
  ngOnInit() { }
8679
8667
  }
8680
8668
  TheContextMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: TheContextMenuComponent, deps: [{ token: i0.ElementRef }, { token: i1$1.ThyPopoverRef }], target: i0.ɵɵFactoryTarget.Component });
8681
- TheContextMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", 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, template: "<div class=\"thy-dropdown-menu\">\n <ng-container *ngFor=\"let menuItem of menuEntities\">\n <a\n *ngIf=\"!menuItem.invisibility\"\n href=\"javascript:;\"\n thyDropdownMenuItem\n (mousedown)=\"itemMousedown($event, menuItem)\"\n (mouseenter)=\"itemMouseenter($event, menuItem)\"\n (mouseleave)=\"itemMouseleave($event, menuItem)\"\n >\n <span thyDropdownMenuItemIcon>\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 thyDropdownMenuItemName>{{ menuItem.name }}</span>\n <span *ngIf=\"menuItem.extendIcon\" thyDropdownMenuItemExtendIcon>\n <thy-icon thyIconName=\"{{ menuItem.extendIcon }}\"></thy-icon>\n </span>\n </a>\n <thy-dropdown-menu-divider *ngIf=\"menuItem.divider\"></thy-dropdown-menu-divider>\n </ng-container>\n</div>\n", components: [{ 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.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5$1.ThyDropdownMenuItemDirective, selector: "[thyDropdownMenuItem]", inputs: ["thyType", "thyDisabled"] }, { type: i5$1.ThyDropdownMenuItemIconDirective, selector: "[thyDropdownMenuItemIcon]" }, { type: i5$1.ThyDropdownMenuItemNameDirective, selector: "[thyDropdownMenuItemName]" }, { type: i5$1.ThyDropdownMenuItemExtendIconDirective, selector: "[thyDropdownMenuItemExtendIcon]" }] });
8669
+ TheContextMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", 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, template: "<div class=\"thy-dropdown-menu\">\n <ng-container *ngFor=\"let menuItem of menuEntities\">\n <a\n *ngIf=\"menuItem.visibility\"\n href=\"javascript:;\"\n thyDropdownMenuItem\n (mousedown)=\"itemMousedown($event, menuItem)\"\n (mouseenter)=\"itemMouseenter($event, menuItem)\"\n (mouseleave)=\"itemMouseleave($event, menuItem)\"\n >\n <span thyDropdownMenuItemIcon>\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 thyDropdownMenuItemName>{{ menuItem.name }}</span>\n <span *ngIf=\"menuItem.extendIcon\" thyDropdownMenuItemExtendIcon>\n <thy-icon thyIconName=\"{{ menuItem.extendIcon }}\"></thy-icon>\n </span>\n </a>\n <thy-dropdown-menu-divider *ngIf=\"menuItem.divider\"></thy-dropdown-menu-divider>\n </ng-container>\n</div>\n", components: [{ 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.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5$1.ThyDropdownMenuItemDirective, selector: "[thyDropdownMenuItem]", inputs: ["thyType", "thyDisabled"] }, { type: i5$1.ThyDropdownMenuItemIconDirective, selector: "[thyDropdownMenuItemIcon]" }, { type: i5$1.ThyDropdownMenuItemNameDirective, selector: "[thyDropdownMenuItemName]" }, { type: i5$1.ThyDropdownMenuItemExtendIconDirective, selector: "[thyDropdownMenuItemExtendIcon]" }] });
8682
8670
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: TheContextMenuComponent, decorators: [{
8683
8671
  type: Component,
8684
- args: [{ selector: 'the-contextmenu', template: "<div class=\"thy-dropdown-menu\">\n <ng-container *ngFor=\"let menuItem of menuEntities\">\n <a\n *ngIf=\"!menuItem.invisibility\"\n href=\"javascript:;\"\n thyDropdownMenuItem\n (mousedown)=\"itemMousedown($event, menuItem)\"\n (mouseenter)=\"itemMouseenter($event, menuItem)\"\n (mouseleave)=\"itemMouseleave($event, menuItem)\"\n >\n <span thyDropdownMenuItemIcon>\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 thyDropdownMenuItemName>{{ menuItem.name }}</span>\n <span *ngIf=\"menuItem.extendIcon\" thyDropdownMenuItemExtendIcon>\n <thy-icon thyIconName=\"{{ menuItem.extendIcon }}\"></thy-icon>\n </span>\n </a>\n <thy-dropdown-menu-divider *ngIf=\"menuItem.divider\"></thy-dropdown-menu-divider>\n </ng-container>\n</div>\n" }]
8672
+ args: [{ selector: 'the-contextmenu', template: "<div class=\"thy-dropdown-menu\">\n <ng-container *ngFor=\"let menuItem of menuEntities\">\n <a\n *ngIf=\"menuItem.visibility\"\n href=\"javascript:;\"\n thyDropdownMenuItem\n (mousedown)=\"itemMousedown($event, menuItem)\"\n (mouseenter)=\"itemMouseenter($event, menuItem)\"\n (mouseleave)=\"itemMouseleave($event, menuItem)\"\n >\n <span thyDropdownMenuItemIcon>\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 thyDropdownMenuItemName>{{ menuItem.name }}</span>\n <span *ngIf=\"menuItem.extendIcon\" thyDropdownMenuItemExtendIcon>\n <thy-icon thyIconName=\"{{ menuItem.extendIcon }}\"></thy-icon>\n </span>\n </a>\n <thy-dropdown-menu-divider *ngIf=\"menuItem.divider\"></thy-dropdown-menu-divider>\n </ng-container>\n</div>\n" }]
8685
8673
  }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1$1.ThyPopoverRef }]; }, propDecorators: { menuEntities: [{
8686
8674
  type: Input
8687
8675
  }], actionHandle: [{
@@ -8715,6 +8703,7 @@ class TheTableContextMenuService {
8715
8703
  divider: true,
8716
8704
  name: '单元格背景',
8717
8705
  extendIcon: 'angle-right',
8706
+ visibility: true,
8718
8707
  actionHandle: () => { },
8719
8708
  activeHandle: (event) => {
8720
8709
  if (this.colorSelectService.isOpenColorSelect) {
@@ -8751,6 +8740,7 @@ class TheTableContextMenuService {
8751
8740
  icon: 'sweep',
8752
8741
  divider: true,
8753
8742
  name: '清空选中区域',
8743
+ visibility: true,
8754
8744
  actionHandle: () => {
8755
8745
  this.tableStore.clearSelectedCellsContent();
8756
8746
  this.tableStore.selectFirstCell();
@@ -8760,6 +8750,7 @@ class TheTableContextMenuService {
8760
8750
  key: 'merge-cells',
8761
8751
  icon: 'table-merge-cells',
8762
8752
  name: '合并单元格',
8753
+ visibility: true,
8763
8754
  actionHandle: () => {
8764
8755
  this.tableStore.mergeCell(this.editor);
8765
8756
  }
@@ -8769,6 +8760,7 @@ class TheTableContextMenuService {
8769
8760
  icon: 'table-unmerge-cells',
8770
8761
  name: '拆分单元格',
8771
8762
  divider: true,
8763
+ visibility: true,
8772
8764
  actionHandle: () => {
8773
8765
  splitCell(this.editor);
8774
8766
  }
@@ -8777,6 +8769,7 @@ class TheTableContextMenuService {
8777
8769
  key: 'delete-selection-rows',
8778
8770
  icon: 'table-delete-rows',
8779
8771
  name: '删除所在行',
8772
+ visibility: true,
8780
8773
  actionHandle: () => {
8781
8774
  this.tableStore.removeDangerousRows();
8782
8775
  this.tableStore.clearDangerousCells();
@@ -8791,6 +8784,7 @@ class TheTableContextMenuService {
8791
8784
  icon: 'table-delete-columns',
8792
8785
  divider: true,
8793
8786
  name: '删除所在列',
8787
+ visibility: true,
8794
8788
  actionHandle: () => {
8795
8789
  this.tableStore.removeDangerousColumns();
8796
8790
  this.tableStore.clearDangerousCells();
@@ -8803,6 +8797,7 @@ class TheTableContextMenuService {
8803
8797
  key: 'delete-table',
8804
8798
  icon: 'trash',
8805
8799
  name: '删除表格',
8800
+ visibility: true,
8806
8801
  actionHandle: () => {
8807
8802
  TableEditor.removeTable(this.editor);
8808
8803
  this.tableStore.clearDangerousCells();
@@ -8824,7 +8819,7 @@ class TheTableContextMenuService {
8824
8819
  }
8825
8820
  openMenuList(event) {
8826
8821
  this.ngZone.run(() => {
8827
- setCellMenuInvisibility(this.editor, this.menuEntities, this.tableStore.selectedCells);
8822
+ setCellMenuVisibility(this.editor, this.menuEntities, this.tableStore.selectedCells);
8828
8823
  this.menuEntities.forEach(item => {
8829
8824
  if (item.key === 'background-color') {
8830
8825
  item.backgroundColor = this.tableStore.getSelectedCellBackgroundColor();
@@ -8897,20 +8892,17 @@ class TableService {
8897
8892
  get isOpened() {
8898
8893
  return this.toolbarRef && this.toolbarRef.componentInstance;
8899
8894
  }
8900
- openToolbar(origin, tableElement, isActiveSelect) {
8901
- this.theTableContextMenuService.closeContextMenu();
8895
+ openToolbar(origin, tableElement) {
8902
8896
  if (this.isOpened) {
8903
8897
  if (this.toolbarRef.containerInstance.config.origin === origin) {
8904
8898
  return;
8905
8899
  }
8906
- this.toolbarRef.close();
8907
8900
  }
8908
- this.offset = this.tableStore.singleSelecting ? 24 : 8;
8901
+ this.offset = 0;
8909
8902
  this.toolbarRef = this.thyPopover.open(TheTableToolbarComponent, {
8910
8903
  initialState: {
8911
8904
  tableStore: this.tableStore,
8912
- tableElement,
8913
- isActiveSelect
8905
+ tableElement
8914
8906
  },
8915
8907
  viewContainerRef: this.theContextService.getOptions().viewContainerRef,
8916
8908
  origin: this.getOrigin(origin),
@@ -8924,7 +8916,6 @@ class TableService {
8924
8916
  scrollStrategy: this.overlay.scrollStrategies.reposition(),
8925
8917
  manualClosure: true
8926
8918
  });
8927
- this._listenCellClearEvent();
8928
8919
  }
8929
8920
  getOrigin(origin) {
8930
8921
  if (origin instanceof HTMLTableCellElement && origin.tagName !== 'TH') {
@@ -8951,19 +8942,23 @@ class TableService {
8951
8942
  return this.toolbarRef.afterClosed();
8952
8943
  }
8953
8944
  }
8954
- _listenCellClearEvent() {
8955
- const onMouseObservable = merge(fromEvent(document, 'mousedown').pipe(filter((e) => e.button !== 2)), fromEvent(document, 'keydown').pipe(filter((e) => {
8945
+ updateMenu(isActive) {
8946
+ var _a, _b;
8947
+ if ((_b = (_a = this.toolbarRef) === null || _a === void 0 ? void 0 : _a.componentInstance) === null || _b === void 0 ? void 0 : _b.cellMenuList) {
8948
+ setCellMenuVisibility(this.tableStore.editor, this.toolbarRef.componentInstance.cellMenuList, this.tableStore.selectedCells, isActive);
8949
+ }
8950
+ }
8951
+ listenCellClearEvent() {
8952
+ merge(fromEvent(document, 'mousedown').pipe(filter((e) => e.button !== 2)), fromEvent(document, 'keydown').pipe(filter((e) => {
8956
8953
  return !isVirtualKey(e);
8957
8954
  })))
8958
8955
  .pipe(take(1))
8959
8956
  .subscribe((e) => {
8960
- if ((this.tableStore.selectedCells && this.tableStore.selectedCells.length > 0) || this.tableStore.singleSelecting) {
8957
+ if (this.tableStore.selectedCells && this.tableStore.selectedCells.length > 0) {
8961
8958
  if (e.type === 'keydown') {
8962
8959
  this.tableStore.clearSelectedCellsContent();
8963
8960
  }
8964
8961
  this.tableStore.clearSelectedCells();
8965
- this.closeToolbar();
8966
- onMouseObservable.unsubscribe();
8967
8962
  }
8968
8963
  });
8969
8964
  }
@@ -9213,6 +9208,16 @@ class TheTableComponent extends TheBaseElementComponent {
9213
9208
  });
9214
9209
  this.getIsInTable();
9215
9210
  this.getColControls();
9211
+ if (this.isCollapsed) {
9212
+ this.ngZone.run(() => {
9213
+ this.tableService.openToolbar(this.tableWrapper.nativeElement, this.element);
9214
+ });
9215
+ }
9216
+ else {
9217
+ if (!this.tableStore.isCellSelecting) {
9218
+ this.tableService.closeToolbar();
9219
+ }
9220
+ }
9216
9221
  }
9217
9222
  }
9218
9223
  ngOnInit() {
@@ -9239,7 +9244,9 @@ class TheTableComponent extends TheBaseElementComponent {
9239
9244
  this.subscribeCellPositionChange();
9240
9245
  this.listenTableContextMenuEvent();
9241
9246
  // 水平滚动时处理滚动阴影
9242
- fromEvent(this.tableWrapper.nativeElement, 'scroll').pipe(takeUntil(this.destroy$)).subscribe(() => {
9247
+ fromEvent(this.tableWrapper.nativeElement, 'scroll')
9248
+ .pipe(takeUntil(this.destroy$))
9249
+ .subscribe(() => {
9243
9250
  this.bindTableScrollingShadow();
9244
9251
  });
9245
9252
  if ((_a = this.element.options) === null || _a === void 0 ? void 0 : _a.numberedColumn) {
@@ -9426,10 +9433,10 @@ class TheTableComponent extends TheBaseElementComponent {
9426
9433
  event.stopPropagation();
9427
9434
  event.preventDefault();
9428
9435
  if (!!this.selection && this.isInTable) {
9429
- this.tableStore.singleSelecting = false;
9430
9436
  this.tableStore.clearDangerousCells();
9431
9437
  this.tableStore.selectColumn(this.editor, index);
9432
- this.tableService.openToolbar(event.target, this.element, true);
9438
+ this.tableService.updateMenu(true);
9439
+ // this.tableService.openToolbar(this.tableWrapper.nativeElement, this.element, true);
9433
9440
  }
9434
9441
  }
9435
9442
  getIsInTable() {
@@ -9498,15 +9505,14 @@ class TheTableComponent extends TheBaseElementComponent {
9498
9505
  const path = TheEditor.findPath(this.editor, this.element);
9499
9506
  Transforms.select(this.editor, path);
9500
9507
  }
9501
- this.tableStore.singleSelecting = false;
9502
9508
  this.tableStore.selectRow(this.editor, index);
9503
- this.tableService.openToolbar(event.target, this.element, true);
9509
+ this.tableService.updateMenu(true);
9504
9510
  }
9505
9511
  onSelectTable(event) {
9506
9512
  event.stopPropagation();
9507
9513
  event.preventDefault();
9508
9514
  this.tableStore.selectTable(this.editor);
9509
- this.tableService.openToolbar(event.target, this.element);
9515
+ this.tableService.updateMenu(false);
9510
9516
  }
9511
9517
  listenTableContextMenuEvent() {
9512
9518
  this.ngZone.runOutsideAngular(() => {
@@ -9564,6 +9570,7 @@ class TheTableComponent extends TheBaseElementComponent {
9564
9570
  super.ngOnDestroy();
9565
9571
  this.destroy$.next();
9566
9572
  this.destroy$.complete();
9573
+ this.tableService.closeToolbar();
9567
9574
  }
9568
9575
  }
9569
9576
  TheTableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: TheTableComponent, deps: [{ token: i0.ElementRef }, { token: TableCellEventDispatcher }, { token: ColumnResizeNotifierSource }, { token: TableStore }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: TableService }, { token: TheTableContextMenuService }, { token: i6$1.ScrollDispatcher }], target: i0.ɵɵFactoryTarget.Component });
@@ -10308,16 +10315,8 @@ class TheTdComponent extends TheBaseElementComponent {
10308
10315
  .pipe(take(1))
10309
10316
  .subscribe(() => {
10310
10317
  this.tableStore.selectCellEnd(this.editor);
10311
- if (this.tableStore.isCellSelecting) {
10312
- this.ngZone.run(() => {
10313
- this.tableComponent.tableService.openToolbar(this.tableStore.focusCellElement, this.tableComponent.element);
10314
- });
10315
- }
10316
- else if (!this.readonly && this.tableStore.singleSelecting && this.tableToolbarOption.showFullscreen) {
10317
- this.ngZone.run(() => {
10318
- this.tableComponent.tableService.openToolbar(this.tableComponent.theTableElement.nativeElement, this.tableComponent.element);
10319
- });
10320
- }
10318
+ this.tableService.updateMenu(false);
10319
+ this.tableService.listenCellClearEvent();
10321
10320
  mouseoverObservable.unsubscribe();
10322
10321
  });
10323
10322
  }
@@ -10796,7 +10795,6 @@ class TheTableToolbarItemComponent extends TheBaseToolbarItem {
10796
10795
  }
10797
10796
  toggleTableSelect(event, optionsParam) {
10798
10797
  if (this.isOpenTableSelect) {
10799
- this.tableSelectRef.close();
10800
10798
  return;
10801
10799
  }
10802
10800
  this.tableSelectRef = this.thyPopover.open(TheTableSelectComponent, {
@@ -11213,7 +11211,6 @@ const withTable = (editor) => {
11213
11211
  else {
11214
11212
  tableComponent.tableStore.clearSelectedCellsContent();
11215
11213
  }
11216
- tableComponent.tableService.closeToolbar();
11217
11214
  });
11218
11215
  return;
11219
11216
  }