@atlaskit/renderer 109.5.1 → 109.6.0
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 +17 -0
- package/dist/cjs/react/nodes/panel.js +2 -2
- package/dist/cjs/ui/Renderer/index.js +1 -1
- package/dist/cjs/ui/annotations/hooks/use-events.js +11 -3
- package/dist/es2019/react/nodes/panel.js +2 -2
- package/dist/es2019/ui/Renderer/index.js +1 -1
- package/dist/es2019/ui/annotations/hooks/use-events.js +11 -3
- package/dist/esm/react/nodes/panel.js +2 -2
- package/dist/esm/ui/Renderer/index.js +1 -1
- package/dist/esm/ui/annotations/hooks/use-events.js +11 -3
- package/dist/types/ui/annotations/hooks/use-events.d.ts +4 -4
- package/dist/types-ts4.5/ui/annotations/hooks/use-events.d.ts +4 -4
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @atlaskit/renderer
|
|
2
2
|
|
|
3
|
+
## 109.6.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#76262](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/76262) [`19f46b47a53f`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/19f46b47a53f) - Adding new AnnotationUpdateEvent to deselect all annotations
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
|
|
13
|
+
## 109.5.2
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- [#75775](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/75775) [`d0cee3285a1a`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/d0cee3285a1a) - ED-22287: Adding 16px right padding to panel for all elements. Also using 12px for the no-icon usecase.
|
|
18
|
+
- Updated dependencies
|
|
19
|
+
|
|
3
20
|
## 109.5.1
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
|
@@ -24,9 +24,9 @@ var PanelStyled = function PanelStyled(_ref) {
|
|
|
24
24
|
var backgroundColor = _ref.backgroundColor,
|
|
25
25
|
hasIcon = _ref.hasIcon,
|
|
26
26
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
27
|
-
var styles = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n &.", " {\n ", "\n\n &[data-panel-type=", "] {\n ", "\n }\n }\n "])), _panel.PanelSharedCssClassName.prefix, (0, _panel.panelSharedStylesWithoutPrefix)(), _adfSchema.PanelType.CUSTOM, hasIcon ? '' : 'padding-left: 12px;');
|
|
27
|
+
var styles = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n &.", " {\n ", "\n\n &[data-panel-type=", "] {\n ", "\n }\n }\n "])), _panel.PanelSharedCssClassName.prefix, (0, _panel.panelSharedStylesWithoutPrefix)(), _adfSchema.PanelType.CUSTOM, hasIcon ? '' : 'padding-left: 12px;padding-right: 12px;');
|
|
28
28
|
if (props['data-panel-type'] === _adfSchema.PanelType.CUSTOM && backgroundColor) {
|
|
29
|
-
styles = (0, _react2.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n &.", " {\n ", "\n }\n\n &[data-panel-type=", "] {\n background-color: ", ";\n ", "\n }\n "])), _panel.PanelSharedCssClassName.prefix, (0, _panel.panelSharedStylesWithoutPrefix)(), _adfSchema.PanelType.CUSTOM, (0, _editorPalette.hexToEditorBackgroundPaletteColor)(backgroundColor) || backgroundColor, hasIcon ? '' : 'padding-left: 12px;');
|
|
29
|
+
styles = (0, _react2.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n &.", " {\n ", "\n }\n\n &[data-panel-type=", "] {\n background-color: ", ";\n ", "\n }\n "])), _panel.PanelSharedCssClassName.prefix, (0, _panel.panelSharedStylesWithoutPrefix)(), _adfSchema.PanelType.CUSTOM, (0, _editorPalette.hexToEditorBackgroundPaletteColor)(backgroundColor) || backgroundColor, hasIcon ? '' : 'padding-left: 12px;padding-right: 12px;');
|
|
30
30
|
}
|
|
31
31
|
return (0, _react2.jsx)("div", (0, _extends2.default)({
|
|
32
32
|
css: styles
|
|
@@ -54,7 +54,7 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
|
54
54
|
var NORMAL_SEVERITY_THRESHOLD = exports.NORMAL_SEVERITY_THRESHOLD = 2000;
|
|
55
55
|
var DEGRADED_SEVERITY_THRESHOLD = exports.DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
56
56
|
var packageName = "@atlaskit/renderer";
|
|
57
|
-
var packageVersion = "109.
|
|
57
|
+
var packageVersion = "109.6.0";
|
|
58
58
|
var Renderer = exports.Renderer = /*#__PURE__*/function (_PureComponent) {
|
|
59
59
|
(0, _inherits2.default)(Renderer, _PureComponent);
|
|
60
60
|
var _super = _createSuper(Renderer);
|
|
@@ -83,7 +83,7 @@ var useAnnotationClickEvent = exports.useAnnotationClickEvent = function useAnno
|
|
|
83
83
|
if (!updateSubscriber) {
|
|
84
84
|
return;
|
|
85
85
|
}
|
|
86
|
-
var
|
|
86
|
+
var clickCb = function clickCb(_ref3) {
|
|
87
87
|
var annotationIds = _ref3.annotationIds,
|
|
88
88
|
eventTarget = _ref3.eventTarget;
|
|
89
89
|
var annotationsByType = annotationIds.filter(function (id) {
|
|
@@ -110,9 +110,17 @@ var useAnnotationClickEvent = exports.useAnnotationClickEvent = function useAnno
|
|
|
110
110
|
clickElementTarget: eventTarget
|
|
111
111
|
});
|
|
112
112
|
};
|
|
113
|
-
|
|
113
|
+
var deselectCb = function deselectCb() {
|
|
114
|
+
setAnnotationClickEvent({
|
|
115
|
+
annotations: [],
|
|
116
|
+
clickElementTarget: undefined
|
|
117
|
+
});
|
|
118
|
+
};
|
|
119
|
+
updateSubscriber.on(_types.AnnotationUpdateEvent.ON_ANNOTATION_CLICK, clickCb);
|
|
120
|
+
updateSubscriber.on(_types.AnnotationUpdateEvent.DESELECT_ANNOTATIONS, deselectCb);
|
|
114
121
|
return function () {
|
|
115
|
-
updateSubscriber.off(_types.AnnotationUpdateEvent.ON_ANNOTATION_CLICK,
|
|
122
|
+
updateSubscriber.off(_types.AnnotationUpdateEvent.ON_ANNOTATION_CLICK, clickCb);
|
|
123
|
+
updateSubscriber.off(_types.AnnotationUpdateEvent.DESELECT_ANNOTATIONS, deselectCb);
|
|
116
124
|
};
|
|
117
125
|
}, [updateSubscriber, createAnalyticsEvent]);
|
|
118
126
|
return annotationClickEvent;
|
|
@@ -19,7 +19,7 @@ const PanelStyled = ({
|
|
|
19
19
|
${panelSharedStylesWithoutPrefix()}
|
|
20
20
|
|
|
21
21
|
&[data-panel-type=${PanelType.CUSTOM}] {
|
|
22
|
-
${hasIcon ? '' : 'padding-left: 12px;'}
|
|
22
|
+
${hasIcon ? '' : 'padding-left: 12px;padding-right: 12px;'}
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
`;
|
|
@@ -31,7 +31,7 @@ const PanelStyled = ({
|
|
|
31
31
|
|
|
32
32
|
&[data-panel-type=${PanelType.CUSTOM}] {
|
|
33
33
|
background-color: ${hexToEditorBackgroundPaletteColor(backgroundColor) || backgroundColor};
|
|
34
|
-
${hasIcon ? '' : 'padding-left: 12px;'}
|
|
34
|
+
${hasIcon ? '' : 'padding-left: 12px;padding-right: 12px;'}
|
|
35
35
|
}
|
|
36
36
|
`;
|
|
37
37
|
}
|
|
@@ -35,7 +35,7 @@ import { EditorMediaClientProvider } from '../../react/utils/EditorMediaClientPr
|
|
|
35
35
|
export const NORMAL_SEVERITY_THRESHOLD = 2000;
|
|
36
36
|
export const DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
37
37
|
const packageName = "@atlaskit/renderer";
|
|
38
|
-
const packageVersion = "109.
|
|
38
|
+
const packageVersion = "109.6.0";
|
|
39
39
|
export class Renderer extends PureComponent {
|
|
40
40
|
constructor(props) {
|
|
41
41
|
super(props);
|
|
@@ -73,7 +73,7 @@ export const useAnnotationClickEvent = props => {
|
|
|
73
73
|
if (!updateSubscriber) {
|
|
74
74
|
return;
|
|
75
75
|
}
|
|
76
|
-
const
|
|
76
|
+
const clickCb = ({
|
|
77
77
|
annotationIds,
|
|
78
78
|
eventTarget
|
|
79
79
|
}) => {
|
|
@@ -97,9 +97,17 @@ export const useAnnotationClickEvent = props => {
|
|
|
97
97
|
clickElementTarget: eventTarget
|
|
98
98
|
});
|
|
99
99
|
};
|
|
100
|
-
|
|
100
|
+
const deselectCb = () => {
|
|
101
|
+
setAnnotationClickEvent({
|
|
102
|
+
annotations: [],
|
|
103
|
+
clickElementTarget: undefined
|
|
104
|
+
});
|
|
105
|
+
};
|
|
106
|
+
updateSubscriber.on(AnnotationUpdateEvent.ON_ANNOTATION_CLICK, clickCb);
|
|
107
|
+
updateSubscriber.on(AnnotationUpdateEvent.DESELECT_ANNOTATIONS, deselectCb);
|
|
101
108
|
return () => {
|
|
102
|
-
updateSubscriber.off(AnnotationUpdateEvent.ON_ANNOTATION_CLICK,
|
|
109
|
+
updateSubscriber.off(AnnotationUpdateEvent.ON_ANNOTATION_CLICK, clickCb);
|
|
110
|
+
updateSubscriber.off(AnnotationUpdateEvent.DESELECT_ANNOTATIONS, deselectCb);
|
|
103
111
|
};
|
|
104
112
|
}, [updateSubscriber, createAnalyticsEvent]);
|
|
105
113
|
return annotationClickEvent;
|
|
@@ -17,9 +17,9 @@ var PanelStyled = function PanelStyled(_ref) {
|
|
|
17
17
|
var backgroundColor = _ref.backgroundColor,
|
|
18
18
|
hasIcon = _ref.hasIcon,
|
|
19
19
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
20
|
-
var styles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n &.", " {\n ", "\n\n &[data-panel-type=", "] {\n ", "\n }\n }\n "])), PanelSharedCssClassName.prefix, panelSharedStylesWithoutPrefix(), PanelType.CUSTOM, hasIcon ? '' : 'padding-left: 12px;');
|
|
20
|
+
var styles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n &.", " {\n ", "\n\n &[data-panel-type=", "] {\n ", "\n }\n }\n "])), PanelSharedCssClassName.prefix, panelSharedStylesWithoutPrefix(), PanelType.CUSTOM, hasIcon ? '' : 'padding-left: 12px;padding-right: 12px;');
|
|
21
21
|
if (props['data-panel-type'] === PanelType.CUSTOM && backgroundColor) {
|
|
22
|
-
styles = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n &.", " {\n ", "\n }\n\n &[data-panel-type=", "] {\n background-color: ", ";\n ", "\n }\n "])), PanelSharedCssClassName.prefix, panelSharedStylesWithoutPrefix(), PanelType.CUSTOM, hexToEditorBackgroundPaletteColor(backgroundColor) || backgroundColor, hasIcon ? '' : 'padding-left: 12px;');
|
|
22
|
+
styles = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n &.", " {\n ", "\n }\n\n &[data-panel-type=", "] {\n background-color: ", ";\n ", "\n }\n "])), PanelSharedCssClassName.prefix, panelSharedStylesWithoutPrefix(), PanelType.CUSTOM, hexToEditorBackgroundPaletteColor(backgroundColor) || backgroundColor, hasIcon ? '' : 'padding-left: 12px;padding-right: 12px;');
|
|
23
23
|
}
|
|
24
24
|
return jsx("div", _extends({
|
|
25
25
|
css: styles
|
|
@@ -45,7 +45,7 @@ import { EditorMediaClientProvider } from '../../react/utils/EditorMediaClientPr
|
|
|
45
45
|
export var NORMAL_SEVERITY_THRESHOLD = 2000;
|
|
46
46
|
export var DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
47
47
|
var packageName = "@atlaskit/renderer";
|
|
48
|
-
var packageVersion = "109.
|
|
48
|
+
var packageVersion = "109.6.0";
|
|
49
49
|
export var Renderer = /*#__PURE__*/function (_PureComponent) {
|
|
50
50
|
_inherits(Renderer, _PureComponent);
|
|
51
51
|
var _super = _createSuper(Renderer);
|
|
@@ -76,7 +76,7 @@ export var useAnnotationClickEvent = function useAnnotationClickEvent(props) {
|
|
|
76
76
|
if (!updateSubscriber) {
|
|
77
77
|
return;
|
|
78
78
|
}
|
|
79
|
-
var
|
|
79
|
+
var clickCb = function clickCb(_ref3) {
|
|
80
80
|
var annotationIds = _ref3.annotationIds,
|
|
81
81
|
eventTarget = _ref3.eventTarget;
|
|
82
82
|
var annotationsByType = annotationIds.filter(function (id) {
|
|
@@ -103,9 +103,17 @@ export var useAnnotationClickEvent = function useAnnotationClickEvent(props) {
|
|
|
103
103
|
clickElementTarget: eventTarget
|
|
104
104
|
});
|
|
105
105
|
};
|
|
106
|
-
|
|
106
|
+
var deselectCb = function deselectCb() {
|
|
107
|
+
setAnnotationClickEvent({
|
|
108
|
+
annotations: [],
|
|
109
|
+
clickElementTarget: undefined
|
|
110
|
+
});
|
|
111
|
+
};
|
|
112
|
+
updateSubscriber.on(AnnotationUpdateEvent.ON_ANNOTATION_CLICK, clickCb);
|
|
113
|
+
updateSubscriber.on(AnnotationUpdateEvent.DESELECT_ANNOTATIONS, deselectCb);
|
|
107
114
|
return function () {
|
|
108
|
-
updateSubscriber.off(AnnotationUpdateEvent.ON_ANNOTATION_CLICK,
|
|
115
|
+
updateSubscriber.off(AnnotationUpdateEvent.ON_ANNOTATION_CLICK, clickCb);
|
|
116
|
+
updateSubscriber.off(AnnotationUpdateEvent.DESELECT_ANNOTATIONS, deselectCb);
|
|
109
117
|
};
|
|
110
118
|
}, [updateSubscriber, createAnalyticsEvent]);
|
|
111
119
|
return annotationClickEvent;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { AnnotationUpdateEmitter } from '@atlaskit/editor-common/types';
|
|
2
|
-
import type {
|
|
3
|
-
import {
|
|
4
|
-
import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
1
|
+
import type { InlineCommentViewComponentProps, AnnotationUpdateEmitter } from '@atlaskit/editor-common/types';
|
|
2
|
+
import type { AnnotationMarkStates, AnnotationId } from '@atlaskit/adf-schema';
|
|
3
|
+
import { AnnotationTypes } from '@atlaskit/adf-schema';
|
|
4
|
+
import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
5
5
|
type ListenEventProps = {
|
|
6
6
|
id: AnnotationId;
|
|
7
7
|
updateSubscriber: AnnotationUpdateEmitter | null;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { AnnotationUpdateEmitter } from '@atlaskit/editor-common/types';
|
|
2
|
-
import type {
|
|
3
|
-
import {
|
|
4
|
-
import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
1
|
+
import type { InlineCommentViewComponentProps, AnnotationUpdateEmitter } from '@atlaskit/editor-common/types';
|
|
2
|
+
import type { AnnotationMarkStates, AnnotationId } from '@atlaskit/adf-schema';
|
|
3
|
+
import { AnnotationTypes } from '@atlaskit/adf-schema';
|
|
4
|
+
import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
5
5
|
type ListenEventProps = {
|
|
6
6
|
id: AnnotationId;
|
|
7
7
|
updateSubscriber: AnnotationUpdateEmitter | null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/renderer",
|
|
3
|
-
"version": "109.
|
|
3
|
+
"version": "109.6.0",
|
|
4
4
|
"description": "Renderer component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"@atlaskit/analytics-next": "^9.2.0",
|
|
32
32
|
"@atlaskit/button": "^17.4.0",
|
|
33
33
|
"@atlaskit/code": "^15.1.0",
|
|
34
|
-
"@atlaskit/editor-common": "^78.
|
|
34
|
+
"@atlaskit/editor-common": "^78.6.0",
|
|
35
35
|
"@atlaskit/editor-json-transformer": "^8.10.0",
|
|
36
36
|
"@atlaskit/editor-palette": "1.5.2",
|
|
37
37
|
"@atlaskit/editor-prosemirror": "3.0.0",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"@atlaskit/media-ui": "^25.1.0",
|
|
48
48
|
"@atlaskit/media-viewer": "^48.2.0",
|
|
49
49
|
"@atlaskit/platform-feature-flags": "^0.2.0",
|
|
50
|
-
"@atlaskit/smart-card": "^26.
|
|
50
|
+
"@atlaskit/smart-card": "^26.48.0",
|
|
51
51
|
"@atlaskit/status": "^1.4.0",
|
|
52
52
|
"@atlaskit/task-decision": "^17.9.0",
|
|
53
53
|
"@atlaskit/theme": "^12.6.0",
|