@worktile/theia 3.0.0-next.4 → 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.
@@ -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('@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('ngx-tethys'), 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', '@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', 'ngx-tethys', '@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.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$4, global.i2$1, global.i5$2, global.i9, global.isUrl, global.i1$5, global.i2$2, global.i5$3, global.i1$6, 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, i2, marked, i1$2, operators, uploader, i1$3, i6, i3, i5$1, i8, i1$4, i2$1, i5$2, i9, isUrl, i1$5, i2$2, i5$3, i1$6, coercion, portal, i1$7, autocomplete, avatar, select) { 'use strict';
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$2 = /*#__PURE__*/_interopNamespace(i1$2);
39
- var i1__namespace$3 = /*#__PURE__*/_interopNamespace(i1$3);
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$4);
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$5);
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
  /*! *****************************************************************************
@@ -1445,10 +1445,12 @@
1445
1445
  newOptions[option] = _.union(options[option], override.options[option]);
1446
1446
  continue;
1447
1447
  }
1448
- newOptions[option] = options[option];
1448
+ if (util.isObject(options[option])) {
1449
+ newOptions[option] = _.assign(options[option], override.options[option]);
1450
+ }
1451
+ newOptions[option] = override.options[option] ? override.options[option] : options[option];
1449
1452
  }
1450
1453
  plugin.options = newOptions;
1451
- return plugin;
1452
1454
  };
1453
1455
 
1454
1456
  var combinePlugins = function (editor) {
@@ -1467,7 +1469,7 @@
1467
1469
  var newPlugins = _plugins.filter(function (p) { return plugin.overrideByKey[p.key]; });
1468
1470
  newPlugins.forEach(function (p) {
1469
1471
  if (editor.pluginsByKey[p.key]) {
1470
- p = mergeOptions(p, plugin.overrideByKey[p.key]);
1472
+ mergeOptions(p, plugin.overrideByKey[p.key]);
1471
1473
  editor.pluginsByKey[p.key] = _.defaultsDeep(p, plugin.overrideByKey[p.key]);
1472
1474
  }
1473
1475
  });
@@ -1510,7 +1512,7 @@
1510
1512
  // withOverridesByKey
1511
1513
  flattenDeepPlugins(e, plugins);
1512
1514
  // mount pluginsByKey
1513
- pluginsByKey(e, plugins);
1515
+ pluginsByKey(e, e.plugins);
1514
1516
  // mount nestedStructureByKey
1515
1517
  nestedStructureByKey(e, e.plugins);
1516
1518
  // merge plugin to pluginByKey
@@ -2363,18 +2365,45 @@
2363
2365
  return parentEntry;
2364
2366
  };
2365
2367
 
2366
- var isTypesInParent = function (editor, types) {
2367
- if (!Array.isArray(types)) {
2368
- types = [types];
2369
- }
2368
+ var getInsertElementsPath = function (editor, allowParentTypes) {
2370
2369
  var _a = __read(getBlockAbove(editor), 2), anchorPath = _a[1];
2371
2370
  if (!anchorPath)
2372
2371
  return false;
2373
- var parentEntry = slate.Editor.above(editor, { match: function (n) { return types.includes(n.type); } });
2372
+ var parentEntry = slate.Editor.above(editor, { match: function (n) { return slate.Editor.isBlock(editor, n) && allowParentTypes.includes(n.type); } });
2374
2373
  if (!parentEntry)
2375
2374
  return false;
2376
- var _b = __read(parentEntry, 1), parentNode = _b[0];
2377
- return types.includes(parentNode.type);
2375
+ var _b = __read(anchorBlockEntry(editor), 2), anchorBlockPath = _b[1];
2376
+ var currentNodePath = anchorBlockPath.slice(0, parentEntry[1].length + 1);
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
+ });
2382
+ // 获取不可插入节点的根层节点
2383
+ if (illegalParentEntry) {
2384
+ currentNodePath = illegalParentEntry && illegalParentEntry[1];
2385
+ }
2386
+ return currentNodePath && slate.Path.next(currentNodePath);
2387
+ };
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
+ }
2398
+ }
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];
2405
+ }
2406
+ return leafType;
2378
2407
  };
2379
2408
 
2380
2409
  var isContainNestedType = function (editor, types) {
@@ -2452,7 +2481,7 @@
2452
2481
  isBlockCardCursor: isBlockCardCursor,
2453
2482
  isEmptyParagraphByPath: isEmptyParagraphByPath,
2454
2483
  isContainer: isContainer,
2455
- isTypesInParent: isTypesInParent,
2484
+ getInsertElementsPath: getInsertElementsPath,
2456
2485
  isContainNestedType: isContainNestedType,
2457
2486
  anchorBlock: anchorBlock,
2458
2487
  anchorBlockEntry: anchorBlockEntry,
@@ -2463,26 +2492,20 @@
2463
2492
  someNode: someNode
2464
2493
  });
2465
2494
 
2466
- var insertElements = function (editor, element) {
2495
+ var insertElements = function (editor, elements) {
2467
2496
  var _a;
2468
2497
  if (slate.Range.isExpanded(editor.selection)) {
2469
2498
  slate.Editor.deleteFragment(editor);
2470
2499
  }
2471
- var type = element.type;
2500
+ var type = !i1$2.isArray(elements) ? elements.type : elements[0].type; // 后期处理复制粘贴需要修改
2472
2501
  var allowParentTypes = ((_a = getPluginOptions(editor, type)) === null || _a === void 0 ? void 0 : _a.allowParentTypes) || [];
2473
- var isAllowInsert = isTypesInParent(editor, allowParentTypes);
2502
+ var insertNodePath = getInsertElementsPath(editor, allowParentTypes);
2474
2503
  var _b = __read(anchorBlockEntry(editor), 2), anchorBlock = _b[0], anchorBlockPath = _b[1];
2475
2504
  var isEmpty = slate.Editor.isEmpty(editor, anchorBlock);
2476
- var isContainNested = isContainNestedType(editor, allowParentTypes);
2477
- if (isAllowInsert && isContainNested) {
2478
- var _c = __read(slate.Editor.above(editor, {
2479
- match: function (n) { return slate.Editor.isBlock(editor, n) && allowParentTypes.includes(n.type); },
2480
- at: editor.selection
2481
- }), 2), containerPath_1 = _c[1];
2505
+ if (insertNodePath) {
2482
2506
  slate.Editor.withoutNormalizing(editor, function () {
2483
- var containerPathFirstPath = anchorBlockPath.slice(0, containerPath_1.length + 1);
2484
- slate.Transforms.insertNodes(editor, element, { at: slate.Path.next(containerPathFirstPath) });
2485
- slate.Transforms.select(editor, slate.Editor.start(editor, slate.Path.next(containerPathFirstPath)));
2507
+ slate.Transforms.insertNodes(editor, elements, { at: insertNodePath });
2508
+ slate.Transforms.select(editor, slate.Editor.start(editor, insertNodePath));
2486
2509
  if (isEmpty) {
2487
2510
  slate.Transforms.removeNodes(editor, { at: anchorBlockPath });
2488
2511
  }
@@ -2490,7 +2513,7 @@
2490
2513
  return;
2491
2514
  }
2492
2515
  var nextPath = slate.Path.next([anchorBlockPath[0]]);
2493
- slate.Transforms.insertNodes(editor, element, { at: nextPath });
2516
+ slate.Transforms.insertNodes(editor, elements, { at: nextPath });
2494
2517
  if (isEmpty && anchorBlockPath.length === 1) {
2495
2518
  slate.Transforms.delete(editor, { at: anchorBlockPath });
2496
2519
  slate.Transforms.select(editor, slate.Editor.start(editor, anchorBlockPath));
@@ -3063,12 +3086,7 @@
3063
3086
  finally { if (e_1) throw e_1.error; }
3064
3087
  }
3065
3088
  if (imageNodes.length > 0) {
3066
- var at = editor.selection;
3067
- slate.Transforms.insertNodes(editor, imageNodes, { at: at });
3068
- if (isCollapsed(editor.selection) && isEmptyParagraph(editor)) {
3069
- slate.Transforms.removeNodes(editor, { at: at });
3070
- slate.Transforms.select(editor, at);
3071
- }
3089
+ insertElements(editor, imageNodes);
3072
3090
  }
3073
3091
  },
3074
3092
  verifyImage: function (editor, image) {
@@ -4708,8 +4726,8 @@
4708
4726
  }
4709
4727
  ],
4710
4728
  nestedStructureByKey: (_c = {},
4711
- _c[exports.ElementKinds.bulletedList] = [exports.ElementKinds.listItem],
4712
- _c[exports.ElementKinds.numberedList] = [exports.ElementKinds.listItem],
4729
+ _c[exports.ElementKinds.bulletedList] = exports.ElementKinds.listItem,
4730
+ _c[exports.ElementKinds.numberedList] = exports.ElementKinds.listItem,
4713
4731
  _c),
4714
4732
  toolbarItems: [
4715
4733
  {
@@ -4741,6 +4759,13 @@
4741
4759
  _this.checkItemClass = true;
4742
4760
  return _this;
4743
4761
  }
4762
+ Object.defineProperty(TheTodoItemComponent.prototype, "checkItemSelectable", {
4763
+ get: function () {
4764
+ return this.editableWithReadonly && this.readonly;
4765
+ },
4766
+ enumerable: false,
4767
+ configurable: true
4768
+ });
4744
4769
  Object.defineProperty(TheTodoItemComponent.prototype, "level", {
4745
4770
  get: function () {
4746
4771
  var _a;
@@ -4769,7 +4794,7 @@
4769
4794
  return TheTodoItemComponent;
4770
4795
  }(TheBaseElementComponent));
4771
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 });
4772
- 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"] }] });
4773
4798
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheTodoItemComponent, decorators: [{
4774
4799
  type: i0.Component,
4775
4800
  args: [{
@@ -4779,6 +4804,9 @@
4779
4804
  }], ctorParameters: function () { return [{ type: i0__namespace.ElementRef }, { type: i0__namespace.ChangeDetectorRef }, { type: TheContextService }]; }, propDecorators: { checkItemClass: [{
4780
4805
  type: i0.HostBinding,
4781
4806
  args: ['class.the-temp-check-item']
4807
+ }], checkItemSelectable: [{
4808
+ type: i0.HostBinding,
4809
+ args: ['class.the-todo-item-selectable']
4782
4810
  }], level: [{
4783
4811
  type: i0.HostBinding,
4784
4812
  args: ['attr.the-level']
@@ -10205,6 +10233,7 @@
10205
10233
  if (this.readonly)
10206
10234
  return;
10207
10235
  event.stopPropagation();
10236
+ event.preventDefault();
10208
10237
  if (!this.isInTable) {
10209
10238
  var path = TheEditor.findPath(this.editor, this.element);
10210
10239
  slate.Transforms.select(this.editor, path);
@@ -10265,10 +10294,10 @@
10265
10294
  });
10266
10295
  });
10267
10296
  };
10268
- TheTableComponent.prototype.trackByFnRowCotrols = function (index) {
10297
+ TheTableComponent.prototype.trackByFnRowControls = function (index) {
10269
10298
  return index;
10270
10299
  };
10271
- TheTableComponent.prototype.trackByFnColCotrols = function (index) {
10300
+ TheTableComponent.prototype.trackByFnColControls = function (index) {
10272
10301
  return index;
10273
10302
  };
10274
10303
  TheTableComponent.prototype.ngOnDestroy = function () {
@@ -10289,7 +10318,7 @@
10289
10318
  provide: TheTableToken,
10290
10319
  useExisting: TheTableComponent
10291
10320
  }
10292
- ], 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: trackByFnRowCotrols\"\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: trackByFnColCotrols\"\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"] }] });
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"] }] });
10293
10322
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheTableComponent, decorators: [{
10294
10323
  type: i0.Component,
10295
10324
  args: [{
@@ -12046,8 +12075,8 @@
12046
12075
  key: exports.PluginKeys.table,
12047
12076
  withOverrides: withTable,
12048
12077
  nestedStructureByKey: (_a = {},
12049
- _a[exports.ElementKinds.table] = [exports.ElementKinds.tableRow],
12050
- _a[exports.ElementKinds.tableRow] = [exports.ElementKinds.tableCell],
12078
+ _a[exports.ElementKinds.table] = exports.ElementKinds.tableRow,
12079
+ _a[exports.ElementKinds.tableRow] = exports.ElementKinds.tableCell,
12051
12080
  _a),
12052
12081
  toolbarItems: [
12053
12082
  {
@@ -14599,9 +14628,9 @@
14599
14628
  i2$1.ThyActionMenuModule,
14600
14629
  i5.ThyInputModule,
14601
14630
  select.ThySelectModule,
14602
- i1$5.ThyButtonModule,
14603
- i1$4.ThyNotifyModule,
14604
- i1$2.ThyAlertModule,
14631
+ i1$6.ThyButtonModule,
14632
+ i1$5.ThyNotifyModule,
14633
+ i1$3.ThyAlertModule,
14605
14634
  i9.ThyResizableModule,
14606
14635
  i5$2.ThySwitchModule
14607
14636
  ];
@@ -14700,9 +14729,9 @@
14700
14729
  i2$1.ThyActionMenuModule,
14701
14730
  i5.ThyInputModule,
14702
14731
  select.ThySelectModule,
14703
- i1$5.ThyButtonModule,
14704
- i1$4.ThyNotifyModule,
14705
- i1$2.ThyAlertModule,
14732
+ i1$6.ThyButtonModule,
14733
+ i1$5.ThyNotifyModule,
14734
+ i1$3.ThyAlertModule,
14706
14735
  i9.ThyResizableModule,
14707
14736
  i5$2.ThySwitchModule, i8.CodemirrorModule, TheColumnSizeModule], exports: [TheEditorComponent, TheToolbarComponent, TheToolbarDropdownComponent, TheToolbarItemComponent, TheDefaultElementComponent] });
14708
14737
  TheEditorModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheEditorModule, providers: [