@worktile/theia 3.0.0-next.6 → 3.0.0
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 +54 -76
- package/bundles/worktile-theia.umd.js.map +1 -1
- package/esm2015/core/with-theia.js +2 -2
- package/esm2015/plugins/table/components/table.component.js +5 -4
- package/esm2015/plugins/todo-item/todo-item.component.js +8 -2
- package/esm2015/queries/get-insert-elements-path.js +23 -52
- package/esm2015/transforms/insert-elements.js +2 -2
- package/fesm2015/worktile-theia.js +37 -57
- package/fesm2015/worktile-theia.js.map +1 -1
- package/package.json +1 -1
- package/plugins/table/components/table.component.d.ts +2 -2
- package/plugins/todo-item/todo-item.component.d.ts +1 -0
- package/queries/get-insert-elements-path.d.ts +5 -2
- package/styles/editor.scss +5 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/forms'), require('slate-angular'), require('ngx-tethys/core'), require('is-hotkey'), require('slate'), require('slate-history'), require('rxjs'), require('ngx-tethys/popover'), require('ngx-tethys/icon'), require('ngx-tethys/input'), require('@atinc/selene'), require('lodash'), require('ngx-tethys/util'), require('@angular/cdk/overlay'), require('marked'), require('ngx-tethys/alert'), require('rxjs/operators'), require('ngx-tethys/uploader'), require('@angular/platform-browser'), require('ngx-tethys/progress'), require('ngx-tethys/nav'), require('ngx-tethys/tooltip'), require('ng-codemirror'), require('ngx-tethys/notify'), require('ngx-tethys/action-menu'), require('ngx-tethys/switch'), require('ngx-tethys/resizable'), require('is-url'), require('ngx-tethys/button'), require('ngx-tethys/form'), require('ngx-tethys/shared'), require('
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@worktile/theia', ['exports', '@angular/core', '@angular/common', '@angular/forms', 'slate-angular', 'ngx-tethys/core', 'is-hotkey', 'slate', 'slate-history', 'rxjs', 'ngx-tethys/popover', 'ngx-tethys/icon', 'ngx-tethys/input', '@atinc/selene', 'lodash', 'ngx-tethys/util', '@angular/cdk/overlay', 'marked', 'ngx-tethys/alert', 'rxjs/operators', 'ngx-tethys/uploader', '@angular/platform-browser', 'ngx-tethys/progress', 'ngx-tethys/nav', 'ngx-tethys/tooltip', 'ng-codemirror', 'ngx-tethys/notify', 'ngx-tethys/action-menu', 'ngx-tethys/switch', 'ngx-tethys/resizable', 'is-url', 'ngx-tethys/button', 'ngx-tethys/form', 'ngx-tethys/shared', '
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.worktile = global.worktile || {}, global.worktile.theia = {}), global.ng.core, global.ng.common, global.ng.forms, global.i1, global.core, global.isHotkey, global.slate, global.slateHistory, global.rxjs, global.i1$1, global.i4, global.i5, global.selene, global._lodash, global.util, global.ng.cdk.overlay, global.marked, global.i1$2, global.rxjs.operators, global.uploader, global.ng.platformBrowser, global.i6, global.i3, global.i5$1, global.i8, global.i1$
|
|
5
|
-
})(this, (function (exports, i0, i10, i4$1, i1, core, isHotkey, slate, slateHistory, rxjs, i1$1, i4, i5, selene, _lodash, util, i2, marked, i1$2, operators, uploader, i1$
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/forms'), require('slate-angular'), require('ngx-tethys/core'), require('is-hotkey'), require('slate'), require('slate-history'), require('rxjs'), require('ngx-tethys/popover'), require('ngx-tethys/icon'), require('ngx-tethys/input'), require('@atinc/selene'), require('lodash'), require('ngx-tethys/util'), require('@angular/cdk/overlay'), require('marked'), require('ngx-tethys'), require('ngx-tethys/alert'), require('rxjs/operators'), require('ngx-tethys/uploader'), require('@angular/platform-browser'), require('ngx-tethys/progress'), require('ngx-tethys/nav'), require('ngx-tethys/tooltip'), require('ng-codemirror'), require('ngx-tethys/notify'), require('ngx-tethys/action-menu'), require('ngx-tethys/switch'), require('ngx-tethys/resizable'), require('is-url'), require('ngx-tethys/button'), require('ngx-tethys/form'), require('ngx-tethys/shared'), require('@angular/cdk/coercion'), require('@angular/cdk/portal'), require('ngx-tethys/list'), require('ngx-tethys/autocomplete'), require('ngx-tethys/avatar'), require('ngx-tethys/select')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@worktile/theia', ['exports', '@angular/core', '@angular/common', '@angular/forms', 'slate-angular', 'ngx-tethys/core', 'is-hotkey', 'slate', 'slate-history', 'rxjs', 'ngx-tethys/popover', 'ngx-tethys/icon', 'ngx-tethys/input', '@atinc/selene', 'lodash', 'ngx-tethys/util', '@angular/cdk/overlay', 'marked', 'ngx-tethys', 'ngx-tethys/alert', 'rxjs/operators', 'ngx-tethys/uploader', '@angular/platform-browser', 'ngx-tethys/progress', 'ngx-tethys/nav', 'ngx-tethys/tooltip', 'ng-codemirror', 'ngx-tethys/notify', 'ngx-tethys/action-menu', 'ngx-tethys/switch', 'ngx-tethys/resizable', 'is-url', 'ngx-tethys/button', 'ngx-tethys/form', 'ngx-tethys/shared', '@angular/cdk/coercion', '@angular/cdk/portal', 'ngx-tethys/list', 'ngx-tethys/autocomplete', 'ngx-tethys/avatar', 'ngx-tethys/select'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.worktile = global.worktile || {}, global.worktile.theia = {}), global.ng.core, global.ng.common, global.ng.forms, global.i1, global.core, global.isHotkey, global.slate, global.slateHistory, global.rxjs, global.i1$1, global.i4, global.i5, global.selene, global._lodash, global.util, global.ng.cdk.overlay, global.marked, global.i1$2, global.i1$3, global.rxjs.operators, global.uploader, global.ng.platformBrowser, global.i6, global.i3, global.i5$1, global.i8, global.i1$5, global.i2$1, global.i5$2, global.i9, global.isUrl, global.i1$6, global.i2$2, global.i5$3, global.ng.cdk.coercion, global.ng.cdk.portal, global.i1$7, global.autocomplete, global.avatar, global.select));
|
|
5
|
+
})(this, (function (exports, i0, i10, i4$1, i1, core, isHotkey, slate, slateHistory, rxjs, i1$1, i4, i5, selene, _lodash, util, i2, marked, i1$2, i1$3, operators, uploader, i1$4, i6, i3, i5$1, i8, i1$5, i2$1, i5$2, i9, isUrl, i1$6, i2$2, i5$3, coercion, portal, i1$7, autocomplete, avatar, select) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
8
|
|
|
@@ -35,21 +35,21 @@
|
|
|
35
35
|
var _lodash__namespace = /*#__PURE__*/_interopNamespace(_lodash);
|
|
36
36
|
var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
|
|
37
37
|
var marked__default = /*#__PURE__*/_interopDefaultLegacy(marked);
|
|
38
|
-
var i1__namespace$
|
|
39
|
-
var i1__namespace$
|
|
38
|
+
var i1__namespace$6 = /*#__PURE__*/_interopNamespace(i1$2);
|
|
39
|
+
var i1__namespace$2 = /*#__PURE__*/_interopNamespace(i1$3);
|
|
40
|
+
var i1__namespace$3 = /*#__PURE__*/_interopNamespace(i1$4);
|
|
40
41
|
var i6__namespace = /*#__PURE__*/_interopNamespace(i6);
|
|
41
42
|
var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
|
|
42
43
|
var i5__namespace$1 = /*#__PURE__*/_interopNamespace(i5$1);
|
|
43
44
|
var i8__namespace = /*#__PURE__*/_interopNamespace(i8);
|
|
44
|
-
var i1__namespace$4 = /*#__PURE__*/_interopNamespace(i1$
|
|
45
|
+
var i1__namespace$4 = /*#__PURE__*/_interopNamespace(i1$5);
|
|
45
46
|
var i2__namespace$1 = /*#__PURE__*/_interopNamespace(i2$1);
|
|
46
47
|
var i5__namespace$2 = /*#__PURE__*/_interopNamespace(i5$2);
|
|
47
48
|
var i9__namespace = /*#__PURE__*/_interopNamespace(i9);
|
|
48
49
|
var isUrl__default = /*#__PURE__*/_interopDefaultLegacy(isUrl);
|
|
49
|
-
var i1__namespace$5 = /*#__PURE__*/_interopNamespace(i1$
|
|
50
|
+
var i1__namespace$5 = /*#__PURE__*/_interopNamespace(i1$6);
|
|
50
51
|
var i2__namespace$2 = /*#__PURE__*/_interopNamespace(i2$2);
|
|
51
52
|
var i5__namespace$3 = /*#__PURE__*/_interopNamespace(i5$3);
|
|
52
|
-
var i1__namespace$6 = /*#__PURE__*/_interopNamespace(i1$6);
|
|
53
53
|
var i1__namespace$7 = /*#__PURE__*/_interopNamespace(i1$7);
|
|
54
54
|
|
|
55
55
|
/*! *****************************************************************************
|
|
@@ -1512,7 +1512,7 @@
|
|
|
1512
1512
|
// withOverridesByKey
|
|
1513
1513
|
flattenDeepPlugins(e, plugins);
|
|
1514
1514
|
// mount pluginsByKey
|
|
1515
|
-
pluginsByKey(e, plugins);
|
|
1515
|
+
pluginsByKey(e, e.plugins);
|
|
1516
1516
|
// mount nestedStructureByKey
|
|
1517
1517
|
nestedStructureByKey(e, e.plugins);
|
|
1518
1518
|
// merge plugin to pluginByKey
|
|
@@ -2374,69 +2374,36 @@
|
|
|
2374
2374
|
return false;
|
|
2375
2375
|
var _b = __read(anchorBlockEntry(editor), 2), anchorBlockPath = _b[1];
|
|
2376
2376
|
var currentNodePath = anchorBlockPath.slice(0, parentEntry[1].length + 1);
|
|
2377
|
-
var illegalParentEntry =
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
at: parentEntry[1],
|
|
2383
|
-
match: function (n) { return n.type && !allowParentTypes.includes(n.type); }
|
|
2384
|
-
});
|
|
2385
|
-
if (_illegalParentEntry) {
|
|
2386
|
-
var childType = editor.nestedStructureByKey[_illegalParentEntry[0].type];
|
|
2387
|
-
if (!childType) {
|
|
2388
|
-
illegalParentEntry = _illegalParentEntry;
|
|
2389
|
-
}
|
|
2390
|
-
if (allowParentTypes.includes(childType)) {
|
|
2391
|
-
var rootKey_1 = findNestedStructureRootType(editor, _illegalParentEntry[0].type, '');
|
|
2392
|
-
parentEntry =
|
|
2393
|
-
parentEntry &&
|
|
2394
|
-
slate.Editor.above(editor, {
|
|
2395
|
-
mode: 'lowest',
|
|
2396
|
-
at: parentEntry[1],
|
|
2397
|
-
match: function (n) { return n.type && n.type === rootKey_1; }
|
|
2398
|
-
});
|
|
2399
|
-
}
|
|
2400
|
-
else {
|
|
2401
|
-
parentEntry = _illegalParentEntry;
|
|
2402
|
-
}
|
|
2403
|
-
}
|
|
2404
|
-
else {
|
|
2405
|
-
return "break";
|
|
2406
|
-
}
|
|
2407
|
-
};
|
|
2408
|
-
// 循环获取最外层的不可插入节点
|
|
2409
|
-
while (true) {
|
|
2410
|
-
var state_1 = _loop_1();
|
|
2411
|
-
if (state_1 === "break")
|
|
2412
|
-
break;
|
|
2413
|
-
}
|
|
2377
|
+
var illegalParentEntry = slate.Editor.above(editor, {
|
|
2378
|
+
mode: 'highest',
|
|
2379
|
+
at: parentEntry[1],
|
|
2380
|
+
match: function (n) { return n.type && !isAllowParentTypes(editor, n.type, allowParentTypes); }
|
|
2381
|
+
});
|
|
2414
2382
|
// 获取不可插入节点的根层节点
|
|
2415
2383
|
if (illegalParentEntry) {
|
|
2416
|
-
var rootKey_2 = findNestedStructureRootType(editor, illegalParentEntry[0].type, '');
|
|
2417
|
-
if (rootKey_2 && illegalParentEntry[0].type !== rootKey_2) {
|
|
2418
|
-
illegalParentEntry = slate.Editor.above(editor, {
|
|
2419
|
-
mode: 'lowest',
|
|
2420
|
-
at: parentEntry[1],
|
|
2421
|
-
match: function (n) { return n.type && n.type === rootKey_2; }
|
|
2422
|
-
});
|
|
2423
|
-
}
|
|
2424
2384
|
currentNodePath = illegalParentEntry && illegalParentEntry[1];
|
|
2425
2385
|
}
|
|
2426
2386
|
return currentNodePath && slate.Path.next(currentNodePath);
|
|
2427
2387
|
};
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
var
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2388
|
+
var isAllowParentTypes = function (editor, targetType, allowParentTypes) {
|
|
2389
|
+
var existChildType = isNestedStructureParentType(editor, targetType);
|
|
2390
|
+
var leafType = existChildType && findNestedStructureLeafType(editor, targetType);
|
|
2391
|
+
return allowParentTypes.includes(targetType) || allowParentTypes.includes(leafType);
|
|
2392
|
+
};
|
|
2393
|
+
var isNestedStructureParentType = function (editor, type) {
|
|
2394
|
+
for (var key in editor.nestedStructureByKey) {
|
|
2395
|
+
if (key === type) {
|
|
2396
|
+
return true;
|
|
2397
|
+
}
|
|
2436
2398
|
}
|
|
2437
|
-
|
|
2438
|
-
|
|
2399
|
+
return false;
|
|
2400
|
+
};
|
|
2401
|
+
var findNestedStructureLeafType = function (editor, target) {
|
|
2402
|
+
var leafType = editor.nestedStructureByKey[target];
|
|
2403
|
+
while (leafType && editor.nestedStructureByKey[leafType]) {
|
|
2404
|
+
leafType = editor.nestedStructureByKey[leafType];
|
|
2439
2405
|
}
|
|
2406
|
+
return leafType;
|
|
2440
2407
|
};
|
|
2441
2408
|
|
|
2442
2409
|
var isContainNestedType = function (editor, types) {
|
|
@@ -2530,7 +2497,7 @@
|
|
|
2530
2497
|
if (slate.Range.isExpanded(editor.selection)) {
|
|
2531
2498
|
slate.Editor.deleteFragment(editor);
|
|
2532
2499
|
}
|
|
2533
|
-
var type = !
|
|
2500
|
+
var type = !i1$2.isArray(elements) ? elements.type : elements[0].type; // 后期处理复制粘贴需要修改
|
|
2534
2501
|
var allowParentTypes = ((_a = getPluginOptions(editor, type)) === null || _a === void 0 ? void 0 : _a.allowParentTypes) || [];
|
|
2535
2502
|
var insertNodePath = getInsertElementsPath(editor, allowParentTypes);
|
|
2536
2503
|
var _b = __read(anchorBlockEntry(editor), 2), anchorBlock = _b[0], anchorBlockPath = _b[1];
|
|
@@ -4792,6 +4759,13 @@
|
|
|
4792
4759
|
_this.checkItemClass = true;
|
|
4793
4760
|
return _this;
|
|
4794
4761
|
}
|
|
4762
|
+
Object.defineProperty(TheTodoItemComponent.prototype, "checkItemSelectable", {
|
|
4763
|
+
get: function () {
|
|
4764
|
+
return this.editableWithReadonly && this.readonly;
|
|
4765
|
+
},
|
|
4766
|
+
enumerable: false,
|
|
4767
|
+
configurable: true
|
|
4768
|
+
});
|
|
4795
4769
|
Object.defineProperty(TheTodoItemComponent.prototype, "level", {
|
|
4796
4770
|
get: function () {
|
|
4797
4771
|
var _a;
|
|
@@ -4820,7 +4794,7 @@
|
|
|
4820
4794
|
return TheTodoItemComponent;
|
|
4821
4795
|
}(TheBaseElementComponent));
|
|
4822
4796
|
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 }, { token: TheContextService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
4823
|
-
TheTodoItemComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheTodoItemComponent, selector: "div[theTodoItem]", host: { properties: { "class.the-temp-check-item": "this.checkItemClass", "attr.the-level": "this.level" } }, 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 <span><slate-children [children]=\"children\" [context]=\"childrenContext\" [viewContext]=\"viewContext\"></slate-children></span>\n ", isInline: true, components: [{ type: i1__namespace.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }] });
|
|
4797
|
+
TheTodoItemComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheTodoItemComponent, selector: "div[theTodoItem]", host: { properties: { "class.the-temp-check-item": "this.checkItemClass", "class.the-todo-item-selectable": "this.checkItemSelectable", "attr.the-level": "this.level" } }, 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 <span><slate-children [children]=\"children\" [context]=\"childrenContext\" [viewContext]=\"viewContext\"></slate-children></span>\n ", isInline: true, components: [{ type: i1__namespace.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }] });
|
|
4824
4798
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheTodoItemComponent, decorators: [{
|
|
4825
4799
|
type: i0.Component,
|
|
4826
4800
|
args: [{
|
|
@@ -4830,6 +4804,9 @@
|
|
|
4830
4804
|
}], ctorParameters: function () { return [{ type: i0__namespace.ElementRef }, { type: i0__namespace.ChangeDetectorRef }, { type: TheContextService }]; }, propDecorators: { checkItemClass: [{
|
|
4831
4805
|
type: i0.HostBinding,
|
|
4832
4806
|
args: ['class.the-temp-check-item']
|
|
4807
|
+
}], checkItemSelectable: [{
|
|
4808
|
+
type: i0.HostBinding,
|
|
4809
|
+
args: ['class.the-todo-item-selectable']
|
|
4833
4810
|
}], level: [{
|
|
4834
4811
|
type: i0.HostBinding,
|
|
4835
4812
|
args: ['attr.the-level']
|
|
@@ -10256,6 +10233,7 @@
|
|
|
10256
10233
|
if (this.readonly)
|
|
10257
10234
|
return;
|
|
10258
10235
|
event.stopPropagation();
|
|
10236
|
+
event.preventDefault();
|
|
10259
10237
|
if (!this.isInTable) {
|
|
10260
10238
|
var path = TheEditor.findPath(this.editor, this.element);
|
|
10261
10239
|
slate.Transforms.select(this.editor, path);
|
|
@@ -10316,10 +10294,10 @@
|
|
|
10316
10294
|
});
|
|
10317
10295
|
});
|
|
10318
10296
|
};
|
|
10319
|
-
TheTableComponent.prototype.
|
|
10297
|
+
TheTableComponent.prototype.trackByFnRowControls = function (index) {
|
|
10320
10298
|
return index;
|
|
10321
10299
|
};
|
|
10322
|
-
TheTableComponent.prototype.
|
|
10300
|
+
TheTableComponent.prototype.trackByFnColControls = function (index) {
|
|
10323
10301
|
return index;
|
|
10324
10302
|
};
|
|
10325
10303
|
TheTableComponent.prototype.ngOnDestroy = function () {
|
|
@@ -10340,7 +10318,7 @@
|
|
|
10340
10318
|
provide: TheTableToken,
|
|
10341
10319
|
useExisting: TheTableComponent
|
|
10342
10320
|
}
|
|
10343
|
-
], 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: "<!-- \u7C7B\u540D the-temp-*: \u4E34\u65F6\u89E3\u51B3\u56E0\u53D7portal\u5F71\u54CD\u8868\u683C\u6837\u5F0F\u95EE\u9898\uFF0C\u540E\u671F\u6539\u56DEthe-* -->\n<div\n class=\"the-temp-table-container\"\n theColumnResize\n [ngClass]=\"{\n 'the-temp-table-with-controls': isInTable,\n 'the-temp-numbered-column-container': element?.options?.numberedColumn,\n 'the-temp-table-selection-hide': tableStore.isCellSelecting || tableStore.isRightClicking\n }\"\n>\n <div\n class=\"the-temp-table-row-controls-wrapper\"\n [ngClass]=\"{\n 'the-temp-table-focus': isInTable\n }\"\n >\n <div\n class=\"the-temp-table-corner-controls\"\n [ngClass]=\"{\n visible: !readonly && isInTable,\n active: isSelectedAllCell,\n dangerous: tableStore.isSelectedTable && tableStore.dangerousCells.length > 0\n }\"\n >\n <div class=\"the-temp-table-corner-button\" (mousedown)=\"onSelectTable($event)\"></div>\n <div class=\"the-temp-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-temp-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-temp-table-row-controls\">\n <div class=\"the-temp-table-row-controls-inner\">\n <div\n class=\"the-temp-table-row-controls-button-wrap\"\n *ngFor=\"let control of rowControls; let i = index; trackBy:
|
|
10321
|
+
], 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: "<!-- \u7C7B\u540D the-temp-*: \u4E34\u65F6\u89E3\u51B3\u56E0\u53D7portal\u5F71\u54CD\u8868\u683C\u6837\u5F0F\u95EE\u9898\uFF0C\u540E\u671F\u6539\u56DEthe-* -->\n<div\n class=\"the-temp-table-container\"\n theColumnResize\n [ngClass]=\"{\n 'the-temp-table-with-controls': isInTable,\n 'the-temp-numbered-column-container': element?.options?.numberedColumn,\n 'the-temp-table-selection-hide': tableStore.isCellSelecting || tableStore.isRightClicking\n }\"\n>\n <div\n class=\"the-temp-table-row-controls-wrapper\"\n [ngClass]=\"{\n 'the-temp-table-focus': isInTable\n }\"\n >\n <div\n class=\"the-temp-table-corner-controls\"\n [ngClass]=\"{\n visible: !readonly && isInTable,\n active: isSelectedAllCell,\n dangerous: tableStore.isSelectedTable && tableStore.dangerousCells.length > 0\n }\"\n >\n <div class=\"the-temp-table-corner-button\" (mousedown)=\"onSelectTable($event)\"></div>\n <div class=\"the-temp-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-temp-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-temp-table-row-controls\">\n <div class=\"the-temp-table-row-controls-inner\">\n <div\n class=\"the-temp-table-row-controls-button-wrap\"\n *ngFor=\"let control of rowControls; let i = index; trackBy: trackByFnRowControls\"\n [ngClass]=\"{\n active: tableStore.selectedRowsIndex.includes(control.rowIndex),\n dangerous: tableStore.dangerousRowsIndex.includes(control.rowIndex) && tableStore.dangerousCells.length > 0\n }\"\n >\n <ng-container *ngIf=\"!readonly && isInTable && !element?.options?.numberedColumn\">\n <button\n (mousedown)=\"onRowMouseDown($event, control.rowIndex)\"\n type=\"button\"\n [ngStyle]=\"{ height: control.height + 1 + 'px' }\"\n class=\"the-temp-table-row-controls-button the-temp-table-controls-button\"\n ></button>\n </ng-container>\n <ng-container *ngIf=\"element?.options?.numberedColumn\">\n <div\n [contentEditable]=\"false\"\n contenteditable=\"false\"\n (mousedown)=\"onRowMouseDown($event, control.rowIndex)\"\n class=\"the-temp-table-numbered-controls-button\"\n [ngStyle]=\"{ height: control.height + 1 + 'px' }\"\n >\n <p class=\"row-number d-flex align-items-center\">{{ i + 1 }}</p>\n </div>\n </ng-container>\n <the-table-insert-mark type=\"row\" [at]=\"control.rowIndex + 1\" [tableStore]=\"tableStore\"> </the-table-insert-mark>\n </div>\n </div>\n </div>\n </div>\n <div class=\"the-temp-table-wrapper\" #tableWrapper [ngClass]=\"{ 'the-temp-table-numbered': element?.options?.numberedColumn }\">\n <table class=\"the-temp-table\" #theTable [ngClass]=\"{ 'the-temp-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-temp-table-col-controls-wrapper\">\n <th\n class=\"the-temp-table-col-controls\"\n [ngClass]=\"{\n active: tableStore.selectedColumnsIndex.includes(i),\n dangerous: tableStore.dangerousColumnsIndex.includes(i) && tableStore.dangerousCells.length > 0\n }\"\n (mousedown)=\"onColMouseDown($event, i)\"\n *ngFor=\"let control of colControls; let i = index; trackBy: trackByFnColControls\"\n >\n <the-table-insert-mark *ngIf=\"isInTable\" type=\"column\" [at]=\"i + 1\" [tableStore]=\"tableStore\">\n </the-table-insert-mark>\n </th>\n </tr>\n </thead>\n <tbody #tbody>\n <slate-children [children]=\"children\" [context]=\"childrenContext\" [viewContext]=\"viewContext\"> </slate-children>\n </tbody>\n </table>\n </div>\n</div>\n", 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: i10__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i10__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i10__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i10__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
|
|
10344
10322
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheTableComponent, decorators: [{
|
|
10345
10323
|
type: i0.Component,
|
|
10346
10324
|
args: [{
|
|
@@ -14650,9 +14628,9 @@
|
|
|
14650
14628
|
i2$1.ThyActionMenuModule,
|
|
14651
14629
|
i5.ThyInputModule,
|
|
14652
14630
|
select.ThySelectModule,
|
|
14653
|
-
i1$
|
|
14654
|
-
i1$
|
|
14655
|
-
i1$
|
|
14631
|
+
i1$6.ThyButtonModule,
|
|
14632
|
+
i1$5.ThyNotifyModule,
|
|
14633
|
+
i1$3.ThyAlertModule,
|
|
14656
14634
|
i9.ThyResizableModule,
|
|
14657
14635
|
i5$2.ThySwitchModule
|
|
14658
14636
|
];
|
|
@@ -14751,9 +14729,9 @@
|
|
|
14751
14729
|
i2$1.ThyActionMenuModule,
|
|
14752
14730
|
i5.ThyInputModule,
|
|
14753
14731
|
select.ThySelectModule,
|
|
14754
|
-
i1$
|
|
14755
|
-
i1$
|
|
14756
|
-
i1$
|
|
14732
|
+
i1$6.ThyButtonModule,
|
|
14733
|
+
i1$5.ThyNotifyModule,
|
|
14734
|
+
i1$3.ThyAlertModule,
|
|
14757
14735
|
i9.ThyResizableModule,
|
|
14758
14736
|
i5$2.ThySwitchModule, i8.CodemirrorModule, TheColumnSizeModule], exports: [TheEditorComponent, TheToolbarComponent, TheToolbarDropdownComponent, TheToolbarItemComponent, TheDefaultElementComponent] });
|
|
14759
14737
|
TheEditorModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheEditorModule, providers: [
|