@worktile/theia 15.1.2 → 15.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/components/contextmenu/contextmenu.component.d.ts +1 -0
- package/components/index.scss +0 -1
- package/constants/color-select.d.ts +0 -11
- package/core/toolbar-item/base-toolbar-item.d.ts +1 -1
- package/editor.component.d.ts +1 -0
- package/editor.module.d.ts +61 -63
- package/esm2020/components/contextmenu/contextmenu.component.mjs +12 -3
- package/esm2020/constants/color-select.mjs +1 -60
- package/esm2020/core/toolbar-item/base-toolbar-item.mjs +2 -2
- package/esm2020/core/with-theia.mjs +2 -1
- package/esm2020/editor.component.mjs +14 -5
- package/esm2020/editor.module.mjs +1 -4
- package/esm2020/interfaces/editor.mjs +1 -1
- package/esm2020/plugins/color/color.editor.mjs +2 -19
- package/esm2020/plugins/color/toolbar-item.component.mjs +17 -13
- package/esm2020/plugins/common/common.plugin.mjs +21 -1
- package/esm2020/plugins/table/components/table.component.mjs +14 -7
- package/esm2020/plugins/table/components/toolbar/table-toolbar.component.mjs +19 -35
- package/esm2020/plugins/table/table.service.mjs +17 -1
- package/esm2020/plugins/table/table.types.mjs +1 -1
- package/esm2020/plugins/table/utils/cell-position.mjs +4 -1
- package/esm2020/plugins/table/utils/set-cells-background-color.mjs +22 -0
- package/esm2020/services/table-contextmenu.service.mjs +10 -31
- package/esm2020/utils/color-picker.mjs +15 -0
- package/fesm2015/worktile-theia.mjs +149 -312
- package/fesm2015/worktile-theia.mjs.map +1 -1
- package/fesm2020/worktile-theia.mjs +149 -312
- package/fesm2020/worktile-theia.mjs.map +1 -1
- package/interfaces/editor.d.ts +1 -0
- package/package.json +1 -1
- package/plugins/color/color.editor.d.ts +0 -1
- package/plugins/color/toolbar-item.component.d.ts +3 -4
- package/plugins/common/common.plugin.d.ts +1 -0
- package/plugins/table/components/table.component.d.ts +3 -0
- package/plugins/table/components/toolbar/table-toolbar.component.d.ts +4 -6
- package/plugins/table/table.types.d.ts +1 -1
- package/plugins/table/utils/set-cells-background-color.d.ts +3 -0
- package/services/table-contextmenu.service.d.ts +1 -3
- package/utils/color-picker.d.ts +3 -0
- package/components/color-select/color-select.component.d.ts +0 -32
- package/components/color-select/color-select.component.scss +0 -109
- package/esm2020/components/color-select/color-select.component.mjs +0 -109
- package/esm2020/services/color-select.service.mjs +0 -51
- package/services/color-select.service.d.ts +0 -20
|
@@ -2,7 +2,7 @@ import * as i2 from '@angular/common';
|
|
|
2
2
|
import { DOCUMENT, CommonModule } from '@angular/common';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
4
|
import { Component, ChangeDetectionStrategy, HostBinding, InjectionToken, Pipe, TemplateRef, ViewChild, Directive, Input, HostListener, ViewContainerRef, Inject, Injectable, ElementRef, ChangeDetectorRef, Optional, SkipSelf, ContentChildren, forwardRef, EventEmitter, Output, ViewChildren, NgModule } from '@angular/core';
|
|
5
|
-
import * as
|
|
5
|
+
import * as i2$2 from '@angular/forms';
|
|
6
6
|
import { NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
|
|
7
7
|
import * as i1 from 'slate-angular';
|
|
8
8
|
import { BaseElementComponent, BaseTextComponent, NODE_TO_PARENT, NODE_TO_INDEX, AngularEditor, hotkeys, IS_SAFARI, ELEMENT_TO_COMPONENT, hasBlockCard, isCardLeft, FAKE_RIGHT_BLOCK_CARD_OFFSET, getPlainText as getPlainText$1, EDITOR_TO_ELEMENT, withAngular, SlateModule } from 'slate-angular';
|
|
@@ -27,9 +27,9 @@ import * as i8$1 from 'ngx-tethys/divider';
|
|
|
27
27
|
import { ThyDividerComponent, ThyDividerModule } from 'ngx-tethys/divider';
|
|
28
28
|
import { mixinUnsubscribe, MixinBase, ScrollToService } from 'ngx-tethys/core';
|
|
29
29
|
import { isKeyHotkey } from 'is-hotkey';
|
|
30
|
-
import { Subject, fromEvent, timer, combineLatest, Observable, BehaviorSubject, merge, ReplaySubject } from 'rxjs';
|
|
30
|
+
import { Subject, fromEvent, timer, combineLatest, Observable, BehaviorSubject, merge, ReplaySubject, takeUntil as takeUntil$1 } from 'rxjs';
|
|
31
31
|
import { takeUntil, debounceTime, take, delay, map as map$1, filter, startWith, distinctUntilChanged, skip, share, mapTo, pairwise } from 'rxjs/operators';
|
|
32
|
-
import * as
|
|
32
|
+
import * as i6$1 from 'ngx-tethys/input';
|
|
33
33
|
import { ThyInputModule } from 'ngx-tethys/input';
|
|
34
34
|
import * as i10 from 'ngx-tethys/empty';
|
|
35
35
|
import { ThyEmptyModule } from 'ngx-tethys/empty';
|
|
@@ -42,7 +42,7 @@ import * as i9 from 'ngx-tethys/resizable';
|
|
|
42
42
|
import { ThyResizableModule } from 'ngx-tethys/resizable';
|
|
43
43
|
import * as i10$1 from 'ngx-tethys/switch';
|
|
44
44
|
import { ThySwitchModule } from 'ngx-tethys/switch';
|
|
45
|
-
import * as i5
|
|
45
|
+
import * as i5 from 'ngx-tethys/color-picker';
|
|
46
46
|
import { ThyColorPickerModule } from 'ngx-tethys/color-picker';
|
|
47
47
|
import marked from 'marked';
|
|
48
48
|
import * as i1$3 from 'ngx-tethys/alert';
|
|
@@ -53,11 +53,11 @@ import { ThyImageModule } from 'ngx-tethys/image';
|
|
|
53
53
|
import * as i9$1 from 'ngx-tethys/progress';
|
|
54
54
|
import { ThyProgressModule } from 'ngx-tethys/progress';
|
|
55
55
|
import isUrl from 'is-url';
|
|
56
|
-
import * as i3
|
|
56
|
+
import * as i3 from 'ngx-tethys/form';
|
|
57
57
|
import { ThyFormModule } from 'ngx-tethys/form';
|
|
58
|
-
import * as i5$
|
|
58
|
+
import * as i5$1 from 'ngx-tethys/shared';
|
|
59
59
|
import { ThySharedModule } from 'ngx-tethys/shared';
|
|
60
|
-
import * as i6$
|
|
60
|
+
import * as i6$2 from 'ngx-tethys/button';
|
|
61
61
|
import { ThyButtonModule } from 'ngx-tethys/button';
|
|
62
62
|
import * as i7$1 from 'ngx-tethys/input-number';
|
|
63
63
|
import { ThyInputNumberModule } from 'ngx-tethys/input-number';
|
|
@@ -746,65 +746,6 @@ const initializeDefaultMenuIcons = (iconRegistry) => {
|
|
|
746
746
|
}
|
|
747
747
|
};
|
|
748
748
|
|
|
749
|
-
const Colors = [
|
|
750
|
-
'#FFFFFF',
|
|
751
|
-
'#333333',
|
|
752
|
-
'#FF0100',
|
|
753
|
-
'#FFDA00',
|
|
754
|
-
'#A4E143',
|
|
755
|
-
'#38D9F0',
|
|
756
|
-
'#4EA8EE',
|
|
757
|
-
'#9570E7',
|
|
758
|
-
'#F3F3F3',
|
|
759
|
-
'#CCCCCC',
|
|
760
|
-
'#FEF3F1',
|
|
761
|
-
'#FEFCDA',
|
|
762
|
-
'#EDF6E8',
|
|
763
|
-
'#E6FBFA',
|
|
764
|
-
'#EBF4FC',
|
|
765
|
-
'#F1EDF7',
|
|
766
|
-
'#DDDDDD',
|
|
767
|
-
'#A5A5A5',
|
|
768
|
-
'#FCD5D0',
|
|
769
|
-
'#F9EDA6',
|
|
770
|
-
'#D4E9D7',
|
|
771
|
-
'#C8E6EA',
|
|
772
|
-
'#CCE0F2',
|
|
773
|
-
'#DAD6EA',
|
|
774
|
-
'#888888',
|
|
775
|
-
'#494949',
|
|
776
|
-
'#EE7976',
|
|
777
|
-
'#E7B323',
|
|
778
|
-
'#99C191',
|
|
779
|
-
'#79C6CE',
|
|
780
|
-
'#6EAAD7',
|
|
781
|
-
'#9D8EC2',
|
|
782
|
-
'#41464C',
|
|
783
|
-
'#000000',
|
|
784
|
-
'#BF1A1E',
|
|
785
|
-
'#AD720E',
|
|
786
|
-
'#1C7232',
|
|
787
|
-
'#1C7892',
|
|
788
|
-
'#18439D',
|
|
789
|
-
'#521B78'
|
|
790
|
-
];
|
|
791
|
-
const BackgroundColors = [
|
|
792
|
-
'#FFFFFF',
|
|
793
|
-
'#FACCCC',
|
|
794
|
-
'#FFEBCC',
|
|
795
|
-
'#FFFFCC',
|
|
796
|
-
'#CDE8CC',
|
|
797
|
-
'#CCE0F5',
|
|
798
|
-
'#EBD6FF',
|
|
799
|
-
'#F3F3F3',
|
|
800
|
-
'#F06665',
|
|
801
|
-
'#FFC266',
|
|
802
|
-
'#FFFF66',
|
|
803
|
-
'#66B966',
|
|
804
|
-
'#66A3E0',
|
|
805
|
-
'#C285FF'
|
|
806
|
-
];
|
|
807
|
-
const SpecialTextColor = '#333333';
|
|
808
749
|
const SpecialBackgroundColor = '#FFFFFF';
|
|
809
750
|
const TableHeaderBackgroundColor = '#F3F3F3';
|
|
810
751
|
|
|
@@ -1953,6 +1894,7 @@ const withTheia = (editor, plugins = []) => {
|
|
|
1953
1894
|
e.renderElement = (element) => null;
|
|
1954
1895
|
e.renderLeaf = (text) => null;
|
|
1955
1896
|
e.isContainer = (value) => false;
|
|
1897
|
+
e.globalMousedown = (event) => null;
|
|
1956
1898
|
e.extraElementOptions = [];
|
|
1957
1899
|
e.disabled = false;
|
|
1958
1900
|
e.plugins = [];
|
|
@@ -2688,7 +2630,7 @@ class TheBaseToolbarItem {
|
|
|
2688
2630
|
event.preventDefault();
|
|
2689
2631
|
event.stopPropagation();
|
|
2690
2632
|
}
|
|
2691
|
-
selectionChange(editor) {
|
|
2633
|
+
selectionChange(editor = this.editor) {
|
|
2692
2634
|
if (editor.selection) {
|
|
2693
2635
|
this.active = this._toolbarItem?.active ? this._toolbarItem?.active(editor) : false;
|
|
2694
2636
|
if (this._toolbarItem?.disable) {
|
|
@@ -3339,155 +3281,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
|
|
|
3339
3281
|
type: Injectable
|
|
3340
3282
|
}], ctorParameters: function () { return [{ type: i0.NgZone }]; } });
|
|
3341
3283
|
|
|
3342
|
-
class TheColorSelectComponent {
|
|
3343
|
-
handleDocumentMouseDown(event) {
|
|
3344
|
-
if (!document.querySelector('.color-container').contains(event.target)) {
|
|
3345
|
-
this.popoverRef.close();
|
|
3346
|
-
}
|
|
3347
|
-
}
|
|
3348
|
-
constructor(popoverRef) {
|
|
3349
|
-
this.popoverRef = popoverRef;
|
|
3350
|
-
this.showCustom = true;
|
|
3351
|
-
this.selectColors = [];
|
|
3352
|
-
}
|
|
3353
|
-
ngOnInit() {
|
|
3354
|
-
if (this.selectedColor) {
|
|
3355
|
-
this.customColor = this.selectedColor.slice(1);
|
|
3356
|
-
}
|
|
3357
|
-
this.buildColors();
|
|
3358
|
-
}
|
|
3359
|
-
handleMouseDown(event) {
|
|
3360
|
-
event.stopPropagation();
|
|
3361
|
-
}
|
|
3362
|
-
handleKeydown(event) {
|
|
3363
|
-
event.stopPropagation();
|
|
3364
|
-
}
|
|
3365
|
-
buildColors() {
|
|
3366
|
-
const rows = parseInt((this.colors.length / this.option.perRowColorNumbers).toFixed(0), 10);
|
|
3367
|
-
for (let i = 0; i < rows; i++) {
|
|
3368
|
-
this.selectColors.push({
|
|
3369
|
-
rowValue: [
|
|
3370
|
-
...this.colors.slice(i * this.option.perRowColorNumbers, (i + 1) * this.option.perRowColorNumbers).map(color => {
|
|
3371
|
-
return {
|
|
3372
|
-
value: color,
|
|
3373
|
-
classMaps: {
|
|
3374
|
-
selected: color === this.selectedColor,
|
|
3375
|
-
white: color === '#FFFFFF',
|
|
3376
|
-
'mr-0': i === this.option.perRowColorNumbers - 1,
|
|
3377
|
-
'mb-0': i === this.selectColors.length - 1,
|
|
3378
|
-
'special-color': color === this.option.specialColor
|
|
3379
|
-
}
|
|
3380
|
-
};
|
|
3381
|
-
})
|
|
3382
|
-
],
|
|
3383
|
-
tickColor: this.option.rowOptions && this.option.rowOptions[i + 1]
|
|
3384
|
-
});
|
|
3385
|
-
}
|
|
3386
|
-
}
|
|
3387
|
-
_selectColor(event, color) {
|
|
3388
|
-
event.preventDefault();
|
|
3389
|
-
event.stopPropagation();
|
|
3390
|
-
if (this.option.specialColor && color === this.option.specialColor) {
|
|
3391
|
-
color = '';
|
|
3392
|
-
}
|
|
3393
|
-
this.selectedColor = color;
|
|
3394
|
-
this.selectAction(this.selectedColor);
|
|
3395
|
-
this.popoverRef.close();
|
|
3396
|
-
}
|
|
3397
|
-
colorChange(isEnter) {
|
|
3398
|
-
this.customColor = this.customColor.toLocaleUpperCase();
|
|
3399
|
-
this.selectedColor = '#' + this.customColor;
|
|
3400
|
-
if (this.customColor.length === 3) {
|
|
3401
|
-
this.selectedColor = '#' + this.customColor.replace(/(.)/g, '$1$1');
|
|
3402
|
-
}
|
|
3403
|
-
if (this.selectedColor.length === 7 && this.selectedColor !== this.option.specialColor) {
|
|
3404
|
-
this.selectColors = [];
|
|
3405
|
-
this.buildColors();
|
|
3406
|
-
}
|
|
3407
|
-
if (isEnter) {
|
|
3408
|
-
this.selectAction(this.selectedColor);
|
|
3409
|
-
this.popoverRef.close();
|
|
3410
|
-
}
|
|
3411
|
-
}
|
|
3412
|
-
customInputColorEnter(event) {
|
|
3413
|
-
event.stopPropagation();
|
|
3414
|
-
this.selectAction(this.selectedColor);
|
|
3415
|
-
this.popoverRef.close();
|
|
3416
|
-
}
|
|
3417
|
-
}
|
|
3418
|
-
TheColorSelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheColorSelectComponent, deps: [{ token: i1$1.ThyPopoverRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
3419
|
-
TheColorSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.2", type: TheColorSelectComponent, selector: "the-color-select", inputs: { selectedColor: "selectedColor", selectAction: "selectAction", showCustom: "showCustom", colors: "colors", option: "option" }, host: { listeners: { "document: mousedown": "handleDocumentMouseDown($event)", "mousedown": "handleMouseDown($event)", "keydown": "handleKeydown($event)" } }, ngImport: i0, template: "<div class=\"color-container\">\n <div class=\"colors\">\n <div *ngFor=\"let row of selectColors; let rowIndex = index\">\n <span\n class=\"color-item\"\n *ngFor=\"let _color of row.rowValue; let i = index\"\n [ngClass]=\"_color.classMaps\"\n (mousedown)=\"_selectColor($event, _color.value)\"\n >\n <span [ngStyle]=\"{ background: _color.value }\">\n <thy-icon thyIconName=\"check\" [ngStyle]=\"{ color: row.tickColor }\"></thy-icon>\n </span>\n </span>\n </div>\n </div>\n <div *ngIf=\"option.showCustom\" class=\"select-color\">\n <span class=\"color\" [ngStyle]=\"{ background: selectedColor }\"></span>\n #\n <input\n thyInput\n maxlength=\"6\"\n (keydown.enter)=\"customInputColorEnter($event)\"\n onkeyup=\"value=value.replace(/[^0-9A-Fa-f]/g,'')\"\n class=\"value\"\n [(ngModel)]=\"customColor\"\n (ngModelChange)=\"colorChange(false)\"\n />\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { 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.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4.ThyIconComponent, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { kind: "directive", type: i5.ThyInputDirective, selector: "input[thyInput], select[thyInput], textarea[thyInput]", inputs: ["thySize"], exportAs: ["thyInput"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3420
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheColorSelectComponent, decorators: [{
|
|
3421
|
-
type: Component,
|
|
3422
|
-
args: [{ selector: 'the-color-select', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"color-container\">\n <div class=\"colors\">\n <div *ngFor=\"let row of selectColors; let rowIndex = index\">\n <span\n class=\"color-item\"\n *ngFor=\"let _color of row.rowValue; let i = index\"\n [ngClass]=\"_color.classMaps\"\n (mousedown)=\"_selectColor($event, _color.value)\"\n >\n <span [ngStyle]=\"{ background: _color.value }\">\n <thy-icon thyIconName=\"check\" [ngStyle]=\"{ color: row.tickColor }\"></thy-icon>\n </span>\n </span>\n </div>\n </div>\n <div *ngIf=\"option.showCustom\" class=\"select-color\">\n <span class=\"color\" [ngStyle]=\"{ background: selectedColor }\"></span>\n #\n <input\n thyInput\n maxlength=\"6\"\n (keydown.enter)=\"customInputColorEnter($event)\"\n onkeyup=\"value=value.replace(/[^0-9A-Fa-f]/g,'')\"\n class=\"value\"\n [(ngModel)]=\"customColor\"\n (ngModelChange)=\"colorChange(false)\"\n />\n </div>\n</div>\n" }]
|
|
3423
|
-
}], ctorParameters: function () { return [{ type: i1$1.ThyPopoverRef }]; }, propDecorators: { selectedColor: [{
|
|
3424
|
-
type: Input
|
|
3425
|
-
}], selectAction: [{
|
|
3426
|
-
type: Input
|
|
3427
|
-
}], showCustom: [{
|
|
3428
|
-
type: Input
|
|
3429
|
-
}], colors: [{
|
|
3430
|
-
type: Input
|
|
3431
|
-
}], option: [{
|
|
3432
|
-
type: Input
|
|
3433
|
-
}], handleDocumentMouseDown: [{
|
|
3434
|
-
type: HostListener,
|
|
3435
|
-
args: ['document: mousedown', ['$event']]
|
|
3436
|
-
}], handleMouseDown: [{
|
|
3437
|
-
type: HostListener,
|
|
3438
|
-
args: ['mousedown', ['$event']]
|
|
3439
|
-
}], handleKeydown: [{
|
|
3440
|
-
type: HostListener,
|
|
3441
|
-
args: ['keydown', ['$event']]
|
|
3442
|
-
}] } });
|
|
3443
|
-
|
|
3444
|
-
class TheColorSelectService {
|
|
3445
|
-
get isOpenColorSelect() {
|
|
3446
|
-
return this.colorSelectRef && this.colorSelectRef.componentInstance;
|
|
3447
|
-
}
|
|
3448
|
-
constructor(thyPopover) {
|
|
3449
|
-
this.thyPopover = thyPopover;
|
|
3450
|
-
this.backdropClosable = false;
|
|
3451
|
-
this.hasBackdrop = false;
|
|
3452
|
-
this.insideClosable = false;
|
|
3453
|
-
this.placement = 'bottomLeft';
|
|
3454
|
-
this.offset = 10;
|
|
3455
|
-
}
|
|
3456
|
-
toggleColorSelect(origin, selectedColor, colors, option, selectAction, placement, offset) {
|
|
3457
|
-
if (this.isOpenColorSelect) {
|
|
3458
|
-
this.colorSelectRef.close();
|
|
3459
|
-
}
|
|
3460
|
-
this.colorSelectRef = this.thyPopover.open(TheColorSelectComponent, {
|
|
3461
|
-
initialState: {
|
|
3462
|
-
selectedColor,
|
|
3463
|
-
selectAction,
|
|
3464
|
-
colors,
|
|
3465
|
-
option
|
|
3466
|
-
},
|
|
3467
|
-
origin,
|
|
3468
|
-
minWidth: 0,
|
|
3469
|
-
backdropClosable: this.backdropClosable,
|
|
3470
|
-
placement: placement || this.placement,
|
|
3471
|
-
offset: offset !== null ? offset : this.offset,
|
|
3472
|
-
hasBackdrop: this.hasBackdrop,
|
|
3473
|
-
insideClosable: this.insideClosable,
|
|
3474
|
-
panelClass: 'color-select-container',
|
|
3475
|
-
originActiveClass: 'active'
|
|
3476
|
-
});
|
|
3477
|
-
return this.colorSelectRef;
|
|
3478
|
-
}
|
|
3479
|
-
closeColorSelect() {
|
|
3480
|
-
if (this.isOpenColorSelect) {
|
|
3481
|
-
this.colorSelectRef.close();
|
|
3482
|
-
}
|
|
3483
|
-
}
|
|
3484
|
-
}
|
|
3485
|
-
TheColorSelectService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheColorSelectService, deps: [{ token: i1$1.ThyPopover }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3486
|
-
TheColorSelectService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheColorSelectService });
|
|
3487
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheColorSelectService, decorators: [{
|
|
3488
|
-
type: Injectable
|
|
3489
|
-
}], ctorParameters: function () { return [{ type: i1$1.ThyPopover }]; } });
|
|
3490
|
-
|
|
3491
3284
|
const THE_TABLE_COMPONENT_TOKEN = new InjectionToken('the-Table-token');
|
|
3492
3285
|
const HEADER_CELL_CLASS = 'the-header-cell';
|
|
3493
3286
|
const TOP_CELL_CLASS = 'the-top-cell';
|
|
@@ -4629,20 +4422,6 @@ const ColorEditor = {
|
|
|
4629
4422
|
else {
|
|
4630
4423
|
Editor.removeMark(editor, type);
|
|
4631
4424
|
}
|
|
4632
|
-
},
|
|
4633
|
-
selectColor(editor, type) {
|
|
4634
|
-
const rangeRef = Editor.rangeRef(editor, editor.selection);
|
|
4635
|
-
const colorSelectService = editor.injector.get(TheColorSelectService);
|
|
4636
|
-
const element = event.target.closest('.thy-action');
|
|
4637
|
-
colorSelectService.toggleColorSelect(element, ColorEditor.getActiveColor(editor, type), Colors, {
|
|
4638
|
-
showCustom: true,
|
|
4639
|
-
perRowColorNumbers: 8,
|
|
4640
|
-
rowOptions: { 2: '#aaa' },
|
|
4641
|
-
specialColor: type === MarkTypes.color ? SpecialTextColor : SpecialBackgroundColor
|
|
4642
|
-
}, (newColor) => {
|
|
4643
|
-
Transforms.select(editor, rangeRef.current);
|
|
4644
|
-
ColorEditor.setColor(editor, newColor, type);
|
|
4645
|
-
}, 'bottomLeft', 0);
|
|
4646
4425
|
}
|
|
4647
4426
|
};
|
|
4648
4427
|
|
|
@@ -5935,7 +5714,7 @@ class ThePluginMenuComponent extends mixinUnsubscribe(MixinBase) {
|
|
|
5935
5714
|
}
|
|
5936
5715
|
}
|
|
5937
5716
|
ThePluginMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: ThePluginMenuComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: i1$1.ThyPopoverRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
5938
|
-
ThePluginMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.2", 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 pb-2\">\n <thy-input-search [(ngModel)]=\"keyWords\" placeholder=\"\u641C\u7D22\" thyIconPosition=\"after\" (ngModelChange)=\"updateKeywords(keyWords)\">\n </thy-input-search>\n</div>\n\n<div\n *ngIf=\"groupMenu.length > 0; else thyEmpty\"\n theListBox\n [keyboardContainer]=\"keyboardContainer\"\n [autoActiveFirstItem]=\"autoActiveFirstItem\"\n (theListboxChange)=\"theListboxChange($event)\"\n class=\"thy-dropdown-menu the-plugin-menu-scroll-container pb-2 pt-0\"\n>\n <div *ngIf=\"iconMenu?.length > 0\" theListboxGroup [horizontalColumn]=\"6\" class=\"icon-menu d-flex pl-5 py-1\">\n <ng-container *ngFor=\"let item of iconMenu; trackBy: trackByFn\">\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 [thyDisabled]=\"item.disabled\"\n [theOptionDisabled]=\"item.disabled\"\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; trackBy: trackByFn\">\n <ng-container *ngIf=\"item.isMenuItem && !(item.children?.length > 0) && item.key !== 'table'\">\n <div\n thyDropdownMenuItem\n theListboxOption\n [theOptionValue]=\"item\"\n class=\"py-0\"\n thePreventDefault\n [thyDisabled]=\"item.disabled\"\n [theOptionDisabled]=\"item.disabled\"\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 {{ item.name }}\n </div>\n </div>\n </div>\n </ng-container>\n <ng-container *ngIf=\"item.isMenuItem && item.children?.length > 0\" #hasExpanded>\n <div\n #dropdownTriggers\n [thyDropdown]=\"expand\"\n thyTrigger=\"hover\"\n thyDropdownMenuItem\n [thyDisabled]=\"item.disabled\"\n theListboxOption\n [theOptionValue]=\"item\"\n [theOptionDisabled]=\"item.disabled\"\n [thyPopoverOptions]=\"expandPopoverOptions\"\n class=\"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 {{ item.name }}\n </div>\n </div>\n <div *ngIf=\"item.children?.length > 0\">\n <thy-icon class=\"text-muted\" thyIconName=\"angle-right\"></thy-icon>\n </div>\n <thy-dropdown-menu #expand>\n <div class=\"the-plugin-menu-container expand-menu\" theListboxGroup>\n <ng-container *ngFor=\"let child of item.children\">\n <div\n *ngIf=\"child.type === ThePluginMenuItemType.group\"\n thyDropdownMenuItem\n theListboxOption\n class=\"py-0\"\n thePreventDefault\n [theOptionDisabled]=\"item.disabled\"\n [thyDisabled]=\"child.disabled\"\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 {{ child.name }}\n </div>\n </div>\n </div>\n <thy-divider *ngIf=\"child === 'divider'\" class=\"my-2\"></thy-divider>\n </ng-container>\n </div>\n </thy-dropdown-menu>\n </div>\n </ng-container>\n <ng-container *ngIf=\"item.isMenuItem && item.key === 'table'\">\n <div\n #dropdownTriggers\n [thyPopover]=\"tableSelect\"\n thyPlacement=\"rightTop\"\n thyTrigger=\"hover\"\n thyDropdownMenuItem\n theListboxOption\n [thyConfig]=\"tableSelectPopoverConfig\"\n [theOptionValue]=\"item\"\n [theOptionDisabled]=\"item.disabled\"\n [thyDisabled]=\"item.disabled\"\n class=\"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 {{ item.name }}\n </div>\n </div>\n <div>\n <thy-icon class=\"text-muted\" thyIconName=\"angle-right\"></thy-icon>\n </div>\n\n <ng-template #tableSelect>\n <table-select\n class=\"plugin-menu-table the-table-selector-panel\"\n [editor]=\"editor\"\n [beforeInsert]=\"removeKeywords\"\n ></table-select>\n </ng-template>\n </div>\n </ng-container>\n <ng-container *ngIf=\"!item.isMenuItem\" #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: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4.ThyIconComponent, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { kind: "directive", type: i8.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: i7.ThyActionComponent, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }, { kind: "component", type: i8$1.ThyDividerComponent, selector: "thy-divider", inputs: ["thyVertical", "thyStyle", "thyColor", "thyText", "thyTextDirection", "thyDeeper"] }, { kind: "directive", type: i6.ThyDropdownDirective, selector: "[thyDropdown]", inputs: ["thyDropdownMenu", "thyDropdown", "thyTrigger", "thyShowDelay", "thyHideDelay", "thyActiveClass", "thyPopoverOptions", "thyPlacement", "thyMenuInsideClosable", "thyPanelClass"], outputs: ["thyActiveChange"] }, { kind: "component", type: i6.ThyDropdownMenuComponent, selector: "thy-dropdown-menu", inputs: ["thyWidth"] }, { kind: "component", type: i6.ThyDropdownMenuGroupComponent, selector: "thy-dropdown-menu-group", inputs: ["thyTitle"] }, { kind: "directive", type: i6.ThyDropdownMenuItemDirective, selector: "[thyDropdownMenuItem]", inputs: ["thyType", "thyDisabled"] }, { kind: "component", type: i10.ThyEmptyComponent, selector: "thy-empty", inputs: ["thyMessage", "thyTranslationKey", "thyTranslationValues", "thyEntityName", "thyEntityNameTranslateKey", "thyIconName", "thySize", "thyMarginTop", "thyTopAuto", "thyContainer", "thyImageUrl", "thyImageLoading", "thyImageFetchPriority", "thyDescription"] }, { kind: "directive", type: i1$1.ThyPopoverDirective, selector: "[thyPopover]", inputs: ["thyPopover", "thyTrigger", "thyPlacement", "thyOffset", "thyConfig", "thyShowDelay", "thyHideDelay", "thyAutoAdaptive", "thyDisabled"] }, { kind: "component", type: TheTableSelectComponent, selector: "table-select", inputs: ["optionsParam", "editor", "beforeInsert"] }, { kind: "directive", type: TheListboxOptionDirective, selector: "[theListboxOption]", inputs: ["theOptionValue", "theOptionDisabled"], exportAs: ["theListboxOption"] }, { kind: "directive", type: TheListboxGroupDirective, selector: "[theListboxGroup]", inputs: ["horizontalColumn"], exportAs: ["theListboxGroup"] }, { kind: "directive", type: TheListboxDirective, selector: "[theListBox]", inputs: ["keyboardContainer", "autoActiveFirstItem"], outputs: ["theListboxChange"], exportAs: ["theListBox"] }, { kind: "directive", type: ThePreventDefaultDirective, selector: "[thePreventDefault]", exportAs: ["thePreventDefault"] }] });
|
|
5717
|
+
ThePluginMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.2", 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 pb-2\">\n <thy-input-search [(ngModel)]=\"keyWords\" placeholder=\"\u641C\u7D22\" thyIconPosition=\"after\" (ngModelChange)=\"updateKeywords(keyWords)\">\n </thy-input-search>\n</div>\n\n<div\n *ngIf=\"groupMenu.length > 0; else thyEmpty\"\n theListBox\n [keyboardContainer]=\"keyboardContainer\"\n [autoActiveFirstItem]=\"autoActiveFirstItem\"\n (theListboxChange)=\"theListboxChange($event)\"\n class=\"thy-dropdown-menu the-plugin-menu-scroll-container pb-2 pt-0\"\n>\n <div *ngIf=\"iconMenu?.length > 0\" theListboxGroup [horizontalColumn]=\"6\" class=\"icon-menu d-flex pl-5 py-1\">\n <ng-container *ngFor=\"let item of iconMenu; trackBy: trackByFn\">\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 [thyDisabled]=\"item.disabled\"\n [theOptionDisabled]=\"item.disabled\"\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; trackBy: trackByFn\">\n <ng-container *ngIf=\"item.isMenuItem && !(item.children?.length > 0) && item.key !== 'table'\">\n <div\n thyDropdownMenuItem\n theListboxOption\n [theOptionValue]=\"item\"\n class=\"py-0\"\n thePreventDefault\n [thyDisabled]=\"item.disabled\"\n [theOptionDisabled]=\"item.disabled\"\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 {{ item.name }}\n </div>\n </div>\n </div>\n </ng-container>\n <ng-container *ngIf=\"item.isMenuItem && item.children?.length > 0\" #hasExpanded>\n <div\n #dropdownTriggers\n [thyDropdown]=\"expand\"\n thyTrigger=\"hover\"\n thyDropdownMenuItem\n [thyDisabled]=\"item.disabled\"\n theListboxOption\n [theOptionValue]=\"item\"\n [theOptionDisabled]=\"item.disabled\"\n [thyPopoverOptions]=\"expandPopoverOptions\"\n class=\"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 {{ item.name }}\n </div>\n </div>\n <div *ngIf=\"item.children?.length > 0\">\n <thy-icon class=\"text-muted\" thyIconName=\"angle-right\"></thy-icon>\n </div>\n <thy-dropdown-menu #expand>\n <div class=\"the-plugin-menu-container expand-menu\" theListboxGroup>\n <ng-container *ngFor=\"let child of item.children\">\n <div\n *ngIf=\"child.type === ThePluginMenuItemType.group\"\n thyDropdownMenuItem\n theListboxOption\n class=\"py-0\"\n thePreventDefault\n [theOptionDisabled]=\"item.disabled\"\n [thyDisabled]=\"child.disabled\"\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 {{ child.name }}\n </div>\n </div>\n </div>\n <thy-divider *ngIf=\"child === 'divider'\" class=\"my-2\"></thy-divider>\n </ng-container>\n </div>\n </thy-dropdown-menu>\n </div>\n </ng-container>\n <ng-container *ngIf=\"item.isMenuItem && item.key === 'table'\">\n <div\n #dropdownTriggers\n [thyPopover]=\"tableSelect\"\n thyPlacement=\"rightTop\"\n thyTrigger=\"hover\"\n thyDropdownMenuItem\n theListboxOption\n [thyConfig]=\"tableSelectPopoverConfig\"\n [theOptionValue]=\"item\"\n [theOptionDisabled]=\"item.disabled\"\n [thyDisabled]=\"item.disabled\"\n class=\"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 {{ item.name }}\n </div>\n </div>\n <div>\n <thy-icon class=\"text-muted\" thyIconName=\"angle-right\"></thy-icon>\n </div>\n\n <ng-template #tableSelect>\n <table-select\n class=\"plugin-menu-table the-table-selector-panel\"\n [editor]=\"editor\"\n [beforeInsert]=\"removeKeywords\"\n ></table-select>\n </ng-template>\n </div>\n </ng-container>\n <ng-container *ngIf=\"!item.isMenuItem\" #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: i4.ThyIconComponent, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { kind: "directive", type: i8.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { kind: "component", type: i6$1.ThyInputSearchComponent, selector: "thy-input-search", inputs: ["name", "placeholder", "thyTheme", "thySearchFocus", "thyIconPosition", "thySize"], outputs: ["clear", "thyClear"] }, { kind: "component", type: i7.ThyActionComponent, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }, { kind: "component", type: i8$1.ThyDividerComponent, selector: "thy-divider", inputs: ["thyVertical", "thyStyle", "thyColor", "thyText", "thyTextDirection", "thyDeeper"] }, { kind: "directive", type: i6.ThyDropdownDirective, selector: "[thyDropdown]", inputs: ["thyDropdownMenu", "thyDropdown", "thyTrigger", "thyShowDelay", "thyHideDelay", "thyActiveClass", "thyPopoverOptions", "thyPlacement", "thyMenuInsideClosable", "thyPanelClass"], outputs: ["thyActiveChange"] }, { kind: "component", type: i6.ThyDropdownMenuComponent, selector: "thy-dropdown-menu", inputs: ["thyWidth"] }, { kind: "component", type: i6.ThyDropdownMenuGroupComponent, selector: "thy-dropdown-menu-group", inputs: ["thyTitle"] }, { kind: "directive", type: i6.ThyDropdownMenuItemDirective, selector: "[thyDropdownMenuItem]", inputs: ["thyType", "thyDisabled"] }, { kind: "component", type: i10.ThyEmptyComponent, selector: "thy-empty", inputs: ["thyMessage", "thyTranslationKey", "thyTranslationValues", "thyEntityName", "thyEntityNameTranslateKey", "thyIconName", "thySize", "thyMarginTop", "thyTopAuto", "thyContainer", "thyImageUrl", "thyImageLoading", "thyImageFetchPriority", "thyDescription"] }, { kind: "directive", type: i1$1.ThyPopoverDirective, selector: "[thyPopover]", inputs: ["thyPopover", "thyTrigger", "thyPlacement", "thyOffset", "thyConfig", "thyShowDelay", "thyHideDelay", "thyAutoAdaptive", "thyDisabled"] }, { kind: "component", type: TheTableSelectComponent, selector: "table-select", inputs: ["optionsParam", "editor", "beforeInsert"] }, { kind: "directive", type: TheListboxOptionDirective, selector: "[theListboxOption]", inputs: ["theOptionValue", "theOptionDisabled"], exportAs: ["theListboxOption"] }, { kind: "directive", type: TheListboxGroupDirective, selector: "[theListboxGroup]", inputs: ["horizontalColumn"], exportAs: ["theListboxGroup"] }, { kind: "directive", type: TheListboxDirective, selector: "[theListBox]", inputs: ["keyboardContainer", "autoActiveFirstItem"], outputs: ["theListboxChange"], exportAs: ["theListBox"] }, { kind: "directive", type: ThePreventDefaultDirective, selector: "[thePreventDefault]", exportAs: ["thePreventDefault"] }] });
|
|
5939
5718
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: ThePluginMenuComponent, decorators: [{
|
|
5940
5719
|
type: Component,
|
|
5941
5720
|
args: [{ selector: 'the-plugin-menu', template: "<div *ngIf=\"theDisplaySearch\" class=\"menu-search px-5 pt-5 pb-2\">\n <thy-input-search [(ngModel)]=\"keyWords\" placeholder=\"\u641C\u7D22\" thyIconPosition=\"after\" (ngModelChange)=\"updateKeywords(keyWords)\">\n </thy-input-search>\n</div>\n\n<div\n *ngIf=\"groupMenu.length > 0; else thyEmpty\"\n theListBox\n [keyboardContainer]=\"keyboardContainer\"\n [autoActiveFirstItem]=\"autoActiveFirstItem\"\n (theListboxChange)=\"theListboxChange($event)\"\n class=\"thy-dropdown-menu the-plugin-menu-scroll-container pb-2 pt-0\"\n>\n <div *ngIf=\"iconMenu?.length > 0\" theListboxGroup [horizontalColumn]=\"6\" class=\"icon-menu d-flex pl-5 py-1\">\n <ng-container *ngFor=\"let item of iconMenu; trackBy: trackByFn\">\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 [thyDisabled]=\"item.disabled\"\n [theOptionDisabled]=\"item.disabled\"\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; trackBy: trackByFn\">\n <ng-container *ngIf=\"item.isMenuItem && !(item.children?.length > 0) && item.key !== 'table'\">\n <div\n thyDropdownMenuItem\n theListboxOption\n [theOptionValue]=\"item\"\n class=\"py-0\"\n thePreventDefault\n [thyDisabled]=\"item.disabled\"\n [theOptionDisabled]=\"item.disabled\"\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 {{ item.name }}\n </div>\n </div>\n </div>\n </ng-container>\n <ng-container *ngIf=\"item.isMenuItem && item.children?.length > 0\" #hasExpanded>\n <div\n #dropdownTriggers\n [thyDropdown]=\"expand\"\n thyTrigger=\"hover\"\n thyDropdownMenuItem\n [thyDisabled]=\"item.disabled\"\n theListboxOption\n [theOptionValue]=\"item\"\n [theOptionDisabled]=\"item.disabled\"\n [thyPopoverOptions]=\"expandPopoverOptions\"\n class=\"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 {{ item.name }}\n </div>\n </div>\n <div *ngIf=\"item.children?.length > 0\">\n <thy-icon class=\"text-muted\" thyIconName=\"angle-right\"></thy-icon>\n </div>\n <thy-dropdown-menu #expand>\n <div class=\"the-plugin-menu-container expand-menu\" theListboxGroup>\n <ng-container *ngFor=\"let child of item.children\">\n <div\n *ngIf=\"child.type === ThePluginMenuItemType.group\"\n thyDropdownMenuItem\n theListboxOption\n class=\"py-0\"\n thePreventDefault\n [theOptionDisabled]=\"item.disabled\"\n [thyDisabled]=\"child.disabled\"\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 {{ child.name }}\n </div>\n </div>\n </div>\n <thy-divider *ngIf=\"child === 'divider'\" class=\"my-2\"></thy-divider>\n </ng-container>\n </div>\n </thy-dropdown-menu>\n </div>\n </ng-container>\n <ng-container *ngIf=\"item.isMenuItem && item.key === 'table'\">\n <div\n #dropdownTriggers\n [thyPopover]=\"tableSelect\"\n thyPlacement=\"rightTop\"\n thyTrigger=\"hover\"\n thyDropdownMenuItem\n theListboxOption\n [thyConfig]=\"tableSelectPopoverConfig\"\n [theOptionValue]=\"item\"\n [theOptionDisabled]=\"item.disabled\"\n [thyDisabled]=\"item.disabled\"\n class=\"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 {{ item.name }}\n </div>\n </div>\n <div>\n <thy-icon class=\"text-muted\" thyIconName=\"angle-right\"></thy-icon>\n </div>\n\n <ng-template #tableSelect>\n <table-select\n class=\"plugin-menu-table the-table-selector-panel\"\n [editor]=\"editor\"\n [beforeInsert]=\"removeKeywords\"\n ></table-select>\n </ng-template>\n </div>\n </ng-container>\n <ng-container *ngIf=\"!item.isMenuItem\" #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" }]
|
|
@@ -7177,7 +6956,7 @@ class TheCodeComponent extends TheBaseElementComponent {
|
|
|
7177
6956
|
}
|
|
7178
6957
|
}
|
|
7179
6958
|
TheCodeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheCodeComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i1$2.ThyNotifyService }, { token: TheContextService }, { token: i0.NgZone }, { token: THE_MODE_TOKEN }, { token: i1$1.ThyPopover }, { token: i0.ViewContainerRef }, { token: i2$1.Overlay }], target: i0.ɵɵFactoryTarget.Component });
|
|
7180
|
-
TheCodeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.2", type: TheCodeComponent, selector: "div[theCode]", viewQueries: [{ propertyName: "toolbar", first: true, predicate: ["toolbar"], descendants: true, read: TemplateRef, static: true }, { propertyName: "codemirror", first: true, predicate: ["codemirror"], descendants: true, read: CodeMirrorComponent }, { propertyName: "toolbarDropdownComponent", first: true, predicate: TheToolbarDropdownComponent, descendants: true, read: TheToolbarDropdownComponent }], usesInheritance: true, ngImport: i0, template: "<slate-children [children]=\"children\" [context]=\"childrenContext\" [viewContext]=\"viewContext\"></slate-children>\n\n<!-- \u53EA\u8BFB\u6A21\u5F0F\u4E0BCodeMirror-sizer\u9AD8\u5EA6\u6BD4\u7F16\u8F91\u6A21\u5F0F\u4E0B\u591A2px\uFF0C\u8BBE\u7F6EthyMinHeight\u4E3A46px\u9632\u6B62\u62D6\u62FD\u5230\u6700\u5C0F\u9AD8\u5EA6\u65F6\u53EA\u8BFB\u6A21\u5F0F\u4E0B\u51FA\u73B0\u6EDA\u52A8\u6761 -->\n<div\n thyResizable\n [thyMinHeight]=\"46\"\n [thyBounds]=\"resizeBounds\"\n [style.height.px]=\"resizeHeight\"\n (thyResize)=\"onResize($event)\"\n (thyResizeEnd)=\"onEndResize()\"\n class=\"resize-code-container\"\n [ngClass]=\"{ focus: isCollapsedAndNonReadonly, readonly: options.readOnly, active: isHightLight && isCollapsedAndNonReadonly }\"\n>\n <ng-codemirror\n *ngIf=\"startRenderCodemirror\"\n #codemirror\n contenteditable=\"false\"\n class=\"ng-codemirror-wrapper\"\n [ngStyle]=\"{ maxHeight: maxHeight > 0 ? maxHeight + 'px' : 'auto' }\"\n [options]=\"options\"\n [ngModel]=\"code\"\n [delayRefreshTime]=\"300\"\n (ngModelChange)=\"codeChange($event)\"\n (focusChange)=\"focusChange($event)\"\n [autoMaxHeight]=\"maxHeight\"\n >\n </ng-codemirror>\n <thy-resize-handle thyDirection=\"bottom\" class=\"code-resize-icon\" *ngIf=\"isCollapsedAndNonReadonly\"></thy-resize-handle>\n</div>\n\n<ng-template #toolbar>\n <thy-actions thySize=\"xxs\" thePreventDefault>\n <the-toolbar-dropdown\n [menus]=\"menus\"\n [toolbarItem]=\"activeLanguage\"\n [dropdownItemKey]=\"activeLanguage?.key\"\n [itemMousedownHandle]=\"onChangeLanguage\"\n >\n </the-toolbar-dropdown>\n <span class=\"auto-wrap d-flex align-items-center px-2 text-secondary\">\n <span>\u81EA\u52A8\u6362\u884C</span>\n <thy-switch\n class=\"auto-wrap-btn d-flex ml-1\"\n [(ngModel)]=\"options.lineWrapping\"\n (ngModelChange)=\"onChangeWrap($event)\"\n thySize=\"sm\"\n ></thy-switch>\n </span>\n <a href=\"javascript:;\" thyAction thyActionIcon=\"copy\" thyTooltip=\"\u590D\u5236\" thyTooltipPlacement=\"top\" (click)=\"onCopy($event)\"></a>\n <thy-divider class=\"mr-2 ml-1 align-self-center\" [thyVertical]=\"true\"></thy-divider>\n <a\n href=\"javascript:;\"\n thyAction\n thyType=\"danger\"\n thyActionIcon=\"trash\"\n thyTooltip=\"\u5220\u9664\"\n thyTooltipPlacement=\"top\"\n (click)=\"onDelete($event)\"\n ></a>\n </thy-actions>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i1.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }, { kind: "directive", type:
|
|
6959
|
+
TheCodeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.2", type: TheCodeComponent, selector: "div[theCode]", viewQueries: [{ propertyName: "toolbar", first: true, predicate: ["toolbar"], descendants: true, read: TemplateRef, static: true }, { propertyName: "codemirror", first: true, predicate: ["codemirror"], descendants: true, read: CodeMirrorComponent }, { propertyName: "toolbarDropdownComponent", first: true, predicate: TheToolbarDropdownComponent, descendants: true, read: TheToolbarDropdownComponent }], usesInheritance: true, ngImport: i0, template: "<slate-children [children]=\"children\" [context]=\"childrenContext\" [viewContext]=\"viewContext\"></slate-children>\n\n<!-- \u53EA\u8BFB\u6A21\u5F0F\u4E0BCodeMirror-sizer\u9AD8\u5EA6\u6BD4\u7F16\u8F91\u6A21\u5F0F\u4E0B\u591A2px\uFF0C\u8BBE\u7F6EthyMinHeight\u4E3A46px\u9632\u6B62\u62D6\u62FD\u5230\u6700\u5C0F\u9AD8\u5EA6\u65F6\u53EA\u8BFB\u6A21\u5F0F\u4E0B\u51FA\u73B0\u6EDA\u52A8\u6761 -->\n<div\n thyResizable\n [thyMinHeight]=\"46\"\n [thyBounds]=\"resizeBounds\"\n [style.height.px]=\"resizeHeight\"\n (thyResize)=\"onResize($event)\"\n (thyResizeEnd)=\"onEndResize()\"\n class=\"resize-code-container\"\n [ngClass]=\"{ focus: isCollapsedAndNonReadonly, readonly: options.readOnly, active: isHightLight && isCollapsedAndNonReadonly }\"\n>\n <ng-codemirror\n *ngIf=\"startRenderCodemirror\"\n #codemirror\n contenteditable=\"false\"\n class=\"ng-codemirror-wrapper\"\n [ngStyle]=\"{ maxHeight: maxHeight > 0 ? maxHeight + 'px' : 'auto' }\"\n [options]=\"options\"\n [ngModel]=\"code\"\n [delayRefreshTime]=\"300\"\n (ngModelChange)=\"codeChange($event)\"\n (focusChange)=\"focusChange($event)\"\n [autoMaxHeight]=\"maxHeight\"\n >\n </ng-codemirror>\n <thy-resize-handle thyDirection=\"bottom\" class=\"code-resize-icon\" *ngIf=\"isCollapsedAndNonReadonly\"></thy-resize-handle>\n</div>\n\n<ng-template #toolbar>\n <thy-actions thySize=\"xxs\" thePreventDefault>\n <the-toolbar-dropdown\n [menus]=\"menus\"\n [toolbarItem]=\"activeLanguage\"\n [dropdownItemKey]=\"activeLanguage?.key\"\n [itemMousedownHandle]=\"onChangeLanguage\"\n >\n </the-toolbar-dropdown>\n <span class=\"auto-wrap d-flex align-items-center px-2 text-secondary\">\n <span>\u81EA\u52A8\u6362\u884C</span>\n <thy-switch\n class=\"auto-wrap-btn d-flex ml-1\"\n [(ngModel)]=\"options.lineWrapping\"\n (ngModelChange)=\"onChangeWrap($event)\"\n thySize=\"sm\"\n ></thy-switch>\n </span>\n <a href=\"javascript:;\" thyAction thyActionIcon=\"copy\" thyTooltip=\"\u590D\u5236\" thyTooltipPlacement=\"top\" (click)=\"onCopy($event)\"></a>\n <thy-divider class=\"mr-2 ml-1 align-self-center\" [thyVertical]=\"true\"></thy-divider>\n <a\n href=\"javascript:;\"\n thyAction\n thyType=\"danger\"\n thyActionIcon=\"trash\"\n thyTooltip=\"\u5220\u9664\"\n thyTooltipPlacement=\"top\"\n (click)=\"onDelete($event)\"\n ></a>\n </thy-actions>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i1.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }, { 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: "directive", type: i8.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { kind: "directive", type: i9.ThyResizableDirective, selector: "[thyResizable]", inputs: ["thyBounds", "thyMaxHeight", "thyMaxWidth", "thyMinHeight", "thyMinWidth", "thyGridColumnCount", "thyMaxColumn", "thyMinColumn", "thyLockAspectRatio", "thyPreview", "thyDisabled"], outputs: ["thyResize", "thyResizeStart", "thyResizeEnd"] }, { kind: "component", type: i9.ThyResizeHandleComponent, selector: "thy-resize-handle, [thy-resize-handle]", inputs: ["thyDirection", "thyLine"], outputs: ["thyMouseDown"], exportAs: ["thyResizeHandle"] }, { kind: "component", type: i10$1.ThySwitchComponent, selector: "thy-switch", inputs: ["thyType", "thySize", "thyDisabled"], outputs: ["thyChange"] }, { kind: "component", type: i7.ThyActionComponent, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }, { kind: "component", type: i7.ThyActionsComponent, selector: "thy-actions", inputs: ["thySize"] }, { kind: "component", type: i8$1.ThyDividerComponent, selector: "thy-divider", inputs: ["thyVertical", "thyStyle", "thyColor", "thyText", "thyTextDirection", "thyDeeper"] }, { kind: "component", type: i13.CodeMirrorComponent, selector: "ng-codemirror, [ngCodeMirror]", inputs: ["autoMaxHeight", "options", "delayRefreshTime"], outputs: ["focusChange"] }, { kind: "component", type: TheToolbarDropdownComponent, selector: "the-toolbar-dropdown" }, { kind: "directive", type: ThePreventDefaultDirective, selector: "[thePreventDefault]", exportAs: ["thePreventDefault"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
7181
6960
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheCodeComponent, decorators: [{
|
|
7182
6961
|
type: Component,
|
|
7183
6962
|
args: [{ selector: 'div[theCode]', changeDetection: ChangeDetectionStrategy.OnPush, template: "<slate-children [children]=\"children\" [context]=\"childrenContext\" [viewContext]=\"viewContext\"></slate-children>\n\n<!-- \u53EA\u8BFB\u6A21\u5F0F\u4E0BCodeMirror-sizer\u9AD8\u5EA6\u6BD4\u7F16\u8F91\u6A21\u5F0F\u4E0B\u591A2px\uFF0C\u8BBE\u7F6EthyMinHeight\u4E3A46px\u9632\u6B62\u62D6\u62FD\u5230\u6700\u5C0F\u9AD8\u5EA6\u65F6\u53EA\u8BFB\u6A21\u5F0F\u4E0B\u51FA\u73B0\u6EDA\u52A8\u6761 -->\n<div\n thyResizable\n [thyMinHeight]=\"46\"\n [thyBounds]=\"resizeBounds\"\n [style.height.px]=\"resizeHeight\"\n (thyResize)=\"onResize($event)\"\n (thyResizeEnd)=\"onEndResize()\"\n class=\"resize-code-container\"\n [ngClass]=\"{ focus: isCollapsedAndNonReadonly, readonly: options.readOnly, active: isHightLight && isCollapsedAndNonReadonly }\"\n>\n <ng-codemirror\n *ngIf=\"startRenderCodemirror\"\n #codemirror\n contenteditable=\"false\"\n class=\"ng-codemirror-wrapper\"\n [ngStyle]=\"{ maxHeight: maxHeight > 0 ? maxHeight + 'px' : 'auto' }\"\n [options]=\"options\"\n [ngModel]=\"code\"\n [delayRefreshTime]=\"300\"\n (ngModelChange)=\"codeChange($event)\"\n (focusChange)=\"focusChange($event)\"\n [autoMaxHeight]=\"maxHeight\"\n >\n </ng-codemirror>\n <thy-resize-handle thyDirection=\"bottom\" class=\"code-resize-icon\" *ngIf=\"isCollapsedAndNonReadonly\"></thy-resize-handle>\n</div>\n\n<ng-template #toolbar>\n <thy-actions thySize=\"xxs\" thePreventDefault>\n <the-toolbar-dropdown\n [menus]=\"menus\"\n [toolbarItem]=\"activeLanguage\"\n [dropdownItemKey]=\"activeLanguage?.key\"\n [itemMousedownHandle]=\"onChangeLanguage\"\n >\n </the-toolbar-dropdown>\n <span class=\"auto-wrap d-flex align-items-center px-2 text-secondary\">\n <span>\u81EA\u52A8\u6362\u884C</span>\n <thy-switch\n class=\"auto-wrap-btn d-flex ml-1\"\n [(ngModel)]=\"options.lineWrapping\"\n (ngModelChange)=\"onChangeWrap($event)\"\n thySize=\"sm\"\n ></thy-switch>\n </span>\n <a href=\"javascript:;\" thyAction thyActionIcon=\"copy\" thyTooltip=\"\u590D\u5236\" thyTooltipPlacement=\"top\" (click)=\"onCopy($event)\"></a>\n <thy-divider class=\"mr-2 ml-1 align-self-center\" [thyVertical]=\"true\"></thy-divider>\n <a\n href=\"javascript:;\"\n thyAction\n thyType=\"danger\"\n thyActionIcon=\"trash\"\n thyTooltip=\"\u5220\u9664\"\n thyTooltipPlacement=\"top\"\n (click)=\"onDelete($event)\"\n ></a>\n </thy-actions>\n</ng-template>\n" }]
|
|
@@ -7245,18 +7024,22 @@ const createCodePlugin = createPluginFactory({
|
|
|
7245
7024
|
});
|
|
7246
7025
|
|
|
7247
7026
|
class TheColorToolbarItemComponent extends TheBaseToolbarItem {
|
|
7027
|
+
get type() {
|
|
7028
|
+
return this.toolbarItem.key;
|
|
7029
|
+
}
|
|
7248
7030
|
constructor() {
|
|
7249
|
-
super(
|
|
7031
|
+
super();
|
|
7250
7032
|
this.defaultColorLine = '#FF0100';
|
|
7251
7033
|
this.defaultBackgroundColorLine = '#FFDA00';
|
|
7252
7034
|
}
|
|
7253
|
-
|
|
7254
|
-
|
|
7035
|
+
ngOnInit() {
|
|
7036
|
+
this.setSelectedColor();
|
|
7255
7037
|
}
|
|
7256
|
-
|
|
7257
|
-
|
|
7038
|
+
selectionChange() {
|
|
7039
|
+
super.selectionChange();
|
|
7040
|
+
this.setSelectedColor();
|
|
7258
7041
|
}
|
|
7259
|
-
|
|
7042
|
+
setSelectedColor() {
|
|
7260
7043
|
this.selectedColor = ColorEditor.getActiveColor(this.editor, this.toolbarItem.key);
|
|
7261
7044
|
}
|
|
7262
7045
|
preventDefault(event) {
|
|
@@ -7265,7 +7048,7 @@ class TheColorToolbarItemComponent extends TheBaseToolbarItem {
|
|
|
7265
7048
|
}
|
|
7266
7049
|
changeColor(value) {
|
|
7267
7050
|
if (!this.editor.selection) {
|
|
7268
|
-
|
|
7051
|
+
reSelection(this.editor);
|
|
7269
7052
|
}
|
|
7270
7053
|
// 无填充色
|
|
7271
7054
|
if (value === 'transparent') {
|
|
@@ -7279,14 +7062,14 @@ class TheColorToolbarItemComponent extends TheBaseToolbarItem {
|
|
|
7279
7062
|
ColorEditor.setColor(this.editor, this.selectedColor, this.type);
|
|
7280
7063
|
}
|
|
7281
7064
|
}
|
|
7282
|
-
TheColorToolbarItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheColorToolbarItemComponent, deps:
|
|
7283
|
-
TheColorToolbarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.2", type: TheColorToolbarItemComponent, selector: "the-color-toolbar-item", host: { classAttribute: "the-toolbar-item" }, usesInheritance: true, ngImport: i0, template: "<a\n href=\"javascript:;\"\n thyAction\n [thyActionActive]=\"active\"\n [thyTooltip]=\"toolbarItem.name\"\n thyTooltipPlacement=\"top\"\n thyColorPicker\n
|
|
7065
|
+
TheColorToolbarItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheColorToolbarItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
7066
|
+
TheColorToolbarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.2", type: TheColorToolbarItemComponent, selector: "the-color-toolbar-item", host: { classAttribute: "the-toolbar-item" }, usesInheritance: true, ngImport: i0, template: "<a\n href=\"javascript:;\"\n thyAction\n [thyActionActive]=\"active\"\n [thyTooltip]=\"toolbarItem.name\"\n thyTooltipPlacement=\"top\"\n thyColorPicker\n thyPlacement=\"bottomLeft\"\n [(ngModel)]=\"selectedColor\"\n (ngModelChange)=\"changeColor($event)\"\n (mousedown)=\"preventDefault($event)\"\n>\n <thy-icon\n [thyIconName]=\"toolbarItem.icon\"\n thyIconType=\"twotone\"\n [thyTwotoneColor]=\"active ?? (toolbarItem.key === 'color' ? defaultColorLine : defaultBackgroundColorLine)\"\n ></thy-icon>\n <thy-icon class=\"link-down-icon font-size-sm text-desc ml-1\" thyIconName=\"caret-down\"></thy-icon>\n</a>\n", dependencies: [{ 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: i4.ThyIconComponent, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { kind: "directive", type: i8.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { kind: "component", type: i7.ThyActionComponent, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }, { kind: "directive", type: i5.ThyColorPickerDirective, selector: "[thyColorPicker]", inputs: ["thyOffset", "thyHasBackdrop", "thyDefaultColor", "thyTransparentColorSelectable", "thyPresetColors"], outputs: ["thyPanelOpen", "thyPanelClose"] }] });
|
|
7284
7067
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheColorToolbarItemComponent, decorators: [{
|
|
7285
7068
|
type: Component,
|
|
7286
7069
|
args: [{ selector: 'the-color-toolbar-item', host: {
|
|
7287
7070
|
class: 'the-toolbar-item'
|
|
7288
|
-
}, template: "<a\n href=\"javascript:;\"\n thyAction\n [thyActionActive]=\"active\"\n [thyTooltip]=\"toolbarItem.name\"\n thyTooltipPlacement=\"top\"\n thyColorPicker\n
|
|
7289
|
-
}] });
|
|
7071
|
+
}, template: "<a\n href=\"javascript:;\"\n thyAction\n [thyActionActive]=\"active\"\n [thyTooltip]=\"toolbarItem.name\"\n thyTooltipPlacement=\"top\"\n thyColorPicker\n thyPlacement=\"bottomLeft\"\n [(ngModel)]=\"selectedColor\"\n (ngModelChange)=\"changeColor($event)\"\n (mousedown)=\"preventDefault($event)\"\n>\n <thy-icon\n [thyIconName]=\"toolbarItem.icon\"\n thyIconType=\"twotone\"\n [thyTwotoneColor]=\"active ?? (toolbarItem.key === 'color' ? defaultColorLine : defaultBackgroundColorLine)\"\n ></thy-icon>\n <thy-icon class=\"link-down-icon font-size-sm text-desc ml-1\" thyIconName=\"caret-down\"></thy-icon>\n</a>\n" }]
|
|
7072
|
+
}], ctorParameters: function () { return []; } });
|
|
7290
7073
|
|
|
7291
7074
|
const createColorPlugin = createPluginFactory({
|
|
7292
7075
|
key: PluginKeys.color,
|
|
@@ -7608,8 +7391,42 @@ const createBlockCardPlugin = createPluginFactory({
|
|
|
7608
7391
|
withOverrides: withBlockCard
|
|
7609
7392
|
});
|
|
7610
7393
|
|
|
7394
|
+
const isColorPanel = (element) => {
|
|
7395
|
+
const pickerPanel = element.closest('.thy-color-picker-panel');
|
|
7396
|
+
const customPickerPanel = element.closest('.thy-color-picker-custom-panel');
|
|
7397
|
+
if (pickerPanel || customPickerPanel) {
|
|
7398
|
+
return true;
|
|
7399
|
+
}
|
|
7400
|
+
return false;
|
|
7401
|
+
};
|
|
7402
|
+
const isColorIndicator = (element) => {
|
|
7403
|
+
return element.closest('.indicator-hue-alp');
|
|
7404
|
+
};
|
|
7405
|
+
const isColorInput = (element) => {
|
|
7406
|
+
return element.closest('.thy-color-inputs');
|
|
7407
|
+
};
|
|
7408
|
+
|
|
7409
|
+
const withInternalCommon = (editor) => {
|
|
7410
|
+
const { globalMousedown } = editor;
|
|
7411
|
+
editor.globalMousedown = (event) => {
|
|
7412
|
+
const target = event.target;
|
|
7413
|
+
if (isColorIndicator(target)) {
|
|
7414
|
+
event.stopPropagation();
|
|
7415
|
+
return;
|
|
7416
|
+
}
|
|
7417
|
+
if (isColorInput(target)) {
|
|
7418
|
+
return;
|
|
7419
|
+
}
|
|
7420
|
+
if (isColorPanel(target)) {
|
|
7421
|
+
event.preventDefault();
|
|
7422
|
+
}
|
|
7423
|
+
globalMousedown(event);
|
|
7424
|
+
};
|
|
7425
|
+
return editor;
|
|
7426
|
+
};
|
|
7611
7427
|
const createCommonPlugin = createPluginFactory({
|
|
7612
7428
|
key: PluginKeys.internalCommon,
|
|
7429
|
+
withOverrides: withInternalCommon,
|
|
7613
7430
|
toolbarItems: [
|
|
7614
7431
|
{
|
|
7615
7432
|
key: ToolbarActionTypes.group,
|
|
@@ -9164,7 +8981,7 @@ class TheLinkEditComponent {
|
|
|
9164
8981
|
}
|
|
9165
8982
|
}
|
|
9166
8983
|
TheLinkEditComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheLinkEditComponent, deps: [{ token: i1$1.ThyPopoverRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
9167
|
-
TheLinkEditComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.2", type: TheLinkEditComponent, selector: "the-link-edit", inputs: { tag: "tag", node: "node", link: "link", text: "text", originSelection: "originSelection" }, host: { listeners: { "document: mousedown": "handleDocumentMouseDown($event)" }, properties: { "class": "this.className" } }, ngImport: i0, template: "<form thyForm #linkForm=\"thyForm\" [thyFormValidatorConfig]=\"validatorConfig\" name=\"linkForm\">\n <thy-form-group thyLabelText=\"\u6587\u672C\">\n <input thyInput placeholder=\"\u8BF7\u8F93\u5165\u6587\u672C\" required name=\"text\" [(ngModel)]=\"text\" thyAutofocus type=\"text\" />\n </thy-form-group>\n <thy-form-group thyLabelText=\"\u94FE\u63A5\">\n <input name=\"link\" thyInput placeholder=\"\u8BF7\u8F93\u5165\u94FE\u63A5\" required type=\"text\" #linkControl=\"ngModel\" [(ngModel)]=\"link\" />\n </thy-form-group>\n <thy-form-group-footer>\n <div class=\"btn-pair\">\n <button thyButton=\"link-secondary\" thySize=\"sm\" (click)=\"closePopover()\">\u53D6\u6D88</button>\n <button thyButton=\"primary-square\" thySize=\"sm\" (thyFormSubmit)=\"applyLink(linkForm)\">\u5E94\u7528</button>\n </div>\n </thy-form-group-footer>\n</form>\n", dependencies: [{ kind: "directive", type:
|
|
8984
|
+
TheLinkEditComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.2", type: TheLinkEditComponent, selector: "the-link-edit", inputs: { tag: "tag", node: "node", link: "link", text: "text", originSelection: "originSelection" }, host: { listeners: { "document: mousedown": "handleDocumentMouseDown($event)" }, properties: { "class": "this.className" } }, ngImport: i0, template: "<form thyForm #linkForm=\"thyForm\" [thyFormValidatorConfig]=\"validatorConfig\" name=\"linkForm\">\n <thy-form-group thyLabelText=\"\u6587\u672C\">\n <input thyInput placeholder=\"\u8BF7\u8F93\u5165\u6587\u672C\" required name=\"text\" [(ngModel)]=\"text\" thyAutofocus type=\"text\" />\n </thy-form-group>\n <thy-form-group thyLabelText=\"\u94FE\u63A5\">\n <input name=\"link\" thyInput placeholder=\"\u8BF7\u8F93\u5165\u94FE\u63A5\" required type=\"text\" #linkControl=\"ngModel\" [(ngModel)]=\"link\" />\n </thy-form-group>\n <thy-form-group-footer>\n <div class=\"btn-pair\">\n <button thyButton=\"link-secondary\" thySize=\"sm\" (click)=\"closePopover()\">\u53D6\u6D88</button>\n <button thyButton=\"primary-square\" thySize=\"sm\" (thyFormSubmit)=\"applyLink(linkForm)\">\u5E94\u7528</button>\n </div>\n </thy-form-group-footer>\n</form>\n", dependencies: [{ kind: "directive", type: i2$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i2$2.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.ThyFormDirective, selector: "[thyForm],[thy-form]", inputs: ["thyLayout", "thyEnterKeyMode", "thyFormValidatorConfig"], exportAs: ["thyForm"] }, { kind: "component", type: i3.ThyFormGroupComponent, selector: "thy-form-group", inputs: ["thyLabelText", "thyLabelTextTranslateKey", "thyLabelRequired", "thyLabelPaddingTopClear", "thyFeedbackIcon", "thyTipsMode", "thyTips", "thyTipsTranslateKey", "thyRowFill"] }, { kind: "directive", type: i3.ThyFormSubmitDirective, selector: "[thyFormSubmit],[thy-form-submit]", outputs: ["thyFormSubmit"] }, { kind: "component", type: i3.ThyFormGroupFooterComponent, selector: "thy-form-group-footer", inputs: ["thyAlign"] }, { kind: "directive", type: i5$1.ThyAutofocusDirective, selector: "input[thyAutofocus],textarea[thyAutofocus]", inputs: ["thyAutofocus", "thyAutoSelect"] }, { kind: "directive", type: i6$1.ThyInputDirective, selector: "input[thyInput], select[thyInput], textarea[thyInput]", inputs: ["thySize"], exportAs: ["thyInput"] }, { kind: "component", type: i6$2.ThyButtonComponent, selector: "thy-button,[thy-button],[thyButton]", inputs: ["thyButton", "thyType", "thyLoading", "thyLoadingText", "thySize", "thyIcon", "thyBlock"] }] });
|
|
9168
8985
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheLinkEditComponent, decorators: [{
|
|
9169
8986
|
type: Component,
|
|
9170
8987
|
args: [{ selector: 'the-link-edit', template: "<form thyForm #linkForm=\"thyForm\" [thyFormValidatorConfig]=\"validatorConfig\" name=\"linkForm\">\n <thy-form-group thyLabelText=\"\u6587\u672C\">\n <input thyInput placeholder=\"\u8BF7\u8F93\u5165\u6587\u672C\" required name=\"text\" [(ngModel)]=\"text\" thyAutofocus type=\"text\" />\n </thy-form-group>\n <thy-form-group thyLabelText=\"\u94FE\u63A5\">\n <input name=\"link\" thyInput placeholder=\"\u8BF7\u8F93\u5165\u94FE\u63A5\" required type=\"text\" #linkControl=\"ngModel\" [(ngModel)]=\"link\" />\n </thy-form-group>\n <thy-form-group-footer>\n <div class=\"btn-pair\">\n <button thyButton=\"link-secondary\" thySize=\"sm\" (click)=\"closePopover()\">\u53D6\u6D88</button>\n <button thyButton=\"primary-square\" thySize=\"sm\" (thyFormSubmit)=\"applyLink(linkForm)\">\u5E94\u7528</button>\n </div>\n </thy-form-group-footer>\n</form>\n" }]
|
|
@@ -11112,6 +10929,9 @@ function getSelectCellNode(editor, selectedCells) {
|
|
|
11112
10929
|
|
|
11113
10930
|
/* cell-position 有关的函数 */
|
|
11114
10931
|
const isSelectedAllCell = (editor, selectedCellPositions) => {
|
|
10932
|
+
if (!AngularEditor.isFocused(editor)) {
|
|
10933
|
+
return false;
|
|
10934
|
+
}
|
|
11115
10935
|
const pos = createTablePosition(editor);
|
|
11116
10936
|
return !!selectedCellPositions.length && pos.getHeight() * pos.getWidth() === selectedCellPositions.length;
|
|
11117
10937
|
};
|
|
@@ -11285,6 +11105,9 @@ function setCellMenuVisibility(editor, menuList, tableInfo) {
|
|
|
11285
11105
|
|
|
11286
11106
|
class TheContextMenuComponent {
|
|
11287
11107
|
handleDocumentMouseDown(event) {
|
|
11108
|
+
if (isColorPanel(event.target)) {
|
|
11109
|
+
return;
|
|
11110
|
+
}
|
|
11288
11111
|
if (!this.elementRef.nativeElement.contains(event.target) && event.button !== 2) {
|
|
11289
11112
|
this.thyPopoverRef.close();
|
|
11290
11113
|
}
|
|
@@ -11315,6 +11138,10 @@ class TheContextMenuComponent {
|
|
|
11315
11138
|
this.actionHandle(entity);
|
|
11316
11139
|
this.thyPopoverRef.close();
|
|
11317
11140
|
}
|
|
11141
|
+
changeColor(color, item) {
|
|
11142
|
+
item.backgroundColor = color;
|
|
11143
|
+
item.activeHandle(undefined, item);
|
|
11144
|
+
}
|
|
11318
11145
|
constructor(elementRef, thyPopoverRef) {
|
|
11319
11146
|
this.elementRef = elementRef;
|
|
11320
11147
|
this.thyPopoverRef = thyPopoverRef;
|
|
@@ -11324,10 +11151,10 @@ class TheContextMenuComponent {
|
|
|
11324
11151
|
ngOnInit() { }
|
|
11325
11152
|
}
|
|
11326
11153
|
TheContextMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheContextMenuComponent, deps: [{ token: i0.ElementRef }, { token: i1$1.ThyPopoverRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
11327
|
-
TheContextMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.2", type: TheContextMenuComponent, selector: "the-contextmenu", inputs: { menuEntities: "menuEntities", actionHandle: "actionHandle", activeHandle: "activeHandle", deactivateHandle: "deactivateHandle" }, 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 <ng-container *ngIf=\"menuItem.visibility && !menuItem?.isInputNumber\">\n <ng-template [ngTemplateOutlet]=\"defaultMenuTemplate\" [ngTemplateOutletContext]=\"{ $implicit: menuItem }\"></ng-template>\n </ng-container>\n <ng-container *ngIf=\"menuItem.visibility && menuItem?.isInputNumber\">\n <ng-template [ngTemplateOutlet]=\"inputNumberMenuTemplate\" [ngTemplateOutletContext]=\"{ $implicit: menuItem }\"></ng-template>\n </ng-container>\n <thy-dropdown-menu-divider *ngIf=\"menuItem.divider && menuItem.visibility\"></thy-dropdown-menu-divider>\n </ng-container>\n</div>\n\n<ng-template #defaultMenuTemplate let-item>\n <a\n href=\"javascript:;\"\n thyDropdownMenuItem\n (mousedown)=\"itemMousedown($event, item)\"\n (mouseenter)=\"itemMouseenter($event, item)\"\n (mouseleave)=\"itemMouseleave($event, item)\"\n >\n <span thyDropdownMenuItemIcon>\n <thy-icon\n
|
|
11154
|
+
TheContextMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.2", type: TheContextMenuComponent, selector: "the-contextmenu", inputs: { menuEntities: "menuEntities", actionHandle: "actionHandle", activeHandle: "activeHandle", deactivateHandle: "deactivateHandle" }, 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 <ng-container *ngIf=\"menuItem.visibility && !menuItem?.isInputNumber && menuItem.key !== 'background-color'\">\n <ng-template [ngTemplateOutlet]=\"defaultMenuTemplate\" [ngTemplateOutletContext]=\"{ $implicit: menuItem }\"></ng-template>\n </ng-container>\n <ng-container *ngIf=\"menuItem.visibility && menuItem.key === 'background-color'\">\n <ng-template [ngTemplateOutlet]=\"backgroundColorTemplate\" [ngTemplateOutletContext]=\"{ $implicit: menuItem }\"></ng-template>\n </ng-container>\n <ng-container *ngIf=\"menuItem.visibility && menuItem?.isInputNumber\">\n <ng-template [ngTemplateOutlet]=\"inputNumberMenuTemplate\" [ngTemplateOutletContext]=\"{ $implicit: menuItem }\"></ng-template>\n </ng-container>\n <thy-dropdown-menu-divider *ngIf=\"menuItem.divider && menuItem.visibility\"></thy-dropdown-menu-divider>\n </ng-container>\n</div>\n\n<ng-template #defaultMenuTemplate let-item>\n <a\n href=\"javascript:;\"\n thyDropdownMenuItem\n (mousedown)=\"itemMousedown($event, item)\"\n (mouseenter)=\"itemMouseenter($event, item)\"\n (mouseleave)=\"itemMouseleave($event, item)\"\n >\n <span thyDropdownMenuItemIcon>\n <thy-icon [thyIconName]=\"item.icon\"></thy-icon>\n </span>\n <span thyDropdownMenuItemName>{{ item.name }}</span>\n <span *ngIf=\"item.extendIcon\" thyDropdownMenuItemExtendIcon>\n <thy-icon thyIconName=\"{{ item.extendIcon }}\"></thy-icon>\n </span>\n </a>\n</ng-template>\n\n<ng-template #backgroundColorTemplate let-item>\n <a\n href=\"javascript:;\"\n thyDropdownMenuItem\n thyColorPicker\n thyTrigger=\"hover\"\n thyPlacement=\"right\"\n [(ngModel)]=\"item.backgroundColor\"\n (ngModelChange)=\"changeColor($event, item)\"\n [thyHasBackdrop]=\"false\"\n >\n <span thyDropdownMenuItemIcon>\n <thy-icon [thyIconName]=\"item.icon\" thyIconType=\"twotone\" [thyTwotoneColor]=\"item.backgroundColor\"></thy-icon>\n </span>\n <span thyDropdownMenuItemName>{{ item.name }}</span>\n <span *ngIf=\"item.extendIcon\" thyDropdownMenuItemExtendIcon>\n <thy-icon thyIconName=\"{{ item.extendIcon }}\"></thy-icon>\n </span>\n </a>\n</ng-template>\n\n<ng-template #inputNumberMenuTemplate let-item>\n <a href=\"javascript:;\" class=\"the-input-number-menu\" thyDropdownMenuItem (click)=\"itemMousedown($event, item)\">\n <span thyDropdownMenuItemIcon>\n <thy-icon [thyIconName]=\"item.icon\"></thy-icon>\n </span>\n <span thyDropdownMenuItemName class=\"d-flex align-items-center\">\n {{ item.name }}\n <thy-input-number\n #inputNumber\n class=\"mx-2\"\n thySize=\"sm\"\n [(ngModel)]=\"item.count\"\n [thyStep]=\"1\"\n [thyMin]=\"1\"\n (click)=\"inputNumberFocus($event)\"\n (thyEnter)=\"itemEnterHandle($event, item)\"\n thyStopPropagation\n ></thy-input-number>\n {{ item.nameSuffix }}\n </span>\n </a>\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.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { 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: i4.ThyIconComponent, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { kind: "directive", type: i5$1.ThyEnterDirective, selector: "[thyEnter]", outputs: ["thyEnter"] }, { kind: "directive", type: i5$1.ThyStopPropagationDirective, selector: "[thyStopPropagation]", inputs: ["thyStopPropagation"] }, { kind: "component", type: i6.ThyDropdownMenuDividerComponent, selector: "thy-dropdown-menu-divider" }, { kind: "directive", type: i6.ThyDropdownMenuItemDirective, selector: "[thyDropdownMenuItem]", inputs: ["thyType", "thyDisabled"] }, { kind: "directive", type: i6.ThyDropdownMenuItemNameDirective, selector: "[thyDropdownMenuItemName]" }, { kind: "directive", type: i6.ThyDropdownMenuItemIconDirective, selector: "[thyDropdownMenuItemIcon]" }, { kind: "directive", type: i6.ThyDropdownMenuItemExtendIconDirective, selector: "[thyDropdownMenuItemExtendIcon]" }, { kind: "component", type: i7$1.ThyInputNumberComponent, selector: "thy-input-number", inputs: ["thyAutoFocus", "thyPlaceholder", "thyDisabled", "thyMax", "thyMin", "thyStep", "thySize", "thyPrecision", "thySuffix"], outputs: ["thyBlur", "thyFocus"] }, { kind: "directive", type: i5.ThyColorPickerDirective, selector: "[thyColorPicker]", inputs: ["thyOffset", "thyHasBackdrop", "thyDefaultColor", "thyTransparentColorSelectable", "thyPresetColors"], outputs: ["thyPanelOpen", "thyPanelClose"] }] });
|
|
11328
11155
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheContextMenuComponent, decorators: [{
|
|
11329
11156
|
type: Component,
|
|
11330
|
-
args: [{ selector: 'the-contextmenu', template: "<div class=\"thy-dropdown-menu\">\n <ng-container *ngFor=\"let menuItem of menuEntities\">\n <ng-container *ngIf=\"menuItem.visibility && !menuItem?.isInputNumber\">\n <ng-template [ngTemplateOutlet]=\"defaultMenuTemplate\" [ngTemplateOutletContext]=\"{ $implicit: menuItem }\"></ng-template>\n </ng-container>\n <ng-container *ngIf=\"menuItem.visibility && menuItem?.isInputNumber\">\n <ng-template [ngTemplateOutlet]=\"inputNumberMenuTemplate\" [ngTemplateOutletContext]=\"{ $implicit: menuItem }\"></ng-template>\n </ng-container>\n <thy-dropdown-menu-divider *ngIf=\"menuItem.divider && menuItem.visibility\"></thy-dropdown-menu-divider>\n </ng-container>\n</div>\n\n<ng-template #defaultMenuTemplate let-item>\n <a\n href=\"javascript:;\"\n thyDropdownMenuItem\n (mousedown)=\"itemMousedown($event, item)\"\n (mouseenter)=\"itemMouseenter($event, item)\"\n (mouseleave)=\"itemMouseleave($event, item)\"\n >\n <span thyDropdownMenuItemIcon>\n <thy-icon\n
|
|
11157
|
+
args: [{ selector: 'the-contextmenu', template: "<div class=\"thy-dropdown-menu\">\n <ng-container *ngFor=\"let menuItem of menuEntities\">\n <ng-container *ngIf=\"menuItem.visibility && !menuItem?.isInputNumber && menuItem.key !== 'background-color'\">\n <ng-template [ngTemplateOutlet]=\"defaultMenuTemplate\" [ngTemplateOutletContext]=\"{ $implicit: menuItem }\"></ng-template>\n </ng-container>\n <ng-container *ngIf=\"menuItem.visibility && menuItem.key === 'background-color'\">\n <ng-template [ngTemplateOutlet]=\"backgroundColorTemplate\" [ngTemplateOutletContext]=\"{ $implicit: menuItem }\"></ng-template>\n </ng-container>\n <ng-container *ngIf=\"menuItem.visibility && menuItem?.isInputNumber\">\n <ng-template [ngTemplateOutlet]=\"inputNumberMenuTemplate\" [ngTemplateOutletContext]=\"{ $implicit: menuItem }\"></ng-template>\n </ng-container>\n <thy-dropdown-menu-divider *ngIf=\"menuItem.divider && menuItem.visibility\"></thy-dropdown-menu-divider>\n </ng-container>\n</div>\n\n<ng-template #defaultMenuTemplate let-item>\n <a\n href=\"javascript:;\"\n thyDropdownMenuItem\n (mousedown)=\"itemMousedown($event, item)\"\n (mouseenter)=\"itemMouseenter($event, item)\"\n (mouseleave)=\"itemMouseleave($event, item)\"\n >\n <span thyDropdownMenuItemIcon>\n <thy-icon [thyIconName]=\"item.icon\"></thy-icon>\n </span>\n <span thyDropdownMenuItemName>{{ item.name }}</span>\n <span *ngIf=\"item.extendIcon\" thyDropdownMenuItemExtendIcon>\n <thy-icon thyIconName=\"{{ item.extendIcon }}\"></thy-icon>\n </span>\n </a>\n</ng-template>\n\n<ng-template #backgroundColorTemplate let-item>\n <a\n href=\"javascript:;\"\n thyDropdownMenuItem\n thyColorPicker\n thyTrigger=\"hover\"\n thyPlacement=\"right\"\n [(ngModel)]=\"item.backgroundColor\"\n (ngModelChange)=\"changeColor($event, item)\"\n [thyHasBackdrop]=\"false\"\n >\n <span thyDropdownMenuItemIcon>\n <thy-icon [thyIconName]=\"item.icon\" thyIconType=\"twotone\" [thyTwotoneColor]=\"item.backgroundColor\"></thy-icon>\n </span>\n <span thyDropdownMenuItemName>{{ item.name }}</span>\n <span *ngIf=\"item.extendIcon\" thyDropdownMenuItemExtendIcon>\n <thy-icon thyIconName=\"{{ item.extendIcon }}\"></thy-icon>\n </span>\n </a>\n</ng-template>\n\n<ng-template #inputNumberMenuTemplate let-item>\n <a href=\"javascript:;\" class=\"the-input-number-menu\" thyDropdownMenuItem (click)=\"itemMousedown($event, item)\">\n <span thyDropdownMenuItemIcon>\n <thy-icon [thyIconName]=\"item.icon\"></thy-icon>\n </span>\n <span thyDropdownMenuItemName class=\"d-flex align-items-center\">\n {{ item.name }}\n <thy-input-number\n #inputNumber\n class=\"mx-2\"\n thySize=\"sm\"\n [(ngModel)]=\"item.count\"\n [thyStep]=\"1\"\n [thyMin]=\"1\"\n (click)=\"inputNumberFocus($event)\"\n (thyEnter)=\"itemEnterHandle($event, item)\"\n thyStopPropagation\n ></thy-input-number>\n {{ item.nameSuffix }}\n </span>\n </a>\n</ng-template>\n" }]
|
|
11331
11158
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1$1.ThyPopoverRef }]; }, propDecorators: { menuEntities: [{
|
|
11332
11159
|
type: Input
|
|
11333
11160
|
}], actionHandle: [{
|
|
@@ -11367,6 +11194,25 @@ const getSelectedCell = (editor) => {
|
|
|
11367
11194
|
return null;
|
|
11368
11195
|
};
|
|
11369
11196
|
|
|
11197
|
+
const setSelectedCellsBackgroundColor = (editor, color, tableStore) => {
|
|
11198
|
+
// 点击自定义颜色面板输入框设置颜色值时,会丢失焦点和选区(目前无法做到焦点同时存在于编辑器和输入框)
|
|
11199
|
+
if (!editor.selection) {
|
|
11200
|
+
reSelection(editor);
|
|
11201
|
+
}
|
|
11202
|
+
if (editor.selection) {
|
|
11203
|
+
const isHeader = TableEditor.isActiveHeader(editor);
|
|
11204
|
+
if (color === 'transparent') {
|
|
11205
|
+
color = null;
|
|
11206
|
+
}
|
|
11207
|
+
if ((color === TableHeaderBackgroundColor && isHeader) || (color === SpecialBackgroundColor && !isHeader)) {
|
|
11208
|
+
tableStore.setSelectedCellsBackgroundColor(null);
|
|
11209
|
+
}
|
|
11210
|
+
else {
|
|
11211
|
+
tableStore.setSelectedCellsBackgroundColor(color);
|
|
11212
|
+
}
|
|
11213
|
+
}
|
|
11214
|
+
};
|
|
11215
|
+
|
|
11370
11216
|
const getMinAndMaxCellIndex = (editor, selectedCellPositions, maxRow, maxCol, minRow, minCol, table) => {
|
|
11371
11217
|
const beforeCols = [];
|
|
11372
11218
|
const beforeRows = [];
|
|
@@ -11820,8 +11666,7 @@ class TheTableContextMenuService {
|
|
|
11820
11666
|
const cell = getSelectedCell(this.editor);
|
|
11821
11667
|
return cell ? cell.backgroundColor : '';
|
|
11822
11668
|
}
|
|
11823
|
-
constructor(
|
|
11824
|
-
this.colorSelectService = colorSelectService;
|
|
11669
|
+
constructor(tableStore, thyPopover, ngZone, theContextService) {
|
|
11825
11670
|
this.tableStore = tableStore;
|
|
11826
11671
|
this.thyPopover = thyPopover;
|
|
11827
11672
|
this.ngZone = ngZone;
|
|
@@ -11835,24 +11680,8 @@ class TheTableContextMenuService {
|
|
|
11835
11680
|
extendIcon: 'angle-right',
|
|
11836
11681
|
visibility: true,
|
|
11837
11682
|
actionHandle: () => { },
|
|
11838
|
-
activeHandle: (event) => {
|
|
11839
|
-
|
|
11840
|
-
return;
|
|
11841
|
-
}
|
|
11842
|
-
const isHeader = TableEditor.isActiveHeader(this.editor);
|
|
11843
|
-
this.colorSelectService.toggleColorSelect(event.target, this.backgroundColor, BackgroundColors, {
|
|
11844
|
-
perRowColorNumbers: 7,
|
|
11845
|
-
rowOptions: { 1: '#bbb', 2: '#bbb' },
|
|
11846
|
-
specialColor: isHeader ? TableHeaderBackgroundColor : SpecialBackgroundColor
|
|
11847
|
-
}, (newColor) => {
|
|
11848
|
-
if ((newColor === TableHeaderBackgroundColor && isHeader) || (newColor === SpecialBackgroundColor && !isHeader)) {
|
|
11849
|
-
this.tableStore.setSelectedCellsBackgroundColor(null);
|
|
11850
|
-
}
|
|
11851
|
-
else {
|
|
11852
|
-
this.tableStore.setSelectedCellsBackgroundColor(newColor);
|
|
11853
|
-
}
|
|
11854
|
-
this.tableStore.selectFirstCell();
|
|
11855
|
-
}, 'rightTop', 0);
|
|
11683
|
+
activeHandle: (event, item) => {
|
|
11684
|
+
setSelectedCellsBackgroundColor(this.editor, item.backgroundColor, this.tableStore);
|
|
11856
11685
|
},
|
|
11857
11686
|
deactivateHandle: (event) => {
|
|
11858
11687
|
if (event.relatedTarget instanceof HTMLElement) {
|
|
@@ -11860,9 +11689,6 @@ class TheTableContextMenuService {
|
|
|
11860
11689
|
return;
|
|
11861
11690
|
}
|
|
11862
11691
|
}
|
|
11863
|
-
if (this.colorSelectService.isOpenColorSelect) {
|
|
11864
|
-
this.colorSelectService.closeColorSelect();
|
|
11865
|
-
}
|
|
11866
11692
|
}
|
|
11867
11693
|
},
|
|
11868
11694
|
{
|
|
@@ -12080,11 +11906,11 @@ class TheTableContextMenuService {
|
|
|
12080
11906
|
}
|
|
12081
11907
|
}
|
|
12082
11908
|
}
|
|
12083
|
-
TheTableContextMenuService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheTableContextMenuService, deps: [{ token:
|
|
11909
|
+
TheTableContextMenuService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheTableContextMenuService, deps: [{ token: TableStore }, { token: i1$1.ThyPopover }, { token: i0.NgZone }, { token: TheContextService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
12084
11910
|
TheTableContextMenuService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheTableContextMenuService });
|
|
12085
11911
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheTableContextMenuService, decorators: [{
|
|
12086
11912
|
type: Injectable
|
|
12087
|
-
}], ctorParameters: function () { return [{ type:
|
|
11913
|
+
}], ctorParameters: function () { return [{ type: TableStore }, { type: i1$1.ThyPopover }, { type: i0.NgZone }, { type: TheContextService }]; } });
|
|
12088
11914
|
|
|
12089
11915
|
class TheTableOptionsComponent {
|
|
12090
11916
|
constructor(popoverRef) {
|
|
@@ -12182,9 +12008,7 @@ class TheTableToolbarComponent {
|
|
|
12182
12008
|
get tableOptions() {
|
|
12183
12009
|
return getPluginOptions(this.editor, PluginKeys.table);
|
|
12184
12010
|
}
|
|
12185
|
-
constructor(
|
|
12186
|
-
this.ngZone = ngZone;
|
|
12187
|
-
this.colorSelectService = colorSelectService;
|
|
12011
|
+
constructor(thyPopover, popoverRef, thyNotifyService) {
|
|
12188
12012
|
this.thyPopover = thyPopover;
|
|
12189
12013
|
this.popoverRef = popoverRef;
|
|
12190
12014
|
this.thyNotifyService = thyNotifyService;
|
|
@@ -12234,7 +12058,6 @@ class TheTableToolbarComponent {
|
|
|
12234
12058
|
}
|
|
12235
12059
|
ngOnDestroy() {
|
|
12236
12060
|
this.tableChangeSubscriber?.unsubscribe();
|
|
12237
|
-
this.colorSelectService.closeColorSelect();
|
|
12238
12061
|
}
|
|
12239
12062
|
setDeleteIcon() {
|
|
12240
12063
|
const { selectedRowsIndex, selectedColumnsIndex } = this.tableStore;
|
|
@@ -12273,26 +12096,13 @@ class TheTableToolbarComponent {
|
|
|
12273
12096
|
onLeaveDelete(event) {
|
|
12274
12097
|
this.tableStore.clearDangerousCells();
|
|
12275
12098
|
}
|
|
12276
|
-
|
|
12277
|
-
|
|
12278
|
-
|
|
12279
|
-
|
|
12280
|
-
|
|
12281
|
-
this.
|
|
12282
|
-
|
|
12283
|
-
perRowColorNumbers: 7,
|
|
12284
|
-
rowOptions: { 1: '#bbb', 2: '#bbb' },
|
|
12285
|
-
specialColor: isHeader ? TableHeaderBackgroundColor : SpecialBackgroundColor
|
|
12286
|
-
}, (newColor) => {
|
|
12287
|
-
if ((newColor === TableHeaderBackgroundColor && isHeader) || (newColor === SpecialBackgroundColor && !isHeader)) {
|
|
12288
|
-
this.tableStore.setSelectedCellsBackgroundColor(null);
|
|
12289
|
-
}
|
|
12290
|
-
else {
|
|
12291
|
-
this.tableStore.setSelectedCellsBackgroundColor(newColor);
|
|
12292
|
-
}
|
|
12293
|
-
this.selectedColor = newColor;
|
|
12294
|
-
}, 'bottomLeft', 4);
|
|
12295
|
-
});
|
|
12099
|
+
openColorPanel(e) {
|
|
12100
|
+
e.preventDefault();
|
|
12101
|
+
e.stopPropagation();
|
|
12102
|
+
}
|
|
12103
|
+
changeColor(newColor) {
|
|
12104
|
+
setSelectedCellsBackgroundColor(this.editor, newColor, this.tableStore);
|
|
12105
|
+
this.selectedColor = newColor;
|
|
12296
12106
|
}
|
|
12297
12107
|
setFullscreen(event) {
|
|
12298
12108
|
this.tableOptions.setFullscreen(this.editor, event, this.tableElement);
|
|
@@ -12336,12 +12146,12 @@ class TheTableToolbarComponent {
|
|
|
12336
12146
|
});
|
|
12337
12147
|
}
|
|
12338
12148
|
}
|
|
12339
|
-
TheTableToolbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheTableToolbarComponent, deps: [{ token:
|
|
12340
|
-
TheTableToolbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.2", 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=\"hasDivider\" class=\"mr-2 ml-1 align-self-center\" [thyVertical]=\"true\"> </thy-divider>\n <a
|
|
12149
|
+
TheTableToolbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheTableToolbarComponent, deps: [{ token: i1$1.ThyPopover }, { token: i1$1.ThyPopoverRef }, { token: i1$2.ThyNotifyService }], target: i0.ɵɵFactoryTarget.Component });
|
|
12150
|
+
TheTableToolbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.2", 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=\"hasDivider\" class=\"mr-2 ml-1 align-self-center\" [thyVertical]=\"true\"> </thy-divider>\n <a\n href=\"javascript:;\"\n thyAction\n thyTooltip=\"\u5355\u5143\u683C\u80CC\u666F\"\n thyColorPicker\n [(ngModel)]=\"selectedColor\"\n (ngModelChange)=\"changeColor($event)\"\n (mousedown)=\"openColorPanel($event)\"\n thyPlacement=\"bottomLeft\"\n >\n <thy-icon thyIconName=\"background-tt\" thyIconType=\"twotone\" [thyTwotoneColor]=\"selectedColor\"></thy-icon>\n </a>\n <a\n href=\"javascript:;\"\n *ngIf=\"tableStore.isSelectedTable && !isColumnEqual\"\n thyAction\n thyTooltip=\"\u5217\u7B49\u5BBD\"\n (mousedown)=\"setEquallyColumnHandle($event)\"\n >\n <thy-icon thyIconName=\"table-column-equal-width\"></thy-icon>\n </a>\n <a\n href=\"javascript:;\"\n *ngIf=\"tableStore.isSelectedTable && tableOptions?.showFullscreen\"\n thyAction\n thyTooltip=\"\u5168\u5C4F\"\n (mousedown)=\"setFullscreen($event)\"\n >\n <thy-icon thyIconName=\"arrows-alt\"></thy-icon>\n </a>\n <a\n *ngIf=\"tableStore.isSelectedTable && !tableStore?.isFullscreen\"\n class=\"fullscreen-hidden\"\n href=\"javascript:;\"\n thyAction\n thyActionIcon=\"copy\"\n thyTooltip=\"\u590D\u5236\"\n (mousedown)=\"onCopy($event)\"\n ></a>\n <ng-container *ngIf=\"tableStore.isSelectedTable\">\n <thy-divider class=\"mr-2 ml-1 align-self-center\" [thyVertical]=\"true\"></thy-divider>\n <a href=\"javascript:;\" class=\"link-with-down\" thyAction (mousedown)=\"mousedown($event)\" (click)=\"openTableOptionMenu($event)\">\n <span>\u8868\u683C\u9009\u9879</span>\n <thy-icon class=\"font-size-sm text-desc ml-1\" thyIconName=\"caret-down\"></thy-icon>\n </a>\n </ng-container>\n <ng-container *ngIf=\"tableStore?.isFullscreen ? deleteIcon && !tableStore.isSelectedTable : deleteIcon\">\n <thy-divider class=\"mr-2 ml-1 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", 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: i4.ThyIconComponent, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { kind: "directive", type: i8.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { kind: "component", type: i7.ThyActionComponent, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }, { kind: "component", type: i7.ThyActionsComponent, selector: "thy-actions", inputs: ["thySize"] }, { kind: "component", type: i8$1.ThyDividerComponent, selector: "thy-divider", inputs: ["thyVertical", "thyStyle", "thyColor", "thyText", "thyTextDirection", "thyDeeper"] }, { kind: "directive", type: i5.ThyColorPickerDirective, selector: "[thyColorPicker]", inputs: ["thyOffset", "thyHasBackdrop", "thyDefaultColor", "thyTransparentColorSelectable", "thyPresetColors"], outputs: ["thyPanelOpen", "thyPanelClose"] }] });
|
|
12341
12151
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheTableToolbarComponent, decorators: [{
|
|
12342
12152
|
type: Component,
|
|
12343
|
-
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=\"hasDivider\" class=\"mr-2 ml-1 align-self-center\" [thyVertical]=\"true\"> </thy-divider>\n <a
|
|
12344
|
-
}], ctorParameters: function () { return [{ type:
|
|
12153
|
+
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=\"hasDivider\" class=\"mr-2 ml-1 align-self-center\" [thyVertical]=\"true\"> </thy-divider>\n <a\n href=\"javascript:;\"\n thyAction\n thyTooltip=\"\u5355\u5143\u683C\u80CC\u666F\"\n thyColorPicker\n [(ngModel)]=\"selectedColor\"\n (ngModelChange)=\"changeColor($event)\"\n (mousedown)=\"openColorPanel($event)\"\n thyPlacement=\"bottomLeft\"\n >\n <thy-icon thyIconName=\"background-tt\" thyIconType=\"twotone\" [thyTwotoneColor]=\"selectedColor\"></thy-icon>\n </a>\n <a\n href=\"javascript:;\"\n *ngIf=\"tableStore.isSelectedTable && !isColumnEqual\"\n thyAction\n thyTooltip=\"\u5217\u7B49\u5BBD\"\n (mousedown)=\"setEquallyColumnHandle($event)\"\n >\n <thy-icon thyIconName=\"table-column-equal-width\"></thy-icon>\n </a>\n <a\n href=\"javascript:;\"\n *ngIf=\"tableStore.isSelectedTable && tableOptions?.showFullscreen\"\n thyAction\n thyTooltip=\"\u5168\u5C4F\"\n (mousedown)=\"setFullscreen($event)\"\n >\n <thy-icon thyIconName=\"arrows-alt\"></thy-icon>\n </a>\n <a\n *ngIf=\"tableStore.isSelectedTable && !tableStore?.isFullscreen\"\n class=\"fullscreen-hidden\"\n href=\"javascript:;\"\n thyAction\n thyActionIcon=\"copy\"\n thyTooltip=\"\u590D\u5236\"\n (mousedown)=\"onCopy($event)\"\n ></a>\n <ng-container *ngIf=\"tableStore.isSelectedTable\">\n <thy-divider class=\"mr-2 ml-1 align-self-center\" [thyVertical]=\"true\"></thy-divider>\n <a href=\"javascript:;\" class=\"link-with-down\" thyAction (mousedown)=\"mousedown($event)\" (click)=\"openTableOptionMenu($event)\">\n <span>\u8868\u683C\u9009\u9879</span>\n <thy-icon class=\"font-size-sm text-desc ml-1\" thyIconName=\"caret-down\"></thy-icon>\n </a>\n </ng-container>\n <ng-container *ngIf=\"tableStore?.isFullscreen ? deleteIcon && !tableStore.isSelectedTable : deleteIcon\">\n <thy-divider class=\"mr-2 ml-1 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" }]
|
|
12154
|
+
}], ctorParameters: function () { return [{ type: i1$1.ThyPopover }, { type: i1$1.ThyPopoverRef }, { type: i1$2.ThyNotifyService }]; }, propDecorators: { tableStore: [{
|
|
12345
12155
|
type: Input
|
|
12346
12156
|
}], tableElement: [{
|
|
12347
12157
|
type: Input
|
|
@@ -12394,6 +12204,20 @@ class TableService {
|
|
|
12394
12204
|
scrollStrategy: this.overlay.scrollStrategies.reposition(),
|
|
12395
12205
|
manualClosure: true
|
|
12396
12206
|
});
|
|
12207
|
+
if (this.toolbarRef) {
|
|
12208
|
+
this.toolbarRef
|
|
12209
|
+
.getOverlayRef()
|
|
12210
|
+
.outsidePointerEvents()
|
|
12211
|
+
.pipe(skip(1))
|
|
12212
|
+
.subscribe(event => {
|
|
12213
|
+
if (isColorPanel(event.target)) {
|
|
12214
|
+
return;
|
|
12215
|
+
}
|
|
12216
|
+
if (!this.toolbarRef.getOverlayRef().hostElement.contains(event.target)) {
|
|
12217
|
+
this.closeToolbar();
|
|
12218
|
+
}
|
|
12219
|
+
});
|
|
12220
|
+
}
|
|
12397
12221
|
}
|
|
12398
12222
|
afterSelectedCells(origin, element) {
|
|
12399
12223
|
this.theTableContextMenuService.closeContextMenu();
|
|
@@ -12919,16 +12743,20 @@ class TheTableComponent extends TheBaseElementComponent {
|
|
|
12919
12743
|
this.isSelectedAllCell = isSelectedAllCell(this.editor, this.tableStore.getSelectedCellPositions());
|
|
12920
12744
|
});
|
|
12921
12745
|
}
|
|
12746
|
+
/**
|
|
12747
|
+
* 打印模式下,按照原宽度比例基于当前表格宽度计算列宽
|
|
12748
|
+
*/
|
|
12922
12749
|
calcPrintColumnsWidth() {
|
|
12923
|
-
// 打印模式下,按照原宽度比例基于当前表格宽度计算列宽
|
|
12924
12750
|
const columns = this.element?.columns;
|
|
12925
12751
|
if (this.config.mode === TheMode.print && columns) {
|
|
12926
12752
|
const opts = new TableOptions();
|
|
12927
12753
|
const tableWidth = columns.reduce((a, b) => a + b.width, 0);
|
|
12928
|
-
const cellsWidthRatio = columns.map(column => column.width / tableWidth);
|
|
12929
|
-
|
|
12754
|
+
const cellsWidthRatio = columns.map(column => Math.floor((column.width / tableWidth) * 100) / 100);
|
|
12755
|
+
// 为什么是 634,按照 DPI 96 的 A4 纸的宽度是 794px, 但打印时会有左右 80px 的边距,所以这里取 794 - 80 * 2 = 634
|
|
12756
|
+
const printWidth = 634;
|
|
12930
12757
|
this.printColumns = cellsWidthRatio.map(item => {
|
|
12931
|
-
|
|
12758
|
+
// 为什么减 1, 因为这个宽度是内容区域宽度,但 td 右侧还有一个边框,所以减去 1
|
|
12759
|
+
const width = parseInt(`${item * printWidth}`) - 1;
|
|
12932
12760
|
return { width: width < opts.minWidthPx ? opts.minWidthPx : width };
|
|
12933
12761
|
});
|
|
12934
12762
|
}
|
|
@@ -13428,7 +13256,10 @@ class TheTableComponent extends TheBaseElementComponent {
|
|
|
13428
13256
|
merge(fromEvent(document, 'mousedown').pipe(filter((e) => e.button !== 2)), fromEvent(document, 'keydown').pipe(filter((e) => {
|
|
13429
13257
|
return !isVirtualKey(e) && !this.theTableContextMenuService.isOpened;
|
|
13430
13258
|
})))
|
|
13431
|
-
.pipe(filter(() => {
|
|
13259
|
+
.pipe(filter((event) => {
|
|
13260
|
+
if (isColorPanel(event.target)) {
|
|
13261
|
+
return false;
|
|
13262
|
+
}
|
|
13432
13263
|
const selectedCellPositions = this.tableStore.getSelectedCellPositions();
|
|
13433
13264
|
return selectedCellPositions?.length > 0;
|
|
13434
13265
|
}), takeUntil(this.destroy$))
|
|
@@ -13443,7 +13274,6 @@ class TheTableComponent extends TheBaseElementComponent {
|
|
|
13443
13274
|
if (!isCurrentTableElement) {
|
|
13444
13275
|
this.tableStore.clearLastFocusPath();
|
|
13445
13276
|
}
|
|
13446
|
-
this.tableService.closeToolbar();
|
|
13447
13277
|
this.theTableContextMenuService.closeContextMenu();
|
|
13448
13278
|
});
|
|
13449
13279
|
}
|
|
@@ -15953,6 +15783,7 @@ class TheEditorComponent extends mixinUnsubscribe(MixinBase) {
|
|
|
15953
15783
|
}
|
|
15954
15784
|
ngOnInit() {
|
|
15955
15785
|
this.initialize();
|
|
15786
|
+
this.initializeEvents();
|
|
15956
15787
|
initializeDefaultMenuIcons(this.iconRegistry);
|
|
15957
15788
|
this.theContextService.uploadingStatus$.subscribe(isUploading => {
|
|
15958
15789
|
if (isUploading) {
|
|
@@ -16029,6 +15860,15 @@ class TheEditorComponent extends mixinUnsubscribe(MixinBase) {
|
|
|
16029
15860
|
};
|
|
16030
15861
|
}
|
|
16031
15862
|
}
|
|
15863
|
+
initializeEvents() {
|
|
15864
|
+
this.ngZone.runOutsideAngular(() => {
|
|
15865
|
+
fromEvent(document, 'mousedown')
|
|
15866
|
+
.pipe(takeUntil$1(this.ngUnsubscribe$))
|
|
15867
|
+
.subscribe((event) => {
|
|
15868
|
+
this.editor.globalMousedown(event);
|
|
15869
|
+
});
|
|
15870
|
+
});
|
|
15871
|
+
}
|
|
16032
15872
|
applyAutoFocus() {
|
|
16033
15873
|
if (!this.theOptions?.disabled && !this.theOptions?.readonly) {
|
|
16034
15874
|
autoFocus(this.editor, this.theOptions?.autoFocus);
|
|
@@ -16076,6 +15916,7 @@ class TheEditorComponent extends mixinUnsubscribe(MixinBase) {
|
|
|
16076
15916
|
serializingValue(value) {
|
|
16077
15917
|
if (this.theOptions?.mode === TheDataMode.html) {
|
|
16078
15918
|
let htmlValue = '';
|
|
15919
|
+
const isEmptyContent$1 = isEmptyContent(value);
|
|
16079
15920
|
value.forEach((element) => {
|
|
16080
15921
|
let elementHtml = this.elementToHtml.get(element);
|
|
16081
15922
|
if (elementHtml === undefined) {
|
|
@@ -16087,7 +15928,7 @@ class TheEditorComponent extends mixinUnsubscribe(MixinBase) {
|
|
|
16087
15928
|
}
|
|
16088
15929
|
htmlValue += elementHtml;
|
|
16089
15930
|
});
|
|
16090
|
-
return htmlValue;
|
|
15931
|
+
return isEmptyContent$1 ? '' : htmlValue;
|
|
16091
15932
|
}
|
|
16092
15933
|
return value;
|
|
16093
15934
|
}
|
|
@@ -16180,18 +16021,16 @@ class TheEditorComponent extends mixinUnsubscribe(MixinBase) {
|
|
|
16180
16021
|
TheEditorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheEditorComponent, deps: [{ token: TheContextService }, { token: i0.ViewContainerRef }, { token: i0.ElementRef }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }, { token: i4.ThyIconRegistry }], target: i0.ɵɵFactoryTarget.Component });
|
|
16181
16022
|
TheEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.2", type: TheEditorComponent, selector: "the-editor, theEditor", inputs: { theOptions: "theOptions", thePlugins: "thePlugins", theGlobalToolbar: "theGlobalToolbar", theDecorate: "theDecorate", theOnError: "theOnError" }, outputs: { theOnSave: "theOnSave", theOnDOMEvent: "theOnDOMEvent", theEditorCreated: "theEditorCreated", theUploadingStatus: "theUploadingStatus" }, host: { properties: { "class.the-editor-readonly": "theOptions?.readonly" }, classAttribute: "the-editor" }, providers: [
|
|
16182
16023
|
TheContextService,
|
|
16183
|
-
TheColorSelectService,
|
|
16184
16024
|
{
|
|
16185
16025
|
provide: NG_VALUE_ACCESSOR,
|
|
16186
16026
|
useExisting: forwardRef(() => TheEditorComponent),
|
|
16187
16027
|
multi: true
|
|
16188
16028
|
}
|
|
16189
|
-
], viewQueries: [{ propertyName: "templateInstance", first: true, predicate: ["templateInstance"], descendants: true, static: true }, { propertyName: "theEditableContainer", first: true, predicate: ["theEditableContainer"], descendants: true, read: ElementRef, static: true }, { propertyName: "globalToolbarInstance", first: true, predicate: ["globalToolbar"], descendants: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<the-toolbar\n *ngIf=\"!theOptions?.readonly && !theGlobalToolbar\"\n [ngClass]=\"{\n 'the-toolbar-disabled': theOptions?.disabled\n }\"\n #globalToolbar\n [editor]=\"editor\"\n [toolbarItems]=\"toolbarEntity.global\"\n [containerClass]=\"globalToolbarClass\"\n [align]=\"theOptions?.toolbar?.align\"\n></the-toolbar>\n\n<div\n #theEditableContainer\n class=\"the-editable-container\"\n thyImageGroup\n [ngClass]=\"{\n 'the-editor-disabled': theOptions?.disabled,\n 'max-height': maxHeight\n }\"\n [ngStyle]=\"{ 'max-height': maxHeight }\"\n>\n <slate-editable\n class=\"the-editor-typo\"\n [editor]=\"editor\"\n [ngModel]=\"editorValue\"\n (ngModelChange)=\"valueChange($event)\"\n [decorate]=\"decorate\"\n [placeholder]=\"theOptions?.placeholder\"\n [placeholderDecorate]=\"theOptions?.placeholderDecorate ? theOptions?.placeholderDecorate : null\"\n [renderElement]=\"renderElement\"\n [renderText]=\"renderText\"\n [renderLeaf]=\"renderLeaf\"\n [readonly]=\"theOptions?.readonly || theOptions?.disabled\"\n [keydown]=\"onKeyDown\"\n [click]=\"onClick\"\n [paste]=\"onSlaPaste\"\n [beforeInput]=\"onSlaBeforeInput\"\n [blur]=\"onSlaBlur\"\n [focus]=\"onSlaFocus\"\n [copy]=\"onSlaCopy\"\n [cut]=\"onSlaCut\"\n [isStrictDecorate]=\"false\"\n [compositionStart]=\"onSlaCompositionStart\"\n [compositionEnd]=\"onSlaCompositionEnd\"\n [dragStart]=\"onSlaDragStart\"\n [dragOver]=\"onSlaDragOver\"\n [drop]=\"onDrop\"\n (mousedown)=\"mousedown($event)\"\n ></slate-editable>\n <the-inline-toolbar\n *ngIf=\"!theOptions?.readonly && theOptions?.inlineToolbarVisible\"\n [editor]=\"editor\"\n [toolbarItems]=\"toolbarEntity.inline\"\n ></the-inline-toolbar>\n <div *ngIf=\"!theOptions?.readonly\" theQuickInsert [editor]=\"editor\" [isVisible]=\"visibleQuickInsertPlus\"></div>\n <the-template #templateInstance></the-template>\n</div>\n", dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i1.SlateEditableComponent, selector: "slate-editable", inputs: ["editor", "renderElement", "renderLeaf", "renderText", "decorate", "placeholderDecorate", "isStrictDecorate", "trackBy", "readonly", "placeholder", "beforeInput", "blur", "click", "compositionEnd", "compositionStart", "copy", "cut", "dragOver", "dragStart", "dragEnd", "drop", "focus", "keydown", "paste", "spellCheck", "autoCorrect", "autoCapitalize"] }, { kind: "directive", type:
|
|
16029
|
+
], viewQueries: [{ propertyName: "templateInstance", first: true, predicate: ["templateInstance"], descendants: true, static: true }, { propertyName: "theEditableContainer", first: true, predicate: ["theEditableContainer"], descendants: true, read: ElementRef, static: true }, { propertyName: "globalToolbarInstance", first: true, predicate: ["globalToolbar"], descendants: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<the-toolbar\n *ngIf=\"!theOptions?.readonly && !theGlobalToolbar\"\n [ngClass]=\"{\n 'the-toolbar-disabled': theOptions?.disabled\n }\"\n #globalToolbar\n [editor]=\"editor\"\n [toolbarItems]=\"toolbarEntity.global\"\n [containerClass]=\"globalToolbarClass\"\n [align]=\"theOptions?.toolbar?.align\"\n></the-toolbar>\n\n<div\n #theEditableContainer\n class=\"the-editable-container\"\n thyImageGroup\n [ngClass]=\"{\n 'the-editor-disabled': theOptions?.disabled,\n 'max-height': maxHeight\n }\"\n [ngStyle]=\"{ 'max-height': maxHeight }\"\n>\n <slate-editable\n class=\"the-editor-typo\"\n [editor]=\"editor\"\n [ngModel]=\"editorValue\"\n (ngModelChange)=\"valueChange($event)\"\n [decorate]=\"decorate\"\n [placeholder]=\"theOptions?.placeholder\"\n [placeholderDecorate]=\"theOptions?.placeholderDecorate ? theOptions?.placeholderDecorate : null\"\n [renderElement]=\"renderElement\"\n [renderText]=\"renderText\"\n [renderLeaf]=\"renderLeaf\"\n [readonly]=\"theOptions?.readonly || theOptions?.disabled\"\n [keydown]=\"onKeyDown\"\n [click]=\"onClick\"\n [paste]=\"onSlaPaste\"\n [beforeInput]=\"onSlaBeforeInput\"\n [blur]=\"onSlaBlur\"\n [focus]=\"onSlaFocus\"\n [copy]=\"onSlaCopy\"\n [cut]=\"onSlaCut\"\n [isStrictDecorate]=\"false\"\n [compositionStart]=\"onSlaCompositionStart\"\n [compositionEnd]=\"onSlaCompositionEnd\"\n [dragStart]=\"onSlaDragStart\"\n [dragOver]=\"onSlaDragOver\"\n [drop]=\"onDrop\"\n (mousedown)=\"mousedown($event)\"\n ></slate-editable>\n <the-inline-toolbar\n *ngIf=\"!theOptions?.readonly && theOptions?.inlineToolbarVisible\"\n [editor]=\"editor\"\n [toolbarItems]=\"toolbarEntity.inline\"\n ></the-inline-toolbar>\n <div *ngIf=\"!theOptions?.readonly\" theQuickInsert [editor]=\"editor\" [isVisible]=\"visibleQuickInsertPlus\"></div>\n <the-template #templateInstance></the-template>\n</div>\n", dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i1.SlateEditableComponent, selector: "slate-editable", inputs: ["editor", "renderElement", "renderLeaf", "renderText", "decorate", "placeholderDecorate", "isStrictDecorate", "trackBy", "readonly", "placeholder", "beforeInput", "blur", "click", "compositionEnd", "compositionStart", "copy", "cut", "dragOver", "dragStart", "dragEnd", "drop", "focus", "keydown", "paste", "spellCheck", "autoCorrect", "autoCapitalize"] }, { 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: i4$1.ThyImageGroupComponent, selector: "thy-image-group, [thyImageGroup]" }, { kind: "component", type: TheToolbarComponent, selector: "the-toolbar", inputs: ["editor", "toolbarItems", "align", "containerClass", "isMore", "afterTemplate"] }, { kind: "component", type: TheInlineToolbarComponent, selector: "the-inline-toolbar", inputs: ["editor", "toolbarItems"] }, { kind: "component", type: TheQuickInsertComponent, selector: "[theQuickInsert]", inputs: ["editor", "isVisible"] }, { kind: "component", type: TheTemplateComponent, selector: "the-template,[theTemplate]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
16190
16030
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: TheEditorComponent, decorators: [{
|
|
16191
16031
|
type: Component,
|
|
16192
16032
|
args: [{ selector: 'the-editor, theEditor', providers: [
|
|
16193
16033
|
TheContextService,
|
|
16194
|
-
TheColorSelectService,
|
|
16195
16034
|
{
|
|
16196
16035
|
provide: NG_VALUE_ACCESSOR,
|
|
16197
16036
|
useExisting: forwardRef(() => TheEditorComponent),
|
|
@@ -16296,7 +16135,6 @@ const COMPONENTS = [
|
|
|
16296
16135
|
TheDefaultElementComponent,
|
|
16297
16136
|
TheQuickInsertComponent,
|
|
16298
16137
|
ThePluginMenuComponent,
|
|
16299
|
-
TheColorSelectComponent,
|
|
16300
16138
|
TheColorToolbarItemComponent,
|
|
16301
16139
|
TheContextMenuComponent,
|
|
16302
16140
|
TheInsertMarkComponent,
|
|
@@ -16342,7 +16180,6 @@ TheEditorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version
|
|
|
16342
16180
|
TheDefaultElementComponent,
|
|
16343
16181
|
TheQuickInsertComponent,
|
|
16344
16182
|
ThePluginMenuComponent,
|
|
16345
|
-
TheColorSelectComponent,
|
|
16346
16183
|
TheColorToolbarItemComponent,
|
|
16347
16184
|
TheContextMenuComponent,
|
|
16348
16185
|
TheInsertMarkComponent,
|
|
@@ -16497,5 +16334,5 @@ const withTestPlugin = (plugins, initValue) => {
|
|
|
16497
16334
|
* Generated bundle index. Do not edit.
|
|
16498
16335
|
*/
|
|
16499
16336
|
|
|
16500
|
-
export { ALIGN_BLOCK_TYPES, A_TAG_REL_ATTR, AlignEditor, Alignment, BLOCK_DELETE_BACKWARD_TYPES,
|
|
16337
|
+
export { ALIGN_BLOCK_TYPES, A_TAG_REL_ATTR, AlignEditor, Alignment, BLOCK_DELETE_BACKWARD_TYPES, BlockquoteEditor, CLIPBOARD_FORMAT_KEY, CODEMIRROR_PADDING_TOP, CODE_MODES, COMPONENTS, CONTAINER_BLOCKS, CONTROL_KEY, CodeEditor, ColorEditor, ColumnResizeNotifierSource, DEFAULT_LANGUAGE, DEFAULT_SCROLL_CONTAINER, DISABLED_OPERATE_TYPES, DefaultElementOptions, DefaultGlobalToolbarDefinition, DefaultInlineToolbarDefinition, DefaultPluginMenu, DropdownMode, ELEMENT_UNIQUE_ID, ElementKinds, ErrorCodes, FontSizeTypes, FontSizes, HEADING_TYPES, HeadingEditor, HoveredCellInfo, HrEditor, IS_MAC, ImageEditor, IndentEditor, Indents, InlineCodeEditor, LINK_DEFAULT_TEXT, LIST_BLOCK_TYPES, LayoutTypes, LinkEditor, ListEditor, MarkEditor, MarkProps, MarkTypes, MentionEditor, PICTURE_ACCEPTED_UPLOAD_MIME, PICTURE_ACCEPTED_UPLOAD_SIZE, PLUGIN_COMPONENTS, PluginKeys, PluginMenuIcons, PluginMenuSvgs, Position, QuickInsertEditor, STANDARD_HEADING_TYPES, ScrollDirection, SpecialBackgroundColor, TAB_SPACE, THE_EDITOR_CONVERSION_HINT_REF, THE_EDITOR_ORIGIN_ANCHOR, THE_EDITOR_POPOVER_REF, THE_EDITOR_PREVIOUS_SELECTION, THE_EDITOR_UUID, THE_INLINE_TOOLBAR_TYPES, THE_LISTBOX_PARENT_GROUP_TOKEN, THE_LISTBOX_PARENT_OPTION_TOKEN, THE_LISTBOX_TOKEN, THE_MODE_PROVIDER, THE_MODE_TOKEN, THE_PLUGIN_MENU_REF, THE_UPLOAD_SERVICE_TOKEN, TableCellEventDispatcher, TableEditor, TableHeaderBackgroundColor, TheBaseElementComponent, TheBaseSuggestion, TheBaseToolbarDropdown, TheBaseToolbarItem, TheContextService, TheDataMode, TheDefaultElementComponent, TheEditor, TheEditorComponent, TheEditorModule, TheImageComponent, TheListboxDirective, TheListboxGroupDirective, TheListboxOptionDirective, TheMode, TheModeConfig, ThePluginMenu, ThePluginMenuComponent, ThePluginMenuItemType, ThePreventDefaultDirective, index$1 as TheQueries, TheToolbarComponent, TheToolbarDropdownComponent, TheToolbarGroupComponent, TheToolbarGroupToken, TheToolbarItemComponent, TheToolbarService, index as TheTransforms, TodoItemEditor, ToolbarActionTypes, ToolbarAlignment, ToolbarItemType, ToolbarMoreGroup, VOID_BLOCK_TYPES, VerticalAlignEditor, VerticalAlignment, ZERO_WIDTH_CHAR, autoFocus, base64toBlob, buildPluginMenu, buildPluginMenuItemMap, coercePixelsFromCssValue, combinePlugins, copyNode, copyNodeForSafari, createEmptyParagraph, createMentionPlugin, createPluginFactory, createToolbar, createVerticalAlignPlugin, dataDeserialize, dataSerializing, deleteElementKey, extractFragment, filterTextFormat, flattenDeepPlugins, getColsTotalWidth, getEditorUUID, getElementClassByPrefix, getElementHeight, getElementWidth, getEndBlock, getPlugin, getPluginOptions, getPlugins, getRowsTotalHeight, getStartBlock, getToolbarClass, headingOptions, htmlToTheia, idCreator, inValidTypes, initializeDefaultMenuIcons, insertDataByInvalidType, internalPlugins, isCleanEmptyParagraph, isDirectionKeydown, isPureEmptyParagraph, mergeArray, mergeDeepPlugins, mergeElementOptions, mergeOptions, nestedStructureByKey, plainToTheia, pluginsByKey, reSelection, recursionNodes, refocus, scrollIntoView, setEditorUUID, useElementStyle, withMention, withTestPlugin, withTheia };
|
|
16501
16338
|
//# sourceMappingURL=worktile-theia.mjs.map
|