@worktile/theia 14.3.9 → 14.3.10
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 +3 -2
- package/components/contextmenu/contextmenu.component.scss +7 -0
- package/components/index.d.ts +11 -0
- package/components/index.scss +10 -0
- package/constants/index.d.ts +1 -0
- package/editor.module.d.ts +6 -5
- package/esm2020/components/action/prevent-default.mjs +4 -4
- package/esm2020/components/color-select/color-select.component.mjs +4 -4
- package/esm2020/components/column-resize/column-resize-notifier.mjs +4 -4
- package/esm2020/components/column-resize/column-resize.directive.mjs +4 -4
- package/esm2020/components/column-resize/column-resize.module.mjs +9 -9
- package/esm2020/components/column-resize/event-dispatcher.mjs +4 -4
- package/esm2020/components/column-resize/overlay-handle.component.mjs +4 -4
- package/esm2020/components/column-resize/resizing.store.mjs +4 -4
- package/esm2020/components/contextmenu/contextmenu.component.mjs +15 -9
- package/esm2020/components/conversion-hint/conversion-hint.component.mjs +4 -4
- package/esm2020/components/element/element.component.mjs +4 -4
- package/esm2020/components/index.mjs +12 -0
- package/esm2020/components/inline-toolbar/inline-toolbar.component.mjs +4 -4
- package/esm2020/components/listbox/listbox.mjs +10 -10
- package/esm2020/components/plugin-menu/plugin-menu.component.mjs +4 -4
- package/esm2020/components/table-select/table-select.component.mjs +4 -4
- package/esm2020/components/template/template.component.mjs +4 -4
- package/esm2020/components/text/text.component.mjs +4 -4
- package/esm2020/components/toolbar/toolbar.component.mjs +4 -4
- package/esm2020/components/toolbar-dropdown/toolbar-dropdown.component.mjs +4 -4
- package/esm2020/components/toolbar-group/toolbar-group.component.mjs +4 -4
- package/esm2020/components/toolbar-item/toolbar-item.component.mjs +4 -4
- package/esm2020/constants/index.mjs +2 -1
- package/esm2020/core/toolbar-item/base-toolbar-item.mjs +7 -7
- package/esm2020/editor.component.mjs +4 -4
- package/esm2020/editor.module.mjs +10 -7
- package/esm2020/interfaces/view-base.mjs +4 -4
- package/esm2020/pipes.mjs +7 -7
- package/esm2020/plugins/blockquote/blockquote.component.mjs +4 -4
- package/esm2020/plugins/code/code.component.mjs +4 -4
- package/esm2020/plugins/color/toolbar-item.component.mjs +4 -4
- package/esm2020/plugins/hr/hr.component.mjs +4 -4
- package/esm2020/plugins/image/image.component.mjs +4 -4
- package/esm2020/plugins/indent/indent.editor.mjs +10 -4
- package/esm2020/plugins/indent/on-keydown-indent.mjs +5 -1
- package/esm2020/plugins/inline-code/inline-code.component.mjs +4 -4
- package/esm2020/plugins/link/edit/link-edit.component.mjs +4 -4
- package/esm2020/plugins/link/hover/link-hover.component.mjs +4 -4
- package/esm2020/plugins/link/link.component.mjs +7 -7
- package/esm2020/plugins/list/components/bulleted-list.component.mjs +5 -5
- package/esm2020/plugins/list/components/list-item.component.mjs +4 -4
- package/esm2020/plugins/list/components/numbered-list.component.mjs +5 -5
- package/esm2020/plugins/mention/suggestion.component.mjs +4 -4
- package/esm2020/plugins/quick-insert/components/quick-insert.component.mjs +4 -4
- package/esm2020/plugins/table/components/insert-mark/insert-mark.component.mjs +5 -13
- package/esm2020/plugins/table/components/row/row.component.mjs +4 -4
- package/esm2020/plugins/table/components/table.component.mjs +43 -30
- package/esm2020/plugins/table/components/td/td.component.mjs +22 -20
- package/esm2020/plugins/table/components/toolbar/table-options.component.mjs +5 -5
- package/esm2020/plugins/table/components/toolbar/table-toolbar.component.mjs +26 -6
- package/esm2020/plugins/table/table.editor.mjs +76 -17
- package/esm2020/plugins/table/table.pipe.mjs +9 -6
- package/esm2020/plugins/table/table.service.mjs +9 -8
- package/esm2020/plugins/table/table.store.mjs +35 -20
- package/esm2020/plugins/table/table.types.mjs +8 -1
- package/esm2020/plugins/table/toolbar-item.component.mjs +4 -4
- package/esm2020/plugins/table/transforms/index.mjs +8 -0
- package/esm2020/plugins/table/transforms/insert-column.mjs +6 -2
- package/esm2020/plugins/table/transforms/insert-row.mjs +36 -29
- package/esm2020/plugins/table/utils/index.mjs +3 -2
- package/esm2020/plugins/table/utils/is-selection-in-table.mjs +20 -1
- package/esm2020/plugins/table/utils/set-menu-cell-invisibility.mjs +37 -7
- package/esm2020/plugins/todo-item/todo-item.component.mjs +5 -5
- package/esm2020/plugins/vertical-align/toolbar-item.component.mjs +4 -4
- package/esm2020/public-api.mjs +4 -12
- package/esm2020/services/color-select.service.mjs +4 -4
- package/esm2020/services/context.service.mjs +4 -4
- package/esm2020/services/table-contextmenu.service.mjs +100 -13
- package/esm2020/services/toolbar.service.mjs +4 -4
- package/fesm2015/worktile-theia.mjs +1362 -1088
- package/fesm2015/worktile-theia.mjs.map +1 -1
- package/fesm2020/worktile-theia.mjs +1360 -1089
- package/fesm2020/worktile-theia.mjs.map +1 -1
- package/package.json +1 -1
- package/plugins/table/components/mixins.scss +11 -0
- package/plugins/table/components/table.component.d.ts +10 -6
- package/plugins/table/components/table.component.scss +3 -11
- package/plugins/table/components/td/td.component.d.ts +3 -1
- package/plugins/table/components/toolbar/table-toolbar.component.d.ts +5 -2
- package/plugins/table/table.editor.d.ts +8 -4
- package/plugins/table/table.pipe.d.ts +1 -1
- package/plugins/table/table.service.d.ts +2 -2
- package/plugins/table/table.store.d.ts +7 -0
- package/plugins/table/table.types.d.ts +10 -1
- package/plugins/table/transforms/index.d.ts +7 -0
- package/plugins/table/utils/index.d.ts +2 -1
- package/plugins/table/utils/is-selection-in-table.d.ts +7 -1
- package/plugins/table/utils/set-menu-cell-invisibility.d.ts +6 -1
- package/public-api.d.ts +3 -11
- package/services/table-contextmenu.service.d.ts +16 -3
- package/styles/index.scss +1 -9
|
@@ -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, ChangeDetectorRef, ElementRef, Optional, SkipSelf, ContentChildren, EventEmitter, Output, ViewChildren, forwardRef, NgModule } from '@angular/core';
|
|
5
|
-
import * as
|
|
5
|
+
import * as i3 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';
|
|
@@ -15,7 +15,7 @@ import * as i1$1 from 'ngx-tethys/popover';
|
|
|
15
15
|
import { ThyPopover, ThyPopoverModule } from 'ngx-tethys/popover';
|
|
16
16
|
import * as i2$1 from '@angular/cdk/overlay';
|
|
17
17
|
import { Overlay, OverlayModule } from '@angular/cdk/overlay';
|
|
18
|
-
import * as
|
|
18
|
+
import * as i4 from 'ngx-tethys/icon';
|
|
19
19
|
import { ThyIconModule } from 'ngx-tethys/icon';
|
|
20
20
|
import * as i5 from 'ngx-tethys/action';
|
|
21
21
|
import { ThyActionModule } from 'ngx-tethys/action';
|
|
@@ -25,7 +25,7 @@ import * as i8 from 'ngx-tethys/tooltip';
|
|
|
25
25
|
import { ThyTooltipModule } from 'ngx-tethys/tooltip';
|
|
26
26
|
import * as i12 from 'ngx-tethys/divider';
|
|
27
27
|
import { ThyDividerComponent, ThyDividerModule } from 'ngx-tethys/divider';
|
|
28
|
-
import * as i2$
|
|
28
|
+
import * as i2$2 from '@angular/cdk/scrolling';
|
|
29
29
|
import { CdkScrollable, ScrollingModule } from '@angular/cdk/scrolling';
|
|
30
30
|
import { mixinUnsubscribe, MixinBase, ScrollToService } from 'ngx-tethys/core';
|
|
31
31
|
import { isKeyHotkey, isHotkey } from 'is-hotkey';
|
|
@@ -45,20 +45,22 @@ import marked from 'marked';
|
|
|
45
45
|
import * as i1$3 from 'ngx-tethys/alert';
|
|
46
46
|
import { ThyAlertModule } from 'ngx-tethys/alert';
|
|
47
47
|
import { ThyUploadStatus } from 'ngx-tethys/upload';
|
|
48
|
-
import * as i4 from 'ngx-tethys/image';
|
|
48
|
+
import * as i4$1 from 'ngx-tethys/image';
|
|
49
49
|
import { ThyImageModule } from 'ngx-tethys/image';
|
|
50
50
|
import * as i9$1 from 'ngx-tethys/progress';
|
|
51
51
|
import { ThyProgressModule } from 'ngx-tethys/progress';
|
|
52
52
|
import isUrl from 'is-url';
|
|
53
53
|
import * as i3$1 from 'ngx-tethys/form';
|
|
54
54
|
import { ThyFormModule } from 'ngx-tethys/form';
|
|
55
|
-
import * as
|
|
55
|
+
import * as i5$2 from 'ngx-tethys/shared';
|
|
56
56
|
import { ThySharedModule } from 'ngx-tethys/shared';
|
|
57
57
|
import * as i6$1 from 'ngx-tethys/button';
|
|
58
58
|
import { ThyButtonModule } from 'ngx-tethys/button';
|
|
59
59
|
import * as i10$1 from 'ngx-tethys/empty';
|
|
60
60
|
import { ThyEmptyModule } from 'ngx-tethys/empty';
|
|
61
61
|
import { DOWN_ARROW, UP_ARROW, RIGHT_ARROW, LEFT_ARROW, ENTER } from '@angular/cdk/keycodes';
|
|
62
|
+
import * as i7 from 'ngx-tethys/input-number';
|
|
63
|
+
import { ThyInputNumberModule } from 'ngx-tethys/input-number';
|
|
62
64
|
import { coerceCssPixelValue } from '@angular/cdk/coercion';
|
|
63
65
|
import { PortalInjector, ComponentPortal } from '@angular/cdk/portal';
|
|
64
66
|
import { ThyAutocompleteModule } from 'ngx-tethys/autocomplete';
|
|
@@ -97,9 +99,9 @@ class TheBaseElementComponent extends BaseElementComponent {
|
|
|
97
99
|
this.nativeElement.classList.add(`slate-element-${this.element.type}`, blockClass);
|
|
98
100
|
}
|
|
99
101
|
}
|
|
100
|
-
TheBaseElementComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.
|
|
101
|
-
TheBaseElementComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.
|
|
102
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.
|
|
102
|
+
TheBaseElementComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheBaseElementComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
103
|
+
TheBaseElementComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: TheBaseElementComponent, selector: "TheBaseElementComponent", usesInheritance: true, ngImport: i0, template: '', isInline: true });
|
|
104
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheBaseElementComponent, decorators: [{
|
|
103
105
|
type: Component,
|
|
104
106
|
args: [{
|
|
105
107
|
selector: 'TheBaseElementComponent',
|
|
@@ -112,9 +114,9 @@ class TheDefaultElementComponent extends TheBaseElementComponent {
|
|
|
112
114
|
return this.element?.indent;
|
|
113
115
|
}
|
|
114
116
|
}
|
|
115
|
-
TheDefaultElementComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.
|
|
116
|
-
TheDefaultElementComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.
|
|
117
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.
|
|
117
|
+
TheDefaultElementComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheDefaultElementComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
118
|
+
TheDefaultElementComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: TheDefaultElementComponent, selector: "[theDefaultElement]", host: { properties: { "attr.the-indent": "this.indent" } }, usesInheritance: true, ngImport: i0, template: '<slate-children [children]="children" [context]="childrenContext" [viewContext]="viewContext"></slate-children>', isInline: true, dependencies: [{ kind: "component", type: i1.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
119
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheDefaultElementComponent, decorators: [{
|
|
118
120
|
type: Component,
|
|
119
121
|
args: [{
|
|
120
122
|
selector: '[theDefaultElement]',
|
|
@@ -738,6 +740,68 @@ const initializeDefaultMenuIcons = (iconRegistry) => {
|
|
|
738
740
|
}
|
|
739
741
|
};
|
|
740
742
|
|
|
743
|
+
const Colors = [
|
|
744
|
+
'#FFFFFF',
|
|
745
|
+
'#333333',
|
|
746
|
+
'#FF0100',
|
|
747
|
+
'#FFDA00',
|
|
748
|
+
'#A4E143',
|
|
749
|
+
'#38D9F0',
|
|
750
|
+
'#4EA8EE',
|
|
751
|
+
'#9570E7',
|
|
752
|
+
'#F3F3F3',
|
|
753
|
+
'#CCCCCC',
|
|
754
|
+
'#FEF3F1',
|
|
755
|
+
'#FEFCDA',
|
|
756
|
+
'#EDF6E8',
|
|
757
|
+
'#E6FBFA',
|
|
758
|
+
'#EBF4FC',
|
|
759
|
+
'#F1EDF7',
|
|
760
|
+
'#DDDDDD',
|
|
761
|
+
'#A5A5A5',
|
|
762
|
+
'#FCD5D0',
|
|
763
|
+
'#F9EDA6',
|
|
764
|
+
'#D4E9D7',
|
|
765
|
+
'#C8E6EA',
|
|
766
|
+
'#CCE0F2',
|
|
767
|
+
'#DAD6EA',
|
|
768
|
+
'#888888',
|
|
769
|
+
'#494949',
|
|
770
|
+
'#EE7976',
|
|
771
|
+
'#E7B323',
|
|
772
|
+
'#99C191',
|
|
773
|
+
'#79C6CE',
|
|
774
|
+
'#6EAAD7',
|
|
775
|
+
'#9D8EC2',
|
|
776
|
+
'#41464C',
|
|
777
|
+
'#000000',
|
|
778
|
+
'#BF1A1E',
|
|
779
|
+
'#AD720E',
|
|
780
|
+
'#1C7232',
|
|
781
|
+
'#1C7892',
|
|
782
|
+
'#18439D',
|
|
783
|
+
'#521B78'
|
|
784
|
+
];
|
|
785
|
+
const BackgroundColors = [
|
|
786
|
+
'#FFFFFF',
|
|
787
|
+
'#FACCCC',
|
|
788
|
+
'#FFEBCC',
|
|
789
|
+
'#FFFFCC',
|
|
790
|
+
'#CDE8CC',
|
|
791
|
+
'#CCE0F5',
|
|
792
|
+
'#EBD6FF',
|
|
793
|
+
'#F3F3F3',
|
|
794
|
+
'#F06665',
|
|
795
|
+
'#FFC266',
|
|
796
|
+
'#FFFF66',
|
|
797
|
+
'#66B966',
|
|
798
|
+
'#66A3E0',
|
|
799
|
+
'#C285FF'
|
|
800
|
+
];
|
|
801
|
+
const SpecialTextColor = '#333333';
|
|
802
|
+
const SpecialBackgroundColor = '#FFFFFF';
|
|
803
|
+
const TableHeaderBackgroundColor = '#F3F3F3';
|
|
804
|
+
|
|
741
805
|
class ElementStylePipe {
|
|
742
806
|
transform(element, align) {
|
|
743
807
|
const style = {};
|
|
@@ -750,9 +814,9 @@ class ElementStylePipe {
|
|
|
750
814
|
return style;
|
|
751
815
|
}
|
|
752
816
|
}
|
|
753
|
-
ElementStylePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.
|
|
754
|
-
ElementStylePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.
|
|
755
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.
|
|
817
|
+
ElementStylePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ElementStylePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
818
|
+
ElementStylePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.0", ngImport: i0, type: ElementStylePipe, name: "elementStyle" });
|
|
819
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ElementStylePipe, decorators: [{
|
|
756
820
|
type: Pipe,
|
|
757
821
|
args: [{
|
|
758
822
|
name: 'elementStyle'
|
|
@@ -768,9 +832,9 @@ class ElementClassPipe {
|
|
|
768
832
|
return classStr;
|
|
769
833
|
}
|
|
770
834
|
}
|
|
771
|
-
ElementClassPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.
|
|
772
|
-
ElementClassPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.
|
|
773
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.
|
|
835
|
+
ElementClassPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ElementClassPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
836
|
+
ElementClassPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.0", ngImport: i0, type: ElementClassPipe, name: "elementClass" });
|
|
837
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ElementClassPipe, decorators: [{
|
|
774
838
|
type: Pipe,
|
|
775
839
|
args: [{
|
|
776
840
|
name: 'elementClass'
|
|
@@ -805,9 +869,9 @@ class TheTemplateComponent {
|
|
|
805
869
|
};
|
|
806
870
|
}
|
|
807
871
|
}
|
|
808
|
-
TheTemplateComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.
|
|
809
|
-
TheTemplateComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.
|
|
810
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.
|
|
872
|
+
TheTemplateComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheTemplateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
873
|
+
TheTemplateComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: TheTemplateComponent, selector: "the-template,[theTemplate]", viewQueries: [{ propertyName: "paragraphTemplate", first: true, predicate: ["paragraph"], descendants: true, read: TemplateRef, static: true }, { propertyName: "headingOneTemplate", first: true, predicate: ["headingOne"], descendants: true, read: TemplateRef, static: true }, { propertyName: "headingTwoTemplate", first: true, predicate: ["headingTwo"], descendants: true, read: TemplateRef, static: true }, { propertyName: "headingThreeTemplate", first: true, predicate: ["headingThree"], descendants: true, read: TemplateRef, static: true }, { propertyName: "headingFourTemplate", first: true, predicate: ["headingFour"], descendants: true, read: TemplateRef, static: true }, { propertyName: "headingFiveTemplate", first: true, predicate: ["headingFive"], descendants: true, read: TemplateRef, static: true }, { propertyName: "headingSixTemplate", first: true, predicate: ["headingSix"], descendants: true, read: TemplateRef, static: true }], ngImport: i0, template: "<ng-template #paragraph let-context=\"context\" let-viewContext=\"viewContext\">\n <div theDefaultElement [context]=\"context\" [viewContext]=\"viewContext\" [ngStyle]=\"context.element | elementStyle\"></div>\n</ng-template>\n<ng-template #headingOne let-context=\"context\" let-viewContext=\"viewContext\">\n <h1\n theDefaultElement\n [context]=\"context\"\n [viewContext]=\"viewContext\"\n [attr.id]=\"context.element.key\"\n [ngStyle]=\"context.element | elementStyle\"\n ></h1>\n</ng-template>\n<ng-template #headingTwo let-context=\"context\" let-viewContext=\"viewContext\">\n <h2\n theDefaultElement\n [context]=\"context\"\n [viewContext]=\"viewContext\"\n [attr.id]=\"context.element.key\"\n [ngStyle]=\"context.element | elementStyle\"\n ></h2>\n</ng-template>\n<ng-template #headingThree let-context=\"context\" let-viewContext=\"viewContext\">\n <h3\n theDefaultElement\n [context]=\"context\"\n [viewContext]=\"viewContext\"\n [attr.id]=\"context.element.key\"\n [ngStyle]=\"context.element | elementStyle\"\n ></h3>\n</ng-template>\n<ng-template #headingFour let-context=\"context\" let-viewContext=\"viewContext\">\n <h4\n theDefaultElement\n [context]=\"context\"\n [viewContext]=\"viewContext\"\n [attr.id]=\"context.element.key\"\n [ngStyle]=\"context.element | elementStyle\"\n ></h4>\n</ng-template>\n<ng-template #headingFive let-context=\"context\" let-viewContext=\"viewContext\">\n <h5\n theDefaultElement\n [context]=\"context\"\n [viewContext]=\"viewContext\"\n [attr.id]=\"context.element.key\"\n [ngStyle]=\"context.element | elementStyle\"\n ></h5>\n</ng-template>\n<ng-template #headingSix let-context=\"context\" let-viewContext=\"viewContext\">\n <h6\n theDefaultElement\n [context]=\"context\"\n [viewContext]=\"viewContext\"\n [attr.id]=\"context.element.key\"\n [ngStyle]=\"context.element | elementStyle\"\n ></h6>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: TheDefaultElementComponent, selector: "[theDefaultElement]" }, { kind: "pipe", type: ElementStylePipe, name: "elementStyle" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
874
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheTemplateComponent, decorators: [{
|
|
811
875
|
type: Component,
|
|
812
876
|
args: [{ selector: 'the-template,[theTemplate]', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-template #paragraph let-context=\"context\" let-viewContext=\"viewContext\">\n <div theDefaultElement [context]=\"context\" [viewContext]=\"viewContext\" [ngStyle]=\"context.element | elementStyle\"></div>\n</ng-template>\n<ng-template #headingOne let-context=\"context\" let-viewContext=\"viewContext\">\n <h1\n theDefaultElement\n [context]=\"context\"\n [viewContext]=\"viewContext\"\n [attr.id]=\"context.element.key\"\n [ngStyle]=\"context.element | elementStyle\"\n ></h1>\n</ng-template>\n<ng-template #headingTwo let-context=\"context\" let-viewContext=\"viewContext\">\n <h2\n theDefaultElement\n [context]=\"context\"\n [viewContext]=\"viewContext\"\n [attr.id]=\"context.element.key\"\n [ngStyle]=\"context.element | elementStyle\"\n ></h2>\n</ng-template>\n<ng-template #headingThree let-context=\"context\" let-viewContext=\"viewContext\">\n <h3\n theDefaultElement\n [context]=\"context\"\n [viewContext]=\"viewContext\"\n [attr.id]=\"context.element.key\"\n [ngStyle]=\"context.element | elementStyle\"\n ></h3>\n</ng-template>\n<ng-template #headingFour let-context=\"context\" let-viewContext=\"viewContext\">\n <h4\n theDefaultElement\n [context]=\"context\"\n [viewContext]=\"viewContext\"\n [attr.id]=\"context.element.key\"\n [ngStyle]=\"context.element | elementStyle\"\n ></h4>\n</ng-template>\n<ng-template #headingFive let-context=\"context\" let-viewContext=\"viewContext\">\n <h5\n theDefaultElement\n [context]=\"context\"\n [viewContext]=\"viewContext\"\n [attr.id]=\"context.element.key\"\n [ngStyle]=\"context.element | elementStyle\"\n ></h5>\n</ng-template>\n<ng-template #headingSix let-context=\"context\" let-viewContext=\"viewContext\">\n <h6\n theDefaultElement\n [context]=\"context\"\n [viewContext]=\"viewContext\"\n [attr.id]=\"context.element.key\"\n [ngStyle]=\"context.element | elementStyle\"\n ></h6>\n</ng-template>\n" }]
|
|
813
877
|
}], propDecorators: { paragraphTemplate: [{
|
|
@@ -873,9 +937,9 @@ class TheTextComponent extends BaseTextComponent {
|
|
|
873
937
|
this.applyTextMark();
|
|
874
938
|
}
|
|
875
939
|
}
|
|
876
|
-
TheTextComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.
|
|
877
|
-
TheTextComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.
|
|
878
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.
|
|
940
|
+
TheTextComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheTextComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
941
|
+
TheTextComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: TheTextComponent, selector: "span[theText]", host: { attributes: { "data-slate-node": "text" } }, usesInheritance: true, ngImport: i0, template: `<slate-leaves [context]="context" [viewContext]="viewContext"></slate-leaves>`, isInline: true, dependencies: [{ kind: "component", type: i1.SlateLeavesComponent, selector: "slate-leaves", inputs: ["context"] }] });
|
|
942
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheTextComponent, decorators: [{
|
|
879
943
|
type: Component,
|
|
880
944
|
args: [{
|
|
881
945
|
selector: 'span[theText]',
|
|
@@ -2539,9 +2603,9 @@ class TheBaseToolbarItem {
|
|
|
2539
2603
|
}
|
|
2540
2604
|
}
|
|
2541
2605
|
}
|
|
2542
|
-
TheBaseToolbarItem.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.
|
|
2543
|
-
TheBaseToolbarItem.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.
|
|
2544
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.
|
|
2606
|
+
TheBaseToolbarItem.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheBaseToolbarItem, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
2607
|
+
TheBaseToolbarItem.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.0", type: TheBaseToolbarItem, inputs: { toolbarItem: "toolbarItem", editor: "editor" }, host: { properties: { "class.disabled": "this.disabledState", "class.active": "this.activeState" } }, ngImport: i0 });
|
|
2608
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheBaseToolbarItem, decorators: [{
|
|
2545
2609
|
type: Directive
|
|
2546
2610
|
}], propDecorators: { toolbarItem: [{
|
|
2547
2611
|
type: Input
|
|
@@ -2575,9 +2639,9 @@ class TheBaseToolbarDropdown extends TheBaseToolbarItem {
|
|
|
2575
2639
|
}
|
|
2576
2640
|
}
|
|
2577
2641
|
}
|
|
2578
|
-
TheBaseToolbarDropdown.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.
|
|
2579
|
-
TheBaseToolbarDropdown.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.
|
|
2580
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.
|
|
2642
|
+
TheBaseToolbarDropdown.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheBaseToolbarDropdown, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
2643
|
+
TheBaseToolbarDropdown.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.0", type: TheBaseToolbarDropdown, inputs: { menus: "menus", mode: "mode", dropdownItemKey: "dropdownItemKey" }, usesInheritance: true, ngImport: i0 });
|
|
2644
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheBaseToolbarDropdown, decorators: [{
|
|
2581
2645
|
type: Directive
|
|
2582
2646
|
}], propDecorators: { menus: [{
|
|
2583
2647
|
type: Input
|
|
@@ -2701,9 +2765,9 @@ class TheToolbarDropdownComponent extends TheBaseToolbarDropdown {
|
|
|
2701
2765
|
.withPositions([bottomPosition, topPosition]);
|
|
2702
2766
|
}
|
|
2703
2767
|
}
|
|
2704
|
-
TheToolbarDropdownComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.
|
|
2705
|
-
TheToolbarDropdownComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.
|
|
2706
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.
|
|
2768
|
+
TheToolbarDropdownComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheToolbarDropdownComponent, deps: [{ token: i0.ElementRef }, { token: i1$1.ThyPopover }, { token: i0.ViewContainerRef }, { token: i2$1.Overlay }], target: i0.ɵɵFactoryTarget.Component });
|
|
2769
|
+
TheToolbarDropdownComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: TheToolbarDropdownComponent, selector: "the-toolbar-dropdown", inputs: { itemMousedownHandle: "itemMousedownHandle" }, host: { properties: { "class": "this.className" } }, viewQueries: [{ propertyName: "iconModeTemplate", first: true, predicate: ["iconModeTemplate"], descendants: true, static: true }, { propertyName: "textModeTemplate", first: true, predicate: ["textModeTemplate"], descendants: true, static: true }, { propertyName: "dropdownTemplate", first: true, predicate: ["dropdownTemplate"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<a\n *ngIf=\"mode === dropdownMode.icon\"\n href=\"javascript:;\"\n class=\"icon-mode\"\n thyAction\n [thyActionIcon]=\"activeIcon\"\n [thyActionActive]=\"activeDropdown\"\n (mousedown)=\"preventDefault($event)\"\n (click)=\"toggleDropdown($event)\"\n>\n <thy-icon *ngIf=\"!toolbarItem.isHideDropdownActionIcon\" class=\"font-size-sm text-desc ml-1\" thyIconName=\"caret-down\"></thy-icon>\n</a>\n<a\n *ngIf=\"mode !== dropdownMode.icon\"\n href=\"javascript:;\"\n class=\"text-mode\"\n thyAction\n (mousedown)=\"preventDefault($event)\"\n (click)=\"toggleDropdown($event)\"\n>\n <span class=\"show-text\">{{ activeMenuItem?.name }}</span>\n <thy-icon class=\"font-size-sm text-desc ml-1\" thyIconName=\"caret-down\"></thy-icon>\n</a>\n\n<ng-template #dropdownTemplate>\n <div class=\"thy-dropdown-menu\">\n <ng-container *ngFor=\"let menu of menus\">\n <a\n *ngIf=\"menu.key !== 'split'\"\n class=\"d-flex justify-content-between text-secondary\"\n href=\"javascript:;\"\n thyDropdownMenuItem\n [ngStyle]=\"menu?.styles\"\n [thyDropdownMenuItemActive]=\"activeKeys.includes(menu.key)\"\n (mousedown)=\"preventDefault($event)\"\n (click)=\"itemMousedown($event, menu)\"\n >\n <div class=\"d-flex align-items-center\">\n <thy-icon\n class=\"text-secondary\"\n *ngIf=\"menu?.icon && mode === dropdownMode.icon\"\n thyDropdownMenuItemIcon\n [thyIconName]=\"menu.icon\"\n ></thy-icon>\n <span class=\"text-body\" *ngIf=\"menu?.name\" thyDropdownMenuItemName>{{ menu.name }}</span>\n </div>\n <div class=\"menu-item-right font-size-sm text-muted\" *ngIf=\"menu?.shortcutKey\">{{ menu.shortcutKey }}</div>\n </a>\n <thy-dropdown-menu-divider *ngIf=\"menu.key === 'split'\"></thy-dropdown-menu-divider>\n </ng-container>\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.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i4.ThyIconComponent, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { kind: "component", type: i5.ThyActionComponent, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }, { 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.ThyDropdownMenuItemActiveDirective, selector: "[thyDropdownMenuItemActive]", inputs: ["thyDropdownMenuItemActive"] }] });
|
|
2770
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheToolbarDropdownComponent, decorators: [{
|
|
2707
2771
|
type: Component,
|
|
2708
2772
|
args: [{ selector: 'the-toolbar-dropdown', template: "<a\n *ngIf=\"mode === dropdownMode.icon\"\n href=\"javascript:;\"\n class=\"icon-mode\"\n thyAction\n [thyActionIcon]=\"activeIcon\"\n [thyActionActive]=\"activeDropdown\"\n (mousedown)=\"preventDefault($event)\"\n (click)=\"toggleDropdown($event)\"\n>\n <thy-icon *ngIf=\"!toolbarItem.isHideDropdownActionIcon\" class=\"font-size-sm text-desc ml-1\" thyIconName=\"caret-down\"></thy-icon>\n</a>\n<a\n *ngIf=\"mode !== dropdownMode.icon\"\n href=\"javascript:;\"\n class=\"text-mode\"\n thyAction\n (mousedown)=\"preventDefault($event)\"\n (click)=\"toggleDropdown($event)\"\n>\n <span class=\"show-text\">{{ activeMenuItem?.name }}</span>\n <thy-icon class=\"font-size-sm text-desc ml-1\" thyIconName=\"caret-down\"></thy-icon>\n</a>\n\n<ng-template #dropdownTemplate>\n <div class=\"thy-dropdown-menu\">\n <ng-container *ngFor=\"let menu of menus\">\n <a\n *ngIf=\"menu.key !== 'split'\"\n class=\"d-flex justify-content-between text-secondary\"\n href=\"javascript:;\"\n thyDropdownMenuItem\n [ngStyle]=\"menu?.styles\"\n [thyDropdownMenuItemActive]=\"activeKeys.includes(menu.key)\"\n (mousedown)=\"preventDefault($event)\"\n (click)=\"itemMousedown($event, menu)\"\n >\n <div class=\"d-flex align-items-center\">\n <thy-icon\n class=\"text-secondary\"\n *ngIf=\"menu?.icon && mode === dropdownMode.icon\"\n thyDropdownMenuItemIcon\n [thyIconName]=\"menu.icon\"\n ></thy-icon>\n <span class=\"text-body\" *ngIf=\"menu?.name\" thyDropdownMenuItemName>{{ menu.name }}</span>\n </div>\n <div class=\"menu-item-right font-size-sm text-muted\" *ngIf=\"menu?.shortcutKey\">{{ menu.shortcutKey }}</div>\n </a>\n <thy-dropdown-menu-divider *ngIf=\"menu.key === 'split'\"></thy-dropdown-menu-divider>\n </ng-container>\n </div>\n</ng-template>\n" }]
|
|
2709
2773
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1$1.ThyPopover }, { type: i0.ViewContainerRef }, { type: i2$1.Overlay }]; }, propDecorators: { className: [{
|
|
@@ -2746,8 +2810,8 @@ class TheToolbarItemComponent extends TheBaseToolbarItem {
|
|
|
2746
2810
|
this.toolbarItem?.execute(this.editor);
|
|
2747
2811
|
}
|
|
2748
2812
|
}
|
|
2749
|
-
TheToolbarItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.
|
|
2750
|
-
TheToolbarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.
|
|
2813
|
+
TheToolbarItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheToolbarItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2814
|
+
TheToolbarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: TheToolbarItemComponent, selector: "the-toolbar-item", host: { listeners: { "mousedown": "toggleDropdown($event)" }, properties: { "class": "this.className" } }, usesInheritance: true, ngImport: i0, template: `
|
|
2751
2815
|
<a
|
|
2752
2816
|
href="javascript:;"
|
|
2753
2817
|
thyAction
|
|
@@ -2761,7 +2825,7 @@ TheToolbarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0"
|
|
|
2761
2825
|
></a>
|
|
2762
2826
|
<ng-template #tooltip let-data> {{ data?.name }} {{ data?.shortcutKey }} </ng-template>
|
|
2763
2827
|
`, isInline: true, dependencies: [{ 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.ThyActionComponent, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }] });
|
|
2764
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.
|
|
2828
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheToolbarItemComponent, decorators: [{
|
|
2765
2829
|
type: Component,
|
|
2766
2830
|
args: [{
|
|
2767
2831
|
selector: 'the-toolbar-item',
|
|
@@ -3014,9 +3078,9 @@ class TheToolbarComponent {
|
|
|
3014
3078
|
return TheToolbarItemComponent;
|
|
3015
3079
|
}
|
|
3016
3080
|
}
|
|
3017
|
-
TheToolbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.
|
|
3018
|
-
TheToolbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.
|
|
3019
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.
|
|
3081
|
+
TheToolbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheToolbarComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i0.NgZone }, { token: TheToolbarGroupToken }], target: i0.ɵɵFactoryTarget.Component });
|
|
3082
|
+
TheToolbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: TheToolbarComponent, selector: "the-toolbar", inputs: { editor: "editor", toolbarItems: "toolbarItems", align: "align", containerClass: "containerClass", isMore: "isMore", afterTemplate: "afterTemplate" }, host: { properties: { "style.justifyContent": "this.justifyContent" }, classAttribute: "the-toolbar-container d-flex align-items-center" }, viewQueries: [{ propertyName: "toolbarContainer", first: true, predicate: ["toolbarContainer"], descendants: true, read: ViewContainerRef, static: true }], usesOnChanges: true, ngImport: i0, template: "<ng-container #toolbarContainer></ng-container>\n<ng-content></ng-content>\n<ng-template *ngIf=\"afterTemplate\" [ngTemplateOutlet]=\"afterTemplate\"></ng-template>\n", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
|
|
3083
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheToolbarComponent, decorators: [{
|
|
3020
3084
|
type: Component,
|
|
3021
3085
|
args: [{ selector: 'the-toolbar', host: {
|
|
3022
3086
|
class: 'the-toolbar-container d-flex align-items-center'
|
|
@@ -3089,9 +3153,9 @@ class TheContextService {
|
|
|
3089
3153
|
this.uploadingFiles.splice(this.uploadingFiles.findIndex(item => item.url === file.url), 1);
|
|
3090
3154
|
}
|
|
3091
3155
|
}
|
|
3092
|
-
TheContextService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.
|
|
3093
|
-
TheContextService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.
|
|
3094
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.
|
|
3156
|
+
TheContextService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheContextService, deps: [{ token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3157
|
+
TheContextService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheContextService });
|
|
3158
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheContextService, decorators: [{
|
|
3095
3159
|
type: Injectable
|
|
3096
3160
|
}], ctorParameters: function () { return [{ type: i0.NgZone }]; } });
|
|
3097
3161
|
|
|
@@ -3171,9 +3235,9 @@ class TheColorSelectComponent {
|
|
|
3171
3235
|
this.popoverRef.close();
|
|
3172
3236
|
}
|
|
3173
3237
|
}
|
|
3174
|
-
TheColorSelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.
|
|
3175
|
-
TheColorSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.
|
|
3176
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.
|
|
3238
|
+
TheColorSelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheColorSelectComponent, deps: [{ token: i1$1.ThyPopoverRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
3239
|
+
TheColorSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", 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$1.ThyInputDirective, selector: "[thyInput]", inputs: ["thySize", "thyAutocomplete"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3240
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheColorSelectComponent, decorators: [{
|
|
3177
3241
|
type: Component,
|
|
3178
3242
|
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" }]
|
|
3179
3243
|
}], ctorParameters: function () { return [{ type: i1$1.ThyPopoverRef }]; }, propDecorators: { selectedColor: [{
|
|
@@ -3238,9 +3302,9 @@ class TheColorSelectService {
|
|
|
3238
3302
|
}
|
|
3239
3303
|
}
|
|
3240
3304
|
}
|
|
3241
|
-
TheColorSelectService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.
|
|
3242
|
-
TheColorSelectService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.
|
|
3243
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.
|
|
3305
|
+
TheColorSelectService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheColorSelectService, deps: [{ token: i1$1.ThyPopover }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3306
|
+
TheColorSelectService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheColorSelectService });
|
|
3307
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheColorSelectService, decorators: [{
|
|
3244
3308
|
type: Injectable
|
|
3245
3309
|
}], ctorParameters: function () { return [{ type: i1$1.ThyPopover }]; } });
|
|
3246
3310
|
|
|
@@ -3278,6 +3342,13 @@ class TableOptions {
|
|
|
3278
3342
|
this.typeContent = typeContent;
|
|
3279
3343
|
}
|
|
3280
3344
|
}
|
|
3345
|
+
var TableInsertType;
|
|
3346
|
+
(function (TableInsertType) {
|
|
3347
|
+
TableInsertType["insertRowsUp"] = "insert-rows-up";
|
|
3348
|
+
TableInsertType["insertRowsDown"] = "insert-rows-down";
|
|
3349
|
+
TableInsertType["insertColumnsLeft"] = "insert-columns-left";
|
|
3350
|
+
TableInsertType["insertColumnsRight"] = "insert-columns-right";
|
|
3351
|
+
})(TableInsertType || (TableInsertType = {}));
|
|
3281
3352
|
|
|
3282
3353
|
/**
|
|
3283
3354
|
* Create a new cell
|
|
@@ -3587,6 +3658,25 @@ function isSelectionInTable(opts, editor) {
|
|
|
3587
3658
|
}
|
|
3588
3659
|
return isRangeInTable(opts, editor, editor.selection);
|
|
3589
3660
|
}
|
|
3661
|
+
/**
|
|
3662
|
+
* Whether the cells passed in can form a rectangle
|
|
3663
|
+
* @param cells
|
|
3664
|
+
* @returns boolean
|
|
3665
|
+
*/
|
|
3666
|
+
function isRectangularInTableCells(cells) {
|
|
3667
|
+
const { row, col } = cells[0];
|
|
3668
|
+
let maxCol = col;
|
|
3669
|
+
let minCol = col;
|
|
3670
|
+
let maxRow = row;
|
|
3671
|
+
let minRow = row;
|
|
3672
|
+
for (const cell of cells) {
|
|
3673
|
+
maxCol = cell.col > maxCol ? cell.col : maxCol;
|
|
3674
|
+
minCol = cell.col < minCol ? cell.col : minCol;
|
|
3675
|
+
maxRow = cell.row > maxRow ? cell.row : maxRow;
|
|
3676
|
+
minRow = cell.row < minRow ? cell.row : minRow;
|
|
3677
|
+
}
|
|
3678
|
+
return (maxRow + 1 - minRow) * (maxCol + 1 - minCol) === cells.length;
|
|
3679
|
+
}
|
|
3590
3680
|
|
|
3591
3681
|
function calcSpanForRow(table, targetIndex) {
|
|
3592
3682
|
const rowspans = [];
|
|
@@ -3661,125 +3751,6 @@ function isInside(cellRect, rowIndex, columnIndex) {
|
|
|
3661
3751
|
return false;
|
|
3662
3752
|
}
|
|
3663
3753
|
|
|
3664
|
-
function addColumns(table, columnsCount, insertIndex) {
|
|
3665
|
-
if (table.columns.length < columnsCount) {
|
|
3666
|
-
if (!insertIndex && insertIndex !== 0) {
|
|
3667
|
-
insertIndex = table.columns.length;
|
|
3668
|
-
}
|
|
3669
|
-
const opts = new TableOptions();
|
|
3670
|
-
let columns = table.columns.slice(0, columnsCount).map(item => {
|
|
3671
|
-
return { width: item.width };
|
|
3672
|
-
});
|
|
3673
|
-
const preTotalWidth = table.columns.reduce((prevValue, column) => {
|
|
3674
|
-
return prevValue + column.width;
|
|
3675
|
-
}, 0);
|
|
3676
|
-
for (let i = 0; i < columnsCount - table.columns.length; i++) {
|
|
3677
|
-
columns.splice(insertIndex, 0, { width: opts.defaultWidth });
|
|
3678
|
-
}
|
|
3679
|
-
const currentTotalWidth = columns.reduce((prevValue, column) => {
|
|
3680
|
-
return prevValue + column.width;
|
|
3681
|
-
}, 0);
|
|
3682
|
-
const percentage = preTotalWidth / currentTotalWidth;
|
|
3683
|
-
return columns.map((column, index) => {
|
|
3684
|
-
const width = Math.round(column.width * percentage > opts.minWidthPx ? column.width * percentage : opts.minWidthPx);
|
|
3685
|
-
return { width };
|
|
3686
|
-
});
|
|
3687
|
-
}
|
|
3688
|
-
return table.columns;
|
|
3689
|
-
}
|
|
3690
|
-
|
|
3691
|
-
/**
|
|
3692
|
-
* Insert a new column in current table
|
|
3693
|
-
*/
|
|
3694
|
-
function insertColumn(opts, editor, count = 1, at, // Column index
|
|
3695
|
-
getCell) {
|
|
3696
|
-
const { selection } = editor;
|
|
3697
|
-
const { anchor: { path } } = selection;
|
|
3698
|
-
const tablePosition = TablePosition.create(opts, editor, path);
|
|
3699
|
-
const { table, tableEntry } = tablePosition;
|
|
3700
|
-
const insertColumnIndex = typeof at === 'undefined' ? tablePosition.getColumnIndex() + 1 : at;
|
|
3701
|
-
// Insert the new cell
|
|
3702
|
-
Editor.withoutNormalizing(editor, () => {
|
|
3703
|
-
const colspan = calcSpanForColumn(table, insertColumnIndex);
|
|
3704
|
-
for (let i = 0; i < count; i++) {
|
|
3705
|
-
table.children.forEach((row, rowIndex) => {
|
|
3706
|
-
const isInside = colspan[rowIndex];
|
|
3707
|
-
const newCell = getCell ? getCell(insertColumnIndex, rowIndex) : createCell(opts);
|
|
3708
|
-
if (isInside) {
|
|
3709
|
-
newCell.hidden = true;
|
|
3710
|
-
const dirtyCell = row.children.find((cell, columnIndex) => !cell.hidden &&
|
|
3711
|
-
columnIndex < insertColumnIndex &&
|
|
3712
|
-
cell.colspan &&
|
|
3713
|
-
cell.colspan + columnIndex > insertColumnIndex);
|
|
3714
|
-
if (dirtyCell) {
|
|
3715
|
-
Transforms.setNodes(editor, { colspan: dirtyCell.colspan + 1 }, {
|
|
3716
|
-
at: tablePosition.tableEntry[1].concat(rowIndex).concat(row.children.indexOf(dirtyCell))
|
|
3717
|
-
});
|
|
3718
|
-
}
|
|
3719
|
-
}
|
|
3720
|
-
Transforms.insertNodes(editor, [newCell], {
|
|
3721
|
-
at: tablePosition.tableEntry[1].concat(rowIndex).concat(insertColumnIndex)
|
|
3722
|
-
});
|
|
3723
|
-
});
|
|
3724
|
-
}
|
|
3725
|
-
if (table.columns) {
|
|
3726
|
-
Transforms.setNodes(editor, { columns: addColumns(table, table.columns.length + 1, insertColumnIndex) }, { at: tableEntry[1] });
|
|
3727
|
-
}
|
|
3728
|
-
});
|
|
3729
|
-
}
|
|
3730
|
-
/**
|
|
3731
|
-
* Insert new column in the row
|
|
3732
|
-
*/
|
|
3733
|
-
function insertColumnAtRow(opts, editor, count = 1, tableEntry, rowIndex, columnIndex, getCell) {
|
|
3734
|
-
Editor.withoutNormalizing(editor, () => {
|
|
3735
|
-
for (let i = 0; i < count; i++) {
|
|
3736
|
-
const newCell = getCell ? getCell(columnIndex, rowIndex) : createCell(opts);
|
|
3737
|
-
Transforms.insertNodes(editor, [newCell], {
|
|
3738
|
-
at: tableEntry[1].concat([rowIndex, columnIndex])
|
|
3739
|
-
});
|
|
3740
|
-
}
|
|
3741
|
-
});
|
|
3742
|
-
}
|
|
3743
|
-
|
|
3744
|
-
/**
|
|
3745
|
-
* Insert a new row in current table
|
|
3746
|
-
*/
|
|
3747
|
-
function insertRow(opts, editor, count = 1, at // row index
|
|
3748
|
-
) {
|
|
3749
|
-
const tablePosition = TablePosition.create(opts, editor, editor.selection.anchor.path);
|
|
3750
|
-
const { table, row } = tablePosition;
|
|
3751
|
-
// Create a new row with the right count of cells
|
|
3752
|
-
const columns = table.children[0].children.length;
|
|
3753
|
-
const newRows = [];
|
|
3754
|
-
const rowIndex = tablePosition.getRowIndex();
|
|
3755
|
-
const insertRowIndex = typeof at === 'undefined' ? rowIndex + 1 : at;
|
|
3756
|
-
for (let i = 0; i < count; i++) {
|
|
3757
|
-
const newRow = createRow(opts, columns);
|
|
3758
|
-
newRows.push(newRow);
|
|
3759
|
-
}
|
|
3760
|
-
if (newRows.length === 1) {
|
|
3761
|
-
const rowspan = calcSpanForRow(table, insertRowIndex);
|
|
3762
|
-
newRows[0].children.forEach((cell, columnIndex) => {
|
|
3763
|
-
const isInside = rowspan[columnIndex];
|
|
3764
|
-
if (isInside) {
|
|
3765
|
-
cell.hidden = true;
|
|
3766
|
-
const dirtyRow = table.children.find((row, rowIndex) => !row.children[columnIndex].hidden &&
|
|
3767
|
-
rowIndex < insertRowIndex &&
|
|
3768
|
-
row.children[columnIndex].rowspan &&
|
|
3769
|
-
row.children[columnIndex].rowspan + rowIndex > insertRowIndex);
|
|
3770
|
-
if (dirtyRow) {
|
|
3771
|
-
Transforms.setNodes(editor, { rowspan: dirtyRow.children[columnIndex].rowspan + 1 }, {
|
|
3772
|
-
at: tablePosition.tableEntry[1].concat(table.children.indexOf(dirtyRow)).concat(columnIndex)
|
|
3773
|
-
});
|
|
3774
|
-
}
|
|
3775
|
-
}
|
|
3776
|
-
});
|
|
3777
|
-
}
|
|
3778
|
-
Transforms.insertNodes(editor, newRows, {
|
|
3779
|
-
at: tablePosition.tableEntry[1].concat(insertRowIndex)
|
|
3780
|
-
});
|
|
3781
|
-
}
|
|
3782
|
-
|
|
3783
3754
|
const setMarks = (editor, marks, at) => {
|
|
3784
3755
|
Transforms.setNodes(editor, marks, {
|
|
3785
3756
|
at,
|
|
@@ -4027,88 +3998,149 @@ function insertTable(opts, editor, rows = 3, columns = 3, getCellContent) {
|
|
|
4027
3998
|
insertElements(editor, table);
|
|
4028
3999
|
}
|
|
4029
4000
|
|
|
4001
|
+
function getInsertRowState(opts, editor, count = 1, at) {
|
|
4002
|
+
const tablePosition = TablePosition.create(opts, editor, editor.selection.anchor.path);
|
|
4003
|
+
let table = tablePosition.table;
|
|
4004
|
+
let tableEntry = tablePosition.tableEntry;
|
|
4005
|
+
// Create a new row with the right count of cells
|
|
4006
|
+
const columns = table.children[0].children.length;
|
|
4007
|
+
const rowIndex = tablePosition.getRowIndex();
|
|
4008
|
+
const insertRowIndex = typeof at === 'undefined' ? rowIndex + 1 : at;
|
|
4009
|
+
return { table, tableEntry, columns, rowIndex, insertRowIndex };
|
|
4010
|
+
}
|
|
4011
|
+
function packNewRow(opts, editor, count = 1, at) {
|
|
4012
|
+
const { table, tableEntry, columns, insertRowIndex } = getInsertRowState(opts, editor, count, at);
|
|
4013
|
+
const rowspan = calcSpanForRow(table, insertRowIndex);
|
|
4014
|
+
const newRow = createRow(opts, columns);
|
|
4015
|
+
newRow.children.forEach((cell, columnIndex) => {
|
|
4016
|
+
const isInside = rowspan[columnIndex];
|
|
4017
|
+
if (isInside) {
|
|
4018
|
+
cell.hidden = true;
|
|
4019
|
+
const dirtyRow = table.children.find((row, rowIndex) => !row.children[columnIndex].hidden &&
|
|
4020
|
+
rowIndex < insertRowIndex &&
|
|
4021
|
+
row.children[columnIndex].rowspan &&
|
|
4022
|
+
row.children[columnIndex].rowspan + rowIndex > insertRowIndex);
|
|
4023
|
+
if (dirtyRow) {
|
|
4024
|
+
Transforms.setNodes(editor, { rowspan: dirtyRow.children[columnIndex].rowspan + 1 }, {
|
|
4025
|
+
at: tableEntry[1].concat(table.children.indexOf(dirtyRow)).concat(columnIndex)
|
|
4026
|
+
});
|
|
4027
|
+
}
|
|
4028
|
+
}
|
|
4029
|
+
});
|
|
4030
|
+
return newRow;
|
|
4031
|
+
}
|
|
4030
4032
|
/**
|
|
4031
|
-
*
|
|
4033
|
+
* Insert a new row in current table
|
|
4032
4034
|
*/
|
|
4033
|
-
function
|
|
4034
|
-
|
|
4035
|
-
const
|
|
4036
|
-
|
|
4037
|
-
|
|
4038
|
-
|
|
4039
|
-
|
|
4035
|
+
function insertRow(opts, editor, count = 1, at // row index
|
|
4036
|
+
) {
|
|
4037
|
+
const { tableEntry, insertRowIndex } = getInsertRowState(opts, editor, count, at);
|
|
4038
|
+
const newRows = [];
|
|
4039
|
+
for (let i = 0; i < count; i++) {
|
|
4040
|
+
const newRow = packNewRow(opts, editor, count, at);
|
|
4041
|
+
newRows.push(newRow);
|
|
4042
|
+
}
|
|
4043
|
+
Transforms.insertNodes(editor, newRows, {
|
|
4044
|
+
at: tableEntry[1].concat(insertRowIndex)
|
|
4045
|
+
});
|
|
4040
4046
|
}
|
|
4041
4047
|
|
|
4042
|
-
function
|
|
4043
|
-
if (table.columns.length
|
|
4044
|
-
|
|
4045
|
-
|
|
4046
|
-
removeColumns = table.columns.slice(index, index + 1);
|
|
4047
|
-
}
|
|
4048
|
-
else {
|
|
4049
|
-
removeColumns = table.columns.slice(columnsCount);
|
|
4048
|
+
function addColumns(table, columnsCount, insertIndex) {
|
|
4049
|
+
if (table.columns.length < columnsCount) {
|
|
4050
|
+
if (!insertIndex && insertIndex !== 0) {
|
|
4051
|
+
insertIndex = table.columns.length;
|
|
4050
4052
|
}
|
|
4051
|
-
|
|
4052
|
-
|
|
4053
|
-
|
|
4054
|
-
|
|
4055
|
-
|
|
4056
|
-
|
|
4057
|
-
|
|
4058
|
-
|
|
4059
|
-
});
|
|
4053
|
+
const opts = new TableOptions();
|
|
4054
|
+
let columns = table.columns.slice(0, columnsCount).map(item => {
|
|
4055
|
+
return { width: item.width };
|
|
4056
|
+
});
|
|
4057
|
+
const preTotalWidth = table.columns.reduce((prevValue, column) => {
|
|
4058
|
+
return prevValue + column.width;
|
|
4059
|
+
}, 0);
|
|
4060
|
+
for (let i = 0; i < columnsCount - table.columns.length; i++) {
|
|
4061
|
+
columns.splice(insertIndex, 0, { width: opts.defaultWidth });
|
|
4060
4062
|
}
|
|
4063
|
+
const currentTotalWidth = columns.reduce((prevValue, column) => {
|
|
4064
|
+
return prevValue + column.width;
|
|
4065
|
+
}, 0);
|
|
4066
|
+
const percentage = preTotalWidth / currentTotalWidth;
|
|
4067
|
+
return columns.map((column, index) => {
|
|
4068
|
+
const width = Math.round(column.width * percentage > opts.minWidthPx ? column.width * percentage : opts.minWidthPx);
|
|
4069
|
+
return { width };
|
|
4070
|
+
});
|
|
4061
4071
|
}
|
|
4062
4072
|
return table.columns;
|
|
4063
4073
|
}
|
|
4064
4074
|
|
|
4065
|
-
|
|
4075
|
+
/**
|
|
4076
|
+
* Insert a new column in current table
|
|
4077
|
+
*/
|
|
4078
|
+
function insertColumn(opts, editor, count = 1, at, // Column index
|
|
4079
|
+
getCell) {
|
|
4066
4080
|
const { selection } = editor;
|
|
4067
4081
|
const { anchor: { path } } = selection;
|
|
4068
4082
|
const tablePosition = TablePosition.create(opts, editor, path);
|
|
4069
|
-
|
|
4070
|
-
|
|
4071
|
-
|
|
4083
|
+
let table = tablePosition.table;
|
|
4084
|
+
let tableEntry = tablePosition.tableEntry;
|
|
4085
|
+
const insertColumnIndex = typeof at === 'undefined' ? tablePosition.getColumnIndex() + 1 : at;
|
|
4086
|
+
// Insert the new cell
|
|
4072
4087
|
Editor.withoutNormalizing(editor, () => {
|
|
4073
|
-
table
|
|
4074
|
-
|
|
4075
|
-
|
|
4076
|
-
const
|
|
4077
|
-
|
|
4078
|
-
|
|
4079
|
-
|
|
4080
|
-
|
|
4081
|
-
|
|
4082
|
-
|
|
4083
|
-
|
|
4084
|
-
|
|
4085
|
-
|
|
4086
|
-
|
|
4087
|
-
|
|
4088
|
-
|
|
4089
|
-
|
|
4090
|
-
|
|
4091
|
-
|
|
4092
|
-
|
|
4093
|
-
|
|
4094
|
-
|
|
4088
|
+
const colspan = calcSpanForColumn(table, insertColumnIndex);
|
|
4089
|
+
for (let i = 0; i < count; i++) {
|
|
4090
|
+
table.children.forEach((row, rowIndex) => {
|
|
4091
|
+
const isInside = colspan[rowIndex];
|
|
4092
|
+
const newCell = getCell ? getCell(insertColumnIndex, rowIndex) : createCell(opts);
|
|
4093
|
+
if (isInside) {
|
|
4094
|
+
newCell.hidden = true;
|
|
4095
|
+
const dirtyCell = row.children.find((cell, columnIndex) => !cell.hidden &&
|
|
4096
|
+
columnIndex < insertColumnIndex &&
|
|
4097
|
+
cell.colspan &&
|
|
4098
|
+
cell.colspan + columnIndex > insertColumnIndex);
|
|
4099
|
+
if (dirtyCell) {
|
|
4100
|
+
Transforms.setNodes(editor, { colspan: dirtyCell.colspan + 1 }, {
|
|
4101
|
+
at: tablePosition.tableEntry[1].concat(rowIndex).concat(row.children.indexOf(dirtyCell))
|
|
4102
|
+
});
|
|
4103
|
+
const position = TablePosition.create(opts, editor, path);
|
|
4104
|
+
table = position.table;
|
|
4105
|
+
tableEntry = position.tableEntry;
|
|
4106
|
+
}
|
|
4107
|
+
}
|
|
4108
|
+
Transforms.insertNodes(editor, [newCell], {
|
|
4109
|
+
at: tablePosition.tableEntry[1].concat(rowIndex).concat(insertColumnIndex)
|
|
4110
|
+
});
|
|
4095
4111
|
});
|
|
4096
|
-
if (table.columns) {
|
|
4097
|
-
Transforms.setNodes(editor, { columns: removeColumns(table, table.columns.length - 1, selectColIndex) }, { at: tableEntry[1] });
|
|
4098
|
-
}
|
|
4099
4112
|
}
|
|
4100
|
-
|
|
4101
|
-
|
|
4102
|
-
|
|
4103
|
-
|
|
4104
|
-
|
|
4105
|
-
|
|
4106
|
-
|
|
4113
|
+
if (table.columns) {
|
|
4114
|
+
Transforms.setNodes(editor, { columns: addColumns(table, table.columns.length + 1, insertColumnIndex) }, { at: tableEntry[1] });
|
|
4115
|
+
}
|
|
4116
|
+
});
|
|
4117
|
+
}
|
|
4118
|
+
/**
|
|
4119
|
+
* Insert new column in the row
|
|
4120
|
+
*/
|
|
4121
|
+
function insertColumnAtRow(opts, editor, count = 1, tableEntry, rowIndex, columnIndex, getCell) {
|
|
4122
|
+
Editor.withoutNormalizing(editor, () => {
|
|
4123
|
+
for (let i = 0; i < count; i++) {
|
|
4124
|
+
const newCell = getCell ? getCell(columnIndex, rowIndex) : createCell(opts);
|
|
4125
|
+
Transforms.insertNodes(editor, [newCell], {
|
|
4126
|
+
at: tableEntry[1].concat([rowIndex, columnIndex])
|
|
4107
4127
|
});
|
|
4108
4128
|
}
|
|
4109
4129
|
});
|
|
4110
4130
|
}
|
|
4111
4131
|
|
|
4132
|
+
/**
|
|
4133
|
+
* Clear the content of the given cell
|
|
4134
|
+
*/
|
|
4135
|
+
function clearCell(opts, editor, cellEntry) {
|
|
4136
|
+
Transforms.removeNodes(editor, { at: cellEntry[1] });
|
|
4137
|
+
const cellNode = {
|
|
4138
|
+
...cellEntry[0],
|
|
4139
|
+
...createCell(opts)
|
|
4140
|
+
};
|
|
4141
|
+
Transforms.insertNodes(editor, { ...cellNode }, { at: cellEntry[1] });
|
|
4142
|
+
}
|
|
4143
|
+
|
|
4112
4144
|
function removeRow(opts, editor, selectRowIndex) {
|
|
4113
4145
|
const { selection } = editor;
|
|
4114
4146
|
const { anchor: { path } } = selection;
|
|
@@ -4156,6 +4188,76 @@ function removeRow(opts, editor, selectRowIndex) {
|
|
|
4156
4188
|
}
|
|
4157
4189
|
}
|
|
4158
4190
|
|
|
4191
|
+
function removeColumns(table, columnsCount, index) {
|
|
4192
|
+
if (table.columns.length > columnsCount) {
|
|
4193
|
+
let removeColumns = [];
|
|
4194
|
+
if ((index && index > 0) || index === 0) {
|
|
4195
|
+
removeColumns = table.columns.slice(index, index + 1);
|
|
4196
|
+
}
|
|
4197
|
+
else {
|
|
4198
|
+
removeColumns = table.columns.slice(columnsCount);
|
|
4199
|
+
}
|
|
4200
|
+
if (removeColumns.length) {
|
|
4201
|
+
const addWidth = removeColumns.reduce((totalWidth, cell) => {
|
|
4202
|
+
return (totalWidth += cell.width);
|
|
4203
|
+
}, 0) / columnsCount;
|
|
4204
|
+
return table.columns
|
|
4205
|
+
.filter(item => !removeColumns.includes(item))
|
|
4206
|
+
.map(item => {
|
|
4207
|
+
return { width: item.width + Math.round(addWidth) };
|
|
4208
|
+
});
|
|
4209
|
+
}
|
|
4210
|
+
}
|
|
4211
|
+
return table.columns;
|
|
4212
|
+
}
|
|
4213
|
+
|
|
4214
|
+
function removeColumn(opts, editor, selectColIndex) {
|
|
4215
|
+
const { selection } = editor;
|
|
4216
|
+
const { anchor: { path } } = selection;
|
|
4217
|
+
const tablePosition = TablePosition.create(opts, editor, path);
|
|
4218
|
+
const { tableEntry, table, row, cellEntry: [cellNode, cellPath] } = tablePosition;
|
|
4219
|
+
const rows = tableEntry[0].children;
|
|
4220
|
+
selectColIndex = selectColIndex === undefined ? [...cellPath].pop() : selectColIndex;
|
|
4221
|
+
Editor.withoutNormalizing(editor, () => {
|
|
4222
|
+
table.children.map((row, rowIndex) => {
|
|
4223
|
+
const dirtyCell = row.children.find((cell, columnIndex) => !cell.hidden && columnIndex < selectColIndex && cell.colspan && cell.colspan + columnIndex > selectColIndex);
|
|
4224
|
+
if (dirtyCell) {
|
|
4225
|
+
const colspan = dirtyCell.colspan - 1 > 1 ? dirtyCell.colspan - 1 : null;
|
|
4226
|
+
Transforms.setNodes(editor, { colspan }, {
|
|
4227
|
+
at: tablePosition.tableEntry[1].concat(rowIndex).concat(row.children.indexOf(dirtyCell))
|
|
4228
|
+
});
|
|
4229
|
+
}
|
|
4230
|
+
const removeCell = row.children[selectColIndex];
|
|
4231
|
+
const nextCell = row.children[selectColIndex + 1];
|
|
4232
|
+
if (nextCell && nextCell.hidden && removeCell.colspan > 1) {
|
|
4233
|
+
const colspan = removeCell.colspan - 1 > 1 ? removeCell.colspan - 1 : null;
|
|
4234
|
+
Transforms.setNodes(editor, { colspan, rowspan: removeCell.rowspan || null, hidden: null }, { at: tablePosition.tableEntry[1].concat(rowIndex).concat(row.children.indexOf(nextCell)) });
|
|
4235
|
+
}
|
|
4236
|
+
});
|
|
4237
|
+
});
|
|
4238
|
+
// Remove the cell from every row
|
|
4239
|
+
Editor.withoutNormalizing(editor, () => {
|
|
4240
|
+
if (tablePosition.getWidth() > 1) {
|
|
4241
|
+
rows.forEach((row, rowIndex) => {
|
|
4242
|
+
const at = tableEntry[1].concat([rowIndex, selectColIndex]);
|
|
4243
|
+
Transforms.removeNodes(editor, { at });
|
|
4244
|
+
});
|
|
4245
|
+
if (table.columns) {
|
|
4246
|
+
Transforms.setNodes(editor, { columns: removeColumns(table, table.columns.length - 1, selectColIndex) }, { at: tableEntry[1] });
|
|
4247
|
+
}
|
|
4248
|
+
}
|
|
4249
|
+
else {
|
|
4250
|
+
// If last column, clear text in cells instead
|
|
4251
|
+
rows.forEach((row, rowIndex) => {
|
|
4252
|
+
row.children.forEach((cell, cellIndex) => {
|
|
4253
|
+
const at = tableEntry[1].concat([rowIndex, cellIndex]);
|
|
4254
|
+
clearCell(opts, editor, [cell, at]);
|
|
4255
|
+
});
|
|
4256
|
+
});
|
|
4257
|
+
}
|
|
4258
|
+
});
|
|
4259
|
+
}
|
|
4260
|
+
|
|
4159
4261
|
const NextPath = (path) => {
|
|
4160
4262
|
const [last, ...rest] = [...path].reverse();
|
|
4161
4263
|
return [...rest.reverse(), last + 1];
|
|
@@ -4206,6 +4308,79 @@ function removeTable(opts, editor) {
|
|
|
4206
4308
|
}
|
|
4207
4309
|
}
|
|
4208
4310
|
|
|
4311
|
+
const IndentEditor = {
|
|
4312
|
+
getAllowedTypes(editor) {
|
|
4313
|
+
return getPluginOptions(editor, PluginKeys.indent)?.allowedTypes ?? [];
|
|
4314
|
+
},
|
|
4315
|
+
setIndent(editor) {
|
|
4316
|
+
if (TableEditor.setIndent(editor)) {
|
|
4317
|
+
return;
|
|
4318
|
+
}
|
|
4319
|
+
const allowedTypes = IndentEditor.getAllowedTypes(editor);
|
|
4320
|
+
const maxIndent = getPluginOptions(editor, PluginKeys.indent)?.maxIndent ?? [];
|
|
4321
|
+
const nodes = Array.from(Editor.nodes(editor, {
|
|
4322
|
+
mode: 'highest',
|
|
4323
|
+
match: n => Element$1.isElement(n) && allowedTypes.includes(n.type)
|
|
4324
|
+
}));
|
|
4325
|
+
const [startBlock] = nodes;
|
|
4326
|
+
if (startBlock) {
|
|
4327
|
+
let [{ indent }] = startBlock;
|
|
4328
|
+
indent = indent ? ++indent : 1;
|
|
4329
|
+
if (indent <= maxIndent) {
|
|
4330
|
+
Transforms.setNodes(editor, { indent }, {
|
|
4331
|
+
mode: 'highest',
|
|
4332
|
+
match: n => Element$1.isElement(n) && allowedTypes.includes(n.type)
|
|
4333
|
+
});
|
|
4334
|
+
}
|
|
4335
|
+
}
|
|
4336
|
+
},
|
|
4337
|
+
cancelIndent(editor) {
|
|
4338
|
+
if (TableEditor.cancelIndent(editor)) {
|
|
4339
|
+
return;
|
|
4340
|
+
}
|
|
4341
|
+
const allowedTypes = IndentEditor.getAllowedTypes(editor);
|
|
4342
|
+
const nodes = Array.from(Editor.nodes(editor, {
|
|
4343
|
+
mode: 'highest',
|
|
4344
|
+
match: n => Element$1.isElement(n) && allowedTypes.includes(n.type)
|
|
4345
|
+
}));
|
|
4346
|
+
const [startBlock] = nodes;
|
|
4347
|
+
if (startBlock) {
|
|
4348
|
+
let [{ indent }] = startBlock;
|
|
4349
|
+
indent = indent ? --indent : 0;
|
|
4350
|
+
Transforms.setNodes(editor, { indent }, {
|
|
4351
|
+
mode: 'highest',
|
|
4352
|
+
match: n => Element$1.isElement(n) && allowedTypes.includes(n.type)
|
|
4353
|
+
});
|
|
4354
|
+
}
|
|
4355
|
+
},
|
|
4356
|
+
setTextIndent(editor, kinds, textIndent) {
|
|
4357
|
+
Transforms.setNodes(editor, { textIndent }, {
|
|
4358
|
+
mode: 'highest',
|
|
4359
|
+
match: node => Element$1.isElement(node) && kinds.includes(node.type)
|
|
4360
|
+
});
|
|
4361
|
+
},
|
|
4362
|
+
cancelTextIntent(editor, event, anchorBlock, kinds) {
|
|
4363
|
+
let { textIndent, indent } = anchorBlock;
|
|
4364
|
+
if (textIndent > 2) {
|
|
4365
|
+
event.preventDefault();
|
|
4366
|
+
textIndent -= 2;
|
|
4367
|
+
IndentEditor.setTextIndent(editor, kinds, textIndent);
|
|
4368
|
+
return true;
|
|
4369
|
+
}
|
|
4370
|
+
if (textIndent === 2) {
|
|
4371
|
+
event.preventDefault();
|
|
4372
|
+
IndentEditor.setTextIndent(editor, kinds, null);
|
|
4373
|
+
return true;
|
|
4374
|
+
}
|
|
4375
|
+
if (indent) {
|
|
4376
|
+
event.preventDefault();
|
|
4377
|
+
IndentEditor.cancelIndent(editor);
|
|
4378
|
+
return true;
|
|
4379
|
+
}
|
|
4380
|
+
return false;
|
|
4381
|
+
}
|
|
4382
|
+
};
|
|
4383
|
+
|
|
4209
4384
|
const TableEditor = {
|
|
4210
4385
|
insertTable(editor, optionsParam) {
|
|
4211
4386
|
const opts = new TableOptions(optionsParam);
|
|
@@ -4366,12 +4541,73 @@ const TableEditor = {
|
|
|
4366
4541
|
const [tableRowEntry] = Editor.nodes(editor, { match: (n) => n.type === ElementKinds.tableRow });
|
|
4367
4542
|
return tableRowEntry && tableRowEntry[0] && tableRowEntry[0].header;
|
|
4368
4543
|
},
|
|
4544
|
+
isActiveHeaderRow(editor) {
|
|
4545
|
+
const tableNode = getAboveByType(editor, ElementKinds.table);
|
|
4546
|
+
const cells = TableEditor.getSelectedCells(editor);
|
|
4547
|
+
const { row, col } = cells[0];
|
|
4548
|
+
const cellPath = [...tableNode[1], row, col];
|
|
4549
|
+
const cellRange = { anchor: Editor.start(editor, cellPath), focus: Editor.end(editor, cellPath) };
|
|
4550
|
+
const [headerRow] = Editor.nodes(editor, {
|
|
4551
|
+
match: n => Element$1.isElement(n) && n.type === ElementKinds.tableRow && n.header,
|
|
4552
|
+
at: cellRange
|
|
4553
|
+
});
|
|
4554
|
+
return headerRow;
|
|
4555
|
+
},
|
|
4556
|
+
isActiveHeaderColumn(editor) {
|
|
4557
|
+
const [table] = Editor.nodes(editor, { match: n => Element$1.isElement(n) && n.type === ElementKinds.table });
|
|
4558
|
+
const { anchor, focus } = editor.selection;
|
|
4559
|
+
const opts = new TableOptions();
|
|
4560
|
+
const anchorPosition = TablePosition.create(opts, editor, anchor.path);
|
|
4561
|
+
const focusPosition = TablePosition.create(opts, editor, focus.path);
|
|
4562
|
+
const anchorIndex = anchorPosition.getColumnIndex();
|
|
4563
|
+
const focusIndex = focusPosition.getColumnIndex();
|
|
4564
|
+
const isContainHeaderColumn = anchorIndex === 0 || focusIndex === 0;
|
|
4565
|
+
const isHeaderColumn = table && table[0] && table[0]?.options?.headerColumn;
|
|
4566
|
+
return isHeaderColumn && isContainHeaderColumn;
|
|
4567
|
+
},
|
|
4369
4568
|
selectOriginCell(editor, table, rowIndex, columnIndex, isStart) {
|
|
4370
4569
|
const origin = getOriginCell(table, rowIndex, columnIndex);
|
|
4371
4570
|
if (origin) {
|
|
4372
4571
|
const path = AngularEditor.findPath(editor, origin);
|
|
4373
4572
|
Transforms.select(editor, isStart ? Editor.start(editor, path) : Editor.end(editor, path));
|
|
4374
4573
|
}
|
|
4574
|
+
},
|
|
4575
|
+
setIndent(editor) {
|
|
4576
|
+
return TableEditor.handleSelectedCells(editor, (cellPath, cellRange) => {
|
|
4577
|
+
const allowedTypes = IndentEditor.getAllowedTypes(editor);
|
|
4578
|
+
const maxIndent = getPluginOptions(editor, PluginKeys.indent)?.maxIndent ?? [];
|
|
4579
|
+
const children = getNode(editor, cellPath).children;
|
|
4580
|
+
if (children.length) {
|
|
4581
|
+
children.forEach((child, index) => {
|
|
4582
|
+
let { indent } = child;
|
|
4583
|
+
indent = indent ? ++indent : 1;
|
|
4584
|
+
if (indent <= maxIndent) {
|
|
4585
|
+
Transforms.setNodes(editor, { indent }, {
|
|
4586
|
+
at: [...cellPath, index],
|
|
4587
|
+
mode: 'highest',
|
|
4588
|
+
match: n => Element$1.isElement(n) && allowedTypes.includes(n.type)
|
|
4589
|
+
});
|
|
4590
|
+
}
|
|
4591
|
+
});
|
|
4592
|
+
}
|
|
4593
|
+
});
|
|
4594
|
+
},
|
|
4595
|
+
cancelIndent(editor) {
|
|
4596
|
+
return TableEditor.handleSelectedCells(editor, (cellPath, cellRange) => {
|
|
4597
|
+
const allowedTypes = IndentEditor.getAllowedTypes(editor);
|
|
4598
|
+
const children = getNode(editor, cellPath).children;
|
|
4599
|
+
if (children.length) {
|
|
4600
|
+
children.forEach((child, index) => {
|
|
4601
|
+
let { indent } = child;
|
|
4602
|
+
indent = indent ? --indent : 0;
|
|
4603
|
+
Transforms.setNodes(editor, { indent }, {
|
|
4604
|
+
at: [...cellPath, index],
|
|
4605
|
+
mode: 'highest',
|
|
4606
|
+
match: n => Element$1.isElement(n) && allowedTypes.includes(n.type)
|
|
4607
|
+
});
|
|
4608
|
+
});
|
|
4609
|
+
}
|
|
4610
|
+
});
|
|
4375
4611
|
}
|
|
4376
4612
|
};
|
|
4377
4613
|
|
|
@@ -5135,9 +5371,9 @@ class TheBlockquoteComponent extends TheBaseElementComponent {
|
|
|
5135
5371
|
this.cdr = cdr;
|
|
5136
5372
|
}
|
|
5137
5373
|
}
|
|
5138
|
-
TheBlockquoteComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.
|
|
5139
|
-
TheBlockquoteComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.
|
|
5140
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.
|
|
5374
|
+
TheBlockquoteComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheBlockquoteComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
5375
|
+
TheBlockquoteComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: TheBlockquoteComponent, selector: "blockquote[theBlockquote]", usesInheritance: true, ngImport: i0, template: `<slate-children [children]="children" [context]="childrenContext" [viewContext]="viewContext"></slate-children>`, isInline: true, dependencies: [{ kind: "component", type: i1.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }] });
|
|
5376
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheBlockquoteComponent, decorators: [{
|
|
5141
5377
|
type: Component,
|
|
5142
5378
|
args: [{
|
|
5143
5379
|
selector: 'blockquote[theBlockquote]',
|
|
@@ -5225,9 +5461,9 @@ class ThePreventDefaultDirective {
|
|
|
5225
5461
|
event.preventDefault();
|
|
5226
5462
|
}
|
|
5227
5463
|
}
|
|
5228
|
-
ThePreventDefaultDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.
|
|
5229
|
-
ThePreventDefaultDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.
|
|
5230
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.
|
|
5464
|
+
ThePreventDefaultDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ThePreventDefaultDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
5465
|
+
ThePreventDefaultDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.0", type: ThePreventDefaultDirective, selector: "[thePreventDefault]", host: { listeners: { "mousedown": "mousedown($event)" } }, exportAs: ["thePreventDefault"], ngImport: i0 });
|
|
5466
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ThePreventDefaultDirective, decorators: [{
|
|
5231
5467
|
type: Directive,
|
|
5232
5468
|
args: [{
|
|
5233
5469
|
selector: '[thePreventDefault]',
|
|
@@ -5453,9 +5689,9 @@ class TheCodeComponent extends TheBaseElementComponent {
|
|
|
5453
5689
|
this.destroy$.complete();
|
|
5454
5690
|
}
|
|
5455
5691
|
}
|
|
5456
|
-
TheCodeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.
|
|
5457
|
-
TheCodeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.
|
|
5458
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.
|
|
5692
|
+
TheCodeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", 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 });
|
|
5693
|
+
TheCodeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", 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: 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: "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", "thyResizeEnd", "thyResizeStart"] }, { kind: "component", type: i9.ThyResizeHandleComponent, selector: "thy-resize-handle, [thy-resize-handle]", inputs: ["thyDirection", "thyLine"], outputs: ["thyMouseDown"], exportAs: ["thyResizeHandle"] }, { kind: "component", type: i10.ThySwitchComponent, selector: "thy-switch", inputs: ["thyType", "thySize", "thyDisabled"], outputs: ["thyChange"] }, { kind: "component", type: i5.ThyActionComponent, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }, { kind: "component", type: i5.ThyActionsComponent, selector: "thy-actions", inputs: ["thySize"] }, { kind: "component", type: i12.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", inputs: ["itemMousedownHandle"] }, { kind: "directive", type: ThePreventDefaultDirective, selector: "[thePreventDefault]", exportAs: ["thePreventDefault"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
5694
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheCodeComponent, decorators: [{
|
|
5459
5695
|
type: Component,
|
|
5460
5696
|
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" }]
|
|
5461
5697
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i1$2.ThyNotifyService }, { type: TheContextService }, { type: i0.NgZone }, { type: TheModeConfig, decorators: [{
|
|
@@ -5521,68 +5757,6 @@ const createCodePlugin = createPluginFactory({
|
|
|
5521
5757
|
}
|
|
5522
5758
|
});
|
|
5523
5759
|
|
|
5524
|
-
const Colors = [
|
|
5525
|
-
'#FFFFFF',
|
|
5526
|
-
'#333333',
|
|
5527
|
-
'#FF0100',
|
|
5528
|
-
'#FFDA00',
|
|
5529
|
-
'#A4E143',
|
|
5530
|
-
'#38D9F0',
|
|
5531
|
-
'#4EA8EE',
|
|
5532
|
-
'#9570E7',
|
|
5533
|
-
'#F3F3F3',
|
|
5534
|
-
'#CCCCCC',
|
|
5535
|
-
'#FEF3F1',
|
|
5536
|
-
'#FEFCDA',
|
|
5537
|
-
'#EDF6E8',
|
|
5538
|
-
'#E6FBFA',
|
|
5539
|
-
'#EBF4FC',
|
|
5540
|
-
'#F1EDF7',
|
|
5541
|
-
'#DDDDDD',
|
|
5542
|
-
'#A5A5A5',
|
|
5543
|
-
'#FCD5D0',
|
|
5544
|
-
'#F9EDA6',
|
|
5545
|
-
'#D4E9D7',
|
|
5546
|
-
'#C8E6EA',
|
|
5547
|
-
'#CCE0F2',
|
|
5548
|
-
'#DAD6EA',
|
|
5549
|
-
'#888888',
|
|
5550
|
-
'#494949',
|
|
5551
|
-
'#EE7976',
|
|
5552
|
-
'#E7B323',
|
|
5553
|
-
'#99C191',
|
|
5554
|
-
'#79C6CE',
|
|
5555
|
-
'#6EAAD7',
|
|
5556
|
-
'#9D8EC2',
|
|
5557
|
-
'#41464C',
|
|
5558
|
-
'#000000',
|
|
5559
|
-
'#BF1A1E',
|
|
5560
|
-
'#AD720E',
|
|
5561
|
-
'#1C7232',
|
|
5562
|
-
'#1C7892',
|
|
5563
|
-
'#18439D',
|
|
5564
|
-
'#521B78'
|
|
5565
|
-
];
|
|
5566
|
-
const BackgroundColors = [
|
|
5567
|
-
'#FFFFFF',
|
|
5568
|
-
'#FACCCC',
|
|
5569
|
-
'#FFEBCC',
|
|
5570
|
-
'#FFFFCC',
|
|
5571
|
-
'#CDE8CC',
|
|
5572
|
-
'#CCE0F5',
|
|
5573
|
-
'#EBD6FF',
|
|
5574
|
-
'#F3F3F3',
|
|
5575
|
-
'#F06665',
|
|
5576
|
-
'#FFC266',
|
|
5577
|
-
'#FFFF66',
|
|
5578
|
-
'#66B966',
|
|
5579
|
-
'#66A3E0',
|
|
5580
|
-
'#C285FF'
|
|
5581
|
-
];
|
|
5582
|
-
const SpecialTextColor = '#333333';
|
|
5583
|
-
const SpecialBackgroundColor = '#FFFFFF';
|
|
5584
|
-
const TableHeaderBackgroundColor = '#F3F3F3';
|
|
5585
|
-
|
|
5586
5760
|
const ColorEditor = {
|
|
5587
5761
|
getActiveColor(editor, type) {
|
|
5588
5762
|
if (!editor?.selection) {
|
|
@@ -5684,8 +5858,8 @@ class TheColorToolbarItemComponent extends TheBaseToolbarItem {
|
|
|
5684
5858
|
}
|
|
5685
5859
|
}
|
|
5686
5860
|
}
|
|
5687
|
-
TheColorToolbarItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.
|
|
5688
|
-
TheColorToolbarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.
|
|
5861
|
+
TheColorToolbarItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheColorToolbarItemComponent, deps: [{ token: i1$1.ThyPopover }], target: i0.ɵɵFactoryTarget.Component });
|
|
5862
|
+
TheColorToolbarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: TheColorToolbarItemComponent, selector: "the-color-toolbar-item", host: { classAttribute: "the-toolbar-item" }, usesInheritance: true, ngImport: i0, template: `
|
|
5689
5863
|
<a
|
|
5690
5864
|
href="javascript:;"
|
|
5691
5865
|
thyAction
|
|
@@ -5702,8 +5876,8 @@ TheColorToolbarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14
|
|
|
5702
5876
|
></thy-icon>
|
|
5703
5877
|
<thy-icon class="link-down-icon font-size-sm text-desc ml-1" thyIconName="caret-down"></thy-icon>
|
|
5704
5878
|
</a>
|
|
5705
|
-
`, isInline: true, dependencies: [{ kind: "component", type:
|
|
5706
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.
|
|
5879
|
+
`, isInline: true, dependencies: [{ 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.ThyActionComponent, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }] });
|
|
5880
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheColorToolbarItemComponent, decorators: [{
|
|
5707
5881
|
type: Component,
|
|
5708
5882
|
args: [{
|
|
5709
5883
|
selector: 'the-color-toolbar-item',
|
|
@@ -6561,9 +6735,9 @@ class TheConversionHintComponent {
|
|
|
6561
6735
|
clearInterval(this.closeTimer);
|
|
6562
6736
|
}
|
|
6563
6737
|
}
|
|
6564
|
-
TheConversionHintComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.
|
|
6565
|
-
TheConversionHintComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.
|
|
6566
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.
|
|
6738
|
+
TheConversionHintComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheConversionHintComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6739
|
+
TheConversionHintComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: TheConversionHintComponent, selector: "the-conversion-hint", inputs: { editor: "editor", conversion: "conversion" }, host: { listeners: { "mouseenter": "mouseenter()", "mouseleave": "mouseleave()" }, classAttribute: "the-conversion-hint" }, ngImport: i0, template: "<ng-container>\n <thy-alert thyType=\"primary-weak\" thyIcon=\"info-circle-fill\" thyCloseable=\"true\" thyMessage=\"\u68C0\u6D4B\u5230\u7C98\u8D34\u5185\u5BB9\u7B26\u5408Markdown\u8BED\u6CD5\">\n <ng-template #operation>\n <a href=\"javascript:;\" thyAlertActionItem (click)=\"conversion()\"> \u7ACB\u5373\u8F6C\u6362 </a>\n </ng-template>\n </thy-alert>\n</ng-container>\n", dependencies: [{ kind: "component", type: i1$3.ThyAlertComponent, selector: "thy-alert", inputs: ["thyType", "thyTheme", "thyMessage", "thyIcon", "thyCloseable"] }, { kind: "directive", type: i1$3.ThyAlertActionItemDirective, selector: "[thyAlertActionItem]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
6740
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheConversionHintComponent, decorators: [{
|
|
6567
6741
|
type: Component,
|
|
6568
6742
|
args: [{ selector: 'the-conversion-hint', host: {
|
|
6569
6743
|
class: 'the-conversion-hint'
|
|
@@ -6931,14 +7105,14 @@ class TheHrComponent extends TheBaseElementComponent {
|
|
|
6931
7105
|
});
|
|
6932
7106
|
}
|
|
6933
7107
|
}
|
|
6934
|
-
TheHrComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.
|
|
6935
|
-
TheHrComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.
|
|
7108
|
+
TheHrComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheHrComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
7109
|
+
TheHrComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: TheHrComponent, selector: "the-hr, [theHr]", usesInheritance: true, ngImport: i0, template: `
|
|
6936
7110
|
<div class="the-hr" contenteditable="false" [ngClass]="{ active: isCollapsedAndNonReadonly }">
|
|
6937
7111
|
<hr class="the-hr" />
|
|
6938
7112
|
<slate-children [children]="children" [context]="childrenContext" [viewContext]="viewContext"></slate-children>
|
|
6939
7113
|
</div>
|
|
6940
7114
|
`, isInline: true, dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: i1.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }] });
|
|
6941
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.
|
|
7115
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheHrComponent, decorators: [{
|
|
6942
7116
|
type: Component,
|
|
6943
7117
|
args: [{
|
|
6944
7118
|
selector: 'the-hr, [theHr]',
|
|
@@ -7350,15 +7524,15 @@ class TheImageComponent extends TheBaseElementComponent {
|
|
|
7350
7524
|
event.stopPropagation();
|
|
7351
7525
|
}
|
|
7352
7526
|
}
|
|
7353
|
-
TheImageComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.
|
|
7354
|
-
TheImageComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.
|
|
7355
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.
|
|
7527
|
+
TheImageComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheImageComponent, deps: [{ token: i0.ElementRef }, { token: THE_UPLOAD_SERVICE_TOKEN }, { token: i0.ChangeDetectorRef }, { token: TheContextService }, { token: i1$1.ThyPopover }, { token: i2$1.Overlay }, { token: i4$1.ThyImageService }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
7528
|
+
TheImageComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: TheImageComponent, selector: "the-image, [theImage]", viewQueries: [{ propertyName: "imageContent", first: true, predicate: ["imageContent"], descendants: true }, { propertyName: "img", first: true, predicate: ["img"], descendants: true }, { propertyName: "layoutToolbar", first: true, predicate: ["layoutToolbar"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<slate-children [children]=\"children\" [context]=\"childrenContext\" [viewContext]=\"viewContext\"></slate-children>\n\n<div class=\"image-container\" contenteditable=\"false\" [style.textAlign]=\"imageEntry.align\">\n <div #imageContent *ngIf=\"imageEntry.thumbUrl\" class=\"image-content\" [class.pointer]=\"!selection\">\n <img\n #img\n thyImage\n [ngStyle]=\"{ 'width.px': imageBindingWidth }\"\n [class.image-collapsed]=\"selection && !uploading\"\n class=\"main-image\"\n (load)=\"imageLoaded($event)\"\n (mousedown)=\"preventDefault($event)\"\n [thySrc]=\"imageEntry.thumbUrl\"\n [thyPreviewSrc]=\"imageEntry.thumbUrl\"\n [thyOriginSrc]=\"imageEntry.originUrl\"\n [thyImageMeta]=\"{ name: imageEntry.name, size: imageEntry.size }\"\n [alt]=\"imageEntry.name\"\n />\n <div *ngIf=\"isCollapsedAndNonReadonly\" class=\"image-profile\" [class.outline]=\"selection\">\n <span *ngIf=\"isCollapsedAndNonReadonly\" (mousedown)=\"startDrag($event, '-xl')\" class=\"image-pointer left top\"></span>\n <span *ngIf=\"isCollapsedAndNonReadonly\" (mousedown)=\"startDrag($event, 'xl')\" class=\"image-pointer right top\"></span>\n <span *ngIf=\"isCollapsedAndNonReadonly\" (mousedown)=\"startDrag($event, 'xl')\" class=\"image-pointer right bottom\"></span>\n <span *ngIf=\"isCollapsedAndNonReadonly\" (mousedown)=\"startDrag($event, '-xl')\" class=\"image-pointer left bottom\"></span>\n </div>\n <div *ngIf=\"uploading\" class=\"uploading\">\n <div class=\"uploading-percentage\">\n <thy-progress thyType=\"primary\" [thyValue]=\"percentage\" thySize=\"sm\"></thy-progress>\n <thy-icon (click)=\"cancelUpload($event)\" thyIconName=\"close-circle-bold-fill\" thyIconLegging=\"true\"> </thy-icon>\n </div>\n </div>\n <div *ngIf=\"!uploading\" class=\"layer\" [class.readonly]=\"readonly\"></div>\n </div>\n <div *ngIf=\"!imageEntry.thumbUrl\" class=\"image-loading\" contenteditable=\"false\">\n <thy-icon thyIconName=\"image\"></thy-icon>\n </div>\n</div>\n\n<ng-template #layoutToolbar>\n <thy-actions thySize=\"xxs\">\n <ng-container *ngFor=\"let item of layoutOptions\">\n <a\n *ngIf=\"item.key !== 'split'\"\n href=\"javascript:;\"\n thyAction\n [thyType]=\"item.key === 'remove' ? 'danger' : 'primary'\"\n [thyActionIcon]=\"item.icon\"\n [thyActionActive]=\"layoutActive(item.key)\"\n [thyTooltip]=\"item.name\"\n thyTooltipPlacement=\"top\"\n (mousedown)=\"item?.handle($event, item.key)\"\n ></a>\n <thy-divider *ngIf=\"item.key === 'split'\" class=\"mr-2 ml-1 align-self-center\" [thyVertical]=\"true\"></thy-divider>\n </ng-container>\n </thy-actions>\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.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i1.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }, { 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: i9$1.ThyProgressComponent, selector: "thy-progress", inputs: ["thyType", "thySize", "thyValue", "thyMax", "thyTips"] }, { kind: "directive", type: i4$1.ThyImageDirective, selector: "img[thyImage]", inputs: ["thySrc", "thyPreviewSrc", "thyOriginSrc", "thyImageMeta", "thyDisablePreview", "thyResolveSize"], exportAs: ["thyImage"] }, { kind: "component", type: i5.ThyActionComponent, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }, { kind: "component", type: i5.ThyActionsComponent, selector: "thy-actions", inputs: ["thySize"] }, { kind: "component", type: i12.ThyDividerComponent, selector: "thy-divider", inputs: ["thyVertical", "thyStyle", "thyColor", "thyText", "thyTextDirection", "thyDeeper"] }] });
|
|
7529
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheImageComponent, decorators: [{
|
|
7356
7530
|
type: Component,
|
|
7357
7531
|
args: [{ selector: 'the-image, [theImage]', template: "<slate-children [children]=\"children\" [context]=\"childrenContext\" [viewContext]=\"viewContext\"></slate-children>\n\n<div class=\"image-container\" contenteditable=\"false\" [style.textAlign]=\"imageEntry.align\">\n <div #imageContent *ngIf=\"imageEntry.thumbUrl\" class=\"image-content\" [class.pointer]=\"!selection\">\n <img\n #img\n thyImage\n [ngStyle]=\"{ 'width.px': imageBindingWidth }\"\n [class.image-collapsed]=\"selection && !uploading\"\n class=\"main-image\"\n (load)=\"imageLoaded($event)\"\n (mousedown)=\"preventDefault($event)\"\n [thySrc]=\"imageEntry.thumbUrl\"\n [thyPreviewSrc]=\"imageEntry.thumbUrl\"\n [thyOriginSrc]=\"imageEntry.originUrl\"\n [thyImageMeta]=\"{ name: imageEntry.name, size: imageEntry.size }\"\n [alt]=\"imageEntry.name\"\n />\n <div *ngIf=\"isCollapsedAndNonReadonly\" class=\"image-profile\" [class.outline]=\"selection\">\n <span *ngIf=\"isCollapsedAndNonReadonly\" (mousedown)=\"startDrag($event, '-xl')\" class=\"image-pointer left top\"></span>\n <span *ngIf=\"isCollapsedAndNonReadonly\" (mousedown)=\"startDrag($event, 'xl')\" class=\"image-pointer right top\"></span>\n <span *ngIf=\"isCollapsedAndNonReadonly\" (mousedown)=\"startDrag($event, 'xl')\" class=\"image-pointer right bottom\"></span>\n <span *ngIf=\"isCollapsedAndNonReadonly\" (mousedown)=\"startDrag($event, '-xl')\" class=\"image-pointer left bottom\"></span>\n </div>\n <div *ngIf=\"uploading\" class=\"uploading\">\n <div class=\"uploading-percentage\">\n <thy-progress thyType=\"primary\" [thyValue]=\"percentage\" thySize=\"sm\"></thy-progress>\n <thy-icon (click)=\"cancelUpload($event)\" thyIconName=\"close-circle-bold-fill\" thyIconLegging=\"true\"> </thy-icon>\n </div>\n </div>\n <div *ngIf=\"!uploading\" class=\"layer\" [class.readonly]=\"readonly\"></div>\n </div>\n <div *ngIf=\"!imageEntry.thumbUrl\" class=\"image-loading\" contenteditable=\"false\">\n <thy-icon thyIconName=\"image\"></thy-icon>\n </div>\n</div>\n\n<ng-template #layoutToolbar>\n <thy-actions thySize=\"xxs\">\n <ng-container *ngFor=\"let item of layoutOptions\">\n <a\n *ngIf=\"item.key !== 'split'\"\n href=\"javascript:;\"\n thyAction\n [thyType]=\"item.key === 'remove' ? 'danger' : 'primary'\"\n [thyActionIcon]=\"item.icon\"\n [thyActionActive]=\"layoutActive(item.key)\"\n [thyTooltip]=\"item.name\"\n thyTooltipPlacement=\"top\"\n (mousedown)=\"item?.handle($event, item.key)\"\n ></a>\n <thy-divider *ngIf=\"item.key === 'split'\" class=\"mr-2 ml-1 align-self-center\" [thyVertical]=\"true\"></thy-divider>\n </ng-container>\n </thy-actions>\n</ng-template>\n" }]
|
|
7358
7532
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: undefined, decorators: [{
|
|
7359
7533
|
type: Inject,
|
|
7360
7534
|
args: [THE_UPLOAD_SERVICE_TOKEN]
|
|
7361
|
-
}] }, { type: i0.ChangeDetectorRef }, { type: TheContextService }, { type: i1$1.ThyPopover }, { type: i2$1.Overlay }, { type: i4.ThyImageService }, { type: i0.ViewContainerRef }]; }, propDecorators: { imageContent: [{
|
|
7535
|
+
}] }, { type: i0.ChangeDetectorRef }, { type: TheContextService }, { type: i1$1.ThyPopover }, { type: i2$1.Overlay }, { type: i4$1.ThyImageService }, { type: i0.ViewContainerRef }]; }, propDecorators: { imageContent: [{
|
|
7362
7536
|
type: ViewChild,
|
|
7363
7537
|
args: ['imageContent']
|
|
7364
7538
|
}], img: [{
|
|
@@ -7434,74 +7608,6 @@ const createImagePlugin = createPluginFactory({
|
|
|
7434
7608
|
}
|
|
7435
7609
|
});
|
|
7436
7610
|
|
|
7437
|
-
const IndentEditor = {
|
|
7438
|
-
getAllowedTypes(editor) {
|
|
7439
|
-
return getPluginOptions(editor, PluginKeys.indent)?.allowedTypes ?? [];
|
|
7440
|
-
},
|
|
7441
|
-
setIndent(editor) {
|
|
7442
|
-
const allowedTypes = IndentEditor.getAllowedTypes(editor);
|
|
7443
|
-
const maxIndent = getPluginOptions(editor, PluginKeys.indent)?.maxIndent ?? [];
|
|
7444
|
-
const nodes = Array.from(Editor.nodes(editor, {
|
|
7445
|
-
mode: 'highest',
|
|
7446
|
-
match: n => Element$1.isElement(n) && allowedTypes.includes(n.type)
|
|
7447
|
-
}));
|
|
7448
|
-
const [startBlock] = nodes;
|
|
7449
|
-
if (startBlock) {
|
|
7450
|
-
let [{ indent }] = startBlock;
|
|
7451
|
-
indent = indent ? indent : 0;
|
|
7452
|
-
indent += 1;
|
|
7453
|
-
if (indent <= maxIndent) {
|
|
7454
|
-
Transforms.setNodes(editor, { indent }, {
|
|
7455
|
-
mode: 'highest',
|
|
7456
|
-
match: n => Element$1.isElement(n) && allowedTypes.includes(n.type)
|
|
7457
|
-
});
|
|
7458
|
-
}
|
|
7459
|
-
}
|
|
7460
|
-
},
|
|
7461
|
-
cancelIndent(editor) {
|
|
7462
|
-
const allowedTypes = IndentEditor.getAllowedTypes(editor);
|
|
7463
|
-
const nodes = Array.from(Editor.nodes(editor, {
|
|
7464
|
-
mode: 'highest',
|
|
7465
|
-
match: n => Element$1.isElement(n) && allowedTypes.includes(n.type)
|
|
7466
|
-
}));
|
|
7467
|
-
const [startBlock] = nodes;
|
|
7468
|
-
if (startBlock) {
|
|
7469
|
-
let [{ indent }] = startBlock;
|
|
7470
|
-
indent = indent === 1 ? null : (indent -= 1);
|
|
7471
|
-
Transforms.setNodes(editor, { indent }, {
|
|
7472
|
-
mode: 'highest',
|
|
7473
|
-
match: n => Element$1.isElement(n) && allowedTypes.includes(n.type)
|
|
7474
|
-
});
|
|
7475
|
-
}
|
|
7476
|
-
},
|
|
7477
|
-
setTextIndent(editor, kinds, textIndent) {
|
|
7478
|
-
Transforms.setNodes(editor, { textIndent }, {
|
|
7479
|
-
mode: 'highest',
|
|
7480
|
-
match: node => Element$1.isElement(node) && kinds.includes(node.type)
|
|
7481
|
-
});
|
|
7482
|
-
},
|
|
7483
|
-
cancelTextIntent(editor, event, anchorBlock, kinds) {
|
|
7484
|
-
let { textIndent, indent } = anchorBlock;
|
|
7485
|
-
if (textIndent > 2) {
|
|
7486
|
-
event.preventDefault();
|
|
7487
|
-
textIndent -= 2;
|
|
7488
|
-
IndentEditor.setTextIndent(editor, kinds, textIndent);
|
|
7489
|
-
return true;
|
|
7490
|
-
}
|
|
7491
|
-
if (textIndent === 2) {
|
|
7492
|
-
event.preventDefault();
|
|
7493
|
-
IndentEditor.setTextIndent(editor, kinds, null);
|
|
7494
|
-
return true;
|
|
7495
|
-
}
|
|
7496
|
-
if (indent) {
|
|
7497
|
-
event.preventDefault();
|
|
7498
|
-
IndentEditor.cancelIndent(editor);
|
|
7499
|
-
return true;
|
|
7500
|
-
}
|
|
7501
|
-
return false;
|
|
7502
|
-
}
|
|
7503
|
-
};
|
|
7504
|
-
|
|
7505
7611
|
const onKeydownTextIndent = (editor, event, kinds, textIndentDisabled) => {
|
|
7506
7612
|
const { selection } = editor;
|
|
7507
7613
|
const isExpanded = Range.isExpanded(selection);
|
|
@@ -7517,6 +7623,9 @@ const onKeydownTextIndent = (editor, event, kinds, textIndentDisabled) => {
|
|
|
7517
7623
|
const isStart = Editor.isStart(editor, selection.anchor, path);
|
|
7518
7624
|
if (isKeyHotkey('Tab', event)) {
|
|
7519
7625
|
event.preventDefault();
|
|
7626
|
+
if (TableEditor.setIndent(editor)) {
|
|
7627
|
+
return true;
|
|
7628
|
+
}
|
|
7520
7629
|
if (startBlock && (isExpanded || isStart)) {
|
|
7521
7630
|
if (!editor.isVoid(block)) {
|
|
7522
7631
|
let { textIndent, type } = block;
|
|
@@ -7613,11 +7722,11 @@ class TheInlineCodeComponent extends TheBaseElementComponent {
|
|
|
7613
7722
|
this.inlineChromiumBugfix = String.fromCodePoint(160);
|
|
7614
7723
|
}
|
|
7615
7724
|
}
|
|
7616
|
-
TheInlineCodeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.
|
|
7617
|
-
TheInlineCodeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.
|
|
7725
|
+
TheInlineCodeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheInlineCodeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
7726
|
+
TheInlineCodeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: TheInlineCodeComponent, selector: "span[theInlineCode]", usesInheritance: true, ngImport: i0, template: `<span contenteditable="false" class="the-break-char">{{ inlineChromiumBugfix }}</span>
|
|
7618
7727
|
<span><slate-children [children]="children" [context]="childrenContext" [viewContext]="viewContext"></slate-children></span>
|
|
7619
7728
|
<span contenteditable="false" class="the-break-char">{{ inlineChromiumBugfix }}</span>`, isInline: true, dependencies: [{ kind: "component", type: i1.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }] });
|
|
7620
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.
|
|
7729
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheInlineCodeComponent, decorators: [{
|
|
7621
7730
|
type: Component,
|
|
7622
7731
|
args: [{
|
|
7623
7732
|
selector: 'span[theInlineCode]',
|
|
@@ -7791,9 +7900,9 @@ class TheLinkHoverComponent {
|
|
|
7791
7900
|
event.stopPropagation();
|
|
7792
7901
|
}
|
|
7793
7902
|
}
|
|
7794
|
-
TheLinkHoverComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.
|
|
7795
|
-
TheLinkHoverComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.
|
|
7796
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.
|
|
7903
|
+
TheLinkHoverComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheLinkHoverComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
7904
|
+
TheLinkHoverComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: TheLinkHoverComponent, selector: "the-link-hover", inputs: { link: "link", dom: "dom", editHandle: "editHandle", deleteHandle: "deleteHandle" }, ngImport: i0, template: "<div class=\"link-hover-card px-1\">\n <a readonly href=\"{{ link }}\" target=\"_blank\" rel=\"{{ aTagRelAttr }}\" class=\"hover-control-plaintext text-truncate mx-2\">\n {{ link }}\n </a>\n <thy-divider class=\"mx-2\" [thyVertical]=\"true\"></thy-divider>\n <a href=\"javascript:;\" thyAction thyActionIcon=\"edit\" thePreventDefault (click)=\"editLink($event)\"></a>\n <thy-divider class=\"mx-2\" [thyVertical]=\"true\"></thy-divider>\n <a href=\"javascript:;\" thyAction thyActionIcon=\"unlink-insert\" thePreventDefault (click)=\"removeLink($event)\"></a>\n</div>\n", dependencies: [{ kind: "component", type: i5.ThyActionComponent, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }, { kind: "component", type: i12.ThyDividerComponent, selector: "thy-divider", inputs: ["thyVertical", "thyStyle", "thyColor", "thyText", "thyTextDirection", "thyDeeper"] }, { kind: "directive", type: ThePreventDefaultDirective, selector: "[thePreventDefault]", exportAs: ["thePreventDefault"] }] });
|
|
7905
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheLinkHoverComponent, decorators: [{
|
|
7797
7906
|
type: Component,
|
|
7798
7907
|
args: [{ selector: 'the-link-hover', template: "<div class=\"link-hover-card px-1\">\n <a readonly href=\"{{ link }}\" target=\"_blank\" rel=\"{{ aTagRelAttr }}\" class=\"hover-control-plaintext text-truncate mx-2\">\n {{ link }}\n </a>\n <thy-divider class=\"mx-2\" [thyVertical]=\"true\"></thy-divider>\n <a href=\"javascript:;\" thyAction thyActionIcon=\"edit\" thePreventDefault (click)=\"editLink($event)\"></a>\n <thy-divider class=\"mx-2\" [thyVertical]=\"true\"></thy-divider>\n <a href=\"javascript:;\" thyAction thyActionIcon=\"unlink-insert\" thePreventDefault (click)=\"removeLink($event)\"></a>\n</div>\n" }]
|
|
7799
7908
|
}], ctorParameters: function () { return []; }, propDecorators: { link: [{
|
|
@@ -7875,9 +7984,9 @@ class TheLinkEditComponent {
|
|
|
7875
7984
|
}
|
|
7876
7985
|
}
|
|
7877
7986
|
}
|
|
7878
|
-
TheLinkEditComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.
|
|
7879
|
-
TheLinkEditComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.
|
|
7880
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.
|
|
7987
|
+
TheLinkEditComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheLinkEditComponent, deps: [{ token: i1$1.ThyPopoverRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
7988
|
+
TheLinkEditComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", 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: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { 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.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i3.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3$1.ThyFormDirective, selector: "[thyForm],[thy-form]", inputs: ["thyLayout", "thyEnterKeyMode", "thyFormValidatorConfig"], exportAs: ["thyForm"] }, { kind: "component", type: i3$1.ThyFormGroupComponent, selector: "thy-form-group", inputs: ["thyLabelText", "thyLabelTextTranslateKey", "thyLabelRequired", "thyLabelPaddingTopClear", "thyFeedbackIcon", "thyTipsMode", "thyTips", "thyTipsTranslateKey", "thyRowFill"] }, { kind: "directive", type: i3$1.ThyFormSubmitDirective, selector: "[thyFormSubmit],[thy-form-submit]", outputs: ["thyFormSubmit"] }, { kind: "component", type: i3$1.ThyFormGroupFooterComponent, selector: "thy-form-group-footer", inputs: ["thyAlign"] }, { kind: "directive", type: i5$2.ThyAutofocusDirective, selector: "input[thyAutofocus],textarea[thyAutofocus]", inputs: ["thyAutoSelect", "thyAutofocus"] }, { kind: "directive", type: i5$1.ThyInputDirective, selector: "[thyInput]", inputs: ["thySize", "thyAutocomplete"] }, { kind: "component", type: i6$1.ThyButtonComponent, selector: "thy-button,[thy-button],[thyButton]", inputs: ["thyButton", "thyType", "thyLoading", "thyLoadingText", "thySize", "thyIcon", "thyBlock"] }] });
|
|
7989
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheLinkEditComponent, decorators: [{
|
|
7881
7990
|
type: Component,
|
|
7882
7991
|
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" }]
|
|
7883
7992
|
}], ctorParameters: function () { return [{ type: i1$1.ThyPopoverRef }]; }, propDecorators: { className: [{
|
|
@@ -8016,9 +8125,9 @@ class TheBaseLinkComponent extends TheBaseElementComponent {
|
|
|
8016
8125
|
this.close(LinkCloseTypes.destroy);
|
|
8017
8126
|
}
|
|
8018
8127
|
}
|
|
8019
|
-
TheBaseLinkComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.
|
|
8020
|
-
TheBaseLinkComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.
|
|
8021
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.
|
|
8128
|
+
TheBaseLinkComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheBaseLinkComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i1$1.ThyPopover }, { token: i2$1.Overlay }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
8129
|
+
TheBaseLinkComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: TheBaseLinkComponent, selector: "[TheBaseLinkComponent]", host: { listeners: { "click": "mousedownHandle($event)" } }, usesInheritance: true, ngImport: i0, template: '', isInline: true });
|
|
8130
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheBaseLinkComponent, decorators: [{
|
|
8022
8131
|
type: Component,
|
|
8023
8132
|
args: [{
|
|
8024
8133
|
selector: '[TheBaseLinkComponent]',
|
|
@@ -8036,11 +8145,11 @@ class TheLinkComponent extends TheBaseLinkComponent {
|
|
|
8036
8145
|
this.inlineChromiumBugfix = String.fromCodePoint(160);
|
|
8037
8146
|
}
|
|
8038
8147
|
}
|
|
8039
|
-
TheLinkComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.
|
|
8040
|
-
TheLinkComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.
|
|
8148
|
+
TheLinkComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheLinkComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
8149
|
+
TheLinkComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: TheLinkComponent, selector: "a[theLink]", host: { attributes: { "target": "_blank" }, properties: { "attr.href": "element.url" } }, usesInheritance: true, ngImport: i0, template: ` <span contenteditable="false" class="the-break-char">{{ inlineChromiumBugfix }}</span>
|
|
8041
8150
|
<span><slate-children [children]="children" [context]="childrenContext" [viewContext]="viewContext"></slate-children></span>
|
|
8042
8151
|
<span contenteditable="false" class="the-break-char">{{ inlineChromiumBugfix }}</span>`, isInline: true, dependencies: [{ kind: "component", type: i1.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }] });
|
|
8043
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.
|
|
8152
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheLinkComponent, decorators: [{
|
|
8044
8153
|
type: Component,
|
|
8045
8154
|
args: [{
|
|
8046
8155
|
selector: 'a[theLink]',
|
|
@@ -8687,7 +8796,7 @@ class TheNumberedListComponent extends TheBaseElementComponent {
|
|
|
8687
8796
|
return this.element.start;
|
|
8688
8797
|
}
|
|
8689
8798
|
get level() {
|
|
8690
|
-
return this.element?.indent;
|
|
8799
|
+
return this.element?.indent || null;
|
|
8691
8800
|
}
|
|
8692
8801
|
ngOnInit() {
|
|
8693
8802
|
super.ngOnInit();
|
|
@@ -8696,9 +8805,9 @@ class TheNumberedListComponent extends TheBaseElementComponent {
|
|
|
8696
8805
|
super.ngOnDestroy();
|
|
8697
8806
|
}
|
|
8698
8807
|
}
|
|
8699
|
-
TheNumberedListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.
|
|
8700
|
-
TheNumberedListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.
|
|
8701
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.
|
|
8808
|
+
TheNumberedListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheNumberedListComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
8809
|
+
TheNumberedListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: TheNumberedListComponent, selector: "ol[theOl]", host: { properties: { "attr.start": "this.start", "attr.the-level": "this.level" } }, usesInheritance: true, ngImport: i0, template: `<slate-children [children]="children" [context]="childrenContext" [viewContext]="viewContext"></slate-children>`, isInline: true, dependencies: [{ kind: "component", type: i1.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }] });
|
|
8810
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheNumberedListComponent, decorators: [{
|
|
8702
8811
|
type: Component,
|
|
8703
8812
|
args: [{
|
|
8704
8813
|
selector: 'ol[theOl]',
|
|
@@ -8719,7 +8828,7 @@ class TheBulletedListComponent extends TheBaseElementComponent {
|
|
|
8719
8828
|
this.cdr = cdr;
|
|
8720
8829
|
}
|
|
8721
8830
|
get level() {
|
|
8722
|
-
return this.element?.indent;
|
|
8831
|
+
return this.element?.indent || null;
|
|
8723
8832
|
}
|
|
8724
8833
|
ngOnInit() {
|
|
8725
8834
|
super.ngOnInit();
|
|
@@ -8728,9 +8837,9 @@ class TheBulletedListComponent extends TheBaseElementComponent {
|
|
|
8728
8837
|
super.ngOnDestroy();
|
|
8729
8838
|
}
|
|
8730
8839
|
}
|
|
8731
|
-
TheBulletedListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.
|
|
8732
|
-
TheBulletedListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.
|
|
8733
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.
|
|
8840
|
+
TheBulletedListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheBulletedListComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
8841
|
+
TheBulletedListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: TheBulletedListComponent, selector: "ul[theUl]", host: { properties: { "attr.the-level": "this.level" } }, usesInheritance: true, ngImport: i0, template: `<slate-children [children]="children" [context]="childrenContext" [viewContext]="viewContext"></slate-children>`, isInline: true, dependencies: [{ kind: "component", type: i1.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }] });
|
|
8842
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheBulletedListComponent, decorators: [{
|
|
8734
8843
|
type: Component,
|
|
8735
8844
|
args: [{
|
|
8736
8845
|
selector: 'ul[theUl]',
|
|
@@ -8817,9 +8926,9 @@ class TheListItemComponent extends TheBaseElementComponent {
|
|
|
8817
8926
|
}
|
|
8818
8927
|
}
|
|
8819
8928
|
}
|
|
8820
|
-
TheListItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.
|
|
8821
|
-
TheListItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.
|
|
8822
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.
|
|
8929
|
+
TheListItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheListItemComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
8930
|
+
TheListItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: TheListItemComponent, selector: "li[theLi]", usesInheritance: true, ngImport: i0, template: `<slate-children [children]="children" [context]="childrenContext" [viewContext]="viewContext"></slate-children>`, isInline: true, dependencies: [{ kind: "component", type: i1.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }] });
|
|
8931
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheListItemComponent, decorators: [{
|
|
8823
8932
|
type: Component,
|
|
8824
8933
|
args: [{
|
|
8825
8934
|
selector: 'li[theLi]',
|
|
@@ -9749,9 +9858,9 @@ class TheBaseSuggestion {
|
|
|
9749
9858
|
event.preventDefault();
|
|
9750
9859
|
}
|
|
9751
9860
|
}
|
|
9752
|
-
TheBaseSuggestion.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.
|
|
9753
|
-
TheBaseSuggestion.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.
|
|
9754
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.
|
|
9861
|
+
TheBaseSuggestion.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheBaseSuggestion, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
9862
|
+
TheBaseSuggestion.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.0", type: TheBaseSuggestion, inputs: { editor: "editor", type: "type", keywords: "keywords" }, host: { listeners: { "mousedown": "handleMousedown($event)" } }, ngImport: i0 });
|
|
9863
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheBaseSuggestion, decorators: [{
|
|
9755
9864
|
type: Directive
|
|
9756
9865
|
}], propDecorators: { editor: [{
|
|
9757
9866
|
type: Input
|
|
@@ -9822,9 +9931,9 @@ class TheVerticalToolbarItemComponent extends TheBaseToolbarDropdown {
|
|
|
9822
9931
|
}
|
|
9823
9932
|
}
|
|
9824
9933
|
}
|
|
9825
|
-
TheVerticalToolbarItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.
|
|
9826
|
-
TheVerticalToolbarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.
|
|
9827
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.
|
|
9934
|
+
TheVerticalToolbarItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheVerticalToolbarItemComponent, deps: [{ token: i0.ElementRef }, { token: i1$1.ThyPopover }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
9935
|
+
TheVerticalToolbarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: TheVerticalToolbarItemComponent, selector: "the-toolbar-vertical-align-item", host: { listeners: { "document: mousedown": "handleDocumentMouseDown($event)" }, properties: { "class.hide": "!active" }, classAttribute: "the-toolbar-dropdown-container verticalAlign" }, viewQueries: [{ propertyName: "template", first: true, predicate: ["VerticalAlignItems"], descendants: true, read: TemplateRef, static: true }], usesInheritance: true, ngImport: i0, template: "<a\n href=\"javascript:;\"\n class=\"icon-mode link-with-down\"\n thyAction\n [thyActionIcon]=\"activeMenuItem?.icon\"\n [thyActionActive]=\"isOpened\"\n [thyTooltip]=\"toolbarItem?.name\"\n thyTooltipPlacement=\"top\"\n (mousedown)=\"execute($event)\"\n>\n <thy-icon class=\"font-size-sm text-desc ml-1\" thyIconName=\"caret-down\"></thy-icon>\n</a>\n\n<ng-template #VerticalAlignItems>\n <div class=\"thy-dropdown-menu\">\n <ng-container *ngFor=\"let menu of toolbarItem?.includes\">\n <a\n href=\"javascript:;\"\n thyDropdownMenuItem\n [thyDropdownMenuItemActive]=\"menu.key === activeMenuItem?.key\"\n (mousedown)=\"itemMousedown($event, menu)\"\n >\n <thy-icon *ngIf=\"menu.icon\" thyDropdownMenuItemIcon [thyIconName]=\"menu?.icon\"></thy-icon>\n <span thyDropdownMenuItemName>{{ menu.name }}</span>\n </a>\n </ng-container>\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: "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.ThyActionComponent, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }, { 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.ThyDropdownMenuItemActiveDirective, selector: "[thyDropdownMenuItemActive]", inputs: ["thyDropdownMenuItemActive"] }] });
|
|
9936
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheVerticalToolbarItemComponent, decorators: [{
|
|
9828
9937
|
type: Component,
|
|
9829
9938
|
args: [{ selector: 'the-toolbar-vertical-align-item', host: {
|
|
9830
9939
|
class: 'the-toolbar-dropdown-container verticalAlign',
|
|
@@ -9917,9 +10026,9 @@ class TheTableSelectComponent {
|
|
|
9917
10026
|
}
|
|
9918
10027
|
}
|
|
9919
10028
|
}
|
|
9920
|
-
TheTableSelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.
|
|
9921
|
-
TheTableSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.
|
|
9922
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.
|
|
10029
|
+
TheTableSelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheTableSelectComponent, deps: [{ token: i1$1.ThyPopoverRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
10030
|
+
TheTableSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: TheTableSelectComponent, selector: "table-select", inputs: { optionsParam: "optionsParam", editor: "editor", beforeInsert: "beforeInsert" }, ngImport: i0, template: "<div class=\"table-selector-container\">\n <div *ngFor=\"let item of tableData; let rowIndex = index\" class=\"selector-row\" (mousedown)=\"executeTable($event)\">\n <span\n *ngFor=\"let item of tableData; let colIndex = index\"\n [ngClass]=\"{ 'active-cell': rowIndex <= maxRowIndex && colIndex <= maxColIndex, 'selector-cell': true }\"\n (mouseenter)=\"onSelectCells(rowIndex, colIndex)\"\n >\n </span>\n </div>\n <span class=\"selector-text\">{{ maxRowIndex + 1 }} x {{ maxColIndex + 1 }}</span>\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"] }] });
|
|
10031
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheTableSelectComponent, decorators: [{
|
|
9923
10032
|
type: Component,
|
|
9924
10033
|
args: [{ selector: 'table-select', template: "<div class=\"table-selector-container\">\n <div *ngFor=\"let item of tableData; let rowIndex = index\" class=\"selector-row\" (mousedown)=\"executeTable($event)\">\n <span\n *ngFor=\"let item of tableData; let colIndex = index\"\n [ngClass]=\"{ 'active-cell': rowIndex <= maxRowIndex && colIndex <= maxColIndex, 'selector-cell': true }\"\n (mouseenter)=\"onSelectCells(rowIndex, colIndex)\"\n >\n </span>\n </div>\n <span class=\"selector-text\">{{ maxRowIndex + 1 }} x {{ maxColIndex + 1 }}</span>\n</div>\n" }]
|
|
9925
10034
|
}], ctorParameters: function () { return [{ type: i1$1.ThyPopoverRef }]; }, propDecorators: { optionsParam: [{
|
|
@@ -9972,14 +10081,14 @@ class TheListboxOptionDirective {
|
|
|
9972
10081
|
return this._active;
|
|
9973
10082
|
}
|
|
9974
10083
|
}
|
|
9975
|
-
TheListboxOptionDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.
|
|
9976
|
-
TheListboxOptionDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.
|
|
10084
|
+
TheListboxOptionDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheListboxOptionDirective, deps: [{ token: THE_LISTBOX_PARENT_OPTION_TOKEN, optional: true, skipSelf: true }, { token: THE_LISTBOX_PARENT_GROUP_TOKEN }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
10085
|
+
TheListboxOptionDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.0", type: TheListboxOptionDirective, selector: "[theListboxOption]", inputs: { theOptionValue: "theOptionValue", theOptionDisabled: "theOptionDisabled" }, host: { properties: { "class": "this.className" } }, providers: [
|
|
9977
10086
|
{
|
|
9978
10087
|
provide: THE_LISTBOX_PARENT_OPTION_TOKEN,
|
|
9979
10088
|
useExisting: TheListboxOptionDirective
|
|
9980
10089
|
}
|
|
9981
10090
|
], queries: [{ propertyName: "_options", predicate: TheListboxOptionDirective, descendants: true }], exportAs: ["theListboxOption"], ngImport: i0 });
|
|
9982
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.
|
|
10091
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheListboxOptionDirective, decorators: [{
|
|
9983
10092
|
type: Directive,
|
|
9984
10093
|
args: [{
|
|
9985
10094
|
selector: '[theListboxOption]',
|
|
@@ -10055,14 +10164,14 @@ class TheListboxGroupDirective {
|
|
|
10055
10164
|
return this.options[this.options.length - 1];
|
|
10056
10165
|
}
|
|
10057
10166
|
}
|
|
10058
|
-
TheListboxGroupDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.
|
|
10059
|
-
TheListboxGroupDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.
|
|
10167
|
+
TheListboxGroupDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheListboxGroupDirective, deps: [{ token: THE_LISTBOX_PARENT_OPTION_TOKEN, optional: true, skipSelf: true }, { token: THE_LISTBOX_TOKEN }], target: i0.ɵɵFactoryTarget.Directive });
|
|
10168
|
+
TheListboxGroupDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.0", type: TheListboxGroupDirective, selector: "[theListboxGroup]", inputs: { horizontalColumn: "horizontalColumn" }, host: { properties: { "class": "this.className" } }, providers: [
|
|
10060
10169
|
{
|
|
10061
10170
|
provide: THE_LISTBOX_PARENT_GROUP_TOKEN,
|
|
10062
10171
|
useExisting: TheListboxGroupDirective
|
|
10063
10172
|
}
|
|
10064
10173
|
], queries: [{ propertyName: "_options", predicate: TheListboxOptionDirective, descendants: true }], exportAs: ["theListboxGroup"], ngImport: i0 });
|
|
10065
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.
|
|
10174
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheListboxGroupDirective, decorators: [{
|
|
10066
10175
|
type: Directive,
|
|
10067
10176
|
args: [{
|
|
10068
10177
|
selector: '[theListboxGroup]',
|
|
@@ -10266,14 +10375,14 @@ class TheListboxDirective {
|
|
|
10266
10375
|
this._keyboardSubscription.unsubscribe();
|
|
10267
10376
|
}
|
|
10268
10377
|
}
|
|
10269
|
-
TheListboxDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.
|
|
10270
|
-
TheListboxDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.
|
|
10378
|
+
TheListboxDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheListboxDirective, deps: [{ token: i0.NgZone }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
10379
|
+
TheListboxDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.0", type: TheListboxDirective, selector: "[theListBox]", inputs: { keyboardContainer: "keyboardContainer", autoActiveFirstItem: "autoActiveFirstItem" }, outputs: { theListboxChange: "theListboxChange" }, host: { properties: { "class": "this.className" } }, providers: [
|
|
10271
10380
|
{
|
|
10272
10381
|
provide: THE_LISTBOX_TOKEN,
|
|
10273
10382
|
useExisting: TheListboxDirective
|
|
10274
10383
|
}
|
|
10275
10384
|
], queries: [{ propertyName: "_groups", predicate: TheListboxGroupDirective, descendants: true }, { propertyName: "_options", predicate: TheListboxOptionDirective, descendants: true }], exportAs: ["theListBox"], ngImport: i0 });
|
|
10276
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.
|
|
10385
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheListboxDirective, decorators: [{
|
|
10277
10386
|
type: Directive,
|
|
10278
10387
|
args: [{
|
|
10279
10388
|
selector: '[theListBox]',
|
|
@@ -10450,9 +10559,9 @@ class ThePluginMenuComponent extends mixinUnsubscribe(MixinBase) {
|
|
|
10450
10559
|
super.ngOnDestroy();
|
|
10451
10560
|
}
|
|
10452
10561
|
}
|
|
10453
|
-
ThePluginMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.
|
|
10454
|
-
ThePluginMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", 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: i3.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$1.ThyInputSearchComponent, selector: "thy-input-search", inputs: ["name", "placeholder", "thyTheme", "thySearchFocus", "thyIconPosition", "thySize"], outputs: ["clear", "thyClear"] }, { kind: "component", type: i5.ThyActionComponent, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }, { kind: "component", type: i12.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"], 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$1.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"] }] });
|
|
10455
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.
|
|
10562
|
+
ThePluginMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ThePluginMenuComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: i1$1.ThyPopoverRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
10563
|
+
ThePluginMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: ThePluginMenuComponent, selector: "the-plugin-menu", inputs: { editor: "editor", theDisplaySearch: "theDisplaySearch", thePluginMenu: "thePluginMenu" }, host: { properties: { "class": "this.containerClassName" } }, viewQueries: [{ propertyName: "dropdownTriggers", predicate: ["dropdownTriggers"], descendants: true, read: ThyDropdownDirective }], usesInheritance: true, ngImport: i0, template: "<div *ngIf=\"theDisplaySearch\" class=\"menu-search px-5 pt-5 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$1.ThyInputSearchComponent, selector: "thy-input-search", inputs: ["name", "placeholder", "thyTheme", "thySearchFocus", "thyIconPosition", "thySize"], outputs: ["clear", "thyClear"] }, { kind: "component", type: i5.ThyActionComponent, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }, { kind: "component", type: i12.ThyDividerComponent, selector: "thy-divider", inputs: ["thyVertical", "thyStyle", "thyColor", "thyText", "thyTextDirection", "thyDeeper"] }, { kind: "directive", type: i6.ThyDropdownDirective, selector: "[thyDropdown]", inputs: ["thyDropdownMenu", "thyDropdown", "thyTrigger", "thyActiveClass", "thyPopoverOptions"], 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$1.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"] }] });
|
|
10564
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ThePluginMenuComponent, decorators: [{
|
|
10456
10565
|
type: Component,
|
|
10457
10566
|
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" }]
|
|
10458
10567
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }, { type: i1$1.ThyPopoverRef }]; }, propDecorators: { dropdownTriggers: [{
|
|
@@ -10658,6 +10767,125 @@ const createSoftBreakPlugin = createPluginFactory({
|
|
|
10658
10767
|
}
|
|
10659
10768
|
});
|
|
10660
10769
|
|
|
10770
|
+
const SLA_TABLE_SELECTOR = '.slate-element-table';
|
|
10771
|
+
const SLA_TABLE_CELL_SELECTOR = '.slate-element-table-cell';
|
|
10772
|
+
|
|
10773
|
+
class TheToolbarGroupComponent {
|
|
10774
|
+
constructor(elementRef, thyPopover, viewContainerRef) {
|
|
10775
|
+
this.elementRef = elementRef;
|
|
10776
|
+
this.thyPopover = thyPopover;
|
|
10777
|
+
this.viewContainerRef = viewContainerRef;
|
|
10778
|
+
this.className = 'the-toolbar-group';
|
|
10779
|
+
this.active = false;
|
|
10780
|
+
}
|
|
10781
|
+
set item(i) {
|
|
10782
|
+
this._item = i;
|
|
10783
|
+
this.activeMenuItem = i;
|
|
10784
|
+
}
|
|
10785
|
+
get item() {
|
|
10786
|
+
return this._item;
|
|
10787
|
+
}
|
|
10788
|
+
get isOpened() {
|
|
10789
|
+
return this.groupPopoverRef && this.groupPopoverRef.getOverlayRef() && this.groupPopoverRef.getOverlayRef().hasAttached();
|
|
10790
|
+
}
|
|
10791
|
+
mousedownHandler(event) {
|
|
10792
|
+
event.preventDefault();
|
|
10793
|
+
this.toggleGroupMenus(event);
|
|
10794
|
+
}
|
|
10795
|
+
documentMouseupHandle(event) {
|
|
10796
|
+
const isGroup = event.target.closest('.the-toolbar-group');
|
|
10797
|
+
const isGroupContainer = event.target.closest('.the-toolbar-group-container');
|
|
10798
|
+
if (!isGroupContainer && !isGroup && this.isOpened) {
|
|
10799
|
+
this.closeGroup();
|
|
10800
|
+
}
|
|
10801
|
+
}
|
|
10802
|
+
clickHandle(event) {
|
|
10803
|
+
event.stopPropagation();
|
|
10804
|
+
}
|
|
10805
|
+
ngOnInit() { }
|
|
10806
|
+
ngOnDestroy() {
|
|
10807
|
+
this.closeGroup();
|
|
10808
|
+
}
|
|
10809
|
+
toggleGroupMenus(event) {
|
|
10810
|
+
if (this.editor?.disabled) {
|
|
10811
|
+
return;
|
|
10812
|
+
}
|
|
10813
|
+
if (this.isOpened) {
|
|
10814
|
+
this.closeGroup();
|
|
10815
|
+
}
|
|
10816
|
+
else {
|
|
10817
|
+
this.openGroup(event);
|
|
10818
|
+
}
|
|
10819
|
+
}
|
|
10820
|
+
selectionChange(editor) {
|
|
10821
|
+
const activeItem = this.menusActive(editor);
|
|
10822
|
+
this.activeMenuItem = activeItem ? activeItem : null;
|
|
10823
|
+
this.activeChange();
|
|
10824
|
+
}
|
|
10825
|
+
menusActive(editor) {
|
|
10826
|
+
return this.menus.find(i => {
|
|
10827
|
+
if (this.editor?.selection && i?.active) {
|
|
10828
|
+
return i?.active(editor);
|
|
10829
|
+
}
|
|
10830
|
+
});
|
|
10831
|
+
}
|
|
10832
|
+
activeChange() {
|
|
10833
|
+
const activeItem = this.menusActive(this.editor);
|
|
10834
|
+
if (this.isOpened && !activeItem) {
|
|
10835
|
+
this.active = false;
|
|
10836
|
+
return;
|
|
10837
|
+
}
|
|
10838
|
+
this.active = activeItem ? true : false;
|
|
10839
|
+
}
|
|
10840
|
+
openGroup(event) {
|
|
10841
|
+
this.active = true;
|
|
10842
|
+
this.groupPopoverRef = this.thyPopover.open(this.groupTemplate, {
|
|
10843
|
+
panelClass: 'the-toolbar-group-container',
|
|
10844
|
+
offset: 0,
|
|
10845
|
+
minWidth: 0,
|
|
10846
|
+
placement: 'bottomRight',
|
|
10847
|
+
origin: event.currentTarget,
|
|
10848
|
+
viewContainerRef: this.viewContainerRef,
|
|
10849
|
+
hasBackdrop: false,
|
|
10850
|
+
outsideClosable: true,
|
|
10851
|
+
manualClosure: true
|
|
10852
|
+
});
|
|
10853
|
+
this.groupPopoverRef.afterClosed().subscribe(() => {
|
|
10854
|
+
this.activeChange();
|
|
10855
|
+
});
|
|
10856
|
+
}
|
|
10857
|
+
closeGroup() {
|
|
10858
|
+
if (this.isOpened) {
|
|
10859
|
+
this.groupPopoverRef.close();
|
|
10860
|
+
}
|
|
10861
|
+
}
|
|
10862
|
+
}
|
|
10863
|
+
TheToolbarGroupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheToolbarGroupComponent, deps: [{ token: i0.ElementRef }, { token: i1$1.ThyPopover }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
10864
|
+
TheToolbarGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: TheToolbarGroupComponent, selector: "the-toolbar-group", inputs: { menus: "menus", item: "item" }, host: { listeners: { "mousedown": "mousedownHandler($event)", "document:mouseup": "documentMouseupHandle($event)", "click": "clickHandle($event)" }, properties: { "class": "this.className" } }, viewQueries: [{ propertyName: "groupTemplate", first: true, predicate: ["groupTemplate"], descendants: true, read: TemplateRef, static: true }], ngImport: i0, template: "<a\n href=\"javascript:;\"\n thyAction\n [thyActionIcon]=\"item.icon\"\n [thyActionActive]=\"active\"\n [thyTooltip]=\"item?.name\"\n thyTooltipPlacement=\"top\"\n></a>\n\n<ng-template #groupTemplate>\n <the-toolbar class=\"group\" [editor]=\"editor\" [toolbarItems]=\"menus\" [isMore]=\"false\"></the-toolbar>\n</ng-template>\n", dependencies: [{ 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.ThyActionComponent, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }, { kind: "component", type: TheToolbarComponent, selector: "the-toolbar", inputs: ["editor", "toolbarItems", "align", "containerClass", "isMore", "afterTemplate"] }] });
|
|
10865
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheToolbarGroupComponent, decorators: [{
|
|
10866
|
+
type: Component,
|
|
10867
|
+
args: [{ selector: 'the-toolbar-group', template: "<a\n href=\"javascript:;\"\n thyAction\n [thyActionIcon]=\"item.icon\"\n [thyActionActive]=\"active\"\n [thyTooltip]=\"item?.name\"\n thyTooltipPlacement=\"top\"\n></a>\n\n<ng-template #groupTemplate>\n <the-toolbar class=\"group\" [editor]=\"editor\" [toolbarItems]=\"menus\" [isMore]=\"false\"></the-toolbar>\n</ng-template>\n" }]
|
|
10868
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1$1.ThyPopover }, { type: i0.ViewContainerRef }]; }, propDecorators: { className: [{
|
|
10869
|
+
type: HostBinding,
|
|
10870
|
+
args: ['class']
|
|
10871
|
+
}], menus: [{
|
|
10872
|
+
type: Input
|
|
10873
|
+
}], item: [{
|
|
10874
|
+
type: Input
|
|
10875
|
+
}], groupTemplate: [{
|
|
10876
|
+
type: ViewChild,
|
|
10877
|
+
args: ['groupTemplate', { read: TemplateRef, static: true }]
|
|
10878
|
+
}], mousedownHandler: [{
|
|
10879
|
+
type: HostListener,
|
|
10880
|
+
args: ['mousedown', ['$event']]
|
|
10881
|
+
}], documentMouseupHandle: [{
|
|
10882
|
+
type: HostListener,
|
|
10883
|
+
args: ['document:mouseup', ['$event']]
|
|
10884
|
+
}], clickHandle: [{
|
|
10885
|
+
type: HostListener,
|
|
10886
|
+
args: ['click', ['$event']]
|
|
10887
|
+
}] } });
|
|
10888
|
+
|
|
10661
10889
|
/**
|
|
10662
10890
|
* @license
|
|
10663
10891
|
* Copyright Google LLC All Rights Reserved.
|
|
@@ -10680,9 +10908,9 @@ class ColumnResizeNotifierSource {
|
|
|
10680
10908
|
this.triggerResize = new Subject();
|
|
10681
10909
|
}
|
|
10682
10910
|
}
|
|
10683
|
-
ColumnResizeNotifierSource.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.
|
|
10684
|
-
ColumnResizeNotifierSource.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.
|
|
10685
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.
|
|
10911
|
+
ColumnResizeNotifierSource.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ColumnResizeNotifierSource, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
10912
|
+
ColumnResizeNotifierSource.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ColumnResizeNotifierSource });
|
|
10913
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ColumnResizeNotifierSource, decorators: [{
|
|
10686
10914
|
type: Injectable
|
|
10687
10915
|
}] });
|
|
10688
10916
|
|
|
@@ -10732,12 +10960,40 @@ class TableCellEventDispatcher {
|
|
|
10732
10960
|
}));
|
|
10733
10961
|
}
|
|
10734
10962
|
}
|
|
10735
|
-
TableCellEventDispatcher.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.
|
|
10736
|
-
TableCellEventDispatcher.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.
|
|
10737
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.
|
|
10963
|
+
TableCellEventDispatcher.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TableCellEventDispatcher, deps: [{ token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
10964
|
+
TableCellEventDispatcher.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TableCellEventDispatcher });
|
|
10965
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TableCellEventDispatcher, decorators: [{
|
|
10738
10966
|
type: Injectable
|
|
10739
10967
|
}], ctorParameters: function () { return [{ type: i0.NgZone }]; } });
|
|
10740
10968
|
|
|
10969
|
+
function splitCell(editor) {
|
|
10970
|
+
const opts = new TableOptions();
|
|
10971
|
+
const { anchor } = editor.selection;
|
|
10972
|
+
const tablePosition = TablePosition.create(opts, editor, anchor.path);
|
|
10973
|
+
const { cell, table, cellEntry } = tablePosition;
|
|
10974
|
+
if ((!cell.rowspan && !cell.colspan) || (cell.rowspan === 1 && cell.colspan === 1))
|
|
10975
|
+
return editor;
|
|
10976
|
+
const cellRow = tablePosition.getRowIndex();
|
|
10977
|
+
const cellCol = tablePosition.getColumnIndex();
|
|
10978
|
+
resetTableCell(editor, table, cell, cellRow, cellCol);
|
|
10979
|
+
Transforms.select(editor, cellEntry[1]);
|
|
10980
|
+
Transforms.collapse(editor, { edge: 'end' });
|
|
10981
|
+
}
|
|
10982
|
+
function resetTableCell(editor, table, cell, cellRow, cellCol) {
|
|
10983
|
+
const rowSpanIndex = cellRow + (cell.rowspan || 1) - 1;
|
|
10984
|
+
const colSpanIndex = cellCol + (cell.colspan || 1) - 1;
|
|
10985
|
+
Editor.withoutNormalizing(editor, () => {
|
|
10986
|
+
table.children.map((row, rowIndex) => {
|
|
10987
|
+
row.children.map((col, colIndex) => {
|
|
10988
|
+
if (rowIndex >= cellRow && rowIndex <= rowSpanIndex && colIndex >= cellCol && colIndex <= colSpanIndex) {
|
|
10989
|
+
const path = findPath(editor, col);
|
|
10990
|
+
Transforms.setNodes(editor, { colspan: null, rowspan: null, hidden: null }, { at: path });
|
|
10991
|
+
}
|
|
10992
|
+
});
|
|
10993
|
+
});
|
|
10994
|
+
});
|
|
10995
|
+
}
|
|
10996
|
+
|
|
10741
10997
|
function getSelectCellNode(editor, selectedCells) {
|
|
10742
10998
|
const { anchor } = editor.selection;
|
|
10743
10999
|
const opts = new TableOptions();
|
|
@@ -10840,14 +11096,112 @@ function mergeCellContent(editor, leftTopCellPath, cellPath) {
|
|
|
10840
11096
|
});
|
|
10841
11097
|
}
|
|
10842
11098
|
|
|
10843
|
-
|
|
10844
|
-
|
|
10845
|
-
|
|
10846
|
-
|
|
10847
|
-
|
|
10848
|
-
|
|
10849
|
-
|
|
10850
|
-
|
|
11099
|
+
function setCellMenuVisibility(editor, menuList, tableInfo, isFromControls) {
|
|
11100
|
+
const { selectedCells, isFullscreen, selectedRowsIndex, selectedColumnsIndex } = tableInfo;
|
|
11101
|
+
const isCellMerged = isSelectedCellMerged(editor);
|
|
11102
|
+
const selectCellNodes = getSelectCellNode(editor, selectedCells).filter(item => !item.node.hidden);
|
|
11103
|
+
const isRect = isRectangularInTableCells(selectedCells);
|
|
11104
|
+
menuList.forEach(item => {
|
|
11105
|
+
switch (item.key) {
|
|
11106
|
+
case 'merge-cells':
|
|
11107
|
+
item.visibility = selectCellNodes && selectCellNodes.length > 1 && !isFromControls && isRect;
|
|
11108
|
+
break;
|
|
11109
|
+
case 'split-cells':
|
|
11110
|
+
item.visibility = selectCellNodes && selectCellNodes.length === 1 && isCellMerged && !isFromControls;
|
|
11111
|
+
break;
|
|
11112
|
+
case 'delete-selection-rows':
|
|
11113
|
+
item.visibility = !isFullscreen || !selectedColumnsIndex.length;
|
|
11114
|
+
break;
|
|
11115
|
+
case 'delete-selection-columns':
|
|
11116
|
+
item.visibility = !isFullscreen || !selectedRowsIndex.length;
|
|
11117
|
+
break;
|
|
11118
|
+
case 'delete-table':
|
|
11119
|
+
item.visibility = !isFullscreen;
|
|
11120
|
+
break;
|
|
11121
|
+
case TableInsertType.insertRowsUp:
|
|
11122
|
+
const isHeader = TableEditor.isActiveHeaderRow(editor);
|
|
11123
|
+
item.visibility = !isHeader && isRect;
|
|
11124
|
+
break;
|
|
11125
|
+
case TableInsertType.insertRowsDown:
|
|
11126
|
+
item.visibility = isRect;
|
|
11127
|
+
break;
|
|
11128
|
+
case TableInsertType.insertColumnsLeft:
|
|
11129
|
+
const isHeaderColumn = TableEditor.isActiveHeaderColumn(editor);
|
|
11130
|
+
item.visibility = !isHeaderColumn && isRect;
|
|
11131
|
+
break;
|
|
11132
|
+
case TableInsertType.insertColumnsRight:
|
|
11133
|
+
item.visibility = isRect;
|
|
11134
|
+
break;
|
|
11135
|
+
}
|
|
11136
|
+
});
|
|
11137
|
+
}
|
|
11138
|
+
|
|
11139
|
+
class TheContextMenuComponent {
|
|
11140
|
+
constructor(elementRef, thyPopoverRef) {
|
|
11141
|
+
this.elementRef = elementRef;
|
|
11142
|
+
this.thyPopoverRef = thyPopoverRef;
|
|
11143
|
+
this.menuEntities = [];
|
|
11144
|
+
this.wrap = true;
|
|
11145
|
+
}
|
|
11146
|
+
handleDocumentMouseDown(event) {
|
|
11147
|
+
if (!this.elementRef.nativeElement.contains(event.target) && event.button !== 2) {
|
|
11148
|
+
this.thyPopoverRef.close();
|
|
11149
|
+
}
|
|
11150
|
+
}
|
|
11151
|
+
handleMouseDown(event) {
|
|
11152
|
+
event.preventDefault();
|
|
11153
|
+
event.stopPropagation();
|
|
11154
|
+
}
|
|
11155
|
+
itemMousedown(event, entity) {
|
|
11156
|
+
event.preventDefault();
|
|
11157
|
+
this.actionHandle(entity);
|
|
11158
|
+
this.thyPopoverRef.close();
|
|
11159
|
+
}
|
|
11160
|
+
itemMouseleave(event, entity) {
|
|
11161
|
+
event.preventDefault();
|
|
11162
|
+
this.deactivateHandle(event, entity);
|
|
11163
|
+
}
|
|
11164
|
+
itemMouseenter(event, entity) {
|
|
11165
|
+
event.preventDefault();
|
|
11166
|
+
this.activeHandle(event, entity);
|
|
11167
|
+
}
|
|
11168
|
+
inputNumberFocus(e) {
|
|
11169
|
+
e.target.focus();
|
|
11170
|
+
}
|
|
11171
|
+
ngOnInit() { }
|
|
11172
|
+
}
|
|
11173
|
+
TheContextMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheContextMenuComponent, deps: [{ token: i0.ElementRef }, { token: i1$1.ThyPopoverRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
11174
|
+
TheContextMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", 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 *ngIf=\"item?.backgroundColor; else elseIcon\"\n [thyIconName]=\"item.icon\"\n thyIconType=\"twotone\"\n [thyTwotoneColor]=\"item.backgroundColor\"\n ></thy-icon>\n <ng-template #elseIcon>\n <thy-icon [thyIconName]=\"item.icon\"></thy-icon>\n </ng-template>\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)=\"itemMousedown($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: 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: i5$2.ThyEnterDirective, selector: "[thyEnter]", outputs: ["thyEnter"] }, { kind: "directive", type: i5$2.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.ThyInputNumberComponent, selector: "thy-input-number", inputs: ["thyAutoFocus", "thyPlaceholder", "thyDisabled", "thyMax", "thyMin", "thyStep", "thySize", "thyPrecision", "thySuffix"], outputs: ["thyBlur", "thyFocus"] }] });
|
|
11175
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheContextMenuComponent, decorators: [{
|
|
11176
|
+
type: Component,
|
|
11177
|
+
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 *ngIf=\"item?.backgroundColor; else elseIcon\"\n [thyIconName]=\"item.icon\"\n thyIconType=\"twotone\"\n [thyTwotoneColor]=\"item.backgroundColor\"\n ></thy-icon>\n <ng-template #elseIcon>\n <thy-icon [thyIconName]=\"item.icon\"></thy-icon>\n </ng-template>\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)=\"itemMousedown($event, item)\"\n thyStopPropagation\n ></thy-input-number>\n {{ item.nameSuffix }}\n </span>\n </a>\n</ng-template>\n" }]
|
|
11178
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1$1.ThyPopoverRef }]; }, propDecorators: { menuEntities: [{
|
|
11179
|
+
type: Input
|
|
11180
|
+
}], actionHandle: [{
|
|
11181
|
+
type: Input
|
|
11182
|
+
}], activeHandle: [{
|
|
11183
|
+
type: Input
|
|
11184
|
+
}], deactivateHandle: [{
|
|
11185
|
+
type: Input
|
|
11186
|
+
}], wrap: [{
|
|
11187
|
+
type: HostBinding,
|
|
11188
|
+
args: ['class.the-overlay-menu-wrap']
|
|
11189
|
+
}], handleDocumentMouseDown: [{
|
|
11190
|
+
type: HostListener,
|
|
11191
|
+
args: ['document: mousedown', ['$event']]
|
|
11192
|
+
}], handleMouseDown: [{
|
|
11193
|
+
type: HostListener,
|
|
11194
|
+
args: ['mousedown', ['$event']]
|
|
11195
|
+
}] } });
|
|
11196
|
+
|
|
11197
|
+
class TableStore {
|
|
11198
|
+
constructor() {
|
|
11199
|
+
this.selectedCells$ = new BehaviorSubject([]);
|
|
11200
|
+
this.dangerousCells$ = new BehaviorSubject([]);
|
|
11201
|
+
this.cellsChangeObject$ = new Subject();
|
|
11202
|
+
this.tableChange$ = new Subject();
|
|
11203
|
+
this.selectedColumnsIndex = [];
|
|
11204
|
+
this.selectedRowsIndex = [];
|
|
10851
11205
|
this.dangerousColumnsIndex = [];
|
|
10852
11206
|
this.dangerousRowsIndex = [];
|
|
10853
11207
|
this.isPrepareSelecting = false;
|
|
@@ -10905,6 +11259,21 @@ class TableStore {
|
|
|
10905
11259
|
initEditor(editor) {
|
|
10906
11260
|
this.editor = editor;
|
|
10907
11261
|
}
|
|
11262
|
+
/**
|
|
11263
|
+
* 多选模式下需要合并数据
|
|
11264
|
+
* @param cells SelectedCell[]
|
|
11265
|
+
* @returns
|
|
11266
|
+
*/
|
|
11267
|
+
buildModCells(cells) {
|
|
11268
|
+
let result = [];
|
|
11269
|
+
if (this.isModSelecting) {
|
|
11270
|
+
const modCells = new Set();
|
|
11271
|
+
cells.concat(this.selectedCells).forEach(cell => modCells.add(JSON.stringify(cell)));
|
|
11272
|
+
modCells.forEach((cell) => result.push(JSON.parse(cell)));
|
|
11273
|
+
return result.sort((a, b) => a.row - b.row);
|
|
11274
|
+
}
|
|
11275
|
+
return cells;
|
|
11276
|
+
}
|
|
10908
11277
|
selectRow(editor, index) {
|
|
10909
11278
|
this.selectedRowsIndex = [index];
|
|
10910
11279
|
this.selectedColumnsIndex = [];
|
|
@@ -10919,7 +11288,7 @@ class TableStore {
|
|
|
10919
11288
|
col: i
|
|
10920
11289
|
});
|
|
10921
11290
|
}
|
|
10922
|
-
this.setSelectedCells(result, pos);
|
|
11291
|
+
this.setSelectedCells(this.buildModCells(result), pos);
|
|
10923
11292
|
this.focusCell(editor, pos.tableEntry[1].concat([index, 0]));
|
|
10924
11293
|
}
|
|
10925
11294
|
selectColumn(editor, index) {
|
|
@@ -10936,7 +11305,7 @@ class TableStore {
|
|
|
10936
11305
|
col: index
|
|
10937
11306
|
});
|
|
10938
11307
|
}
|
|
10939
|
-
this.setSelectedCells(result, pos);
|
|
11308
|
+
this.setSelectedCells(this.buildModCells(result), pos);
|
|
10940
11309
|
this.focusCell(editor, pos.tableEntry[1].concat([0, index]));
|
|
10941
11310
|
}
|
|
10942
11311
|
selectTable(editor) {
|
|
@@ -10958,6 +11327,7 @@ class TableStore {
|
|
|
10958
11327
|
}
|
|
10959
11328
|
return { cells: result, pos };
|
|
10960
11329
|
}
|
|
11330
|
+
// 拖选
|
|
10961
11331
|
selectCells(editor) {
|
|
10962
11332
|
const opts = new TableOptions();
|
|
10963
11333
|
const { anchor, focus } = editor.selection;
|
|
@@ -10984,7 +11354,7 @@ class TableStore {
|
|
|
10984
11354
|
});
|
|
10985
11355
|
}
|
|
10986
11356
|
}
|
|
10987
|
-
this.setSelectedCells(result, pos);
|
|
11357
|
+
this.setSelectedCells(this.buildModCells(result), pos);
|
|
10988
11358
|
}
|
|
10989
11359
|
getMinAndMaxCellIndex(maxRow, maxCol, minRow, minCol, table) {
|
|
10990
11360
|
const beforeCols = [];
|
|
@@ -11051,9 +11421,12 @@ class TableStore {
|
|
|
11051
11421
|
}
|
|
11052
11422
|
// 选择单元格
|
|
11053
11423
|
selectCell(cell, editor) {
|
|
11424
|
+
// todo:处理表格失焦时不选中
|
|
11054
11425
|
if (!editor.selection) {
|
|
11055
11426
|
return;
|
|
11056
11427
|
}
|
|
11428
|
+
// 已聚焦的单元格在多选模式下选中(暂存上次聚焦的单元格)
|
|
11429
|
+
const focusCell = this.lastFocusCellPath.slice(-2);
|
|
11057
11430
|
const node = AngularEditor.toSlateNode(editor, cell);
|
|
11058
11431
|
const path = AngularEditor.findPath(editor, node);
|
|
11059
11432
|
this.anchorCellPath = path;
|
|
@@ -11063,19 +11436,14 @@ class TableStore {
|
|
|
11063
11436
|
const opts = new TableOptions();
|
|
11064
11437
|
const { anchor } = editor.selection;
|
|
11065
11438
|
const pos = TablePosition.create(opts, editor, anchor.path);
|
|
11439
|
+
let result = [];
|
|
11066
11440
|
if (this.isModSelecting) {
|
|
11067
|
-
|
|
11068
|
-
if (this.selectedCells.find(cell => cell.col === col && cell.row === row)) {
|
|
11069
|
-
newCells = this.selectedCells.filter(cell => cell.col !== col || cell.row !== row);
|
|
11070
|
-
}
|
|
11071
|
-
else {
|
|
11072
|
-
newCells = [...this.selectedCells, { row, col }];
|
|
11073
|
-
}
|
|
11074
|
-
this.selectedCells$.next(newCells);
|
|
11441
|
+
result = [...this.selectedCells, { row: focusCell[0], col: focusCell[1] }, { row, col }];
|
|
11075
11442
|
}
|
|
11076
11443
|
else {
|
|
11077
|
-
|
|
11444
|
+
result = [{ row, col }];
|
|
11078
11445
|
}
|
|
11446
|
+
this.setSelectedCells(this.buildModCells(result), pos);
|
|
11079
11447
|
}
|
|
11080
11448
|
selectedCellsChange() {
|
|
11081
11449
|
return this.selectedCells$.asObservable().pipe(skip(1));
|
|
@@ -11106,7 +11474,7 @@ class TableStore {
|
|
|
11106
11474
|
const node = AngularEditor.toSlateNode(editor, cell);
|
|
11107
11475
|
const path = AngularEditor.findPath(editor, node);
|
|
11108
11476
|
this.anchorCellPath = path;
|
|
11109
|
-
this.
|
|
11477
|
+
this.lastFocusCellPath = path;
|
|
11110
11478
|
if (!this.preFocusCellPath) {
|
|
11111
11479
|
this.preFocusCellPath = this.anchorCellPath;
|
|
11112
11480
|
}
|
|
@@ -11299,7 +11667,6 @@ class TableStore {
|
|
|
11299
11667
|
}
|
|
11300
11668
|
removeColumnOrRows() {
|
|
11301
11669
|
const { selectedRowsIndex, selectedColumnsIndex, isSelectedTable } = this;
|
|
11302
|
-
const tablePluginOptions = getPluginOptions(this.editor, PluginKeys.table);
|
|
11303
11670
|
const pos = this.createTablePosition();
|
|
11304
11671
|
if (isSelectedTable) {
|
|
11305
11672
|
TableEditor.removeTable(this.editor);
|
|
@@ -11310,6 +11677,9 @@ class TableStore {
|
|
|
11310
11677
|
.sort((a, b) => b - a)
|
|
11311
11678
|
.forEach(index => {
|
|
11312
11679
|
TableEditor.removeRow(this.editor, index);
|
|
11680
|
+
if (index === 0) {
|
|
11681
|
+
// 删除行时取消标题行
|
|
11682
|
+
}
|
|
11313
11683
|
});
|
|
11314
11684
|
this.changeCells();
|
|
11315
11685
|
}
|
|
@@ -11329,387 +11699,109 @@ class TableStore {
|
|
|
11329
11699
|
}
|
|
11330
11700
|
}
|
|
11331
11701
|
}
|
|
11332
|
-
TableStore.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.
|
|
11333
|
-
TableStore.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.
|
|
11334
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.
|
|
11702
|
+
TableStore.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TableStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
11703
|
+
TableStore.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TableStore });
|
|
11704
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TableStore, decorators: [{
|
|
11335
11705
|
type: Injectable
|
|
11336
11706
|
}], ctorParameters: function () { return []; } });
|
|
11337
11707
|
|
|
11338
|
-
|
|
11339
|
-
|
|
11340
|
-
const { anchor } = editor.selection;
|
|
11341
|
-
const tablePosition = TablePosition.create(opts, editor, anchor.path);
|
|
11342
|
-
const { cell, table, cellEntry } = tablePosition;
|
|
11343
|
-
if ((!cell.rowspan && !cell.colspan) || (cell.rowspan === 1 && cell.colspan === 1))
|
|
11344
|
-
return editor;
|
|
11345
|
-
const cellRow = tablePosition.getRowIndex();
|
|
11346
|
-
const cellCol = tablePosition.getColumnIndex();
|
|
11347
|
-
resetTableCell(editor, table, cell, cellRow, cellCol);
|
|
11348
|
-
Transforms.select(editor, cellEntry[1]);
|
|
11349
|
-
Transforms.collapse(editor, { edge: 'end' });
|
|
11350
|
-
}
|
|
11351
|
-
function resetTableCell(editor, table, cell, cellRow, cellCol) {
|
|
11352
|
-
const rowSpanIndex = cellRow + (cell.rowspan || 1) - 1;
|
|
11353
|
-
const colSpanIndex = cellCol + (cell.colspan || 1) - 1;
|
|
11354
|
-
Editor.withoutNormalizing(editor, () => {
|
|
11355
|
-
table.children.map((row, rowIndex) => {
|
|
11356
|
-
row.children.map((col, colIndex) => {
|
|
11357
|
-
if (rowIndex >= cellRow && rowIndex <= rowSpanIndex && colIndex >= cellCol && colIndex <= colSpanIndex) {
|
|
11358
|
-
const path = findPath(editor, col);
|
|
11359
|
-
Transforms.setNodes(editor, { colspan: null, rowspan: null, hidden: null }, { at: path });
|
|
11360
|
-
}
|
|
11361
|
-
});
|
|
11362
|
-
});
|
|
11363
|
-
});
|
|
11364
|
-
}
|
|
11365
|
-
|
|
11366
|
-
function setCellMenuVisibility(editor, menuList, selectedCells, isFromControls) {
|
|
11367
|
-
const isCellMerged = isSelectedCellMerged(editor);
|
|
11368
|
-
const selectCellNodes = getSelectCellNode(editor, selectedCells).filter(item => !item.node.hidden);
|
|
11369
|
-
menuList.forEach(item => {
|
|
11370
|
-
if (item.key === 'merge-cells') {
|
|
11371
|
-
item.visibility = selectCellNodes && selectCellNodes.length > 1 && !isFromControls;
|
|
11372
|
-
}
|
|
11373
|
-
if (item.key === 'split-cells') {
|
|
11374
|
-
item.visibility = selectCellNodes && selectCellNodes.length === 1 && isCellMerged && !isFromControls;
|
|
11375
|
-
}
|
|
11376
|
-
});
|
|
11377
|
-
}
|
|
11378
|
-
|
|
11379
|
-
class TheTableOptionsComponent {
|
|
11380
|
-
constructor(popoverRef) {
|
|
11381
|
-
this.popoverRef = popoverRef;
|
|
11382
|
-
this.tableDropdownList = [
|
|
11383
|
-
// {
|
|
11384
|
-
// name: '表头行',
|
|
11385
|
-
// key: 'headerRow'
|
|
11386
|
-
// },
|
|
11387
|
-
{
|
|
11388
|
-
name: '表头列',
|
|
11389
|
-
key: 'headerColumn'
|
|
11390
|
-
},
|
|
11391
|
-
{
|
|
11392
|
-
name: '序号列',
|
|
11393
|
-
key: 'numberedColumn'
|
|
11394
|
-
}
|
|
11395
|
-
];
|
|
11396
|
-
}
|
|
11397
|
-
get table() {
|
|
11398
|
-
return this.tableStore && this.tableStore.getTableEntry(this.editor)[0];
|
|
11399
|
-
}
|
|
11400
|
-
ngOnInit() {
|
|
11401
|
-
this.setColumnOptions();
|
|
11402
|
-
}
|
|
11403
|
-
setColumnOptions() {
|
|
11404
|
-
this.tableDropdownList.forEach(item => {
|
|
11405
|
-
item.isActive = (this.table.options && this.table.options[item.key]) || false;
|
|
11406
|
-
});
|
|
11407
|
-
}
|
|
11408
|
-
setTableOptions(event, option) {
|
|
11409
|
-
event.preventDefault();
|
|
11410
|
-
event.stopPropagation();
|
|
11411
|
-
const currentOption = this.tableDropdownList.find(item => item.key === option.key);
|
|
11412
|
-
currentOption.isActive = !option.isActive;
|
|
11413
|
-
const tableOption = {};
|
|
11414
|
-
tableOption[option.key] = currentOption.isActive || null;
|
|
11415
|
-
this.tableStore.setTableOptions(this.editor, {
|
|
11416
|
-
...this.table.options,
|
|
11417
|
-
...tableOption
|
|
11418
|
-
});
|
|
11419
|
-
}
|
|
11420
|
-
}
|
|
11421
|
-
TheTableOptionsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheTableOptionsComponent, deps: [{ token: i1$1.ThyPopoverRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
11422
|
-
TheTableOptionsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: TheTableOptionsComponent, selector: "the-table-options", inputs: { tableStore: "tableStore", editor: "editor" }, ngImport: i0, template: `
|
|
11423
|
-
<div class="thy-dropdown-menu table-drop-menu">
|
|
11424
|
-
<ng-container *ngFor="let option of tableDropdownList">
|
|
11425
|
-
<a thyDropdownMenuItem href="javascript:;" (mousedown)="setTableOptions($event, option)">
|
|
11426
|
-
<span thyDropdownMenuItemName>{{ option.name }}</span>
|
|
11427
|
-
<span *ngIf="option.isActive" thyDropdownMenuItemIcon class="text-primary">
|
|
11428
|
-
<thy-icon thyIconName="check"></thy-icon>
|
|
11429
|
-
</span>
|
|
11430
|
-
</a>
|
|
11431
|
-
</ng-container>
|
|
11432
|
-
</div>
|
|
11433
|
-
`, isInline: true, 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: "component", type: i3.ThyIconComponent, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { kind: "directive", type: i6.ThyDropdownMenuItemDirective, selector: "[thyDropdownMenuItem]", inputs: ["thyType", "thyDisabled"] }, { kind: "directive", type: i6.ThyDropdownMenuItemNameDirective, selector: "[thyDropdownMenuItemName]" }, { kind: "directive", type: i6.ThyDropdownMenuItemIconDirective, selector: "[thyDropdownMenuItemIcon]" }] });
|
|
11434
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheTableOptionsComponent, decorators: [{
|
|
11435
|
-
type: Component,
|
|
11436
|
-
args: [{
|
|
11437
|
-
selector: 'the-table-options',
|
|
11438
|
-
template: `
|
|
11439
|
-
<div class="thy-dropdown-menu table-drop-menu">
|
|
11440
|
-
<ng-container *ngFor="let option of tableDropdownList">
|
|
11441
|
-
<a thyDropdownMenuItem href="javascript:;" (mousedown)="setTableOptions($event, option)">
|
|
11442
|
-
<span thyDropdownMenuItemName>{{ option.name }}</span>
|
|
11443
|
-
<span *ngIf="option.isActive" thyDropdownMenuItemIcon class="text-primary">
|
|
11444
|
-
<thy-icon thyIconName="check"></thy-icon>
|
|
11445
|
-
</span>
|
|
11446
|
-
</a>
|
|
11447
|
-
</ng-container>
|
|
11448
|
-
</div>
|
|
11449
|
-
`
|
|
11450
|
-
}]
|
|
11451
|
-
}], ctorParameters: function () { return [{ type: i1$1.ThyPopoverRef }]; }, propDecorators: { tableStore: [{
|
|
11452
|
-
type: Input
|
|
11453
|
-
}], editor: [{
|
|
11454
|
-
type: Input
|
|
11455
|
-
}] } });
|
|
11456
|
-
|
|
11457
|
-
class TheTableToolbarComponent {
|
|
11458
|
-
constructor(ngZone, colorSelectService, thyPopover, popoverRef) {
|
|
11459
|
-
this.ngZone = ngZone;
|
|
11708
|
+
class TheTableContextMenuService {
|
|
11709
|
+
constructor(colorSelectService, tableStore, thyPopover, ngZone, theContextService) {
|
|
11460
11710
|
this.colorSelectService = colorSelectService;
|
|
11711
|
+
this.tableStore = tableStore;
|
|
11461
11712
|
this.thyPopover = thyPopover;
|
|
11462
|
-
this.
|
|
11463
|
-
this.
|
|
11713
|
+
this.ngZone = ngZone;
|
|
11714
|
+
this.theContextService = theContextService;
|
|
11715
|
+
this.menuEntities = [
|
|
11464
11716
|
{
|
|
11465
|
-
key: '
|
|
11466
|
-
|
|
11467
|
-
|
|
11468
|
-
|
|
11469
|
-
|
|
11470
|
-
|
|
11471
|
-
|
|
11472
|
-
|
|
11473
|
-
this.
|
|
11474
|
-
|
|
11717
|
+
key: 'background-color',
|
|
11718
|
+
icon: 'background-tt',
|
|
11719
|
+
divider: true,
|
|
11720
|
+
name: '单元格背景',
|
|
11721
|
+
extendIcon: 'angle-right',
|
|
11722
|
+
visibility: true,
|
|
11723
|
+
actionHandle: () => { },
|
|
11724
|
+
activeHandle: (event) => {
|
|
11725
|
+
if (this.colorSelectService.isOpenColorSelect) {
|
|
11726
|
+
return;
|
|
11727
|
+
}
|
|
11728
|
+
const isHeader = TableEditor.isActiveHeader(this.editor);
|
|
11729
|
+
this.colorSelectService.toggleColorSelect(event.target, this.backgroundColor, BackgroundColors, {
|
|
11730
|
+
perRowColorNumbers: 7,
|
|
11731
|
+
rowOptions: { 1: '#bbb', 2: '#bbb' },
|
|
11732
|
+
specialColor: isHeader ? TableHeaderBackgroundColor : SpecialBackgroundColor
|
|
11733
|
+
}, (newColor) => {
|
|
11734
|
+
if ((newColor === TableHeaderBackgroundColor && isHeader) || (newColor === SpecialBackgroundColor && !isHeader)) {
|
|
11735
|
+
this.tableStore.setSelectedCellsBackgroundColor(null);
|
|
11736
|
+
}
|
|
11737
|
+
else {
|
|
11738
|
+
this.tableStore.setSelectedCellsBackgroundColor(newColor);
|
|
11739
|
+
}
|
|
11740
|
+
this.tableStore.selectFirstCell();
|
|
11741
|
+
}, 'rightTop', 0);
|
|
11742
|
+
},
|
|
11743
|
+
deactivateHandle: (event) => {
|
|
11744
|
+
if (event.relatedTarget instanceof HTMLElement) {
|
|
11745
|
+
if (event.relatedTarget.classList.contains('color-select-container')) {
|
|
11746
|
+
return;
|
|
11747
|
+
}
|
|
11748
|
+
}
|
|
11749
|
+
if (this.colorSelectService.isOpenColorSelect) {
|
|
11750
|
+
this.colorSelectService.closeColorSelect();
|
|
11751
|
+
}
|
|
11475
11752
|
}
|
|
11476
11753
|
},
|
|
11477
11754
|
{
|
|
11478
|
-
key:
|
|
11479
|
-
|
|
11480
|
-
|
|
11481
|
-
|
|
11482
|
-
|
|
11483
|
-
|
|
11484
|
-
|
|
11485
|
-
|
|
11486
|
-
this.
|
|
11487
|
-
this.tableStore.
|
|
11755
|
+
key: TableInsertType.insertRowsUp,
|
|
11756
|
+
icon: 'table-insert-rows-top',
|
|
11757
|
+
name: '向上插入行',
|
|
11758
|
+
visibility: true,
|
|
11759
|
+
isInputNumber: true,
|
|
11760
|
+
nameSuffix: '行',
|
|
11761
|
+
actionHandle: (item) => {
|
|
11762
|
+
const { targetRowIndex } = this.getTargetRowOrColIndex();
|
|
11763
|
+
TableEditor.insertRow(this.editor, item.count, targetRowIndex);
|
|
11764
|
+
this.tableStore.changeCells();
|
|
11488
11765
|
}
|
|
11489
|
-
}
|
|
11490
|
-
|
|
11491
|
-
|
|
11492
|
-
|
|
11493
|
-
|
|
11494
|
-
|
|
11495
|
-
|
|
11496
|
-
|
|
11497
|
-
|
|
11498
|
-
|
|
11499
|
-
|
|
11500
|
-
|
|
11501
|
-
ngOnInit() {
|
|
11502
|
-
this.deleteIcon = DeleteIcon[this.getDeleteIcon()];
|
|
11503
|
-
this.getIconName(this.deleteIcon);
|
|
11504
|
-
setCellMenuVisibility(this.editor, this.cellMenuList, this.tableStore.selectedCells, this.isFromControls);
|
|
11505
|
-
this.selectedColor = this.tableStore.getSelectedCellBackgroundColor();
|
|
11506
|
-
}
|
|
11507
|
-
ngOnDestroy() {
|
|
11508
|
-
this.colorSelectService.closeColorSelect();
|
|
11509
|
-
}
|
|
11510
|
-
getIconName(key) {
|
|
11511
|
-
switch (key) {
|
|
11512
|
-
case 'trash':
|
|
11513
|
-
this.iconName = '删除表格';
|
|
11514
|
-
break;
|
|
11515
|
-
case 'table-delete-columns':
|
|
11516
|
-
this.iconName = '删除整列';
|
|
11517
|
-
break;
|
|
11518
|
-
case 'table-delete-rows':
|
|
11519
|
-
this.iconName = '删除整行';
|
|
11520
|
-
break;
|
|
11521
|
-
}
|
|
11522
|
-
}
|
|
11523
|
-
getDeleteIcon() {
|
|
11524
|
-
if (this.tableStore.isSelectedTable) {
|
|
11525
|
-
return DeleteIcon.trash;
|
|
11526
|
-
}
|
|
11527
|
-
if (this.tableStore.selectedRowsIndex.length > 0) {
|
|
11528
|
-
return DeleteIcon['table-delete-rows'];
|
|
11529
|
-
}
|
|
11530
|
-
if (this.tableStore.selectedColumnsIndex.length > 0) {
|
|
11531
|
-
return DeleteIcon['table-delete-columns'];
|
|
11532
|
-
}
|
|
11533
|
-
return null;
|
|
11534
|
-
}
|
|
11535
|
-
onDelete(event) {
|
|
11536
|
-
event.preventDefault();
|
|
11537
|
-
this.tableStore.removeColumnOrRows();
|
|
11538
|
-
this.tableStore.clearDangerousCells();
|
|
11539
|
-
this.tableStore.clearSelectedCells();
|
|
11540
|
-
this.popoverRef.close();
|
|
11541
|
-
}
|
|
11542
|
-
onEnterDelete(event) {
|
|
11543
|
-
this.tableStore.setDangerousCells();
|
|
11544
|
-
}
|
|
11545
|
-
onLeaveDelete(event) {
|
|
11546
|
-
this.tableStore.clearDangerousCells();
|
|
11547
|
-
}
|
|
11548
|
-
openSelectColor(event) {
|
|
11549
|
-
event.preventDefault();
|
|
11550
|
-
event.stopPropagation();
|
|
11551
|
-
const element = event.target.closest('.thy-action');
|
|
11552
|
-
const isHeader = TableEditor.isActiveHeader(this.editor);
|
|
11553
|
-
this.ngZone.run(() => {
|
|
11554
|
-
this.colorSelectService.toggleColorSelect(element, this.selectedColor, BackgroundColors, {
|
|
11555
|
-
perRowColorNumbers: 7,
|
|
11556
|
-
rowOptions: { 1: '#bbb', 2: '#bbb' },
|
|
11557
|
-
specialColor: isHeader ? TableHeaderBackgroundColor : SpecialBackgroundColor
|
|
11558
|
-
}, (newColor) => {
|
|
11559
|
-
if ((newColor === TableHeaderBackgroundColor && isHeader) || (newColor === SpecialBackgroundColor && !isHeader)) {
|
|
11560
|
-
this.tableStore.setSelectedCellsBackgroundColor(null);
|
|
11766
|
+
},
|
|
11767
|
+
{
|
|
11768
|
+
key: TableInsertType.insertRowsDown,
|
|
11769
|
+
icon: 'table-insert-rows-down',
|
|
11770
|
+
name: '向下插入行',
|
|
11771
|
+
visibility: true,
|
|
11772
|
+
isInputNumber: true,
|
|
11773
|
+
nameSuffix: '行',
|
|
11774
|
+
actionHandle: (item) => {
|
|
11775
|
+
const { targetRowIndex } = this.getTargetRowOrColIndex(false);
|
|
11776
|
+
TableEditor.insertRow(this.editor, item.count, targetRowIndex);
|
|
11777
|
+
this.tableStore.changeCells();
|
|
11561
11778
|
}
|
|
11562
|
-
|
|
11563
|
-
|
|
11779
|
+
},
|
|
11780
|
+
{
|
|
11781
|
+
key: TableInsertType.insertColumnsLeft,
|
|
11782
|
+
icon: 'table-insert-columns-left',
|
|
11783
|
+
name: '向左插入列',
|
|
11784
|
+
visibility: true,
|
|
11785
|
+
isInputNumber: true,
|
|
11786
|
+
nameSuffix: '列',
|
|
11787
|
+
actionHandle: (item) => {
|
|
11788
|
+
const { targetColIndex } = this.getTargetRowOrColIndex();
|
|
11789
|
+
TableEditor.insertColumn(this.editor, item.count, targetColIndex);
|
|
11790
|
+
this.tableStore.changeCells();
|
|
11564
11791
|
}
|
|
11565
|
-
this.selectedColor = newColor;
|
|
11566
|
-
}, 'bottomLeft', 4);
|
|
11567
|
-
});
|
|
11568
|
-
}
|
|
11569
|
-
setFullscreen(event) {
|
|
11570
|
-
this.tableOptions.setFullscreen(this.editor, event, this.tableElement);
|
|
11571
|
-
}
|
|
11572
|
-
mousedown(event) {
|
|
11573
|
-
event.preventDefault();
|
|
11574
|
-
event.stopPropagation();
|
|
11575
|
-
}
|
|
11576
|
-
openTableOptionMenu(event) {
|
|
11577
|
-
event.preventDefault();
|
|
11578
|
-
event.stopPropagation();
|
|
11579
|
-
this.thyPopover.open(TheTableOptionsComponent, {
|
|
11580
|
-
origin: event.currentTarget,
|
|
11581
|
-
initialState: {
|
|
11582
|
-
tableStore: this.tableStore,
|
|
11583
|
-
editor: this.editor
|
|
11584
11792
|
},
|
|
11585
|
-
minWidth: 0,
|
|
11586
|
-
insideClosable: true,
|
|
11587
|
-
outsideClosable: true,
|
|
11588
|
-
hasBackdrop: false,
|
|
11589
|
-
placement: 'bottomLeft',
|
|
11590
|
-
originActiveClass: 'active',
|
|
11591
|
-
panelClass: 'table-options-pannel'
|
|
11592
|
-
});
|
|
11593
|
-
}
|
|
11594
|
-
}
|
|
11595
|
-
TheTableToolbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheTableToolbarComponent, deps: [{ token: i0.NgZone }, { token: TheColorSelectService }, { token: i1$1.ThyPopover }, { token: i1$1.ThyPopoverRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
11596
|
-
TheTableToolbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: TheTableToolbarComponent, selector: "the-table-toolbar", inputs: { tableStore: "tableStore", isFromControls: "isFromControls", 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 href=\"javascript:;\" thyAction thyTooltip=\"\u5355\u5143\u683C\u80CC\u666F\" (mousedown)=\"openSelectColor($event)\">\n <thy-icon thyIconName=\"background-tt\" thyIconType=\"twotone\" [thyTwotoneColor]=\"selectedColor\"></thy-icon>\n </a>\n <a\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\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\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: "component", type: i3.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.ThyActionComponent, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }, { kind: "component", type: i5.ThyActionsComponent, selector: "thy-actions", inputs: ["thySize"] }, { kind: "component", type: i12.ThyDividerComponent, selector: "thy-divider", inputs: ["thyVertical", "thyStyle", "thyColor", "thyText", "thyTextDirection", "thyDeeper"] }] });
|
|
11597
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheTableToolbarComponent, decorators: [{
|
|
11598
|
-
type: Component,
|
|
11599
|
-
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 href=\"javascript:;\" thyAction thyTooltip=\"\u5355\u5143\u683C\u80CC\u666F\" (mousedown)=\"openSelectColor($event)\">\n <thy-icon thyIconName=\"background-tt\" thyIconType=\"twotone\" [thyTwotoneColor]=\"selectedColor\"></thy-icon>\n </a>\n <a\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\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\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" }]
|
|
11600
|
-
}], ctorParameters: function () { return [{ type: i0.NgZone }, { type: TheColorSelectService }, { type: i1$1.ThyPopover }, { type: i1$1.ThyPopoverRef }]; }, propDecorators: { tableStore: [{
|
|
11601
|
-
type: Input
|
|
11602
|
-
}], isFromControls: [{
|
|
11603
|
-
type: Input
|
|
11604
|
-
}], tableElement: [{
|
|
11605
|
-
type: Input
|
|
11606
|
-
}] } });
|
|
11607
|
-
var DeleteIcon;
|
|
11608
|
-
(function (DeleteIcon) {
|
|
11609
|
-
DeleteIcon[DeleteIcon["table-delete-rows"] = 0] = "table-delete-rows";
|
|
11610
|
-
DeleteIcon[DeleteIcon["table-delete-columns"] = 1] = "table-delete-columns";
|
|
11611
|
-
DeleteIcon[DeleteIcon["trash"] = 2] = "trash";
|
|
11612
|
-
})(DeleteIcon || (DeleteIcon = {}));
|
|
11613
|
-
|
|
11614
|
-
class TheContextMenuComponent {
|
|
11615
|
-
constructor(elementRef, thyPopoverRef) {
|
|
11616
|
-
this.elementRef = elementRef;
|
|
11617
|
-
this.thyPopoverRef = thyPopoverRef;
|
|
11618
|
-
this.menuEntities = [];
|
|
11619
|
-
this.wrap = true;
|
|
11620
|
-
}
|
|
11621
|
-
handleDocumentMouseDown(event) {
|
|
11622
|
-
if (!this.elementRef.nativeElement.contains(event.target) && event.button !== 2) {
|
|
11623
|
-
this.thyPopoverRef.close();
|
|
11624
|
-
}
|
|
11625
|
-
}
|
|
11626
|
-
handleMouseDown(event) {
|
|
11627
|
-
event.preventDefault();
|
|
11628
|
-
event.stopPropagation();
|
|
11629
|
-
}
|
|
11630
|
-
itemMousedown(event, entity) {
|
|
11631
|
-
event.preventDefault();
|
|
11632
|
-
this.actionHandle(entity);
|
|
11633
|
-
this.thyPopoverRef.close();
|
|
11634
|
-
}
|
|
11635
|
-
itemMouseleave(event, entity) {
|
|
11636
|
-
event.preventDefault();
|
|
11637
|
-
this.deactiveHandle(event, entity);
|
|
11638
|
-
}
|
|
11639
|
-
itemMouseenter(event, entity) {
|
|
11640
|
-
event.preventDefault();
|
|
11641
|
-
this.activeHandle(event, entity);
|
|
11642
|
-
}
|
|
11643
|
-
ngOnInit() { }
|
|
11644
|
-
}
|
|
11645
|
-
TheContextMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheContextMenuComponent, deps: [{ token: i0.ElementRef }, { token: i1$1.ThyPopoverRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
11646
|
-
TheContextMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: TheContextMenuComponent, selector: "the-contextmenu", inputs: { menuEntities: "menuEntities", actionHandle: "actionHandle", activeHandle: "activeHandle", deactiveHandle: "deactiveHandle" }, host: { listeners: { "document: mousedown": "handleDocumentMouseDown($event)", "mousedown": "handleMouseDown($event)" }, properties: { "class.the-overlay-menu-wrap": "this.wrap" } }, ngImport: i0, template: "<div class=\"thy-dropdown-menu\">\n <ng-container *ngFor=\"let menuItem of menuEntities\">\n <a\n *ngIf=\"menuItem.visibility\"\n href=\"javascript:;\"\n thyDropdownMenuItem\n (mousedown)=\"itemMousedown($event, menuItem)\"\n (mouseenter)=\"itemMouseenter($event, menuItem)\"\n (mouseleave)=\"itemMouseleave($event, menuItem)\"\n >\n <span thyDropdownMenuItemIcon>\n <thy-icon\n *ngIf=\"menuItem.backgroundColor; else elseIcon\"\n [thyIconName]=\"menuItem.icon\"\n thyIconType=\"twotone\"\n [thyTwotoneColor]=\"menuItem.backgroundColor\"\n ></thy-icon>\n <ng-template #elseIcon>\n <thy-icon [thyIconName]=\"menuItem.icon\"></thy-icon>\n </ng-template>\n </span>\n <span thyDropdownMenuItemName>{{ menuItem.name }}</span>\n <span *ngIf=\"menuItem.extendIcon\" thyDropdownMenuItemExtendIcon>\n <thy-icon thyIconName=\"{{ menuItem.extendIcon }}\"></thy-icon>\n </span>\n </a>\n <thy-dropdown-menu-divider *ngIf=\"menuItem.divider\"></thy-dropdown-menu-divider>\n </ng-container>\n</div>\n", 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: "component", type: i3.ThyIconComponent, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { 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]" }] });
|
|
11647
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheContextMenuComponent, decorators: [{
|
|
11648
|
-
type: Component,
|
|
11649
|
-
args: [{ selector: 'the-contextmenu', template: "<div class=\"thy-dropdown-menu\">\n <ng-container *ngFor=\"let menuItem of menuEntities\">\n <a\n *ngIf=\"menuItem.visibility\"\n href=\"javascript:;\"\n thyDropdownMenuItem\n (mousedown)=\"itemMousedown($event, menuItem)\"\n (mouseenter)=\"itemMouseenter($event, menuItem)\"\n (mouseleave)=\"itemMouseleave($event, menuItem)\"\n >\n <span thyDropdownMenuItemIcon>\n <thy-icon\n *ngIf=\"menuItem.backgroundColor; else elseIcon\"\n [thyIconName]=\"menuItem.icon\"\n thyIconType=\"twotone\"\n [thyTwotoneColor]=\"menuItem.backgroundColor\"\n ></thy-icon>\n <ng-template #elseIcon>\n <thy-icon [thyIconName]=\"menuItem.icon\"></thy-icon>\n </ng-template>\n </span>\n <span thyDropdownMenuItemName>{{ menuItem.name }}</span>\n <span *ngIf=\"menuItem.extendIcon\" thyDropdownMenuItemExtendIcon>\n <thy-icon thyIconName=\"{{ menuItem.extendIcon }}\"></thy-icon>\n </span>\n </a>\n <thy-dropdown-menu-divider *ngIf=\"menuItem.divider\"></thy-dropdown-menu-divider>\n </ng-container>\n</div>\n" }]
|
|
11650
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1$1.ThyPopoverRef }]; }, propDecorators: { menuEntities: [{
|
|
11651
|
-
type: Input
|
|
11652
|
-
}], actionHandle: [{
|
|
11653
|
-
type: Input
|
|
11654
|
-
}], activeHandle: [{
|
|
11655
|
-
type: Input
|
|
11656
|
-
}], deactiveHandle: [{
|
|
11657
|
-
type: Input
|
|
11658
|
-
}], wrap: [{
|
|
11659
|
-
type: HostBinding,
|
|
11660
|
-
args: ['class.the-overlay-menu-wrap']
|
|
11661
|
-
}], handleDocumentMouseDown: [{
|
|
11662
|
-
type: HostListener,
|
|
11663
|
-
args: ['document: mousedown', ['$event']]
|
|
11664
|
-
}], handleMouseDown: [{
|
|
11665
|
-
type: HostListener,
|
|
11666
|
-
args: ['mousedown', ['$event']]
|
|
11667
|
-
}] } });
|
|
11668
|
-
|
|
11669
|
-
class TheTableContextMenuService {
|
|
11670
|
-
constructor(colorSelectService, tableStore, thyPopover, ngZone, theContextService) {
|
|
11671
|
-
this.colorSelectService = colorSelectService;
|
|
11672
|
-
this.tableStore = tableStore;
|
|
11673
|
-
this.thyPopover = thyPopover;
|
|
11674
|
-
this.ngZone = ngZone;
|
|
11675
|
-
this.theContextService = theContextService;
|
|
11676
|
-
this.menuEntities = [
|
|
11677
11793
|
{
|
|
11678
|
-
key:
|
|
11679
|
-
icon: '
|
|
11794
|
+
key: TableInsertType.insertColumnsRight,
|
|
11795
|
+
icon: 'table-insert-columns-right',
|
|
11680
11796
|
divider: true,
|
|
11681
|
-
name: '
|
|
11682
|
-
extendIcon: 'angle-right',
|
|
11797
|
+
name: '向右插入列',
|
|
11683
11798
|
visibility: true,
|
|
11684
|
-
|
|
11685
|
-
|
|
11686
|
-
|
|
11687
|
-
|
|
11688
|
-
|
|
11689
|
-
|
|
11690
|
-
this.colorSelectService.toggleColorSelect(event.target, this.backgroundColor, BackgroundColors, {
|
|
11691
|
-
perRowColorNumbers: 7,
|
|
11692
|
-
rowOptions: { 1: '#bbb', 2: '#bbb' },
|
|
11693
|
-
specialColor: isHeader ? TableHeaderBackgroundColor : SpecialBackgroundColor
|
|
11694
|
-
}, (newColor) => {
|
|
11695
|
-
if ((newColor === TableHeaderBackgroundColor && isHeader) || (newColor === SpecialBackgroundColor && !isHeader)) {
|
|
11696
|
-
this.tableStore.setSelectedCellsBackgroundColor(null);
|
|
11697
|
-
}
|
|
11698
|
-
else {
|
|
11699
|
-
this.tableStore.setSelectedCellsBackgroundColor(newColor);
|
|
11700
|
-
}
|
|
11701
|
-
this.tableStore.selectFirstCell();
|
|
11702
|
-
}, 'rightTop', 0);
|
|
11703
|
-
},
|
|
11704
|
-
deactiveHandle: (event) => {
|
|
11705
|
-
if (event.relatedTarget instanceof HTMLElement) {
|
|
11706
|
-
if (event.relatedTarget.classList.contains('color-select-container')) {
|
|
11707
|
-
return;
|
|
11708
|
-
}
|
|
11709
|
-
}
|
|
11710
|
-
if (this.colorSelectService.isOpenColorSelect) {
|
|
11711
|
-
this.colorSelectService.closeColorSelect();
|
|
11712
|
-
}
|
|
11799
|
+
isInputNumber: true,
|
|
11800
|
+
nameSuffix: '列',
|
|
11801
|
+
actionHandle: (item) => {
|
|
11802
|
+
const { targetColIndex } = this.getTargetRowOrColIndex(false);
|
|
11803
|
+
TableEditor.insertColumn(this.editor, item.count, targetColIndex);
|
|
11804
|
+
this.tableStore.changeCells();
|
|
11713
11805
|
}
|
|
11714
11806
|
},
|
|
11715
11807
|
{
|
|
@@ -11788,66 +11880,348 @@ class TheTableContextMenuService {
|
|
|
11788
11880
|
get isOpened() {
|
|
11789
11881
|
return this.menuRef && this.menuRef.componentInstance;
|
|
11790
11882
|
}
|
|
11791
|
-
get editor() {
|
|
11792
|
-
return this.tableStore && this.tableStore.editor;
|
|
11883
|
+
get editor() {
|
|
11884
|
+
return this.tableStore && this.tableStore.editor;
|
|
11885
|
+
}
|
|
11886
|
+
get backgroundColor() {
|
|
11887
|
+
return this.tableStore.getSelectedCellBackgroundColor();
|
|
11888
|
+
}
|
|
11889
|
+
getSelectedCell() {
|
|
11890
|
+
const cells = this.tableStore.selectedCells;
|
|
11891
|
+
const selectCellNodes = getSelectCellNode(this.editor, cells);
|
|
11892
|
+
const leftCellDict = getLeftCellDict(selectCellNodes);
|
|
11893
|
+
const { rowspan, colspan } = calculateCellSpan(selectCellNodes, leftCellDict);
|
|
11894
|
+
return { row: rowspan, col: colspan, selectCellNodes };
|
|
11895
|
+
}
|
|
11896
|
+
getTargetRowOrColIndex(isFront = true) {
|
|
11897
|
+
const { row, col, selectCellNodes } = this.getSelectedCell();
|
|
11898
|
+
const firstSelectCell = selectCellNodes[0];
|
|
11899
|
+
const targetRowIndex = isFront ? firstSelectCell.row : row + firstSelectCell.row;
|
|
11900
|
+
const targetColIndex = isFront ? firstSelectCell.col : col + firstSelectCell.col;
|
|
11901
|
+
return { targetRowIndex, targetColIndex };
|
|
11902
|
+
}
|
|
11903
|
+
openMenuList(event) {
|
|
11904
|
+
this.ngZone.run(() => {
|
|
11905
|
+
const { selectedCells, isFullscreen, selectedRowsIndex, selectedColumnsIndex } = this.tableStore;
|
|
11906
|
+
const tableInfo = { selectedCells, isFullscreen, selectedRowsIndex, selectedColumnsIndex };
|
|
11907
|
+
const { row, col } = this.getSelectedCell();
|
|
11908
|
+
setCellMenuVisibility(this.editor, this.menuEntities, tableInfo);
|
|
11909
|
+
this.menuEntities.forEach(item => {
|
|
11910
|
+
switch (item.key) {
|
|
11911
|
+
case 'background-color':
|
|
11912
|
+
item.backgroundColor = this.tableStore.getSelectedCellBackgroundColor();
|
|
11913
|
+
break;
|
|
11914
|
+
case TableInsertType.insertRowsUp:
|
|
11915
|
+
case TableInsertType.insertRowsDown:
|
|
11916
|
+
item.count = row;
|
|
11917
|
+
break;
|
|
11918
|
+
case TableInsertType.insertColumnsLeft:
|
|
11919
|
+
case TableInsertType.insertColumnsRight:
|
|
11920
|
+
item.count = col;
|
|
11921
|
+
break;
|
|
11922
|
+
}
|
|
11923
|
+
});
|
|
11924
|
+
this.menuRef = this.thyPopover.open(TheContextMenuComponent, {
|
|
11925
|
+
origin: event.target,
|
|
11926
|
+
initialState: {
|
|
11927
|
+
menuEntities: this.menuEntities,
|
|
11928
|
+
actionHandle: (entity) => {
|
|
11929
|
+
if (!this.editor.selection) {
|
|
11930
|
+
refocus(this.editor);
|
|
11931
|
+
}
|
|
11932
|
+
entity.actionHandle(entity);
|
|
11933
|
+
},
|
|
11934
|
+
activeHandle: (menuEvent, entity) => {
|
|
11935
|
+
if (entity.activeHandle) {
|
|
11936
|
+
entity.activeHandle(menuEvent);
|
|
11937
|
+
}
|
|
11938
|
+
},
|
|
11939
|
+
deactivateHandle: (menuEvent, entity) => {
|
|
11940
|
+
if (entity.key.indexOf('delete') >= 0) {
|
|
11941
|
+
this.tableStore.clearDangerousCells();
|
|
11942
|
+
}
|
|
11943
|
+
if (entity.deactivateHandle) {
|
|
11944
|
+
entity.deactivateHandle(menuEvent);
|
|
11945
|
+
}
|
|
11946
|
+
}
|
|
11947
|
+
},
|
|
11948
|
+
originPosition: {
|
|
11949
|
+
x: event.x + 30,
|
|
11950
|
+
y: event.y
|
|
11951
|
+
},
|
|
11952
|
+
hasBackdrop: false,
|
|
11953
|
+
placement: 'bottomLeft',
|
|
11954
|
+
viewContainerRef: this.theContextService.getOptions().viewContainerRef,
|
|
11955
|
+
manualClosure: true,
|
|
11956
|
+
insideClosable: false,
|
|
11957
|
+
backdropClosable: false
|
|
11958
|
+
});
|
|
11959
|
+
});
|
|
11960
|
+
}
|
|
11961
|
+
closeContextMenu() {
|
|
11962
|
+
if (this.isOpened) {
|
|
11963
|
+
this.menuRef.close();
|
|
11964
|
+
return this.menuRef.afterClosed();
|
|
11965
|
+
}
|
|
11966
|
+
}
|
|
11967
|
+
}
|
|
11968
|
+
TheTableContextMenuService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheTableContextMenuService, deps: [{ token: TheColorSelectService }, { token: TableStore }, { token: i1$1.ThyPopover }, { token: i0.NgZone }, { token: TheContextService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
11969
|
+
TheTableContextMenuService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheTableContextMenuService });
|
|
11970
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheTableContextMenuService, decorators: [{
|
|
11971
|
+
type: Injectable
|
|
11972
|
+
}], ctorParameters: function () { return [{ type: TheColorSelectService }, { type: TableStore }, { type: i1$1.ThyPopover }, { type: i0.NgZone }, { type: TheContextService }]; } });
|
|
11973
|
+
|
|
11974
|
+
class TheTableOptionsComponent {
|
|
11975
|
+
constructor(popoverRef) {
|
|
11976
|
+
this.popoverRef = popoverRef;
|
|
11977
|
+
this.tableDropdownList = [
|
|
11978
|
+
// {
|
|
11979
|
+
// name: '表头行',
|
|
11980
|
+
// key: 'headerRow'
|
|
11981
|
+
// },
|
|
11982
|
+
{
|
|
11983
|
+
name: '标题列',
|
|
11984
|
+
key: 'headerColumn'
|
|
11985
|
+
},
|
|
11986
|
+
{
|
|
11987
|
+
name: '序号列',
|
|
11988
|
+
key: 'numberedColumn'
|
|
11989
|
+
}
|
|
11990
|
+
];
|
|
11991
|
+
}
|
|
11992
|
+
get table() {
|
|
11993
|
+
return this.tableStore && this.tableStore.getTableEntry(this.editor)[0];
|
|
11994
|
+
}
|
|
11995
|
+
ngOnInit() {
|
|
11996
|
+
this.setColumnOptions();
|
|
11997
|
+
}
|
|
11998
|
+
setColumnOptions() {
|
|
11999
|
+
this.tableDropdownList.forEach(item => {
|
|
12000
|
+
item.isActive = (this.table.options && this.table.options[item.key]) || false;
|
|
12001
|
+
});
|
|
12002
|
+
}
|
|
12003
|
+
setTableOptions(event, option) {
|
|
12004
|
+
event.preventDefault();
|
|
12005
|
+
event.stopPropagation();
|
|
12006
|
+
const currentOption = this.tableDropdownList.find(item => item.key === option.key);
|
|
12007
|
+
currentOption.isActive = !option.isActive;
|
|
12008
|
+
const tableOption = {};
|
|
12009
|
+
tableOption[option.key] = currentOption.isActive || null;
|
|
12010
|
+
this.tableStore.setTableOptions(this.editor, {
|
|
12011
|
+
...this.table.options,
|
|
12012
|
+
...tableOption
|
|
12013
|
+
});
|
|
12014
|
+
}
|
|
12015
|
+
}
|
|
12016
|
+
TheTableOptionsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheTableOptionsComponent, deps: [{ token: i1$1.ThyPopoverRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
12017
|
+
TheTableOptionsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: TheTableOptionsComponent, selector: "the-table-options", inputs: { tableStore: "tableStore", editor: "editor" }, ngImport: i0, template: `
|
|
12018
|
+
<div class="thy-dropdown-menu table-drop-menu">
|
|
12019
|
+
<ng-container *ngFor="let option of tableDropdownList">
|
|
12020
|
+
<a thyDropdownMenuItem href="javascript:;" (mousedown)="setTableOptions($event, option)">
|
|
12021
|
+
<span thyDropdownMenuItemName>{{ option.name }}</span>
|
|
12022
|
+
<span *ngIf="option.isActive" thyDropdownMenuItemIcon class="text-primary">
|
|
12023
|
+
<thy-icon thyIconName="check"></thy-icon>
|
|
12024
|
+
</span>
|
|
12025
|
+
</a>
|
|
12026
|
+
</ng-container>
|
|
12027
|
+
</div>
|
|
12028
|
+
`, isInline: true, 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: "component", type: i4.ThyIconComponent, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { kind: "directive", type: i6.ThyDropdownMenuItemDirective, selector: "[thyDropdownMenuItem]", inputs: ["thyType", "thyDisabled"] }, { kind: "directive", type: i6.ThyDropdownMenuItemNameDirective, selector: "[thyDropdownMenuItemName]" }, { kind: "directive", type: i6.ThyDropdownMenuItemIconDirective, selector: "[thyDropdownMenuItemIcon]" }] });
|
|
12029
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheTableOptionsComponent, decorators: [{
|
|
12030
|
+
type: Component,
|
|
12031
|
+
args: [{
|
|
12032
|
+
selector: 'the-table-options',
|
|
12033
|
+
template: `
|
|
12034
|
+
<div class="thy-dropdown-menu table-drop-menu">
|
|
12035
|
+
<ng-container *ngFor="let option of tableDropdownList">
|
|
12036
|
+
<a thyDropdownMenuItem href="javascript:;" (mousedown)="setTableOptions($event, option)">
|
|
12037
|
+
<span thyDropdownMenuItemName>{{ option.name }}</span>
|
|
12038
|
+
<span *ngIf="option.isActive" thyDropdownMenuItemIcon class="text-primary">
|
|
12039
|
+
<thy-icon thyIconName="check"></thy-icon>
|
|
12040
|
+
</span>
|
|
12041
|
+
</a>
|
|
12042
|
+
</ng-container>
|
|
12043
|
+
</div>
|
|
12044
|
+
`
|
|
12045
|
+
}]
|
|
12046
|
+
}], ctorParameters: function () { return [{ type: i1$1.ThyPopoverRef }]; }, propDecorators: { tableStore: [{
|
|
12047
|
+
type: Input
|
|
12048
|
+
}], editor: [{
|
|
12049
|
+
type: Input
|
|
12050
|
+
}] } });
|
|
12051
|
+
|
|
12052
|
+
class TheTableToolbarComponent {
|
|
12053
|
+
constructor(ngZone, colorSelectService, thyPopover, popoverRef) {
|
|
12054
|
+
this.ngZone = ngZone;
|
|
12055
|
+
this.colorSelectService = colorSelectService;
|
|
12056
|
+
this.thyPopover = thyPopover;
|
|
12057
|
+
this.popoverRef = popoverRef;
|
|
12058
|
+
this.cellMenuList = [
|
|
12059
|
+
{
|
|
12060
|
+
key: 'merge-cells',
|
|
12061
|
+
name: '合并单元格',
|
|
12062
|
+
visibility: false,
|
|
12063
|
+
icon: 'table-merge-cells',
|
|
12064
|
+
actionHandle: () => {
|
|
12065
|
+
event.preventDefault();
|
|
12066
|
+
event.stopPropagation();
|
|
12067
|
+
this.tableStore.mergeCell(this.editor);
|
|
12068
|
+
this.popoverRef.close();
|
|
12069
|
+
this.tableStore.clearSelectedCells();
|
|
12070
|
+
}
|
|
12071
|
+
},
|
|
12072
|
+
{
|
|
12073
|
+
key: 'split-cells',
|
|
12074
|
+
name: '拆分单元格',
|
|
12075
|
+
visibility: false,
|
|
12076
|
+
icon: 'table-unmerge-cells',
|
|
12077
|
+
actionHandle: () => {
|
|
12078
|
+
event.preventDefault();
|
|
12079
|
+
event.stopPropagation();
|
|
12080
|
+
splitCell(this.editor);
|
|
12081
|
+
this.popoverRef.close();
|
|
12082
|
+
this.tableStore.clearSelectedCells();
|
|
12083
|
+
}
|
|
12084
|
+
}
|
|
12085
|
+
];
|
|
12086
|
+
}
|
|
12087
|
+
get editor() {
|
|
12088
|
+
return this.tableStore && this.tableStore.editor;
|
|
12089
|
+
}
|
|
12090
|
+
get hasDivider() {
|
|
12091
|
+
return this.cellMenuList.filter(item => item.visibility).length > 1;
|
|
12092
|
+
}
|
|
12093
|
+
get tableOptions() {
|
|
12094
|
+
return getPluginOptions(this.editor, PluginKeys.table);
|
|
12095
|
+
}
|
|
12096
|
+
ngOnInit() {
|
|
12097
|
+
this.deleteIcon = DeleteIcon[this.getDeleteIcon()];
|
|
12098
|
+
this.getIconName(this.deleteIcon);
|
|
12099
|
+
const { selectedCells } = this.tableStore;
|
|
12100
|
+
const tableInfo = { selectedCells };
|
|
12101
|
+
this.isRectangle = isRectangularInTableCells(selectedCells);
|
|
12102
|
+
setCellMenuVisibility(this.editor, this.cellMenuList, tableInfo, this.isFromControls);
|
|
12103
|
+
this.selectedColor = this.tableStore.getSelectedCellBackgroundColor();
|
|
12104
|
+
}
|
|
12105
|
+
ngOnDestroy() {
|
|
12106
|
+
this.colorSelectService.closeColorSelect();
|
|
12107
|
+
}
|
|
12108
|
+
getIconName(key) {
|
|
12109
|
+
switch (key) {
|
|
12110
|
+
case 'trash':
|
|
12111
|
+
this.iconName = '删除表格';
|
|
12112
|
+
break;
|
|
12113
|
+
case 'table-delete-columns':
|
|
12114
|
+
this.iconName = '删除整列';
|
|
12115
|
+
break;
|
|
12116
|
+
case 'table-delete-rows':
|
|
12117
|
+
this.iconName = '删除整行';
|
|
12118
|
+
break;
|
|
12119
|
+
}
|
|
12120
|
+
}
|
|
12121
|
+
getDeleteIcon() {
|
|
12122
|
+
if (this.tableStore.isSelectedTable) {
|
|
12123
|
+
return DeleteIcon.trash;
|
|
12124
|
+
}
|
|
12125
|
+
if (this.tableStore.selectedRowsIndex.length > 0) {
|
|
12126
|
+
return DeleteIcon['table-delete-rows'];
|
|
12127
|
+
}
|
|
12128
|
+
if (this.tableStore.selectedColumnsIndex.length > 0) {
|
|
12129
|
+
return DeleteIcon['table-delete-columns'];
|
|
12130
|
+
}
|
|
12131
|
+
return null;
|
|
12132
|
+
}
|
|
12133
|
+
onDelete(event) {
|
|
12134
|
+
event.preventDefault();
|
|
12135
|
+
this.tableStore.removeColumnOrRows();
|
|
12136
|
+
this.tableStore.clearDangerousCells();
|
|
12137
|
+
this.tableStore.clearSelectedCells();
|
|
12138
|
+
this.popoverRef.close();
|
|
12139
|
+
}
|
|
12140
|
+
onEnterDelete(event) {
|
|
12141
|
+
this.tableStore.setDangerousCells();
|
|
11793
12142
|
}
|
|
11794
|
-
|
|
11795
|
-
|
|
12143
|
+
onLeaveDelete(event) {
|
|
12144
|
+
this.tableStore.clearDangerousCells();
|
|
11796
12145
|
}
|
|
11797
|
-
|
|
12146
|
+
openSelectColor(event) {
|
|
12147
|
+
event.preventDefault();
|
|
12148
|
+
event.stopPropagation();
|
|
12149
|
+
const element = event.target.closest('.thy-action');
|
|
12150
|
+
const isHeader = TableEditor.isActiveHeader(this.editor);
|
|
11798
12151
|
this.ngZone.run(() => {
|
|
11799
|
-
|
|
11800
|
-
|
|
11801
|
-
|
|
11802
|
-
|
|
12152
|
+
this.colorSelectService.toggleColorSelect(element, this.selectedColor, BackgroundColors, {
|
|
12153
|
+
perRowColorNumbers: 7,
|
|
12154
|
+
rowOptions: { 1: '#bbb', 2: '#bbb' },
|
|
12155
|
+
specialColor: isHeader ? TableHeaderBackgroundColor : SpecialBackgroundColor
|
|
12156
|
+
}, (newColor) => {
|
|
12157
|
+
if ((newColor === TableHeaderBackgroundColor && isHeader) || (newColor === SpecialBackgroundColor && !isHeader)) {
|
|
12158
|
+
this.tableStore.setSelectedCellsBackgroundColor(null);
|
|
11803
12159
|
}
|
|
11804
|
-
|
|
11805
|
-
|
|
11806
|
-
|
|
11807
|
-
|
|
11808
|
-
|
|
11809
|
-
actionHandle: (entity) => {
|
|
11810
|
-
entity.actionHandle(entity);
|
|
11811
|
-
},
|
|
11812
|
-
activeHandle: (menuEvent, entity) => {
|
|
11813
|
-
if (entity.activeHandle) {
|
|
11814
|
-
entity.activeHandle(menuEvent);
|
|
11815
|
-
}
|
|
11816
|
-
},
|
|
11817
|
-
deactiveHandle: (menuEvent, entity) => {
|
|
11818
|
-
if (entity.key.indexOf('delete') >= 0) {
|
|
11819
|
-
this.tableStore.clearDangerousCells();
|
|
11820
|
-
}
|
|
11821
|
-
if (entity.deactiveHandle) {
|
|
11822
|
-
entity.deactiveHandle(menuEvent);
|
|
11823
|
-
}
|
|
11824
|
-
}
|
|
11825
|
-
},
|
|
11826
|
-
originPosition: {
|
|
11827
|
-
x: event.x + 30,
|
|
11828
|
-
y: event.y
|
|
11829
|
-
},
|
|
11830
|
-
hasBackdrop: false,
|
|
11831
|
-
placement: 'bottomLeft',
|
|
11832
|
-
viewContainerRef: this.theContextService.getOptions().viewContainerRef,
|
|
11833
|
-
manualClosure: true,
|
|
11834
|
-
insideClosable: false,
|
|
11835
|
-
backdropClosable: false
|
|
11836
|
-
});
|
|
12160
|
+
else {
|
|
12161
|
+
this.tableStore.setSelectedCellsBackgroundColor(newColor);
|
|
12162
|
+
}
|
|
12163
|
+
this.selectedColor = newColor;
|
|
12164
|
+
}, 'bottomLeft', 4);
|
|
11837
12165
|
});
|
|
11838
12166
|
}
|
|
11839
|
-
|
|
11840
|
-
|
|
11841
|
-
|
|
11842
|
-
|
|
11843
|
-
|
|
12167
|
+
setFullscreen(event) {
|
|
12168
|
+
this.tableOptions.setFullscreen(this.editor, event, this.tableElement);
|
|
12169
|
+
}
|
|
12170
|
+
mousedown(event) {
|
|
12171
|
+
event.preventDefault();
|
|
12172
|
+
event.stopPropagation();
|
|
12173
|
+
}
|
|
12174
|
+
setEquallyColumnHandle(event) {
|
|
12175
|
+
event.preventDefault();
|
|
12176
|
+
event.stopPropagation();
|
|
12177
|
+
const cols = [...this.tableElementRef.nativeElement.querySelector('colgroup').children];
|
|
12178
|
+
const initialValue = 0;
|
|
12179
|
+
const sumWidth = cols.reduce((previousValue, currentValue) => {
|
|
12180
|
+
return previousValue + getElementWidth(currentValue);
|
|
12181
|
+
}, initialValue);
|
|
12182
|
+
cols.forEach(col => {
|
|
12183
|
+
col.style.width = coerceCssPixelValue(sumWidth / cols.length);
|
|
12184
|
+
});
|
|
12185
|
+
}
|
|
12186
|
+
openTableOptionMenu(event) {
|
|
12187
|
+
event.preventDefault();
|
|
12188
|
+
event.stopPropagation();
|
|
12189
|
+
this.thyPopover.open(TheTableOptionsComponent, {
|
|
12190
|
+
origin: event.currentTarget,
|
|
12191
|
+
initialState: {
|
|
12192
|
+
tableStore: this.tableStore,
|
|
12193
|
+
editor: this.editor
|
|
12194
|
+
},
|
|
12195
|
+
minWidth: 0,
|
|
12196
|
+
insideClosable: true,
|
|
12197
|
+
outsideClosable: true,
|
|
12198
|
+
hasBackdrop: false,
|
|
12199
|
+
placement: 'bottomLeft',
|
|
12200
|
+
originActiveClass: 'active',
|
|
12201
|
+
panelClass: 'table-options-pannel'
|
|
12202
|
+
});
|
|
11844
12203
|
}
|
|
11845
12204
|
}
|
|
11846
|
-
|
|
11847
|
-
|
|
11848
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.
|
|
11849
|
-
type:
|
|
11850
|
-
|
|
12205
|
+
TheTableToolbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheTableToolbarComponent, deps: [{ token: i0.NgZone }, { token: TheColorSelectService }, { token: i1$1.ThyPopover }, { token: i1$1.ThyPopoverRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
12206
|
+
TheTableToolbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: TheTableToolbarComponent, selector: "the-table-toolbar", inputs: { tableStore: "tableStore", isFromControls: "isFromControls", tableElement: "tableElement", tableElementRef: "tableElementRef" }, 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 href=\"javascript:;\" thyAction thyTooltip=\"\u5355\u5143\u683C\u80CC\u666F\" (mousedown)=\"openSelectColor($event)\">\n <thy-icon thyIconName=\"background-tt\" thyIconType=\"twotone\" [thyTwotoneColor]=\"selectedColor\"></thy-icon>\n </a>\n <a href=\"javascript:;\" *ngIf=\"tableStore.isSelectedTable\" thyAction thyTooltip=\"\u5217\u7B49\u5BBD\" (mousedown)=\"setEquallyColumnHandle($event)\">\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\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\n <ng-container *ngIf=\"isRectangle && (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: "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.ThyActionComponent, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }, { kind: "component", type: i5.ThyActionsComponent, selector: "thy-actions", inputs: ["thySize"] }, { kind: "component", type: i12.ThyDividerComponent, selector: "thy-divider", inputs: ["thyVertical", "thyStyle", "thyColor", "thyText", "thyTextDirection", "thyDeeper"] }] });
|
|
12207
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheTableToolbarComponent, decorators: [{
|
|
12208
|
+
type: Component,
|
|
12209
|
+
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 href=\"javascript:;\" thyAction thyTooltip=\"\u5355\u5143\u683C\u80CC\u666F\" (mousedown)=\"openSelectColor($event)\">\n <thy-icon thyIconName=\"background-tt\" thyIconType=\"twotone\" [thyTwotoneColor]=\"selectedColor\"></thy-icon>\n </a>\n <a href=\"javascript:;\" *ngIf=\"tableStore.isSelectedTable\" thyAction thyTooltip=\"\u5217\u7B49\u5BBD\" (mousedown)=\"setEquallyColumnHandle($event)\">\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\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\n <ng-container *ngIf=\"isRectangle && (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" }]
|
|
12210
|
+
}], ctorParameters: function () { return [{ type: i0.NgZone }, { type: TheColorSelectService }, { type: i1$1.ThyPopover }, { type: i1$1.ThyPopoverRef }]; }, propDecorators: { tableStore: [{
|
|
12211
|
+
type: Input
|
|
12212
|
+
}], isFromControls: [{
|
|
12213
|
+
type: Input
|
|
12214
|
+
}], tableElement: [{
|
|
12215
|
+
type: Input
|
|
12216
|
+
}], tableElementRef: [{
|
|
12217
|
+
type: Input
|
|
12218
|
+
}] } });
|
|
12219
|
+
var DeleteIcon;
|
|
12220
|
+
(function (DeleteIcon) {
|
|
12221
|
+
DeleteIcon[DeleteIcon["table-delete-rows"] = 0] = "table-delete-rows";
|
|
12222
|
+
DeleteIcon[DeleteIcon["table-delete-columns"] = 1] = "table-delete-columns";
|
|
12223
|
+
DeleteIcon[DeleteIcon["trash"] = 2] = "trash";
|
|
12224
|
+
})(DeleteIcon || (DeleteIcon = {}));
|
|
11851
12225
|
|
|
11852
12226
|
class TableService {
|
|
11853
12227
|
constructor(thyPopover, overlay, tableStore, theTableContextMenuService, ngZone, theContextService) {
|
|
@@ -11866,7 +12240,7 @@ class TableService {
|
|
|
11866
12240
|
get isOpened() {
|
|
11867
12241
|
return this.toolbarRef && this.toolbarRef.componentInstance;
|
|
11868
12242
|
}
|
|
11869
|
-
openToolbar(origin, tableElement, isFromControls) {
|
|
12243
|
+
openToolbar(origin, tableElement, isFromControls, tableElementRef) {
|
|
11870
12244
|
if (this.isOpened) {
|
|
11871
12245
|
if (this.toolbarRef.containerInstance.config.origin === origin) {
|
|
11872
12246
|
return;
|
|
@@ -11877,7 +12251,8 @@ class TableService {
|
|
|
11877
12251
|
initialState: {
|
|
11878
12252
|
tableStore: this.tableStore,
|
|
11879
12253
|
tableElement,
|
|
11880
|
-
isFromControls
|
|
12254
|
+
isFromControls,
|
|
12255
|
+
tableElementRef
|
|
11881
12256
|
},
|
|
11882
12257
|
viewContainerRef: this.theContextService.getOptions().viewContainerRef,
|
|
11883
12258
|
origin: this.getOrigin(origin),
|
|
@@ -11892,9 +12267,9 @@ class TableService {
|
|
|
11892
12267
|
manualClosure: true
|
|
11893
12268
|
});
|
|
11894
12269
|
}
|
|
11895
|
-
afterSelectedCells(origin, element, isFromControls) {
|
|
12270
|
+
afterSelectedCells(origin, element, isFromControls, tableElementRef) {
|
|
11896
12271
|
this.theTableContextMenuService.closeContextMenu();
|
|
11897
|
-
this.openToolbar(origin, element, isFromControls);
|
|
12272
|
+
this.openToolbar(origin, element, isFromControls, tableElementRef);
|
|
11898
12273
|
}
|
|
11899
12274
|
getOrigin(origin) {
|
|
11900
12275
|
if (origin instanceof HTMLTableCellElement && origin.tagName !== 'TH') {
|
|
@@ -11922,15 +12297,12 @@ class TableService {
|
|
|
11922
12297
|
}
|
|
11923
12298
|
}
|
|
11924
12299
|
}
|
|
11925
|
-
TableService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.
|
|
11926
|
-
TableService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.
|
|
11927
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.
|
|
12300
|
+
TableService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TableService, deps: [{ token: i1$1.ThyPopover }, { token: i2$1.Overlay }, { token: TableStore }, { token: TheTableContextMenuService }, { token: i0.NgZone }, { token: TheContextService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
12301
|
+
TableService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TableService });
|
|
12302
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TableService, decorators: [{
|
|
11928
12303
|
type: Injectable
|
|
11929
12304
|
}], ctorParameters: function () { return [{ type: i1$1.ThyPopover }, { type: i2$1.Overlay }, { type: TableStore }, { type: TheTableContextMenuService }, { type: i0.NgZone }, { type: TheContextService }]; } });
|
|
11930
12305
|
|
|
11931
|
-
const SLA_TABLE_SELECTOR = '.slate-element-table';
|
|
11932
|
-
const SLA_TABLE_CELL_SELECTOR = '.slate-element-table-cell';
|
|
11933
|
-
|
|
11934
12306
|
function isVirtualKey(e) {
|
|
11935
12307
|
const isMod = e.ctrlKey || e.metaKey;
|
|
11936
12308
|
const isAlt = isKeyHotkey('alt', e);
|
|
@@ -11944,13 +12316,16 @@ function isVirtualKey(e) {
|
|
|
11944
12316
|
}
|
|
11945
12317
|
|
|
11946
12318
|
class TableFreezeColumnPipe {
|
|
11947
|
-
transform(
|
|
11948
|
-
|
|
12319
|
+
transform(table, tablePluginOptions) {
|
|
12320
|
+
const rows = table.children?.map(item => item.children);
|
|
12321
|
+
// 存在合并的单元格时,取消冻结
|
|
12322
|
+
const mergeColumnCells = rows && rows.map(cells => cells[0]).filter(item => item.colspan && item.colspan !== 1);
|
|
12323
|
+
return tablePluginOptions?.freezeColumnHeader && table.options?.headerColumn && !mergeColumnCells.length;
|
|
11949
12324
|
}
|
|
11950
12325
|
}
|
|
11951
|
-
TableFreezeColumnPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.
|
|
11952
|
-
TableFreezeColumnPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.
|
|
11953
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.
|
|
12326
|
+
TableFreezeColumnPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TableFreezeColumnPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
12327
|
+
TableFreezeColumnPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.0", ngImport: i0, type: TableFreezeColumnPipe, name: "freezeColumn" });
|
|
12328
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TableFreezeColumnPipe, decorators: [{
|
|
11954
12329
|
type: Pipe,
|
|
11955
12330
|
args: [{ name: 'freezeColumn' }]
|
|
11956
12331
|
}] });
|
|
@@ -12037,9 +12412,9 @@ class TheColumnResizeDirective {
|
|
|
12037
12412
|
this.destroyed.complete();
|
|
12038
12413
|
}
|
|
12039
12414
|
}
|
|
12040
|
-
TheColumnResizeDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.
|
|
12041
|
-
TheColumnResizeDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.
|
|
12042
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.
|
|
12415
|
+
TheColumnResizeDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheColumnResizeDirective, deps: [{ token: i0.ElementRef }, { token: i0.ViewContainerRef }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: TableCellEventDispatcher }, { token: ColumnResizeNotifierSource }, { token: TheTableToken }], target: i0.ɵɵFactoryTarget.Directive });
|
|
12416
|
+
TheColumnResizeDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.0", type: TheColumnResizeDirective, selector: "div[theColumnResize]", ngImport: i0 });
|
|
12417
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheColumnResizeDirective, decorators: [{
|
|
12043
12418
|
type: Directive,
|
|
12044
12419
|
args: [{
|
|
12045
12420
|
selector: 'div[theColumnResize]'
|
|
@@ -12072,14 +12447,6 @@ class TheInsertMarkComponent {
|
|
|
12072
12447
|
}
|
|
12073
12448
|
const fun = this.type === 'row' ? TableEditor.insertRow : TableEditor.insertColumn;
|
|
12074
12449
|
fun(this.editor, 1, this.at);
|
|
12075
|
-
// update header
|
|
12076
|
-
if (this.type === 'row' && this.at === 0) {
|
|
12077
|
-
const { selection } = this.editor;
|
|
12078
|
-
const opts = new TableOptions();
|
|
12079
|
-
const table = TablePosition.create(opts, this.editor, selection.anchor.path);
|
|
12080
|
-
Transforms.setNodes(this.editor, { header: true }, { at: table.tableEntry[1].concat(0) });
|
|
12081
|
-
Transforms.setNodes(this.editor, { header: null }, { at: table.tableEntry[1].concat(1) });
|
|
12082
|
-
}
|
|
12083
12450
|
this.tableStore.changeCells();
|
|
12084
12451
|
}
|
|
12085
12452
|
onMouseEnter(event) {
|
|
@@ -12129,9 +12496,9 @@ class TheInsertMarkComponent {
|
|
|
12129
12496
|
}
|
|
12130
12497
|
}
|
|
12131
12498
|
}
|
|
12132
|
-
TheInsertMarkComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.
|
|
12133
|
-
TheInsertMarkComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.
|
|
12134
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.
|
|
12499
|
+
TheInsertMarkComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheInsertMarkComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
|
|
12500
|
+
TheInsertMarkComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: TheInsertMarkComponent, selector: "the-table-insert-mark", inputs: { type: "type", at: "at", tableStore: "tableStore", parentElement: "parentElement" }, ngImport: i0, template: "<div\n [thyTooltip]=\"!disabled && tooltipContent\"\n class=\"the-table-controls-insert-wrapper\"\n [ngClass]=\"{ disabled: disabled }\"\n contenteditable=\"false\"\n (mousedown)=\"onMouseDown($event)\"\n (mouseenter)=\"onMouseEnter($event)\"\n (mouseleave)=\"onMouseLeave($event)\"\n>\n <div\n class=\"the-table-controls-insert-line\"\n *ngIf=\"dotWrapperHovered\"\n [attr.data-dot-type]=\"type\"\n [ngStyle]=\"{ height: type === 'column' && insertLength, width: type === 'row' && insertLength }\"\n ></div>\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: "directive", type: i8.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }] });
|
|
12501
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheInsertMarkComponent, decorators: [{
|
|
12135
12502
|
type: Component,
|
|
12136
12503
|
args: [{ selector: 'the-table-insert-mark', template: "<div\n [thyTooltip]=\"!disabled && tooltipContent\"\n class=\"the-table-controls-insert-wrapper\"\n [ngClass]=\"{ disabled: disabled }\"\n contenteditable=\"false\"\n (mousedown)=\"onMouseDown($event)\"\n (mouseenter)=\"onMouseEnter($event)\"\n (mouseleave)=\"onMouseLeave($event)\"\n>\n <div\n class=\"the-table-controls-insert-line\"\n *ngIf=\"dotWrapperHovered\"\n [attr.data-dot-type]=\"type\"\n [ngStyle]=\"{ height: type === 'column' && insertLength, width: type === 'row' && insertLength }\"\n ></div>\n</div>\n" }]
|
|
12137
12504
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.Renderer2 }]; }, propDecorators: { type: [{
|
|
@@ -12155,6 +12522,7 @@ class TheTableComponent extends TheBaseElementComponent {
|
|
|
12155
12522
|
this.tableService = tableService;
|
|
12156
12523
|
this.theTableContextMenuService = theTableContextMenuService;
|
|
12157
12524
|
this.freezeColumnPipe = freezeColumnPipe;
|
|
12525
|
+
this.headerRow = false;
|
|
12158
12526
|
this.destroy$ = new Subject();
|
|
12159
12527
|
this.rowControls = [];
|
|
12160
12528
|
this.colControls = [];
|
|
@@ -12194,6 +12562,7 @@ class TheTableComponent extends TheBaseElementComponent {
|
|
|
12194
12562
|
this.getIsInTable();
|
|
12195
12563
|
this.getColControls();
|
|
12196
12564
|
}
|
|
12565
|
+
this.headerRow = this.getHeaderRow();
|
|
12197
12566
|
}
|
|
12198
12567
|
ngOnInit() {
|
|
12199
12568
|
super.ngOnInit();
|
|
@@ -12215,6 +12584,19 @@ class TheTableComponent extends TheBaseElementComponent {
|
|
|
12215
12584
|
const width = tableContainer.offsetWidth - paddingLeft;
|
|
12216
12585
|
return width;
|
|
12217
12586
|
}
|
|
12587
|
+
/**
|
|
12588
|
+
* compatible with old data
|
|
12589
|
+
* @returns
|
|
12590
|
+
*/
|
|
12591
|
+
getHeaderRow() {
|
|
12592
|
+
if (this.element?.options?.headerRow) {
|
|
12593
|
+
return true;
|
|
12594
|
+
}
|
|
12595
|
+
// compat old data
|
|
12596
|
+
if (this.element?.children[0].header) {
|
|
12597
|
+
return true;
|
|
12598
|
+
}
|
|
12599
|
+
}
|
|
12218
12600
|
ngAfterViewInit() {
|
|
12219
12601
|
this.ngZone.onStable.pipe(take(1)).subscribe(async () => {
|
|
12220
12602
|
const blockCardElement = this.nativeElement.closest('slate-block-card');
|
|
@@ -12503,7 +12885,7 @@ class TheTableComponent extends TheBaseElementComponent {
|
|
|
12503
12885
|
event.stopPropagation();
|
|
12504
12886
|
event.preventDefault();
|
|
12505
12887
|
this.tableStore.selectTable(this.editor);
|
|
12506
|
-
this.tableService.afterSelectedCells(event.target, this.element, true);
|
|
12888
|
+
this.tableService.afterSelectedCells(event.target, this.element, true, this.theTableElement);
|
|
12507
12889
|
}
|
|
12508
12890
|
listenTableContextMenuEvent() {
|
|
12509
12891
|
this.ngZone.runOutsideAngular(() => {
|
|
@@ -12556,7 +12938,9 @@ class TheTableComponent extends TheBaseElementComponent {
|
|
|
12556
12938
|
return !isVirtualKey(e);
|
|
12557
12939
|
})))
|
|
12558
12940
|
.pipe(filter(() => {
|
|
12559
|
-
return this.tableStore.selectedCells &&
|
|
12941
|
+
return (this.tableStore.selectedCells &&
|
|
12942
|
+
this.tableStore.selectedCells.length > 0 &&
|
|
12943
|
+
!(this.theTableContextMenuService.isOpened && !this.editor.selection));
|
|
12560
12944
|
}), takeUntil(this.destroy$))
|
|
12561
12945
|
.subscribe((e) => {
|
|
12562
12946
|
if (e.type === 'keydown') {
|
|
@@ -12576,7 +12960,7 @@ class TheTableComponent extends TheBaseElementComponent {
|
|
|
12576
12960
|
fromEvent(document, 'keydown')
|
|
12577
12961
|
.pipe(takeUntil(this.destroy$), filter((e) => !!e))
|
|
12578
12962
|
.subscribe((event) => {
|
|
12579
|
-
if (isHotkey('mod', event)) {
|
|
12963
|
+
if (isHotkey('mod', event) && !this.readonly) {
|
|
12580
12964
|
this.tableStore.isModSelecting = true;
|
|
12581
12965
|
}
|
|
12582
12966
|
});
|
|
@@ -12600,8 +12984,8 @@ class TheTableComponent extends TheBaseElementComponent {
|
|
|
12600
12984
|
this.destroy$.complete();
|
|
12601
12985
|
}
|
|
12602
12986
|
}
|
|
12603
|
-
TheTableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.
|
|
12604
|
-
TheTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.
|
|
12987
|
+
TheTableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheTableComponent, deps: [{ token: i0.ElementRef }, { token: TableCellEventDispatcher }, { token: ColumnResizeNotifierSource }, { token: TableStore }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: TableService }, { token: TheTableContextMenuService }, { token: TableFreezeColumnPipe }], target: i0.ɵɵFactoryTarget.Component });
|
|
12988
|
+
TheTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: TheTableComponent, selector: "the-table, [theTable]", host: { listeners: { "mousedown": "handleMousedown($event)" } }, providers: [
|
|
12605
12989
|
TableStore,
|
|
12606
12990
|
TableService,
|
|
12607
12991
|
TheTableContextMenuService,
|
|
@@ -12612,8 +12996,8 @@ TheTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", vers
|
|
|
12612
12996
|
provide: TheTableToken,
|
|
12613
12997
|
useExisting: TheTableComponent
|
|
12614
12998
|
}
|
|
12615
|
-
], viewQueries: [{ propertyName: "tableWrapper", first: true, predicate: ["tableWrapper"], descendants: true, read: ElementRef, static: true }, { propertyName: "theTableElement", first: true, predicate: ["theTable"], descendants: true, read: ElementRef, static: true }, { propertyName: "tbodyElement", first: true, predicate: ["tbody"], descendants: true, read: ElementRef, static: true }], usesInheritance: true, ngImport: i0, template: "<div\n class=\"the-table-container\"\n theColumnResize\n [ngClass]=\"{\n 'the-table-with-controls': isInTable,\n 'the-numbered-column-container': element?.options?.numberedColumn,\n 'the-table-selection-hide': tableStore.isCellSelecting || tableStore.isRightClicking\n }\"\n>\n <div\n class=\"the-table-row-controls-wrapper\"\n [ngClass]=\"{\n 'the-table-focus': isInTable\n }\"\n >\n <div\n class=\"the-table-corner-controls\"\n [ngClass]=\"{\n visible: !readonly && isInTable,\n active: isSelectedAllCell,\n dangerous: tableStore.isSelectedTable && tableStore.dangerousCells.length > 0\n }\"\n >\n <div class=\"the-table-corner-button\" (mousedown)=\"onSelectTable($event)\"></div>\n <div class=\"the-table-corner-controls-insert-row-marker\">\n <the-table-insert-mark type=\"row\" [at]=\"0\" [tableStore]=\"tableStore\"></the-table-insert-mark>\n </div>\n <div class=\"the-table-corner-controls-insert-column-marker\">\n <the-table-insert-mark\n *ngIf=\"!element.options?.headerColumn\"\n type=\"column\"\n [at]=\"0\"\n [tableStore]=\"tableStore\"\n ></the-table-insert-mark>\n </div>\n </div>\n <div class=\"the-table-row-controls\">\n <div class=\"the-table-row-controls-inner\">\n <div\n class=\"the-table-row-controls-button-wrap\"\n *ngFor=\"let control of rowControls; let i = index; trackBy: trackByFnRowControls\"\n [ngClass]=\"{\n active: tableStore.selectedRowsIndex.includes(control.rowIndex),\n dangerous: tableStore.dangerousRowsIndex.includes(control.rowIndex) && tableStore.dangerousCells.length > 0\n }\"\n >\n <ng-container *ngIf=\"!readonly && isInTable && !element?.options?.numberedColumn\">\n <button\n (mousedown)=\"onRowMousedown($event, control.rowIndex)\"\n type=\"button\"\n [ngStyle]=\"{ height: control.height + 1 + 'px' }\"\n class=\"the-table-row-controls-button the-table-controls-button\"\n ></button>\n </ng-container>\n <ng-container *ngIf=\"element?.options?.numberedColumn\">\n <div\n [contentEditable]=\"false\"\n contenteditable=\"false\"\n (mousedown)=\"onRowMousedown($event, control.rowIndex)\"\n class=\"the-table-numbered-controls-button\"\n [ngStyle]=\"{ height: control.height + 1 + 'px' }\"\n >\n <p class=\"row-number d-flex align-items-center\">{{ i + 1 }}</p>\n </div>\n </ng-container>\n <the-table-insert-mark type=\"row\" [at]=\"control.rowIndex + 1\" [tableStore]=\"tableStore\"> </the-table-insert-mark>\n </div>\n </div>\n </div>\n </div>\n <div class=\"the-table-wrapper\" #tableWrapper [ngClass]=\"{ 'the-table-numbered': element?.options?.numberedColumn }\">\n <table class=\"the-table\" #theTable [ngClass]=\"{ 'the-table-with-controls': isInTable }\">\n <colgroup *ngIf=\"columns\">\n <col *ngFor=\"let col of columns\" [ngStyle]=\"{ width: col.width + 'px' }\" />\n </colgroup>\n <thead>\n <tr class=\"the-table-col-controls-wrapper\">\n <th\n #colControl\n class=\"the-table-col-controls\"\n [ngClass]=\"{\n 'the-sticky-cell': i === 0 && element | freezeColumn: tablePluginOptions,\n active: tableStore.selectedColumnsIndex.includes(i),\n dangerous: tableStore.dangerousColumnsIndex.includes(i) && tableStore.dangerousCells.length > 0\n }\"\n (mousedown)=\"onColMousedown($event, i)\"\n *ngFor=\"let control of colControls; let i = index; trackBy: trackByFnColControls\"\n >\n <the-table-insert-mark\n *ngIf=\"isInTable\"\n type=\"column\"\n [at]=\"i + 1\"\n [tableStore]=\"tableStore\"\n [parentElement]=\"colControl\"\n >\n </the-table-insert-mark>\n </th>\n </tr>\n </thead>\n <tbody #tbody>\n <slate-children [children]=\"children\" [context]=\"childrenContext\" [viewContext]=\"viewContext\"> </slate-children>\n </tbody>\n </table>\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: "component", type: i1.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }, { kind: "directive", type: TheColumnResizeDirective, selector: "div[theColumnResize]" }, { kind: "component", type: TheInsertMarkComponent, selector: "the-table-insert-mark", inputs: ["type", "at", "tableStore", "parentElement"] }, { kind: "pipe", type: TableFreezeColumnPipe, name: "freezeColumn" }] });
|
|
12616
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.
|
|
12999
|
+
], viewQueries: [{ propertyName: "tableWrapper", first: true, predicate: ["tableWrapper"], descendants: true, read: ElementRef, static: true }, { propertyName: "theTableElement", first: true, predicate: ["theTable"], descendants: true, read: ElementRef, static: true }, { propertyName: "tbodyElement", first: true, predicate: ["tbody"], descendants: true, read: ElementRef, static: true }], usesInheritance: true, ngImport: i0, template: "<div\n class=\"the-table-container\"\n theColumnResize\n [ngClass]=\"{\n 'the-table-with-controls': isInTable,\n 'the-numbered-column-container': element?.options?.numberedColumn,\n 'the-table-selection-hide': tableStore.isCellSelecting || tableStore.isRightClicking\n }\"\n>\n <div\n class=\"the-table-row-controls-wrapper\"\n [ngClass]=\"{\n 'the-table-focus': isInTable\n }\"\n >\n <div\n class=\"the-table-corner-controls\"\n [ngClass]=\"{\n visible: !readonly && isInTable,\n active: isSelectedAllCell,\n dangerous: tableStore.isSelectedTable && tableStore.dangerousCells.length > 0\n }\"\n >\n <div class=\"the-table-corner-button\" (mousedown)=\"onSelectTable($event)\"></div>\n <div class=\"the-table-corner-controls-insert-row-marker\">\n <the-table-insert-mark type=\"row\" [at]=\"0\" [tableStore]=\"tableStore\"></the-table-insert-mark>\n </div>\n <div class=\"the-table-corner-controls-insert-column-marker\">\n <the-table-insert-mark\n *ngIf=\"!element.options?.headerColumn\"\n type=\"column\"\n [at]=\"0\"\n [tableStore]=\"tableStore\"\n ></the-table-insert-mark>\n </div>\n </div>\n <div class=\"the-table-row-controls\">\n <div class=\"the-table-row-controls-inner\">\n <div\n class=\"the-table-row-controls-button-wrap\"\n *ngFor=\"let control of rowControls; let i = index; trackBy: trackByFnRowControls\"\n [ngClass]=\"{\n active: tableStore.selectedRowsIndex.includes(control.rowIndex),\n dangerous: tableStore.dangerousRowsIndex.includes(control.rowIndex) && tableStore.dangerousCells.length > 0\n }\"\n >\n <ng-container *ngIf=\"!readonly && isInTable && !element?.options?.numberedColumn\">\n <button\n (mousedown)=\"onRowMousedown($event, control.rowIndex)\"\n type=\"button\"\n [ngStyle]=\"{ height: control.height + 1 + 'px' }\"\n class=\"the-table-row-controls-button the-table-controls-button\"\n ></button>\n </ng-container>\n <ng-container *ngIf=\"element?.options?.numberedColumn\">\n <div\n [contentEditable]=\"false\"\n contenteditable=\"false\"\n (mousedown)=\"onRowMousedown($event, control.rowIndex)\"\n class=\"the-table-numbered-controls-button\"\n [ngStyle]=\"{ height: control.height + 1 + 'px' }\"\n >\n <p class=\"row-number d-flex align-items-center\">{{ headerRow && i === 0 ? '' : headerRow ? i : i + 1 }}</p>\n </div>\n </ng-container>\n <the-table-insert-mark type=\"row\" [at]=\"control.rowIndex + 1\" [tableStore]=\"tableStore\"> </the-table-insert-mark>\n </div>\n </div>\n </div>\n </div>\n <div class=\"the-table-wrapper\" #tableWrapper [ngClass]=\"{ 'the-table-numbered': element?.options?.numberedColumn }\">\n <table class=\"the-table\" #theTable [ngClass]=\"{ 'the-table-with-controls': isInTable }\">\n <colgroup *ngIf=\"columns\">\n <col *ngFor=\"let col of columns\" [ngStyle]=\"{ width: col.width + 'px' }\" />\n </colgroup>\n <thead>\n <tr class=\"the-table-col-controls-wrapper\">\n <th\n #colControl\n class=\"the-table-col-controls\"\n [ngClass]=\"{\n 'the-sticky-cell': i === 0 && element | freezeColumn: tablePluginOptions,\n active: tableStore.selectedColumnsIndex.includes(i),\n dangerous: tableStore.dangerousColumnsIndex.includes(i) && tableStore.dangerousCells.length > 0\n }\"\n (mousedown)=\"onColMousedown($event, i)\"\n *ngFor=\"let control of colControls; let i = index; trackBy: trackByFnColControls\"\n >\n <the-table-insert-mark\n *ngIf=\"isInTable\"\n type=\"column\"\n [at]=\"i + 1\"\n [tableStore]=\"tableStore\"\n [parentElement]=\"colControl\"\n >\n </the-table-insert-mark>\n </th>\n </tr>\n </thead>\n <tbody #tbody>\n <slate-children [children]=\"children\" [context]=\"childrenContext\" [viewContext]=\"viewContext\"> </slate-children>\n </tbody>\n </table>\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: "component", type: i1.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }, { kind: "directive", type: TheColumnResizeDirective, selector: "div[theColumnResize]" }, { kind: "component", type: TheInsertMarkComponent, selector: "the-table-insert-mark", inputs: ["type", "at", "tableStore", "parentElement"] }, { kind: "pipe", type: TableFreezeColumnPipe, name: "freezeColumn" }] });
|
|
13000
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheTableComponent, decorators: [{
|
|
12617
13001
|
type: Component,
|
|
12618
13002
|
args: [{ selector: 'the-table, [theTable]', providers: [
|
|
12619
13003
|
TableStore,
|
|
@@ -12626,7 +13010,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
12626
13010
|
provide: TheTableToken,
|
|
12627
13011
|
useExisting: TheTableComponent
|
|
12628
13012
|
}
|
|
12629
|
-
], template: "<div\n class=\"the-table-container\"\n theColumnResize\n [ngClass]=\"{\n 'the-table-with-controls': isInTable,\n 'the-numbered-column-container': element?.options?.numberedColumn,\n 'the-table-selection-hide': tableStore.isCellSelecting || tableStore.isRightClicking\n }\"\n>\n <div\n class=\"the-table-row-controls-wrapper\"\n [ngClass]=\"{\n 'the-table-focus': isInTable\n }\"\n >\n <div\n class=\"the-table-corner-controls\"\n [ngClass]=\"{\n visible: !readonly && isInTable,\n active: isSelectedAllCell,\n dangerous: tableStore.isSelectedTable && tableStore.dangerousCells.length > 0\n }\"\n >\n <div class=\"the-table-corner-button\" (mousedown)=\"onSelectTable($event)\"></div>\n <div class=\"the-table-corner-controls-insert-row-marker\">\n <the-table-insert-mark type=\"row\" [at]=\"0\" [tableStore]=\"tableStore\"></the-table-insert-mark>\n </div>\n <div class=\"the-table-corner-controls-insert-column-marker\">\n <the-table-insert-mark\n *ngIf=\"!element.options?.headerColumn\"\n type=\"column\"\n [at]=\"0\"\n [tableStore]=\"tableStore\"\n ></the-table-insert-mark>\n </div>\n </div>\n <div class=\"the-table-row-controls\">\n <div class=\"the-table-row-controls-inner\">\n <div\n class=\"the-table-row-controls-button-wrap\"\n *ngFor=\"let control of rowControls; let i = index; trackBy: trackByFnRowControls\"\n [ngClass]=\"{\n active: tableStore.selectedRowsIndex.includes(control.rowIndex),\n dangerous: tableStore.dangerousRowsIndex.includes(control.rowIndex) && tableStore.dangerousCells.length > 0\n }\"\n >\n <ng-container *ngIf=\"!readonly && isInTable && !element?.options?.numberedColumn\">\n <button\n (mousedown)=\"onRowMousedown($event, control.rowIndex)\"\n type=\"button\"\n [ngStyle]=\"{ height: control.height + 1 + 'px' }\"\n class=\"the-table-row-controls-button the-table-controls-button\"\n ></button>\n </ng-container>\n <ng-container *ngIf=\"element?.options?.numberedColumn\">\n <div\n [contentEditable]=\"false\"\n contenteditable=\"false\"\n (mousedown)=\"onRowMousedown($event, control.rowIndex)\"\n class=\"the-table-numbered-controls-button\"\n [ngStyle]=\"{ height: control.height + 1 + 'px' }\"\n >\n <p class=\"row-number d-flex align-items-center\">{{ i + 1 }}</p>\n </div>\n </ng-container>\n <the-table-insert-mark type=\"row\" [at]=\"control.rowIndex + 1\" [tableStore]=\"tableStore\"> </the-table-insert-mark>\n </div>\n </div>\n </div>\n </div>\n <div class=\"the-table-wrapper\" #tableWrapper [ngClass]=\"{ 'the-table-numbered': element?.options?.numberedColumn }\">\n <table class=\"the-table\" #theTable [ngClass]=\"{ 'the-table-with-controls': isInTable }\">\n <colgroup *ngIf=\"columns\">\n <col *ngFor=\"let col of columns\" [ngStyle]=\"{ width: col.width + 'px' }\" />\n </colgroup>\n <thead>\n <tr class=\"the-table-col-controls-wrapper\">\n <th\n #colControl\n class=\"the-table-col-controls\"\n [ngClass]=\"{\n 'the-sticky-cell': i === 0 && element | freezeColumn: tablePluginOptions,\n active: tableStore.selectedColumnsIndex.includes(i),\n dangerous: tableStore.dangerousColumnsIndex.includes(i) && tableStore.dangerousCells.length > 0\n }\"\n (mousedown)=\"onColMousedown($event, i)\"\n *ngFor=\"let control of colControls; let i = index; trackBy: trackByFnColControls\"\n >\n <the-table-insert-mark\n *ngIf=\"isInTable\"\n type=\"column\"\n [at]=\"i + 1\"\n [tableStore]=\"tableStore\"\n [parentElement]=\"colControl\"\n >\n </the-table-insert-mark>\n </th>\n </tr>\n </thead>\n <tbody #tbody>\n <slate-children [children]=\"children\" [context]=\"childrenContext\" [viewContext]=\"viewContext\"> </slate-children>\n </tbody>\n </table>\n </div>\n</div>\n" }]
|
|
13013
|
+
], template: "<div\n class=\"the-table-container\"\n theColumnResize\n [ngClass]=\"{\n 'the-table-with-controls': isInTable,\n 'the-numbered-column-container': element?.options?.numberedColumn,\n 'the-table-selection-hide': tableStore.isCellSelecting || tableStore.isRightClicking\n }\"\n>\n <div\n class=\"the-table-row-controls-wrapper\"\n [ngClass]=\"{\n 'the-table-focus': isInTable\n }\"\n >\n <div\n class=\"the-table-corner-controls\"\n [ngClass]=\"{\n visible: !readonly && isInTable,\n active: isSelectedAllCell,\n dangerous: tableStore.isSelectedTable && tableStore.dangerousCells.length > 0\n }\"\n >\n <div class=\"the-table-corner-button\" (mousedown)=\"onSelectTable($event)\"></div>\n <div class=\"the-table-corner-controls-insert-row-marker\">\n <the-table-insert-mark type=\"row\" [at]=\"0\" [tableStore]=\"tableStore\"></the-table-insert-mark>\n </div>\n <div class=\"the-table-corner-controls-insert-column-marker\">\n <the-table-insert-mark\n *ngIf=\"!element.options?.headerColumn\"\n type=\"column\"\n [at]=\"0\"\n [tableStore]=\"tableStore\"\n ></the-table-insert-mark>\n </div>\n </div>\n <div class=\"the-table-row-controls\">\n <div class=\"the-table-row-controls-inner\">\n <div\n class=\"the-table-row-controls-button-wrap\"\n *ngFor=\"let control of rowControls; let i = index; trackBy: trackByFnRowControls\"\n [ngClass]=\"{\n active: tableStore.selectedRowsIndex.includes(control.rowIndex),\n dangerous: tableStore.dangerousRowsIndex.includes(control.rowIndex) && tableStore.dangerousCells.length > 0\n }\"\n >\n <ng-container *ngIf=\"!readonly && isInTable && !element?.options?.numberedColumn\">\n <button\n (mousedown)=\"onRowMousedown($event, control.rowIndex)\"\n type=\"button\"\n [ngStyle]=\"{ height: control.height + 1 + 'px' }\"\n class=\"the-table-row-controls-button the-table-controls-button\"\n ></button>\n </ng-container>\n <ng-container *ngIf=\"element?.options?.numberedColumn\">\n <div\n [contentEditable]=\"false\"\n contenteditable=\"false\"\n (mousedown)=\"onRowMousedown($event, control.rowIndex)\"\n class=\"the-table-numbered-controls-button\"\n [ngStyle]=\"{ height: control.height + 1 + 'px' }\"\n >\n <p class=\"row-number d-flex align-items-center\">{{ headerRow && i === 0 ? '' : headerRow ? i : i + 1 }}</p>\n </div>\n </ng-container>\n <the-table-insert-mark type=\"row\" [at]=\"control.rowIndex + 1\" [tableStore]=\"tableStore\"> </the-table-insert-mark>\n </div>\n </div>\n </div>\n </div>\n <div class=\"the-table-wrapper\" #tableWrapper [ngClass]=\"{ 'the-table-numbered': element?.options?.numberedColumn }\">\n <table class=\"the-table\" #theTable [ngClass]=\"{ 'the-table-with-controls': isInTable }\">\n <colgroup *ngIf=\"columns\">\n <col *ngFor=\"let col of columns\" [ngStyle]=\"{ width: col.width + 'px' }\" />\n </colgroup>\n <thead>\n <tr class=\"the-table-col-controls-wrapper\">\n <th\n #colControl\n class=\"the-table-col-controls\"\n [ngClass]=\"{\n 'the-sticky-cell': i === 0 && element | freezeColumn: tablePluginOptions,\n active: tableStore.selectedColumnsIndex.includes(i),\n dangerous: tableStore.dangerousColumnsIndex.includes(i) && tableStore.dangerousCells.length > 0\n }\"\n (mousedown)=\"onColMousedown($event, i)\"\n *ngFor=\"let control of colControls; let i = index; trackBy: trackByFnColControls\"\n >\n <the-table-insert-mark\n *ngIf=\"isInTable\"\n type=\"column\"\n [at]=\"i + 1\"\n [tableStore]=\"tableStore\"\n [parentElement]=\"colControl\"\n >\n </the-table-insert-mark>\n </th>\n </tr>\n </thead>\n <tbody #tbody>\n <slate-children [children]=\"children\" [context]=\"childrenContext\" [viewContext]=\"viewContext\"> </slate-children>\n </tbody>\n </table>\n </div>\n</div>\n" }]
|
|
12630
13014
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: TableCellEventDispatcher }, { type: ColumnResizeNotifierSource }, { type: TableStore }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }, { type: TableService }, { type: TheTableContextMenuService }, { type: TableFreezeColumnPipe }]; }, propDecorators: { tableWrapper: [{
|
|
12631
13015
|
type: ViewChild,
|
|
12632
13016
|
args: ['tableWrapper', { read: ElementRef, static: true }]
|
|
@@ -12715,9 +13099,9 @@ class TheTableRowComponent extends TheBaseElementComponent {
|
|
|
12715
13099
|
}
|
|
12716
13100
|
}
|
|
12717
13101
|
}
|
|
12718
|
-
TheTableRowComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.
|
|
12719
|
-
TheTableRowComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.
|
|
12720
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.
|
|
13102
|
+
TheTableRowComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheTableRowComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
13103
|
+
TheTableRowComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: TheTableRowComponent, selector: "tr[theTableRow]", host: { properties: { "style.backgroundColor": "this.backgroundColor", "style.height": "this.height" } }, usesInheritance: true, ngImport: i0, template: '<slate-children [children]="children" [context]="childrenContext" [viewContext]="viewContext"></slate-children>', isInline: true, dependencies: [{ kind: "component", type: i1.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }] });
|
|
13104
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheTableRowComponent, decorators: [{
|
|
12721
13105
|
type: Component,
|
|
12722
13106
|
args: [{
|
|
12723
13107
|
selector: 'tr[theTableRow]',
|
|
@@ -12876,9 +13260,9 @@ class ColumnResizingStore {
|
|
|
12876
13260
|
this.resizeRows.pop();
|
|
12877
13261
|
}
|
|
12878
13262
|
}
|
|
12879
|
-
ColumnResizingStore.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.
|
|
12880
|
-
ColumnResizingStore.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.
|
|
12881
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.
|
|
13263
|
+
ColumnResizingStore.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ColumnResizingStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
13264
|
+
ColumnResizingStore.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ColumnResizingStore });
|
|
13265
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ColumnResizingStore, decorators: [{
|
|
12882
13266
|
type: Injectable
|
|
12883
13267
|
}], ctorParameters: function () { return []; } });
|
|
12884
13268
|
|
|
@@ -13033,9 +13417,9 @@ class TheColumnResizeOverlayHandleComponent {
|
|
|
13033
13417
|
this.destroyed.complete();
|
|
13034
13418
|
}
|
|
13035
13419
|
}
|
|
13036
|
-
TheColumnResizeOverlayHandleComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.
|
|
13037
|
-
TheColumnResizeOverlayHandleComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.
|
|
13038
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.
|
|
13420
|
+
TheColumnResizeOverlayHandleComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheColumnResizeOverlayHandleComponent, deps: [{ token: i0.ElementRef }, { token: i0.ViewContainerRef }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: ResizeRef }, { token: TableCellEventDispatcher }, { token: DOCUMENT }, { token: ColumnResizeNotifierSource }], target: i0.ɵɵFactoryTarget.Component });
|
|
13421
|
+
TheColumnResizeOverlayHandleComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: TheColumnResizeOverlayHandleComponent, selector: "ng-component", host: { classAttribute: "the-table-resize-overlay-thumb" }, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
13422
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheColumnResizeOverlayHandleComponent, decorators: [{
|
|
13039
13423
|
type: Component,
|
|
13040
13424
|
args: [{
|
|
13041
13425
|
host: { class: 'the-table-resize-overlay-thumb' },
|
|
@@ -13096,7 +13480,7 @@ const POSITION_MAP = {
|
|
|
13096
13480
|
}
|
|
13097
13481
|
};
|
|
13098
13482
|
class TheTdComponent extends TheBaseElementComponent {
|
|
13099
|
-
constructor(elementRef, cdr, renderer, viewContainerRef, ngZone, injector, overlay, resizingStore, scrollDispatcher) {
|
|
13483
|
+
constructor(elementRef, cdr, renderer, viewContainerRef, ngZone, injector, overlay, resizingStore, scrollDispatcher, freezeColumnPipe) {
|
|
13100
13484
|
super(elementRef, cdr);
|
|
13101
13485
|
this.elementRef = elementRef;
|
|
13102
13486
|
this.cdr = cdr;
|
|
@@ -13107,6 +13491,7 @@ class TheTdComponent extends TheBaseElementComponent {
|
|
|
13107
13491
|
this.overlay = overlay;
|
|
13108
13492
|
this.resizingStore = resizingStore;
|
|
13109
13493
|
this.scrollDispatcher = scrollDispatcher;
|
|
13494
|
+
this.freezeColumnPipe = freezeColumnPipe;
|
|
13110
13495
|
this.destroy$ = new Subject();
|
|
13111
13496
|
this.tableOptions = new TableOptions();
|
|
13112
13497
|
this.cellInnerMinHeight = null;
|
|
@@ -13244,15 +13629,15 @@ class TheTdComponent extends TheBaseElementComponent {
|
|
|
13244
13629
|
const table = this.tablePosition.table;
|
|
13245
13630
|
const tablePluginOptions = getPluginOptions(this.editor, PluginKeys.table);
|
|
13246
13631
|
// 标题列背景色
|
|
13247
|
-
if (colIndex === 0
|
|
13248
|
-
|
|
13249
|
-
|
|
13250
|
-
|
|
13251
|
-
|
|
13252
|
-
|
|
13253
|
-
|
|
13632
|
+
if (colIndex === 0) {
|
|
13633
|
+
if (table.options?.headerColumn) {
|
|
13634
|
+
this.renderer.addClass(this.elementRef.nativeElement, HEADER_CELL_CLASS);
|
|
13635
|
+
}
|
|
13636
|
+
else {
|
|
13637
|
+
this.renderer.removeClass(this.elementRef.nativeElement, HEADER_CELL_CLASS);
|
|
13638
|
+
}
|
|
13254
13639
|
// 标题列设置滚动时固定列
|
|
13255
|
-
if (
|
|
13640
|
+
if (this.freezeColumnPipe.transform(table, tablePluginOptions)) {
|
|
13256
13641
|
this.renderer.addClass(this.elementRef.nativeElement, STICKY_CELL_CLASS);
|
|
13257
13642
|
}
|
|
13258
13643
|
else {
|
|
@@ -13347,16 +13732,16 @@ class TheTdComponent extends TheBaseElementComponent {
|
|
|
13347
13732
|
fromEvent(element, 'mousedown')
|
|
13348
13733
|
.pipe(takeUntil(this.destroy$), filter((e) => e.button !== 2), map$1(event => event.target.closest(SLA_TABLE_CELL_SELECTOR)), filter(cell => !!cell))
|
|
13349
13734
|
.subscribe((cell) => {
|
|
13735
|
+
// 单选
|
|
13736
|
+
if (this.tableStore.isModSelecting) {
|
|
13737
|
+
this.tableStore.selectCell(cell, this.editor);
|
|
13738
|
+
}
|
|
13350
13739
|
this.tableStore.selectCellStart(cell, this.editor);
|
|
13351
13740
|
if (this.overlayRef) {
|
|
13352
13741
|
this.overlayRef.detach();
|
|
13353
13742
|
}
|
|
13354
13743
|
// 拖选
|
|
13355
13744
|
this.listenCellMouseEvents();
|
|
13356
|
-
// 单选
|
|
13357
|
-
if (this.tableStore.isModSelecting) {
|
|
13358
|
-
this.tableStore.selectCell(cell, this.editor);
|
|
13359
|
-
}
|
|
13360
13745
|
});
|
|
13361
13746
|
});
|
|
13362
13747
|
}
|
|
@@ -13375,7 +13760,7 @@ class TheTdComponent extends TheBaseElementComponent {
|
|
|
13375
13760
|
.pipe(take(1))
|
|
13376
13761
|
.subscribe(() => {
|
|
13377
13762
|
this.tableStore.selectCellEnd(this.editor);
|
|
13378
|
-
if (this.tableStore.isCellSelecting) {
|
|
13763
|
+
if (this.tableStore.isCellSelecting || this.tableStore.isModSelecting) {
|
|
13379
13764
|
this.ngZone.run(() => {
|
|
13380
13765
|
this.tableComponent.tableService.afterSelectedCells(this.tableStore.focusCellElement, this.tableComponent.element);
|
|
13381
13766
|
});
|
|
@@ -13755,12 +14140,12 @@ class TheTdComponent extends TheBaseElementComponent {
|
|
|
13755
14140
|
this.destroy$.complete();
|
|
13756
14141
|
}
|
|
13757
14142
|
}
|
|
13758
|
-
TheTdComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.
|
|
13759
|
-
TheTdComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.
|
|
13760
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.
|
|
14143
|
+
TheTdComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheTdComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i0.Renderer2 }, { token: i0.ViewContainerRef }, { token: i0.NgZone }, { token: i0.Injector }, { token: i2$1.Overlay }, { token: ColumnResizingStore }, { token: i2$1.ScrollDispatcher }, { token: TableFreezeColumnPipe }], target: i0.ɵɵFactoryTarget.Component });
|
|
14144
|
+
TheTdComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: TheTdComponent, selector: "td[theTd]", host: { properties: { "style.backgroundColor": "this.backgroundColor", "attr.colspan": "this.colspan", "attr.rowspan": "this.rowspan", "style.display": "this.display" } }, providers: [ColumnResizingStore], viewQueries: [{ propertyName: "cellInner", first: true, predicate: ["cellInner"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<div #cellInner>\n <slate-children [children]=\"children\" [context]=\"childrenContext\" [viewContext]=\"viewContext\"></slate-children>\n</div>\n", dependencies: [{ kind: "component", type: i1.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }] });
|
|
14145
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheTdComponent, decorators: [{
|
|
13761
14146
|
type: Component,
|
|
13762
14147
|
args: [{ selector: 'td[theTd]', providers: [ColumnResizingStore], template: "<div #cellInner>\n <slate-children [children]=\"children\" [context]=\"childrenContext\" [viewContext]=\"viewContext\"></slate-children>\n</div>\n" }]
|
|
13763
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i0.Renderer2 }, { type: i0.ViewContainerRef }, { type: i0.NgZone }, { type: i0.Injector }, { type: i2$1.Overlay }, { type: ColumnResizingStore }, { type: i2$1.ScrollDispatcher }]; }, propDecorators: { backgroundColor: [{
|
|
14148
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i0.Renderer2 }, { type: i0.ViewContainerRef }, { type: i0.NgZone }, { type: i0.Injector }, { type: i2$1.Overlay }, { type: ColumnResizingStore }, { type: i2$1.ScrollDispatcher }, { type: TableFreezeColumnPipe }]; }, propDecorators: { backgroundColor: [{
|
|
13764
14149
|
type: HostBinding,
|
|
13765
14150
|
args: ['style.backgroundColor']
|
|
13766
14151
|
}], colspan: [{
|
|
@@ -13851,8 +14236,8 @@ class TheTableToolbarItemComponent extends TheBaseToolbarItem {
|
|
|
13851
14236
|
return this.tableSelectRef;
|
|
13852
14237
|
}
|
|
13853
14238
|
}
|
|
13854
|
-
TheTableToolbarItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.
|
|
13855
|
-
TheTableToolbarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.
|
|
14239
|
+
TheTableToolbarItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheTableToolbarItemComponent, deps: [{ token: i1$1.ThyPopover }, { token: i2$1.Overlay }], target: i0.ɵɵFactoryTarget.Component });
|
|
14240
|
+
TheTableToolbarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: TheTableToolbarItemComponent, selector: "the-table-toolbar-item", host: { classAttribute: "the-toolbar-dropdown-container" }, usesInheritance: true, ngImport: i0, template: `
|
|
13856
14241
|
<a
|
|
13857
14242
|
href="javascript:;"
|
|
13858
14243
|
class="link-with-down"
|
|
@@ -13866,8 +14251,8 @@ TheTableToolbarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14
|
|
|
13866
14251
|
>
|
|
13867
14252
|
<thy-icon class="link-down-icon font-size-sm text-desc ml-1" thyIconName="caret-down"> </thy-icon>
|
|
13868
14253
|
</a>
|
|
13869
|
-
`, isInline: true, dependencies: [{ kind: "component", type:
|
|
13870
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.
|
|
14254
|
+
`, isInline: true, dependencies: [{ 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.ThyActionComponent, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }] });
|
|
14255
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheTableToolbarItemComponent, decorators: [{
|
|
13871
14256
|
type: Component,
|
|
13872
14257
|
args: [{
|
|
13873
14258
|
selector: 'the-table-toolbar-item',
|
|
@@ -14329,7 +14714,7 @@ class TheTodoItemComponent extends TheBaseElementComponent {
|
|
|
14329
14714
|
return this.editableWithReadonly && this.readonly;
|
|
14330
14715
|
}
|
|
14331
14716
|
get level() {
|
|
14332
|
-
return this.element?.indent;
|
|
14717
|
+
return this.element?.indent || null;
|
|
14333
14718
|
}
|
|
14334
14719
|
get editableWithReadonly() {
|
|
14335
14720
|
return getPluginOptions(this.editor, PluginKeys.checkItem)?.editableWithReadonly;
|
|
@@ -14344,14 +14729,14 @@ class TheTodoItemComponent extends TheBaseElementComponent {
|
|
|
14344
14729
|
setNode(this.editor, { checked }, this.element);
|
|
14345
14730
|
}
|
|
14346
14731
|
}
|
|
14347
|
-
TheTodoItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.
|
|
14348
|
-
TheTodoItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.
|
|
14732
|
+
TheTodoItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheTodoItemComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: TheContextService }], target: i0.ɵɵFactoryTarget.Component });
|
|
14733
|
+
TheTodoItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: TheTodoItemComponent, selector: "div[theTodoItem]", host: { properties: { "class.the-check-item": "this.checkItemClass", "class.the-todo-item-selectable": "this.checkItemSelectable", "attr.the-level": "this.level" } }, usesInheritance: true, ngImport: i0, template: `
|
|
14349
14734
|
<span contenteditable="false" class="todo-item-status">
|
|
14350
14735
|
<input #checkbox type="checkbox" [checked]="element.checked" (click)="onCheck(checkbox.checked)" />
|
|
14351
14736
|
</span>
|
|
14352
14737
|
<span><slate-children [children]="children" [context]="childrenContext" [viewContext]="viewContext"></slate-children></span>
|
|
14353
14738
|
`, isInline: true, dependencies: [{ kind: "component", type: i1.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }] });
|
|
14354
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.
|
|
14739
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheTodoItemComponent, decorators: [{
|
|
14355
14740
|
type: Component,
|
|
14356
14741
|
args: [{
|
|
14357
14742
|
selector: 'div[theTodoItem]',
|
|
@@ -14617,15 +15002,15 @@ class TheInlineToolbarComponent {
|
|
|
14617
15002
|
this.destroy$.complete();
|
|
14618
15003
|
}
|
|
14619
15004
|
}
|
|
14620
|
-
TheInlineToolbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.
|
|
14621
|
-
TheInlineToolbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.
|
|
15005
|
+
TheInlineToolbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheInlineToolbarComponent, deps: [{ token: i0.ElementRef }, { token: i2$1.ScrollDispatcher }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: TheContextService }], target: i0.ɵɵFactoryTarget.Component });
|
|
15006
|
+
TheInlineToolbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: TheInlineToolbarComponent, selector: "the-inline-toolbar", inputs: { editor: "editor", toolbarItems: "toolbarItems" }, host: { properties: { "class.hide": "toolbarItems.length === 0" } }, viewQueries: [{ propertyName: "inlineToolbar", first: true, predicate: ["inlineToolbar"], descendants: true }], ngImport: i0, template: `<the-toolbar
|
|
14622
15007
|
#inlineToolbar
|
|
14623
15008
|
class="the-inline-toolbar"
|
|
14624
15009
|
[editor]="editor"
|
|
14625
15010
|
[toolbarItems]="toolbarItems"
|
|
14626
15011
|
[isMore]="false"
|
|
14627
15012
|
></the-toolbar> `, isInline: true, dependencies: [{ kind: "component", type: TheToolbarComponent, selector: "the-toolbar", inputs: ["editor", "toolbarItems", "align", "containerClass", "isMore", "afterTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
14628
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.
|
|
15013
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheInlineToolbarComponent, decorators: [{
|
|
14629
15014
|
type: Component,
|
|
14630
15015
|
args: [{
|
|
14631
15016
|
selector: 'the-inline-toolbar',
|
|
@@ -14742,9 +15127,9 @@ class TheQuickInsertComponent {
|
|
|
14742
15127
|
}, 100);
|
|
14743
15128
|
}
|
|
14744
15129
|
}
|
|
14745
|
-
TheQuickInsertComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.
|
|
14746
|
-
TheQuickInsertComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.
|
|
14747
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.
|
|
15130
|
+
TheQuickInsertComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheQuickInsertComponent, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
15131
|
+
TheQuickInsertComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: TheQuickInsertComponent, selector: "[theQuickInsert]", inputs: { editor: "editor", isVisible: "isVisible" }, host: { listeners: { "mousedown": "handleMousedownNativeElement($event)" }, properties: { "class": "this.className" } }, viewQueries: [{ propertyName: "iconElement", first: true, predicate: ["iconElement"], descendants: true, read: ElementRef }], ngImport: i0, template: "<thy-icon\n #iconElement\n [thyIconName]=\"displayIconName\"\n class=\"quick-insert-icon text-desc font-size-xlg\"\n (mouseenter)=\"mouseEnter($event)\"\n (mouseleave)=\"mouseLeave($event)\"\n (mousedown)=\"handleClick($event)\"\n></thy-icon>\n", dependencies: [{ kind: "component", type: i4.ThyIconComponent, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }] });
|
|
15132
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheQuickInsertComponent, decorators: [{
|
|
14748
15133
|
type: Component,
|
|
14749
15134
|
args: [{ selector: '[theQuickInsert]', template: "<thy-icon\n #iconElement\n [thyIconName]=\"displayIconName\"\n class=\"quick-insert-icon text-desc font-size-xlg\"\n (mouseenter)=\"mouseEnter($event)\"\n (mouseleave)=\"mouseLeave($event)\"\n (mousedown)=\"handleClick($event)\"\n></thy-icon>\n" }]
|
|
14750
15135
|
}], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { className: [{
|
|
@@ -15126,8 +15511,8 @@ class TheEditorComponent extends mixinUnsubscribe(MixinBase) {
|
|
|
15126
15511
|
};
|
|
15127
15512
|
}
|
|
15128
15513
|
}
|
|
15129
|
-
TheEditorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.
|
|
15130
|
-
TheEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.
|
|
15514
|
+
TheEditorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheEditorComponent, deps: [{ token: TheContextService }, { token: i0.ViewContainerRef }, { token: i0.ElementRef }, { token: i2$2.ScrollDispatcher }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }, { token: i4.ThyIconRegistry }], target: i0.ɵɵFactoryTarget.Component });
|
|
15515
|
+
TheEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", 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: [
|
|
15131
15516
|
TheContextService,
|
|
15132
15517
|
TheColorSelectService,
|
|
15133
15518
|
{
|
|
@@ -15135,8 +15520,8 @@ TheEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", ver
|
|
|
15135
15520
|
useExisting: forwardRef(() => TheEditorComponent),
|
|
15136
15521
|
multi: true
|
|
15137
15522
|
}
|
|
15138
|
-
], 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:
|
|
15139
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.
|
|
15523
|
+
], 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: 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$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 });
|
|
15524
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheEditorComponent, decorators: [{
|
|
15140
15525
|
type: Component,
|
|
15141
15526
|
args: [{ selector: 'the-editor, theEditor', providers: [
|
|
15142
15527
|
TheContextService,
|
|
@@ -15150,7 +15535,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
15150
15535
|
class: 'the-editor',
|
|
15151
15536
|
'[class.the-editor-readonly]': 'theOptions?.readonly'
|
|
15152
15537
|
}, changeDetection: ChangeDetectionStrategy.OnPush, 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" }]
|
|
15153
|
-
}], ctorParameters: function () { return [{ type: TheContextService }, { type: i0.ViewContainerRef }, { type: i0.ElementRef }, { type: i2$
|
|
15538
|
+
}], ctorParameters: function () { return [{ type: TheContextService }, { type: i0.ViewContainerRef }, { type: i0.ElementRef }, { type: i2$2.ScrollDispatcher }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }, { type: i4.ThyIconRegistry }]; }, propDecorators: { theOptions: [{
|
|
15154
15539
|
type: Input
|
|
15155
15540
|
}], thePlugins: [{
|
|
15156
15541
|
type: Input
|
|
@@ -15183,10 +15568,10 @@ const ENTRY_COMMON_COMPONENTS = [TheColumnResizeOverlayHandleComponent];
|
|
|
15183
15568
|
const DIRECTIVES = [TheColumnResizeDirective];
|
|
15184
15569
|
class TheColumnResizeCommonModule {
|
|
15185
15570
|
}
|
|
15186
|
-
TheColumnResizeCommonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.
|
|
15187
|
-
TheColumnResizeCommonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.
|
|
15188
|
-
TheColumnResizeCommonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.
|
|
15189
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.
|
|
15571
|
+
TheColumnResizeCommonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheColumnResizeCommonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
15572
|
+
TheColumnResizeCommonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.0", ngImport: i0, type: TheColumnResizeCommonModule, declarations: [TheColumnResizeOverlayHandleComponent], exports: [TheColumnResizeOverlayHandleComponent] });
|
|
15573
|
+
TheColumnResizeCommonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheColumnResizeCommonModule });
|
|
15574
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheColumnResizeCommonModule, decorators: [{
|
|
15190
15575
|
type: NgModule,
|
|
15191
15576
|
args: [{
|
|
15192
15577
|
declarations: ENTRY_COMMON_COMPONENTS,
|
|
@@ -15195,10 +15580,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
15195
15580
|
}] });
|
|
15196
15581
|
class TheColumnSizeModule {
|
|
15197
15582
|
}
|
|
15198
|
-
TheColumnSizeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.
|
|
15199
|
-
TheColumnSizeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.
|
|
15200
|
-
TheColumnSizeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.
|
|
15201
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.
|
|
15583
|
+
TheColumnSizeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheColumnSizeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
15584
|
+
TheColumnSizeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.0", ngImport: i0, type: TheColumnSizeModule, declarations: [TheColumnResizeDirective], imports: [OverlayModule, TheColumnResizeCommonModule], exports: [TheColumnResizeDirective] });
|
|
15585
|
+
TheColumnSizeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheColumnSizeModule, imports: [OverlayModule, TheColumnResizeCommonModule] });
|
|
15586
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheColumnSizeModule, decorators: [{
|
|
15202
15587
|
type: NgModule,
|
|
15203
15588
|
args: [{
|
|
15204
15589
|
imports: [OverlayModule, TheColumnResizeCommonModule],
|
|
@@ -15207,122 +15592,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
15207
15592
|
}]
|
|
15208
15593
|
}] });
|
|
15209
15594
|
|
|
15210
|
-
class TheToolbarGroupComponent {
|
|
15211
|
-
constructor(elementRef, thyPopover, viewContainerRef) {
|
|
15212
|
-
this.elementRef = elementRef;
|
|
15213
|
-
this.thyPopover = thyPopover;
|
|
15214
|
-
this.viewContainerRef = viewContainerRef;
|
|
15215
|
-
this.className = 'the-toolbar-group';
|
|
15216
|
-
this.active = false;
|
|
15217
|
-
}
|
|
15218
|
-
set item(i) {
|
|
15219
|
-
this._item = i;
|
|
15220
|
-
this.activeMenuItem = i;
|
|
15221
|
-
}
|
|
15222
|
-
get item() {
|
|
15223
|
-
return this._item;
|
|
15224
|
-
}
|
|
15225
|
-
get isOpened() {
|
|
15226
|
-
return this.groupPopoverRef && this.groupPopoverRef.getOverlayRef() && this.groupPopoverRef.getOverlayRef().hasAttached();
|
|
15227
|
-
}
|
|
15228
|
-
mousedownHandler(event) {
|
|
15229
|
-
event.preventDefault();
|
|
15230
|
-
this.toggleGroupMenus(event);
|
|
15231
|
-
}
|
|
15232
|
-
documentMouseupHandle(event) {
|
|
15233
|
-
const isGroup = event.target.closest('.the-toolbar-group');
|
|
15234
|
-
const isGroupContainer = event.target.closest('.the-toolbar-group-container');
|
|
15235
|
-
if (!isGroupContainer && !isGroup && this.isOpened) {
|
|
15236
|
-
this.closeGroup();
|
|
15237
|
-
}
|
|
15238
|
-
}
|
|
15239
|
-
clickHandle(event) {
|
|
15240
|
-
event.stopPropagation();
|
|
15241
|
-
}
|
|
15242
|
-
ngOnInit() { }
|
|
15243
|
-
ngOnDestroy() {
|
|
15244
|
-
this.closeGroup();
|
|
15245
|
-
}
|
|
15246
|
-
toggleGroupMenus(event) {
|
|
15247
|
-
if (this.editor?.disabled) {
|
|
15248
|
-
return;
|
|
15249
|
-
}
|
|
15250
|
-
if (this.isOpened) {
|
|
15251
|
-
this.closeGroup();
|
|
15252
|
-
}
|
|
15253
|
-
else {
|
|
15254
|
-
this.openGroup(event);
|
|
15255
|
-
}
|
|
15256
|
-
}
|
|
15257
|
-
selectionChange(editor) {
|
|
15258
|
-
const activeItem = this.menusActive(editor);
|
|
15259
|
-
this.activeMenuItem = activeItem ? activeItem : null;
|
|
15260
|
-
this.activeChange();
|
|
15261
|
-
}
|
|
15262
|
-
menusActive(editor) {
|
|
15263
|
-
return this.menus.find(i => {
|
|
15264
|
-
if (this.editor?.selection && i?.active) {
|
|
15265
|
-
return i?.active(editor);
|
|
15266
|
-
}
|
|
15267
|
-
});
|
|
15268
|
-
}
|
|
15269
|
-
activeChange() {
|
|
15270
|
-
const activeItem = this.menusActive(this.editor);
|
|
15271
|
-
if (this.isOpened && !activeItem) {
|
|
15272
|
-
this.active = false;
|
|
15273
|
-
return;
|
|
15274
|
-
}
|
|
15275
|
-
this.active = activeItem ? true : false;
|
|
15276
|
-
}
|
|
15277
|
-
openGroup(event) {
|
|
15278
|
-
this.active = true;
|
|
15279
|
-
this.groupPopoverRef = this.thyPopover.open(this.groupTemplate, {
|
|
15280
|
-
panelClass: 'the-toolbar-group-container',
|
|
15281
|
-
offset: 0,
|
|
15282
|
-
minWidth: 0,
|
|
15283
|
-
placement: 'bottomRight',
|
|
15284
|
-
origin: event.currentTarget,
|
|
15285
|
-
viewContainerRef: this.viewContainerRef,
|
|
15286
|
-
hasBackdrop: false,
|
|
15287
|
-
outsideClosable: true,
|
|
15288
|
-
manualClosure: true
|
|
15289
|
-
});
|
|
15290
|
-
this.groupPopoverRef.afterClosed().subscribe(() => {
|
|
15291
|
-
this.activeChange();
|
|
15292
|
-
});
|
|
15293
|
-
}
|
|
15294
|
-
closeGroup() {
|
|
15295
|
-
if (this.isOpened) {
|
|
15296
|
-
this.groupPopoverRef.close();
|
|
15297
|
-
}
|
|
15298
|
-
}
|
|
15299
|
-
}
|
|
15300
|
-
TheToolbarGroupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheToolbarGroupComponent, deps: [{ token: i0.ElementRef }, { token: i1$1.ThyPopover }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
15301
|
-
TheToolbarGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: TheToolbarGroupComponent, selector: "the-toolbar-group", inputs: { menus: "menus", item: "item" }, host: { listeners: { "mousedown": "mousedownHandler($event)", "document:mouseup": "documentMouseupHandle($event)", "click": "clickHandle($event)" }, properties: { "class": "this.className" } }, viewQueries: [{ propertyName: "groupTemplate", first: true, predicate: ["groupTemplate"], descendants: true, read: TemplateRef, static: true }], ngImport: i0, template: "<a\n href=\"javascript:;\"\n thyAction\n [thyActionIcon]=\"item.icon\"\n [thyActionActive]=\"active\"\n [thyTooltip]=\"item?.name\"\n thyTooltipPlacement=\"top\"\n></a>\n\n<ng-template #groupTemplate>\n <the-toolbar class=\"group\" [editor]=\"editor\" [toolbarItems]=\"menus\" [isMore]=\"false\"></the-toolbar>\n</ng-template>\n", dependencies: [{ 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.ThyActionComponent, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }, { kind: "component", type: TheToolbarComponent, selector: "the-toolbar", inputs: ["editor", "toolbarItems", "align", "containerClass", "isMore", "afterTemplate"] }] });
|
|
15302
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TheToolbarGroupComponent, decorators: [{
|
|
15303
|
-
type: Component,
|
|
15304
|
-
args: [{ selector: 'the-toolbar-group', template: "<a\n href=\"javascript:;\"\n thyAction\n [thyActionIcon]=\"item.icon\"\n [thyActionActive]=\"active\"\n [thyTooltip]=\"item?.name\"\n thyTooltipPlacement=\"top\"\n></a>\n\n<ng-template #groupTemplate>\n <the-toolbar class=\"group\" [editor]=\"editor\" [toolbarItems]=\"menus\" [isMore]=\"false\"></the-toolbar>\n</ng-template>\n" }]
|
|
15305
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1$1.ThyPopover }, { type: i0.ViewContainerRef }]; }, propDecorators: { className: [{
|
|
15306
|
-
type: HostBinding,
|
|
15307
|
-
args: ['class']
|
|
15308
|
-
}], menus: [{
|
|
15309
|
-
type: Input
|
|
15310
|
-
}], item: [{
|
|
15311
|
-
type: Input
|
|
15312
|
-
}], groupTemplate: [{
|
|
15313
|
-
type: ViewChild,
|
|
15314
|
-
args: ['groupTemplate', { read: TemplateRef, static: true }]
|
|
15315
|
-
}], mousedownHandler: [{
|
|
15316
|
-
type: HostListener,
|
|
15317
|
-
args: ['mousedown', ['$event']]
|
|
15318
|
-
}], documentMouseupHandle: [{
|
|
15319
|
-
type: HostListener,
|
|
15320
|
-
args: ['document:mouseup', ['$event']]
|
|
15321
|
-
}], clickHandle: [{
|
|
15322
|
-
type: HostListener,
|
|
15323
|
-
args: ['click', ['$event']]
|
|
15324
|
-
}] } });
|
|
15325
|
-
|
|
15326
15595
|
const TETHYS = [
|
|
15327
15596
|
ThyIconModule,
|
|
15328
15597
|
ThyAvatarModule,
|
|
@@ -15347,7 +15616,8 @@ const TETHYS = [
|
|
|
15347
15616
|
ThyDropdownModule,
|
|
15348
15617
|
ThyMenuModule,
|
|
15349
15618
|
ThyEmptyModule,
|
|
15350
|
-
ThyPopoverModule
|
|
15619
|
+
ThyPopoverModule,
|
|
15620
|
+
ThyInputNumberModule
|
|
15351
15621
|
];
|
|
15352
15622
|
const COMPONENTS = [
|
|
15353
15623
|
TheToolbarComponent,
|
|
@@ -15395,8 +15665,8 @@ const PLUGIN_COMPONENTS = [
|
|
|
15395
15665
|
const PIPES = [ElementStylePipe, ElementClassPipe, TableFreezeColumnPipe];
|
|
15396
15666
|
class TheEditorModule {
|
|
15397
15667
|
}
|
|
15398
|
-
TheEditorModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.
|
|
15399
|
-
TheEditorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.
|
|
15668
|
+
TheEditorModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheEditorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
15669
|
+
TheEditorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.0", ngImport: i0, type: TheEditorModule, declarations: [TheEditorComponent, ElementStylePipe, ElementClassPipe, TableFreezeColumnPipe, TheToolbarComponent,
|
|
15400
15670
|
TheToolbarDropdownComponent,
|
|
15401
15671
|
TheToolbarGroupComponent,
|
|
15402
15672
|
TheToolbarItemComponent,
|
|
@@ -15456,7 +15726,8 @@ TheEditorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version
|
|
|
15456
15726
|
ThyDropdownModule,
|
|
15457
15727
|
ThyMenuModule,
|
|
15458
15728
|
ThyEmptyModule,
|
|
15459
|
-
ThyPopoverModule,
|
|
15729
|
+
ThyPopoverModule,
|
|
15730
|
+
ThyInputNumberModule, CodemirrorModule, TheColumnSizeModule], exports: [TheEditorComponent,
|
|
15460
15731
|
TheToolbarComponent,
|
|
15461
15732
|
TheToolbarDropdownComponent,
|
|
15462
15733
|
TheToolbarItemComponent,
|
|
@@ -15466,14 +15737,14 @@ TheEditorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version
|
|
|
15466
15737
|
TheListboxGroupDirective,
|
|
15467
15738
|
TheListboxDirective,
|
|
15468
15739
|
ThePreventDefaultDirective] });
|
|
15469
|
-
TheEditorModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.
|
|
15740
|
+
TheEditorModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheEditorModule, providers: [
|
|
15470
15741
|
{
|
|
15471
15742
|
provide: TheToolbarGroupToken,
|
|
15472
15743
|
useValue: TheToolbarGroupComponent
|
|
15473
15744
|
},
|
|
15474
15745
|
THE_MODE_PROVIDER
|
|
15475
15746
|
], imports: [CommonModule, ScrollingModule, SlateModule, FormsModule, TETHYS, CodemirrorModule, TheColumnSizeModule] });
|
|
15476
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.
|
|
15747
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheEditorModule, decorators: [{
|
|
15477
15748
|
type: NgModule,
|
|
15478
15749
|
args: [{
|
|
15479
15750
|
declarations: [TheEditorComponent, ...PIPES, ...COMPONENTS, ...PLUGIN_COMPONENTS],
|
|
@@ -15538,9 +15809,9 @@ class TheToolbarService {
|
|
|
15538
15809
|
});
|
|
15539
15810
|
}
|
|
15540
15811
|
}
|
|
15541
|
-
TheToolbarService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.
|
|
15542
|
-
TheToolbarService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.
|
|
15543
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.
|
|
15812
|
+
TheToolbarService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheToolbarService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
15813
|
+
TheToolbarService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheToolbarService });
|
|
15814
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheToolbarService, decorators: [{
|
|
15544
15815
|
type: Injectable
|
|
15545
15816
|
}] });
|
|
15546
15817
|
|
|
@@ -15558,5 +15829,5 @@ const withTestPlugin = (plugins, initValue) => {
|
|
|
15558
15829
|
* Generated bundle index. Do not edit.
|
|
15559
15830
|
*/
|
|
15560
15831
|
|
|
15561
|
-
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, DEFAULT_LANGUAGE, DEFAULT_SCROLL_CONTAINER, DISABLED_OPERATE_TYPES, DefaultElementOptions, DefaultGlobalToolbarDefinition, DefaultInlineToolbarDefinition, DefaultPluginMenu, DropdownMode, ELEMENT_UNIQUE_ID, ElementKinds, ErrorCodes, FontSizeTypes, FontSizes, HEADING_TYPES, HeadingEditor, 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, QuickInsertEditor, STANDARD_HEADING_TYPES, 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, TableEditor, 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, autoScrollViewHandle, base64toBlob, buildPluginMenu, buildPluginMenuItemMap, coercePixelsFromCssValue, combinePlugins, copyNode, 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, internalPlugins, isCleanEmptyParagraph, isDirectionKeydown, isPureEmptyParagraph, mergeArray, mergeDeepPlugins, mergeElementOptions, mergeOptions, nestedStructureByKey, plainToTheia, pluginsByKey, recursionNodes, refocus, setEditorUUID, setRefocusSelection, useElementStyle, withMention, withTestPlugin, withTheia };
|
|
15832
|
+
export { ALIGN_BLOCK_TYPES, A_TAG_REL_ATTR, AlignEditor, Alignment, BLOCK_DELETE_BACKWARD_TYPES, BackgroundColors, BlockquoteEditor, CLIPBOARD_FORMAT_KEY, CODEMIRROR_PADDING_TOP, CODE_MODES, COMPONENTS, CONTAINER_BLOCKS, CONTROL_KEY, CodeEditor, ColorEditor, Colors, 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, SpecialBackgroundColor, SpecialTextColor, 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, autoScrollViewHandle, base64toBlob, buildPluginMenu, buildPluginMenuItemMap, coercePixelsFromCssValue, combinePlugins, copyNode, 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, internalPlugins, isCleanEmptyParagraph, isDirectionKeydown, isPureEmptyParagraph, mergeArray, mergeDeepPlugins, mergeElementOptions, mergeOptions, nestedStructureByKey, plainToTheia, pluginsByKey, recursionNodes, refocus, setEditorUUID, setRefocusSelection, useElementStyle, withMention, withTestPlugin, withTheia };
|
|
15562
15833
|
//# sourceMappingURL=worktile-theia.mjs.map
|