@worktile/theia 2.2.10 → 2.3.0-next.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.
Files changed (55) hide show
  1. package/bundles/worktile-theia.umd.js +768 -184
  2. package/bundles/worktile-theia.umd.js.map +1 -1
  3. package/constants/default.d.ts +3 -0
  4. package/constants/node-types.d.ts +4 -0
  5. package/custom-types.d.ts +3 -1
  6. package/editor.component.d.ts +3 -1
  7. package/editor.module.d.ts +26 -24
  8. package/esm2015/constants/default.js +2 -1
  9. package/esm2015/constants/node-types.js +6 -1
  10. package/esm2015/custom-types.js +1 -1
  11. package/esm2015/editor.component.js +12 -6
  12. package/esm2015/editor.module.js +6 -3
  13. package/esm2015/interfaces/editor.js +1 -1
  14. package/esm2015/interfaces/image.js +1 -1
  15. package/esm2015/interfaces/valid-children-types.js +2 -1
  16. package/esm2015/plugins/align/align.editor.js +10 -2
  17. package/esm2015/plugins/align/options.js +3 -2
  18. package/esm2015/plugins/common/auto-insert-data..js +2 -18
  19. package/esm2015/plugins/dnd/component/dnd.component.js +260 -0
  20. package/esm2015/plugins/dnd/utils/get-current-target.js +19 -0
  21. package/esm2015/plugins/dnd/utils/get-hover-direction.js +13 -0
  22. package/esm2015/plugins/dnd/utils/is-valid-drag.js +38 -0
  23. package/esm2015/plugins/dnd/utils/move-drag-node.js +30 -0
  24. package/esm2015/plugins/dnd/utils/remove-drop-thumb-line.js +10 -0
  25. package/esm2015/plugins/image/image.component.js +167 -14
  26. package/esm2015/plugins/image/image.editor.js +4 -1
  27. package/esm2015/plugins/quick-insert/components/quick-insert.component.js +13 -2
  28. package/esm2015/services/context.service.js +5 -1
  29. package/esm2015/utils/dom.js +39 -1
  30. package/esm2015/utils/merge-element-options.js +20 -0
  31. package/fesm2015/worktile-theia.js +719 -153
  32. package/fesm2015/worktile-theia.js.map +1 -1
  33. package/interfaces/editor.d.ts +9 -1
  34. package/interfaces/image.d.ts +7 -1
  35. package/interfaces/valid-children-types.d.ts +1 -0
  36. package/package.json +1 -1
  37. package/plugins/align/align.editor.d.ts +1 -0
  38. package/plugins/dnd/component/dnd.component.d.ts +42 -0
  39. package/plugins/dnd/component/dnd.component.scss +61 -0
  40. package/plugins/dnd/utils/get-current-target.d.ts +2 -0
  41. package/plugins/dnd/utils/get-hover-direction.d.ts +3 -0
  42. package/plugins/dnd/utils/is-valid-drag.d.ts +3 -0
  43. package/plugins/dnd/utils/move-drag-node.d.ts +2 -0
  44. package/plugins/dnd/utils/remove-drop-thumb-line.d.ts +2 -0
  45. package/plugins/image/image.component.d.ts +27 -3
  46. package/plugins/image/image.component.scss +9 -2
  47. package/plugins/image/image.editor.d.ts +6 -1
  48. package/plugins/quick-insert/components/quick-insert.component.d.ts +1 -0
  49. package/plugins/table/components/table.component.scss +1 -0
  50. package/services/context.service.d.ts +1 -0
  51. package/styles/editor.scss +4 -0
  52. package/styles/index.scss +1 -0
  53. package/styles/typo.scss +44 -0
  54. package/utils/dom.d.ts +5 -1
  55. package/utils/merge-element-options.d.ts +2 -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('lodash'), require('marked'), require('@atinc/selene'), require('ngx-tethys/popover'), require('@angular/cdk/overlay'), require('ngx-tethys/alert'), require('rxjs/operators'), require('ngx-tethys/uploader'), require('@angular/platform-browser'), require('rxjs'), require('ngx-tethys/progress'), require('ngx-tethys/icon'), require('ngx-tethys/input'), 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', 'lodash', 'marked', '@atinc/selene', 'ngx-tethys/popover', '@angular/cdk/overlay', 'ngx-tethys/alert', 'rxjs/operators', 'ngx-tethys/uploader', '@angular/platform-browser', 'rxjs', 'ngx-tethys/progress', 'ngx-tethys/icon', 'ngx-tethys/input', '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._lodash, global.marked, global.selene, global.i1$2, global.ng.cdk.overlay, global.i1$1, global.rxjs.operators, global.uploader, global.ng.platformBrowser, global.rxjs, global.i4, global.i4$1, global.i5, global.i3, global.i5$1, global.i8, global.i1$4, global.i5$2, global.i6$1, global.i9, global.isUrl, global.i1$5, global.i2$1, global.i5$3, global.i1$6, global.ng.cdk.coercion, global.ng.cdk.portal, global.i2$2, global.autocomplete, global.avatar, global.select));
5
- })(this, (function (exports, i0, i6, i4$2, i1, core, isHotkey, slate, slateHistory, _lodash, marked, selene, i1$2, i2, i1$1, operators, uploader, i1$3, rxjs, i4, i4$1, i5, i3, i5$1, i8, i1$4, i5$2, i6$1, i9, isUrl, i1$5, i2$1, i5$3, i1$6, coercion, portal, i2$2, 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('lodash'), require('marked'), require('@atinc/selene'), require('ngx-tethys/popover'), require('@angular/cdk/overlay'), require('ngx-tethys/alert'), require('rxjs/operators'), require('ngx-tethys/uploader'), require('rxjs'), require('@angular/platform-browser'), require('ngx-tethys/progress'), require('ngx-tethys/icon'), require('ngx-tethys/nav'), require('ngx-tethys/tooltip'), require('ngx-tethys/input'), 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', 'lodash', 'marked', '@atinc/selene', 'ngx-tethys/popover', '@angular/cdk/overlay', 'ngx-tethys/alert', 'rxjs/operators', 'ngx-tethys/uploader', 'rxjs', '@angular/platform-browser', 'ngx-tethys/progress', 'ngx-tethys/icon', 'ngx-tethys/nav', 'ngx-tethys/tooltip', 'ngx-tethys/input', '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._lodash, global.marked, global.selene, global.i1$2, global.ng.cdk.overlay, global.i1$1, global.rxjs.operators, global.uploader, global.rxjs, global.ng.platformBrowser, global.i6, global.i4, global.i3, global.i5, global.i5$1, global.i8, global.i1$4, global.i5$2, global.i6$1, global.i9, global.isUrl, global.i1$5, global.i2$1, global.i5$3, global.i1$6, global.ng.cdk.coercion, global.ng.cdk.portal, global.i2$2, global.autocomplete, global.avatar, global.select));
5
+ })(this, (function (exports, i0, i10, i4$1, i1, core, isHotkey, slate, slateHistory, _lodash, marked, selene, i1$2, i2, i1$1, operators, uploader, rxjs, i1$3, i6, i4, i3, i5, i5$1, i8, i1$4, i5$2, i6$1, i9, isUrl, i1$5, i2$1, i5$3, i1$6, coercion, portal, i2$2, 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
 
@@ -25,8 +25,8 @@
25
25
  }
26
26
 
27
27
  var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
28
- var i6__namespace = /*#__PURE__*/_interopNamespace(i6);
29
- var i4__namespace$2 = /*#__PURE__*/_interopNamespace(i4$2);
28
+ var i10__namespace = /*#__PURE__*/_interopNamespace(i10);
29
+ var i4__namespace$1 = /*#__PURE__*/_interopNamespace(i4$1);
30
30
  var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
31
31
  var isHotkey__default = /*#__PURE__*/_interopDefaultLegacy(isHotkey);
32
32
  var _lodash__namespace = /*#__PURE__*/_interopNamespace(_lodash);
@@ -35,10 +35,10 @@
35
35
  var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
36
36
  var i1__namespace$1 = /*#__PURE__*/_interopNamespace(i1$1);
37
37
  var i1__namespace$2 = /*#__PURE__*/_interopNamespace(i1$3);
38
+ var i6__namespace = /*#__PURE__*/_interopNamespace(i6);
38
39
  var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
39
- var i4__namespace$1 = /*#__PURE__*/_interopNamespace(i4$1);
40
- var i5__namespace = /*#__PURE__*/_interopNamespace(i5);
41
40
  var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
41
+ var i5__namespace = /*#__PURE__*/_interopNamespace(i5);
42
42
  var i5__namespace$1 = /*#__PURE__*/_interopNamespace(i5$1);
43
43
  var i8__namespace = /*#__PURE__*/_interopNamespace(i8);
44
44
  var i1__namespace$4 = /*#__PURE__*/_interopNamespace(i1$4);
@@ -379,6 +379,7 @@
379
379
  var DEFAULT_SCROLL_CONTAINER = '.the-editable-container';
380
380
  var ELEMENT_UNIQUE_ID = 'key';
381
381
  var ZERO_WIDTH_CHAR = '\u200B';
382
+ var DROP_THUMB_LINE = 'drop-thumb-line';
382
383
  exports.TheMode = void 0;
383
384
  (function (TheMode) {
384
385
  TheMode["fullMode"] = "full";
@@ -424,6 +425,11 @@
424
425
  VerticalAlignment["middle"] = "middle";
425
426
  VerticalAlignment["bottom"] = "bottom";
426
427
  })(exports.VerticalAlignment || (exports.VerticalAlignment = {}));
428
+ exports.LayoutTypes = void 0;
429
+ (function (LayoutTypes) {
430
+ LayoutTypes["wrapLeft"] = "wrap-left";
431
+ LayoutTypes["wrapRight"] = "wrap-right";
432
+ })(exports.LayoutTypes || (exports.LayoutTypes = {}));
427
433
  exports.FontSizes = void 0;
428
434
  (function (FontSizes) {
429
435
  FontSizes["fontSize12"] = "12";
@@ -831,6 +837,7 @@
831
837
  },
832
838
  {
833
839
  type: exports.ElementKinds.tableCell,
840
+ isSecondaryContainer: true,
834
841
  inValidChildrenTypes: [exports.ElementKinds.table, exports.ElementKinds.tableCell]
835
842
  }
836
843
  ];
@@ -2674,6 +2681,25 @@
2674
2681
  return regexps.some(function (regexp) { return regexp.test(content); });
2675
2682
  };
2676
2683
 
2684
+ var mergeElementOptions = function (elementOptions) {
2685
+ elementOptions = elementOptions.filter(function (item) { return item.inValidChildrenTypes.length > 0; });
2686
+ var combinationData = __spreadArray(__spreadArray([], __read(DefaultElementOptions)), __read(elementOptions));
2687
+ var dataInfo = {};
2688
+ combinationData.forEach(function (item) {
2689
+ var type = item.type, inValidChildrenTypes = item.inValidChildrenTypes, isIndivisible = item.isIndivisible, isSecondaryContainer = item.isSecondaryContainer;
2690
+ if (!dataInfo[type]) {
2691
+ dataInfo[type] = {
2692
+ type: type,
2693
+ inValidChildrenTypes: inValidChildrenTypes,
2694
+ isIndivisible: isIndivisible,
2695
+ isSecondaryContainer: isSecondaryContainer
2696
+ };
2697
+ }
2698
+ dataInfo[type].inValidChildrenTypes = Array.from(new Set(__spreadArray(__spreadArray([], __read(inValidChildrenTypes)), __read(dataInfo[type].inValidChildrenTypes))));
2699
+ });
2700
+ return dataInfo;
2701
+ };
2702
+
2677
2703
  var withAutoInsertData = function (validChildren) { return function (editor) {
2678
2704
  var insertData = editor.insertData;
2679
2705
  var allElementOptions = DefaultElementOptions;
@@ -2739,23 +2765,6 @@
2739
2765
  };
2740
2766
  return editor;
2741
2767
  }; };
2742
- var mergeElementOptions = function (elementOptions) {
2743
- elementOptions = elementOptions.filter(function (item) { return item.inValidChildrenTypes.length > 0; });
2744
- var combinationData = __spreadArray(__spreadArray([], __read(DefaultElementOptions)), __read(elementOptions));
2745
- var dataInfo = {};
2746
- combinationData.forEach(function (item) {
2747
- var type = item.type, inValidChildrenTypes = item.inValidChildrenTypes, isIndivisible = item.isIndivisible;
2748
- if (!dataInfo[type]) {
2749
- dataInfo[type] = {
2750
- type: type,
2751
- inValidChildrenTypes: inValidChildrenTypes,
2752
- isIndivisible: isIndivisible
2753
- };
2754
- }
2755
- dataInfo[type].inValidChildrenTypes = Array.from(new Set(__spreadArray(__spreadArray([], __read(inValidChildrenTypes)), __read(dataInfo[type].inValidChildrenTypes))));
2756
- });
2757
- return dataInfo;
2758
- };
2759
2768
 
2760
2769
  var withRemoveEmpty = function (editor) {
2761
2770
  var deleteBackward = editor.deleteBackward, deleteForward = editor.deleteForward;
@@ -2871,6 +2880,10 @@
2871
2880
  var editableElement = this.getEditableElement();
2872
2881
  return editableElement === null || editableElement === void 0 ? void 0 : editableElement.firstElementChild;
2873
2882
  };
2883
+ TheContextService.prototype.layoutDefaultWidth = function () {
2884
+ var firstElementChild = this.getFirstElementChild();
2885
+ return 0.48 * firstElementChild.clientWidth;
2886
+ };
2874
2887
  TheContextService.prototype.setUploadFileList = function (file) {
2875
2888
  this.fileList.push(file);
2876
2889
  };
@@ -2885,18 +2898,178 @@
2885
2898
  type: i0.Injectable
2886
2899
  }], ctorParameters: function () { return [{ type: i0__namespace.NgZone }]; } });
2887
2900
 
2901
+ var ImageEditor = {
2902
+ openUpload: function (editor) {
2903
+ var inputFile = document.createElement('input');
2904
+ inputFile.setAttribute('type', 'file');
2905
+ inputFile.setAttribute('accept', 'image/*');
2906
+ inputFile.onchange = function (event) {
2907
+ ImageEditor.insertImages(editor, event.target.files);
2908
+ };
2909
+ inputFile.click();
2910
+ },
2911
+ insertImages: function (editor, imageFiles) {
2912
+ var e_1, _a;
2913
+ var contextService = editor.injector.get(TheContextService);
2914
+ var imageNodes = [];
2915
+ var text = { text: '' };
2916
+ try {
2917
+ for (var imageFiles_1 = __values(imageFiles), imageFiles_1_1 = imageFiles_1.next(); !imageFiles_1_1.done; imageFiles_1_1 = imageFiles_1.next()) {
2918
+ var image = imageFiles_1_1.value;
2919
+ var verify = ImageEditor.verifyImage(editor, image);
2920
+ if (verify) {
2921
+ var url = URL.createObjectURL(image);
2922
+ contextService.setUploadFileList({
2923
+ url: url,
2924
+ file: image
2925
+ });
2926
+ imageNodes.push({ type: exports.ElementKinds.image, url: url, children: [text] });
2927
+ }
2928
+ }
2929
+ }
2930
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
2931
+ finally {
2932
+ try {
2933
+ if (imageFiles_1_1 && !imageFiles_1_1.done && (_a = imageFiles_1.return)) _a.call(imageFiles_1);
2934
+ }
2935
+ finally { if (e_1) throw e_1.error; }
2936
+ }
2937
+ if (imageNodes.length > 0) {
2938
+ var at = editor.selection;
2939
+ slate.Transforms.insertNodes(editor, imageNodes, { at: at });
2940
+ if (isCollapsed(editor.selection) && isEmptyParagraph(editor)) {
2941
+ slate.Transforms.removeNodes(editor, { at: at });
2942
+ slate.Transforms.select(editor, at);
2943
+ }
2944
+ }
2945
+ },
2946
+ verifyImage: function (editor, image) {
2947
+ if (!PICTURE_ACCEPTED_UPLOAD_MIME.includes(image.type)) {
2948
+ editor.onError({
2949
+ code: exports.ErrorCodes.IMAGE_ERR_MIME_FORMAT
2950
+ });
2951
+ return false;
2952
+ }
2953
+ if (image.size / 1000000 >= PICTURE_ACCEPTED_UPLOAD_SIZE) {
2954
+ editor.onError({
2955
+ code: exports.ErrorCodes.IMAGE_ERR_SIZE_LIMIT
2956
+ });
2957
+ return false;
2958
+ }
2959
+ return true;
2960
+ },
2961
+ isImageActive: function (editor) {
2962
+ var _a = __read(slate.Editor.nodes(editor, {
2963
+ match: function (n) { return slate.Element.isElement(n) && n.type === exports.ElementKinds.image; },
2964
+ universal: true
2965
+ }), 1), match = _a[0];
2966
+ return !!match;
2967
+ },
2968
+ setImageNode: function (editor, path, partial) {
2969
+ slate.Transforms.setNodes(editor, partial, { at: path });
2970
+ }
2971
+ };
2972
+
2973
+ var NavSplitLineComponent = /** @class */ (function () {
2974
+ function NavSplitLineComponent() {
2975
+ this.mode = exports.ToolbarItemMode.vertical;
2976
+ this.theNavSplitLine = true;
2977
+ }
2978
+ Object.defineProperty(NavSplitLineComponent.prototype, "horizontal", {
2979
+ get: function () {
2980
+ return this.mode === exports.ToolbarItemMode.horizontal;
2981
+ },
2982
+ enumerable: false,
2983
+ configurable: true
2984
+ });
2985
+ Object.defineProperty(NavSplitLineComponent.prototype, "vertical", {
2986
+ get: function () {
2987
+ return this.mode === exports.ToolbarItemMode.vertical;
2988
+ },
2989
+ enumerable: false,
2990
+ configurable: true
2991
+ });
2992
+ NavSplitLineComponent.prototype.ngOnInit = function () { };
2993
+ return NavSplitLineComponent;
2994
+ }());
2995
+ NavSplitLineComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: NavSplitLineComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
2996
+ 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 });
2997
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: NavSplitLineComponent, decorators: [{
2998
+ type: i0.Component,
2999
+ args: [{
3000
+ selector: 'nav-split-line',
3001
+ template: ''
3002
+ }]
3003
+ }], ctorParameters: function () { return []; }, propDecorators: { mode: [{
3004
+ type: i0.Input
3005
+ }], theNavSplitLine: [{
3006
+ type: i0.HostBinding,
3007
+ args: ['class.the-nav-split-line']
3008
+ }], horizontal: [{
3009
+ type: i0.HostBinding,
3010
+ args: ['class.horizontal']
3011
+ }], vertical: [{
3012
+ type: i0.HostBinding,
3013
+ args: ['class.vertical']
3014
+ }] } });
3015
+
2888
3016
  var TheImageComponent = /** @class */ (function (_super) {
2889
3017
  __extends(TheImageComponent, _super);
2890
- function TheImageComponent(elementRef, sanitizer, imageUploaderService, cdr, theContextService) {
3018
+ function TheImageComponent(elementRef, sanitizer, imageUploaderService, cdr, theContextService, thyPopover, overlay, viewContainerRef) {
2891
3019
  var _this = _super.call(this, elementRef, cdr) || this;
2892
3020
  _this.elementRef = elementRef;
2893
3021
  _this.sanitizer = sanitizer;
2894
3022
  _this.imageUploaderService = imageUploaderService;
2895
3023
  _this.cdr = cdr;
2896
3024
  _this.theContextService = theContextService;
3025
+ _this.thyPopover = thyPopover;
3026
+ _this.overlay = overlay;
3027
+ _this.viewContainerRef = viewContainerRef;
2897
3028
  _this.imageEntry = {};
2898
3029
  _this.uploading = false;
2899
3030
  _this.percentage = 0;
3031
+ _this.layoutDefaultWidth = 368;
3032
+ _this.layoutOptions = [
3033
+ {
3034
+ key: exports.Alignment.left,
3035
+ icon: 'image-left',
3036
+ name: '左对齐',
3037
+ handle: function (e, key) { return _this.setImageNode(e, { align: key, layout: undefined }); }
3038
+ },
3039
+ {
3040
+ key: exports.Alignment.center,
3041
+ icon: 'image-center',
3042
+ name: '居中',
3043
+ handle: function (e, key) { return _this.setImageNode(e, { align: key, layout: undefined }); }
3044
+ },
3045
+ {
3046
+ key: exports.Alignment.right,
3047
+ icon: 'image-right',
3048
+ name: '右对齐',
3049
+ handle: function (e, key) { return _this.setImageNode(e, { align: key, layout: undefined }); }
3050
+ },
3051
+ {
3052
+ key: exports.ToolbarActionTypes.split
3053
+ },
3054
+ {
3055
+ key: exports.LayoutTypes.wrapLeft,
3056
+ icon: 'wrap-left',
3057
+ name: '隐藏左边',
3058
+ handle: function (e, key) { return _this.setImageNode(e, { layout: key }); }
3059
+ },
3060
+ {
3061
+ key: exports.LayoutTypes.wrapRight,
3062
+ icon: 'wrap-right',
3063
+ name: '隐藏右边',
3064
+ handle: function (e, key) { return _this.setImageNode(e, { layout: key }); }
3065
+ },
3066
+ {
3067
+ key: 'remove',
3068
+ icon: 'trash',
3069
+ name: '删除',
3070
+ handle: function (e) { return _this.onDelete(e); }
3071
+ }
3072
+ ];
2900
3073
  _this.dragable = false;
2901
3074
  _this.beforeContextChange = function (value) {
2902
3075
  if (value.element !== _this.element && value.element.thumbUrl) {
@@ -2906,21 +3079,43 @@
2906
3079
  height: value.element.height,
2907
3080
  thumbUrl: value.element.thumbUrl,
2908
3081
  originUrl: value.element.originUrl,
2909
- align: value.element.align || exports.Alignment.left
3082
+ align: value.element.align || exports.Alignment.left,
3083
+ layout: value.element.layout,
3084
+ reSized: value.element.reSized || false
2910
3085
  };
3086
+ _this.setBlockCardLayoutAttr();
2911
3087
  }
2912
3088
  };
2913
3089
  return _this;
2914
3090
  }
3091
+ Object.defineProperty(TheImageComponent.prototype, "isOpen", {
3092
+ get: function () {
3093
+ return this.layoutToolbarRef && this.layoutToolbarRef.getOverlayRef() && this.layoutToolbarRef.getOverlayRef().hasAttached();
3094
+ },
3095
+ enumerable: false,
3096
+ configurable: true
3097
+ });
2915
3098
  TheImageComponent.prototype.ngOnInit = function () {
2916
3099
  var _this = this;
2917
3100
  var _a;
3101
+ this.layoutDefaultWidth = this.theContextService.layoutDefaultWidth();
2918
3102
  this.file = (_a = this.theContextService.fileList.find(function (item) { return item.url === _this.element.url; })) === null || _a === void 0 ? void 0 : _a.file;
2919
3103
  if (this.file && this.file instanceof File) {
2920
3104
  this.uploadImage(this.file);
2921
3105
  }
2922
3106
  _super.prototype.ngOnInit.call(this);
2923
3107
  };
3108
+ TheImageComponent.prototype.onContextChange = function () {
3109
+ _super.prototype.onContextChange.call(this);
3110
+ if (this.initialized) {
3111
+ if (this.isShouldOpen()) {
3112
+ this.openLayoutToolbar();
3113
+ }
3114
+ if (this.isShouldClose()) {
3115
+ this.closeLayoutToolbar();
3116
+ }
3117
+ }
3118
+ };
2924
3119
  TheImageComponent.prototype.ngOnDestroy = function () {
2925
3120
  this.uploadingSubscription.unsubscribe();
2926
3121
  this.mouseUpSubscription.unsubscribe();
@@ -3002,18 +3197,20 @@
3002
3197
  axis: axis,
3003
3198
  printerPositionX: event.pageX,
3004
3199
  printerPositionY: event.pageY,
3005
- internalWidth: this.imageEntry.width | imgElement.width,
3006
- internalHeight: this.imageEntry.height | imgElement.height,
3200
+ internalWidth: imgElement.width || this.imageEntry.width,
3201
+ internalHeight: imgElement.height || this.imageEntry.height,
3007
3202
  maxWidth: this.theContextService.getOptions().width
3008
3203
  };
3009
3204
  this.mouseMoveSubscription = this.theContextService.onMouseMove$.subscribe(function (e) { return _this.mouseMoveHandle(e, options); });
3010
3205
  };
3011
3206
  TheImageComponent.prototype.mouseMoveHandle = function (event, options) {
3207
+ var _a;
3012
3208
  if (this.dragable) {
3013
3209
  var axis = options.axis, printerPositionX = options.printerPositionX, printerPositionY = options.printerPositionY, internalWidth = options.internalWidth, internalHeight = options.internalHeight, maxWidth = options.maxWidth;
3014
3210
  var isReversal = axis.includes('-');
3015
3211
  var offsetX = event.pageX - printerPositionX;
3016
3212
  var offsetY = event.pageY - printerPositionY;
3213
+ var _b = this.element, width = _b.width, height = _b.height;
3017
3214
  if (isReversal) {
3018
3215
  offsetX = -offsetX;
3019
3216
  offsetY = -offsetY;
@@ -3021,11 +3218,15 @@
3021
3218
  if (this.element.align === 'center') {
3022
3219
  offsetX = offsetX * 2;
3023
3220
  }
3024
- var _b = this.element, width = _b.width, height = _b.height;
3025
3221
  if (axis.includes('x')) {
3026
3222
  width = offsetX + internalWidth;
3027
3223
  if (width >= maxWidth) {
3028
3224
  width = maxWidth;
3225
+ // clear `layout` when the image is adjusted to the maximum value under rich media
3226
+ if ((_a = this.imageEntry) === null || _a === void 0 ? void 0 : _a.layout) {
3227
+ var path = findPath(this.editor, this.element);
3228
+ ImageEditor.setImageNode(this.editor, path, { layout: undefined });
3229
+ }
3029
3230
  }
3030
3231
  if (width <= 100) {
3031
3232
  width = 100;
@@ -3048,6 +3249,9 @@
3048
3249
  width = internalWidth / ratio;
3049
3250
  }
3050
3251
  }
3252
+ if (!this.imageEntry.reSized && this.imageEntry.width !== width) {
3253
+ this.imageEntry.reSized = true;
3254
+ }
3051
3255
  this.imageContent.nativeElement.style.width = width + 'px';
3052
3256
  this.imageContent.nativeElement.style.height = height + 'px';
3053
3257
  this.imageEntry.width = width;
@@ -3070,10 +3274,81 @@
3070
3274
  }
3071
3275
  $event.stopPropagation();
3072
3276
  };
3277
+ TheImageComponent.prototype.isShouldOpen = function () {
3278
+ return !(this === null || this === void 0 ? void 0 : this.readonly) && (this === null || this === void 0 ? void 0 : this.isCollapsed) && !this.uploading && !this.isOpen;
3279
+ };
3280
+ TheImageComponent.prototype.isShouldClose = function () {
3281
+ return this.isOpen && ((this === null || this === void 0 ? void 0 : this.readonly) || !(this === null || this === void 0 ? void 0 : this.isCollapsed) || this.uploading);
3282
+ };
3283
+ TheImageComponent.prototype.openLayoutToolbar = function () {
3284
+ var _a;
3285
+ this.layoutToolbarRef = this.thyPopover.open(this.layoutToolbar, {
3286
+ origin: this.imageContent,
3287
+ panelClass: ['the-image-toolbar'],
3288
+ placement: 'bottom',
3289
+ insideClosable: false,
3290
+ backdropClosable: true,
3291
+ hasBackdrop: false,
3292
+ offset: 60,
3293
+ viewContainerRef: this.viewContainerRef,
3294
+ scrollStrategy: this.overlay.scrollStrategies.reposition()
3295
+ });
3296
+ (_a = this.layoutToolbarRef) === null || _a === void 0 ? void 0 : _a.getOverlayRef().updatePositionStrategy(this.createPositionStrategy());
3297
+ };
3298
+ TheImageComponent.prototype.closeLayoutToolbar = function () {
3299
+ var _a;
3300
+ (_a = this.layoutToolbarRef) === null || _a === void 0 ? void 0 : _a.close();
3301
+ };
3302
+ TheImageComponent.prototype.layoutActive = function (key) {
3303
+ var _b = this.imageEntry, layout = _b.layout, align = _b.align;
3304
+ return key && ((key === align && !layout) || key === layout);
3305
+ };
3306
+ TheImageComponent.prototype.setImageNode = function (e, partial) {
3307
+ e.preventDefault();
3308
+ var path = findPath(this.editor, this.element);
3309
+ ImageEditor.setImageNode(this.editor, path, partial);
3310
+ };
3311
+ TheImageComponent.prototype.setBlockCardLayoutAttr = function () {
3312
+ var _this = this;
3313
+ Promise.resolve().then(function () {
3314
+ var _a;
3315
+ var currentElement = i1.AngularEditor.toDOMNode(_this.editor, _this.element);
3316
+ var blockCard = currentElement.closest('.slate-block-card');
3317
+ var layout = _this.element.layout;
3318
+ if (blockCard && layout) {
3319
+ blockCard.setAttribute('layout', layout);
3320
+ }
3321
+ else if (blockCard && !layout) {
3322
+ blockCard.removeAttribute('layout');
3323
+ }
3324
+ (_a = _this.layoutToolbarRef) === null || _a === void 0 ? void 0 : _a.getOverlayRef().updatePosition();
3325
+ });
3326
+ };
3327
+ TheImageComponent.prototype.onDelete = function (event) {
3328
+ event.preventDefault();
3329
+ deleteElement(this.editor, this.element);
3330
+ };
3331
+ TheImageComponent.prototype.createPositionStrategy = function () {
3332
+ var bottomPosition = {
3333
+ originX: 'center',
3334
+ originY: 'bottom',
3335
+ overlayX: 'center',
3336
+ overlayY: 'top',
3337
+ offsetX: 0,
3338
+ offsetY: 60
3339
+ };
3340
+ return this.overlay
3341
+ .position()
3342
+ .flexibleConnectedTo(this.imageContent)
3343
+ .withFlexibleDimensions(false)
3344
+ .withGrowAfterOpen(false)
3345
+ .withPush(false)
3346
+ .withPositions([bottomPosition]);
3347
+ };
3073
3348
  return TheImageComponent;
3074
3349
  }(TheBaseElementComponent));
3075
- 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 });
3076
- 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\">\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"] }] });
3350
+ 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 }, { token: i1__namespace$3.ThyPopover }, { token: i2__namespace.Overlay }, { token: i0__namespace.ViewContainerRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
3351
+ 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 }, { propertyName: "layoutToolbar", first: true, predicate: ["layoutToolbar"], descendants: true, static: true }], usesInheritance: true, ngImport: i0__namespace, template: "<slate-children [children]=\"children\" [context]=\"childrenContext\" [viewContext]=\"viewContext\"></slate-children>\n\n<div class=\"image-container\" contenteditable=\"false\" [style.textAlign]=\"imageEntry.align\">\n <div\n #imageContent\n *ngIf=\"imageEntry.thumbUrl\"\n class=\"image-content\"\n [class.pointer]=\"!selection\"\n [ngStyle]=\"{\n 'width.px':\n imageEntry?.layout && imageEntry?.width > layoutDefaultWidth && !imageEntry?.reSized\n ? layoutDefaultWidth\n : imageEntry.width,\n 'height.px': imageEntry.height\n }\"\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\n<ng-template #layoutToolbar>\n <div class=\"the-block-operate\" contenteditable=\"false\">\n <thy-icon-nav>\n <ng-container *ngFor=\"let item of layoutOptions\">\n <a\n *ngIf=\"item.key !== 'split'\"\n href=\"javascript:;\"\n thyIconNavLink\n [ngClass]=\"{ 'remove-link': item.key === 'remove' }\"\n [thyIconNavLinkIcon]=\"item.icon\"\n [thyTooltip]=\"item.name\"\n [thyIconNavLinkActive]=\"layoutActive(item.key)\"\n thyTooltipPlacement=\"top\"\n (mousedown)=\"item?.handle($event, item.key)\"\n ></a>\n <nav-split-line *ngIf=\"item.key === 'split'\"></nav-split-line>\n </ng-container>\n </thy-icon-nav>\n </div>\n</ng-template>\n", components: [{ type: i1__namespace.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }, { type: i6__namespace.ThyProgressComponent, selector: "thy-progress", inputs: ["thyType", "thySize", "thyValue", "thyMax", "thyTips"] }, { type: i4__namespace.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { type: i3__namespace.ThyIconNavComponent, selector: "thy-icon-nav", inputs: ["thyType"] }, { type: i3__namespace.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: NavSplitLineComponent, selector: "nav-split-line", inputs: ["mode"] }], directives: [{ type: i10__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i10__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i10__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i10__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i5__namespace.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }] });
3077
3352
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheImageComponent, decorators: [{
3078
3353
  type: i0.Component,
3079
3354
  args: [{
@@ -3084,84 +3359,18 @@
3084
3359
  return [{ type: i0__namespace.ElementRef }, { type: i1__namespace$2.DomSanitizer }, { type: undefined, decorators: [{
3085
3360
  type: i0.Inject,
3086
3361
  args: [THE_UPLOAD_SERVICE_TOKEN]
3087
- }] }, { type: i0__namespace.ChangeDetectorRef }, { type: TheContextService }];
3362
+ }] }, { type: i0__namespace.ChangeDetectorRef }, { type: TheContextService }, { type: i1__namespace$3.ThyPopover }, { type: i2__namespace.Overlay }, { type: i0__namespace.ViewContainerRef }];
3088
3363
  }, propDecorators: { imageContent: [{
3089
3364
  type: i0.ViewChild,
3090
3365
  args: ['imageContent']
3091
3366
  }], img: [{
3092
3367
  type: i0.ViewChild,
3093
3368
  args: ['img', { static: false }]
3369
+ }], layoutToolbar: [{
3370
+ type: i0.ViewChild,
3371
+ args: ['layoutToolbar', { static: true }]
3094
3372
  }] } });
3095
3373
 
3096
- var ImageEditor = {
3097
- openUpload: function (editor) {
3098
- var inputFile = document.createElement('input');
3099
- inputFile.setAttribute('type', 'file');
3100
- inputFile.setAttribute('accept', 'image/*');
3101
- inputFile.onchange = function (event) {
3102
- ImageEditor.insertImages(editor, event.target.files);
3103
- };
3104
- inputFile.click();
3105
- },
3106
- insertImages: function (editor, imageFiles) {
3107
- var e_1, _a;
3108
- var contextService = editor.injector.get(TheContextService);
3109
- var imageNodes = [];
3110
- var text = { text: '' };
3111
- try {
3112
- for (var imageFiles_1 = __values(imageFiles), imageFiles_1_1 = imageFiles_1.next(); !imageFiles_1_1.done; imageFiles_1_1 = imageFiles_1.next()) {
3113
- var image = imageFiles_1_1.value;
3114
- var verify = ImageEditor.verifyImage(editor, image);
3115
- if (verify) {
3116
- var url = URL.createObjectURL(image);
3117
- contextService.setUploadFileList({
3118
- url: url,
3119
- file: image
3120
- });
3121
- imageNodes.push({ type: exports.ElementKinds.image, url: url, children: [text] });
3122
- }
3123
- }
3124
- }
3125
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
3126
- finally {
3127
- try {
3128
- if (imageFiles_1_1 && !imageFiles_1_1.done && (_a = imageFiles_1.return)) _a.call(imageFiles_1);
3129
- }
3130
- finally { if (e_1) throw e_1.error; }
3131
- }
3132
- if (imageNodes.length > 0) {
3133
- var at = editor.selection;
3134
- slate.Transforms.insertNodes(editor, imageNodes, { at: at });
3135
- if (isCollapsed(editor.selection) && isEmptyParagraph(editor)) {
3136
- slate.Transforms.removeNodes(editor, { at: at });
3137
- slate.Transforms.select(editor, at);
3138
- }
3139
- }
3140
- },
3141
- verifyImage: function (editor, image) {
3142
- if (!PICTURE_ACCEPTED_UPLOAD_MIME.includes(image.type)) {
3143
- editor.onError({
3144
- code: exports.ErrorCodes.IMAGE_ERR_MIME_FORMAT
3145
- });
3146
- return false;
3147
- }
3148
- if (image.size / 1000000 >= PICTURE_ACCEPTED_UPLOAD_SIZE) {
3149
- editor.onError({
3150
- code: exports.ErrorCodes.IMAGE_ERR_SIZE_LIMIT
3151
- });
3152
- return false;
3153
- }
3154
- return true;
3155
- },
3156
- isImageActive: function (editor) {
3157
- var _a = __read(slate.Editor.nodes(editor, {
3158
- match: function (n) { return slate.Element.isElement(n) && n.type === exports.ElementKinds.image; },
3159
- universal: true
3160
- }), 1), match = _a[0];
3161
- return !!match;
3162
- }
3163
- };
3164
-
3165
3374
  var withImage = function (editor) {
3166
3375
  var insertData = editor.insertData, isVoid = editor.isVoid, renderElement = editor.renderElement, isBlockCard = editor.isBlockCard;
3167
3376
  editor.isVoid = function (element) {
@@ -4309,7 +4518,7 @@
4309
4518
  return TheHrComponent;
4310
4519
  }(TheBaseElementComponent));
4311
4520
  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 });
4312
- 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"] }] });
4521
+ 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: i10__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
4313
4522
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheHrComponent, decorators: [{
4314
4523
  type: i0.Component,
4315
4524
  args: [{
@@ -6237,6 +6446,14 @@
6237
6446
  }
6238
6447
  return false;
6239
6448
  },
6449
+ isDisabled: function (editor) {
6450
+ if (editor.selection) {
6451
+ var disableGroup = [exports.ElementKinds.image];
6452
+ var anchorBlock$1 = anchorBlock(editor);
6453
+ return anchorBlock$1 && disableGroup.includes(anchorBlock$1 === null || anchorBlock$1 === void 0 ? void 0 : anchorBlock$1.type);
6454
+ }
6455
+ return false;
6456
+ },
6240
6457
  setAlign: function (editor, alignment) {
6241
6458
  if (TableEditor.setAlign(editor, alignment)) {
6242
6459
  return;
@@ -6258,7 +6475,8 @@
6258
6475
  dropdownMode: exports.DropdownMode.icon,
6259
6476
  dropdownItemKey: exports.ToolbarActionTypes.alignLeft,
6260
6477
  includes: [exports.ToolbarActionTypes.alignLeft, exports.ToolbarActionTypes.alignCenter, exports.ToolbarActionTypes.alignRight],
6261
- name: '对齐方式'
6478
+ name: '对齐方式',
6479
+ disable: function (editor) { return AlignEditor.isDisabled(editor); }
6262
6480
  },
6263
6481
  {
6264
6482
  key: exports.ToolbarActionTypes.alignLeft,
@@ -6492,7 +6710,7 @@
6492
6710
  return TheColorSelectComponent;
6493
6711
  }());
6494
6712
  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 });
6495
- 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 });
6713
+ 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.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }], directives: [{ type: i10__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i10__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i10__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i10__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4__namespace$1.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$1.ThyInputDirective, selector: "[thyInput]", inputs: ["thySize", "thyAutocomplete"] }, { type: i4__namespace$1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { type: i4__namespace$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4__namespace$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
6496
6714
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheColorSelectComponent, decorators: [{
6497
6715
  type: i0.Component,
6498
6716
  args: [{
@@ -6700,7 +6918,7 @@
6700
6918
  return TheColorToolbarItemComponent;
6701
6919
  }(TheToolbarBaseItemComponent));
6702
6920
  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 });
6703
- 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"] }] });
6921
+ 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.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }], directives: [{ type: i10__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i5__namespace.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { type: i10__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
6704
6922
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheColorToolbarItemComponent, decorators: [{
6705
6923
  type: i0.Component,
6706
6924
  args: [{
@@ -6971,7 +7189,7 @@
6971
7189
  return TheToolbarDropdownComponent;
6972
7190
  }(TheToolbarBaseItemComponent));
6973
7191
  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 });
6974
- 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]" }] });
7192
+ 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.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: i10__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i5__namespace.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { type: i10__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i10__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: i10__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i5__namespace$2.ThyActionMenuItemIconDirective, selector: "[thyActionMenuItemIcon]" }, { type: i5__namespace$2.ThyActionMenuItemNameDirective, selector: "[thyActionMenuItemName]" }] });
6975
7193
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheToolbarDropdownComponent, decorators: [{
6976
7194
  type: i0.Component,
6977
7195
  args: [{
@@ -7011,49 +7229,6 @@
7011
7229
  args: ['class.disabled']
7012
7230
  }] } });
7013
7231
 
7014
- var NavSplitLineComponent = /** @class */ (function () {
7015
- function NavSplitLineComponent() {
7016
- this.mode = exports.ToolbarItemMode.vertical;
7017
- this.theNavSplitLine = true;
7018
- }
7019
- Object.defineProperty(NavSplitLineComponent.prototype, "horizontal", {
7020
- get: function () {
7021
- return this.mode === exports.ToolbarItemMode.horizontal;
7022
- },
7023
- enumerable: false,
7024
- configurable: true
7025
- });
7026
- Object.defineProperty(NavSplitLineComponent.prototype, "vertical", {
7027
- get: function () {
7028
- return this.mode === exports.ToolbarItemMode.vertical;
7029
- },
7030
- enumerable: false,
7031
- configurable: true
7032
- });
7033
- NavSplitLineComponent.prototype.ngOnInit = function () { };
7034
- return NavSplitLineComponent;
7035
- }());
7036
- NavSplitLineComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: NavSplitLineComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
7037
- 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 });
7038
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: NavSplitLineComponent, decorators: [{
7039
- type: i0.Component,
7040
- args: [{
7041
- selector: 'nav-split-line',
7042
- template: ''
7043
- }]
7044
- }], ctorParameters: function () { return []; }, propDecorators: { mode: [{
7045
- type: i0.Input
7046
- }], theNavSplitLine: [{
7047
- type: i0.HostBinding,
7048
- args: ['class.the-nav-split-line']
7049
- }], horizontal: [{
7050
- type: i0.HostBinding,
7051
- args: ['class.horizontal']
7052
- }], vertical: [{
7053
- type: i0.HostBinding,
7054
- args: ['class.vertical']
7055
- }] } });
7056
-
7057
7232
  var TheCodeComponent = /** @class */ (function (_super) {
7058
7233
  __extends(TheCodeComponent, _super);
7059
7234
  function TheCodeComponent(elementRef, cdr, thyNotifyService, contextService, ngZone, config) {
@@ -7268,7 +7443,7 @@
7268
7443
  return TheCodeComponent;
7269
7444
  }(TheBaseElementComponent));
7270
7445
  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 });
7271
- 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 });
7446
+ 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: i10__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5__namespace.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { type: i4__namespace$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4__namespace$1.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: i10__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i10__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
7272
7447
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheCodeComponent, decorators: [{
7273
7448
  type: i0.Component,
7274
7449
  args: [{
@@ -7497,7 +7672,7 @@
7497
7672
  return TheLinkEditComponent;
7498
7673
  }());
7499
7674
  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 });
7500
- 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"] }] });
7675
+ 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$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i4__namespace$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i4__namespace$1.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$1.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$1.ThyInputDirective, selector: "[thyInput]", inputs: ["thySize", "thyAutocomplete"] }, { type: i4__namespace$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i4__namespace$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4__namespace$1.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"] }] });
7501
7676
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheLinkEditComponent, decorators: [{
7502
7677
  type: i0.Component,
7503
7678
  args: [{
@@ -7788,7 +7963,7 @@
7788
7963
  return TheTableSelectComponent;
7789
7964
  }());
7790
7965
  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 });
7791
- 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"] }] });
7966
+ 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: i10__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i10__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
7792
7967
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheTableSelectComponent, decorators: [{
7793
7968
  type: i0.Component,
7794
7969
  args: [{
@@ -7857,7 +8032,7 @@
7857
8032
  return TheTableToolbarItemComponent;
7858
8033
  }(TheToolbarBaseItemComponent));
7859
8034
  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 });
7860
- 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"] }] });
8035
+ 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.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }], directives: [{ type: i5__namespace.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }] });
7861
8036
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheTableToolbarItemComponent, decorators: [{
7862
8037
  type: i0.Component,
7863
8038
  args: [{
@@ -8633,6 +8808,43 @@
8633
8808
  });
8634
8809
  return matchClass;
8635
8810
  }
8811
+ function findRelativeElementByPoint(editor, x, y, mode) {
8812
+ var editableElement = i1.EDITOR_TO_ELEMENT.get(editor);
8813
+ var rectEditable = editableElement.getBoundingClientRect();
8814
+ if (x > rectEditable.x && x < rectEditable.x + rectEditable.width) {
8815
+ var centerX = rectEditable.x + rectEditable.width / 2;
8816
+ var relativeElement = document.elementFromPoint(mode === 'highest' ? centerX : x, y);
8817
+ return relativeElement;
8818
+ }
8819
+ return null;
8820
+ }
8821
+ function findNodeEntryByPoint(editor, x, y, mode) {
8822
+ var editableElement = i1.EDITOR_TO_ELEMENT.get(editor);
8823
+ var rootElement = null;
8824
+ var relativeElement = findRelativeElementByPoint(editor, x, y, mode);
8825
+ // 获取最顶层的DOM
8826
+ if (mode === 'highest') {
8827
+ while (relativeElement && editableElement.contains(relativeElement)) {
8828
+ relativeElement = relativeElement.closest('[data-slate-node="element"]');
8829
+ if (relativeElement) {
8830
+ rootElement = relativeElement;
8831
+ relativeElement = relativeElement.parentElement;
8832
+ }
8833
+ }
8834
+ }
8835
+ if (!mode) {
8836
+ if (relativeElement && editableElement.contains(relativeElement)) {
8837
+ relativeElement = relativeElement.closest('[data-slate-node="element"]');
8838
+ rootElement = relativeElement;
8839
+ }
8840
+ }
8841
+ if (rootElement) {
8842
+ var node = i1.AngularEditor.toSlateNode(editor, rootElement);
8843
+ var path = i1.AngularEditor.findPath(editor, node);
8844
+ return [node, path];
8845
+ }
8846
+ return null;
8847
+ }
8636
8848
 
8637
8849
  function splitCell(editor) {
8638
8850
  var opts = new TableOptions$1();
@@ -8796,7 +9008,7 @@
8796
9008
  return TheTableToolbarComponent;
8797
9009
  }());
8798
9010
  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 });
8799
- 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"] }] });
9011
+ 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.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { type: NavSplitLineComponent, selector: "nav-split-line", inputs: ["mode"] }], directives: [{ type: i10__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i10__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5__namespace.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }] });
8800
9012
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheTableToolbarComponent, decorators: [{
8801
9013
  type: i0.Component,
8802
9014
  args: [{
@@ -8860,7 +9072,7 @@
8860
9072
  return TheContextMenuComponent;
8861
9073
  }());
8862
9074
  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 });
8863
- 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]" }] });
9075
+ 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.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: i10__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i10__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]" }] });
8864
9076
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheContextMenuComponent, decorators: [{
8865
9077
  type: i0.Component,
8866
9078
  args: [{
@@ -9263,7 +9475,7 @@
9263
9475
  return TheInsertMarkComponent;
9264
9476
  }());
9265
9477
  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 });
9266
- 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"] }] });
9478
+ 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.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { type: i10__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i10__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i10__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
9267
9479
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheInsertMarkComponent, decorators: [{
9268
9480
  type: i0.Component,
9269
9481
  args: [{
@@ -9779,7 +9991,7 @@
9779
9991
  provide: TheTableToken,
9780
9992
  useExisting: TheTableComponent
9781
9993
  }
9782
- ], 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"] }] });
9994
+ ], 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: i10__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i10__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i10__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i10__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
9783
9995
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheTableComponent, decorators: [{
9784
9996
  type: i0.Component,
9785
9997
  args: [{
@@ -10213,7 +10425,7 @@
10213
10425
  };
10214
10426
  return TheColumnResizeOverlayHandleComponent;
10215
10427
  }());
10216
- 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 });
10428
+ 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: i10.DOCUMENT }, { token: ColumnResizeNotifierSource }], target: i0__namespace.ɵɵFactoryTarget.Component });
10217
10429
  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 });
10218
10430
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheColumnResizeOverlayHandleComponent, decorators: [{
10219
10431
  type: i0.Component,
@@ -10225,7 +10437,7 @@
10225
10437
  }], ctorParameters: function () {
10226
10438
  return [{ type: i0__namespace.ElementRef }, { type: i0__namespace.ViewContainerRef }, { type: i0__namespace.ChangeDetectorRef }, { type: i0__namespace.NgZone }, { type: ResizeRef }, { type: TableCellEventDispatcher }, { type: undefined, decorators: [{
10227
10439
  type: i0.Inject,
10228
- args: [i6.DOCUMENT]
10440
+ args: [i10.DOCUMENT]
10229
10441
  }] }, { type: ColumnResizeNotifierSource }];
10230
10442
  } });
10231
10443
 
@@ -11531,7 +11743,7 @@
11531
11743
  return TheVerticalToolbarItemComponent;
11532
11744
  }(TheToolbarBaseItemComponent));
11533
11745
  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 });
11534
- 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 (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.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5__namespace$2.ThyActionMenuItemIconDirective, selector: "[thyActionMenuItemIcon]" }, { type: i5__namespace$2.ThyActionMenuItemNameDirective, selector: "[thyActionMenuItemName]" }] });
11746
+ 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 (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.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.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { type: i10__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: i10__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5__namespace$2.ThyActionMenuItemIconDirective, selector: "[thyActionMenuItemIcon]" }, { type: i5__namespace$2.ThyActionMenuItemNameDirective, selector: "[thyActionMenuItemName]" }] });
11535
11747
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheVerticalToolbarItemComponent, decorators: [{
11536
11748
  type: i0.Component,
11537
11749
  args: [{
@@ -11776,7 +11988,7 @@
11776
11988
  return TheToolbarItemComponent;
11777
11989
  }(TheToolbarBaseItemComponent));
11778
11990
  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 });
11779
- TheToolbarItemComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheToolbarItemComponent, selector: "the-toolbar-item", inputs: { editor: "editor", item: "item", 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"] }] });
11991
+ TheToolbarItemComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheToolbarItemComponent, selector: "the-toolbar-item", inputs: { editor: "editor", item: "item", 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.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }], directives: [{ type: i10__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5__namespace.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }] });
11780
11992
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheToolbarItemComponent, decorators: [{
11781
11993
  type: i0.Component,
11782
11994
  args: [{
@@ -11852,7 +12064,7 @@
11852
12064
  return TheQuickToolbarComponent;
11853
12065
  }(core.mixinUnsubscribe(core.MixinBase)));
11854
12066
  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 });
11855
- 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()", "document: keydown.escape": "handleEsc()" } }, 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: ["editor", "item", "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"] }] });
12067
+ 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()", "document: keydown.escape": "handleEsc()" } }, 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: ["editor", "item", "itemMode"] }, { type: NavSplitLineComponent, selector: "nav-split-line", inputs: ["mode"] }], directives: [{ type: i10__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i10__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
11856
12068
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheQuickToolbarComponent, decorators: [{
11857
12069
  type: i0.Component,
11858
12070
  args: [{
@@ -12229,7 +12441,7 @@
12229
12441
  return TheIndentToolbarComponent;
12230
12442
  }(TheToolbarBaseItemComponent));
12231
12443
  TheIndentToolbarComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheIndentToolbarComponent, deps: [{ token: i0__namespace.ElementRef }, { token: i1__namespace$3.ThyPopover }, { token: i0__namespace.ViewContainerRef }, { token: i2__namespace.Overlay }], target: i0__namespace.ɵɵFactoryTarget.Component });
12232
- TheIndentToolbarComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheIndentToolbarComponent, selector: "the-indent-toolbar-item", inputs: { toolbarItem: "toolbarItem", menus: "menus", mode: "mode", item: "item" }, host: { listeners: { "mousedown": "toggleDropdown($event)", "document: mousedown": "handleDocumentMouseDown($event)" }, properties: { "class.disabled": "this.disabledState" }, classAttribute: "the-toolbar-dropdown-container" }, viewQueries: [{ propertyName: "dropdownTemplate", first: true, predicate: ["dropdownTemplate"], descendants: true, static: true }], usesInheritance: true, ngImport: i0__namespace, template: "<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\n<ng-template #dropdownTemplate>\n <thy-action-menu class=\"dropdown-menu\">\n <ng-container *ngFor=\"let menu of menus\">\n <a\n thyActionMenuItem\n href=\"javascript:;\"\n [thyTooltip]=\"tooltip\"\n [thyTooltipTemplateContext]=\"{ name: menu.name, shortcutKey: menu.shortcutKey }\"\n thyTooltipPlacement=\"right\"\n (mousedown)=\"itemMousedown($event, menu)\"\n >\n <span 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\n<ng-template #tooltip let-data>{{ data?.shortcutKey }}</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.ThyActionMenuItemIconDirective, selector: "[thyActionMenuItemIcon]" }, { type: i5__namespace$2.ThyActionMenuItemNameDirective, selector: "[thyActionMenuItemName]" }] });
12444
+ TheIndentToolbarComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheIndentToolbarComponent, selector: "the-indent-toolbar-item", inputs: { toolbarItem: "toolbarItem", menus: "menus", mode: "mode", item: "item" }, host: { listeners: { "mousedown": "toggleDropdown($event)", "document: mousedown": "handleDocumentMouseDown($event)" }, properties: { "class.disabled": "this.disabledState" }, classAttribute: "the-toolbar-dropdown-container" }, viewQueries: [{ propertyName: "dropdownTemplate", first: true, predicate: ["dropdownTemplate"], descendants: true, static: true }], usesInheritance: true, ngImport: i0__namespace, template: "<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\n<ng-template #dropdownTemplate>\n <thy-action-menu class=\"dropdown-menu\">\n <ng-container *ngFor=\"let menu of menus\">\n <a\n thyActionMenuItem\n href=\"javascript:;\"\n [thyTooltip]=\"tooltip\"\n [thyTooltipTemplateContext]=\"{ name: menu.name, shortcutKey: menu.shortcutKey }\"\n thyTooltipPlacement=\"right\"\n (mousedown)=\"itemMousedown($event, menu)\"\n >\n <span 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\n<ng-template #tooltip let-data>{{ data?.shortcutKey }}</ng-template>\n", components: [{ type: i3__namespace.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i4__namespace.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.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { type: i10__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i5__namespace$2.ThyActionMenuItemDirective, selector: "[thyActionMenuItem]", inputs: ["thyDisabled", "thyType"] }, { type: i5__namespace$2.ThyActionMenuItemIconDirective, selector: "[thyActionMenuItemIcon]" }, { type: i5__namespace$2.ThyActionMenuItemNameDirective, selector: "[thyActionMenuItemName]" }] });
12233
12445
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheIndentToolbarComponent, decorators: [{
12234
12446
  type: i0.Component,
12235
12447
  args: [{
@@ -12881,7 +13093,7 @@
12881
13093
  return TheToolbarComponent;
12882
13094
  }());
12883
13095
  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.ChangeDetectorRef }, { token: i0__namespace.ElementRef }, { token: i0__namespace.NgZone }, { token: TheToolbarGroupToken }], target: i0__namespace.ɵɵFactoryTarget.Component });
12884
- 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"] }] });
13096
+ 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: i10__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i10__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }] });
12885
13097
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheToolbarComponent, decorators: [{
12886
13098
  type: i0.Component,
12887
13099
  args: [{
@@ -13060,7 +13272,7 @@
13060
13272
  TheQuickInsertComponent.prototype.checkStatus = function () {
13061
13273
  var _a;
13062
13274
  var editor = this.editor;
13063
- if (this.isVisible && isCleanEmptyParagraph(editor) && !this.hasExcludeAttribute()) {
13275
+ if (this.isVisible && isCleanEmptyParagraph(editor) && !this.hasExcludeAttribute() && !this.isRichMediaScope()) {
13064
13276
  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]]);
13065
13277
  var rootNode = i1.AngularEditor.toDOMNode(editor, block);
13066
13278
  this.updatePosition(rootNode.offsetLeft, rootNode.offsetTop);
@@ -13068,6 +13280,17 @@
13068
13280
  }
13069
13281
  this.isHide = true;
13070
13282
  };
13283
+ TheQuickInsertComponent.prototype.isRichMediaScope = function () {
13284
+ var _a;
13285
+ var editor = this.editor;
13286
+ if (editor === null || editor === void 0 ? void 0 : editor.selection) {
13287
+ 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]]);
13288
+ var rootNode = i1.AngularEditor.toDOMNode(editor, block);
13289
+ var firstElementChild = rootNode.firstElementChild;
13290
+ return (firstElementChild === null || firstElementChild === void 0 ? void 0 : firstElementChild.offsetLeft) > 0;
13291
+ }
13292
+ return false;
13293
+ };
13071
13294
  TheQuickInsertComponent.prototype.hasExcludeAttribute = function () {
13072
13295
  var marks = getSelectionMarks(this.editor);
13073
13296
  var fontSizeMark = marks[exports.MarkTypes.fontSize];
@@ -13094,7 +13317,7 @@
13094
13317
  return TheQuickInsertComponent;
13095
13318
  }());
13096
13319
  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 });
13097
- 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"] }] });
13320
+ 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.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }] });
13098
13321
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheQuickInsertComponent, decorators: [{
13099
13322
  type: i0.Component,
13100
13323
  args: [{
@@ -13119,6 +13342,359 @@
13119
13342
  args: ['mousedown', ['$event']]
13120
13343
  }] } });
13121
13344
 
13345
+ var getCurrentTarget = function (editor, event) {
13346
+ var editorElement = i1.EDITOR_TO_ELEMENT.get(editor);
13347
+ var _a = editorElement.getBoundingClientRect(), left = _a.left, right = _a.right;
13348
+ var _b = window.getComputedStyle(editorElement, null), paddingLeft = _b.paddingLeft, paddingRight = _b.paddingRight;
13349
+ var paddingLeftPixels = coercePixelsFromCssValue(paddingLeft);
13350
+ var paddingRightPixels = coercePixelsFromCssValue(paddingRight);
13351
+ var x = event.x;
13352
+ if (event.x <= left + paddingLeftPixels || event.x >= right - paddingRightPixels) {
13353
+ x = left + paddingLeftPixels;
13354
+ }
13355
+ var nodeEntry = findNodeEntryByPoint(editor, x, event.y);
13356
+ if (nodeEntry) {
13357
+ return TheEditor.toDOMNode(editor, nodeEntry[0]);
13358
+ }
13359
+ };
13360
+
13361
+ var getHoverDirection = function (editor, event) {
13362
+ var rootNode = getCurrentTarget(editor, event);
13363
+ if (rootNode) {
13364
+ var _a = rootNode.getBoundingClientRect(), top = _a.top, bottom = _a.bottom;
13365
+ var middleHeight = (bottom - top) / 2;
13366
+ if (top + middleHeight > event.clientY) {
13367
+ return 'top';
13368
+ }
13369
+ return 'bottom';
13370
+ }
13371
+ };
13372
+
13373
+ var removeDropThumbLine = function (editor) {
13374
+ var element = i1.EDITOR_TO_ELEMENT.get(editor);
13375
+ var dropThumbLine = element.querySelector('.' + DROP_THUMB_LINE);
13376
+ if (dropThumbLine) {
13377
+ dropThumbLine.remove();
13378
+ }
13379
+ };
13380
+
13381
+ var moveDragNode = function (editor, dragNode, event) {
13382
+ event.stopPropagation();
13383
+ var element = i1.EDITOR_TO_ELEMENT.get(editor);
13384
+ var dropThumbLine = element.querySelector('.' + DROP_THUMB_LINE);
13385
+ var parentElement = dropThumbLine && dropThumbLine.parentNode;
13386
+ if (parentElement) {
13387
+ var node = TheEditor.toSlateNode(editor, parentElement);
13388
+ var dropPath_1 = node && TheEditor.findPath(editor, node);
13389
+ if (dropPath_1.length) {
13390
+ var dragPath_1 = dragNode.path;
13391
+ var before = slate.Path.isBefore(dragPath_1, dropPath_1) && slate.Path.isSibling(dragPath_1, dropPath_1);
13392
+ dropPath_1 = before ? dropPath_1 : slate.Path.next(dropPath_1);
13393
+ if (dropPath_1.length) {
13394
+ slate.Editor.withoutNormalizing(editor, function () {
13395
+ slate.Transforms.moveNodes(editor, {
13396
+ at: dragPath_1,
13397
+ to: dropPath_1
13398
+ });
13399
+ });
13400
+ }
13401
+ }
13402
+ }
13403
+ removeDropThumbLine(editor);
13404
+ };
13405
+
13406
+ var isValidDrag = function (editor, dragNode, currentTarget) {
13407
+ var _a;
13408
+ var node = TheEditor.toSlateNode(editor, currentTarget);
13409
+ var dropPath = TheEditor.findPath(editor, node);
13410
+ var dragPath = TheEditor.findPath(editor, dragNode);
13411
+ if (dragPath[0] === dropPath[0] && dropPath.length > 1) {
13412
+ // 阻止list元素拖入自身
13413
+ return false;
13414
+ }
13415
+ var allElementOptions = DefaultElementOptions;
13416
+ if ((_a = editor.extraElementOptions) === null || _a === void 0 ? void 0 : _a.length) {
13417
+ var extraInfo = mergeElementOptions(editor.extraElementOptions);
13418
+ allElementOptions = Object.values(extraInfo);
13419
+ }
13420
+ var types = allElementOptions.map(function (item) { return item.type; });
13421
+ if (types.indexOf(node.type) > -1 && allElementOptions[types.indexOf(node.type)].isSecondaryContainer) {
13422
+ // 阻止向table-celld等二级容器中拖入
13423
+ return false;
13424
+ }
13425
+ var containerParent = slate.Editor.above(editor, {
13426
+ at: dropPath,
13427
+ mode: 'lowest',
13428
+ match: function (node) {
13429
+ return node && node.type && types.includes(node.type);
13430
+ }
13431
+ });
13432
+ if (containerParent) {
13433
+ var inValidChildrenTypes = allElementOptions.find(function (item) { return item.type === containerParent[0].type; }).inValidChildrenTypes;
13434
+ if (inValidChildrenTypes.includes(dragNode.type)) {
13435
+ return false;
13436
+ }
13437
+ }
13438
+ return true;
13439
+ };
13440
+
13441
+ var SNAPSHOT_PADDING_WIDTH = 5;
13442
+ var SNAPSHOT_LIMI_HEIGHT = 70;
13443
+ var DRAG_ICON_SIZE = 24;
13444
+ var DRAG_ICON_OFFSET = 5;
13445
+ var TheDndComponent = /** @class */ (function () {
13446
+ function TheDndComponent(renderer, elementRef, ngZone, cdr) {
13447
+ this.renderer = renderer;
13448
+ this.elementRef = elementRef;
13449
+ this.ngZone = ngZone;
13450
+ this.cdr = cdr;
13451
+ this.isDraging = false;
13452
+ this.destroy$ = new rxjs.Subject();
13453
+ this.dragChange = new i0.EventEmitter();
13454
+ this.dropThumbLine = document.createElement('div');
13455
+ this.dropThumbLine.className = DROP_THUMB_LINE;
13456
+ }
13457
+ Object.defineProperty(TheDndComponent.prototype, "nativeElement", {
13458
+ get: function () {
13459
+ return this.elementRef.nativeElement;
13460
+ },
13461
+ enumerable: false,
13462
+ configurable: true
13463
+ });
13464
+ Object.defineProperty(TheDndComponent.prototype, "editableElement", {
13465
+ get: function () {
13466
+ return this.editor && i1.EDITOR_TO_ELEMENT.get(this.editor);
13467
+ },
13468
+ enumerable: false,
13469
+ configurable: true
13470
+ });
13471
+ TheDndComponent.prototype.ngAfterViewInit = function () {
13472
+ var _this = this;
13473
+ var contextService = this.editor.injector.get(TheContextService);
13474
+ this.ngZone.runOutsideAngular(function () {
13475
+ rxjs.merge(rxjs.fromEvent(_this.editableElement, "mousemove"), rxjs.fromEvent(_this.editableElement, "mouseleave"))
13476
+ .pipe(operators.takeUntil(_this.destroy$), operators.filter(function () {
13477
+ return !contextService.getOptions().theOptions.readonly && contextService.getOptions().theOptions.dragAndDrop;
13478
+ }))
13479
+ .subscribe(function (e) { return _this.setDragIcon(e); });
13480
+ rxjs.fromEvent(document, "drop")
13481
+ .pipe(operators.takeUntil(_this.destroy$), operators.filter(function () {
13482
+ return !contextService.getOptions().theOptions.readonly && contextService.getOptions().theOptions.dragAndDrop;
13483
+ }))
13484
+ .subscribe(function (e) { return _this.onDrop(e); });
13485
+ rxjs.fromEvent(document, "dragover")
13486
+ .pipe(operators.takeUntil(_this.destroy$), operators.filter(function () {
13487
+ return !contextService.getOptions().theOptions.readonly && contextService.getOptions().theOptions.dragAndDrop;
13488
+ }))
13489
+ .subscribe(function (e) { return _this.onDragover(e); });
13490
+ rxjs.fromEvent(document, "scroll")
13491
+ .pipe(operators.takeUntil(_this.destroy$), operators.filter(function () {
13492
+ return !contextService.getOptions().theOptions.readonly && contextService.getOptions().theOptions.dragAndDrop;
13493
+ }))
13494
+ .subscribe(function (e) {
13495
+ e.preventDefault();
13496
+ var scrollPosition = window.scrollY;
13497
+ if (!_this.isScrolling && _this.isDraging) {
13498
+ window.requestAnimationFrame(function () {
13499
+ if (_this.editableTop) {
13500
+ // 滚动过程中,通过设置父级元素来设置snapshot位置
13501
+ _this.updateDndContainerPosition(null, scrollPosition + _this.editableTop + 'px');
13502
+ }
13503
+ _this.isScrolling = false;
13504
+ });
13505
+ _this.isScrolling = true;
13506
+ }
13507
+ });
13508
+ });
13509
+ this.setVisibility(false);
13510
+ this.valueChangeHandle();
13511
+ };
13512
+ TheDndComponent.prototype.valueChangeHandle = function () {
13513
+ var _this = this;
13514
+ var onChange = this.editor.onChange;
13515
+ this.editor.onChange = function () {
13516
+ var ops = _this.editor.operations;
13517
+ var skip = ops.length === 1 && slate.Operation.isSelectionOperation(ops[0]);
13518
+ if (!skip) {
13519
+ _this.setVisibility(false);
13520
+ }
13521
+ onChange();
13522
+ };
13523
+ };
13524
+ TheDndComponent.prototype.updateDndContainerPosition = function (left, top) {
13525
+ var element = this.elementRef.nativeElement;
13526
+ var parentElement = element.parentElement;
13527
+ top && this.renderer.setStyle(parentElement, 'top', top);
13528
+ left && this.renderer.setStyle(parentElement, 'left', left);
13529
+ };
13530
+ TheDndComponent.prototype.getEditableTop = function (event) {
13531
+ var offsetHeight = document.documentElement.offsetHeight;
13532
+ var height = this.editableElement.getBoundingClientRect().height;
13533
+ if (event.clientY < this.dragElementHeight) {
13534
+ this.editableTop = -this.editableElement.offsetTop;
13535
+ return;
13536
+ }
13537
+ if (height > event.pageY && event.clientY + this.dragElementHeight >= offsetHeight) {
13538
+ this.editableTop = event.clientY - this.editableElement.offsetTop;
13539
+ return;
13540
+ }
13541
+ this.editableTop = null;
13542
+ };
13543
+ TheDndComponent.prototype.onDragStart = function (event) {
13544
+ this.isDraging = true;
13545
+ this.dragChange.emit(this.isDraging);
13546
+ this.dragSnapshotContent = document.querySelector('.drag-snapshot-container');
13547
+ this.dragSnapshotContent.className = 'the-editor-typo drag-snapshot-container';
13548
+ this.dragSnapshotContent.appendChild(this.dragElement.cloneNode(true));
13549
+ this.dragElement.style.opacity = '0.3';
13550
+ };
13551
+ TheDndComponent.prototype.onDragEnd = function (event) {
13552
+ this.dragElement.style.opacity = '';
13553
+ this.isDraging = false;
13554
+ this.setVisibility(false);
13555
+ this.resetDragSnapshotContent();
13556
+ this.dragChange.emit(this.isDraging);
13557
+ };
13558
+ TheDndComponent.prototype.onDrop = function (event) {
13559
+ event.preventDefault();
13560
+ if (this.isDraging) {
13561
+ moveDragNode(this.editor, this.dragNode, event);
13562
+ }
13563
+ };
13564
+ TheDndComponent.prototype.onDragover = function (event) {
13565
+ event.preventDefault();
13566
+ if (this.isDraging && !this.isScrolling) {
13567
+ this.getEditableTop(event);
13568
+ var offsetWidth = document.documentElement.offsetWidth;
13569
+ var _b = this.editableElement.getBoundingClientRect(), editorLeft = _b.left, editorTop = _b.top, height = _b.height;
13570
+ var top = 0;
13571
+ var left = 0;
13572
+ if (editorLeft > 0) {
13573
+ if (event.clientX + this.dragElementWidth / 2 > offsetWidth) {
13574
+ left = event.pageX - editorLeft - this.elementRef.nativeElement.offsetWidth;
13575
+ }
13576
+ else {
13577
+ left = Math.max(event.pageX - editorLeft, -editorLeft) + 10;
13578
+ }
13579
+ }
13580
+ var paddingTop = 0; // paddingTop: 编辑器距离顶部的距离
13581
+ if (editorTop >= 0) {
13582
+ // 无滚动情况下
13583
+ top = event.clientY - this.editableElement.offsetTop;
13584
+ paddingTop = editorTop - this.editableElement.offsetTop;
13585
+ }
13586
+ else {
13587
+ // 有滚动距离
13588
+ top = Math.abs(editorTop) + event.clientY; // 滚动距离 + 鼠标clientY
13589
+ paddingTop = event.pageY - this.editableElement.offsetTop - top;
13590
+ // 防止底部出现滚动条
13591
+ if (paddingTop < height - top) {
13592
+ top = top + paddingTop;
13593
+ }
13594
+ }
13595
+ this.updateDndContainerPosition(left + 'px', top + 'px');
13596
+ this.setSnapshotStyle(event);
13597
+ this.setDropThumbLine(event);
13598
+ }
13599
+ };
13600
+ TheDndComponent.prototype.setDropThumbLine = function (event) {
13601
+ var _a;
13602
+ var element = getCurrentTarget(this.editor, event);
13603
+ var direction = getHoverDirection(this.editor, event);
13604
+ if (element) {
13605
+ if (direction && direction === 'top') {
13606
+ element = (_a = element.previousElementSibling) === null || _a === void 0 ? void 0 : _a.querySelector('[data-slate-node="element"]');
13607
+ }
13608
+ if (element && isValidDrag(this.editor, this.dragNode.node, element)) {
13609
+ element.appendChild(this.dropThumbLine);
13610
+ }
13611
+ }
13612
+ };
13613
+ TheDndComponent.prototype.setDragIcon = function (event) {
13614
+ if (!this.isDraging) {
13615
+ var nodeEntry = findNodeEntryByPoint(this.editor, event.x, event.y, 'highest');
13616
+ if (nodeEntry && !slate.Editor.isEmpty(this.editor, nodeEntry[0])) {
13617
+ var rootNode = i1.AngularEditor.toDOMNode(this.editor, nodeEntry[0]);
13618
+ this.dragNode = {
13619
+ node: nodeEntry[0],
13620
+ path: nodeEntry[1]
13621
+ };
13622
+ this.dragElement = rootNode;
13623
+ var lineHeight = coercePixelsFromCssValue(window.getComputedStyle(rootNode)['lineHeight']);
13624
+ var offsetTop = rootNode.offsetTop + rootNode.offsetParent.offsetTop + (lineHeight - DRAG_ICON_SIZE) / 2;
13625
+ var offsetLeft = rootNode.offsetLeft + rootNode.offsetParent.offsetLeft;
13626
+ this.updateDndContainerPosition(offsetLeft - DRAG_ICON_SIZE - DRAG_ICON_OFFSET + 'px', offsetTop + 'px');
13627
+ this.setVisibility(true);
13628
+ }
13629
+ else {
13630
+ this.setVisibility(false);
13631
+ }
13632
+ }
13633
+ };
13634
+ TheDndComponent.prototype.setSnapshotStyle = function (event) {
13635
+ var _b = this.dragElement.getBoundingClientRect(), width = _b.width, height = _b.height;
13636
+ this.dragElementHeight = height;
13637
+ this.dragElementWidth = width;
13638
+ var dragSnapshotContentStyle = "visibility: visible; width: " + (width + SNAPSHOT_PADDING_WIDTH * 2) + "px;";
13639
+ if (height > SNAPSHOT_LIMI_HEIGHT) {
13640
+ dragSnapshotContentStyle = dragSnapshotContentStyle + 'transform: scale(0.45);';
13641
+ this.dragElementHeight = this.dragElementHeight * 0.45;
13642
+ this.dragElementWidth = this.dragElementWidth * 0.45;
13643
+ }
13644
+ var snapshotTop = 0;
13645
+ var snapshotLeft = 0;
13646
+ // 上下移动:超出屏幕高度,重新设置snapshot的位置
13647
+ if (event.clientY + this.dragElementHeight > document.documentElement.offsetHeight) {
13648
+ snapshotTop = this.dragElementHeight;
13649
+ }
13650
+ else {
13651
+ snapshotTop = 0;
13652
+ }
13653
+ // 左右移动:超出屏幕宽度,重新设置snapshot的位置
13654
+ if (event.clientX + this.dragElementWidth / 2 > document.documentElement.offsetWidth) {
13655
+ snapshotLeft = this.dragElementWidth;
13656
+ }
13657
+ else {
13658
+ snapshotLeft = 0;
13659
+ }
13660
+ dragSnapshotContentStyle = dragSnapshotContentStyle + ("top: " + -snapshotTop + "px; left: " + -snapshotLeft + "px;");
13661
+ this.dragSnapshotContent.setAttribute('style', dragSnapshotContentStyle);
13662
+ };
13663
+ TheDndComponent.prototype.resetDragSnapshotContent = function () {
13664
+ this.dragSnapshotContent.className = 'drag-snapshot-container';
13665
+ this.dragSnapshotContent.setAttribute('style', '');
13666
+ this.dragSnapshotContent.innerHTML = '';
13667
+ };
13668
+ TheDndComponent.prototype.setVisibility = function (visible) {
13669
+ if (visible === void 0) { visible = true; }
13670
+ this.nativeElement.parentNode.style.visibility = visible ? 'visible' : 'hidden';
13671
+ };
13672
+ TheDndComponent.prototype.ngOnDestroy = function () {
13673
+ this.destroy$.next();
13674
+ this.destroy$.complete();
13675
+ };
13676
+ return TheDndComponent;
13677
+ }());
13678
+ TheDndComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheDndComponent, deps: [{ token: i0__namespace.Renderer2 }, { token: i0__namespace.ElementRef }, { token: i0__namespace.NgZone }, { token: i0__namespace.ChangeDetectorRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
13679
+ TheDndComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheDndComponent, selector: "[theDnd]", inputs: { editor: "editor" }, outputs: { dragChange: "dragChange" }, host: { classAttribute: "the-drag-drop" }, viewQueries: [{ propertyName: "content", first: true, predicate: ["content"], descendants: true }], ngImport: i0__namespace, template: "<div\n draggable=\"true\"\n class=\"the-drag-drop-icon\"\n [ngStyle]=\"{ opacity: isDraging ? 0 : '' }\"\n (dragstart)=\"onDragStart($event)\"\n (dragend)=\"onDragEnd($event)\"\n>\n <thy-icon thyIconName=\"drag\"> </thy-icon>\n</div>\n", components: [{ type: i4__namespace.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }], directives: [{ type: i10__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
13680
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheDndComponent, decorators: [{
13681
+ type: i0.Component,
13682
+ args: [{
13683
+ selector: '[theDnd]',
13684
+ templateUrl: './dnd.component.html',
13685
+ host: {
13686
+ class: 'the-drag-drop'
13687
+ }
13688
+ }]
13689
+ }], ctorParameters: function () { return [{ type: i0__namespace.Renderer2 }, { type: i0__namespace.ElementRef }, { type: i0__namespace.NgZone }, { type: i0__namespace.ChangeDetectorRef }]; }, propDecorators: { editor: [{
13690
+ type: i0.Input
13691
+ }], dragChange: [{
13692
+ type: i0.Output
13693
+ }], content: [{
13694
+ type: i0.ViewChild,
13695
+ args: ['content', { static: false }]
13696
+ }] } });
13697
+
13122
13698
  var ElementStylePipe = /** @class */ (function () {
13123
13699
  function ElementStylePipe() {
13124
13700
  }
@@ -13195,7 +13771,7 @@
13195
13771
  return TheTemplateComponent;
13196
13772
  }());
13197
13773
  TheTemplateComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheTemplateComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
13198
- 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 });
13774
+ 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: i10__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], pipes: { "elementStyle": ElementStylePipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
13199
13775
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheTemplateComponent, decorators: [{
13200
13776
  type: i0.Component,
13201
13777
  args: [{
@@ -13332,11 +13908,16 @@
13332
13908
  _this.onSlaDragStart = function (event) { };
13333
13909
  _this.onSlaDragOver = function (event) { };
13334
13910
  _this.onDrop = function (event) {
13335
- event.stopPropagation();
13911
+ if (_this.isDraging) {
13912
+ event.preventDefault();
13913
+ }
13336
13914
  _this.theOnDOMEvent.emit({
13337
13915
  nativeEvent: event
13338
13916
  });
13339
13917
  };
13918
+ _this.onDragChange = function (isDraging) {
13919
+ _this.isDraging = isDraging;
13920
+ };
13340
13921
  return _this;
13341
13922
  }
13342
13923
  Object.defineProperty(TheEditorComponent.prototype, "theGlobalToolbarInstance", {
@@ -13593,11 +14174,11 @@
13593
14174
  TheContextService,
13594
14175
  TheColorSelectService,
13595
14176
  {
13596
- provide: i4$2.NG_VALUE_ACCESSOR,
14177
+ provide: i4$1.NG_VALUE_ACCESSOR,
13597
14178
  useExisting: i0.forwardRef(function () { return TheEditorComponent; }),
13598
14179
  multi: true
13599
14180
  }
13600
- ], 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\n *ngIf=\"!theOptions?.readonly && theOptions?.inlineToobarVisible\"\n [editor]=\"editor\"\n [toolbarItems]=\"toolbarEntity.inline\"\n ></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 });
14181
+ ], 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\n *ngIf=\"!theOptions?.readonly && theOptions?.inlineToobarVisible\"\n [editor]=\"editor\"\n [toolbarItems]=\"toolbarEntity.inline\"\n ></the-inline-toolbar>\n <div\n #quickInsert\n theQuickInsert\n [editor]=\"editor\"\n [quickToolbarItems]=\"quickToolbarItems\"\n [isVisible]=\"theOptions?.quickInsertVisible\"\n ></div>\n <div class=\"drag-container\">\n <div #drag theDnd [editor]=\"editor\" (dragChange)=\"onDragChange($event)\"></div>\n <div class=\"drag-snapshot-container\"></div>\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: TheDndComponent, selector: "[theDnd]", inputs: ["editor"], outputs: ["dragChange"] }, { type: TheTemplateComponent, selector: "the-template,[theTemplate]" }], directives: [{ type: i10__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i10__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i10__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i4__namespace$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4__namespace$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
13601
14182
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheEditorComponent, decorators: [{
13602
14183
  type: i0.Component,
13603
14184
  args: [{
@@ -13609,7 +14190,7 @@
13609
14190
  TheContextService,
13610
14191
  TheColorSelectService,
13611
14192
  {
13612
- provide: i4$2.NG_VALUE_ACCESSOR,
14193
+ provide: i4$1.NG_VALUE_ACCESSOR,
13613
14194
  useExisting: i0.forwardRef(function () { return TheEditorComponent; }),
13614
14195
  multi: true
13615
14196
  }
@@ -13776,7 +14357,7 @@
13776
14357
  return TheToolbarGroupComponent;
13777
14358
  }());
13778
14359
  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 });
13779
- 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"] }] });
14360
+ 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.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }] });
13780
14361
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheToolbarGroupComponent, decorators: [{
13781
14362
  type: i0.Component,
13782
14363
  args: [{
@@ -13802,17 +14383,17 @@
13802
14383
  }] } });
13803
14384
 
13804
14385
  var TETHYS = [
13805
- i4$1.ThyIconModule,
14386
+ i4.ThyIconModule,
13806
14387
  avatar.ThyAvatarModule,
13807
14388
  i3.ThyNavModule,
13808
14389
  i2$1.ThyFormModule,
13809
14390
  i5$3.ThySharedModule,
13810
14391
  i2$2.ThyListModule,
13811
- i5$1.ThyTooltipModule,
13812
- i4.ThyProgressModule,
14392
+ i5.ThyTooltipModule,
14393
+ i6.ThyProgressModule,
13813
14394
  autocomplete.ThyAutocompleteModule,
13814
14395
  i5$2.ThyActionMenuModule,
13815
- i5.ThyInputModule,
14396
+ i5$1.ThyInputModule,
13816
14397
  select.ThySelectModule,
13817
14398
  i1$5.ThyButtonModule,
13818
14399
  i1$4.ThyNotifyModule,
@@ -13859,7 +14440,8 @@
13859
14440
  TheTableComponent,
13860
14441
  TheTableRowComponent,
13861
14442
  TheTdComponent,
13862
- TheInlineCodeComponent
14443
+ TheInlineCodeComponent,
14444
+ TheDndComponent
13863
14445
  ];
13864
14446
  var PIPES = [ElementStylePipe, ElementClassPipe];
13865
14447
  var TheEditorModule = /** @class */ (function () {
@@ -13903,17 +14485,18 @@
13903
14485
  TheTableComponent,
13904
14486
  TheTableRowComponent,
13905
14487
  TheTdComponent,
13906
- TheInlineCodeComponent], imports: [i6.CommonModule, i1.SlateModule, i4$2.FormsModule, i4$1.ThyIconModule,
14488
+ TheInlineCodeComponent,
14489
+ TheDndComponent], imports: [i10.CommonModule, i1.SlateModule, i4$1.FormsModule, i4.ThyIconModule,
13907
14490
  avatar.ThyAvatarModule,
13908
14491
  i3.ThyNavModule,
13909
14492
  i2$1.ThyFormModule,
13910
14493
  i5$3.ThySharedModule,
13911
14494
  i2$2.ThyListModule,
13912
- i5$1.ThyTooltipModule,
13913
- i4.ThyProgressModule,
14495
+ i5.ThyTooltipModule,
14496
+ i6.ThyProgressModule,
13914
14497
  autocomplete.ThyAutocompleteModule,
13915
14498
  i5$2.ThyActionMenuModule,
13916
- i5.ThyInputModule,
14499
+ i5$1.ThyInputModule,
13917
14500
  select.ThySelectModule,
13918
14501
  i1$5.ThyButtonModule,
13919
14502
  i1$4.ThyNotifyModule,
@@ -13926,12 +14509,12 @@
13926
14509
  useValue: TheToolbarGroupComponent
13927
14510
  },
13928
14511
  THE_CODE_MODE_PROVIDER
13929
- ], imports: [__spreadArray(__spreadArray([i6.CommonModule, i1.SlateModule, i4$2.FormsModule], __read(TETHYS)), [i8.CodemirrorModule, TheColumnSizeModule])] });
14512
+ ], imports: [__spreadArray(__spreadArray([i10.CommonModule, i1.SlateModule, i4$1.FormsModule], __read(TETHYS)), [i8.CodemirrorModule, TheColumnSizeModule])] });
13930
14513
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheEditorModule, decorators: [{
13931
14514
  type: i0.NgModule,
13932
14515
  args: [{
13933
14516
  declarations: __spreadArray(__spreadArray(__spreadArray([TheEditorComponent], __read(PIPES)), __read(COMPONENTS)), __read(PLUGIN_COMPONENTS)),
13934
- imports: __spreadArray(__spreadArray([i6.CommonModule, i1.SlateModule, i4$2.FormsModule], __read(TETHYS)), [i8.CodemirrorModule, TheColumnSizeModule]),
14517
+ imports: __spreadArray(__spreadArray([i10.CommonModule, i1.SlateModule, i4$1.FormsModule], __read(TETHYS)), [i8.CodemirrorModule, TheColumnSizeModule]),
13935
14518
  exports: [TheEditorComponent, TheToolbarComponent, TheToolbarDropdownComponent, TheToolbarItemComponent, TheDefaultElementComponent],
13936
14519
  entryComponents: __spreadArray(__spreadArray([], __read(COMPONENTS)), __read(PLUGIN_COMPONENTS)),
13937
14520
  providers: [
@@ -13968,6 +14551,7 @@
13968
14551
  exports.ColorEditor = ColorEditor;
13969
14552
  exports.DEFAULT_LANGUAGE = DEFAULT_LANGUAGE;
13970
14553
  exports.DEFAULT_SCROLL_CONTAINER = DEFAULT_SCROLL_CONTAINER;
14554
+ exports.DROP_THUMB_LINE = DROP_THUMB_LINE;
13971
14555
  exports.DefaultElementOptions = DefaultElementOptions;
13972
14556
  exports.DefaultGlobalToolbarDefinition = DefaultGlobalToolbarDefinition;
13973
14557
  exports.DefaultInlineToolbarDefinition = DefaultInlineToolbarDefinition;