@atlaskit/renderer 109.53.2 → 110.0.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 +20 -0
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/react/hooks/use-in-viewport.js +3 -3
- package/dist/cjs/react/index.js +2 -2
- package/dist/cjs/react/marks/backgroundColor.js +1 -1
- package/dist/cjs/react/marks/confluence-inline-comment.js +2 -2
- package/dist/cjs/react/marks/index.js +1 -1
- package/dist/cjs/react/marks/link.js +1 -1
- package/dist/cjs/react/marks/textColor.js +1 -1
- package/dist/cjs/react/nodes/blockCard.js +16 -25
- package/dist/cjs/react/nodes/codeBlock/components/lightWeightCodeBlock.js +1 -1
- package/dist/cjs/react/nodes/codeBlock/windowedCodeBlock.js +1 -1
- package/dist/cjs/react/nodes/date.js +1 -1
- package/dist/cjs/react/nodes/decisionList.js +2 -2
- package/dist/cjs/react/nodes/embedCard.js +1 -4
- package/dist/cjs/react/nodes/fallback.js +6 -6
- package/dist/cjs/react/nodes/heading-anchor.js +1 -1
- package/dist/cjs/react/nodes/index.js +1 -1
- package/dist/cjs/react/nodes/media/index.js +2 -2
- package/dist/cjs/react/nodes/mediaGroup.js +2 -2
- package/dist/cjs/react/nodes/mediaInline.js +3 -3
- package/dist/cjs/react/nodes/mediaSingle/index.js +1 -1
- package/dist/cjs/react/nodes/mention.js +1 -1
- package/dist/cjs/react/nodes/multiBodiedExtension.js +1 -1
- package/dist/cjs/react/nodes/status.js +1 -1
- package/dist/cjs/react/nodes/table.js +5 -5
- package/dist/cjs/react/nodes/tableRow.js +1 -1
- package/dist/cjs/react/nodes/taskItem.js +2 -2
- package/dist/cjs/react/nodes/taskList.js +2 -2
- package/dist/cjs/react/utils/EditorMediaClientProvider.js +1 -1
- package/dist/cjs/react/utils/segment-text.js +3 -3
- package/dist/cjs/steps/index.js +1 -0
- package/dist/cjs/ui/Expand.js +2 -5
- package/dist/cjs/ui/ExtensionRenderer.js +1 -1
- package/dist/cjs/ui/MediaCard.js +4 -6
- package/dist/cjs/ui/Renderer/ErrorBoundary.js +1 -1
- package/dist/cjs/ui/Renderer/index.js +3 -3
- package/dist/cjs/ui/Renderer/style.js +2 -2
- package/dist/cjs/ui/Renderer/truncated-wrapper.js +1 -1
- package/dist/cjs/ui/RendererActionsContext/index.js +1 -1
- package/dist/cjs/ui/SmartCardStorage.js +1 -1
- package/dist/cjs/ui/active-header-id-provider.js +1 -1
- package/dist/cjs/ui/annotations/context.js +2 -2
- package/dist/cjs/ui/annotations/contexts/AnnotationHoverContext.js +1 -1
- package/dist/cjs/ui/annotations/contexts/AnnotationRangeContext.js +1 -1
- package/dist/cjs/ui/annotations/draft/component.js +1 -1
- package/dist/cjs/ui/annotations/draft/text.js +3 -3
- package/dist/cjs/ui/annotations/element/index.js +1 -1
- package/dist/cjs/ui/annotations/hooks/user-selection.js +23 -0
- package/dist/cjs/ui/annotations/hover/mounter.js +1 -1
- package/dist/cjs/ui/annotations/hover/range-validator.js +1 -1
- package/dist/cjs/ui/annotations/selection/mounter.js +1 -1
- package/dist/cjs/ui/annotations/selection/range-validator.js +1 -1
- package/dist/cjs/ui/annotations/view/index.js +1 -1
- package/dist/cjs/ui/annotations/wrapper.js +1 -1
- package/dist/cjs/ui/index.js +1 -1
- package/dist/cjs/utils.js +1 -7
- package/dist/es2019/react/index.js +2 -2
- package/dist/es2019/react/nodes/blockCard.js +1 -7
- package/dist/es2019/react/nodes/embedCard.js +2 -3
- package/dist/es2019/react/nodes/mediaInline.js +2 -2
- package/dist/es2019/react/nodes/table.js +1 -1
- package/dist/es2019/steps/index.js +1 -1
- package/dist/es2019/ui/Expand.js +2 -3
- package/dist/es2019/ui/MediaCard.js +2 -4
- package/dist/es2019/ui/Renderer/index.js +1 -1
- package/dist/es2019/ui/Renderer/style.js +1 -1
- package/dist/es2019/ui/annotations/hooks/user-selection.js +25 -0
- package/dist/es2019/utils.js +0 -6
- package/dist/esm/react/hooks/use-in-viewport.js +3 -3
- package/dist/esm/react/index.js +2 -2
- package/dist/esm/react/marks/confluence-inline-comment.js +1 -1
- package/dist/esm/react/nodes/blockCard.js +1 -9
- package/dist/esm/react/nodes/decisionList.js +1 -1
- package/dist/esm/react/nodes/embedCard.js +2 -5
- package/dist/esm/react/nodes/fallback.js +6 -6
- package/dist/esm/react/nodes/heading-anchor.js +1 -1
- package/dist/esm/react/nodes/media/index.js +1 -1
- package/dist/esm/react/nodes/mediaGroup.js +1 -1
- package/dist/esm/react/nodes/mediaInline.js +2 -2
- package/dist/esm/react/nodes/table.js +5 -5
- package/dist/esm/react/nodes/tableRow.js +1 -1
- package/dist/esm/react/nodes/taskItem.js +1 -1
- package/dist/esm/react/nodes/taskList.js +1 -1
- package/dist/esm/react/utils/segment-text.js +3 -3
- package/dist/esm/steps/index.js +1 -1
- package/dist/esm/ui/Expand.js +2 -5
- package/dist/esm/ui/MediaCard.js +3 -5
- package/dist/esm/ui/Renderer/ErrorBoundary.js +1 -1
- package/dist/esm/ui/Renderer/index.js +2 -2
- package/dist/esm/ui/Renderer/style.js +1 -1
- package/dist/esm/ui/Renderer/truncated-wrapper.js +1 -1
- package/dist/esm/ui/SmartCardStorage.js +1 -1
- package/dist/esm/ui/annotations/context.js +1 -1
- package/dist/esm/ui/annotations/draft/text.js +3 -3
- package/dist/esm/ui/annotations/hooks/user-selection.js +23 -0
- package/dist/esm/utils.js +0 -6
- package/dist/types/react/nodes/blockCard.d.ts +4 -0
- package/dist/types/steps/index.d.ts +1 -0
- package/dist/types/ui/Renderer/types.d.ts +1 -1
- package/dist/types/utils.d.ts +0 -2
- package/dist/types-ts4.5/react/nodes/blockCard.d.ts +4 -0
- package/dist/types-ts4.5/steps/index.d.ts +1 -0
- package/dist/types-ts4.5/ui/Renderer/types.d.ts +1 -1
- package/dist/types-ts4.5/utils.d.ts +0 -2
- package/package.json +5 -2
|
@@ -5,12 +5,11 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
5
5
|
*/
|
|
6
6
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
7
7
|
import { css, jsx } from '@emotion/react';
|
|
8
|
-
import {
|
|
8
|
+
import { useContext, useState, useRef } from 'react';
|
|
9
9
|
import { Card, EmbedResizeMessageListener } from '@atlaskit/smart-card';
|
|
10
10
|
import { SmartCardContext } from '@atlaskit/link-provider';
|
|
11
11
|
import { WidthConsumer, UnsupportedBlock, MediaSingle as UIMediaSingle } from '@atlaskit/editor-common/ui';
|
|
12
12
|
import { akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, DEFAULT_EMBED_CARD_HEIGHT, DEFAULT_EMBED_CARD_WIDTH } from '@atlaskit/editor-shared-styles';
|
|
13
|
-
import { getPlatform } from '../../utils';
|
|
14
13
|
import { CardErrorBoundary } from './fallback';
|
|
15
14
|
import { FullPagePadding } from '../../ui/Renderer/style';
|
|
16
15
|
import { getCardClickHandler } from '../utils/getCardClickHandler';
|
|
@@ -53,7 +52,7 @@ export default function EmbedCard(props) {
|
|
|
53
52
|
showServerActions,
|
|
54
53
|
actionOptions
|
|
55
54
|
} = smartLinks || {};
|
|
56
|
-
const platform =
|
|
55
|
+
const platform = 'web';
|
|
57
56
|
const cardProps = {
|
|
58
57
|
url,
|
|
59
58
|
data,
|
|
@@ -83,8 +83,8 @@ const RenderMediaInline = ({
|
|
|
83
83
|
eventHandlers === null || eventHandlers === void 0 ? void 0 : (_eventHandlers$media2 = eventHandlers.media) === null || _eventHandlers$media2 === void 0 ? void 0 : _eventHandlers$media2.onClick(result);
|
|
84
84
|
}
|
|
85
85
|
};
|
|
86
|
-
const shouldOpenMediaViewer =
|
|
87
|
-
const shouldDisplayToolTip =
|
|
86
|
+
const shouldOpenMediaViewer = true;
|
|
87
|
+
const shouldDisplayToolTip = true;
|
|
88
88
|
const {
|
|
89
89
|
id,
|
|
90
90
|
collection
|
|
@@ -87,7 +87,7 @@ const isHeaderRowEnabled = rows => {
|
|
|
87
87
|
const tableCanBeSticky = (node, children) => {
|
|
88
88
|
return isHeaderRowEnabled(children) && node && node.firstChild && !hasRowspan(node.firstChild);
|
|
89
89
|
};
|
|
90
|
-
const canUseLinelength = appearance => appearance === 'full-page'
|
|
90
|
+
const canUseLinelength = appearance => appearance === 'full-page';
|
|
91
91
|
export class TableContainer extends React.Component {
|
|
92
92
|
constructor(...args) {
|
|
93
93
|
super(...args);
|
|
@@ -124,7 +124,7 @@ function resolveNodePos(node) {
|
|
|
124
124
|
}
|
|
125
125
|
return resolvedPos;
|
|
126
126
|
}
|
|
127
|
-
function isRoot(element) {
|
|
127
|
+
export function isRoot(element) {
|
|
128
128
|
return !!element && element.classList.contains('ak-renderer-document');
|
|
129
129
|
}
|
|
130
130
|
export function resolvePos(node, offset, findEnd = false) {
|
package/dist/es2019/ui/Expand.js
CHANGED
|
@@ -5,7 +5,7 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
5
5
|
*/
|
|
6
6
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
7
7
|
import { css, jsx } from '@emotion/react';
|
|
8
|
-
import React, { useCallback,
|
|
8
|
+
import React, { useCallback, useRef } from 'react';
|
|
9
9
|
// eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
|
|
10
10
|
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
11
11
|
import { clearNextSiblingMarginTopStyle, ExpandIconWrapper, ExpandLayoutWrapperWithRef, expandMessages, sharedExpandStyles, WidthProvider } from '@atlaskit/editor-common/ui';
|
|
@@ -16,7 +16,6 @@ import Tooltip from '@atlaskit/tooltip';
|
|
|
16
16
|
import _uniqueId from 'lodash/uniqueId';
|
|
17
17
|
import { injectIntl } from 'react-intl-next';
|
|
18
18
|
import { MODE, PLATFORM } from '../analytics/events';
|
|
19
|
-
import { getPlatform } from '../utils';
|
|
20
19
|
import { ActiveHeaderIdConsumer } from './active-header-id-provider';
|
|
21
20
|
const titleStyles = css({
|
|
22
21
|
outline: 'none',
|
|
@@ -115,7 +114,7 @@ function Expand({
|
|
|
115
114
|
}) {
|
|
116
115
|
const [expanded, setExpanded] = React.useState(false);
|
|
117
116
|
const [focused, setFocused] = React.useState(false);
|
|
118
|
-
const isMobile =
|
|
117
|
+
const isMobile = false;
|
|
119
118
|
const label = intl.formatMessage(expanded ? expandMessages.collapseNode : expandMessages.expandNode);
|
|
120
119
|
const {
|
|
121
120
|
current: id
|
|
@@ -146,7 +146,6 @@ export class MediaCardView extends Component {
|
|
|
146
146
|
alt,
|
|
147
147
|
featureFlags,
|
|
148
148
|
ssr,
|
|
149
|
-
rendererAppearance,
|
|
150
149
|
mediaClient
|
|
151
150
|
} = this.props;
|
|
152
151
|
if (imageStatus === 'loading' || !url) {
|
|
@@ -175,7 +174,7 @@ export class MediaCardView extends Component {
|
|
|
175
174
|
mediaViewerItems: Array.from(mediaIdentifierMap.values()),
|
|
176
175
|
featureFlags: featureFlags,
|
|
177
176
|
ssr: ssr === null || ssr === void 0 ? void 0 : ssr.mode,
|
|
178
|
-
shouldHideTooltip:
|
|
177
|
+
shouldHideTooltip: false
|
|
179
178
|
});
|
|
180
179
|
}
|
|
181
180
|
render() {
|
|
@@ -191,7 +190,6 @@ export class MediaCardView extends Component {
|
|
|
191
190
|
occurrenceKey,
|
|
192
191
|
cardDimensions,
|
|
193
192
|
resizeMode,
|
|
194
|
-
rendererAppearance,
|
|
195
193
|
disableOverlay,
|
|
196
194
|
useInlinePlayer,
|
|
197
195
|
originalDimensions,
|
|
@@ -202,7 +200,7 @@ export class MediaCardView extends Component {
|
|
|
202
200
|
mediaClient,
|
|
203
201
|
dataAttributes
|
|
204
202
|
} = this.props;
|
|
205
|
-
const isMobile =
|
|
203
|
+
const isMobile = false;
|
|
206
204
|
const shouldPlayInline = useInlinePlayer !== undefined ? useInlinePlayer : true;
|
|
207
205
|
const isInlinePlayer = isMobile ? false : shouldPlayInline;
|
|
208
206
|
const onCardClick = this.getOnCardClickCallback(isInlinePlayer);
|
|
@@ -45,7 +45,7 @@ import { nodeToReact } from '../../react/nodes';
|
|
|
45
45
|
export const NORMAL_SEVERITY_THRESHOLD = 2000;
|
|
46
46
|
export const DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
47
47
|
const packageName = "@atlaskit/renderer";
|
|
48
|
-
const packageVersion = "
|
|
48
|
+
const packageVersion = "110.0.0";
|
|
49
49
|
export const defaultNodeComponents = nodeToReact;
|
|
50
50
|
export class Renderer extends PureComponent {
|
|
51
51
|
constructor(props) {
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { useEffect, useRef } from 'react';
|
|
2
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
2
3
|
import { useAnnotationRangeDispatch, useAnnotationRangeState } from '../contexts/AnnotationRangeContext';
|
|
3
4
|
import { isRangeInsideOfRendererContainer } from './utils';
|
|
5
|
+
import { isRoot } from '../../../steps';
|
|
4
6
|
export const useUserSelectionRange = props => {
|
|
5
7
|
const {
|
|
6
8
|
rendererRef: {
|
|
@@ -32,6 +34,29 @@ export const useUserSelectionRange = props => {
|
|
|
32
34
|
}
|
|
33
35
|
const _range = sel.getRangeAt(0);
|
|
34
36
|
if (rendererDOM && isRangeInsideOfRendererContainer(rendererDOM, _range)) {
|
|
37
|
+
if (fg('platform_editor_allow_annotation_triple_click')) {
|
|
38
|
+
const {
|
|
39
|
+
startContainer,
|
|
40
|
+
endContainer,
|
|
41
|
+
commonAncestorContainer
|
|
42
|
+
} = _range;
|
|
43
|
+
|
|
44
|
+
// ED-23493
|
|
45
|
+
// On triple-click in Chrome and Safari, the native Selection API's range has endContainer as a non-text node
|
|
46
|
+
// and commonAncestorContainer as root level div.ak-renderer-document when the node is followed by div or hr.
|
|
47
|
+
|
|
48
|
+
// Triple clicks are the only case that can cause the endContainer to be a non-text node
|
|
49
|
+
// Same check for highlight range logic in confluence/next/packages/comments-util/src/domUtils.ts Line 180
|
|
50
|
+
const isTripleClick = endContainer.nodeType !== Node.TEXT_NODE;
|
|
51
|
+
|
|
52
|
+
// isAnnotationAllowedOnRange range validation is checking if the parent container is root element and disable the comment if it is.
|
|
53
|
+
// platform/packages/editor/renderer/src/steps/index.ts Line 180
|
|
54
|
+
|
|
55
|
+
// This workaround ensures the endContainer is set to a text node when endContainer is non-text and the parent container is the root element
|
|
56
|
+
if (isTripleClick && isRoot(commonAncestorContainer)) {
|
|
57
|
+
_range.setEnd(startContainer, startContainer.length || 0);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
35
60
|
setRange(_range.cloneRange());
|
|
36
61
|
}
|
|
37
62
|
}, 250);
|
package/dist/es2019/utils.js
CHANGED
|
@@ -15,12 +15,6 @@ export const getText = node => {
|
|
|
15
15
|
export const getEventHandler = (eventHandlers, type, eventName = 'onClick') => {
|
|
16
16
|
return eventHandlers && type && eventHandlers[type] && eventHandlers[type][eventName];
|
|
17
17
|
};
|
|
18
|
-
export const getPlatform = rendererAppearance => {
|
|
19
|
-
if (rendererAppearance === 'mobile') {
|
|
20
|
-
return 'mobile';
|
|
21
|
-
}
|
|
22
|
-
return 'web';
|
|
23
|
-
};
|
|
24
18
|
|
|
25
19
|
/**
|
|
26
20
|
* Traverse through parent elements of element. Return element for which evaluate(element) returns
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
|
-
function _createForOfIteratorHelper(
|
|
3
|
-
function _unsupportedIterableToArray(
|
|
4
|
-
function _arrayLikeToArray(
|
|
2
|
+
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
|
|
3
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
4
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
5
5
|
import { useEffect, useRef, useState } from 'react';
|
|
6
6
|
export var useInViewport = function useInViewport() {
|
|
7
7
|
var trackingRef = useRef(null);
|
package/dist/esm/react/index.js
CHANGED
|
@@ -141,7 +141,7 @@ var ReactSerializer = /*#__PURE__*/function () {
|
|
|
141
141
|
// The tooltip is likely to have unexpected behaviour there, with being cut
|
|
142
142
|
// off, so we disable it. This is also to keep the behaviour consistent with
|
|
143
143
|
// the rendering in the mobile Native Renderer.
|
|
144
|
-
codeBidiWarningTooltipEnabled:
|
|
144
|
+
codeBidiWarningTooltipEnabled: false
|
|
145
145
|
} : {};
|
|
146
146
|
var props = _objectSpread(_objectSpread(_objectSpread(_objectSpread({
|
|
147
147
|
eventHandlers: _this.eventHandlers,
|
|
@@ -508,7 +508,7 @@ var ReactSerializer = /*#__PURE__*/function () {
|
|
|
508
508
|
// The tooltip is likely to have unexpected behaviour there, with being cut
|
|
509
509
|
// off, so we disable it. This is also to keep the behaviour consistent with
|
|
510
510
|
// the rendering in the mobile Native Renderer.
|
|
511
|
-
var codeBidiWarningTooltipEnabled =
|
|
511
|
+
var codeBidiWarningTooltipEnabled = false;
|
|
512
512
|
return _objectSpread(_objectSpread({}, this.getProps(node)), {}, {
|
|
513
513
|
text: node.textContent,
|
|
514
514
|
codeBidiWarningTooltipEnabled: codeBidiWarningTooltipEnabled
|
|
@@ -3,7 +3,7 @@ import _createClass from "@babel/runtime/helpers/createClass";
|
|
|
3
3
|
import _inherits from "@babel/runtime/helpers/inherits";
|
|
4
4
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
5
5
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
6
|
-
function _createSuper(
|
|
6
|
+
function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
|
|
7
7
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
8
8
|
import React, { Component } from 'react';
|
|
9
9
|
var ConfluenceInlineComment = /*#__PURE__*/function (_Component) {
|
|
@@ -3,12 +3,10 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
3
3
|
* @jsxRuntime classic
|
|
4
4
|
* @jsx jsx
|
|
5
5
|
*/
|
|
6
|
-
import { useMemo } from 'react';
|
|
7
6
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
8
7
|
import { css, jsx } from '@emotion/react';
|
|
9
8
|
import { Card } from '@atlaskit/smart-card';
|
|
10
9
|
import { UnsupportedBlock, UnsupportedInline, WidthConsumer } from '@atlaskit/editor-common/ui';
|
|
11
|
-
import { getPlatform } from '../../utils';
|
|
12
10
|
import { CardErrorBoundary } from './fallback';
|
|
13
11
|
import { getCardClickHandler } from '../utils/getCardClickHandler';
|
|
14
12
|
import InlineCard from './inlineCard';
|
|
@@ -29,16 +27,13 @@ export default function BlockCard(props) {
|
|
|
29
27
|
data = props.data,
|
|
30
28
|
eventHandlers = props.eventHandlers,
|
|
31
29
|
portal = props.portal,
|
|
32
|
-
rendererAppearance = props.rendererAppearance,
|
|
33
30
|
smartLinks = props.smartLinks,
|
|
34
31
|
isNodeNested = props.isNodeNested;
|
|
35
32
|
var _ref = smartLinks || {},
|
|
36
33
|
showServerActions = _ref.showServerActions,
|
|
37
34
|
actionOptions = _ref.actionOptions;
|
|
38
35
|
var onClick = getCardClickHandler(eventHandlers, url);
|
|
39
|
-
var platform =
|
|
40
|
-
return getPlatform(rendererAppearance);
|
|
41
|
-
}, [rendererAppearance]);
|
|
36
|
+
var platform = 'web';
|
|
42
37
|
var cardProps = {
|
|
43
38
|
url: url,
|
|
44
39
|
data: data,
|
|
@@ -62,9 +57,6 @@ export default function BlockCard(props) {
|
|
|
62
57
|
}
|
|
63
58
|
};
|
|
64
59
|
if (props.datasource) {
|
|
65
|
-
if (platform === 'mobile') {
|
|
66
|
-
return jsx(InlineCard, props);
|
|
67
|
-
}
|
|
68
60
|
var views = props.datasource.views;
|
|
69
61
|
var tableView = views.find(function (view) {
|
|
70
62
|
return view.type === 'table';
|
|
@@ -3,7 +3,7 @@ import _createClass from "@babel/runtime/helpers/createClass";
|
|
|
3
3
|
import _inherits from "@babel/runtime/helpers/inherits";
|
|
4
4
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
5
5
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
6
|
-
function _createSuper(
|
|
6
|
+
function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
|
|
7
7
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
8
8
|
import React, { PureComponent, Children } from 'react';
|
|
9
9
|
import { DecisionList as AkDecisionList } from '@atlaskit/task-decision';
|
|
@@ -6,12 +6,11 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
|
6
6
|
*/
|
|
7
7
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
8
8
|
import { css, jsx } from '@emotion/react';
|
|
9
|
-
import {
|
|
9
|
+
import { useContext, useState, useRef } from 'react';
|
|
10
10
|
import { Card, EmbedResizeMessageListener } from '@atlaskit/smart-card';
|
|
11
11
|
import { SmartCardContext } from '@atlaskit/link-provider';
|
|
12
12
|
import { WidthConsumer, UnsupportedBlock, MediaSingle as UIMediaSingle } from '@atlaskit/editor-common/ui';
|
|
13
13
|
import { akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, DEFAULT_EMBED_CARD_HEIGHT, DEFAULT_EMBED_CARD_WIDTH } from '@atlaskit/editor-shared-styles';
|
|
14
|
-
import { getPlatform } from '../../utils';
|
|
15
14
|
import { CardErrorBoundary } from './fallback';
|
|
16
15
|
import { FullPagePadding } from '../../ui/Renderer/style';
|
|
17
16
|
import { getCardClickHandler } from '../utils/getCardClickHandler';
|
|
@@ -51,9 +50,7 @@ export default function EmbedCard(props) {
|
|
|
51
50
|
var _ref = smartLinks || {},
|
|
52
51
|
showServerActions = _ref.showServerActions,
|
|
53
52
|
actionOptions = _ref.actionOptions;
|
|
54
|
-
var platform =
|
|
55
|
-
return getPlatform(rendererAppearance);
|
|
56
|
-
}, [rendererAppearance]);
|
|
53
|
+
var platform = 'web';
|
|
57
54
|
var cardProps = {
|
|
58
55
|
url: url,
|
|
59
56
|
data: data,
|
|
@@ -5,7 +5,7 @@ import _inherits from "@babel/runtime/helpers/inherits";
|
|
|
5
5
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
6
6
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
7
7
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
8
|
-
function _createSuper(
|
|
8
|
+
function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
|
|
9
9
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
10
10
|
import React from 'react';
|
|
11
11
|
import { InlineCard } from './';
|
|
@@ -41,17 +41,17 @@ export var CardErrorBoundary = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
41
41
|
value: function render() {
|
|
42
42
|
if (this.state.isError) {
|
|
43
43
|
var _this$props2 = this.props,
|
|
44
|
-
|
|
44
|
+
url = _this$props2.url,
|
|
45
45
|
isDatasource = _this$props2.isDatasource,
|
|
46
46
|
UnsupportedComponent = _this$props2.unsupportedComponent,
|
|
47
47
|
datasourceId = _this$props2.datasourceId;
|
|
48
|
-
if (
|
|
48
|
+
if (url) {
|
|
49
49
|
var fallback = /*#__PURE__*/React.createElement("a", {
|
|
50
|
-
href:
|
|
50
|
+
href: url,
|
|
51
51
|
onClick: this.onClickFallback
|
|
52
|
-
},
|
|
52
|
+
}, url);
|
|
53
53
|
if (isDatasource) {
|
|
54
|
-
if (isSafeUrl(
|
|
54
|
+
if (isSafeUrl(url)) {
|
|
55
55
|
return /*#__PURE__*/React.createElement(LazyLoadedDatasourceRenderFailedAnalyticsWrapper, {
|
|
56
56
|
datasourceId: datasourceId,
|
|
57
57
|
error: this.state.error
|
|
@@ -10,7 +10,7 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
10
10
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
11
11
|
var _excluded = ["children"];
|
|
12
12
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
13
|
-
function _createSuper(
|
|
13
|
+
function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
|
|
14
14
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
15
15
|
/**
|
|
16
16
|
* @jsxRuntime classic
|
|
@@ -14,7 +14,7 @@ var _excluded = ["marks", "mediaSingleElement", "isDrafting"],
|
|
|
14
14
|
var _templateObject, _templateObject2;
|
|
15
15
|
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; }
|
|
16
16
|
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; }
|
|
17
|
-
function _createSuper(
|
|
17
|
+
function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
|
|
18
18
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
19
19
|
/**
|
|
20
20
|
* @jsxRuntime classic
|
|
@@ -7,7 +7,7 @@ import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
|
7
7
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
8
8
|
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; }
|
|
9
9
|
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; }
|
|
10
|
-
function _createSuper(
|
|
10
|
+
function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
|
|
11
11
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
12
12
|
import React, { PureComponent } from 'react';
|
|
13
13
|
import { defaultImageCardDimensions } from '@atlaskit/media-card';
|
|
@@ -111,8 +111,8 @@ var RenderMediaInline = function RenderMediaInline(_ref) {
|
|
|
111
111
|
eventHandlers === null || eventHandlers === void 0 || (_eventHandlers$media2 = eventHandlers.media) === null || _eventHandlers$media2 === void 0 || _eventHandlers$media2.onClick(result);
|
|
112
112
|
}
|
|
113
113
|
};
|
|
114
|
-
var shouldOpenMediaViewer =
|
|
115
|
-
var shouldDisplayToolTip =
|
|
114
|
+
var shouldOpenMediaViewer = true;
|
|
115
|
+
var shouldDisplayToolTip = true;
|
|
116
116
|
var id = clipboardAttrs.id,
|
|
117
117
|
collection = clipboardAttrs.collection;
|
|
118
118
|
return (
|
|
@@ -6,10 +6,10 @@ import _inherits from "@babel/runtime/helpers/inherits";
|
|
|
6
6
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
7
7
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
8
8
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
9
|
-
function _createForOfIteratorHelper(
|
|
10
|
-
function _unsupportedIterableToArray(
|
|
11
|
-
function _arrayLikeToArray(
|
|
12
|
-
function _createSuper(
|
|
9
|
+
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
|
|
10
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
11
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
12
|
+
function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
|
|
13
13
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
14
14
|
import React from 'react';
|
|
15
15
|
import { TableSharedCssClassName, tableMarginTop } from '@atlaskit/editor-common/styles';
|
|
@@ -110,7 +110,7 @@ var tableCanBeSticky = function tableCanBeSticky(node, children) {
|
|
|
110
110
|
return isHeaderRowEnabled(children) && node && node.firstChild && !hasRowspan(node.firstChild);
|
|
111
111
|
};
|
|
112
112
|
var canUseLinelength = function canUseLinelength(appearance) {
|
|
113
|
-
return appearance === 'full-page'
|
|
113
|
+
return appearance === 'full-page';
|
|
114
114
|
};
|
|
115
115
|
export var TableContainer = /*#__PURE__*/function (_React$Component) {
|
|
116
116
|
_inherits(TableContainer, _React$Component);
|
|
@@ -5,7 +5,7 @@ import _inherits from "@babel/runtime/helpers/inherits";
|
|
|
5
5
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
6
6
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
7
7
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
8
|
-
function _createSuper(
|
|
8
|
+
function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
|
|
9
9
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
10
10
|
import React from 'react';
|
|
11
11
|
import { compose } from '@atlaskit/editor-common/utils';
|
|
@@ -6,7 +6,7 @@ import _inherits from "@babel/runtime/helpers/inherits";
|
|
|
6
6
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
7
7
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
8
8
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
9
|
-
function _createSuper(
|
|
9
|
+
function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
|
|
10
10
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
11
11
|
import React, { PureComponent } from 'react';
|
|
12
12
|
import { ProviderFactory, WithProviders } from '@atlaskit/editor-common/provider-factory';
|
|
@@ -3,7 +3,7 @@ import _createClass from "@babel/runtime/helpers/createClass";
|
|
|
3
3
|
import _inherits from "@babel/runtime/helpers/inherits";
|
|
4
4
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
5
5
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
6
|
-
function _createSuper(
|
|
6
|
+
function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
|
|
7
7
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
8
8
|
import React, { PureComponent, Children } from 'react';
|
|
9
9
|
import { TaskList as AkTaskList } from '@atlaskit/task-decision';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
function _createForOfIteratorHelper(
|
|
2
|
-
function _unsupportedIterableToArray(
|
|
3
|
-
function _arrayLikeToArray(
|
|
1
|
+
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
|
|
2
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
3
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
4
4
|
export function segmentText(text, highlighter) {
|
|
5
5
|
if (!highlighter || !text) {
|
|
6
6
|
return [{
|
package/dist/esm/steps/index.js
CHANGED
|
@@ -120,7 +120,7 @@ function resolveNodePos(node) {
|
|
|
120
120
|
}
|
|
121
121
|
return resolvedPos;
|
|
122
122
|
}
|
|
123
|
-
function isRoot(element) {
|
|
123
|
+
export function isRoot(element) {
|
|
124
124
|
return !!element && element.classList.contains('ak-renderer-document');
|
|
125
125
|
}
|
|
126
126
|
export function resolvePos(node, offset) {
|
package/dist/esm/ui/Expand.js
CHANGED
|
@@ -10,7 +10,7 @@ var _templateObject, _templateObject2, _templateObject3;
|
|
|
10
10
|
*/
|
|
11
11
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
12
12
|
import { css, jsx } from '@emotion/react';
|
|
13
|
-
import React, { useCallback,
|
|
13
|
+
import React, { useCallback, useRef } from 'react';
|
|
14
14
|
// eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
|
|
15
15
|
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
16
16
|
import { clearNextSiblingMarginTopStyle, ExpandIconWrapper, ExpandLayoutWrapperWithRef, expandMessages, sharedExpandStyles, WidthProvider } from '@atlaskit/editor-common/ui';
|
|
@@ -21,7 +21,6 @@ import Tooltip from '@atlaskit/tooltip';
|
|
|
21
21
|
import _uniqueId from 'lodash/uniqueId';
|
|
22
22
|
import { injectIntl } from 'react-intl-next';
|
|
23
23
|
import { MODE, PLATFORM } from '../analytics/events';
|
|
24
|
-
import { getPlatform } from '../utils';
|
|
25
24
|
import { ActiveHeaderIdConsumer } from './active-header-id-provider';
|
|
26
25
|
var titleStyles = css({
|
|
27
26
|
outline: 'none',
|
|
@@ -116,9 +115,7 @@ function Expand(_ref) {
|
|
|
116
115
|
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
117
116
|
focused = _React$useState4[0],
|
|
118
117
|
setFocused = _React$useState4[1];
|
|
119
|
-
var isMobile =
|
|
120
|
-
return getPlatform(rendererAppearance) === 'mobile';
|
|
121
|
-
}, [rendererAppearance]);
|
|
118
|
+
var isMobile = false;
|
|
122
119
|
var label = intl.formatMessage(expanded ? expandMessages.collapseNode : expandMessages.expandNode);
|
|
123
120
|
var _useRef = useRef(_uniqueId('expand-title-')),
|
|
124
121
|
id = _useRef.current;
|
package/dist/esm/ui/MediaCard.js
CHANGED
|
@@ -10,7 +10,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
10
10
|
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; }
|
|
11
11
|
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; }
|
|
12
12
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
13
|
-
function _createSuper(
|
|
13
|
+
function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
|
|
14
14
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
15
15
|
import React, { Component, useContext } from 'react';
|
|
16
16
|
import { filter } from '@atlaskit/adf-utils/traverse';
|
|
@@ -204,7 +204,6 @@ export var MediaCardView = /*#__PURE__*/function (_Component) {
|
|
|
204
204
|
alt = _this$props4.alt,
|
|
205
205
|
featureFlags = _this$props4.featureFlags,
|
|
206
206
|
ssr = _this$props4.ssr,
|
|
207
|
-
rendererAppearance = _this$props4.rendererAppearance,
|
|
208
207
|
mediaClient = _this$props4.mediaClient;
|
|
209
208
|
if (imageStatus === 'loading' || !url) {
|
|
210
209
|
return this.renderLoadingCard();
|
|
@@ -232,7 +231,7 @@ export var MediaCardView = /*#__PURE__*/function (_Component) {
|
|
|
232
231
|
mediaViewerItems: Array.from(mediaIdentifierMap.values()),
|
|
233
232
|
featureFlags: featureFlags,
|
|
234
233
|
ssr: ssr === null || ssr === void 0 ? void 0 : ssr.mode,
|
|
235
|
-
shouldHideTooltip:
|
|
234
|
+
shouldHideTooltip: false
|
|
236
235
|
});
|
|
237
236
|
}
|
|
238
237
|
}, {
|
|
@@ -249,7 +248,6 @@ export var MediaCardView = /*#__PURE__*/function (_Component) {
|
|
|
249
248
|
occurrenceKey = _this$props5.occurrenceKey,
|
|
250
249
|
cardDimensions = _this$props5.cardDimensions,
|
|
251
250
|
resizeMode = _this$props5.resizeMode,
|
|
252
|
-
rendererAppearance = _this$props5.rendererAppearance,
|
|
253
251
|
disableOverlay = _this$props5.disableOverlay,
|
|
254
252
|
useInlinePlayer = _this$props5.useInlinePlayer,
|
|
255
253
|
originalDimensions = _this$props5.originalDimensions,
|
|
@@ -259,7 +257,7 @@ export var MediaCardView = /*#__PURE__*/function (_Component) {
|
|
|
259
257
|
ssr = _this$props5.ssr,
|
|
260
258
|
mediaClient = _this$props5.mediaClient,
|
|
261
259
|
dataAttributes = _this$props5.dataAttributes;
|
|
262
|
-
var isMobile =
|
|
260
|
+
var isMobile = false;
|
|
263
261
|
var shouldPlayInline = useInlinePlayer !== undefined ? useInlinePlayer : true;
|
|
264
262
|
var isInlinePlayer = isMobile ? false : shouldPlayInline;
|
|
265
263
|
var onCardClick = this.getOnCardClickCallback(isInlinePlayer);
|
|
@@ -5,7 +5,7 @@ import _inherits from "@babel/runtime/helpers/inherits";
|
|
|
5
5
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
6
6
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
7
7
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
8
|
-
function _createSuper(
|
|
8
|
+
function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
|
|
9
9
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
10
10
|
import React from 'react';
|
|
11
11
|
import { ACTION, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|