@atlaskit/smart-card 40.20.2 → 40.21.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 +14 -0
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/view/EmbedCard/components/Frame.js +1 -3
- package/dist/cjs/view/EmbedCard/components/IFrame.js +2 -31
- package/dist/cjs/view/EmbedCard/index.js +2 -4
- package/dist/cjs/view/EmbedCard/views/ResolvedView.js +2 -4
- package/dist/cjs/view/EmbedModal/components/embed-content/index.js +2 -6
- package/dist/cjs/view/EmbedModal/index.js +2 -4
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/view/EmbedCard/components/Frame.js +1 -3
- package/dist/es2019/view/EmbedCard/components/IFrame.js +1 -30
- package/dist/es2019/view/EmbedCard/index.js +2 -4
- package/dist/es2019/view/EmbedCard/views/ResolvedView.js +2 -4
- package/dist/es2019/view/EmbedModal/components/embed-content/index.js +2 -6
- package/dist/es2019/view/EmbedModal/index.js +2 -4
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/view/EmbedCard/components/Frame.js +1 -3
- package/dist/esm/view/EmbedCard/components/IFrame.js +2 -31
- package/dist/esm/view/EmbedCard/index.js +2 -4
- package/dist/esm/view/EmbedCard/views/ResolvedView.js +2 -4
- package/dist/esm/view/EmbedModal/components/embed-content/index.js +2 -6
- package/dist/esm/view/EmbedModal/index.js +2 -4
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/types/view/EmbedCard/components/Frame.d.ts +0 -1
- package/dist/types/view/EmbedCard/components/IFrame.d.ts +1 -2
- package/dist/types/view/EmbedCard/views/ResolvedView.d.ts +0 -2
- package/dist/types/view/EmbedModal/components/embed-content/index.d.ts +1 -1
- package/dist/types/view/EmbedModal/components/embed-content/types.d.ts +0 -1
- package/dist/types/view/EmbedModal/types.d.ts +0 -1
- package/dist/types/view/HoverCard/types.d.ts +4 -5
- package/dist/types-ts4.5/view/EmbedCard/components/Frame.d.ts +0 -1
- package/dist/types-ts4.5/view/EmbedCard/components/IFrame.d.ts +1 -2
- package/dist/types-ts4.5/view/EmbedCard/views/ResolvedView.d.ts +0 -2
- package/dist/types-ts4.5/view/EmbedModal/components/embed-content/index.d.ts +1 -1
- package/dist/types-ts4.5/view/EmbedModal/components/embed-content/types.d.ts +0 -1
- package/dist/types-ts4.5/view/EmbedModal/types.d.ts +0 -1
- package/dist/types-ts4.5/view/HoverCard/types.d.ts +4 -5
- package/package.json +1 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/smart-card
|
|
2
2
|
|
|
3
|
+
## 40.21.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`31cb31489cef2`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/31cb31489cef2) -
|
|
8
|
+
[ux] exporting HoverCard allowEventPropagation prop
|
|
9
|
+
|
|
10
|
+
## 40.20.3
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- [`6012c22dec4c0`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/6012c22dec4c0) -
|
|
15
|
+
Follow-up on the revert for PR #20864 to prevent Confluence SSR issue
|
|
16
|
+
|
|
3
17
|
## 40.20.2
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -11,7 +11,7 @@ var ANALYTICS_CHANNEL = exports.ANALYTICS_CHANNEL = 'media';
|
|
|
11
11
|
var context = exports.context = {
|
|
12
12
|
componentName: 'smart-cards',
|
|
13
13
|
packageName: "@atlaskit/smart-card",
|
|
14
|
-
packageVersion: "40.20.
|
|
14
|
+
packageVersion: "40.20.3"
|
|
15
15
|
};
|
|
16
16
|
var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
17
17
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -35,8 +35,7 @@ var Frame = exports.Frame = /*#__PURE__*/_react.default.forwardRef(function (_re
|
|
|
35
35
|
testId = _ref.testId,
|
|
36
36
|
onIframeDwell = _ref.onIframeDwell,
|
|
37
37
|
onIframeFocus = _ref.onIframeFocus,
|
|
38
|
-
title = _ref.title
|
|
39
|
-
extensionKey = _ref.extensionKey;
|
|
38
|
+
title = _ref.title;
|
|
40
39
|
var _useState = (0, _react.useState)(false),
|
|
41
40
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
42
41
|
isIframeLoaded = _useState2[0],
|
|
@@ -125,7 +124,6 @@ var Frame = exports.Frame = /*#__PURE__*/_react.default.forwardRef(function (_re
|
|
|
125
124
|
},
|
|
126
125
|
sandbox: (0, _utils.getIframeSandboxAttribute)(isTrusted),
|
|
127
126
|
title: title,
|
|
128
|
-
extensionKey: extensionKey,
|
|
129
127
|
className: (0, _runtime.ax)(["_19itidpf _1reo15vq _18m915vq _2rkofajl _154iidpf _1ltvidpf _1bsb1osq _4t3i1osq _kqswh2mm"])
|
|
130
128
|
}));
|
|
131
129
|
});
|
|
@@ -8,45 +8,16 @@ exports.IFrame = void 0;
|
|
|
8
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
9
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
10
10
|
var _react = _interopRequireDefault(require("react"));
|
|
11
|
-
var
|
|
12
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
13
|
-
var _useConfluencePageData = require("../../../hooks/useConfluencePageData");
|
|
14
|
-
var _excluded = ["childRef", "className", "extensionKey"];
|
|
11
|
+
var _excluded = ["childRef", "className"];
|
|
15
12
|
/**
|
|
16
13
|
* Iframe element isolated for DI purposes
|
|
17
14
|
*/
|
|
18
15
|
var IFrame = exports.IFrame = function IFrame(_ref) {
|
|
19
16
|
var childRef = _ref.childRef,
|
|
20
17
|
className = _ref.className,
|
|
21
|
-
extensionKey = _ref.extensionKey,
|
|
22
18
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
23
|
-
var confluencePageData = (0, _platformFeatureFlags.fg)('platform_deprecate_lp_cc_embed') ?
|
|
24
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
25
|
-
(0, _useConfluencePageData.useConfluencePageData)(props.src || '', extensionKey || '') : undefined;
|
|
26
|
-
|
|
27
|
-
// Conditional rendering: Page component for lp-cc-embed URLs, iframe for everything else
|
|
28
|
-
return confluencePageData && (0, _platformFeatureFlags.fg)('platform_deprecate_lp_cc_embed') ? /*#__PURE__*/_react.default.createElement(_embeddedConfluence.Page, {
|
|
29
|
-
hostname: confluencePageData.hostname,
|
|
30
|
-
spaceKey: confluencePageData.spaceKey,
|
|
31
|
-
contentId: confluencePageData.contentId,
|
|
32
|
-
parentProduct: confluencePageData.parentProduct
|
|
33
|
-
// @ts-expect-error - TODO userId is not a valid prop for the Page component, need to look into this, why did they do this in POC PR
|
|
34
|
-
,
|
|
35
|
-
userId: confluencePageData.userId,
|
|
36
|
-
userIdType: confluencePageData.userIdType,
|
|
37
|
-
hash: confluencePageData.hash,
|
|
38
|
-
enableInlineComments: confluencePageData.enableInlineComments,
|
|
39
|
-
enablePageComments: confluencePageData.enablePageComments,
|
|
40
|
-
themeStateObject: confluencePageData.themeStateObject,
|
|
41
|
-
allowedFeatures: confluencePageData.allowedFeatures,
|
|
42
|
-
mode: confluencePageData.mode,
|
|
43
|
-
locale: confluencePageData.locale,
|
|
44
|
-
viewComponent: _embeddedConfluence.ViewPage,
|
|
45
|
-
editComponent: _embeddedConfluence.EditPage
|
|
46
|
-
}) :
|
|
47
|
-
/*#__PURE__*/
|
|
48
19
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
49
|
-
_react.default.createElement("iframe", (0, _extends2.default)({
|
|
20
|
+
return /*#__PURE__*/_react.default.createElement("iframe", (0, _extends2.default)({
|
|
50
21
|
className: className
|
|
51
22
|
}, props, {
|
|
52
23
|
ref: childRef,
|
|
@@ -112,8 +112,7 @@ var EmbedCard = exports.EmbedCard = /*#__PURE__*/_react.default.forwardRef(funct
|
|
|
112
112
|
onIframeFocus: onIframeFocus,
|
|
113
113
|
testId: testId,
|
|
114
114
|
CompetitorPrompt: CompetitorPrompt,
|
|
115
|
-
hideIconLoadingSkeleton: hideIconLoadingSkeleton
|
|
116
|
-
extensionKey: extensionKey
|
|
115
|
+
hideIconLoadingSkeleton: hideIconLoadingSkeleton
|
|
117
116
|
}));
|
|
118
117
|
} else {
|
|
119
118
|
if (platform === 'mobile') {
|
|
@@ -171,8 +170,7 @@ var EmbedCard = exports.EmbedCard = /*#__PURE__*/_react.default.forwardRef(funct
|
|
|
171
170
|
isSelected: isSelected,
|
|
172
171
|
inheritDimensions: inheritDimensions,
|
|
173
172
|
onClick: handleFrameClick,
|
|
174
|
-
ref: iframeRef
|
|
175
|
-
extensionKey: extensionKey
|
|
173
|
+
ref: iframeRef
|
|
176
174
|
}));
|
|
177
175
|
}
|
|
178
176
|
var forbiddenAccessContext = (0, _extractAccessContext.extractRequestAccessContextImproved)({
|
|
@@ -31,8 +31,7 @@ var EmbedCardResolvedView = exports.EmbedCardResolvedView = /*#__PURE__*/_react.
|
|
|
31
31
|
isSupportTheming = _ref.isSupportTheming,
|
|
32
32
|
type = _ref.type,
|
|
33
33
|
CompetitorPrompt = _ref.CompetitorPrompt,
|
|
34
|
-
hideIconLoadingSkeleton = _ref.hideIconLoadingSkeleton
|
|
35
|
-
extensionKey = _ref.extensionKey;
|
|
34
|
+
hideIconLoadingSkeleton = _ref.hideIconLoadingSkeleton;
|
|
36
35
|
var iconFromContext = context === null || context === void 0 ? void 0 : context.icon;
|
|
37
36
|
var src = typeof iconFromContext === 'string' ? iconFromContext : undefined;
|
|
38
37
|
var text = title || (context === null || context === void 0 ? void 0 : context.text);
|
|
@@ -85,7 +84,6 @@ var EmbedCardResolvedView = exports.EmbedCardResolvedView = /*#__PURE__*/_react.
|
|
|
85
84
|
ref: embedIframeRef,
|
|
86
85
|
onIframeDwell: onIframeDwell,
|
|
87
86
|
onIframeFocus: onIframeFocus,
|
|
88
|
-
title: text
|
|
89
|
-
extensionKey: extensionKey
|
|
87
|
+
title: text
|
|
90
88
|
}));
|
|
91
89
|
});
|
|
@@ -12,7 +12,6 @@ var React = _interopRequireWildcard(require("react"));
|
|
|
12
12
|
var _runtime = require("@compiled/react/runtime");
|
|
13
13
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
14
14
|
var _reactMagneticDi = require("react-magnetic-di");
|
|
15
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
16
15
|
var _utils = require("../../../../utils");
|
|
17
16
|
var _IFrame = require("../../../EmbedCard/components/IFrame");
|
|
18
17
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
@@ -22,8 +21,7 @@ var EmbedContent = function EmbedContent(_ref) {
|
|
|
22
21
|
name = _ref.name,
|
|
23
22
|
src = _ref.src,
|
|
24
23
|
testId = _ref.testId,
|
|
25
|
-
ariaLabel = _ref.ariaLabel
|
|
26
|
-
extensionKey = _ref.extensionKey;
|
|
24
|
+
ariaLabel = _ref.ariaLabel;
|
|
27
25
|
var sandbox = (0, _utils.getIframeSandboxAttribute)(isTrusted);
|
|
28
26
|
var props = {
|
|
29
27
|
frameBorder: 0,
|
|
@@ -34,9 +32,7 @@ var EmbedContent = function EmbedContent(_ref) {
|
|
|
34
32
|
};
|
|
35
33
|
return /*#__PURE__*/React.createElement(_IFrame.IFrame, (0, _extends2.default)({
|
|
36
34
|
"aria-label": ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : "".concat(testId, "-embed")
|
|
37
|
-
},
|
|
38
|
-
extensionKey: extensionKey
|
|
39
|
-
} : {}, props, {
|
|
35
|
+
}, props, {
|
|
40
36
|
className: (0, _runtime.ax)(["_1bsb1osq _4t3i815d"])
|
|
41
37
|
}));
|
|
42
38
|
};
|
|
@@ -47,8 +47,7 @@ var EmbedModal = function EmbedModal(_ref) {
|
|
|
47
47
|
_ref$testId = _ref.testId,
|
|
48
48
|
testId = _ref$testId === void 0 ? 'smart-embed-preview-modal' : _ref$testId,
|
|
49
49
|
title = _ref.title,
|
|
50
|
-
invokeViewAction = _ref.invokeViewAction
|
|
51
|
-
extensionKey = _ref.extensionKey;
|
|
50
|
+
invokeViewAction = _ref.invokeViewAction;
|
|
52
51
|
var defaultWidth = toWidth(size);
|
|
53
52
|
var _useState = (0, _react.useState)(showModal),
|
|
54
53
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
@@ -129,8 +128,7 @@ var EmbedModal = function EmbedModal(_ref) {
|
|
|
129
128
|
name: iframeName,
|
|
130
129
|
src: previewUrl,
|
|
131
130
|
testId: testId,
|
|
132
|
-
ariaLabel: title
|
|
133
|
-
extensionKey: extensionKey
|
|
131
|
+
ariaLabel: title
|
|
134
132
|
}))));
|
|
135
133
|
};
|
|
136
134
|
var _default = exports.default = (0, _analytics.default)((0, _errorBoundary.default)(EmbedModal));
|
|
@@ -21,7 +21,7 @@ var _excluded = ["href", "children", "checkSafety", "onClick", "testId", "isLink
|
|
|
21
21
|
_excluded2 = ["isLinkSafe", "showSafetyWarningModal"];
|
|
22
22
|
var PACKAGE_DATA = {
|
|
23
23
|
packageName: "@atlaskit/smart-card",
|
|
24
|
-
packageVersion: "40.20.
|
|
24
|
+
packageVersion: "40.20.3",
|
|
25
25
|
componentName: 'linkUrl'
|
|
26
26
|
};
|
|
27
27
|
var Anchor = (0, _click.withLinkClickedEvent)('a');
|
|
@@ -2,7 +2,7 @@ export const ANALYTICS_CHANNEL = 'media';
|
|
|
2
2
|
export const context = {
|
|
3
3
|
componentName: 'smart-cards',
|
|
4
4
|
packageName: "@atlaskit/smart-card",
|
|
5
|
-
packageVersion: "40.20.
|
|
5
|
+
packageVersion: "40.20.3"
|
|
6
6
|
};
|
|
7
7
|
export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
8
8
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -24,8 +24,7 @@ export const Frame = /*#__PURE__*/React.forwardRef(({
|
|
|
24
24
|
testId,
|
|
25
25
|
onIframeDwell,
|
|
26
26
|
onIframeFocus,
|
|
27
|
-
title
|
|
28
|
-
extensionKey
|
|
27
|
+
title
|
|
29
28
|
}, iframeRef) => {
|
|
30
29
|
const [isIframeLoaded, setIframeLoaded] = useState(false);
|
|
31
30
|
const [isMouseOver, setMouseOver] = useState(false);
|
|
@@ -97,7 +96,6 @@ export const Frame = /*#__PURE__*/React.forwardRef(({
|
|
|
97
96
|
},
|
|
98
97
|
sandbox: getIframeSandboxAttribute(isTrusted),
|
|
99
98
|
title: title,
|
|
100
|
-
extensionKey: extensionKey,
|
|
101
99
|
className: ax(["_19itidpf _1reo15vq _18m915vq _2rkofajl _154iidpf _1ltvidpf _1bsb1osq _4t3i1osq _kqswh2mm"])
|
|
102
100
|
}));
|
|
103
101
|
});
|
|
@@ -1,44 +1,15 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { EditPage, Page, ViewPage } from '@atlaskit/embedded-confluence';
|
|
4
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
|
-
import { useConfluencePageData } from '../../../hooks/useConfluencePageData';
|
|
6
3
|
/**
|
|
7
4
|
* Iframe element isolated for DI purposes
|
|
8
5
|
*/
|
|
9
6
|
export const IFrame = ({
|
|
10
7
|
childRef,
|
|
11
8
|
className,
|
|
12
|
-
extensionKey,
|
|
13
9
|
...props
|
|
14
10
|
}) => {
|
|
15
|
-
const confluencePageData = fg('platform_deprecate_lp_cc_embed') ?
|
|
16
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
17
|
-
useConfluencePageData(props.src || '', extensionKey || '') : undefined;
|
|
18
|
-
|
|
19
|
-
// Conditional rendering: Page component for lp-cc-embed URLs, iframe for everything else
|
|
20
|
-
return confluencePageData && fg('platform_deprecate_lp_cc_embed') ? /*#__PURE__*/React.createElement(Page, {
|
|
21
|
-
hostname: confluencePageData.hostname,
|
|
22
|
-
spaceKey: confluencePageData.spaceKey,
|
|
23
|
-
contentId: confluencePageData.contentId,
|
|
24
|
-
parentProduct: confluencePageData.parentProduct
|
|
25
|
-
// @ts-expect-error - TODO userId is not a valid prop for the Page component, need to look into this, why did they do this in POC PR
|
|
26
|
-
,
|
|
27
|
-
userId: confluencePageData.userId,
|
|
28
|
-
userIdType: confluencePageData.userIdType,
|
|
29
|
-
hash: confluencePageData.hash,
|
|
30
|
-
enableInlineComments: confluencePageData.enableInlineComments,
|
|
31
|
-
enablePageComments: confluencePageData.enablePageComments,
|
|
32
|
-
themeStateObject: confluencePageData.themeStateObject,
|
|
33
|
-
allowedFeatures: confluencePageData.allowedFeatures,
|
|
34
|
-
mode: confluencePageData.mode,
|
|
35
|
-
locale: confluencePageData.locale,
|
|
36
|
-
viewComponent: ViewPage,
|
|
37
|
-
editComponent: EditPage
|
|
38
|
-
}) :
|
|
39
|
-
/*#__PURE__*/
|
|
40
11
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
41
|
-
React.createElement("iframe", _extends({
|
|
12
|
+
return /*#__PURE__*/React.createElement("iframe", _extends({
|
|
42
13
|
className: className
|
|
43
14
|
}, props, {
|
|
44
15
|
ref: childRef,
|
|
@@ -109,8 +109,7 @@ export const EmbedCard = /*#__PURE__*/React.forwardRef(({
|
|
|
109
109
|
onIframeFocus: onIframeFocus,
|
|
110
110
|
testId: testId,
|
|
111
111
|
CompetitorPrompt: CompetitorPrompt,
|
|
112
|
-
hideIconLoadingSkeleton: hideIconLoadingSkeleton
|
|
113
|
-
extensionKey: extensionKey
|
|
112
|
+
hideIconLoadingSkeleton: hideIconLoadingSkeleton
|
|
114
113
|
}));
|
|
115
114
|
} else {
|
|
116
115
|
if (platform === 'mobile') {
|
|
@@ -168,8 +167,7 @@ export const EmbedCard = /*#__PURE__*/React.forwardRef(({
|
|
|
168
167
|
isSelected: isSelected,
|
|
169
168
|
inheritDimensions: inheritDimensions,
|
|
170
169
|
onClick: handleFrameClick,
|
|
171
|
-
ref: iframeRef
|
|
172
|
-
extensionKey: extensionKey
|
|
170
|
+
ref: iframeRef
|
|
173
171
|
}));
|
|
174
172
|
}
|
|
175
173
|
const forbiddenAccessContext = extractRequestAccessContextImproved({
|
|
@@ -23,8 +23,7 @@ export const EmbedCardResolvedView = /*#__PURE__*/React.forwardRef(({
|
|
|
23
23
|
isSupportTheming,
|
|
24
24
|
type,
|
|
25
25
|
CompetitorPrompt,
|
|
26
|
-
hideIconLoadingSkeleton
|
|
27
|
-
extensionKey
|
|
26
|
+
hideIconLoadingSkeleton
|
|
28
27
|
}, embedIframeRef) => {
|
|
29
28
|
const iconFromContext = context === null || context === void 0 ? void 0 : context.icon;
|
|
30
29
|
const src = typeof iconFromContext === 'string' ? iconFromContext : undefined;
|
|
@@ -76,7 +75,6 @@ export const EmbedCardResolvedView = /*#__PURE__*/React.forwardRef(({
|
|
|
76
75
|
ref: embedIframeRef,
|
|
77
76
|
onIframeDwell: onIframeDwell,
|
|
78
77
|
onIframeFocus: onIframeFocus,
|
|
79
|
-
title: text
|
|
80
|
-
extensionKey: extensionKey
|
|
78
|
+
title: text
|
|
81
79
|
}));
|
|
82
80
|
});
|
|
@@ -4,7 +4,6 @@ import "./index.compiled.css";
|
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import { ax, ix } from "@compiled/react/runtime";
|
|
6
6
|
import { di } from 'react-magnetic-di';
|
|
7
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
7
|
import { getIframeSandboxAttribute } from '../../../../utils';
|
|
9
8
|
import { IFrame } from '../../../EmbedCard/components/IFrame';
|
|
10
9
|
const iframeCss = null;
|
|
@@ -13,8 +12,7 @@ const EmbedContent = ({
|
|
|
13
12
|
name,
|
|
14
13
|
src,
|
|
15
14
|
testId,
|
|
16
|
-
ariaLabel
|
|
17
|
-
extensionKey
|
|
15
|
+
ariaLabel
|
|
18
16
|
}) => {
|
|
19
17
|
const sandbox = getIframeSandboxAttribute(isTrusted);
|
|
20
18
|
const props = {
|
|
@@ -26,9 +24,7 @@ const EmbedContent = ({
|
|
|
26
24
|
};
|
|
27
25
|
return /*#__PURE__*/React.createElement(IFrame, _extends({
|
|
28
26
|
"aria-label": ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : `${testId}-embed`
|
|
29
|
-
},
|
|
30
|
-
extensionKey
|
|
31
|
-
} : {}, props, {
|
|
27
|
+
}, props, {
|
|
32
28
|
className: ax(["_1bsb1osq _4t3i815d"])
|
|
33
29
|
}));
|
|
34
30
|
};
|
|
@@ -30,8 +30,7 @@ const EmbedModal = ({
|
|
|
30
30
|
src,
|
|
31
31
|
testId = 'smart-embed-preview-modal',
|
|
32
32
|
title,
|
|
33
|
-
invokeViewAction
|
|
34
|
-
extensionKey
|
|
33
|
+
invokeViewAction
|
|
35
34
|
}) => {
|
|
36
35
|
const defaultWidth = toWidth(size);
|
|
37
36
|
const [isOpen, setIsOpen] = useState(showModal);
|
|
@@ -105,8 +104,7 @@ const EmbedModal = ({
|
|
|
105
104
|
name: iframeName,
|
|
106
105
|
src: previewUrl,
|
|
107
106
|
testId: testId,
|
|
108
|
-
ariaLabel: title
|
|
109
|
-
extensionKey: extensionKey
|
|
107
|
+
ariaLabel: title
|
|
110
108
|
}))));
|
|
111
109
|
};
|
|
112
110
|
export default withAnalytics(withErrorBoundary(EmbedModal));
|
|
@@ -11,7 +11,7 @@ import LinkWarningModal from './LinkWarningModal';
|
|
|
11
11
|
import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
|
|
12
12
|
const PACKAGE_DATA = {
|
|
13
13
|
packageName: "@atlaskit/smart-card",
|
|
14
|
-
packageVersion: "40.20.
|
|
14
|
+
packageVersion: "40.20.3",
|
|
15
15
|
componentName: 'linkUrl'
|
|
16
16
|
};
|
|
17
17
|
const Anchor = withLinkClickedEvent('a');
|
|
@@ -4,7 +4,7 @@ export var ANALYTICS_CHANNEL = 'media';
|
|
|
4
4
|
export var context = {
|
|
5
5
|
componentName: 'smart-cards',
|
|
6
6
|
packageName: "@atlaskit/smart-card",
|
|
7
|
-
packageVersion: "40.20.
|
|
7
|
+
packageVersion: "40.20.3"
|
|
8
8
|
};
|
|
9
9
|
export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
10
10
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -26,8 +26,7 @@ export var Frame = /*#__PURE__*/React.forwardRef(function (_ref, iframeRef) {
|
|
|
26
26
|
testId = _ref.testId,
|
|
27
27
|
onIframeDwell = _ref.onIframeDwell,
|
|
28
28
|
onIframeFocus = _ref.onIframeFocus,
|
|
29
|
-
title = _ref.title
|
|
30
|
-
extensionKey = _ref.extensionKey;
|
|
29
|
+
title = _ref.title;
|
|
31
30
|
var _useState = useState(false),
|
|
32
31
|
_useState2 = _slicedToArray(_useState, 2),
|
|
33
32
|
isIframeLoaded = _useState2[0],
|
|
@@ -116,7 +115,6 @@ export var Frame = /*#__PURE__*/React.forwardRef(function (_ref, iframeRef) {
|
|
|
116
115
|
},
|
|
117
116
|
sandbox: getIframeSandboxAttribute(isTrusted),
|
|
118
117
|
title: title,
|
|
119
|
-
extensionKey: extensionKey,
|
|
120
118
|
className: ax(["_19itidpf _1reo15vq _18m915vq _2rkofajl _154iidpf _1ltvidpf _1bsb1osq _4t3i1osq _kqswh2mm"])
|
|
121
119
|
}));
|
|
122
120
|
});
|
|
@@ -1,45 +1,16 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["childRef", "className"
|
|
3
|
+
var _excluded = ["childRef", "className"];
|
|
4
4
|
import React from 'react';
|
|
5
|
-
import { EditPage, Page, ViewPage } from '@atlaskit/embedded-confluence';
|
|
6
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
|
-
import { useConfluencePageData } from '../../../hooks/useConfluencePageData';
|
|
8
5
|
/**
|
|
9
6
|
* Iframe element isolated for DI purposes
|
|
10
7
|
*/
|
|
11
8
|
export var IFrame = function IFrame(_ref) {
|
|
12
9
|
var childRef = _ref.childRef,
|
|
13
10
|
className = _ref.className,
|
|
14
|
-
extensionKey = _ref.extensionKey,
|
|
15
11
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
16
|
-
var confluencePageData = fg('platform_deprecate_lp_cc_embed') ?
|
|
17
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
18
|
-
useConfluencePageData(props.src || '', extensionKey || '') : undefined;
|
|
19
|
-
|
|
20
|
-
// Conditional rendering: Page component for lp-cc-embed URLs, iframe for everything else
|
|
21
|
-
return confluencePageData && fg('platform_deprecate_lp_cc_embed') ? /*#__PURE__*/React.createElement(Page, {
|
|
22
|
-
hostname: confluencePageData.hostname,
|
|
23
|
-
spaceKey: confluencePageData.spaceKey,
|
|
24
|
-
contentId: confluencePageData.contentId,
|
|
25
|
-
parentProduct: confluencePageData.parentProduct
|
|
26
|
-
// @ts-expect-error - TODO userId is not a valid prop for the Page component, need to look into this, why did they do this in POC PR
|
|
27
|
-
,
|
|
28
|
-
userId: confluencePageData.userId,
|
|
29
|
-
userIdType: confluencePageData.userIdType,
|
|
30
|
-
hash: confluencePageData.hash,
|
|
31
|
-
enableInlineComments: confluencePageData.enableInlineComments,
|
|
32
|
-
enablePageComments: confluencePageData.enablePageComments,
|
|
33
|
-
themeStateObject: confluencePageData.themeStateObject,
|
|
34
|
-
allowedFeatures: confluencePageData.allowedFeatures,
|
|
35
|
-
mode: confluencePageData.mode,
|
|
36
|
-
locale: confluencePageData.locale,
|
|
37
|
-
viewComponent: ViewPage,
|
|
38
|
-
editComponent: EditPage
|
|
39
|
-
}) :
|
|
40
|
-
/*#__PURE__*/
|
|
41
12
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
42
|
-
React.createElement("iframe", _extends({
|
|
13
|
+
return /*#__PURE__*/React.createElement("iframe", _extends({
|
|
43
14
|
className: className
|
|
44
15
|
}, props, {
|
|
45
16
|
ref: childRef,
|
|
@@ -104,8 +104,7 @@ export var EmbedCard = /*#__PURE__*/React.forwardRef(function (_ref2, iframeRef)
|
|
|
104
104
|
onIframeFocus: onIframeFocus,
|
|
105
105
|
testId: testId,
|
|
106
106
|
CompetitorPrompt: CompetitorPrompt,
|
|
107
|
-
hideIconLoadingSkeleton: hideIconLoadingSkeleton
|
|
108
|
-
extensionKey: extensionKey
|
|
107
|
+
hideIconLoadingSkeleton: hideIconLoadingSkeleton
|
|
109
108
|
}));
|
|
110
109
|
} else {
|
|
111
110
|
if (platform === 'mobile') {
|
|
@@ -163,8 +162,7 @@ export var EmbedCard = /*#__PURE__*/React.forwardRef(function (_ref2, iframeRef)
|
|
|
163
162
|
isSelected: isSelected,
|
|
164
163
|
inheritDimensions: inheritDimensions,
|
|
165
164
|
onClick: handleFrameClick,
|
|
166
|
-
ref: iframeRef
|
|
167
|
-
extensionKey: extensionKey
|
|
165
|
+
ref: iframeRef
|
|
168
166
|
}));
|
|
169
167
|
}
|
|
170
168
|
var forbiddenAccessContext = extractRequestAccessContextImproved({
|
|
@@ -24,8 +24,7 @@ export var EmbedCardResolvedView = /*#__PURE__*/React.forwardRef(function (_ref,
|
|
|
24
24
|
isSupportTheming = _ref.isSupportTheming,
|
|
25
25
|
type = _ref.type,
|
|
26
26
|
CompetitorPrompt = _ref.CompetitorPrompt,
|
|
27
|
-
hideIconLoadingSkeleton = _ref.hideIconLoadingSkeleton
|
|
28
|
-
extensionKey = _ref.extensionKey;
|
|
27
|
+
hideIconLoadingSkeleton = _ref.hideIconLoadingSkeleton;
|
|
29
28
|
var iconFromContext = context === null || context === void 0 ? void 0 : context.icon;
|
|
30
29
|
var src = typeof iconFromContext === 'string' ? iconFromContext : undefined;
|
|
31
30
|
var text = title || (context === null || context === void 0 ? void 0 : context.text);
|
|
@@ -78,7 +77,6 @@ export var EmbedCardResolvedView = /*#__PURE__*/React.forwardRef(function (_ref,
|
|
|
78
77
|
ref: embedIframeRef,
|
|
79
78
|
onIframeDwell: onIframeDwell,
|
|
80
79
|
onIframeFocus: onIframeFocus,
|
|
81
|
-
title: text
|
|
82
|
-
extensionKey: extensionKey
|
|
80
|
+
title: text
|
|
83
81
|
}));
|
|
84
82
|
});
|
|
@@ -4,7 +4,6 @@ import "./index.compiled.css";
|
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import { ax, ix } from "@compiled/react/runtime";
|
|
6
6
|
import { di } from 'react-magnetic-di';
|
|
7
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
7
|
import { getIframeSandboxAttribute } from '../../../../utils';
|
|
9
8
|
import { IFrame } from '../../../EmbedCard/components/IFrame';
|
|
10
9
|
var iframeCss = null;
|
|
@@ -13,8 +12,7 @@ var EmbedContent = function EmbedContent(_ref) {
|
|
|
13
12
|
name = _ref.name,
|
|
14
13
|
src = _ref.src,
|
|
15
14
|
testId = _ref.testId,
|
|
16
|
-
ariaLabel = _ref.ariaLabel
|
|
17
|
-
extensionKey = _ref.extensionKey;
|
|
15
|
+
ariaLabel = _ref.ariaLabel;
|
|
18
16
|
var sandbox = getIframeSandboxAttribute(isTrusted);
|
|
19
17
|
var props = {
|
|
20
18
|
frameBorder: 0,
|
|
@@ -25,9 +23,7 @@ var EmbedContent = function EmbedContent(_ref) {
|
|
|
25
23
|
};
|
|
26
24
|
return /*#__PURE__*/React.createElement(IFrame, _extends({
|
|
27
25
|
"aria-label": ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : "".concat(testId, "-embed")
|
|
28
|
-
},
|
|
29
|
-
extensionKey: extensionKey
|
|
30
|
-
} : {}, props, {
|
|
26
|
+
}, props, {
|
|
31
27
|
className: ax(["_1bsb1osq _4t3i815d"])
|
|
32
28
|
}));
|
|
33
29
|
};
|
|
@@ -38,8 +38,7 @@ var EmbedModal = function EmbedModal(_ref) {
|
|
|
38
38
|
_ref$testId = _ref.testId,
|
|
39
39
|
testId = _ref$testId === void 0 ? 'smart-embed-preview-modal' : _ref$testId,
|
|
40
40
|
title = _ref.title,
|
|
41
|
-
invokeViewAction = _ref.invokeViewAction
|
|
42
|
-
extensionKey = _ref.extensionKey;
|
|
41
|
+
invokeViewAction = _ref.invokeViewAction;
|
|
43
42
|
var defaultWidth = toWidth(size);
|
|
44
43
|
var _useState = useState(showModal),
|
|
45
44
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -120,8 +119,7 @@ var EmbedModal = function EmbedModal(_ref) {
|
|
|
120
119
|
name: iframeName,
|
|
121
120
|
src: previewUrl,
|
|
122
121
|
testId: testId,
|
|
123
|
-
ariaLabel: title
|
|
124
|
-
extensionKey: extensionKey
|
|
122
|
+
ariaLabel: title
|
|
125
123
|
}))));
|
|
126
124
|
};
|
|
127
125
|
export default withAnalytics(withErrorBoundary(EmbedModal));
|
|
@@ -14,7 +14,7 @@ import LinkWarningModal from './LinkWarningModal';
|
|
|
14
14
|
import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
|
|
15
15
|
var PACKAGE_DATA = {
|
|
16
16
|
packageName: "@atlaskit/smart-card",
|
|
17
|
-
packageVersion: "40.20.
|
|
17
|
+
packageVersion: "40.20.3",
|
|
18
18
|
componentName: 'linkUrl'
|
|
19
19
|
};
|
|
20
20
|
var Anchor = withLinkClickedEvent('a');
|
|
@@ -2,10 +2,9 @@ import React from 'react';
|
|
|
2
2
|
interface IFrameProps {
|
|
3
3
|
childRef?: React.Ref<HTMLIFrameElement>;
|
|
4
4
|
className?: string;
|
|
5
|
-
extensionKey?: string;
|
|
6
5
|
}
|
|
7
6
|
/**
|
|
8
7
|
* Iframe element isolated for DI purposes
|
|
9
8
|
*/
|
|
10
|
-
export declare const IFrame: ({ childRef, className,
|
|
9
|
+
export declare const IFrame: ({ childRef, className, ...props }: React.ComponentProps<"iframe"> & IFrameProps) => React.JSX.Element;
|
|
11
10
|
export {};
|
|
@@ -8,8 +8,6 @@ export interface EmbedCardResolvedViewProps {
|
|
|
8
8
|
}>;
|
|
9
9
|
/** The context view model */
|
|
10
10
|
context?: ContextViewModel;
|
|
11
|
-
/** The extension key */
|
|
12
|
-
extensionKey?: string;
|
|
13
11
|
/** A prop that determines the style of a frame: whether to show it, hide it or only show it when a user hovers over embed */
|
|
14
12
|
frameStyle?: FrameStyle;
|
|
15
13
|
/** For image icons in the title, whether to hide the loading skeleton while the image is loading. */
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { type EmbedProps } from './types';
|
|
2
|
-
declare const EmbedContent: ({ isTrusted, name, src, testId, ariaLabel
|
|
2
|
+
declare const EmbedContent: ({ isTrusted, name, src, testId, ariaLabel }: EmbedProps) => JSX.Element;
|
|
3
3
|
export default EmbedContent;
|
|
@@ -11,6 +11,10 @@ export interface HoverCardProps extends WithAnalyticsEventsProps {
|
|
|
11
11
|
* Configure visibility of server and client actions
|
|
12
12
|
*/
|
|
13
13
|
actionOptions?: CardActionOptions;
|
|
14
|
+
/**
|
|
15
|
+
* Allow click event to bubble up from hover preview trigger component.
|
|
16
|
+
*/
|
|
17
|
+
allowEventPropagation?: boolean;
|
|
14
18
|
/**
|
|
15
19
|
* Determines if the hover card is allowed to open. If changed from true to false while the
|
|
16
20
|
* hover card is open, the hover card will be closed.
|
|
@@ -65,11 +69,6 @@ export interface HoverCardProps extends WithAnalyticsEventsProps {
|
|
|
65
69
|
* standalone hover card.
|
|
66
70
|
*/
|
|
67
71
|
export interface HoverCardInternalProps {
|
|
68
|
-
/**
|
|
69
|
-
* Allow click event to bubble up from hover preview trigger component.
|
|
70
|
-
* @see EDM-7187 for further details
|
|
71
|
-
*/
|
|
72
|
-
allowEventPropagation?: boolean;
|
|
73
72
|
/**
|
|
74
73
|
* Suspend hover card UI delays (fade-in, fade-out) for VR testing purposes.
|
|
75
74
|
*/
|
|
@@ -2,10 +2,9 @@ import React from 'react';
|
|
|
2
2
|
interface IFrameProps {
|
|
3
3
|
childRef?: React.Ref<HTMLIFrameElement>;
|
|
4
4
|
className?: string;
|
|
5
|
-
extensionKey?: string;
|
|
6
5
|
}
|
|
7
6
|
/**
|
|
8
7
|
* Iframe element isolated for DI purposes
|
|
9
8
|
*/
|
|
10
|
-
export declare const IFrame: ({ childRef, className,
|
|
9
|
+
export declare const IFrame: ({ childRef, className, ...props }: React.ComponentProps<"iframe"> & IFrameProps) => React.JSX.Element;
|
|
11
10
|
export {};
|
|
@@ -8,8 +8,6 @@ export interface EmbedCardResolvedViewProps {
|
|
|
8
8
|
}>;
|
|
9
9
|
/** The context view model */
|
|
10
10
|
context?: ContextViewModel;
|
|
11
|
-
/** The extension key */
|
|
12
|
-
extensionKey?: string;
|
|
13
11
|
/** A prop that determines the style of a frame: whether to show it, hide it or only show it when a user hovers over embed */
|
|
14
12
|
frameStyle?: FrameStyle;
|
|
15
13
|
/** For image icons in the title, whether to hide the loading skeleton while the image is loading. */
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { type EmbedProps } from './types';
|
|
2
|
-
declare const EmbedContent: ({ isTrusted, name, src, testId, ariaLabel
|
|
2
|
+
declare const EmbedContent: ({ isTrusted, name, src, testId, ariaLabel }: EmbedProps) => JSX.Element;
|
|
3
3
|
export default EmbedContent;
|
|
@@ -11,6 +11,10 @@ export interface HoverCardProps extends WithAnalyticsEventsProps {
|
|
|
11
11
|
* Configure visibility of server and client actions
|
|
12
12
|
*/
|
|
13
13
|
actionOptions?: CardActionOptions;
|
|
14
|
+
/**
|
|
15
|
+
* Allow click event to bubble up from hover preview trigger component.
|
|
16
|
+
*/
|
|
17
|
+
allowEventPropagation?: boolean;
|
|
14
18
|
/**
|
|
15
19
|
* Determines if the hover card is allowed to open. If changed from true to false while the
|
|
16
20
|
* hover card is open, the hover card will be closed.
|
|
@@ -65,11 +69,6 @@ export interface HoverCardProps extends WithAnalyticsEventsProps {
|
|
|
65
69
|
* standalone hover card.
|
|
66
70
|
*/
|
|
67
71
|
export interface HoverCardInternalProps {
|
|
68
|
-
/**
|
|
69
|
-
* Allow click event to bubble up from hover preview trigger component.
|
|
70
|
-
* @see EDM-7187 for further details
|
|
71
|
-
*/
|
|
72
|
-
allowEventPropagation?: boolean;
|
|
73
72
|
/**
|
|
74
73
|
* Suspend hover card UI delays (fade-in, fade-out) for VR testing purposes.
|
|
75
74
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/smart-card",
|
|
3
|
-
"version": "40.
|
|
3
|
+
"version": "40.21.0",
|
|
4
4
|
"description": "Smart card component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -35,7 +35,6 @@
|
|
|
35
35
|
"@atlaskit/checkbox": "^17.1.0",
|
|
36
36
|
"@atlaskit/css": "^0.14.0",
|
|
37
37
|
"@atlaskit/dropdown-menu": "^16.3.0",
|
|
38
|
-
"@atlaskit/embedded-confluence": "^4.1.0",
|
|
39
38
|
"@atlaskit/feature-gate-js-client": "^5.5.0",
|
|
40
39
|
"@atlaskit/form": "^12.5.0",
|
|
41
40
|
"@atlaskit/frontend-utilities": "^3.1.0",
|