@worktile/theia 2.1.3 → 2.1.7
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 +580 -378
- 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/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 +27 -0
- package/esm2015/plugins/inline-code/inline-code.editor.js +45 -0
- package/esm2015/plugins/inline-code/inline-code.plugin.js +46 -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 +13 -11
- package/esm2015/plugins/list/components/bulleted-list.component.js +4 -4
- package/esm2015/plugins/list/components/list-item.component.js +72 -4
- 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 +548 -361
- 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 +17 -1
- package/plugins/font-size/font-size.editor.d.ts +2 -0
- package/plugins/inline-code/inline-code.component.d.ts +14 -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/list/components/list-item.component.d.ts +7 -0
- 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 +20 -1
- 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
|
@@ -378,6 +378,7 @@
|
|
|
378
378
|
var CLIPBOARD_FORMAT_KEY = 'x-theia-fragment';
|
|
379
379
|
var DEFAULT_SCROLL_CONTAINER = '.the-editable-container';
|
|
380
380
|
var ELEMENT_UNIQUE_ID = 'key';
|
|
381
|
+
var ZERO_WIDTH_CHAR = '\u200B';
|
|
381
382
|
exports.TheMode = void 0;
|
|
382
383
|
(function (TheMode) {
|
|
383
384
|
TheMode["fullMode"] = "full";
|
|
@@ -408,6 +409,7 @@
|
|
|
408
409
|
ElementKinds["hr"] = "hr";
|
|
409
410
|
ElementKinds["link"] = "link";
|
|
410
411
|
ElementKinds["default"] = "paragraph";
|
|
412
|
+
ElementKinds["inlineCode"] = "inline-code";
|
|
411
413
|
})(exports.ElementKinds || (exports.ElementKinds = {}));
|
|
412
414
|
exports.Alignment = void 0;
|
|
413
415
|
(function (Alignment) {
|
|
@@ -457,8 +459,8 @@
|
|
|
457
459
|
MarkTypes["strike"] = "strike";
|
|
458
460
|
MarkTypes["color"] = "color";
|
|
459
461
|
MarkTypes["backgroundColor"] = "background-color";
|
|
460
|
-
MarkTypes["codeLine"] = "code-line";
|
|
461
462
|
MarkTypes["fontSize"] = "font-size";
|
|
463
|
+
MarkTypes["codeLine"] = "code-line";
|
|
462
464
|
})(exports.MarkTypes || (exports.MarkTypes = {}));
|
|
463
465
|
exports.ToolbarActionTypes = void 0;
|
|
464
466
|
(function (ToolbarActionTypes) {
|
|
@@ -483,12 +485,12 @@
|
|
|
483
485
|
var MarkProps = [
|
|
484
486
|
exports.MarkTypes.backgroundColor,
|
|
485
487
|
exports.MarkTypes.bold,
|
|
486
|
-
exports.MarkTypes.codeLine,
|
|
487
488
|
exports.MarkTypes.color,
|
|
488
489
|
exports.MarkTypes.italic,
|
|
489
490
|
exports.MarkTypes.strike,
|
|
490
491
|
exports.MarkTypes.underline,
|
|
491
|
-
exports.MarkTypes.fontSize
|
|
492
|
+
exports.MarkTypes.fontSize,
|
|
493
|
+
exports.MarkTypes.codeLine
|
|
492
494
|
];
|
|
493
495
|
var THE_INLINE_TOOLBAR_TYPES = [exports.ElementKinds.default, exports.ElementKinds.listItem, exports.ElementKinds.checkItem];
|
|
494
496
|
var STANDARD_HEADING_TYPES = [
|
|
@@ -518,13 +520,12 @@
|
|
|
518
520
|
})(exports.ToolbarItemMode || (exports.ToolbarItemMode = {}));
|
|
519
521
|
var DefaultGlobalToolbarDefinition = [
|
|
520
522
|
exports.ElementKinds.headingList,
|
|
521
|
-
exports.MarkTypes.fontSize,
|
|
522
523
|
exports.ToolbarActionTypes.split,
|
|
523
524
|
exports.MarkTypes.bold,
|
|
524
525
|
exports.MarkTypes.italic,
|
|
525
526
|
exports.MarkTypes.underline,
|
|
526
527
|
exports.MarkTypes.strike,
|
|
527
|
-
exports.
|
|
528
|
+
exports.ElementKinds.inlineCode,
|
|
528
529
|
exports.MarkTypes.color,
|
|
529
530
|
exports.MarkTypes.backgroundColor,
|
|
530
531
|
exports.ToolbarActionTypes.split,
|
|
@@ -533,7 +534,6 @@
|
|
|
533
534
|
exports.ToolbarActionTypes.split,
|
|
534
535
|
exports.ElementKinds.numberedList,
|
|
535
536
|
exports.ElementKinds.bulletedList,
|
|
536
|
-
exports.ElementKinds.checkItem,
|
|
537
537
|
exports.ToolbarActionTypes.split,
|
|
538
538
|
exports.ElementKinds.link,
|
|
539
539
|
exports.ElementKinds.image,
|
|
@@ -548,7 +548,7 @@
|
|
|
548
548
|
exports.MarkTypes.italic,
|
|
549
549
|
exports.MarkTypes.underline,
|
|
550
550
|
exports.MarkTypes.strike,
|
|
551
|
-
exports.
|
|
551
|
+
exports.ElementKinds.inlineCode,
|
|
552
552
|
exports.MarkTypes.color,
|
|
553
553
|
exports.MarkTypes.backgroundColor,
|
|
554
554
|
exports.ToolbarActionTypes.split,
|
|
@@ -560,7 +560,6 @@
|
|
|
560
560
|
exports.ToolbarActionTypes.split,
|
|
561
561
|
exports.ElementKinds.numberedList,
|
|
562
562
|
exports.ElementKinds.bulletedList,
|
|
563
|
-
exports.ElementKinds.checkItem,
|
|
564
563
|
exports.ToolbarActionTypes.split,
|
|
565
564
|
exports.ElementKinds.link,
|
|
566
565
|
exports.ElementKinds.image,
|
|
@@ -713,9 +712,9 @@
|
|
|
713
712
|
};
|
|
714
713
|
return TheTextComponent;
|
|
715
714
|
}(i1.BaseTextComponent));
|
|
716
|
-
TheTextComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
717
|
-
TheTextComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
718
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
715
|
+
TheTextComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheTextComponent, deps: [{ token: i0__namespace.ElementRef }, { token: i0__namespace.Renderer2 }, { token: i0__namespace.ChangeDetectorRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
716
|
+
TheTextComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheTextComponent, selector: "span[theText]", host: { attributes: { "data-slate-node": "text" } }, usesInheritance: true, ngImport: i0__namespace, template: "<slate-leaves [context]=\"context\" [viewContext]=\"viewContext\"></slate-leaves>", isInline: true, components: [{ type: i1__namespace.SlateLeavesComponent, selector: "slate-leaves", inputs: ["context"] }] });
|
|
717
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheTextComponent, decorators: [{
|
|
719
718
|
type: i0.Component,
|
|
720
719
|
args: [{
|
|
721
720
|
selector: 'span[theText]',
|
|
@@ -739,9 +738,9 @@
|
|
|
739
738
|
};
|
|
740
739
|
return TheBaseElementComponent;
|
|
741
740
|
}(i1.BaseElementComponent));
|
|
742
|
-
TheBaseElementComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
743
|
-
TheBaseElementComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
744
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
741
|
+
TheBaseElementComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheBaseElementComponent, deps: null, target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
742
|
+
TheBaseElementComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheBaseElementComponent, selector: "TheBaseElementComponent", usesInheritance: true, ngImport: i0__namespace, template: '', isInline: true });
|
|
743
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheBaseElementComponent, decorators: [{
|
|
745
744
|
type: i0.Component,
|
|
746
745
|
args: [{
|
|
747
746
|
selector: 'TheBaseElementComponent',
|
|
@@ -756,9 +755,9 @@
|
|
|
756
755
|
}
|
|
757
756
|
return TheDefaultElementComponent;
|
|
758
757
|
}(TheBaseElementComponent));
|
|
759
|
-
TheDefaultElementComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
760
|
-
TheDefaultElementComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
761
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
758
|
+
TheDefaultElementComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheDefaultElementComponent, deps: null, target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
759
|
+
TheDefaultElementComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheDefaultElementComponent, selector: "[theDefaultElement]", usesInheritance: true, ngImport: i0__namespace, template: '<slate-children [children]="children" [context]="childrenContext" [viewContext]="viewContext"></slate-children>', isInline: true, components: [{ type: i1__namespace.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
760
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheDefaultElementComponent, decorators: [{
|
|
762
761
|
type: i0.Component,
|
|
763
762
|
args: [{
|
|
764
763
|
selector: '[theDefaultElement]',
|
|
@@ -1939,9 +1938,6 @@
|
|
|
1939
1938
|
var aboveResult = slate.Editor.above(editor, {
|
|
1940
1939
|
match: function (n) { return slate.Editor.isBlock(editor, n) && n.type === type; }
|
|
1941
1940
|
});
|
|
1942
|
-
if (isEnd) {
|
|
1943
|
-
editor.marks = {};
|
|
1944
|
-
}
|
|
1945
1941
|
if (aboveResult && aboveResult[0] && isEnd && isEmpty) {
|
|
1946
1942
|
var wrapBlock = aboveResult[0];
|
|
1947
1943
|
if (wrapBlock.type === type) {
|
|
@@ -2163,6 +2159,50 @@
|
|
|
2163
2159
|
}
|
|
2164
2160
|
};
|
|
2165
2161
|
|
|
2162
|
+
var InlineCodeEditor = {
|
|
2163
|
+
toggleInlineCode: function (editor, text) {
|
|
2164
|
+
var isActive = InlineCodeEditor.isInlineCodeActive(editor);
|
|
2165
|
+
if (isActive) {
|
|
2166
|
+
InlineCodeEditor.unwrapInlineCode(editor);
|
|
2167
|
+
return;
|
|
2168
|
+
}
|
|
2169
|
+
if (slate.Range.isCollapsed(editor.selection)) {
|
|
2170
|
+
InlineCodeEditor.wrapInlineCode(editor, text);
|
|
2171
|
+
}
|
|
2172
|
+
else {
|
|
2173
|
+
var fragment = slate.Node.fragment(editor, editor.selection)[0];
|
|
2174
|
+
var selectNode = slate.Node.get(fragment, []);
|
|
2175
|
+
var selectText = slate.Node.string(selectNode);
|
|
2176
|
+
InlineCodeEditor.wrapInlineCode(editor, selectText);
|
|
2177
|
+
}
|
|
2178
|
+
},
|
|
2179
|
+
wrapInlineCode: function (editor, text) {
|
|
2180
|
+
if (text === void 0) { text = ''; }
|
|
2181
|
+
if (InlineCodeEditor.isInlineCodeActive(editor)) {
|
|
2182
|
+
InlineCodeEditor.unwrapInlineCode(editor);
|
|
2183
|
+
}
|
|
2184
|
+
var selection = editor.selection;
|
|
2185
|
+
var isCollapsed = selection && slate.Range.isCollapsed(selection);
|
|
2186
|
+
var inlineCode = {
|
|
2187
|
+
type: exports.ElementKinds.inlineCode,
|
|
2188
|
+
children: isCollapsed ? [{ text: text ? text : ZERO_WIDTH_CHAR }] : []
|
|
2189
|
+
};
|
|
2190
|
+
if (isCollapsed) {
|
|
2191
|
+
slate.Transforms.insertNodes(editor, inlineCode);
|
|
2192
|
+
}
|
|
2193
|
+
else {
|
|
2194
|
+
slate.Transforms.wrapNodes(editor, inlineCode, { split: true });
|
|
2195
|
+
}
|
|
2196
|
+
},
|
|
2197
|
+
unwrapInlineCode: function (editor) {
|
|
2198
|
+
slate.Transforms.unwrapNodes(editor, { match: function (n) { return slate.Element.isElement(n) && n.type === exports.ElementKinds.inlineCode; } });
|
|
2199
|
+
},
|
|
2200
|
+
isInlineCodeActive: function (editor) {
|
|
2201
|
+
var _a = __read(slate.Editor.nodes(editor, { match: function (n) { return slate.Element.isElement(n) && n.type === exports.ElementKinds.inlineCode; } }), 1), inlineCode = _a[0];
|
|
2202
|
+
return !!inlineCode;
|
|
2203
|
+
}
|
|
2204
|
+
};
|
|
2205
|
+
|
|
2166
2206
|
var autoFormatRules = [
|
|
2167
2207
|
{
|
|
2168
2208
|
type: exports.ElementKinds.heading_1,
|
|
@@ -2220,10 +2260,13 @@
|
|
|
2220
2260
|
insertTrigger: true
|
|
2221
2261
|
},
|
|
2222
2262
|
{
|
|
2223
|
-
type: exports.
|
|
2263
|
+
type: exports.ElementKinds.inlineCode,
|
|
2224
2264
|
between: ['`', '`'],
|
|
2225
2265
|
mode: 'inline',
|
|
2226
|
-
|
|
2266
|
+
format: function (editor, text) {
|
|
2267
|
+
InlineCodeEditor.toggleInlineCode(editor, text);
|
|
2268
|
+
slate.Transforms.select(editor, slate.Editor.after(editor, editor.selection));
|
|
2269
|
+
}
|
|
2227
2270
|
},
|
|
2228
2271
|
{
|
|
2229
2272
|
type: exports.MarkTypes.strike,
|
|
@@ -2338,9 +2381,9 @@
|
|
|
2338
2381
|
};
|
|
2339
2382
|
return TheConversionHintComponent;
|
|
2340
2383
|
}());
|
|
2341
|
-
TheConversionHintComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
2342
|
-
TheConversionHintComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
2343
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
2384
|
+
TheConversionHintComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheConversionHintComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
2385
|
+
TheConversionHintComponent.ɵcmp = i0__namespace.ɵɵ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__namespace, 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__namespace$1.ThyAlertComponent, selector: "thy-alert", inputs: ["thyType", "thyMessage", "thyIcon", "thyCloseable"] }], directives: [{ type: i1__namespace$1.ThyAlertActionItemDirective, selector: "[thyAlertActionItem]" }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
2386
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheConversionHintComponent, decorators: [{
|
|
2344
2387
|
type: i0.Component,
|
|
2345
2388
|
args: [{
|
|
2346
2389
|
selector: 'the-conversion-hint',
|
|
@@ -2421,6 +2464,35 @@
|
|
|
2421
2464
|
var IS_MAC = typeof window != 'undefined' && /Mac|iPod|iPhone|iPad/.test(window.navigator.platform);
|
|
2422
2465
|
var CONTROL_KEY = IS_MAC ? '⌘' : 'Ctrl';
|
|
2423
2466
|
|
|
2467
|
+
/**
|
|
2468
|
+
* whether the current node is a clean paragraph
|
|
2469
|
+
* @param editor
|
|
2470
|
+
* @param text
|
|
2471
|
+
* @returns boolean
|
|
2472
|
+
*/
|
|
2473
|
+
var isCleanEmptyParagraph = function (editor) {
|
|
2474
|
+
var isCollapsedCursor = TheEditor.isFocused(editor) && editor.selection && slate.Range.isCollapsed(editor.selection);
|
|
2475
|
+
if (!isCollapsedCursor) {
|
|
2476
|
+
return false;
|
|
2477
|
+
}
|
|
2478
|
+
var block = slate.Node.ancestor(editor, [editor.selection.anchor.path[0]]);
|
|
2479
|
+
var textIndent = 'textIndent';
|
|
2480
|
+
var align = 'align';
|
|
2481
|
+
var hasTextIndent = block[textIndent];
|
|
2482
|
+
var hasAlign = block[align];
|
|
2483
|
+
if (slate.Node.string(block) === '' &&
|
|
2484
|
+
slate.Element.isElement(block) &&
|
|
2485
|
+
block.type === exports.ElementKinds.paragraph &&
|
|
2486
|
+
block.children.length === 1 &&
|
|
2487
|
+
slate.Text.isText(block.children[0]) &&
|
|
2488
|
+
!slate.Editor.isVoid(editor, block) &&
|
|
2489
|
+
!hasTextIndent &&
|
|
2490
|
+
!hasAlign) {
|
|
2491
|
+
return true;
|
|
2492
|
+
}
|
|
2493
|
+
return false;
|
|
2494
|
+
};
|
|
2495
|
+
|
|
2424
2496
|
var withDeserializeMd = function (options) { return function (editor) {
|
|
2425
2497
|
var insertData = editor.insertData, onKeydown = editor.onKeydown;
|
|
2426
2498
|
editor.onKeydown = function (event) {
|
|
@@ -2708,6 +2780,13 @@
|
|
|
2708
2780
|
}
|
|
2709
2781
|
return this.options;
|
|
2710
2782
|
};
|
|
2783
|
+
TheContextService.prototype.getTheOptions = function () {
|
|
2784
|
+
return this.options.theOptions;
|
|
2785
|
+
};
|
|
2786
|
+
TheContextService.prototype.getDefaultFontSize = function () {
|
|
2787
|
+
var _a;
|
|
2788
|
+
return ((_a = this.options.theOptions) === null || _a === void 0 ? void 0 : _a.fontSize) || exports.FontSizes.fontSize14;
|
|
2789
|
+
};
|
|
2711
2790
|
TheContextService.prototype.getEditableElement = function () {
|
|
2712
2791
|
return this.options.nativeElement.querySelector('.the-editor-typo');
|
|
2713
2792
|
};
|
|
@@ -2723,9 +2802,9 @@
|
|
|
2723
2802
|
};
|
|
2724
2803
|
return TheContextService;
|
|
2725
2804
|
}());
|
|
2726
|
-
TheContextService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
2727
|
-
TheContextService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
2728
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
2805
|
+
TheContextService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheContextService, deps: [{ token: i0__namespace.NgZone }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
2806
|
+
TheContextService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheContextService });
|
|
2807
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheContextService, decorators: [{
|
|
2729
2808
|
type: i0.Injectable
|
|
2730
2809
|
}], ctorParameters: function () { return [{ type: i0__namespace.NgZone }]; } });
|
|
2731
2810
|
|
|
@@ -2915,9 +2994,9 @@
|
|
|
2915
2994
|
};
|
|
2916
2995
|
return TheImageComponent;
|
|
2917
2996
|
}(TheBaseElementComponent));
|
|
2918
|
-
TheImageComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
2919
|
-
TheImageComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
2920
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
2997
|
+
TheImageComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheImageComponent, deps: [{ token: i0__namespace.ElementRef }, { token: i1__namespace$2.DomSanitizer }, { token: THE_UPLOAD_SERVICE_TOKEN }, { token: i0__namespace.ChangeDetectorRef }, { token: TheContextService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
2998
|
+
TheImageComponent.ɵcmp = i0__namespace.ɵɵ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__namespace, 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__namespace.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }, { type: i4__namespace.ThyProgressComponent, selector: "thy-progress", inputs: ["thyType", "thySize", "thyValue", "thyMax", "thyTips"] }, { type: i4__namespace$1.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }], directives: [{ type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
|
|
2999
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheImageComponent, decorators: [{
|
|
2921
3000
|
type: i0.Component,
|
|
2922
3001
|
args: [{
|
|
2923
3002
|
selector: 'the-image, [theImage]',
|
|
@@ -3428,14 +3507,17 @@
|
|
|
3428
3507
|
}
|
|
3429
3508
|
else {
|
|
3430
3509
|
/**
|
|
3431
|
-
* If end,
|
|
3510
|
+
* If end, split nodes
|
|
3432
3511
|
*/
|
|
3433
3512
|
slate.Editor.withoutNormalizing(editor, function () {
|
|
3434
|
-
slate.Transforms.
|
|
3435
|
-
|
|
3436
|
-
|
|
3437
|
-
|
|
3438
|
-
|
|
3513
|
+
slate.Transforms.splitNodes(editor, {
|
|
3514
|
+
always: true,
|
|
3515
|
+
mode: 'highest',
|
|
3516
|
+
match: function (node) {
|
|
3517
|
+
var path = node && TheEditor.findPath(editor, node);
|
|
3518
|
+
return path && path.length === nextListItemPath_1.length;
|
|
3519
|
+
}
|
|
3520
|
+
});
|
|
3439
3521
|
});
|
|
3440
3522
|
}
|
|
3441
3523
|
/**
|
|
@@ -3711,9 +3793,9 @@
|
|
|
3711
3793
|
};
|
|
3712
3794
|
return ElementStylePipe;
|
|
3713
3795
|
}());
|
|
3714
|
-
ElementStylePipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
3715
|
-
ElementStylePipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.
|
|
3716
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
3796
|
+
ElementStylePipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ElementStylePipe, deps: [], target: i0__namespace.ɵɵFactoryTarget.Pipe });
|
|
3797
|
+
ElementStylePipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ElementStylePipe, name: "elementStyle" });
|
|
3798
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ElementStylePipe, decorators: [{
|
|
3717
3799
|
type: i0.Pipe,
|
|
3718
3800
|
args: [{
|
|
3719
3801
|
name: 'elementStyle'
|
|
@@ -3732,9 +3814,9 @@
|
|
|
3732
3814
|
};
|
|
3733
3815
|
return ElementClassPipe;
|
|
3734
3816
|
}());
|
|
3735
|
-
ElementClassPipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
3736
|
-
ElementClassPipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.
|
|
3737
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
3817
|
+
ElementClassPipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ElementClassPipe, deps: [], target: i0__namespace.ɵɵFactoryTarget.Pipe });
|
|
3818
|
+
ElementClassPipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ElementClassPipe, name: "elementClass" });
|
|
3819
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ElementClassPipe, decorators: [{
|
|
3738
3820
|
type: i0.Pipe,
|
|
3739
3821
|
args: [{
|
|
3740
3822
|
name: 'elementClass'
|
|
@@ -3772,9 +3854,9 @@
|
|
|
3772
3854
|
};
|
|
3773
3855
|
return TheNumberedListComponent;
|
|
3774
3856
|
}(TheBaseElementComponent));
|
|
3775
|
-
TheNumberedListComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
3776
|
-
TheNumberedListComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
3777
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
3857
|
+
TheNumberedListComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheNumberedListComponent, deps: [{ token: i0__namespace.ElementRef }, { token: i0__namespace.ChangeDetectorRef }, { token: ElementClassPipe }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
3858
|
+
TheNumberedListComponent.ɵcmp = i0__namespace.ɵɵ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__namespace, template: "<slate-children [children]=\"children\" [context]=\"childrenContext\" [viewContext]=\"viewContext\"></slate-children>", isInline: true, components: [{ type: i1__namespace.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }] });
|
|
3859
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheNumberedListComponent, decorators: [{
|
|
3778
3860
|
type: i0.Component,
|
|
3779
3861
|
args: [{
|
|
3780
3862
|
selector: 'ol[theOl]',
|
|
@@ -3813,9 +3895,9 @@
|
|
|
3813
3895
|
};
|
|
3814
3896
|
return TheBulletedListComponent;
|
|
3815
3897
|
}(TheBaseElementComponent));
|
|
3816
|
-
TheBulletedListComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
3817
|
-
TheBulletedListComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
3818
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
3898
|
+
TheBulletedListComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheBulletedListComponent, deps: [{ token: i0__namespace.ElementRef }, { token: i0__namespace.ChangeDetectorRef }, { token: ElementClassPipe }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
3899
|
+
TheBulletedListComponent.ɵcmp = i0__namespace.ɵɵ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__namespace, template: "<slate-children [children]=\"children\" [context]=\"childrenContext\" [viewContext]=\"viewContext\"></slate-children>", isInline: true, components: [{ type: i1__namespace.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }] });
|
|
3900
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheBulletedListComponent, decorators: [{
|
|
3819
3901
|
type: i0.Component,
|
|
3820
3902
|
args: [{
|
|
3821
3903
|
selector: 'ul[theUl]',
|
|
@@ -3838,14 +3920,89 @@
|
|
|
3838
3920
|
TheListItemComponent.prototype.ngOnInit = function () {
|
|
3839
3921
|
_super.prototype.ngOnInit.call(this);
|
|
3840
3922
|
};
|
|
3923
|
+
TheListItemComponent.prototype.onContextChange = function () {
|
|
3924
|
+
_super.prototype.onContextChange.call(this);
|
|
3925
|
+
this.addFontSize();
|
|
3926
|
+
this.addMultiDigit();
|
|
3927
|
+
};
|
|
3841
3928
|
TheListItemComponent.prototype.ngOnDestroy = function () {
|
|
3842
3929
|
_super.prototype.ngOnDestroy.call(this);
|
|
3843
3930
|
};
|
|
3931
|
+
TheListItemComponent.prototype.addFontSize = function () {
|
|
3932
|
+
var e_1, _c;
|
|
3933
|
+
var _a, _b;
|
|
3934
|
+
var firstText;
|
|
3935
|
+
try {
|
|
3936
|
+
for (var _d = __values(slate.Node.descendants(this.element)), _e = _d.next(); !_e.done; _e = _d.next()) {
|
|
3937
|
+
var entry = _e.value;
|
|
3938
|
+
var node = entry[0];
|
|
3939
|
+
if (slate.Text.isText(node) && !firstText) {
|
|
3940
|
+
firstText = node;
|
|
3941
|
+
break;
|
|
3942
|
+
}
|
|
3943
|
+
}
|
|
3944
|
+
}
|
|
3945
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
3946
|
+
finally {
|
|
3947
|
+
try {
|
|
3948
|
+
if (_e && !_e.done && (_c = _d.return)) _c.call(_d);
|
|
3949
|
+
}
|
|
3950
|
+
finally { if (e_1) throw e_1.error; }
|
|
3951
|
+
}
|
|
3952
|
+
if (!firstText) {
|
|
3953
|
+
return;
|
|
3954
|
+
}
|
|
3955
|
+
var text = firstText.text, rest = __rest(firstText, ["text"]);
|
|
3956
|
+
var size = rest[exports.MarkTypes.fontSize];
|
|
3957
|
+
if (size) {
|
|
3958
|
+
var sizeClass = "font-size-" + size;
|
|
3959
|
+
var isContains = (_b = (_a = this.elementRef.nativeElement) === null || _a === void 0 ? void 0 : _a.classList) === null || _b === void 0 ? void 0 : _b.contains(sizeClass);
|
|
3960
|
+
if (isContains) {
|
|
3961
|
+
return;
|
|
3962
|
+
}
|
|
3963
|
+
this.clearFontSize();
|
|
3964
|
+
this.elementRef.nativeElement.classList.add(sizeClass);
|
|
3965
|
+
this.fontSizeClass = sizeClass;
|
|
3966
|
+
}
|
|
3967
|
+
else {
|
|
3968
|
+
this.clearFontSize();
|
|
3969
|
+
}
|
|
3970
|
+
};
|
|
3971
|
+
TheListItemComponent.prototype.clearFontSize = function () {
|
|
3972
|
+
if (this.fontSizeClass) {
|
|
3973
|
+
this.elementRef.nativeElement.classList.remove(this.fontSizeClass);
|
|
3974
|
+
this.fontSizeClass = null;
|
|
3975
|
+
}
|
|
3976
|
+
};
|
|
3977
|
+
TheListItemComponent.prototype.getStart = function () {
|
|
3978
|
+
var parent = this.elementRef.nativeElement.closest('.slate-element-numbered-list');
|
|
3979
|
+
var start = (parent === null || parent === void 0 ? void 0 : parent.getAttribute('start')) || 1;
|
|
3980
|
+
return Number(start);
|
|
3981
|
+
};
|
|
3982
|
+
TheListItemComponent.prototype.getLiIndex = function () {
|
|
3983
|
+
var path = findPath(this.editor, this.element);
|
|
3984
|
+
var index = path[path.length - 1];
|
|
3985
|
+
return index || 0;
|
|
3986
|
+
};
|
|
3987
|
+
TheListItemComponent.prototype.addMultiDigit = function () {
|
|
3988
|
+
var start = this.getStart();
|
|
3989
|
+
var index = this.getLiIndex();
|
|
3990
|
+
var multiDigit = 'data-multi-digit';
|
|
3991
|
+
// start number + index
|
|
3992
|
+
// when it is greater than 9, it is a multi-digit serial number
|
|
3993
|
+
// exclude Font size >= 20
|
|
3994
|
+
if (start + index > 9) {
|
|
3995
|
+
this.elementRef.nativeElement.setAttribute(multiDigit, true);
|
|
3996
|
+
}
|
|
3997
|
+
else {
|
|
3998
|
+
this.elementRef.nativeElement.removeAttribute(multiDigit);
|
|
3999
|
+
}
|
|
4000
|
+
};
|
|
3844
4001
|
return TheListItemComponent;
|
|
3845
4002
|
}(TheBaseElementComponent));
|
|
3846
|
-
TheListItemComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
3847
|
-
TheListItemComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
3848
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
4003
|
+
TheListItemComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheListItemComponent, deps: [{ token: i0__namespace.ElementRef }, { token: i0__namespace.ChangeDetectorRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
4004
|
+
TheListItemComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheListItemComponent, selector: "li[theLi]", usesInheritance: true, ngImport: i0__namespace, template: "<slate-children [children]=\"children\" [context]=\"childrenContext\" [viewContext]=\"viewContext\"></slate-children>", isInline: true, components: [{ type: i1__namespace.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }] });
|
|
4005
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheListItemComponent, decorators: [{
|
|
3849
4006
|
type: i0.Component,
|
|
3850
4007
|
args: [{
|
|
3851
4008
|
selector: 'li[theLi]',
|
|
@@ -4172,9 +4329,9 @@
|
|
|
4172
4329
|
};
|
|
4173
4330
|
return TheTodoItemComponent;
|
|
4174
4331
|
}(TheBaseElementComponent));
|
|
4175
|
-
TheTodoItemComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
4176
|
-
TheTodoItemComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
4177
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
4332
|
+
TheTodoItemComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheTodoItemComponent, deps: [{ token: i0__namespace.ElementRef }, { token: i0__namespace.ChangeDetectorRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
4333
|
+
TheTodoItemComponent.ɵcmp = i0__namespace.ɵɵ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__namespace, template: "\n <span contenteditable=\"false\" class=\"todo-item-status\">\n <input #checkbox type=\"checkbox\" [checked]=\"element.checked\" (click)=\"onCheck(checkbox.checked)\" />\n </span>\n <slate-children [children]=\"children\" [context]=\"childrenContext\" [viewContext]=\"viewContext\"></slate-children>\n ", isInline: true, components: [{ type: i1__namespace.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }] });
|
|
4334
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheTodoItemComponent, decorators: [{
|
|
4178
4335
|
type: i0.Component,
|
|
4179
4336
|
args: [{
|
|
4180
4337
|
selector: 'div[theTodoItem]',
|
|
@@ -4259,9 +4416,9 @@
|
|
|
4259
4416
|
};
|
|
4260
4417
|
return TheHrComponent;
|
|
4261
4418
|
}(TheBaseElementComponent));
|
|
4262
|
-
TheHrComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
4263
|
-
TheHrComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
4264
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
4419
|
+
TheHrComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheHrComponent, deps: [{ token: i0__namespace.ElementRef }, { token: i0__namespace.ChangeDetectorRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
4420
|
+
TheHrComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheHrComponent, selector: "the-hr, [theHr]", usesInheritance: true, ngImport: i0__namespace, template: "\n <div class=\"the-hr\" contenteditable=\"false\" [ngClass]=\"{ active: selection }\">\n <hr class=\"the-hr\" />\n <slate-children [children]=\"children\" [context]=\"childrenContext\" [viewContext]=\"viewContext\"></slate-children>\n </div>\n ", isInline: true, components: [{ type: i1__namespace.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }], directives: [{ type: i6__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
4421
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheHrComponent, decorators: [{
|
|
4265
4422
|
type: i0.Component,
|
|
4266
4423
|
args: [{
|
|
4267
4424
|
selector: 'the-hr, [theHr]',
|
|
@@ -4460,7 +4617,7 @@
|
|
|
4460
4617
|
};
|
|
4461
4618
|
|
|
4462
4619
|
var autoFormatInline = function (editor, _a) {
|
|
4463
|
-
var type = _a.type, between = _a.between, markup = _a.markup, ignoreTrim = _a.ignoreTrim;
|
|
4620
|
+
var type = _a.type, between = _a.between, markup = _a.markup, ignoreTrim = _a.ignoreTrim, format = _a.format;
|
|
4464
4621
|
var selection = editor.selection;
|
|
4465
4622
|
var startMarkup = between ? between[0] : markup;
|
|
4466
4623
|
var endMarkup = between ? between[1] : '';
|
|
@@ -4504,22 +4661,35 @@
|
|
|
4504
4661
|
}
|
|
4505
4662
|
});
|
|
4506
4663
|
}
|
|
4507
|
-
// add mark to the text between the markups
|
|
4508
|
-
slate.Transforms.select(editor, markupRange);
|
|
4509
|
-
editor.addMark(type, true);
|
|
4510
|
-
slate.Transforms.collapse(editor, { edge: 'end' });
|
|
4511
|
-
editor.removeMark(type, false);
|
|
4512
|
-
// delete start markup
|
|
4513
4664
|
var startMarkupPointBefore = getPointBefore(editor, selection, {
|
|
4514
4665
|
matchString: startMarkup,
|
|
4515
4666
|
skipInvalid: true
|
|
4516
4667
|
});
|
|
4517
|
-
|
|
4518
|
-
|
|
4519
|
-
|
|
4520
|
-
|
|
4521
|
-
|
|
4522
|
-
|
|
4668
|
+
if (format) {
|
|
4669
|
+
var markupText = getText(editor, markupRange);
|
|
4670
|
+
format(editor, markupText);
|
|
4671
|
+
// delete start to end selection
|
|
4672
|
+
slate.Transforms.delete(editor, {
|
|
4673
|
+
at: {
|
|
4674
|
+
anchor: startMarkupPointBefore,
|
|
4675
|
+
focus: selection.anchor
|
|
4676
|
+
}
|
|
4677
|
+
});
|
|
4678
|
+
}
|
|
4679
|
+
else {
|
|
4680
|
+
// add mark to the text between the markups
|
|
4681
|
+
slate.Transforms.select(editor, markupRange);
|
|
4682
|
+
editor.addMark(type, true);
|
|
4683
|
+
slate.Transforms.collapse(editor, { edge: 'end' });
|
|
4684
|
+
editor.removeMark(type, false);
|
|
4685
|
+
// delete start markup
|
|
4686
|
+
slate.Transforms.delete(editor, {
|
|
4687
|
+
at: {
|
|
4688
|
+
anchor: startMarkupPointBefore,
|
|
4689
|
+
focus: startMarkupPointAfter
|
|
4690
|
+
}
|
|
4691
|
+
});
|
|
4692
|
+
}
|
|
4523
4693
|
return true;
|
|
4524
4694
|
};
|
|
4525
4695
|
|
|
@@ -4595,6 +4765,7 @@
|
|
|
4595
4765
|
type: type,
|
|
4596
4766
|
between: between,
|
|
4597
4767
|
ignoreTrim: ignoreTrim,
|
|
4768
|
+
format: format,
|
|
4598
4769
|
markup: Array.isArray(markup) ? markup[0] : markup
|
|
4599
4770
|
})) {
|
|
4600
4771
|
return { value: valid() };
|
|
@@ -5564,9 +5735,9 @@
|
|
|
5564
5735
|
/**
|
|
5565
5736
|
* Insert a new table
|
|
5566
5737
|
*/
|
|
5567
|
-
function insertTable(opts, editor,
|
|
5568
|
-
if (columns === void 0) { columns = 3; }
|
|
5738
|
+
function insertTable(opts, editor, rows, columns, getCellContent) {
|
|
5569
5739
|
if (rows === void 0) { rows = 3; }
|
|
5740
|
+
if (columns === void 0) { columns = 3; }
|
|
5570
5741
|
var selection = editor.selection;
|
|
5571
5742
|
if (!(selection === null || selection === void 0 ? void 0 : selection.anchor)) {
|
|
5572
5743
|
return;
|
|
@@ -5994,14 +6165,6 @@
|
|
|
5994
6165
|
shortcutKey: CONTROL_KEY + "+U",
|
|
5995
6166
|
execute: function (editor) { return MarkEditor.toggleMark(editor, exports.MarkTypes.underline); },
|
|
5996
6167
|
active: function (editor) { return MarkEditor.isMarkActive(editor, exports.MarkTypes.underline); }
|
|
5997
|
-
},
|
|
5998
|
-
{
|
|
5999
|
-
key: exports.MarkTypes.codeLine,
|
|
6000
|
-
icon: 'code',
|
|
6001
|
-
name: '行内代码',
|
|
6002
|
-
shortcutKey: CONTROL_KEY + "+E",
|
|
6003
|
-
execute: function (editor) { return MarkEditor.toggleMark(editor, exports.MarkTypes.codeLine); },
|
|
6004
|
-
active: function (editor) { return MarkEditor.isMarkActive(editor, exports.MarkTypes.codeLine); }
|
|
6005
6168
|
}
|
|
6006
6169
|
];
|
|
6007
6170
|
|
|
@@ -6217,9 +6380,9 @@
|
|
|
6217
6380
|
}
|
|
6218
6381
|
return TheBlockquoteComponent;
|
|
6219
6382
|
}(TheBaseElementComponent));
|
|
6220
|
-
TheBlockquoteComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
6221
|
-
TheBlockquoteComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
6222
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
6383
|
+
TheBlockquoteComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheBlockquoteComponent, deps: [{ token: i0__namespace.ElementRef }, { token: i0__namespace.ChangeDetectorRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
6384
|
+
TheBlockquoteComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheBlockquoteComponent, selector: "blockquote[theBlockquote]", usesInheritance: true, ngImport: i0__namespace, template: "<slate-children [children]=\"children\" [context]=\"childrenContext\" [viewContext]=\"viewContext\"></slate-children>", isInline: true, components: [{ type: i1__namespace.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }] });
|
|
6385
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheBlockquoteComponent, decorators: [{
|
|
6223
6386
|
type: i0.Component,
|
|
6224
6387
|
args: [{
|
|
6225
6388
|
selector: 'blockquote[theBlockquote]',
|
|
@@ -6415,9 +6578,9 @@
|
|
|
6415
6578
|
};
|
|
6416
6579
|
return TheColorSelectComponent;
|
|
6417
6580
|
}());
|
|
6418
|
-
TheColorSelectComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
6419
|
-
TheColorSelectComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
6420
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
6581
|
+
TheColorSelectComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheColorSelectComponent, deps: [{ token: i1__namespace$3.ThyPopoverRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
6582
|
+
TheColorSelectComponent.ɵcmp = i0__namespace.ɵɵ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__namespace, 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__namespace$1.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }], directives: [{ type: i6__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i6__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4__namespace$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__namespace.ThyInputDirective, selector: "[thyInput]", inputs: ["thySize", "thyAutocomplete"] }, { type: i4__namespace$2.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { type: i4__namespace$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4__namespace$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
6583
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheColorSelectComponent, decorators: [{
|
|
6421
6584
|
type: i0.Component,
|
|
6422
6585
|
args: [{
|
|
6423
6586
|
selector: 'the-color-select',
|
|
@@ -6489,9 +6652,9 @@
|
|
|
6489
6652
|
};
|
|
6490
6653
|
return TheColorSelectService;
|
|
6491
6654
|
}());
|
|
6492
|
-
TheColorSelectService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
6493
|
-
TheColorSelectService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
6494
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
6655
|
+
TheColorSelectService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheColorSelectService, deps: [{ token: i1__namespace$3.ThyPopover }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
6656
|
+
TheColorSelectService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheColorSelectService });
|
|
6657
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheColorSelectService, decorators: [{
|
|
6495
6658
|
type: i0.Injectable
|
|
6496
6659
|
}], ctorParameters: function () { return [{ type: i1__namespace$3.ThyPopover }]; } });
|
|
6497
6660
|
|
|
@@ -6551,9 +6714,9 @@
|
|
|
6551
6714
|
};
|
|
6552
6715
|
return TheToolbarBaseItemComponent;
|
|
6553
6716
|
}());
|
|
6554
|
-
TheToolbarBaseItemComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
6555
|
-
TheToolbarBaseItemComponent.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.
|
|
6556
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
6717
|
+
TheToolbarBaseItemComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheToolbarBaseItemComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
6718
|
+
TheToolbarBaseItemComponent.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.15", type: TheToolbarBaseItemComponent, ngImport: i0__namespace });
|
|
6719
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheToolbarBaseItemComponent, decorators: [{
|
|
6557
6720
|
type: i0.Directive
|
|
6558
6721
|
}] });
|
|
6559
6722
|
|
|
@@ -6623,9 +6786,9 @@
|
|
|
6623
6786
|
};
|
|
6624
6787
|
return TheColorToolbarItemComponent;
|
|
6625
6788
|
}(TheToolbarBaseItemComponent));
|
|
6626
|
-
TheColorToolbarItemComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
6627
|
-
TheColorToolbarItemComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
6628
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
6789
|
+
TheColorToolbarItemComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheColorToolbarItemComponent, deps: [{ token: i1__namespace$3.ThyPopover }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
6790
|
+
TheColorToolbarItemComponent.ɵcmp = i0__namespace.ɵɵ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__namespace, template: "\n <a\n class=\"link-width-down\"\n thyIconNavLink\n [ngStyle]=\"{\n width: item.key === 'color' ? '42px' : 'auto'\n }\"\n [thyTooltip]=\"item.name\"\n [thyIconNavLinkActive]=\"active\"\n thyTooltipPlacement=\"top\"\n (mousedown)=\"execute($event)\"\n >\n <thy-icon [thyIconName]=\"item.icon\" thyIconType=\"twotone\" [thyTwotoneColor]=\"active\"></thy-icon>\n <thy-icon\n [ngClass]=\"{\n 'link-down-icon': true,\n 'font-size-sm': true,\n 'text-desc': true\n }\"\n thyIconName=\"caret-down\"\n ></thy-icon>\n </a>\n ", isInline: true, components: [{ type: i3__namespace.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i4__namespace$1.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }], directives: [{ type: i6__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i5__namespace$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { type: i6__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
6791
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheColorToolbarItemComponent, decorators: [{
|
|
6629
6792
|
type: i0.Component,
|
|
6630
6793
|
args: [{
|
|
6631
6794
|
selector: 'the-color-toolbar-item',
|
|
@@ -6894,9 +7057,9 @@
|
|
|
6894
7057
|
};
|
|
6895
7058
|
return TheToolbarDropdownComponent;
|
|
6896
7059
|
}(TheToolbarBaseItemComponent));
|
|
6897
|
-
TheToolbarDropdownComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
6898
|
-
TheToolbarDropdownComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
6899
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
7060
|
+
TheToolbarDropdownComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheToolbarDropdownComponent, deps: [{ token: i0__namespace.ElementRef }, { token: i1__namespace$3.ThyPopover }, { token: i0__namespace.ViewContainerRef }, { token: i2__namespace.Overlay }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
7061
|
+
TheToolbarDropdownComponent.ɵcmp = i0__namespace.ɵɵ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__namespace, 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__namespace.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i4__namespace$1.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { type: i5__namespace$2.ThyActionMenuComponent, selector: "thy-action-menu", inputs: ["thyTheme", "thyWidth"] }, { type: i5__namespace$2.ThyActionMenuDividerComponent, selector: "thy-action-menu-divider", inputs: ["thyTitle", "thyType"] }], directives: [{ type: i6__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i5__namespace$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { type: i6__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5__namespace$2.ThyActionMenuItemDirective, selector: "[thyActionMenuItem]", inputs: ["thyDisabled", "thyType"] }, { type: i5__namespace$2.ThyActionMenuItemActiveDirective, selector: "[thyActionMenuItemActive]", inputs: ["thyActionMenuItemActive"] }, { type: i6__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i5__namespace$2.ThyActionMenuItemIconDirective, selector: "[thyActionMenuItemIcon]" }, { type: i5__namespace$2.ThyActionMenuItemNameDirective, selector: "[thyActionMenuItemName]" }] });
|
|
7062
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheToolbarDropdownComponent, decorators: [{
|
|
6900
7063
|
type: i0.Component,
|
|
6901
7064
|
args: [{
|
|
6902
7065
|
selector: 'the-toolbar-dropdown',
|
|
@@ -6957,9 +7120,9 @@
|
|
|
6957
7120
|
NavSplitLineComponent.prototype.ngOnInit = function () { };
|
|
6958
7121
|
return NavSplitLineComponent;
|
|
6959
7122
|
}());
|
|
6960
|
-
NavSplitLineComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
6961
|
-
NavSplitLineComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
6962
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
7123
|
+
NavSplitLineComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: NavSplitLineComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
7124
|
+
NavSplitLineComponent.ɵcmp = i0__namespace.ɵɵ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__namespace, template: '', isInline: true });
|
|
7125
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: NavSplitLineComponent, decorators: [{
|
|
6963
7126
|
type: i0.Component,
|
|
6964
7127
|
args: [{
|
|
6965
7128
|
selector: 'nav-split-line',
|
|
@@ -6994,8 +7157,9 @@
|
|
|
6994
7157
|
_this.menus = CODE_MODES.map(function (item) {
|
|
6995
7158
|
return { key: item.value, name: item.showName };
|
|
6996
7159
|
});
|
|
7160
|
+
_this.destroy$ = new rxjs.Subject();
|
|
6997
7161
|
_this.ToolbarItemMode = exports.ToolbarItemMode;
|
|
6998
|
-
_this.
|
|
7162
|
+
_this.isHightLight = false;
|
|
6999
7163
|
_this.resizeHeight = null;
|
|
7000
7164
|
_this.options = {
|
|
7001
7165
|
mode: _this.menus[0].key,
|
|
@@ -7037,13 +7201,22 @@
|
|
|
7037
7201
|
if (this.resizeHeight !== this.element.height) {
|
|
7038
7202
|
this.useHeight();
|
|
7039
7203
|
}
|
|
7040
|
-
if (!this.isCollapsed) {
|
|
7041
|
-
this.isFocusCode = false;
|
|
7042
|
-
}
|
|
7043
7204
|
}
|
|
7044
7205
|
};
|
|
7045
7206
|
TheCodeComponent.prototype.ngOnInit = function () {
|
|
7207
|
+
var _this = this;
|
|
7046
7208
|
_super.prototype.ngOnInit.call(this);
|
|
7209
|
+
this.ngZone.runOutsideAngular(function () {
|
|
7210
|
+
rxjs.fromEvent(_this.nativeElement, 'mousedown')
|
|
7211
|
+
.pipe(operators.takeUntil(_this.destroy$))
|
|
7212
|
+
.subscribe(function (event) {
|
|
7213
|
+
event.stopPropagation();
|
|
7214
|
+
var isBlockOperation = _this.isCollapsed &&
|
|
7215
|
+
_this.nativeElement.querySelector('.the-code-block-operation').contains(event.target);
|
|
7216
|
+
var isCodemirror = _this.nativeElement.querySelector('.ng-codemirror').contains(event.target);
|
|
7217
|
+
_this.isHightLight = !isCodemirror && !isBlockOperation;
|
|
7218
|
+
});
|
|
7219
|
+
});
|
|
7047
7220
|
this.elementRef.nativeElement.classList.add('the-code-container');
|
|
7048
7221
|
};
|
|
7049
7222
|
TheCodeComponent.prototype.ngAfterViewInit = function () {
|
|
@@ -7087,11 +7260,11 @@
|
|
|
7087
7260
|
}
|
|
7088
7261
|
};
|
|
7089
7262
|
TheCodeComponent.prototype.codeChange = function ($event) {
|
|
7263
|
+
this.isHightLight = false;
|
|
7090
7264
|
CodeEditor.setCodeAttribute(this.editor, this.element, { content: $event });
|
|
7091
7265
|
};
|
|
7092
7266
|
TheCodeComponent.prototype.onDelete = function (event) {
|
|
7093
7267
|
event.preventDefault();
|
|
7094
|
-
this.isFocusCode = false;
|
|
7095
7268
|
deleteElement(this.editor, this.element);
|
|
7096
7269
|
};
|
|
7097
7270
|
TheCodeComponent.prototype.onCopy = function (event) {
|
|
@@ -7109,8 +7282,9 @@
|
|
|
7109
7282
|
i1.AngularEditor.deselect(this.editor);
|
|
7110
7283
|
};
|
|
7111
7284
|
TheCodeComponent.prototype.focusChange = function (codeMirrorFocused) {
|
|
7112
|
-
if (codeMirrorFocused)
|
|
7113
|
-
this.
|
|
7285
|
+
if (codeMirrorFocused) {
|
|
7286
|
+
this.isHightLight = false;
|
|
7287
|
+
}
|
|
7114
7288
|
};
|
|
7115
7289
|
TheCodeComponent.prototype.useMode = function () {
|
|
7116
7290
|
var _this = this;
|
|
@@ -7139,14 +7313,19 @@
|
|
|
7139
7313
|
CodeEditor.setCodeAttribute(this.editor, this.element, { height: this.resizeHeight });
|
|
7140
7314
|
};
|
|
7141
7315
|
TheCodeComponent.prototype.onChangeWrap = function (value) {
|
|
7316
|
+
this.isHightLight = false;
|
|
7142
7317
|
this.options = Object.assign(Object.assign({}, this.options), { lineWrapping: value || false });
|
|
7143
7318
|
CodeEditor.setCodeAttribute(this.editor, this.element, { autoWrap: value ? value : null });
|
|
7144
7319
|
};
|
|
7320
|
+
TheCodeComponent.prototype.ngOnDestroy = function () {
|
|
7321
|
+
this.destroy$.next();
|
|
7322
|
+
this.destroy$.complete();
|
|
7323
|
+
};
|
|
7145
7324
|
return TheCodeComponent;
|
|
7146
7325
|
}(TheBaseElementComponent));
|
|
7147
|
-
TheCodeComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
7148
|
-
TheCodeComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
7149
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
7326
|
+
TheCodeComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheCodeComponent, deps: [{ token: i0__namespace.ElementRef }, { token: i0__namespace.ChangeDetectorRef }, { token: i1__namespace$4.ThyNotifyService }, { token: TheContextService }, { token: i0__namespace.NgZone }, { token: THE_CODE_MODE_TOKEN }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
7327
|
+
TheCodeComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheCodeComponent, selector: "div[theCode]", viewQueries: [{ propertyName: "codemirror", first: true, predicate: ["codemirror"], descendants: true, read: i8.CodeMirrorComponent }], usesInheritance: true, ngImport: i0__namespace, 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__namespace.ThyIconNavComponent, selector: "thy-icon-nav", inputs: ["thyType"] }, { type: TheToolbarDropdownComponent, selector: "the-toolbar-dropdown", inputs: ["toolbarItem", "menus", "mode", "item", "itemMousedownHandle"] }, { type: i3__namespace.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: NavSplitLineComponent, selector: "nav-split-line", inputs: ["mode"] }, { type: i6__namespace$1.ThySwitchComponent, selector: "thy-switch", inputs: ["thyType", "thySize", "thyDisabled"], outputs: ["thyChange"] }, { type: i1__namespace.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }, { type: i8__namespace.CodeMirrorComponent, selector: "ng-codemirror, [ngCodeMirror]", inputs: ["autoMaxHeight", "delayRefreshTime", "options"], outputs: ["focusChange"] }, { type: i9__namespace.ThyResizeHandleComponent, selector: "thy-resize-handle, [thy-resize-handle]", inputs: ["thyDirection"], outputs: ["thyMouseDown"], exportAs: ["thyResizeHandle"] }], directives: [{ type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5__namespace$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { type: i4__namespace$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4__namespace$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i9__namespace.ThyResizableDirective, selector: "[thyResizable]", inputs: ["thyBounds", "thyMaxHeight", "thyMaxWidth", "thyMinHeight", "thyMinWidth", "thyGridColumnCount", "thyMaxColumn", "thyMinColumn", "thyLockAspectRatio", "thyPreview", "thyDisabled"], outputs: ["thyResize", "thyResizeEnd", "thyResizeStart"] }, { type: i6__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i6__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
7328
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheCodeComponent, decorators: [{
|
|
7150
7329
|
type: i0.Component,
|
|
7151
7330
|
args: [{
|
|
7152
7331
|
selector: 'div[theCode]',
|
|
@@ -7284,9 +7463,9 @@
|
|
|
7284
7463
|
};
|
|
7285
7464
|
return TheLinkHoverComponent;
|
|
7286
7465
|
}());
|
|
7287
|
-
TheLinkHoverComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
7288
|
-
TheLinkHoverComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
7289
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
7466
|
+
TheLinkHoverComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheLinkHoverComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
7467
|
+
TheLinkHoverComponent.ɵcmp = i0__namespace.ɵɵ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__namespace, 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__namespace$5.ThyButtonIconComponent, selector: "thy-button-icon,[thy-button-icon],[thyButtonIcon]", inputs: ["thySize", "thyIcon", "thyButtonIcon", "thyShape", "thyLight", "thyActive", "thyTheme", "thyColor"] }] });
|
|
7468
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheLinkHoverComponent, decorators: [{
|
|
7290
7469
|
type: i0.Component,
|
|
7291
7470
|
args: [{
|
|
7292
7471
|
selector: 'the-link-hover',
|
|
@@ -7373,9 +7552,9 @@
|
|
|
7373
7552
|
};
|
|
7374
7553
|
return TheLinkEditComponent;
|
|
7375
7554
|
}());
|
|
7376
|
-
TheLinkEditComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
7377
|
-
TheLinkEditComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
7378
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
7555
|
+
TheLinkEditComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheLinkEditComponent, deps: [{ token: i1__namespace$3.ThyPopoverRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
7556
|
+
TheLinkEditComponent.ɵcmp = i0__namespace.ɵɵ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__namespace, 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__namespace$1.ThyFormGroupComponent, selector: "thy-form-group", inputs: ["thyLabelText", "thyLabelTextTranslateKey", "thyLabelRequired", "thyLabelPaddingTopClear", "thyFeedbackIcon", "thyTipsMode", "thyTips", "thyTipsTranslateKey", "thyRowFill"] }, { type: i2__namespace$1.ThyFormGroupFooterComponent, selector: "thy-form-group-footer", inputs: ["thyAlign"] }, { type: i1__namespace$5.ThyButtonComponent, selector: "thy-button,[thy-button],[thyButton]", inputs: ["thyButton", "thyType", "thyLoading", "thyLoadingText", "thySize", "thyIcon", "thySquare", "thyBlock"] }], directives: [{ type: i4__namespace$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i4__namespace$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i4__namespace$2.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i2__namespace$1.ThyFormDirective, selector: "[thyForm],[thy-form]", inputs: ["thyLayout", "thyEnterKeyMode", "thyFormValidatorConfig"], exportAs: ["thyForm"] }, { type: i5__namespace$3.ThyAutofocusDirective, selector: "input[thyAutofocus],textarea[thyAutofocus]", inputs: ["thyAutoSelect", "thyAutofocus"] }, { type: i4__namespace$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__namespace.ThyInputDirective, selector: "[thyInput]", inputs: ["thySize", "thyAutocomplete"] }, { type: i4__namespace$2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i4__namespace$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4__namespace$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i2__namespace$1.ThyFormSubmitDirective, selector: "[thyFormSubmit],[thy-form-submit]", outputs: ["thyFormSubmit"] }] });
|
|
7557
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheLinkEditComponent, decorators: [{
|
|
7379
7558
|
type: i0.Component,
|
|
7380
7559
|
args: [{
|
|
7381
7560
|
selector: 'the-link-edit',
|
|
@@ -7442,7 +7621,9 @@
|
|
|
7442
7621
|
}
|
|
7443
7622
|
};
|
|
7444
7623
|
TheBaseLinkComponent.prototype.mousedownHandle = function (event) {
|
|
7445
|
-
this.
|
|
7624
|
+
if (!this.readonly && !this.editor.disabled) {
|
|
7625
|
+
this.openLinkHover();
|
|
7626
|
+
}
|
|
7446
7627
|
};
|
|
7447
7628
|
TheBaseLinkComponent.prototype.openLinkEdit = function (tag) {
|
|
7448
7629
|
var _this = this;
|
|
@@ -7527,9 +7708,9 @@
|
|
|
7527
7708
|
};
|
|
7528
7709
|
return TheBaseLinkComponent;
|
|
7529
7710
|
}(TheBaseElementComponent));
|
|
7530
|
-
TheBaseLinkComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
7531
|
-
TheBaseLinkComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
7532
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
7711
|
+
TheBaseLinkComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheBaseLinkComponent, deps: [{ token: i0__namespace.ElementRef }, { token: i0__namespace.ChangeDetectorRef }, { token: i1__namespace$3.ThyPopover }, { token: i2__namespace.Overlay }, { token: i0__namespace.ViewContainerRef }, { token: i1__namespace$6.ThyClickDispatcher }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
7712
|
+
TheBaseLinkComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheBaseLinkComponent, selector: "[TheBaseLinkComponent]", host: { listeners: { "click": "mousedownHandle($event)" } }, usesInheritance: true, ngImport: i0__namespace, template: '', isInline: true });
|
|
7713
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheBaseLinkComponent, decorators: [{
|
|
7533
7714
|
type: i0.Component,
|
|
7534
7715
|
args: [{
|
|
7535
7716
|
selector: '[TheBaseLinkComponent]',
|
|
@@ -7546,9 +7727,9 @@
|
|
|
7546
7727
|
}
|
|
7547
7728
|
return TheLinkComponent;
|
|
7548
7729
|
}(TheBaseLinkComponent));
|
|
7549
|
-
TheLinkComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
7550
|
-
TheLinkComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
7551
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
7730
|
+
TheLinkComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheLinkComponent, deps: null, target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
7731
|
+
TheLinkComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheLinkComponent, selector: "span[theLink]", usesInheritance: true, ngImport: i0__namespace, template: "<slate-children [children]=\"children\" [context]=\"childrenContext\" [viewContext]=\"viewContext\"></slate-children>", isInline: true, components: [{ type: i1__namespace.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }] });
|
|
7732
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheLinkComponent, decorators: [{
|
|
7552
7733
|
type: i0.Component,
|
|
7553
7734
|
args: [{
|
|
7554
7735
|
selector: 'span[theLink]',
|
|
@@ -7562,9 +7743,9 @@
|
|
|
7562
7743
|
}
|
|
7563
7744
|
return TheReadonlyLinkComponent;
|
|
7564
7745
|
}(TheBaseLinkComponent));
|
|
7565
|
-
TheReadonlyLinkComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
7566
|
-
TheReadonlyLinkComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
7567
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
7746
|
+
TheReadonlyLinkComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheReadonlyLinkComponent, deps: null, target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
7747
|
+
TheReadonlyLinkComponent.ɵcmp = i0__namespace.ɵɵ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__namespace, template: "<slate-children [children]=\"children\" [context]=\"childrenContext\" [viewContext]=\"viewContext\"></slate-children>", isInline: true, components: [{ type: i1__namespace.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }] });
|
|
7748
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheReadonlyLinkComponent, decorators: [{
|
|
7568
7749
|
type: i0.Component,
|
|
7569
7750
|
args: [{
|
|
7570
7751
|
selector: 'a[theLink]',
|
|
@@ -7658,9 +7839,9 @@
|
|
|
7658
7839
|
};
|
|
7659
7840
|
return TheTableSelectComponent;
|
|
7660
7841
|
}());
|
|
7661
|
-
TheTableSelectComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
7662
|
-
TheTableSelectComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
7663
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
7842
|
+
TheTableSelectComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheTableSelectComponent, deps: [{ token: i1__namespace$6.ThyPopoverRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
7843
|
+
TheTableSelectComponent.ɵcmp = i0__namespace.ɵɵ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__namespace, 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__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
7844
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheTableSelectComponent, decorators: [{
|
|
7664
7845
|
type: i0.Component,
|
|
7665
7846
|
args: [{
|
|
7666
7847
|
selector: 'table-select',
|
|
@@ -7727,9 +7908,9 @@
|
|
|
7727
7908
|
};
|
|
7728
7909
|
return TheTableToolbarItemComponent;
|
|
7729
7910
|
}(TheToolbarBaseItemComponent));
|
|
7730
|
-
TheTableToolbarItemComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
7731
|
-
TheTableToolbarItemComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
7732
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
7911
|
+
TheTableToolbarItemComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheTableToolbarItemComponent, deps: [{ token: i1__namespace$6.ThyPopover }, { token: i2__namespace.Overlay }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
7912
|
+
TheTableToolbarItemComponent.ɵcmp = i0__namespace.ɵɵ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__namespace, template: "\n <a\n thyIconNavLink\n class=\"link-with-down\"\n [thyTooltip]=\"item?.name\"\n thyTooltipPlacement=\"top\"\n [thyIconNavLinkActive]=\"active\"\n (mousedown)=\"execute($event)\"\n >\n <thy-icon [thyIconName]=\"item.icon\"></thy-icon>\n <thy-icon class=\"link-down-icon font-size-sm text-desc table-down-icon\" thyIconName=\"caret-down\"> </thy-icon>\n </a>\n ", isInline: true, components: [{ type: i3__namespace.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i4__namespace$1.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }], directives: [{ type: i5__namespace$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }] });
|
|
7913
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheTableToolbarItemComponent, decorators: [{
|
|
7733
7914
|
type: i0.Component,
|
|
7734
7915
|
args: [{
|
|
7735
7916
|
selector: 'the-table-toolbar-item',
|
|
@@ -7778,9 +7959,9 @@
|
|
|
7778
7959
|
}
|
|
7779
7960
|
return ColumnResizeNotifierSource;
|
|
7780
7961
|
}());
|
|
7781
|
-
ColumnResizeNotifierSource.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
7782
|
-
ColumnResizeNotifierSource.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
7783
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
7962
|
+
ColumnResizeNotifierSource.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ColumnResizeNotifierSource, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
7963
|
+
ColumnResizeNotifierSource.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ColumnResizeNotifierSource });
|
|
7964
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ColumnResizeNotifierSource, decorators: [{
|
|
7784
7965
|
type: i0.Injectable
|
|
7785
7966
|
}] });
|
|
7786
7967
|
|
|
@@ -7831,9 +8012,9 @@
|
|
|
7831
8012
|
};
|
|
7832
8013
|
return TableCellEventDispatcher;
|
|
7833
8014
|
}());
|
|
7834
|
-
TableCellEventDispatcher.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
7835
|
-
TableCellEventDispatcher.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
7836
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
8015
|
+
TableCellEventDispatcher.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TableCellEventDispatcher, deps: [{ token: i0__namespace.NgZone }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
8016
|
+
TableCellEventDispatcher.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TableCellEventDispatcher });
|
|
8017
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TableCellEventDispatcher, decorators: [{
|
|
7837
8018
|
type: i0.Injectable
|
|
7838
8019
|
}], ctorParameters: function () { return [{ type: i0__namespace.NgZone }]; } });
|
|
7839
8020
|
|
|
@@ -8453,9 +8634,9 @@
|
|
|
8453
8634
|
};
|
|
8454
8635
|
return TableStore;
|
|
8455
8636
|
}());
|
|
8456
|
-
TableStore.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
8457
|
-
TableStore.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
8458
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
8637
|
+
TableStore.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TableStore, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
8638
|
+
TableStore.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TableStore });
|
|
8639
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TableStore, decorators: [{
|
|
8459
8640
|
type: i0.Injectable
|
|
8460
8641
|
}], ctorParameters: function () { return []; } });
|
|
8461
8642
|
|
|
@@ -8620,9 +8801,9 @@
|
|
|
8620
8801
|
};
|
|
8621
8802
|
return TheTableToolbarComponent;
|
|
8622
8803
|
}());
|
|
8623
|
-
TheTableToolbarComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
8624
|
-
TheTableToolbarComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
8625
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
8804
|
+
TheTableToolbarComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheTableToolbarComponent, deps: [{ token: i0__namespace.NgZone }, { token: TheColorSelectService }, { token: i1__namespace$3.ThyPopoverRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
8805
|
+
TheTableToolbarComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheTableToolbarComponent, selector: "the-table-toolbar", inputs: { tableStore: "tableStore", isActiveSelect: "isActiveSelect" }, ngImport: i0__namespace, 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__namespace.ThyIconNavComponent, selector: "thy-icon-nav", inputs: ["thyType"] }, { type: i3__namespace.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i4__namespace$1.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { type: NavSplitLineComponent, selector: "nav-split-line", inputs: ["mode"] }], directives: [{ type: i6__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5__namespace$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }] });
|
|
8806
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheTableToolbarComponent, decorators: [{
|
|
8626
8807
|
type: i0.Component,
|
|
8627
8808
|
args: [{
|
|
8628
8809
|
selector: 'the-table-toolbar',
|
|
@@ -8684,9 +8865,9 @@
|
|
|
8684
8865
|
TheContextMenuComponent.prototype.ngOnInit = function () { };
|
|
8685
8866
|
return TheContextMenuComponent;
|
|
8686
8867
|
}());
|
|
8687
|
-
TheContextMenuComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
8688
|
-
TheContextMenuComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
8689
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
8868
|
+
TheContextMenuComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheContextMenuComponent, deps: [{ token: i0__namespace.ElementRef }, { token: i1__namespace$3.ThyPopoverRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
8869
|
+
TheContextMenuComponent.ɵcmp = i0__namespace.ɵɵ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__namespace, 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__namespace$2.ThyActionMenuComponent, selector: "thy-action-menu", inputs: ["thyTheme", "thyWidth"] }, { type: i4__namespace$1.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { type: i5__namespace$2.ThyActionMenuDividerComponent, selector: "thy-action-menu-divider", inputs: ["thyTitle", "thyType"] }], directives: [{ type: i6__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5__namespace$2.ThyActionMenuItemDirective, selector: "[thyActionMenuItem]", inputs: ["thyDisabled", "thyType"] }, { type: i5__namespace$2.ThyActionMenuItemIconDirective, selector: "[thyActionMenuItemIcon]" }, { type: i5__namespace$2.ThyActionMenuItemNameDirective, selector: "[thyActionMenuItemName]" }, { type: i5__namespace$2.ThyActionMenuItemExtendIconDirective, selector: "[thyActionMenuItemExtendIcon]" }] });
|
|
8870
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheContextMenuComponent, decorators: [{
|
|
8690
8871
|
type: i0.Component,
|
|
8691
8872
|
args: [{
|
|
8692
8873
|
selector: 'the-contextmenu',
|
|
@@ -8898,9 +9079,9 @@
|
|
|
8898
9079
|
};
|
|
8899
9080
|
return TheTableContextMenuService;
|
|
8900
9081
|
}());
|
|
8901
|
-
TheTableContextMenuService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
8902
|
-
TheTableContextMenuService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
8903
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
9082
|
+
TheTableContextMenuService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheTableContextMenuService, deps: [{ token: TheColorSelectService }, { token: TableStore }, { token: i1__namespace$3.ThyPopover }, { token: i0__namespace.NgZone }, { token: TheContextService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
9083
|
+
TheTableContextMenuService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheTableContextMenuService });
|
|
9084
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheTableContextMenuService, decorators: [{
|
|
8904
9085
|
type: i0.Injectable
|
|
8905
9086
|
}], ctorParameters: function () { return [{ type: TheColorSelectService }, { type: TableStore }, { type: i1__namespace$3.ThyPopover }, { type: i0__namespace.NgZone }, { type: TheContextService }]; } });
|
|
8906
9087
|
|
|
@@ -8996,9 +9177,9 @@
|
|
|
8996
9177
|
};
|
|
8997
9178
|
return TableService;
|
|
8998
9179
|
}());
|
|
8999
|
-
TableService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
9000
|
-
TableService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
9001
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
9180
|
+
TableService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TableService, deps: [{ token: i1__namespace$3.ThyPopover }, { token: i2__namespace.Overlay }, { token: TableStore }, { token: TheTableContextMenuService }, { token: i0__namespace.NgZone }, { token: TheContextService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
9181
|
+
TableService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TableService });
|
|
9182
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TableService, decorators: [{
|
|
9002
9183
|
type: i0.Injectable
|
|
9003
9184
|
}], ctorParameters: function () { return [{ type: i1__namespace$3.ThyPopover }, { type: i2__namespace.Overlay }, { type: TableStore }, { type: TheTableContextMenuService }, { type: i0__namespace.NgZone }, { type: TheContextService }]; } });
|
|
9004
9185
|
|
|
@@ -9087,9 +9268,9 @@
|
|
|
9087
9268
|
TheInsertMarkComponent.prototype.ngOnDestroy = function () { };
|
|
9088
9269
|
return TheInsertMarkComponent;
|
|
9089
9270
|
}());
|
|
9090
|
-
TheInsertMarkComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
9091
|
-
TheInsertMarkComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
9092
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
9271
|
+
TheInsertMarkComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheInsertMarkComponent, deps: [{ token: i0__namespace.ChangeDetectorRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
9272
|
+
TheInsertMarkComponent.ɵcmp = i0__namespace.ɵɵ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__namespace, 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__namespace$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { type: i6__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
|
|
9273
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheInsertMarkComponent, decorators: [{
|
|
9093
9274
|
type: i0.Component,
|
|
9094
9275
|
args: [{
|
|
9095
9276
|
selector: 'the-table-insert-mark',
|
|
@@ -9191,9 +9372,9 @@
|
|
|
9191
9372
|
};
|
|
9192
9373
|
return TheColumnResizeDirective;
|
|
9193
9374
|
}());
|
|
9194
|
-
TheColumnResizeDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
9195
|
-
TheColumnResizeDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.
|
|
9196
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
9375
|
+
TheColumnResizeDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheColumnResizeDirective, deps: [{ token: i0__namespace.ElementRef }, { token: i0__namespace.ViewContainerRef }, { token: i0__namespace.ChangeDetectorRef }, { token: i0__namespace.NgZone }, { token: TableCellEventDispatcher }, { token: ColumnResizeNotifierSource }, { token: TheTableToken }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
9376
|
+
TheColumnResizeDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.15", type: TheColumnResizeDirective, selector: "div[theColumnResize]", ngImport: i0__namespace });
|
|
9377
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheColumnResizeDirective, decorators: [{
|
|
9197
9378
|
type: i0.Directive,
|
|
9198
9379
|
args: [{
|
|
9199
9380
|
selector: 'div[theColumnResize]'
|
|
@@ -9593,8 +9774,8 @@
|
|
|
9593
9774
|
};
|
|
9594
9775
|
return TheTableComponent;
|
|
9595
9776
|
}(TheBaseElementComponent));
|
|
9596
|
-
TheTableComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
9597
|
-
TheTableComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
9777
|
+
TheTableComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheTableComponent, deps: [{ token: i0__namespace.ElementRef }, { token: TableCellEventDispatcher }, { token: ColumnResizeNotifierSource }, { token: TableStore }, { token: i0__namespace.ChangeDetectorRef }, { token: i0__namespace.NgZone }, { token: TableService }, { token: TheContextService }, { token: TheTableContextMenuService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
9778
|
+
TheTableComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheTableComponent, selector: "the-table, [theTable]", host: { listeners: { "mousedown": "handleMousedown($event)" } }, providers: [
|
|
9598
9779
|
TableStore,
|
|
9599
9780
|
TableService,
|
|
9600
9781
|
TheTableContextMenuService,
|
|
@@ -9605,7 +9786,7 @@
|
|
|
9605
9786
|
useExisting: TheTableComponent
|
|
9606
9787
|
}
|
|
9607
9788
|
], viewQueries: [{ propertyName: "tableWrapper", first: true, predicate: ["tableWrapper"], descendants: true, read: i0.ElementRef, static: true }, { propertyName: "theTableElement", first: true, predicate: ["theTable"], descendants: true, read: i0.ElementRef, static: true }, { propertyName: "tbodyElement", first: true, predicate: ["tbody"], descendants: true, read: i0.ElementRef, static: true }], usesInheritance: true, ngImport: i0__namespace, 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__namespace.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }], directives: [{ type: TheColumnResizeDirective, selector: "div[theColumnResize]" }, { type: i6__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
|
|
9608
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
9789
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheTableComponent, decorators: [{
|
|
9609
9790
|
type: i0.Component,
|
|
9610
9791
|
args: [{
|
|
9611
9792
|
selector: 'the-table, [theTable]',
|
|
@@ -9715,9 +9896,9 @@
|
|
|
9715
9896
|
};
|
|
9716
9897
|
return TheTableRowComponent;
|
|
9717
9898
|
}(TheBaseElementComponent));
|
|
9718
|
-
TheTableRowComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
9719
|
-
TheTableRowComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
9720
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
9899
|
+
TheTableRowComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheTableRowComponent, deps: null, target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
9900
|
+
TheTableRowComponent.ɵcmp = i0__namespace.ɵɵ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__namespace, template: '<slate-children [children]="children" [context]="childrenContext" [viewContext]="viewContext"></slate-children>', isInline: true, components: [{ type: i1__namespace.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }] });
|
|
9901
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheTableRowComponent, decorators: [{
|
|
9721
9902
|
type: i0.Component,
|
|
9722
9903
|
args: [{
|
|
9723
9904
|
selector: 'tr[theTableRow]',
|
|
@@ -9881,9 +10062,9 @@
|
|
|
9881
10062
|
};
|
|
9882
10063
|
return ColumnResizingStore;
|
|
9883
10064
|
}());
|
|
9884
|
-
ColumnResizingStore.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
9885
|
-
ColumnResizingStore.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
9886
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
10065
|
+
ColumnResizingStore.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ColumnResizingStore, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
10066
|
+
ColumnResizingStore.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ColumnResizingStore });
|
|
10067
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ColumnResizingStore, decorators: [{
|
|
9887
10068
|
type: i0.Injectable
|
|
9888
10069
|
}], ctorParameters: function () { return []; } });
|
|
9889
10070
|
|
|
@@ -10038,9 +10219,9 @@
|
|
|
10038
10219
|
};
|
|
10039
10220
|
return TheColumnResizeOverlayHandleComponent;
|
|
10040
10221
|
}());
|
|
10041
|
-
TheColumnResizeOverlayHandleComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
10042
|
-
TheColumnResizeOverlayHandleComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
10043
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
10222
|
+
TheColumnResizeOverlayHandleComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheColumnResizeOverlayHandleComponent, deps: [{ token: i0__namespace.ElementRef }, { token: i0__namespace.ViewContainerRef }, { token: i0__namespace.ChangeDetectorRef }, { token: i0__namespace.NgZone }, { token: ResizeRef }, { token: TableCellEventDispatcher }, { token: i6.DOCUMENT }, { token: ColumnResizeNotifierSource }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
10223
|
+
TheColumnResizeOverlayHandleComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheColumnResizeOverlayHandleComponent, selector: "ng-component", host: { classAttribute: "the-table-resize-overlay-thumb" }, ngImport: i0__namespace, template: '', isInline: true, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
10224
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheColumnResizeOverlayHandleComponent, decorators: [{
|
|
10044
10225
|
type: i0.Component,
|
|
10045
10226
|
args: [{
|
|
10046
10227
|
host: { class: 'the-table-resize-overlay-thumb' },
|
|
@@ -10753,9 +10934,9 @@
|
|
|
10753
10934
|
};
|
|
10754
10935
|
return TheTdComponent;
|
|
10755
10936
|
}(TheBaseElementComponent));
|
|
10756
|
-
TheTdComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
10757
|
-
TheTdComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
10758
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
10937
|
+
TheTdComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheTdComponent, deps: [{ token: i0__namespace.ElementRef }, { token: i0__namespace.ChangeDetectorRef }, { token: i0__namespace.Renderer2 }, { token: i0__namespace.ViewContainerRef }, { token: i0__namespace.NgZone }, { token: i0__namespace.Injector }, { token: i2__namespace.Overlay }, { token: ColumnResizingStore }, { token: i2__namespace.ScrollDispatcher }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
10938
|
+
TheTdComponent.ɵcmp = i0__namespace.ɵɵ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__namespace, template: "<div #cellInner>\n <slate-children [children]=\"children\" [context]=\"childrenContext\" [viewContext]=\"viewContext\"></slate-children>\n</div>\n", components: [{ type: i1__namespace.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }] });
|
|
10939
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheTdComponent, decorators: [{
|
|
10759
10940
|
type: i0.Component,
|
|
10760
10941
|
args: [{
|
|
10761
10942
|
selector: 'td[theTd]',
|
|
@@ -11342,9 +11523,9 @@
|
|
|
11342
11523
|
};
|
|
11343
11524
|
return TheVerticalToolbarItemComponent;
|
|
11344
11525
|
}(TheToolbarBaseItemComponent));
|
|
11345
|
-
TheVerticalToolbarItemComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
11346
|
-
TheVerticalToolbarItemComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
11347
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
11526
|
+
TheVerticalToolbarItemComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheVerticalToolbarItemComponent, deps: [{ token: i0__namespace.ElementRef }, { token: i1__namespace$6.ThyPopover }, { token: i0__namespace.ViewContainerRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
11527
|
+
TheVerticalToolbarItemComponent.ɵcmp = i0__namespace.ɵɵ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: i0.TemplateRef, static: true }], usesInheritance: true, ngImport: i0__namespace, 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__namespace.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i4__namespace$1.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { type: i5__namespace$2.ThyActionMenuComponent, selector: "thy-action-menu", inputs: ["thyTheme", "thyWidth"] }], directives: [{ type: i5__namespace$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { type: i6__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i5__namespace$2.ThyActionMenuItemDirective, selector: "[thyActionMenuItem]", inputs: ["thyDisabled", "thyType"] }, { type: i5__namespace$2.ThyActionMenuItemActiveDirective, selector: "[thyActionMenuItemActive]", inputs: ["thyActionMenuItemActive"] }, { type: i6__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5__namespace$2.ThyActionMenuItemIconDirective, selector: "[thyActionMenuItemIcon]" }, { type: i5__namespace$2.ThyActionMenuItemNameDirective, selector: "[thyActionMenuItemName]" }] });
|
|
11528
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheVerticalToolbarItemComponent, decorators: [{
|
|
11348
11529
|
type: i0.Component,
|
|
11349
11530
|
args: [{
|
|
11350
11531
|
selector: 'the-toolbar-vertical-align-item',
|
|
@@ -11534,35 +11715,6 @@
|
|
|
11534
11715
|
}
|
|
11535
11716
|
];
|
|
11536
11717
|
|
|
11537
|
-
/**
|
|
11538
|
-
* whether the current node is a clean paragraph
|
|
11539
|
-
* @param editor
|
|
11540
|
-
* @param text
|
|
11541
|
-
* @returns boolean
|
|
11542
|
-
*/
|
|
11543
|
-
var isCleanEmptyParagraph = function (editor) {
|
|
11544
|
-
var isCollapsedCursor = TheEditor.isFocused(editor) && editor.selection && slate.Range.isCollapsed(editor.selection);
|
|
11545
|
-
if (!isCollapsedCursor) {
|
|
11546
|
-
return false;
|
|
11547
|
-
}
|
|
11548
|
-
var block = slate.Node.ancestor(editor, [editor.selection.anchor.path[0]]);
|
|
11549
|
-
var textIndent = 'textIndent';
|
|
11550
|
-
var align = 'align';
|
|
11551
|
-
var hasTextIndent = block[textIndent];
|
|
11552
|
-
var hasAlign = block[align];
|
|
11553
|
-
if (slate.Node.string(block) === '' &&
|
|
11554
|
-
slate.Element.isElement(block) &&
|
|
11555
|
-
block.type === exports.ElementKinds.paragraph &&
|
|
11556
|
-
block.children.length === 1 &&
|
|
11557
|
-
slate.Text.isText(block.children[0]) &&
|
|
11558
|
-
!slate.Editor.isVoid(editor, block) &&
|
|
11559
|
-
!hasTextIndent &&
|
|
11560
|
-
!hasAlign) {
|
|
11561
|
-
return true;
|
|
11562
|
-
}
|
|
11563
|
-
return false;
|
|
11564
|
-
};
|
|
11565
|
-
|
|
11566
11718
|
var TheToolbarItemComponent = /** @class */ (function (_super) {
|
|
11567
11719
|
__extends(TheToolbarItemComponent, _super);
|
|
11568
11720
|
function TheToolbarItemComponent(ngZone, cfr) {
|
|
@@ -11616,9 +11768,9 @@
|
|
|
11616
11768
|
};
|
|
11617
11769
|
return TheToolbarItemComponent;
|
|
11618
11770
|
}(TheToolbarBaseItemComponent));
|
|
11619
|
-
TheToolbarItemComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
11620
|
-
TheToolbarItemComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
11621
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
11771
|
+
TheToolbarItemComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheToolbarItemComponent, deps: [{ token: i0__namespace.NgZone }, { token: i0__namespace.ComponentFactoryResolver }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
11772
|
+
TheToolbarItemComponent.ɵcmp = i0__namespace.ɵɵ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: i0.ViewContainerRef, static: true }], usesInheritance: true, ngImport: i0__namespace, template: "\n <ng-container *ngIf=\"itemMode === ToolbarItemMode.horizontal; else selectionItem\">\n <a\n thyIconNavLink\n [thyIconNavLinkIcon]=\"item.icon\"\n [thyTooltip]=\"tooltip\"\n [thyTooltipTemplateContext]=\"{ name: item.name, shortcutKey: item.shortcutKey }\"\n thyTooltipPlacement=\"top\"\n [thyIconNavLinkActive]=\"active\"\n (mousedown)=\"execute($event)\"\n ></a>\n </ng-container>\n <ng-template #selectionItem>\n <ng-container *ngIf=\"!item?.quickItemComponent\">\n <thy-icon [thyIconName]=\"item?.icon\" [thyIconRotate]=\"0\" class=\"quick-toolbar-icon\"></thy-icon>\n <span class=\"quick-toolbar-name\">{{ item?.name }}</span>\n </ng-container>\n </ng-template>\n <ng-template #tooltip let-data> {{ data.name }} {{ data.shortcutKey }} </ng-template>\n <ng-container #toolbarContainer></ng-container>\n ", isInline: true, components: [{ type: i3__namespace.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i4__namespace$1.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }], directives: [{ type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5__namespace$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }] });
|
|
11773
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheToolbarItemComponent, decorators: [{
|
|
11622
11774
|
type: i0.Component,
|
|
11623
11775
|
args: [{
|
|
11624
11776
|
selector: 'the-toolbar-item',
|
|
@@ -11689,9 +11841,9 @@
|
|
|
11689
11841
|
};
|
|
11690
11842
|
return TheQuickToolbarComponent;
|
|
11691
11843
|
}(core.mixinUnsubscribe(core.MixinBase)));
|
|
11692
|
-
TheQuickToolbarComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
11693
|
-
TheQuickToolbarComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
11694
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
11844
|
+
TheQuickToolbarComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheQuickToolbarComponent, deps: [{ token: i1__namespace$3.ThyPopoverRef }, { token: i0__namespace.ElementRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
11845
|
+
TheQuickToolbarComponent.ɵcmp = i0__namespace.ɵɵ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__namespace, 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__namespace$2.ThySelectionListComponent, selector: "thy-selection-list,[thy-selection-list]", inputs: ["thyMultiple", "thyBindKeyEventContainer", "thyScrollContainer", "thyBeforeKeydown", "thyUniqueKey", "thyCompareWith", "thyLayout", "thyAutoActiveFirstItem", "thySize", "thySpaceKeyEnabled"], outputs: ["thySelectionChange"] }, { type: i5__namespace$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__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
11846
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheQuickToolbarComponent, decorators: [{
|
|
11695
11847
|
type: i0.Component,
|
|
11696
11848
|
args: [{
|
|
11697
11849
|
selector: 'the-quick-toolbar',
|
|
@@ -11816,11 +11968,44 @@
|
|
|
11816
11968
|
|
|
11817
11969
|
var FontSizeEditor = {
|
|
11818
11970
|
setFontSize: function (editor, size) {
|
|
11971
|
+
var contextService = editor.injector.get(TheContextService);
|
|
11972
|
+
var defaultFontSize = contextService.getDefaultFontSize();
|
|
11973
|
+
var marks = getSelectionMarks(editor);
|
|
11974
|
+
var fontSizeMark = marks[exports.MarkTypes.fontSize];
|
|
11975
|
+
var isDefaultFontSize = size === defaultFontSize;
|
|
11976
|
+
if (!fontSizeMark && isDefaultFontSize) {
|
|
11977
|
+
return;
|
|
11978
|
+
}
|
|
11979
|
+
// unset fontSize
|
|
11980
|
+
if (FontSizeEditor.unsetFontSize(editor, size, fontSizeMark, isDefaultFontSize)) {
|
|
11981
|
+
return;
|
|
11982
|
+
}
|
|
11983
|
+
FontSizeEditor.setFontSizeMark(editor, size);
|
|
11984
|
+
},
|
|
11985
|
+
setFontSizeMark: function (editor, size) {
|
|
11986
|
+
// set Table selectedCells fontSize
|
|
11819
11987
|
if (TableEditor.toggleMark(editor, false, exports.MarkTypes.fontSize, Number(size))) {
|
|
11820
11988
|
return;
|
|
11821
11989
|
}
|
|
11990
|
+
// set paragraph text fontSize
|
|
11822
11991
|
slate.Editor.addMark(editor, exports.MarkTypes.fontSize, Number(size));
|
|
11823
11992
|
},
|
|
11993
|
+
unsetFontSize: function (editor, size, fontSizeMark, isDefaultFontSize) {
|
|
11994
|
+
var _a;
|
|
11995
|
+
var isTable = TableEditor.isActive(editor);
|
|
11996
|
+
if (fontSizeMark && isDefaultFontSize) {
|
|
11997
|
+
// unset Table selectedCells fontSize
|
|
11998
|
+
if (isTable && TableEditor.toggleMark(editor, true, exports.MarkTypes.fontSize, Number(size))) {
|
|
11999
|
+
return true;
|
|
12000
|
+
}
|
|
12001
|
+
// unset paragraph text fontSize
|
|
12002
|
+
setMarks(editor, (_a = {},
|
|
12003
|
+
_a[exports.MarkTypes.fontSize] = null,
|
|
12004
|
+
_a), editor.selection);
|
|
12005
|
+
return true;
|
|
12006
|
+
}
|
|
12007
|
+
return false;
|
|
12008
|
+
},
|
|
11824
12009
|
isFontSizeActive: function (editor, size) {
|
|
11825
12010
|
if (editor.selection) {
|
|
11826
12011
|
var anchorBlock$1 = anchorBlock(editor);
|
|
@@ -11878,6 +12063,84 @@
|
|
|
11878
12063
|
}
|
|
11879
12064
|
], __read(sizeOptions()));
|
|
11880
12065
|
|
|
12066
|
+
var InlineCodeOptions = [
|
|
12067
|
+
{
|
|
12068
|
+
key: exports.ElementKinds.inlineCode,
|
|
12069
|
+
icon: 'code',
|
|
12070
|
+
name: '行内代码',
|
|
12071
|
+
shortcutKey: CONTROL_KEY + "+E",
|
|
12072
|
+
execute: function (editor) { return InlineCodeEditor.toggleInlineCode(editor); },
|
|
12073
|
+
active: function (editor) { return InlineCodeEditor.isInlineCodeActive(editor); }
|
|
12074
|
+
}
|
|
12075
|
+
];
|
|
12076
|
+
|
|
12077
|
+
var TheInlineCodeComponent = /** @class */ (function (_super) {
|
|
12078
|
+
__extends(TheInlineCodeComponent, _super);
|
|
12079
|
+
function TheInlineCodeComponent(elementRef, cdr) {
|
|
12080
|
+
var _this = _super.call(this, elementRef, cdr) || this;
|
|
12081
|
+
_this.elementRef = elementRef;
|
|
12082
|
+
_this.cdr = cdr;
|
|
12083
|
+
return _this;
|
|
12084
|
+
}
|
|
12085
|
+
TheInlineCodeComponent.prototype.ngOnInit = function () {
|
|
12086
|
+
_super.prototype.ngOnInit.call(this);
|
|
12087
|
+
};
|
|
12088
|
+
TheInlineCodeComponent.prototype.ngOnDestroy = function () {
|
|
12089
|
+
_super.prototype.ngOnDestroy.call(this);
|
|
12090
|
+
};
|
|
12091
|
+
return TheInlineCodeComponent;
|
|
12092
|
+
}(TheBaseElementComponent));
|
|
12093
|
+
TheInlineCodeComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheInlineCodeComponent, deps: [{ token: i0__namespace.ElementRef }, { token: i0__namespace.ChangeDetectorRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
12094
|
+
TheInlineCodeComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheInlineCodeComponent, selector: "span[theInlineCode]", usesInheritance: true, ngImport: i0__namespace, template: '<slate-children [children]="children" [context]="childrenContext" [viewContext]="viewContext"></slate-children>', isInline: true, components: [{ type: i1__namespace.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }] });
|
|
12095
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheInlineCodeComponent, decorators: [{
|
|
12096
|
+
type: i0.Component,
|
|
12097
|
+
args: [{
|
|
12098
|
+
selector: 'span[theInlineCode]',
|
|
12099
|
+
template: '<slate-children [children]="children" [context]="childrenContext" [viewContext]="viewContext"></slate-children>'
|
|
12100
|
+
}]
|
|
12101
|
+
}], ctorParameters: function () { return [{ type: i0__namespace.ElementRef }, { type: i0__namespace.ChangeDetectorRef }]; } });
|
|
12102
|
+
|
|
12103
|
+
var withInlineCode = function (editor) {
|
|
12104
|
+
var isInline = editor.isInline, renderElement = editor.renderElement, insertText = editor.insertText;
|
|
12105
|
+
editor.isInline = function (element) {
|
|
12106
|
+
return element.type === exports.ElementKinds.inlineCode ? true : isInline(element);
|
|
12107
|
+
};
|
|
12108
|
+
editor.renderElement = function (element) {
|
|
12109
|
+
if (element.type === exports.ElementKinds.inlineCode) {
|
|
12110
|
+
return TheInlineCodeComponent;
|
|
12111
|
+
}
|
|
12112
|
+
return renderElement(element);
|
|
12113
|
+
};
|
|
12114
|
+
editor.insertText = function (text) {
|
|
12115
|
+
if (text && InlineCodeEditor.isInlineCodeActive(editor)) {
|
|
12116
|
+
var selection = editor.selection;
|
|
12117
|
+
var currentNodeText = slate.Editor.string(editor, editor.selection.anchor.path);
|
|
12118
|
+
insertText(text);
|
|
12119
|
+
if (currentNodeText == ZERO_WIDTH_CHAR) {
|
|
12120
|
+
var inlineCodePath = slate.Editor.path(editor, editor.selection);
|
|
12121
|
+
var range = {
|
|
12122
|
+
anchor: slate.Editor.before(editor, selection.anchor),
|
|
12123
|
+
focus: selection.anchor
|
|
12124
|
+
};
|
|
12125
|
+
if (slate.Editor.isStart(editor, selection.anchor, inlineCodePath)) {
|
|
12126
|
+
range = {
|
|
12127
|
+
anchor: editor.selection.anchor,
|
|
12128
|
+
focus: slate.Editor.after(editor, editor.selection)
|
|
12129
|
+
};
|
|
12130
|
+
}
|
|
12131
|
+
slate.Transforms.delete(editor, {
|
|
12132
|
+
at: range
|
|
12133
|
+
});
|
|
12134
|
+
}
|
|
12135
|
+
}
|
|
12136
|
+
else {
|
|
12137
|
+
insertText(text);
|
|
12138
|
+
}
|
|
12139
|
+
};
|
|
12140
|
+
editor = withRemoveEmptyNodes({ type: exports.ElementKinds.inlineCode })(editor);
|
|
12141
|
+
return editor;
|
|
12142
|
+
};
|
|
12143
|
+
|
|
11881
12144
|
var internalPlugins = [
|
|
11882
12145
|
withTheHistory,
|
|
11883
12146
|
withAutoInsertData(),
|
|
@@ -11917,9 +12180,10 @@
|
|
|
11917
12180
|
withImage,
|
|
11918
12181
|
withDeserializeHMTL,
|
|
11919
12182
|
withDeserializeMd(),
|
|
11920
|
-
withQuickInsert
|
|
12183
|
+
withQuickInsert,
|
|
12184
|
+
withInlineCode
|
|
11921
12185
|
];
|
|
11922
|
-
var internalToolbarItems = __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], __read(AlignOptions)), __read(MarkOptions)), __read(ColorOptions)), __read(HeadingOptions)), __read(FontSizeOptions)), __read(TodoItemOptions)), __read(ListOptions)), __read(ImageOptions)), __read(HrOptions)), __read(BlockquoteOptions)), __read(CodeOptions)), __read(LinkOptions)), __read(TableOptions)), __read(VerticalAlignOptions)), __read(PaintFormatOptions));
|
|
12186
|
+
var internalToolbarItems = __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], __read(AlignOptions)), __read(MarkOptions)), __read(ColorOptions)), __read(HeadingOptions)), __read(FontSizeOptions)), __read(TodoItemOptions)), __read(ListOptions)), __read(ImageOptions)), __read(HrOptions)), __read(BlockquoteOptions)), __read(CodeOptions)), __read(LinkOptions)), __read(TableOptions)), __read(VerticalAlignOptions)), __read(PaintFormatOptions)), __read(InlineCodeOptions));
|
|
11923
12187
|
var toolbarCompose = function (toolbarItems) {
|
|
11924
12188
|
if (toolbarItems === void 0) { toolbarItems = []; }
|
|
11925
12189
|
return __spreadArray(__spreadArray([], __read(internalToolbarItems)), __read(toolbarItems));
|
|
@@ -11941,14 +12205,19 @@
|
|
|
11941
12205
|
'mod+b': exports.MarkTypes.bold,
|
|
11942
12206
|
'mod+i': exports.MarkTypes.italic,
|
|
11943
12207
|
'mod+u': exports.MarkTypes.underline,
|
|
11944
|
-
'mod+e': exports.
|
|
12208
|
+
'mod+e': exports.ElementKinds.inlineCode
|
|
11945
12209
|
};
|
|
11946
12210
|
var markShortcuts = function (editor, event) {
|
|
11947
12211
|
for (var hotkey in HOTKEYS) {
|
|
11948
12212
|
if (isHotkey__default["default"](hotkey, event)) {
|
|
11949
12213
|
event.preventDefault();
|
|
11950
12214
|
var mark = HOTKEYS[hotkey];
|
|
11951
|
-
|
|
12215
|
+
if (mark === exports.ElementKinds.inlineCode) {
|
|
12216
|
+
InlineCodeEditor.toggleInlineCode(editor);
|
|
12217
|
+
}
|
|
12218
|
+
else {
|
|
12219
|
+
MarkEditor.toggleMark(editor, mark);
|
|
12220
|
+
}
|
|
11952
12221
|
}
|
|
11953
12222
|
}
|
|
11954
12223
|
};
|
|
@@ -12003,9 +12272,9 @@
|
|
|
12003
12272
|
};
|
|
12004
12273
|
return TheToolbarService;
|
|
12005
12274
|
}());
|
|
12006
|
-
TheToolbarService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
12007
|
-
TheToolbarService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
12008
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
12275
|
+
TheToolbarService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheToolbarService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
12276
|
+
TheToolbarService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheToolbarService });
|
|
12277
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheToolbarService, decorators: [{
|
|
12009
12278
|
type: i0.Injectable
|
|
12010
12279
|
}] });
|
|
12011
12280
|
|
|
@@ -12081,9 +12350,9 @@
|
|
|
12081
12350
|
}
|
|
12082
12351
|
};
|
|
12083
12352
|
TheToolbarComponent.prototype.setToolbarClass = function () {
|
|
12084
|
-
var
|
|
12353
|
+
var _d;
|
|
12085
12354
|
if (this.editor && !!this.containerClass.length) {
|
|
12086
|
-
(
|
|
12355
|
+
(_d = this.elementRef.nativeElement.classList).add.apply(_d, __spreadArray([], __read(this.containerClass)));
|
|
12087
12356
|
}
|
|
12088
12357
|
};
|
|
12089
12358
|
TheToolbarComponent.prototype.resizeElement = function () {
|
|
@@ -12091,7 +12360,7 @@
|
|
|
12091
12360
|
var editableElement = this.elementRef.nativeElement;
|
|
12092
12361
|
// @ts-ignore
|
|
12093
12362
|
this.resizeObserver = new ResizeObserver(function (entries) {
|
|
12094
|
-
var e_1,
|
|
12363
|
+
var e_1, _d;
|
|
12095
12364
|
try {
|
|
12096
12365
|
for (var entries_1 = __values(entries), entries_1_1 = entries_1.next(); !entries_1_1.done; entries_1_1 = entries_1.next()) {
|
|
12097
12366
|
var entry = entries_1_1.value;
|
|
@@ -12105,7 +12374,7 @@
|
|
|
12105
12374
|
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
12106
12375
|
finally {
|
|
12107
12376
|
try {
|
|
12108
|
-
if (entries_1_1 && !entries_1_1.done && (
|
|
12377
|
+
if (entries_1_1 && !entries_1_1.done && (_d = entries_1.return)) _d.call(entries_1);
|
|
12109
12378
|
}
|
|
12110
12379
|
finally { if (e_1) throw e_1.error; }
|
|
12111
12380
|
}
|
|
@@ -12113,7 +12382,7 @@
|
|
|
12113
12382
|
this.resizeObserver.observe(editableElement);
|
|
12114
12383
|
};
|
|
12115
12384
|
TheToolbarComponent.prototype.statusChange = function (editor) {
|
|
12116
|
-
var e_2,
|
|
12385
|
+
var e_2, _d;
|
|
12117
12386
|
var toolbarItems = __spreadArray(__spreadArray([], __read(this.toolbarItems)), [this.moreGroupMenu]);
|
|
12118
12387
|
try {
|
|
12119
12388
|
for (var toolbarItems_1 = __values(toolbarItems), toolbarItems_1_1 = toolbarItems_1.next(); !toolbarItems_1_1.done; toolbarItems_1_1 = toolbarItems_1.next()) {
|
|
@@ -12129,7 +12398,7 @@
|
|
|
12129
12398
|
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
12130
12399
|
finally {
|
|
12131
12400
|
try {
|
|
12132
|
-
if (toolbarItems_1_1 && !toolbarItems_1_1.done && (
|
|
12401
|
+
if (toolbarItems_1_1 && !toolbarItems_1_1.done && (_d = toolbarItems_1.return)) _d.call(toolbarItems_1);
|
|
12133
12402
|
}
|
|
12134
12403
|
finally { if (e_2) throw e_2.error; }
|
|
12135
12404
|
}
|
|
@@ -12141,7 +12410,7 @@
|
|
|
12141
12410
|
var toolbarItems = this.toolbarItemsCompose();
|
|
12142
12411
|
var items = toolbarItems.items, group = toolbarItems.group;
|
|
12143
12412
|
this.ngZone.run(function () {
|
|
12144
|
-
var e_3,
|
|
12413
|
+
var e_3, _d;
|
|
12145
12414
|
try {
|
|
12146
12415
|
for (var items_1 = __values(items), items_1_1 = items_1.next(); !items_1_1.done; items_1_1 = items_1.next()) {
|
|
12147
12416
|
var item = items_1_1.value;
|
|
@@ -12155,7 +12424,7 @@
|
|
|
12155
12424
|
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
12156
12425
|
finally {
|
|
12157
12426
|
try {
|
|
12158
|
-
if (items_1_1 && !items_1_1.done && (
|
|
12427
|
+
if (items_1_1 && !items_1_1.done && (_d = items_1.return)) _d.call(items_1);
|
|
12159
12428
|
}
|
|
12160
12429
|
finally { if (e_3) throw e_3.error; }
|
|
12161
12430
|
}
|
|
@@ -12178,7 +12447,7 @@
|
|
|
12178
12447
|
* set aside 50px
|
|
12179
12448
|
*/
|
|
12180
12449
|
TheToolbarComponent.prototype.toolbarItemsCompose = function () {
|
|
12181
|
-
var e_4,
|
|
12450
|
+
var e_4, _d;
|
|
12182
12451
|
var elementWidth = this.isMore ? this.elementWidth : null;
|
|
12183
12452
|
var maxItemWidth = 50;
|
|
12184
12453
|
var defaultItemWidth = 35;
|
|
@@ -12188,8 +12457,8 @@
|
|
|
12188
12457
|
var items = [];
|
|
12189
12458
|
var group = [];
|
|
12190
12459
|
try {
|
|
12191
|
-
for (var
|
|
12192
|
-
var item =
|
|
12460
|
+
for (var _e = __values(this.toolbarItems), _f = _e.next(); !_f.done; _f = _e.next()) {
|
|
12461
|
+
var item = _f.value;
|
|
12193
12462
|
if (!this.isMore) {
|
|
12194
12463
|
items.push(item);
|
|
12195
12464
|
continue;
|
|
@@ -12218,7 +12487,7 @@
|
|
|
12218
12487
|
catch (e_4_1) { e_4 = { error: e_4_1 }; }
|
|
12219
12488
|
finally {
|
|
12220
12489
|
try {
|
|
12221
|
-
if (
|
|
12490
|
+
if (_f && !_f.done && (_d = _e.return)) _d.call(_e);
|
|
12222
12491
|
}
|
|
12223
12492
|
finally { if (e_4) throw e_4.error; }
|
|
12224
12493
|
}
|
|
@@ -12231,12 +12500,12 @@
|
|
|
12231
12500
|
* externally designated more group
|
|
12232
12501
|
*/
|
|
12233
12502
|
TheToolbarComponent.prototype.toolbarItemsAndMoreCompose = function () {
|
|
12234
|
-
var e_5,
|
|
12503
|
+
var e_5, _d;
|
|
12235
12504
|
var items = [];
|
|
12236
12505
|
var group = [];
|
|
12237
12506
|
try {
|
|
12238
|
-
for (var
|
|
12239
|
-
var item =
|
|
12507
|
+
for (var _e = __values(this.toolbarItems), _f = _e.next(); !_f.done; _f = _e.next()) {
|
|
12508
|
+
var item = _f.value;
|
|
12240
12509
|
if (item.key === exports.ToolbarActionTypes.split) {
|
|
12241
12510
|
items.push(item);
|
|
12242
12511
|
continue;
|
|
@@ -12247,7 +12516,7 @@
|
|
|
12247
12516
|
catch (e_5_1) { e_5 = { error: e_5_1 }; }
|
|
12248
12517
|
finally {
|
|
12249
12518
|
try {
|
|
12250
|
-
if (
|
|
12519
|
+
if (_f && !_f.done && (_d = _e.return)) _d.call(_e);
|
|
12251
12520
|
}
|
|
12252
12521
|
finally { if (e_5) throw e_5.error; }
|
|
12253
12522
|
}
|
|
@@ -12310,19 +12579,21 @@
|
|
|
12310
12579
|
return TheToolbarItemComponent;
|
|
12311
12580
|
};
|
|
12312
12581
|
TheToolbarComponent.prototype.getDropdownItem = function (item) {
|
|
12313
|
-
var _a;
|
|
12582
|
+
var _a, _b, _c;
|
|
12314
12583
|
var dropdownKey = item === null || item === void 0 ? void 0 : item.dropdownItemKey;
|
|
12315
12584
|
// modify the fontsize option externally
|
|
12316
|
-
|
|
12317
|
-
|
|
12585
|
+
var contextService = (_b = (_a = this.editor) === null || _a === void 0 ? void 0 : _a.injector) === null || _b === void 0 ? void 0 : _b.get(TheContextService);
|
|
12586
|
+
var fontSize = contextService === null || contextService === void 0 ? void 0 : contextService.getDefaultFontSize();
|
|
12587
|
+
if (contextService && item.key === exports.MarkTypes.fontSize && fontSize) {
|
|
12588
|
+
dropdownKey = fontSize;
|
|
12318
12589
|
}
|
|
12319
|
-
return (
|
|
12590
|
+
return (_c = item === null || item === void 0 ? void 0 : item.includes) === null || _c === void 0 ? void 0 : _c.find(function (item) { return item.key === dropdownKey; });
|
|
12320
12591
|
};
|
|
12321
12592
|
return TheToolbarComponent;
|
|
12322
12593
|
}());
|
|
12323
|
-
TheToolbarComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
12324
|
-
TheToolbarComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
12325
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
12594
|
+
TheToolbarComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheToolbarComponent, deps: [{ token: i0__namespace.ComponentFactoryResolver }, { token: i0__namespace.ElementRef }, { token: i0__namespace.NgZone }, { token: TheToolbarGroupToken }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
12595
|
+
TheToolbarComponent.ɵcmp = i0__namespace.ɵɵ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: i0.ViewContainerRef, static: true }], usesOnChanges: true, ngImport: i0__namespace, 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__namespace.ThyIconNavComponent, selector: "thy-icon-nav", inputs: ["thyType"] }], directives: [{ type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }] });
|
|
12596
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheToolbarComponent, decorators: [{
|
|
12326
12597
|
type: i0.Component,
|
|
12327
12598
|
args: [{
|
|
12328
12599
|
selector: 'the-toolbar',
|
|
@@ -12342,8 +12613,6 @@
|
|
|
12342
12613
|
type: i0.Input
|
|
12343
12614
|
}], align: [{
|
|
12344
12615
|
type: i0.Input
|
|
12345
|
-
}], fontSize: [{
|
|
12346
|
-
type: i0.Input
|
|
12347
12616
|
}], containerClass: [{
|
|
12348
12617
|
type: i0.Input
|
|
12349
12618
|
}], isMore: [{
|
|
@@ -12463,9 +12732,9 @@
|
|
|
12463
12732
|
};
|
|
12464
12733
|
return TheInlineToolbarComponent;
|
|
12465
12734
|
}());
|
|
12466
|
-
TheInlineToolbarComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
12467
|
-
TheInlineToolbarComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
12468
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
12735
|
+
TheInlineToolbarComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheInlineToolbarComponent, deps: [{ token: i0__namespace.ElementRef }, { token: i2__namespace.ScrollDispatcher }, { token: i0__namespace.ChangeDetectorRef }, { token: i0__namespace.NgZone }, { token: TheContextService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
12736
|
+
TheInlineToolbarComponent.ɵcmp = i0__namespace.ɵɵ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__namespace, template: "<the-toolbar\n #inlineToolbar\n class=\"the-inline-toolbar\"\n [editor]=\"editor\"\n [toolbarItems]=\"toolbarItems\"\n [isMore]=\"false\"\n ></the-toolbar> ", isInline: true, components: [{ type: TheToolbarComponent, selector: "the-toolbar", inputs: ["editor", "toolbarItems", "align", "containerClass", "isMore", "afterTemplate"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
12737
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheInlineToolbarComponent, decorators: [{
|
|
12469
12738
|
type: i0.Component,
|
|
12470
12739
|
args: [{
|
|
12471
12740
|
selector: 'the-inline-toolbar',
|
|
@@ -12489,6 +12758,7 @@
|
|
|
12489
12758
|
this.renderer = renderer;
|
|
12490
12759
|
this.elementRef = elementRef;
|
|
12491
12760
|
this.cdr = cdr;
|
|
12761
|
+
this.isVisible = false;
|
|
12492
12762
|
this.isHide = true;
|
|
12493
12763
|
this.defaultIconName = 'plus-circle-thin';
|
|
12494
12764
|
this.iconNameFill = 'plus-circle-thin-fill';
|
|
@@ -12499,19 +12769,21 @@
|
|
|
12499
12769
|
event.stopPropagation();
|
|
12500
12770
|
};
|
|
12501
12771
|
TheQuickInsertComponent.prototype.checkStatus = function () {
|
|
12502
|
-
var
|
|
12772
|
+
var _a;
|
|
12503
12773
|
var editor = this.editor;
|
|
12504
|
-
if (isCleanEmptyParagraph(editor)) {
|
|
12505
|
-
|
|
12506
|
-
|
|
12507
|
-
|
|
12508
|
-
var rootNode = i1.AngularEditor.toDOMNode(editor, block);
|
|
12509
|
-
_this.updatePosition(rootNode.offsetLeft, rootNode.offsetTop);
|
|
12510
|
-
});
|
|
12774
|
+
if (this.isVisible && isCleanEmptyParagraph(editor) && !this.hasExcludeAttribute()) {
|
|
12775
|
+
var block = slate.Node.ancestor(editor, [(_a = editor === null || editor === void 0 ? void 0 : editor.selection) === null || _a === void 0 ? void 0 : _a.anchor.path[0]]);
|
|
12776
|
+
var rootNode = i1.AngularEditor.toDOMNode(editor, block);
|
|
12777
|
+
this.updatePosition(rootNode.offsetLeft, rootNode.offsetTop);
|
|
12511
12778
|
return;
|
|
12512
12779
|
}
|
|
12513
12780
|
this.isHide = true;
|
|
12514
12781
|
};
|
|
12782
|
+
TheQuickInsertComponent.prototype.hasExcludeAttribute = function () {
|
|
12783
|
+
var marks = getSelectionMarks(this.editor);
|
|
12784
|
+
var fontSizeMark = marks[exports.MarkTypes.fontSize];
|
|
12785
|
+
return fontSizeMark;
|
|
12786
|
+
};
|
|
12515
12787
|
TheQuickInsertComponent.prototype.updatePosition = function (left, top) {
|
|
12516
12788
|
this.isHide = false;
|
|
12517
12789
|
this.renderer.setStyle(this.elementRef.nativeElement, 'top', top + "px");
|
|
@@ -12532,9 +12804,9 @@
|
|
|
12532
12804
|
};
|
|
12533
12805
|
return TheQuickInsertComponent;
|
|
12534
12806
|
}());
|
|
12535
|
-
TheQuickInsertComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
12536
|
-
TheQuickInsertComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
12537
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
12807
|
+
TheQuickInsertComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheQuickInsertComponent, deps: [{ token: i0__namespace.Renderer2 }, { token: i0__namespace.ElementRef }, { token: i0__namespace.ChangeDetectorRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
12808
|
+
TheQuickInsertComponent.ɵcmp = i0__namespace.ɵɵ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: i0.ElementRef }], ngImport: i0__namespace, 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__namespace$1.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }] });
|
|
12809
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheQuickInsertComponent, decorators: [{
|
|
12538
12810
|
type: i0.Component,
|
|
12539
12811
|
args: [{
|
|
12540
12812
|
selector: '[theQuickInsert]',
|
|
@@ -12548,6 +12820,8 @@
|
|
|
12548
12820
|
type: i0.Input
|
|
12549
12821
|
}], quickToolbarItems: [{
|
|
12550
12822
|
type: i0.Input
|
|
12823
|
+
}], isVisible: [{
|
|
12824
|
+
type: i0.Input
|
|
12551
12825
|
}], iconElement: [{
|
|
12552
12826
|
type: i0.ViewChild,
|
|
12553
12827
|
args: ['iconElement', { read: i0.ElementRef, static: false }]
|
|
@@ -12556,84 +12830,6 @@
|
|
|
12556
12830
|
args: ['mousedown', ['$event']]
|
|
12557
12831
|
}] } });
|
|
12558
12832
|
|
|
12559
|
-
var ThePlaceholderComponent = /** @class */ (function () {
|
|
12560
|
-
function ThePlaceholderComponent(renderer, elementRef, contextService) {
|
|
12561
|
-
this.renderer = renderer;
|
|
12562
|
-
this.elementRef = elementRef;
|
|
12563
|
-
this.contextService = contextService;
|
|
12564
|
-
this.isHide = true;
|
|
12565
|
-
}
|
|
12566
|
-
ThePlaceholderComponent.prototype.handleCompositionStart = function () {
|
|
12567
|
-
var _a;
|
|
12568
|
-
if ((_a = this.editor) === null || _a === void 0 ? void 0 : _a.selection) {
|
|
12569
|
-
this.hide();
|
|
12570
|
-
}
|
|
12571
|
-
};
|
|
12572
|
-
ThePlaceholderComponent.prototype.handleCompositionEnd = function (event) {
|
|
12573
|
-
if (!event.data) {
|
|
12574
|
-
this.checkStatus();
|
|
12575
|
-
}
|
|
12576
|
-
};
|
|
12577
|
-
ThePlaceholderComponent.prototype.checkStatus = function () {
|
|
12578
|
-
var _this = this;
|
|
12579
|
-
var _a, _b, _c;
|
|
12580
|
-
var editor = this.editor;
|
|
12581
|
-
var isEmptyShow = typeof ((_a = this.options) === null || _a === void 0 ? void 0 : _a.isEmptyShowPlaceholder) === 'undefined' ? true : this.options.isEmptyShowPlaceholder;
|
|
12582
|
-
var isMustShow = (_b = this.options) === null || _b === void 0 ? void 0 : _b.isMustShowPlaceholder;
|
|
12583
|
-
var isReadonly = (_c = this.options) === null || _c === void 0 ? void 0 : _c.readonly;
|
|
12584
|
-
// empty content and no selection processing
|
|
12585
|
-
if (!isReadonly && isEmptyShow && isEmptyContent(editor.children)) {
|
|
12586
|
-
var firstElementChild = this.contextService.getFirstElementChild();
|
|
12587
|
-
var offsetTop = firstElementChild.offsetTop;
|
|
12588
|
-
var offsetLeft = firstElementChild.offsetLeft;
|
|
12589
|
-
this.updatePosition(offsetLeft, offsetTop);
|
|
12590
|
-
return;
|
|
12591
|
-
}
|
|
12592
|
-
if (isMustShow && isCleanEmptyParagraph(editor)) {
|
|
12593
|
-
setTimeout(function () {
|
|
12594
|
-
var _a;
|
|
12595
|
-
var block = slate.Node.ancestor(editor, [(_a = editor === null || editor === void 0 ? void 0 : editor.selection) === null || _a === void 0 ? void 0 : _a.anchor.path[0]]);
|
|
12596
|
-
var rootNode = i1.AngularEditor.toDOMNode(editor, block);
|
|
12597
|
-
_this.updatePosition(rootNode.offsetLeft, rootNode.offsetTop);
|
|
12598
|
-
});
|
|
12599
|
-
return;
|
|
12600
|
-
}
|
|
12601
|
-
this.isHide = true;
|
|
12602
|
-
};
|
|
12603
|
-
ThePlaceholderComponent.prototype.updatePosition = function (left, top) {
|
|
12604
|
-
this.isHide = false;
|
|
12605
|
-
this.renderer.setStyle(this.elementRef.nativeElement, 'top', top + "px");
|
|
12606
|
-
this.renderer.setStyle(this.elementRef.nativeElement, 'left', left + "px");
|
|
12607
|
-
};
|
|
12608
|
-
ThePlaceholderComponent.prototype.hide = function () {
|
|
12609
|
-
this.isHide = true;
|
|
12610
|
-
};
|
|
12611
|
-
return ThePlaceholderComponent;
|
|
12612
|
-
}());
|
|
12613
|
-
ThePlaceholderComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: ThePlaceholderComponent, deps: [{ token: i0__namespace.Renderer2 }, { token: i0__namespace.ElementRef }, { token: TheContextService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
12614
|
-
ThePlaceholderComponent.ɵcmp = i0__namespace.ɵɵ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__namespace, template: "{{ options?.placeholder }}", isInline: true });
|
|
12615
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.7", ngImport: i0__namespace, type: ThePlaceholderComponent, decorators: [{
|
|
12616
|
-
type: i0.Component,
|
|
12617
|
-
args: [{
|
|
12618
|
-
selector: 'div[thePlaceholder]',
|
|
12619
|
-
template: "{{ options?.placeholder }}",
|
|
12620
|
-
host: {
|
|
12621
|
-
class: 'the-placeholder',
|
|
12622
|
-
'[class.hide]': 'isHide'
|
|
12623
|
-
}
|
|
12624
|
-
}]
|
|
12625
|
-
}], ctorParameters: function () { return [{ type: i0__namespace.Renderer2 }, { type: i0__namespace.ElementRef }, { type: TheContextService }]; }, propDecorators: { editor: [{
|
|
12626
|
-
type: i0.Input
|
|
12627
|
-
}], options: [{
|
|
12628
|
-
type: i0.Input
|
|
12629
|
-
}], handleCompositionStart: [{
|
|
12630
|
-
type: i0.HostListener,
|
|
12631
|
-
args: ['document:compositionstart']
|
|
12632
|
-
}], handleCompositionEnd: [{
|
|
12633
|
-
type: i0.HostListener,
|
|
12634
|
-
args: ['document:compositionend', ['$event']]
|
|
12635
|
-
}] } });
|
|
12636
|
-
|
|
12637
12833
|
var TheTemplateComponent = /** @class */ (function () {
|
|
12638
12834
|
function TheTemplateComponent() {
|
|
12639
12835
|
var _this = this;
|
|
@@ -12664,9 +12860,9 @@
|
|
|
12664
12860
|
}
|
|
12665
12861
|
return TheTemplateComponent;
|
|
12666
12862
|
}());
|
|
12667
|
-
TheTemplateComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
12668
|
-
TheTemplateComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
12669
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
12863
|
+
TheTemplateComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheTemplateComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
12864
|
+
TheTemplateComponent.ɵcmp = i0__namespace.ɵɵ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: i0.TemplateRef, static: true }, { propertyName: "headingOneTemplate", first: true, predicate: ["headingOne"], descendants: true, read: i0.TemplateRef, static: true }, { propertyName: "headingTwoTemplate", first: true, predicate: ["headingTwo"], descendants: true, read: i0.TemplateRef, static: true }, { propertyName: "headingThreeTemplate", first: true, predicate: ["headingThree"], descendants: true, read: i0.TemplateRef, static: true }, { propertyName: "headingFourTemplate", first: true, predicate: ["headingFour"], descendants: true, read: i0.TemplateRef, static: true }, { propertyName: "headingFiveTemplate", first: true, predicate: ["headingFive"], descendants: true, read: i0.TemplateRef, static: true }, { propertyName: "headingSixTemplate", first: true, predicate: ["headingSix"], descendants: true, read: i0.TemplateRef, static: true }], ngImport: i0__namespace, 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__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], pipes: { "elementStyle": ElementStylePipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
12865
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheTemplateComponent, decorators: [{
|
|
12670
12866
|
type: i0.Component,
|
|
12671
12867
|
args: [{
|
|
12672
12868
|
selector: 'the-template,[theTemplate]',
|
|
@@ -12698,13 +12894,14 @@
|
|
|
12698
12894
|
|
|
12699
12895
|
var TheEditorComponent = /** @class */ (function (_super) {
|
|
12700
12896
|
__extends(TheEditorComponent, _super);
|
|
12701
|
-
function TheEditorComponent(toolbarService, theContextService, viewContainerRef, elementRef, ngZone) {
|
|
12897
|
+
function TheEditorComponent(toolbarService, theContextService, viewContainerRef, elementRef, ngZone, cdr) {
|
|
12702
12898
|
var _this = _super.call(this) || this;
|
|
12703
12899
|
_this.toolbarService = toolbarService;
|
|
12704
12900
|
_this.theContextService = theContextService;
|
|
12705
12901
|
_this.viewContainerRef = viewContainerRef;
|
|
12706
12902
|
_this.elementRef = elementRef;
|
|
12707
12903
|
_this.ngZone = ngZone;
|
|
12904
|
+
_this.cdr = cdr;
|
|
12708
12905
|
_this.thePlugins = [];
|
|
12709
12906
|
_this.theOnSave = new i0.EventEmitter();
|
|
12710
12907
|
_this.theOnDOMEvent = new i0.EventEmitter();
|
|
@@ -12862,12 +13059,14 @@
|
|
|
12862
13059
|
this.editor.disabled = (_a = this.theOptions) === null || _a === void 0 ? void 0 : _a.disabled;
|
|
12863
13060
|
this.editor.extraElementOptions = (_b = this.theOptions) === null || _b === void 0 ? void 0 : _b.extraElementOptions;
|
|
12864
13061
|
setEditorUUID(this.editor, idCreator());
|
|
12865
|
-
this.theContextService.initialize({
|
|
13062
|
+
this.theContextService.initialize({
|
|
13063
|
+
theOptions: this.theOptions,
|
|
13064
|
+
nativeElement: this.elementRef.nativeElement,
|
|
13065
|
+
viewContainerRef: this.viewContainerRef
|
|
13066
|
+
});
|
|
12866
13067
|
this.toolbarCalculate();
|
|
12867
13068
|
setTimeout(function () {
|
|
12868
|
-
var _a;
|
|
12869
13069
|
_this.theEditorCreated.emit(_this.editor);
|
|
12870
|
-
(_a = _this.placeholderInstance) === null || _a === void 0 ? void 0 : _a.checkStatus();
|
|
12871
13070
|
_this.applyAutoFocus();
|
|
12872
13071
|
});
|
|
12873
13072
|
};
|
|
@@ -12889,7 +13088,7 @@
|
|
|
12889
13088
|
}
|
|
12890
13089
|
};
|
|
12891
13090
|
TheEditorComponent.prototype.toolbarCalculate = function () {
|
|
12892
|
-
var _a
|
|
13091
|
+
var _a;
|
|
12893
13092
|
var toolbar = (_a = this === null || this === void 0 ? void 0 : this.theOptions) === null || _a === void 0 ? void 0 : _a.toolbar;
|
|
12894
13093
|
var toolbarItems = toolbarCompose(toolbar === null || toolbar === void 0 ? void 0 : toolbar.toolbarItems);
|
|
12895
13094
|
var 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);
|
|
@@ -12900,7 +13099,6 @@
|
|
|
12900
13099
|
this.theGlobalToolbarInstance.toolbarItems = toolbarOption.toolbarEntity.global;
|
|
12901
13100
|
this.theGlobalToolbarInstance.containerClass = this.globalToolbarClass;
|
|
12902
13101
|
this.theGlobalToolbarInstance.align = toolbar === null || toolbar === void 0 ? void 0 : toolbar.align;
|
|
12903
|
-
this.theGlobalToolbarInstance.fontSize = (_b = this.theOptions) === null || _b === void 0 ? void 0 : _b.fontSize;
|
|
12904
13102
|
this.theGlobalToolbarInstance.setToolbarClass();
|
|
12905
13103
|
this.theGlobalToolbarInstance.renderToolbarView();
|
|
12906
13104
|
}
|
|
@@ -12910,6 +13108,7 @@
|
|
|
12910
13108
|
var data = dataDeserialize((_a = this.theOptions) === null || _a === void 0 ? void 0 : _a.mode, value);
|
|
12911
13109
|
// data-deserialize
|
|
12912
13110
|
this.editorValue = data;
|
|
13111
|
+
this.cdr.markForCheck();
|
|
12913
13112
|
};
|
|
12914
13113
|
TheEditorComponent.prototype.registerOnChange = function (fn) {
|
|
12915
13114
|
this.onChangeCallback = fn;
|
|
@@ -12919,13 +13118,16 @@
|
|
|
12919
13118
|
};
|
|
12920
13119
|
TheEditorComponent.prototype.valueChange = function (value) {
|
|
12921
13120
|
var _a, _b, _c, _d, _e, _f;
|
|
12922
|
-
(_a = this.
|
|
12923
|
-
(
|
|
12924
|
-
|
|
13121
|
+
var isEditable = !((_a = this.theOptions) === null || _a === void 0 ? void 0 : _a.readonly) && !((_b = this.theOptions) === null || _b === void 0 ? void 0 : _b.disabled);
|
|
13122
|
+
(_c = this.theGlobalToolbarInstance) === null || _c === void 0 ? void 0 : _c.statusChange(this.editor);
|
|
13123
|
+
// quick insert button
|
|
13124
|
+
if (isEditable) {
|
|
13125
|
+
(_d = this.quickInsertInstance) === null || _d === void 0 ? void 0 : _d.checkStatus();
|
|
13126
|
+
}
|
|
12925
13127
|
// auto scroll view
|
|
12926
|
-
var scrollContainer = (
|
|
12927
|
-
var maxHeight = (
|
|
12928
|
-
if (
|
|
13128
|
+
var scrollContainer = (_e = this.theOptions) === null || _e === void 0 ? void 0 : _e.scrollContainer;
|
|
13129
|
+
var maxHeight = (_f = this.theOptions) === null || _f === void 0 ? void 0 : _f.maxHeight;
|
|
13130
|
+
if (isEditable && (scrollContainer || maxHeight)) {
|
|
12929
13131
|
var container = maxHeight ? DEFAULT_SCROLL_CONTAINER : scrollContainer;
|
|
12930
13132
|
this.autoScrollView(this.editor, container);
|
|
12931
13133
|
}
|
|
@@ -13045,8 +13247,8 @@
|
|
|
13045
13247
|
};
|
|
13046
13248
|
return TheEditorComponent;
|
|
13047
13249
|
}(core.mixinUnsubscribe(core.MixinBase)));
|
|
13048
|
-
TheEditorComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
13049
|
-
TheEditorComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
13250
|
+
TheEditorComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheEditorComponent, deps: [{ token: TheToolbarService }, { token: TheContextService }, { token: i0__namespace.ViewContainerRef }, { token: i0__namespace.ElementRef }, { token: i0__namespace.NgZone }, { token: i0__namespace.ChangeDetectorRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
13251
|
+
TheEditorComponent.ɵcmp = i0__namespace.ɵɵ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: [
|
|
13050
13252
|
TheToolbarService,
|
|
13051
13253
|
TheContextService,
|
|
13052
13254
|
TheColorSelectService,
|
|
@@ -13055,12 +13257,13 @@
|
|
|
13055
13257
|
useExisting: i0.forwardRef(function () { return TheEditorComponent; }),
|
|
13056
13258
|
multi: true
|
|
13057
13259
|
}
|
|
13058
|
-
], 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 }
|
|
13059
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
13260
|
+
], 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__namespace, 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__namespace.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__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i6__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i4__namespace$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4__namespace$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
13261
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheEditorComponent, decorators: [{
|
|
13060
13262
|
type: i0.Component,
|
|
13061
13263
|
args: [{
|
|
13062
13264
|
selector: 'the-editor, theEditor',
|
|
13063
13265
|
templateUrl: 'editor.component.html',
|
|
13266
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
13064
13267
|
providers: [
|
|
13065
13268
|
TheToolbarService,
|
|
13066
13269
|
TheContextService,
|
|
@@ -13076,7 +13279,7 @@
|
|
|
13076
13279
|
'[class.the-editor-readonly]': 'theOptions?.readonly'
|
|
13077
13280
|
}
|
|
13078
13281
|
}]
|
|
13079
|
-
}], ctorParameters: function () { return [{ type: TheToolbarService }, { type: TheContextService }, { type: i0__namespace.ViewContainerRef }, { type: i0__namespace.ElementRef }, { type: i0__namespace.NgZone }]; }, propDecorators: { theOptions: [{
|
|
13282
|
+
}], ctorParameters: function () { return [{ type: TheToolbarService }, { type: TheContextService }, { type: i0__namespace.ViewContainerRef }, { type: i0__namespace.ElementRef }, { type: i0__namespace.NgZone }, { type: i0__namespace.ChangeDetectorRef }]; }, propDecorators: { theOptions: [{
|
|
13080
13283
|
type: i0.Input
|
|
13081
13284
|
}], thePlugins: [{
|
|
13082
13285
|
type: i0.Input
|
|
@@ -13101,9 +13304,6 @@
|
|
|
13101
13304
|
}], quickInsertInstance: [{
|
|
13102
13305
|
type: i0.ViewChild,
|
|
13103
13306
|
args: ['quickInsert', { static: true }]
|
|
13104
|
-
}], placeholderInstance: [{
|
|
13105
|
-
type: i0.ViewChild,
|
|
13106
|
-
args: ['placeholder']
|
|
13107
13307
|
}] } });
|
|
13108
13308
|
|
|
13109
13309
|
var ENTRY_COMMON_COMPONENTS = [TheColumnResizeOverlayHandleComponent];
|
|
@@ -13113,10 +13313,10 @@
|
|
|
13113
13313
|
}
|
|
13114
13314
|
return TheColumnResizeCommonModule;
|
|
13115
13315
|
}());
|
|
13116
|
-
TheColumnResizeCommonModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
13117
|
-
TheColumnResizeCommonModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.
|
|
13118
|
-
TheColumnResizeCommonModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.
|
|
13119
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
13316
|
+
TheColumnResizeCommonModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheColumnResizeCommonModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
13317
|
+
TheColumnResizeCommonModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheColumnResizeCommonModule, declarations: [TheColumnResizeOverlayHandleComponent], exports: [TheColumnResizeOverlayHandleComponent] });
|
|
13318
|
+
TheColumnResizeCommonModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheColumnResizeCommonModule });
|
|
13319
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheColumnResizeCommonModule, decorators: [{
|
|
13120
13320
|
type: i0.NgModule,
|
|
13121
13321
|
args: [{
|
|
13122
13322
|
declarations: ENTRY_COMMON_COMPONENTS,
|
|
@@ -13129,10 +13329,10 @@
|
|
|
13129
13329
|
}
|
|
13130
13330
|
return TheColumnSizeModule;
|
|
13131
13331
|
}());
|
|
13132
|
-
TheColumnSizeModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
13133
|
-
TheColumnSizeModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.
|
|
13134
|
-
TheColumnSizeModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.
|
|
13135
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
13332
|
+
TheColumnSizeModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheColumnSizeModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
13333
|
+
TheColumnSizeModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheColumnSizeModule, declarations: [TheColumnResizeDirective], imports: [i2.OverlayModule, TheColumnResizeCommonModule], exports: [TheColumnResizeDirective] });
|
|
13334
|
+
TheColumnSizeModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheColumnSizeModule, imports: [[i2.OverlayModule, TheColumnResizeCommonModule]] });
|
|
13335
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheColumnSizeModule, decorators: [{
|
|
13136
13336
|
type: i0.NgModule,
|
|
13137
13337
|
args: [{
|
|
13138
13338
|
imports: [i2.OverlayModule, TheColumnResizeCommonModule],
|
|
@@ -13235,9 +13435,9 @@
|
|
|
13235
13435
|
};
|
|
13236
13436
|
return TheToolbarGroupComponent;
|
|
13237
13437
|
}());
|
|
13238
|
-
TheToolbarGroupComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
13239
|
-
TheToolbarGroupComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
13240
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
13438
|
+
TheToolbarGroupComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheToolbarGroupComponent, deps: [{ token: i0__namespace.ElementRef }, { token: i1__namespace$3.ThyPopover }, { token: i0__namespace.ViewContainerRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
13439
|
+
TheToolbarGroupComponent.ɵcmp = i0__namespace.ɵɵ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: i0.TemplateRef, static: true }], ngImport: i0__namespace, 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__namespace.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: TheToolbarComponent, selector: "the-toolbar", inputs: ["editor", "toolbarItems", "align", "containerClass", "isMore", "afterTemplate"] }], directives: [{ type: i5__namespace$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }] });
|
|
13440
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheToolbarGroupComponent, decorators: [{
|
|
13241
13441
|
type: i0.Component,
|
|
13242
13442
|
args: [{
|
|
13243
13443
|
selector: 'the-toolbar-group',
|
|
@@ -13318,7 +13518,7 @@
|
|
|
13318
13518
|
TheTableComponent,
|
|
13319
13519
|
TheTableRowComponent,
|
|
13320
13520
|
TheTdComponent,
|
|
13321
|
-
|
|
13521
|
+
TheInlineCodeComponent
|
|
13322
13522
|
];
|
|
13323
13523
|
var PIPES = [ElementStylePipe, ElementClassPipe];
|
|
13324
13524
|
var TheEditorModule = /** @class */ (function () {
|
|
@@ -13326,8 +13526,8 @@
|
|
|
13326
13526
|
}
|
|
13327
13527
|
return TheEditorModule;
|
|
13328
13528
|
}());
|
|
13329
|
-
TheEditorModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
13330
|
-
TheEditorModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.
|
|
13529
|
+
TheEditorModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheEditorModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
13530
|
+
TheEditorModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheEditorModule, declarations: [TheEditorComponent, ElementStylePipe, ElementClassPipe, TheToolbarComponent,
|
|
13331
13531
|
TheToolbarDropdownComponent,
|
|
13332
13532
|
TheToolbarGroupComponent,
|
|
13333
13533
|
TheToolbarItemComponent,
|
|
@@ -13361,7 +13561,7 @@
|
|
|
13361
13561
|
TheTableComponent,
|
|
13362
13562
|
TheTableRowComponent,
|
|
13363
13563
|
TheTdComponent,
|
|
13364
|
-
|
|
13564
|
+
TheInlineCodeComponent], imports: [i6.CommonModule, i1.SlateModule, i4$2.FormsModule, i4$1.ThyIconModule,
|
|
13365
13565
|
avatar.ThyAvatarModule,
|
|
13366
13566
|
i3.ThyNavModule,
|
|
13367
13567
|
i2$1.ThyFormModule,
|
|
@@ -13378,14 +13578,14 @@
|
|
|
13378
13578
|
i1$1.ThyAlertModule,
|
|
13379
13579
|
i9.ThyResizableModule,
|
|
13380
13580
|
i6$1.ThySwitchModule, i8.CodemirrorModule, TheColumnSizeModule], exports: [TheEditorComponent, TheToolbarComponent, TheToolbarDropdownComponent, TheToolbarItemComponent, TheDefaultElementComponent] });
|
|
13381
|
-
TheEditorModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.
|
|
13581
|
+
TheEditorModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheEditorModule, providers: [
|
|
13382
13582
|
{
|
|
13383
13583
|
provide: TheToolbarGroupToken,
|
|
13384
13584
|
useValue: TheToolbarGroupComponent
|
|
13385
13585
|
},
|
|
13386
13586
|
THE_CODE_MODE_PROVIDER
|
|
13387
13587
|
], imports: [__spreadArray(__spreadArray([i6.CommonModule, i1.SlateModule, i4$2.FormsModule], __read(TETHYS)), [i8.CodemirrorModule, TheColumnSizeModule])] });
|
|
13388
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
13588
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheEditorModule, decorators: [{
|
|
13389
13589
|
type: i0.NgModule,
|
|
13390
13590
|
args: [{
|
|
13391
13591
|
declarations: __spreadArray(__spreadArray(__spreadArray([TheEditorComponent], __read(PIPES)), __read(COMPONENTS)), __read(PLUGIN_COMPONENTS)),
|
|
@@ -13479,12 +13679,14 @@
|
|
|
13479
13679
|
exports.ToolbarMoreGroup = ToolbarMoreGroup;
|
|
13480
13680
|
exports.VOID_BLOCK_TYPES = VOID_BLOCK_TYPES;
|
|
13481
13681
|
exports.VerticalAlignEditor = VerticalAlignEditor;
|
|
13682
|
+
exports.ZERO_WIDTH_CHAR = ZERO_WIDTH_CHAR;
|
|
13482
13683
|
exports.createEmptyParagraph = createEmptyParagraph;
|
|
13483
13684
|
exports.dataDeserialize = dataDeserialize;
|
|
13484
13685
|
exports.dataSerializing = dataSerializing;
|
|
13485
13686
|
exports.getToolbarClass = getToolbarClass;
|
|
13486
13687
|
exports.htmlToTheia = htmlToTheia;
|
|
13487
13688
|
exports.inValidTypes = inValidTypes;
|
|
13689
|
+
exports.isCleanEmptyParagraph = isCleanEmptyParagraph;
|
|
13488
13690
|
exports.plainToTheia = plainToTheia;
|
|
13489
13691
|
exports.toolbarCompose = toolbarCompose;
|
|
13490
13692
|
exports.withTheEditor = withTheEditor;
|