@atlaskit/renderer 109.25.4 → 109.25.5
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 +3 -3
- package/dist/cjs/steps/index.js +31 -13
- package/dist/cjs/ui/Renderer/index.js +1 -1
- package/dist/cjs/ui/annotations/hover/range-validator.js +3 -2
- package/dist/es2019/actions/index.js +3 -3
- package/dist/es2019/steps/index.js +31 -13
- package/dist/es2019/ui/Renderer/index.js +1 -1
- package/dist/es2019/ui/annotations/hover/range-validator.js +3 -2
- package/dist/esm/actions/index.js +3 -3
- package/dist/esm/steps/index.js +31 -13
- package/dist/esm/ui/Renderer/index.js +1 -1
- package/dist/esm/ui/annotations/hover/range-validator.js +3 -2
- package/dist/types/actions/index.d.ts +2 -2
- package/dist/types/steps/index.d.ts +1 -1
- package/dist/types-ts4.5/actions/index.d.ts +2 -2
- package/dist/types-ts4.5/steps/index.d.ts +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/renderer
|
|
2
2
|
|
|
3
|
+
## 109.25.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#98978](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/98978)
|
|
8
|
+
[`b0e975e054e4`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/b0e975e054e4) -
|
|
9
|
+
FF to fix comments on video
|
|
10
|
+
|
|
3
11
|
## 109.25.4
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -171,11 +171,11 @@ var RendererActions = exports.default = /*#__PURE__*/function () {
|
|
|
171
171
|
}
|
|
172
172
|
}, {
|
|
173
173
|
key: "getPositionFromRange",
|
|
174
|
-
value: function getPositionFromRange(range, isCommentsOnMediaBugFixEnabled) {
|
|
174
|
+
value: function getPositionFromRange(range, isCommentsOnMediaBugFixEnabled, isCommentsOnMediaBugVideoComment) {
|
|
175
175
|
if (!this.doc || !this.schema || !range) {
|
|
176
176
|
return false;
|
|
177
177
|
}
|
|
178
|
-
return (0, _steps.getPosFromRange)(range, isCommentsOnMediaBugFixEnabled);
|
|
178
|
+
return (0, _steps.getPosFromRange)(range, isCommentsOnMediaBugFixEnabled, isCommentsOnMediaBugVideoComment);
|
|
179
179
|
}
|
|
180
180
|
}, {
|
|
181
181
|
key: "getAnnotationMarks",
|
|
@@ -220,7 +220,7 @@ var RendererActions = exports.default = /*#__PURE__*/function () {
|
|
|
220
220
|
}
|
|
221
221
|
}, {
|
|
222
222
|
key: "applyAnnotation",
|
|
223
|
-
value: function applyAnnotation(pos, annotation, isCommentsOnMediaBugFixEnabled) {
|
|
223
|
+
value: function applyAnnotation(pos, annotation, isCommentsOnMediaBugFixEnabled, isCommentsOnMediaBugVideoCommentEnabled) {
|
|
224
224
|
if (!this.doc || !pos || !this.schema) {
|
|
225
225
|
return false;
|
|
226
226
|
}
|
package/dist/cjs/steps/index.js
CHANGED
|
@@ -173,27 +173,45 @@ function resolvePos(node, offset) {
|
|
|
173
173
|
}
|
|
174
174
|
return resolvedPos + offset;
|
|
175
175
|
}
|
|
176
|
-
function getPosFromRange(range, isCommentsOnMediaBugFixEnabled) {
|
|
176
|
+
function getPosFromRange(range, isCommentsOnMediaBugFixEnabled, isCommentsOnMediaBugVideoCommentEnabled) {
|
|
177
177
|
var startContainer = range.startContainer,
|
|
178
178
|
startOffset = range.startOffset,
|
|
179
179
|
endContainer = range.endContainer,
|
|
180
180
|
endOffset = range.endOffset;
|
|
181
|
-
var
|
|
182
|
-
if (
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
181
|
+
var possibleMediaOrMediaSingleElement = findParent(startContainer);
|
|
182
|
+
if (isCommentsOnMediaBugVideoCommentEnabled) {
|
|
183
|
+
// Video hover targets return media single, not media, thus, the extra check in condition.
|
|
184
|
+
var isMediaOrMediaSingle = possibleMediaOrMediaSingleElement && /media|mediaSingle/.test(getNodeType(possibleMediaOrMediaSingleElement) || '');
|
|
185
|
+
if (isMediaOrMediaSingle) {
|
|
186
|
+
var pos;
|
|
187
|
+
var mediaSingleElement = getNodeType(possibleMediaOrMediaSingleElement) === 'mediaSingle' ? possibleMediaOrMediaSingleElement : findMediaParent(possibleMediaOrMediaSingleElement);
|
|
186
188
|
if (mediaSingleElement) {
|
|
187
189
|
pos = getStartPos(mediaSingleElement);
|
|
188
190
|
}
|
|
189
|
-
|
|
190
|
-
|
|
191
|
+
if (pos !== undefined) {
|
|
192
|
+
return {
|
|
193
|
+
from: pos,
|
|
194
|
+
to: pos
|
|
195
|
+
};
|
|
196
|
+
}
|
|
191
197
|
}
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
198
|
+
} else {
|
|
199
|
+
if (possibleMediaOrMediaSingleElement && getNodeType(possibleMediaOrMediaSingleElement) === 'media') {
|
|
200
|
+
var _pos;
|
|
201
|
+
if (isCommentsOnMediaBugFixEnabled) {
|
|
202
|
+
var _mediaSingleElement = findMediaParent(possibleMediaOrMediaSingleElement);
|
|
203
|
+
if (_mediaSingleElement) {
|
|
204
|
+
_pos = getStartPos(_mediaSingleElement);
|
|
205
|
+
}
|
|
206
|
+
} else {
|
|
207
|
+
_pos = getStartPos(possibleMediaOrMediaSingleElement);
|
|
208
|
+
}
|
|
209
|
+
if (_pos !== undefined) {
|
|
210
|
+
return {
|
|
211
|
+
from: _pos,
|
|
212
|
+
to: _pos
|
|
213
|
+
};
|
|
214
|
+
}
|
|
197
215
|
}
|
|
198
216
|
}
|
|
199
217
|
var from = resolvePos(startContainer, startOffset);
|
|
@@ -56,7 +56,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
56
56
|
var NORMAL_SEVERITY_THRESHOLD = exports.NORMAL_SEVERITY_THRESHOLD = 2000;
|
|
57
57
|
var DEGRADED_SEVERITY_THRESHOLD = exports.DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
58
58
|
var packageName = "@atlaskit/renderer";
|
|
59
|
-
var packageVersion = "109.25.
|
|
59
|
+
var packageVersion = "109.25.5";
|
|
60
60
|
var defaultNodeComponents = exports.defaultNodeComponents = _nodes.nodeToReact;
|
|
61
61
|
var Renderer = exports.Renderer = /*#__PURE__*/function (_PureComponent) {
|
|
62
62
|
(0, _inherits2.default)(Renderer, _PureComponent);
|
|
@@ -14,7 +14,7 @@ var _context = require("../context");
|
|
|
14
14
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
15
15
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
16
16
|
var RangeValidator = exports.RangeValidator = function RangeValidator(props) {
|
|
17
|
-
var _providers$inlineComm;
|
|
17
|
+
var _providers$inlineComm, _providers$inlineComm2;
|
|
18
18
|
var component = props.component,
|
|
19
19
|
rendererRef = props.rendererRef,
|
|
20
20
|
applyAnnotationDraftAt = props.applyAnnotationDraftAt,
|
|
@@ -30,10 +30,11 @@ var RangeValidator = exports.RangeValidator = function RangeValidator(props) {
|
|
|
30
30
|
isWithinRange = _useAnnotationHoverCo.isWithinRange;
|
|
31
31
|
var providers = (0, _react.useContext)(_context.ProvidersContext);
|
|
32
32
|
var isCommentsOnMediaBugFixEnabled = (_providers$inlineComm = providers === null || providers === void 0 ? void 0 : providers.inlineComment.isCommentsOnMediaBugFixEnabled) !== null && _providers$inlineComm !== void 0 ? _providers$inlineComm : false;
|
|
33
|
+
var isCommentsOnMediaBugVideoCommentEnabled = (_providers$inlineComm2 = providers === null || providers === void 0 ? void 0 : providers.inlineComment.isCommentsOnMediaBugVideoCommentEnabled) !== null && _providers$inlineComm2 !== void 0 ? _providers$inlineComm2 : false;
|
|
33
34
|
if (!range || type !== 'hover') {
|
|
34
35
|
return null;
|
|
35
36
|
}
|
|
36
|
-
var documentPosition = actions.getPositionFromRange(range, isCommentsOnMediaBugFixEnabled);
|
|
37
|
+
var documentPosition = actions.getPositionFromRange(range, isCommentsOnMediaBugFixEnabled, isCommentsOnMediaBugVideoCommentEnabled);
|
|
37
38
|
return /*#__PURE__*/_react.default.createElement(_mounter.Mounter, {
|
|
38
39
|
isWithinRange: isWithinRange,
|
|
39
40
|
range: range,
|
|
@@ -145,11 +145,11 @@ export default class RendererActions {
|
|
|
145
145
|
}
|
|
146
146
|
return this._privateValidatePositionsForAnnotation(pos.from, pos.to);
|
|
147
147
|
}
|
|
148
|
-
getPositionFromRange(range, isCommentsOnMediaBugFixEnabled) {
|
|
148
|
+
getPositionFromRange(range, isCommentsOnMediaBugFixEnabled, isCommentsOnMediaBugVideoComment) {
|
|
149
149
|
if (!this.doc || !this.schema || !range) {
|
|
150
150
|
return false;
|
|
151
151
|
}
|
|
152
|
-
return getPosFromRange(range, isCommentsOnMediaBugFixEnabled);
|
|
152
|
+
return getPosFromRange(range, isCommentsOnMediaBugFixEnabled, isCommentsOnMediaBugVideoComment);
|
|
153
153
|
}
|
|
154
154
|
getAnnotationMarks() {
|
|
155
155
|
const {
|
|
@@ -192,7 +192,7 @@ export default class RendererActions {
|
|
|
192
192
|
}
|
|
193
193
|
return getAnnotationIdsFromRange(pos, this.doc, this.schema);
|
|
194
194
|
}
|
|
195
|
-
applyAnnotation(pos, annotation, isCommentsOnMediaBugFixEnabled) {
|
|
195
|
+
applyAnnotation(pos, annotation, isCommentsOnMediaBugFixEnabled, isCommentsOnMediaBugVideoCommentEnabled) {
|
|
196
196
|
if (!this.doc || !pos || !this.schema) {
|
|
197
197
|
return false;
|
|
198
198
|
}
|
|
@@ -169,29 +169,47 @@ export function resolvePos(node, offset) {
|
|
|
169
169
|
}
|
|
170
170
|
return resolvedPos + offset;
|
|
171
171
|
}
|
|
172
|
-
export function getPosFromRange(range, isCommentsOnMediaBugFixEnabled) {
|
|
172
|
+
export function getPosFromRange(range, isCommentsOnMediaBugFixEnabled, isCommentsOnMediaBugVideoCommentEnabled) {
|
|
173
173
|
const {
|
|
174
174
|
startContainer,
|
|
175
175
|
startOffset,
|
|
176
176
|
endContainer,
|
|
177
177
|
endOffset
|
|
178
178
|
} = range;
|
|
179
|
-
const
|
|
180
|
-
if (
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
179
|
+
const possibleMediaOrMediaSingleElement = findParent(startContainer);
|
|
180
|
+
if (isCommentsOnMediaBugVideoCommentEnabled) {
|
|
181
|
+
// Video hover targets return media single, not media, thus, the extra check in condition.
|
|
182
|
+
const isMediaOrMediaSingle = possibleMediaOrMediaSingleElement && /media|mediaSingle/.test(getNodeType(possibleMediaOrMediaSingleElement) || '');
|
|
183
|
+
if (isMediaOrMediaSingle) {
|
|
184
|
+
let pos;
|
|
185
|
+
const mediaSingleElement = getNodeType(possibleMediaOrMediaSingleElement) === 'mediaSingle' ? possibleMediaOrMediaSingleElement : findMediaParent(possibleMediaOrMediaSingleElement);
|
|
184
186
|
if (mediaSingleElement) {
|
|
185
187
|
pos = getStartPos(mediaSingleElement);
|
|
186
188
|
}
|
|
187
|
-
|
|
188
|
-
|
|
189
|
+
if (pos !== undefined) {
|
|
190
|
+
return {
|
|
191
|
+
from: pos,
|
|
192
|
+
to: pos
|
|
193
|
+
};
|
|
194
|
+
}
|
|
189
195
|
}
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
196
|
+
} else {
|
|
197
|
+
if (possibleMediaOrMediaSingleElement && getNodeType(possibleMediaOrMediaSingleElement) === 'media') {
|
|
198
|
+
let pos;
|
|
199
|
+
if (isCommentsOnMediaBugFixEnabled) {
|
|
200
|
+
const mediaSingleElement = findMediaParent(possibleMediaOrMediaSingleElement);
|
|
201
|
+
if (mediaSingleElement) {
|
|
202
|
+
pos = getStartPos(mediaSingleElement);
|
|
203
|
+
}
|
|
204
|
+
} else {
|
|
205
|
+
pos = getStartPos(possibleMediaOrMediaSingleElement);
|
|
206
|
+
}
|
|
207
|
+
if (pos !== undefined) {
|
|
208
|
+
return {
|
|
209
|
+
from: pos,
|
|
210
|
+
to: pos
|
|
211
|
+
};
|
|
212
|
+
}
|
|
195
213
|
}
|
|
196
214
|
}
|
|
197
215
|
const from = resolvePos(startContainer, startOffset);
|
|
@@ -37,7 +37,7 @@ import { nodeToReact } from '../../react/nodes';
|
|
|
37
37
|
export const NORMAL_SEVERITY_THRESHOLD = 2000;
|
|
38
38
|
export const DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
39
39
|
const packageName = "@atlaskit/renderer";
|
|
40
|
-
const packageVersion = "109.25.
|
|
40
|
+
const packageVersion = "109.25.5";
|
|
41
41
|
export const defaultNodeComponents = nodeToReact;
|
|
42
42
|
export class Renderer extends PureComponent {
|
|
43
43
|
constructor(props) {
|
|
@@ -5,7 +5,7 @@ import { useAnnotationRangeDispatch, useAnnotationRangeState } from '../contexts
|
|
|
5
5
|
import { useAnnotationHoverContext } from '../contexts/AnnotationHoverContext';
|
|
6
6
|
import { ProvidersContext } from '../context';
|
|
7
7
|
export const RangeValidator = props => {
|
|
8
|
-
var _providers$inlineComm;
|
|
8
|
+
var _providers$inlineComm, _providers$inlineComm2;
|
|
9
9
|
const {
|
|
10
10
|
component,
|
|
11
11
|
rendererRef,
|
|
@@ -26,10 +26,11 @@ export const RangeValidator = props => {
|
|
|
26
26
|
} = useAnnotationHoverContext();
|
|
27
27
|
const providers = useContext(ProvidersContext);
|
|
28
28
|
const isCommentsOnMediaBugFixEnabled = (_providers$inlineComm = providers === null || providers === void 0 ? void 0 : providers.inlineComment.isCommentsOnMediaBugFixEnabled) !== null && _providers$inlineComm !== void 0 ? _providers$inlineComm : false;
|
|
29
|
+
const isCommentsOnMediaBugVideoCommentEnabled = (_providers$inlineComm2 = providers === null || providers === void 0 ? void 0 : providers.inlineComment.isCommentsOnMediaBugVideoCommentEnabled) !== null && _providers$inlineComm2 !== void 0 ? _providers$inlineComm2 : false;
|
|
29
30
|
if (!range || type !== 'hover') {
|
|
30
31
|
return null;
|
|
31
32
|
}
|
|
32
|
-
const documentPosition = actions.getPositionFromRange(range, isCommentsOnMediaBugFixEnabled);
|
|
33
|
+
const documentPosition = actions.getPositionFromRange(range, isCommentsOnMediaBugFixEnabled, isCommentsOnMediaBugVideoCommentEnabled);
|
|
33
34
|
return /*#__PURE__*/React.createElement(Mounter, {
|
|
34
35
|
isWithinRange: isWithinRange,
|
|
35
36
|
range: range,
|
|
@@ -164,11 +164,11 @@ var RendererActions = /*#__PURE__*/function () {
|
|
|
164
164
|
}
|
|
165
165
|
}, {
|
|
166
166
|
key: "getPositionFromRange",
|
|
167
|
-
value: function getPositionFromRange(range, isCommentsOnMediaBugFixEnabled) {
|
|
167
|
+
value: function getPositionFromRange(range, isCommentsOnMediaBugFixEnabled, isCommentsOnMediaBugVideoComment) {
|
|
168
168
|
if (!this.doc || !this.schema || !range) {
|
|
169
169
|
return false;
|
|
170
170
|
}
|
|
171
|
-
return getPosFromRange(range, isCommentsOnMediaBugFixEnabled);
|
|
171
|
+
return getPosFromRange(range, isCommentsOnMediaBugFixEnabled, isCommentsOnMediaBugVideoComment);
|
|
172
172
|
}
|
|
173
173
|
}, {
|
|
174
174
|
key: "getAnnotationMarks",
|
|
@@ -213,7 +213,7 @@ var RendererActions = /*#__PURE__*/function () {
|
|
|
213
213
|
}
|
|
214
214
|
}, {
|
|
215
215
|
key: "applyAnnotation",
|
|
216
|
-
value: function applyAnnotation(pos, annotation, isCommentsOnMediaBugFixEnabled) {
|
|
216
|
+
value: function applyAnnotation(pos, annotation, isCommentsOnMediaBugFixEnabled, isCommentsOnMediaBugVideoCommentEnabled) {
|
|
217
217
|
if (!this.doc || !pos || !this.schema) {
|
|
218
218
|
return false;
|
|
219
219
|
}
|
package/dist/esm/steps/index.js
CHANGED
|
@@ -165,27 +165,45 @@ export function resolvePos(node, offset) {
|
|
|
165
165
|
}
|
|
166
166
|
return resolvedPos + offset;
|
|
167
167
|
}
|
|
168
|
-
export function getPosFromRange(range, isCommentsOnMediaBugFixEnabled) {
|
|
168
|
+
export function getPosFromRange(range, isCommentsOnMediaBugFixEnabled, isCommentsOnMediaBugVideoCommentEnabled) {
|
|
169
169
|
var startContainer = range.startContainer,
|
|
170
170
|
startOffset = range.startOffset,
|
|
171
171
|
endContainer = range.endContainer,
|
|
172
172
|
endOffset = range.endOffset;
|
|
173
|
-
var
|
|
174
|
-
if (
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
173
|
+
var possibleMediaOrMediaSingleElement = findParent(startContainer);
|
|
174
|
+
if (isCommentsOnMediaBugVideoCommentEnabled) {
|
|
175
|
+
// Video hover targets return media single, not media, thus, the extra check in condition.
|
|
176
|
+
var isMediaOrMediaSingle = possibleMediaOrMediaSingleElement && /media|mediaSingle/.test(getNodeType(possibleMediaOrMediaSingleElement) || '');
|
|
177
|
+
if (isMediaOrMediaSingle) {
|
|
178
|
+
var pos;
|
|
179
|
+
var mediaSingleElement = getNodeType(possibleMediaOrMediaSingleElement) === 'mediaSingle' ? possibleMediaOrMediaSingleElement : findMediaParent(possibleMediaOrMediaSingleElement);
|
|
178
180
|
if (mediaSingleElement) {
|
|
179
181
|
pos = getStartPos(mediaSingleElement);
|
|
180
182
|
}
|
|
181
|
-
|
|
182
|
-
|
|
183
|
+
if (pos !== undefined) {
|
|
184
|
+
return {
|
|
185
|
+
from: pos,
|
|
186
|
+
to: pos
|
|
187
|
+
};
|
|
188
|
+
}
|
|
183
189
|
}
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
190
|
+
} else {
|
|
191
|
+
if (possibleMediaOrMediaSingleElement && getNodeType(possibleMediaOrMediaSingleElement) === 'media') {
|
|
192
|
+
var _pos;
|
|
193
|
+
if (isCommentsOnMediaBugFixEnabled) {
|
|
194
|
+
var _mediaSingleElement = findMediaParent(possibleMediaOrMediaSingleElement);
|
|
195
|
+
if (_mediaSingleElement) {
|
|
196
|
+
_pos = getStartPos(_mediaSingleElement);
|
|
197
|
+
}
|
|
198
|
+
} else {
|
|
199
|
+
_pos = getStartPos(possibleMediaOrMediaSingleElement);
|
|
200
|
+
}
|
|
201
|
+
if (_pos !== undefined) {
|
|
202
|
+
return {
|
|
203
|
+
from: _pos,
|
|
204
|
+
to: _pos
|
|
205
|
+
};
|
|
206
|
+
}
|
|
189
207
|
}
|
|
190
208
|
}
|
|
191
209
|
var from = resolvePos(startContainer, startOffset);
|
|
@@ -47,7 +47,7 @@ import { nodeToReact } from '../../react/nodes';
|
|
|
47
47
|
export var NORMAL_SEVERITY_THRESHOLD = 2000;
|
|
48
48
|
export var DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
49
49
|
var packageName = "@atlaskit/renderer";
|
|
50
|
-
var packageVersion = "109.25.
|
|
50
|
+
var packageVersion = "109.25.5";
|
|
51
51
|
export var defaultNodeComponents = nodeToReact;
|
|
52
52
|
export var Renderer = /*#__PURE__*/function (_PureComponent) {
|
|
53
53
|
_inherits(Renderer, _PureComponent);
|
|
@@ -5,7 +5,7 @@ import { useAnnotationRangeDispatch, useAnnotationRangeState } from '../contexts
|
|
|
5
5
|
import { useAnnotationHoverContext } from '../contexts/AnnotationHoverContext';
|
|
6
6
|
import { ProvidersContext } from '../context';
|
|
7
7
|
export var RangeValidator = function RangeValidator(props) {
|
|
8
|
-
var _providers$inlineComm;
|
|
8
|
+
var _providers$inlineComm, _providers$inlineComm2;
|
|
9
9
|
var component = props.component,
|
|
10
10
|
rendererRef = props.rendererRef,
|
|
11
11
|
applyAnnotationDraftAt = props.applyAnnotationDraftAt,
|
|
@@ -21,10 +21,11 @@ export var RangeValidator = function RangeValidator(props) {
|
|
|
21
21
|
isWithinRange = _useAnnotationHoverCo.isWithinRange;
|
|
22
22
|
var providers = useContext(ProvidersContext);
|
|
23
23
|
var isCommentsOnMediaBugFixEnabled = (_providers$inlineComm = providers === null || providers === void 0 ? void 0 : providers.inlineComment.isCommentsOnMediaBugFixEnabled) !== null && _providers$inlineComm !== void 0 ? _providers$inlineComm : false;
|
|
24
|
+
var isCommentsOnMediaBugVideoCommentEnabled = (_providers$inlineComm2 = providers === null || providers === void 0 ? void 0 : providers.inlineComment.isCommentsOnMediaBugVideoCommentEnabled) !== null && _providers$inlineComm2 !== void 0 ? _providers$inlineComm2 : false;
|
|
24
25
|
if (!range || type !== 'hover') {
|
|
25
26
|
return null;
|
|
26
27
|
}
|
|
27
|
-
var documentPosition = actions.getPositionFromRange(range, isCommentsOnMediaBugFixEnabled);
|
|
28
|
+
var documentPosition = actions.getPositionFromRange(range, isCommentsOnMediaBugFixEnabled, isCommentsOnMediaBugVideoCommentEnabled);
|
|
28
29
|
return /*#__PURE__*/React.createElement(Mounter, {
|
|
29
30
|
isWithinRange: isWithinRange,
|
|
30
31
|
range: range,
|
|
@@ -52,10 +52,10 @@ export default class RendererActions implements RendererActionsOptions, Annotati
|
|
|
52
52
|
annotate(range: Range, annotationId: string, annotationType: 'inlineComment'): AnnotationActionResult;
|
|
53
53
|
isValidAnnotationRange(range: Range | null): boolean;
|
|
54
54
|
isValidAnnotationPosition(pos: Position): boolean;
|
|
55
|
-
getPositionFromRange(range: Range | null, isCommentsOnMediaBugFixEnabled?: boolean): Position | false;
|
|
55
|
+
getPositionFromRange(range: Range | null, isCommentsOnMediaBugFixEnabled?: boolean, isCommentsOnMediaBugVideoComment?: boolean): Position | false;
|
|
56
56
|
getAnnotationMarks(): Mark[];
|
|
57
57
|
getAnnotationsByPosition(range: Range): string[];
|
|
58
|
-
applyAnnotation(pos: Position, annotation: Annotation, isCommentsOnMediaBugFixEnabled?: boolean): AnnotationActionResult;
|
|
58
|
+
applyAnnotation(pos: Position, annotation: Annotation, isCommentsOnMediaBugFixEnabled?: boolean, isCommentsOnMediaBugVideoCommentEnabled?: boolean): AnnotationActionResult;
|
|
59
59
|
generateAnnotationIndexMatch(pos: Position): AnnotationByMatches | false;
|
|
60
60
|
}
|
|
61
61
|
export {};
|
|
@@ -6,7 +6,7 @@ interface AnnotationStepOptions {
|
|
|
6
6
|
annotationId: string;
|
|
7
7
|
annotationType: 'inlineComment';
|
|
8
8
|
}
|
|
9
|
-
export declare function getPosFromRange(range: Range, isCommentsOnMediaBugFixEnabled?: boolean): {
|
|
9
|
+
export declare function getPosFromRange(range: Range, isCommentsOnMediaBugFixEnabled?: boolean, isCommentsOnMediaBugVideoCommentEnabled?: boolean): {
|
|
10
10
|
from: number;
|
|
11
11
|
to: number;
|
|
12
12
|
} | false;
|
|
@@ -52,10 +52,10 @@ export default class RendererActions implements RendererActionsOptions, Annotati
|
|
|
52
52
|
annotate(range: Range, annotationId: string, annotationType: 'inlineComment'): AnnotationActionResult;
|
|
53
53
|
isValidAnnotationRange(range: Range | null): boolean;
|
|
54
54
|
isValidAnnotationPosition(pos: Position): boolean;
|
|
55
|
-
getPositionFromRange(range: Range | null, isCommentsOnMediaBugFixEnabled?: boolean): Position | false;
|
|
55
|
+
getPositionFromRange(range: Range | null, isCommentsOnMediaBugFixEnabled?: boolean, isCommentsOnMediaBugVideoComment?: boolean): Position | false;
|
|
56
56
|
getAnnotationMarks(): Mark[];
|
|
57
57
|
getAnnotationsByPosition(range: Range): string[];
|
|
58
|
-
applyAnnotation(pos: Position, annotation: Annotation, isCommentsOnMediaBugFixEnabled?: boolean): AnnotationActionResult;
|
|
58
|
+
applyAnnotation(pos: Position, annotation: Annotation, isCommentsOnMediaBugFixEnabled?: boolean, isCommentsOnMediaBugVideoCommentEnabled?: boolean): AnnotationActionResult;
|
|
59
59
|
generateAnnotationIndexMatch(pos: Position): AnnotationByMatches | false;
|
|
60
60
|
}
|
|
61
61
|
export {};
|
|
@@ -6,7 +6,7 @@ interface AnnotationStepOptions {
|
|
|
6
6
|
annotationId: string;
|
|
7
7
|
annotationType: 'inlineComment';
|
|
8
8
|
}
|
|
9
|
-
export declare function getPosFromRange(range: Range, isCommentsOnMediaBugFixEnabled?: boolean): {
|
|
9
|
+
export declare function getPosFromRange(range: Range, isCommentsOnMediaBugFixEnabled?: boolean, isCommentsOnMediaBugVideoCommentEnabled?: boolean): {
|
|
10
10
|
from: number;
|
|
11
11
|
to: number;
|
|
12
12
|
} | false;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/renderer",
|
|
3
|
-
"version": "109.25.
|
|
3
|
+
"version": "109.25.5",
|
|
4
4
|
"description": "Renderer component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"@atlaskit/status": "^1.4.0",
|
|
52
52
|
"@atlaskit/task-decision": "^17.10.0",
|
|
53
53
|
"@atlaskit/theme": "^12.8.0",
|
|
54
|
-
"@atlaskit/tokens": "^1.
|
|
54
|
+
"@atlaskit/tokens": "^1.47.0",
|
|
55
55
|
"@atlaskit/tooltip": "^18.3.0",
|
|
56
56
|
"@babel/runtime": "^7.0.0",
|
|
57
57
|
"@emotion/react": "^11.7.1",
|