@atlaskit/renderer 151.0.1 → 151.0.2
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 +9 -0
- package/dist/cjs/react/nodes/blockCard.js +1 -2
- package/dist/cjs/react/nodes/extension-comments.js +10 -10
- package/dist/cjs/react/nodes/task-item-with-providers.js +2 -2
- package/dist/es2019/react/nodes/blockCard.js +1 -2
- package/dist/es2019/react/nodes/extension-comments.js +3 -3
- package/dist/es2019/react/nodes/task-item-with-providers.js +1 -1
- package/dist/esm/react/nodes/blockCard.js +1 -2
- package/dist/esm/react/nodes/extension-comments.js +3 -3
- package/dist/esm/react/nodes/task-item-with-providers.js +1 -1
- package/dist/types/react/index.d.ts +2 -1
- package/dist/types/react/nodes/task-item-with-providers.d.ts +1 -1
- package/dist/types/ui/renderer-props.d.ts +2 -1
- package/package.json +2 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @atlaskit/renderer
|
|
2
2
|
|
|
3
|
+
## 151.0.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`bc79027197d91`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/bc79027197d91) -
|
|
8
|
+
Clean up the platform_ssr_smartlink_cards feature gate, retaining SSR cards when enabled by the
|
|
9
|
+
consumer.
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
3
12
|
## 151.0.1
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
|
@@ -15,7 +15,6 @@ var _datasource = require("@atlaskit/editor-common/utils/datasource");
|
|
|
15
15
|
var _WidthProvider = require("@atlaskit/editor-common/WidthProvider");
|
|
16
16
|
var _editorSmartLinkDraggable = require("@atlaskit/editor-smart-link-draggable");
|
|
17
17
|
var _datasourceTableViewWithWrappers = require("@atlaskit/link-datasource/datasource-table-view-with-wrappers");
|
|
18
|
-
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
19
18
|
var _lazy = require("@atlaskit/smart-card/card/lazy");
|
|
20
19
|
var _ssr = require("@atlaskit/smart-card/ssr");
|
|
21
20
|
var _consts = require("../../consts");
|
|
@@ -162,7 +161,7 @@ function BlockCard(props) {
|
|
|
162
161
|
});
|
|
163
162
|
}
|
|
164
163
|
var cardComponent;
|
|
165
|
-
if (smartLinks !== null && smartLinks !== void 0 && smartLinks.ssr && url
|
|
164
|
+
if (smartLinks !== null && smartLinks !== void 0 && smartLinks.ssr && url) {
|
|
166
165
|
cardComponent = (0, _react.jsx)(_ssr.CardSSR, (0, _extends2.default)({
|
|
167
166
|
appearance: "block",
|
|
168
167
|
platform: platform
|
|
@@ -12,9 +12,9 @@ var _runtime = require("@compiled/react/runtime");
|
|
|
12
12
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
13
13
|
var _react = _interopRequireWildcard(require("react"));
|
|
14
14
|
var _annotation = require("@atlaskit/adf-schema/annotation");
|
|
15
|
-
var
|
|
16
|
-
var
|
|
17
|
-
var
|
|
15
|
+
var _inlineCommentEvents = require("@atlaskit/editor-common/analytics/types/inline-comment-events");
|
|
16
|
+
var _CommentBadgeNext = require("@atlaskit/editor-common/media-single/CommentBadgeNext");
|
|
17
|
+
var _emitter = require("@atlaskit/editor-common/types/emitter");
|
|
18
18
|
var _AnnotationManagerContext = require("../../ui/annotations/contexts/AnnotationManagerContext");
|
|
19
19
|
var _AnnotationRangeContext = require("../../ui/annotations/contexts/AnnotationRangeContext");
|
|
20
20
|
var _useInlineCommentSubscriber = require("../../ui/annotations/hooks/use-inline-comment-subscriber");
|
|
@@ -76,11 +76,11 @@ var ExtensionCommentsEnabled = function ExtensionCommentsEnabled(_ref) {
|
|
|
76
76
|
var onBlur = function onBlur() {
|
|
77
77
|
return setFocusedId(undefined);
|
|
78
78
|
};
|
|
79
|
-
updateSubscriber.on(
|
|
80
|
-
updateSubscriber.on(
|
|
79
|
+
updateSubscriber.on(_emitter.AnnotationUpdateEvent.SET_ANNOTATION_FOCUS, onFocus);
|
|
80
|
+
updateSubscriber.on(_emitter.AnnotationUpdateEvent.REMOVE_ANNOTATION_FOCUS, onBlur);
|
|
81
81
|
return function () {
|
|
82
|
-
updateSubscriber.off(
|
|
83
|
-
updateSubscriber.off(
|
|
82
|
+
updateSubscriber.off(_emitter.AnnotationUpdateEvent.SET_ANNOTATION_FOCUS, onFocus);
|
|
83
|
+
updateSubscriber.off(_emitter.AnnotationUpdateEvent.REMOVE_ANNOTATION_FOCUS, onBlur);
|
|
84
84
|
};
|
|
85
85
|
}, [updateSubscriber]);
|
|
86
86
|
var onClick = (0, _react.useCallback)(function (event) {
|
|
@@ -89,11 +89,11 @@ var ExtensionCommentsEnabled = function ExtensionCommentsEnabled(_ref) {
|
|
|
89
89
|
// Anchor the thread to this chart, not an icon inside the badge or a nested renderer.
|
|
90
90
|
var extension = event.currentTarget.closest('.ak-renderer-extension');
|
|
91
91
|
if (extension && activeIds.length) {
|
|
92
|
-
updateSubscriber === null || updateSubscriber === void 0 || updateSubscriber.emit(
|
|
92
|
+
updateSubscriber === null || updateSubscriber === void 0 || updateSubscriber.emit(_emitter.AnnotationUpdateEvent.ON_ANNOTATION_CLICK, {
|
|
93
93
|
annotationIds: activeIds,
|
|
94
94
|
eventTarget: extension,
|
|
95
95
|
eventTargetType: 'extension',
|
|
96
|
-
viewMethod:
|
|
96
|
+
viewMethod: _inlineCommentEvents.VIEW_METHOD.BADGE
|
|
97
97
|
});
|
|
98
98
|
}
|
|
99
99
|
}, [activeIds, updateSubscriber]);
|
|
@@ -121,7 +121,7 @@ var ExtensionCommentsEnabled = function ExtensionCommentsEnabled(_ref) {
|
|
|
121
121
|
});
|
|
122
122
|
}), enabled && activeIds.length > 0 && updateSubscriber && /*#__PURE__*/_react.default.createElement("div", {
|
|
123
123
|
className: (0, _runtime.ax)(["_kqswstnw _154iu2gc _1xi2u2gc"])
|
|
124
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
124
|
+
}, /*#__PURE__*/_react.default.createElement(_CommentBadgeNext.CommentBadgeNext, {
|
|
125
125
|
status: active ? 'active' : entered ? 'entered' : 'default',
|
|
126
126
|
onClick: onClick,
|
|
127
127
|
onMouseEnter: onMouseEnter,
|
|
@@ -11,7 +11,7 @@ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/
|
|
|
11
11
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
12
12
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
13
13
|
var _react = _interopRequireDefault(require("react"));
|
|
14
|
-
var
|
|
14
|
+
var _resourcedTaskItem = _interopRequireDefault(require("@atlaskit/task-decision/resourced-task-item"));
|
|
15
15
|
var _excluded = ["objectAri", "isRenderer"];
|
|
16
16
|
function TaskItemWithProviders(props) {
|
|
17
17
|
var objectAri = props.objectAri,
|
|
@@ -59,7 +59,7 @@ function TaskItemWithProviders(props) {
|
|
|
59
59
|
var resolvedObjectId = resolvedContextProvider && resolvedContextProvider.objectId || objectAri;
|
|
60
60
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
61
61
|
"data-task-local-id": props.taskId || ''
|
|
62
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
62
|
+
}, /*#__PURE__*/_react.default.createElement(_resourcedTaskItem.default, (0, _extends2.default)({}, otherProps, {
|
|
63
63
|
objectAri: resolvedObjectId,
|
|
64
64
|
isRenderer: isRenderer
|
|
65
65
|
})));
|
|
@@ -13,7 +13,6 @@ import { canRenderDatasource } from '@atlaskit/editor-common/utils/datasource';
|
|
|
13
13
|
import { WidthConsumer } from '@atlaskit/editor-common/WidthProvider';
|
|
14
14
|
import { SmartLinkDraggable, SMART_LINK_DRAG_TYPES, SMART_LINK_APPEARANCE } from '@atlaskit/editor-smart-link-draggable';
|
|
15
15
|
import { DatasourceTableViewWithWrappers as DatasourceTableView } from '@atlaskit/link-datasource/datasource-table-view-with-wrappers';
|
|
16
|
-
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
17
16
|
import { Card } from '@atlaskit/smart-card/card/lazy';
|
|
18
17
|
import { CardSSR } from '@atlaskit/smart-card/ssr';
|
|
19
18
|
import { RendererCssClassName } from '../../consts';
|
|
@@ -151,7 +150,7 @@ export default function BlockCard(props) {
|
|
|
151
150
|
});
|
|
152
151
|
}
|
|
153
152
|
let cardComponent;
|
|
154
|
-
if (smartLinks !== null && smartLinks !== void 0 && smartLinks.ssr && url
|
|
153
|
+
if (smartLinks !== null && smartLinks !== void 0 && smartLinks.ssr && url) {
|
|
155
154
|
cardComponent = jsx(CardSSR, _extends({
|
|
156
155
|
appearance: "block",
|
|
157
156
|
platform: platform
|
|
@@ -3,9 +3,9 @@ import "./extension-comments.compiled.css";
|
|
|
3
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
4
|
import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
|
5
5
|
import { AnnotationMarkStates, AnnotationTypes } from '@atlaskit/adf-schema/annotation';
|
|
6
|
-
import { VIEW_METHOD } from '@atlaskit/editor-common/analytics';
|
|
7
|
-
import { CommentBadgeNext } from '@atlaskit/editor-common/media-single';
|
|
8
|
-
import { AnnotationUpdateEvent } from '@atlaskit/editor-common/types';
|
|
6
|
+
import { VIEW_METHOD } from '@atlaskit/editor-common/analytics/types/inline-comment-events';
|
|
7
|
+
import { CommentBadgeNext } from '@atlaskit/editor-common/media-single/CommentBadgeNext';
|
|
8
|
+
import { AnnotationUpdateEvent } from '@atlaskit/editor-common/types/emitter';
|
|
9
9
|
import { useAnnotationManagerState } from '../../ui/annotations/contexts/AnnotationManagerContext';
|
|
10
10
|
import { useAnnotationRangeState } from '../../ui/annotations/contexts/AnnotationRangeContext';
|
|
11
11
|
import { useInlineCommentSubscriberContext } from '../../ui/annotations/hooks/use-inline-comment-subscriber';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import
|
|
3
|
+
import ResourcedTaskItem from '@atlaskit/task-decision/resourced-task-item';
|
|
4
4
|
export default function TaskItemWithProviders(props) {
|
|
5
5
|
const {
|
|
6
6
|
objectAri,
|
|
@@ -13,7 +13,6 @@ import { canRenderDatasource } from '@atlaskit/editor-common/utils/datasource';
|
|
|
13
13
|
import { WidthConsumer } from '@atlaskit/editor-common/WidthProvider';
|
|
14
14
|
import { SmartLinkDraggable, SMART_LINK_DRAG_TYPES, SMART_LINK_APPEARANCE } from '@atlaskit/editor-smart-link-draggable';
|
|
15
15
|
import { DatasourceTableViewWithWrappers as DatasourceTableView } from '@atlaskit/link-datasource/datasource-table-view-with-wrappers';
|
|
16
|
-
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
17
16
|
import { Card } from '@atlaskit/smart-card/card/lazy';
|
|
18
17
|
import { CardSSR } from '@atlaskit/smart-card/ssr';
|
|
19
18
|
import { RendererCssClassName } from '../../consts';
|
|
@@ -154,7 +153,7 @@ export default function BlockCard(props) {
|
|
|
154
153
|
});
|
|
155
154
|
}
|
|
156
155
|
var cardComponent;
|
|
157
|
-
if (smartLinks !== null && smartLinks !== void 0 && smartLinks.ssr && url
|
|
156
|
+
if (smartLinks !== null && smartLinks !== void 0 && smartLinks.ssr && url) {
|
|
158
157
|
cardComponent = jsx(CardSSR, _extends({
|
|
159
158
|
appearance: "block",
|
|
160
159
|
platform: platform
|
|
@@ -4,9 +4,9 @@ import "./extension-comments.compiled.css";
|
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
5
|
import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
|
6
6
|
import { AnnotationMarkStates, AnnotationTypes } from '@atlaskit/adf-schema/annotation';
|
|
7
|
-
import { VIEW_METHOD } from '@atlaskit/editor-common/analytics';
|
|
8
|
-
import { CommentBadgeNext } from '@atlaskit/editor-common/media-single';
|
|
9
|
-
import { AnnotationUpdateEvent } from '@atlaskit/editor-common/types';
|
|
7
|
+
import { VIEW_METHOD } from '@atlaskit/editor-common/analytics/types/inline-comment-events';
|
|
8
|
+
import { CommentBadgeNext } from '@atlaskit/editor-common/media-single/CommentBadgeNext';
|
|
9
|
+
import { AnnotationUpdateEvent } from '@atlaskit/editor-common/types/emitter';
|
|
10
10
|
import { useAnnotationManagerState } from '../../ui/annotations/contexts/AnnotationManagerContext';
|
|
11
11
|
import { useAnnotationRangeState } from '../../ui/annotations/contexts/AnnotationRangeContext';
|
|
12
12
|
import { useInlineCommentSubscriberContext } from '../../ui/annotations/hooks/use-inline-comment-subscriber';
|
|
@@ -5,7 +5,7 @@ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProper
|
|
|
5
5
|
var _excluded = ["objectAri", "isRenderer"];
|
|
6
6
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
7
7
|
import React from 'react';
|
|
8
|
-
import
|
|
8
|
+
import ResourcedTaskItem from '@atlaskit/task-decision/resourced-task-item';
|
|
9
9
|
export default function TaskItemWithProviders(props) {
|
|
10
10
|
var objectAri = props.objectAri,
|
|
11
11
|
isRenderer = props.isRenderer,
|
|
@@ -5,7 +5,8 @@ import type { Parameters } from '@atlaskit/editor-common/extensions/extension-pa
|
|
|
5
5
|
import type { MentionNodeDataProvider } from '@atlaskit/editor-common/mention';
|
|
6
6
|
import type ProviderFactory from '@atlaskit/editor-common/provider-factory/provider-factory';
|
|
7
7
|
import type { Fragment, Mark, Node } from '@atlaskit/editor-prosemirror/model';
|
|
8
|
-
import type {
|
|
8
|
+
import type { EmojiResourceConfig } from '@atlaskit/emoji/emoji-resource';
|
|
9
|
+
import type { EmojiProviderLookupOrder } from '@atlaskit/emoji/types';
|
|
9
10
|
import type { AnalyticsEventPayload } from '../analytics/events';
|
|
10
11
|
import type { Serializer } from '../serializer';
|
|
11
12
|
import type { MediaOptions } from '../types/mediaOptions';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { ReactNode } from 'react';
|
|
3
3
|
import type { ContextIdentifierProvider } from '@atlaskit/editor-common/provider-factory/context-identifier-provider';
|
|
4
|
-
import type { ContentRef, TaskDecisionProvider } from '@atlaskit/task-decision';
|
|
4
|
+
import type { ContentRef, TaskDecisionProvider } from '@atlaskit/task-decision/types';
|
|
5
5
|
interface Props {
|
|
6
6
|
children?: ReactNode;
|
|
7
7
|
contentRef?: ContentRef;
|
|
@@ -10,7 +10,8 @@ import type { AnnotationProviders } from '@atlaskit/editor-common/types/annotati
|
|
|
10
10
|
import type { UnsupportedContentLevelsTracking } from '@atlaskit/editor-common/utils/get-unsupported-content-level-data';
|
|
11
11
|
import type { ADFStage } from '@atlaskit/editor-common/utils/validator';
|
|
12
12
|
import type { Schema } from '@atlaskit/editor-prosemirror/model';
|
|
13
|
-
import type {
|
|
13
|
+
import type { EmojiResourceConfig } from '@atlaskit/emoji/emoji-resource';
|
|
14
|
+
import type { EmojiProviderLookupOrder } from '@atlaskit/emoji/types';
|
|
14
15
|
import type { ReactSerializerInit, RendererContext, Serializer } from '../';
|
|
15
16
|
import type { TextHighlighter, ExtensionViewportSize } from '../react/types';
|
|
16
17
|
import type { RenderOutputStat } from '../render-document';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/renderer",
|
|
3
|
-
"version": "151.0.
|
|
3
|
+
"version": "151.0.2",
|
|
4
4
|
"description": "Renderer component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -112,7 +112,7 @@
|
|
|
112
112
|
"@atlaskit/media-state": "^4.0.0",
|
|
113
113
|
"@atlaskit/media-test-helpers": "^43.0.0",
|
|
114
114
|
"@atlaskit/mention": "^30.3.0",
|
|
115
|
-
"@atlaskit/modal-dialog": "^17.
|
|
115
|
+
"@atlaskit/modal-dialog": "^17.1.0",
|
|
116
116
|
"@atlaskit/navigation-system": "^11.3.0",
|
|
117
117
|
"@atlaskit/primitives": "^22.6.0",
|
|
118
118
|
"@atlaskit/profilecard": "^27.1.0",
|
|
@@ -184,9 +184,6 @@
|
|
|
184
184
|
"platform_ssr_smartlink_embeds": {
|
|
185
185
|
"type": "boolean"
|
|
186
186
|
},
|
|
187
|
-
"platform_ssr_smartlink_cards": {
|
|
188
|
-
"type": "boolean"
|
|
189
|
-
},
|
|
190
187
|
"platform_editor_custom_emoji_unicode_fallback": {
|
|
191
188
|
"type": "boolean",
|
|
192
189
|
"referenceOnly": true
|