@worktile/theia 2.1.4 → 2.1.8
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/bundles/worktile-theia.umd.js +574 -383
- package/bundles/worktile-theia.umd.js.map +1 -1
- package/components/toolbar/toolbar.component.d.ts +1 -3
- package/constants/default.d.ts +1 -0
- package/constants/node-types.d.ts +4 -3
- package/custom-types.d.ts +4 -1
- package/editor.component.d.ts +3 -4
- package/editor.module.d.ts +4 -5
- package/esm2015/components/color-select/color-select.component.js +4 -4
- package/esm2015/components/column-resize/column-resize-notifier.js +4 -4
- package/esm2015/components/column-resize/column-resize.directive.js +4 -4
- package/esm2015/components/column-resize/column-resize.module.js +9 -9
- package/esm2015/components/column-resize/event-dispatcher.js +4 -4
- package/esm2015/components/column-resize/overlay-handle.component.js +4 -4
- package/esm2015/components/column-resize/resizing.store.js +4 -4
- package/esm2015/components/contextmenu/contextmenu.component.js +4 -4
- package/esm2015/components/conversion-hint/conversion-hint.component.js +4 -4
- package/esm2015/components/element/element.component.js +4 -4
- package/esm2015/components/inline-toolbar/inline-toolbar.component.js +5 -5
- package/esm2015/components/nav-split-line/nav-split-line.component.js +4 -4
- package/esm2015/components/table-select/table-select.component.js +4 -4
- package/esm2015/components/template/template.component.js +4 -4
- package/esm2015/components/text/text.component.js +4 -4
- package/esm2015/components/toolbar/toolbar.component.js +11 -10
- package/esm2015/components/toolbar-base-item/toolbar-base-item.component.js +4 -4
- package/esm2015/components/toolbar-dropdown/toolbar-dropdown.component.js +4 -4
- package/esm2015/components/toolbar-group/toolbar-group.component.js +4 -4
- package/esm2015/components/toolbar-item/toolbar-item.component.js +4 -4
- package/esm2015/constants/auto-format-rules.js +8 -3
- package/esm2015/constants/default.js +2 -1
- package/esm2015/constants/node-types.js +5 -4
- package/esm2015/constants/toolbar.js +3 -6
- package/esm2015/custom-types.js +1 -1
- package/esm2015/editor.component.js +29 -26
- package/esm2015/editor.module.js +8 -8
- package/esm2015/interfaces/auto-format.js +1 -1
- package/esm2015/interfaces/editor.js +1 -1
- package/esm2015/interfaces/element.js +1 -1
- package/esm2015/interfaces/view-base.js +4 -4
- package/esm2015/pipes.js +7 -7
- package/esm2015/plugins/autoformat/autoformat.plugin.js +2 -1
- package/esm2015/plugins/autoformat/transforms/auto-format-inline.js +27 -14
- package/esm2015/plugins/blockquote/blockquote.component.js +4 -4
- package/esm2015/plugins/code/code.component.js +28 -12
- package/esm2015/plugins/color/toolbar-item.component.js +4 -4
- package/esm2015/plugins/common/move-selection.plugin.js +2 -2
- package/esm2015/plugins/font-size/font-size.editor.js +35 -1
- package/esm2015/plugins/hr/hr.component.js +4 -4
- package/esm2015/plugins/image/image.component.js +4 -4
- package/esm2015/plugins/index.js +7 -3
- package/esm2015/plugins/inline-code/inline-code.component.js +26 -0
- package/esm2015/plugins/inline-code/inline-code.editor.js +49 -0
- package/esm2015/plugins/inline-code/inline-code.plugin.js +84 -0
- package/esm2015/plugins/inline-code/options.js +14 -0
- package/esm2015/plugins/link/edit/link-edit.component.js +4 -4
- package/esm2015/plugins/link/hover/link-hover.component.js +4 -4
- package/esm2015/plugins/link/link.component.js +26 -12
- package/esm2015/plugins/list/components/bulleted-list.component.js +4 -4
- package/esm2015/plugins/list/components/list-item.component.js +32 -6
- package/esm2015/plugins/list/components/numbered-list.component.js +4 -4
- package/esm2015/plugins/list/transforms/insert-list-item.js +11 -7
- package/esm2015/plugins/mark/options.js +1 -9
- package/esm2015/plugins/quick-insert/components/quick-insert.component.js +19 -11
- package/esm2015/plugins/quick-insert/components/quick-toolbar/quick-toolbar.component.js +4 -4
- package/esm2015/plugins/table/components/insert-mark/insert-mark.component.js +4 -4
- package/esm2015/plugins/table/components/row/row.component.js +4 -4
- package/esm2015/plugins/table/components/table.component.js +4 -4
- package/esm2015/plugins/table/components/td/td.component.js +4 -4
- package/esm2015/plugins/table/components/toolbar/table-toolbar.component.js +4 -4
- package/esm2015/plugins/table/table.service.js +4 -4
- package/esm2015/plugins/table/table.store.js +4 -4
- package/esm2015/plugins/table/toolbar-item.component.js +4 -4
- package/esm2015/plugins/table/transforms/insert-table.js +2 -2
- package/esm2015/plugins/todo-item/todo-item.component.js +4 -4
- package/esm2015/plugins/vertical-align/toolbar-item.component.js +4 -4
- package/esm2015/services/color-select.service.js +4 -4
- package/esm2015/services/context.service.js +12 -4
- package/esm2015/services/table-contextmenu.service.js +4 -4
- package/esm2015/services/toolbar.service.js +4 -4
- package/esm2015/shortcuts/mark.js +10 -4
- package/esm2015/transforms/handle-continual-insert-break.js +1 -4
- package/esm2015/utils/index.js +2 -1
- package/fesm2015/worktile-theia.js +564 -365
- package/fesm2015/worktile-theia.js.map +1 -1
- package/interfaces/auto-format.d.ts +1 -1
- package/interfaces/editor.d.ts +3 -3
- package/interfaces/element.d.ts +1 -1
- package/package.json +1 -1
- package/plugins/autoformat/transforms/auto-format-inline.d.ts +3 -1
- package/plugins/code/code.component.d.ts +6 -3
- package/plugins/code/code.component.scss +16 -0
- package/plugins/font-size/font-size.editor.d.ts +2 -0
- package/plugins/inline-code/inline-code.component.d.ts +9 -0
- package/plugins/inline-code/inline-code.component.scss +13 -0
- package/plugins/inline-code/inline-code.editor.d.ts +7 -0
- package/plugins/inline-code/inline-code.plugin.d.ts +2 -0
- package/plugins/inline-code/options.d.ts +2 -0
- package/plugins/link/link.component.d.ts +1 -0
- package/plugins/list/components/list-item.component.d.ts +4 -1
- package/plugins/quick-insert/components/quick-insert.component.d.ts +3 -1
- package/plugins/table/transforms/insert-table.d.ts +1 -1
- package/queries/get-container-blocks.d.ts +1 -1
- package/queries/get-selection-marks.d.ts +1 -1
- package/services/context.service.d.ts +5 -1
- package/styles/editor.scss +18 -4
- package/styles/index.scss +1 -1
- package/styles/typo.scss +4 -1
- package/transforms/set-marks.d.ts +1 -1
- package/utils/index.d.ts +1 -0
- package/esm2015/plugins/placeholder/placeholder.component.js +0 -83
- package/plugins/placeholder/placeholder.component.d.ts +0 -21
- package/plugins/placeholder/placeholder.component.scss +0 -10
|
@@ -20,7 +20,7 @@ import * as i2 from '@angular/cdk/overlay';
|
|
|
20
20
|
import { Overlay, OverlayModule } from '@angular/cdk/overlay';
|
|
21
21
|
import * as i1$1 from 'ngx-tethys/alert';
|
|
22
22
|
import { ThyAlertModule } from 'ngx-tethys/alert';
|
|
23
|
-
import { map, take, delay, startWith, distinctUntilChanged, skip, share, filter, throttleTime,
|
|
23
|
+
import { map, takeUntil, take, delay, startWith, distinctUntilChanged, skip, share, filter, throttleTime, mapTo, debounceTime, pairwise } from 'rxjs/operators';
|
|
24
24
|
import { ThyUploadStatus } from 'ngx-tethys/uploader';
|
|
25
25
|
import * as i1$2 from '@angular/platform-browser';
|
|
26
26
|
import { fromEvent, timer, Subject, combineLatest, Observable, BehaviorSubject, merge, ReplaySubject } from 'rxjs';
|
|
@@ -68,6 +68,7 @@ const TAB_SPACE = ' ';
|
|
|
68
68
|
const CLIPBOARD_FORMAT_KEY = 'x-theia-fragment';
|
|
69
69
|
const DEFAULT_SCROLL_CONTAINER = '.the-editable-container';
|
|
70
70
|
const ELEMENT_UNIQUE_ID = 'key';
|
|
71
|
+
const ZERO_WIDTH_CHAR = '\u200B';
|
|
71
72
|
var TheMode;
|
|
72
73
|
(function (TheMode) {
|
|
73
74
|
TheMode["fullMode"] = "full";
|
|
@@ -98,6 +99,7 @@ var ElementKinds;
|
|
|
98
99
|
ElementKinds["hr"] = "hr";
|
|
99
100
|
ElementKinds["link"] = "link";
|
|
100
101
|
ElementKinds["default"] = "paragraph";
|
|
102
|
+
ElementKinds["inlineCode"] = "inline-code";
|
|
101
103
|
})(ElementKinds || (ElementKinds = {}));
|
|
102
104
|
var Alignment;
|
|
103
105
|
(function (Alignment) {
|
|
@@ -147,8 +149,8 @@ var MarkTypes;
|
|
|
147
149
|
MarkTypes["strike"] = "strike";
|
|
148
150
|
MarkTypes["color"] = "color";
|
|
149
151
|
MarkTypes["backgroundColor"] = "background-color";
|
|
150
|
-
MarkTypes["codeLine"] = "code-line";
|
|
151
152
|
MarkTypes["fontSize"] = "font-size";
|
|
153
|
+
MarkTypes["codeLine"] = "code-line";
|
|
152
154
|
})(MarkTypes || (MarkTypes = {}));
|
|
153
155
|
var ToolbarActionTypes;
|
|
154
156
|
(function (ToolbarActionTypes) {
|
|
@@ -173,12 +175,12 @@ var ToolbarActionTypes;
|
|
|
173
175
|
const MarkProps = [
|
|
174
176
|
MarkTypes.backgroundColor,
|
|
175
177
|
MarkTypes.bold,
|
|
176
|
-
MarkTypes.codeLine,
|
|
177
178
|
MarkTypes.color,
|
|
178
179
|
MarkTypes.italic,
|
|
179
180
|
MarkTypes.strike,
|
|
180
181
|
MarkTypes.underline,
|
|
181
|
-
MarkTypes.fontSize
|
|
182
|
+
MarkTypes.fontSize,
|
|
183
|
+
MarkTypes.codeLine
|
|
182
184
|
];
|
|
183
185
|
const THE_INLINE_TOOLBAR_TYPES = [ElementKinds.default, ElementKinds.listItem, ElementKinds.checkItem];
|
|
184
186
|
const STANDARD_HEADING_TYPES = [
|
|
@@ -208,13 +210,12 @@ var ToolbarItemMode;
|
|
|
208
210
|
})(ToolbarItemMode || (ToolbarItemMode = {}));
|
|
209
211
|
const DefaultGlobalToolbarDefinition = [
|
|
210
212
|
ElementKinds.headingList,
|
|
211
|
-
MarkTypes.fontSize,
|
|
212
213
|
ToolbarActionTypes.split,
|
|
213
214
|
MarkTypes.bold,
|
|
214
215
|
MarkTypes.italic,
|
|
215
216
|
MarkTypes.underline,
|
|
216
217
|
MarkTypes.strike,
|
|
217
|
-
|
|
218
|
+
ElementKinds.inlineCode,
|
|
218
219
|
MarkTypes.color,
|
|
219
220
|
MarkTypes.backgroundColor,
|
|
220
221
|
ToolbarActionTypes.split,
|
|
@@ -223,7 +224,6 @@ const DefaultGlobalToolbarDefinition = [
|
|
|
223
224
|
ToolbarActionTypes.split,
|
|
224
225
|
ElementKinds.numberedList,
|
|
225
226
|
ElementKinds.bulletedList,
|
|
226
|
-
ElementKinds.checkItem,
|
|
227
227
|
ToolbarActionTypes.split,
|
|
228
228
|
ElementKinds.link,
|
|
229
229
|
ElementKinds.image,
|
|
@@ -238,7 +238,7 @@ const DefaultInlineToolbarDefinition = [
|
|
|
238
238
|
MarkTypes.italic,
|
|
239
239
|
MarkTypes.underline,
|
|
240
240
|
MarkTypes.strike,
|
|
241
|
-
|
|
241
|
+
ElementKinds.inlineCode,
|
|
242
242
|
MarkTypes.color,
|
|
243
243
|
MarkTypes.backgroundColor,
|
|
244
244
|
ToolbarActionTypes.split,
|
|
@@ -251,7 +251,6 @@ const DefaultQuickToolbarDefinition = [
|
|
|
251
251
|
ToolbarActionTypes.split,
|
|
252
252
|
ElementKinds.numberedList,
|
|
253
253
|
ElementKinds.bulletedList,
|
|
254
|
-
ElementKinds.checkItem,
|
|
255
254
|
ToolbarActionTypes.split,
|
|
256
255
|
ElementKinds.link,
|
|
257
256
|
ElementKinds.image,
|
|
@@ -397,9 +396,9 @@ class TheTextComponent extends BaseTextComponent {
|
|
|
397
396
|
this.applyTextMark();
|
|
398
397
|
}
|
|
399
398
|
}
|
|
400
|
-
TheTextComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
401
|
-
TheTextComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
402
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
399
|
+
TheTextComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheTextComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
400
|
+
TheTextComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", 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, components: [{ type: i1.SlateLeavesComponent, selector: "slate-leaves", inputs: ["context"] }] });
|
|
401
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheTextComponent, decorators: [{
|
|
403
402
|
type: Component,
|
|
404
403
|
args: [{
|
|
405
404
|
selector: 'span[theText]',
|
|
@@ -418,9 +417,9 @@ class TheBaseElementComponent extends BaseElementComponent {
|
|
|
418
417
|
this.nativeElement.classList.add(`slate-element-${this.element.type}`, blockClass);
|
|
419
418
|
}
|
|
420
419
|
}
|
|
421
|
-
TheBaseElementComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
422
|
-
TheBaseElementComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
423
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
420
|
+
TheBaseElementComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheBaseElementComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
421
|
+
TheBaseElementComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheBaseElementComponent, selector: "TheBaseElementComponent", usesInheritance: true, ngImport: i0, template: '', isInline: true });
|
|
422
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheBaseElementComponent, decorators: [{
|
|
424
423
|
type: Component,
|
|
425
424
|
args: [{
|
|
426
425
|
selector: 'TheBaseElementComponent',
|
|
@@ -430,9 +429,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImpor
|
|
|
430
429
|
|
|
431
430
|
class TheDefaultElementComponent extends TheBaseElementComponent {
|
|
432
431
|
}
|
|
433
|
-
TheDefaultElementComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
434
|
-
TheDefaultElementComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
435
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
432
|
+
TheDefaultElementComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheDefaultElementComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
433
|
+
TheDefaultElementComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheDefaultElementComponent, selector: "[theDefaultElement]", usesInheritance: true, ngImport: i0, template: '<slate-children [children]="children" [context]="childrenContext" [viewContext]="viewContext"></slate-children>', isInline: true, components: [{ type: i1.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
434
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheDefaultElementComponent, decorators: [{
|
|
436
435
|
type: Component,
|
|
437
436
|
args: [{
|
|
438
437
|
selector: '[theDefaultElement]',
|
|
@@ -1537,9 +1536,6 @@ function handleContinualInsertBreak(editor, lowestBlock, type) {
|
|
|
1537
1536
|
const aboveResult = Editor.above(editor, {
|
|
1538
1537
|
match: n => Editor.isBlock(editor, n) && n.type === type
|
|
1539
1538
|
});
|
|
1540
|
-
if (isEnd) {
|
|
1541
|
-
editor.marks = {};
|
|
1542
|
-
}
|
|
1543
1539
|
if (aboveResult && aboveResult[0] && isEnd && isEmpty) {
|
|
1544
1540
|
const wrapBlock = aboveResult[0];
|
|
1545
1541
|
if (wrapBlock.type === type) {
|
|
@@ -1746,6 +1742,53 @@ const BlockquoteEditor = {
|
|
|
1746
1742
|
}
|
|
1747
1743
|
};
|
|
1748
1744
|
|
|
1745
|
+
const InlineCodeEditor = {
|
|
1746
|
+
toggleInlineCode(editor, text) {
|
|
1747
|
+
const isActive = InlineCodeEditor.isInlineCodeActive(editor);
|
|
1748
|
+
if (isActive) {
|
|
1749
|
+
InlineCodeEditor.unwrapInlineCode(editor);
|
|
1750
|
+
return;
|
|
1751
|
+
}
|
|
1752
|
+
if (Range.isCollapsed(editor.selection)) {
|
|
1753
|
+
InlineCodeEditor.wrapInlineCode(editor, text);
|
|
1754
|
+
}
|
|
1755
|
+
else {
|
|
1756
|
+
const fragment = Node.fragment(editor, editor.selection)[0];
|
|
1757
|
+
const selectNode = Node.get(fragment, []);
|
|
1758
|
+
const selectText = Node.string(selectNode);
|
|
1759
|
+
InlineCodeEditor.wrapInlineCode(editor, selectText);
|
|
1760
|
+
}
|
|
1761
|
+
},
|
|
1762
|
+
wrapInlineCode(editor, text = '') {
|
|
1763
|
+
if (InlineCodeEditor.isInlineCodeActive(editor)) {
|
|
1764
|
+
InlineCodeEditor.unwrapInlineCode(editor);
|
|
1765
|
+
}
|
|
1766
|
+
const { selection } = editor;
|
|
1767
|
+
const isCollapsed = selection && Range.isCollapsed(selection);
|
|
1768
|
+
const inlineCode = {
|
|
1769
|
+
type: ElementKinds.inlineCode,
|
|
1770
|
+
children: isCollapsed ? [{ text: text ? text : ZERO_WIDTH_CHAR }] : []
|
|
1771
|
+
};
|
|
1772
|
+
if (isCollapsed) {
|
|
1773
|
+
Transforms.insertNodes(editor, inlineCode);
|
|
1774
|
+
}
|
|
1775
|
+
else {
|
|
1776
|
+
Transforms.wrapNodes(editor, inlineCode, { split: true });
|
|
1777
|
+
}
|
|
1778
|
+
},
|
|
1779
|
+
unwrapInlineCode(editor) {
|
|
1780
|
+
Transforms.unwrapNodes(editor, { match: n => Element$1.isElement(n) && n.type === ElementKinds.inlineCode });
|
|
1781
|
+
},
|
|
1782
|
+
isInlineCodeActive(editor, path) {
|
|
1783
|
+
var _a;
|
|
1784
|
+
const [inlineCode] = Editor.nodes(editor, {
|
|
1785
|
+
at: path ? path : (_a = editor.selection) === null || _a === void 0 ? void 0 : _a.anchor.path,
|
|
1786
|
+
match: n => Element$1.isElement(n) && n.type === ElementKinds.inlineCode
|
|
1787
|
+
});
|
|
1788
|
+
return !!inlineCode;
|
|
1789
|
+
}
|
|
1790
|
+
};
|
|
1791
|
+
|
|
1749
1792
|
const autoFormatRules = [
|
|
1750
1793
|
{
|
|
1751
1794
|
type: ElementKinds.heading_1,
|
|
@@ -1803,10 +1846,13 @@ const autoFormatRules = [
|
|
|
1803
1846
|
insertTrigger: true
|
|
1804
1847
|
},
|
|
1805
1848
|
{
|
|
1806
|
-
type:
|
|
1849
|
+
type: ElementKinds.inlineCode,
|
|
1807
1850
|
between: ['`', '`'],
|
|
1808
1851
|
mode: 'inline',
|
|
1809
|
-
|
|
1852
|
+
format: (editor, text) => {
|
|
1853
|
+
InlineCodeEditor.toggleInlineCode(editor, text);
|
|
1854
|
+
Transforms.select(editor, Editor.after(editor, editor.selection));
|
|
1855
|
+
}
|
|
1810
1856
|
},
|
|
1811
1857
|
{
|
|
1812
1858
|
type: MarkTypes.strike,
|
|
@@ -1919,9 +1965,9 @@ class TheConversionHintComponent {
|
|
|
1919
1965
|
clearInterval(this.closeTimer);
|
|
1920
1966
|
}
|
|
1921
1967
|
}
|
|
1922
|
-
TheConversionHintComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
1923
|
-
TheConversionHintComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
1924
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
1968
|
+
TheConversionHintComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheConversionHintComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1969
|
+
TheConversionHintComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", 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\n thyType=\"primary-weak\"\n thyIcon=\"info-circle-fill\"\n thyCloseable=\"true\"\n thyMessage=\"\u68C0\u6D4B\u5230\u7C98\u8D34\u5185\u5BB9\u7B26\u5408Markdown\u8BED\u6CD5\"\n >\n <ng-template #operation>\n <a href=\"javascript:;\" thyAlertActionItem (click)=\"conversion()\">\n \u7ACB\u5373\u8F6C\u6362\n </a>\n </ng-template>\n </thy-alert>\n</ng-container>\n", components: [{ type: i1$1.ThyAlertComponent, selector: "thy-alert", inputs: ["thyType", "thyMessage", "thyIcon", "thyCloseable"] }], directives: [{ type: i1$1.ThyAlertActionItemDirective, selector: "[thyAlertActionItem]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1970
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheConversionHintComponent, decorators: [{
|
|
1925
1971
|
type: Component,
|
|
1926
1972
|
args: [{
|
|
1927
1973
|
selector: 'the-conversion-hint',
|
|
@@ -2002,6 +2048,35 @@ const getToolbarClass = (editor) => {
|
|
|
2002
2048
|
const IS_MAC = typeof window != 'undefined' && /Mac|iPod|iPhone|iPad/.test(window.navigator.platform);
|
|
2003
2049
|
const CONTROL_KEY = IS_MAC ? '⌘' : 'Ctrl';
|
|
2004
2050
|
|
|
2051
|
+
/**
|
|
2052
|
+
* whether the current node is a clean paragraph
|
|
2053
|
+
* @param editor
|
|
2054
|
+
* @param text
|
|
2055
|
+
* @returns boolean
|
|
2056
|
+
*/
|
|
2057
|
+
const isCleanEmptyParagraph = (editor) => {
|
|
2058
|
+
const isCollapsedCursor = TheEditor.isFocused(editor) && editor.selection && Range.isCollapsed(editor.selection);
|
|
2059
|
+
if (!isCollapsedCursor) {
|
|
2060
|
+
return false;
|
|
2061
|
+
}
|
|
2062
|
+
const block = Node.ancestor(editor, [editor.selection.anchor.path[0]]);
|
|
2063
|
+
const textIndent = 'textIndent';
|
|
2064
|
+
const align = 'align';
|
|
2065
|
+
const hasTextIndent = block[textIndent];
|
|
2066
|
+
const hasAlign = block[align];
|
|
2067
|
+
if (Node.string(block) === '' &&
|
|
2068
|
+
Element$1.isElement(block) &&
|
|
2069
|
+
block.type === ElementKinds.paragraph &&
|
|
2070
|
+
block.children.length === 1 &&
|
|
2071
|
+
Text.isText(block.children[0]) &&
|
|
2072
|
+
!Editor.isVoid(editor, block) &&
|
|
2073
|
+
!hasTextIndent &&
|
|
2074
|
+
!hasAlign) {
|
|
2075
|
+
return true;
|
|
2076
|
+
}
|
|
2077
|
+
return false;
|
|
2078
|
+
};
|
|
2079
|
+
|
|
2005
2080
|
const withDeserializeMd = (options) => (editor) => {
|
|
2006
2081
|
const { insertData, onKeydown } = editor;
|
|
2007
2082
|
editor.onKeydown = (event) => {
|
|
@@ -2288,6 +2363,13 @@ class TheContextService {
|
|
|
2288
2363
|
}
|
|
2289
2364
|
return this.options;
|
|
2290
2365
|
}
|
|
2366
|
+
getTheOptions() {
|
|
2367
|
+
return this.options.theOptions;
|
|
2368
|
+
}
|
|
2369
|
+
getDefaultFontSize() {
|
|
2370
|
+
var _a;
|
|
2371
|
+
return ((_a = this.options.theOptions) === null || _a === void 0 ? void 0 : _a.fontSize) || FontSizes.fontSize14;
|
|
2372
|
+
}
|
|
2291
2373
|
getEditableElement() {
|
|
2292
2374
|
return this.options.nativeElement.querySelector('.the-editor-typo');
|
|
2293
2375
|
}
|
|
@@ -2302,9 +2384,9 @@ class TheContextService {
|
|
|
2302
2384
|
this.fileList.splice(this.fileList.findIndex(item => item.file === file), 1);
|
|
2303
2385
|
}
|
|
2304
2386
|
}
|
|
2305
|
-
TheContextService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
2306
|
-
TheContextService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
2307
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
2387
|
+
TheContextService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheContextService, deps: [{ token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2388
|
+
TheContextService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheContextService });
|
|
2389
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheContextService, decorators: [{
|
|
2308
2390
|
type: Injectable
|
|
2309
2391
|
}], ctorParameters: function () { return [{ type: i0.NgZone }]; } });
|
|
2310
2392
|
|
|
@@ -2477,9 +2559,9 @@ class TheImageComponent extends TheBaseElementComponent {
|
|
|
2477
2559
|
$event.stopPropagation();
|
|
2478
2560
|
}
|
|
2479
2561
|
}
|
|
2480
|
-
TheImageComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
2481
|
-
TheImageComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
2482
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
2562
|
+
TheImageComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheImageComponent, deps: [{ token: i0.ElementRef }, { token: i1$2.DomSanitizer }, { token: THE_UPLOAD_SERVICE_TOKEN }, { token: i0.ChangeDetectorRef }, { token: TheContextService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2563
|
+
TheImageComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheImageComponent, selector: "the-image, [theImage]", viewQueries: [{ propertyName: "imageContent", first: true, predicate: ["imageContent"], descendants: true }, { propertyName: "img", first: true, predicate: ["img"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<slate-children [children]=\"children\" [context]=\"childrenContext\" [viewContext]=\"viewContext\"></slate-children>\n<div class=\"image-container\" contenteditable=\"false\" [style.textAlign]=\"imageEntry.align || 'center'\">\n <div\n #imageContent\n *ngIf=\"imageEntry.thumbUrl\"\n class=\"image-content\"\n [class.pointer]=\"!selection\"\n [ngStyle]=\"{ width: imageEntry.width + 'px', height: imageEntry.height + 'px' }\"\n >\n <img #img class=\"main-image\" [src]=\"imageEntry.thumbUrl\" [alt]=\"imageEntry.name\" />\n <div *ngIf=\"selection\" class=\"image-profile\" [class.outline]=\"selection\">\n <span *ngIf=\"isCollapsed\" (mousedown)=\"startDrag($event, '-xl')\" class=\"image-pointer left top\"></span>\n <span *ngIf=\"isCollapsed\" (mousedown)=\"startDrag($event, 'xl')\" class=\"image-pointer right top\"></span>\n <span *ngIf=\"isCollapsed\" (mousedown)=\"startDrag($event, 'xl')\" class=\"image-pointer right bottom\"></span>\n <span *ngIf=\"isCollapsed\" (mousedown)=\"startDrag($event, '-xl')\" class=\"image-pointer left bottom\"></span>\n </div>\n <div *ngIf=\"uploading\" class=\"uploading\">\n <div class=\"uploading-percentage\">\n <thy-progress thyType=\"primary\" [thyValue]=\"percentage\" thySize=\"sm\"></thy-progress>\n <thy-icon (click)=\"cancelUpload($event)\" thyIconName=\"close-circle-bold-fill\" thyIconLegging=\"true\"></thy-icon>\n </div>\n </div>\n <div *ngIf=\"!uploading\" class=\"layer\" (mousedown)=\"preview($event)\" [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", components: [{ type: i1.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }, { type: i4.ThyProgressComponent, selector: "thy-progress", inputs: ["thyType", "thySize", "thyValue", "thyMax", "thyTips"] }, { type: i4$1.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }], directives: [{ type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
|
|
2564
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheImageComponent, decorators: [{
|
|
2483
2565
|
type: Component,
|
|
2484
2566
|
args: [{
|
|
2485
2567
|
selector: 'the-image, [theImage]',
|
|
@@ -2962,14 +3044,17 @@ const insertListItem = (editor) => {
|
|
|
2962
3044
|
}
|
|
2963
3045
|
else {
|
|
2964
3046
|
/**
|
|
2965
|
-
* If end,
|
|
3047
|
+
* If end, split nodes
|
|
2966
3048
|
*/
|
|
2967
3049
|
Editor.withoutNormalizing(editor, () => {
|
|
2968
|
-
Transforms.
|
|
2969
|
-
|
|
2970
|
-
|
|
2971
|
-
|
|
2972
|
-
|
|
3050
|
+
Transforms.splitNodes(editor, {
|
|
3051
|
+
always: true,
|
|
3052
|
+
mode: 'highest',
|
|
3053
|
+
match: node => {
|
|
3054
|
+
const path = node && TheEditor.findPath(editor, node);
|
|
3055
|
+
return path && path.length === nextListItemPath.length;
|
|
3056
|
+
}
|
|
3057
|
+
});
|
|
2973
3058
|
});
|
|
2974
3059
|
}
|
|
2975
3060
|
/**
|
|
@@ -3236,9 +3321,9 @@ class ElementStylePipe {
|
|
|
3236
3321
|
return style;
|
|
3237
3322
|
}
|
|
3238
3323
|
}
|
|
3239
|
-
ElementStylePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
3240
|
-
ElementStylePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.
|
|
3241
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
3324
|
+
ElementStylePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ElementStylePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
3325
|
+
ElementStylePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ElementStylePipe, name: "elementStyle" });
|
|
3326
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ElementStylePipe, decorators: [{
|
|
3242
3327
|
type: Pipe,
|
|
3243
3328
|
args: [{
|
|
3244
3329
|
name: 'elementStyle'
|
|
@@ -3254,9 +3339,9 @@ class ElementClassPipe {
|
|
|
3254
3339
|
return classStr;
|
|
3255
3340
|
}
|
|
3256
3341
|
}
|
|
3257
|
-
ElementClassPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
3258
|
-
ElementClassPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.
|
|
3259
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
3342
|
+
ElementClassPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ElementClassPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
3343
|
+
ElementClassPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ElementClassPipe, name: "elementClass" });
|
|
3344
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ElementClassPipe, decorators: [{
|
|
3260
3345
|
type: Pipe,
|
|
3261
3346
|
args: [{
|
|
3262
3347
|
name: 'elementClass'
|
|
@@ -3283,9 +3368,9 @@ class TheNumberedListComponent extends TheBaseElementComponent {
|
|
|
3283
3368
|
super.ngOnDestroy();
|
|
3284
3369
|
}
|
|
3285
3370
|
}
|
|
3286
|
-
TheNumberedListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
3287
|
-
TheNumberedListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
3288
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
3371
|
+
TheNumberedListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheNumberedListComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: ElementClassPipe }], target: i0.ɵɵFactoryTarget.Component });
|
|
3372
|
+
TheNumberedListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheNumberedListComponent, selector: "ol[theOl]", host: { properties: { "attr.start": "this.start", "class": "this.class" } }, providers: [ElementClassPipe], usesInheritance: true, ngImport: i0, template: `<slate-children [children]="children" [context]="childrenContext" [viewContext]="viewContext"></slate-children>`, isInline: true, components: [{ type: i1.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }] });
|
|
3373
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheNumberedListComponent, decorators: [{
|
|
3289
3374
|
type: Component,
|
|
3290
3375
|
args: [{
|
|
3291
3376
|
selector: 'ol[theOl]',
|
|
@@ -3317,9 +3402,9 @@ class TheBulletedListComponent extends TheBaseElementComponent {
|
|
|
3317
3402
|
super.ngOnDestroy();
|
|
3318
3403
|
}
|
|
3319
3404
|
}
|
|
3320
|
-
TheBulletedListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
3321
|
-
TheBulletedListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
3322
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
3405
|
+
TheBulletedListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheBulletedListComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: ElementClassPipe }], target: i0.ɵɵFactoryTarget.Component });
|
|
3406
|
+
TheBulletedListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheBulletedListComponent, selector: "ul[theUl]", host: { properties: { "class": "this.class" } }, providers: [ElementClassPipe], usesInheritance: true, ngImport: i0, template: `<slate-children [children]="children" [context]="childrenContext" [viewContext]="viewContext"></slate-children>`, isInline: true, components: [{ type: i1.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }] });
|
|
3407
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheBulletedListComponent, decorators: [{
|
|
3323
3408
|
type: Component,
|
|
3324
3409
|
args: [{
|
|
3325
3410
|
selector: 'ul[theUl]',
|
|
@@ -3342,12 +3427,13 @@ class TheListItemComponent extends TheBaseElementComponent {
|
|
|
3342
3427
|
}
|
|
3343
3428
|
onContextChange() {
|
|
3344
3429
|
super.onContextChange();
|
|
3345
|
-
this.
|
|
3430
|
+
this.addFontSize();
|
|
3431
|
+
this.addMultiDigit();
|
|
3346
3432
|
}
|
|
3347
3433
|
ngOnDestroy() {
|
|
3348
3434
|
super.ngOnDestroy();
|
|
3349
3435
|
}
|
|
3350
|
-
|
|
3436
|
+
addFontSize() {
|
|
3351
3437
|
var _a, _b;
|
|
3352
3438
|
let firstText;
|
|
3353
3439
|
for (const entry of Node.descendants(this.element)) {
|
|
@@ -3382,10 +3468,34 @@ class TheListItemComponent extends TheBaseElementComponent {
|
|
|
3382
3468
|
this.fontSizeClass = null;
|
|
3383
3469
|
}
|
|
3384
3470
|
}
|
|
3471
|
+
getStart() {
|
|
3472
|
+
const parent = this.elementRef.nativeElement.closest('.slate-element-numbered-list');
|
|
3473
|
+
const start = (parent === null || parent === void 0 ? void 0 : parent.getAttribute('start')) || 1;
|
|
3474
|
+
return Number(start);
|
|
3475
|
+
}
|
|
3476
|
+
getLiIndex() {
|
|
3477
|
+
const path = findPath(this.editor, this.element);
|
|
3478
|
+
const index = path[path.length - 1];
|
|
3479
|
+
return index || 0;
|
|
3480
|
+
}
|
|
3481
|
+
addMultiDigit() {
|
|
3482
|
+
const start = this.getStart();
|
|
3483
|
+
const index = this.getLiIndex();
|
|
3484
|
+
const multiDigit = 'data-multi-digit';
|
|
3485
|
+
// start number + index
|
|
3486
|
+
// when it is greater than 9, it is a multi-digit serial number
|
|
3487
|
+
// exclude Font size >= 20
|
|
3488
|
+
if (start + index > 9) {
|
|
3489
|
+
this.elementRef.nativeElement.setAttribute(multiDigit, true);
|
|
3490
|
+
}
|
|
3491
|
+
else {
|
|
3492
|
+
this.elementRef.nativeElement.removeAttribute(multiDigit);
|
|
3493
|
+
}
|
|
3494
|
+
}
|
|
3385
3495
|
}
|
|
3386
|
-
TheListItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
3387
|
-
TheListItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
3388
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
3496
|
+
TheListItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheListItemComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
3497
|
+
TheListItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheListItemComponent, selector: "li[theLi]", usesInheritance: true, ngImport: i0, template: `<slate-children [children]="children" [context]="childrenContext" [viewContext]="viewContext"></slate-children>`, isInline: true, components: [{ type: i1.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }] });
|
|
3498
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheListItemComponent, decorators: [{
|
|
3389
3499
|
type: Component,
|
|
3390
3500
|
args: [{
|
|
3391
3501
|
selector: 'li[theLi]',
|
|
@@ -3706,14 +3816,14 @@ class TheTodoItemComponent extends TheBaseElementComponent {
|
|
|
3706
3816
|
}
|
|
3707
3817
|
}
|
|
3708
3818
|
}
|
|
3709
|
-
TheTodoItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
3710
|
-
TheTodoItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
3819
|
+
TheTodoItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheTodoItemComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
3820
|
+
TheTodoItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheTodoItemComponent, selector: "div[theTodoItem]", host: { properties: { "class.the-check-item": "this.checkItemClass" } }, usesInheritance: true, ngImport: i0, template: `
|
|
3711
3821
|
<span contenteditable="false" class="todo-item-status">
|
|
3712
3822
|
<input #checkbox type="checkbox" [checked]="element.checked" (click)="onCheck(checkbox.checked)" />
|
|
3713
3823
|
</span>
|
|
3714
3824
|
<slate-children [children]="children" [context]="childrenContext" [viewContext]="viewContext"></slate-children>
|
|
3715
3825
|
`, isInline: true, components: [{ type: i1.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }] });
|
|
3716
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
3826
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheTodoItemComponent, decorators: [{
|
|
3717
3827
|
type: Component,
|
|
3718
3828
|
args: [{
|
|
3719
3829
|
selector: 'div[theTodoItem]',
|
|
@@ -3799,14 +3909,14 @@ class TheHrComponent extends TheBaseElementComponent {
|
|
|
3799
3909
|
});
|
|
3800
3910
|
}
|
|
3801
3911
|
}
|
|
3802
|
-
TheHrComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
3803
|
-
TheHrComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
3912
|
+
TheHrComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheHrComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
3913
|
+
TheHrComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheHrComponent, selector: "the-hr, [theHr]", usesInheritance: true, ngImport: i0, template: `
|
|
3804
3914
|
<div class="the-hr" contenteditable="false" [ngClass]="{ active: selection }">
|
|
3805
3915
|
<hr class="the-hr" />
|
|
3806
3916
|
<slate-children [children]="children" [context]="childrenContext" [viewContext]="viewContext"></slate-children>
|
|
3807
3917
|
</div>
|
|
3808
3918
|
`, isInline: true, components: [{ type: i1.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }], directives: [{ type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
3809
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
3919
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheHrComponent, decorators: [{
|
|
3810
3920
|
type: Component,
|
|
3811
3921
|
args: [{
|
|
3812
3922
|
selector: 'the-hr, [theHr]',
|
|
@@ -3999,7 +4109,7 @@ const autoFormatBlock = (editor, type, at, { preFormat, format }, markups) => {
|
|
|
3999
4109
|
}
|
|
4000
4110
|
};
|
|
4001
4111
|
|
|
4002
|
-
const autoFormatInline = (editor, { type, between, markup, ignoreTrim }) => {
|
|
4112
|
+
const autoFormatInline = (editor, { type, between, markup, ignoreTrim, format }) => {
|
|
4003
4113
|
const selection = editor.selection;
|
|
4004
4114
|
const startMarkup = between ? between[0] : markup;
|
|
4005
4115
|
const endMarkup = between ? between[1] : '';
|
|
@@ -4043,22 +4153,35 @@ const autoFormatInline = (editor, { type, between, markup, ignoreTrim }) => {
|
|
|
4043
4153
|
}
|
|
4044
4154
|
});
|
|
4045
4155
|
}
|
|
4046
|
-
// add mark to the text between the markups
|
|
4047
|
-
Transforms.select(editor, markupRange);
|
|
4048
|
-
editor.addMark(type, true);
|
|
4049
|
-
Transforms.collapse(editor, { edge: 'end' });
|
|
4050
|
-
editor.removeMark(type, false);
|
|
4051
|
-
// delete start markup
|
|
4052
4156
|
const startMarkupPointBefore = getPointBefore(editor, selection, {
|
|
4053
4157
|
matchString: startMarkup,
|
|
4054
4158
|
skipInvalid: true
|
|
4055
4159
|
});
|
|
4056
|
-
|
|
4057
|
-
|
|
4058
|
-
|
|
4059
|
-
|
|
4060
|
-
|
|
4061
|
-
|
|
4160
|
+
if (format) {
|
|
4161
|
+
const markupText = getText(editor, markupRange);
|
|
4162
|
+
format(editor, markupText);
|
|
4163
|
+
// delete start to end selection
|
|
4164
|
+
Transforms.delete(editor, {
|
|
4165
|
+
at: {
|
|
4166
|
+
anchor: startMarkupPointBefore,
|
|
4167
|
+
focus: selection.anchor
|
|
4168
|
+
}
|
|
4169
|
+
});
|
|
4170
|
+
}
|
|
4171
|
+
else {
|
|
4172
|
+
// add mark to the text between the markups
|
|
4173
|
+
Transforms.select(editor, markupRange);
|
|
4174
|
+
editor.addMark(type, true);
|
|
4175
|
+
Transforms.collapse(editor, { edge: 'end' });
|
|
4176
|
+
editor.removeMark(type, false);
|
|
4177
|
+
// delete start markup
|
|
4178
|
+
Transforms.delete(editor, {
|
|
4179
|
+
at: {
|
|
4180
|
+
anchor: startMarkupPointBefore,
|
|
4181
|
+
focus: startMarkupPointAfter
|
|
4182
|
+
}
|
|
4183
|
+
});
|
|
4184
|
+
}
|
|
4062
4185
|
return true;
|
|
4063
4186
|
};
|
|
4064
4187
|
|
|
@@ -4131,6 +4254,7 @@ const withAutoFormat = ({ rules }) => (editor) => {
|
|
|
4131
4254
|
type,
|
|
4132
4255
|
between,
|
|
4133
4256
|
ignoreTrim,
|
|
4257
|
+
format,
|
|
4134
4258
|
markup: Array.isArray(markup) ? markup[0] : markup
|
|
4135
4259
|
})) {
|
|
4136
4260
|
return valid();
|
|
@@ -4449,7 +4573,7 @@ const withBlockCard = (editor) => {
|
|
|
4449
4573
|
};
|
|
4450
4574
|
|
|
4451
4575
|
const withMoveSelection = (editor) => {
|
|
4452
|
-
const { onClick, deleteBackward } = editor;
|
|
4576
|
+
const { onClick, deleteBackward, onKeydown } = editor;
|
|
4453
4577
|
editor.onClick = (event) => {
|
|
4454
4578
|
const domSelection = window.getSelection();
|
|
4455
4579
|
if (domSelection && !domSelection.isCollapsed && event.detail >= 2 && editor.selection) {
|
|
@@ -5044,7 +5168,7 @@ function insertRow(opts, editor, count = 1, at // row index
|
|
|
5044
5168
|
/**
|
|
5045
5169
|
* Insert a new table
|
|
5046
5170
|
*/
|
|
5047
|
-
function insertTable(opts, editor,
|
|
5171
|
+
function insertTable(opts, editor, rows = 3, columns = 3, getCellContent) {
|
|
5048
5172
|
const { selection } = editor;
|
|
5049
5173
|
if (!(selection === null || selection === void 0 ? void 0 : selection.anchor)) {
|
|
5050
5174
|
return;
|
|
@@ -5457,14 +5581,6 @@ const MarkOptions = [
|
|
|
5457
5581
|
shortcutKey: `${CONTROL_KEY}+U`,
|
|
5458
5582
|
execute: editor => MarkEditor.toggleMark(editor, MarkTypes.underline),
|
|
5459
5583
|
active: editor => MarkEditor.isMarkActive(editor, MarkTypes.underline)
|
|
5460
|
-
},
|
|
5461
|
-
{
|
|
5462
|
-
key: MarkTypes.codeLine,
|
|
5463
|
-
icon: 'code',
|
|
5464
|
-
name: '行内代码',
|
|
5465
|
-
shortcutKey: `${CONTROL_KEY}+E`,
|
|
5466
|
-
execute: editor => MarkEditor.toggleMark(editor, MarkTypes.codeLine),
|
|
5467
|
-
active: editor => MarkEditor.isMarkActive(editor, MarkTypes.codeLine)
|
|
5468
5584
|
}
|
|
5469
5585
|
];
|
|
5470
5586
|
|
|
@@ -5676,9 +5792,9 @@ class TheBlockquoteComponent extends TheBaseElementComponent {
|
|
|
5676
5792
|
this.cdr = cdr;
|
|
5677
5793
|
}
|
|
5678
5794
|
}
|
|
5679
|
-
TheBlockquoteComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
5680
|
-
TheBlockquoteComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
5681
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
5795
|
+
TheBlockquoteComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheBlockquoteComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
5796
|
+
TheBlockquoteComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheBlockquoteComponent, selector: "blockquote[theBlockquote]", usesInheritance: true, ngImport: i0, template: `<slate-children [children]="children" [context]="childrenContext" [viewContext]="viewContext"></slate-children>`, isInline: true, components: [{ type: i1.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }] });
|
|
5797
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheBlockquoteComponent, decorators: [{
|
|
5682
5798
|
type: Component,
|
|
5683
5799
|
args: [{
|
|
5684
5800
|
selector: 'blockquote[theBlockquote]',
|
|
@@ -5870,9 +5986,9 @@ class TheColorSelectComponent {
|
|
|
5870
5986
|
this.popoverRef.close();
|
|
5871
5987
|
}
|
|
5872
5988
|
}
|
|
5873
|
-
TheColorSelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
5874
|
-
TheColorSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
5875
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
5989
|
+
TheColorSelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheColorSelectComponent, deps: [{ token: i1$3.ThyPopoverRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
5990
|
+
TheColorSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", 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", components: [{ type: i4$1.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }], directives: [{ type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i6.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i5.ThyInputDirective, selector: "[thyInput]", inputs: ["thySize", "thyAutocomplete"] }, { type: i4$2.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { type: i4$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
5991
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheColorSelectComponent, decorators: [{
|
|
5876
5992
|
type: Component,
|
|
5877
5993
|
args: [{
|
|
5878
5994
|
selector: 'the-color-select',
|
|
@@ -5939,9 +6055,9 @@ class TheColorSelectService {
|
|
|
5939
6055
|
}
|
|
5940
6056
|
}
|
|
5941
6057
|
}
|
|
5942
|
-
TheColorSelectService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
5943
|
-
TheColorSelectService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
5944
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
6058
|
+
TheColorSelectService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheColorSelectService, deps: [{ token: i1$3.ThyPopover }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
6059
|
+
TheColorSelectService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheColorSelectService });
|
|
6060
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheColorSelectService, decorators: [{
|
|
5945
6061
|
type: Injectable
|
|
5946
6062
|
}], ctorParameters: function () { return [{ type: i1$3.ThyPopover }]; } });
|
|
5947
6063
|
|
|
@@ -5998,9 +6114,9 @@ class TheToolbarBaseItemComponent {
|
|
|
5998
6114
|
}
|
|
5999
6115
|
}
|
|
6000
6116
|
}
|
|
6001
|
-
TheToolbarBaseItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
6002
|
-
TheToolbarBaseItemComponent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.
|
|
6003
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
6117
|
+
TheToolbarBaseItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheToolbarBaseItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
6118
|
+
TheToolbarBaseItemComponent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.15", type: TheToolbarBaseItemComponent, ngImport: i0 });
|
|
6119
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheToolbarBaseItemComponent, decorators: [{
|
|
6004
6120
|
type: Directive
|
|
6005
6121
|
}] });
|
|
6006
6122
|
|
|
@@ -6062,8 +6178,8 @@ class TheColorToolbarItemComponent extends TheToolbarBaseItemComponent {
|
|
|
6062
6178
|
}
|
|
6063
6179
|
}
|
|
6064
6180
|
}
|
|
6065
|
-
TheColorToolbarItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
6066
|
-
TheColorToolbarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
6181
|
+
TheColorToolbarItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheColorToolbarItemComponent, deps: [{ token: i1$3.ThyPopover }], target: i0.ɵɵFactoryTarget.Component });
|
|
6182
|
+
TheColorToolbarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheColorToolbarItemComponent, selector: "the-color-toolbar-item", inputs: { item: "item", editor: "editor" }, host: { classAttribute: "the-toolbar-item" }, usesInheritance: true, ngImport: i0, template: `
|
|
6067
6183
|
<a
|
|
6068
6184
|
class="link-width-down"
|
|
6069
6185
|
thyIconNavLink
|
|
@@ -6086,7 +6202,7 @@ TheColorToolbarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12
|
|
|
6086
6202
|
></thy-icon>
|
|
6087
6203
|
</a>
|
|
6088
6204
|
`, isInline: true, components: [{ type: i3.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i4$1.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }], directives: [{ type: i6.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i5$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
6089
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
6205
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheColorToolbarItemComponent, decorators: [{
|
|
6090
6206
|
type: Component,
|
|
6091
6207
|
args: [{
|
|
6092
6208
|
selector: 'the-color-toolbar-item',
|
|
@@ -6360,9 +6476,9 @@ class TheToolbarDropdownComponent extends TheToolbarBaseItemComponent {
|
|
|
6360
6476
|
.withPositions([bottomPosition, topPosition]);
|
|
6361
6477
|
}
|
|
6362
6478
|
}
|
|
6363
|
-
TheToolbarDropdownComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
6364
|
-
TheToolbarDropdownComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
6365
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
6479
|
+
TheToolbarDropdownComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheToolbarDropdownComponent, deps: [{ token: i0.ElementRef }, { token: i1$3.ThyPopover }, { token: i0.ViewContainerRef }, { token: i2.Overlay }], target: i0.ɵɵFactoryTarget.Component });
|
|
6480
|
+
TheToolbarDropdownComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheToolbarDropdownComponent, selector: "the-toolbar-dropdown", inputs: { toolbarItem: "toolbarItem", menus: "menus", mode: "mode", item: "item", itemMousedownHandle: "itemMousedownHandle" }, host: { listeners: { "mousedown": "toggleDropdown($event)", "document: mousedown": "handleDocumentMouseDown($event)" }, properties: { "class.disabled": "this.disabledState" }, classAttribute: "the-toolbar-dropdown-container" }, 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: "<ng-template [ngTemplateOutlet]=\"template\"></ng-template>\n\n<ng-template #iconModeTemplate>\n <a thyIconNavLink class=\"icon-mode link-with-down\" [thyTooltip]=\"activeMenu?.name\" thyTooltipPlacement=\"top\">\n <thy-icon [thyIconName]=\"activeMenu?.icon\"></thy-icon>\n <thy-icon class=\"caret-down-icon font-size-sm text-desc\" thyIconName=\"caret-down\"></thy-icon>\n </a>\n</ng-template>\n\n<ng-template #textModeTemplate>\n <a thyIconNavLink class=\"text-mode\" [thyTooltip]=\"activeMenu?.name\" thyTooltipPlacement=\"top\">\n <span class=\"show-text\">{{ activeMenu?.name }}</span>\n <thy-icon class=\"text-caret-down-icon font-size-sm text-desc\" thyIconName=\"caret-down\"></thy-icon>\n </a>\n</ng-template>\n\n<ng-template #dropdownTemplate>\n <thy-action-menu class=\"dropdown\">\n <ng-container *ngFor=\"let menu of menus\">\n <a\n *ngIf=\"menu.key !== 'split'\"\n thyActionMenuItem\n href=\"javascript:;\"\n [thyActionMenuItemActive]=\"menu.key === activeMenu.key\"\n (mousedown)=\"itemMousedown($event, menu)\"\n [ngStyle]=\"menu?.styles\"\n >\n <span *ngIf=\"menu.icon && mode === dropdownMode.icon\" thyActionMenuItemIcon>\n <thy-icon [thyIconName]=\"menu.icon\"></thy-icon>\n </span>\n <span *ngIf=\"menu.name\" thyActionMenuItemName>{{ menu.name }}</span>\n </a>\n <thy-action-menu-divider *ngIf=\"menu.key === 'split'\"></thy-action-menu-divider>\n </ng-container>\n </thy-action-menu>\n</ng-template>\n", components: [{ type: i3.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i4$1.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { type: i5$2.ThyActionMenuComponent, selector: "thy-action-menu", inputs: ["thyTheme", "thyWidth"] }, { type: i5$2.ThyActionMenuDividerComponent, selector: "thy-action-menu-divider", inputs: ["thyTitle", "thyType"] }], directives: [{ type: i6.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i5$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5$2.ThyActionMenuItemDirective, selector: "[thyActionMenuItem]", inputs: ["thyDisabled", "thyType"] }, { type: i5$2.ThyActionMenuItemActiveDirective, selector: "[thyActionMenuItemActive]", inputs: ["thyActionMenuItemActive"] }, { type: i6.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i5$2.ThyActionMenuItemIconDirective, selector: "[thyActionMenuItemIcon]" }, { type: i5$2.ThyActionMenuItemNameDirective, selector: "[thyActionMenuItemName]" }] });
|
|
6481
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheToolbarDropdownComponent, decorators: [{
|
|
6366
6482
|
type: Component,
|
|
6367
6483
|
args: [{
|
|
6368
6484
|
selector: 'the-toolbar-dropdown',
|
|
@@ -6414,9 +6530,9 @@ class NavSplitLineComponent {
|
|
|
6414
6530
|
}
|
|
6415
6531
|
ngOnInit() { }
|
|
6416
6532
|
}
|
|
6417
|
-
NavSplitLineComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
6418
|
-
NavSplitLineComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
6419
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
6533
|
+
NavSplitLineComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: NavSplitLineComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6534
|
+
NavSplitLineComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: NavSplitLineComponent, selector: "nav-split-line", inputs: { mode: "mode" }, host: { properties: { "class.the-nav-split-line": "this.theNavSplitLine", "class.horizontal": "this.horizontal", "class.vertical": "this.vertical" } }, ngImport: i0, template: '', isInline: true });
|
|
6535
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: NavSplitLineComponent, decorators: [{
|
|
6420
6536
|
type: Component,
|
|
6421
6537
|
args: [{
|
|
6422
6538
|
selector: 'nav-split-line',
|
|
@@ -6450,8 +6566,9 @@ class TheCodeComponent extends TheBaseElementComponent {
|
|
|
6450
6566
|
this.menus = CODE_MODES.map(item => {
|
|
6451
6567
|
return { key: item.value, name: item.showName };
|
|
6452
6568
|
});
|
|
6569
|
+
this.destroy$ = new Subject();
|
|
6453
6570
|
this.ToolbarItemMode = ToolbarItemMode;
|
|
6454
|
-
this.
|
|
6571
|
+
this.isHightLight = false;
|
|
6455
6572
|
this.resizeHeight = null;
|
|
6456
6573
|
this.options = {
|
|
6457
6574
|
mode: this.menus[0].key,
|
|
@@ -6488,13 +6605,21 @@ class TheCodeComponent extends TheBaseElementComponent {
|
|
|
6488
6605
|
if (this.resizeHeight !== this.element.height) {
|
|
6489
6606
|
this.useHeight();
|
|
6490
6607
|
}
|
|
6491
|
-
if (!this.isCollapsed) {
|
|
6492
|
-
this.isFocusCode = false;
|
|
6493
|
-
}
|
|
6494
6608
|
}
|
|
6495
6609
|
}
|
|
6496
6610
|
ngOnInit() {
|
|
6497
6611
|
super.ngOnInit();
|
|
6612
|
+
this.ngZone.runOutsideAngular(() => {
|
|
6613
|
+
fromEvent(this.nativeElement, 'mousedown')
|
|
6614
|
+
.pipe(takeUntil(this.destroy$))
|
|
6615
|
+
.subscribe(event => {
|
|
6616
|
+
event.stopPropagation();
|
|
6617
|
+
const isBlockOperation = this.isCollapsed &&
|
|
6618
|
+
this.nativeElement.querySelector('.the-code-block-operation').contains(event.target);
|
|
6619
|
+
const isCodemirror = this.nativeElement.querySelector('.ng-codemirror').contains(event.target);
|
|
6620
|
+
this.isHightLight = !isCodemirror && !isBlockOperation;
|
|
6621
|
+
});
|
|
6622
|
+
});
|
|
6498
6623
|
this.elementRef.nativeElement.classList.add('the-code-container');
|
|
6499
6624
|
}
|
|
6500
6625
|
ngAfterViewInit() {
|
|
@@ -6536,11 +6661,11 @@ class TheCodeComponent extends TheBaseElementComponent {
|
|
|
6536
6661
|
}
|
|
6537
6662
|
}
|
|
6538
6663
|
codeChange($event) {
|
|
6664
|
+
this.isHightLight = false;
|
|
6539
6665
|
CodeEditor.setCodeAttribute(this.editor, this.element, { content: $event });
|
|
6540
6666
|
}
|
|
6541
6667
|
onDelete(event) {
|
|
6542
6668
|
event.preventDefault();
|
|
6543
|
-
this.isFocusCode = false;
|
|
6544
6669
|
deleteElement(this.editor, this.element);
|
|
6545
6670
|
}
|
|
6546
6671
|
onCopy(event) {
|
|
@@ -6558,8 +6683,9 @@ class TheCodeComponent extends TheBaseElementComponent {
|
|
|
6558
6683
|
AngularEditor.deselect(this.editor);
|
|
6559
6684
|
}
|
|
6560
6685
|
focusChange(codeMirrorFocused) {
|
|
6561
|
-
if (codeMirrorFocused)
|
|
6562
|
-
this.
|
|
6686
|
+
if (codeMirrorFocused) {
|
|
6687
|
+
this.isHightLight = false;
|
|
6688
|
+
}
|
|
6563
6689
|
}
|
|
6564
6690
|
useMode() {
|
|
6565
6691
|
this.options = Object.assign(Object.assign({}, this.options), { mode: this.element.language });
|
|
@@ -6586,13 +6712,18 @@ class TheCodeComponent extends TheBaseElementComponent {
|
|
|
6586
6712
|
CodeEditor.setCodeAttribute(this.editor, this.element, { height: this.resizeHeight });
|
|
6587
6713
|
}
|
|
6588
6714
|
onChangeWrap(value) {
|
|
6715
|
+
this.isHightLight = false;
|
|
6589
6716
|
this.options = Object.assign(Object.assign({}, this.options), { lineWrapping: value || false });
|
|
6590
6717
|
CodeEditor.setCodeAttribute(this.editor, this.element, { autoWrap: value ? value : null });
|
|
6591
6718
|
}
|
|
6719
|
+
ngOnDestroy() {
|
|
6720
|
+
this.destroy$.next();
|
|
6721
|
+
this.destroy$.complete();
|
|
6722
|
+
}
|
|
6592
6723
|
}
|
|
6593
|
-
TheCodeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
6594
|
-
TheCodeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
6595
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
6724
|
+
TheCodeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheCodeComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i1$4.ThyNotifyService }, { token: TheContextService }, { token: i0.NgZone }, { token: THE_CODE_MODE_TOKEN }], target: i0.ɵɵFactoryTarget.Component });
|
|
6725
|
+
TheCodeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheCodeComponent, selector: "div[theCode]", viewQueries: [{ propertyName: "codemirror", first: true, predicate: ["codemirror"], descendants: true, read: CodeMirrorComponent }], usesInheritance: true, ngImport: i0, template: "<div contenteditable=\"false\" class=\"the-code-block-operation\" *ngIf=\"isCollapsed && codemirror && !options.readOnly\">\n <thy-icon-nav>\n <the-toolbar-dropdown [menus]=\"menus\" [item]=\"actives\" [itemMousedownHandle]=\"onChangeLangulage\"> </the-toolbar-dropdown>\n <a\n href=\"javascript:;\"\n thyIconNavLink\n thyIconNavLinkIcon=\"copy\"\n thyTooltip=\"\u590D\u5236\"\n thyTooltipPlacement=\"top\"\n (mousedown)=\"onCopy($event)\"\n ></a>\n <a\n href=\"javascript:;\"\n thyIconNavLink\n thyIconNavLinkIcon=\"trash\"\n thyTooltip=\"\u5220\u9664\"\n class=\"remove-link\"\n thyTooltipPlacement=\"top\"\n (mousedown)=\"onDelete($event)\"\n ></a>\n <nav-split-line [mode]=\"ToolbarItemMode.vertical\"></nav-split-line>\n <span class=\"auto-wrap d-flex align-items-center\">\n <span>\u81EA\u52A8\u6362\u884C</span>\n <thy-switch\n class=\"auto-wrap-btn d-flex\"\n [(ngModel)]=\"options.lineWrapping\"\n (ngModelChange)=\"onChangeWrap($event)\"\n thySize=\"sm\"\n ></thy-switch>\n </span>\n </thy-icon-nav>\n</div>\n\n<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: isCollapsed, readonly: options.readOnly, active: isHightLight && isCollapsed }\"\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=\"isCollapsed && !options.readOnly\"></thy-resize-handle>\n</div>\n", components: [{ type: i3.ThyIconNavComponent, selector: "thy-icon-nav", inputs: ["thyType"] }, { type: TheToolbarDropdownComponent, selector: "the-toolbar-dropdown", inputs: ["toolbarItem", "menus", "mode", "item", "itemMousedownHandle"] }, { type: i3.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: NavSplitLineComponent, selector: "nav-split-line", inputs: ["mode"] }, { type: i6$1.ThySwitchComponent, selector: "thy-switch", inputs: ["thyType", "thySize", "thyDisabled"], outputs: ["thyChange"] }, { type: i1.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }, { type: i8.CodeMirrorComponent, selector: "ng-codemirror, [ngCodeMirror]", inputs: ["autoMaxHeight", "delayRefreshTime", "options"], outputs: ["focusChange"] }, { type: i9.ThyResizeHandleComponent, selector: "thy-resize-handle, [thy-resize-handle]", inputs: ["thyDirection"], outputs: ["thyMouseDown"], exportAs: ["thyResizeHandle"] }], directives: [{ type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { type: i4$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i9.ThyResizableDirective, selector: "[thyResizable]", inputs: ["thyBounds", "thyMaxHeight", "thyMaxWidth", "thyMinHeight", "thyMinWidth", "thyGridColumnCount", "thyMaxColumn", "thyMinColumn", "thyLockAspectRatio", "thyPreview", "thyDisabled"], outputs: ["thyResize", "thyResizeEnd", "thyResizeStart"] }, { type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i6.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
6726
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheCodeComponent, decorators: [{
|
|
6596
6727
|
type: Component,
|
|
6597
6728
|
args: [{
|
|
6598
6729
|
selector: 'div[theCode]',
|
|
@@ -6727,9 +6858,9 @@ class TheLinkHoverComponent {
|
|
|
6727
6858
|
event.stopPropagation();
|
|
6728
6859
|
}
|
|
6729
6860
|
}
|
|
6730
|
-
TheLinkHoverComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
6731
|
-
TheLinkHoverComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
6732
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
6861
|
+
TheLinkHoverComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheLinkHoverComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6862
|
+
TheLinkHoverComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheLinkHoverComponent, selector: "the-link-hover", inputs: { link: "link", dom: "dom", editHandle: "editHandle", deleteHandle: "deleteHandle" }, ngImport: i0, template: "<div class=\"link-hover-card\">\n <a readonly href=\"{{ link }}\" target=\"_blank\" rel=\"{{ aTagRelAttr }}\" class=\"hover-control-plaintext text-truncate\">\n {{ link }}\n </a>\n <span class=\"operate-separator\"></span>\n <button thyButtonIcon=\"edit\" thySize=\"xs\" (mousedown)=\"editLink($event)\"></button>\n <span class=\"operate-separator\"></span>\n <button thyButtonIcon=\"unlink-insert\" thySize=\"xs\" (mousedown)=\"removeLink($event)\"></button>\n</div>\n", components: [{ type: i1$5.ThyButtonIconComponent, selector: "thy-button-icon,[thy-button-icon],[thyButtonIcon]", inputs: ["thySize", "thyIcon", "thyButtonIcon", "thyShape", "thyLight", "thyActive", "thyTheme", "thyColor"] }] });
|
|
6863
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheLinkHoverComponent, decorators: [{
|
|
6733
6864
|
type: Component,
|
|
6734
6865
|
args: [{
|
|
6735
6866
|
selector: 'the-link-hover',
|
|
@@ -6814,9 +6945,9 @@ class TheLinkEditComponent {
|
|
|
6814
6945
|
}
|
|
6815
6946
|
}
|
|
6816
6947
|
}
|
|
6817
|
-
TheLinkEditComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
6818
|
-
TheLinkEditComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
6819
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
6948
|
+
TheLinkEditComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheLinkEditComponent, deps: [{ token: i1$3.ThyPopoverRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
6949
|
+
TheLinkEditComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", 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\n thyForm\n #linkForm=\"thyForm\"\n [thyFormValidatorConfig]=\"validatorConfig\"\n name=\"linkForm\"\n>\n <thy-form-group thyLabelText=\"\u6587\u672C\">\n <input\n thyInput\n placeholder=\"\u8BF7\u8F93\u5165\u6587\u672C\"\n required\n name=\"text\"\n [(ngModel)]=\"text\"\n thyAutofocus\n type=\"text\"\n />\n </thy-form-group>\n <thy-form-group thyLabelText=\"\u94FE\u63A5\">\n <input\n name=\"link\"\n thyInput\n placeholder=\"\u8BF7\u8F93\u5165\u94FE\u63A5\"\n required\n type=\"text\"\n #linkControl=\"ngModel\"\n [(ngModel)]=\"link\"\n />\n </thy-form-group>\n <thy-form-group-footer>\n <div class=\"btn-pair\">\n <button\n thyButton=\"link-secondary\"\n thySize=\"sm\"\n (click)=\"closePopover()\"\n >\u53D6\u6D88</button>\n <button\n thyButton=\"primary-square\"\n thySize=\"sm\"\n (thyFormSubmit)=\"applyLink(linkForm)\"\n >\u5E94\u7528</button>\n </div>\n </thy-form-group-footer>\n</form>\n", components: [{ type: i2$1.ThyFormGroupComponent, selector: "thy-form-group", inputs: ["thyLabelText", "thyLabelTextTranslateKey", "thyLabelRequired", "thyLabelPaddingTopClear", "thyFeedbackIcon", "thyTipsMode", "thyTips", "thyTipsTranslateKey", "thyRowFill"] }, { type: i2$1.ThyFormGroupFooterComponent, selector: "thy-form-group-footer", inputs: ["thyAlign"] }, { type: i1$5.ThyButtonComponent, selector: "thy-button,[thy-button],[thyButton]", inputs: ["thyButton", "thyType", "thyLoading", "thyLoadingText", "thySize", "thyIcon", "thySquare", "thyBlock"] }], directives: [{ type: i4$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i4$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i4$2.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i2$1.ThyFormDirective, selector: "[thyForm],[thy-form]", inputs: ["thyLayout", "thyEnterKeyMode", "thyFormValidatorConfig"], exportAs: ["thyForm"] }, { type: i5$3.ThyAutofocusDirective, selector: "input[thyAutofocus],textarea[thyAutofocus]", inputs: ["thyAutoSelect", "thyAutofocus"] }, { type: i4$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i5.ThyInputDirective, selector: "[thyInput]", inputs: ["thySize", "thyAutocomplete"] }, { type: i4$2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i4$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i2$1.ThyFormSubmitDirective, selector: "[thyFormSubmit],[thy-form-submit]", outputs: ["thyFormSubmit"] }] });
|
|
6950
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheLinkEditComponent, decorators: [{
|
|
6820
6951
|
type: Component,
|
|
6821
6952
|
args: [{
|
|
6822
6953
|
selector: 'the-link-edit',
|
|
@@ -6873,7 +7004,9 @@ class TheBaseLinkComponent extends TheBaseElementComponent {
|
|
|
6873
7004
|
}
|
|
6874
7005
|
}
|
|
6875
7006
|
mousedownHandle(event) {
|
|
6876
|
-
this.
|
|
7007
|
+
if (!this.readonly && !this.editor.disabled) {
|
|
7008
|
+
this.openLinkHover();
|
|
7009
|
+
}
|
|
6877
7010
|
}
|
|
6878
7011
|
openLinkEdit(tag) {
|
|
6879
7012
|
if (this.linkHoverOpened) {
|
|
@@ -6955,9 +7088,9 @@ class TheBaseLinkComponent extends TheBaseElementComponent {
|
|
|
6955
7088
|
this.close(LinkCloseTypes.destroy);
|
|
6956
7089
|
}
|
|
6957
7090
|
}
|
|
6958
|
-
TheBaseLinkComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
6959
|
-
TheBaseLinkComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
6960
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
7091
|
+
TheBaseLinkComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheBaseLinkComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i1$3.ThyPopover }, { token: i2.Overlay }, { token: i0.ViewContainerRef }, { token: i1$6.ThyClickDispatcher }], target: i0.ɵɵFactoryTarget.Component });
|
|
7092
|
+
TheBaseLinkComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheBaseLinkComponent, selector: "[TheBaseLinkComponent]", host: { listeners: { "click": "mousedownHandle($event)" } }, usesInheritance: true, ngImport: i0, template: '', isInline: true });
|
|
7093
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheBaseLinkComponent, decorators: [{
|
|
6961
7094
|
type: Component,
|
|
6962
7095
|
args: [{
|
|
6963
7096
|
selector: '[TheBaseLinkComponent]',
|
|
@@ -6968,21 +7101,33 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImpor
|
|
|
6968
7101
|
args: ['click', ['$event']]
|
|
6969
7102
|
}] } });
|
|
6970
7103
|
class TheLinkComponent extends TheBaseLinkComponent {
|
|
7104
|
+
constructor() {
|
|
7105
|
+
super(...arguments);
|
|
7106
|
+
// Put this at the start and end of an inline component to work around this Chromium bug:
|
|
7107
|
+
// https://bugs.chromium.org/p/chromium/issues/detail?id=1249405
|
|
7108
|
+
this.inlineChromiumBugfix = '$' + String.fromCodePoint(160);
|
|
7109
|
+
}
|
|
6971
7110
|
}
|
|
6972
|
-
TheLinkComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
6973
|
-
TheLinkComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
6974
|
-
|
|
7111
|
+
TheLinkComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheLinkComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
7112
|
+
TheLinkComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheLinkComponent, selector: "span[theLink]", usesInheritance: true, ngImport: i0, template: `
|
|
7113
|
+
<span contenteditable="false" style="font-size: 0;">{{ inlineChromiumBugfix }}</span>
|
|
7114
|
+
<slate-children [children]="children" [context]="childrenContext" [viewContext]="viewContext"></slate-children>
|
|
7115
|
+
<span contenteditable="false" style="font-size: 0;">{{ inlineChromiumBugfix }}</span>`, isInline: true, components: [{ type: i1.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }] });
|
|
7116
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheLinkComponent, decorators: [{
|
|
6975
7117
|
type: Component,
|
|
6976
7118
|
args: [{
|
|
6977
7119
|
selector: 'span[theLink]',
|
|
6978
|
-
template:
|
|
7120
|
+
template: `
|
|
7121
|
+
<span contenteditable="false" style="font-size: 0;">{{ inlineChromiumBugfix }}</span>
|
|
7122
|
+
<slate-children [children]="children" [context]="childrenContext" [viewContext]="viewContext"></slate-children>
|
|
7123
|
+
<span contenteditable="false" style="font-size: 0;">{{ inlineChromiumBugfix }}</span>`
|
|
6979
7124
|
}]
|
|
6980
7125
|
}] });
|
|
6981
7126
|
class TheReadonlyLinkComponent extends TheBaseLinkComponent {
|
|
6982
7127
|
}
|
|
6983
|
-
TheReadonlyLinkComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
6984
|
-
TheReadonlyLinkComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
6985
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
7128
|
+
TheReadonlyLinkComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheReadonlyLinkComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
7129
|
+
TheReadonlyLinkComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheReadonlyLinkComponent, selector: "a[theLink]", host: { attributes: { "target": "_blank" }, properties: { "attr.href": "element.url" } }, usesInheritance: true, ngImport: i0, template: `<slate-children [children]="children" [context]="childrenContext" [viewContext]="viewContext"></slate-children>`, isInline: true, components: [{ type: i1.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }] });
|
|
7130
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheReadonlyLinkComponent, decorators: [{
|
|
6986
7131
|
type: Component,
|
|
6987
7132
|
args: [{
|
|
6988
7133
|
selector: 'a[theLink]',
|
|
@@ -7074,9 +7219,9 @@ class TheTableSelectComponent {
|
|
|
7074
7219
|
}
|
|
7075
7220
|
}
|
|
7076
7221
|
}
|
|
7077
|
-
TheTableSelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
7078
|
-
TheTableSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
7079
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
7222
|
+
TheTableSelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheTableSelectComponent, deps: [{ token: i1$6.ThyPopoverRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
7223
|
+
TheTableSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheTableSelectComponent, selector: "table-select", inputs: { optionsParam: "optionsParam", editor: "editor" }, host: { listeners: { "document: mousedown": "handleDocumentMouseDown($event)" } }, ngImport: i0, template: "<div class=\"table-selector-container\">\n <div\n *ngFor=\"let item of tableData, let rowIndex = index\"\n class=\"selector-row\"\n (mousedown)=\"executeTable($event)\"\n >\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", directives: [{ type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
7224
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheTableSelectComponent, decorators: [{
|
|
7080
7225
|
type: Component,
|
|
7081
7226
|
args: [{
|
|
7082
7227
|
selector: 'table-select',
|
|
@@ -7136,8 +7281,8 @@ class TheTableToolbarItemComponent extends TheToolbarBaseItemComponent {
|
|
|
7136
7281
|
return this.tableSelectRef;
|
|
7137
7282
|
}
|
|
7138
7283
|
}
|
|
7139
|
-
TheTableToolbarItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
7140
|
-
TheTableToolbarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
7284
|
+
TheTableToolbarItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheTableToolbarItemComponent, deps: [{ token: i1$6.ThyPopover }, { token: i2.Overlay }], target: i0.ɵɵFactoryTarget.Component });
|
|
7285
|
+
TheTableToolbarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheTableToolbarItemComponent, selector: "the-table-toolbar-item", inputs: { item: "item", editor: "editor" }, host: { classAttribute: "the-toolbar-dropdown-container" }, usesInheritance: true, ngImport: i0, template: `
|
|
7141
7286
|
<a
|
|
7142
7287
|
thyIconNavLink
|
|
7143
7288
|
class="link-with-down"
|
|
@@ -7150,7 +7295,7 @@ TheTableToolbarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12
|
|
|
7150
7295
|
<thy-icon class="link-down-icon font-size-sm text-desc table-down-icon" thyIconName="caret-down"> </thy-icon>
|
|
7151
7296
|
</a>
|
|
7152
7297
|
`, isInline: true, components: [{ type: i3.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i4$1.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }], directives: [{ type: i5$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }] });
|
|
7153
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
7298
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheTableToolbarItemComponent, decorators: [{
|
|
7154
7299
|
type: Component,
|
|
7155
7300
|
args: [{
|
|
7156
7301
|
selector: 'the-table-toolbar-item',
|
|
@@ -7210,9 +7355,9 @@ class ColumnResizeNotifierSource {
|
|
|
7210
7355
|
this.triggerResize = new Subject();
|
|
7211
7356
|
}
|
|
7212
7357
|
}
|
|
7213
|
-
ColumnResizeNotifierSource.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
7214
|
-
ColumnResizeNotifierSource.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
7215
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
7358
|
+
ColumnResizeNotifierSource.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ColumnResizeNotifierSource, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
7359
|
+
ColumnResizeNotifierSource.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ColumnResizeNotifierSource });
|
|
7360
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ColumnResizeNotifierSource, decorators: [{
|
|
7216
7361
|
type: Injectable
|
|
7217
7362
|
}] });
|
|
7218
7363
|
|
|
@@ -7255,9 +7400,9 @@ class TableCellEventDispatcher {
|
|
|
7255
7400
|
}));
|
|
7256
7401
|
}
|
|
7257
7402
|
}
|
|
7258
|
-
TableCellEventDispatcher.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
7259
|
-
TableCellEventDispatcher.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
7260
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
7403
|
+
TableCellEventDispatcher.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TableCellEventDispatcher, deps: [{ token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
7404
|
+
TableCellEventDispatcher.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TableCellEventDispatcher });
|
|
7405
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TableCellEventDispatcher, decorators: [{
|
|
7261
7406
|
type: Injectable
|
|
7262
7407
|
}], ctorParameters: function () { return [{ type: i0.NgZone }]; } });
|
|
7263
7408
|
|
|
@@ -7813,9 +7958,9 @@ class TableStore {
|
|
|
7813
7958
|
}
|
|
7814
7959
|
}
|
|
7815
7960
|
}
|
|
7816
|
-
TableStore.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
7817
|
-
TableStore.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
7818
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
7961
|
+
TableStore.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TableStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
7962
|
+
TableStore.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TableStore });
|
|
7963
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TableStore, decorators: [{
|
|
7819
7964
|
type: Injectable
|
|
7820
7965
|
}], ctorParameters: function () { return []; } });
|
|
7821
7966
|
|
|
@@ -7969,9 +8114,9 @@ class TheTableToolbarComponent {
|
|
|
7969
8114
|
});
|
|
7970
8115
|
}
|
|
7971
8116
|
}
|
|
7972
|
-
TheTableToolbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
7973
|
-
TheTableToolbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
7974
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
8117
|
+
TheTableToolbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheTableToolbarComponent, deps: [{ token: i0.NgZone }, { token: TheColorSelectService }, { token: i1$3.ThyPopoverRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
8118
|
+
TheTableToolbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheTableToolbarComponent, selector: "the-table-toolbar", inputs: { tableStore: "tableStore", isActiveSelect: "isActiveSelect" }, ngImport: i0, template: "<thy-icon-nav>\n <ng-container *ngFor=\"let item of cellMenuList\">\n <a href=\"javascript:;\" thyIconNavLink *ngIf=\"!item.invisibility\" [thyTooltip]=\"item.name\" (mousedown)=\"item.actionHandle()\">\n <thy-icon [thyIconName]=\"item.icon\"></thy-icon>\n </a>\n </ng-container>\n <nav-split-line *ngIf=\"!isActiveSelect && isShowSplitLine\"></nav-split-line>\n <a href=\"javascript:;\" thyIconNavLink thyTooltip=\"\u5355\u5143\u683C\u80CC\u666F\" (mousedown)=\"openSelectColor($event)\">\n <thy-icon thyIconName=\"background-tt\" thyIconType=\"twotone\" [thyTwotoneColor]=\"selectedColor\"></thy-icon>\n </a>\n <nav-split-line *ngIf=\"deleteIcon\"></nav-split-line>\n <a\n *ngIf=\"deleteIcon\"\n href=\"javascript:;\"\n thyIconNavLink\n [thyTooltip]=\"iconName\"\n class=\"danger\"\n [thyIconNavLinkIcon]=\"deleteIcon\"\n (mousedown)=\"onDelete($event)\"\n (mouseenter)=\"onEnterDelete($event)\"\n (mouseleave)=\"onLeaveDelete($event)\"\n ></a>\n</thy-icon-nav>\n", components: [{ type: i3.ThyIconNavComponent, selector: "thy-icon-nav", inputs: ["thyType"] }, { type: i3.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i4$1.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { type: NavSplitLineComponent, selector: "nav-split-line", inputs: ["mode"] }], directives: [{ type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }] });
|
|
8119
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheTableToolbarComponent, decorators: [{
|
|
7975
8120
|
type: Component,
|
|
7976
8121
|
args: [{
|
|
7977
8122
|
selector: 'the-table-toolbar',
|
|
@@ -8032,9 +8177,9 @@ class TheContextMenuComponent {
|
|
|
8032
8177
|
}
|
|
8033
8178
|
ngOnInit() { }
|
|
8034
8179
|
}
|
|
8035
|
-
TheContextMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
8036
|
-
TheContextMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
8037
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
8180
|
+
TheContextMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheContextMenuComponent, deps: [{ token: i0.ElementRef }, { token: i1$3.ThyPopoverRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
8181
|
+
TheContextMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheContextMenuComponent, selector: "the-contextmenu", inputs: { menuEntities: "menuEntities", actionHandle: "actionHandle", activeHandle: "activeHandle", deactiveHandle: "deactiveHandle" }, host: { listeners: { "document: mousedown": "handleDocumentMouseDown($event)", "mousedown": "handleMouseDown($event)" }, properties: { "class.the-overlay-menu-wrap": "this.wrap" } }, ngImport: i0, template: "<thy-action-menu>\n <ng-container *ngFor=\"let menuItem of menuEntities\">\n <a\n thyActionMenuItem\n href=\"javascript:;\"\n *ngIf=\"!menuItem.invisibility\"\n (mousedown)=\"itemMousedown($event, menuItem)\"\n (mouseenter)=\"itemMouseenter($event, menuItem)\"\n (mouseleave)=\"itemMouseleave($event, menuItem)\"\n >\n <span thyActionMenuItemIcon>\n <thy-icon\n *ngIf=\"menuItem.backgroundColor; else elseIcon\"\n [thyIconName]=\"menuItem.icon\"\n thyIconType=\"twotone\"\n [thyTwotoneColor]=\"menuItem.backgroundColor\"\n ></thy-icon>\n <ng-template #elseIcon>\n <thy-icon [thyIconName]=\"menuItem.icon\"></thy-icon>\n </ng-template>\n </span>\n <span thyActionMenuItemName>{{ menuItem.name }}</span>\n <span *ngIf=\"menuItem.extendIcon\" thyActionMenuItemExtendIcon>\n <thy-icon thyIconName=\"{{ menuItem.extendIcon }}\"></thy-icon>\n </span>\n </a>\n <thy-action-menu-divider *ngIf=\"menuItem.divider\"></thy-action-menu-divider>\n </ng-container>\n</thy-action-menu>\n", components: [{ type: i5$2.ThyActionMenuComponent, selector: "thy-action-menu", inputs: ["thyTheme", "thyWidth"] }, { type: i4$1.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { type: i5$2.ThyActionMenuDividerComponent, selector: "thy-action-menu-divider", inputs: ["thyTitle", "thyType"] }], directives: [{ type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5$2.ThyActionMenuItemDirective, selector: "[thyActionMenuItem]", inputs: ["thyDisabled", "thyType"] }, { type: i5$2.ThyActionMenuItemIconDirective, selector: "[thyActionMenuItemIcon]" }, { type: i5$2.ThyActionMenuItemNameDirective, selector: "[thyActionMenuItemName]" }, { type: i5$2.ThyActionMenuItemExtendIconDirective, selector: "[thyActionMenuItemExtendIcon]" }] });
|
|
8182
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheContextMenuComponent, decorators: [{
|
|
8038
8183
|
type: Component,
|
|
8039
8184
|
args: [{
|
|
8040
8185
|
selector: 'the-contextmenu',
|
|
@@ -8231,9 +8376,9 @@ class TheTableContextMenuService {
|
|
|
8231
8376
|
}
|
|
8232
8377
|
}
|
|
8233
8378
|
}
|
|
8234
|
-
TheTableContextMenuService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
8235
|
-
TheTableContextMenuService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
8236
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
8379
|
+
TheTableContextMenuService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheTableContextMenuService, deps: [{ token: TheColorSelectService }, { token: TableStore }, { token: i1$3.ThyPopover }, { token: i0.NgZone }, { token: TheContextService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
8380
|
+
TheTableContextMenuService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheTableContextMenuService });
|
|
8381
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheTableContextMenuService, decorators: [{
|
|
8237
8382
|
type: Injectable
|
|
8238
8383
|
}], ctorParameters: function () { return [{ type: TheColorSelectService }, { type: TableStore }, { type: i1$3.ThyPopover }, { type: i0.NgZone }, { type: TheContextService }]; } });
|
|
8239
8384
|
|
|
@@ -8322,9 +8467,9 @@ class TableService {
|
|
|
8322
8467
|
});
|
|
8323
8468
|
}
|
|
8324
8469
|
}
|
|
8325
|
-
TableService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
8326
|
-
TableService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
8327
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
8470
|
+
TableService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TableService, deps: [{ token: i1$3.ThyPopover }, { token: i2.Overlay }, { token: TableStore }, { token: TheTableContextMenuService }, { token: i0.NgZone }, { token: TheContextService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
8471
|
+
TableService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TableService });
|
|
8472
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TableService, decorators: [{
|
|
8328
8473
|
type: Injectable
|
|
8329
8474
|
}], ctorParameters: function () { return [{ type: i1$3.ThyPopover }, { type: i2.Overlay }, { type: TableStore }, { type: TheTableContextMenuService }, { type: i0.NgZone }, { type: TheContextService }]; } });
|
|
8330
8475
|
|
|
@@ -8404,9 +8549,9 @@ class TheInsertMarkComponent {
|
|
|
8404
8549
|
}
|
|
8405
8550
|
ngOnDestroy() { }
|
|
8406
8551
|
}
|
|
8407
|
-
TheInsertMarkComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
8408
|
-
TheInsertMarkComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
8409
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
8552
|
+
TheInsertMarkComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheInsertMarkComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
8553
|
+
TheInsertMarkComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheInsertMarkComponent, selector: "the-table-insert-mark", inputs: { type: "type", at: "at", tableStore: "tableStore" }, 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", directives: [{ type: i5$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
|
|
8554
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheInsertMarkComponent, decorators: [{
|
|
8410
8555
|
type: Component,
|
|
8411
8556
|
args: [{
|
|
8412
8557
|
selector: 'the-table-insert-mark',
|
|
@@ -8504,9 +8649,9 @@ class TheColumnResizeDirective {
|
|
|
8504
8649
|
this.destroyed.complete();
|
|
8505
8650
|
}
|
|
8506
8651
|
}
|
|
8507
|
-
TheColumnResizeDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
8508
|
-
TheColumnResizeDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.
|
|
8509
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
8652
|
+
TheColumnResizeDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheColumnResizeDirective, deps: [{ token: i0.ElementRef }, { token: i0.ViewContainerRef }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: TableCellEventDispatcher }, { token: ColumnResizeNotifierSource }, { token: TheTableToken }], target: i0.ɵɵFactoryTarget.Directive });
|
|
8653
|
+
TheColumnResizeDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.15", type: TheColumnResizeDirective, selector: "div[theColumnResize]", ngImport: i0 });
|
|
8654
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheColumnResizeDirective, decorators: [{
|
|
8510
8655
|
type: Directive,
|
|
8511
8656
|
args: [{
|
|
8512
8657
|
selector: 'div[theColumnResize]'
|
|
@@ -8875,8 +9020,8 @@ class TheTableComponent extends TheBaseElementComponent {
|
|
|
8875
9020
|
this.destroy$.complete();
|
|
8876
9021
|
}
|
|
8877
9022
|
}
|
|
8878
|
-
TheTableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
8879
|
-
TheTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
9023
|
+
TheTableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheTableComponent, deps: [{ token: i0.ElementRef }, { token: TableCellEventDispatcher }, { token: ColumnResizeNotifierSource }, { token: TableStore }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: TableService }, { token: TheContextService }, { token: TheTableContextMenuService }], target: i0.ɵɵFactoryTarget.Component });
|
|
9024
|
+
TheTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheTableComponent, selector: "the-table, [theTable]", host: { listeners: { "mousedown": "handleMousedown($event)" } }, providers: [
|
|
8880
9025
|
TableStore,
|
|
8881
9026
|
TableService,
|
|
8882
9027
|
TheTableContextMenuService,
|
|
@@ -8887,7 +9032,7 @@ TheTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", vers
|
|
|
8887
9032
|
useExisting: TheTableComponent
|
|
8888
9033
|
}
|
|
8889
9034
|
], viewQueries: [{ propertyName: "tableWrapper", first: true, predicate: ["tableWrapper"], descendants: true, read: ElementRef, static: true }, { propertyName: "theTableElement", first: true, predicate: ["theTable"], descendants: true, read: ElementRef, static: true }, { propertyName: "tbodyElement", first: true, predicate: ["tbody"], descendants: true, read: ElementRef, static: true }], usesInheritance: true, ngImport: i0, template: "<div\n class=\"the-table-container\"\n theColumnResize\n [ngClass]=\"{\n 'the-table-with-controls': isInTable,\n 'the-table-selection-hide': tableStore.isCellSelecting || tableStore.isRightClicking\n }\"\n>\n <div class=\"the-table-row-controls-wrapper\" *ngIf=\"!readonly && isInTable\">\n <div>\n <div\n class=\"the-table-corner-controls\"\n [ngClass]=\"{ active: isSelectedAllCell, dangerous: tableStore.isSelectedTable && tableStore.dangerousCells.length > 0 }\"\n >\n <button type=\"button\" class=\"the-table-corner-button\" (mousedown)=\"onSelectTable($event)\"></button>\n <div class=\"the-table-corner-controls-insert-row-marker\">\n <the-table-insert-mark type=\"row\" [at]=\"0\" [tableStore]=\"tableStore\"></the-table-insert-mark>\n </div>\n <div class=\"the-table-corner-controls-insert-column-marker\">\n <the-table-insert-mark 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\">\n <div\n class=\"the-table-row-controls-button-wrap\"\n *ngFor=\"let control of rowControls; let i = index; trackBy: trackByFnRowCotrols\"\n [ngClass]=\"{\n active: tableStore.selectedRowsIndex.includes(control.rowIndex),\n dangerous: tableStore.dangerousRowsIndex.includes(control.rowIndex) && tableStore.dangerousCells.length > 0\n }\"\n >\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 <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>\n <div class=\"the-table-wrapper\" #tableWrapper>\n <table class=\"the-table\" #theTable [ngClass]=\"{ 'the-table-with-controls': isInTable }\">\n <colgroup *ngIf=\"columns\">\n <col *ngFor=\"let col of columns\" [ngStyle]=\"{ width: col.width + 'px' }\" />\n </colgroup>\n <thead>\n <tr class=\"the-table-col-controls-wrapper\">\n <th\n class=\"the-table-col-controls\"\n (mousedown)=\"onColMouseDown($event, i)\"\n *ngFor=\"let control of colControls; let i = index; trackBy: trackByFnColCotrols\"\n >\n <the-table-insert-mark\n *ngIf=\"isInTable\"\n type=\"column\"\n [at]=\"i + 1\"\n [tableStore]=\"tableStore\"\n ></the-table-insert-mark>\n <div\n class=\"the-table-col-controls-inner\"\n [ngClass]=\"{\n active: tableStore.selectedColumnsIndex.includes(i),\n dangerous: tableStore.dangerousColumnsIndex.includes(i) && tableStore.dangerousCells.length > 0\n }\"\n ></div>\n </th>\n </tr>\n </thead>\n <tbody #tbody>\n <slate-children [children]=\"children\" [context]=\"childrenContext\" [viewContext]=\"viewContext\"> </slate-children>\n </tbody>\n </table>\n </div>\n</div>\n", components: [{ type: TheInsertMarkComponent, selector: "the-table-insert-mark", inputs: ["type", "at", "tableStore"] }, { type: i1.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }], directives: [{ type: TheColumnResizeDirective, selector: "div[theColumnResize]" }, { type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
|
|
8890
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
9035
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheTableComponent, decorators: [{
|
|
8891
9036
|
type: Component,
|
|
8892
9037
|
args: [{
|
|
8893
9038
|
selector: 'the-table, [theTable]',
|
|
@@ -8992,9 +9137,9 @@ class TheTableRowComponent extends TheBaseElementComponent {
|
|
|
8992
9137
|
}
|
|
8993
9138
|
}
|
|
8994
9139
|
}
|
|
8995
|
-
TheTableRowComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
8996
|
-
TheTableRowComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
8997
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
9140
|
+
TheTableRowComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheTableRowComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
9141
|
+
TheTableRowComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheTableRowComponent, selector: "tr[theTableRow]", host: { properties: { "style.backgroundColor": "this.backgroundColor", "style.height": "this.height" } }, usesInheritance: true, ngImport: i0, template: '<slate-children [children]="children" [context]="childrenContext" [viewContext]="viewContext"></slate-children>', isInline: true, components: [{ type: i1.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }] });
|
|
9142
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheTableRowComponent, decorators: [{
|
|
8998
9143
|
type: Component,
|
|
8999
9144
|
args: [{
|
|
9000
9145
|
selector: 'tr[theTableRow]',
|
|
@@ -9153,9 +9298,9 @@ class ColumnResizingStore {
|
|
|
9153
9298
|
this.resizeRows.pop();
|
|
9154
9299
|
}
|
|
9155
9300
|
}
|
|
9156
|
-
ColumnResizingStore.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
9157
|
-
ColumnResizingStore.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
9158
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
9301
|
+
ColumnResizingStore.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ColumnResizingStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
9302
|
+
ColumnResizingStore.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ColumnResizingStore });
|
|
9303
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ColumnResizingStore, decorators: [{
|
|
9159
9304
|
type: Injectable
|
|
9160
9305
|
}], ctorParameters: function () { return []; } });
|
|
9161
9306
|
|
|
@@ -9300,9 +9445,9 @@ class TheColumnResizeOverlayHandleComponent {
|
|
|
9300
9445
|
this.destroyed.complete();
|
|
9301
9446
|
}
|
|
9302
9447
|
}
|
|
9303
|
-
TheColumnResizeOverlayHandleComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
9304
|
-
TheColumnResizeOverlayHandleComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
9305
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
9448
|
+
TheColumnResizeOverlayHandleComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", 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 });
|
|
9449
|
+
TheColumnResizeOverlayHandleComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheColumnResizeOverlayHandleComponent, selector: "ng-component", host: { classAttribute: "the-table-resize-overlay-thumb" }, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
9450
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheColumnResizeOverlayHandleComponent, decorators: [{
|
|
9306
9451
|
type: Component,
|
|
9307
9452
|
args: [{
|
|
9308
9453
|
host: { class: 'the-table-resize-overlay-thumb' },
|
|
@@ -9951,9 +10096,9 @@ class TheTdComponent extends TheBaseElementComponent {
|
|
|
9951
10096
|
this.destroy$.complete();
|
|
9952
10097
|
}
|
|
9953
10098
|
}
|
|
9954
|
-
TheTdComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
9955
|
-
TheTdComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
9956
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
10099
|
+
TheTdComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", 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.Overlay }, { token: ColumnResizingStore }, { token: i2.ScrollDispatcher }], target: i0.ɵɵFactoryTarget.Component });
|
|
10100
|
+
TheTdComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheTdComponent, selector: "td[theTd]", host: { properties: { "style.backgroundColor": "this.backgroundColor", "attr.colspan": "this.colspan", "attr.rowspan": "this.rowspan", "style.display": "this.display" } }, providers: [ColumnResizingStore], viewQueries: [{ propertyName: "cellInner", first: true, predicate: ["cellInner"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<div #cellInner>\n <slate-children [children]=\"children\" [context]=\"childrenContext\" [viewContext]=\"viewContext\"></slate-children>\n</div>\n", components: [{ type: i1.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }] });
|
|
10101
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheTdComponent, decorators: [{
|
|
9957
10102
|
type: Component,
|
|
9958
10103
|
args: [{
|
|
9959
10104
|
selector: 'td[theTd]',
|
|
@@ -10517,9 +10662,9 @@ class TheVerticalToolbarItemComponent extends TheToolbarBaseItemComponent {
|
|
|
10517
10662
|
}
|
|
10518
10663
|
}
|
|
10519
10664
|
}
|
|
10520
|
-
TheVerticalToolbarItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
10521
|
-
TheVerticalToolbarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
10522
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
10665
|
+
TheVerticalToolbarItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheVerticalToolbarItemComponent, deps: [{ token: i0.ElementRef }, { token: i1$6.ThyPopover }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
10666
|
+
TheVerticalToolbarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheVerticalToolbarItemComponent, selector: "the-toolbar-vertical-align-item", inputs: { item: "item", menus: "menus", editor: "editor", toolbarItem: "toolbarItem" }, 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 thyIconNavLink\n class=\"icon-mode link-with-down\"\n [thyTooltip]=\"toolbarItem?.name\"\n [thyIconNavLinkActive]=\"isOpened\"\n thyTooltipPlacement=\"top\"\n (mousedown)=\"execute($event)\"\n>\n <thy-icon [thyIconName]=\"activeMenu?.icon\"></thy-icon>\n <thy-icon class=\"caret-down-icon font-size-sm text-desc\" thyIconName=\"caret-down\"></thy-icon>\n</a>\n\n<ng-template #VerticalAlignItems>\n <thy-action-menu class=\"dropdown\">\n <ng-container *ngFor=\"let menu of toolbarItem?.includes\">\n <a\n thyActionMenuItem\n href=\"javascript:;\"\n [thyActionMenuItemActive]=\"menu.key === activeMenu?.key\"\n [ngStyle]=\"menu?.styles\"\n (mousedown)=\"itemMousedown($event, menu)\"\n >\n <span *ngIf=\"menu.icon\" thyActionMenuItemIcon>\n <thy-icon [thyIconName]=\"menu?.icon\"></thy-icon>\n </span>\n <span thyActionMenuItemName>{{ menu.name }}</span>\n </a>\n </ng-container>\n </thy-action-menu>\n</ng-template>\n", components: [{ type: i3.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i4$1.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { type: i5$2.ThyActionMenuComponent, selector: "thy-action-menu", inputs: ["thyTheme", "thyWidth"] }], directives: [{ type: i5$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i5$2.ThyActionMenuItemDirective, selector: "[thyActionMenuItem]", inputs: ["thyDisabled", "thyType"] }, { type: i5$2.ThyActionMenuItemActiveDirective, selector: "[thyActionMenuItemActive]", inputs: ["thyActionMenuItemActive"] }, { type: i6.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5$2.ThyActionMenuItemIconDirective, selector: "[thyActionMenuItemIcon]" }, { type: i5$2.ThyActionMenuItemNameDirective, selector: "[thyActionMenuItemName]" }] });
|
|
10667
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheVerticalToolbarItemComponent, decorators: [{
|
|
10523
10668
|
type: Component,
|
|
10524
10669
|
args: [{
|
|
10525
10670
|
selector: 'the-toolbar-vertical-align-item',
|
|
@@ -10687,35 +10832,6 @@ const PaintFormatOptions = [
|
|
|
10687
10832
|
}
|
|
10688
10833
|
];
|
|
10689
10834
|
|
|
10690
|
-
/**
|
|
10691
|
-
* whether the current node is a clean paragraph
|
|
10692
|
-
* @param editor
|
|
10693
|
-
* @param text
|
|
10694
|
-
* @returns boolean
|
|
10695
|
-
*/
|
|
10696
|
-
const isCleanEmptyParagraph = (editor) => {
|
|
10697
|
-
const isCollapsedCursor = TheEditor.isFocused(editor) && editor.selection && Range.isCollapsed(editor.selection);
|
|
10698
|
-
if (!isCollapsedCursor) {
|
|
10699
|
-
return false;
|
|
10700
|
-
}
|
|
10701
|
-
const block = Node.ancestor(editor, [editor.selection.anchor.path[0]]);
|
|
10702
|
-
const textIndent = 'textIndent';
|
|
10703
|
-
const align = 'align';
|
|
10704
|
-
const hasTextIndent = block[textIndent];
|
|
10705
|
-
const hasAlign = block[align];
|
|
10706
|
-
if (Node.string(block) === '' &&
|
|
10707
|
-
Element$1.isElement(block) &&
|
|
10708
|
-
block.type === ElementKinds.paragraph &&
|
|
10709
|
-
block.children.length === 1 &&
|
|
10710
|
-
Text.isText(block.children[0]) &&
|
|
10711
|
-
!Editor.isVoid(editor, block) &&
|
|
10712
|
-
!hasTextIndent &&
|
|
10713
|
-
!hasAlign) {
|
|
10714
|
-
return true;
|
|
10715
|
-
}
|
|
10716
|
-
return false;
|
|
10717
|
-
};
|
|
10718
|
-
|
|
10719
10835
|
class TheToolbarItemComponent extends TheToolbarBaseItemComponent {
|
|
10720
10836
|
constructor(ngZone, cfr) {
|
|
10721
10837
|
super();
|
|
@@ -10761,8 +10877,8 @@ class TheToolbarItemComponent extends TheToolbarBaseItemComponent {
|
|
|
10761
10877
|
});
|
|
10762
10878
|
}
|
|
10763
10879
|
}
|
|
10764
|
-
TheToolbarItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
10765
|
-
TheToolbarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
10880
|
+
TheToolbarItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheToolbarItemComponent, deps: [{ token: i0.NgZone }, { token: i0.ComponentFactoryResolver }], target: i0.ɵɵFactoryTarget.Component });
|
|
10881
|
+
TheToolbarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheToolbarItemComponent, selector: "the-toolbar-item", inputs: { item: "item", editor: "editor", itemMode: "itemMode" }, host: { listeners: { "mousedown": "toggleDropdown($event)" }, properties: { "class.disabled": "this.disabledState" }, classAttribute: "the-toolbar-item" }, viewQueries: [{ propertyName: "toolbarContainer", first: true, predicate: ["toolbarContainer"], descendants: true, read: ViewContainerRef, static: true }], usesInheritance: true, ngImport: i0, template: `
|
|
10766
10882
|
<ng-container *ngIf="itemMode === ToolbarItemMode.horizontal; else selectionItem">
|
|
10767
10883
|
<a
|
|
10768
10884
|
thyIconNavLink
|
|
@@ -10783,7 +10899,7 @@ TheToolbarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0"
|
|
|
10783
10899
|
<ng-template #tooltip let-data> {{ data.name }} {{ data.shortcutKey }} </ng-template>
|
|
10784
10900
|
<ng-container #toolbarContainer></ng-container>
|
|
10785
10901
|
`, isInline: true, components: [{ type: i3.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i4$1.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }], directives: [{ type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }] });
|
|
10786
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
10902
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheToolbarItemComponent, decorators: [{
|
|
10787
10903
|
type: Component,
|
|
10788
10904
|
args: [{
|
|
10789
10905
|
selector: 'the-toolbar-item',
|
|
@@ -10871,9 +10987,9 @@ class TheQuickToolbarComponent extends mixinUnsubscribe(MixinBase) {
|
|
|
10871
10987
|
super.ngOnDestroy();
|
|
10872
10988
|
}
|
|
10873
10989
|
}
|
|
10874
|
-
TheQuickToolbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
10875
|
-
TheQuickToolbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
10876
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
10990
|
+
TheQuickToolbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheQuickToolbarComponent, deps: [{ token: i1$3.ThyPopoverRef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
10991
|
+
TheQuickToolbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheQuickToolbarComponent, selector: "the-quick-toolbar", inputs: { editor: "editor", quickToolbarItems: "quickToolbarItems" }, host: { listeners: { "document: mousedown": "handleMouseDown($event)", "document: keydown.enter": "handleEnter()" } }, usesInheritance: true, ngImport: i0, template: "<thy-selection-list\n class=\"the-quick-toolbar\"\n [thyBindKeyEventContainer]=\"editorElement\"\n (thySelectionChange)=\"selectionChange($event)\"\n [thyMultiple]=\"false\"\n>\n <ng-container *ngFor=\"let item of quickToolbarItems\">\n <ng-container *ngIf=\"item.key !== ToolbarActionTypes.split; else splitLine\">\n <thy-list-option [thyValue]=\"item?.key\" (mousedown)=\"stopPropagation($event)\">\n <the-toolbar-item [editor]=\"editor\" [item]=\"item\" [itemMode]=\"ToolbarItemMode.vertical\"></the-toolbar-item>\n </thy-list-option>\n </ng-container>\n </ng-container>\n</thy-selection-list>\n\n<ng-template #splitLine>\n <nav-split-line [mode]=\"ToolbarItemMode.horizontal\"></nav-split-line>\n</ng-template>\n", components: [{ type: i2$2.ThySelectionListComponent, selector: "thy-selection-list,[thy-selection-list]", inputs: ["thyMultiple", "thyBindKeyEventContainer", "thyScrollContainer", "thyBeforeKeydown", "thyUniqueKey", "thyCompareWith", "thyLayout", "thyAutoActiveFirstItem", "thySize", "thySpaceKeyEnabled"], outputs: ["thySelectionChange"] }, { type: i5$3.ThyListOptionComponent, selector: "thy-list-option,[thy-list-option]", inputs: ["id", "thyValue", "thyDisabled"] }, { type: TheToolbarItemComponent, selector: "the-toolbar-item", inputs: ["item", "editor", "itemMode"] }, { type: NavSplitLineComponent, selector: "nav-split-line", inputs: ["mode"] }], directives: [{ type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
10992
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheQuickToolbarComponent, decorators: [{
|
|
10877
10993
|
type: Component,
|
|
10878
10994
|
args: [{
|
|
10879
10995
|
selector: 'the-quick-toolbar',
|
|
@@ -10993,11 +11109,43 @@ const withSoftBreak = (options = { rules: [{ hotkey: 'shift+enter' }] }) => (edi
|
|
|
10993
11109
|
|
|
10994
11110
|
const FontSizeEditor = {
|
|
10995
11111
|
setFontSize(editor, size) {
|
|
11112
|
+
const contextService = editor.injector.get(TheContextService);
|
|
11113
|
+
const defaultFontSize = contextService.getDefaultFontSize();
|
|
11114
|
+
const marks = getSelectionMarks(editor);
|
|
11115
|
+
const fontSizeMark = marks[MarkTypes.fontSize];
|
|
11116
|
+
const isDefaultFontSize = size === defaultFontSize;
|
|
11117
|
+
if (!fontSizeMark && isDefaultFontSize) {
|
|
11118
|
+
return;
|
|
11119
|
+
}
|
|
11120
|
+
// unset fontSize
|
|
11121
|
+
if (FontSizeEditor.unsetFontSize(editor, size, fontSizeMark, isDefaultFontSize)) {
|
|
11122
|
+
return;
|
|
11123
|
+
}
|
|
11124
|
+
FontSizeEditor.setFontSizeMark(editor, size);
|
|
11125
|
+
},
|
|
11126
|
+
setFontSizeMark(editor, size) {
|
|
11127
|
+
// set Table selectedCells fontSize
|
|
10996
11128
|
if (TableEditor.toggleMark(editor, false, MarkTypes.fontSize, Number(size))) {
|
|
10997
11129
|
return;
|
|
10998
11130
|
}
|
|
11131
|
+
// set paragraph text fontSize
|
|
10999
11132
|
Editor.addMark(editor, MarkTypes.fontSize, Number(size));
|
|
11000
11133
|
},
|
|
11134
|
+
unsetFontSize(editor, size, fontSizeMark, isDefaultFontSize) {
|
|
11135
|
+
const isTable = TableEditor.isActive(editor);
|
|
11136
|
+
if (fontSizeMark && isDefaultFontSize) {
|
|
11137
|
+
// unset Table selectedCells fontSize
|
|
11138
|
+
if (isTable && TableEditor.toggleMark(editor, true, MarkTypes.fontSize, Number(size))) {
|
|
11139
|
+
return true;
|
|
11140
|
+
}
|
|
11141
|
+
// unset paragraph text fontSize
|
|
11142
|
+
setMarks(editor, {
|
|
11143
|
+
[MarkTypes.fontSize]: null
|
|
11144
|
+
}, editor.selection);
|
|
11145
|
+
return true;
|
|
11146
|
+
}
|
|
11147
|
+
return false;
|
|
11148
|
+
},
|
|
11001
11149
|
isFontSizeActive(editor, size) {
|
|
11002
11150
|
if (editor.selection) {
|
|
11003
11151
|
const anchorBlock$1 = anchorBlock(editor);
|
|
@@ -11056,6 +11204,116 @@ const FontSizeOptions = [
|
|
|
11056
11204
|
...sizeOptions()
|
|
11057
11205
|
];
|
|
11058
11206
|
|
|
11207
|
+
const InlineCodeOptions = [
|
|
11208
|
+
{
|
|
11209
|
+
key: ElementKinds.inlineCode,
|
|
11210
|
+
icon: 'code',
|
|
11211
|
+
name: '行内代码',
|
|
11212
|
+
shortcutKey: `${CONTROL_KEY}+E`,
|
|
11213
|
+
execute: editor => InlineCodeEditor.toggleInlineCode(editor),
|
|
11214
|
+
active: editor => InlineCodeEditor.isInlineCodeActive(editor)
|
|
11215
|
+
}
|
|
11216
|
+
];
|
|
11217
|
+
|
|
11218
|
+
class TheInlineCodeComponent extends TheBaseElementComponent {
|
|
11219
|
+
constructor() {
|
|
11220
|
+
super(...arguments);
|
|
11221
|
+
// Put this at the start and end of an inline component to work around this Chromium bug:
|
|
11222
|
+
// https://bugs.chromium.org/p/chromium/issues/detail?id=1249405
|
|
11223
|
+
this.inlineChromiumBugfix = '$' + String.fromCodePoint(160);
|
|
11224
|
+
}
|
|
11225
|
+
}
|
|
11226
|
+
TheInlineCodeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheInlineCodeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
11227
|
+
TheInlineCodeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheInlineCodeComponent, selector: "span[theInlineCode]", usesInheritance: true, ngImport: i0, template: ` <span contenteditable="false" style="font-size: 0;">{{ inlineChromiumBugfix }}</span>
|
|
11228
|
+
<slate-children [children]="children" [context]="childrenContext" [viewContext]="viewContext"></slate-children>
|
|
11229
|
+
<span contenteditable="false" style="font-size: 0;">{{ inlineChromiumBugfix }}</span>`, isInline: true, components: [{ type: i1.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }] });
|
|
11230
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheInlineCodeComponent, decorators: [{
|
|
11231
|
+
type: Component,
|
|
11232
|
+
args: [{
|
|
11233
|
+
selector: 'span[theInlineCode]',
|
|
11234
|
+
template: ` <span contenteditable="false" style="font-size: 0;">{{ inlineChromiumBugfix }}</span>
|
|
11235
|
+
<slate-children [children]="children" [context]="childrenContext" [viewContext]="viewContext"></slate-children>
|
|
11236
|
+
<span contenteditable="false" style="font-size: 0;">{{ inlineChromiumBugfix }}</span>`
|
|
11237
|
+
}]
|
|
11238
|
+
}] });
|
|
11239
|
+
|
|
11240
|
+
const withInlineCode = (editor) => {
|
|
11241
|
+
const { isInline, renderElement, insertText, onKeydown } = editor;
|
|
11242
|
+
editor.isInline = (element) => {
|
|
11243
|
+
return element.type === ElementKinds.inlineCode ? true : isInline(element);
|
|
11244
|
+
};
|
|
11245
|
+
editor.renderElement = (element) => {
|
|
11246
|
+
if (element.type === ElementKinds.inlineCode) {
|
|
11247
|
+
return TheInlineCodeComponent;
|
|
11248
|
+
}
|
|
11249
|
+
return renderElement(element);
|
|
11250
|
+
};
|
|
11251
|
+
editor.insertText = text => {
|
|
11252
|
+
if (text && InlineCodeEditor.isInlineCodeActive(editor)) {
|
|
11253
|
+
let selection = editor.selection;
|
|
11254
|
+
const currentNodeText = Editor.string(editor, editor.selection.anchor.path);
|
|
11255
|
+
insertText(text);
|
|
11256
|
+
if (currentNodeText == ZERO_WIDTH_CHAR) {
|
|
11257
|
+
const inlineCodePath = Editor.path(editor, editor.selection);
|
|
11258
|
+
let range = {
|
|
11259
|
+
anchor: Editor.before(editor, selection.anchor),
|
|
11260
|
+
focus: selection.anchor
|
|
11261
|
+
};
|
|
11262
|
+
if (Editor.isStart(editor, selection.anchor, inlineCodePath)) {
|
|
11263
|
+
range = {
|
|
11264
|
+
anchor: editor.selection.anchor,
|
|
11265
|
+
focus: Editor.after(editor, editor.selection)
|
|
11266
|
+
};
|
|
11267
|
+
}
|
|
11268
|
+
Transforms.delete(editor, {
|
|
11269
|
+
at: range
|
|
11270
|
+
});
|
|
11271
|
+
}
|
|
11272
|
+
}
|
|
11273
|
+
else {
|
|
11274
|
+
insertText(text);
|
|
11275
|
+
}
|
|
11276
|
+
};
|
|
11277
|
+
editor.onKeydown = (event) => {
|
|
11278
|
+
const { selection } = editor;
|
|
11279
|
+
if (!selection || !selection.anchor || !selection.focus) {
|
|
11280
|
+
onKeydown(event);
|
|
11281
|
+
return;
|
|
11282
|
+
}
|
|
11283
|
+
const isMoveBackward = hotkeys.isMoveBackward(event);
|
|
11284
|
+
const isMoveForward = hotkeys.isMoveForward(event);
|
|
11285
|
+
const isCollapsed$1 = selection && isCollapsed(selection);
|
|
11286
|
+
const isInlineCode = InlineCodeEditor.isInlineCodeActive(editor);
|
|
11287
|
+
if (isCollapsed$1 && isMoveForward) {
|
|
11288
|
+
let isInlineCodeBefore = false;
|
|
11289
|
+
if (!isInlineCode) {
|
|
11290
|
+
const { path } = Editor.after(editor, selection);
|
|
11291
|
+
isInlineCodeBefore = InlineCodeEditor.isInlineCodeActive(editor, path);
|
|
11292
|
+
}
|
|
11293
|
+
if (isInlineCode || isInlineCodeBefore) {
|
|
11294
|
+
event.preventDefault();
|
|
11295
|
+
Transforms.move(editor, { unit: 'offset' });
|
|
11296
|
+
return;
|
|
11297
|
+
}
|
|
11298
|
+
}
|
|
11299
|
+
if (isCollapsed$1 && isMoveBackward) {
|
|
11300
|
+
let isInlineCodeAfter = false;
|
|
11301
|
+
if (!isInlineCode) {
|
|
11302
|
+
const { path } = Editor.before(editor, selection);
|
|
11303
|
+
isInlineCodeAfter = InlineCodeEditor.isInlineCodeActive(editor, path);
|
|
11304
|
+
}
|
|
11305
|
+
if (isInlineCode || isInlineCodeAfter) {
|
|
11306
|
+
event.preventDefault();
|
|
11307
|
+
Transforms.move(editor, { unit: 'offset', reverse: true });
|
|
11308
|
+
return;
|
|
11309
|
+
}
|
|
11310
|
+
}
|
|
11311
|
+
onKeydown(event);
|
|
11312
|
+
};
|
|
11313
|
+
editor = withRemoveEmptyNodes({ type: ElementKinds.inlineCode })(editor);
|
|
11314
|
+
return editor;
|
|
11315
|
+
};
|
|
11316
|
+
|
|
11059
11317
|
const internalPlugins = [
|
|
11060
11318
|
withTheHistory,
|
|
11061
11319
|
withAutoInsertData(),
|
|
@@ -11095,7 +11353,8 @@ const internalPlugins = [
|
|
|
11095
11353
|
withImage,
|
|
11096
11354
|
withDeserializeHMTL,
|
|
11097
11355
|
withDeserializeMd(),
|
|
11098
|
-
withQuickInsert
|
|
11356
|
+
withQuickInsert,
|
|
11357
|
+
withInlineCode
|
|
11099
11358
|
];
|
|
11100
11359
|
const internalToolbarItems = [
|
|
11101
11360
|
...AlignOptions,
|
|
@@ -11112,7 +11371,8 @@ const internalToolbarItems = [
|
|
|
11112
11371
|
...LinkOptions,
|
|
11113
11372
|
...TableOptions,
|
|
11114
11373
|
...VerticalAlignOptions,
|
|
11115
|
-
...PaintFormatOptions
|
|
11374
|
+
...PaintFormatOptions,
|
|
11375
|
+
...InlineCodeOptions
|
|
11116
11376
|
];
|
|
11117
11377
|
const toolbarCompose = (toolbarItems = []) => {
|
|
11118
11378
|
return [...internalToolbarItems, ...toolbarItems];
|
|
@@ -11134,14 +11394,19 @@ const HOTKEYS = {
|
|
|
11134
11394
|
'mod+b': MarkTypes.bold,
|
|
11135
11395
|
'mod+i': MarkTypes.italic,
|
|
11136
11396
|
'mod+u': MarkTypes.underline,
|
|
11137
|
-
'mod+e':
|
|
11397
|
+
'mod+e': ElementKinds.inlineCode
|
|
11138
11398
|
};
|
|
11139
11399
|
const markShortcuts = (editor, event) => {
|
|
11140
11400
|
for (const hotkey in HOTKEYS) {
|
|
11141
11401
|
if (isHotkey(hotkey, event)) {
|
|
11142
11402
|
event.preventDefault();
|
|
11143
11403
|
const mark = HOTKEYS[hotkey];
|
|
11144
|
-
|
|
11404
|
+
if (mark === ElementKinds.inlineCode) {
|
|
11405
|
+
InlineCodeEditor.toggleInlineCode(editor);
|
|
11406
|
+
}
|
|
11407
|
+
else {
|
|
11408
|
+
MarkEditor.toggleMark(editor, mark);
|
|
11409
|
+
}
|
|
11145
11410
|
}
|
|
11146
11411
|
}
|
|
11147
11412
|
};
|
|
@@ -11189,9 +11454,9 @@ class TheToolbarService {
|
|
|
11189
11454
|
});
|
|
11190
11455
|
}
|
|
11191
11456
|
}
|
|
11192
|
-
TheToolbarService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
11193
|
-
TheToolbarService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
11194
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
11457
|
+
TheToolbarService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheToolbarService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
11458
|
+
TheToolbarService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheToolbarService });
|
|
11459
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheToolbarService, decorators: [{
|
|
11195
11460
|
type: Injectable
|
|
11196
11461
|
}] });
|
|
11197
11462
|
|
|
@@ -11438,18 +11703,20 @@ class TheToolbarComponent {
|
|
|
11438
11703
|
return TheToolbarItemComponent;
|
|
11439
11704
|
}
|
|
11440
11705
|
getDropdownItem(item) {
|
|
11441
|
-
var _a;
|
|
11706
|
+
var _a, _b, _c;
|
|
11442
11707
|
let dropdownKey = item === null || item === void 0 ? void 0 : item.dropdownItemKey;
|
|
11443
11708
|
// modify the fontsize option externally
|
|
11444
|
-
|
|
11445
|
-
|
|
11709
|
+
const contextService = (_b = (_a = this.editor) === null || _a === void 0 ? void 0 : _a.injector) === null || _b === void 0 ? void 0 : _b.get(TheContextService);
|
|
11710
|
+
const fontSize = contextService === null || contextService === void 0 ? void 0 : contextService.getDefaultFontSize();
|
|
11711
|
+
if (contextService && item.key === MarkTypes.fontSize && fontSize) {
|
|
11712
|
+
dropdownKey = fontSize;
|
|
11446
11713
|
}
|
|
11447
|
-
return (
|
|
11714
|
+
return (_c = item === null || item === void 0 ? void 0 : item.includes) === null || _c === void 0 ? void 0 : _c.find((item) => item.key === dropdownKey);
|
|
11448
11715
|
}
|
|
11449
11716
|
}
|
|
11450
|
-
TheToolbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
11451
|
-
TheToolbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
11452
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
11717
|
+
TheToolbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheToolbarComponent, deps: [{ token: i0.ComponentFactoryResolver }, { token: i0.ElementRef }, { token: i0.NgZone }, { token: TheToolbarGroupToken }], target: i0.ɵɵFactoryTarget.Component });
|
|
11718
|
+
TheToolbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheToolbarComponent, selector: "the-toolbar", inputs: { editor: "editor", toolbarItems: "toolbarItems", align: "align", containerClass: "containerClass", isMore: "isMore", afterTemplate: "afterTemplate" }, host: { classAttribute: "the-toolbar-container" }, viewQueries: [{ propertyName: "toolbarContainer", first: true, predicate: ["toolbarContainer"], descendants: true, read: ViewContainerRef, static: true }], usesOnChanges: true, ngImport: i0, template: "<thy-icon-nav [style.justifyContent]=\"align\">\n <ng-container #toolbarContainer></ng-container>\n <ng-content></ng-content>\n <ng-template *ngIf=\"afterTemplate\" [ngTemplateOutlet]=\"afterTemplate\"></ng-template>\n</thy-icon-nav>\n", components: [{ type: i3.ThyIconNavComponent, selector: "thy-icon-nav", inputs: ["thyType"] }], directives: [{ type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }] });
|
|
11719
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheToolbarComponent, decorators: [{
|
|
11453
11720
|
type: Component,
|
|
11454
11721
|
args: [{
|
|
11455
11722
|
selector: 'the-toolbar',
|
|
@@ -11467,8 +11734,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImpor
|
|
|
11467
11734
|
type: Input
|
|
11468
11735
|
}], align: [{
|
|
11469
11736
|
type: Input
|
|
11470
|
-
}], fontSize: [{
|
|
11471
|
-
type: Input
|
|
11472
11737
|
}], containerClass: [{
|
|
11473
11738
|
type: Input
|
|
11474
11739
|
}], isMore: [{
|
|
@@ -11575,15 +11840,15 @@ class TheInlineToolbarComponent {
|
|
|
11575
11840
|
this.destroy$.complete();
|
|
11576
11841
|
}
|
|
11577
11842
|
}
|
|
11578
|
-
TheInlineToolbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
11579
|
-
TheInlineToolbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
11843
|
+
TheInlineToolbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheInlineToolbarComponent, deps: [{ token: i0.ElementRef }, { token: i2.ScrollDispatcher }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: TheContextService }], target: i0.ɵɵFactoryTarget.Component });
|
|
11844
|
+
TheInlineToolbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", 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
|
|
11580
11845
|
#inlineToolbar
|
|
11581
11846
|
class="the-inline-toolbar"
|
|
11582
11847
|
[editor]="editor"
|
|
11583
11848
|
[toolbarItems]="toolbarItems"
|
|
11584
11849
|
[isMore]="false"
|
|
11585
|
-
></the-toolbar> `, isInline: true, components: [{ type: TheToolbarComponent, selector: "the-toolbar", inputs: ["editor", "toolbarItems", "align", "
|
|
11586
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
11850
|
+
></the-toolbar> `, isInline: true, components: [{ type: TheToolbarComponent, selector: "the-toolbar", inputs: ["editor", "toolbarItems", "align", "containerClass", "isMore", "afterTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
11851
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheInlineToolbarComponent, decorators: [{
|
|
11587
11852
|
type: Component,
|
|
11588
11853
|
args: [{
|
|
11589
11854
|
selector: 'the-inline-toolbar',
|
|
@@ -11613,6 +11878,7 @@ class TheQuickInsertComponent {
|
|
|
11613
11878
|
this.renderer = renderer;
|
|
11614
11879
|
this.elementRef = elementRef;
|
|
11615
11880
|
this.cdr = cdr;
|
|
11881
|
+
this.isVisible = false;
|
|
11616
11882
|
this.isHide = true;
|
|
11617
11883
|
this.defaultIconName = 'plus-circle-thin';
|
|
11618
11884
|
this.iconNameFill = 'plus-circle-thin-fill';
|
|
@@ -11623,18 +11889,21 @@ class TheQuickInsertComponent {
|
|
|
11623
11889
|
event.stopPropagation();
|
|
11624
11890
|
}
|
|
11625
11891
|
checkStatus() {
|
|
11892
|
+
var _a;
|
|
11626
11893
|
const { editor } = this;
|
|
11627
|
-
if (isCleanEmptyParagraph(editor)) {
|
|
11628
|
-
|
|
11629
|
-
|
|
11630
|
-
|
|
11631
|
-
const rootNode = AngularEditor.toDOMNode(editor, block);
|
|
11632
|
-
this.updatePosition(rootNode.offsetLeft, rootNode.offsetTop);
|
|
11633
|
-
});
|
|
11894
|
+
if (this.isVisible && isCleanEmptyParagraph(editor) && !this.hasExcludeAttribute()) {
|
|
11895
|
+
const block = Node.ancestor(editor, [(_a = editor === null || editor === void 0 ? void 0 : editor.selection) === null || _a === void 0 ? void 0 : _a.anchor.path[0]]);
|
|
11896
|
+
const rootNode = AngularEditor.toDOMNode(editor, block);
|
|
11897
|
+
this.updatePosition(rootNode.offsetLeft, rootNode.offsetTop);
|
|
11634
11898
|
return;
|
|
11635
11899
|
}
|
|
11636
11900
|
this.isHide = true;
|
|
11637
11901
|
}
|
|
11902
|
+
hasExcludeAttribute() {
|
|
11903
|
+
const marks = getSelectionMarks(this.editor);
|
|
11904
|
+
const fontSizeMark = marks[MarkTypes.fontSize];
|
|
11905
|
+
return fontSizeMark;
|
|
11906
|
+
}
|
|
11638
11907
|
updatePosition(left, top) {
|
|
11639
11908
|
this.isHide = false;
|
|
11640
11909
|
this.renderer.setStyle(this.elementRef.nativeElement, 'top', `${top}px`);
|
|
@@ -11654,9 +11923,9 @@ class TheQuickInsertComponent {
|
|
|
11654
11923
|
QuickInsertEditor.openQuickToolbar(this.editor, this.quickToolbarItems, this.iconElement.nativeElement);
|
|
11655
11924
|
}
|
|
11656
11925
|
}
|
|
11657
|
-
TheQuickInsertComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
11658
|
-
TheQuickInsertComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
11659
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
11926
|
+
TheQuickInsertComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheQuickInsertComponent, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
11927
|
+
TheQuickInsertComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheQuickInsertComponent, selector: "[theQuickInsert]", inputs: { editor: "editor", quickToolbarItems: "quickToolbarItems", isVisible: "isVisible" }, host: { listeners: { "mousedown": "handleMousedownNativeElement($event)" }, properties: { "class.hide": "isHide" }, classAttribute: "the-quick-insert" }, 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", components: [{ type: i4$1.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }] });
|
|
11928
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheQuickInsertComponent, decorators: [{
|
|
11660
11929
|
type: Component,
|
|
11661
11930
|
args: [{
|
|
11662
11931
|
selector: '[theQuickInsert]',
|
|
@@ -11670,6 +11939,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImpor
|
|
|
11670
11939
|
type: Input
|
|
11671
11940
|
}], quickToolbarItems: [{
|
|
11672
11941
|
type: Input
|
|
11942
|
+
}], isVisible: [{
|
|
11943
|
+
type: Input
|
|
11673
11944
|
}], iconElement: [{
|
|
11674
11945
|
type: ViewChild,
|
|
11675
11946
|
args: ['iconElement', { read: ElementRef, static: false }]
|
|
@@ -11678,82 +11949,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImpor
|
|
|
11678
11949
|
args: ['mousedown', ['$event']]
|
|
11679
11950
|
}] } });
|
|
11680
11951
|
|
|
11681
|
-
class ThePlaceholderComponent {
|
|
11682
|
-
constructor(renderer, elementRef, contextService) {
|
|
11683
|
-
this.renderer = renderer;
|
|
11684
|
-
this.elementRef = elementRef;
|
|
11685
|
-
this.contextService = contextService;
|
|
11686
|
-
this.isHide = true;
|
|
11687
|
-
}
|
|
11688
|
-
handleCompositionStart() {
|
|
11689
|
-
var _a;
|
|
11690
|
-
if ((_a = this.editor) === null || _a === void 0 ? void 0 : _a.selection) {
|
|
11691
|
-
this.hide();
|
|
11692
|
-
}
|
|
11693
|
-
}
|
|
11694
|
-
handleCompositionEnd(event) {
|
|
11695
|
-
if (!event.data) {
|
|
11696
|
-
this.checkStatus();
|
|
11697
|
-
}
|
|
11698
|
-
}
|
|
11699
|
-
checkStatus() {
|
|
11700
|
-
var _a, _b, _c;
|
|
11701
|
-
const { editor } = this;
|
|
11702
|
-
const isEmptyShow = typeof ((_a = this.options) === null || _a === void 0 ? void 0 : _a.isEmptyShowPlaceholder) === 'undefined' ? true : this.options.isEmptyShowPlaceholder;
|
|
11703
|
-
const isMustShow = (_b = this.options) === null || _b === void 0 ? void 0 : _b.isMustShowPlaceholder;
|
|
11704
|
-
const isReadonly = (_c = this.options) === null || _c === void 0 ? void 0 : _c.readonly;
|
|
11705
|
-
// empty content and no selection processing
|
|
11706
|
-
if (!isReadonly && isEmptyShow && isEmptyContent(editor.children)) {
|
|
11707
|
-
const firstElementChild = this.contextService.getFirstElementChild();
|
|
11708
|
-
const offsetTop = firstElementChild.offsetTop;
|
|
11709
|
-
const offsetLeft = firstElementChild.offsetLeft;
|
|
11710
|
-
this.updatePosition(offsetLeft, offsetTop);
|
|
11711
|
-
return;
|
|
11712
|
-
}
|
|
11713
|
-
if (isMustShow && isCleanEmptyParagraph(editor)) {
|
|
11714
|
-
setTimeout(() => {
|
|
11715
|
-
var _a;
|
|
11716
|
-
const block = Node.ancestor(editor, [(_a = editor === null || editor === void 0 ? void 0 : editor.selection) === null || _a === void 0 ? void 0 : _a.anchor.path[0]]);
|
|
11717
|
-
const rootNode = AngularEditor.toDOMNode(editor, block);
|
|
11718
|
-
this.updatePosition(rootNode.offsetLeft, rootNode.offsetTop);
|
|
11719
|
-
});
|
|
11720
|
-
return;
|
|
11721
|
-
}
|
|
11722
|
-
this.isHide = true;
|
|
11723
|
-
}
|
|
11724
|
-
updatePosition(left, top) {
|
|
11725
|
-
this.isHide = false;
|
|
11726
|
-
this.renderer.setStyle(this.elementRef.nativeElement, 'top', `${top}px`);
|
|
11727
|
-
this.renderer.setStyle(this.elementRef.nativeElement, 'left', `${left}px`);
|
|
11728
|
-
}
|
|
11729
|
-
hide() {
|
|
11730
|
-
this.isHide = true;
|
|
11731
|
-
}
|
|
11732
|
-
}
|
|
11733
|
-
ThePlaceholderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: ThePlaceholderComponent, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }, { token: TheContextService }], target: i0.ɵɵFactoryTarget.Component });
|
|
11734
|
-
ThePlaceholderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.7", type: ThePlaceholderComponent, selector: "div[thePlaceholder]", inputs: { editor: "editor", options: "options" }, host: { listeners: { "document:compositionstart": "handleCompositionStart()", "document:compositionend": "handleCompositionEnd($event)" }, properties: { "class.hide": "isHide" }, classAttribute: "the-placeholder" }, ngImport: i0, template: `{{ options?.placeholder }}`, isInline: true });
|
|
11735
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0, type: ThePlaceholderComponent, decorators: [{
|
|
11736
|
-
type: Component,
|
|
11737
|
-
args: [{
|
|
11738
|
-
selector: 'div[thePlaceholder]',
|
|
11739
|
-
template: `{{ options?.placeholder }}`,
|
|
11740
|
-
host: {
|
|
11741
|
-
class: 'the-placeholder',
|
|
11742
|
-
'[class.hide]': 'isHide'
|
|
11743
|
-
}
|
|
11744
|
-
}]
|
|
11745
|
-
}], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }, { type: TheContextService }]; }, propDecorators: { editor: [{
|
|
11746
|
-
type: Input
|
|
11747
|
-
}], options: [{
|
|
11748
|
-
type: Input
|
|
11749
|
-
}], handleCompositionStart: [{
|
|
11750
|
-
type: HostListener,
|
|
11751
|
-
args: ['document:compositionstart']
|
|
11752
|
-
}], handleCompositionEnd: [{
|
|
11753
|
-
type: HostListener,
|
|
11754
|
-
args: ['document:compositionend', ['$event']]
|
|
11755
|
-
}] } });
|
|
11756
|
-
|
|
11757
11952
|
class TheTemplateComponent {
|
|
11758
11953
|
constructor() {
|
|
11759
11954
|
this.renderElement = (element) => {
|
|
@@ -11782,9 +11977,9 @@ class TheTemplateComponent {
|
|
|
11782
11977
|
};
|
|
11783
11978
|
}
|
|
11784
11979
|
}
|
|
11785
|
-
TheTemplateComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
11786
|
-
TheTemplateComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
11787
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
11980
|
+
TheTemplateComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheTemplateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
11981
|
+
TheTemplateComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", 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", components: [{ type: TheDefaultElementComponent, selector: "[theDefaultElement]" }], directives: [{ type: i6.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], pipes: { "elementStyle": ElementStylePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
11982
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheTemplateComponent, decorators: [{
|
|
11788
11983
|
type: Component,
|
|
11789
11984
|
args: [{
|
|
11790
11985
|
selector: 'the-template,[theTemplate]',
|
|
@@ -11815,13 +12010,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImpor
|
|
|
11815
12010
|
}] } });
|
|
11816
12011
|
|
|
11817
12012
|
class TheEditorComponent extends mixinUnsubscribe(MixinBase) {
|
|
11818
|
-
constructor(toolbarService, theContextService, viewContainerRef, elementRef, ngZone) {
|
|
12013
|
+
constructor(toolbarService, theContextService, viewContainerRef, elementRef, ngZone, cdr) {
|
|
11819
12014
|
super();
|
|
11820
12015
|
this.toolbarService = toolbarService;
|
|
11821
12016
|
this.theContextService = theContextService;
|
|
11822
12017
|
this.viewContainerRef = viewContainerRef;
|
|
11823
12018
|
this.elementRef = elementRef;
|
|
11824
12019
|
this.ngZone = ngZone;
|
|
12020
|
+
this.cdr = cdr;
|
|
11825
12021
|
this.thePlugins = [];
|
|
11826
12022
|
this.theOnSave = new EventEmitter();
|
|
11827
12023
|
this.theOnDOMEvent = new EventEmitter();
|
|
@@ -11965,12 +12161,14 @@ class TheEditorComponent extends mixinUnsubscribe(MixinBase) {
|
|
|
11965
12161
|
this.editor.disabled = (_a = this.theOptions) === null || _a === void 0 ? void 0 : _a.disabled;
|
|
11966
12162
|
this.editor.extraElementOptions = (_b = this.theOptions) === null || _b === void 0 ? void 0 : _b.extraElementOptions;
|
|
11967
12163
|
setEditorUUID(this.editor, idCreator());
|
|
11968
|
-
this.theContextService.initialize({
|
|
12164
|
+
this.theContextService.initialize({
|
|
12165
|
+
theOptions: this.theOptions,
|
|
12166
|
+
nativeElement: this.elementRef.nativeElement,
|
|
12167
|
+
viewContainerRef: this.viewContainerRef
|
|
12168
|
+
});
|
|
11969
12169
|
this.toolbarCalculate();
|
|
11970
12170
|
setTimeout(() => {
|
|
11971
|
-
var _a;
|
|
11972
12171
|
this.theEditorCreated.emit(this.editor);
|
|
11973
|
-
(_a = this.placeholderInstance) === null || _a === void 0 ? void 0 : _a.checkStatus();
|
|
11974
12172
|
this.applyAutoFocus();
|
|
11975
12173
|
});
|
|
11976
12174
|
}
|
|
@@ -11992,7 +12190,7 @@ class TheEditorComponent extends mixinUnsubscribe(MixinBase) {
|
|
|
11992
12190
|
}
|
|
11993
12191
|
}
|
|
11994
12192
|
toolbarCalculate() {
|
|
11995
|
-
var _a
|
|
12193
|
+
var _a;
|
|
11996
12194
|
const toolbar = (_a = this === null || this === void 0 ? void 0 : this.theOptions) === null || _a === void 0 ? void 0 : _a.toolbar;
|
|
11997
12195
|
const toolbarItems = toolbarCompose(toolbar === null || toolbar === void 0 ? void 0 : toolbar.toolbarItems);
|
|
11998
12196
|
const toolbarOption = this.toolbarService.initialize(toolbarItems, toolbar === null || toolbar === void 0 ? void 0 : toolbar.global, toolbar === null || toolbar === void 0 ? void 0 : toolbar.inline, toolbar === null || toolbar === void 0 ? void 0 : toolbar.quick);
|
|
@@ -12003,7 +12201,6 @@ class TheEditorComponent extends mixinUnsubscribe(MixinBase) {
|
|
|
12003
12201
|
this.theGlobalToolbarInstance.toolbarItems = toolbarOption.toolbarEntity.global;
|
|
12004
12202
|
this.theGlobalToolbarInstance.containerClass = this.globalToolbarClass;
|
|
12005
12203
|
this.theGlobalToolbarInstance.align = toolbar === null || toolbar === void 0 ? void 0 : toolbar.align;
|
|
12006
|
-
this.theGlobalToolbarInstance.fontSize = (_b = this.theOptions) === null || _b === void 0 ? void 0 : _b.fontSize;
|
|
12007
12204
|
this.theGlobalToolbarInstance.setToolbarClass();
|
|
12008
12205
|
this.theGlobalToolbarInstance.renderToolbarView();
|
|
12009
12206
|
}
|
|
@@ -12013,6 +12210,7 @@ class TheEditorComponent extends mixinUnsubscribe(MixinBase) {
|
|
|
12013
12210
|
const data = dataDeserialize((_a = this.theOptions) === null || _a === void 0 ? void 0 : _a.mode, value);
|
|
12014
12211
|
// data-deserialize
|
|
12015
12212
|
this.editorValue = data;
|
|
12213
|
+
this.cdr.markForCheck();
|
|
12016
12214
|
}
|
|
12017
12215
|
registerOnChange(fn) {
|
|
12018
12216
|
this.onChangeCallback = fn;
|
|
@@ -12022,13 +12220,16 @@ class TheEditorComponent extends mixinUnsubscribe(MixinBase) {
|
|
|
12022
12220
|
}
|
|
12023
12221
|
valueChange(value) {
|
|
12024
12222
|
var _a, _b, _c, _d, _e, _f;
|
|
12025
|
-
(_a = this.
|
|
12026
|
-
(
|
|
12027
|
-
|
|
12223
|
+
const isEditable = !((_a = this.theOptions) === null || _a === void 0 ? void 0 : _a.readonly) && !((_b = this.theOptions) === null || _b === void 0 ? void 0 : _b.disabled);
|
|
12224
|
+
(_c = this.theGlobalToolbarInstance) === null || _c === void 0 ? void 0 : _c.statusChange(this.editor);
|
|
12225
|
+
// quick insert button
|
|
12226
|
+
if (isEditable) {
|
|
12227
|
+
(_d = this.quickInsertInstance) === null || _d === void 0 ? void 0 : _d.checkStatus();
|
|
12228
|
+
}
|
|
12028
12229
|
// auto scroll view
|
|
12029
|
-
const scrollContainer = (
|
|
12030
|
-
const maxHeight = (
|
|
12031
|
-
if (
|
|
12230
|
+
const scrollContainer = (_e = this.theOptions) === null || _e === void 0 ? void 0 : _e.scrollContainer;
|
|
12231
|
+
const maxHeight = (_f = this.theOptions) === null || _f === void 0 ? void 0 : _f.maxHeight;
|
|
12232
|
+
if (isEditable && (scrollContainer || maxHeight)) {
|
|
12032
12233
|
const container = maxHeight ? DEFAULT_SCROLL_CONTAINER : scrollContainer;
|
|
12033
12234
|
this.autoScrollView(this.editor, container);
|
|
12034
12235
|
}
|
|
@@ -12143,8 +12344,8 @@ class TheEditorComponent extends mixinUnsubscribe(MixinBase) {
|
|
|
12143
12344
|
};
|
|
12144
12345
|
}
|
|
12145
12346
|
}
|
|
12146
|
-
TheEditorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
12147
|
-
TheEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
12347
|
+
TheEditorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheEditorComponent, deps: [{ token: TheToolbarService }, { token: TheContextService }, { token: i0.ViewContainerRef }, { token: i0.ElementRef }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
12348
|
+
TheEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheEditorComponent, selector: "the-editor, theEditor", inputs: { theOptions: "theOptions", thePlugins: "thePlugins", theGlobalToolbar: "theGlobalToolbar", theDecorate: "theDecorate", theOnError: "theOnError" }, outputs: { theOnSave: "theOnSave", theOnDOMEvent: "theOnDOMEvent", theEditorCreated: "theEditorCreated" }, host: { properties: { "class.the-editor-readonly": "theOptions?.readonly" }, classAttribute: "the-editor" }, providers: [
|
|
12148
12349
|
TheToolbarService,
|
|
12149
12350
|
TheContextService,
|
|
12150
12351
|
TheColorSelectService,
|
|
@@ -12153,12 +12354,13 @@ TheEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ver
|
|
|
12153
12354
|
useExisting: forwardRef(() => TheEditorComponent),
|
|
12154
12355
|
multi: true
|
|
12155
12356
|
}
|
|
12156
|
-
], viewQueries: [{ propertyName: "templateInstance", first: true, predicate: ["templateInstance"], descendants: true, static: true }, { propertyName: "globalToolbarInstance", first: true, predicate: ["globalToolbar"], descendants: true }, { propertyName: "quickInsertInstance", first: true, predicate: ["quickInsert"], descendants: true, static: true }
|
|
12157
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
12357
|
+
], viewQueries: [{ propertyName: "templateInstance", first: true, predicate: ["templateInstance"], descendants: true, static: true }, { propertyName: "globalToolbarInstance", first: true, predicate: ["globalToolbar"], descendants: true }, { propertyName: "quickInsertInstance", first: true, predicate: ["quickInsert"], descendants: true, static: 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 class=\"the-editable-container\"\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 *ngIf=\"!theOptions?.readonly\" [editor]=\"editor\" [toolbarItems]=\"toolbarEntity.inline\"></the-inline-toolbar>\n <div\n #quickInsert\n theQuickInsert\n [editor]=\"editor\"\n [quickToolbarItems]=\"quickToolbarItems\"\n [isVisible]=\"theOptions?.quickInsertVisible\"\n ></div>\n <the-template #templateInstance></the-template>\n</div>\n", components: [{ type: TheToolbarComponent, selector: "the-toolbar", inputs: ["editor", "toolbarItems", "align", "containerClass", "isMore", "afterTemplate"] }, { 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"] }, { type: TheInlineToolbarComponent, selector: "the-inline-toolbar", inputs: ["editor", "toolbarItems"] }, { type: TheQuickInsertComponent, selector: "[theQuickInsert]", inputs: ["editor", "quickToolbarItems", "isVisible"] }, { type: TheTemplateComponent, selector: "the-template,[theTemplate]" }], directives: [{ type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i6.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i4$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
12358
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheEditorComponent, decorators: [{
|
|
12158
12359
|
type: Component,
|
|
12159
12360
|
args: [{
|
|
12160
12361
|
selector: 'the-editor, theEditor',
|
|
12161
12362
|
templateUrl: 'editor.component.html',
|
|
12363
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
12162
12364
|
providers: [
|
|
12163
12365
|
TheToolbarService,
|
|
12164
12366
|
TheContextService,
|
|
@@ -12174,7 +12376,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImpor
|
|
|
12174
12376
|
'[class.the-editor-readonly]': 'theOptions?.readonly'
|
|
12175
12377
|
}
|
|
12176
12378
|
}]
|
|
12177
|
-
}], ctorParameters: function () { return [{ type: TheToolbarService }, { type: TheContextService }, { type: i0.ViewContainerRef }, { type: i0.ElementRef }, { type: i0.NgZone }]; }, propDecorators: { theOptions: [{
|
|
12379
|
+
}], ctorParameters: function () { return [{ type: TheToolbarService }, { type: TheContextService }, { type: i0.ViewContainerRef }, { type: i0.ElementRef }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { theOptions: [{
|
|
12178
12380
|
type: Input
|
|
12179
12381
|
}], thePlugins: [{
|
|
12180
12382
|
type: Input
|
|
@@ -12199,19 +12401,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImpor
|
|
|
12199
12401
|
}], quickInsertInstance: [{
|
|
12200
12402
|
type: ViewChild,
|
|
12201
12403
|
args: ['quickInsert', { static: true }]
|
|
12202
|
-
}], placeholderInstance: [{
|
|
12203
|
-
type: ViewChild,
|
|
12204
|
-
args: ['placeholder']
|
|
12205
12404
|
}] } });
|
|
12206
12405
|
|
|
12207
12406
|
const ENTRY_COMMON_COMPONENTS = [TheColumnResizeOverlayHandleComponent];
|
|
12208
12407
|
const DIRECTIVES = [TheColumnResizeDirective];
|
|
12209
12408
|
class TheColumnResizeCommonModule {
|
|
12210
12409
|
}
|
|
12211
|
-
TheColumnResizeCommonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
12212
|
-
TheColumnResizeCommonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.
|
|
12213
|
-
TheColumnResizeCommonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.
|
|
12214
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
12410
|
+
TheColumnResizeCommonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheColumnResizeCommonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
12411
|
+
TheColumnResizeCommonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheColumnResizeCommonModule, declarations: [TheColumnResizeOverlayHandleComponent], exports: [TheColumnResizeOverlayHandleComponent] });
|
|
12412
|
+
TheColumnResizeCommonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheColumnResizeCommonModule });
|
|
12413
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheColumnResizeCommonModule, decorators: [{
|
|
12215
12414
|
type: NgModule,
|
|
12216
12415
|
args: [{
|
|
12217
12416
|
declarations: ENTRY_COMMON_COMPONENTS,
|
|
@@ -12221,10 +12420,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImpor
|
|
|
12221
12420
|
}] });
|
|
12222
12421
|
class TheColumnSizeModule {
|
|
12223
12422
|
}
|
|
12224
|
-
TheColumnSizeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
12225
|
-
TheColumnSizeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.
|
|
12226
|
-
TheColumnSizeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.
|
|
12227
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
12423
|
+
TheColumnSizeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheColumnSizeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
12424
|
+
TheColumnSizeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheColumnSizeModule, declarations: [TheColumnResizeDirective], imports: [OverlayModule, TheColumnResizeCommonModule], exports: [TheColumnResizeDirective] });
|
|
12425
|
+
TheColumnSizeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheColumnSizeModule, imports: [[OverlayModule, TheColumnResizeCommonModule]] });
|
|
12426
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheColumnSizeModule, decorators: [{
|
|
12228
12427
|
type: NgModule,
|
|
12229
12428
|
args: [{
|
|
12230
12429
|
imports: [OverlayModule, TheColumnResizeCommonModule],
|
|
@@ -12316,9 +12515,9 @@ class TheToolbarGroupComponent {
|
|
|
12316
12515
|
}
|
|
12317
12516
|
}
|
|
12318
12517
|
}
|
|
12319
|
-
TheToolbarGroupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
12320
|
-
TheToolbarGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
12321
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
12518
|
+
TheToolbarGroupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheToolbarGroupComponent, deps: [{ token: i0.ElementRef }, { token: i1$3.ThyPopover }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
12519
|
+
TheToolbarGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheToolbarGroupComponent, selector: "the-toolbar-group", inputs: { menus: "menus", item: "item" }, host: { listeners: { "mousedown": "mousedownHandler($event)", "click": "clickHandle($event)" }, classAttribute: "the-toolbar-group" }, viewQueries: [{ propertyName: "groupTemplate", first: true, predicate: ["groupTemplate"], descendants: true, read: TemplateRef, static: true }], ngImport: i0, template: "<a thyIconNavLink [thyIconNavLinkIcon]=\"item.icon\" [thyTooltip]=\"item?.name\" thyTooltipPlacement=\"top\" [thyIconNavLinkActive]=\"active\"></a>\n\n<ng-template #groupTemplate>\n <the-toolbar class=\"group\" [editor]=\"editor\" [toolbarItems]=\"menus\" [isMore]=\"false\"></the-toolbar>\n</ng-template>\n", components: [{ type: i3.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: TheToolbarComponent, selector: "the-toolbar", inputs: ["editor", "toolbarItems", "align", "containerClass", "isMore", "afterTemplate"] }], directives: [{ type: i5$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }] });
|
|
12520
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheToolbarGroupComponent, decorators: [{
|
|
12322
12521
|
type: Component,
|
|
12323
12522
|
args: [{
|
|
12324
12523
|
selector: 'the-toolbar-group',
|
|
@@ -12399,13 +12598,13 @@ const PLUGIN_COMPONENTS = [
|
|
|
12399
12598
|
TheTableComponent,
|
|
12400
12599
|
TheTableRowComponent,
|
|
12401
12600
|
TheTdComponent,
|
|
12402
|
-
|
|
12601
|
+
TheInlineCodeComponent
|
|
12403
12602
|
];
|
|
12404
12603
|
const PIPES = [ElementStylePipe, ElementClassPipe];
|
|
12405
12604
|
class TheEditorModule {
|
|
12406
12605
|
}
|
|
12407
|
-
TheEditorModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
12408
|
-
TheEditorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.
|
|
12606
|
+
TheEditorModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheEditorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
12607
|
+
TheEditorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheEditorModule, declarations: [TheEditorComponent, ElementStylePipe, ElementClassPipe, TheToolbarComponent,
|
|
12409
12608
|
TheToolbarDropdownComponent,
|
|
12410
12609
|
TheToolbarGroupComponent,
|
|
12411
12610
|
TheToolbarItemComponent,
|
|
@@ -12439,7 +12638,7 @@ TheEditorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version
|
|
|
12439
12638
|
TheTableComponent,
|
|
12440
12639
|
TheTableRowComponent,
|
|
12441
12640
|
TheTdComponent,
|
|
12442
|
-
|
|
12641
|
+
TheInlineCodeComponent], imports: [CommonModule, SlateModule, FormsModule, ThyIconModule,
|
|
12443
12642
|
ThyAvatarModule,
|
|
12444
12643
|
ThyNavModule,
|
|
12445
12644
|
ThyFormModule,
|
|
@@ -12456,14 +12655,14 @@ TheEditorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version
|
|
|
12456
12655
|
ThyAlertModule,
|
|
12457
12656
|
ThyResizableModule,
|
|
12458
12657
|
ThySwitchModule, CodemirrorModule, TheColumnSizeModule], exports: [TheEditorComponent, TheToolbarComponent, TheToolbarDropdownComponent, TheToolbarItemComponent, TheDefaultElementComponent] });
|
|
12459
|
-
TheEditorModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.
|
|
12658
|
+
TheEditorModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheEditorModule, providers: [
|
|
12460
12659
|
{
|
|
12461
12660
|
provide: TheToolbarGroupToken,
|
|
12462
12661
|
useValue: TheToolbarGroupComponent
|
|
12463
12662
|
},
|
|
12464
12663
|
THE_CODE_MODE_PROVIDER
|
|
12465
12664
|
], imports: [[CommonModule, SlateModule, FormsModule, ...TETHYS, CodemirrorModule, TheColumnSizeModule]] });
|
|
12466
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
12665
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheEditorModule, decorators: [{
|
|
12467
12666
|
type: NgModule,
|
|
12468
12667
|
args: [{
|
|
12469
12668
|
declarations: [TheEditorComponent, ...PIPES, ...COMPONENTS, ...PLUGIN_COMPONENTS],
|
|
@@ -12488,5 +12687,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImpor
|
|
|
12488
12687
|
* Generated bundle index. Do not edit.
|
|
12489
12688
|
*/
|
|
12490
12689
|
|
|
12491
|
-
export { ALIGN_BLOCK_TYPES, A_TAG_REL_ATTR, AlignEditor, Alignment, BLOCK_DELETEBACKWARD_TYPES, BlockquoteEditor, CLIPBOARD_FORMAT_KEY, CODEMIRROR_PADDING_TOP, CODE_MODES, COMPONENTS, CONTAINER_BLOCKS, CONTROL_KEY, CodeEditor, CodeMode, ColorEditor, DEFAULT_LANGUAGE, DEFAULT_SCROLL_CONTAINER, DefaultElementOptions, DefaultGlobalToolbarDefinition, DefaultInlineToolbarDefinition, DefaultQuickToolbarDefinition, DropdownMode, ELEMENT_UNIQUE_ID, ElementKinds, ErrorCodes, FontSizeTypes, FontSizes, HEADING_TYPES, HeadingEditor, HrEditor, IS_MAC, ImageEditor, LINK_DEFAULT_TEXT, LIST_BLOCK_TYPES, LinkEditor, ListEditor, MarkEditor, MarkProps, MarkTypes, PICTURE_ACCEPTED_UPLOAD_MIME, PICTURE_ACCEPTED_UPLOAD_SIZE, PLUGIN_COMPONENTS, QUICK_TOOLBAR_HOTKEY, QuickInsertEditor, STANDARD_HEADING_TYPES, TAB_SPACE, THE_CODE_MODE_PROVIDER, THE_CODE_MODE_TOKEN, THE_EDITOR_CONVERSION_HINT_REF, THE_EDITOR_QUICK_TOOLBAR_REF, THE_EDITOR_UUID, THE_INLINE_TOOLBAR_TYPES, THE_UPLOAD_SERVICE_TOKEN, TableEditor, TheBaseElementComponent, TheCodeConfig, TheContextService, TheDataMode, TheDefaultElementComponent, TheEditor, TheEditorComponent, TheEditorModule, TheImageComponent, TheMode, index$1 as TheQueries, TheToolbarBaseItemComponent, TheToolbarComponent, TheToolbarDropdownComponent, TheToolbarGroupComponent, TheToolbarGroupToken, TheToolbarItemComponent, TheToolbarService, index as TheTransforms, TodoItemEditor, ToolbarActionTypes, ToolbarAlignment, ToolbarItemMode, ToolbarItemType, ToolbarMoreGroup, VOID_BLOCK_TYPES, VerticalAlignEditor, VerticalAlignment, createEmptyParagraph, dataDeserialize, dataSerializing, getToolbarClass, htmlToTheia, inValidTypes, plainToTheia, toolbarCompose, withTheEditor };
|
|
12690
|
+
export { ALIGN_BLOCK_TYPES, A_TAG_REL_ATTR, AlignEditor, Alignment, BLOCK_DELETEBACKWARD_TYPES, BlockquoteEditor, CLIPBOARD_FORMAT_KEY, CODEMIRROR_PADDING_TOP, CODE_MODES, COMPONENTS, CONTAINER_BLOCKS, CONTROL_KEY, CodeEditor, CodeMode, ColorEditor, DEFAULT_LANGUAGE, DEFAULT_SCROLL_CONTAINER, DefaultElementOptions, DefaultGlobalToolbarDefinition, DefaultInlineToolbarDefinition, DefaultQuickToolbarDefinition, DropdownMode, ELEMENT_UNIQUE_ID, ElementKinds, ErrorCodes, FontSizeTypes, FontSizes, HEADING_TYPES, HeadingEditor, HrEditor, IS_MAC, ImageEditor, LINK_DEFAULT_TEXT, LIST_BLOCK_TYPES, LinkEditor, ListEditor, MarkEditor, MarkProps, MarkTypes, PICTURE_ACCEPTED_UPLOAD_MIME, PICTURE_ACCEPTED_UPLOAD_SIZE, PLUGIN_COMPONENTS, QUICK_TOOLBAR_HOTKEY, QuickInsertEditor, STANDARD_HEADING_TYPES, TAB_SPACE, THE_CODE_MODE_PROVIDER, THE_CODE_MODE_TOKEN, THE_EDITOR_CONVERSION_HINT_REF, THE_EDITOR_QUICK_TOOLBAR_REF, THE_EDITOR_UUID, THE_INLINE_TOOLBAR_TYPES, THE_UPLOAD_SERVICE_TOKEN, TableEditor, TheBaseElementComponent, TheCodeConfig, TheContextService, TheDataMode, TheDefaultElementComponent, TheEditor, TheEditorComponent, TheEditorModule, TheImageComponent, TheMode, index$1 as TheQueries, TheToolbarBaseItemComponent, TheToolbarComponent, TheToolbarDropdownComponent, TheToolbarGroupComponent, TheToolbarGroupToken, TheToolbarItemComponent, TheToolbarService, index as TheTransforms, TodoItemEditor, ToolbarActionTypes, ToolbarAlignment, ToolbarItemMode, ToolbarItemType, ToolbarMoreGroup, VOID_BLOCK_TYPES, VerticalAlignEditor, VerticalAlignment, ZERO_WIDTH_CHAR, createEmptyParagraph, dataDeserialize, dataSerializing, getToolbarClass, htmlToTheia, inValidTypes, isCleanEmptyParagraph, plainToTheia, toolbarCompose, withTheEditor };
|
|
12492
12691
|
//# sourceMappingURL=worktile-theia.js.map
|