@worktile/theia 15.0.17 → 15.0.19
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/action/prevent-default.d.ts +1 -1
- package/components/color-select/color-select.component.d.ts +1 -1
- package/components/column-resize/column-resize.directive.d.ts +1 -1
- package/components/column-resize/overlay-handle.component.d.ts +1 -1
- package/components/contextmenu/contextmenu.component.d.ts +1 -1
- package/components/conversion-hint/conversion-hint.component.d.ts +1 -1
- package/components/element/element.component.d.ts +1 -1
- package/components/inline-toolbar/inline-toolbar.component.d.ts +1 -1
- package/components/listbox/listbox.d.ts +3 -3
- package/components/listbox/listbox.type.d.ts +1 -1
- package/components/plugin-menu/plugin-menu.component.d.ts +1 -1
- package/components/table-select/table-select.component.d.ts +1 -1
- package/components/template/template.component.d.ts +1 -1
- package/components/text/text.component.d.ts +1 -1
- package/components/toolbar/toolbar.component.d.ts +1 -1
- package/components/toolbar-dropdown/toolbar-dropdown.component.d.ts +1 -1
- package/components/toolbar-group/toolbar-group.component.d.ts +1 -1
- package/components/toolbar-item/toolbar-item.component.d.ts +1 -1
- package/constants/color-select.d.ts +1 -1
- package/core/toolbar-item/base-toolbar-item.d.ts +2 -2
- package/custom-types.d.ts +6 -6
- package/editor.component.d.ts +2 -4
- package/esm2020/components/action/prevent-default.mjs +3 -3
- package/esm2020/components/color-select/color-select.component.mjs +9 -9
- package/esm2020/components/column-resize/column-resize-notifier.mjs +3 -3
- package/esm2020/components/column-resize/column-resize.directive.mjs +3 -3
- package/esm2020/components/column-resize/column-resize.module.mjs +8 -8
- package/esm2020/components/column-resize/event-dispatcher.mjs +3 -3
- package/esm2020/components/column-resize/overlay-handle.component.mjs +3 -3
- package/esm2020/components/column-resize/resizing.store.mjs +3 -3
- package/esm2020/components/contextmenu/contextmenu.component.mjs +10 -10
- package/esm2020/components/conversion-hint/conversion-hint.component.mjs +3 -3
- package/esm2020/components/element/element.component.mjs +3 -3
- package/esm2020/components/inline-toolbar/inline-toolbar.component.mjs +3 -3
- package/esm2020/components/listbox/listbox.mjs +16 -16
- package/esm2020/components/plugin-menu/plugin-menu.component.mjs +3 -3
- package/esm2020/components/table-select/table-select.component.mjs +3 -3
- package/esm2020/components/template/template.component.mjs +3 -3
- package/esm2020/components/text/text.component.mjs +3 -3
- package/esm2020/components/toolbar/toolbar.component.mjs +7 -7
- package/esm2020/components/toolbar-dropdown/toolbar-dropdown.component.mjs +14 -14
- package/esm2020/components/toolbar-group/toolbar-group.component.mjs +11 -11
- package/esm2020/components/toolbar-item/toolbar-item.component.mjs +7 -7
- package/esm2020/core/toolbar-item/base-toolbar-item.mjs +6 -6
- package/esm2020/editor.component.mjs +26 -26
- package/esm2020/editor.module.mjs +4 -4
- package/esm2020/interfaces/view-base.mjs +3 -3
- package/esm2020/pipes.mjs +6 -6
- package/esm2020/plugins/blockquote/blockquote.component.mjs +3 -3
- package/esm2020/plugins/code/code.component.mjs +10 -10
- package/esm2020/plugins/color/toolbar-item.component.mjs +7 -7
- package/esm2020/plugins/hr/hr.component.mjs +3 -3
- package/esm2020/plugins/image/image.component.mjs +13 -13
- package/esm2020/plugins/inline-code/inline-code.component.mjs +3 -3
- package/esm2020/plugins/link/edit/link-edit.component.mjs +9 -9
- package/esm2020/plugins/link/hover/link-hover.component.mjs +3 -3
- package/esm2020/plugins/link/link.component.mjs +13 -13
- package/esm2020/plugins/list/components/bulleted-list.component.mjs +7 -7
- package/esm2020/plugins/list/components/list-item.component.mjs +3 -3
- package/esm2020/plugins/list/components/numbered-list.component.mjs +9 -9
- package/esm2020/plugins/mention/suggestion.component.mjs +3 -3
- package/esm2020/plugins/quick-insert/components/quick-insert.component.mjs +8 -8
- package/esm2020/plugins/table/components/insert-mark/insert-mark.component.mjs +24 -13
- package/esm2020/plugins/table/components/row/row.component.mjs +6 -8
- package/esm2020/plugins/table/components/table.component.mjs +46 -135
- package/esm2020/plugins/table/components/td/td.component.mjs +22 -23
- package/esm2020/plugins/table/components/toolbar/table-options.component.mjs +8 -7
- package/esm2020/plugins/table/components/toolbar/table-toolbar.component.mjs +24 -19
- package/esm2020/plugins/table/table.editor.mjs +5 -6
- package/esm2020/plugins/table/table.pipe.mjs +6 -6
- package/esm2020/plugins/table/table.plugin.mjs +72 -28
- package/esm2020/plugins/table/table.service.mjs +7 -7
- package/esm2020/plugins/table/table.store.mjs +63 -179
- package/esm2020/plugins/table/toolbar-item.component.mjs +7 -7
- package/esm2020/plugins/table/transforms/clear-table-node.mjs +3 -3
- package/esm2020/plugins/table/transforms/insert-column.mjs +4 -3
- package/esm2020/plugins/table/transforms/insert-row.mjs +4 -3
- package/esm2020/plugins/table/transforms/remove-column.mjs +3 -3
- package/esm2020/plugins/table/transforms/remove-row.mjs +3 -5
- package/esm2020/plugins/table/transforms/remove-table.mjs +4 -4
- package/esm2020/plugins/table/utils/calculate-table.mjs +109 -0
- package/esm2020/plugins/table/utils/cell-position.mjs +36 -0
- package/esm2020/plugins/table/utils/create-table-position.mjs +10 -0
- package/esm2020/plugins/table/utils/get-grid-columns.mjs +7 -2
- package/esm2020/plugins/table/utils/get-min-max-cell-index.mjs +64 -0
- package/esm2020/plugins/table/utils/get-select-cell-node.mjs +3 -6
- package/esm2020/plugins/table/utils/is-legal-table.mjs +16 -0
- package/esm2020/plugins/table/utils/is-range-in-table.mjs +6 -6
- package/esm2020/plugins/table/utils/is-selection-in-table.mjs +3 -5
- package/esm2020/plugins/table/utils/merge-cell.mjs +17 -2
- package/esm2020/plugins/table/utils/split-cell.mjs +3 -6
- package/esm2020/plugins/table/utils/table-entry.mjs +21 -0
- package/esm2020/plugins/todo-item/todo-item.component.mjs +11 -11
- package/esm2020/plugins/vertical-align/toolbar-item.component.mjs +11 -11
- package/esm2020/services/color-select.service.mjs +7 -7
- package/esm2020/services/context.service.mjs +3 -3
- package/esm2020/services/table-contextmenu.service.mjs +21 -18
- package/esm2020/services/toolbar.service.mjs +3 -3
- package/esm2020/utils/lodash.mjs +3 -3
- package/fesm2015/worktile-theia.mjs +886 -790
- package/fesm2015/worktile-theia.mjs.map +1 -1
- package/fesm2020/worktile-theia.mjs +881 -786
- package/fesm2020/worktile-theia.mjs.map +1 -1
- package/interfaces/editor.d.ts +2 -2
- package/interfaces/element.d.ts +3 -3
- package/interfaces/plugins/no-infer.d.ts +1 -1
- package/interfaces/plugins/plugin-key.d.ts +1 -1
- package/interfaces/plugins/plugin-menu.d.ts +4 -4
- package/interfaces/plugins/plugins.d.ts +4 -4
- package/interfaces/plugins/with-override.d.ts +1 -1
- package/interfaces/toolbar.d.ts +4 -4
- package/interfaces/utility/nested-structure-by-key.d.ts +1 -1
- package/interfaces/utility/override-by-key.d.ts +1 -1
- package/interfaces/utility/types.d.ts +1 -1
- package/interfaces/view-base.d.ts +1 -1
- package/package.json +1 -1
- package/plugins/blockquote/blockquote.component.d.ts +1 -1
- package/plugins/code/code.component.d.ts +1 -1
- package/plugins/color/toolbar-item.component.d.ts +1 -1
- package/plugins/common/transforms.plugin.d.ts +1 -1
- package/plugins/heading/heading.plugin.d.ts +1 -1
- package/plugins/hr/hr.component.d.ts +1 -1
- package/plugins/image/image.component.d.ts +1 -1
- package/plugins/inline-code/inline-code.component.d.ts +1 -1
- package/plugins/link/edit/link-edit.component.d.ts +1 -1
- package/plugins/link/hover/link-hover.component.d.ts +1 -1
- package/plugins/link/link.component.d.ts +2 -2
- package/plugins/list/components/bulleted-list.component.d.ts +1 -1
- package/plugins/list/components/list-item.component.d.ts +1 -1
- package/plugins/list/components/numbered-list.component.d.ts +1 -1
- package/plugins/list/types.d.ts +1 -1
- package/plugins/mention/suggestion.component.d.ts +1 -1
- package/plugins/quick-insert/components/quick-insert.component.d.ts +1 -1
- package/plugins/table/components/insert-mark/insert-mark.component.d.ts +7 -4
- package/plugins/table/components/row/row.component.d.ts +1 -1
- package/plugins/table/components/table.component.d.ts +1 -14
- package/plugins/table/components/td/td.component.d.ts +1 -1
- package/plugins/table/components/toolbar/table-options.component.d.ts +2 -2
- package/plugins/table/components/toolbar/table-toolbar.component.d.ts +1 -1
- package/plugins/table/table.editor.d.ts +4 -1
- package/plugins/table/table.store.d.ts +2 -20
- package/plugins/table/toolbar-item.component.d.ts +1 -1
- package/plugins/table/utils/calculate-table.d.ts +3 -0
- package/plugins/table/utils/cell-position.d.ts +14 -0
- package/plugins/table/utils/create-table-position.d.ts +3 -0
- package/plugins/table/utils/get-grid-columns.d.ts +1 -1
- package/plugins/table/utils/get-min-max-cell-index.d.ts +4 -0
- package/plugins/table/utils/is-legal-table.d.ts +4 -0
- package/plugins/table/utils/is-range-in-table.d.ts +2 -2
- package/plugins/table/utils/merge-cell.d.ts +1 -0
- package/plugins/table/utils/table-entry.d.ts +5 -0
- package/plugins/todo-item/todo-item.component.d.ts +1 -1
- package/plugins/vertical-align/toolbar-item.component.d.ts +1 -1
- package/queries/find-node.d.ts +1 -1
- package/queries/get-range-before.d.ts +1 -1
- package/utils/lodash.d.ts +2 -2
- package/utils/match.d.ts +3 -3
|
@@ -2,12 +2,12 @@ import * as i2 from '@angular/common';
|
|
|
2
2
|
import { DOCUMENT, CommonModule } from '@angular/common';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
4
|
import { Component, ChangeDetectionStrategy, HostBinding, InjectionToken, Pipe, TemplateRef, ViewChild, Directive, Input, HostListener, ViewContainerRef, Inject, Injectable, ElementRef, ChangeDetectorRef, Optional, SkipSelf, ContentChildren, forwardRef, EventEmitter, Output, ViewChildren, NgModule } from '@angular/core';
|
|
5
|
-
import * as i3
|
|
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';
|
|
9
9
|
import { Range, Element as Element$1, Editor, Node, Span, Path, Text, Point, Transforms, Operation, createEditor } from 'slate';
|
|
10
|
-
import { map, cloneDeep, assign, defaults, groupBy, uniq, debounce } from 'lodash';
|
|
10
|
+
import { map, cloneDeep, assign, defaults, groupBy, uniq, debounce, isEqual } from 'lodash';
|
|
11
11
|
import { isObject, isArray, isString } from 'ngx-tethys/util';
|
|
12
12
|
import { TheiaConverter } from '@atinc/selene';
|
|
13
13
|
import { HistoryEditor, withHistory } from 'slate-history';
|
|
@@ -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 i7 from 'ngx-tethys/action';
|
|
21
21
|
import { ThyActionModule } from 'ngx-tethys/action';
|
|
@@ -46,12 +46,12 @@ import marked from 'marked';
|
|
|
46
46
|
import * as i1$3 from 'ngx-tethys/alert';
|
|
47
47
|
import { ThyAlertModule } from 'ngx-tethys/alert';
|
|
48
48
|
import { ThyUploadStatus } from 'ngx-tethys/upload';
|
|
49
|
-
import * as i4 from 'ngx-tethys/image';
|
|
49
|
+
import * as i4$1 from 'ngx-tethys/image';
|
|
50
50
|
import { ThyImageModule } from 'ngx-tethys/image';
|
|
51
51
|
import * as i9$1 from 'ngx-tethys/progress';
|
|
52
52
|
import { ThyProgressModule } from 'ngx-tethys/progress';
|
|
53
53
|
import isUrl from 'is-url';
|
|
54
|
-
import * as i3$
|
|
54
|
+
import * as i3$1 from 'ngx-tethys/form';
|
|
55
55
|
import { ThyFormModule } from 'ngx-tethys/form';
|
|
56
56
|
import * as i5$1 from 'ngx-tethys/shared';
|
|
57
57
|
import { ThySharedModule } from 'ngx-tethys/shared';
|
|
@@ -61,7 +61,6 @@ import * as i7$1 from 'ngx-tethys/input-number';
|
|
|
61
61
|
import { ThyInputNumberModule } from 'ngx-tethys/input-number';
|
|
62
62
|
import { coerceCssPixelValue } from '@angular/cdk/coercion';
|
|
63
63
|
import { PortalInjector, ComponentPortal } from '@angular/cdk/portal';
|
|
64
|
-
import * as i2$2 from '@angular/cdk/scrolling';
|
|
65
64
|
import { ScrollingModule } from '@angular/cdk/scrolling';
|
|
66
65
|
import { ThyAutocompleteModule } from 'ngx-tethys/autocomplete';
|
|
67
66
|
import { ThyAvatarModule } from 'ngx-tethys/avatar';
|
|
@@ -99,9 +98,9 @@ class TheBaseElementComponent extends BaseElementComponent {
|
|
|
99
98
|
this.nativeElement.classList.add(`slate-element-${this.element.type}`, blockClass);
|
|
100
99
|
}
|
|
101
100
|
}
|
|
102
|
-
TheBaseElementComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
103
|
-
TheBaseElementComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
104
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
101
|
+
TheBaseElementComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheBaseElementComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
102
|
+
TheBaseElementComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: TheBaseElementComponent, selector: "TheBaseElementComponent", usesInheritance: true, ngImport: i0, template: '', isInline: true });
|
|
103
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheBaseElementComponent, decorators: [{
|
|
105
104
|
type: Component,
|
|
106
105
|
args: [{
|
|
107
106
|
selector: 'TheBaseElementComponent',
|
|
@@ -114,9 +113,9 @@ class TheDefaultElementComponent extends TheBaseElementComponent {
|
|
|
114
113
|
return this.element?.indent;
|
|
115
114
|
}
|
|
116
115
|
}
|
|
117
|
-
TheDefaultElementComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
118
|
-
TheDefaultElementComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
119
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
116
|
+
TheDefaultElementComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheDefaultElementComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
117
|
+
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 });
|
|
118
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheDefaultElementComponent, decorators: [{
|
|
120
119
|
type: Component,
|
|
121
120
|
args: [{
|
|
122
121
|
selector: '[theDefaultElement]',
|
|
@@ -819,9 +818,9 @@ class ElementStylePipe {
|
|
|
819
818
|
return style;
|
|
820
819
|
}
|
|
821
820
|
}
|
|
822
|
-
ElementStylePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
823
|
-
ElementStylePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "
|
|
824
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
821
|
+
ElementStylePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ElementStylePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
822
|
+
ElementStylePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.0", ngImport: i0, type: ElementStylePipe, name: "elementStyle" });
|
|
823
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ElementStylePipe, decorators: [{
|
|
825
824
|
type: Pipe,
|
|
826
825
|
args: [{
|
|
827
826
|
name: 'elementStyle'
|
|
@@ -837,9 +836,9 @@ class ElementClassPipe {
|
|
|
837
836
|
return classStr;
|
|
838
837
|
}
|
|
839
838
|
}
|
|
840
|
-
ElementClassPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
841
|
-
ElementClassPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "
|
|
842
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
839
|
+
ElementClassPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ElementClassPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
840
|
+
ElementClassPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.0", ngImport: i0, type: ElementClassPipe, name: "elementClass" });
|
|
841
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ElementClassPipe, decorators: [{
|
|
843
842
|
type: Pipe,
|
|
844
843
|
args: [{
|
|
845
844
|
name: 'elementClass'
|
|
@@ -874,9 +873,9 @@ class TheTemplateComponent {
|
|
|
874
873
|
};
|
|
875
874
|
}
|
|
876
875
|
}
|
|
877
|
-
TheTemplateComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
878
|
-
TheTemplateComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
879
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
876
|
+
TheTemplateComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheTemplateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
877
|
+
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 });
|
|
878
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheTemplateComponent, decorators: [{
|
|
880
879
|
type: Component,
|
|
881
880
|
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" }]
|
|
882
881
|
}], propDecorators: { paragraphTemplate: [{
|
|
@@ -942,9 +941,9 @@ class TheTextComponent extends BaseTextComponent {
|
|
|
942
941
|
this.applyTextMark();
|
|
943
942
|
}
|
|
944
943
|
}
|
|
945
|
-
TheTextComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
946
|
-
TheTextComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
947
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
944
|
+
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 });
|
|
945
|
+
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"] }] });
|
|
946
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheTextComponent, decorators: [{
|
|
948
947
|
type: Component,
|
|
949
948
|
args: [{
|
|
950
949
|
selector: 'span[theText]',
|
|
@@ -2550,68 +2549,68 @@ const isEmptyContentByFilter = (editor, rules) => {
|
|
|
2550
2549
|
|
|
2551
2550
|
var index$1 = /*#__PURE__*/Object.freeze({
|
|
2552
2551
|
__proto__: null,
|
|
2553
|
-
|
|
2554
|
-
anchorBlockEntry: anchorBlockEntry,
|
|
2555
|
-
anchorInlineEntry: anchorInlineEntry,
|
|
2556
|
-
findDescendant: findDescendant,
|
|
2557
|
-
findNode: findNode,
|
|
2558
|
-
findPath: findPath,
|
|
2559
|
-
getAbove: getAbove,
|
|
2560
|
-
getAboveByType: getAboveByType,
|
|
2552
|
+
getLastNode: getLastNode,
|
|
2561
2553
|
getAnchorBlockEntry: getAnchorBlockEntry,
|
|
2554
|
+
getAboveByType: getAboveByType,
|
|
2555
|
+
getNodes: getNodes,
|
|
2556
|
+
getNodesByType: getNodesByType,
|
|
2562
2557
|
getBlockAbove: getBlockAbove,
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
getDirectlyParent: getDirectlyParent,
|
|
2567
|
-
getInsertElementsPath: getInsertElementsPath,
|
|
2558
|
+
getPreviousPath: getPreviousPath,
|
|
2559
|
+
getNode: getNode,
|
|
2560
|
+
getParent: getParent,
|
|
2568
2561
|
getLastChild: getLastChild,
|
|
2569
2562
|
getLastChildPath: getLastChildPath,
|
|
2570
|
-
getLastNode: getLastNode,
|
|
2571
2563
|
getNextSiblingNodes: getNextSiblingNodes,
|
|
2572
|
-
|
|
2573
|
-
getNodes: getNodes,
|
|
2574
|
-
getNodesByType: getNodesByType,
|
|
2575
|
-
getParent: getParent,
|
|
2576
|
-
getPlainText: getPlainText,
|
|
2577
|
-
getPluginByToolbarItem: getPluginByToolbarItem,
|
|
2564
|
+
getAbove: getAbove,
|
|
2578
2565
|
getPointBefore: getPointBefore,
|
|
2566
|
+
getSelectionNodesByType: getSelectionNodesByType,
|
|
2567
|
+
getText: getText,
|
|
2579
2568
|
getPointFromLocation: getPointFromLocation,
|
|
2580
|
-
getPreviousPath: getPreviousPath,
|
|
2581
|
-
getRangeBefore: getRangeBefore,
|
|
2582
2569
|
getRangeFromBlockStart: getRangeFromBlockStart,
|
|
2570
|
+
getRangeBefore: getRangeBefore,
|
|
2571
|
+
getBlockCardCenterCursor: getBlockCardCenterCursor,
|
|
2572
|
+
getBlockCardAbove: getBlockCardAbove,
|
|
2573
|
+
getPlainText: getPlainText,
|
|
2583
2574
|
getSelectionMarks: getSelectionMarks,
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
getToolbarItemDisabled: getToolbarItemDisabled,
|
|
2587
|
-
isAcrossBlocks: isAcrossBlocks,
|
|
2575
|
+
getContainerBlocks: getContainerBlocks,
|
|
2576
|
+
getDirectlyParent: getDirectlyParent,
|
|
2588
2577
|
isAncestor: isAncestor,
|
|
2589
|
-
isAncestorEmpty: isAncestorEmpty,
|
|
2590
|
-
isBlockAboveEmpty: isBlockAboveEmpty,
|
|
2591
|
-
isBlockActive: isBlockActive,
|
|
2592
|
-
isBlockCardCursor: isBlockCardCursor,
|
|
2593
|
-
isBlockTextEmptyAfterSelection: isBlockTextEmptyAfterSelection,
|
|
2594
2578
|
isCollapsed: isCollapsed,
|
|
2595
|
-
isContainNestedType: isContainNestedType,
|
|
2596
|
-
isContainer: isContainer,
|
|
2597
|
-
isDescendant: isDescendant,
|
|
2598
|
-
isEmptyContent: isEmptyContent,
|
|
2599
|
-
isEmptyContentByFilter: isEmptyContentByFilter,
|
|
2600
2579
|
isEmptyParagraph: isEmptyParagraph,
|
|
2601
|
-
isEmptyParagraphByPath: isEmptyParagraphByPath,
|
|
2602
2580
|
isEmptyParagraphElement: isEmptyParagraphElement,
|
|
2603
|
-
isFirstChild: isFirstChild,
|
|
2604
|
-
isGlobalCollapsed: isGlobalCollapsed,
|
|
2605
|
-
isIncludeTypes: isIncludeTypes,
|
|
2606
2581
|
isLogicEmptyParagraphElement: isLogicEmptyParagraphElement,
|
|
2607
|
-
isNodeType: isNodeType,
|
|
2608
|
-
isNodeTypeIn: isNodeTypeIn,
|
|
2609
2582
|
isParagraph: isParagraph,
|
|
2583
|
+
isBlockActive: isBlockActive,
|
|
2584
|
+
isIncludeTypes: isIncludeTypes,
|
|
2585
|
+
isAncestorEmpty: isAncestorEmpty,
|
|
2586
|
+
isBlockAboveEmpty: isBlockAboveEmpty,
|
|
2587
|
+
isNodeTypeIn: isNodeTypeIn,
|
|
2588
|
+
isFirstChild: isFirstChild,
|
|
2610
2589
|
isPointAtRoot: isPointAtRoot,
|
|
2611
|
-
isRangeAcrossBlocks: isRangeAcrossBlocks,
|
|
2612
2590
|
isRangeAtRoot: isRangeAtRoot,
|
|
2591
|
+
isBlockTextEmptyAfterSelection: isBlockTextEmptyAfterSelection,
|
|
2613
2592
|
isStart: isStart,
|
|
2614
|
-
|
|
2593
|
+
isRangeAcrossBlocks: isRangeAcrossBlocks,
|
|
2594
|
+
isDescendant: isDescendant,
|
|
2595
|
+
isNodeType: isNodeType,
|
|
2596
|
+
isAcrossBlocks: isAcrossBlocks,
|
|
2597
|
+
isBlockCardCursor: isBlockCardCursor,
|
|
2598
|
+
isEmptyParagraphByPath: isEmptyParagraphByPath,
|
|
2599
|
+
isEmptyContent: isEmptyContent,
|
|
2600
|
+
isEmptyContentByFilter: isEmptyContentByFilter,
|
|
2601
|
+
isContainer: isContainer,
|
|
2602
|
+
getInsertElementsPath: getInsertElementsPath,
|
|
2603
|
+
isContainNestedType: isContainNestedType,
|
|
2604
|
+
anchorBlock: anchorBlock,
|
|
2605
|
+
anchorBlockEntry: anchorBlockEntry,
|
|
2606
|
+
anchorInlineEntry: anchorInlineEntry,
|
|
2607
|
+
findPath: findPath,
|
|
2608
|
+
findNode: findNode,
|
|
2609
|
+
findDescendant: findDescendant,
|
|
2610
|
+
someNode: someNode,
|
|
2611
|
+
getToolbarItemDisabled: getToolbarItemDisabled,
|
|
2612
|
+
getPluginByToolbarItem: getPluginByToolbarItem,
|
|
2613
|
+
isGlobalCollapsed: isGlobalCollapsed
|
|
2615
2614
|
});
|
|
2616
2615
|
|
|
2617
2616
|
class TheBaseToolbarItem {
|
|
@@ -2644,9 +2643,9 @@ class TheBaseToolbarItem {
|
|
|
2644
2643
|
}
|
|
2645
2644
|
}
|
|
2646
2645
|
}
|
|
2647
|
-
TheBaseToolbarItem.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2648
|
-
TheBaseToolbarItem.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
2649
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2646
|
+
TheBaseToolbarItem.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheBaseToolbarItem, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
2647
|
+
TheBaseToolbarItem.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.0", type: TheBaseToolbarItem, inputs: { toolbarItem: "toolbarItem", editor: "editor", itemMousedownHandle: "itemMousedownHandle" }, host: { properties: { "class.disabled": "this.disabledState", "class.active": "this.activeState" } }, ngImport: i0 });
|
|
2648
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheBaseToolbarItem, decorators: [{
|
|
2650
2649
|
type: Directive
|
|
2651
2650
|
}], propDecorators: { toolbarItem: [{
|
|
2652
2651
|
type: Input
|
|
@@ -2682,9 +2681,9 @@ class TheBaseToolbarDropdown extends TheBaseToolbarItem {
|
|
|
2682
2681
|
}
|
|
2683
2682
|
}
|
|
2684
2683
|
}
|
|
2685
|
-
TheBaseToolbarDropdown.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2686
|
-
TheBaseToolbarDropdown.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
2687
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2684
|
+
TheBaseToolbarDropdown.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheBaseToolbarDropdown, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
2685
|
+
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 });
|
|
2686
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheBaseToolbarDropdown, decorators: [{
|
|
2688
2687
|
type: Directive
|
|
2689
2688
|
}], propDecorators: { menus: [{
|
|
2690
2689
|
type: Input
|
|
@@ -2695,6 +2694,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
|
|
|
2695
2694
|
}] } });
|
|
2696
2695
|
|
|
2697
2696
|
class TheToolbarDropdownComponent extends TheBaseToolbarDropdown {
|
|
2697
|
+
constructor(elementRef, thyPopover, viewContainerRef, overlay) {
|
|
2698
|
+
super();
|
|
2699
|
+
this.elementRef = elementRef;
|
|
2700
|
+
this.thyPopover = thyPopover;
|
|
2701
|
+
this.viewContainerRef = viewContainerRef;
|
|
2702
|
+
this.overlay = overlay;
|
|
2703
|
+
this.className = 'the-toolbar-dropdown-container';
|
|
2704
|
+
this.activeKeys = [];
|
|
2705
|
+
this.dropdownMode = DropdownMode;
|
|
2706
|
+
}
|
|
2698
2707
|
get isOpen() {
|
|
2699
2708
|
return this.dropdownPopoverRef && this.dropdownPopoverRef.getOverlayRef() && this.dropdownPopoverRef.getOverlayRef().hasAttached();
|
|
2700
2709
|
}
|
|
@@ -2707,16 +2716,6 @@ class TheToolbarDropdownComponent extends TheBaseToolbarDropdown {
|
|
|
2707
2716
|
get activeDropdown() {
|
|
2708
2717
|
return this.toolbarItem.dropdownFixedIcon && !!this.activeKeys.length;
|
|
2709
2718
|
}
|
|
2710
|
-
constructor(elementRef, thyPopover, viewContainerRef, overlay) {
|
|
2711
|
-
super();
|
|
2712
|
-
this.elementRef = elementRef;
|
|
2713
|
-
this.thyPopover = thyPopover;
|
|
2714
|
-
this.viewContainerRef = viewContainerRef;
|
|
2715
|
-
this.overlay = overlay;
|
|
2716
|
-
this.className = 'the-toolbar-dropdown-container';
|
|
2717
|
-
this.activeKeys = [];
|
|
2718
|
-
this.dropdownMode = DropdownMode;
|
|
2719
|
-
}
|
|
2720
2719
|
ngOnInit() {
|
|
2721
2720
|
if (!this.activeMenuItem) {
|
|
2722
2721
|
this.activeMenuItem = this.defaultDropdownItem;
|
|
@@ -2808,9 +2807,9 @@ class TheToolbarDropdownComponent extends TheBaseToolbarDropdown {
|
|
|
2808
2807
|
.withPositions([bottomPosition, topPosition]);
|
|
2809
2808
|
}
|
|
2810
2809
|
}
|
|
2811
|
-
TheToolbarDropdownComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2812
|
-
TheToolbarDropdownComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
2813
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2810
|
+
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 });
|
|
2811
|
+
TheToolbarDropdownComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: TheToolbarDropdownComponent, selector: "the-toolbar-dropdown", 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: i7.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"] }] });
|
|
2812
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheToolbarDropdownComponent, decorators: [{
|
|
2814
2813
|
type: Component,
|
|
2815
2814
|
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" }]
|
|
2816
2815
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1$1.ThyPopover }, { type: i0.ViewContainerRef }, { type: i2$1.Overlay }]; }, propDecorators: { className: [{
|
|
@@ -2828,13 +2827,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
|
|
|
2828
2827
|
}] } });
|
|
2829
2828
|
|
|
2830
2829
|
class TheToolbarItemComponent extends TheBaseToolbarItem {
|
|
2831
|
-
toggleDropdown(event) {
|
|
2832
|
-
super.execute(event);
|
|
2833
|
-
}
|
|
2834
2830
|
constructor() {
|
|
2835
2831
|
super();
|
|
2836
2832
|
this.className = 'the-toolbar-item';
|
|
2837
2833
|
}
|
|
2834
|
+
toggleDropdown(event) {
|
|
2835
|
+
super.execute(event);
|
|
2836
|
+
}
|
|
2838
2837
|
ngOnInit() { }
|
|
2839
2838
|
preventDefault(event) {
|
|
2840
2839
|
event.preventDefault();
|
|
@@ -2851,8 +2850,8 @@ class TheToolbarItemComponent extends TheBaseToolbarItem {
|
|
|
2851
2850
|
this.toolbarItem?.execute(this.editor);
|
|
2852
2851
|
}
|
|
2853
2852
|
}
|
|
2854
|
-
TheToolbarItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2855
|
-
TheToolbarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
2853
|
+
TheToolbarItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheToolbarItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2854
|
+
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: `
|
|
2856
2855
|
<a
|
|
2857
2856
|
href="javascript:;"
|
|
2858
2857
|
thyAction
|
|
@@ -2866,7 +2865,7 @@ TheToolbarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0"
|
|
|
2866
2865
|
></a>
|
|
2867
2866
|
<ng-template #tooltip let-data> {{ data?.name }} {{ data?.shortcutKey }} </ng-template>
|
|
2868
2867
|
`, 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: i7.ThyActionComponent, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }] });
|
|
2869
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2868
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheToolbarItemComponent, decorators: [{
|
|
2870
2869
|
type: Component,
|
|
2871
2870
|
args: [{
|
|
2872
2871
|
selector: 'the-toolbar-item',
|
|
@@ -2894,9 +2893,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
|
|
|
2894
2893
|
}] } });
|
|
2895
2894
|
|
|
2896
2895
|
class TheToolbarComponent {
|
|
2897
|
-
get justifyContent() {
|
|
2898
|
-
return this.align;
|
|
2899
|
-
}
|
|
2900
2896
|
constructor(cdr, elementRef, ngZone, toolbarGroupComponent) {
|
|
2901
2897
|
this.cdr = cdr;
|
|
2902
2898
|
this.elementRef = elementRef;
|
|
@@ -2909,6 +2905,9 @@ class TheToolbarComponent {
|
|
|
2909
2905
|
this.moreGroupMenu = ToolbarMoreGroup;
|
|
2910
2906
|
this.elementWidth = 0;
|
|
2911
2907
|
}
|
|
2908
|
+
get justifyContent() {
|
|
2909
|
+
return this.align;
|
|
2910
|
+
}
|
|
2912
2911
|
ngOnInit() {
|
|
2913
2912
|
this.setToolbarClass();
|
|
2914
2913
|
this.renderToolbarView();
|
|
@@ -3119,9 +3118,9 @@ class TheToolbarComponent {
|
|
|
3119
3118
|
return TheToolbarItemComponent;
|
|
3120
3119
|
}
|
|
3121
3120
|
}
|
|
3122
|
-
TheToolbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3123
|
-
TheToolbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
3124
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3121
|
+
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 });
|
|
3122
|
+
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"] }] });
|
|
3123
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheToolbarComponent, decorators: [{
|
|
3125
3124
|
type: Component,
|
|
3126
3125
|
args: [{ selector: 'the-toolbar', host: {
|
|
3127
3126
|
class: 'the-toolbar-container d-flex align-items-center'
|
|
@@ -3273,23 +3272,23 @@ class TheContextService {
|
|
|
3273
3272
|
this.destroy$.complete();
|
|
3274
3273
|
}
|
|
3275
3274
|
}
|
|
3276
|
-
TheContextService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3277
|
-
TheContextService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
3278
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3275
|
+
TheContextService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheContextService, deps: [{ token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3276
|
+
TheContextService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheContextService });
|
|
3277
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheContextService, decorators: [{
|
|
3279
3278
|
type: Injectable
|
|
3280
3279
|
}], ctorParameters: function () { return [{ type: i0.NgZone }]; } });
|
|
3281
3280
|
|
|
3282
3281
|
class TheColorSelectComponent {
|
|
3283
|
-
handleDocumentMouseDown(event) {
|
|
3284
|
-
if (!document.querySelector('.color-container').contains(event.target)) {
|
|
3285
|
-
this.popoverRef.close();
|
|
3286
|
-
}
|
|
3287
|
-
}
|
|
3288
3282
|
constructor(popoverRef) {
|
|
3289
3283
|
this.popoverRef = popoverRef;
|
|
3290
3284
|
this.showCustom = true;
|
|
3291
3285
|
this.selectColors = [];
|
|
3292
3286
|
}
|
|
3287
|
+
handleDocumentMouseDown(event) {
|
|
3288
|
+
if (!document.querySelector('.color-container').contains(event.target)) {
|
|
3289
|
+
this.popoverRef.close();
|
|
3290
|
+
}
|
|
3291
|
+
}
|
|
3293
3292
|
ngOnInit() {
|
|
3294
3293
|
if (this.selectedColor) {
|
|
3295
3294
|
this.customColor = this.selectedColor.slice(1);
|
|
@@ -3355,9 +3354,9 @@ class TheColorSelectComponent {
|
|
|
3355
3354
|
this.popoverRef.close();
|
|
3356
3355
|
}
|
|
3357
3356
|
}
|
|
3358
|
-
TheColorSelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3359
|
-
TheColorSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
3360
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3357
|
+
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 });
|
|
3358
|
+
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.ThyInputDirective, selector: "[thyInput]", inputs: ["thySize", "thyAutocomplete"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3359
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheColorSelectComponent, decorators: [{
|
|
3361
3360
|
type: Component,
|
|
3362
3361
|
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" }]
|
|
3363
3362
|
}], ctorParameters: function () { return [{ type: i1$1.ThyPopoverRef }]; }, propDecorators: { selectedColor: [{
|
|
@@ -3382,9 +3381,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
|
|
|
3382
3381
|
}] } });
|
|
3383
3382
|
|
|
3384
3383
|
class TheColorSelectService {
|
|
3385
|
-
get isOpenColorSelect() {
|
|
3386
|
-
return this.colorSelectRef && this.colorSelectRef.componentInstance;
|
|
3387
|
-
}
|
|
3388
3384
|
constructor(thyPopover) {
|
|
3389
3385
|
this.thyPopover = thyPopover;
|
|
3390
3386
|
this.backdropClosable = false;
|
|
@@ -3393,6 +3389,9 @@ class TheColorSelectService {
|
|
|
3393
3389
|
this.placement = 'bottomLeft';
|
|
3394
3390
|
this.offset = 10;
|
|
3395
3391
|
}
|
|
3392
|
+
get isOpenColorSelect() {
|
|
3393
|
+
return this.colorSelectRef && this.colorSelectRef.componentInstance;
|
|
3394
|
+
}
|
|
3396
3395
|
toggleColorSelect(origin, selectedColor, colors, option, selectAction, placement, offset) {
|
|
3397
3396
|
if (this.isOpenColorSelect) {
|
|
3398
3397
|
this.colorSelectRef.close();
|
|
@@ -3422,9 +3421,9 @@ class TheColorSelectService {
|
|
|
3422
3421
|
}
|
|
3423
3422
|
}
|
|
3424
3423
|
}
|
|
3425
|
-
TheColorSelectService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3426
|
-
TheColorSelectService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
3427
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3424
|
+
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 });
|
|
3425
|
+
TheColorSelectService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheColorSelectService });
|
|
3426
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheColorSelectService, decorators: [{
|
|
3428
3427
|
type: Injectable
|
|
3429
3428
|
}], ctorParameters: function () { return [{ type: i1$1.ThyPopover }]; } });
|
|
3430
3429
|
|
|
@@ -3772,13 +3771,21 @@ class TablePosition {
|
|
|
3772
3771
|
}
|
|
3773
3772
|
}
|
|
3774
3773
|
|
|
3774
|
+
const createTablePosition = (editor, path) => {
|
|
3775
|
+
path = path || editor.selection.anchor?.path;
|
|
3776
|
+
if (!path) {
|
|
3777
|
+
throw new Error('Path invalid');
|
|
3778
|
+
}
|
|
3779
|
+
return TablePosition.create(new TableOptions(), editor, path);
|
|
3780
|
+
};
|
|
3781
|
+
|
|
3775
3782
|
/**
|
|
3776
3783
|
* True if the given range is inside one table
|
|
3777
3784
|
*/
|
|
3778
|
-
function isRangeInTable(opts,
|
|
3779
|
-
const {
|
|
3780
|
-
const startPosition =
|
|
3781
|
-
const endPosition =
|
|
3785
|
+
function isRangeInTable(opts, editor, range) {
|
|
3786
|
+
const { focus } = range;
|
|
3787
|
+
const startPosition = createTablePosition(editor);
|
|
3788
|
+
const endPosition = createTablePosition(editor, focus.path);
|
|
3782
3789
|
// Only handle events in tables
|
|
3783
3790
|
if (!startPosition.isInTable() || !endPosition.isInTable()) {
|
|
3784
3791
|
return false;
|
|
@@ -3812,8 +3819,7 @@ function isRectangularInTableCells(editor, cells) {
|
|
|
3812
3819
|
let minCol = col;
|
|
3813
3820
|
let maxRow = row;
|
|
3814
3821
|
let minRow = row;
|
|
3815
|
-
const
|
|
3816
|
-
const pos = TablePosition.create(new TableOptions(), editor, path);
|
|
3822
|
+
const pos = createTablePosition(editor);
|
|
3817
3823
|
for (let { row, col } of cells) {
|
|
3818
3824
|
const { hidden, rowspan, colspan } = pos.findCellByPath({ row, col });
|
|
3819
3825
|
if (hidden) {
|
|
@@ -4126,22 +4132,22 @@ function handleContinualInsertBreak(editor, lowestBlock, type) {
|
|
|
4126
4132
|
|
|
4127
4133
|
var index = /*#__PURE__*/Object.freeze({
|
|
4128
4134
|
__proto__: null,
|
|
4129
|
-
|
|
4135
|
+
setMarks: setMarks,
|
|
4130
4136
|
clearMarks: clearMarks,
|
|
4131
|
-
closeConversionHint: closeConversionHint,
|
|
4132
|
-
deleteElement: deleteElement,
|
|
4133
|
-
handleContinualDeleteBackward: handleContinualDeleteBackward,
|
|
4134
|
-
handleContinualInsertBreak: handleContinualInsertBreak,
|
|
4135
4137
|
insertElements: insertElements,
|
|
4136
4138
|
insertParagraph: insertParagraph,
|
|
4137
|
-
mergeDeepToNodes: mergeDeepToNodes,
|
|
4138
|
-
moveChildren: moveChildren,
|
|
4139
|
-
onKeyDownResetBlockType: onKeyDownResetBlockType,
|
|
4140
|
-
setEndSelection: setEndSelection,
|
|
4141
|
-
setMarks: setMarks,
|
|
4142
4139
|
setNode: setNode,
|
|
4140
|
+
unwrapNodesByType: unwrapNodesByType,
|
|
4141
|
+
onKeyDownResetBlockType: onKeyDownResetBlockType,
|
|
4142
|
+
moveChildren: moveChildren,
|
|
4143
|
+
applyDeepToNodes: applyDeepToNodes,
|
|
4144
|
+
mergeDeepToNodes: mergeDeepToNodes,
|
|
4143
4145
|
unWrap: unWrap,
|
|
4144
|
-
|
|
4146
|
+
deleteElement: deleteElement,
|
|
4147
|
+
setEndSelection: setEndSelection,
|
|
4148
|
+
closeConversionHint: closeConversionHint,
|
|
4149
|
+
handleContinualDeleteBackward: handleContinualDeleteBackward,
|
|
4150
|
+
handleContinualInsertBreak: handleContinualInsertBreak
|
|
4145
4151
|
});
|
|
4146
4152
|
|
|
4147
4153
|
/**
|
|
@@ -4158,7 +4164,7 @@ function insertTable(opts, editor, rows = 3, columns = 3, getCellContent) {
|
|
|
4158
4164
|
}
|
|
4159
4165
|
|
|
4160
4166
|
function getInsertRowState(opts, editor, count = 1, at) {
|
|
4161
|
-
const tablePosition =
|
|
4167
|
+
const tablePosition = createTablePosition(editor);
|
|
4162
4168
|
let table = tablePosition.table;
|
|
4163
4169
|
let tableEntry = tablePosition.tableEntry;
|
|
4164
4170
|
// Create a new row with the right count of cells
|
|
@@ -4248,7 +4254,7 @@ function insertColumn(opts, editor, count = 1, at, // Column index
|
|
|
4248
4254
|
getCell) {
|
|
4249
4255
|
const { selection } = editor;
|
|
4250
4256
|
const { anchor: { path } } = selection;
|
|
4251
|
-
const tablePosition =
|
|
4257
|
+
const tablePosition = createTablePosition(editor, path);
|
|
4252
4258
|
let table = tablePosition.table;
|
|
4253
4259
|
let tableEntry = tablePosition.tableEntry;
|
|
4254
4260
|
const insertColumnIndex = typeof at === 'undefined' ? tablePosition.getColumnIndex() + 1 : at;
|
|
@@ -4317,9 +4323,7 @@ function clearCell(opts, editor, cellEntry) {
|
|
|
4317
4323
|
}
|
|
4318
4324
|
|
|
4319
4325
|
function removeRow(opts, editor, selectRowIndex) {
|
|
4320
|
-
const
|
|
4321
|
-
const { anchor: { path } } = selection;
|
|
4322
|
-
const tablePosition = TablePosition.create(opts, editor, path);
|
|
4326
|
+
const tablePosition = createTablePosition(editor);
|
|
4323
4327
|
const { tableEntry, table, rowEntry: [rowNode, rowPath] } = tablePosition;
|
|
4324
4328
|
selectRowIndex = selectRowIndex === undefined ? [...rowPath].pop() : selectRowIndex;
|
|
4325
4329
|
const at = tableEntry[1].concat(selectRowIndex);
|
|
@@ -4389,7 +4393,7 @@ function removeColumns(table, columnsCount, index) {
|
|
|
4389
4393
|
function removeColumn(opts, editor, selectColIndex) {
|
|
4390
4394
|
const { selection } = editor;
|
|
4391
4395
|
const { anchor: { path } } = selection;
|
|
4392
|
-
const tablePosition =
|
|
4396
|
+
const tablePosition = createTablePosition(editor, path);
|
|
4393
4397
|
const { tableEntry, table, row, cellEntry: [cellNode, cellPath] } = tablePosition;
|
|
4394
4398
|
const rows = tableEntry[0].children;
|
|
4395
4399
|
selectColIndex = selectColIndex === undefined ? [...cellPath].pop() : selectColIndex;
|
|
@@ -4441,8 +4445,8 @@ const NextPath = (path) => {
|
|
|
4441
4445
|
function removeTable(opts, editor) {
|
|
4442
4446
|
const { selection } = editor;
|
|
4443
4447
|
const { anchor: { path } } = selection;
|
|
4444
|
-
const pos =
|
|
4445
|
-
const {
|
|
4448
|
+
const pos = createTablePosition(editor, path);
|
|
4449
|
+
const { tableEntry: [, tablePath] } = pos;
|
|
4446
4450
|
let nextFocusEntry = null;
|
|
4447
4451
|
let shouldCollapseToEnd = false;
|
|
4448
4452
|
const nextEntry = Editor.next(editor, { at: tablePath });
|
|
@@ -5280,9 +5284,9 @@ class TheBaseSuggestion {
|
|
|
5280
5284
|
event.preventDefault();
|
|
5281
5285
|
}
|
|
5282
5286
|
}
|
|
5283
|
-
TheBaseSuggestion.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
5284
|
-
TheBaseSuggestion.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
5285
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
5287
|
+
TheBaseSuggestion.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheBaseSuggestion, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
5288
|
+
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 });
|
|
5289
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheBaseSuggestion, decorators: [{
|
|
5286
5290
|
type: Directive
|
|
5287
5291
|
}], propDecorators: { editor: [{
|
|
5288
5292
|
type: Input
|
|
@@ -5324,9 +5328,9 @@ class TheTableSelectComponent {
|
|
|
5324
5328
|
}
|
|
5325
5329
|
}
|
|
5326
5330
|
}
|
|
5327
|
-
TheTableSelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
5328
|
-
TheTableSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
5329
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
5331
|
+
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 });
|
|
5332
|
+
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"] }] });
|
|
5333
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheTableSelectComponent, decorators: [{
|
|
5330
5334
|
type: Component,
|
|
5331
5335
|
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" }]
|
|
5332
5336
|
}], ctorParameters: function () { return [{ type: i1$1.ThyPopoverRef }]; }, propDecorators: { optionsParam: [{
|
|
@@ -5342,12 +5346,6 @@ const THE_LISTBOX_PARENT_GROUP_TOKEN = new InjectionToken('THE_LISTBOX_PARENT_GR
|
|
|
5342
5346
|
const THE_LISTBOX_TOKEN = new InjectionToken('THE_LISTBOX_TOKEN');
|
|
5343
5347
|
|
|
5344
5348
|
class TheListboxOptionDirective {
|
|
5345
|
-
get hasChild() {
|
|
5346
|
-
return this._options.length > 0;
|
|
5347
|
-
}
|
|
5348
|
-
get firstChild() {
|
|
5349
|
-
return this._options.first;
|
|
5350
|
-
}
|
|
5351
5349
|
constructor(parentOption, parentGroup, elementRef) {
|
|
5352
5350
|
this.parentOption = parentOption;
|
|
5353
5351
|
this.parentGroup = parentGroup;
|
|
@@ -5355,6 +5353,12 @@ class TheListboxOptionDirective {
|
|
|
5355
5353
|
this._active = false;
|
|
5356
5354
|
this.className = 'the-listbox-option';
|
|
5357
5355
|
}
|
|
5356
|
+
get hasChild() {
|
|
5357
|
+
return this._options.length > 0;
|
|
5358
|
+
}
|
|
5359
|
+
get firstChild() {
|
|
5360
|
+
return this._options.first;
|
|
5361
|
+
}
|
|
5358
5362
|
ngOnInit() { }
|
|
5359
5363
|
ngAfterContentInit() { }
|
|
5360
5364
|
getGroups() {
|
|
@@ -5379,14 +5383,14 @@ class TheListboxOptionDirective {
|
|
|
5379
5383
|
return this._active;
|
|
5380
5384
|
}
|
|
5381
5385
|
}
|
|
5382
|
-
TheListboxOptionDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
5383
|
-
TheListboxOptionDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
5386
|
+
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 });
|
|
5387
|
+
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: [
|
|
5384
5388
|
{
|
|
5385
5389
|
provide: THE_LISTBOX_PARENT_OPTION_TOKEN,
|
|
5386
5390
|
useExisting: TheListboxOptionDirective
|
|
5387
5391
|
}
|
|
5388
5392
|
], queries: [{ propertyName: "_options", predicate: i0.forwardRef(function () { return TheListboxOptionDirective; }), descendants: true }], exportAs: ["theListboxOption"], ngImport: i0 });
|
|
5389
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
5393
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheListboxOptionDirective, decorators: [{
|
|
5390
5394
|
type: Directive,
|
|
5391
5395
|
args: [{
|
|
5392
5396
|
selector: '[theListboxOption]',
|
|
@@ -5462,14 +5466,14 @@ class TheListboxGroupDirective {
|
|
|
5462
5466
|
return this.options[this.options.length - 1];
|
|
5463
5467
|
}
|
|
5464
5468
|
}
|
|
5465
|
-
TheListboxGroupDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
5466
|
-
TheListboxGroupDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
5469
|
+
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 });
|
|
5470
|
+
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: [
|
|
5467
5471
|
{
|
|
5468
5472
|
provide: THE_LISTBOX_PARENT_GROUP_TOKEN,
|
|
5469
5473
|
useExisting: TheListboxGroupDirective
|
|
5470
5474
|
}
|
|
5471
5475
|
], queries: [{ propertyName: "_options", predicate: TheListboxOptionDirective, descendants: true }], exportAs: ["theListboxGroup"], ngImport: i0 });
|
|
5472
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
5476
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheListboxGroupDirective, decorators: [{
|
|
5473
5477
|
type: Directive,
|
|
5474
5478
|
args: [{
|
|
5475
5479
|
selector: '[theListboxGroup]',
|
|
@@ -5673,14 +5677,14 @@ class TheListboxDirective {
|
|
|
5673
5677
|
this._keyboardSubscription.unsubscribe();
|
|
5674
5678
|
}
|
|
5675
5679
|
}
|
|
5676
|
-
TheListboxDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
5677
|
-
TheListboxDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
5680
|
+
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 });
|
|
5681
|
+
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: [
|
|
5678
5682
|
{
|
|
5679
5683
|
provide: THE_LISTBOX_TOKEN,
|
|
5680
5684
|
useExisting: TheListboxDirective
|
|
5681
5685
|
}
|
|
5682
5686
|
], queries: [{ propertyName: "_groups", predicate: TheListboxGroupDirective, descendants: true }, { propertyName: "_options", predicate: TheListboxOptionDirective, descendants: true }], exportAs: ["theListBox"], ngImport: i0 });
|
|
5683
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
5687
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheListboxDirective, decorators: [{
|
|
5684
5688
|
type: Directive,
|
|
5685
5689
|
args: [{
|
|
5686
5690
|
selector: '[theListBox]',
|
|
@@ -5714,9 +5718,9 @@ class ThePreventDefaultDirective {
|
|
|
5714
5718
|
event.preventDefault();
|
|
5715
5719
|
}
|
|
5716
5720
|
}
|
|
5717
|
-
ThePreventDefaultDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
5718
|
-
ThePreventDefaultDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
5719
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
5721
|
+
ThePreventDefaultDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ThePreventDefaultDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
5722
|
+
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 });
|
|
5723
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ThePreventDefaultDirective, decorators: [{
|
|
5720
5724
|
type: Directive,
|
|
5721
5725
|
args: [{
|
|
5722
5726
|
selector: '[thePreventDefault]',
|
|
@@ -5875,9 +5879,9 @@ class ThePluginMenuComponent extends mixinUnsubscribe(MixinBase) {
|
|
|
5875
5879
|
super.ngOnDestroy();
|
|
5876
5880
|
}
|
|
5877
5881
|
}
|
|
5878
|
-
ThePluginMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
5879
|
-
ThePluginMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.2", type: ThePluginMenuComponent, selector: "the-plugin-menu", inputs: { editor: "editor", theDisplaySearch: "theDisplaySearch", thePluginMenu: "thePluginMenu" }, host: { properties: { "class": "this.containerClassName" } }, viewQueries: [{ propertyName: "dropdownTriggers", predicate: ["dropdownTriggers"], descendants: true, read: ThyDropdownDirective }], usesInheritance: true, ngImport: i0, template: "<div *ngIf=\"theDisplaySearch\" class=\"menu-search px-5 pt-5 pb-2\">\n <thy-input-search [(ngModel)]=\"keyWords\" placeholder=\"\u641C\u7D22\" thyIconPosition=\"after\" (ngModelChange)=\"updateKeywords(keyWords)\">\n </thy-input-search>\n</div>\n\n<div\n *ngIf=\"groupMenu.length > 0; else thyEmpty\"\n theListBox\n [keyboardContainer]=\"keyboardContainer\"\n [autoActiveFirstItem]=\"autoActiveFirstItem\"\n (theListboxChange)=\"theListboxChange($event)\"\n class=\"thy-dropdown-menu the-plugin-menu-scroll-container pb-2 pt-0\"\n>\n <div *ngIf=\"iconMenu?.length > 0\" theListboxGroup [horizontalColumn]=\"6\" class=\"icon-menu d-flex pl-5 py-1\">\n <ng-container *ngFor=\"let item of iconMenu; trackBy: trackByFn\">\n <a\n *ngIf=\"item.type === ThePluginMenuItemType.icon\"\n href=\"javascript:;\"\n class=\"mt-2\"\n thyAction\n theListboxOption\n [theOptionValue]=\"item\"\n [thyActionIcon]=\"item.icon\"\n [thyTooltip]=\"item?.name\"\n [thyDisabled]=\"item.disabled\"\n [theOptionDisabled]=\"item.disabled\"\n thePreventDefault\n (click)=\"handleItemSelection(item)\"\n ></a>\n </ng-container>\n </div>\n\n <thy-divider *ngIf=\"this.iconMenu?.length\" class=\"my-2\"></thy-divider>\n <div theListboxGroup>\n <ng-container *ngFor=\"let item of groupMenu; trackBy: trackByFn\">\n <ng-container *ngIf=\"item.isMenuItem && !(item.children?.length > 0) && item.key !== 'table'\">\n <div\n thyDropdownMenuItem\n theListboxOption\n [theOptionValue]=\"item\"\n class=\"py-0\"\n thePreventDefault\n [thyDisabled]=\"item.disabled\"\n [theOptionDisabled]=\"item.disabled\"\n (click)=\"handleItemSelection(item)\"\n >\n <div class=\"menu-icon mr-2\">\n <thy-icon [thyIconName]=\"item.menuIcon\"></thy-icon>\n </div>\n <div class=\"menu-content d-flex align-items-center\">\n <div class=\"menu-item-title w-100\">\n {{ item.name }}\n </div>\n </div>\n </div>\n </ng-container>\n <ng-container *ngIf=\"item.isMenuItem && item.children?.length > 0\" #hasExpanded>\n <div\n #dropdownTriggers\n [thyDropdown]=\"expand\"\n thyTrigger=\"hover\"\n thyDropdownMenuItem\n [thyDisabled]=\"item.disabled\"\n theListboxOption\n [theOptionValue]=\"item\"\n [theOptionDisabled]=\"item.disabled\"\n [thyPopoverOptions]=\"expandPopoverOptions\"\n class=\"py-0\"\n thePreventDefault\n (click)=\"handleItemSelection(item)\"\n >\n <div class=\"menu-icon mr-2\">\n <thy-icon [thyIconName]=\"item.menuIcon\"></thy-icon>\n </div>\n <div class=\"menu-content d-flex align-items-center\">\n <div class=\"menu-item-title w-100\">\n {{ item.name }}\n </div>\n </div>\n <div *ngIf=\"item.children?.length > 0\">\n <thy-icon class=\"text-muted\" thyIconName=\"angle-right\"></thy-icon>\n </div>\n <thy-dropdown-menu #expand>\n <div class=\"the-plugin-menu-container expand-menu\" theListboxGroup>\n <ng-container *ngFor=\"let child of item.children\">\n <div\n *ngIf=\"child.type === ThePluginMenuItemType.group\"\n thyDropdownMenuItem\n theListboxOption\n class=\"py-0\"\n thePreventDefault\n [theOptionDisabled]=\"item.disabled\"\n [thyDisabled]=\"child.disabled\"\n (click)=\"handleItemSelection(child)\"\n [theOptionValue]=\"child\"\n >\n <div class=\"menu-icon mr-2\">\n <thy-icon [thyIconName]=\"child.menuIcon\"></thy-icon>\n </div>\n <div class=\"menu-content d-flex align-items-center\">\n <div class=\"menu-item-title w-100\">\n {{ child.name }}\n </div>\n </div>\n </div>\n <thy-divider *ngIf=\"child === 'divider'\" class=\"my-2\"></thy-divider>\n </ng-container>\n </div>\n </thy-dropdown-menu>\n </div>\n </ng-container>\n <ng-container *ngIf=\"item.isMenuItem && item.key === 'table'\">\n <div\n #dropdownTriggers\n [thyPopover]=\"tableSelect\"\n thyPlacement=\"rightTop\"\n thyTrigger=\"hover\"\n thyDropdownMenuItem\n theListboxOption\n [thyConfig]=\"tableSelectPopoverConfig\"\n [theOptionValue]=\"item\"\n [theOptionDisabled]=\"item.disabled\"\n [thyDisabled]=\"item.disabled\"\n class=\"py-0\"\n thePreventDefault\n (click)=\"handleItemSelection(item)\"\n >\n <div class=\"menu-icon mr-2\">\n <thy-icon [thyIconName]=\"item.menuIcon\"></thy-icon>\n </div>\n <div class=\"menu-content d-flex align-items-center\">\n <div class=\"menu-item-title w-100\">\n {{ item.name }}\n </div>\n </div>\n <div>\n <thy-icon class=\"text-muted\" thyIconName=\"angle-right\"></thy-icon>\n </div>\n\n <ng-template #tableSelect>\n <table-select\n class=\"plugin-menu-table the-table-selector-panel\"\n [editor]=\"editor\"\n [beforeInsert]=\"removeKeywords\"\n ></table-select>\n </ng-template>\n </div>\n </ng-container>\n <ng-container *ngIf=\"!item.isMenuItem\" #menuGroup>\n <thy-dropdown-menu-group class=\"font-size-sm\" [thyTitle]=\"item.groupName\"></thy-dropdown-menu-group>\n </ng-container>\n </ng-container>\n </div>\n</div>\n\n<ng-template #thyEmpty>\n <div class=\"empty d-flex align-items-center justify-content-center\">\n <thy-empty [thyMessage]=\"thyMessage\"></thy-empty>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.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.ThyInputSearchComponent, selector: "thy-input-search", inputs: ["name", "placeholder", "thyTheme", "thySearchFocus", "thyIconPosition", "thySize"], outputs: ["clear", "thyClear"] }, { kind: "component", type: i7.ThyActionComponent, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }, { kind: "component", type: i8$1.ThyDividerComponent, selector: "thy-divider", inputs: ["thyVertical", "thyStyle", "thyColor", "thyText", "thyTextDirection", "thyDeeper"] }, { kind: "directive", type: i6.ThyDropdownDirective, selector: "[thyDropdown]", inputs: ["thyDropdownMenu", "thyDropdown", "thyTrigger", "thyShowDelay", "thyHideDelay", "thyActiveClass", "thyPopoverOptions"], outputs: ["thyActiveChange"] }, { kind: "component", type: i6.ThyDropdownMenuComponent, selector: "thy-dropdown-menu", inputs: ["thyWidth"] }, { kind: "component", type: i6.ThyDropdownMenuGroupComponent, selector: "thy-dropdown-menu-group", inputs: ["thyTitle"] }, { kind: "directive", type: i6.ThyDropdownMenuItemDirective, selector: "[thyDropdownMenuItem]", inputs: ["thyType", "thyDisabled"] }, { kind: "component", type: i10.ThyEmptyComponent, selector: "thy-empty", inputs: ["thyMessage", "thyTranslationKey", "thyTranslationValues", "thyEntityName", "thyEntityNameTranslateKey", "thyIconName", "thySize", "thyMarginTop", "thyTopAuto", "thyContainer", "thyImageUrl", "thyImageLoading", "thyImageFetchPriority", "thyDescription"] }, { kind: "directive", type: i1$1.ThyPopoverDirective, selector: "[thyPopover]", inputs: ["thyPopover", "thyTrigger", "thyPlacement", "thyOffset", "thyConfig", "thyShowDelay", "thyHideDelay", "thyAutoAdaptive", "thyDisabled"] }, { kind: "component", type: TheTableSelectComponent, selector: "table-select", inputs: ["optionsParam", "editor", "beforeInsert"] }, { kind: "directive", type: TheListboxOptionDirective, selector: "[theListboxOption]", inputs: ["theOptionValue", "theOptionDisabled"], exportAs: ["theListboxOption"] }, { kind: "directive", type: TheListboxGroupDirective, selector: "[theListboxGroup]", inputs: ["horizontalColumn"], exportAs: ["theListboxGroup"] }, { kind: "directive", type: TheListboxDirective, selector: "[theListBox]", inputs: ["keyboardContainer", "autoActiveFirstItem"], outputs: ["theListboxChange"], exportAs: ["theListBox"] }, { kind: "directive", type: ThePreventDefaultDirective, selector: "[thePreventDefault]", exportAs: ["thePreventDefault"] }] });
|
|
5880
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
5882
|
+
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 });
|
|
5883
|
+
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.ThyInputSearchComponent, selector: "thy-input-search", inputs: ["name", "placeholder", "thyTheme", "thySearchFocus", "thyIconPosition", "thySize"], outputs: ["clear", "thyClear"] }, { kind: "component", type: i7.ThyActionComponent, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }, { kind: "component", type: i8$1.ThyDividerComponent, selector: "thy-divider", inputs: ["thyVertical", "thyStyle", "thyColor", "thyText", "thyTextDirection", "thyDeeper"] }, { kind: "directive", type: i6.ThyDropdownDirective, selector: "[thyDropdown]", inputs: ["thyDropdownMenu", "thyDropdown", "thyTrigger", "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.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"] }] });
|
|
5884
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ThePluginMenuComponent, decorators: [{
|
|
5881
5885
|
type: Component,
|
|
5882
5886
|
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" }]
|
|
5883
5887
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }, { type: i1$1.ThyPopoverRef }]; }, propDecorators: { dropdownTriggers: [{
|
|
@@ -5984,6 +5988,13 @@ const TodoItemEditor = {
|
|
|
5984
5988
|
};
|
|
5985
5989
|
|
|
5986
5990
|
class TheVerticalToolbarItemComponent extends TheBaseToolbarDropdown {
|
|
5991
|
+
constructor(elementRef, thyPopover, viewContainerRef) {
|
|
5992
|
+
super();
|
|
5993
|
+
this.elementRef = elementRef;
|
|
5994
|
+
this.thyPopover = thyPopover;
|
|
5995
|
+
this.viewContainerRef = viewContainerRef;
|
|
5996
|
+
this.isHide = true;
|
|
5997
|
+
}
|
|
5987
5998
|
get isOpened() {
|
|
5988
5999
|
return this.dropdownPopoverRef && this.dropdownPopoverRef.getOverlayRef() && this.dropdownPopoverRef.getOverlayRef().hasAttached();
|
|
5989
6000
|
}
|
|
@@ -5992,13 +6003,6 @@ class TheVerticalToolbarItemComponent extends TheBaseToolbarDropdown {
|
|
|
5992
6003
|
this.close();
|
|
5993
6004
|
}
|
|
5994
6005
|
}
|
|
5995
|
-
constructor(elementRef, thyPopover, viewContainerRef) {
|
|
5996
|
-
super();
|
|
5997
|
-
this.elementRef = elementRef;
|
|
5998
|
-
this.thyPopover = thyPopover;
|
|
5999
|
-
this.viewContainerRef = viewContainerRef;
|
|
6000
|
-
this.isHide = true;
|
|
6001
|
-
}
|
|
6002
6006
|
ngOnInit() { }
|
|
6003
6007
|
menusActive(editor) {
|
|
6004
6008
|
return this.menus.find(i => {
|
|
@@ -6041,9 +6045,9 @@ class TheVerticalToolbarItemComponent extends TheBaseToolbarDropdown {
|
|
|
6041
6045
|
}
|
|
6042
6046
|
}
|
|
6043
6047
|
}
|
|
6044
|
-
TheVerticalToolbarItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
6045
|
-
TheVerticalToolbarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
6046
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
6048
|
+
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 });
|
|
6049
|
+
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: i7.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"] }] });
|
|
6050
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheVerticalToolbarItemComponent, decorators: [{
|
|
6047
6051
|
type: Component,
|
|
6048
6052
|
args: [{ selector: 'the-toolbar-vertical-align-item', host: {
|
|
6049
6053
|
class: 'the-toolbar-dropdown-container verticalAlign',
|
|
@@ -6210,7 +6214,7 @@ const TableEditor = {
|
|
|
6210
6214
|
const tableNode = getAboveByType(editor, ElementKinds.table);
|
|
6211
6215
|
if (tableNode) {
|
|
6212
6216
|
const tableComponent = ELEMENT_TO_COMPONENT.get(tableNode[0]);
|
|
6213
|
-
const selectedCellPositions = tableComponent.tableStore.
|
|
6217
|
+
const selectedCellPositions = tableComponent.tableStore.getSelectedCellPositions();
|
|
6214
6218
|
if (selectedCellPositions.length > 0) {
|
|
6215
6219
|
return selectedCellPositions;
|
|
6216
6220
|
}
|
|
@@ -6324,9 +6328,7 @@ const TableEditor = {
|
|
|
6324
6328
|
if (!TableEditor.hasHeaderRow(editor) && !TableEditor.hasHeaderColumn(editor)) {
|
|
6325
6329
|
return false;
|
|
6326
6330
|
}
|
|
6327
|
-
const
|
|
6328
|
-
const selection = editor.selection;
|
|
6329
|
-
const position = TablePosition.create(opts, editor, selection.focus.path);
|
|
6331
|
+
const position = createTablePosition(editor, editor.selection.focus.path);
|
|
6330
6332
|
if (TableEditor.hasHeaderRow(editor) && position.getRowIndex() === 0) {
|
|
6331
6333
|
return true;
|
|
6332
6334
|
}
|
|
@@ -6822,9 +6824,9 @@ class TheBlockquoteComponent extends TheBaseElementComponent {
|
|
|
6822
6824
|
this.cdr = cdr;
|
|
6823
6825
|
}
|
|
6824
6826
|
}
|
|
6825
|
-
TheBlockquoteComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
6826
|
-
TheBlockquoteComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
6827
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
6827
|
+
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 });
|
|
6828
|
+
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"] }] });
|
|
6829
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheBlockquoteComponent, decorators: [{
|
|
6828
6830
|
type: Component,
|
|
6829
6831
|
args: [{
|
|
6830
6832
|
selector: 'blockquote[theBlockquote]',
|
|
@@ -6908,12 +6910,6 @@ const createBlockquotePlugin = createPluginFactory({
|
|
|
6908
6910
|
});
|
|
6909
6911
|
|
|
6910
6912
|
class TheCodeComponent extends TheBaseElementComponent {
|
|
6911
|
-
get code() {
|
|
6912
|
-
return this.element.content;
|
|
6913
|
-
}
|
|
6914
|
-
get isToolbarOpen() {
|
|
6915
|
-
return this.toolbarPopoverRef && this.toolbarPopoverRef.getOverlayRef() && this.toolbarPopoverRef.getOverlayRef().hasAttached();
|
|
6916
|
-
}
|
|
6917
6913
|
constructor(elementRef, cdr, thyNotifyService, contextService, ngZone, config, thyPopover, viewContainerRef, overlay) {
|
|
6918
6914
|
super(elementRef, cdr);
|
|
6919
6915
|
this.elementRef = elementRef;
|
|
@@ -6951,6 +6947,12 @@ class TheCodeComponent extends TheBaseElementComponent {
|
|
|
6951
6947
|
CodeEditor.setCodeAttribute(this.editor, this.element, { language: item.key });
|
|
6952
6948
|
};
|
|
6953
6949
|
}
|
|
6950
|
+
get code() {
|
|
6951
|
+
return this.element.content;
|
|
6952
|
+
}
|
|
6953
|
+
get isToolbarOpen() {
|
|
6954
|
+
return this.toolbarPopoverRef && this.toolbarPopoverRef.getOverlayRef() && this.toolbarPopoverRef.getOverlayRef().hasAttached();
|
|
6955
|
+
}
|
|
6954
6956
|
onContextChange() {
|
|
6955
6957
|
super.onContextChange();
|
|
6956
6958
|
if (this.isCollapsedAndNonReadonly) {
|
|
@@ -7119,9 +7121,9 @@ class TheCodeComponent extends TheBaseElementComponent {
|
|
|
7119
7121
|
this.destroy$.complete();
|
|
7120
7122
|
}
|
|
7121
7123
|
}
|
|
7122
|
-
TheCodeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
7123
|
-
TheCodeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
7124
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
7124
|
+
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 });
|
|
7125
|
+
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$1.ThySwitchComponent, selector: "thy-switch", inputs: ["thyType", "thySize", "thyDisabled"], outputs: ["thyChange"] }, { kind: "component", type: i7.ThyActionComponent, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }, { kind: "component", type: i7.ThyActionsComponent, selector: "thy-actions", inputs: ["thySize"] }, { kind: "component", type: i8$1.ThyDividerComponent, selector: "thy-divider", inputs: ["thyVertical", "thyStyle", "thyColor", "thyText", "thyTextDirection", "thyDeeper"] }, { kind: "component", type: i13.CodeMirrorComponent, selector: "ng-codemirror, [ngCodeMirror]", inputs: ["autoMaxHeight", "options", "delayRefreshTime"], outputs: ["focusChange"] }, { kind: "component", type: TheToolbarDropdownComponent, selector: "the-toolbar-dropdown" }, { kind: "directive", type: ThePreventDefaultDirective, selector: "[thePreventDefault]", exportAs: ["thePreventDefault"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
7126
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheCodeComponent, decorators: [{
|
|
7125
7127
|
type: Component,
|
|
7126
7128
|
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" }]
|
|
7127
7129
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i1$2.ThyNotifyService }, { type: TheContextService }, { type: i0.NgZone }, { type: TheModeConfig, decorators: [{
|
|
@@ -7188,15 +7190,15 @@ const createCodePlugin = createPluginFactory({
|
|
|
7188
7190
|
});
|
|
7189
7191
|
|
|
7190
7192
|
class TheColorToolbarItemComponent extends TheBaseToolbarItem {
|
|
7191
|
-
get isOpenColorSelect() {
|
|
7192
|
-
return this.colorSelectRef && this.colorSelectRef.componentInstance;
|
|
7193
|
-
}
|
|
7194
7193
|
constructor(thyPopover) {
|
|
7195
7194
|
super();
|
|
7196
7195
|
this.thyPopover = thyPopover;
|
|
7197
7196
|
this.defaultColorLine = '#FF0100';
|
|
7198
7197
|
this.defaultBackgroundColorLine = '#FFDA00';
|
|
7199
7198
|
}
|
|
7199
|
+
get isOpenColorSelect() {
|
|
7200
|
+
return this.colorSelectRef && this.colorSelectRef.componentInstance;
|
|
7201
|
+
}
|
|
7200
7202
|
preventDefault(event) {
|
|
7201
7203
|
event.preventDefault();
|
|
7202
7204
|
event.stopPropagation();
|
|
@@ -7249,8 +7251,8 @@ class TheColorToolbarItemComponent extends TheBaseToolbarItem {
|
|
|
7249
7251
|
}
|
|
7250
7252
|
}
|
|
7251
7253
|
}
|
|
7252
|
-
TheColorToolbarItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
7253
|
-
TheColorToolbarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
7254
|
+
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 });
|
|
7255
|
+
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: `
|
|
7254
7256
|
<a
|
|
7255
7257
|
href="javascript:;"
|
|
7256
7258
|
thyAction
|
|
@@ -7267,8 +7269,8 @@ TheColorToolbarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14
|
|
|
7267
7269
|
></thy-icon>
|
|
7268
7270
|
<thy-icon class="link-down-icon font-size-sm text-desc ml-1" thyIconName="caret-down"></thy-icon>
|
|
7269
7271
|
</a>
|
|
7270
|
-
`, isInline: true, dependencies: [{ kind: "component", type:
|
|
7271
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
7272
|
+
`, 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: i7.ThyActionComponent, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }] });
|
|
7273
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheColorToolbarItemComponent, decorators: [{
|
|
7272
7274
|
type: Component,
|
|
7273
7275
|
args: [{
|
|
7274
7276
|
selector: 'the-color-toolbar-item',
|
|
@@ -8053,9 +8055,9 @@ class TheConversionHintComponent {
|
|
|
8053
8055
|
clearInterval(this.closeTimer);
|
|
8054
8056
|
}
|
|
8055
8057
|
}
|
|
8056
|
-
TheConversionHintComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
8057
|
-
TheConversionHintComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
8058
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
8058
|
+
TheConversionHintComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheConversionHintComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
8059
|
+
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 });
|
|
8060
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheConversionHintComponent, decorators: [{
|
|
8059
8061
|
type: Component,
|
|
8060
8062
|
args: [{ selector: 'the-conversion-hint', host: {
|
|
8061
8063
|
class: 'the-conversion-hint'
|
|
@@ -8423,14 +8425,14 @@ class TheHrComponent extends TheBaseElementComponent {
|
|
|
8423
8425
|
});
|
|
8424
8426
|
}
|
|
8425
8427
|
}
|
|
8426
|
-
TheHrComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
8427
|
-
TheHrComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
8428
|
+
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 });
|
|
8429
|
+
TheHrComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: TheHrComponent, selector: "the-hr, [theHr]", usesInheritance: true, ngImport: i0, template: `
|
|
8428
8430
|
<div class="the-hr" contenteditable="false" [ngClass]="{ active: isCollapsedAndNonReadonly }">
|
|
8429
8431
|
<hr class="the-hr" />
|
|
8430
8432
|
<slate-children [children]="children" [context]="childrenContext" [viewContext]="viewContext"></slate-children>
|
|
8431
8433
|
</div>
|
|
8432
8434
|
`, 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"] }] });
|
|
8433
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
8435
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheHrComponent, decorators: [{
|
|
8434
8436
|
type: Component,
|
|
8435
8437
|
args: [{
|
|
8436
8438
|
selector: 'the-hr, [theHr]',
|
|
@@ -8493,15 +8495,6 @@ const createHrPlugin = createPluginFactory({
|
|
|
8493
8495
|
});
|
|
8494
8496
|
|
|
8495
8497
|
class TheImageComponent extends TheBaseElementComponent {
|
|
8496
|
-
get isOpen() {
|
|
8497
|
-
return this.layoutToolbarRef && this.layoutToolbarRef.getOverlayRef() && this.layoutToolbarRef.getOverlayRef().hasAttached();
|
|
8498
|
-
}
|
|
8499
|
-
get imageBindingWidth() {
|
|
8500
|
-
const currentWidth = this.imageEntry?.width || this.naturalWidth;
|
|
8501
|
-
return this.imageEntry?.layout && currentWidth > this.layoutDefaultWidth && !this.imageEntry?.reSized
|
|
8502
|
-
? this.layoutDefaultWidth
|
|
8503
|
-
: this.imageEntry.width;
|
|
8504
|
-
}
|
|
8505
8498
|
constructor(elementRef, imageUploaderService, cdr, theContextService, thyPopover, overlay, thyImageService, viewContainerRef) {
|
|
8506
8499
|
super(elementRef, cdr);
|
|
8507
8500
|
this.elementRef = elementRef;
|
|
@@ -8585,6 +8578,15 @@ class TheImageComponent extends TheBaseElementComponent {
|
|
|
8585
8578
|
}
|
|
8586
8579
|
};
|
|
8587
8580
|
}
|
|
8581
|
+
get isOpen() {
|
|
8582
|
+
return this.layoutToolbarRef && this.layoutToolbarRef.getOverlayRef() && this.layoutToolbarRef.getOverlayRef().hasAttached();
|
|
8583
|
+
}
|
|
8584
|
+
get imageBindingWidth() {
|
|
8585
|
+
const currentWidth = this.imageEntry?.width || this.naturalWidth;
|
|
8586
|
+
return this.imageEntry?.layout && currentWidth > this.layoutDefaultWidth && !this.imageEntry?.reSized
|
|
8587
|
+
? this.layoutDefaultWidth
|
|
8588
|
+
: this.imageEntry.width;
|
|
8589
|
+
}
|
|
8588
8590
|
ngOnInit() {
|
|
8589
8591
|
this.fileItem = this.theContextService.uploadingFiles.find(item => item.url === this.element.url);
|
|
8590
8592
|
if (this.fileItem?.file && this.fileItem.file instanceof File) {
|
|
@@ -8829,15 +8831,15 @@ class TheImageComponent extends TheBaseElementComponent {
|
|
|
8829
8831
|
event.stopPropagation();
|
|
8830
8832
|
}
|
|
8831
8833
|
}
|
|
8832
|
-
TheImageComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
8833
|
-
TheImageComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
8834
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
8834
|
+
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 });
|
|
8835
|
+
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: i7.ThyActionComponent, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }, { kind: "component", type: i7.ThyActionsComponent, selector: "thy-actions", inputs: ["thySize"] }, { kind: "component", type: i8$1.ThyDividerComponent, selector: "thy-divider", inputs: ["thyVertical", "thyStyle", "thyColor", "thyText", "thyTextDirection", "thyDeeper"] }] });
|
|
8836
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheImageComponent, decorators: [{
|
|
8835
8837
|
type: Component,
|
|
8836
8838
|
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" }]
|
|
8837
8839
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: undefined, decorators: [{
|
|
8838
8840
|
type: Inject,
|
|
8839
8841
|
args: [THE_UPLOAD_SERVICE_TOKEN]
|
|
8840
|
-
}] }, { type: i0.ChangeDetectorRef }, { type: TheContextService }, { type: i1$1.ThyPopover }, { type: i2$1.Overlay }, { type: i4.ThyImageService }, { type: i0.ViewContainerRef }]; }, propDecorators: { imageContent: [{
|
|
8842
|
+
}] }, { type: i0.ChangeDetectorRef }, { type: TheContextService }, { type: i1$1.ThyPopover }, { type: i2$1.Overlay }, { type: i4$1.ThyImageService }, { type: i0.ViewContainerRef }]; }, propDecorators: { imageContent: [{
|
|
8841
8843
|
type: ViewChild,
|
|
8842
8844
|
args: ['imageContent']
|
|
8843
8845
|
}], img: [{
|
|
@@ -9027,11 +9029,11 @@ class TheInlineCodeComponent extends TheBaseElementComponent {
|
|
|
9027
9029
|
this.inlineChromiumBugfix = String.fromCodePoint(160);
|
|
9028
9030
|
}
|
|
9029
9031
|
}
|
|
9030
|
-
TheInlineCodeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
9031
|
-
TheInlineCodeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
9032
|
+
TheInlineCodeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheInlineCodeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
9033
|
+
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>
|
|
9032
9034
|
<span><slate-children [children]="children" [context]="childrenContext" [viewContext]="viewContext"></slate-children></span>
|
|
9033
9035
|
<span contenteditable="false" class="the-break-char">{{ inlineChromiumBugfix }}</span>`, isInline: true, dependencies: [{ kind: "component", type: i1.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }] });
|
|
9034
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
9036
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheInlineCodeComponent, decorators: [{
|
|
9035
9037
|
type: Component,
|
|
9036
9038
|
args: [{
|
|
9037
9039
|
selector: 'span[theInlineCode]',
|
|
@@ -9132,9 +9134,9 @@ class TheLinkHoverComponent {
|
|
|
9132
9134
|
event.stopPropagation();
|
|
9133
9135
|
}
|
|
9134
9136
|
}
|
|
9135
|
-
TheLinkHoverComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
9136
|
-
TheLinkHoverComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
9137
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
9137
|
+
TheLinkHoverComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheLinkHoverComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
9138
|
+
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: i7.ThyActionComponent, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }, { kind: "component", type: i8$1.ThyDividerComponent, selector: "thy-divider", inputs: ["thyVertical", "thyStyle", "thyColor", "thyText", "thyTextDirection", "thyDeeper"] }, { kind: "directive", type: ThePreventDefaultDirective, selector: "[thePreventDefault]", exportAs: ["thePreventDefault"] }] });
|
|
9139
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheLinkHoverComponent, decorators: [{
|
|
9138
9140
|
type: Component,
|
|
9139
9141
|
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" }]
|
|
9140
9142
|
}], ctorParameters: function () { return []; }, propDecorators: { link: [{
|
|
@@ -9148,11 +9150,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
|
|
|
9148
9150
|
}] } });
|
|
9149
9151
|
|
|
9150
9152
|
class TheLinkEditComponent {
|
|
9151
|
-
handleDocumentMouseDown(event) {
|
|
9152
|
-
if (!document.querySelector('.the-link-edit-container').contains(event.target)) {
|
|
9153
|
-
this.thyPopoverRef.close();
|
|
9154
|
-
}
|
|
9155
|
-
}
|
|
9156
9153
|
constructor(thyPopoverRef) {
|
|
9157
9154
|
this.thyPopoverRef = thyPopoverRef;
|
|
9158
9155
|
this.className = 'the-link-edit-container';
|
|
@@ -9170,6 +9167,11 @@ class TheLinkEditComponent {
|
|
|
9170
9167
|
}
|
|
9171
9168
|
};
|
|
9172
9169
|
}
|
|
9170
|
+
handleDocumentMouseDown(event) {
|
|
9171
|
+
if (!document.querySelector('.the-link-edit-container').contains(event.target)) {
|
|
9172
|
+
this.thyPopoverRef.close();
|
|
9173
|
+
}
|
|
9174
|
+
}
|
|
9173
9175
|
ngOnInit() {
|
|
9174
9176
|
this.originText = this.text;
|
|
9175
9177
|
this.originLink = this.link;
|
|
@@ -9216,9 +9218,9 @@ class TheLinkEditComponent {
|
|
|
9216
9218
|
}
|
|
9217
9219
|
}
|
|
9218
9220
|
}
|
|
9219
|
-
TheLinkEditComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
9220
|
-
TheLinkEditComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
9221
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
9221
|
+
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 });
|
|
9222
|
+
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$1.ThyAutofocusDirective, selector: "input[thyAutofocus],textarea[thyAutofocus]", inputs: ["thyAutoSelect", "thyAutofocus"] }, { kind: "directive", type: i5.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"] }] });
|
|
9223
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheLinkEditComponent, decorators: [{
|
|
9222
9224
|
type: Component,
|
|
9223
9225
|
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" }]
|
|
9224
9226
|
}], ctorParameters: function () { return [{ type: i1$1.ThyPopoverRef }]; }, propDecorators: { className: [{
|
|
@@ -9240,12 +9242,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
|
|
|
9240
9242
|
}] } });
|
|
9241
9243
|
|
|
9242
9244
|
class TheBaseLinkComponent extends TheBaseElementComponent {
|
|
9243
|
-
get linkHoverOpened() {
|
|
9244
|
-
return this.thyPopoverHoverRef && this.thyPopoverHoverRef.componentInstance;
|
|
9245
|
-
}
|
|
9246
|
-
get linkEditOpened() {
|
|
9247
|
-
return this.thyPopoverEditRef && this.thyPopoverEditRef.componentInstance;
|
|
9248
|
-
}
|
|
9249
9245
|
constructor(elementRef, cdr, thyPopover, overlay, viewContainerRef) {
|
|
9250
9246
|
super(elementRef, cdr);
|
|
9251
9247
|
this.elementRef = elementRef;
|
|
@@ -9262,6 +9258,12 @@ class TheBaseLinkComponent extends TheBaseElementComponent {
|
|
|
9262
9258
|
}
|
|
9263
9259
|
};
|
|
9264
9260
|
}
|
|
9261
|
+
get linkHoverOpened() {
|
|
9262
|
+
return this.thyPopoverHoverRef && this.thyPopoverHoverRef.componentInstance;
|
|
9263
|
+
}
|
|
9264
|
+
get linkEditOpened() {
|
|
9265
|
+
return this.thyPopoverEditRef && this.thyPopoverEditRef.componentInstance;
|
|
9266
|
+
}
|
|
9265
9267
|
ngOnInit() {
|
|
9266
9268
|
super.ngOnInit();
|
|
9267
9269
|
}
|
|
@@ -9357,9 +9359,9 @@ class TheBaseLinkComponent extends TheBaseElementComponent {
|
|
|
9357
9359
|
this.close(LinkCloseTypes.destroy);
|
|
9358
9360
|
}
|
|
9359
9361
|
}
|
|
9360
|
-
TheBaseLinkComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
9361
|
-
TheBaseLinkComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
9362
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
9362
|
+
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 });
|
|
9363
|
+
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 });
|
|
9364
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheBaseLinkComponent, decorators: [{
|
|
9363
9365
|
type: Component,
|
|
9364
9366
|
args: [{
|
|
9365
9367
|
selector: '[TheBaseLinkComponent]',
|
|
@@ -9377,11 +9379,11 @@ class TheLinkComponent extends TheBaseLinkComponent {
|
|
|
9377
9379
|
this.inlineChromiumBugfix = String.fromCodePoint(160);
|
|
9378
9380
|
}
|
|
9379
9381
|
}
|
|
9380
|
-
TheLinkComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
9381
|
-
TheLinkComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
9382
|
+
TheLinkComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheLinkComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
9383
|
+
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>
|
|
9382
9384
|
<span><slate-children [children]="children" [context]="childrenContext" [viewContext]="viewContext"></slate-children></span>
|
|
9383
9385
|
<span contenteditable="false" class="the-break-char">{{ inlineChromiumBugfix }}</span>`, isInline: true, dependencies: [{ kind: "component", type: i1.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }] });
|
|
9384
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
9386
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheLinkComponent, decorators: [{
|
|
9385
9387
|
type: Component,
|
|
9386
9388
|
args: [{
|
|
9387
9389
|
selector: 'a[theLink]',
|
|
@@ -10019,17 +10021,17 @@ function onKeyDownList(e, editor) {
|
|
|
10019
10021
|
}
|
|
10020
10022
|
|
|
10021
10023
|
class TheNumberedListComponent extends TheBaseElementComponent {
|
|
10024
|
+
constructor(elementRef, cdr) {
|
|
10025
|
+
super(elementRef, cdr);
|
|
10026
|
+
this.elementRef = elementRef;
|
|
10027
|
+
this.cdr = cdr;
|
|
10028
|
+
}
|
|
10022
10029
|
get start() {
|
|
10023
10030
|
return this.element.start;
|
|
10024
10031
|
}
|
|
10025
10032
|
get level() {
|
|
10026
10033
|
return this.element?.indent || null;
|
|
10027
10034
|
}
|
|
10028
|
-
constructor(elementRef, cdr) {
|
|
10029
|
-
super(elementRef, cdr);
|
|
10030
|
-
this.elementRef = elementRef;
|
|
10031
|
-
this.cdr = cdr;
|
|
10032
|
-
}
|
|
10033
10035
|
ngOnInit() {
|
|
10034
10036
|
super.ngOnInit();
|
|
10035
10037
|
}
|
|
@@ -10037,9 +10039,9 @@ class TheNumberedListComponent extends TheBaseElementComponent {
|
|
|
10037
10039
|
super.ngOnDestroy();
|
|
10038
10040
|
}
|
|
10039
10041
|
}
|
|
10040
|
-
TheNumberedListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
10041
|
-
TheNumberedListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
10042
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
10042
|
+
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 });
|
|
10043
|
+
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"] }] });
|
|
10044
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheNumberedListComponent, decorators: [{
|
|
10043
10045
|
type: Component,
|
|
10044
10046
|
args: [{
|
|
10045
10047
|
selector: 'ol[theOl]',
|
|
@@ -10054,14 +10056,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
|
|
|
10054
10056
|
}] } });
|
|
10055
10057
|
|
|
10056
10058
|
class TheBulletedListComponent extends TheBaseElementComponent {
|
|
10057
|
-
get level() {
|
|
10058
|
-
return this.element?.indent || null;
|
|
10059
|
-
}
|
|
10060
10059
|
constructor(elementRef, cdr) {
|
|
10061
10060
|
super(elementRef, cdr);
|
|
10062
10061
|
this.elementRef = elementRef;
|
|
10063
10062
|
this.cdr = cdr;
|
|
10064
10063
|
}
|
|
10064
|
+
get level() {
|
|
10065
|
+
return this.element?.indent || null;
|
|
10066
|
+
}
|
|
10065
10067
|
ngOnInit() {
|
|
10066
10068
|
super.ngOnInit();
|
|
10067
10069
|
}
|
|
@@ -10069,9 +10071,9 @@ class TheBulletedListComponent extends TheBaseElementComponent {
|
|
|
10069
10071
|
super.ngOnDestroy();
|
|
10070
10072
|
}
|
|
10071
10073
|
}
|
|
10072
|
-
TheBulletedListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
10073
|
-
TheBulletedListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
10074
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
10074
|
+
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 });
|
|
10075
|
+
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"] }] });
|
|
10076
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheBulletedListComponent, decorators: [{
|
|
10075
10077
|
type: Component,
|
|
10076
10078
|
args: [{
|
|
10077
10079
|
selector: 'ul[theUl]',
|
|
@@ -10158,9 +10160,9 @@ class TheListItemComponent extends TheBaseElementComponent {
|
|
|
10158
10160
|
}
|
|
10159
10161
|
}
|
|
10160
10162
|
}
|
|
10161
|
-
TheListItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
10162
|
-
TheListItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
10163
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
10163
|
+
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 });
|
|
10164
|
+
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"] }] });
|
|
10165
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheListItemComponent, decorators: [{
|
|
10164
10166
|
type: Component,
|
|
10165
10167
|
args: [{
|
|
10166
10168
|
selector: 'li[theLi]',
|
|
@@ -10927,6 +10929,13 @@ const SLA_TABLE_SELECTOR = '.slate-element-table';
|
|
|
10927
10929
|
const SLA_TABLE_CELL_SELECTOR = '.slate-element-table-cell';
|
|
10928
10930
|
|
|
10929
10931
|
class TheToolbarGroupComponent {
|
|
10932
|
+
constructor(elementRef, thyPopover, viewContainerRef) {
|
|
10933
|
+
this.elementRef = elementRef;
|
|
10934
|
+
this.thyPopover = thyPopover;
|
|
10935
|
+
this.viewContainerRef = viewContainerRef;
|
|
10936
|
+
this.className = 'the-toolbar-group';
|
|
10937
|
+
this.active = false;
|
|
10938
|
+
}
|
|
10930
10939
|
set item(i) {
|
|
10931
10940
|
this._item = i;
|
|
10932
10941
|
this.activeMenuItem = i;
|
|
@@ -10951,13 +10960,6 @@ class TheToolbarGroupComponent {
|
|
|
10951
10960
|
clickHandle(event) {
|
|
10952
10961
|
event.stopPropagation();
|
|
10953
10962
|
}
|
|
10954
|
-
constructor(elementRef, thyPopover, viewContainerRef) {
|
|
10955
|
-
this.elementRef = elementRef;
|
|
10956
|
-
this.thyPopover = thyPopover;
|
|
10957
|
-
this.viewContainerRef = viewContainerRef;
|
|
10958
|
-
this.className = 'the-toolbar-group';
|
|
10959
|
-
this.active = false;
|
|
10960
|
-
}
|
|
10961
10963
|
ngOnInit() { }
|
|
10962
10964
|
ngOnDestroy() {
|
|
10963
10965
|
this.closeGroup();
|
|
@@ -11016,9 +11018,9 @@ class TheToolbarGroupComponent {
|
|
|
11016
11018
|
}
|
|
11017
11019
|
}
|
|
11018
11020
|
}
|
|
11019
|
-
TheToolbarGroupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
11020
|
-
TheToolbarGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
11021
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
11021
|
+
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 });
|
|
11022
|
+
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: i7.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"] }] });
|
|
11023
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheToolbarGroupComponent, decorators: [{
|
|
11022
11024
|
type: Component,
|
|
11023
11025
|
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" }]
|
|
11024
11026
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1$1.ThyPopover }, { type: i0.ViewContainerRef }]; }, propDecorators: { className: [{
|
|
@@ -11064,9 +11066,9 @@ class ColumnResizeNotifierSource {
|
|
|
11064
11066
|
this.triggerResize = new Subject();
|
|
11065
11067
|
}
|
|
11066
11068
|
}
|
|
11067
|
-
ColumnResizeNotifierSource.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
11068
|
-
ColumnResizeNotifierSource.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
11069
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
11069
|
+
ColumnResizeNotifierSource.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ColumnResizeNotifierSource, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
11070
|
+
ColumnResizeNotifierSource.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ColumnResizeNotifierSource });
|
|
11071
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ColumnResizeNotifierSource, decorators: [{
|
|
11070
11072
|
type: Injectable
|
|
11071
11073
|
}] });
|
|
11072
11074
|
|
|
@@ -11116,16 +11118,14 @@ class TableCellEventDispatcher {
|
|
|
11116
11118
|
}));
|
|
11117
11119
|
}
|
|
11118
11120
|
}
|
|
11119
|
-
TableCellEventDispatcher.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
11120
|
-
TableCellEventDispatcher.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
11121
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
11121
|
+
TableCellEventDispatcher.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TableCellEventDispatcher, deps: [{ token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
11122
|
+
TableCellEventDispatcher.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TableCellEventDispatcher });
|
|
11123
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TableCellEventDispatcher, decorators: [{
|
|
11122
11124
|
type: Injectable
|
|
11123
11125
|
}], ctorParameters: function () { return [{ type: i0.NgZone }]; } });
|
|
11124
11126
|
|
|
11125
11127
|
function splitCell(editor) {
|
|
11126
|
-
const
|
|
11127
|
-
const { anchor } = editor.selection;
|
|
11128
|
-
const tablePosition = TablePosition.create(opts, editor, anchor.path);
|
|
11128
|
+
const tablePosition = createTablePosition(editor);
|
|
11129
11129
|
const { cell, table, cellEntry } = tablePosition;
|
|
11130
11130
|
if ((!cell.rowspan && !cell.colspan) || (cell.rowspan === 1 && cell.colspan === 1))
|
|
11131
11131
|
return editor;
|
|
@@ -11151,9 +11151,7 @@ function resetTableCell(editor, table, cell, cellRow, cellCol) {
|
|
|
11151
11151
|
}
|
|
11152
11152
|
|
|
11153
11153
|
function getSelectCellNode(editor, selectedCells) {
|
|
11154
|
-
const
|
|
11155
|
-
const opts = new TableOptions();
|
|
11156
|
-
const pos = TablePosition.create(opts, editor, anchor.path);
|
|
11154
|
+
const pos = createTablePosition(editor);
|
|
11157
11155
|
return selectedCells
|
|
11158
11156
|
.map(item => {
|
|
11159
11157
|
const node = pos.findCellByPath(item);
|
|
@@ -11167,12 +11165,48 @@ function getSelectCellNode(editor, selectedCells) {
|
|
|
11167
11165
|
.filter(item => item);
|
|
11168
11166
|
}
|
|
11169
11167
|
|
|
11168
|
+
/* cell-position 有关的函数 */
|
|
11169
|
+
const isSelectedAllCell = (editor, selectedCellPositions) => {
|
|
11170
|
+
const pos = createTablePosition(editor);
|
|
11171
|
+
return !!selectedCellPositions.length && pos.getHeight() * pos.getWidth() === selectedCellPositions.length;
|
|
11172
|
+
};
|
|
11173
|
+
const getSelectedCellPositions = (editor, selectedCells) => {
|
|
11174
|
+
return selectedCells?.map((cell) => {
|
|
11175
|
+
const path = AngularEditor.findPath(editor, cell);
|
|
11176
|
+
const [row, col] = path.slice(-2);
|
|
11177
|
+
return { row, col };
|
|
11178
|
+
});
|
|
11179
|
+
};
|
|
11180
|
+
/* 获取一定范围内所有的单元格 */
|
|
11181
|
+
const getCellPositionsFromRange = (startRow, startCol, endRow, endCol) => {
|
|
11182
|
+
const result = [];
|
|
11183
|
+
for (let row = startRow; row < endRow; row++) {
|
|
11184
|
+
for (let col = startCol; col < endCol; col++) {
|
|
11185
|
+
result.push({ row, col });
|
|
11186
|
+
}
|
|
11187
|
+
}
|
|
11188
|
+
return result;
|
|
11189
|
+
};
|
|
11190
|
+
/**
|
|
11191
|
+
* 去重重复的单元格位置
|
|
11192
|
+
* @returns
|
|
11193
|
+
*/
|
|
11194
|
+
const uniqueCellPosition = (cells, selectedCellPositions) => {
|
|
11195
|
+
const result = [];
|
|
11196
|
+
const modCells = new Set();
|
|
11197
|
+
cells.concat(selectedCellPositions).forEach(cell => modCells.add(JSON.stringify(cell)));
|
|
11198
|
+
modCells.forEach((cell) => result.push(JSON.parse(cell)));
|
|
11199
|
+
return result;
|
|
11200
|
+
};
|
|
11201
|
+
|
|
11170
11202
|
function isSelectedCellMerged(editor) {
|
|
11171
11203
|
if (editor && editor.selection) {
|
|
11172
11204
|
const opts = new TableOptions();
|
|
11173
11205
|
const { anchor } = editor.selection;
|
|
11174
11206
|
const { cell } = TablePosition.create(opts, editor, anchor.path);
|
|
11175
|
-
|
|
11207
|
+
if (cell) {
|
|
11208
|
+
return (cell.colspan && cell.colspan !== 1) || (cell.rowspan && cell.rowspan !== 1);
|
|
11209
|
+
}
|
|
11176
11210
|
}
|
|
11177
11211
|
return false;
|
|
11178
11212
|
}
|
|
@@ -11252,6 +11286,17 @@ function mergeCellContent(editor, leftTopCellPath, cellPath) {
|
|
|
11252
11286
|
});
|
|
11253
11287
|
});
|
|
11254
11288
|
}
|
|
11289
|
+
// 计算合并前的单元格
|
|
11290
|
+
function getCellPositionsBeforeMerge(editor, { row, col }) {
|
|
11291
|
+
const pos = createTablePosition(editor);
|
|
11292
|
+
const { rowspan, colspan } = pos.findCellByPath({ row, col });
|
|
11293
|
+
if (rowspan || colspan) {
|
|
11294
|
+
const colSpan = colspan ?? 1;
|
|
11295
|
+
const rowSpan = rowspan ?? 1;
|
|
11296
|
+
return getCellPositionsFromRange(row, col, row + rowSpan, col + colSpan);
|
|
11297
|
+
}
|
|
11298
|
+
return [{ row, col }];
|
|
11299
|
+
}
|
|
11255
11300
|
|
|
11256
11301
|
function setCellMenuVisibility(editor, menuList, tableInfo) {
|
|
11257
11302
|
const { selectedCellPositions, isFullscreen, isSelectedTable, selectedRowsIndex, selectedColumnsIndex } = tableInfo;
|
|
@@ -11294,6 +11339,12 @@ function setCellMenuVisibility(editor, menuList, tableInfo) {
|
|
|
11294
11339
|
}
|
|
11295
11340
|
|
|
11296
11341
|
class TheContextMenuComponent {
|
|
11342
|
+
constructor(elementRef, thyPopoverRef) {
|
|
11343
|
+
this.elementRef = elementRef;
|
|
11344
|
+
this.thyPopoverRef = thyPopoverRef;
|
|
11345
|
+
this.menuEntities = [];
|
|
11346
|
+
this.wrap = true;
|
|
11347
|
+
}
|
|
11297
11348
|
handleDocumentMouseDown(event) {
|
|
11298
11349
|
if (!this.elementRef.nativeElement.contains(event.target) && event.button !== 2) {
|
|
11299
11350
|
this.thyPopoverRef.close();
|
|
@@ -11325,17 +11376,11 @@ class TheContextMenuComponent {
|
|
|
11325
11376
|
this.actionHandle(entity);
|
|
11326
11377
|
this.thyPopoverRef.close();
|
|
11327
11378
|
}
|
|
11328
|
-
constructor(elementRef, thyPopoverRef) {
|
|
11329
|
-
this.elementRef = elementRef;
|
|
11330
|
-
this.thyPopoverRef = thyPopoverRef;
|
|
11331
|
-
this.menuEntities = [];
|
|
11332
|
-
this.wrap = true;
|
|
11333
|
-
}
|
|
11334
11379
|
ngOnInit() { }
|
|
11335
11380
|
}
|
|
11336
|
-
TheContextMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
11337
|
-
TheContextMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
11338
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
11381
|
+
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 });
|
|
11382
|
+
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)=\"itemEnterHandle($event, item)\"\n thyStopPropagation\n ></thy-input-number>\n {{ item.nameSuffix }}\n </span>\n </a>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: 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$1.ThyEnterDirective, selector: "[thyEnter]", outputs: ["thyEnter"] }, { kind: "directive", type: i5$1.ThyStopPropagationDirective, selector: "[thyStopPropagation]", inputs: ["thyStopPropagation"] }, { kind: "component", type: i6.ThyDropdownMenuDividerComponent, selector: "thy-dropdown-menu-divider" }, { kind: "directive", type: i6.ThyDropdownMenuItemDirective, selector: "[thyDropdownMenuItem]", inputs: ["thyType", "thyDisabled"] }, { kind: "directive", type: i6.ThyDropdownMenuItemNameDirective, selector: "[thyDropdownMenuItemName]" }, { kind: "directive", type: i6.ThyDropdownMenuItemIconDirective, selector: "[thyDropdownMenuItemIcon]" }, { kind: "directive", type: i6.ThyDropdownMenuItemExtendIconDirective, selector: "[thyDropdownMenuItemExtendIcon]" }, { kind: "component", type: i7$1.ThyInputNumberComponent, selector: "thy-input-number", inputs: ["thyAutoFocus", "thyPlaceholder", "thyDisabled", "thyMax", "thyMin", "thyStep", "thySize", "thyPrecision", "thySuffix"], outputs: ["thyBlur", "thyFocus"] }] });
|
|
11383
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheContextMenuComponent, decorators: [{
|
|
11339
11384
|
type: Component,
|
|
11340
11385
|
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)=\"itemEnterHandle($event, item)\"\n thyStopPropagation\n ></thy-input-number>\n {{ item.nameSuffix }}\n </span>\n </a>\n</ng-template>\n" }]
|
|
11341
11386
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1$1.ThyPopoverRef }]; }, propDecorators: { menuEntities: [{
|
|
@@ -11357,13 +11402,91 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
|
|
|
11357
11402
|
args: ['mousedown', ['$event']]
|
|
11358
11403
|
}] } });
|
|
11359
11404
|
|
|
11360
|
-
|
|
11361
|
-
|
|
11362
|
-
|
|
11405
|
+
const getTableEntry = (editor) => {
|
|
11406
|
+
const { tableEntry } = createTablePosition(editor);
|
|
11407
|
+
return tableEntry;
|
|
11408
|
+
};
|
|
11409
|
+
const getTablePath = (editor) => {
|
|
11410
|
+
const tableEntry = getTableEntry(editor);
|
|
11411
|
+
return tableEntry[1];
|
|
11412
|
+
};
|
|
11413
|
+
const getTable = (editor) => {
|
|
11414
|
+
const { tableEntry } = createTablePosition(editor);
|
|
11415
|
+
return tableEntry[0];
|
|
11416
|
+
};
|
|
11417
|
+
const getSelectedCell = (editor) => {
|
|
11418
|
+
if (editor && editor.selection) {
|
|
11419
|
+
const { cell } = createTablePosition(editor);
|
|
11420
|
+
return cell;
|
|
11363
11421
|
}
|
|
11364
|
-
|
|
11365
|
-
|
|
11422
|
+
return null;
|
|
11423
|
+
};
|
|
11424
|
+
|
|
11425
|
+
const getMinAndMaxCellIndex = (editor, selectedCellPositions, maxRow, maxCol, minRow, minCol, table) => {
|
|
11426
|
+
const beforeCols = [];
|
|
11427
|
+
const beforeRows = [];
|
|
11428
|
+
let spanSelectedCells = [];
|
|
11429
|
+
if (selectedCellPositions.length) {
|
|
11430
|
+
spanSelectedCells = selectedCellPositions
|
|
11431
|
+
.map(item => {
|
|
11432
|
+
const { row, col } = item;
|
|
11433
|
+
const node = table.children[row].children[col];
|
|
11434
|
+
if (!node.hidden) {
|
|
11435
|
+
return {
|
|
11436
|
+
...item,
|
|
11437
|
+
colspan: node.colspan || 1,
|
|
11438
|
+
rowspan: node.rowspan || 1
|
|
11439
|
+
};
|
|
11440
|
+
}
|
|
11441
|
+
})
|
|
11442
|
+
.filter(item => item);
|
|
11443
|
+
}
|
|
11444
|
+
table.children.map((row, rowIndex) => {
|
|
11445
|
+
if (rowIndex <= maxRow) {
|
|
11446
|
+
row.children.map((cell, colIndex) => {
|
|
11447
|
+
if (colIndex <= maxCol) {
|
|
11448
|
+
const cellRowIndex = rowIndex + (cell.rowspan || 1) - 1;
|
|
11449
|
+
const cellColIndex = colIndex + (cell.colspan || 1) - 1;
|
|
11450
|
+
if (spanSelectedCells.length) {
|
|
11451
|
+
const { row: selectRow, col: selectCol, rowspan: selectRowspan, colspan: selectColspan } = spanSelectedCells[0];
|
|
11452
|
+
if (selectRow + selectRowspan - 1 >= minRow && selectCol + selectColspan - 1 >= minCol) {
|
|
11453
|
+
minRow = Math.min(spanSelectedCells[0].row, minRow);
|
|
11454
|
+
minCol = Math.min(spanSelectedCells[0].col, minCol);
|
|
11455
|
+
}
|
|
11456
|
+
}
|
|
11457
|
+
if (cell.colspan && cell.colspan > 1) {
|
|
11458
|
+
beforeCols.push({ rowIndex, colIndex, cellColIndex });
|
|
11459
|
+
if (cellColIndex >= minCol && cellRowIndex >= minRow) {
|
|
11460
|
+
maxCol = Math.max(maxCol, cellColIndex);
|
|
11461
|
+
minCol = Math.min(minCol, colIndex);
|
|
11462
|
+
}
|
|
11463
|
+
}
|
|
11464
|
+
if (cell.rowspan && cell.rowspan > 1) {
|
|
11465
|
+
beforeRows.push({ rowIndex, colIndex, cellRowIndex });
|
|
11466
|
+
if (cellColIndex >= minCol && cellRowIndex >= minRow) {
|
|
11467
|
+
minRow = Math.min(minRow, rowIndex);
|
|
11468
|
+
maxRow = Math.max(maxRow, cellRowIndex);
|
|
11469
|
+
}
|
|
11470
|
+
}
|
|
11471
|
+
}
|
|
11472
|
+
});
|
|
11473
|
+
}
|
|
11474
|
+
});
|
|
11475
|
+
// 判断选区范围内之前的单元格 如果存在cellColIndex === minCol,表示当前获取的minCol并不是最小的,重新获取minCol
|
|
11476
|
+
const colNode = beforeCols.filter(item => item.rowIndex <= maxRow && item.colIndex <= maxCol && item.rowIndex >= minRow && item.cellColIndex === minCol);
|
|
11477
|
+
const rowNode = beforeRows.filter(item => item.rowIndex <= maxRow && item.colIndex <= maxCol && item.colIndex >= minCol && item.cellRowIndex === minRow);
|
|
11478
|
+
if (colNode.length || rowNode.length) {
|
|
11479
|
+
return getMinAndMaxCellIndex(editor, selectedCellPositions, maxRow, maxCol, minRow, minCol, table);
|
|
11366
11480
|
}
|
|
11481
|
+
return {
|
|
11482
|
+
minRow,
|
|
11483
|
+
maxRow,
|
|
11484
|
+
minCol,
|
|
11485
|
+
maxCol
|
|
11486
|
+
};
|
|
11487
|
+
};
|
|
11488
|
+
|
|
11489
|
+
class TableStore {
|
|
11367
11490
|
constructor() {
|
|
11368
11491
|
this.selectedCells$ = new BehaviorSubject([]);
|
|
11369
11492
|
this.dangerousCells$ = new BehaviorSubject([]);
|
|
@@ -11378,44 +11501,34 @@ class TableStore {
|
|
|
11378
11501
|
this.isRightClicking = false;
|
|
11379
11502
|
this.pointerSelection = false;
|
|
11380
11503
|
this.isSelectedAllCell = () => {
|
|
11381
|
-
|
|
11382
|
-
|
|
11383
|
-
|
|
11384
|
-
|
|
11385
|
-
|
|
11386
|
-
const opts = new TableOptions();
|
|
11387
|
-
return TablePosition.create(opts, this.editor, path);
|
|
11504
|
+
if (!this.editor.selection)
|
|
11505
|
+
return false;
|
|
11506
|
+
const pos = createTablePosition(this.editor);
|
|
11507
|
+
const selectedCellPositions = this.getSelectedCellPositions();
|
|
11508
|
+
return !!selectedCellPositions.length && pos.getHeight() * pos.getWidth() === selectedCellPositions.length;
|
|
11388
11509
|
};
|
|
11389
11510
|
}
|
|
11390
|
-
|
|
11391
|
-
|
|
11392
|
-
return tableEntry;
|
|
11393
|
-
}
|
|
11394
|
-
getTablePath() {
|
|
11395
|
-
const tableEntry = this.getTableEntry();
|
|
11396
|
-
return tableEntry[1];
|
|
11511
|
+
get dangerousCells() {
|
|
11512
|
+
return this.dangerousCells$.getValue();
|
|
11397
11513
|
}
|
|
11398
11514
|
getSelectedCellPositions() {
|
|
11399
|
-
return this.selectedCells$.getValue()
|
|
11400
|
-
const path = AngularEditor.findPath(this.editor, cell);
|
|
11401
|
-
const [row, col] = path.slice(-2);
|
|
11402
|
-
return { row, col };
|
|
11403
|
-
});
|
|
11515
|
+
return getSelectedCellPositions(this.editor, this.selectedCells$.getValue());
|
|
11404
11516
|
}
|
|
11405
|
-
|
|
11517
|
+
setSelectedColumnsAndRowIndex() {
|
|
11406
11518
|
if (!this.editor?.selection) {
|
|
11407
11519
|
return;
|
|
11408
11520
|
}
|
|
11409
|
-
const pos = this.
|
|
11521
|
+
const pos = createTablePosition(this.editor);
|
|
11410
11522
|
if (!pos?.table) {
|
|
11411
11523
|
return;
|
|
11412
11524
|
}
|
|
11413
11525
|
const mergeBeforeCells = [];
|
|
11414
|
-
this.
|
|
11526
|
+
const selectedCellPositions = this.getSelectedCellPositions();
|
|
11527
|
+
selectedCellPositions.forEach(({ row, col }) => {
|
|
11415
11528
|
// 计算合并单元格数据时,要按合并前的数据处理
|
|
11416
|
-
mergeBeforeCells.push(...this.
|
|
11529
|
+
mergeBeforeCells.push(...getCellPositionsBeforeMerge(this.editor, { row, col }));
|
|
11417
11530
|
});
|
|
11418
|
-
const cells =
|
|
11531
|
+
const cells = uniqueCellPosition(mergeBeforeCells, selectedCellPositions);
|
|
11419
11532
|
const rowGroup = groupBy(cells, ({ row }) => row);
|
|
11420
11533
|
const colGroup = groupBy(cells, ({ col }) => col);
|
|
11421
11534
|
this.selectedRowsIndex = [];
|
|
@@ -11432,7 +11545,7 @@ class TableStore {
|
|
|
11432
11545
|
}
|
|
11433
11546
|
this.selectedRowsIndex = uniq(this.selectedRowsIndex);
|
|
11434
11547
|
this.selectedColumnsIndex = uniq(this.selectedColumnsIndex);
|
|
11435
|
-
if (
|
|
11548
|
+
if (isSelectedAllCell(this.editor, selectedCellPositions)) {
|
|
11436
11549
|
this.isSelectedTable = true;
|
|
11437
11550
|
}
|
|
11438
11551
|
else {
|
|
@@ -11440,64 +11553,40 @@ class TableStore {
|
|
|
11440
11553
|
}
|
|
11441
11554
|
}
|
|
11442
11555
|
setSelectedCells(cells, pos) {
|
|
11443
|
-
const uniqueCells = this.pointerSelection ? this.
|
|
11556
|
+
const uniqueCells = this.pointerSelection ? uniqueCellPosition(cells, this.getSelectedCellPositions()) : cells;
|
|
11444
11557
|
const cellElements = uniqueCells.map(cell => {
|
|
11445
11558
|
return pos.findCellByPath(cell);
|
|
11446
11559
|
});
|
|
11447
11560
|
this.selectedCells$.next(cellElements);
|
|
11448
|
-
this.
|
|
11561
|
+
this.setSelectedColumnsAndRowIndex();
|
|
11449
11562
|
}
|
|
11450
11563
|
initEditor(editor) {
|
|
11451
11564
|
this.editor = editor;
|
|
11452
11565
|
}
|
|
11453
|
-
/**
|
|
11454
|
-
* 去重重复的单元格位置
|
|
11455
|
-
* @returns
|
|
11456
|
-
*/
|
|
11457
|
-
uniqueCellPosition(cells) {
|
|
11458
|
-
const result = [];
|
|
11459
|
-
const modCells = new Set();
|
|
11460
|
-
cells.concat(this.selectedCellPositions).forEach(cell => modCells.add(JSON.stringify(cell)));
|
|
11461
|
-
modCells.forEach((cell) => result.push(JSON.parse(cell)));
|
|
11462
|
-
return result;
|
|
11463
|
-
}
|
|
11464
|
-
/**
|
|
11465
|
-
* 获取一定范围内所有的单元格
|
|
11466
|
-
* @returns
|
|
11467
|
-
*/
|
|
11468
|
-
getCellPositionsFromRange(startRow, startCol, endRow, endCol) {
|
|
11469
|
-
const result = [];
|
|
11470
|
-
for (let row = startRow; row < endRow; row++) {
|
|
11471
|
-
for (let col = startCol; col < endCol; col++) {
|
|
11472
|
-
result.push({ row, col });
|
|
11473
|
-
}
|
|
11474
|
-
}
|
|
11475
|
-
return result;
|
|
11476
|
-
}
|
|
11477
11566
|
selectRow(editor, index) {
|
|
11478
11567
|
this.clearLastFocusPath();
|
|
11479
|
-
const pos =
|
|
11480
|
-
const cells =
|
|
11568
|
+
const pos = createTablePosition(editor);
|
|
11569
|
+
const cells = getCellPositionsFromRange(index, 0, index + 1, pos.getWidth());
|
|
11481
11570
|
this.setSelectedCells(cells, pos);
|
|
11482
11571
|
this.focusCell(editor, pos.tableEntry[1].concat([index, 0]));
|
|
11483
11572
|
}
|
|
11484
11573
|
selectColumn(editor, index) {
|
|
11485
11574
|
this.clearLastFocusPath();
|
|
11486
|
-
const pos =
|
|
11487
|
-
const cells =
|
|
11575
|
+
const pos = createTablePosition(editor);
|
|
11576
|
+
const cells = getCellPositionsFromRange(0, index, pos.getHeight(), index + 1);
|
|
11488
11577
|
this.setSelectedCells(cells, pos);
|
|
11489
11578
|
this.focusCell(editor, pos.tableEntry[1].concat([0, index]));
|
|
11490
11579
|
}
|
|
11491
11580
|
selectTable(editor) {
|
|
11492
11581
|
this.isSelectedTable = true;
|
|
11493
|
-
const pos =
|
|
11494
|
-
const cells =
|
|
11582
|
+
const pos = createTablePosition(editor);
|
|
11583
|
+
const cells = getCellPositionsFromRange(0, 0, pos.getHeight(), pos.getWidth());
|
|
11495
11584
|
this.setSelectedCells(cells, pos);
|
|
11496
11585
|
this.focusCell(editor, pos.tableEntry[1].concat([0, 0]));
|
|
11497
11586
|
}
|
|
11498
11587
|
// 拖选
|
|
11499
11588
|
selectCells(editor) {
|
|
11500
|
-
const pos =
|
|
11589
|
+
const pos = createTablePosition(editor);
|
|
11501
11590
|
const anchorPath = this.anchorCellPath.slice(-2);
|
|
11502
11591
|
const focusPath = this.focusCellPath.slice(-2);
|
|
11503
11592
|
const rows = [anchorPath[0], focusPath[0]].sort((m, n) => m - n);
|
|
@@ -11510,73 +11599,10 @@ class TableStore {
|
|
|
11510
11599
|
const focusCol = focusPath[1] + (focusColspanCount || 1) - 1;
|
|
11511
11600
|
let initMaxCol = Math.max(anchorCol, focusCol);
|
|
11512
11601
|
let initMaxRow = Math.max(anchorRow, focusRow);
|
|
11513
|
-
const { minRow, maxRow, minCol, maxCol } = this.
|
|
11514
|
-
const cells =
|
|
11602
|
+
const { minRow, maxRow, minCol, maxCol } = getMinAndMaxCellIndex(this.editor, this.getSelectedCellPositions(), initMaxRow, initMaxCol, rows[0], columns[0], pos.table);
|
|
11603
|
+
const cells = getCellPositionsFromRange(minRow, minCol, maxRow + 1, maxCol + 1);
|
|
11515
11604
|
this.setSelectedCells(cells, pos);
|
|
11516
11605
|
}
|
|
11517
|
-
getMinAndMaxCellIndex(maxRow, maxCol, minRow, minCol, table) {
|
|
11518
|
-
const beforeCols = [];
|
|
11519
|
-
const beforeRows = [];
|
|
11520
|
-
let spanSelectedCells = [];
|
|
11521
|
-
if (this.selectedCellPositions.length) {
|
|
11522
|
-
spanSelectedCells = this.selectedCellPositions
|
|
11523
|
-
.map(item => {
|
|
11524
|
-
const { row, col } = item;
|
|
11525
|
-
const node = table.children[row].children[col];
|
|
11526
|
-
if (!node.hidden) {
|
|
11527
|
-
return {
|
|
11528
|
-
...item,
|
|
11529
|
-
colspan: node.colspan || 1,
|
|
11530
|
-
rowspan: node.rowspan || 1
|
|
11531
|
-
};
|
|
11532
|
-
}
|
|
11533
|
-
})
|
|
11534
|
-
.filter(item => item);
|
|
11535
|
-
}
|
|
11536
|
-
table.children.map((row, rowIndex) => {
|
|
11537
|
-
if (rowIndex <= maxRow) {
|
|
11538
|
-
row.children.map((cell, colIndex) => {
|
|
11539
|
-
if (colIndex <= maxCol) {
|
|
11540
|
-
const cellRowIndex = rowIndex + (cell.rowspan || 1) - 1;
|
|
11541
|
-
const cellColIndex = colIndex + (cell.colspan || 1) - 1;
|
|
11542
|
-
if (spanSelectedCells.length) {
|
|
11543
|
-
const { row: selectRow, col: selectCol, rowspan: selectRowspan, colspan: selectColspan } = spanSelectedCells[0];
|
|
11544
|
-
if (selectRow + selectRowspan - 1 >= minRow && selectCol + selectColspan - 1 >= minCol) {
|
|
11545
|
-
minRow = Math.min(spanSelectedCells[0].row, minRow);
|
|
11546
|
-
minCol = Math.min(spanSelectedCells[0].col, minCol);
|
|
11547
|
-
}
|
|
11548
|
-
}
|
|
11549
|
-
if (cell.colspan && cell.colspan > 1) {
|
|
11550
|
-
beforeCols.push({ rowIndex, colIndex, cellColIndex });
|
|
11551
|
-
if (cellColIndex >= minCol && cellRowIndex >= minRow) {
|
|
11552
|
-
maxCol = Math.max(maxCol, cellColIndex);
|
|
11553
|
-
minCol = Math.min(minCol, colIndex);
|
|
11554
|
-
}
|
|
11555
|
-
}
|
|
11556
|
-
if (cell.rowspan && cell.rowspan > 1) {
|
|
11557
|
-
beforeRows.push({ rowIndex, colIndex, cellRowIndex });
|
|
11558
|
-
if (cellColIndex >= minCol && cellRowIndex >= minRow) {
|
|
11559
|
-
minRow = Math.min(minRow, rowIndex);
|
|
11560
|
-
maxRow = Math.max(maxRow, cellRowIndex);
|
|
11561
|
-
}
|
|
11562
|
-
}
|
|
11563
|
-
}
|
|
11564
|
-
});
|
|
11565
|
-
}
|
|
11566
|
-
});
|
|
11567
|
-
// 判断选区范围内之前的单元格 如果存在cellColIndex === minCol,表示当前获取的minCol并不是最小的,重新获取minCol
|
|
11568
|
-
const colNode = beforeCols.filter(item => item.rowIndex <= maxRow && item.colIndex <= maxCol && item.rowIndex >= minRow && item.cellColIndex === minCol);
|
|
11569
|
-
const rowNode = beforeRows.filter(item => item.rowIndex <= maxRow && item.colIndex <= maxCol && item.colIndex >= minCol && item.cellRowIndex === minRow);
|
|
11570
|
-
if (colNode.length || rowNode.length) {
|
|
11571
|
-
return this.getMinAndMaxCellIndex(maxRow, maxCol, minRow, minCol, table);
|
|
11572
|
-
}
|
|
11573
|
-
return {
|
|
11574
|
-
minRow,
|
|
11575
|
-
maxRow,
|
|
11576
|
-
minCol,
|
|
11577
|
-
maxCol
|
|
11578
|
-
};
|
|
11579
|
-
}
|
|
11580
11606
|
// 选择单元格
|
|
11581
11607
|
selectCell(cell, editor) {
|
|
11582
11608
|
const node = AngularEditor.toSlateNode(editor, cell);
|
|
@@ -11585,33 +11611,23 @@ class TableStore {
|
|
|
11585
11611
|
this.focusCellPath = path;
|
|
11586
11612
|
this.focusCellElement = cell;
|
|
11587
11613
|
const [row, col] = path.slice(-2);
|
|
11588
|
-
const pos =
|
|
11614
|
+
const pos = createTablePosition(editor);
|
|
11589
11615
|
const result = [{ row, col }];
|
|
11616
|
+
const selectedCellPositions = this.getSelectedCellPositions();
|
|
11590
11617
|
if (this.pointerSelection) {
|
|
11591
|
-
result.push(...
|
|
11618
|
+
result.push(...selectedCellPositions);
|
|
11592
11619
|
// 处理单元格选中时,处理为选中多单元格
|
|
11593
|
-
const selectedCells = this.
|
|
11620
|
+
const selectedCells = getCellPositionsBeforeMerge(this.editor, { row, col });
|
|
11594
11621
|
result.push(...selectedCells);
|
|
11595
11622
|
// 已聚焦的单元格在多选模式下选中(暂存上次聚焦的单元格数据)
|
|
11596
11623
|
const focusCell = this.lastFocusCellPath?.slice(-2);
|
|
11597
11624
|
if (focusCell) {
|
|
11598
|
-
const focusCells = this.
|
|
11625
|
+
const focusCells = getCellPositionsBeforeMerge(this.editor, { row: focusCell[0], col: focusCell[1] });
|
|
11599
11626
|
result.push(...focusCells);
|
|
11600
11627
|
}
|
|
11601
11628
|
}
|
|
11602
11629
|
this.setSelectedCells(result, pos);
|
|
11603
11630
|
}
|
|
11604
|
-
// 计算合并前的单元格
|
|
11605
|
-
getCellPositionsBeforeMerge({ row, col }) {
|
|
11606
|
-
const pos = this.createTablePosition();
|
|
11607
|
-
const { rowspan, colspan } = pos.findCellByPath({ row, col });
|
|
11608
|
-
if (rowspan || colspan) {
|
|
11609
|
-
const colSpan = colspan ?? 1;
|
|
11610
|
-
const rowSpan = rowspan ?? 1;
|
|
11611
|
-
return this.getCellPositionsFromRange(row, col, row + rowSpan, col + colSpan);
|
|
11612
|
-
}
|
|
11613
|
-
return [{ row, col }];
|
|
11614
|
-
}
|
|
11615
11631
|
selectedCellsChange() {
|
|
11616
11632
|
return this.selectedCells$.asObservable().pipe(skip(1));
|
|
11617
11633
|
}
|
|
@@ -11665,9 +11681,10 @@ class TableStore {
|
|
|
11665
11681
|
this.focusCellElement = cell;
|
|
11666
11682
|
}
|
|
11667
11683
|
else {
|
|
11684
|
+
const selectedCellPositions = this.getSelectedCellPositions();
|
|
11668
11685
|
isChanged =
|
|
11669
11686
|
!this.focusCellPath ||
|
|
11670
|
-
(this.focusCellPath.toString() === this.anchorCellPath.toString() &&
|
|
11687
|
+
(this.focusCellPath.toString() === this.anchorCellPath.toString() && selectedCellPositions.length === 0);
|
|
11671
11688
|
}
|
|
11672
11689
|
if (this.isPrepareSelecting && isChanged) {
|
|
11673
11690
|
if (JSON.stringify(this.preFocusCellPath) !== JSON.stringify(this.focusCellPath)) {
|
|
@@ -11693,15 +11710,16 @@ class TableStore {
|
|
|
11693
11710
|
return this.dangerousCells$.asObservable().pipe(skip(1));
|
|
11694
11711
|
}
|
|
11695
11712
|
setDangerousCells() {
|
|
11713
|
+
const selectedCellPositions = this.getSelectedCellPositions();
|
|
11696
11714
|
this.dangerousRowsIndex = this.selectedRowsIndex;
|
|
11697
11715
|
this.dangerousColumnsIndex = this.selectedColumnsIndex;
|
|
11698
|
-
this.dangerousCells$.next(
|
|
11716
|
+
this.dangerousCells$.next(selectedCellPositions);
|
|
11699
11717
|
}
|
|
11700
11718
|
clearDangerousCells() {
|
|
11701
11719
|
this.dangerousRowsIndex = [];
|
|
11702
11720
|
this.dangerousColumnsIndex = [];
|
|
11703
11721
|
this.dangerousCells$.next([]);
|
|
11704
|
-
const pos = this.
|
|
11722
|
+
const pos = createTablePosition(this.editor);
|
|
11705
11723
|
if (pos.table) {
|
|
11706
11724
|
this.isSelectedTable = this.selectedRowsIndex.length === pos.getHeight() && this.selectedColumnsIndex.length === pos.getWidth();
|
|
11707
11725
|
}
|
|
@@ -11710,9 +11728,10 @@ class TableStore {
|
|
|
11710
11728
|
return merge(this.dangerousCells$.asObservable().pipe(skip(1)), this.selectedCells$.asObservable().pipe(skip(1)));
|
|
11711
11729
|
}
|
|
11712
11730
|
setDangerousRows() {
|
|
11713
|
-
const
|
|
11731
|
+
const selectedCellPositions = this.getSelectedCellPositions();
|
|
11732
|
+
const cells = selectedCellPositions;
|
|
11714
11733
|
const rows = uniq(map(cells, 'row')).valueOf();
|
|
11715
|
-
const pos = this.
|
|
11734
|
+
const pos = createTablePosition(this.editor);
|
|
11716
11735
|
const result = [];
|
|
11717
11736
|
this.dangerousRowsIndex = rows;
|
|
11718
11737
|
this.isSelectedTable = rows.length === pos.getHeight();
|
|
@@ -11730,9 +11749,10 @@ class TableStore {
|
|
|
11730
11749
|
this.dangerousCells$.next(result);
|
|
11731
11750
|
}
|
|
11732
11751
|
setDangerousColumns() {
|
|
11733
|
-
const
|
|
11752
|
+
const selectedCellPositions = this.getSelectedCellPositions();
|
|
11753
|
+
const cells = selectedCellPositions;
|
|
11734
11754
|
const cols = uniq(map(cells, 'col')).valueOf();
|
|
11735
|
-
const pos = this.
|
|
11755
|
+
const pos = createTablePosition(this.editor);
|
|
11736
11756
|
const result = [];
|
|
11737
11757
|
this.dangerousColumnsIndex = cols;
|
|
11738
11758
|
this.isSelectedTable = cols.length === pos.getWidth();
|
|
@@ -11751,21 +11771,22 @@ class TableStore {
|
|
|
11751
11771
|
}
|
|
11752
11772
|
setDangerousTable() {
|
|
11753
11773
|
this.isSelectedTable = true;
|
|
11754
|
-
const pos = this.
|
|
11755
|
-
const cells =
|
|
11774
|
+
const pos = createTablePosition(this.editor);
|
|
11775
|
+
const cells = getCellPositionsFromRange(0, 0, pos.getHeight(), pos.getWidth());
|
|
11756
11776
|
this.dangerousRowsIndex = [...Array(pos.getHeight())].map((_, i) => i);
|
|
11757
11777
|
this.dangerousColumnsIndex = [...Array(pos.getWidth())].map((_, i) => i);
|
|
11758
11778
|
this.dangerousCells$.next(cells);
|
|
11759
11779
|
}
|
|
11760
11780
|
selectFirstCell() {
|
|
11761
|
-
const
|
|
11762
|
-
const
|
|
11781
|
+
const selectedCellPositions = this.getSelectedCellPositions();
|
|
11782
|
+
const { row, col } = selectedCellPositions[0];
|
|
11783
|
+
const tablePath = getTablePath(this.editor);
|
|
11763
11784
|
const path = Editor.start(this.editor, [...tablePath, row, col]);
|
|
11764
11785
|
Transforms.select(this.editor, path);
|
|
11765
11786
|
}
|
|
11766
11787
|
setSelectedCellsBackgroundColor(backgroundColor) {
|
|
11767
|
-
const
|
|
11768
|
-
const
|
|
11788
|
+
const tablePath = getTablePath(this.editor);
|
|
11789
|
+
const cells = this.getSelectedCellPositions();
|
|
11769
11790
|
Editor.withoutNormalizing(this.editor, () => {
|
|
11770
11791
|
for (const { row, col } of cells) {
|
|
11771
11792
|
const cellPath = [...tablePath, row, col];
|
|
@@ -11773,16 +11794,9 @@ class TableStore {
|
|
|
11773
11794
|
}
|
|
11774
11795
|
});
|
|
11775
11796
|
}
|
|
11776
|
-
getSelectedCellBackgroundColor() {
|
|
11777
|
-
if (this.editor && this.editor.selection) {
|
|
11778
|
-
const { cell } = this.createTablePosition();
|
|
11779
|
-
return cell && cell.backgroundColor;
|
|
11780
|
-
}
|
|
11781
|
-
return '';
|
|
11782
|
-
}
|
|
11783
11797
|
clearSelectedCellsContent() {
|
|
11784
|
-
const cells = this.
|
|
11785
|
-
const tablePosition = this.
|
|
11798
|
+
const cells = this.getSelectedCellPositions();
|
|
11799
|
+
const tablePosition = createTablePosition(this.editor);
|
|
11786
11800
|
if (tablePosition.isInTable()) {
|
|
11787
11801
|
Editor.withoutNormalizing(this.editor, () => {
|
|
11788
11802
|
for (const { row, col } of cells) {
|
|
@@ -11794,12 +11808,9 @@ class TableStore {
|
|
|
11794
11808
|
Transforms.select(this.editor, Editor.start(this.editor, tablePosition.cellEntry[1]));
|
|
11795
11809
|
}
|
|
11796
11810
|
}
|
|
11797
|
-
mergeCell(editor) {
|
|
11798
|
-
mergeCell(editor, this.selectedCellPositions);
|
|
11799
|
-
}
|
|
11800
11811
|
setTableOptions(editor, newOptions) {
|
|
11801
|
-
const tablePosition =
|
|
11802
|
-
const tablePath = this.
|
|
11812
|
+
const tablePosition = createTablePosition(editor);
|
|
11813
|
+
const tablePath = getTablePath(this.editor);
|
|
11803
11814
|
const table = tablePosition.table;
|
|
11804
11815
|
const options = { ...table.options, ...newOptions };
|
|
11805
11816
|
Transforms.setNodes(editor, { options }, { at: tablePath });
|
|
@@ -11810,7 +11821,7 @@ class TableStore {
|
|
|
11810
11821
|
}
|
|
11811
11822
|
removeColumnOrRows(selectedRowIndexs = this.selectedRowsIndex, selectedColumnIndexs = this.selectedColumnsIndex) {
|
|
11812
11823
|
const { isSelectedTable } = this;
|
|
11813
|
-
const tablePosition = this.
|
|
11824
|
+
const tablePosition = createTablePosition(this.editor);
|
|
11814
11825
|
if (isSelectedTable) {
|
|
11815
11826
|
TableEditor.removeTable(this.editor);
|
|
11816
11827
|
return;
|
|
@@ -11847,22 +11858,13 @@ class TableStore {
|
|
|
11847
11858
|
}
|
|
11848
11859
|
}
|
|
11849
11860
|
}
|
|
11850
|
-
TableStore.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
11851
|
-
TableStore.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
11852
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
11861
|
+
TableStore.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TableStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
11862
|
+
TableStore.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TableStore });
|
|
11863
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TableStore, decorators: [{
|
|
11853
11864
|
type: Injectable
|
|
11854
11865
|
}], ctorParameters: function () { return []; } });
|
|
11855
11866
|
|
|
11856
11867
|
class TheTableContextMenuService {
|
|
11857
|
-
get isOpened() {
|
|
11858
|
-
return this.menuRef && this.menuRef.componentInstance;
|
|
11859
|
-
}
|
|
11860
|
-
get editor() {
|
|
11861
|
-
return this.tableStore && this.tableStore.editor;
|
|
11862
|
-
}
|
|
11863
|
-
get backgroundColor() {
|
|
11864
|
-
return this.tableStore.getSelectedCellBackgroundColor();
|
|
11865
|
-
}
|
|
11866
11868
|
constructor(colorSelectService, tableStore, thyPopover, ngZone, theContextService) {
|
|
11867
11869
|
this.colorSelectService = colorSelectService;
|
|
11868
11870
|
this.tableStore = tableStore;
|
|
@@ -11978,7 +11980,7 @@ class TheTableContextMenuService {
|
|
|
11978
11980
|
name: '合并单元格',
|
|
11979
11981
|
visibility: true,
|
|
11980
11982
|
actionHandle: () => {
|
|
11981
|
-
this.tableStore.
|
|
11983
|
+
mergeCell(this.editor, this.tableStore.getSelectedCellPositions());
|
|
11982
11984
|
}
|
|
11983
11985
|
},
|
|
11984
11986
|
{
|
|
@@ -12036,8 +12038,18 @@ class TheTableContextMenuService {
|
|
|
12036
12038
|
}
|
|
12037
12039
|
];
|
|
12038
12040
|
}
|
|
12041
|
+
get isOpened() {
|
|
12042
|
+
return this.menuRef && this.menuRef.componentInstance;
|
|
12043
|
+
}
|
|
12044
|
+
get editor() {
|
|
12045
|
+
return this.tableStore && this.tableStore.editor;
|
|
12046
|
+
}
|
|
12047
|
+
get backgroundColor() {
|
|
12048
|
+
const cell = getSelectedCell(this.editor);
|
|
12049
|
+
return cell ? cell.backgroundColor : '';
|
|
12050
|
+
}
|
|
12039
12051
|
getSelectedCell() {
|
|
12040
|
-
const selectedCellPositions = this.tableStore.
|
|
12052
|
+
const selectedCellPositions = this.tableStore.getSelectedCellPositions();
|
|
12041
12053
|
const selectCellNodes = getSelectCellNode(this.editor, selectedCellPositions);
|
|
12042
12054
|
sortCell(selectCellNodes);
|
|
12043
12055
|
const leftCellDict = getLeftCellDict(selectCellNodes);
|
|
@@ -12053,14 +12065,15 @@ class TheTableContextMenuService {
|
|
|
12053
12065
|
}
|
|
12054
12066
|
openMenuList(event) {
|
|
12055
12067
|
this.ngZone.run(() => {
|
|
12056
|
-
const {
|
|
12068
|
+
const { isFullscreen, selectedRowsIndex, selectedColumnsIndex, isSelectedTable } = this.tableStore;
|
|
12069
|
+
const selectedCellPositions = this.tableStore.getSelectedCellPositions();
|
|
12057
12070
|
const tableInfo = { selectedCellPositions, isFullscreen, selectedRowsIndex, selectedColumnsIndex, isSelectedTable };
|
|
12058
12071
|
const { row, col } = this.getSelectedCell();
|
|
12059
12072
|
setCellMenuVisibility(this.editor, this.menuEntities, tableInfo);
|
|
12060
12073
|
this.menuEntities.forEach(item => {
|
|
12061
12074
|
switch (item.key) {
|
|
12062
12075
|
case 'background-color':
|
|
12063
|
-
item.backgroundColor = this.
|
|
12076
|
+
item.backgroundColor = this.backgroundColor;
|
|
12064
12077
|
break;
|
|
12065
12078
|
case TableInsertType.insertRowsUp:
|
|
12066
12079
|
case TableInsertType.insertRowsDown:
|
|
@@ -12122,16 +12135,13 @@ class TheTableContextMenuService {
|
|
|
12122
12135
|
}
|
|
12123
12136
|
}
|
|
12124
12137
|
}
|
|
12125
|
-
TheTableContextMenuService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
12126
|
-
TheTableContextMenuService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
12127
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
12138
|
+
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 });
|
|
12139
|
+
TheTableContextMenuService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheTableContextMenuService });
|
|
12140
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheTableContextMenuService, decorators: [{
|
|
12128
12141
|
type: Injectable
|
|
12129
12142
|
}], ctorParameters: function () { return [{ type: TheColorSelectService }, { type: TableStore }, { type: i1$1.ThyPopover }, { type: i0.NgZone }, { type: TheContextService }]; } });
|
|
12130
12143
|
|
|
12131
12144
|
class TheTableOptionsComponent {
|
|
12132
|
-
get table() {
|
|
12133
|
-
return this.tableStore && this.tableStore.getTableEntry()[0];
|
|
12134
|
-
}
|
|
12135
12145
|
constructor(popoverRef) {
|
|
12136
12146
|
this.popoverRef = popoverRef;
|
|
12137
12147
|
this.tableDropdownList = [
|
|
@@ -12152,6 +12162,9 @@ class TheTableOptionsComponent {
|
|
|
12152
12162
|
ngOnInit() {
|
|
12153
12163
|
this.setColumnOptions();
|
|
12154
12164
|
}
|
|
12165
|
+
get table() {
|
|
12166
|
+
return getTable(this.editor);
|
|
12167
|
+
}
|
|
12155
12168
|
setColumnOptions() {
|
|
12156
12169
|
this.tableDropdownList.forEach(item => {
|
|
12157
12170
|
const tableComponent = ELEMENT_TO_COMPONENT.get(this.table);
|
|
@@ -12178,8 +12191,8 @@ class TheTableOptionsComponent {
|
|
|
12178
12191
|
}
|
|
12179
12192
|
}
|
|
12180
12193
|
}
|
|
12181
|
-
TheTableOptionsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
12182
|
-
TheTableOptionsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
12194
|
+
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 });
|
|
12195
|
+
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: `
|
|
12183
12196
|
<div class="thy-dropdown-menu table-drop-menu">
|
|
12184
12197
|
<ng-container *ngFor="let option of tableDropdownList">
|
|
12185
12198
|
<a thyDropdownMenuItem href="javascript:;" (mousedown)="setTableOptions($event, option)">
|
|
@@ -12190,8 +12203,8 @@ TheTableOptionsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0
|
|
|
12190
12203
|
</a>
|
|
12191
12204
|
</ng-container>
|
|
12192
12205
|
</div>
|
|
12193
|
-
`, 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:
|
|
12194
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
12206
|
+
`, 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]" }] });
|
|
12207
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheTableOptionsComponent, decorators: [{
|
|
12195
12208
|
type: Component,
|
|
12196
12209
|
args: [{
|
|
12197
12210
|
selector: 'the-table-options',
|
|
@@ -12215,15 +12228,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
|
|
|
12215
12228
|
}] } });
|
|
12216
12229
|
|
|
12217
12230
|
class TheTableToolbarComponent {
|
|
12218
|
-
get editor() {
|
|
12219
|
-
return this.tableStore && this.tableStore.editor;
|
|
12220
|
-
}
|
|
12221
|
-
get hasDivider() {
|
|
12222
|
-
return this.cellMenuList.filter(item => item.visibility).length > 1;
|
|
12223
|
-
}
|
|
12224
|
-
get tableOptions() {
|
|
12225
|
-
return getPluginOptions(this.editor, PluginKeys.table);
|
|
12226
|
-
}
|
|
12227
12231
|
constructor(ngZone, colorSelectService, thyPopover, popoverRef, thyNotifyService) {
|
|
12228
12232
|
this.ngZone = ngZone;
|
|
12229
12233
|
this.colorSelectService = colorSelectService;
|
|
@@ -12239,7 +12243,7 @@ class TheTableToolbarComponent {
|
|
|
12239
12243
|
actionHandle: () => {
|
|
12240
12244
|
event.preventDefault();
|
|
12241
12245
|
event.stopPropagation();
|
|
12242
|
-
this.tableStore.
|
|
12246
|
+
mergeCell(this.editor, this.tableStore.getSelectedCellPositions());
|
|
12243
12247
|
this.popoverRef.close();
|
|
12244
12248
|
this.tableStore.clearSelectedCells();
|
|
12245
12249
|
}
|
|
@@ -12259,14 +12263,24 @@ class TheTableToolbarComponent {
|
|
|
12259
12263
|
}
|
|
12260
12264
|
];
|
|
12261
12265
|
}
|
|
12266
|
+
get editor() {
|
|
12267
|
+
return this.tableStore && this.tableStore.editor;
|
|
12268
|
+
}
|
|
12269
|
+
get hasDivider() {
|
|
12270
|
+
return this.cellMenuList.filter(item => item.visibility).length > 1;
|
|
12271
|
+
}
|
|
12272
|
+
get tableOptions() {
|
|
12273
|
+
return getPluginOptions(this.editor, PluginKeys.table);
|
|
12274
|
+
}
|
|
12262
12275
|
ngOnInit() {
|
|
12263
12276
|
this.isColumnEqual = this.tableElement?.columns?.every(col => this.tableElement.columns[0].width === col.width) ?? true;
|
|
12264
|
-
const
|
|
12265
|
-
const tableInfo = { selectedCellPositions, isSelectedTable };
|
|
12277
|
+
const selectedCellPositions = this.tableStore.getSelectedCellPositions();
|
|
12278
|
+
const tableInfo = { selectedCellPositions, isSelectedTable: this.tableStore.isSelectedTable };
|
|
12266
12279
|
this.isRectangle = isRectangularInTableCells(this.editor, selectedCellPositions);
|
|
12267
12280
|
this.setDeleteIcon();
|
|
12268
12281
|
setCellMenuVisibility(this.editor, this.cellMenuList, tableInfo);
|
|
12269
|
-
|
|
12282
|
+
const cell = getSelectedCell(this.editor);
|
|
12283
|
+
this.selectedColor = cell ? cell.backgroundColor : '';
|
|
12270
12284
|
const path = TheEditor.findPath(this.editor, this.tableElement);
|
|
12271
12285
|
this.tableChangeSubscriber = this.tableStore.tableChange().subscribe(() => {
|
|
12272
12286
|
const columns = getNode(this.editor, path).columns;
|
|
@@ -12278,8 +12292,9 @@ class TheTableToolbarComponent {
|
|
|
12278
12292
|
this.colorSelectService.closeColorSelect();
|
|
12279
12293
|
}
|
|
12280
12294
|
setDeleteIcon() {
|
|
12281
|
-
const {
|
|
12282
|
-
const
|
|
12295
|
+
const { selectedRowsIndex, selectedColumnsIndex } = this.tableStore;
|
|
12296
|
+
const selectedCellPositions = this.tableStore.getSelectedCellPositions();
|
|
12297
|
+
const pos = createTablePosition(this.editor);
|
|
12283
12298
|
if (this.tableStore.selectedRowsIndex.length > 0) {
|
|
12284
12299
|
this.deleteIcon = DeleteIcon['table-delete-rows'];
|
|
12285
12300
|
this.iconName = '删除整行';
|
|
@@ -12376,9 +12391,9 @@ class TheTableToolbarComponent {
|
|
|
12376
12391
|
});
|
|
12377
12392
|
}
|
|
12378
12393
|
}
|
|
12379
|
-
TheTableToolbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
12380
|
-
TheTableToolbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
12381
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
12394
|
+
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 }, { token: i1$2.ThyNotifyService }], target: i0.ɵɵFactoryTarget.Component });
|
|
12395
|
+
TheTableToolbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: TheTableToolbarComponent, selector: "the-table-toolbar", inputs: { tableStore: "tableStore", tableElement: "tableElement" }, ngImport: i0, template: "<thy-actions thySize=\"xxs\">\n <ng-container *ngFor=\"let item of cellMenuList\">\n <a\n *ngIf=\"item.visibility\"\n href=\"javascript:;\"\n thyAction\n [thyActionIcon]=\"item.icon\"\n [thyTooltip]=\"item.name\"\n (mousedown)=\"item.actionHandle()\"\n ></a>\n </ng-container>\n <thy-divider *ngIf=\"hasDivider\" class=\"mr-2 ml-1 align-self-center\" [thyVertical]=\"true\"> </thy-divider>\n <a 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 && !isColumnEqual\"\n thyAction\n thyTooltip=\"\u5217\u7B49\u5BBD\"\n (mousedown)=\"setEquallyColumnHandle($event)\"\n >\n <thy-icon thyIconName=\"table-column-equal-width\"></thy-icon>\n </a>\n <a\n href=\"javascript:;\"\n *ngIf=\"tableStore.isSelectedTable && tableOptions?.showFullscreen\"\n thyAction\n thyTooltip=\"\u5168\u5C4F\"\n (mousedown)=\"setFullscreen($event)\"\n >\n <thy-icon thyIconName=\"arrows-alt\"></thy-icon>\n </a>\n <a\n *ngIf=\"tableStore.isSelectedTable && !tableStore?.isFullscreen\"\n class=\"fullscreen-hidden\"\n href=\"javascript:;\"\n thyAction\n thyActionIcon=\"copy\"\n thyTooltip=\"\u590D\u5236\"\n (mousedown)=\"onCopy($event)\"\n ></a>\n <ng-container *ngIf=\"tableStore.isSelectedTable\">\n <thy-divider class=\"mr-2 ml-1 align-self-center\" [thyVertical]=\"true\"></thy-divider>\n <a href=\"javascript:;\" class=\"link-with-down\" thyAction (mousedown)=\"mousedown($event)\" (click)=\"openTableOptionMenu($event)\">\n <span>\u8868\u683C\u9009\u9879</span>\n <thy-icon class=\"font-size-sm text-desc ml-1\" thyIconName=\"caret-down\"></thy-icon>\n </a>\n </ng-container>\n <ng-container *ngIf=\"tableStore?.isFullscreen ? deleteIcon && !tableStore.isSelectedTable : deleteIcon\">\n <thy-divider class=\"mr-2 ml-1 align-self-center\" [thyVertical]=\"true\"></thy-divider>\n <a\n href=\"javascript:;\"\n thyAction\n thyType=\"danger\"\n [thyActionIcon]=\"deleteIcon\"\n [thyTooltip]=\"iconName\"\n (mousedown)=\"onDelete($event)\"\n (mouseenter)=\"onEnterDelete($event)\"\n (mouseleave)=\"onLeaveDelete($event)\"\n ></a>\n </ng-container>\n</thy-actions>\n", dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.ThyIconComponent, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { kind: "directive", type: i8.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { kind: "component", type: i7.ThyActionComponent, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }, { kind: "component", type: i7.ThyActionsComponent, selector: "thy-actions", inputs: ["thySize"] }, { kind: "component", type: i8$1.ThyDividerComponent, selector: "thy-divider", inputs: ["thyVertical", "thyStyle", "thyColor", "thyText", "thyTextDirection", "thyDeeper"] }] });
|
|
12396
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheTableToolbarComponent, decorators: [{
|
|
12382
12397
|
type: Component,
|
|
12383
12398
|
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 && !isColumnEqual\"\n thyAction\n thyTooltip=\"\u5217\u7B49\u5BBD\"\n (mousedown)=\"setEquallyColumnHandle($event)\"\n >\n <thy-icon thyIconName=\"table-column-equal-width\"></thy-icon>\n </a>\n <a\n href=\"javascript:;\"\n *ngIf=\"tableStore.isSelectedTable && tableOptions?.showFullscreen\"\n thyAction\n thyTooltip=\"\u5168\u5C4F\"\n (mousedown)=\"setFullscreen($event)\"\n >\n <thy-icon thyIconName=\"arrows-alt\"></thy-icon>\n </a>\n <a\n *ngIf=\"tableStore.isSelectedTable && !tableStore?.isFullscreen\"\n class=\"fullscreen-hidden\"\n href=\"javascript:;\"\n thyAction\n thyActionIcon=\"copy\"\n thyTooltip=\"\u590D\u5236\"\n (mousedown)=\"onCopy($event)\"\n ></a>\n <ng-container *ngIf=\"tableStore.isSelectedTable\">\n <thy-divider class=\"mr-2 ml-1 align-self-center\" [thyVertical]=\"true\"></thy-divider>\n <a href=\"javascript:;\" class=\"link-with-down\" thyAction (mousedown)=\"mousedown($event)\" (click)=\"openTableOptionMenu($event)\">\n <span>\u8868\u683C\u9009\u9879</span>\n <thy-icon class=\"font-size-sm text-desc ml-1\" thyIconName=\"caret-down\"></thy-icon>\n </a>\n </ng-container>\n <ng-container *ngIf=\"tableStore?.isFullscreen ? deleteIcon && !tableStore.isSelectedTable : deleteIcon\">\n <thy-divider class=\"mr-2 ml-1 align-self-center\" [thyVertical]=\"true\"></thy-divider>\n <a\n href=\"javascript:;\"\n thyAction\n thyType=\"danger\"\n [thyActionIcon]=\"deleteIcon\"\n [thyTooltip]=\"iconName\"\n (mousedown)=\"onDelete($event)\"\n (mouseenter)=\"onEnterDelete($event)\"\n (mouseleave)=\"onLeaveDelete($event)\"\n ></a>\n </ng-container>\n</thy-actions>\n" }]
|
|
12384
12399
|
}], ctorParameters: function () { return [{ type: i0.NgZone }, { type: TheColorSelectService }, { type: i1$1.ThyPopover }, { type: i1$1.ThyPopoverRef }, { type: i1$2.ThyNotifyService }]; }, propDecorators: { tableStore: [{
|
|
@@ -12394,9 +12409,6 @@ var DeleteIcon;
|
|
|
12394
12409
|
})(DeleteIcon || (DeleteIcon = {}));
|
|
12395
12410
|
|
|
12396
12411
|
class TableService {
|
|
12397
|
-
get isOpened() {
|
|
12398
|
-
return this.toolbarRef && this.toolbarRef.componentInstance;
|
|
12399
|
-
}
|
|
12400
12412
|
constructor(thyPopover, overlay, tableStore, theTableContextMenuService, ngZone, theContextService) {
|
|
12401
12413
|
this.thyPopover = thyPopover;
|
|
12402
12414
|
this.overlay = overlay;
|
|
@@ -12410,6 +12422,9 @@ class TableService {
|
|
|
12410
12422
|
this.placement = 'topLeft';
|
|
12411
12423
|
this.offset = 8;
|
|
12412
12424
|
}
|
|
12425
|
+
get isOpened() {
|
|
12426
|
+
return this.toolbarRef && this.toolbarRef.componentInstance;
|
|
12427
|
+
}
|
|
12413
12428
|
openToolbar(origin, tableElement) {
|
|
12414
12429
|
if (this.isOpened) {
|
|
12415
12430
|
if (this.toolbarRef.containerInstance.config.origin === origin) {
|
|
@@ -12465,9 +12480,9 @@ class TableService {
|
|
|
12465
12480
|
}
|
|
12466
12481
|
}
|
|
12467
12482
|
}
|
|
12468
|
-
TableService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
12469
|
-
TableService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
12470
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
12483
|
+
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 });
|
|
12484
|
+
TableService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TableService });
|
|
12485
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TableService, decorators: [{
|
|
12471
12486
|
type: Injectable
|
|
12472
12487
|
}], ctorParameters: function () { return [{ type: i1$1.ThyPopover }, { type: i2$1.Overlay }, { type: TableStore }, { type: TheTableContextMenuService }, { type: i0.NgZone }, { type: TheContextService }]; } });
|
|
12473
12488
|
|
|
@@ -12502,9 +12517,9 @@ class TableFreezeColumnPipe {
|
|
|
12502
12517
|
return !!(tablePluginOptions?.freezeColumnHeader && table.options?.headerColumn && !mergeColumnCells.length && stickyColumn);
|
|
12503
12518
|
}
|
|
12504
12519
|
}
|
|
12505
|
-
TableFreezeColumnPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
12506
|
-
TableFreezeColumnPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "
|
|
12507
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
12520
|
+
TableFreezeColumnPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TableFreezeColumnPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
12521
|
+
TableFreezeColumnPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.0", ngImport: i0, type: TableFreezeColumnPipe, name: "freezeColumn" });
|
|
12522
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TableFreezeColumnPipe, decorators: [{
|
|
12508
12523
|
type: Pipe,
|
|
12509
12524
|
args: [{ name: 'freezeColumn' }]
|
|
12510
12525
|
}] });
|
|
@@ -12518,9 +12533,9 @@ class TableFreezeRowPipe {
|
|
|
12518
12533
|
return false;
|
|
12519
12534
|
}
|
|
12520
12535
|
}
|
|
12521
|
-
TableFreezeRowPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
12522
|
-
TableFreezeRowPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "
|
|
12523
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
12536
|
+
TableFreezeRowPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TableFreezeRowPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
12537
|
+
TableFreezeRowPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.0", ngImport: i0, type: TableFreezeRowPipe, name: "freezeRow" });
|
|
12538
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TableFreezeRowPipe, decorators: [{
|
|
12524
12539
|
type: Pipe,
|
|
12525
12540
|
args: [{ name: 'freezeRow' }]
|
|
12526
12541
|
}] });
|
|
@@ -12554,9 +12569,13 @@ const getGridColumns = (headerRow, cellsWidth) => {
|
|
|
12554
12569
|
});
|
|
12555
12570
|
return result;
|
|
12556
12571
|
};
|
|
12557
|
-
const getColumnsWidth = (cellRow) => {
|
|
12572
|
+
const getColumnsWidth = (cellRow, isColgroup = false) => {
|
|
12558
12573
|
const result = [];
|
|
12559
12574
|
cellRow.childNodes.forEach((item) => {
|
|
12575
|
+
if (isColgroup && IS_SAFARI) {
|
|
12576
|
+
result.push(item.offsetWidth);
|
|
12577
|
+
return;
|
|
12578
|
+
}
|
|
12560
12579
|
if (item.getBoundingClientRect) {
|
|
12561
12580
|
result.push(item.getBoundingClientRect().width);
|
|
12562
12581
|
}
|
|
@@ -12564,6 +12583,113 @@ const getColumnsWidth = (cellRow) => {
|
|
|
12564
12583
|
return result;
|
|
12565
12584
|
};
|
|
12566
12585
|
|
|
12586
|
+
/**
|
|
12587
|
+
* 计算最小行跨距单元格
|
|
12588
|
+
* @param element TableElement
|
|
12589
|
+
* @returns
|
|
12590
|
+
*/
|
|
12591
|
+
const calculateMinRowSpanCellForRows = (element) => {
|
|
12592
|
+
const cells = element.children.map((row, index) => {
|
|
12593
|
+
const noHiddenCells = row.children.filter(cell => !cell.hidden);
|
|
12594
|
+
if (noHiddenCells.length > 0) {
|
|
12595
|
+
const minRowspan = Math.min.apply(Math, noHiddenCells.map(cell => {
|
|
12596
|
+
return cell.rowspan || 1;
|
|
12597
|
+
}));
|
|
12598
|
+
const cell = row.children.find(item => !item.hidden && (item.rowspan || 1) === minRowspan);
|
|
12599
|
+
return {
|
|
12600
|
+
cell,
|
|
12601
|
+
rowIndex: index
|
|
12602
|
+
};
|
|
12603
|
+
}
|
|
12604
|
+
else {
|
|
12605
|
+
return {
|
|
12606
|
+
rowIndex: index
|
|
12607
|
+
};
|
|
12608
|
+
}
|
|
12609
|
+
});
|
|
12610
|
+
return cells;
|
|
12611
|
+
};
|
|
12612
|
+
/**
|
|
12613
|
+
* 计算行控件的平均高度
|
|
12614
|
+
* @param previousCombineRowIndex
|
|
12615
|
+
* @param previousRowIndex
|
|
12616
|
+
* @param rowControls
|
|
12617
|
+
*/
|
|
12618
|
+
const calculateRowControlsAvgHeight = (previousCombineRowIndex, previousRowIndex, rowControls) => {
|
|
12619
|
+
const rowControl = rowControls[previousRowIndex];
|
|
12620
|
+
const count = previousCombineRowIndex - previousRowIndex;
|
|
12621
|
+
const avgHeight = Math.floor(rowControl.height / (count + 1));
|
|
12622
|
+
const firstHeight = rowControl.height - avgHeight * count;
|
|
12623
|
+
rowControl.height = firstHeight;
|
|
12624
|
+
rowControls
|
|
12625
|
+
.filter((_, index) => index > previousRowIndex && index <= previousCombineRowIndex)
|
|
12626
|
+
.forEach(rowControl => {
|
|
12627
|
+
rowControl.height = avgHeight;
|
|
12628
|
+
});
|
|
12629
|
+
};
|
|
12630
|
+
const getBelowRowHeight = (editor, cells, index, rowIndex, rowspan) => {
|
|
12631
|
+
let belowRowlHeight = 0;
|
|
12632
|
+
cells.slice(index + 1, cells.length).map(item => {
|
|
12633
|
+
if (!item.cell) {
|
|
12634
|
+
return;
|
|
12635
|
+
}
|
|
12636
|
+
if (rowIndex + rowspan > item.rowIndex) {
|
|
12637
|
+
const cellDom = AngularEditor.toDOMNode(editor, item.cell);
|
|
12638
|
+
if (item.cell.rowspan > 1) {
|
|
12639
|
+
// 如果下方单元格的rowspan > 1,递归计算
|
|
12640
|
+
const height = getBelowRowHeight(editor, cells, cells.findIndex(cell => cell.rowIndex === item.rowIndex), item.rowIndex, item.cell.rowspan);
|
|
12641
|
+
belowRowlHeight += getElementHeight(cellDom) - height;
|
|
12642
|
+
}
|
|
12643
|
+
else {
|
|
12644
|
+
belowRowlHeight += getElementHeight(cellDom);
|
|
12645
|
+
}
|
|
12646
|
+
}
|
|
12647
|
+
});
|
|
12648
|
+
return belowRowlHeight;
|
|
12649
|
+
};
|
|
12650
|
+
const calculateRowControls = (editor, element) => {
|
|
12651
|
+
const minRowSpanCellForRows = calculateMinRowSpanCellForRows(element);
|
|
12652
|
+
const rowControls = [];
|
|
12653
|
+
let previousRowIndex = 0;
|
|
12654
|
+
let previousCombineRowIndex = 0;
|
|
12655
|
+
minRowSpanCellForRows.forEach((cellInfo, index) => {
|
|
12656
|
+
if (!cellInfo.cell) {
|
|
12657
|
+
rowControls.push({
|
|
12658
|
+
height: 0,
|
|
12659
|
+
rowIndex: index
|
|
12660
|
+
});
|
|
12661
|
+
previousCombineRowIndex = index;
|
|
12662
|
+
if (index === minRowSpanCellForRows.length - 1) {
|
|
12663
|
+
calculateRowControlsAvgHeight(previousCombineRowIndex, previousRowIndex, rowControls);
|
|
12664
|
+
}
|
|
12665
|
+
return;
|
|
12666
|
+
}
|
|
12667
|
+
// calculate combine row height
|
|
12668
|
+
if (previousCombineRowIndex > previousRowIndex) {
|
|
12669
|
+
calculateRowControlsAvgHeight(previousCombineRowIndex, previousRowIndex, rowControls);
|
|
12670
|
+
previousCombineRowIndex = 0;
|
|
12671
|
+
}
|
|
12672
|
+
const cellDom = AngularEditor.toDOMNode(editor, cellInfo.cell);
|
|
12673
|
+
let height = getElementHeight(cellDom);
|
|
12674
|
+
// 当cell为合并的单元格(rowspan > 1),计算其实际高度(当前单元格的高度 - 下方合并单元格的高度)
|
|
12675
|
+
if (cellInfo.cell.rowspan > 1) {
|
|
12676
|
+
const calcHeight = height - getBelowRowHeight(editor, minRowSpanCellForRows, index, cellInfo.rowIndex, cellInfo.cell.rowspan);
|
|
12677
|
+
rowControls.push({
|
|
12678
|
+
height: calcHeight,
|
|
12679
|
+
rowIndex: cellInfo.rowIndex
|
|
12680
|
+
});
|
|
12681
|
+
}
|
|
12682
|
+
else {
|
|
12683
|
+
rowControls.push({
|
|
12684
|
+
height,
|
|
12685
|
+
rowIndex: cellInfo.rowIndex
|
|
12686
|
+
});
|
|
12687
|
+
}
|
|
12688
|
+
previousRowIndex = index;
|
|
12689
|
+
});
|
|
12690
|
+
return rowControls;
|
|
12691
|
+
};
|
|
12692
|
+
|
|
12567
12693
|
const TABLE_SELECTOR = '.the-table';
|
|
12568
12694
|
const TABLE_WRAPPER_SELECTOR = '.the-table-wrapper';
|
|
12569
12695
|
const RESIZE_OVERLAY_SELECTOR = '.the-table-resize-overlay-thumb';
|
|
@@ -12646,9 +12772,9 @@ class TheColumnResizeDirective {
|
|
|
12646
12772
|
this.destroyed.complete();
|
|
12647
12773
|
}
|
|
12648
12774
|
}
|
|
12649
|
-
TheColumnResizeDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
12650
|
-
TheColumnResizeDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
12651
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
12775
|
+
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: THE_TABLE_COMPONENT_TOKEN }], target: i0.ɵɵFactoryTarget.Directive });
|
|
12776
|
+
TheColumnResizeDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.0", type: TheColumnResizeDirective, selector: "div[theColumnResize]", ngImport: i0 });
|
|
12777
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheColumnResizeDirective, decorators: [{
|
|
12652
12778
|
type: Directive,
|
|
12653
12779
|
args: [{
|
|
12654
12780
|
selector: 'div[theColumnResize]'
|
|
@@ -12659,19 +12785,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
|
|
|
12659
12785
|
}] }]; } });
|
|
12660
12786
|
|
|
12661
12787
|
class TheInsertMarkComponent {
|
|
12662
|
-
get disabled() {
|
|
12663
|
-
return this.tableStore && !!this.tableStore.selectedCellPositions.length;
|
|
12664
|
-
}
|
|
12665
|
-
get editor() {
|
|
12666
|
-
return this.tableStore && this.tableStore.editor;
|
|
12667
|
-
}
|
|
12668
12788
|
constructor(cdr, renderer2) {
|
|
12669
12789
|
this.cdr = cdr;
|
|
12670
12790
|
this.renderer2 = renderer2;
|
|
12791
|
+
this.destroy$ = new Subject();
|
|
12671
12792
|
this.tooltipContent = '';
|
|
12793
|
+
this.disabled = false;
|
|
12794
|
+
}
|
|
12795
|
+
get editor() {
|
|
12796
|
+
return this.tableStore && this.tableStore.editor;
|
|
12672
12797
|
}
|
|
12673
12798
|
ngOnInit() {
|
|
12674
12799
|
this.tooltipContent = this.type === 'row' ? '插入行' : '插入列';
|
|
12800
|
+
this.tableStore
|
|
12801
|
+
.selectedCellsChange()
|
|
12802
|
+
.pipe(takeUntil(this.destroy$))
|
|
12803
|
+
.subscribe(selectedCellPositions => {
|
|
12804
|
+
this.disabled = !!selectedCellPositions.length;
|
|
12805
|
+
});
|
|
12806
|
+
}
|
|
12807
|
+
ngOnDestroy() {
|
|
12808
|
+
this.destroy$?.next();
|
|
12809
|
+
this.destroy$?.complete();
|
|
12675
12810
|
}
|
|
12676
12811
|
onMouseDown(event) {
|
|
12677
12812
|
event.preventDefault();
|
|
@@ -12707,7 +12842,7 @@ class TheInsertMarkComponent {
|
|
|
12707
12842
|
getLength() {
|
|
12708
12843
|
const { selection } = this.editor;
|
|
12709
12844
|
if (selection && Range.isCollapsed(selection)) {
|
|
12710
|
-
const { table } =
|
|
12845
|
+
const { table } = createTablePosition(this.editor, selection.anchor.path);
|
|
12711
12846
|
if (!table) {
|
|
12712
12847
|
return;
|
|
12713
12848
|
}
|
|
@@ -12725,9 +12860,9 @@ class TheInsertMarkComponent {
|
|
|
12725
12860
|
}
|
|
12726
12861
|
}
|
|
12727
12862
|
}
|
|
12728
|
-
TheInsertMarkComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
12729
|
-
TheInsertMarkComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
12730
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
12863
|
+
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 });
|
|
12864
|
+
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" }, host: { classAttribute: "the-table-insert-mark" }, 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"] }] });
|
|
12865
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheInsertMarkComponent, decorators: [{
|
|
12731
12866
|
type: Component,
|
|
12732
12867
|
args: [{ selector: 'the-table-insert-mark', host: {
|
|
12733
12868
|
class: 'the-table-insert-mark'
|
|
@@ -12743,6 +12878,30 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
|
|
|
12743
12878
|
}] } });
|
|
12744
12879
|
|
|
12745
12880
|
class TheTableComponent extends TheBaseElementComponent {
|
|
12881
|
+
constructor(elementRef, eventDispatcher, resizeNotifier, tableStore, cdr, ngZone, tableService, theTableContextMenuService, freezeColumnPipe, freezeRowPipe, renderer, contextService) {
|
|
12882
|
+
super(elementRef, cdr);
|
|
12883
|
+
this.eventDispatcher = eventDispatcher;
|
|
12884
|
+
this.resizeNotifier = resizeNotifier;
|
|
12885
|
+
this.tableStore = tableStore;
|
|
12886
|
+
this.cdr = cdr;
|
|
12887
|
+
this.ngZone = ngZone;
|
|
12888
|
+
this.tableService = tableService;
|
|
12889
|
+
this.theTableContextMenuService = theTableContextMenuService;
|
|
12890
|
+
this.freezeColumnPipe = freezeColumnPipe;
|
|
12891
|
+
this.freezeRowPipe = freezeRowPipe;
|
|
12892
|
+
this.renderer = renderer;
|
|
12893
|
+
this.contextService = contextService;
|
|
12894
|
+
this.headerRow = false;
|
|
12895
|
+
this.isSelectedAllCell = false;
|
|
12896
|
+
this.destroy$ = new Subject();
|
|
12897
|
+
this.rowControls = [];
|
|
12898
|
+
this.colControls = [];
|
|
12899
|
+
this.getColControlButtonWidth = () => {
|
|
12900
|
+
let result = 0;
|
|
12901
|
+
result += this.element.options?.numberedColumn ? TABLE_NUMBER_COLUMN : 0;
|
|
12902
|
+
return result;
|
|
12903
|
+
};
|
|
12904
|
+
}
|
|
12746
12905
|
get columns() {
|
|
12747
12906
|
return this.element && this.element.columns;
|
|
12748
12907
|
}
|
|
@@ -12767,7 +12926,7 @@ class TheTableComponent extends TheBaseElementComponent {
|
|
|
12767
12926
|
if (this.initialized) {
|
|
12768
12927
|
Promise.resolve().then(() => {
|
|
12769
12928
|
this.tableStore.emitTableChange();
|
|
12770
|
-
this.tableStore.
|
|
12929
|
+
this.tableStore.setSelectedColumnsAndRowIndex();
|
|
12771
12930
|
this.bindTableScrollingShadow();
|
|
12772
12931
|
this.useRowControls();
|
|
12773
12932
|
this.setHeaderCellStyle();
|
|
@@ -12780,30 +12939,6 @@ class TheTableComponent extends TheBaseElementComponent {
|
|
|
12780
12939
|
}
|
|
12781
12940
|
this.headerRow = this.getHeaderRow();
|
|
12782
12941
|
}
|
|
12783
|
-
constructor(elementRef, eventDispatcher, resizeNotifier, tableStore, cdr, ngZone, tableService, theTableContextMenuService, freezeColumnPipe, freezeRowPipe, renderer, contextService) {
|
|
12784
|
-
super(elementRef, cdr);
|
|
12785
|
-
this.eventDispatcher = eventDispatcher;
|
|
12786
|
-
this.resizeNotifier = resizeNotifier;
|
|
12787
|
-
this.tableStore = tableStore;
|
|
12788
|
-
this.cdr = cdr;
|
|
12789
|
-
this.ngZone = ngZone;
|
|
12790
|
-
this.tableService = tableService;
|
|
12791
|
-
this.theTableContextMenuService = theTableContextMenuService;
|
|
12792
|
-
this.freezeColumnPipe = freezeColumnPipe;
|
|
12793
|
-
this.freezeRowPipe = freezeRowPipe;
|
|
12794
|
-
this.renderer = renderer;
|
|
12795
|
-
this.contextService = contextService;
|
|
12796
|
-
this.headerRow = false;
|
|
12797
|
-
this.isSelectedAllCell = false;
|
|
12798
|
-
this.destroy$ = new Subject();
|
|
12799
|
-
this.rowControls = [];
|
|
12800
|
-
this.colControls = [];
|
|
12801
|
-
this.getColControlButtonWidth = () => {
|
|
12802
|
-
let result = 0;
|
|
12803
|
-
result += this.element.options?.numberedColumn ? TABLE_NUMBER_COLUMN : 0;
|
|
12804
|
-
return result;
|
|
12805
|
-
};
|
|
12806
|
-
}
|
|
12807
12942
|
ngOnInit() {
|
|
12808
12943
|
super.ngOnInit();
|
|
12809
12944
|
this.getColControls();
|
|
@@ -12835,7 +12970,7 @@ class TheTableComponent extends TheBaseElementComponent {
|
|
|
12835
12970
|
.selectedCellsChange()
|
|
12836
12971
|
.pipe(takeUntil(this.destroy$))
|
|
12837
12972
|
.subscribe(() => {
|
|
12838
|
-
this.isSelectedAllCell = this.tableStore.
|
|
12973
|
+
this.isSelectedAllCell = isSelectedAllCell(this.editor, this.tableStore.getSelectedCellPositions());
|
|
12839
12974
|
});
|
|
12840
12975
|
}
|
|
12841
12976
|
getWrapperWidth() {
|
|
@@ -12889,6 +13024,7 @@ class TheTableComponent extends TheBaseElementComponent {
|
|
|
12889
13024
|
this.subscribeScrollContainerScroll();
|
|
12890
13025
|
this.contextService.containerResized$.pipe(takeUntil(this.destroy$)).subscribe(result => {
|
|
12891
13026
|
if (result.widthChanged) {
|
|
13027
|
+
this.setHeaderRowShadow();
|
|
12892
13028
|
this.setHeaderRowLeftStyle();
|
|
12893
13029
|
}
|
|
12894
13030
|
});
|
|
@@ -12896,8 +13032,8 @@ class TheTableComponent extends TheBaseElementComponent {
|
|
|
12896
13032
|
if (result.widthChanged) {
|
|
12897
13033
|
this.setGridColumnsStyle();
|
|
12898
13034
|
this.setStickyRowStyle();
|
|
12899
|
-
this.setHeaderRowShadow();
|
|
12900
13035
|
this.bindTableScrollingShadow();
|
|
13036
|
+
this.setHeaderRowShadow();
|
|
12901
13037
|
}
|
|
12902
13038
|
});
|
|
12903
13039
|
this.contextService.windowResized$.pipe(takeUntil(this.destroy$)).subscribe(result => {
|
|
@@ -12930,7 +13066,7 @@ class TheTableComponent extends TheBaseElementComponent {
|
|
|
12930
13066
|
}
|
|
12931
13067
|
}
|
|
12932
13068
|
calcHeaderRowShadow() {
|
|
12933
|
-
const headerRowHeight = this.
|
|
13069
|
+
const headerRowHeight = calculateRowControls(this.editor, this.element)[0]?.height;
|
|
12934
13070
|
let height = headerRowHeight;
|
|
12935
13071
|
// 默认(没有聚焦)的 top 值:滚动容器高度 + 表格的padding(8)
|
|
12936
13072
|
let top = this.scrollContainerTop + TABLE_PADDING$1;
|
|
@@ -12955,7 +13091,7 @@ class TheTableComponent extends TheBaseElementComponent {
|
|
|
12955
13091
|
this.scrollContainerTop = event.target.getBoundingClientRect().top;
|
|
12956
13092
|
const clientRect = this.theTableElement.nativeElement.getBoundingClientRect();
|
|
12957
13093
|
const headerTopHeight = this.isInTable ? -19 : 11;
|
|
12958
|
-
const headerRowHeight = this.
|
|
13094
|
+
const headerRowHeight = calculateRowControls(this.editor, this.element)[0]?.height;
|
|
12959
13095
|
const top = clientRect.top + headerTopHeight;
|
|
12960
13096
|
this.isStickyTop =
|
|
12961
13097
|
top <= this.scrollContainerTop + 8 &&
|
|
@@ -13035,7 +13171,9 @@ class TheTableComponent extends TheBaseElementComponent {
|
|
|
13035
13171
|
const colControl = this.columnControlsWrapper.nativeElement;
|
|
13036
13172
|
if (this.freezeRowPipe.transform(this.element, this.headerRow, this.tablePluginOptions)) {
|
|
13037
13173
|
const headerRow = this.tbodyElement.nativeElement.childNodes[0];
|
|
13038
|
-
const cellsWidth = this.colgroup?.nativeElement
|
|
13174
|
+
const cellsWidth = this.colgroup?.nativeElement
|
|
13175
|
+
? getColumnsWidth(this.colgroup.nativeElement, true)
|
|
13176
|
+
: this.getDefaultCellWidth();
|
|
13039
13177
|
const gridColumns = getGridColumns(headerRow, cellsWidth);
|
|
13040
13178
|
const tablePadding = 44;
|
|
13041
13179
|
let tableWidth = this.elementRef.nativeElement.getBoundingClientRect().width;
|
|
@@ -13052,7 +13190,7 @@ class TheTableComponent extends TheBaseElementComponent {
|
|
|
13052
13190
|
const headerRow = this.nativeElement.querySelector('tbody tr');
|
|
13053
13191
|
const rowControlInner = this.rowControlsInner.nativeElement;
|
|
13054
13192
|
const tableCornerBtn = this.cornerControl.nativeElement;
|
|
13055
|
-
const headerRowHeight = this.
|
|
13193
|
+
const headerRowHeight = calculateRowControls(this.editor, this.element)[0]?.height;
|
|
13056
13194
|
const numberedColumn = this.element.options?.numberedColumn;
|
|
13057
13195
|
if (this.isStickyTop) {
|
|
13058
13196
|
this.renderer.addClass(this.nativeElement, TableWithStickyRowClass);
|
|
@@ -13149,107 +13287,12 @@ class TheTableComponent extends TheBaseElementComponent {
|
|
|
13149
13287
|
}
|
|
13150
13288
|
useRowControls() {
|
|
13151
13289
|
if ((this.selection && !this.readonly) || this.element.options?.numberedColumn || this.tableStore.isRightClicking) {
|
|
13152
|
-
this.rowControls = this.
|
|
13290
|
+
this.rowControls = calculateRowControls(this.editor, this.element);
|
|
13153
13291
|
}
|
|
13154
13292
|
}
|
|
13155
13293
|
detectChanges() {
|
|
13156
13294
|
this.cdr.detectChanges();
|
|
13157
13295
|
}
|
|
13158
|
-
calculateMinRowSpanCellForRows() {
|
|
13159
|
-
const cells = this.element.children.map((row, index) => {
|
|
13160
|
-
const noHiddenCells = row.children.filter(cell => !cell.hidden);
|
|
13161
|
-
if (noHiddenCells.length > 0) {
|
|
13162
|
-
const minRowspan = Math.min.apply(Math, noHiddenCells.map(cell => {
|
|
13163
|
-
return cell.rowspan || 1;
|
|
13164
|
-
}));
|
|
13165
|
-
const cell = row.children.find(item => !item.hidden && (item.rowspan || 1) === minRowspan);
|
|
13166
|
-
return {
|
|
13167
|
-
cell,
|
|
13168
|
-
rowIndex: index
|
|
13169
|
-
};
|
|
13170
|
-
}
|
|
13171
|
-
else {
|
|
13172
|
-
return {
|
|
13173
|
-
rowIndex: index
|
|
13174
|
-
};
|
|
13175
|
-
}
|
|
13176
|
-
});
|
|
13177
|
-
return cells;
|
|
13178
|
-
}
|
|
13179
|
-
calculateRowControls() {
|
|
13180
|
-
const minRowSpanCellForRows = this.calculateMinRowSpanCellForRows();
|
|
13181
|
-
const rowControls = [];
|
|
13182
|
-
let previousRowIndex = 0;
|
|
13183
|
-
let previousCombineRowIndex = 0;
|
|
13184
|
-
minRowSpanCellForRows.forEach((cellInfo, index) => {
|
|
13185
|
-
if (!cellInfo.cell) {
|
|
13186
|
-
rowControls.push({
|
|
13187
|
-
height: 0,
|
|
13188
|
-
rowIndex: index
|
|
13189
|
-
});
|
|
13190
|
-
previousCombineRowIndex = index;
|
|
13191
|
-
if (index === minRowSpanCellForRows.length - 1) {
|
|
13192
|
-
this.calculateRowControlsAvgHeight(previousCombineRowIndex, previousRowIndex, rowControls);
|
|
13193
|
-
}
|
|
13194
|
-
return;
|
|
13195
|
-
}
|
|
13196
|
-
// calculate combine row height
|
|
13197
|
-
if (previousCombineRowIndex > previousRowIndex) {
|
|
13198
|
-
this.calculateRowControlsAvgHeight(previousCombineRowIndex, previousRowIndex, rowControls);
|
|
13199
|
-
previousCombineRowIndex = 0;
|
|
13200
|
-
}
|
|
13201
|
-
const cellDom = AngularEditor.toDOMNode(this.editor, cellInfo.cell);
|
|
13202
|
-
let height = getElementHeight(cellDom);
|
|
13203
|
-
// 当cell为合并的单元格(rowspan > 1),计算其实际高度(当前单元格的高度 - 下方合并单元格的高度)
|
|
13204
|
-
if (cellInfo.cell.rowspan > 1) {
|
|
13205
|
-
const calcHeight = height - this.getBelowRowHeight(minRowSpanCellForRows, index, cellInfo.rowIndex, cellInfo.cell.rowspan);
|
|
13206
|
-
rowControls.push({
|
|
13207
|
-
height: calcHeight,
|
|
13208
|
-
rowIndex: cellInfo.rowIndex
|
|
13209
|
-
});
|
|
13210
|
-
}
|
|
13211
|
-
else {
|
|
13212
|
-
rowControls.push({
|
|
13213
|
-
height,
|
|
13214
|
-
rowIndex: cellInfo.rowIndex
|
|
13215
|
-
});
|
|
13216
|
-
}
|
|
13217
|
-
previousRowIndex = index;
|
|
13218
|
-
});
|
|
13219
|
-
return rowControls;
|
|
13220
|
-
}
|
|
13221
|
-
calculateRowControlsAvgHeight(previousCombineRowIndex, previousRowIndex, rowControls) {
|
|
13222
|
-
const rowControl = rowControls[previousRowIndex];
|
|
13223
|
-
const count = previousCombineRowIndex - previousRowIndex;
|
|
13224
|
-
const avgHeight = Math.floor(rowControl.height / (count + 1));
|
|
13225
|
-
const firstHeight = rowControl.height - avgHeight * count;
|
|
13226
|
-
rowControl.height = firstHeight;
|
|
13227
|
-
rowControls
|
|
13228
|
-
.filter((item, _index) => _index > previousRowIndex && _index <= previousCombineRowIndex)
|
|
13229
|
-
.forEach(rowControl => {
|
|
13230
|
-
rowControl.height = avgHeight;
|
|
13231
|
-
});
|
|
13232
|
-
}
|
|
13233
|
-
getBelowRowHeight(cells, index, rowIndex, rowspan) {
|
|
13234
|
-
let belowRowlHeight = 0;
|
|
13235
|
-
cells.slice(index + 1, cells.length).map(item => {
|
|
13236
|
-
if (!item.cell) {
|
|
13237
|
-
return;
|
|
13238
|
-
}
|
|
13239
|
-
if (rowIndex + rowspan > item.rowIndex) {
|
|
13240
|
-
const cellDom = AngularEditor.toDOMNode(this.editor, item.cell);
|
|
13241
|
-
if (item.cell.rowspan > 1) {
|
|
13242
|
-
// 如果下方单元格的rowspan > 1,递归计算
|
|
13243
|
-
const height = this.getBelowRowHeight(cells, cells.findIndex(cell => cell.rowIndex === item.rowIndex), item.rowIndex, item.cell.rowspan);
|
|
13244
|
-
belowRowlHeight += getElementHeight(cellDom) - height;
|
|
13245
|
-
}
|
|
13246
|
-
else {
|
|
13247
|
-
belowRowlHeight += getElementHeight(cellDom);
|
|
13248
|
-
}
|
|
13249
|
-
}
|
|
13250
|
-
});
|
|
13251
|
-
return belowRowlHeight;
|
|
13252
|
-
}
|
|
13253
13296
|
resolveImage() {
|
|
13254
13297
|
const imageElements = this.nativeElement.querySelectorAll('img');
|
|
13255
13298
|
if (imageElements.length) {
|
|
@@ -13278,8 +13321,8 @@ class TheTableComponent extends TheBaseElementComponent {
|
|
|
13278
13321
|
if (this.selection && !this.readonly) {
|
|
13279
13322
|
const opts = new TableOptions();
|
|
13280
13323
|
const selection = this.editor.selection;
|
|
13281
|
-
const startPosition =
|
|
13282
|
-
const endPosition =
|
|
13324
|
+
const startPosition = createTablePosition(this.editor);
|
|
13325
|
+
const endPosition = createTablePosition(this.editor, selection.focus.path);
|
|
13283
13326
|
this.isInTable = startPosition.isInTable() && endPosition.isInTable();
|
|
13284
13327
|
}
|
|
13285
13328
|
else {
|
|
@@ -13425,7 +13468,8 @@ class TheTableComponent extends TheBaseElementComponent {
|
|
|
13425
13468
|
return !isVirtualKey(e) && !this.theTableContextMenuService.isOpened;
|
|
13426
13469
|
})))
|
|
13427
13470
|
.pipe(filter(() => {
|
|
13428
|
-
|
|
13471
|
+
const selectedCellPositions = this.tableStore.getSelectedCellPositions();
|
|
13472
|
+
return selectedCellPositions?.length > 0;
|
|
13429
13473
|
}), takeUntil(this.destroy$))
|
|
13430
13474
|
.subscribe((e) => {
|
|
13431
13475
|
if (e.type === 'keydown') {
|
|
@@ -13533,8 +13577,8 @@ class TheTableComponent extends TheBaseElementComponent {
|
|
|
13533
13577
|
this.destroy$.complete();
|
|
13534
13578
|
}
|
|
13535
13579
|
}
|
|
13536
|
-
TheTableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
13537
|
-
TheTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
13580
|
+
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 }, { token: TableFreezeRowPipe }, { token: i0.Renderer2 }, { token: TheContextService }], target: i0.ɵɵFactoryTarget.Component });
|
|
13581
|
+
TheTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: TheTableComponent, selector: "the-table, [theTable]", host: { listeners: { "mousedown": "handleMousedown($event)" }, properties: { "class.the-table-with-controls": "isInTable || tableStore.isRightClicking", "class.the-table-with-sticky-column": "freezeColumnPipe.transform(element, tablePluginOptions)", "class.the-numberd-table": "element?.options?.numberedColumn", "class.the-table-selection-hide": "tableStore.isCellSelecting || tableStore.isRightClicking" } }, providers: [
|
|
13538
13582
|
TableStore,
|
|
13539
13583
|
TableService,
|
|
13540
13584
|
TheTableContextMenuService,
|
|
@@ -13547,7 +13591,7 @@ TheTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", vers
|
|
|
13547
13591
|
useExisting: TheTableComponent
|
|
13548
13592
|
}
|
|
13549
13593
|
], 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 }, { propertyName: "tableRowControlsWrapper", first: true, predicate: ["tableRowControlsWrapper"], descendants: true, read: ElementRef }, { propertyName: "columnControlsWrapper", first: true, predicate: ["columnControlsWrapper"], descendants: true, read: ElementRef }, { propertyName: "cornerControl", first: true, predicate: ["cornerControl"], descendants: true, read: ElementRef }, { propertyName: "rowControlsInner", first: true, predicate: ["rowControlsInner"], descendants: true, read: ElementRef }, { propertyName: "headerRowLeftShadow", first: true, predicate: ["headerRowLeftShadow"], descendants: true, read: ElementRef }, { propertyName: "headerRowRightShadow", first: true, predicate: ["headerRowRightShadow"], descendants: true, read: ElementRef }, { propertyName: "colgroup", first: true, predicate: ["colgroup"], descendants: true, read: ElementRef }, { propertyName: "rowControlsButtonWrapper", predicate: ["rowControlsButtonWrapper"], descendants: true, read: ElementRef }], usesInheritance: true, ngImport: i0, template: "<div class=\"the-table-container\" theColumnResize>\n <div class=\"the-table-row-controls-wrapper\" #tableRowControlsWrapper>\n <div\n class=\"the-table-corner-controls the-sticky-corner-controls\"\n #cornerControl\n [ngClass]=\"{\n visible: !readonly && (isInTable || tableStore.isRightClicking),\n 'control-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\" *ngIf=\"!headerRow\">\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\" *ngIf=\"!element.options?.headerColumn\">\n <the-table-insert-mark type=\"column\" [at]=\"0\" [tableStore]=\"tableStore\"></the-table-insert-mark>\n </div>\n </div>\n <div class=\"the-table-row-controls\">\n <div class=\"the-table-row-controls-inner\" #rowControlsInner>\n <div\n class=\"the-table-row-controls-button-wrap\"\n #rowControlsButtonWrapper\n *ngFor=\"let control of rowControls; let i = index; trackBy: trackByFnRowControls\"\n [ngClass]=\"{\n 'control-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 || tableStore.isRightClicking) && !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>\n <colgroup #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 the-sticky-row\" #columnControlsWrapper>\n <th\n #colControl\n class=\"the-table-col-controls\"\n *ngFor=\"let control of colControls; let i = index; trackBy: trackByFnColControls\"\n [ngClass]=\"{\n 'control-active': tableStore.selectedColumnsIndex.includes(i),\n dangerous: tableStore.dangerousColumnsIndex.includes(i) && tableStore.dangerousCells.length > 0\n }\"\n (mousedown)=\"onColMousedown($event, i)\"\n >\n <the-table-insert-mark\n *ngIf=\"isInTable || tableStore.isRightClicking\"\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 <div\n class=\"header-row-shadow header-row-left-shadow\"\n #headerRowLeftShadow\n contenteditable=\"false\"\n *ngIf=\"!element.options?.headerColumn\"\n ></div>\n <div class=\"header-row-shadow header-row-right-shadow\" #headerRowRightShadow contenteditable=\"false\"></div>\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"] }] });
|
|
13550
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
13594
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheTableComponent, decorators: [{
|
|
13551
13595
|
type: Component,
|
|
13552
13596
|
args: [{ selector: 'the-table, [theTable]', providers: [
|
|
13553
13597
|
TableStore,
|
|
@@ -13610,7 +13654,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
|
|
|
13610
13654
|
*/
|
|
13611
13655
|
function clearTableNode(opts, editor, isTopToBot) {
|
|
13612
13656
|
const { selection } = editor;
|
|
13613
|
-
const element =
|
|
13657
|
+
const element = createTablePosition(editor, selection.focus.path);
|
|
13614
13658
|
const rowIndex = element.getRowIndex();
|
|
13615
13659
|
const colIndex = element.getColumnIndex();
|
|
13616
13660
|
const removeRow = isTopToBot ? 0 : rowIndex + 1;
|
|
@@ -13661,9 +13705,8 @@ class TheTableRowComponent extends TheBaseElementComponent {
|
|
|
13661
13705
|
}
|
|
13662
13706
|
onContextChange() {
|
|
13663
13707
|
super.onContextChange();
|
|
13664
|
-
const opts = new TableOptions();
|
|
13665
13708
|
const path = TheEditor.findPath(this.editor, this.element);
|
|
13666
|
-
const tablePosition =
|
|
13709
|
+
const tablePosition = createTablePosition(this.editor, path.concat(0));
|
|
13667
13710
|
const rowIndex = tablePosition.getRowIndex();
|
|
13668
13711
|
if (rowIndex === 0) {
|
|
13669
13712
|
this.renderer.addClass(this.elementRef.nativeElement, 'the-sticky-row');
|
|
@@ -13685,9 +13728,9 @@ class TheTableRowComponent extends TheBaseElementComponent {
|
|
|
13685
13728
|
}
|
|
13686
13729
|
}
|
|
13687
13730
|
}
|
|
13688
|
-
TheTableRowComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
13689
|
-
TheTableRowComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
13690
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
13731
|
+
TheTableRowComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheTableRowComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
|
|
13732
|
+
TheTableRowComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: TheTableRowComponent, selector: "tr[theTableRow]", host: { properties: { "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"] }] });
|
|
13733
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheTableRowComponent, decorators: [{
|
|
13691
13734
|
type: Component,
|
|
13692
13735
|
args: [{
|
|
13693
13736
|
selector: 'tr[theTableRow]',
|
|
@@ -13843,9 +13886,9 @@ class ColumnResizingStore {
|
|
|
13843
13886
|
this.resizeRows.pop();
|
|
13844
13887
|
}
|
|
13845
13888
|
}
|
|
13846
|
-
ColumnResizingStore.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
13847
|
-
ColumnResizingStore.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
13848
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
13889
|
+
ColumnResizingStore.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ColumnResizingStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
13890
|
+
ColumnResizingStore.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ColumnResizingStore });
|
|
13891
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ColumnResizingStore, decorators: [{
|
|
13849
13892
|
type: Injectable
|
|
13850
13893
|
}], ctorParameters: function () { return []; } });
|
|
13851
13894
|
|
|
@@ -14000,9 +14043,9 @@ class TheColumnResizeOverlayHandleComponent {
|
|
|
14000
14043
|
this.destroyed.complete();
|
|
14001
14044
|
}
|
|
14002
14045
|
}
|
|
14003
|
-
TheColumnResizeOverlayHandleComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
14004
|
-
TheColumnResizeOverlayHandleComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
14005
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
14046
|
+
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 });
|
|
14047
|
+
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 });
|
|
14048
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheColumnResizeOverlayHandleComponent, decorators: [{
|
|
14006
14049
|
type: Component,
|
|
14007
14050
|
args: [{
|
|
14008
14051
|
host: { class: 'the-table-resize-overlay-thumb' },
|
|
@@ -14066,6 +14109,22 @@ const POSITION_MAP = {
|
|
|
14066
14109
|
}
|
|
14067
14110
|
};
|
|
14068
14111
|
class TheTdComponent extends TheBaseElementComponent {
|
|
14112
|
+
constructor(elementRef, cdr, renderer, viewContainerRef, ngZone, injector, overlay, resizingStore, scrollDispatcher, freezeColumnPipe) {
|
|
14113
|
+
super(elementRef, cdr);
|
|
14114
|
+
this.elementRef = elementRef;
|
|
14115
|
+
this.cdr = cdr;
|
|
14116
|
+
this.renderer = renderer;
|
|
14117
|
+
this.viewContainerRef = viewContainerRef;
|
|
14118
|
+
this.ngZone = ngZone;
|
|
14119
|
+
this.injector = injector;
|
|
14120
|
+
this.overlay = overlay;
|
|
14121
|
+
this.resizingStore = resizingStore;
|
|
14122
|
+
this.scrollDispatcher = scrollDispatcher;
|
|
14123
|
+
this.freezeColumnPipe = freezeColumnPipe;
|
|
14124
|
+
this.destroy$ = new Subject();
|
|
14125
|
+
this.tableOptions = new TableOptions();
|
|
14126
|
+
this.cellInnerMinHeight = null;
|
|
14127
|
+
}
|
|
14069
14128
|
get tableStore() {
|
|
14070
14129
|
return this.tableComponent.tableStore;
|
|
14071
14130
|
}
|
|
@@ -14113,22 +14172,6 @@ class TheTdComponent extends TheBaseElementComponent {
|
|
|
14113
14172
|
this.useState();
|
|
14114
14173
|
}
|
|
14115
14174
|
}
|
|
14116
|
-
constructor(elementRef, cdr, renderer, viewContainerRef, ngZone, injector, overlay, resizingStore, scrollDispatcher, freezeColumnPipe) {
|
|
14117
|
-
super(elementRef, cdr);
|
|
14118
|
-
this.elementRef = elementRef;
|
|
14119
|
-
this.cdr = cdr;
|
|
14120
|
-
this.renderer = renderer;
|
|
14121
|
-
this.viewContainerRef = viewContainerRef;
|
|
14122
|
-
this.ngZone = ngZone;
|
|
14123
|
-
this.injector = injector;
|
|
14124
|
-
this.overlay = overlay;
|
|
14125
|
-
this.resizingStore = resizingStore;
|
|
14126
|
-
this.scrollDispatcher = scrollDispatcher;
|
|
14127
|
-
this.freezeColumnPipe = freezeColumnPipe;
|
|
14128
|
-
this.destroy$ = new Subject();
|
|
14129
|
-
this.tableOptions = new TableOptions();
|
|
14130
|
-
this.cellInnerMinHeight = null;
|
|
14131
|
-
}
|
|
14132
14175
|
ngOnInit() {
|
|
14133
14176
|
super.ngOnInit();
|
|
14134
14177
|
this.useBackground();
|
|
@@ -14214,10 +14257,9 @@ class TheTdComponent extends TheBaseElementComponent {
|
|
|
14214
14257
|
useElementStyle(this.elementRef.nativeElement, this.element);
|
|
14215
14258
|
}
|
|
14216
14259
|
useTablePosition() {
|
|
14217
|
-
const opts = new TableOptions();
|
|
14218
14260
|
const path = TheEditor.findPath(this.editor, this.element);
|
|
14219
14261
|
// must be path of cell's children
|
|
14220
|
-
this.tablePosition =
|
|
14262
|
+
this.tablePosition = createTablePosition(this.editor, path.concat(0));
|
|
14221
14263
|
}
|
|
14222
14264
|
useBackground() {
|
|
14223
14265
|
if (this.element.backgroundColor !== this.backgroundColor) {
|
|
@@ -14717,9 +14759,9 @@ class TheTdComponent extends TheBaseElementComponent {
|
|
|
14717
14759
|
this.destroy$.complete();
|
|
14718
14760
|
}
|
|
14719
14761
|
}
|
|
14720
|
-
TheTdComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
14721
|
-
TheTdComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
14722
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
14762
|
+
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 });
|
|
14763
|
+
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], 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"] }] });
|
|
14764
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheTdComponent, decorators: [{
|
|
14723
14765
|
type: Component,
|
|
14724
14766
|
args: [{ selector: 'td[theTd]', providers: [ColumnResizingStore], template: "<div #cellInner>\n <slate-children [children]=\"children\" [context]=\"childrenContext\" [viewContext]=\"viewContext\"></slate-children>\n</div>\n" }]
|
|
14725
14767
|
}], 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: [{
|
|
@@ -14767,14 +14809,14 @@ const normalizeTable = (table) => {
|
|
|
14767
14809
|
};
|
|
14768
14810
|
|
|
14769
14811
|
class TheTableToolbarItemComponent extends TheBaseToolbarItem {
|
|
14770
|
-
get isOpenTableSelect() {
|
|
14771
|
-
return this.tableSelectRef && this.tableSelectRef.componentInstance;
|
|
14772
|
-
}
|
|
14773
14812
|
constructor(thyPopover, overlay) {
|
|
14774
14813
|
super();
|
|
14775
14814
|
this.thyPopover = thyPopover;
|
|
14776
14815
|
this.overlay = overlay;
|
|
14777
14816
|
}
|
|
14817
|
+
get isOpenTableSelect() {
|
|
14818
|
+
return this.tableSelectRef && this.tableSelectRef.componentInstance;
|
|
14819
|
+
}
|
|
14778
14820
|
preventDefault(event) {
|
|
14779
14821
|
event.preventDefault();
|
|
14780
14822
|
event.stopPropagation();
|
|
@@ -14810,8 +14852,8 @@ class TheTableToolbarItemComponent extends TheBaseToolbarItem {
|
|
|
14810
14852
|
return this.tableSelectRef;
|
|
14811
14853
|
}
|
|
14812
14854
|
}
|
|
14813
|
-
TheTableToolbarItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
14814
|
-
TheTableToolbarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
14855
|
+
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 });
|
|
14856
|
+
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: `
|
|
14815
14857
|
<a
|
|
14816
14858
|
href="javascript:;"
|
|
14817
14859
|
class="link-with-down"
|
|
@@ -14825,8 +14867,8 @@ TheTableToolbarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14
|
|
|
14825
14867
|
>
|
|
14826
14868
|
<thy-icon class="link-down-icon font-size-sm text-desc ml-1" thyIconName="caret-down"> </thy-icon>
|
|
14827
14869
|
</a>
|
|
14828
|
-
`, isInline: true, dependencies: [{ kind: "component", type:
|
|
14829
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
14870
|
+
`, 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: i7.ThyActionComponent, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }] });
|
|
14871
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheTableToolbarItemComponent, decorators: [{
|
|
14830
14872
|
type: Component,
|
|
14831
14873
|
args: [{
|
|
14832
14874
|
selector: 'the-table-toolbar-item',
|
|
@@ -14851,6 +14893,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
|
|
|
14851
14893
|
}]
|
|
14852
14894
|
}], ctorParameters: function () { return [{ type: i1$1.ThyPopover }, { type: i2$1.Overlay }]; } });
|
|
14853
14895
|
|
|
14896
|
+
const isLegalTable = (editor, element, path) => {
|
|
14897
|
+
try {
|
|
14898
|
+
const nodePath = path || TheEditor.findPath(editor, element);
|
|
14899
|
+
const opts = new TableOptions();
|
|
14900
|
+
const tablePosition = TablePosition.create(opts, editor, nodePath.concat(0));
|
|
14901
|
+
return element.type === ElementKinds.tableCell ? tablePosition.table && tablePosition.row : tablePosition.table;
|
|
14902
|
+
}
|
|
14903
|
+
catch (error) {
|
|
14904
|
+
return false;
|
|
14905
|
+
}
|
|
14906
|
+
};
|
|
14907
|
+
|
|
14854
14908
|
const withTable = (editor) => {
|
|
14855
14909
|
const { deleteBackward, deleteForward, onKeydown, setFragmentData, insertData, normalizeNode, isBlockCard, renderElement, deleteCutData, isContainer, onChange, onClick } = editor;
|
|
14856
14910
|
editor.deleteBackward = unit => {
|
|
@@ -14863,7 +14917,7 @@ const withTable = (editor) => {
|
|
|
14863
14917
|
const [, startBlockPath] = Editor.above(editor, {
|
|
14864
14918
|
match: n => Editor.isBlock(editor, n)
|
|
14865
14919
|
});
|
|
14866
|
-
const startPosition =
|
|
14920
|
+
const startPosition = createTablePosition(editor);
|
|
14867
14921
|
if (startBlockPath.length <= startPosition.cellEntry[1].length + 1 &&
|
|
14868
14922
|
startBlockPath.pop() === 0 &&
|
|
14869
14923
|
selection.anchor.offset === 0 &&
|
|
@@ -14877,8 +14931,8 @@ const withTable = (editor) => {
|
|
|
14877
14931
|
const opts = new TableOptions();
|
|
14878
14932
|
const afterPoint = Editor.after(editor, editor.selection);
|
|
14879
14933
|
if (afterPoint && isRangeInTable(opts, editor, { anchor: afterPoint, focus: afterPoint })) {
|
|
14880
|
-
const beforePosition =
|
|
14881
|
-
const afterPosition =
|
|
14934
|
+
const beforePosition = createTablePosition(editor);
|
|
14935
|
+
const afterPosition = createTablePosition(editor, afterPoint.path);
|
|
14882
14936
|
if (beforePosition.cell && beforePosition.cell !== afterPosition.cell) {
|
|
14883
14937
|
return;
|
|
14884
14938
|
}
|
|
@@ -14914,8 +14968,8 @@ const withTable = (editor) => {
|
|
|
14914
14968
|
onKeydown(event);
|
|
14915
14969
|
return;
|
|
14916
14970
|
}
|
|
14917
|
-
const startPosition =
|
|
14918
|
-
const endPosition =
|
|
14971
|
+
const startPosition = createTablePosition(editor);
|
|
14972
|
+
const endPosition = createTablePosition(editor, selection.focus.path);
|
|
14919
14973
|
const isCollapsed = Range.isCollapsed(selection);
|
|
14920
14974
|
if (startPosition && endPosition && endPosition.isInTable()) {
|
|
14921
14975
|
// for keyboard up and down key in the table
|
|
@@ -14992,7 +15046,7 @@ const withTable = (editor) => {
|
|
|
14992
15046
|
}
|
|
14993
15047
|
if (isMoveBackward) {
|
|
14994
15048
|
const beforePoint = Editor.before(editor, editor.selection);
|
|
14995
|
-
const beforePosition = beforePoint &&
|
|
15049
|
+
const beforePosition = beforePoint && createTablePosition(editor, beforePoint.path);
|
|
14996
15050
|
if (beforePosition && beforePosition.cell && beforePosition.cell.hidden) {
|
|
14997
15051
|
event.preventDefault();
|
|
14998
15052
|
const at = Editor.end(editor, TheEditor.findPath(editor, beforePosition.findPrevious()));
|
|
@@ -15001,7 +15055,7 @@ const withTable = (editor) => {
|
|
|
15001
15055
|
}
|
|
15002
15056
|
if (isMoveForward) {
|
|
15003
15057
|
const afterPoint = Editor.after(editor, editor.selection);
|
|
15004
|
-
const afterPosition = afterPoint &&
|
|
15058
|
+
const afterPosition = afterPoint && createTablePosition(editor, afterPoint.path);
|
|
15005
15059
|
if (afterPosition.cell && afterPosition.cell.hidden) {
|
|
15006
15060
|
event.preventDefault();
|
|
15007
15061
|
const nextCell = afterPosition.findNext();
|
|
@@ -15050,10 +15104,9 @@ const withTable = (editor) => {
|
|
|
15050
15104
|
setFragmentData(unit);
|
|
15051
15105
|
return;
|
|
15052
15106
|
}
|
|
15053
|
-
const
|
|
15054
|
-
const tablePosition = TablePosition.create(opts, editor, selection.anchor.path);
|
|
15107
|
+
const tablePosition = createTablePosition(editor);
|
|
15055
15108
|
const tableComponent = ELEMENT_TO_COMPONENT.get(tablePosition.table);
|
|
15056
|
-
const selectedCellPositions = tableComponent.tableStore.
|
|
15109
|
+
const selectedCellPositions = tableComponent.tableStore.getSelectedCellPositions();
|
|
15057
15110
|
let tableFragment = null;
|
|
15058
15111
|
if (tableComponent.tableStore.selectedRowsIndex.length > 0) {
|
|
15059
15112
|
const rows = tablePosition.table.children.slice(tableComponent.tableStore.selectedRowsIndex[0], tableComponent.tableStore.selectedRowsIndex[tableComponent.tableStore.selectedRowsIndex.length - 1] + 1);
|
|
@@ -15105,7 +15158,7 @@ const withTable = (editor) => {
|
|
|
15105
15158
|
fragment.length === 1 &&
|
|
15106
15159
|
Element$1.isElement(fragment[0]) &&
|
|
15107
15160
|
fragment[0].type === ElementKinds.table) {
|
|
15108
|
-
const tablePosition =
|
|
15161
|
+
const tablePosition = createTablePosition(editor);
|
|
15109
15162
|
const clipboardTable = fragment[0].children;
|
|
15110
15163
|
const clipboardRow = clipboardTable[0].children;
|
|
15111
15164
|
const selectRowIndex = tablePosition.getRowIndex();
|
|
@@ -15173,9 +15226,9 @@ const withTable = (editor) => {
|
|
|
15173
15226
|
}
|
|
15174
15227
|
insertData(data);
|
|
15175
15228
|
};
|
|
15176
|
-
editor.normalizeNode = (
|
|
15177
|
-
if (Element$1.isElement(
|
|
15178
|
-
const table =
|
|
15229
|
+
editor.normalizeNode = ([node, path]) => {
|
|
15230
|
+
if (Element$1.isElement(node) && node.type === ElementKinds.table) {
|
|
15231
|
+
const table = node;
|
|
15179
15232
|
const maxWidth = Math.max(...table.children.map(row => row.children.length));
|
|
15180
15233
|
const invalidRows = table.children.filter(row => row.children.length < maxWidth);
|
|
15181
15234
|
if (invalidRows.length > 0) {
|
|
@@ -15184,27 +15237,70 @@ const withTable = (editor) => {
|
|
|
15184
15237
|
table.children.map((row, rowIndex) => {
|
|
15185
15238
|
row.children.map((cell, cellIndex) => {
|
|
15186
15239
|
if (cell.hidden || cell.colspan || cell.rowspan) {
|
|
15187
|
-
Transforms.setNodes(editor, { hidden: null, colspan: null, rowspan: null }, { at: [...
|
|
15240
|
+
Transforms.setNodes(editor, { hidden: null, colspan: null, rowspan: null }, { at: [...path, rowIndex, cellIndex] });
|
|
15188
15241
|
}
|
|
15189
15242
|
});
|
|
15190
15243
|
});
|
|
15191
15244
|
invalidRows.forEach(row => {
|
|
15192
15245
|
const count = maxWidth - row.children.length;
|
|
15193
|
-
insertColumnAtRow(opts, editor, count,
|
|
15246
|
+
insertColumnAtRow(opts, editor, count, [node, path], table.children.indexOf(row), row.children.length);
|
|
15194
15247
|
});
|
|
15195
15248
|
});
|
|
15196
15249
|
}
|
|
15197
15250
|
if (table.columns && table.columns.length !== maxWidth) {
|
|
15198
15251
|
const columns = table.columns.length > maxWidth ? removeColumns(table, maxWidth) : addColumns(table, maxWidth);
|
|
15199
|
-
Transforms.setNodes(editor, { columns }, { at:
|
|
15252
|
+
Transforms.setNodes(editor, { columns }, { at: path });
|
|
15253
|
+
}
|
|
15254
|
+
}
|
|
15255
|
+
// noramlize illegal cell and row to be paragraph
|
|
15256
|
+
if (Element$1.isElement(node) && [ElementKinds.tableCell, ElementKinds.tableRow].includes(node.type)) {
|
|
15257
|
+
if (!isLegalTable(editor, node, path)) {
|
|
15258
|
+
try {
|
|
15259
|
+
const rootPath = [path[0]];
|
|
15260
|
+
const offset = editor.selection.focus.offset;
|
|
15261
|
+
// find all tableCell and tableRow
|
|
15262
|
+
const nodes = Editor.nodes(editor, {
|
|
15263
|
+
at: rootPath,
|
|
15264
|
+
mode: 'lowest',
|
|
15265
|
+
match: (node) => {
|
|
15266
|
+
return node.type === ElementKinds.tableCell;
|
|
15267
|
+
}
|
|
15268
|
+
});
|
|
15269
|
+
let cursorPath = path[0];
|
|
15270
|
+
if (nodes) {
|
|
15271
|
+
let index = 0;
|
|
15272
|
+
// noramlize to be paragraph
|
|
15273
|
+
for (const [targetNode, targetPath] of nodes) {
|
|
15274
|
+
index++;
|
|
15275
|
+
const paragraph = createEmptyParagraph();
|
|
15276
|
+
const text = Node.string(targetNode);
|
|
15277
|
+
paragraph.children[0].text = text;
|
|
15278
|
+
if (targetNode.key === node.key) {
|
|
15279
|
+
cursorPath = rootPath[0] + index;
|
|
15280
|
+
}
|
|
15281
|
+
Transforms.insertNodes(editor, paragraph, { at: [rootPath[0] + index] });
|
|
15282
|
+
}
|
|
15283
|
+
}
|
|
15284
|
+
const cursor = { path: [cursorPath, 0], offset: offset };
|
|
15285
|
+
Transforms.select(editor, { anchor: cursor, focus: cursor });
|
|
15286
|
+
// remove root node
|
|
15287
|
+
Transforms.removeNodes(editor, {
|
|
15288
|
+
at: rootPath
|
|
15289
|
+
});
|
|
15290
|
+
}
|
|
15291
|
+
catch (error) { }
|
|
15292
|
+
return;
|
|
15200
15293
|
}
|
|
15201
15294
|
}
|
|
15202
15295
|
// adjust selection when selection is in hidden cell
|
|
15203
|
-
if (Element$1.isElement(
|
|
15204
|
-
if (editor.selection &&
|
|
15296
|
+
if (Element$1.isElement(node) && node.type === ElementKinds.tableCell) {
|
|
15297
|
+
if (editor.selection &&
|
|
15298
|
+
Range.isCollapsed(editor.selection) &&
|
|
15299
|
+
Path.isAncestor(path, editor.selection.anchor.path) &&
|
|
15300
|
+
node.hidden) {
|
|
15205
15301
|
setTimeout(() => {
|
|
15206
15302
|
const opts = new TableOptions();
|
|
15207
|
-
const tablePosition =
|
|
15303
|
+
const tablePosition = createTablePosition(editor);
|
|
15208
15304
|
const origin = getOriginCell(tablePosition.table, tablePosition.getRowIndex(), tablePosition.getColumnIndex());
|
|
15209
15305
|
if (origin) {
|
|
15210
15306
|
const path = AngularEditor.findPath(editor, origin);
|
|
@@ -15214,7 +15310,7 @@ const withTable = (editor) => {
|
|
|
15214
15310
|
return;
|
|
15215
15311
|
}
|
|
15216
15312
|
}
|
|
15217
|
-
normalizeNode(
|
|
15313
|
+
normalizeNode([node, path]);
|
|
15218
15314
|
};
|
|
15219
15315
|
editor.isBlockCard = (element) => {
|
|
15220
15316
|
if (element && element.type === ElementKinds.table) {
|
|
@@ -15226,10 +15322,10 @@ const withTable = (editor) => {
|
|
|
15226
15322
|
if (element.type === ElementKinds.table) {
|
|
15227
15323
|
return TheTableComponent;
|
|
15228
15324
|
}
|
|
15229
|
-
if (element.type === ElementKinds.tableRow) {
|
|
15325
|
+
if (element.type === ElementKinds.tableRow && isLegalTable(editor, element)) {
|
|
15230
15326
|
return TheTableRowComponent;
|
|
15231
15327
|
}
|
|
15232
|
-
if (element.type === ElementKinds.tableCell) {
|
|
15328
|
+
if (element.type === ElementKinds.tableCell && isLegalTable(editor, element)) {
|
|
15233
15329
|
return TheTdComponent;
|
|
15234
15330
|
}
|
|
15235
15331
|
return renderElement(element);
|
|
@@ -15240,10 +15336,9 @@ const withTable = (editor) => {
|
|
|
15240
15336
|
deleteCutData();
|
|
15241
15337
|
return;
|
|
15242
15338
|
}
|
|
15243
|
-
const
|
|
15244
|
-
const element = TablePosition.create(opts, editor, selection.anchor.path);
|
|
15339
|
+
const element = createTablePosition(editor);
|
|
15245
15340
|
const tableComponent = ELEMENT_TO_COMPONENT.get(element.table);
|
|
15246
|
-
const selectedCellPositions = tableComponent.tableStore.
|
|
15341
|
+
const selectedCellPositions = tableComponent.tableStore.getSelectedCellPositions();
|
|
15247
15342
|
if (selectedCellPositions.length > 0) {
|
|
15248
15343
|
Editor.withoutNormalizing(editor, () => {
|
|
15249
15344
|
if (tableComponent.tableStore.isSelectedTable) {
|
|
@@ -15270,7 +15365,7 @@ const withTable = (editor) => {
|
|
|
15270
15365
|
const isSelectionOperation = editor.operations.every(op => Operation.isSelectionOperation(op));
|
|
15271
15366
|
if (isCollapsed && isSelectionOperation) {
|
|
15272
15367
|
const opts = new TableOptions();
|
|
15273
|
-
const tablePosition =
|
|
15368
|
+
const tablePosition = createTablePosition(editor);
|
|
15274
15369
|
if (tablePosition.isInTable() && tablePosition.cell.hidden) {
|
|
15275
15370
|
TableEditor.selectOriginCell(editor, tablePosition.table, tablePosition.getRowIndex(), tablePosition.getColumnIndex(), false);
|
|
15276
15371
|
}
|
|
@@ -15321,6 +15416,13 @@ const createTablePlugin = createPluginFactory({
|
|
|
15321
15416
|
});
|
|
15322
15417
|
|
|
15323
15418
|
class TheTodoItemComponent extends TheBaseElementComponent {
|
|
15419
|
+
constructor(elementRef, cdr, ctxService) {
|
|
15420
|
+
super(elementRef, cdr);
|
|
15421
|
+
this.elementRef = elementRef;
|
|
15422
|
+
this.cdr = cdr;
|
|
15423
|
+
this.ctxService = ctxService;
|
|
15424
|
+
this.checkItemClass = true;
|
|
15425
|
+
}
|
|
15324
15426
|
get checkItemSelectable() {
|
|
15325
15427
|
return this.editableWithReadonly && this.readonly;
|
|
15326
15428
|
}
|
|
@@ -15330,13 +15432,6 @@ class TheTodoItemComponent extends TheBaseElementComponent {
|
|
|
15330
15432
|
get editableWithReadonly() {
|
|
15331
15433
|
return getPluginOptions(this.editor, PluginKeys.checkItem)?.editableWithReadonly;
|
|
15332
15434
|
}
|
|
15333
|
-
constructor(elementRef, cdr, ctxService) {
|
|
15334
|
-
super(elementRef, cdr);
|
|
15335
|
-
this.elementRef = elementRef;
|
|
15336
|
-
this.cdr = cdr;
|
|
15337
|
-
this.ctxService = ctxService;
|
|
15338
|
-
this.checkItemClass = true;
|
|
15339
|
-
}
|
|
15340
15435
|
ngOnInit() {
|
|
15341
15436
|
super.ngOnInit();
|
|
15342
15437
|
}
|
|
@@ -15347,14 +15442,14 @@ class TheTodoItemComponent extends TheBaseElementComponent {
|
|
|
15347
15442
|
setNode(this.editor, { checked }, this.element);
|
|
15348
15443
|
}
|
|
15349
15444
|
}
|
|
15350
|
-
TheTodoItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
15351
|
-
TheTodoItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
15445
|
+
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 });
|
|
15446
|
+
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: `
|
|
15352
15447
|
<span contenteditable="false" class="todo-item-status">
|
|
15353
15448
|
<input #checkbox type="checkbox" [checked]="element.checked" (click)="onCheck(checkbox.checked)" />
|
|
15354
15449
|
</span>
|
|
15355
15450
|
<span><slate-children [children]="children" [context]="childrenContext" [viewContext]="viewContext"></slate-children></span>
|
|
15356
15451
|
`, isInline: true, dependencies: [{ kind: "component", type: i1.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }] });
|
|
15357
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
15452
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheTodoItemComponent, decorators: [{
|
|
15358
15453
|
type: Component,
|
|
15359
15454
|
args: [{
|
|
15360
15455
|
selector: 'div[theTodoItem]',
|
|
@@ -15620,15 +15715,15 @@ class TheInlineToolbarComponent {
|
|
|
15620
15715
|
this.destroy$.complete();
|
|
15621
15716
|
}
|
|
15622
15717
|
}
|
|
15623
|
-
TheInlineToolbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
15624
|
-
TheInlineToolbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
15718
|
+
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 });
|
|
15719
|
+
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
|
|
15625
15720
|
#inlineToolbar
|
|
15626
15721
|
class="the-inline-toolbar"
|
|
15627
15722
|
[editor]="editor"
|
|
15628
15723
|
[toolbarItems]="toolbarItems"
|
|
15629
15724
|
[isMore]="false"
|
|
15630
15725
|
></the-toolbar> `, isInline: true, dependencies: [{ kind: "component", type: TheToolbarComponent, selector: "the-toolbar", inputs: ["editor", "toolbarItems", "align", "containerClass", "isMore", "afterTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
15631
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
15726
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheInlineToolbarComponent, decorators: [{
|
|
15632
15727
|
type: Component,
|
|
15633
15728
|
args: [{
|
|
15634
15729
|
selector: 'the-inline-toolbar',
|
|
@@ -15654,10 +15749,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
|
|
|
15654
15749
|
}] } });
|
|
15655
15750
|
|
|
15656
15751
|
class TheQuickInsertComponent {
|
|
15657
|
-
handleMousedownNativeElement(event) {
|
|
15658
|
-
event.preventDefault();
|
|
15659
|
-
event.stopPropagation();
|
|
15660
|
-
}
|
|
15661
15752
|
constructor(renderer, elementRef, cdr) {
|
|
15662
15753
|
this.renderer = renderer;
|
|
15663
15754
|
this.elementRef = elementRef;
|
|
@@ -15668,6 +15759,10 @@ class TheQuickInsertComponent {
|
|
|
15668
15759
|
this.iconNameFill = 'plus-circle-thin-fill';
|
|
15669
15760
|
this.displayIconName = this.defaultIconName;
|
|
15670
15761
|
}
|
|
15762
|
+
handleMousedownNativeElement(event) {
|
|
15763
|
+
event.preventDefault();
|
|
15764
|
+
event.stopPropagation();
|
|
15765
|
+
}
|
|
15671
15766
|
ngOnInit() {
|
|
15672
15767
|
const { onChange } = this.editor;
|
|
15673
15768
|
this.editor.onChange = () => {
|
|
@@ -15745,9 +15840,9 @@ class TheQuickInsertComponent {
|
|
|
15745
15840
|
}, 100);
|
|
15746
15841
|
}
|
|
15747
15842
|
}
|
|
15748
|
-
TheQuickInsertComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
15749
|
-
TheQuickInsertComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
15750
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
15843
|
+
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 });
|
|
15844
|
+
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"] }] });
|
|
15845
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheQuickInsertComponent, decorators: [{
|
|
15751
15846
|
type: Component,
|
|
15752
15847
|
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" }]
|
|
15753
15848
|
}], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { className: [{
|
|
@@ -15766,18 +15861,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
|
|
|
15766
15861
|
}] } });
|
|
15767
15862
|
|
|
15768
15863
|
class TheEditorComponent extends mixinUnsubscribe(MixinBase) {
|
|
15769
|
-
|
|
15770
|
-
return this.theGlobalToolbar ? this.theGlobalToolbar : this.globalToolbarInstance;
|
|
15771
|
-
}
|
|
15772
|
-
get maxHeight() {
|
|
15773
|
-
return this.theOptions?.maxHeight ? `${this.theOptions?.maxHeight}px` : null;
|
|
15774
|
-
}
|
|
15775
|
-
constructor(theContextService, viewContainerRef, elementRef, scrollDispatcher, ngZone, cdr, iconRegistry) {
|
|
15864
|
+
constructor(theContextService, viewContainerRef, elementRef, ngZone, cdr, iconRegistry) {
|
|
15776
15865
|
super();
|
|
15777
15866
|
this.theContextService = theContextService;
|
|
15778
15867
|
this.viewContainerRef = viewContainerRef;
|
|
15779
15868
|
this.elementRef = elementRef;
|
|
15780
|
-
this.scrollDispatcher = scrollDispatcher;
|
|
15781
15869
|
this.ngZone = ngZone;
|
|
15782
15870
|
this.cdr = cdr;
|
|
15783
15871
|
this.iconRegistry = iconRegistry;
|
|
@@ -15893,6 +15981,12 @@ class TheEditorComponent extends mixinUnsubscribe(MixinBase) {
|
|
|
15893
15981
|
});
|
|
15894
15982
|
};
|
|
15895
15983
|
}
|
|
15984
|
+
get theGlobalToolbarInstance() {
|
|
15985
|
+
return this.theGlobalToolbar ? this.theGlobalToolbar : this.globalToolbarInstance;
|
|
15986
|
+
}
|
|
15987
|
+
get maxHeight() {
|
|
15988
|
+
return this.theOptions?.maxHeight ? `${this.theOptions?.maxHeight}px` : null;
|
|
15989
|
+
}
|
|
15896
15990
|
ngOnInit() {
|
|
15897
15991
|
this.initialize();
|
|
15898
15992
|
initializeDefaultMenuIcons(this.iconRegistry);
|
|
@@ -15910,8 +16004,8 @@ class TheEditorComponent extends mixinUnsubscribe(MixinBase) {
|
|
|
15910
16004
|
}
|
|
15911
16005
|
ngOnChanges(changes) {
|
|
15912
16006
|
const options = changes.theOptions;
|
|
15913
|
-
if (options) {
|
|
15914
|
-
this.
|
|
16007
|
+
if (options && !options.firstChange && !isEqual(options.currentValue?.toolbar, options.previousValue?.toolbar)) {
|
|
16008
|
+
this.toolbarCalculate();
|
|
15915
16009
|
}
|
|
15916
16010
|
if (options && options.currentValue?.readonly !== options.previousValue?.readonly) {
|
|
15917
16011
|
this.applyAutoFocus();
|
|
@@ -15941,6 +16035,7 @@ class TheEditorComponent extends mixinUnsubscribe(MixinBase) {
|
|
|
15941
16035
|
nativeElement: this.elementRef.nativeElement,
|
|
15942
16036
|
viewContainerRef: this.viewContainerRef
|
|
15943
16037
|
});
|
|
16038
|
+
this.initializeOptions();
|
|
15944
16039
|
this.toolbarCalculate();
|
|
15945
16040
|
setTimeout(() => {
|
|
15946
16041
|
// You need to wait for the editor rendering to complete
|
|
@@ -16118,8 +16213,8 @@ class TheEditorComponent extends mixinUnsubscribe(MixinBase) {
|
|
|
16118
16213
|
};
|
|
16119
16214
|
}
|
|
16120
16215
|
}
|
|
16121
|
-
TheEditorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
16122
|
-
TheEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
16216
|
+
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: i0.NgZone }, { token: i0.ChangeDetectorRef }, { token: i4.ThyIconRegistry }], target: i0.ɵɵFactoryTarget.Component });
|
|
16217
|
+
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: [
|
|
16123
16218
|
TheContextService,
|
|
16124
16219
|
TheColorSelectService,
|
|
16125
16220
|
{
|
|
@@ -16127,8 +16222,8 @@ TheEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", ver
|
|
|
16127
16222
|
useExisting: forwardRef(() => TheEditorComponent),
|
|
16128
16223
|
multi: true
|
|
16129
16224
|
}
|
|
16130
|
-
], 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
|
|
16131
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
16225
|
+
], 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 });
|
|
16226
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheEditorComponent, decorators: [{
|
|
16132
16227
|
type: Component,
|
|
16133
16228
|
args: [{ selector: 'the-editor, theEditor', providers: [
|
|
16134
16229
|
TheContextService,
|
|
@@ -16142,7 +16237,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
|
|
|
16142
16237
|
class: 'the-editor',
|
|
16143
16238
|
'[class.the-editor-readonly]': 'theOptions?.readonly'
|
|
16144
16239
|
}, 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" }]
|
|
16145
|
-
}], ctorParameters: function () { return [{ type: TheContextService }, { type: i0.ViewContainerRef }, { type: i0.ElementRef }, { type:
|
|
16240
|
+
}], ctorParameters: function () { return [{ type: TheContextService }, { type: i0.ViewContainerRef }, { type: i0.ElementRef }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }, { type: i4.ThyIconRegistry }]; }, propDecorators: { theOptions: [{
|
|
16146
16241
|
type: Input
|
|
16147
16242
|
}], thePlugins: [{
|
|
16148
16243
|
type: Input
|
|
@@ -16175,10 +16270,10 @@ const ENTRY_COMMON_COMPONENTS = [TheColumnResizeOverlayHandleComponent];
|
|
|
16175
16270
|
const DIRECTIVES = [TheColumnResizeDirective];
|
|
16176
16271
|
class TheColumnResizeCommonModule {
|
|
16177
16272
|
}
|
|
16178
|
-
TheColumnResizeCommonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
16179
|
-
TheColumnResizeCommonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
16180
|
-
TheColumnResizeCommonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
16181
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
16273
|
+
TheColumnResizeCommonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheColumnResizeCommonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
16274
|
+
TheColumnResizeCommonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.0", ngImport: i0, type: TheColumnResizeCommonModule, declarations: [TheColumnResizeOverlayHandleComponent], exports: [TheColumnResizeOverlayHandleComponent] });
|
|
16275
|
+
TheColumnResizeCommonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheColumnResizeCommonModule });
|
|
16276
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheColumnResizeCommonModule, decorators: [{
|
|
16182
16277
|
type: NgModule,
|
|
16183
16278
|
args: [{
|
|
16184
16279
|
declarations: ENTRY_COMMON_COMPONENTS,
|
|
@@ -16187,10 +16282,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
|
|
|
16187
16282
|
}] });
|
|
16188
16283
|
class TheColumnSizeModule {
|
|
16189
16284
|
}
|
|
16190
|
-
TheColumnSizeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
16191
|
-
TheColumnSizeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
16192
|
-
TheColumnSizeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
16193
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
16285
|
+
TheColumnSizeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheColumnSizeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
16286
|
+
TheColumnSizeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.0", ngImport: i0, type: TheColumnSizeModule, declarations: [TheColumnResizeDirective], imports: [OverlayModule, TheColumnResizeCommonModule], exports: [TheColumnResizeDirective] });
|
|
16287
|
+
TheColumnSizeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheColumnSizeModule, imports: [OverlayModule, TheColumnResizeCommonModule] });
|
|
16288
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheColumnSizeModule, decorators: [{
|
|
16194
16289
|
type: NgModule,
|
|
16195
16290
|
args: [{
|
|
16196
16291
|
imports: [OverlayModule, TheColumnResizeCommonModule],
|
|
@@ -16272,8 +16367,8 @@ const PLUGIN_COMPONENTS = [
|
|
|
16272
16367
|
const PIPES = [ElementStylePipe, ElementClassPipe, TableFreezeColumnPipe, TableFreezeRowPipe];
|
|
16273
16368
|
class TheEditorModule {
|
|
16274
16369
|
}
|
|
16275
|
-
TheEditorModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
16276
|
-
TheEditorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
16370
|
+
TheEditorModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheEditorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
16371
|
+
TheEditorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.0", ngImport: i0, type: TheEditorModule, declarations: [TheEditorComponent, ElementStylePipe, ElementClassPipe, TableFreezeColumnPipe, TableFreezeRowPipe, TheToolbarComponent,
|
|
16277
16372
|
TheToolbarDropdownComponent,
|
|
16278
16373
|
TheToolbarGroupComponent,
|
|
16279
16374
|
TheToolbarItemComponent,
|
|
@@ -16344,14 +16439,14 @@ TheEditorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version
|
|
|
16344
16439
|
TheListboxGroupDirective,
|
|
16345
16440
|
TheListboxDirective,
|
|
16346
16441
|
ThePreventDefaultDirective] });
|
|
16347
|
-
TheEditorModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
16442
|
+
TheEditorModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheEditorModule, providers: [
|
|
16348
16443
|
{
|
|
16349
16444
|
provide: TheToolbarGroupToken,
|
|
16350
16445
|
useValue: TheToolbarGroupComponent
|
|
16351
16446
|
},
|
|
16352
16447
|
THE_MODE_PROVIDER
|
|
16353
16448
|
], imports: [CommonModule, ScrollingModule, SlateModule, FormsModule, TETHYS, CodemirrorModule, TheColumnSizeModule] });
|
|
16354
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
16449
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheEditorModule, decorators: [{
|
|
16355
16450
|
type: NgModule,
|
|
16356
16451
|
args: [{
|
|
16357
16452
|
declarations: [TheEditorComponent, ...PIPES, ...COMPONENTS, ...PLUGIN_COMPONENTS],
|
|
@@ -16416,9 +16511,9 @@ class TheToolbarService {
|
|
|
16416
16511
|
});
|
|
16417
16512
|
}
|
|
16418
16513
|
}
|
|
16419
|
-
TheToolbarService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
16420
|
-
TheToolbarService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
16421
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
16514
|
+
TheToolbarService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheToolbarService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
16515
|
+
TheToolbarService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheToolbarService });
|
|
16516
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheToolbarService, decorators: [{
|
|
16422
16517
|
type: Injectable
|
|
16423
16518
|
}] });
|
|
16424
16519
|
|