@titaui/pc 1.10.40 → 1.10.44

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 (105) hide show
  1. package/lib/components/dynamic/dynamic-item/dynamic-chart/index.js +18 -3
  2. package/lib/components/superset-charts/utils/axios.js +2 -2
  3. package/lib/components/upload/index.js +2 -4
  4. package/lib/index.js +0 -8
  5. package/package.json +2 -20
  6. package/lib/components/rich-editor/basic/schema.js +0 -47
  7. package/lib/components/rich-editor/consts/events.js +0 -12
  8. package/lib/components/rich-editor/enums.js +0 -42
  9. package/lib/components/rich-editor/index.js +0 -58
  10. package/lib/components/rich-editor/keymap.js +0 -119
  11. package/lib/components/rich-editor/keymaps/index.js +0 -241
  12. package/lib/components/rich-editor/models/controller.js +0 -18
  13. package/lib/components/rich-editor/models/editor.js +0 -47
  14. package/lib/components/rich-editor/models/plugin.js +0 -20
  15. package/lib/components/rich-editor/models/schema.js +0 -121
  16. package/lib/components/rich-editor/plugins/block/block-quote/commond.js +0 -27
  17. package/lib/components/rich-editor/plugins/block/block-quote/index.js +0 -126
  18. package/lib/components/rich-editor/plugins/block/heading/commonds.js +0 -31
  19. package/lib/components/rich-editor/plugins/block/heading/index.js +0 -188
  20. package/lib/components/rich-editor/plugins/block/index.js +0 -57
  21. package/lib/components/rich-editor/plugins/block/lists/actions/conversions.js +0 -172
  22. package/lib/components/rich-editor/plugins/block/lists/actions/indent-list-items-selected.js +0 -163
  23. package/lib/components/rich-editor/plugins/block/lists/actions/indent-list.js +0 -59
  24. package/lib/components/rich-editor/plugins/block/lists/actions/join-list-items-forward.js +0 -74
  25. package/lib/components/rich-editor/plugins/block/lists/actions/join-list-items-scenarios/index.js +0 -45
  26. package/lib/components/rich-editor/plugins/block/lists/actions/join-list-items-scenarios/join-list-item-with-paragraph.js +0 -104
  27. package/lib/components/rich-editor/plugins/block/lists/actions/join-list-items-scenarios/join-list-item-with-parent-nested-list.js +0 -92
  28. package/lib/components/rich-editor/plugins/block/lists/actions/join-list-items-scenarios/join-nested-list-with-parent-list-item.js +0 -89
  29. package/lib/components/rich-editor/plugins/block/lists/actions/join-list-items-scenarios/join-paragraph-with-list.js +0 -48
  30. package/lib/components/rich-editor/plugins/block/lists/actions/join-list-items-scenarios/join-sibling-list-items.js +0 -61
  31. package/lib/components/rich-editor/plugins/block/lists/actions/merge-lists.js +0 -34
  32. package/lib/components/rich-editor/plugins/block/lists/actions/outdent-list-items-selected.js +0 -289
  33. package/lib/components/rich-editor/plugins/block/lists/actions/wrap-and-join-lists.js +0 -180
  34. package/lib/components/rich-editor/plugins/block/lists/baseCommand.js +0 -328
  35. package/lib/components/rich-editor/plugins/block/lists/commond/indent-list.js +0 -60
  36. package/lib/components/rich-editor/plugins/block/lists/commond/index.js +0 -398
  37. package/lib/components/rich-editor/plugins/block/lists/commond/join-list-item-forward.js +0 -45
  38. package/lib/components/rich-editor/plugins/block/lists/commond/listBackspace.js +0 -302
  39. package/lib/components/rich-editor/plugins/block/lists/commond/outdent-list.js +0 -43
  40. package/lib/components/rich-editor/plugins/block/lists/index.js +0 -222
  41. package/lib/components/rich-editor/plugins/block/lists/messages.js +0 -38
  42. package/lib/components/rich-editor/plugins/block/lists/pm-plugins/input-rule.js +0 -152
  43. package/lib/components/rich-editor/plugins/block/lists/pm-plugins/keymap.js +0 -33
  44. package/lib/components/rich-editor/plugins/block/lists/pm-plugins/main.js +0 -94
  45. package/lib/components/rich-editor/plugins/block/lists/styles.js +0 -15
  46. package/lib/components/rich-editor/plugins/block/lists/transforms.js +0 -347
  47. package/lib/components/rich-editor/plugins/block/lists/utils/analytics.js +0 -48
  48. package/lib/components/rich-editor/plugins/block/lists/utils/find.js +0 -126
  49. package/lib/components/rich-editor/plugins/block/lists/utils/indentation.js +0 -87
  50. package/lib/components/rich-editor/plugins/block/lists/utils/node.js +0 -144
  51. package/lib/components/rich-editor/plugins/block/lists/utils/replace-content.js +0 -31
  52. package/lib/components/rich-editor/plugins/block/lists/utils/selection.js +0 -201
  53. package/lib/components/rich-editor/plugins/block/lists/utils.js +0 -52
  54. package/lib/components/rich-editor/plugins/block/paragraph/index.js +0 -91
  55. package/lib/components/rich-editor/plugins/core/index.js +0 -90
  56. package/lib/components/rich-editor/plugins/core/pm-plugins/focus-handler.js +0 -67
  57. package/lib/components/rich-editor/plugins/core/pm-plugins/keymap.js +0 -29
  58. package/lib/components/rich-editor/plugins/core/pm-plugins/reactNodeView.js +0 -80
  59. package/lib/components/rich-editor/plugins/extension/alignment/commond.js +0 -24
  60. package/lib/components/rich-editor/plugins/extension/alignment/index.js +0 -111
  61. package/lib/components/rich-editor/plugins/extension/alignment/utils.js +0 -19
  62. package/lib/components/rich-editor/plugins/extension/index.js +0 -18
  63. package/lib/components/rich-editor/plugins/index.js +0 -44
  64. package/lib/components/rich-editor/plugins/inline/color/commond.js +0 -128
  65. package/lib/components/rich-editor/plugins/inline/color/consts.js +0 -43
  66. package/lib/components/rich-editor/plugins/inline/color/index.css +0 -61
  67. package/lib/components/rich-editor/plugins/inline/color/index.js +0 -209
  68. package/lib/components/rich-editor/plugins/inline/color/selector.js +0 -250
  69. package/lib/components/rich-editor/plugins/inline/delete-line/index.js +0 -147
  70. package/lib/components/rich-editor/plugins/inline/em/index.js +0 -93
  71. package/lib/components/rich-editor/plugins/inline/index.js +0 -83
  72. package/lib/components/rich-editor/plugins/inline/link/commands.js +0 -256
  73. package/lib/components/rich-editor/plugins/inline/link/index.js +0 -149
  74. package/lib/components/rich-editor/plugins/inline/link/pm-plugins/fake-cursor-for-toolbar.js +0 -77
  75. package/lib/components/rich-editor/plugins/inline/link/pm-plugins/main.js +0 -293
  76. package/lib/components/rich-editor/plugins/inline/link/ui/index.css +0 -79
  77. package/lib/components/rich-editor/plugins/inline/link/ui/linkEditor.js +0 -148
  78. package/lib/components/rich-editor/plugins/inline/link/ui/linkToolbar.js +0 -88
  79. package/lib/components/rich-editor/plugins/inline/link/ui/toolbarBtn.js +0 -117
  80. package/lib/components/rich-editor/plugins/inline/link/utils.js +0 -33
  81. package/lib/components/rich-editor/plugins/inline/strong/index.js +0 -137
  82. package/lib/components/rich-editor/plugins/inline/under-line/index.js +0 -145
  83. package/lib/components/rich-editor/plugins/util.js +0 -281
  84. package/lib/components/rich-editor/react/reactNodeView.js +0 -383
  85. package/lib/components/rich-editor/react/uiProvider.js +0 -185
  86. package/lib/components/rich-editor/schemas/basic.js +0 -309
  87. package/lib/components/rich-editor/schemas/index.js +0 -19
  88. package/lib/components/rich-editor/schemas/list.js +0 -342
  89. package/lib/components/rich-editor/types/commond.js +0 -5
  90. package/lib/components/rich-editor/types/index.js +0 -18
  91. package/lib/components/rich-editor/ui/Popup/index.js +0 -247
  92. package/lib/components/rich-editor/ui/Popup/utils.js +0 -399
  93. package/lib/components/rich-editor/ui/editor/index.css +0 -144
  94. package/lib/components/rich-editor/ui/editor/index.js +0 -143
  95. package/lib/components/rich-editor/ui/normal-toolbar/index.css +0 -29
  96. package/lib/components/rich-editor/ui/normal-toolbar/index.js +0 -109
  97. package/lib/components/rich-editor/utils/browser.js +0 -35
  98. package/lib/components/rich-editor/utils/commands.js +0 -266
  99. package/lib/components/rich-editor/utils/document.js +0 -160
  100. package/lib/components/rich-editor/utils/event.js +0 -79
  101. package/lib/components/rich-editor/utils/helpers.js +0 -16
  102. package/lib/components/rich-editor/utils/mark.js +0 -168
  103. package/lib/components/rich-editor/utils/slice.js +0 -85
  104. package/lib/components/rich-editor/utils/toolbar.js +0 -228
  105. 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
- }