@atlaskit/smart-card 26.72.0 → 26.73.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/constants.js +1 -0
- package/dist/cjs/extractors/flexible/actions/extract-view-related-links-action.js +20 -0
- package/dist/cjs/extractors/flexible/actions/index.js +6 -2
- package/dist/cjs/messages.js +5 -0
- package/dist/cjs/state/flexible-ui-context/types.js +3 -1
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/utils/index.js +14 -0
- package/dist/cjs/view/FlexibleCard/components/actions/index.js +8 -1
- package/dist/cjs/view/FlexibleCard/components/actions/view-related-links-action/index.js +28 -0
- package/dist/cjs/view/FlexibleCard/components/actions/view-related-links-action/related-links-action-icon/index.js +27 -0
- package/dist/cjs/view/FlexibleCard/components/actions/view-related-links-action/types.js +5 -0
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/es2019/constants.js +1 -0
- package/dist/es2019/extractors/flexible/actions/extract-view-related-links-action.js +14 -0
- package/dist/es2019/extractors/flexible/actions/index.js +6 -1
- package/dist/es2019/messages.js +5 -0
- package/dist/es2019/state/flexible-ui-context/types.js +1 -8
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/utils/index.js +14 -0
- package/dist/es2019/view/FlexibleCard/components/actions/index.js +2 -1
- package/dist/es2019/view/FlexibleCard/components/actions/view-related-links-action/index.js +20 -0
- package/dist/es2019/view/FlexibleCard/components/actions/view-related-links-action/related-links-action-icon/index.js +17 -0
- package/dist/es2019/view/FlexibleCard/components/actions/view-related-links-action/types.js +1 -0
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/esm/constants.js +1 -0
- package/dist/esm/extractors/flexible/actions/extract-view-related-links-action.js +14 -0
- package/dist/esm/extractors/flexible/actions/index.js +6 -2
- package/dist/esm/messages.js +5 -0
- package/dist/esm/state/flexible-ui-context/types.js +1 -8
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/utils/index.js +14 -0
- package/dist/esm/view/FlexibleCard/components/actions/index.js +2 -1
- package/dist/esm/view/FlexibleCard/components/actions/view-related-links-action/index.js +20 -0
- package/dist/esm/view/FlexibleCard/components/actions/view-related-links-action/related-links-action-icon/index.js +19 -0
- package/dist/esm/view/FlexibleCard/components/actions/view-related-links-action/types.js +1 -0
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/types/constants.d.ts +2 -1
- package/dist/types/extractors/flexible/actions/extract-view-related-links-action.d.ts +3 -0
- package/dist/types/messages.d.ts +1 -1
- package/dist/types/state/flexible-ui-context/types.d.ts +9 -5
- package/dist/types/utils/index.d.ts +2 -2
- package/dist/types/view/Card/types.d.ts +7 -7
- package/dist/types/view/FlexibleCard/components/actions/index.d.ts +1 -0
- package/dist/types/view/FlexibleCard/components/actions/view-related-links-action/index.d.ts +5 -0
- package/dist/types/view/FlexibleCard/components/actions/view-related-links-action/related-links-action-icon/index.d.ts +7 -0
- package/dist/types/view/FlexibleCard/components/actions/view-related-links-action/types.d.ts +2 -0
- package/dist/types-ts4.5/constants.d.ts +2 -1
- package/dist/types-ts4.5/extractors/flexible/actions/extract-view-related-links-action.d.ts +3 -0
- package/dist/types-ts4.5/messages.d.ts +1 -1
- package/dist/types-ts4.5/state/flexible-ui-context/types.d.ts +9 -5
- package/dist/types-ts4.5/utils/index.d.ts +2 -2
- package/dist/types-ts4.5/view/Card/types.d.ts +7 -7
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/index.d.ts +1 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/view-related-links-action/index.d.ts +5 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/view-related-links-action/related-links-action-icon/index.d.ts +7 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/view-related-links-action/types.d.ts +2 -0
- package/package.json +7 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/smart-card
|
|
2
2
|
|
|
3
|
+
## 26.73.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#102031](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/102031)
|
|
8
|
+
[`2707b0f7ae9b`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/2707b0f7ae9b) -
|
|
9
|
+
[ux] Add view related links action
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#102663](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/102663)
|
|
14
|
+
[`36e468e4deb2`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/36e468e4deb2) -
|
|
15
|
+
Handling adding theme query params to urls with hash
|
|
16
|
+
|
|
3
17
|
## 26.72.0
|
|
4
18
|
|
|
5
19
|
### Minor Changes
|
package/dist/cjs/constants.js
CHANGED
|
@@ -156,6 +156,7 @@ var ActionName = exports.ActionName = /*#__PURE__*/function (ActionName) {
|
|
|
156
156
|
}({});
|
|
157
157
|
var InternalActionName = exports.InternalActionName = /*#__PURE__*/function (InternalActionName) {
|
|
158
158
|
InternalActionName["AISummaryAction"] = "AISummaryAction";
|
|
159
|
+
InternalActionName["ViewRelatedLinksAction"] = "ViewRelatedLinksAction";
|
|
159
160
|
return InternalActionName;
|
|
160
161
|
}({});
|
|
161
162
|
/**
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.extractViewRelatedLinksAction = void 0;
|
|
7
|
+
var _linkExtractors = require("@atlaskit/link-extractors");
|
|
8
|
+
var extractViewRelatedLinksAction = exports.extractViewRelatedLinksAction = function extractViewRelatedLinksAction(response) {
|
|
9
|
+
var _response$meta;
|
|
10
|
+
if (!(response !== null && response !== void 0 && (_response$meta = response.meta) !== null && _response$meta !== void 0 && (_response$meta = _response$meta.supportedFeature) !== null && _response$meta !== void 0 && _response$meta.includes('RelatedLinks'))) {
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
var url = (0, _linkExtractors.extractLink)(response.data);
|
|
14
|
+
if (!url) {
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
return {
|
|
18
|
+
url: url
|
|
19
|
+
};
|
|
20
|
+
};
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
9
10
|
var _constants = require("../../../constants");
|
|
10
11
|
var _extractDownloadAction = require("./extract-download-action");
|
|
11
12
|
var _extractPreviewAction = require("./extract-preview-action");
|
|
@@ -13,10 +14,13 @@ var _extractAiSummaryAction = require("./extract-ai-summary-action");
|
|
|
13
14
|
var _extractFollowAction = _interopRequireDefault(require("./extract-follow-action"));
|
|
14
15
|
var _extractCopyLinkAction = require("./extract-copy-link-action");
|
|
15
16
|
var _extractAutomationAction = require("./extract-automation-action");
|
|
17
|
+
var _extractViewRelatedLinksAction = require("./extract-view-related-links-action");
|
|
18
|
+
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; }
|
|
19
|
+
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; }
|
|
16
20
|
var extractActions = function extractActions(response, url, actionOptions, id, aiSummaryConfig) {
|
|
17
|
-
var
|
|
21
|
+
var _objectSpread2;
|
|
18
22
|
var data = response.data;
|
|
19
|
-
var action = (
|
|
23
|
+
var action = _objectSpread((_objectSpread2 = {}, (0, _defineProperty2.default)(_objectSpread2, _constants.ActionName.CopyLinkAction, (0, _extractCopyLinkAction.extractCopyLinkAction)(data, actionOptions)), (0, _defineProperty2.default)(_objectSpread2, _constants.ActionName.DownloadAction, (0, _extractDownloadAction.extractDownloadAction)(data, actionOptions)), (0, _defineProperty2.default)(_objectSpread2, _constants.ActionName.FollowAction, (0, _extractFollowAction.default)(response, actionOptions, id)), (0, _defineProperty2.default)(_objectSpread2, _constants.ActionName.PreviewAction, (0, _extractPreviewAction.extractPreviewAction)(response, actionOptions)), (0, _defineProperty2.default)(_objectSpread2, _constants.ActionName.AutomationAction, (0, _extractAutomationAction.extractAutomationAction)(response)), (0, _defineProperty2.default)(_objectSpread2, _constants.InternalActionName.AISummaryAction, (0, _extractAiSummaryAction.extractAISummaryAction)(response, url, actionOptions, aiSummaryConfig)), _objectSpread2), (0, _platformFeatureFlags.getBooleanFF)('platform.linking-platform.smart-card.enable-view-related-urls-action') ? (0, _defineProperty2.default)({}, _constants.InternalActionName.ViewRelatedLinksAction, (0, _extractViewRelatedLinksAction.extractViewRelatedLinksAction)(response)) : {});
|
|
20
24
|
return Object.values(action).some(function (value) {
|
|
21
25
|
return Boolean(value);
|
|
22
26
|
}) ? action : undefined;
|
package/dist/cjs/messages.js
CHANGED
|
@@ -710,5 +710,10 @@ var messages = exports.messages = (0, _reactIntlNext.defineMessages)({
|
|
|
710
710
|
id: 'fabric.linking.related_links_modal_title.nonfinal',
|
|
711
711
|
defaultMessage: 'Recent Links',
|
|
712
712
|
description: 'Shown as the title for the related links modal'
|
|
713
|
+
},
|
|
714
|
+
related_links_view_related_urls: {
|
|
715
|
+
id: 'fabric.linking.related_links_view_related_urls.nonfinal',
|
|
716
|
+
defaultMessage: 'View recent links...',
|
|
717
|
+
description: 'Action to view related links to the given resource'
|
|
713
718
|
}
|
|
714
719
|
});
|
|
@@ -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.73.0"
|
|
26
26
|
};
|
|
27
27
|
var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
28
28
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
package/dist/cjs/utils/index.js
CHANGED
|
@@ -474,6 +474,20 @@ var combineFrameStyle = exports.combineFrameStyle = function combineFrameStyle(f
|
|
|
474
474
|
* @param themeState
|
|
475
475
|
*/
|
|
476
476
|
var getPreviewUrlWithTheme = exports.getPreviewUrlWithTheme = function getPreviewUrlWithTheme(previewUrl, themeState) {
|
|
477
|
+
if ((0, _platformFeatureFlags.getBooleanFF)('platform.linking-platform.smart-card.fix-embed-preview-url-query-params')) {
|
|
478
|
+
try {
|
|
479
|
+
var url = new URL(previewUrl);
|
|
480
|
+
if ((0, _platformFeatureFlags.getBooleanFF)('platform.linking-platform.smart-card.enable-theme-state-url')) {
|
|
481
|
+
url.searchParams.append('themeState', (0, _tokens.themeObjectToString)(themeState));
|
|
482
|
+
} else {
|
|
483
|
+
var _themeState$colorMode;
|
|
484
|
+
url.searchParams.append('themeMode', (_themeState$colorMode = themeState.colorMode) !== null && _themeState$colorMode !== void 0 ? _themeState$colorMode : '');
|
|
485
|
+
}
|
|
486
|
+
return url.href;
|
|
487
|
+
} catch (_unused) {
|
|
488
|
+
return previewUrl;
|
|
489
|
+
}
|
|
490
|
+
}
|
|
477
491
|
if ((0, _platformFeatureFlags.getBooleanFF)('platform.linking-platform.smart-card.enable-theme-state-url')) {
|
|
478
492
|
var themeStateQueryString = encodeURIComponent((0, _tokens.themeObjectToString)(themeState));
|
|
479
493
|
return "".concat(previewUrl).concat(previewUrl.includes('?') ? '&' : '?', "themeState=").concat(themeStateQueryString);
|
|
@@ -58,6 +58,12 @@ Object.defineProperty(exports, "PreviewAction", {
|
|
|
58
58
|
return _previewAction.default;
|
|
59
59
|
}
|
|
60
60
|
});
|
|
61
|
+
Object.defineProperty(exports, "ViewRelatedLinksAction", {
|
|
62
|
+
enumerable: true,
|
|
63
|
+
get: function get() {
|
|
64
|
+
return _viewRelatedLinksAction.default;
|
|
65
|
+
}
|
|
66
|
+
});
|
|
61
67
|
var _action = _interopRequireDefault(require("./action"));
|
|
62
68
|
var _deleteAction = _interopRequireDefault(require("./delete-action"));
|
|
63
69
|
var _editAction = _interopRequireDefault(require("./edit-action"));
|
|
@@ -66,4 +72,5 @@ var _followAction = _interopRequireDefault(require("./follow-action"));
|
|
|
66
72
|
var _previewAction = _interopRequireDefault(require("./preview-action"));
|
|
67
73
|
var _copyLinkAction = _interopRequireDefault(require("./copy-link-action"));
|
|
68
74
|
var _aiSummaryAction = _interopRequireDefault(require("./ai-summary-action"));
|
|
69
|
-
var _automationAction = _interopRequireDefault(require("./automation-action"));
|
|
75
|
+
var _automationAction = _interopRequireDefault(require("./automation-action"));
|
|
76
|
+
var _viewRelatedLinksAction = _interopRequireDefault(require("./view-related-links-action"));
|
|
@@ -0,0 +1,28 @@
|
|
|
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 _react = require("@emotion/react");
|
|
10
|
+
var _action = _interopRequireDefault(require("../action"));
|
|
11
|
+
var _reactIntlNext = require("react-intl-next");
|
|
12
|
+
var _messages = require("../../../../../messages");
|
|
13
|
+
var _flexibleUiContext = require("../../../../../state/flexible-ui-context");
|
|
14
|
+
var _relatedLinksActionIcon = _interopRequireDefault(require("./related-links-action-icon"));
|
|
15
|
+
/** @jsx jsx */
|
|
16
|
+
|
|
17
|
+
var ViewRelatedLinksAction = function ViewRelatedLinksAction(props) {
|
|
18
|
+
var _context$actions;
|
|
19
|
+
var context = (0, _flexibleUiContext.useFlexibleUiContext)();
|
|
20
|
+
var actionData = context === null || context === void 0 || (_context$actions = context.actions) === null || _context$actions === void 0 ? void 0 : _context$actions.ViewRelatedLinksAction;
|
|
21
|
+
return actionData ? (0, _react.jsx)(_action.default, (0, _extends2.default)({
|
|
22
|
+
content: (0, _react.jsx)(_reactIntlNext.FormattedMessage, _messages.messages.related_links_view_related_urls),
|
|
23
|
+
icon: (0, _react.jsx)(_relatedLinksActionIcon.default, null),
|
|
24
|
+
testId: "smart-action-view-related-links-action",
|
|
25
|
+
ariaLabel: "View most recent pages or content types coming from or found on this link"
|
|
26
|
+
}, props)) : null;
|
|
27
|
+
};
|
|
28
|
+
var _default = exports.default = ViewRelatedLinksAction;
|
|
@@ -0,0 +1,27 @@
|
|
|
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 _react = require("@emotion/react");
|
|
9
|
+
var _childIssues = _interopRequireDefault(require("@atlaskit/icon/glyph/child-issues"));
|
|
10
|
+
/** @jsx jsx */
|
|
11
|
+
|
|
12
|
+
var rotateSvg = (0, _react.css)({
|
|
13
|
+
transform: 'rotate(180deg)',
|
|
14
|
+
display: 'inline-block'
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* ChildIssuesIcon but 180 degrees rotated
|
|
19
|
+
*/
|
|
20
|
+
var RelatedLinksActionIcon = function RelatedLinksActionIcon() {
|
|
21
|
+
return (0, _react.jsx)("span", {
|
|
22
|
+
css: rotateSvg
|
|
23
|
+
}, (0, _react.jsx)(_childIssues.default, {
|
|
24
|
+
label: "View recent links..."
|
|
25
|
+
}));
|
|
26
|
+
};
|
|
27
|
+
var _default = exports.default = RelatedLinksActionIcon;
|
|
@@ -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.73.0",
|
|
21
21
|
componentName: 'linkUrl'
|
|
22
22
|
};
|
|
23
23
|
var Link = (0, _click.withLinkClickedEvent)('a');
|
package/dist/es2019/constants.js
CHANGED
|
@@ -158,6 +158,7 @@ export let ActionName = /*#__PURE__*/function (ActionName) {
|
|
|
158
158
|
}({});
|
|
159
159
|
export let InternalActionName = /*#__PURE__*/function (InternalActionName) {
|
|
160
160
|
InternalActionName["AISummaryAction"] = "AISummaryAction";
|
|
161
|
+
InternalActionName["ViewRelatedLinksAction"] = "ViewRelatedLinksAction";
|
|
161
162
|
return InternalActionName;
|
|
162
163
|
}({});
|
|
163
164
|
/**
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { extractLink } from '@atlaskit/link-extractors';
|
|
2
|
+
export const extractViewRelatedLinksAction = response => {
|
|
3
|
+
var _response$meta, _response$meta$suppor;
|
|
4
|
+
if (!(response !== null && response !== void 0 && (_response$meta = response.meta) !== null && _response$meta !== void 0 && (_response$meta$suppor = _response$meta.supportedFeature) !== null && _response$meta$suppor !== void 0 && _response$meta$suppor.includes('RelatedLinks'))) {
|
|
5
|
+
return;
|
|
6
|
+
}
|
|
7
|
+
const url = extractLink(response.data);
|
|
8
|
+
if (!url) {
|
|
9
|
+
return;
|
|
10
|
+
}
|
|
11
|
+
return {
|
|
12
|
+
url
|
|
13
|
+
};
|
|
14
|
+
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
1
2
|
import { ActionName, InternalActionName } from '../../../constants';
|
|
2
3
|
import { extractDownloadAction } from './extract-download-action';
|
|
3
4
|
import { extractPreviewAction } from './extract-preview-action';
|
|
@@ -5,6 +6,7 @@ import { extractAISummaryAction } from './extract-ai-summary-action';
|
|
|
5
6
|
import extractFollowAction from './extract-follow-action';
|
|
6
7
|
import { extractCopyLinkAction } from './extract-copy-link-action';
|
|
7
8
|
import { extractAutomationAction } from './extract-automation-action';
|
|
9
|
+
import { extractViewRelatedLinksAction } from './extract-view-related-links-action';
|
|
8
10
|
const extractActions = (response, url, actionOptions, id, aiSummaryConfig) => {
|
|
9
11
|
const data = response.data;
|
|
10
12
|
const action = {
|
|
@@ -13,7 +15,10 @@ const extractActions = (response, url, actionOptions, id, aiSummaryConfig) => {
|
|
|
13
15
|
[ActionName.FollowAction]: extractFollowAction(response, actionOptions, id),
|
|
14
16
|
[ActionName.PreviewAction]: extractPreviewAction(response, actionOptions),
|
|
15
17
|
[ActionName.AutomationAction]: extractAutomationAction(response),
|
|
16
|
-
[InternalActionName.AISummaryAction]: extractAISummaryAction(response, url, actionOptions, aiSummaryConfig)
|
|
18
|
+
[InternalActionName.AISummaryAction]: extractAISummaryAction(response, url, actionOptions, aiSummaryConfig),
|
|
19
|
+
...(getBooleanFF('platform.linking-platform.smart-card.enable-view-related-urls-action') ? {
|
|
20
|
+
[InternalActionName.ViewRelatedLinksAction]: extractViewRelatedLinksAction(response)
|
|
21
|
+
} : {})
|
|
17
22
|
};
|
|
18
23
|
return Object.values(action).some(value => Boolean(value)) ? action : undefined;
|
|
19
24
|
};
|
package/dist/es2019/messages.js
CHANGED
|
@@ -704,5 +704,10 @@ export const messages = defineMessages({
|
|
|
704
704
|
id: 'fabric.linking.related_links_modal_title.nonfinal',
|
|
705
705
|
defaultMessage: 'Recent Links',
|
|
706
706
|
description: 'Shown as the title for the related links modal'
|
|
707
|
+
},
|
|
708
|
+
related_links_view_related_urls: {
|
|
709
|
+
id: 'fabric.linking.related_links_view_related_urls.nonfinal',
|
|
710
|
+
defaultMessage: 'View recent links...',
|
|
711
|
+
description: 'Action to view related links to the given resource'
|
|
707
712
|
}
|
|
708
713
|
});
|
|
@@ -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.73.0"
|
|
8
8
|
};
|
|
9
9
|
export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
10
10
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -177,6 +177,20 @@ export const combineFrameStyle = (frameStyle, isFrameVisible) => {
|
|
|
177
177
|
* @param themeState
|
|
178
178
|
*/
|
|
179
179
|
export const getPreviewUrlWithTheme = (previewUrl, themeState) => {
|
|
180
|
+
if (getBooleanFF('platform.linking-platform.smart-card.fix-embed-preview-url-query-params')) {
|
|
181
|
+
try {
|
|
182
|
+
const url = new URL(previewUrl);
|
|
183
|
+
if (getBooleanFF('platform.linking-platform.smart-card.enable-theme-state-url')) {
|
|
184
|
+
url.searchParams.append('themeState', themeObjectToString(themeState));
|
|
185
|
+
} else {
|
|
186
|
+
var _themeState$colorMode;
|
|
187
|
+
url.searchParams.append('themeMode', (_themeState$colorMode = themeState.colorMode) !== null && _themeState$colorMode !== void 0 ? _themeState$colorMode : '');
|
|
188
|
+
}
|
|
189
|
+
return url.href;
|
|
190
|
+
} catch {
|
|
191
|
+
return previewUrl;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
180
194
|
if (getBooleanFF('platform.linking-platform.smart-card.enable-theme-state-url')) {
|
|
181
195
|
const themeStateQueryString = encodeURIComponent(themeObjectToString(themeState));
|
|
182
196
|
return `${previewUrl}${previewUrl.includes('?') ? '&' : '?'}themeState=${themeStateQueryString}`;
|
|
@@ -6,4 +6,5 @@ export { default as FollowAction } from './follow-action';
|
|
|
6
6
|
export { default as PreviewAction } from './preview-action';
|
|
7
7
|
export { default as CopyLinkAction } from './copy-link-action';
|
|
8
8
|
export { default as AISummaryAction } from './ai-summary-action';
|
|
9
|
-
export { default as AutomationAction } from './automation-action';
|
|
9
|
+
export { default as AutomationAction } from './automation-action';
|
|
10
|
+
export { default as ViewRelatedLinksAction } from './view-related-links-action';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
/** @jsx jsx */
|
|
3
|
+
import { jsx } from '@emotion/react';
|
|
4
|
+
import Action from '../action';
|
|
5
|
+
import { FormattedMessage } from 'react-intl-next';
|
|
6
|
+
import { messages } from '../../../../../messages';
|
|
7
|
+
import { useFlexibleUiContext } from '../../../../../state/flexible-ui-context';
|
|
8
|
+
import RelatedLinksActionIcon from './related-links-action-icon';
|
|
9
|
+
const ViewRelatedLinksAction = props => {
|
|
10
|
+
var _context$actions;
|
|
11
|
+
const context = useFlexibleUiContext();
|
|
12
|
+
const actionData = context === null || context === void 0 ? void 0 : (_context$actions = context.actions) === null || _context$actions === void 0 ? void 0 : _context$actions.ViewRelatedLinksAction;
|
|
13
|
+
return actionData ? jsx(Action, _extends({
|
|
14
|
+
content: jsx(FormattedMessage, messages.related_links_view_related_urls),
|
|
15
|
+
icon: jsx(RelatedLinksActionIcon, null),
|
|
16
|
+
testId: "smart-action-view-related-links-action",
|
|
17
|
+
ariaLabel: "View most recent pages or content types coming from or found on this link"
|
|
18
|
+
}, props)) : null;
|
|
19
|
+
};
|
|
20
|
+
export default ViewRelatedLinksAction;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { css, jsx } from '@emotion/react';
|
|
3
|
+
import ChildIssuesIcon from '@atlaskit/icon/glyph/child-issues';
|
|
4
|
+
const rotateSvg = css({
|
|
5
|
+
transform: 'rotate(180deg)',
|
|
6
|
+
display: 'inline-block'
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* ChildIssuesIcon but 180 degrees rotated
|
|
11
|
+
*/
|
|
12
|
+
const RelatedLinksActionIcon = () => jsx("span", {
|
|
13
|
+
css: rotateSvg
|
|
14
|
+
}, jsx(ChildIssuesIcon, {
|
|
15
|
+
label: "View recent links..."
|
|
16
|
+
}));
|
|
17
|
+
export default RelatedLinksActionIcon;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -7,7 +7,7 @@ import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-m
|
|
|
7
7
|
import LinkWarningModal from './LinkWarningModal';
|
|
8
8
|
const PACKAGE_DATA = {
|
|
9
9
|
packageName: "@atlaskit/smart-card",
|
|
10
|
-
packageVersion: "26.
|
|
10
|
+
packageVersion: "26.73.0",
|
|
11
11
|
componentName: 'linkUrl'
|
|
12
12
|
};
|
|
13
13
|
const Link = withLinkClickedEvent('a');
|
package/dist/esm/constants.js
CHANGED
|
@@ -158,6 +158,7 @@ export var ActionName = /*#__PURE__*/function (ActionName) {
|
|
|
158
158
|
}({});
|
|
159
159
|
export var InternalActionName = /*#__PURE__*/function (InternalActionName) {
|
|
160
160
|
InternalActionName["AISummaryAction"] = "AISummaryAction";
|
|
161
|
+
InternalActionName["ViewRelatedLinksAction"] = "ViewRelatedLinksAction";
|
|
161
162
|
return InternalActionName;
|
|
162
163
|
}({});
|
|
163
164
|
/**
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { extractLink } from '@atlaskit/link-extractors';
|
|
2
|
+
export var extractViewRelatedLinksAction = function extractViewRelatedLinksAction(response) {
|
|
3
|
+
var _response$meta;
|
|
4
|
+
if (!(response !== null && response !== void 0 && (_response$meta = response.meta) !== null && _response$meta !== void 0 && (_response$meta = _response$meta.supportedFeature) !== null && _response$meta !== void 0 && _response$meta.includes('RelatedLinks'))) {
|
|
5
|
+
return;
|
|
6
|
+
}
|
|
7
|
+
var url = extractLink(response.data);
|
|
8
|
+
if (!url) {
|
|
9
|
+
return;
|
|
10
|
+
}
|
|
11
|
+
return {
|
|
12
|
+
url: url
|
|
13
|
+
};
|
|
14
|
+
};
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
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; }
|
|
3
|
+
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; }
|
|
4
|
+
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
2
5
|
import { ActionName, InternalActionName } from '../../../constants';
|
|
3
6
|
import { extractDownloadAction } from './extract-download-action';
|
|
4
7
|
import { extractPreviewAction } from './extract-preview-action';
|
|
@@ -6,10 +9,11 @@ import { extractAISummaryAction } from './extract-ai-summary-action';
|
|
|
6
9
|
import extractFollowAction from './extract-follow-action';
|
|
7
10
|
import { extractCopyLinkAction } from './extract-copy-link-action';
|
|
8
11
|
import { extractAutomationAction } from './extract-automation-action';
|
|
12
|
+
import { extractViewRelatedLinksAction } from './extract-view-related-links-action';
|
|
9
13
|
var extractActions = function extractActions(response, url, actionOptions, id, aiSummaryConfig) {
|
|
10
|
-
var
|
|
14
|
+
var _objectSpread2;
|
|
11
15
|
var data = response.data;
|
|
12
|
-
var action = (
|
|
16
|
+
var action = _objectSpread((_objectSpread2 = {}, _defineProperty(_objectSpread2, ActionName.CopyLinkAction, extractCopyLinkAction(data, actionOptions)), _defineProperty(_objectSpread2, ActionName.DownloadAction, extractDownloadAction(data, actionOptions)), _defineProperty(_objectSpread2, ActionName.FollowAction, extractFollowAction(response, actionOptions, id)), _defineProperty(_objectSpread2, ActionName.PreviewAction, extractPreviewAction(response, actionOptions)), _defineProperty(_objectSpread2, ActionName.AutomationAction, extractAutomationAction(response)), _defineProperty(_objectSpread2, InternalActionName.AISummaryAction, extractAISummaryAction(response, url, actionOptions, aiSummaryConfig)), _objectSpread2), getBooleanFF('platform.linking-platform.smart-card.enable-view-related-urls-action') ? _defineProperty({}, InternalActionName.ViewRelatedLinksAction, extractViewRelatedLinksAction(response)) : {});
|
|
13
17
|
return Object.values(action).some(function (value) {
|
|
14
18
|
return Boolean(value);
|
|
15
19
|
}) ? action : undefined;
|
package/dist/esm/messages.js
CHANGED
|
@@ -704,5 +704,10 @@ export var messages = defineMessages({
|
|
|
704
704
|
id: 'fabric.linking.related_links_modal_title.nonfinal',
|
|
705
705
|
defaultMessage: 'Recent Links',
|
|
706
706
|
description: 'Shown as the title for the related links modal'
|
|
707
|
+
},
|
|
708
|
+
related_links_view_related_urls: {
|
|
709
|
+
id: 'fabric.linking.related_links_view_related_urls.nonfinal',
|
|
710
|
+
defaultMessage: 'View recent links...',
|
|
711
|
+
description: 'Action to view related links to the given resource'
|
|
707
712
|
}
|
|
708
713
|
});
|
|
@@ -15,7 +15,7 @@ export var ANALYTICS_CHANNEL = 'media';
|
|
|
15
15
|
export var context = {
|
|
16
16
|
componentName: 'smart-cards',
|
|
17
17
|
packageName: "@atlaskit/smart-card",
|
|
18
|
-
packageVersion: "26.
|
|
18
|
+
packageVersion: "26.73.0"
|
|
19
19
|
};
|
|
20
20
|
export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
21
21
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
package/dist/esm/utils/index.js
CHANGED
|
@@ -364,6 +364,20 @@ export var combineFrameStyle = function combineFrameStyle(frameStyle, isFrameVis
|
|
|
364
364
|
* @param themeState
|
|
365
365
|
*/
|
|
366
366
|
export var getPreviewUrlWithTheme = function getPreviewUrlWithTheme(previewUrl, themeState) {
|
|
367
|
+
if (getBooleanFF('platform.linking-platform.smart-card.fix-embed-preview-url-query-params')) {
|
|
368
|
+
try {
|
|
369
|
+
var url = new URL(previewUrl);
|
|
370
|
+
if (getBooleanFF('platform.linking-platform.smart-card.enable-theme-state-url')) {
|
|
371
|
+
url.searchParams.append('themeState', themeObjectToString(themeState));
|
|
372
|
+
} else {
|
|
373
|
+
var _themeState$colorMode;
|
|
374
|
+
url.searchParams.append('themeMode', (_themeState$colorMode = themeState.colorMode) !== null && _themeState$colorMode !== void 0 ? _themeState$colorMode : '');
|
|
375
|
+
}
|
|
376
|
+
return url.href;
|
|
377
|
+
} catch (_unused) {
|
|
378
|
+
return previewUrl;
|
|
379
|
+
}
|
|
380
|
+
}
|
|
367
381
|
if (getBooleanFF('platform.linking-platform.smart-card.enable-theme-state-url')) {
|
|
368
382
|
var themeStateQueryString = encodeURIComponent(themeObjectToString(themeState));
|
|
369
383
|
return "".concat(previewUrl).concat(previewUrl.includes('?') ? '&' : '?', "themeState=").concat(themeStateQueryString);
|
|
@@ -6,4 +6,5 @@ export { default as FollowAction } from './follow-action';
|
|
|
6
6
|
export { default as PreviewAction } from './preview-action';
|
|
7
7
|
export { default as CopyLinkAction } from './copy-link-action';
|
|
8
8
|
export { default as AISummaryAction } from './ai-summary-action';
|
|
9
|
-
export { default as AutomationAction } from './automation-action';
|
|
9
|
+
export { default as AutomationAction } from './automation-action';
|
|
10
|
+
export { default as ViewRelatedLinksAction } from './view-related-links-action';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
/** @jsx jsx */
|
|
3
|
+
import { jsx } from '@emotion/react';
|
|
4
|
+
import Action from '../action';
|
|
5
|
+
import { FormattedMessage } from 'react-intl-next';
|
|
6
|
+
import { messages } from '../../../../../messages';
|
|
7
|
+
import { useFlexibleUiContext } from '../../../../../state/flexible-ui-context';
|
|
8
|
+
import RelatedLinksActionIcon from './related-links-action-icon';
|
|
9
|
+
var ViewRelatedLinksAction = function ViewRelatedLinksAction(props) {
|
|
10
|
+
var _context$actions;
|
|
11
|
+
var context = useFlexibleUiContext();
|
|
12
|
+
var actionData = context === null || context === void 0 || (_context$actions = context.actions) === null || _context$actions === void 0 ? void 0 : _context$actions.ViewRelatedLinksAction;
|
|
13
|
+
return actionData ? jsx(Action, _extends({
|
|
14
|
+
content: jsx(FormattedMessage, messages.related_links_view_related_urls),
|
|
15
|
+
icon: jsx(RelatedLinksActionIcon, null),
|
|
16
|
+
testId: "smart-action-view-related-links-action",
|
|
17
|
+
ariaLabel: "View most recent pages or content types coming from or found on this link"
|
|
18
|
+
}, props)) : null;
|
|
19
|
+
};
|
|
20
|
+
export default ViewRelatedLinksAction;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { css, jsx } from '@emotion/react';
|
|
3
|
+
import ChildIssuesIcon from '@atlaskit/icon/glyph/child-issues';
|
|
4
|
+
var rotateSvg = css({
|
|
5
|
+
transform: 'rotate(180deg)',
|
|
6
|
+
display: 'inline-block'
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* ChildIssuesIcon but 180 degrees rotated
|
|
11
|
+
*/
|
|
12
|
+
var RelatedLinksActionIcon = function RelatedLinksActionIcon() {
|
|
13
|
+
return jsx("span", {
|
|
14
|
+
css: rotateSvg
|
|
15
|
+
}, jsx(ChildIssuesIcon, {
|
|
16
|
+
label: "View recent links..."
|
|
17
|
+
}));
|
|
18
|
+
};
|
|
19
|
+
export default RelatedLinksActionIcon;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -10,7 +10,7 @@ import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-m
|
|
|
10
10
|
import LinkWarningModal from './LinkWarningModal';
|
|
11
11
|
var PACKAGE_DATA = {
|
|
12
12
|
packageName: "@atlaskit/smart-card",
|
|
13
|
-
packageVersion: "26.
|
|
13
|
+
packageVersion: "26.73.0",
|
|
14
14
|
componentName: 'linkUrl'
|
|
15
15
|
};
|
|
16
16
|
var Link = withLinkClickedEvent('a');
|
|
@@ -141,7 +141,8 @@ export declare enum ActionName {
|
|
|
141
141
|
CustomAction = "CustomAction"
|
|
142
142
|
}
|
|
143
143
|
export declare enum InternalActionName {
|
|
144
|
-
AISummaryAction = "AISummaryAction"
|
|
144
|
+
AISummaryAction = "AISummaryAction",
|
|
145
|
+
ViewRelatedLinksAction = "ViewRelatedLinksAction"
|
|
145
146
|
}
|
|
146
147
|
export type FlexibleUiActionName = keyof typeof ActionName | keyof typeof InternalActionName;
|
|
147
148
|
/**
|
package/dist/types/messages.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type MessageDescriptor } from 'react-intl-next';
|
|
2
2
|
export type RequestAccessMessageKey = 'click_to_join' | 'click_to_join_description' | 'forbidden_description' | 'request_access' | 'request_access_description' | 'request_access_pending' | 'request_access_pending_title' | 'request_access_pending_description' | 'request_denied_description' | 'default_no_access_title' | 'direct_access_title' | 'direct_access_description' | 'direct_access' | 'access_exists_description' | 'not_found_description' | 'not_found_title';
|
|
3
|
-
export type MessageKey = 'assigned_to' | 'ai_summarize' | 'ai_summarized' | 'ai_summarized_abbreviation' | 'ai_summarized_info' | 'ai_summarized_info_short' | 'ai_summarizing' | 'ai_summary_error_generic' | 'ai_summary_error_acceptable_use_violation' | 'ai_summary_error_hipaa_content_detected' | 'ai_summary_error_exceeding_context_length_error' | 'ai_summary_action' | 'ai_summary_action_description' | 'automation_action_title' | 'automation_action_tooltip' | 'automation_action_icon_label' | 'automation_action_confluence_page_modal_title' | 'automation_action_confluence_page_modal_description' | 'copy_summary_action' | 'copy_summary_action_description' | 'copied_summary_action_description' | 'beta' | 'cannot_find_link' | 'connect_link_account_card' | 'connect_link_account_card_name' | 'connect_link_account_card_description' | 'connect_unauthorised_account_action' | 'connect_unauthorised_account_description' | 'connect_unauthorised_account_description_no_provider' | 'continue' | 'copy_url_to_clipboard' | 'copied_url_to_clipboard' | 'could_not_load_link' | 'download' | 'download_description' | 'download_file' | 'follow' | 'follow_project_description' | 'follow_project' | 'follow_goal' | 'follow_goal_description' | 'follow_project_error' | 'follow_goal_error' | 'go_back' | 'invalid_permissions' | 'invalid_permissions_description' | 'join_to_view' | 'connect_link_account' | 'created_by' | 'created_on_relative' | 'created_on_absolute' | 'check_this_link' | 'delete' | 'edit' | 'learn_more_about_smart_links' | 'learn_more_about_connecting_account' | 'loading' | 'link_safety_warning_message' | 'modified_by' | 'modified_on_relative' | 'modified_on_absolute' | 'more_actions' | 'not_found_title' | 'not_found_description' | 'open_issue_in_jira' | 'open_link_in_a_new_tab' | 'owned_by' | 'preview_description' | 'preview_improved' | 'preview_close' | 'preview_max_size' | 'preview_min_size' | 'priority_blocker' | 'priority_critical' | 'priority_high' | 'priority_highest' | 'priority_low' | 'priority_lowest' | 'priority_major' | 'priority_medium' | 'priority_minor' | 'priority_trivial' | 'priority_undefined' | 'forbidden_access' | 'pending_request' | 'read_time' | 'restricted_link' | 'request_access_to_view' | 'request_denied' | 'sent_on_relative' | 'sent_on_absolute' | 'status_change_load_error' | 'status_change_permission_error' | 'status_change_update_error' | 'try_again' | 'try_another_account' | 'unauthorised_account_description' | 'unauthorised_account_description_no_provider' | 'unauthorised_account_name' | 'unauthorised_account_name_no_provider' | 'unassigned' | 'unfollow' | 'unfollow_project_description' | 'unfollow_project' | 'unfollow_project_error' | 'unfollow_goal' | 'unfollow_goal_description' | 'unfollow_goal_error' | 'view' | 'viewIn' | 'viewOriginal' | 'actions' | 'add_account' | 'cancel' | 'close' | 'connect_to' | 'connect_account_description' | 'retry' | 'save' | 'unlink_account' | RequestAccessMessageKey | 'related_work_items_not_found' | 'last_mentioned_in' | 'related' | 'generic_error_message' | 'related_links_modal_title_nonfinal';
|
|
3
|
+
export type MessageKey = 'assigned_to' | 'ai_summarize' | 'ai_summarized' | 'ai_summarized_abbreviation' | 'ai_summarized_info' | 'ai_summarized_info_short' | 'ai_summarizing' | 'ai_summary_error_generic' | 'ai_summary_error_acceptable_use_violation' | 'ai_summary_error_hipaa_content_detected' | 'ai_summary_error_exceeding_context_length_error' | 'ai_summary_action' | 'ai_summary_action_description' | 'automation_action_title' | 'automation_action_tooltip' | 'automation_action_icon_label' | 'automation_action_confluence_page_modal_title' | 'automation_action_confluence_page_modal_description' | 'copy_summary_action' | 'copy_summary_action_description' | 'copied_summary_action_description' | 'beta' | 'cannot_find_link' | 'connect_link_account_card' | 'connect_link_account_card_name' | 'connect_link_account_card_description' | 'connect_unauthorised_account_action' | 'connect_unauthorised_account_description' | 'connect_unauthorised_account_description_no_provider' | 'continue' | 'copy_url_to_clipboard' | 'copied_url_to_clipboard' | 'could_not_load_link' | 'download' | 'download_description' | 'download_file' | 'follow' | 'follow_project_description' | 'follow_project' | 'follow_goal' | 'follow_goal_description' | 'follow_project_error' | 'follow_goal_error' | 'go_back' | 'invalid_permissions' | 'invalid_permissions_description' | 'join_to_view' | 'connect_link_account' | 'created_by' | 'created_on_relative' | 'created_on_absolute' | 'check_this_link' | 'delete' | 'edit' | 'learn_more_about_smart_links' | 'learn_more_about_connecting_account' | 'loading' | 'link_safety_warning_message' | 'modified_by' | 'modified_on_relative' | 'modified_on_absolute' | 'more_actions' | 'not_found_title' | 'not_found_description' | 'open_issue_in_jira' | 'open_link_in_a_new_tab' | 'owned_by' | 'preview_description' | 'preview_improved' | 'preview_close' | 'preview_max_size' | 'preview_min_size' | 'priority_blocker' | 'priority_critical' | 'priority_high' | 'priority_highest' | 'priority_low' | 'priority_lowest' | 'priority_major' | 'priority_medium' | 'priority_minor' | 'priority_trivial' | 'priority_undefined' | 'forbidden_access' | 'pending_request' | 'read_time' | 'restricted_link' | 'request_access_to_view' | 'request_denied' | 'sent_on_relative' | 'sent_on_absolute' | 'status_change_load_error' | 'status_change_permission_error' | 'status_change_update_error' | 'try_again' | 'try_another_account' | 'unauthorised_account_description' | 'unauthorised_account_description_no_provider' | 'unauthorised_account_name' | 'unauthorised_account_name_no_provider' | 'unassigned' | 'unfollow' | 'unfollow_project_description' | 'unfollow_project' | 'unfollow_project_error' | 'unfollow_goal' | 'unfollow_goal_description' | 'unfollow_goal_error' | 'view' | 'viewIn' | 'viewOriginal' | 'actions' | 'add_account' | 'cancel' | 'close' | 'connect_to' | 'connect_account_description' | 'retry' | 'save' | 'unlink_account' | RequestAccessMessageKey | 'related_work_items_not_found' | 'last_mentioned_in' | 'related' | 'generic_error_message' | 'related_links_modal_title_nonfinal' | 'related_links_view_related_urls';
|
|
4
4
|
type Messages = {
|
|
5
5
|
[K in MessageKey]: MessageDescriptor;
|
|
6
6
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { LinkLozenge } from '../../extractors/common/lozenge/types';
|
|
2
|
-
import { LinkPerson } from '@atlaskit/link-extractors';
|
|
3
|
-
import { ActionName, IconType, InternalActionName, MediaType } from '../../constants';
|
|
4
|
-
import { InvokeRequestWithCardDetails } from '../hooks/use-invoke/types';
|
|
1
|
+
import { type LinkLozenge } from '../../extractors/common/lozenge/types';
|
|
2
|
+
import { type LinkPerson } from '@atlaskit/link-extractors';
|
|
3
|
+
import { type ActionName, type IconType, type InternalActionName, type MediaType } from '../../constants';
|
|
4
|
+
import { type InvokeRequestWithCardDetails } from '../hooks/use-invoke/types';
|
|
5
5
|
import type { CardInnerAppearance } from '../../view/Card/types';
|
|
6
6
|
import type { AnalyticsFacade } from '../analytics';
|
|
7
7
|
import type { ProductType } from '@atlaskit/linking-common';
|
|
8
|
-
import { MessageDescriptor } from 'react-intl-next';
|
|
8
|
+
import { type MessageDescriptor } from 'react-intl-next';
|
|
9
9
|
/**
|
|
10
10
|
* This provides the data that will be used by Smart Links Flexible UI to populate it's
|
|
11
11
|
* underlying elements.
|
|
@@ -249,6 +249,7 @@ export type FlexibleUiActions = {
|
|
|
249
249
|
[ActionName.CopyLinkAction]?: CopyLinkActionData;
|
|
250
250
|
[InternalActionName.AISummaryAction]?: AISummaryActionData;
|
|
251
251
|
[ActionName.AutomationAction]?: AutomationActionData;
|
|
252
|
+
[InternalActionName.ViewRelatedLinksAction]?: ViewRelatedLinksActionData;
|
|
252
253
|
};
|
|
253
254
|
export type PreviewActionData = {
|
|
254
255
|
downloadUrl?: string;
|
|
@@ -283,6 +284,9 @@ export type AutomationActionData = {
|
|
|
283
284
|
modalTitle: MessageDescriptor;
|
|
284
285
|
modalDescription: MessageDescriptor;
|
|
285
286
|
};
|
|
287
|
+
export type ViewRelatedLinksActionData = {
|
|
288
|
+
url: string;
|
|
289
|
+
};
|
|
286
290
|
export type FlexibleAnalyticsContextType = AnalyticsFacade & {
|
|
287
291
|
display?: CardInnerAppearance;
|
|
288
292
|
extensionKey?: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { CardProps } from '../view/Card';
|
|
3
|
-
import { FrameStyle } from '../view/EmbedCard/types';
|
|
4
|
-
import { ActiveThemeState } from '@atlaskit/tokens/src/theme-config';
|
|
3
|
+
import { type FrameStyle } from '../view/EmbedCard/types';
|
|
4
|
+
import { type ActiveThemeState } from '@atlaskit/tokens/src/theme-config';
|
|
5
5
|
export declare const isCardWithData: (props: CardProps) => boolean;
|
|
6
6
|
export declare const isSpecialEvent: (evt: React.MouseEvent | React.KeyboardEvent) => boolean;
|
|
7
7
|
export declare const isIframe: () => boolean;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
3
|
-
import { CardAppearance } from '@atlaskit/linking-common';
|
|
4
|
-
import { CardPlatform } from '@atlaskit/link-extractors';
|
|
5
|
-
import { AnalyticsFacade } from '../../state/analytics';
|
|
6
|
-
import { FlexibleUiOptions } from '../FlexibleCard/types';
|
|
7
|
-
import { InlinePreloaderStyle, OnErrorCallback } from '../types';
|
|
8
|
-
import { FrameStyle } from '../EmbedCard/types';
|
|
2
|
+
import { type WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
3
|
+
import { type CardAppearance } from '@atlaskit/linking-common';
|
|
4
|
+
import { type CardPlatform } from '@atlaskit/link-extractors';
|
|
5
|
+
import { type AnalyticsFacade } from '../../state/analytics';
|
|
6
|
+
import { type FlexibleUiOptions } from '../FlexibleCard/types';
|
|
7
|
+
import { type InlinePreloaderStyle, type OnErrorCallback } from '../types';
|
|
8
|
+
import { type FrameStyle } from '../EmbedCard/types';
|
|
9
9
|
export type { CardAppearance, CardPlatform };
|
|
10
10
|
export type CardInnerAppearance = CardAppearance | 'embedPreview' | 'flexible' | 'hoverCardPreview';
|
|
11
11
|
export type EmbedIframeUrlType = 'href' | 'interactiveHref';
|
|
@@ -7,3 +7,4 @@ export { default as PreviewAction } from './preview-action';
|
|
|
7
7
|
export { default as CopyLinkAction } from './copy-link-action';
|
|
8
8
|
export { default as AISummaryAction } from './ai-summary-action';
|
|
9
9
|
export { default as AutomationAction } from './automation-action';
|
|
10
|
+
export { default as ViewRelatedLinksAction } from './view-related-links-action';
|
|
@@ -141,7 +141,8 @@ export declare enum ActionName {
|
|
|
141
141
|
CustomAction = "CustomAction"
|
|
142
142
|
}
|
|
143
143
|
export declare enum InternalActionName {
|
|
144
|
-
AISummaryAction = "AISummaryAction"
|
|
144
|
+
AISummaryAction = "AISummaryAction",
|
|
145
|
+
ViewRelatedLinksAction = "ViewRelatedLinksAction"
|
|
145
146
|
}
|
|
146
147
|
export type FlexibleUiActionName = keyof typeof ActionName | keyof typeof InternalActionName;
|
|
147
148
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type MessageDescriptor } from 'react-intl-next';
|
|
2
2
|
export type RequestAccessMessageKey = 'click_to_join' | 'click_to_join_description' | 'forbidden_description' | 'request_access' | 'request_access_description' | 'request_access_pending' | 'request_access_pending_title' | 'request_access_pending_description' | 'request_denied_description' | 'default_no_access_title' | 'direct_access_title' | 'direct_access_description' | 'direct_access' | 'access_exists_description' | 'not_found_description' | 'not_found_title';
|
|
3
|
-
export type MessageKey = 'assigned_to' | 'ai_summarize' | 'ai_summarized' | 'ai_summarized_abbreviation' | 'ai_summarized_info' | 'ai_summarized_info_short' | 'ai_summarizing' | 'ai_summary_error_generic' | 'ai_summary_error_acceptable_use_violation' | 'ai_summary_error_hipaa_content_detected' | 'ai_summary_error_exceeding_context_length_error' | 'ai_summary_action' | 'ai_summary_action_description' | 'automation_action_title' | 'automation_action_tooltip' | 'automation_action_icon_label' | 'automation_action_confluence_page_modal_title' | 'automation_action_confluence_page_modal_description' | 'copy_summary_action' | 'copy_summary_action_description' | 'copied_summary_action_description' | 'beta' | 'cannot_find_link' | 'connect_link_account_card' | 'connect_link_account_card_name' | 'connect_link_account_card_description' | 'connect_unauthorised_account_action' | 'connect_unauthorised_account_description' | 'connect_unauthorised_account_description_no_provider' | 'continue' | 'copy_url_to_clipboard' | 'copied_url_to_clipboard' | 'could_not_load_link' | 'download' | 'download_description' | 'download_file' | 'follow' | 'follow_project_description' | 'follow_project' | 'follow_goal' | 'follow_goal_description' | 'follow_project_error' | 'follow_goal_error' | 'go_back' | 'invalid_permissions' | 'invalid_permissions_description' | 'join_to_view' | 'connect_link_account' | 'created_by' | 'created_on_relative' | 'created_on_absolute' | 'check_this_link' | 'delete' | 'edit' | 'learn_more_about_smart_links' | 'learn_more_about_connecting_account' | 'loading' | 'link_safety_warning_message' | 'modified_by' | 'modified_on_relative' | 'modified_on_absolute' | 'more_actions' | 'not_found_title' | 'not_found_description' | 'open_issue_in_jira' | 'open_link_in_a_new_tab' | 'owned_by' | 'preview_description' | 'preview_improved' | 'preview_close' | 'preview_max_size' | 'preview_min_size' | 'priority_blocker' | 'priority_critical' | 'priority_high' | 'priority_highest' | 'priority_low' | 'priority_lowest' | 'priority_major' | 'priority_medium' | 'priority_minor' | 'priority_trivial' | 'priority_undefined' | 'forbidden_access' | 'pending_request' | 'read_time' | 'restricted_link' | 'request_access_to_view' | 'request_denied' | 'sent_on_relative' | 'sent_on_absolute' | 'status_change_load_error' | 'status_change_permission_error' | 'status_change_update_error' | 'try_again' | 'try_another_account' | 'unauthorised_account_description' | 'unauthorised_account_description_no_provider' | 'unauthorised_account_name' | 'unauthorised_account_name_no_provider' | 'unassigned' | 'unfollow' | 'unfollow_project_description' | 'unfollow_project' | 'unfollow_project_error' | 'unfollow_goal' | 'unfollow_goal_description' | 'unfollow_goal_error' | 'view' | 'viewIn' | 'viewOriginal' | 'actions' | 'add_account' | 'cancel' | 'close' | 'connect_to' | 'connect_account_description' | 'retry' | 'save' | 'unlink_account' | RequestAccessMessageKey | 'related_work_items_not_found' | 'last_mentioned_in' | 'related' | 'generic_error_message' | 'related_links_modal_title_nonfinal';
|
|
3
|
+
export type MessageKey = 'assigned_to' | 'ai_summarize' | 'ai_summarized' | 'ai_summarized_abbreviation' | 'ai_summarized_info' | 'ai_summarized_info_short' | 'ai_summarizing' | 'ai_summary_error_generic' | 'ai_summary_error_acceptable_use_violation' | 'ai_summary_error_hipaa_content_detected' | 'ai_summary_error_exceeding_context_length_error' | 'ai_summary_action' | 'ai_summary_action_description' | 'automation_action_title' | 'automation_action_tooltip' | 'automation_action_icon_label' | 'automation_action_confluence_page_modal_title' | 'automation_action_confluence_page_modal_description' | 'copy_summary_action' | 'copy_summary_action_description' | 'copied_summary_action_description' | 'beta' | 'cannot_find_link' | 'connect_link_account_card' | 'connect_link_account_card_name' | 'connect_link_account_card_description' | 'connect_unauthorised_account_action' | 'connect_unauthorised_account_description' | 'connect_unauthorised_account_description_no_provider' | 'continue' | 'copy_url_to_clipboard' | 'copied_url_to_clipboard' | 'could_not_load_link' | 'download' | 'download_description' | 'download_file' | 'follow' | 'follow_project_description' | 'follow_project' | 'follow_goal' | 'follow_goal_description' | 'follow_project_error' | 'follow_goal_error' | 'go_back' | 'invalid_permissions' | 'invalid_permissions_description' | 'join_to_view' | 'connect_link_account' | 'created_by' | 'created_on_relative' | 'created_on_absolute' | 'check_this_link' | 'delete' | 'edit' | 'learn_more_about_smart_links' | 'learn_more_about_connecting_account' | 'loading' | 'link_safety_warning_message' | 'modified_by' | 'modified_on_relative' | 'modified_on_absolute' | 'more_actions' | 'not_found_title' | 'not_found_description' | 'open_issue_in_jira' | 'open_link_in_a_new_tab' | 'owned_by' | 'preview_description' | 'preview_improved' | 'preview_close' | 'preview_max_size' | 'preview_min_size' | 'priority_blocker' | 'priority_critical' | 'priority_high' | 'priority_highest' | 'priority_low' | 'priority_lowest' | 'priority_major' | 'priority_medium' | 'priority_minor' | 'priority_trivial' | 'priority_undefined' | 'forbidden_access' | 'pending_request' | 'read_time' | 'restricted_link' | 'request_access_to_view' | 'request_denied' | 'sent_on_relative' | 'sent_on_absolute' | 'status_change_load_error' | 'status_change_permission_error' | 'status_change_update_error' | 'try_again' | 'try_another_account' | 'unauthorised_account_description' | 'unauthorised_account_description_no_provider' | 'unauthorised_account_name' | 'unauthorised_account_name_no_provider' | 'unassigned' | 'unfollow' | 'unfollow_project_description' | 'unfollow_project' | 'unfollow_project_error' | 'unfollow_goal' | 'unfollow_goal_description' | 'unfollow_goal_error' | 'view' | 'viewIn' | 'viewOriginal' | 'actions' | 'add_account' | 'cancel' | 'close' | 'connect_to' | 'connect_account_description' | 'retry' | 'save' | 'unlink_account' | RequestAccessMessageKey | 'related_work_items_not_found' | 'last_mentioned_in' | 'related' | 'generic_error_message' | 'related_links_modal_title_nonfinal' | 'related_links_view_related_urls';
|
|
4
4
|
type Messages = {
|
|
5
5
|
[K in MessageKey]: MessageDescriptor;
|
|
6
6
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { LinkLozenge } from '../../extractors/common/lozenge/types';
|
|
2
|
-
import { LinkPerson } from '@atlaskit/link-extractors';
|
|
3
|
-
import { ActionName, IconType, InternalActionName, MediaType } from '../../constants';
|
|
4
|
-
import { InvokeRequestWithCardDetails } from '../hooks/use-invoke/types';
|
|
1
|
+
import { type LinkLozenge } from '../../extractors/common/lozenge/types';
|
|
2
|
+
import { type LinkPerson } from '@atlaskit/link-extractors';
|
|
3
|
+
import { type ActionName, type IconType, type InternalActionName, type MediaType } from '../../constants';
|
|
4
|
+
import { type InvokeRequestWithCardDetails } from '../hooks/use-invoke/types';
|
|
5
5
|
import type { CardInnerAppearance } from '../../view/Card/types';
|
|
6
6
|
import type { AnalyticsFacade } from '../analytics';
|
|
7
7
|
import type { ProductType } from '@atlaskit/linking-common';
|
|
8
|
-
import { MessageDescriptor } from 'react-intl-next';
|
|
8
|
+
import { type MessageDescriptor } from 'react-intl-next';
|
|
9
9
|
/**
|
|
10
10
|
* This provides the data that will be used by Smart Links Flexible UI to populate it's
|
|
11
11
|
* underlying elements.
|
|
@@ -249,6 +249,7 @@ export type FlexibleUiActions = {
|
|
|
249
249
|
[ActionName.CopyLinkAction]?: CopyLinkActionData;
|
|
250
250
|
[InternalActionName.AISummaryAction]?: AISummaryActionData;
|
|
251
251
|
[ActionName.AutomationAction]?: AutomationActionData;
|
|
252
|
+
[InternalActionName.ViewRelatedLinksAction]?: ViewRelatedLinksActionData;
|
|
252
253
|
};
|
|
253
254
|
export type PreviewActionData = {
|
|
254
255
|
downloadUrl?: string;
|
|
@@ -283,6 +284,9 @@ export type AutomationActionData = {
|
|
|
283
284
|
modalTitle: MessageDescriptor;
|
|
284
285
|
modalDescription: MessageDescriptor;
|
|
285
286
|
};
|
|
287
|
+
export type ViewRelatedLinksActionData = {
|
|
288
|
+
url: string;
|
|
289
|
+
};
|
|
286
290
|
export type FlexibleAnalyticsContextType = AnalyticsFacade & {
|
|
287
291
|
display?: CardInnerAppearance;
|
|
288
292
|
extensionKey?: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { CardProps } from '../view/Card';
|
|
3
|
-
import { FrameStyle } from '../view/EmbedCard/types';
|
|
4
|
-
import { ActiveThemeState } from '@atlaskit/tokens/src/theme-config';
|
|
3
|
+
import { type FrameStyle } from '../view/EmbedCard/types';
|
|
4
|
+
import { type ActiveThemeState } from '@atlaskit/tokens/src/theme-config';
|
|
5
5
|
export declare const isCardWithData: (props: CardProps) => boolean;
|
|
6
6
|
export declare const isSpecialEvent: (evt: React.MouseEvent | React.KeyboardEvent) => boolean;
|
|
7
7
|
export declare const isIframe: () => boolean;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
3
|
-
import { CardAppearance } from '@atlaskit/linking-common';
|
|
4
|
-
import { CardPlatform } from '@atlaskit/link-extractors';
|
|
5
|
-
import { AnalyticsFacade } from '../../state/analytics';
|
|
6
|
-
import { FlexibleUiOptions } from '../FlexibleCard/types';
|
|
7
|
-
import { InlinePreloaderStyle, OnErrorCallback } from '../types';
|
|
8
|
-
import { FrameStyle } from '../EmbedCard/types';
|
|
2
|
+
import { type WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
3
|
+
import { type CardAppearance } from '@atlaskit/linking-common';
|
|
4
|
+
import { type CardPlatform } from '@atlaskit/link-extractors';
|
|
5
|
+
import { type AnalyticsFacade } from '../../state/analytics';
|
|
6
|
+
import { type FlexibleUiOptions } from '../FlexibleCard/types';
|
|
7
|
+
import { type InlinePreloaderStyle, type OnErrorCallback } from '../types';
|
|
8
|
+
import { type FrameStyle } from '../EmbedCard/types';
|
|
9
9
|
export type { CardAppearance, CardPlatform };
|
|
10
10
|
export type CardInnerAppearance = CardAppearance | 'embedPreview' | 'flexible' | 'hoverCardPreview';
|
|
11
11
|
export type EmbedIframeUrlType = 'href' | 'interactiveHref';
|
|
@@ -7,3 +7,4 @@ export { default as PreviewAction } from './preview-action';
|
|
|
7
7
|
export { default as CopyLinkAction } from './copy-link-action';
|
|
8
8
|
export { default as AISummaryAction } from './ai-summary-action';
|
|
9
9
|
export { default as AutomationAction } from './automation-action';
|
|
10
|
+
export { default as ViewRelatedLinksAction } from './view-related-links-action';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/smart-card",
|
|
3
|
-
"version": "26.
|
|
3
|
+
"version": "26.73.0",
|
|
4
4
|
"description": "Smart card component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -187,11 +187,17 @@
|
|
|
187
187
|
"platform.linking-platform.smart-card.fix-embed-card-blurring": {
|
|
188
188
|
"type": "boolean"
|
|
189
189
|
},
|
|
190
|
+
"platform.linking-platform.smart-card.fix-embed-preview-url-query-params": {
|
|
191
|
+
"type": "boolean"
|
|
192
|
+
},
|
|
190
193
|
"platform.linking-platform.smart-card.action-icon-redesign": {
|
|
191
194
|
"type": "boolean"
|
|
192
195
|
},
|
|
193
196
|
"platform.linking-platfom.smart-card.confluence.page.automation-action_xcdoi": {
|
|
194
197
|
"type": "boolean"
|
|
198
|
+
},
|
|
199
|
+
"platform.linking-platform.smart-card.enable-view-related-urls-action": {
|
|
200
|
+
"type": "boolean"
|
|
195
201
|
}
|
|
196
202
|
},
|
|
197
203
|
"prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1"
|