@atlaskit/renderer 124.16.0 → 124.16.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/dist/cjs/actions/index.js +1 -1
- package/dist/cjs/react/index.js +4 -5
- package/dist/cjs/react/nodes/mediaInline.js +1 -1
- package/dist/cjs/react/nodes/multiBodiedExtensionOld.js +2 -2
- package/dist/cjs/text/nodes/date.js +1 -1
- package/dist/cjs/text/nodes/inlineCard.js +1 -1
- package/dist/cjs/text/nodes/mention.js +1 -1
- package/dist/cjs/text/nodes/status.js +1 -1
- package/dist/cjs/ui/Expand.js +0 -1
- package/dist/cjs/ui/ExtensionRenderer.js +1 -1
- package/dist/cjs/ui/Renderer/index.js +1 -1
- package/dist/cjs/ui/annotations/contexts/AnnotationManagerContext.js +2 -2
- package/dist/cjs/ui/annotations/element/index.js +1 -1
- package/dist/cjs/ui/annotations/hooks/user-selection.js +1 -1
- package/dist/es2019/actions/index.js +1 -1
- package/dist/es2019/react/index.js +3 -4
- package/dist/es2019/react/nodes/mediaInline.js +1 -1
- package/dist/es2019/react/nodes/multiBodiedExtensionOld.js +2 -2
- package/dist/es2019/text/nodes/date.js +1 -1
- package/dist/es2019/text/nodes/inlineCard.js +1 -1
- package/dist/es2019/text/nodes/mention.js +1 -1
- package/dist/es2019/text/nodes/status.js +1 -1
- package/dist/es2019/ui/Expand.js +0 -1
- package/dist/es2019/ui/ExtensionRenderer.js +1 -1
- package/dist/es2019/ui/Renderer/index.js +1 -1
- package/dist/es2019/ui/annotations/contexts/AnnotationManagerContext.js +2 -2
- package/dist/es2019/ui/annotations/element/index.js +1 -1
- package/dist/es2019/ui/annotations/hooks/user-selection.js +1 -1
- package/dist/esm/actions/index.js +1 -1
- package/dist/esm/react/index.js +4 -5
- package/dist/esm/react/nodes/mediaInline.js +1 -1
- package/dist/esm/react/nodes/multiBodiedExtensionOld.js +2 -2
- package/dist/esm/text/nodes/date.js +1 -1
- package/dist/esm/text/nodes/inlineCard.js +1 -1
- package/dist/esm/text/nodes/mention.js +1 -1
- package/dist/esm/text/nodes/status.js +1 -1
- package/dist/esm/ui/Expand.js +0 -1
- package/dist/esm/ui/ExtensionRenderer.js +1 -1
- package/dist/esm/ui/Renderer/index.js +1 -1
- package/dist/esm/ui/annotations/contexts/AnnotationManagerContext.js +2 -2
- package/dist/esm/ui/annotations/element/index.js +1 -1
- package/dist/esm/ui/annotations/hooks/user-selection.js +1 -1
- package/dist/types/actions/index.d.ts +1 -1
- package/dist/types/analytics/events.d.ts +1 -1
- package/dist/types-ts4.5/actions/index.d.ts +1 -1
- package/dist/types-ts4.5/analytics/events.d.ts +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/renderer
|
|
2
2
|
|
|
3
|
+
## 124.16.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`516909774accc`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/516909774accc) -
|
|
8
|
+
Fixing type issues
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
3
11
|
## 124.16.0
|
|
4
12
|
|
|
5
13
|
### Minor Changes
|
|
@@ -152,7 +152,7 @@ var RendererActions = exports.default = /*#__PURE__*/function () {
|
|
|
152
152
|
}
|
|
153
153
|
}, {
|
|
154
154
|
key: "annotate",
|
|
155
|
-
value: function annotate(range, annotationId,
|
|
155
|
+
value: function annotate(range, annotationId, _annotationType) {
|
|
156
156
|
if (!this.doc || !this.schema || !this.schema.marks.annotation) {
|
|
157
157
|
return false;
|
|
158
158
|
}
|
package/dist/cjs/react/index.js
CHANGED
|
@@ -300,15 +300,14 @@ var ReactSerializer = exports.default = /*#__PURE__*/function () {
|
|
|
300
300
|
key: "serializeTextWrapper",
|
|
301
301
|
value: function serializeTextWrapper(content, _ref2) {
|
|
302
302
|
var _this3 = this;
|
|
303
|
-
var
|
|
304
|
-
parentInfo = _ref2.parentInfo;
|
|
303
|
+
var parentInfo = _ref2.parentInfo;
|
|
305
304
|
var currentPath = parentInfo && parentInfo.path || [];
|
|
306
305
|
var nodePosition = parentInfo && parentInfo.pos || 1;
|
|
307
306
|
if ((0, _expValEquals.expValEquals)('platform_editor_text_highlight_padding', 'isEnabled', true)) {
|
|
308
307
|
var _this$standaloneBackg;
|
|
309
308
|
(_this$standaloneBackg = this.standaloneBackgroundColorMarks).push.apply(_this$standaloneBackg, (0, _toConsumableArray2.default)((0, _getStandaloneBackgroundColorMarks.getStandaloneBackgroundColorMarks)(content)));
|
|
310
309
|
}
|
|
311
|
-
return ReactSerializer.buildMarkStructure(content).map(function (mark,
|
|
310
|
+
return ReactSerializer.buildMarkStructure(content).map(function (mark, _index) {
|
|
312
311
|
return _this3.serializeMark({
|
|
313
312
|
mark: mark,
|
|
314
313
|
parentNode: {
|
|
@@ -329,7 +328,7 @@ var ReactSerializer = exports.default = /*#__PURE__*/function () {
|
|
|
329
328
|
parentNode = _ref3.parentNode,
|
|
330
329
|
parentMark = _ref3.parentMark;
|
|
331
330
|
if (!(0, _nodes.isTextNode)(mark)) {
|
|
332
|
-
var serializeContent = function serializeContent(childMark,
|
|
331
|
+
var serializeContent = function serializeContent(childMark, _index) {
|
|
333
332
|
return _this4.serializeMark({
|
|
334
333
|
mark: childMark,
|
|
335
334
|
parentNode: parentNode,
|
|
@@ -665,7 +664,7 @@ var ReactSerializer = exports.default = /*#__PURE__*/function () {
|
|
|
665
664
|
key: "getExpandProps",
|
|
666
665
|
value: function getExpandProps(node) {
|
|
667
666
|
var _this7 = this;
|
|
668
|
-
var
|
|
667
|
+
var _path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
669
668
|
if (!(0, _links.isNestedHeaderLinksEnabled)(this.allowHeadingAnchorLinks)) {
|
|
670
669
|
return this.getProps(node);
|
|
671
670
|
}
|
|
@@ -27,7 +27,7 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
|
|
|
27
27
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
28
28
|
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) { (0, _defineProperty2.default)(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; }
|
|
29
29
|
var RenderMediaInline = function RenderMediaInline(_ref) {
|
|
30
|
-
var
|
|
30
|
+
var _rendererAppearance = _ref.rendererAppearance,
|
|
31
31
|
clipboardAttrs = _ref.clipboardAttrs,
|
|
32
32
|
collectionName = _ref.collection,
|
|
33
33
|
eventHandlers = _ref.eventHandlers,
|
|
@@ -39,10 +39,10 @@ var useMultiBodiedExtensionActions = function useMultiBodiedExtensionActions(_re
|
|
|
39
39
|
getChildrenCount: function getChildrenCount() {
|
|
40
40
|
return children ? children === null || children === void 0 ? void 0 : children.length : 0;
|
|
41
41
|
},
|
|
42
|
-
removeChild: function removeChild(
|
|
42
|
+
removeChild: function removeChild(_index) {
|
|
43
43
|
return false;
|
|
44
44
|
},
|
|
45
|
-
updateParameters: function updateParameters(
|
|
45
|
+
updateParameters: function updateParameters(_parameters) {
|
|
46
46
|
return false;
|
|
47
47
|
},
|
|
48
48
|
// Ignored via go/ees005
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
8
8
|
var _utils2 = require("../../utils");
|
|
9
|
-
var date = function date(node,
|
|
9
|
+
var date = function date(node, _schema) {
|
|
10
10
|
return node.attrs.timestamp ? (0, _utils.timestampToIsoFormat)(node.attrs.timestamp) : (0, _utils2.getText)(node);
|
|
11
11
|
};
|
|
12
12
|
var _default = exports.default = date;
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _utils = require("../../utils");
|
|
8
|
-
var inlineCard = function inlineCard(node,
|
|
8
|
+
var inlineCard = function inlineCard(node, _schema) {
|
|
9
9
|
var _node$attrs$data;
|
|
10
10
|
return node.attrs.url || ((_node$attrs$data = node.attrs.data) === null || _node$attrs$data === void 0 ? void 0 : _node$attrs$data.url) || (0, _utils.getText)(node);
|
|
11
11
|
};
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
var mention = function mention(node,
|
|
7
|
+
var mention = function mention(node, _schema) {
|
|
8
8
|
if (['all', 'here'].indexOf(node.attrs.id) !== -1) {
|
|
9
9
|
return "@".concat(node.attrs.id);
|
|
10
10
|
}
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _utils = require("../../utils");
|
|
8
|
-
var status = function status(node,
|
|
8
|
+
var status = function status(node, _schema) {
|
|
9
9
|
return node.attrs.text ? "[ ".concat(node.attrs.text.toUpperCase(), " ]") : (0, _utils.getText)(node);
|
|
10
10
|
};
|
|
11
11
|
var _default = exports.default = status;
|
package/dist/cjs/ui/Expand.js
CHANGED
|
@@ -202,7 +202,6 @@ function Expand(_ref2) {
|
|
|
202
202
|
fireAnalyticsEvent = _ref2.fireAnalyticsEvent,
|
|
203
203
|
localId = _ref2.localId,
|
|
204
204
|
nestedHeaderIds = _ref2.nestedHeaderIds,
|
|
205
|
-
rendererAppearance = _ref2.rendererAppearance,
|
|
206
205
|
rendererContentMode = _ref2.rendererContentMode;
|
|
207
206
|
var _React$useState = _react2.default.useState(false),
|
|
208
207
|
_React$useState2 = (0, _slicedToArray2.default)(_React$useState, 2),
|
|
@@ -69,7 +69,7 @@ function ExtensionRenderer(props) {
|
|
|
69
69
|
|
|
70
70
|
// Ignored via go/ees005
|
|
71
71
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
72
|
-
var handleProvider = _react2.default.useCallback(function (
|
|
72
|
+
var handleProvider = _react2.default.useCallback(function (_name, providerPromise) {
|
|
73
73
|
providerPromise && providerPromise.then(function (provider) {
|
|
74
74
|
if (isMounted.current) {
|
|
75
75
|
setExtensionProvider(provider);
|
|
@@ -616,7 +616,7 @@ var RendererWrapper = /*#__PURE__*/_react.default.memo(function (props) {
|
|
|
616
616
|
lastChild && lastChild.appendChild(createTelepointer());
|
|
617
617
|
}
|
|
618
618
|
var mutateTelepointer = function mutateTelepointer(mutations) {
|
|
619
|
-
mutations.forEach(function (mutation,
|
|
619
|
+
mutations.forEach(function (mutation, _index) {
|
|
620
620
|
var _mutation$addedNodes$, _mutation$removedNode;
|
|
621
621
|
if (initialUpdate.current) {
|
|
622
622
|
var oldTelepointer = _renderer.querySelector("#".concat(_style.TELEPOINTER_ID));
|
|
@@ -451,8 +451,8 @@ var AnnotationManagerProvider = exports.AnnotationManagerProvider = function Ann
|
|
|
451
451
|
var onAnnotationClick = function onAnnotationClick(_ref2) {
|
|
452
452
|
var annotationIds = _ref2.annotationIds,
|
|
453
453
|
eventTarget = _ref2.eventTarget,
|
|
454
|
-
|
|
455
|
-
|
|
454
|
+
_eventTargetType = _ref2.eventTargetType,
|
|
455
|
+
_viewMethod = _ref2.viewMethod;
|
|
456
456
|
dispatch({
|
|
457
457
|
type: 'updateAnnotation',
|
|
458
458
|
data: {
|
|
@@ -74,7 +74,7 @@ var MarkElement = exports.MarkElement = function MarkElement(_ref) {
|
|
|
74
74
|
} else {
|
|
75
75
|
// TODO: EDITOR-595 - If the preemptive gate returns false, should we track the analytics event?
|
|
76
76
|
}
|
|
77
|
-
}).catch(function (
|
|
77
|
+
}).catch(function (_error) {
|
|
78
78
|
// TODO: EDITOR-595 - An error occurred while checking the preemptive gate. We should report this error.
|
|
79
79
|
});
|
|
80
80
|
} else {
|
|
@@ -22,7 +22,7 @@ var useUserSelectionRange = exports.useUserSelectionRange = function useUserSele
|
|
|
22
22
|
annotationManager = _useAnnotationManager.annotationManager;
|
|
23
23
|
var lastRangeRef = (0, _react.useRef)(null);
|
|
24
24
|
var isAnnotationManagerEnabled = !!annotationManager;
|
|
25
|
-
var onSelectionChange = (0, _react.useCallback)(function (
|
|
25
|
+
var onSelectionChange = (0, _react.useCallback)(function (_event) {
|
|
26
26
|
if (selectionTimeoutRef.current) {
|
|
27
27
|
clearTimeout(selectionTimeoutRef.current);
|
|
28
28
|
}
|
|
@@ -130,7 +130,7 @@ export default class RendererActions {
|
|
|
130
130
|
}
|
|
131
131
|
return false;
|
|
132
132
|
}
|
|
133
|
-
annotate(range, annotationId,
|
|
133
|
+
annotate(range, annotationId, _annotationType) {
|
|
134
134
|
if (!this.doc || !this.schema || !this.schema.marks.annotation) {
|
|
135
135
|
return false;
|
|
136
136
|
}
|
|
@@ -278,7 +278,6 @@ export default class ReactSerializer {
|
|
|
278
278
|
}));
|
|
279
279
|
}
|
|
280
280
|
serializeTextWrapper(content, {
|
|
281
|
-
index,
|
|
282
281
|
parentInfo
|
|
283
282
|
}) {
|
|
284
283
|
const currentPath = parentInfo && parentInfo.path || [];
|
|
@@ -286,7 +285,7 @@ export default class ReactSerializer {
|
|
|
286
285
|
if (expValEquals('platform_editor_text_highlight_padding', 'isEnabled', true)) {
|
|
287
286
|
this.standaloneBackgroundColorMarks.push(...getStandaloneBackgroundColorMarks(content));
|
|
288
287
|
}
|
|
289
|
-
return ReactSerializer.buildMarkStructure(content).map((mark,
|
|
288
|
+
return ReactSerializer.buildMarkStructure(content).map((mark, _index) => {
|
|
290
289
|
return this.serializeMark({
|
|
291
290
|
mark,
|
|
292
291
|
parentNode: {
|
|
@@ -305,7 +304,7 @@ export default class ReactSerializer {
|
|
|
305
304
|
parentMark
|
|
306
305
|
}) {
|
|
307
306
|
if (!isTextNode(mark)) {
|
|
308
|
-
const serializeContent = (childMark,
|
|
307
|
+
const serializeContent = (childMark, _index) => this.serializeMark({
|
|
309
308
|
mark: childMark,
|
|
310
309
|
parentNode,
|
|
311
310
|
parentMark: {
|
|
@@ -589,7 +588,7 @@ export default class ReactSerializer {
|
|
|
589
588
|
showAnchorLink: this.appearance !== 'comment' && this.allowHeadingAnchorLinks && !this.disableHeadingIDs && this.headingAnchorSupported(path)
|
|
590
589
|
};
|
|
591
590
|
}
|
|
592
|
-
getExpandProps(node,
|
|
591
|
+
getExpandProps(node, _path = []) {
|
|
593
592
|
if (!isNestedHeaderLinksEnabled(this.allowHeadingAnchorLinks)) {
|
|
594
593
|
return this.getProps(node);
|
|
595
594
|
}
|
|
@@ -12,7 +12,7 @@ import { ErrorBoundary } from '../../ui/Renderer/ErrorBoundary';
|
|
|
12
12
|
import { ACTION_SUBJECT } from '../../analytics/enums';
|
|
13
13
|
import { ACTION_SUBJECT_ID } from '@atlaskit/editor-common/analytics';
|
|
14
14
|
const RenderMediaInline = ({
|
|
15
|
-
rendererAppearance,
|
|
15
|
+
rendererAppearance: _rendererAppearance,
|
|
16
16
|
clipboardAttrs,
|
|
17
17
|
collection: collectionName,
|
|
18
18
|
eventHandlers,
|
|
@@ -29,10 +29,10 @@ const useMultiBodiedExtensionActions = ({
|
|
|
29
29
|
getChildrenCount() {
|
|
30
30
|
return children ? children === null || children === void 0 ? void 0 : children.length : 0;
|
|
31
31
|
},
|
|
32
|
-
removeChild(
|
|
32
|
+
removeChild(_index) {
|
|
33
33
|
return false;
|
|
34
34
|
},
|
|
35
|
-
updateParameters(
|
|
35
|
+
updateParameters(_parameters) {
|
|
36
36
|
return false;
|
|
37
37
|
},
|
|
38
38
|
// Ignored via go/ees005
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { timestampToIsoFormat } from '@atlaskit/editor-common/utils';
|
|
2
2
|
import { getText } from '../../utils';
|
|
3
|
-
const date = (node,
|
|
3
|
+
const date = (node, _schema) => {
|
|
4
4
|
return node.attrs.timestamp ? timestampToIsoFormat(node.attrs.timestamp) : getText(node);
|
|
5
5
|
};
|
|
6
6
|
export default date;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getText } from '../../utils';
|
|
2
|
-
const inlineCard = (node,
|
|
2
|
+
const inlineCard = (node, _schema) => {
|
|
3
3
|
var _node$attrs$data;
|
|
4
4
|
return node.attrs.url || ((_node$attrs$data = node.attrs.data) === null || _node$attrs$data === void 0 ? void 0 : _node$attrs$data.url) || getText(node);
|
|
5
5
|
};
|
package/dist/es2019/ui/Expand.js
CHANGED
|
@@ -56,7 +56,7 @@ export default function ExtensionRenderer(props) {
|
|
|
56
56
|
|
|
57
57
|
// Ignored via go/ees005
|
|
58
58
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
59
|
-
const handleProvider = React.useCallback((
|
|
59
|
+
const handleProvider = React.useCallback((_name, providerPromise) => {
|
|
60
60
|
providerPromise && providerPromise.then(provider => {
|
|
61
61
|
if (isMounted.current) {
|
|
62
62
|
setExtensionProvider(provider);
|
|
@@ -604,7 +604,7 @@ const RendererWrapper = /*#__PURE__*/React.memo(props => {
|
|
|
604
604
|
lastChild && lastChild.appendChild(createTelepointer());
|
|
605
605
|
}
|
|
606
606
|
const mutateTelepointer = mutations => {
|
|
607
|
-
mutations.forEach((mutation,
|
|
607
|
+
mutations.forEach((mutation, _index) => {
|
|
608
608
|
var _mutation$addedNodes$, _mutation$removedNode;
|
|
609
609
|
if (initialUpdate.current) {
|
|
610
610
|
const oldTelepointer = renderer.querySelector(`#${TELEPOINTER_ID}`);
|
|
@@ -450,8 +450,8 @@ export const AnnotationManagerProvider = ({
|
|
|
450
450
|
const onAnnotationClick = ({
|
|
451
451
|
annotationIds,
|
|
452
452
|
eventTarget,
|
|
453
|
-
eventTargetType,
|
|
454
|
-
viewMethod
|
|
453
|
+
eventTargetType: _eventTargetType,
|
|
454
|
+
viewMethod: _viewMethod
|
|
455
455
|
}) => {
|
|
456
456
|
dispatch({
|
|
457
457
|
type: 'updateAnnotation',
|
|
@@ -69,7 +69,7 @@ const MarkElement = ({
|
|
|
69
69
|
} else {
|
|
70
70
|
// TODO: EDITOR-595 - If the preemptive gate returns false, should we track the analytics event?
|
|
71
71
|
}
|
|
72
|
-
}).catch(
|
|
72
|
+
}).catch(_error => {
|
|
73
73
|
// TODO: EDITOR-595 - An error occurred while checking the preemptive gate. We should report this error.
|
|
74
74
|
});
|
|
75
75
|
} else {
|
|
@@ -23,7 +23,7 @@ export const useUserSelectionRange = props => {
|
|
|
23
23
|
} = useAnnotationManagerDispatch();
|
|
24
24
|
const lastRangeRef = useRef(null);
|
|
25
25
|
const isAnnotationManagerEnabled = !!annotationManager;
|
|
26
|
-
const onSelectionChange = useCallback(
|
|
26
|
+
const onSelectionChange = useCallback(_event => {
|
|
27
27
|
if (selectionTimeoutRef.current) {
|
|
28
28
|
clearTimeout(selectionTimeoutRef.current);
|
|
29
29
|
}
|
|
@@ -145,7 +145,7 @@ var RendererActions = /*#__PURE__*/function () {
|
|
|
145
145
|
}
|
|
146
146
|
}, {
|
|
147
147
|
key: "annotate",
|
|
148
|
-
value: function annotate(range, annotationId,
|
|
148
|
+
value: function annotate(range, annotationId, _annotationType) {
|
|
149
149
|
if (!this.doc || !this.schema || !this.schema.marks.annotation) {
|
|
150
150
|
return false;
|
|
151
151
|
}
|
package/dist/esm/react/index.js
CHANGED
|
@@ -293,15 +293,14 @@ var ReactSerializer = /*#__PURE__*/function () {
|
|
|
293
293
|
key: "serializeTextWrapper",
|
|
294
294
|
value: function serializeTextWrapper(content, _ref2) {
|
|
295
295
|
var _this3 = this;
|
|
296
|
-
var
|
|
297
|
-
parentInfo = _ref2.parentInfo;
|
|
296
|
+
var parentInfo = _ref2.parentInfo;
|
|
298
297
|
var currentPath = parentInfo && parentInfo.path || [];
|
|
299
298
|
var nodePosition = parentInfo && parentInfo.pos || 1;
|
|
300
299
|
if (expValEquals('platform_editor_text_highlight_padding', 'isEnabled', true)) {
|
|
301
300
|
var _this$standaloneBackg;
|
|
302
301
|
(_this$standaloneBackg = this.standaloneBackgroundColorMarks).push.apply(_this$standaloneBackg, _toConsumableArray(getStandaloneBackgroundColorMarks(content)));
|
|
303
302
|
}
|
|
304
|
-
return ReactSerializer.buildMarkStructure(content).map(function (mark,
|
|
303
|
+
return ReactSerializer.buildMarkStructure(content).map(function (mark, _index) {
|
|
305
304
|
return _this3.serializeMark({
|
|
306
305
|
mark: mark,
|
|
307
306
|
parentNode: {
|
|
@@ -322,7 +321,7 @@ var ReactSerializer = /*#__PURE__*/function () {
|
|
|
322
321
|
parentNode = _ref3.parentNode,
|
|
323
322
|
parentMark = _ref3.parentMark;
|
|
324
323
|
if (!isTextNode(mark)) {
|
|
325
|
-
var serializeContent = function serializeContent(childMark,
|
|
324
|
+
var serializeContent = function serializeContent(childMark, _index) {
|
|
326
325
|
return _this4.serializeMark({
|
|
327
326
|
mark: childMark,
|
|
328
327
|
parentNode: parentNode,
|
|
@@ -658,7 +657,7 @@ var ReactSerializer = /*#__PURE__*/function () {
|
|
|
658
657
|
key: "getExpandProps",
|
|
659
658
|
value: function getExpandProps(node) {
|
|
660
659
|
var _this7 = this;
|
|
661
|
-
var
|
|
660
|
+
var _path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
662
661
|
if (!isNestedHeaderLinksEnabled(this.allowHeadingAnchorLinks)) {
|
|
663
662
|
return this.getProps(node);
|
|
664
663
|
}
|
|
@@ -18,7 +18,7 @@ import { ErrorBoundary } from '../../ui/Renderer/ErrorBoundary';
|
|
|
18
18
|
import { ACTION_SUBJECT } from '../../analytics/enums';
|
|
19
19
|
import { ACTION_SUBJECT_ID } from '@atlaskit/editor-common/analytics';
|
|
20
20
|
var RenderMediaInline = function RenderMediaInline(_ref) {
|
|
21
|
-
var
|
|
21
|
+
var _rendererAppearance = _ref.rendererAppearance,
|
|
22
22
|
clipboardAttrs = _ref.clipboardAttrs,
|
|
23
23
|
collectionName = _ref.collection,
|
|
24
24
|
eventHandlers = _ref.eventHandlers,
|
|
@@ -31,10 +31,10 @@ var useMultiBodiedExtensionActions = function useMultiBodiedExtensionActions(_re
|
|
|
31
31
|
getChildrenCount: function getChildrenCount() {
|
|
32
32
|
return children ? children === null || children === void 0 ? void 0 : children.length : 0;
|
|
33
33
|
},
|
|
34
|
-
removeChild: function removeChild(
|
|
34
|
+
removeChild: function removeChild(_index) {
|
|
35
35
|
return false;
|
|
36
36
|
},
|
|
37
|
-
updateParameters: function updateParameters(
|
|
37
|
+
updateParameters: function updateParameters(_parameters) {
|
|
38
38
|
return false;
|
|
39
39
|
},
|
|
40
40
|
// Ignored via go/ees005
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { timestampToIsoFormat } from '@atlaskit/editor-common/utils';
|
|
2
2
|
import { getText } from '../../utils';
|
|
3
|
-
var date = function date(node,
|
|
3
|
+
var date = function date(node, _schema) {
|
|
4
4
|
return node.attrs.timestamp ? timestampToIsoFormat(node.attrs.timestamp) : getText(node);
|
|
5
5
|
};
|
|
6
6
|
export default date;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getText } from '../../utils';
|
|
2
|
-
var inlineCard = function inlineCard(node,
|
|
2
|
+
var inlineCard = function inlineCard(node, _schema) {
|
|
3
3
|
var _node$attrs$data;
|
|
4
4
|
return node.attrs.url || ((_node$attrs$data = node.attrs.data) === null || _node$attrs$data === void 0 ? void 0 : _node$attrs$data.url) || getText(node);
|
|
5
5
|
};
|
package/dist/esm/ui/Expand.js
CHANGED
|
@@ -193,7 +193,6 @@ function Expand(_ref2) {
|
|
|
193
193
|
fireAnalyticsEvent = _ref2.fireAnalyticsEvent,
|
|
194
194
|
localId = _ref2.localId,
|
|
195
195
|
nestedHeaderIds = _ref2.nestedHeaderIds,
|
|
196
|
-
rendererAppearance = _ref2.rendererAppearance,
|
|
197
196
|
rendererContentMode = _ref2.rendererContentMode;
|
|
198
197
|
var _React$useState = React.useState(false),
|
|
199
198
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
@@ -60,7 +60,7 @@ export default function ExtensionRenderer(props) {
|
|
|
60
60
|
|
|
61
61
|
// Ignored via go/ees005
|
|
62
62
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
63
|
-
var handleProvider = React.useCallback(function (
|
|
63
|
+
var handleProvider = React.useCallback(function (_name, providerPromise) {
|
|
64
64
|
providerPromise && providerPromise.then(function (provider) {
|
|
65
65
|
if (isMounted.current) {
|
|
66
66
|
setExtensionProvider(provider);
|
|
@@ -607,7 +607,7 @@ var RendererWrapper = /*#__PURE__*/React.memo(function (props) {
|
|
|
607
607
|
lastChild && lastChild.appendChild(createTelepointer());
|
|
608
608
|
}
|
|
609
609
|
var mutateTelepointer = function mutateTelepointer(mutations) {
|
|
610
|
-
mutations.forEach(function (mutation,
|
|
610
|
+
mutations.forEach(function (mutation, _index) {
|
|
611
611
|
var _mutation$addedNodes$, _mutation$removedNode;
|
|
612
612
|
if (initialUpdate.current) {
|
|
613
613
|
var oldTelepointer = _renderer.querySelector("#".concat(TELEPOINTER_ID));
|
|
@@ -442,8 +442,8 @@ export var AnnotationManagerProvider = function AnnotationManagerProvider(_ref)
|
|
|
442
442
|
var onAnnotationClick = function onAnnotationClick(_ref2) {
|
|
443
443
|
var annotationIds = _ref2.annotationIds,
|
|
444
444
|
eventTarget = _ref2.eventTarget,
|
|
445
|
-
|
|
446
|
-
|
|
445
|
+
_eventTargetType = _ref2.eventTargetType,
|
|
446
|
+
_viewMethod = _ref2.viewMethod;
|
|
447
447
|
dispatch({
|
|
448
448
|
type: 'updateAnnotation',
|
|
449
449
|
data: {
|
|
@@ -66,7 +66,7 @@ var MarkElement = function MarkElement(_ref) {
|
|
|
66
66
|
} else {
|
|
67
67
|
// TODO: EDITOR-595 - If the preemptive gate returns false, should we track the analytics event?
|
|
68
68
|
}
|
|
69
|
-
}).catch(function (
|
|
69
|
+
}).catch(function (_error) {
|
|
70
70
|
// TODO: EDITOR-595 - An error occurred while checking the preemptive gate. We should report this error.
|
|
71
71
|
});
|
|
72
72
|
} else {
|
|
@@ -16,7 +16,7 @@ export var useUserSelectionRange = function useUserSelectionRange(props) {
|
|
|
16
16
|
annotationManager = _useAnnotationManager.annotationManager;
|
|
17
17
|
var lastRangeRef = useRef(null);
|
|
18
18
|
var isAnnotationManagerEnabled = !!annotationManager;
|
|
19
|
-
var onSelectionChange = useCallback(function (
|
|
19
|
+
var onSelectionChange = useCallback(function (_event) {
|
|
20
20
|
if (selectionTimeoutRef.current) {
|
|
21
21
|
clearTimeout(selectionTimeoutRef.current);
|
|
22
22
|
}
|
|
@@ -49,7 +49,7 @@ export default class RendererActions implements RendererActionsOptions, Annotati
|
|
|
49
49
|
step: RemoveNodeMarkStep | RemoveMarkStep;
|
|
50
50
|
doc: JSONDocNode;
|
|
51
51
|
};
|
|
52
|
-
annotate(range: Range, annotationId: string,
|
|
52
|
+
annotate(range: Range, annotationId: string, _annotationType: 'inlineComment'): AnnotationActionResult;
|
|
53
53
|
isValidAnnotationRange(range: Range | null): boolean;
|
|
54
54
|
isRangeAnnotatable(range: Range | null): boolean;
|
|
55
55
|
/**
|
|
@@ -142,6 +142,6 @@ export type MediaRenderErrorEvent = UIAEP<ACTION.ERRORED, ACTION_SUBJECT.RENDERE
|
|
|
142
142
|
external?: boolean;
|
|
143
143
|
reason: string;
|
|
144
144
|
}>;
|
|
145
|
-
export type AnalyticsEventPayload<
|
|
145
|
+
export type AnalyticsEventPayload<_T = void> = RendererStartAEP | RendererRenderedAEP | ComponentCrashErrorAEP | RendererUnsupportedContentLevelsTrackingSucceeded | RendererUnsupportedContentLevelsTrackingErrored | RendererSelectAllCaughtAEP | RendererSelectAllEscapedAEP | CodeBlockCopyAEP | CodeBlockWrapAEP | HeadingAnchorLinkButtonAEP | HoverLabelAEP | AnchorLinkAEP | TableSortColumnNotAllowedAEP | TableSortColumnAEP | TableWidthInfoAEP | TableRendererHeightInfoAEP | VisitLinkAEP | VisitMediaLinkAEP | ExpandAEP | UnsupportedContentPayload | UnsupportedContentTooltipPayload | AnnotationAEP | AnnotationDeleteAEP | MediaLnkTransformedAEP | InvalidProsemirrorDocumentErrorAEP | NestedTableTransformedAEP | MediaRenderErrorEvent;
|
|
146
146
|
export type FireAnalyticsCallback = <T = void>(payload: AnalyticsEventPayload<T>) => void | undefined;
|
|
147
147
|
export {};
|
|
@@ -49,7 +49,7 @@ export default class RendererActions implements RendererActionsOptions, Annotati
|
|
|
49
49
|
step: RemoveNodeMarkStep | RemoveMarkStep;
|
|
50
50
|
doc: JSONDocNode;
|
|
51
51
|
};
|
|
52
|
-
annotate(range: Range, annotationId: string,
|
|
52
|
+
annotate(range: Range, annotationId: string, _annotationType: 'inlineComment'): AnnotationActionResult;
|
|
53
53
|
isValidAnnotationRange(range: Range | null): boolean;
|
|
54
54
|
isRangeAnnotatable(range: Range | null): boolean;
|
|
55
55
|
/**
|
|
@@ -142,6 +142,6 @@ export type MediaRenderErrorEvent = UIAEP<ACTION.ERRORED, ACTION_SUBJECT.RENDERE
|
|
|
142
142
|
external?: boolean;
|
|
143
143
|
reason: string;
|
|
144
144
|
}>;
|
|
145
|
-
export type AnalyticsEventPayload<
|
|
145
|
+
export type AnalyticsEventPayload<_T = void> = RendererStartAEP | RendererRenderedAEP | ComponentCrashErrorAEP | RendererUnsupportedContentLevelsTrackingSucceeded | RendererUnsupportedContentLevelsTrackingErrored | RendererSelectAllCaughtAEP | RendererSelectAllEscapedAEP | CodeBlockCopyAEP | CodeBlockWrapAEP | HeadingAnchorLinkButtonAEP | HoverLabelAEP | AnchorLinkAEP | TableSortColumnNotAllowedAEP | TableSortColumnAEP | TableWidthInfoAEP | TableRendererHeightInfoAEP | VisitLinkAEP | VisitMediaLinkAEP | ExpandAEP | UnsupportedContentPayload | UnsupportedContentTooltipPayload | AnnotationAEP | AnnotationDeleteAEP | MediaLnkTransformedAEP | InvalidProsemirrorDocumentErrorAEP | NestedTableTransformedAEP | MediaRenderErrorEvent;
|
|
146
146
|
export type FireAnalyticsCallback = <T = void>(payload: AnalyticsEventPayload<T>) => void | undefined;
|
|
147
147
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/renderer",
|
|
3
|
-
"version": "124.16.
|
|
3
|
+
"version": "124.16.1",
|
|
4
4
|
"description": "Renderer component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"@atlaskit/task-decision": "^19.2.0",
|
|
60
60
|
"@atlaskit/theme": "^21.0.0",
|
|
61
61
|
"@atlaskit/tmp-editor-statsig": "^13.39.0",
|
|
62
|
-
"@atlaskit/tokens": "^8.
|
|
62
|
+
"@atlaskit/tokens": "^8.1.0",
|
|
63
63
|
"@atlaskit/tooltip": "^20.10.0",
|
|
64
64
|
"@atlaskit/visually-hidden": "^3.0.0",
|
|
65
65
|
"@babel/runtime": "^7.0.0",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"uuid": "^3.1.0"
|
|
73
73
|
},
|
|
74
74
|
"peerDependencies": {
|
|
75
|
-
"@atlaskit/editor-common": "^110.
|
|
75
|
+
"@atlaskit/editor-common": "^110.33.0",
|
|
76
76
|
"@atlaskit/link-provider": "^4.0.0",
|
|
77
77
|
"@atlaskit/media-core": "^37.0.0",
|
|
78
78
|
"react": "^18.2.0",
|