@atlaskit/editor-common 76.39.2 → 76.39.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/dist/cjs/collab/index.js +13 -2
- package/dist/cjs/messages/table.js +59 -4
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/utils/unsupportedContent/get-unsupported-content-level-data.js +15 -5
- package/dist/es2019/collab/index.js +12 -1
- package/dist/es2019/messages/table.js +59 -4
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/utils/unsupportedContent/get-unsupported-content-level-data.js +15 -5
- package/dist/esm/collab/index.js +12 -1
- package/dist/esm/messages/table.js +59 -4
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/utils/unsupportedContent/get-unsupported-content-level-data.js +15 -5
- package/dist/types/analytics/types/media-events.d.ts +5 -1
- package/dist/types/collab/index.d.ts +3 -1
- package/dist/types/hooks/useSharedPluginState.d.ts +2 -2
- package/dist/types/messages/table.d.ts +57 -2
- package/dist/types/utils/unsupportedContent/get-unsupported-content-level-data.d.ts +1 -0
- package/dist/types-ts4.5/analytics/types/media-events.d.ts +5 -1
- package/dist/types-ts4.5/collab/index.d.ts +3 -1
- package/dist/types-ts4.5/hooks/useSharedPluginState.d.ts +2 -2
- package/dist/types-ts4.5/messages/table.d.ts +57 -2
- package/dist/types-ts4.5/utils/unsupportedContent/get-unsupported-content-level-data.d.ts +1 -0
- package/package.json +2 -2
- package/tsconfig.json +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 76.39.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#66631](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/66631) [`c1d10d6c2013`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/c1d10d6c2013) - Updated alt text analytics to log additional attributes
|
|
8
|
+
- [#67113](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/67113) [`7160ae19d9e5`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/7160ae19d9e5) - [ux] Adds localisation for table drag handle menu options
|
|
9
|
+
- [#65788](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/65788) [`be744e423e9f`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/be744e423e9f) - ED-21700 Extraction of avatar group plugin
|
|
10
|
+
- [#66456](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/66456) [`f67ea3106bb9`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/f67ea3106bb9) - Add support for i18n for drag handles
|
|
11
|
+
- [#66919](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/66919) [`d23cba211264`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/d23cba211264) - Added a unsupported node type counts map to the unsupported content level tracking analytics event. This will provide information as to the type of unsupported nodes being encountered by user and help with debuggging the issue.
|
|
12
|
+
- [#67194](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/67194) [`37379761475c`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/37379761475c) - [ED-21806] Skip changes from NCS and tinted transactions.
|
|
13
|
+
|
|
3
14
|
## 76.39.2
|
|
4
15
|
|
|
5
16
|
### Patch Changes
|
package/dist/cjs/collab/index.js
CHANGED
|
@@ -5,7 +5,7 @@ var _typeof = require("@babel/runtime/helpers/typeof");
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.telepointerStyle = exports.colors = exports.TELEPOINTER_DIM_CLASS = exports.PROVIDER_ERROR_CODE = exports.DisconnectReason = void 0;
|
|
8
|
+
exports.tintDirtyTransaction = exports.telepointerStyle = exports.isDirtyTransaction = exports.colors = exports.TELEPOINTER_DIM_CLASS = exports.PROVIDER_ERROR_CODE = exports.DisconnectReason = void 0;
|
|
9
9
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
10
10
|
var _react = require("@emotion/react");
|
|
11
11
|
var _adfSchema = require("@atlaskit/adf-schema");
|
|
@@ -136,4 +136,15 @@ var telepointerColorStyle = function telepointerColorStyle(color, index) {
|
|
|
136
136
|
var TELEPOINTER_DIM_CLASS = exports.TELEPOINTER_DIM_CLASS = 'telepointer-dim';
|
|
137
137
|
var telepointerStyle = exports.telepointerStyle = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .ProseMirror .telepointer {\n position: relative;\n transition: opacity 200ms;\n\n &.telepointer-selection {\n line-height: 1.2;\n pointer-events: none;\n user-select: none;\n }\n\n &.telepointer-selection-badge::after {\n content: attr(data-initial);\n position: absolute;\n display: block;\n top: -14px;\n font-size: ", ";\n padding: ", ";\n color: ", ";\n left: -1px;\n border-radius: 2px 2px 2px 0;\n line-height: initial;\n }\n\n &.", " {\n opacity: 0.2;\n }\n\n ", ";\n }\n"])), (0, _editorSharedStyles.relativeFontSizeToBase16)(9), "var(--ds-space-025, 2px)", "var(--ds-text-inverse, white)", TELEPOINTER_DIM_CLASS, colors.map(function (color, index) {
|
|
138
138
|
return telepointerColorStyle(color, index);
|
|
139
|
-
}));
|
|
139
|
+
}));
|
|
140
|
+
var tintKey = 'collab:isDirtyTransaction';
|
|
141
|
+
var isDirtyTransaction = exports.isDirtyTransaction = function isDirtyTransaction(tr) {
|
|
142
|
+
return Boolean(tr.getMeta(tintKey));
|
|
143
|
+
};
|
|
144
|
+
/*
|
|
145
|
+
* This function is used to mark which commands that are dispatching
|
|
146
|
+
* unnecessary changes on Editor.
|
|
147
|
+
*/
|
|
148
|
+
var tintDirtyTransaction = exports.tintDirtyTransaction = function tintDirtyTransaction(tr) {
|
|
149
|
+
tr.setMeta(tintKey, true);
|
|
150
|
+
};
|
|
@@ -51,8 +51,13 @@ var messages = exports.messages = (0, _reactIntlNext.defineMessages)({
|
|
|
51
51
|
defaultMessage: 'Insert column right',
|
|
52
52
|
description: 'Inserts a new column to the right of selected column.'
|
|
53
53
|
},
|
|
54
|
-
|
|
55
|
-
id: 'fabric.editor.
|
|
54
|
+
addColumnLeft: {
|
|
55
|
+
id: 'fabric.editor.addColumnLeft',
|
|
56
|
+
defaultMessage: 'Add column left',
|
|
57
|
+
description: 'Adds a new column to the left of selected column.'
|
|
58
|
+
},
|
|
59
|
+
addColumnRight: {
|
|
60
|
+
id: 'fabric.editor.addColumnRight',
|
|
56
61
|
defaultMessage: 'Add column right',
|
|
57
62
|
description: 'Adds a new column to the right of selected column.'
|
|
58
63
|
},
|
|
@@ -71,11 +76,36 @@ var messages = exports.messages = (0, _reactIntlNext.defineMessages)({
|
|
|
71
76
|
defaultMessage: 'Insert row below',
|
|
72
77
|
description: 'Inserts a new row below the selected row.'
|
|
73
78
|
},
|
|
74
|
-
|
|
75
|
-
id: 'fabric.editor.
|
|
79
|
+
addRowAbove: {
|
|
80
|
+
id: 'fabric.editor.addRowAbove',
|
|
81
|
+
defaultMessage: 'Add row above',
|
|
82
|
+
description: 'Adds a new row above the selected row.'
|
|
83
|
+
},
|
|
84
|
+
addRowBelow: {
|
|
85
|
+
id: 'fabric.editor.addRowBelow',
|
|
76
86
|
defaultMessage: 'Add row below',
|
|
77
87
|
description: 'Adds a new row below the selected row.'
|
|
78
88
|
},
|
|
89
|
+
moveColumnLeft: {
|
|
90
|
+
id: 'fabric.editor.moveColumnLeft',
|
|
91
|
+
defaultMessage: 'Move {0, plural, one {column} other {columns}} left',
|
|
92
|
+
description: 'Moves a column or columns to the left.'
|
|
93
|
+
},
|
|
94
|
+
moveColumnRight: {
|
|
95
|
+
id: 'fabric.editor.moveColumnRight',
|
|
96
|
+
defaultMessage: 'Move {0, plural, one {column} other {columns}} right',
|
|
97
|
+
description: 'Moves a column or columns to the right.'
|
|
98
|
+
},
|
|
99
|
+
moveRowUp: {
|
|
100
|
+
id: 'fabric.editor.moveRowUp',
|
|
101
|
+
defaultMessage: 'Move {0, plural, one {row} other {rows}} up',
|
|
102
|
+
description: 'Moves a row or selected rows up.'
|
|
103
|
+
},
|
|
104
|
+
moveRowDown: {
|
|
105
|
+
id: 'fabric.editor.moveDownDown',
|
|
106
|
+
defaultMessage: 'Move {0, plural, one {row} other {rows}} down',
|
|
107
|
+
description: 'Moves a row or selected rows down.'
|
|
108
|
+
},
|
|
79
109
|
insertRowDrag: {
|
|
80
110
|
id: 'fabric.editor.insertRowDrag',
|
|
81
111
|
defaultMessage: 'Insert row',
|
|
@@ -86,6 +116,11 @@ var messages = exports.messages = (0, _reactIntlNext.defineMessages)({
|
|
|
86
116
|
defaultMessage: 'Delete {0, plural, one {row} other {rows}}',
|
|
87
117
|
description: 'Deletes a table row.'
|
|
88
118
|
},
|
|
119
|
+
rowNumbers: {
|
|
120
|
+
id: 'fabrid.editor.rowNumbers',
|
|
121
|
+
defaultMessage: 'Row numbers',
|
|
122
|
+
desciption: 'Adds a number to each row except header row'
|
|
123
|
+
},
|
|
89
124
|
cellOptions: {
|
|
90
125
|
id: 'fabric.editor.cellOptions',
|
|
91
126
|
defaultMessage: 'Cell options',
|
|
@@ -166,6 +201,16 @@ var messages = exports.messages = (0, _reactIntlNext.defineMessages)({
|
|
|
166
201
|
defaultMessage: 'Sort column Z → A',
|
|
167
202
|
description: 'Sort column in descending order'
|
|
168
203
|
},
|
|
204
|
+
sortColumnIncreasing: {
|
|
205
|
+
id: 'fabric.editor.sortColumnIncreasing',
|
|
206
|
+
defaultMessage: 'Sort increasing',
|
|
207
|
+
description: 'Sort column in ascending order'
|
|
208
|
+
},
|
|
209
|
+
sortColumnDecreasing: {
|
|
210
|
+
id: 'fabric.editor.sortColumnDecreasing',
|
|
211
|
+
defaultMessage: 'Sort decreasing',
|
|
212
|
+
description: 'Sort column in descending order'
|
|
213
|
+
},
|
|
169
214
|
canNotSortTable: {
|
|
170
215
|
id: 'fabric.editor.canNotSortTable',
|
|
171
216
|
defaultMessage: "\u26A0\uFE0F You can't sort a table with merged cells",
|
|
@@ -180,5 +225,15 @@ var messages = exports.messages = (0, _reactIntlNext.defineMessages)({
|
|
|
180
225
|
id: 'fabric.editor.rowControl',
|
|
181
226
|
defaultMessage: 'Highlight row',
|
|
182
227
|
description: 'A button on the left of each row that shows up when the table is in focus. Clicking on it will select the entire row.'
|
|
228
|
+
},
|
|
229
|
+
rowDragHandle: {
|
|
230
|
+
id: 'fabric.editor.rowDragHandle',
|
|
231
|
+
defaultMessage: 'Row options',
|
|
232
|
+
description: 'The row drag handle to move the row within the table. Click to open a menu for more row options.'
|
|
233
|
+
},
|
|
234
|
+
columnDragHandle: {
|
|
235
|
+
id: 'fabric.editor.columnDragHandle',
|
|
236
|
+
defaultMessage: 'Column options',
|
|
237
|
+
description: 'The column drag handle to move the column within the table. Click to open a menu for more column options.'
|
|
183
238
|
}
|
|
184
239
|
});
|
|
@@ -16,7 +16,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
16
16
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
17
17
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
18
18
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
19
|
-
var packageVersion = "76.39.
|
|
19
|
+
var packageVersion = "76.39.3";
|
|
20
20
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
21
21
|
// Remove URL as it has UGC
|
|
22
22
|
// TODO: Sanitise the URL instead of just removing it
|
|
@@ -22,7 +22,7 @@ var _templateObject, _templateObject2, _templateObject3;
|
|
|
22
22
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
23
23
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } /** @jsx jsx */
|
|
24
24
|
var packageName = "@atlaskit/editor-common";
|
|
25
|
-
var packageVersion = "76.39.
|
|
25
|
+
var packageVersion = "76.39.3";
|
|
26
26
|
var halfFocusRing = 1;
|
|
27
27
|
var dropOffset = '0, 8';
|
|
28
28
|
var DropList = /*#__PURE__*/function (_Component) {
|
|
@@ -24,9 +24,10 @@ var buildUnsupportedContentLevelThresholds = function buildUnsupportedContentLev
|
|
|
24
24
|
var countSupportedUnsupportedNodes = function countSupportedUnsupportedNodes(validDocument) {
|
|
25
25
|
var unsupportedNodes = 0;
|
|
26
26
|
var supportedNodes = 0;
|
|
27
|
+
var unsupportedNodeTypeCount = {};
|
|
28
|
+
var unsupportedNodeTypes = ['unsupportedInline', 'unsupportedBlock', 'confluenceUnsupportedInline', 'confluenceUnsupportedBlock'];
|
|
27
29
|
(0, _traverse.traverse)(validDocument, {
|
|
28
30
|
any: function any(node) {
|
|
29
|
-
var unsupportedNodeTypes = ['unsupportedInline', 'unsupportedBlock', 'confluenceUnsupportedInline', 'confluenceUnsupportedBlock'];
|
|
30
31
|
if (unsupportedNodeTypes.includes(node.type)) {
|
|
31
32
|
var _node$attrs;
|
|
32
33
|
var originalNode = (_node$attrs = node.attrs) === null || _node$attrs === void 0 ? void 0 : _node$attrs.originalValue;
|
|
@@ -35,8 +36,14 @@ var countSupportedUnsupportedNodes = function countSupportedUnsupportedNodes(val
|
|
|
35
36
|
// unsupported content nodes (with nested children contributing towards
|
|
36
37
|
// that count)
|
|
37
38
|
(0, _traverse.traverse)(originalNode, {
|
|
38
|
-
any: function any() {
|
|
39
|
+
any: function any(unsupportedNode, parent) {
|
|
40
|
+
var _parent$parent$node$t, _parent$parent, _unsupportedNode$type, _unsupportedNodeTypeC;
|
|
39
41
|
unsupportedNodes++;
|
|
42
|
+
|
|
43
|
+
// Count the types of unsupported nodes
|
|
44
|
+
var parentType = (_parent$parent$node$t = (_parent$parent = parent.parent) === null || _parent$parent === void 0 || (_parent$parent = _parent$parent.node) === null || _parent$parent === void 0 ? void 0 : _parent$parent.type) !== null && _parent$parent$node$t !== void 0 ? _parent$parent$node$t : 'unknown';
|
|
45
|
+
var type = "".concat(parentType, "/").concat((_unsupportedNode$type = unsupportedNode === null || unsupportedNode === void 0 ? void 0 : unsupportedNode.type) !== null && _unsupportedNode$type !== void 0 ? _unsupportedNode$type : 'unknown');
|
|
46
|
+
unsupportedNodeTypeCount[type] = ((_unsupportedNodeTypeC = unsupportedNodeTypeCount === null || unsupportedNodeTypeCount === void 0 ? void 0 : unsupportedNodeTypeCount[type]) !== null && _unsupportedNodeTypeC !== void 0 ? _unsupportedNodeTypeC : 0) + 1;
|
|
40
47
|
}
|
|
41
48
|
});
|
|
42
49
|
}
|
|
@@ -50,7 +57,8 @@ var countSupportedUnsupportedNodes = function countSupportedUnsupportedNodes(val
|
|
|
50
57
|
});
|
|
51
58
|
return {
|
|
52
59
|
unsupportedNodes: unsupportedNodes,
|
|
53
|
-
supportedNodes: supportedNodes
|
|
60
|
+
supportedNodes: supportedNodes,
|
|
61
|
+
unsupportedNodeTypeCount: unsupportedNodeTypeCount
|
|
54
62
|
};
|
|
55
63
|
};
|
|
56
64
|
var mapUnsupportedContentLevelToSeverity = function mapUnsupportedContentLevelToSeverity(unsupportedContentLevelPercent, thresholds) {
|
|
@@ -93,7 +101,8 @@ var mapUnsupportedContentLevelToSeverity = function mapUnsupportedContentLevelTo
|
|
|
93
101
|
var getUnsupportedContentLevelData = exports.getUnsupportedContentLevelData = function getUnsupportedContentLevelData(validDocument, customThresholds) {
|
|
94
102
|
var _countSupportedUnsupp = countSupportedUnsupportedNodes(validDocument),
|
|
95
103
|
unsupportedNodes = _countSupportedUnsupp.unsupportedNodes,
|
|
96
|
-
supportedNodes = _countSupportedUnsupp.supportedNodes
|
|
104
|
+
supportedNodes = _countSupportedUnsupp.supportedNodes,
|
|
105
|
+
unsupportedNodeTypeCount = _countSupportedUnsupp.unsupportedNodeTypeCount;
|
|
97
106
|
var thresholds = buildUnsupportedContentLevelThresholds(customThresholds);
|
|
98
107
|
var percentage = Math.round(unsupportedNodes / (unsupportedNodes + supportedNodes) * 100);
|
|
99
108
|
var severity = mapUnsupportedContentLevelToSeverity(percentage, thresholds);
|
|
@@ -102,7 +111,8 @@ var getUnsupportedContentLevelData = exports.getUnsupportedContentLevelData = fu
|
|
|
102
111
|
percentage: percentage,
|
|
103
112
|
counts: {
|
|
104
113
|
supportedNodes: supportedNodes,
|
|
105
|
-
unsupportedNodes: unsupportedNodes
|
|
114
|
+
unsupportedNodes: unsupportedNodes,
|
|
115
|
+
unsupportedNodeTypeCount: unsupportedNodeTypeCount
|
|
106
116
|
}
|
|
107
117
|
};
|
|
108
118
|
};
|
|
@@ -171,4 +171,15 @@ export const telepointerStyle = css`
|
|
|
171
171
|
|
|
172
172
|
${colors.map((color, index) => telepointerColorStyle(color, index))};
|
|
173
173
|
}
|
|
174
|
-
`;
|
|
174
|
+
`;
|
|
175
|
+
const tintKey = 'collab:isDirtyTransaction';
|
|
176
|
+
export const isDirtyTransaction = tr => {
|
|
177
|
+
return Boolean(tr.getMeta(tintKey));
|
|
178
|
+
};
|
|
179
|
+
/*
|
|
180
|
+
* This function is used to mark which commands that are dispatching
|
|
181
|
+
* unnecessary changes on Editor.
|
|
182
|
+
*/
|
|
183
|
+
export const tintDirtyTransaction = tr => {
|
|
184
|
+
tr.setMeta(tintKey, true);
|
|
185
|
+
};
|
|
@@ -45,8 +45,13 @@ export const messages = defineMessages({
|
|
|
45
45
|
defaultMessage: 'Insert column right',
|
|
46
46
|
description: 'Inserts a new column to the right of selected column.'
|
|
47
47
|
},
|
|
48
|
-
|
|
49
|
-
id: 'fabric.editor.
|
|
48
|
+
addColumnLeft: {
|
|
49
|
+
id: 'fabric.editor.addColumnLeft',
|
|
50
|
+
defaultMessage: 'Add column left',
|
|
51
|
+
description: 'Adds a new column to the left of selected column.'
|
|
52
|
+
},
|
|
53
|
+
addColumnRight: {
|
|
54
|
+
id: 'fabric.editor.addColumnRight',
|
|
50
55
|
defaultMessage: 'Add column right',
|
|
51
56
|
description: 'Adds a new column to the right of selected column.'
|
|
52
57
|
},
|
|
@@ -65,11 +70,36 @@ export const messages = defineMessages({
|
|
|
65
70
|
defaultMessage: 'Insert row below',
|
|
66
71
|
description: 'Inserts a new row below the selected row.'
|
|
67
72
|
},
|
|
68
|
-
|
|
69
|
-
id: 'fabric.editor.
|
|
73
|
+
addRowAbove: {
|
|
74
|
+
id: 'fabric.editor.addRowAbove',
|
|
75
|
+
defaultMessage: 'Add row above',
|
|
76
|
+
description: 'Adds a new row above the selected row.'
|
|
77
|
+
},
|
|
78
|
+
addRowBelow: {
|
|
79
|
+
id: 'fabric.editor.addRowBelow',
|
|
70
80
|
defaultMessage: 'Add row below',
|
|
71
81
|
description: 'Adds a new row below the selected row.'
|
|
72
82
|
},
|
|
83
|
+
moveColumnLeft: {
|
|
84
|
+
id: 'fabric.editor.moveColumnLeft',
|
|
85
|
+
defaultMessage: 'Move {0, plural, one {column} other {columns}} left',
|
|
86
|
+
description: 'Moves a column or columns to the left.'
|
|
87
|
+
},
|
|
88
|
+
moveColumnRight: {
|
|
89
|
+
id: 'fabric.editor.moveColumnRight',
|
|
90
|
+
defaultMessage: 'Move {0, plural, one {column} other {columns}} right',
|
|
91
|
+
description: 'Moves a column or columns to the right.'
|
|
92
|
+
},
|
|
93
|
+
moveRowUp: {
|
|
94
|
+
id: 'fabric.editor.moveRowUp',
|
|
95
|
+
defaultMessage: 'Move {0, plural, one {row} other {rows}} up',
|
|
96
|
+
description: 'Moves a row or selected rows up.'
|
|
97
|
+
},
|
|
98
|
+
moveRowDown: {
|
|
99
|
+
id: 'fabric.editor.moveDownDown',
|
|
100
|
+
defaultMessage: 'Move {0, plural, one {row} other {rows}} down',
|
|
101
|
+
description: 'Moves a row or selected rows down.'
|
|
102
|
+
},
|
|
73
103
|
insertRowDrag: {
|
|
74
104
|
id: 'fabric.editor.insertRowDrag',
|
|
75
105
|
defaultMessage: 'Insert row',
|
|
@@ -80,6 +110,11 @@ export const messages = defineMessages({
|
|
|
80
110
|
defaultMessage: 'Delete {0, plural, one {row} other {rows}}',
|
|
81
111
|
description: 'Deletes a table row.'
|
|
82
112
|
},
|
|
113
|
+
rowNumbers: {
|
|
114
|
+
id: 'fabrid.editor.rowNumbers',
|
|
115
|
+
defaultMessage: 'Row numbers',
|
|
116
|
+
desciption: 'Adds a number to each row except header row'
|
|
117
|
+
},
|
|
83
118
|
cellOptions: {
|
|
84
119
|
id: 'fabric.editor.cellOptions',
|
|
85
120
|
defaultMessage: 'Cell options',
|
|
@@ -160,6 +195,16 @@ export const messages = defineMessages({
|
|
|
160
195
|
defaultMessage: 'Sort column Z → A',
|
|
161
196
|
description: 'Sort column in descending order'
|
|
162
197
|
},
|
|
198
|
+
sortColumnIncreasing: {
|
|
199
|
+
id: 'fabric.editor.sortColumnIncreasing',
|
|
200
|
+
defaultMessage: 'Sort increasing',
|
|
201
|
+
description: 'Sort column in ascending order'
|
|
202
|
+
},
|
|
203
|
+
sortColumnDecreasing: {
|
|
204
|
+
id: 'fabric.editor.sortColumnDecreasing',
|
|
205
|
+
defaultMessage: 'Sort decreasing',
|
|
206
|
+
description: 'Sort column in descending order'
|
|
207
|
+
},
|
|
163
208
|
canNotSortTable: {
|
|
164
209
|
id: 'fabric.editor.canNotSortTable',
|
|
165
210
|
defaultMessage: `⚠️ You can't sort a table with merged cells`,
|
|
@@ -174,5 +219,15 @@ export const messages = defineMessages({
|
|
|
174
219
|
id: 'fabric.editor.rowControl',
|
|
175
220
|
defaultMessage: 'Highlight row',
|
|
176
221
|
description: 'A button on the left of each row that shows up when the table is in focus. Clicking on it will select the entire row.'
|
|
222
|
+
},
|
|
223
|
+
rowDragHandle: {
|
|
224
|
+
id: 'fabric.editor.rowDragHandle',
|
|
225
|
+
defaultMessage: 'Row options',
|
|
226
|
+
description: 'The row drag handle to move the row within the table. Click to open a menu for more row options.'
|
|
227
|
+
},
|
|
228
|
+
columnDragHandle: {
|
|
229
|
+
id: 'fabric.editor.columnDragHandle',
|
|
230
|
+
defaultMessage: 'Column options',
|
|
231
|
+
description: 'The column drag handle to move the column within the table. Click to open a menu for more column options.'
|
|
177
232
|
}
|
|
178
233
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
2
2
|
const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
3
|
-
const packageVersion = "76.39.
|
|
3
|
+
const packageVersion = "76.39.3";
|
|
4
4
|
const sanitiseSentryEvents = (data, _hint) => {
|
|
5
5
|
// Remove URL as it has UGC
|
|
6
6
|
// TODO: Sanitise the URL instead of just removing it
|
|
@@ -7,7 +7,7 @@ import { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents } from '@
|
|
|
7
7
|
import { N0, N50A, N60A, N900 } from '@atlaskit/theme/colors';
|
|
8
8
|
import Layer from '../Layer';
|
|
9
9
|
const packageName = "@atlaskit/editor-common";
|
|
10
|
-
const packageVersion = "76.39.
|
|
10
|
+
const packageVersion = "76.39.3";
|
|
11
11
|
const halfFocusRing = 1;
|
|
12
12
|
const dropOffset = '0, 8';
|
|
13
13
|
class DropList extends Component {
|
|
@@ -18,9 +18,10 @@ const buildUnsupportedContentLevelThresholds = customThresholds => {
|
|
|
18
18
|
const countSupportedUnsupportedNodes = validDocument => {
|
|
19
19
|
let unsupportedNodes = 0;
|
|
20
20
|
let supportedNodes = 0;
|
|
21
|
+
const unsupportedNodeTypeCount = {};
|
|
22
|
+
const unsupportedNodeTypes = ['unsupportedInline', 'unsupportedBlock', 'confluenceUnsupportedInline', 'confluenceUnsupportedBlock'];
|
|
21
23
|
traverse(validDocument, {
|
|
22
24
|
any: node => {
|
|
23
|
-
const unsupportedNodeTypes = ['unsupportedInline', 'unsupportedBlock', 'confluenceUnsupportedInline', 'confluenceUnsupportedBlock'];
|
|
24
25
|
if (unsupportedNodeTypes.includes(node.type)) {
|
|
25
26
|
var _node$attrs;
|
|
26
27
|
const originalNode = (_node$attrs = node.attrs) === null || _node$attrs === void 0 ? void 0 : _node$attrs.originalValue;
|
|
@@ -29,8 +30,14 @@ const countSupportedUnsupportedNodes = validDocument => {
|
|
|
29
30
|
// unsupported content nodes (with nested children contributing towards
|
|
30
31
|
// that count)
|
|
31
32
|
traverse(originalNode, {
|
|
32
|
-
any: () => {
|
|
33
|
+
any: (unsupportedNode, parent) => {
|
|
34
|
+
var _parent$parent$node$t, _parent$parent, _parent$parent$node, _unsupportedNode$type, _unsupportedNodeTypeC;
|
|
33
35
|
unsupportedNodes++;
|
|
36
|
+
|
|
37
|
+
// Count the types of unsupported nodes
|
|
38
|
+
const parentType = (_parent$parent$node$t = (_parent$parent = parent.parent) === null || _parent$parent === void 0 ? void 0 : (_parent$parent$node = _parent$parent.node) === null || _parent$parent$node === void 0 ? void 0 : _parent$parent$node.type) !== null && _parent$parent$node$t !== void 0 ? _parent$parent$node$t : 'unknown';
|
|
39
|
+
const type = `${parentType}/${(_unsupportedNode$type = unsupportedNode === null || unsupportedNode === void 0 ? void 0 : unsupportedNode.type) !== null && _unsupportedNode$type !== void 0 ? _unsupportedNode$type : 'unknown'}`;
|
|
40
|
+
unsupportedNodeTypeCount[type] = ((_unsupportedNodeTypeC = unsupportedNodeTypeCount === null || unsupportedNodeTypeCount === void 0 ? void 0 : unsupportedNodeTypeCount[type]) !== null && _unsupportedNodeTypeC !== void 0 ? _unsupportedNodeTypeC : 0) + 1;
|
|
34
41
|
}
|
|
35
42
|
});
|
|
36
43
|
}
|
|
@@ -44,7 +51,8 @@ const countSupportedUnsupportedNodes = validDocument => {
|
|
|
44
51
|
});
|
|
45
52
|
return {
|
|
46
53
|
unsupportedNodes,
|
|
47
|
-
supportedNodes
|
|
54
|
+
supportedNodes,
|
|
55
|
+
unsupportedNodeTypeCount
|
|
48
56
|
};
|
|
49
57
|
};
|
|
50
58
|
const mapUnsupportedContentLevelToSeverity = (unsupportedContentLevelPercent, thresholds) => {
|
|
@@ -87,7 +95,8 @@ const mapUnsupportedContentLevelToSeverity = (unsupportedContentLevelPercent, th
|
|
|
87
95
|
export const getUnsupportedContentLevelData = (validDocument, customThresholds) => {
|
|
88
96
|
const {
|
|
89
97
|
unsupportedNodes,
|
|
90
|
-
supportedNodes
|
|
98
|
+
supportedNodes,
|
|
99
|
+
unsupportedNodeTypeCount
|
|
91
100
|
} = countSupportedUnsupportedNodes(validDocument);
|
|
92
101
|
const thresholds = buildUnsupportedContentLevelThresholds(customThresholds);
|
|
93
102
|
const percentage = Math.round(unsupportedNodes / (unsupportedNodes + supportedNodes) * 100);
|
|
@@ -97,7 +106,8 @@ export const getUnsupportedContentLevelData = (validDocument, customThresholds)
|
|
|
97
106
|
percentage,
|
|
98
107
|
counts: {
|
|
99
108
|
supportedNodes,
|
|
100
|
-
unsupportedNodes
|
|
109
|
+
unsupportedNodes,
|
|
110
|
+
unsupportedNodeTypeCount
|
|
101
111
|
}
|
|
102
112
|
};
|
|
103
113
|
};
|
package/dist/esm/collab/index.js
CHANGED
|
@@ -140,4 +140,15 @@ var telepointerColorStyle = function telepointerColorStyle(color, index) {
|
|
|
140
140
|
export var TELEPOINTER_DIM_CLASS = 'telepointer-dim';
|
|
141
141
|
export var telepointerStyle = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .ProseMirror .telepointer {\n position: relative;\n transition: opacity 200ms;\n\n &.telepointer-selection {\n line-height: 1.2;\n pointer-events: none;\n user-select: none;\n }\n\n &.telepointer-selection-badge::after {\n content: attr(data-initial);\n position: absolute;\n display: block;\n top: -14px;\n font-size: ", ";\n padding: ", ";\n color: ", ";\n left: -1px;\n border-radius: 2px 2px 2px 0;\n line-height: initial;\n }\n\n &.", " {\n opacity: 0.2;\n }\n\n ", ";\n }\n"])), relativeFontSizeToBase16(9), "var(--ds-space-025, 2px)", "var(--ds-text-inverse, white)", TELEPOINTER_DIM_CLASS, colors.map(function (color, index) {
|
|
142
142
|
return telepointerColorStyle(color, index);
|
|
143
|
-
}));
|
|
143
|
+
}));
|
|
144
|
+
var tintKey = 'collab:isDirtyTransaction';
|
|
145
|
+
export var isDirtyTransaction = function isDirtyTransaction(tr) {
|
|
146
|
+
return Boolean(tr.getMeta(tintKey));
|
|
147
|
+
};
|
|
148
|
+
/*
|
|
149
|
+
* This function is used to mark which commands that are dispatching
|
|
150
|
+
* unnecessary changes on Editor.
|
|
151
|
+
*/
|
|
152
|
+
export var tintDirtyTransaction = function tintDirtyTransaction(tr) {
|
|
153
|
+
tr.setMeta(tintKey, true);
|
|
154
|
+
};
|
|
@@ -45,8 +45,13 @@ export var messages = defineMessages({
|
|
|
45
45
|
defaultMessage: 'Insert column right',
|
|
46
46
|
description: 'Inserts a new column to the right of selected column.'
|
|
47
47
|
},
|
|
48
|
-
|
|
49
|
-
id: 'fabric.editor.
|
|
48
|
+
addColumnLeft: {
|
|
49
|
+
id: 'fabric.editor.addColumnLeft',
|
|
50
|
+
defaultMessage: 'Add column left',
|
|
51
|
+
description: 'Adds a new column to the left of selected column.'
|
|
52
|
+
},
|
|
53
|
+
addColumnRight: {
|
|
54
|
+
id: 'fabric.editor.addColumnRight',
|
|
50
55
|
defaultMessage: 'Add column right',
|
|
51
56
|
description: 'Adds a new column to the right of selected column.'
|
|
52
57
|
},
|
|
@@ -65,11 +70,36 @@ export var messages = defineMessages({
|
|
|
65
70
|
defaultMessage: 'Insert row below',
|
|
66
71
|
description: 'Inserts a new row below the selected row.'
|
|
67
72
|
},
|
|
68
|
-
|
|
69
|
-
id: 'fabric.editor.
|
|
73
|
+
addRowAbove: {
|
|
74
|
+
id: 'fabric.editor.addRowAbove',
|
|
75
|
+
defaultMessage: 'Add row above',
|
|
76
|
+
description: 'Adds a new row above the selected row.'
|
|
77
|
+
},
|
|
78
|
+
addRowBelow: {
|
|
79
|
+
id: 'fabric.editor.addRowBelow',
|
|
70
80
|
defaultMessage: 'Add row below',
|
|
71
81
|
description: 'Adds a new row below the selected row.'
|
|
72
82
|
},
|
|
83
|
+
moveColumnLeft: {
|
|
84
|
+
id: 'fabric.editor.moveColumnLeft',
|
|
85
|
+
defaultMessage: 'Move {0, plural, one {column} other {columns}} left',
|
|
86
|
+
description: 'Moves a column or columns to the left.'
|
|
87
|
+
},
|
|
88
|
+
moveColumnRight: {
|
|
89
|
+
id: 'fabric.editor.moveColumnRight',
|
|
90
|
+
defaultMessage: 'Move {0, plural, one {column} other {columns}} right',
|
|
91
|
+
description: 'Moves a column or columns to the right.'
|
|
92
|
+
},
|
|
93
|
+
moveRowUp: {
|
|
94
|
+
id: 'fabric.editor.moveRowUp',
|
|
95
|
+
defaultMessage: 'Move {0, plural, one {row} other {rows}} up',
|
|
96
|
+
description: 'Moves a row or selected rows up.'
|
|
97
|
+
},
|
|
98
|
+
moveRowDown: {
|
|
99
|
+
id: 'fabric.editor.moveDownDown',
|
|
100
|
+
defaultMessage: 'Move {0, plural, one {row} other {rows}} down',
|
|
101
|
+
description: 'Moves a row or selected rows down.'
|
|
102
|
+
},
|
|
73
103
|
insertRowDrag: {
|
|
74
104
|
id: 'fabric.editor.insertRowDrag',
|
|
75
105
|
defaultMessage: 'Insert row',
|
|
@@ -80,6 +110,11 @@ export var messages = defineMessages({
|
|
|
80
110
|
defaultMessage: 'Delete {0, plural, one {row} other {rows}}',
|
|
81
111
|
description: 'Deletes a table row.'
|
|
82
112
|
},
|
|
113
|
+
rowNumbers: {
|
|
114
|
+
id: 'fabrid.editor.rowNumbers',
|
|
115
|
+
defaultMessage: 'Row numbers',
|
|
116
|
+
desciption: 'Adds a number to each row except header row'
|
|
117
|
+
},
|
|
83
118
|
cellOptions: {
|
|
84
119
|
id: 'fabric.editor.cellOptions',
|
|
85
120
|
defaultMessage: 'Cell options',
|
|
@@ -160,6 +195,16 @@ export var messages = defineMessages({
|
|
|
160
195
|
defaultMessage: 'Sort column Z → A',
|
|
161
196
|
description: 'Sort column in descending order'
|
|
162
197
|
},
|
|
198
|
+
sortColumnIncreasing: {
|
|
199
|
+
id: 'fabric.editor.sortColumnIncreasing',
|
|
200
|
+
defaultMessage: 'Sort increasing',
|
|
201
|
+
description: 'Sort column in ascending order'
|
|
202
|
+
},
|
|
203
|
+
sortColumnDecreasing: {
|
|
204
|
+
id: 'fabric.editor.sortColumnDecreasing',
|
|
205
|
+
defaultMessage: 'Sort decreasing',
|
|
206
|
+
description: 'Sort column in descending order'
|
|
207
|
+
},
|
|
163
208
|
canNotSortTable: {
|
|
164
209
|
id: 'fabric.editor.canNotSortTable',
|
|
165
210
|
defaultMessage: "\u26A0\uFE0F You can't sort a table with merged cells",
|
|
@@ -174,5 +219,15 @@ export var messages = defineMessages({
|
|
|
174
219
|
id: 'fabric.editor.rowControl',
|
|
175
220
|
defaultMessage: 'Highlight row',
|
|
176
221
|
description: 'A button on the left of each row that shows up when the table is in focus. Clicking on it will select the entire row.'
|
|
222
|
+
},
|
|
223
|
+
rowDragHandle: {
|
|
224
|
+
id: 'fabric.editor.rowDragHandle',
|
|
225
|
+
defaultMessage: 'Row options',
|
|
226
|
+
description: 'The row drag handle to move the row within the table. Click to open a menu for more row options.'
|
|
227
|
+
},
|
|
228
|
+
columnDragHandle: {
|
|
229
|
+
id: 'fabric.editor.columnDragHandle',
|
|
230
|
+
defaultMessage: 'Column options',
|
|
231
|
+
description: 'The column drag handle to move the column within the table. Click to open a menu for more column options.'
|
|
177
232
|
}
|
|
178
233
|
});
|
|
@@ -6,7 +6,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
6
6
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
7
7
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
8
8
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
9
|
-
var packageVersion = "76.39.
|
|
9
|
+
var packageVersion = "76.39.3";
|
|
10
10
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
11
11
|
// Remove URL as it has UGC
|
|
12
12
|
// TODO: Sanitise the URL instead of just removing it
|
|
@@ -17,7 +17,7 @@ import { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents } from '@
|
|
|
17
17
|
import { N0, N50A, N60A, N900 } from '@atlaskit/theme/colors';
|
|
18
18
|
import Layer from '../Layer';
|
|
19
19
|
var packageName = "@atlaskit/editor-common";
|
|
20
|
-
var packageVersion = "76.39.
|
|
20
|
+
var packageVersion = "76.39.3";
|
|
21
21
|
var halfFocusRing = 1;
|
|
22
22
|
var dropOffset = '0, 8';
|
|
23
23
|
var DropList = /*#__PURE__*/function (_Component) {
|
|
@@ -18,9 +18,10 @@ var buildUnsupportedContentLevelThresholds = function buildUnsupportedContentLev
|
|
|
18
18
|
var countSupportedUnsupportedNodes = function countSupportedUnsupportedNodes(validDocument) {
|
|
19
19
|
var unsupportedNodes = 0;
|
|
20
20
|
var supportedNodes = 0;
|
|
21
|
+
var unsupportedNodeTypeCount = {};
|
|
22
|
+
var unsupportedNodeTypes = ['unsupportedInline', 'unsupportedBlock', 'confluenceUnsupportedInline', 'confluenceUnsupportedBlock'];
|
|
21
23
|
traverse(validDocument, {
|
|
22
24
|
any: function any(node) {
|
|
23
|
-
var unsupportedNodeTypes = ['unsupportedInline', 'unsupportedBlock', 'confluenceUnsupportedInline', 'confluenceUnsupportedBlock'];
|
|
24
25
|
if (unsupportedNodeTypes.includes(node.type)) {
|
|
25
26
|
var _node$attrs;
|
|
26
27
|
var originalNode = (_node$attrs = node.attrs) === null || _node$attrs === void 0 ? void 0 : _node$attrs.originalValue;
|
|
@@ -29,8 +30,14 @@ var countSupportedUnsupportedNodes = function countSupportedUnsupportedNodes(val
|
|
|
29
30
|
// unsupported content nodes (with nested children contributing towards
|
|
30
31
|
// that count)
|
|
31
32
|
traverse(originalNode, {
|
|
32
|
-
any: function any() {
|
|
33
|
+
any: function any(unsupportedNode, parent) {
|
|
34
|
+
var _parent$parent$node$t, _parent$parent, _unsupportedNode$type, _unsupportedNodeTypeC;
|
|
33
35
|
unsupportedNodes++;
|
|
36
|
+
|
|
37
|
+
// Count the types of unsupported nodes
|
|
38
|
+
var parentType = (_parent$parent$node$t = (_parent$parent = parent.parent) === null || _parent$parent === void 0 || (_parent$parent = _parent$parent.node) === null || _parent$parent === void 0 ? void 0 : _parent$parent.type) !== null && _parent$parent$node$t !== void 0 ? _parent$parent$node$t : 'unknown';
|
|
39
|
+
var type = "".concat(parentType, "/").concat((_unsupportedNode$type = unsupportedNode === null || unsupportedNode === void 0 ? void 0 : unsupportedNode.type) !== null && _unsupportedNode$type !== void 0 ? _unsupportedNode$type : 'unknown');
|
|
40
|
+
unsupportedNodeTypeCount[type] = ((_unsupportedNodeTypeC = unsupportedNodeTypeCount === null || unsupportedNodeTypeCount === void 0 ? void 0 : unsupportedNodeTypeCount[type]) !== null && _unsupportedNodeTypeC !== void 0 ? _unsupportedNodeTypeC : 0) + 1;
|
|
34
41
|
}
|
|
35
42
|
});
|
|
36
43
|
}
|
|
@@ -44,7 +51,8 @@ var countSupportedUnsupportedNodes = function countSupportedUnsupportedNodes(val
|
|
|
44
51
|
});
|
|
45
52
|
return {
|
|
46
53
|
unsupportedNodes: unsupportedNodes,
|
|
47
|
-
supportedNodes: supportedNodes
|
|
54
|
+
supportedNodes: supportedNodes,
|
|
55
|
+
unsupportedNodeTypeCount: unsupportedNodeTypeCount
|
|
48
56
|
};
|
|
49
57
|
};
|
|
50
58
|
var mapUnsupportedContentLevelToSeverity = function mapUnsupportedContentLevelToSeverity(unsupportedContentLevelPercent, thresholds) {
|
|
@@ -87,7 +95,8 @@ var mapUnsupportedContentLevelToSeverity = function mapUnsupportedContentLevelTo
|
|
|
87
95
|
export var getUnsupportedContentLevelData = function getUnsupportedContentLevelData(validDocument, customThresholds) {
|
|
88
96
|
var _countSupportedUnsupp = countSupportedUnsupportedNodes(validDocument),
|
|
89
97
|
unsupportedNodes = _countSupportedUnsupp.unsupportedNodes,
|
|
90
|
-
supportedNodes = _countSupportedUnsupp.supportedNodes
|
|
98
|
+
supportedNodes = _countSupportedUnsupp.supportedNodes,
|
|
99
|
+
unsupportedNodeTypeCount = _countSupportedUnsupp.unsupportedNodeTypeCount;
|
|
91
100
|
var thresholds = buildUnsupportedContentLevelThresholds(customThresholds);
|
|
92
101
|
var percentage = Math.round(unsupportedNodes / (unsupportedNodes + supportedNodes) * 100);
|
|
93
102
|
var severity = mapUnsupportedContentLevelToSeverity(percentage, thresholds);
|
|
@@ -96,7 +105,8 @@ export var getUnsupportedContentLevelData = function getUnsupportedContentLevelD
|
|
|
96
105
|
percentage: percentage,
|
|
97
106
|
counts: {
|
|
98
107
|
supportedNodes: supportedNodes,
|
|
99
|
-
unsupportedNodes: unsupportedNodes
|
|
108
|
+
unsupportedNodes: unsupportedNodes,
|
|
109
|
+
unsupportedNodeTypeCount: unsupportedNodeTypeCount
|
|
100
110
|
}
|
|
101
111
|
};
|
|
102
112
|
};
|
|
@@ -9,7 +9,11 @@ type MediaLinkActionType = ACTION.ADDED | ACTION.EDITED | ACTION.DELETED | ACTIO
|
|
|
9
9
|
export type MediaLinkAEP = TrackAEP<MediaLinkActionType, ACTION_SUBJECT.MEDIA, ACTION_SUBJECT_ID.LINK, any, undefined>;
|
|
10
10
|
type MediaCaptionActionType = ACTION.DELETED | ACTION.EDITED | ACTION.ADDED;
|
|
11
11
|
export type CaptionTrackAction = TrackAEP<MediaCaptionActionType, ACTION_SUBJECT.MEDIA_SINGLE, ACTION_SUBJECT_ID.CAPTION, any, undefined>;
|
|
12
|
-
type
|
|
12
|
+
type MediaAltTextAttributes = {
|
|
13
|
+
type: 'mediaSingle' | 'mediaInline';
|
|
14
|
+
mediaType: 'image' | 'file' | 'external';
|
|
15
|
+
};
|
|
16
|
+
type MediaAltTextAction = TrackAEP<ACTION.ADDED | ACTION.CLOSED | ACTION.EDITED | ACTION.CLEARED | ACTION.OPENED, ACTION_SUBJECT.MEDIA, ACTION_SUBJECT_ID.ALT_TEXT, MediaAltTextAttributes, undefined>;
|
|
13
17
|
type MediaUIAction = UIAEP<ACTION.EDITED, ACTION_SUBJECT.MEDIA_SINGLE | ACTION_SUBJECT.EMBEDS, ACTION_SUBJECT_ID.RESIZED, any, undefined>;
|
|
14
18
|
type MediaResizeAttributes = {
|
|
15
19
|
width?: number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ReactElement } from 'react';
|
|
2
2
|
import type { JSONDocNode } from '@atlaskit/editor-json-transformer';
|
|
3
|
-
import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
3
|
+
import type { EditorState, ReadonlyTransaction, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
4
4
|
import type { Step } from '@atlaskit/editor-prosemirror/transform';
|
|
5
5
|
import type { Providers } from '../provider-factory';
|
|
6
6
|
export type NewCollabSyncUpErrorAttributes = {
|
|
@@ -383,4 +383,6 @@ export interface Color {
|
|
|
383
383
|
export declare const colors: Color[];
|
|
384
384
|
export declare const TELEPOINTER_DIM_CLASS = "telepointer-dim";
|
|
385
385
|
export declare const telepointerStyle: import("@emotion/react").SerializedStyles;
|
|
386
|
+
export declare const isDirtyTransaction: (tr: Transaction | ReadonlyTransaction) => boolean;
|
|
387
|
+
export declare const tintDirtyTransaction: (tr: Transaction) => void;
|
|
386
388
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ExtractPluginSharedState, NextEditorPlugin, PluginDependenciesAPI, PublicPluginAPI } from '../types/next-editor-plugin';
|
|
2
|
-
type NamedPluginStatesFromInjectionAPI<API extends PublicPluginAPI<any> | undefined, PluginList extends string[]> = Readonly<{
|
|
2
|
+
type NamedPluginStatesFromInjectionAPI<API extends PublicPluginAPI<any> | null | undefined, PluginList extends string[]> = Readonly<{
|
|
3
3
|
[K in PluginList[number] as `${K}State`]: API extends PublicPluginAPI<any> ? API[K] extends PluginDependenciesAPI<infer Plugin> | undefined ? ExtractPluginSharedState<Plugin> | undefined : never : never;
|
|
4
4
|
}>;
|
|
5
5
|
type ExtractPluginNames<API extends PublicPluginAPI<any>> = API extends PublicPluginAPI<any> ? keyof API : never;
|
|
@@ -64,5 +64,5 @@ type ExtractPluginNames<API extends PublicPluginAPI<any>> = API extends PublicPl
|
|
|
64
64
|
* @returns A corresponding object, the keys are names of the plugin with `State` appended,
|
|
65
65
|
* the values are the shared state exposed by that plugin.
|
|
66
66
|
*/
|
|
67
|
-
export declare function useSharedPluginState<Plugins extends NextEditorPlugin<any, any>[], PluginNames extends ExtractPluginNames<PublicPluginAPI<Plugins>>[]>(injectionApi: PublicPluginAPI<Plugins> | undefined, plugins: PluginNames): NamedPluginStatesFromInjectionAPI<typeof injectionApi, PluginNames>;
|
|
67
|
+
export declare function useSharedPluginState<Plugins extends NextEditorPlugin<any, any>[], PluginNames extends ExtractPluginNames<PublicPluginAPI<Plugins>>[]>(injectionApi: PublicPluginAPI<Plugins> | null | undefined, plugins: PluginNames): NamedPluginStatesFromInjectionAPI<typeof injectionApi, PluginNames>;
|
|
68
68
|
export {};
|
|
@@ -44,7 +44,12 @@ export declare const messages: {
|
|
|
44
44
|
defaultMessage: string;
|
|
45
45
|
description: string;
|
|
46
46
|
};
|
|
47
|
-
|
|
47
|
+
addColumnLeft: {
|
|
48
|
+
id: string;
|
|
49
|
+
defaultMessage: string;
|
|
50
|
+
description: string;
|
|
51
|
+
};
|
|
52
|
+
addColumnRight: {
|
|
48
53
|
id: string;
|
|
49
54
|
defaultMessage: string;
|
|
50
55
|
description: string;
|
|
@@ -64,7 +69,32 @@ export declare const messages: {
|
|
|
64
69
|
defaultMessage: string;
|
|
65
70
|
description: string;
|
|
66
71
|
};
|
|
67
|
-
|
|
72
|
+
addRowAbove: {
|
|
73
|
+
id: string;
|
|
74
|
+
defaultMessage: string;
|
|
75
|
+
description: string;
|
|
76
|
+
};
|
|
77
|
+
addRowBelow: {
|
|
78
|
+
id: string;
|
|
79
|
+
defaultMessage: string;
|
|
80
|
+
description: string;
|
|
81
|
+
};
|
|
82
|
+
moveColumnLeft: {
|
|
83
|
+
id: string;
|
|
84
|
+
defaultMessage: string;
|
|
85
|
+
description: string;
|
|
86
|
+
};
|
|
87
|
+
moveColumnRight: {
|
|
88
|
+
id: string;
|
|
89
|
+
defaultMessage: string;
|
|
90
|
+
description: string;
|
|
91
|
+
};
|
|
92
|
+
moveRowUp: {
|
|
93
|
+
id: string;
|
|
94
|
+
defaultMessage: string;
|
|
95
|
+
description: string;
|
|
96
|
+
};
|
|
97
|
+
moveRowDown: {
|
|
68
98
|
id: string;
|
|
69
99
|
defaultMessage: string;
|
|
70
100
|
description: string;
|
|
@@ -79,6 +109,11 @@ export declare const messages: {
|
|
|
79
109
|
defaultMessage: string;
|
|
80
110
|
description: string;
|
|
81
111
|
};
|
|
112
|
+
rowNumbers: {
|
|
113
|
+
id: string;
|
|
114
|
+
defaultMessage: string;
|
|
115
|
+
desciption: string;
|
|
116
|
+
};
|
|
82
117
|
cellOptions: {
|
|
83
118
|
id: string;
|
|
84
119
|
defaultMessage: string;
|
|
@@ -159,6 +194,16 @@ export declare const messages: {
|
|
|
159
194
|
defaultMessage: string;
|
|
160
195
|
description: string;
|
|
161
196
|
};
|
|
197
|
+
sortColumnIncreasing: {
|
|
198
|
+
id: string;
|
|
199
|
+
defaultMessage: string;
|
|
200
|
+
description: string;
|
|
201
|
+
};
|
|
202
|
+
sortColumnDecreasing: {
|
|
203
|
+
id: string;
|
|
204
|
+
defaultMessage: string;
|
|
205
|
+
description: string;
|
|
206
|
+
};
|
|
162
207
|
canNotSortTable: {
|
|
163
208
|
id: string;
|
|
164
209
|
defaultMessage: string;
|
|
@@ -174,4 +219,14 @@ export declare const messages: {
|
|
|
174
219
|
defaultMessage: string;
|
|
175
220
|
description: string;
|
|
176
221
|
};
|
|
222
|
+
rowDragHandle: {
|
|
223
|
+
id: string;
|
|
224
|
+
defaultMessage: string;
|
|
225
|
+
description: string;
|
|
226
|
+
};
|
|
227
|
+
columnDragHandle: {
|
|
228
|
+
id: string;
|
|
229
|
+
defaultMessage: string;
|
|
230
|
+
description: string;
|
|
231
|
+
};
|
|
177
232
|
};
|
|
@@ -9,7 +9,11 @@ type MediaLinkActionType = ACTION.ADDED | ACTION.EDITED | ACTION.DELETED | ACTIO
|
|
|
9
9
|
export type MediaLinkAEP = TrackAEP<MediaLinkActionType, ACTION_SUBJECT.MEDIA, ACTION_SUBJECT_ID.LINK, any, undefined>;
|
|
10
10
|
type MediaCaptionActionType = ACTION.DELETED | ACTION.EDITED | ACTION.ADDED;
|
|
11
11
|
export type CaptionTrackAction = TrackAEP<MediaCaptionActionType, ACTION_SUBJECT.MEDIA_SINGLE, ACTION_SUBJECT_ID.CAPTION, any, undefined>;
|
|
12
|
-
type
|
|
12
|
+
type MediaAltTextAttributes = {
|
|
13
|
+
type: 'mediaSingle' | 'mediaInline';
|
|
14
|
+
mediaType: 'image' | 'file' | 'external';
|
|
15
|
+
};
|
|
16
|
+
type MediaAltTextAction = TrackAEP<ACTION.ADDED | ACTION.CLOSED | ACTION.EDITED | ACTION.CLEARED | ACTION.OPENED, ACTION_SUBJECT.MEDIA, ACTION_SUBJECT_ID.ALT_TEXT, MediaAltTextAttributes, undefined>;
|
|
13
17
|
type MediaUIAction = UIAEP<ACTION.EDITED, ACTION_SUBJECT.MEDIA_SINGLE | ACTION_SUBJECT.EMBEDS, ACTION_SUBJECT_ID.RESIZED, any, undefined>;
|
|
14
18
|
type MediaResizeAttributes = {
|
|
15
19
|
width?: number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ReactElement } from 'react';
|
|
2
2
|
import type { JSONDocNode } from '@atlaskit/editor-json-transformer';
|
|
3
|
-
import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
3
|
+
import type { EditorState, ReadonlyTransaction, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
4
4
|
import type { Step } from '@atlaskit/editor-prosemirror/transform';
|
|
5
5
|
import type { Providers } from '../provider-factory';
|
|
6
6
|
export type NewCollabSyncUpErrorAttributes = {
|
|
@@ -383,4 +383,6 @@ export interface Color {
|
|
|
383
383
|
export declare const colors: Color[];
|
|
384
384
|
export declare const TELEPOINTER_DIM_CLASS = "telepointer-dim";
|
|
385
385
|
export declare const telepointerStyle: import("@emotion/react").SerializedStyles;
|
|
386
|
+
export declare const isDirtyTransaction: (tr: Transaction | ReadonlyTransaction) => boolean;
|
|
387
|
+
export declare const tintDirtyTransaction: (tr: Transaction) => void;
|
|
386
388
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ExtractPluginSharedState, NextEditorPlugin, PluginDependenciesAPI, PublicPluginAPI } from '../types/next-editor-plugin';
|
|
2
|
-
type NamedPluginStatesFromInjectionAPI<API extends PublicPluginAPI<any> | undefined, PluginList extends string[]> = Readonly<{
|
|
2
|
+
type NamedPluginStatesFromInjectionAPI<API extends PublicPluginAPI<any> | null | undefined, PluginList extends string[]> = Readonly<{
|
|
3
3
|
[K in PluginList[number] as `${K}State`]: API extends PublicPluginAPI<any> ? API[K] extends PluginDependenciesAPI<infer Plugin> | undefined ? ExtractPluginSharedState<Plugin> | undefined : never : never;
|
|
4
4
|
}>;
|
|
5
5
|
type ExtractPluginNames<API extends PublicPluginAPI<any>> = API extends PublicPluginAPI<any> ? keyof API : never;
|
|
@@ -64,5 +64,5 @@ type ExtractPluginNames<API extends PublicPluginAPI<any>> = API extends PublicPl
|
|
|
64
64
|
* @returns A corresponding object, the keys are names of the plugin with `State` appended,
|
|
65
65
|
* the values are the shared state exposed by that plugin.
|
|
66
66
|
*/
|
|
67
|
-
export declare function useSharedPluginState<Plugins extends NextEditorPlugin<any, any>[], PluginNames extends ExtractPluginNames<PublicPluginAPI<Plugins>>[]>(injectionApi: PublicPluginAPI<Plugins> | undefined, plugins: PluginNames): NamedPluginStatesFromInjectionAPI<typeof injectionApi, PluginNames>;
|
|
67
|
+
export declare function useSharedPluginState<Plugins extends NextEditorPlugin<any, any>[], PluginNames extends ExtractPluginNames<PublicPluginAPI<Plugins>>[]>(injectionApi: PublicPluginAPI<Plugins> | null | undefined, plugins: PluginNames): NamedPluginStatesFromInjectionAPI<typeof injectionApi, PluginNames>;
|
|
68
68
|
export {};
|
|
@@ -44,7 +44,12 @@ export declare const messages: {
|
|
|
44
44
|
defaultMessage: string;
|
|
45
45
|
description: string;
|
|
46
46
|
};
|
|
47
|
-
|
|
47
|
+
addColumnLeft: {
|
|
48
|
+
id: string;
|
|
49
|
+
defaultMessage: string;
|
|
50
|
+
description: string;
|
|
51
|
+
};
|
|
52
|
+
addColumnRight: {
|
|
48
53
|
id: string;
|
|
49
54
|
defaultMessage: string;
|
|
50
55
|
description: string;
|
|
@@ -64,7 +69,32 @@ export declare const messages: {
|
|
|
64
69
|
defaultMessage: string;
|
|
65
70
|
description: string;
|
|
66
71
|
};
|
|
67
|
-
|
|
72
|
+
addRowAbove: {
|
|
73
|
+
id: string;
|
|
74
|
+
defaultMessage: string;
|
|
75
|
+
description: string;
|
|
76
|
+
};
|
|
77
|
+
addRowBelow: {
|
|
78
|
+
id: string;
|
|
79
|
+
defaultMessage: string;
|
|
80
|
+
description: string;
|
|
81
|
+
};
|
|
82
|
+
moveColumnLeft: {
|
|
83
|
+
id: string;
|
|
84
|
+
defaultMessage: string;
|
|
85
|
+
description: string;
|
|
86
|
+
};
|
|
87
|
+
moveColumnRight: {
|
|
88
|
+
id: string;
|
|
89
|
+
defaultMessage: string;
|
|
90
|
+
description: string;
|
|
91
|
+
};
|
|
92
|
+
moveRowUp: {
|
|
93
|
+
id: string;
|
|
94
|
+
defaultMessage: string;
|
|
95
|
+
description: string;
|
|
96
|
+
};
|
|
97
|
+
moveRowDown: {
|
|
68
98
|
id: string;
|
|
69
99
|
defaultMessage: string;
|
|
70
100
|
description: string;
|
|
@@ -79,6 +109,11 @@ export declare const messages: {
|
|
|
79
109
|
defaultMessage: string;
|
|
80
110
|
description: string;
|
|
81
111
|
};
|
|
112
|
+
rowNumbers: {
|
|
113
|
+
id: string;
|
|
114
|
+
defaultMessage: string;
|
|
115
|
+
desciption: string;
|
|
116
|
+
};
|
|
82
117
|
cellOptions: {
|
|
83
118
|
id: string;
|
|
84
119
|
defaultMessage: string;
|
|
@@ -159,6 +194,16 @@ export declare const messages: {
|
|
|
159
194
|
defaultMessage: string;
|
|
160
195
|
description: string;
|
|
161
196
|
};
|
|
197
|
+
sortColumnIncreasing: {
|
|
198
|
+
id: string;
|
|
199
|
+
defaultMessage: string;
|
|
200
|
+
description: string;
|
|
201
|
+
};
|
|
202
|
+
sortColumnDecreasing: {
|
|
203
|
+
id: string;
|
|
204
|
+
defaultMessage: string;
|
|
205
|
+
description: string;
|
|
206
|
+
};
|
|
162
207
|
canNotSortTable: {
|
|
163
208
|
id: string;
|
|
164
209
|
defaultMessage: string;
|
|
@@ -174,4 +219,14 @@ export declare const messages: {
|
|
|
174
219
|
defaultMessage: string;
|
|
175
220
|
description: string;
|
|
176
221
|
};
|
|
222
|
+
rowDragHandle: {
|
|
223
|
+
id: string;
|
|
224
|
+
defaultMessage: string;
|
|
225
|
+
description: string;
|
|
226
|
+
};
|
|
227
|
+
columnDragHandle: {
|
|
228
|
+
id: string;
|
|
229
|
+
defaultMessage: string;
|
|
230
|
+
description: string;
|
|
231
|
+
};
|
|
177
232
|
};
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "76.39.
|
|
3
|
+
"version": "76.39.3",
|
|
4
4
|
"description": "A package that contains common classes and components for editor and renderer",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
7
7
|
},
|
|
8
|
-
"repository": "https://bitbucket.org/atlassian/atlassian-frontend",
|
|
8
|
+
"repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror",
|
|
9
9
|
"author": "Atlassian Pty Ltd",
|
|
10
10
|
"license": "Apache-2.0",
|
|
11
11
|
"main": "dist/cjs/index.js",
|
package/tsconfig.json
CHANGED
|
@@ -10,8 +10,9 @@
|
|
|
10
10
|
"./docs/**/*.ts",
|
|
11
11
|
"./docs/**/*.tsx",
|
|
12
12
|
"test-helpers/**/*.ts",
|
|
13
|
-
"test-helpers/**/*.tsx"
|
|
14
|
-
|
|
13
|
+
"test-helpers/**/*.tsx",
|
|
14
|
+
"../editor-core/src/utils/__tests__/unit/table.ts"
|
|
15
|
+
],
|
|
15
16
|
"exclude": [
|
|
16
17
|
"node_modules",
|
|
17
18
|
"src/json-schema",
|