@atlaskit/smart-card 26.45.1 → 26.45.3
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 +12 -0
- package/dist/cjs/extractors/flexible/index.js +1 -2
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/view/BlockCard/views/flexible/utils/index.js +15 -0
- package/dist/cjs/view/FlexibleCard/components/actions/action/action-button/index.js +1 -11
- package/dist/cjs/view/HoverCard/utils.js +10 -0
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/es2019/extractors/flexible/index.js +1 -2
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/view/BlockCard/views/flexible/utils/index.js +15 -0
- package/dist/es2019/view/FlexibleCard/components/actions/action/action-button/index.js +1 -11
- package/dist/es2019/view/HoverCard/utils.js +11 -0
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/esm/extractors/flexible/index.js +1 -2
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/view/BlockCard/views/flexible/utils/index.js +15 -0
- package/dist/esm/view/FlexibleCard/components/actions/action/action-button/index.js +1 -11
- package/dist/esm/view/HoverCard/utils.js +10 -0
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/types/extractors/flexible/latest-commit/index.d.ts +2 -1
- package/dist/types-ts4.5/extractors/flexible/latest-commit/index.d.ts +2 -1
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/smart-card
|
|
2
2
|
|
|
3
|
+
## 26.45.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#67731](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/67731) [`6c4de5b272be`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/6c4de5b272be) - [ux] add latest commit information to block and hover cards for BB files
|
|
8
|
+
|
|
9
|
+
## 26.45.2
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#67800](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/67800) [`1791437d1cc2`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/1791437d1cc2) - Follow action feature flag cleanup
|
|
14
|
+
|
|
3
15
|
## 26.45.1
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
9
8
|
var _primitives = require("../common/primitives");
|
|
10
9
|
var _extractFollowAction = _interopRequireDefault(require("./actions/extract-follow-action"));
|
|
11
10
|
var _icon = require("./icon");
|
|
@@ -47,7 +46,7 @@ var extractFlexibleUiContext = function extractFlexibleUiContext() {
|
|
|
47
46
|
assignedTo: (0, _utils.extractAssignedTo)(data),
|
|
48
47
|
createdOn: (0, _linkExtractors.extractDateCreated)(data),
|
|
49
48
|
dueOn: (0, _utils.extractDueOn)(data),
|
|
50
|
-
followAction: (0,
|
|
49
|
+
followAction: (0, _extractFollowAction.default)(response, actionOptions, id),
|
|
51
50
|
previewAction: (0, _extractPreviewAction.extractPreviewAction)(response, actionOptions),
|
|
52
51
|
viewAction: (0, _extractViewAction.extractViewAction)(data, actionOptions),
|
|
53
52
|
downloadAction: (0, _extractDownloadAction.extractDownloadAction)(data, actionOptions),
|
|
@@ -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.45.
|
|
25
|
+
packageVersion: "26.45.3"
|
|
26
26
|
};
|
|
27
27
|
var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
28
28
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -8,6 +8,7 @@ var _constants = require("../../../../../constants");
|
|
|
8
8
|
var _utils = require("../../../../../extractors/flexible/utils");
|
|
9
9
|
var _helpers = require("../../../../../state/helpers");
|
|
10
10
|
var _styled = require("../styled");
|
|
11
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
11
12
|
var baseTopMetadata = [{
|
|
12
13
|
name: _constants.ElementName.ModifiedOn
|
|
13
14
|
}, {
|
|
@@ -48,6 +49,20 @@ var getSimulatedBetterMetadata = exports.getSimulatedBetterMetadata = function g
|
|
|
48
49
|
}].concat(baseTopMetadata);
|
|
49
50
|
var defaultBottomMetadata = baseBottomMetaData;
|
|
50
51
|
switch (extensionKey) {
|
|
52
|
+
case 'bitbucket-object-provider':
|
|
53
|
+
case 'native-bitbucket-object-provider':
|
|
54
|
+
var isFile = data['@type'].includes('schema:DigitalDocument');
|
|
55
|
+
return {
|
|
56
|
+
titleMetadata: defaultTitleMetadata,
|
|
57
|
+
topMetadata: (0, _platformFeatureFlags.getBooleanFF)('platform.linking-platform.extractor.improve-bitbucket-file-links') && isFile ? [{
|
|
58
|
+
name: _constants.ElementName.LatestCommit
|
|
59
|
+
}, {
|
|
60
|
+
name: _constants.ElementName.CollaboratorGroup
|
|
61
|
+
}, {
|
|
62
|
+
name: _constants.ElementName.ModifiedOn
|
|
63
|
+
}] : defaultTopMetadata,
|
|
64
|
+
bottomMetadata: defaultBottomMetadata
|
|
65
|
+
};
|
|
51
66
|
case 'confluence-object-provider':
|
|
52
67
|
return {
|
|
53
68
|
titleMetadata: defaultTitleMetadata,
|
|
@@ -9,9 +9,7 @@ exports.default = void 0;
|
|
|
9
9
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
var _react2 = require("@emotion/react");
|
|
12
|
-
var _customThemeButton = _interopRequireDefault(require("@atlaskit/button/custom-theme-button"));
|
|
13
12
|
var _button = require("@atlaskit/button");
|
|
14
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
15
13
|
var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
16
14
|
var _constants = require("../../../../../../constants");
|
|
17
15
|
var _utils = require("../../../utils");
|
|
@@ -57,7 +55,7 @@ var ActionButton = function ActionButton(_ref) {
|
|
|
57
55
|
content: tooltipMessage,
|
|
58
56
|
hideTooltipOnClick: true,
|
|
59
57
|
testId: "".concat(testId, "-tooltip")
|
|
60
|
-
}, (0,
|
|
58
|
+
}, (0, _react2.jsx)(_button.LoadingButton, {
|
|
61
59
|
appearance: appearance,
|
|
62
60
|
iconAfter: iconAfter,
|
|
63
61
|
iconBefore: iconBefore,
|
|
@@ -66,14 +64,6 @@ var ActionButton = function ActionButton(_ref) {
|
|
|
66
64
|
onClick: onButtonClick(onClick),
|
|
67
65
|
spacing: _utils.sizeToButtonSpacing[size],
|
|
68
66
|
testId: testId
|
|
69
|
-
}, content) : (0, _react2.jsx)(_customThemeButton.default, {
|
|
70
|
-
appearance: appearance,
|
|
71
|
-
iconAfter: iconAfter,
|
|
72
|
-
iconBefore: iconBefore,
|
|
73
|
-
onClick: onButtonClick(onClick),
|
|
74
|
-
spacing: _utils.sizeToButtonSpacing[size],
|
|
75
|
-
testId: testId,
|
|
76
|
-
isDisabled: isDisabled
|
|
77
67
|
}, content)));
|
|
78
68
|
};
|
|
79
69
|
var _default = exports.default = ActionButton;
|
|
@@ -9,6 +9,7 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
9
9
|
var _constants = require("../../constants");
|
|
10
10
|
var _linkExtractors = require("@atlaskit/link-extractors");
|
|
11
11
|
var _utils = require("../../extractors/flexible/utils");
|
|
12
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
12
13
|
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; }
|
|
13
14
|
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; }
|
|
14
15
|
var getSimulatedMetadata = exports.getSimulatedMetadata = function getSimulatedMetadata() {
|
|
@@ -115,6 +116,15 @@ var getSimulatedBetterMetadata = exports.getSimulatedBetterMetadata = function g
|
|
|
115
116
|
}
|
|
116
117
|
});
|
|
117
118
|
}
|
|
119
|
+
if ((0, _platformFeatureFlags.getBooleanFF)('platform.linking-platform.extractor.improve-bitbucket-file-links') && types !== null && types !== void 0 && types.includes('schema:DigitalDocument')) {
|
|
120
|
+
return _objectSpread(_objectSpread({}, defaultMetadata), {}, {
|
|
121
|
+
topMetadataBlock: {
|
|
122
|
+
primary: [_constants.ElementName.LatestCommit, _constants.ElementName.CollaboratorGroup, _constants.ElementName.ModifiedOn],
|
|
123
|
+
secondary: [],
|
|
124
|
+
subtitle: []
|
|
125
|
+
}
|
|
126
|
+
});
|
|
127
|
+
}
|
|
118
128
|
return _objectSpread(_objectSpread({}, defaultMetadata), {}, {
|
|
119
129
|
topMetadataBlock: {
|
|
120
130
|
primary: [_constants.ElementName.AuthorGroup, _constants.ElementName.ModifiedOn],
|
|
@@ -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.45.
|
|
20
|
+
packageVersion: "26.45.3",
|
|
21
21
|
componentName: 'linkUrl'
|
|
22
22
|
};
|
|
23
23
|
var Link = (0, _click.withLinkClickedEvent)('a');
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
2
1
|
import { extractSummary } from '../common/primitives';
|
|
3
2
|
import extractFollowAction from './actions/extract-follow-action';
|
|
4
3
|
import { extractLinkIcon } from './icon';
|
|
@@ -40,7 +39,7 @@ const extractFlexibleUiContext = ({
|
|
|
40
39
|
assignedTo: extractAssignedTo(data),
|
|
41
40
|
createdOn: extractDateCreated(data),
|
|
42
41
|
dueOn: extractDueOn(data),
|
|
43
|
-
followAction:
|
|
42
|
+
followAction: extractFollowAction(response, actionOptions, id),
|
|
44
43
|
previewAction: extractPreviewAction(response, actionOptions),
|
|
45
44
|
viewAction: extractViewAction(data, actionOptions),
|
|
46
45
|
downloadAction: extractDownloadAction(data, actionOptions),
|
|
@@ -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.45.
|
|
7
|
+
packageVersion: "26.45.3"
|
|
8
8
|
};
|
|
9
9
|
export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
10
10
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -2,6 +2,7 @@ import { ElementName, MediaPlacement, SmartLinkPosition, SmartLinkSize } from '.
|
|
|
2
2
|
import { extractOwnedBy } from '../../../../../extractors/flexible/utils';
|
|
3
3
|
import { getExtensionKey } from '../../../../../state/helpers';
|
|
4
4
|
import { footerBlockCss, titleBlockCss } from '../styled';
|
|
5
|
+
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
5
6
|
const baseTopMetadata = [{
|
|
6
7
|
name: ElementName.ModifiedOn
|
|
7
8
|
}, {
|
|
@@ -42,6 +43,20 @@ export const getSimulatedBetterMetadata = cardDetails => {
|
|
|
42
43
|
}, ...baseTopMetadata];
|
|
43
44
|
const defaultBottomMetadata = baseBottomMetaData;
|
|
44
45
|
switch (extensionKey) {
|
|
46
|
+
case 'bitbucket-object-provider':
|
|
47
|
+
case 'native-bitbucket-object-provider':
|
|
48
|
+
const isFile = data['@type'].includes('schema:DigitalDocument');
|
|
49
|
+
return {
|
|
50
|
+
titleMetadata: defaultTitleMetadata,
|
|
51
|
+
topMetadata: getBooleanFF('platform.linking-platform.extractor.improve-bitbucket-file-links') && isFile ? [{
|
|
52
|
+
name: ElementName.LatestCommit
|
|
53
|
+
}, {
|
|
54
|
+
name: ElementName.CollaboratorGroup
|
|
55
|
+
}, {
|
|
56
|
+
name: ElementName.ModifiedOn
|
|
57
|
+
}] : defaultTopMetadata,
|
|
58
|
+
bottomMetadata: defaultBottomMetadata
|
|
59
|
+
};
|
|
45
60
|
case 'confluence-object-provider':
|
|
46
61
|
return {
|
|
47
62
|
titleMetadata: defaultTitleMetadata,
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import React, { useCallback } from 'react';
|
|
3
3
|
import { css, jsx } from '@emotion/react';
|
|
4
|
-
import Button from '@atlaskit/button/custom-theme-button';
|
|
5
4
|
import { LoadingButton } from '@atlaskit/button';
|
|
6
|
-
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
7
5
|
import Tooltip from '@atlaskit/tooltip';
|
|
8
6
|
import { SmartLinkSize } from '../../../../../../constants';
|
|
9
7
|
import { sizeToButtonSpacing } from '../../../utils';
|
|
@@ -70,7 +68,7 @@ const ActionButton = ({
|
|
|
70
68
|
content: tooltipMessage,
|
|
71
69
|
hideTooltipOnClick: true,
|
|
72
70
|
testId: `${testId}-tooltip`
|
|
73
|
-
},
|
|
71
|
+
}, jsx(LoadingButton, {
|
|
74
72
|
appearance: appearance,
|
|
75
73
|
iconAfter: iconAfter,
|
|
76
74
|
iconBefore: iconBefore,
|
|
@@ -79,14 +77,6 @@ const ActionButton = ({
|
|
|
79
77
|
onClick: onButtonClick(onClick),
|
|
80
78
|
spacing: sizeToButtonSpacing[size],
|
|
81
79
|
testId: testId
|
|
82
|
-
}, content) : jsx(Button, {
|
|
83
|
-
appearance: appearance,
|
|
84
|
-
iconAfter: iconAfter,
|
|
85
|
-
iconBefore: iconBefore,
|
|
86
|
-
onClick: onButtonClick(onClick),
|
|
87
|
-
spacing: sizeToButtonSpacing[size],
|
|
88
|
-
testId: testId,
|
|
89
|
-
isDisabled: isDisabled
|
|
90
80
|
}, content)));
|
|
91
81
|
};
|
|
92
82
|
export default ActionButton;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ElementName } from '../../constants';
|
|
2
2
|
import { extractType } from '@atlaskit/link-extractors';
|
|
3
3
|
import { extractOwnedBy } from '../../extractors/flexible/utils';
|
|
4
|
+
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
4
5
|
export const getSimulatedMetadata = (extensionKey = '', data) => {
|
|
5
6
|
const types = data ? extractType(data) : undefined;
|
|
6
7
|
switch (extensionKey) {
|
|
@@ -102,6 +103,16 @@ export const getSimulatedBetterMetadata = (extensionKey = '', data) => {
|
|
|
102
103
|
}
|
|
103
104
|
};
|
|
104
105
|
}
|
|
106
|
+
if (getBooleanFF('platform.linking-platform.extractor.improve-bitbucket-file-links') && types !== null && types !== void 0 && types.includes('schema:DigitalDocument')) {
|
|
107
|
+
return {
|
|
108
|
+
...defaultMetadata,
|
|
109
|
+
topMetadataBlock: {
|
|
110
|
+
primary: [ElementName.LatestCommit, ElementName.CollaboratorGroup, ElementName.ModifiedOn],
|
|
111
|
+
secondary: [],
|
|
112
|
+
subtitle: []
|
|
113
|
+
}
|
|
114
|
+
};
|
|
115
|
+
}
|
|
105
116
|
return {
|
|
106
117
|
...defaultMetadata,
|
|
107
118
|
topMetadataBlock: {
|
|
@@ -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.45.
|
|
10
|
+
packageVersion: "26.45.3",
|
|
11
11
|
componentName: 'linkUrl'
|
|
12
12
|
};
|
|
13
13
|
const Link = withLinkClickedEvent('a');
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
2
1
|
import { extractSummary } from '../common/primitives';
|
|
3
2
|
import extractFollowAction from './actions/extract-follow-action';
|
|
4
3
|
import { extractLinkIcon } from './icon';
|
|
@@ -40,7 +39,7 @@ var extractFlexibleUiContext = function extractFlexibleUiContext() {
|
|
|
40
39
|
assignedTo: extractAssignedTo(data),
|
|
41
40
|
createdOn: extractDateCreated(data),
|
|
42
41
|
dueOn: extractDueOn(data),
|
|
43
|
-
followAction:
|
|
42
|
+
followAction: extractFollowAction(response, actionOptions, id),
|
|
44
43
|
previewAction: extractPreviewAction(response, actionOptions),
|
|
45
44
|
viewAction: extractViewAction(data, actionOptions),
|
|
46
45
|
downloadAction: extractDownloadAction(data, actionOptions),
|
|
@@ -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.45.
|
|
18
|
+
packageVersion: "26.45.3"
|
|
19
19
|
};
|
|
20
20
|
export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
21
21
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -2,6 +2,7 @@ import { ElementName, MediaPlacement, SmartLinkPosition, SmartLinkSize } from '.
|
|
|
2
2
|
import { extractOwnedBy } from '../../../../../extractors/flexible/utils';
|
|
3
3
|
import { getExtensionKey } from '../../../../../state/helpers';
|
|
4
4
|
import { footerBlockCss, titleBlockCss } from '../styled';
|
|
5
|
+
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
5
6
|
var baseTopMetadata = [{
|
|
6
7
|
name: ElementName.ModifiedOn
|
|
7
8
|
}, {
|
|
@@ -42,6 +43,20 @@ export var getSimulatedBetterMetadata = function getSimulatedBetterMetadata(card
|
|
|
42
43
|
}].concat(baseTopMetadata);
|
|
43
44
|
var defaultBottomMetadata = baseBottomMetaData;
|
|
44
45
|
switch (extensionKey) {
|
|
46
|
+
case 'bitbucket-object-provider':
|
|
47
|
+
case 'native-bitbucket-object-provider':
|
|
48
|
+
var isFile = data['@type'].includes('schema:DigitalDocument');
|
|
49
|
+
return {
|
|
50
|
+
titleMetadata: defaultTitleMetadata,
|
|
51
|
+
topMetadata: getBooleanFF('platform.linking-platform.extractor.improve-bitbucket-file-links') && isFile ? [{
|
|
52
|
+
name: ElementName.LatestCommit
|
|
53
|
+
}, {
|
|
54
|
+
name: ElementName.CollaboratorGroup
|
|
55
|
+
}, {
|
|
56
|
+
name: ElementName.ModifiedOn
|
|
57
|
+
}] : defaultTopMetadata,
|
|
58
|
+
bottomMetadata: defaultBottomMetadata
|
|
59
|
+
};
|
|
45
60
|
case 'confluence-object-provider':
|
|
46
61
|
return {
|
|
47
62
|
titleMetadata: defaultTitleMetadata,
|
|
@@ -3,9 +3,7 @@ var _templateObject, _templateObject2;
|
|
|
3
3
|
/** @jsx jsx */
|
|
4
4
|
import React, { useCallback } from 'react';
|
|
5
5
|
import { css, jsx } from '@emotion/react';
|
|
6
|
-
import Button from '@atlaskit/button/custom-theme-button';
|
|
7
6
|
import { LoadingButton } from '@atlaskit/button';
|
|
8
|
-
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
9
7
|
import Tooltip from '@atlaskit/tooltip';
|
|
10
8
|
import { SmartLinkSize } from '../../../../../../constants';
|
|
11
9
|
import { sizeToButtonSpacing } from '../../../utils';
|
|
@@ -47,7 +45,7 @@ var ActionButton = function ActionButton(_ref) {
|
|
|
47
45
|
content: tooltipMessage,
|
|
48
46
|
hideTooltipOnClick: true,
|
|
49
47
|
testId: "".concat(testId, "-tooltip")
|
|
50
|
-
},
|
|
48
|
+
}, jsx(LoadingButton, {
|
|
51
49
|
appearance: appearance,
|
|
52
50
|
iconAfter: iconAfter,
|
|
53
51
|
iconBefore: iconBefore,
|
|
@@ -56,14 +54,6 @@ var ActionButton = function ActionButton(_ref) {
|
|
|
56
54
|
onClick: onButtonClick(onClick),
|
|
57
55
|
spacing: sizeToButtonSpacing[size],
|
|
58
56
|
testId: testId
|
|
59
|
-
}, content) : jsx(Button, {
|
|
60
|
-
appearance: appearance,
|
|
61
|
-
iconAfter: iconAfter,
|
|
62
|
-
iconBefore: iconBefore,
|
|
63
|
-
onClick: onButtonClick(onClick),
|
|
64
|
-
spacing: sizeToButtonSpacing[size],
|
|
65
|
-
testId: testId,
|
|
66
|
-
isDisabled: isDisabled
|
|
67
57
|
}, content)));
|
|
68
58
|
};
|
|
69
59
|
export default ActionButton;
|
|
@@ -4,6 +4,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
4
4
|
import { ElementName } from '../../constants';
|
|
5
5
|
import { extractType } from '@atlaskit/link-extractors';
|
|
6
6
|
import { extractOwnedBy } from '../../extractors/flexible/utils';
|
|
7
|
+
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
7
8
|
export var getSimulatedMetadata = function getSimulatedMetadata() {
|
|
8
9
|
var extensionKey = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
9
10
|
var data = arguments.length > 1 ? arguments[1] : undefined;
|
|
@@ -108,6 +109,15 @@ export var getSimulatedBetterMetadata = function getSimulatedBetterMetadata() {
|
|
|
108
109
|
}
|
|
109
110
|
});
|
|
110
111
|
}
|
|
112
|
+
if (getBooleanFF('platform.linking-platform.extractor.improve-bitbucket-file-links') && types !== null && types !== void 0 && types.includes('schema:DigitalDocument')) {
|
|
113
|
+
return _objectSpread(_objectSpread({}, defaultMetadata), {}, {
|
|
114
|
+
topMetadataBlock: {
|
|
115
|
+
primary: [ElementName.LatestCommit, ElementName.CollaboratorGroup, ElementName.ModifiedOn],
|
|
116
|
+
secondary: [],
|
|
117
|
+
subtitle: []
|
|
118
|
+
}
|
|
119
|
+
});
|
|
120
|
+
}
|
|
111
121
|
return _objectSpread(_objectSpread({}, defaultMetadata), {}, {
|
|
112
122
|
topMetadataBlock: {
|
|
113
123
|
primary: [ElementName.AuthorGroup, ElementName.ModifiedOn],
|
|
@@ -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.45.
|
|
13
|
+
packageVersion: "26.45.3",
|
|
14
14
|
componentName: 'linkUrl'
|
|
15
15
|
};
|
|
16
16
|
var Link = withLinkClickedEvent('a');
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
import { JsonLd } from 'json-ld-types';
|
|
2
|
-
export
|
|
2
|
+
export type LinkTypeLatestCommit = JsonLd.Data.SourceCodeDocument | JsonLd.Data.SourceCodeRepository;
|
|
3
|
+
export declare const extractLatestCommit: (jsonLd: LinkTypeLatestCommit) => string | undefined;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
import { JsonLd } from 'json-ld-types';
|
|
2
|
-
export
|
|
2
|
+
export type LinkTypeLatestCommit = JsonLd.Data.SourceCodeDocument | JsonLd.Data.SourceCodeRepository;
|
|
3
|
+
export declare const extractLatestCommit: (jsonLd: LinkTypeLatestCommit) => string | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/smart-card",
|
|
3
|
-
"version": "26.45.
|
|
3
|
+
"version": "26.45.3",
|
|
4
4
|
"description": "Smart card component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -41,14 +41,14 @@
|
|
|
41
41
|
"@atlaskit/link-client-extension": "^1.8.0",
|
|
42
42
|
"@atlaskit/link-extractors": "^1.2.0",
|
|
43
43
|
"@atlaskit/linking-common": "^5.3.0",
|
|
44
|
-
"@atlaskit/linking-types": "^8.
|
|
44
|
+
"@atlaskit/linking-types": "^8.6.0",
|
|
45
45
|
"@atlaskit/logo": "^13.15.0",
|
|
46
46
|
"@atlaskit/lozenge": "^11.6.0",
|
|
47
47
|
"@atlaskit/modal-dialog": "^12.10.0",
|
|
48
48
|
"@atlaskit/outbound-auth-flow-client": "^3.4.0",
|
|
49
49
|
"@atlaskit/platform-feature-flags": "^0.2.1",
|
|
50
50
|
"@atlaskit/popup": "^1.11.0",
|
|
51
|
-
"@atlaskit/primitives": "^1.
|
|
51
|
+
"@atlaskit/primitives": "^1.19.0",
|
|
52
52
|
"@atlaskit/spinner": "^16.0.0",
|
|
53
53
|
"@atlaskit/theme": "^12.6.0",
|
|
54
54
|
"@atlaskit/tokens": "^1.34.0",
|
|
@@ -137,9 +137,6 @@
|
|
|
137
137
|
".": "./src/index.ts"
|
|
138
138
|
},
|
|
139
139
|
"platform-feature-flags": {
|
|
140
|
-
"platform.linking-platform.smart-card.follow-button": {
|
|
141
|
-
"type": "boolean"
|
|
142
|
-
},
|
|
143
140
|
"platform.linking-platform.smart-card.fix-is-trusted-pop": {
|
|
144
141
|
"type": "boolean"
|
|
145
142
|
},
|
|
@@ -152,6 +149,9 @@
|
|
|
152
149
|
"platform.editor.show-embed-card-frame-renderer": {
|
|
153
150
|
"type": "boolean"
|
|
154
151
|
},
|
|
152
|
+
"platform.linking-platform.extractor.improve-bitbucket-file-links": {
|
|
153
|
+
"type": "boolean"
|
|
154
|
+
},
|
|
155
155
|
"platform.linking-platform.smart-card.disable-jira-status-action": {
|
|
156
156
|
"type": "boolean"
|
|
157
157
|
}
|