@worktile/theia 3.0.0-next.5 → 3.0.1
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 +65 -101
- package/bundles/worktile-theia.umd.js.map +1 -1
- package/core/utils/index.d.ts +0 -1
- package/core/utils/merge-options.d.ts +1 -1
- package/esm2015/core/create-plugin.js +3 -2
- package/esm2015/core/utils/flatten-deep-plugins.js +3 -2
- package/esm2015/core/utils/get-plugin-options.js +2 -2
- package/esm2015/core/utils/get-plugin.js +2 -3
- package/esm2015/core/utils/index.js +1 -2
- package/esm2015/core/utils/merge-deep-plugins.js +2 -2
- package/esm2015/core/utils/merge-options.js +3 -3
- package/esm2015/core/with-theia.js +2 -2
- package/esm2015/plugins/image/image.editor.js +3 -8
- 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 +6 -5
- package/fesm2015/worktile-theia.js +49 -82
- 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
- package/transforms/insert-elements.d.ts +1 -1
- package/core/utils/get-plugin-by-key.d.ts +0 -2
- package/esm2015/core/utils/get-plugin-by-key.js +0 -8
|
@@ -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
|
/*! *****************************************************************************
|
|
@@ -1410,7 +1410,7 @@
|
|
|
1410
1410
|
if (!plugins)
|
|
1411
1411
|
return;
|
|
1412
1412
|
plugins.forEach(function (plugin) {
|
|
1413
|
-
var p = plugin;
|
|
1413
|
+
var p = _.cloneDeep(plugin);
|
|
1414
1414
|
if (!p.options)
|
|
1415
1415
|
p.options = {};
|
|
1416
1416
|
if (!p.nestedStructureByKey)
|
|
@@ -1425,17 +1425,9 @@
|
|
|
1425
1425
|
return (_a = editor === null || editor === void 0 ? void 0 : editor.plugins) !== null && _a !== void 0 ? _a : [];
|
|
1426
1426
|
};
|
|
1427
1427
|
|
|
1428
|
-
var
|
|
1429
|
-
var plugins = {};
|
|
1430
|
-
if (editor === null || editor === void 0 ? void 0 : editor.pluginsByKey) {
|
|
1431
|
-
return editor.pluginsByKey;
|
|
1432
|
-
}
|
|
1433
|
-
return plugins;
|
|
1434
|
-
};
|
|
1435
|
-
|
|
1436
|
-
var getPlugin = function (editor, key) { return getPluginByKey(editor)[key]; };
|
|
1428
|
+
var getPlugin = function (editor, key) { return editor.pluginsByKey[key]; };
|
|
1437
1429
|
|
|
1438
|
-
var getPluginOptions = function (editor, key) { var _a; return (_a = getPlugin(editor, key).options) !== null &&
|
|
1430
|
+
var getPluginOptions = function (editor, key) { var _a, _b; return (_b = (_a = getPlugin(editor, key)) === null || _a === void 0 ? void 0 : _a.options) !== null && _b !== void 0 ? _b : {}; };
|
|
1439
1431
|
|
|
1440
1432
|
var mergeOptions = function (plugin, override) {
|
|
1441
1433
|
var options = plugin.options;
|
|
@@ -1447,11 +1439,11 @@
|
|
|
1447
1439
|
}
|
|
1448
1440
|
if (util.isObject(options[option])) {
|
|
1449
1441
|
newOptions[option] = _.assign(options[option], override.options[option]);
|
|
1442
|
+
continue;
|
|
1450
1443
|
}
|
|
1451
|
-
newOptions[option] = override.options[option];
|
|
1444
|
+
newOptions[option] = override.options[option] ? override.options[option] : options[option];
|
|
1452
1445
|
}
|
|
1453
1446
|
plugin.options = newOptions;
|
|
1454
|
-
return plugin;
|
|
1455
1447
|
};
|
|
1456
1448
|
|
|
1457
1449
|
var combinePlugins = function (editor) {
|
|
@@ -1470,7 +1462,7 @@
|
|
|
1470
1462
|
var newPlugins = _plugins.filter(function (p) { return plugin.overrideByKey[p.key]; });
|
|
1471
1463
|
newPlugins.forEach(function (p) {
|
|
1472
1464
|
if (editor.pluginsByKey[p.key]) {
|
|
1473
|
-
|
|
1465
|
+
mergeOptions(p, plugin.overrideByKey[p.key]);
|
|
1474
1466
|
editor.pluginsByKey[p.key] = _.defaultsDeep(p, plugin.overrideByKey[p.key]);
|
|
1475
1467
|
}
|
|
1476
1468
|
});
|
|
@@ -1513,7 +1505,7 @@
|
|
|
1513
1505
|
// withOverridesByKey
|
|
1514
1506
|
flattenDeepPlugins(e, plugins);
|
|
1515
1507
|
// mount pluginsByKey
|
|
1516
|
-
pluginsByKey(e, plugins);
|
|
1508
|
+
pluginsByKey(e, e.plugins);
|
|
1517
1509
|
// mount nestedStructureByKey
|
|
1518
1510
|
nestedStructureByKey(e, e.plugins);
|
|
1519
1511
|
// merge plugin to pluginByKey
|
|
@@ -1524,7 +1516,7 @@
|
|
|
1524
1516
|
|
|
1525
1517
|
var createPluginFactory = function (defaultPlugin) { return function (override, overrideByKey) {
|
|
1526
1518
|
if (overrideByKey === void 0) { overrideByKey = {}; }
|
|
1527
|
-
return defaultPlugin;
|
|
1519
|
+
return _.cloneDeep(defaultPlugin);
|
|
1528
1520
|
}; };
|
|
1529
1521
|
|
|
1530
1522
|
var toolbarInitialize = function (toolbarItems, global, inline, quick) {
|
|
@@ -2375,69 +2367,36 @@
|
|
|
2375
2367
|
return false;
|
|
2376
2368
|
var _b = __read(anchorBlockEntry(editor), 2), anchorBlockPath = _b[1];
|
|
2377
2369
|
var currentNodePath = anchorBlockPath.slice(0, parentEntry[1].length + 1);
|
|
2378
|
-
var illegalParentEntry =
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
at: parentEntry[1],
|
|
2384
|
-
match: function (n) { return n.type && !allowParentTypes.includes(n.type); }
|
|
2385
|
-
});
|
|
2386
|
-
if (_illegalParentEntry) {
|
|
2387
|
-
var childType = editor.nestedStructureByKey[_illegalParentEntry[0].type];
|
|
2388
|
-
if (!childType) {
|
|
2389
|
-
illegalParentEntry = _illegalParentEntry;
|
|
2390
|
-
}
|
|
2391
|
-
if (allowParentTypes.includes(childType)) {
|
|
2392
|
-
var rootKey_1 = findNestedStructureRootType(editor, _illegalParentEntry[0].type, '');
|
|
2393
|
-
parentEntry =
|
|
2394
|
-
parentEntry &&
|
|
2395
|
-
slate.Editor.above(editor, {
|
|
2396
|
-
mode: 'lowest',
|
|
2397
|
-
at: parentEntry[1],
|
|
2398
|
-
match: function (n) { return n.type && n.type === rootKey_1; }
|
|
2399
|
-
});
|
|
2400
|
-
}
|
|
2401
|
-
else {
|
|
2402
|
-
parentEntry = _illegalParentEntry;
|
|
2403
|
-
}
|
|
2404
|
-
}
|
|
2405
|
-
else {
|
|
2406
|
-
return "break";
|
|
2407
|
-
}
|
|
2408
|
-
};
|
|
2409
|
-
// 循环获取最外层的不可插入节点
|
|
2410
|
-
while (true) {
|
|
2411
|
-
var state_1 = _loop_1();
|
|
2412
|
-
if (state_1 === "break")
|
|
2413
|
-
break;
|
|
2414
|
-
}
|
|
2370
|
+
var illegalParentEntry = slate.Editor.above(editor, {
|
|
2371
|
+
mode: 'highest',
|
|
2372
|
+
at: parentEntry[1],
|
|
2373
|
+
match: function (n) { return n.type && !isAllowParentTypes(editor, n.type, allowParentTypes); }
|
|
2374
|
+
});
|
|
2415
2375
|
// 获取不可插入节点的根层节点
|
|
2416
2376
|
if (illegalParentEntry) {
|
|
2417
|
-
var rootKey_2 = findNestedStructureRootType(editor, illegalParentEntry[0].type, '');
|
|
2418
|
-
if (rootKey_2 && illegalParentEntry[0].type !== rootKey_2) {
|
|
2419
|
-
illegalParentEntry = slate.Editor.above(editor, {
|
|
2420
|
-
mode: 'lowest',
|
|
2421
|
-
at: parentEntry[1],
|
|
2422
|
-
match: function (n) { return n.type && n.type === rootKey_2; }
|
|
2423
|
-
});
|
|
2424
|
-
}
|
|
2425
2377
|
currentNodePath = illegalParentEntry && illegalParentEntry[1];
|
|
2426
2378
|
}
|
|
2427
2379
|
return currentNodePath && slate.Path.next(currentNodePath);
|
|
2428
2380
|
};
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
var
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2381
|
+
var isAllowParentTypes = function (editor, targetType, allowParentTypes) {
|
|
2382
|
+
var existChildType = isNestedStructureParentType(editor, targetType);
|
|
2383
|
+
var leafType = existChildType && findNestedStructureLeafType(editor, targetType);
|
|
2384
|
+
return allowParentTypes.includes(targetType) || allowParentTypes.includes(leafType);
|
|
2385
|
+
};
|
|
2386
|
+
var isNestedStructureParentType = function (editor, type) {
|
|
2387
|
+
for (var key in editor.nestedStructureByKey) {
|
|
2388
|
+
if (key === type) {
|
|
2389
|
+
return true;
|
|
2390
|
+
}
|
|
2437
2391
|
}
|
|
2438
|
-
|
|
2439
|
-
|
|
2392
|
+
return false;
|
|
2393
|
+
};
|
|
2394
|
+
var findNestedStructureLeafType = function (editor, target) {
|
|
2395
|
+
var leafType = editor.nestedStructureByKey[target];
|
|
2396
|
+
while (leafType && editor.nestedStructureByKey[leafType]) {
|
|
2397
|
+
leafType = editor.nestedStructureByKey[leafType];
|
|
2440
2398
|
}
|
|
2399
|
+
return leafType;
|
|
2441
2400
|
};
|
|
2442
2401
|
|
|
2443
2402
|
var isContainNestedType = function (editor, types) {
|
|
@@ -2526,19 +2485,19 @@
|
|
|
2526
2485
|
someNode: someNode
|
|
2527
2486
|
});
|
|
2528
2487
|
|
|
2529
|
-
var insertElements = function (editor,
|
|
2488
|
+
var insertElements = function (editor, elements) {
|
|
2530
2489
|
var _a;
|
|
2531
2490
|
if (slate.Range.isExpanded(editor.selection)) {
|
|
2532
2491
|
slate.Editor.deleteFragment(editor);
|
|
2533
2492
|
}
|
|
2534
|
-
var type =
|
|
2493
|
+
var type = !i1$2.isArray(elements) ? elements.type : elements[0].type; // 后期处理复制粘贴需要修改
|
|
2535
2494
|
var allowParentTypes = ((_a = getPluginOptions(editor, type)) === null || _a === void 0 ? void 0 : _a.allowParentTypes) || [];
|
|
2536
2495
|
var insertNodePath = getInsertElementsPath(editor, allowParentTypes);
|
|
2537
2496
|
var _b = __read(anchorBlockEntry(editor), 2), anchorBlock = _b[0], anchorBlockPath = _b[1];
|
|
2538
2497
|
var isEmpty = slate.Editor.isEmpty(editor, anchorBlock);
|
|
2539
2498
|
if (insertNodePath) {
|
|
2540
2499
|
slate.Editor.withoutNormalizing(editor, function () {
|
|
2541
|
-
slate.Transforms.insertNodes(editor,
|
|
2500
|
+
slate.Transforms.insertNodes(editor, elements, { at: insertNodePath });
|
|
2542
2501
|
slate.Transforms.select(editor, slate.Editor.start(editor, insertNodePath));
|
|
2543
2502
|
if (isEmpty) {
|
|
2544
2503
|
slate.Transforms.removeNodes(editor, { at: anchorBlockPath });
|
|
@@ -2547,7 +2506,7 @@
|
|
|
2547
2506
|
return;
|
|
2548
2507
|
}
|
|
2549
2508
|
var nextPath = slate.Path.next([anchorBlockPath[0]]);
|
|
2550
|
-
slate.Transforms.insertNodes(editor,
|
|
2509
|
+
slate.Transforms.insertNodes(editor, elements, { at: nextPath });
|
|
2551
2510
|
if (isEmpty && anchorBlockPath.length === 1) {
|
|
2552
2511
|
slate.Transforms.delete(editor, { at: anchorBlockPath });
|
|
2553
2512
|
slate.Transforms.select(editor, slate.Editor.start(editor, anchorBlockPath));
|
|
@@ -3120,12 +3079,7 @@
|
|
|
3120
3079
|
finally { if (e_1) throw e_1.error; }
|
|
3121
3080
|
}
|
|
3122
3081
|
if (imageNodes.length > 0) {
|
|
3123
|
-
|
|
3124
|
-
slate.Transforms.insertNodes(editor, imageNodes, { at: at });
|
|
3125
|
-
if (isCollapsed(editor.selection) && isEmptyParagraph(editor)) {
|
|
3126
|
-
slate.Transforms.removeNodes(editor, { at: at });
|
|
3127
|
-
slate.Transforms.select(editor, at);
|
|
3128
|
-
}
|
|
3082
|
+
insertElements(editor, imageNodes);
|
|
3129
3083
|
}
|
|
3130
3084
|
},
|
|
3131
3085
|
verifyImage: function (editor, image) {
|
|
@@ -4798,6 +4752,13 @@
|
|
|
4798
4752
|
_this.checkItemClass = true;
|
|
4799
4753
|
return _this;
|
|
4800
4754
|
}
|
|
4755
|
+
Object.defineProperty(TheTodoItemComponent.prototype, "checkItemSelectable", {
|
|
4756
|
+
get: function () {
|
|
4757
|
+
return this.editableWithReadonly && this.readonly;
|
|
4758
|
+
},
|
|
4759
|
+
enumerable: false,
|
|
4760
|
+
configurable: true
|
|
4761
|
+
});
|
|
4801
4762
|
Object.defineProperty(TheTodoItemComponent.prototype, "level", {
|
|
4802
4763
|
get: function () {
|
|
4803
4764
|
var _a;
|
|
@@ -4826,7 +4787,7 @@
|
|
|
4826
4787
|
return TheTodoItemComponent;
|
|
4827
4788
|
}(TheBaseElementComponent));
|
|
4828
4789
|
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 });
|
|
4829
|
-
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"] }] });
|
|
4790
|
+
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"] }] });
|
|
4830
4791
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheTodoItemComponent, decorators: [{
|
|
4831
4792
|
type: i0.Component,
|
|
4832
4793
|
args: [{
|
|
@@ -4836,6 +4797,9 @@
|
|
|
4836
4797
|
}], ctorParameters: function () { return [{ type: i0__namespace.ElementRef }, { type: i0__namespace.ChangeDetectorRef }, { type: TheContextService }]; }, propDecorators: { checkItemClass: [{
|
|
4837
4798
|
type: i0.HostBinding,
|
|
4838
4799
|
args: ['class.the-temp-check-item']
|
|
4800
|
+
}], checkItemSelectable: [{
|
|
4801
|
+
type: i0.HostBinding,
|
|
4802
|
+
args: ['class.the-todo-item-selectable']
|
|
4839
4803
|
}], level: [{
|
|
4840
4804
|
type: i0.HostBinding,
|
|
4841
4805
|
args: ['attr.the-level']
|
|
@@ -10262,6 +10226,7 @@
|
|
|
10262
10226
|
if (this.readonly)
|
|
10263
10227
|
return;
|
|
10264
10228
|
event.stopPropagation();
|
|
10229
|
+
event.preventDefault();
|
|
10265
10230
|
if (!this.isInTable) {
|
|
10266
10231
|
var path = TheEditor.findPath(this.editor, this.element);
|
|
10267
10232
|
slate.Transforms.select(this.editor, path);
|
|
@@ -10322,10 +10287,10 @@
|
|
|
10322
10287
|
});
|
|
10323
10288
|
});
|
|
10324
10289
|
};
|
|
10325
|
-
TheTableComponent.prototype.
|
|
10290
|
+
TheTableComponent.prototype.trackByFnRowControls = function (index) {
|
|
10326
10291
|
return index;
|
|
10327
10292
|
};
|
|
10328
|
-
TheTableComponent.prototype.
|
|
10293
|
+
TheTableComponent.prototype.trackByFnColControls = function (index) {
|
|
10329
10294
|
return index;
|
|
10330
10295
|
};
|
|
10331
10296
|
TheTableComponent.prototype.ngOnDestroy = function () {
|
|
@@ -10346,7 +10311,7 @@
|
|
|
10346
10311
|
provide: TheTableToken,
|
|
10347
10312
|
useExisting: TheTableComponent
|
|
10348
10313
|
}
|
|
10349
|
-
], 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:
|
|
10314
|
+
], 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"] }] });
|
|
10350
10315
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheTableComponent, decorators: [{
|
|
10351
10316
|
type: i0.Component,
|
|
10352
10317
|
args: [{
|
|
@@ -14656,9 +14621,9 @@
|
|
|
14656
14621
|
i2$1.ThyActionMenuModule,
|
|
14657
14622
|
i5.ThyInputModule,
|
|
14658
14623
|
select.ThySelectModule,
|
|
14659
|
-
i1$
|
|
14660
|
-
i1$
|
|
14661
|
-
i1$
|
|
14624
|
+
i1$6.ThyButtonModule,
|
|
14625
|
+
i1$5.ThyNotifyModule,
|
|
14626
|
+
i1$3.ThyAlertModule,
|
|
14662
14627
|
i9.ThyResizableModule,
|
|
14663
14628
|
i5$2.ThySwitchModule
|
|
14664
14629
|
];
|
|
@@ -14757,9 +14722,9 @@
|
|
|
14757
14722
|
i2$1.ThyActionMenuModule,
|
|
14758
14723
|
i5.ThyInputModule,
|
|
14759
14724
|
select.ThySelectModule,
|
|
14760
|
-
i1$
|
|
14761
|
-
i1$
|
|
14762
|
-
i1$
|
|
14725
|
+
i1$6.ThyButtonModule,
|
|
14726
|
+
i1$5.ThyNotifyModule,
|
|
14727
|
+
i1$3.ThyAlertModule,
|
|
14763
14728
|
i9.ThyResizableModule,
|
|
14764
14729
|
i5$2.ThySwitchModule, i8.CodemirrorModule, TheColumnSizeModule], exports: [TheEditorComponent, TheToolbarComponent, TheToolbarDropdownComponent, TheToolbarItemComponent, TheDefaultElementComponent] });
|
|
14765
14730
|
TheEditorModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheEditorModule, providers: [
|
|
@@ -14937,7 +14902,6 @@
|
|
|
14937
14902
|
exports.getElementWidth = getElementWidth;
|
|
14938
14903
|
exports.getEndBlock = getEndBlock;
|
|
14939
14904
|
exports.getPlugin = getPlugin;
|
|
14940
|
-
exports.getPluginByKey = getPluginByKey;
|
|
14941
14905
|
exports.getPluginOptions = getPluginOptions;
|
|
14942
14906
|
exports.getPlugins = getPlugins;
|
|
14943
14907
|
exports.getRowsTotalHeight = getRowsTotalHeight;
|