@titaui/pc 1.10.40 → 1.10.44-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (107) hide show
  1. package/lib/components/dynamic/dynamic-item/dynamic-chart/index.js +18 -3
  2. package/lib/components/okr-detail/components/okr-tree/tree-node/e-node/e-project.js +5 -1
  3. package/lib/components/okr-detail/components/okr-tree/tree-node/e-node/index.css +19 -1
  4. package/lib/components/superset-charts/utils/axios.js +2 -2
  5. package/lib/components/upload/index.js +2 -4
  6. package/lib/index.js +0 -8
  7. package/package.json +2 -20
  8. package/lib/components/rich-editor/basic/schema.js +0 -47
  9. package/lib/components/rich-editor/consts/events.js +0 -12
  10. package/lib/components/rich-editor/enums.js +0 -42
  11. package/lib/components/rich-editor/index.js +0 -58
  12. package/lib/components/rich-editor/keymap.js +0 -119
  13. package/lib/components/rich-editor/keymaps/index.js +0 -241
  14. package/lib/components/rich-editor/models/controller.js +0 -18
  15. package/lib/components/rich-editor/models/editor.js +0 -47
  16. package/lib/components/rich-editor/models/plugin.js +0 -20
  17. package/lib/components/rich-editor/models/schema.js +0 -121
  18. package/lib/components/rich-editor/plugins/block/block-quote/commond.js +0 -27
  19. package/lib/components/rich-editor/plugins/block/block-quote/index.js +0 -126
  20. package/lib/components/rich-editor/plugins/block/heading/commonds.js +0 -31
  21. package/lib/components/rich-editor/plugins/block/heading/index.js +0 -188
  22. package/lib/components/rich-editor/plugins/block/index.js +0 -57
  23. package/lib/components/rich-editor/plugins/block/lists/actions/conversions.js +0 -172
  24. package/lib/components/rich-editor/plugins/block/lists/actions/indent-list-items-selected.js +0 -163
  25. package/lib/components/rich-editor/plugins/block/lists/actions/indent-list.js +0 -59
  26. package/lib/components/rich-editor/plugins/block/lists/actions/join-list-items-forward.js +0 -74
  27. package/lib/components/rich-editor/plugins/block/lists/actions/join-list-items-scenarios/index.js +0 -45
  28. package/lib/components/rich-editor/plugins/block/lists/actions/join-list-items-scenarios/join-list-item-with-paragraph.js +0 -104
  29. package/lib/components/rich-editor/plugins/block/lists/actions/join-list-items-scenarios/join-list-item-with-parent-nested-list.js +0 -92
  30. package/lib/components/rich-editor/plugins/block/lists/actions/join-list-items-scenarios/join-nested-list-with-parent-list-item.js +0 -89
  31. package/lib/components/rich-editor/plugins/block/lists/actions/join-list-items-scenarios/join-paragraph-with-list.js +0 -48
  32. package/lib/components/rich-editor/plugins/block/lists/actions/join-list-items-scenarios/join-sibling-list-items.js +0 -61
  33. package/lib/components/rich-editor/plugins/block/lists/actions/merge-lists.js +0 -34
  34. package/lib/components/rich-editor/plugins/block/lists/actions/outdent-list-items-selected.js +0 -289
  35. package/lib/components/rich-editor/plugins/block/lists/actions/wrap-and-join-lists.js +0 -180
  36. package/lib/components/rich-editor/plugins/block/lists/baseCommand.js +0 -328
  37. package/lib/components/rich-editor/plugins/block/lists/commond/indent-list.js +0 -60
  38. package/lib/components/rich-editor/plugins/block/lists/commond/index.js +0 -398
  39. package/lib/components/rich-editor/plugins/block/lists/commond/join-list-item-forward.js +0 -45
  40. package/lib/components/rich-editor/plugins/block/lists/commond/listBackspace.js +0 -302
  41. package/lib/components/rich-editor/plugins/block/lists/commond/outdent-list.js +0 -43
  42. package/lib/components/rich-editor/plugins/block/lists/index.js +0 -222
  43. package/lib/components/rich-editor/plugins/block/lists/messages.js +0 -38
  44. package/lib/components/rich-editor/plugins/block/lists/pm-plugins/input-rule.js +0 -152
  45. package/lib/components/rich-editor/plugins/block/lists/pm-plugins/keymap.js +0 -33
  46. package/lib/components/rich-editor/plugins/block/lists/pm-plugins/main.js +0 -94
  47. package/lib/components/rich-editor/plugins/block/lists/styles.js +0 -15
  48. package/lib/components/rich-editor/plugins/block/lists/transforms.js +0 -347
  49. package/lib/components/rich-editor/plugins/block/lists/utils/analytics.js +0 -48
  50. package/lib/components/rich-editor/plugins/block/lists/utils/find.js +0 -126
  51. package/lib/components/rich-editor/plugins/block/lists/utils/indentation.js +0 -87
  52. package/lib/components/rich-editor/plugins/block/lists/utils/node.js +0 -144
  53. package/lib/components/rich-editor/plugins/block/lists/utils/replace-content.js +0 -31
  54. package/lib/components/rich-editor/plugins/block/lists/utils/selection.js +0 -201
  55. package/lib/components/rich-editor/plugins/block/lists/utils.js +0 -52
  56. package/lib/components/rich-editor/plugins/block/paragraph/index.js +0 -91
  57. package/lib/components/rich-editor/plugins/core/index.js +0 -90
  58. package/lib/components/rich-editor/plugins/core/pm-plugins/focus-handler.js +0 -67
  59. package/lib/components/rich-editor/plugins/core/pm-plugins/keymap.js +0 -29
  60. package/lib/components/rich-editor/plugins/core/pm-plugins/reactNodeView.js +0 -80
  61. package/lib/components/rich-editor/plugins/extension/alignment/commond.js +0 -24
  62. package/lib/components/rich-editor/plugins/extension/alignment/index.js +0 -111
  63. package/lib/components/rich-editor/plugins/extension/alignment/utils.js +0 -19
  64. package/lib/components/rich-editor/plugins/extension/index.js +0 -18
  65. package/lib/components/rich-editor/plugins/index.js +0 -44
  66. package/lib/components/rich-editor/plugins/inline/color/commond.js +0 -128
  67. package/lib/components/rich-editor/plugins/inline/color/consts.js +0 -43
  68. package/lib/components/rich-editor/plugins/inline/color/index.css +0 -61
  69. package/lib/components/rich-editor/plugins/inline/color/index.js +0 -209
  70. package/lib/components/rich-editor/plugins/inline/color/selector.js +0 -250
  71. package/lib/components/rich-editor/plugins/inline/delete-line/index.js +0 -147
  72. package/lib/components/rich-editor/plugins/inline/em/index.js +0 -93
  73. package/lib/components/rich-editor/plugins/inline/index.js +0 -83
  74. package/lib/components/rich-editor/plugins/inline/link/commands.js +0 -256
  75. package/lib/components/rich-editor/plugins/inline/link/index.js +0 -149
  76. package/lib/components/rich-editor/plugins/inline/link/pm-plugins/fake-cursor-for-toolbar.js +0 -77
  77. package/lib/components/rich-editor/plugins/inline/link/pm-plugins/main.js +0 -293
  78. package/lib/components/rich-editor/plugins/inline/link/ui/index.css +0 -79
  79. package/lib/components/rich-editor/plugins/inline/link/ui/linkEditor.js +0 -148
  80. package/lib/components/rich-editor/plugins/inline/link/ui/linkToolbar.js +0 -88
  81. package/lib/components/rich-editor/plugins/inline/link/ui/toolbarBtn.js +0 -117
  82. package/lib/components/rich-editor/plugins/inline/link/utils.js +0 -33
  83. package/lib/components/rich-editor/plugins/inline/strong/index.js +0 -137
  84. package/lib/components/rich-editor/plugins/inline/under-line/index.js +0 -145
  85. package/lib/components/rich-editor/plugins/util.js +0 -281
  86. package/lib/components/rich-editor/react/reactNodeView.js +0 -383
  87. package/lib/components/rich-editor/react/uiProvider.js +0 -185
  88. package/lib/components/rich-editor/schemas/basic.js +0 -309
  89. package/lib/components/rich-editor/schemas/index.js +0 -19
  90. package/lib/components/rich-editor/schemas/list.js +0 -342
  91. package/lib/components/rich-editor/types/commond.js +0 -5
  92. package/lib/components/rich-editor/types/index.js +0 -18
  93. package/lib/components/rich-editor/ui/Popup/index.js +0 -247
  94. package/lib/components/rich-editor/ui/Popup/utils.js +0 -399
  95. package/lib/components/rich-editor/ui/editor/index.css +0 -144
  96. package/lib/components/rich-editor/ui/editor/index.js +0 -143
  97. package/lib/components/rich-editor/ui/normal-toolbar/index.css +0 -29
  98. package/lib/components/rich-editor/ui/normal-toolbar/index.js +0 -109
  99. package/lib/components/rich-editor/utils/browser.js +0 -35
  100. package/lib/components/rich-editor/utils/commands.js +0 -266
  101. package/lib/components/rich-editor/utils/document.js +0 -160
  102. package/lib/components/rich-editor/utils/event.js +0 -79
  103. package/lib/components/rich-editor/utils/helpers.js +0 -16
  104. package/lib/components/rich-editor/utils/mark.js +0 -168
  105. package/lib/components/rich-editor/utils/slice.js +0 -85
  106. package/lib/components/rich-editor/utils/toolbar.js +0 -228
  107. package/yarn-error.log +0 -22184
@@ -1,85 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.flatmap = flatmap;
7
- exports.getFragmentBackingArray = getFragmentBackingArray;
8
- exports.mapChildren = mapChildren;
9
- exports.mapFragment = mapFragment;
10
- exports.mapSlice = mapSlice;
11
-
12
- var _prosemirrorModel = require("prosemirror-model");
13
-
14
- function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
15
-
16
- function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
17
-
18
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
19
-
20
- function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
21
-
22
- function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
23
-
24
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
25
-
26
- /**
27
- * A helper to get the underlying array of a fragment.
28
- */
29
- function getFragmentBackingArray(fragment) {
30
- return fragment.content;
31
- }
32
-
33
- function mapFragment(content, callback) {
34
- var parent = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
35
- var children = [];
36
-
37
- for (var i = 0, size = content.childCount; i < size; i++) {
38
- var _node = content.child(i);
39
-
40
- var transformed = _node.isLeaf ? callback(_node, parent, i) : callback(_node.copy(mapFragment(_node.content, callback, _node)), parent, i);
41
-
42
- if (transformed) {
43
- if (transformed instanceof _prosemirrorModel.Fragment) {
44
- children.push.apply(children, _toConsumableArray(getFragmentBackingArray(transformed)));
45
- } else if (Array.isArray(transformed)) {
46
- children.push.apply(children, _toConsumableArray(transformed));
47
- } else {
48
- children.push(transformed);
49
- }
50
- }
51
- }
52
-
53
- return _prosemirrorModel.Fragment.fromArray(children);
54
- }
55
-
56
- function mapSlice(slice, callback) {
57
- var fragment = mapFragment(slice.content, callback);
58
- return new _prosemirrorModel.Slice(fragment, slice.openStart, slice.openEnd);
59
- }
60
-
61
- function flatmap(fragment, callback) {
62
- var fragmentContent = [];
63
-
64
- for (var i = 0; i < fragment.childCount; i++) {
65
- var child = callback(fragment.child(i), i, fragment);
66
-
67
- if (Array.isArray(child)) {
68
- fragmentContent.push.apply(fragmentContent, _toConsumableArray(child));
69
- } else {
70
- fragmentContent.push(child);
71
- }
72
- }
73
-
74
- return _prosemirrorModel.Fragment.fromArray(fragmentContent);
75
- }
76
-
77
- function mapChildren(node, callback) {
78
- var array = [];
79
-
80
- for (var i = 0; i < node.childCount; i++) {
81
- array.push(callback(node.child(i), i, node instanceof _prosemirrorModel.Fragment ? node : node.content));
82
- }
83
-
84
- return array;
85
- }
@@ -1,228 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.getMenuDescibitionFromType = getMenuDescibitionFromType;
7
- exports.handleClickToolMenu = handleClickToolMenu;
8
- exports.headingIsActive = headingIsActive;
9
- exports.markActive = markActive;
10
- exports.orderedListIsActive = orderedListIsActive;
11
-
12
- var _prosemirrorCommands = require("prosemirror-commands");
13
-
14
- var _schemas = _interopRequireDefault(require("../schemas"));
15
-
16
- var _commands = require("./commands");
17
-
18
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
19
-
20
- function getMenuDescibitionFromType(type) {
21
- switch (type) {
22
- case 'h1':
23
- return {
24
- title: '一级标题',
25
- icon: 'tu-icon-text-H1'
26
- };
27
-
28
- case 'h2':
29
- return {
30
- title: '二级标题',
31
- icon: 'tu-icon-text-H2'
32
- };
33
-
34
- case 'h3':
35
- return {
36
- title: '三级标题',
37
- icon: 'tu-icon-text-H3'
38
- };
39
-
40
- case 'strong':
41
- return {
42
- title: '加粗',
43
- icon: 'tu-icon-text-blod'
44
- };
45
-
46
- case 'color':
47
- return {
48
- title: '文字颜色',
49
- icon: 'tu-icon-text-color'
50
- };
51
-
52
- case 'underLine':
53
- return {
54
- title: '下划线',
55
- icon: 'tu-icon-text-underline'
56
- };
57
-
58
- case 'deleteLine':
59
- return {
60
- title: '删除线',
61
- icon: 'tu-icon-text-delline'
62
- };
63
-
64
- case 'orderList':
65
- return {
66
- title: '有序列表',
67
- icon: 'tu-icon-text-number-list'
68
- };
69
-
70
- case 'unOrderList':
71
- return {
72
- title: '无序列表',
73
- icon: 'tu-icon-text-bullet-list'
74
- };
75
-
76
- case 'left':
77
- return {
78
- title: '左对齐',
79
- icon: 'tu-icon-text-left'
80
- };
81
-
82
- case 'center':
83
- return {
84
- title: '居中对齐',
85
- icon: 'tu-icon-text-center'
86
- };
87
-
88
- case 'right':
89
- return {
90
- title: '右对齐',
91
- icon: 'tu-icon-text-right'
92
- };
93
-
94
- case 'task':
95
- return {
96
- title: '任务',
97
- icon: 'tu-icon-text-task'
98
- };
99
-
100
- case 'checkList':
101
- return {
102
- title: '清单',
103
- icon: 'tu-icon-text-box'
104
- };
105
-
106
- case 'table':
107
- return {
108
- title: '表格',
109
- icon: 'tu-icon-text-table'
110
- };
111
-
112
- case 'image':
113
- return {
114
- title: '图片/视频',
115
- icon: 'tu-icon-text-photo'
116
- };
117
-
118
- case 'quote':
119
- return {
120
- title: '引用',
121
- icon: 'tu-icon-text-quotel'
122
- };
123
-
124
- case 'link':
125
- return {
126
- title: '链接',
127
- icon: 'tu-icon-text-link'
128
- };
129
-
130
- case 'at':
131
- return {
132
- title: '@人',
133
- icon: 'tu-icon-text-man'
134
- };
135
-
136
- default:
137
- return {
138
- title: '',
139
- icon: ''
140
- };
141
- }
142
- }
143
-
144
- function handleClickToolMenu(state, dispatchTransiction, type) {
145
- switch (type) {
146
- case 'h1':
147
- return (0, _commands.setHeadLine)(state, dispatchTransiction, 1);
148
-
149
- case 'h2':
150
- return (0, _commands.setHeadLine)(state, dispatchTransiction, 2);
151
-
152
- case 'h3':
153
- return (0, _commands.setHeadLine)(state, dispatchTransiction, 3);
154
-
155
- case 'strong':
156
- return (0, _prosemirrorCommands.toggleMark)(_schemas["default"].marks.strong)(state, dispatchTransiction);
157
-
158
- case 'color':
159
- return;
160
-
161
- case 'underLine':
162
- return (0, _prosemirrorCommands.toggleMark)(_schemas["default"].marks.underLine)(state, dispatchTransiction);
163
-
164
- case 'deleteLine':
165
- return (0, _prosemirrorCommands.toggleMark)(_schemas["default"].marks.deleteLine)(state, dispatchTransiction);
166
-
167
- case 'orderList':
168
- return (0, _commands.toggleList)(state, dispatchTransiction, _schemas["default"].nodes.ordered_list);
169
-
170
- case 'unOrderList':
171
- return (0, _commands.toggleList)(state, dispatchTransiction, _schemas["default"].nodes.bullet_list);
172
-
173
- case 'left':
174
- case 'center':
175
- case 'right':
176
- return (0, _commands.setAlignment)(state, dispatchTransiction, type);
177
-
178
- case 'task':
179
- return;
180
-
181
- case 'checkList':
182
- return;
183
-
184
- case 'table':
185
- return;
186
-
187
- case 'image':
188
- return;
189
-
190
- case 'quote':
191
- return;
192
-
193
- case 'link':
194
- return;
195
-
196
- case 'at':
197
- return;
198
-
199
- default:
200
- return;
201
- }
202
-
203
- return;
204
- }
205
-
206
- function headingIsActive(state, level) {
207
- var $from = state.selection.$from;
208
- var node = $from.node();
209
- return node.type === _schemas["default"].nodes.heading && node.attrs.level === level;
210
- }
211
-
212
- function markActive(state, type) {
213
- var _state$selection = state.selection,
214
- from = _state$selection.from,
215
- $from = _state$selection.$from,
216
- to = _state$selection.to,
217
- empty = _state$selection.empty;
218
- if (empty) return type.isInSet(state.storedMarks || $from.marks());else return state.doc.rangeHasMark(from, to, type);
219
- }
220
-
221
- function orderedListIsActive(state) {// const { $from,ranges } = state.selection;
222
- // const node = $from.node();
223
- // for(let range of ranges) {
224
- // state.doc.nodesBetween(range.$from.pos, range.$to.pos, (node, pos) => {
225
- // // console.log(node)
226
- // })
227
- // }
228
- }