@atlaskit/smart-card 26.46.5 → 26.47.1
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 +18 -0
- package/dist/cjs/extractors/common/meta/extractIsTrusted.js +0 -7
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/utils/index.js +0 -5
- package/dist/cjs/view/BlockCard/components/Content.js +6 -0
- package/dist/cjs/view/BlockCard/components/ContentHeader.js +6 -0
- package/dist/cjs/view/BlockCard/components/Name.js +6 -0
- package/dist/cjs/view/BlockCard/views/ErroredView.js +6 -0
- package/dist/cjs/view/BlockCard/views/ForbiddenView.js +13 -0
- package/dist/cjs/view/BlockCard/views/NotFoundView.js +6 -0
- package/dist/cjs/view/BlockCard/views/ResolvedView.js +12 -0
- package/dist/cjs/view/BlockCard/views/ResolvingView.js +6 -0
- package/dist/cjs/view/CardWithUrl/component.js +3 -2
- package/dist/cjs/view/CardWithUrl/loader.js +4 -2
- package/dist/cjs/view/HoverCard/components/ContentContainer.js +43 -0
- package/dist/cjs/view/HoverCard/components/CustomPopupContainer.js +7 -1
- package/dist/cjs/view/HoverCard/components/HoverCardContent.js +18 -3
- package/dist/cjs/view/HoverCard/components/views/resolved/index.js +6 -7
- package/dist/cjs/view/HoverCard/styled.js +4 -2
- package/dist/cjs/view/HoverCard/utils.js +7 -1
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/cjs/view/common/Icon.js +6 -0
- package/dist/es2019/extractors/common/meta/extractIsTrusted.js +0 -7
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/utils/index.js +0 -5
- package/dist/es2019/view/BlockCard/components/Content.js +6 -0
- package/dist/es2019/view/BlockCard/components/ContentHeader.js +6 -0
- package/dist/es2019/view/BlockCard/components/Name.js +6 -0
- package/dist/es2019/view/BlockCard/views/ErroredView.js +6 -0
- package/dist/es2019/view/BlockCard/views/ForbiddenView.js +13 -0
- package/dist/es2019/view/BlockCard/views/NotFoundView.js +6 -0
- package/dist/es2019/view/BlockCard/views/ResolvedView.js +12 -0
- package/dist/es2019/view/BlockCard/views/ResolvingView.js +6 -0
- package/dist/es2019/view/CardWithUrl/component.js +3 -2
- package/dist/es2019/view/CardWithUrl/loader.js +4 -2
- package/dist/es2019/view/HoverCard/components/ContentContainer.js +33 -0
- package/dist/es2019/view/HoverCard/components/CustomPopupContainer.js +8 -1
- package/dist/es2019/view/HoverCard/components/HoverCardContent.js +18 -6
- package/dist/es2019/view/HoverCard/components/views/resolved/index.js +6 -8
- package/dist/es2019/view/HoverCard/styled.js +4 -1
- package/dist/es2019/view/HoverCard/utils.js +4 -0
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/es2019/view/common/Icon.js +6 -0
- package/dist/esm/extractors/common/meta/extractIsTrusted.js +0 -7
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/utils/index.js +0 -5
- package/dist/esm/view/BlockCard/components/Content.js +6 -0
- package/dist/esm/view/BlockCard/components/ContentHeader.js +6 -0
- package/dist/esm/view/BlockCard/components/Name.js +6 -0
- package/dist/esm/view/BlockCard/views/ErroredView.js +6 -0
- package/dist/esm/view/BlockCard/views/ForbiddenView.js +13 -0
- package/dist/esm/view/BlockCard/views/NotFoundView.js +6 -0
- package/dist/esm/view/BlockCard/views/ResolvedView.js +12 -0
- package/dist/esm/view/BlockCard/views/ResolvingView.js +6 -0
- package/dist/esm/view/CardWithUrl/component.js +3 -2
- package/dist/esm/view/CardWithUrl/loader.js +4 -2
- package/dist/esm/view/HoverCard/components/ContentContainer.js +36 -0
- package/dist/esm/view/HoverCard/components/CustomPopupContainer.js +8 -1
- package/dist/esm/view/HoverCard/components/HoverCardContent.js +21 -6
- package/dist/esm/view/HoverCard/components/views/resolved/index.js +6 -7
- package/dist/esm/view/HoverCard/styled.js +4 -1
- package/dist/esm/view/HoverCard/utils.js +6 -0
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/esm/view/common/Icon.js +6 -0
- package/dist/types/utils/index.d.ts +1 -1
- package/dist/types/view/BlockCard/components/Content.d.ts +6 -0
- package/dist/types/view/BlockCard/components/ContentHeader.d.ts +6 -0
- package/dist/types/view/BlockCard/components/Name.d.ts +6 -0
- package/dist/types/view/BlockCard/views/ErroredView.d.ts +6 -0
- package/dist/types/view/BlockCard/views/ForbiddenView.d.ts +12 -0
- package/dist/types/view/BlockCard/views/NotFoundView.d.ts +6 -0
- package/dist/types/view/BlockCard/views/ResolvedView.d.ts +12 -0
- package/dist/types/view/BlockCard/views/ResolvingView.d.ts +6 -0
- package/dist/types/view/Card/index.d.ts +1 -1
- package/dist/types/view/Card/types.d.ts +6 -0
- package/dist/types/view/CardWithUrl/types.d.ts +1 -0
- package/dist/types/view/HoverCard/components/ContentContainer.d.ts +4 -0
- package/dist/types/view/HoverCard/components/CustomPopupContainer.d.ts +5 -0
- package/dist/types/view/HoverCard/components/views/resolved/types.d.ts +3 -0
- package/dist/types/view/HoverCard/styled.d.ts +1 -0
- package/dist/types/view/HoverCard/types.d.ts +5 -0
- package/dist/types/view/HoverCard/utils.d.ts +2 -1
- package/dist/types/view/common/Icon.d.ts +6 -0
- package/dist/types-ts4.5/utils/index.d.ts +1 -1
- package/dist/types-ts4.5/view/BlockCard/components/Content.d.ts +6 -0
- package/dist/types-ts4.5/view/BlockCard/components/ContentHeader.d.ts +6 -0
- package/dist/types-ts4.5/view/BlockCard/components/Name.d.ts +6 -0
- package/dist/types-ts4.5/view/BlockCard/views/ErroredView.d.ts +6 -0
- package/dist/types-ts4.5/view/BlockCard/views/ForbiddenView.d.ts +12 -0
- package/dist/types-ts4.5/view/BlockCard/views/NotFoundView.d.ts +6 -0
- package/dist/types-ts4.5/view/BlockCard/views/ResolvedView.d.ts +12 -0
- package/dist/types-ts4.5/view/BlockCard/views/ResolvingView.d.ts +6 -0
- package/dist/types-ts4.5/view/Card/index.d.ts +1 -1
- package/dist/types-ts4.5/view/Card/types.d.ts +6 -0
- package/dist/types-ts4.5/view/CardWithUrl/types.d.ts +1 -0
- package/dist/types-ts4.5/view/HoverCard/components/ContentContainer.d.ts +4 -0
- package/dist/types-ts4.5/view/HoverCard/components/CustomPopupContainer.d.ts +5 -0
- package/dist/types-ts4.5/view/HoverCard/components/views/resolved/types.d.ts +3 -0
- package/dist/types-ts4.5/view/HoverCard/styled.d.ts +1 -0
- package/dist/types-ts4.5/view/HoverCard/types.d.ts +5 -0
- package/dist/types-ts4.5/view/HoverCard/utils.d.ts +2 -1
- package/dist/types-ts4.5/view/common/Icon.d.ts +6 -0
- package/package.json +2 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @atlaskit/smart-card
|
|
2
2
|
|
|
3
|
+
## 26.47.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#71683](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/71683) [`eff650c49a32`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/eff650c49a32) - Add AI prism border to hover preview (behind platform.linking-platform.smart-card.hover-card-ai-summaries feature flag)
|
|
8
|
+
- [#72180](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/72180) [`268634b4c024`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/268634b4c024) - Removes two unshipped feature flags, platform.linking-platform.smart-card.fix-is-trusted-pop and platform.linking-platform.smart-card.iframes-allow-storage-access-by-user-activation
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 26.47.0
|
|
12
|
+
|
|
13
|
+
### Minor Changes
|
|
14
|
+
|
|
15
|
+
- [#70641](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/70641) [`ace1983306b8`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/ace1983306b8) - EDM-8787 Add useLegacyBlockCard prop to smart card
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- Updated dependencies
|
|
20
|
+
|
|
3
21
|
## 26.46.5
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
|
@@ -4,13 +4,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.extractIsTrusted = void 0;
|
|
7
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
8
7
|
var extractIsTrusted = exports.extractIsTrusted = function extractIsTrusted(meta) {
|
|
9
|
-
if ((0, _platformFeatureFlags.getBooleanFF)('platform.linking-platform.smart-card.fix-is-trusted-pop')) {
|
|
10
|
-
if (!(meta !== null && meta !== void 0 && meta.key)) {
|
|
11
|
-
return false;
|
|
12
|
-
}
|
|
13
|
-
return !['iframely-object-provider', 'public-object-provider'].includes(meta.key);
|
|
14
|
-
}
|
|
15
8
|
return Boolean((meta === null || meta === void 0 ? void 0 : meta.key) && meta.key !== 'iframely-object-provider');
|
|
16
9
|
};
|
|
@@ -22,7 +22,7 @@ var ANALYTICS_CHANNEL = exports.ANALYTICS_CHANNEL = 'media';
|
|
|
22
22
|
var context = exports.context = {
|
|
23
23
|
componentName: 'smart-cards',
|
|
24
24
|
packageName: "@atlaskit/smart-card",
|
|
25
|
-
packageVersion: "26.
|
|
25
|
+
packageVersion: "26.47.1"
|
|
26
26
|
};
|
|
27
27
|
var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
28
28
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
package/dist/cjs/utils/index.js
CHANGED
|
@@ -11,7 +11,6 @@ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/
|
|
|
11
11
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
12
12
|
var _react = _interopRequireDefault(require("react"));
|
|
13
13
|
var _reactLoadable = _interopRequireDefault(require("react-loadable"));
|
|
14
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
15
14
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
16
15
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
17
16
|
var isCardWithData = exports.isCardWithData = function isCardWithData(props) {
|
|
@@ -336,10 +335,6 @@ var getIframeSandboxAttribute = exports.getIframeSandboxAttribute = function get
|
|
|
336
335
|
return undefined;
|
|
337
336
|
}
|
|
338
337
|
var sandboxPermissions = 'allow-downloads allow-forms allow-popups allow-popups-to-escape-sandbox allow-presentation allow-same-origin allow-scripts';
|
|
339
|
-
var allowStorageAccess = 'allow-storage-access-by-user-activation';
|
|
340
|
-
if ((0, _platformFeatureFlags.getBooleanFF)('platform.linking-platform.smart-card.iframes-allow-storage-access-by-user-activation')) {
|
|
341
|
-
return "".concat(sandboxPermissions, " ").concat(allowStorageAccess);
|
|
342
|
-
}
|
|
343
338
|
return sandboxPermissions;
|
|
344
339
|
};
|
|
345
340
|
var handleOnClick = exports.handleOnClick = function handleOnClick(handler) {
|
|
@@ -8,6 +8,12 @@ var _react = require("@emotion/react");
|
|
|
8
8
|
var _utils = require("../../common/utils");
|
|
9
9
|
/** @jsx jsx */
|
|
10
10
|
|
|
11
|
+
/**
|
|
12
|
+
* Class name for selecting non-flexible block card content
|
|
13
|
+
*
|
|
14
|
+
* @deprecated {@link https://hello.jira.atlassian.cloud/browse/ENGHEALTH-6878 Internal documentation for deprecation (no external access)}
|
|
15
|
+
* Using this selctor is deprecated as once the flexible block card feature flag is removed, this class will no longer be used.
|
|
16
|
+
*/
|
|
11
17
|
var blockCardContentClassName = exports.blockCardContentClassName = 'block-card-content';
|
|
12
18
|
var Content = exports.Content = function Content(_ref) {
|
|
13
19
|
var children = _ref.children,
|
|
@@ -8,6 +8,12 @@ var _react = require("@emotion/react");
|
|
|
8
8
|
var _useLinkClicked = require("../../../state/analytics/useLinkClicked");
|
|
9
9
|
/** @jsx jsx */
|
|
10
10
|
|
|
11
|
+
/**
|
|
12
|
+
* Class name for selecting non-flexible block card header
|
|
13
|
+
*
|
|
14
|
+
* @deprecated {@link https://hello.jira.atlassian.cloud/browse/ENGHEALTH-6878 Internal documentation for deprecation (no external access)}
|
|
15
|
+
* Using this selctor is deprecated as once the flexible block card feature flag is removed, this class will no longer be used.
|
|
16
|
+
*/
|
|
11
17
|
var blockCardContentHeaderClassName = exports.blockCardContentHeaderClassName = 'block-card-content-header';
|
|
12
18
|
var ContentHeader = exports.ContentHeader = function ContentHeader(_ref) {
|
|
13
19
|
var onClick = _ref.onClick,
|
|
@@ -9,6 +9,12 @@ var _constants = require("@atlaskit/theme/constants");
|
|
|
9
9
|
var _utils = require("../../common/utils");
|
|
10
10
|
/** @jsx jsx */
|
|
11
11
|
|
|
12
|
+
/**
|
|
13
|
+
* Class name for selecting non-flexible block card header name
|
|
14
|
+
*
|
|
15
|
+
* @deprecated {@link https://hello.jira.atlassian.cloud/browse/ENGHEALTH-6878 Internal documentation for deprecation (no external access)}
|
|
16
|
+
* Using this selctor is deprecated as once the flexible block card feature flag is removed, this class will no longer be used.
|
|
17
|
+
*/
|
|
12
18
|
var blockCardContentHeaderNameClassName = exports.blockCardContentHeaderNameClassName = 'block-card-content-header-name';
|
|
13
19
|
var Name = exports.Name = function Name(_ref) {
|
|
14
20
|
var name = _ref.name,
|
|
@@ -25,6 +25,12 @@ var _RetryAction = require("../actions/RetryAction");
|
|
|
25
25
|
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; }
|
|
26
26
|
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) { (0, _defineProperty2.default)(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; } /** @jsx jsx */
|
|
27
27
|
var textDescriptionProps = _objectSpread({}, _messages.messages.could_not_load_link);
|
|
28
|
+
/**
|
|
29
|
+
* Class name for selecting non-flexible errored block card
|
|
30
|
+
*
|
|
31
|
+
* @deprecated {@link https://hello.jira.atlassian.cloud/browse/ENGHEALTH-6878 Internal documentation for deprecation (no external access)}
|
|
32
|
+
* Using this selctor is deprecated as once the flexible block card feature flag is removed, this class will no longer be used.
|
|
33
|
+
*/
|
|
28
34
|
var blockCardErroredViewClassName = exports.blockCardErroredViewClassName = 'block-card-errored-view';
|
|
29
35
|
var ErroredView = exports.ErroredView = function ErroredView(_ref) {
|
|
30
36
|
var _ref$isSelected = _ref.isSelected,
|
|
@@ -24,7 +24,20 @@ var _Link = require("../components/Link");
|
|
|
24
24
|
var _UnresolvedText = require("../components/UnresolvedText");
|
|
25
25
|
/** @jsx jsx */
|
|
26
26
|
|
|
27
|
+
/**
|
|
28
|
+
* Class name for selecting non-flexible forbidden block card
|
|
29
|
+
*
|
|
30
|
+
* @deprecated {@link https://hello.jira.atlassian.cloud/browse/ENGHEALTH-6878 Internal documentation for deprecation (no external access)}
|
|
31
|
+
* Using this selctor is deprecated as once the flexible block card feature flag is removed, this class will no longer be used.
|
|
32
|
+
*/
|
|
27
33
|
var blockCardForbiddenViewClassName = exports.blockCardForbiddenViewClassName = 'block-card-forbidden-view';
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Class name for selecting link inside non-flexible forbidden block card
|
|
37
|
+
*
|
|
38
|
+
* @deprecated {@link https://hello.jira.atlassian.cloud/browse/ENGHEALTH-6878 Internal documentation for deprecation (no external access)}
|
|
39
|
+
* Using this selctor is deprecated as once the flexible block card feature flag is removed, this class will no longer be used.
|
|
40
|
+
*/
|
|
28
41
|
var blockCardForbiddenViewLinkClassName = exports.blockCardForbiddenViewLinkClassName = 'block-card-forbidden-view-link';
|
|
29
42
|
var ForbiddenView = exports.ForbiddenView = function ForbiddenView(_ref) {
|
|
30
43
|
var _ref$context = _ref.context,
|
|
@@ -24,6 +24,12 @@ var _handlers = require("../utils/handlers");
|
|
|
24
24
|
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; }
|
|
25
25
|
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) { (0, _defineProperty2.default)(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; } /** @jsx jsx */
|
|
26
26
|
var textDescriptionProps = _objectSpread({}, _messages.messages.not_found_description);
|
|
27
|
+
/**
|
|
28
|
+
* Class name for selecting non-flexible not-found block card
|
|
29
|
+
*
|
|
30
|
+
* @deprecated {@link https://hello.jira.atlassian.cloud/browse/ENGHEALTH-6878 Internal documentation for deprecation (no external access)}
|
|
31
|
+
* Using this selctor is deprecated as once the flexible block card feature flag is removed, this class will no longer be used.
|
|
32
|
+
*/
|
|
27
33
|
var blockCardNotFoundViewClassName = exports.blockCardNotFoundViewClassName = 'block-card-not-found-view';
|
|
28
34
|
var NotFoundView = exports.NotFoundView = function NotFoundView(_ref) {
|
|
29
35
|
var _ref$context = _ref.context,
|
|
@@ -25,7 +25,19 @@ var _utils = require("../../common/utils");
|
|
|
25
25
|
var _handlers = require("../utils/handlers");
|
|
26
26
|
/** @jsx jsx */
|
|
27
27
|
|
|
28
|
+
/**
|
|
29
|
+
* Class name for selecting non-flexible resolved block card
|
|
30
|
+
*
|
|
31
|
+
* @deprecated {@link https://hello.jira.atlassian.cloud/browse/ENGHEALTH-6878 Internal documentation for deprecation (no external access)}
|
|
32
|
+
* Using this selctor is deprecated as once the flexible block card feature flag is removed, this class will no longer be used.
|
|
33
|
+
*/
|
|
28
34
|
var blockCardResolvedViewClassName = exports.blockCardResolvedViewClassName = 'block-card-resolved-view';
|
|
35
|
+
/**
|
|
36
|
+
* Class name for selecting non-flexible resolved byline
|
|
37
|
+
*
|
|
38
|
+
* @deprecated {@link https://hello.jira.atlassian.cloud/browse/ENGHEALTH-6878 Internal documentation for deprecation (no external access)}
|
|
39
|
+
* Using this selctor is deprecated as once the flexible block card feature flag is removed, this class will no longer be used.
|
|
40
|
+
*/
|
|
29
41
|
var blockCardResolvedViewByClassName = exports.blockCardResolvedViewByClassName = 'block-card-resolved-view-by';
|
|
30
42
|
var ResolvedView = exports.ResolvedView = function ResolvedView(_ref) {
|
|
31
43
|
var _ref$icon = _ref.icon,
|
|
@@ -15,6 +15,12 @@ var _reactIntlNext = require("react-intl-next");
|
|
|
15
15
|
var _messages = require("../../../messages");
|
|
16
16
|
/** @jsx jsx */
|
|
17
17
|
|
|
18
|
+
/**
|
|
19
|
+
* Class name for selecting non-flexible resolving block card
|
|
20
|
+
*
|
|
21
|
+
* @deprecated {@link https://hello.jira.atlassian.cloud/browse/ENGHEALTH-6878 Internal documentation for deprecation (no external access)}
|
|
22
|
+
* Using this selctor is deprecated as once the flexible block card feature flag is removed, this class will no longer be used.
|
|
23
|
+
*/
|
|
18
24
|
var blockCardResolvingViewClassName = exports.blockCardResolvingViewClassName = 'block-card-resolving-view';
|
|
19
25
|
var ResolvingView = exports.ResolvingView = function ResolvingView(_ref) {
|
|
20
26
|
var _ref$isSelected = _ref.isSelected,
|
|
@@ -49,7 +49,8 @@ function Component(_ref) {
|
|
|
49
49
|
children = _ref.children,
|
|
50
50
|
showHoverPreview = _ref.showHoverPreview,
|
|
51
51
|
showAuthTooltip = _ref.showAuthTooltip,
|
|
52
|
-
analyticsEvents = _ref.analyticsEvents
|
|
52
|
+
analyticsEvents = _ref.analyticsEvents,
|
|
53
|
+
useLegacyBlockCard = _ref.useLegacyBlockCard;
|
|
53
54
|
var _useAnalyticsEvents = (0, _analyticsNext.useAnalyticsEvents)(),
|
|
54
55
|
createAnalyticsEvent = _useAnalyticsEvents.createAnalyticsEvent;
|
|
55
56
|
|
|
@@ -246,7 +247,7 @@ function Component(_ref) {
|
|
|
246
247
|
testId: testId,
|
|
247
248
|
actionOptions: actionOptions,
|
|
248
249
|
platform: platform,
|
|
249
|
-
enableFlexibleBlockCard: enableFlexibleBlockCardFlag
|
|
250
|
+
enableFlexibleBlockCard: enableFlexibleBlockCardFlag && useLegacyBlockCard !== true
|
|
250
251
|
});
|
|
251
252
|
case 'embed':
|
|
252
253
|
return /*#__PURE__*/_react.default.createElement(_EmbedCard.EmbedCard, {
|
|
@@ -62,7 +62,8 @@ function CardWithURLRenderer(props) {
|
|
|
62
62
|
showAuthTooltip = props.showAuthTooltip,
|
|
63
63
|
analyticsEvents = props.analyticsEvents,
|
|
64
64
|
placeholder = props.placeholder,
|
|
65
|
-
fallbackComponent = props.fallbackComponent
|
|
65
|
+
fallbackComponent = props.fallbackComponent,
|
|
66
|
+
useLegacyBlockCard = props.useLegacyBlockCard;
|
|
66
67
|
var analytics = (0, _analytics.useSmartLinkAnalytics)(url !== null && url !== void 0 ? url : '', undefined, id);
|
|
67
68
|
var isFlexibleUi = (0, _flexible.isFlexibleUiCard)(children);
|
|
68
69
|
var errorHandler = (0, _react.useCallback)(function (error, info) {
|
|
@@ -130,7 +131,8 @@ function CardWithURLRenderer(props) {
|
|
|
130
131
|
showHoverPreview: showHoverPreview,
|
|
131
132
|
showAuthTooltip: showAuthTooltip,
|
|
132
133
|
analyticsEvents: analyticsEvents,
|
|
133
|
-
placeholder: placeholder
|
|
134
|
+
placeholder: placeholder,
|
|
135
|
+
useLegacyBlockCard: useLegacyBlockCard
|
|
134
136
|
};
|
|
135
137
|
return /*#__PURE__*/_react.default.createElement(_reactErrorBoundary.ErrorBoundary, {
|
|
136
138
|
FallbackComponent: ErrorFallback,
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
10
|
+
var _react = require("@emotion/react");
|
|
11
|
+
var _react2 = _interopRequireDefault(require("react"));
|
|
12
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
13
|
+
var _styled = require("../styled");
|
|
14
|
+
var _aiPrism = _interopRequireDefault(require("../../common/ai-prism"));
|
|
15
|
+
var _HoverCardContent = require("./HoverCardContent");
|
|
16
|
+
var _excluded = ["children", "isAIEnabled", "showPrism", "testId"];
|
|
17
|
+
/** @jsx jsx */
|
|
18
|
+
var ContentContainer = function ContentContainer(_ref) {
|
|
19
|
+
var children = _ref.children,
|
|
20
|
+
_ref$isAIEnabled = _ref.isAIEnabled,
|
|
21
|
+
isAIEnabled = _ref$isAIEnabled === void 0 ? false : _ref$isAIEnabled,
|
|
22
|
+
_ref$showPrism = _ref.showPrism,
|
|
23
|
+
showPrism = _ref$showPrism === void 0 ? false : _ref$showPrism,
|
|
24
|
+
testId = _ref.testId,
|
|
25
|
+
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
26
|
+
if ((0, _platformFeatureFlags.getBooleanFF)('platform.linking-platform.smart-card.hover-card-ai-summaries')) {
|
|
27
|
+
var container = (0, _react.jsx)("div", (0, _extends2.default)({
|
|
28
|
+
className: _HoverCardContent.hoverCardClassName,
|
|
29
|
+
css: [_styled.HoverCardContainer, isAIEnabled && showPrism ? undefined : _styled.popupContainerStyles],
|
|
30
|
+
"data-testid": testId
|
|
31
|
+
}, props), children);
|
|
32
|
+
return isAIEnabled ? (0, _react.jsx)(_aiPrism.default, {
|
|
33
|
+
isVisible: showPrism,
|
|
34
|
+
testId: "".concat(testId, "-prism")
|
|
35
|
+
}, container) : container;
|
|
36
|
+
}
|
|
37
|
+
return (0, _react.jsx)("div", (0, _extends2.default)({
|
|
38
|
+
className: _HoverCardContent.hoverCardClassName,
|
|
39
|
+
css: _styled.HoverCardContainer,
|
|
40
|
+
"data-testid": testId
|
|
41
|
+
}, props), children);
|
|
42
|
+
};
|
|
43
|
+
var _default = exports.default = ContentContainer;
|
|
@@ -8,15 +8,21 @@ exports.default = 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 _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
11
12
|
var _styled = require("../styled");
|
|
12
13
|
var _react2 = require("@emotion/react");
|
|
13
14
|
var _excluded = ["children"];
|
|
14
15
|
/** @jsx jsx */
|
|
16
|
+
/**
|
|
17
|
+
* The purpose of this component is to hide the default Popup border.
|
|
18
|
+
* HoverCard border implementation is in ContentContainer where it can
|
|
19
|
+
* change between the default border and prism border during runtime.
|
|
20
|
+
*/
|
|
15
21
|
var CustomPopupContainer = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
|
|
16
22
|
var children = _ref.children,
|
|
17
23
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
18
24
|
return (0, _react2.jsx)("div", (0, _extends2.default)({
|
|
19
|
-
css: _styled.popupContainerStyles
|
|
25
|
+
css: (0, _platformFeatureFlags.getBooleanFF)('platform.linking-platform.smart-card.hover-card-ai-summaries') ? undefined : _styled.popupContainerStyles
|
|
20
26
|
}, props, {
|
|
21
27
|
ref: ref
|
|
22
28
|
}), children);
|
|
@@ -7,11 +7,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
});
|
|
8
8
|
exports.hoverCardClassName = exports.getCopyAction = exports.default = void 0;
|
|
9
9
|
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
10
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
10
11
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
11
12
|
var _react = require("@emotion/react");
|
|
12
13
|
var _analyticsNext = require("@atlaskit/analytics-next");
|
|
13
14
|
var _copy = _interopRequireDefault(require("@atlaskit/icon/glyph/copy"));
|
|
14
15
|
var _react2 = _interopRequireWildcard(require("react"));
|
|
16
|
+
var _linkProvider = require("@atlaskit/link-provider");
|
|
15
17
|
var _constants = require("../../../constants");
|
|
16
18
|
var _extractMetadata2 = require("../../../extractors/hover/extractMetadata");
|
|
17
19
|
var _analytics2 = require("../../../state/analytics");
|
|
@@ -27,6 +29,7 @@ var _messages = require("../../../messages");
|
|
|
27
29
|
var _click = require("../../../utils/analytics/click");
|
|
28
30
|
var _store = require("../../../state/store");
|
|
29
31
|
var _forbidden = _interopRequireDefault(require("./views/forbidden"));
|
|
32
|
+
var _ContentContainer = _interopRequireDefault(require("./ContentContainer"));
|
|
30
33
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
31
34
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
32
35
|
/** @jsx jsx */
|
|
@@ -88,9 +91,16 @@ var HoverCardContent = function HoverCardContent(_ref) {
|
|
|
88
91
|
}, [cardState.details]);
|
|
89
92
|
var linkState = (0, _store.useSmartCardState)(url);
|
|
90
93
|
var linkStatus = (_linkState$status = linkState.status) !== null && _linkState$status !== void 0 ? _linkState$status : 'pending';
|
|
94
|
+
var _useSmartLinkContext = (0, _linkProvider.useSmartLinkContext)(),
|
|
95
|
+
isAdminHubAIEnabled = _useSmartLinkContext.isAdminHubAIEnabled;
|
|
96
|
+
var isAISummaryEnabled = (0, _utils2.getIsAISummaryEnabled)(isAdminHubAIEnabled, cardState.details);
|
|
91
97
|
var services = (0, _helpers.getServices)(linkState.details);
|
|
92
98
|
var statusRef = (0, _react2.useRef)(linkStatus);
|
|
93
99
|
var analyticsRef = (0, _react2.useRef)(analytics);
|
|
100
|
+
var _useState = (0, _react2.useState)(false),
|
|
101
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
102
|
+
showPrism = _useState2[0],
|
|
103
|
+
setShowPrism = _useState2[1];
|
|
94
104
|
(0, _react2.useEffect)(function () {
|
|
95
105
|
/**
|
|
96
106
|
* Must access current analytics object value via ref because its not stable
|
|
@@ -163,6 +173,9 @@ var HoverCardContent = function HoverCardContent(_ref) {
|
|
|
163
173
|
var onClickStopPropagation = (0, _react2.useCallback)(function (e) {
|
|
164
174
|
return e.stopPropagation();
|
|
165
175
|
}, []);
|
|
176
|
+
var onAIActionChange = (0, _react2.useCallback)(function (state) {
|
|
177
|
+
setShowPrism(state === 'loading');
|
|
178
|
+
}, []);
|
|
166
179
|
var getCardView = function getCardView(cardState) {
|
|
167
180
|
if (cardState.metadataStatus === 'pending') {
|
|
168
181
|
return (0, _react.jsx)(_resolving.default, {
|
|
@@ -193,19 +206,21 @@ var HoverCardContent = function HoverCardContent(_ref) {
|
|
|
193
206
|
cardActions: cardActions,
|
|
194
207
|
cardState: cardState,
|
|
195
208
|
flexibleCardProps: flexibleCardProps,
|
|
209
|
+
isAISummaryEnabled: isAISummaryEnabled,
|
|
196
210
|
onActionClick: onActionClick,
|
|
211
|
+
onAIActionChange: onAIActionChange,
|
|
197
212
|
titleBlockProps: titleBlockProps
|
|
198
213
|
});
|
|
199
214
|
}
|
|
200
215
|
return null;
|
|
201
216
|
};
|
|
202
217
|
var cardView = getCardView(cardState);
|
|
203
|
-
return cardView ? (0, _react.jsx)(
|
|
218
|
+
return cardView ? (0, _react.jsx)(_ContentContainer.default, {
|
|
204
219
|
onMouseEnter: onMouseEnter,
|
|
205
220
|
onMouseLeave: onMouseLeave,
|
|
206
221
|
onClick: onClickStopPropagation,
|
|
207
|
-
|
|
208
|
-
|
|
222
|
+
isAIEnabled: isAISummaryEnabled,
|
|
223
|
+
showPrism: showPrism
|
|
209
224
|
}, cardView) : null;
|
|
210
225
|
};
|
|
211
226
|
var _default = exports.default = HoverCardContent;
|
|
@@ -20,7 +20,6 @@ var _messages = require("../../../../../messages");
|
|
|
20
20
|
var _reactIntlNext = require("react-intl-next");
|
|
21
21
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
22
22
|
var _helpers = require("../../../../../state/helpers");
|
|
23
|
-
var _state = require("../../../../../state");
|
|
24
23
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
25
24
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
26
25
|
var toFooterActions = exports.toFooterActions = function toFooterActions(cardActions, onActionClick) {
|
|
@@ -58,14 +57,16 @@ var toFooterActions = exports.toFooterActions = function toFooterActions(cardAct
|
|
|
58
57
|
return [followAction].concat((0, _toConsumableArray2.default)(actions));
|
|
59
58
|
};
|
|
60
59
|
var HoverCardResolvedView = function HoverCardResolvedView(_ref) {
|
|
61
|
-
var _cardState$details
|
|
60
|
+
var _cardState$details;
|
|
62
61
|
var flexibleCardProps = _ref.flexibleCardProps,
|
|
63
62
|
titleBlockProps = _ref.titleBlockProps,
|
|
64
63
|
analytics = _ref.analytics,
|
|
65
64
|
cardState = _ref.cardState,
|
|
66
65
|
_ref$cardActions = _ref.cardActions,
|
|
67
66
|
cardActions = _ref$cardActions === void 0 ? [] : _ref$cardActions,
|
|
67
|
+
isAISummaryEnabled = _ref.isAISummaryEnabled,
|
|
68
68
|
onActionClick = _ref.onActionClick,
|
|
69
|
+
onAIActionChange = _ref.onAIActionChange,
|
|
69
70
|
extensionKey = _ref.extensionKey,
|
|
70
71
|
url = _ref.url;
|
|
71
72
|
var canBeDatasource = (0, _helpers.getCanBeDatasource)(cardState.details);
|
|
@@ -103,9 +104,6 @@ var HoverCardResolvedView = function HoverCardResolvedView(_ref) {
|
|
|
103
104
|
data: data,
|
|
104
105
|
fallbackElementHeight: snippetHeight.current
|
|
105
106
|
});
|
|
106
|
-
var _useSmartLinkContext = (0, _state.useSmartLinkContext)(),
|
|
107
|
-
isAdminHubAIEnabled = _useSmartLinkContext.isAdminHubAIEnabled;
|
|
108
|
-
var showAiView = (0, _platformFeatureFlags.getBooleanFF)('platform.linking-platform.smart-card.hover-card-ai-summaries') && isAdminHubAIEnabled && ((_cardState$details2 = cardState.details) === null || _cardState$details2 === void 0 || (_cardState$details2 = _cardState$details2.meta) === null || _cardState$details2 === void 0 || (_cardState$details2 = _cardState$details2.supportedFeatures) === null || _cardState$details2 === void 0 ? void 0 : _cardState$details2.includes('AISummary'));
|
|
109
107
|
return /*#__PURE__*/_react.default.createElement(_FlexibleCard.default, flexibleCardProps, imagePreview, /*#__PURE__*/_react.default.createElement(_blocks.TitleBlock, (0, _extends2.default)({}, titleBlockProps, {
|
|
110
108
|
metadataPosition: _constants.SmartLinkPosition.Top
|
|
111
109
|
})), /*#__PURE__*/_react.default.createElement(_blocks.MetadataBlock, {
|
|
@@ -127,11 +125,12 @@ var HoverCardResolvedView = function HoverCardResolvedView(_ref) {
|
|
|
127
125
|
}), (0, _platformFeatureFlags.getBooleanFF)('platform.linking-platform.smart-card.enable-hover-card-related-urls') && /*#__PURE__*/_react.default.createElement(_blocks.RelatedUrlsBlock, {
|
|
128
126
|
url: url,
|
|
129
127
|
size: _constants.SmartLinkSize.Small
|
|
130
|
-
}),
|
|
128
|
+
}), isAISummaryEnabled ? /*#__PURE__*/_react.default.createElement(_blocks.AISummaryBlock, {
|
|
131
129
|
metadata: [{
|
|
132
130
|
name: _constants.ElementName.Provider
|
|
133
131
|
}],
|
|
134
|
-
actions: footerActions
|
|
132
|
+
actions: footerActions,
|
|
133
|
+
onAIActionChange: onAIActionChange
|
|
135
134
|
}) : /*#__PURE__*/_react.default.createElement(_blocks.FooterBlock, {
|
|
136
135
|
actions: footerActions,
|
|
137
136
|
size: _constants.SmartLinkSize.Large,
|
|
@@ -4,12 +4,13 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.titleBlockCss = exports.separatorCss = exports.popupContainerStyles = exports.getTransitionStyles = exports.getPreviewBlockStyles = exports.flexibleUiOptions = exports.HoverCardContainer = exports.HOVER_CARD_Z_INDEX = exports.CARD_WIDTH_REM = exports.CARD_GAP_PX = void 0;
|
|
7
|
+
exports.titleBlockCss = exports.separatorCss = exports.popupContainerStyles = exports.getTransitionStyles = exports.getPreviewBlockStyles = exports.flexibleUiOptions = exports.NEW_CARD_WIDTH_REM = exports.HoverCardContainer = exports.HOVER_CARD_Z_INDEX = exports.CARD_WIDTH_REM = exports.CARD_GAP_PX = void 0;
|
|
8
8
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
9
9
|
var _react = require("@emotion/react");
|
|
10
10
|
var _index = require("../../index");
|
|
11
11
|
var _constants = require("../../constants");
|
|
12
12
|
var _constants2 = require("@atlaskit/theme/constants");
|
|
13
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
13
14
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
|
|
14
15
|
// Temporary fix for Confluence inline comment on editor mod has z-index of 500, Jira issue view has z-index of 510
|
|
15
16
|
var HOVER_CARD_Z_INDEX = exports.HOVER_CARD_Z_INDEX = _constants2.layers.modal();
|
|
@@ -21,12 +22,13 @@ var flexibleUiOptions = exports.flexibleUiOptions = {
|
|
|
21
22
|
zIndex: HOVER_CARD_Z_INDEX + 1
|
|
22
23
|
};
|
|
23
24
|
var CARD_WIDTH_REM = exports.CARD_WIDTH_REM = 24;
|
|
25
|
+
var NEW_CARD_WIDTH_REM = exports.NEW_CARD_WIDTH_REM = 28;
|
|
24
26
|
// gap between mouse cursor and hover card
|
|
25
27
|
var CARD_GAP_PX = exports.CARD_GAP_PX = 10;
|
|
26
28
|
var blockGap = '0.5rem';
|
|
27
29
|
var elementGap = '0.5rem';
|
|
28
30
|
var separatorCss = exports.separatorCss = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n [data-separator] + [data-separator]:before {\n margin-right: ", ";\n }\n"])), elementGap);
|
|
29
|
-
var HoverCardContainer = exports.HoverCardContainer = (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n background: none;\n border-width: 0;\n box-sizing: border-box;\n width: ", "rem;\n\n .", " {\n display: none;\n }\n"])), CARD_WIDTH_REM, _index.loadingPlaceholderClassName);
|
|
31
|
+
var HoverCardContainer = exports.HoverCardContainer = (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n background: none;\n border-width: 0;\n box-sizing: border-box;\n width: ", "rem;\n\n .", " {\n display: none;\n }\n"])), (0, _platformFeatureFlags.getBooleanFF)('platform.linking-platform.smart-card.hover-card-ai-summaries') ? NEW_CARD_WIDTH_REM : CARD_WIDTH_REM, _index.loadingPlaceholderClassName);
|
|
30
32
|
var titleBlockCss = exports.titleBlockCss = (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n gap: ", ";\n\n ", "\n\n // title and subtitle element group\n [data-smart-element-group] {\n // gap between title and subtitle\n gap: 0.06rem;\n display: flex;\n /* subtitle element group */\n > [data-smart-element-group] {\n > span {\n margin-right: ", ";\n }\n }\n }\n\n [data-smart-element='Title'] {\n font-weight: 600;\n }\n"])), blockGap, separatorCss, elementGap);
|
|
31
33
|
var getTransitionStyles = exports.getTransitionStyles = function getTransitionStyles(snippetHeight) {
|
|
32
34
|
return (0, _react.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n transition: height 300ms ease-in-out;\n height: ", "px;\n"])), snippetHeight);
|
|
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.getSimulatedMetadata = exports.getSimulatedBetterMetadata = void 0;
|
|
7
|
+
exports.getSimulatedMetadata = exports.getSimulatedBetterMetadata = exports.getIsAISummaryEnabled = void 0;
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
9
|
var _constants = require("../../constants");
|
|
10
10
|
var _linkExtractors = require("@atlaskit/link-extractors");
|
|
@@ -205,4 +205,10 @@ var getSimulatedBetterMetadata = exports.getSimulatedBetterMetadata = function g
|
|
|
205
205
|
default:
|
|
206
206
|
return defaultMetadata;
|
|
207
207
|
}
|
|
208
|
+
};
|
|
209
|
+
var getIsAISummaryEnabled = exports.getIsAISummaryEnabled = function getIsAISummaryEnabled() {
|
|
210
|
+
var _response$meta;
|
|
211
|
+
var isAdminHubAIEnabled = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
212
|
+
var response = arguments.length > 1 ? arguments[1] : undefined;
|
|
213
|
+
return Boolean((0, _platformFeatureFlags.getBooleanFF)('platform.linking-platform.smart-card.hover-card-ai-summaries') && isAdminHubAIEnabled && (response === null || response === void 0 || (_response$meta = response.meta) === null || _response$meta === void 0 || (_response$meta = _response$meta.supportedFeatures) === null || _response$meta === void 0 ? void 0 : _response$meta.includes('AISummary')));
|
|
208
214
|
};
|
|
@@ -17,7 +17,7 @@ var _excluded = ["href", "children", "checkSafety", "onClick", "testId"],
|
|
|
17
17
|
_excluded2 = ["isLinkSafe", "showSafetyWarningModal"];
|
|
18
18
|
var PACKAGE_DATA = {
|
|
19
19
|
packageName: "@atlaskit/smart-card",
|
|
20
|
-
packageVersion: "26.
|
|
20
|
+
packageVersion: "26.47.1",
|
|
21
21
|
componentName: 'linkUrl'
|
|
22
22
|
};
|
|
23
23
|
var Link = (0, _click.withLinkClickedEvent)('a');
|
|
@@ -13,6 +13,12 @@ var _link = _interopRequireDefault(require("@atlaskit/icon/glyph/link"));
|
|
|
13
13
|
var _utils = require("./utils");
|
|
14
14
|
var _templateObject, _templateObject2;
|
|
15
15
|
/** @jsx jsx */
|
|
16
|
+
/**
|
|
17
|
+
* Class name for selecting non-flexible block card icon image
|
|
18
|
+
*
|
|
19
|
+
* @deprecated {@link https://hello.jira.atlassian.cloud/browse/ENGHEALTH-6878 Internal documentation for deprecation (no external access)}
|
|
20
|
+
* Using this selctor is deprecated as once the flexible block card feature flag is removed, this class will no longer be used.
|
|
21
|
+
*/
|
|
16
22
|
var blockCardIconImageClassName = exports.blockCardIconImageClassName = 'block-card-icon-image';
|
|
17
23
|
var getImageStyles = function getImageStyles(isFlexibleUi) {
|
|
18
24
|
if (isFlexibleUi) {
|
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
2
1
|
export const extractIsTrusted = meta => {
|
|
3
|
-
if (getBooleanFF('platform.linking-platform.smart-card.fix-is-trusted-pop')) {
|
|
4
|
-
if (!(meta !== null && meta !== void 0 && meta.key)) {
|
|
5
|
-
return false;
|
|
6
|
-
}
|
|
7
|
-
return !['iframely-object-provider', 'public-object-provider'].includes(meta.key);
|
|
8
|
-
}
|
|
9
2
|
return Boolean((meta === null || meta === void 0 ? void 0 : meta.key) && meta.key !== 'iframely-object-provider');
|
|
10
3
|
};
|
|
@@ -4,7 +4,7 @@ export const ANALYTICS_CHANNEL = 'media';
|
|
|
4
4
|
export const context = {
|
|
5
5
|
componentName: 'smart-cards',
|
|
6
6
|
packageName: "@atlaskit/smart-card",
|
|
7
|
-
packageVersion: "26.
|
|
7
|
+
packageVersion: "26.47.1"
|
|
8
8
|
};
|
|
9
9
|
export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
10
10
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import Loadable from 'react-loadable';
|
|
3
|
-
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
4
3
|
export const isCardWithData = props => !!props.data;
|
|
5
4
|
export const isSpecialEvent = evt => evt.isDefaultPrevented() && (isIframe() || isSpecialKey(evt) || isSpecialClick(evt));
|
|
6
5
|
export const isIframe = () => window.parent !== parent;
|
|
@@ -104,10 +103,6 @@ export const getIframeSandboxAttribute = isTrusted => {
|
|
|
104
103
|
return undefined;
|
|
105
104
|
}
|
|
106
105
|
const sandboxPermissions = 'allow-downloads allow-forms allow-popups allow-popups-to-escape-sandbox allow-presentation allow-same-origin allow-scripts';
|
|
107
|
-
const allowStorageAccess = 'allow-storage-access-by-user-activation';
|
|
108
|
-
if (getBooleanFF('platform.linking-platform.smart-card.iframes-allow-storage-access-by-user-activation')) {
|
|
109
|
-
return `${sandboxPermissions} ${allowStorageAccess}`;
|
|
110
|
-
}
|
|
111
106
|
return sandboxPermissions;
|
|
112
107
|
};
|
|
113
108
|
export const handleOnClick = handler => e => {
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { jsx } from '@emotion/react';
|
|
3
3
|
import { gs, mq } from '../../common/utils';
|
|
4
|
+
/**
|
|
5
|
+
* Class name for selecting non-flexible block card content
|
|
6
|
+
*
|
|
7
|
+
* @deprecated {@link https://hello.jira.atlassian.cloud/browse/ENGHEALTH-6878 Internal documentation for deprecation (no external access)}
|
|
8
|
+
* Using this selctor is deprecated as once the flexible block card feature flag is removed, this class will no longer be used.
|
|
9
|
+
*/
|
|
4
10
|
export const blockCardContentClassName = 'block-card-content';
|
|
5
11
|
export const Content = ({
|
|
6
12
|
children,
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { jsx } from '@emotion/react';
|
|
3
3
|
import { useMouseDownEvent } from '../../../state/analytics/useLinkClicked';
|
|
4
|
+
/**
|
|
5
|
+
* Class name for selecting non-flexible block card header
|
|
6
|
+
*
|
|
7
|
+
* @deprecated {@link https://hello.jira.atlassian.cloud/browse/ENGHEALTH-6878 Internal documentation for deprecation (no external access)}
|
|
8
|
+
* Using this selctor is deprecated as once the flexible block card feature flag is removed, this class will no longer be used.
|
|
9
|
+
*/
|
|
4
10
|
export const blockCardContentHeaderClassName = 'block-card-content-header';
|
|
5
11
|
export const ContentHeader = ({
|
|
6
12
|
onClick,
|
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
import { jsx } from '@emotion/react';
|
|
3
3
|
import { fontSize } from '@atlaskit/theme/constants';
|
|
4
4
|
import { gs } from '../../common/utils';
|
|
5
|
+
/**
|
|
6
|
+
* Class name for selecting non-flexible block card header name
|
|
7
|
+
*
|
|
8
|
+
* @deprecated {@link https://hello.jira.atlassian.cloud/browse/ENGHEALTH-6878 Internal documentation for deprecation (no external access)}
|
|
9
|
+
* Using this selctor is deprecated as once the flexible block card feature flag is removed, this class will no longer be used.
|
|
10
|
+
*/
|
|
5
11
|
export const blockCardContentHeaderNameClassName = 'block-card-content-header-name';
|
|
6
12
|
export const Name = ({
|
|
7
13
|
name,
|
|
@@ -18,6 +18,12 @@ import { RetryAction } from '../actions/RetryAction';
|
|
|
18
18
|
const textDescriptionProps = {
|
|
19
19
|
...messages.could_not_load_link
|
|
20
20
|
};
|
|
21
|
+
/**
|
|
22
|
+
* Class name for selecting non-flexible errored block card
|
|
23
|
+
*
|
|
24
|
+
* @deprecated {@link https://hello.jira.atlassian.cloud/browse/ENGHEALTH-6878 Internal documentation for deprecation (no external access)}
|
|
25
|
+
* Using this selctor is deprecated as once the flexible block card feature flag is removed, this class will no longer be used.
|
|
26
|
+
*/
|
|
21
27
|
export const blockCardErroredViewClassName = 'block-card-errored-view';
|
|
22
28
|
export const ErroredView = ({
|
|
23
29
|
isSelected = false,
|