@atlaskit/smart-card 26.29.0 → 26.30.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 +6 -0
- package/dist/cjs/state/analytics/useSmartLinkAnalytics.js +4 -5
- package/dist/cjs/utils/analytics/LinkAnalyticsContext.js +1 -3
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/utils/mocks.js +4 -3
- package/dist/cjs/view/BlockCard/views/ResolvedView.js +1 -2
- package/dist/cjs/view/BlockCard/views/flexible/FlexibleResolvedView.js +1 -2
- package/dist/cjs/view/FlexibleCard/components/blocks/action-group/index.js +1 -2
- package/dist/cjs/view/FlexibleCard/components/elements/icon/index.js +6 -6
- package/dist/cjs/view/HoverCard/components/views/resolved/index.js +0 -3
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/es2019/state/analytics/useSmartLinkAnalytics.js +1 -2
- package/dist/es2019/utils/analytics/LinkAnalyticsContext.js +0 -1
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/utils/mocks.js +3 -0
- package/dist/es2019/view/BlockCard/views/ResolvedView.js +1 -2
- package/dist/es2019/view/BlockCard/views/flexible/FlexibleResolvedView.js +0 -1
- package/dist/es2019/view/FlexibleCard/components/blocks/action-group/index.js +1 -2
- package/dist/es2019/view/FlexibleCard/components/elements/icon/index.js +6 -6
- package/dist/es2019/view/HoverCard/components/views/resolved/index.js +0 -2
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/esm/state/analytics/useSmartLinkAnalytics.js +4 -5
- package/dist/esm/utils/analytics/LinkAnalyticsContext.js +1 -3
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/utils/mocks.js +4 -3
- package/dist/esm/view/BlockCard/views/ResolvedView.js +1 -2
- package/dist/esm/view/BlockCard/views/flexible/FlexibleResolvedView.js +1 -2
- package/dist/esm/view/FlexibleCard/components/blocks/action-group/index.js +1 -2
- package/dist/esm/view/FlexibleCard/components/elements/icon/index.js +6 -6
- package/dist/esm/view/HoverCard/components/views/resolved/index.js +0 -3
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/types/state/analytics/useSmartLinkAnalytics.d.ts +3 -5
- package/dist/types/state/hooks/useSmartLink.d.ts +2 -4
- package/dist/types/utils/analytics/LinkAnalyticsContext.d.ts +1 -1
- package/dist/types/utils/mocks.d.ts +2 -4
- package/dist/types/view/BlockCard/views/ResolvedView.d.ts +1 -1
- package/dist/types-ts4.5/state/analytics/useSmartLinkAnalytics.d.ts +3 -5
- package/dist/types-ts4.5/state/hooks/useSmartLink.d.ts +2 -4
- package/dist/types-ts4.5/utils/analytics/LinkAnalyticsContext.d.ts +1 -1
- package/dist/types-ts4.5/utils/mocks.d.ts +2 -4
- package/dist/types-ts4.5/view/BlockCard/views/ResolvedView.d.ts +1 -1
- package/package.json +2 -1
- package/report.api.md +1 -6
- package/tmp/api-report-tmp.d.ts +2 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @atlaskit/smart-card
|
|
2
2
|
|
|
3
|
+
## 26.30.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#40776](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/40776) [`4f644544016`](https://bitbucket.org/atlassian/atlassian-frontend/commits/4f644544016) - Remove unused variables to fix TS errors in Federated Frontend Repo
|
|
8
|
+
|
|
3
9
|
## 26.29.0
|
|
4
10
|
|
|
5
11
|
### Minor Changes
|
|
@@ -21,10 +21,10 @@ var applyCommonAttributes = function applyCommonAttributes(event, commonAttribut
|
|
|
21
21
|
if (event && event.attributes) {
|
|
22
22
|
for (var _i = 0, _Object$entries = Object.entries(commonAttributes); _i < _Object$entries.length; _i++) {
|
|
23
23
|
var _Object$entries$_i = (0, _slicedToArray2.default)(_Object$entries[_i], 2),
|
|
24
|
-
|
|
24
|
+
key = _Object$entries$_i[0],
|
|
25
25
|
value = _Object$entries$_i[1];
|
|
26
|
-
if (event.attributes[
|
|
27
|
-
event.attributes[
|
|
26
|
+
if (event.attributes[key] === undefined) {
|
|
27
|
+
event.attributes[key] = value;
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
}
|
|
@@ -261,7 +261,6 @@ var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, _dispatchAnalyti
|
|
|
261
261
|
var id = _ref6.id,
|
|
262
262
|
actionType = _ref6.actionType,
|
|
263
263
|
display = _ref6.display,
|
|
264
|
-
invokeType = _ref6.invokeType,
|
|
265
264
|
overrideExtensionKey = _ref6.extensionKey,
|
|
266
265
|
definitionId = _ref6.definitionId,
|
|
267
266
|
resourceType = _ref6.resourceType,
|
|
@@ -758,7 +757,7 @@ var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, _dispatchAnalyti
|
|
|
758
757
|
* Removed in EDM-5153: This is an even from an experiment.
|
|
759
758
|
* @deprecated
|
|
760
759
|
*/
|
|
761
|
-
linkUpdated: function linkUpdated(
|
|
760
|
+
linkUpdated: function linkUpdated() {},
|
|
762
761
|
/**
|
|
763
762
|
* This fires a tracking event before an action invoke api call is made
|
|
764
763
|
*/
|
|
@@ -11,9 +11,7 @@ var _analyticsNext = require("@atlaskit/analytics-next");
|
|
|
11
11
|
* Provides an analytics context to supply attributes to events based on a URL
|
|
12
12
|
*/
|
|
13
13
|
var LinkAnalyticsContext = function LinkAnalyticsContext(_ref) {
|
|
14
|
-
var
|
|
15
|
-
url = _ref$url === void 0 ? '' : _ref$url,
|
|
16
|
-
display = _ref.display,
|
|
14
|
+
var display = _ref.display,
|
|
17
15
|
id = _ref.id,
|
|
18
16
|
children = _ref.children,
|
|
19
17
|
source = _ref.source;
|
|
@@ -23,7 +23,7 @@ exports.ANALYTICS_CHANNEL = ANALYTICS_CHANNEL;
|
|
|
23
23
|
var context = {
|
|
24
24
|
componentName: 'smart-cards',
|
|
25
25
|
packageName: "@atlaskit/smart-card",
|
|
26
|
-
packageVersion: "26.
|
|
26
|
+
packageVersion: "26.30.0"
|
|
27
27
|
};
|
|
28
28
|
exports.context = context;
|
|
29
29
|
var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
package/dist/cjs/utils/mocks.js
CHANGED
|
@@ -208,7 +208,8 @@ var fakeFactory = function fakeFactory(implementation, implementationPost, imple
|
|
|
208
208
|
}
|
|
209
209
|
(0, _createClass2.default)(CustomClient, [{
|
|
210
210
|
key: "fetchData",
|
|
211
|
-
value:
|
|
211
|
+
value: // @ts-ignore
|
|
212
|
+
function () {
|
|
212
213
|
var _fetchData = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(url) {
|
|
213
214
|
return _regenerator.default.wrap(function _callee$(_context) {
|
|
214
215
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -227,7 +228,7 @@ var fakeFactory = function fakeFactory(implementation, implementationPost, imple
|
|
|
227
228
|
return _fetchData.apply(this, arguments);
|
|
228
229
|
}
|
|
229
230
|
return fetchData;
|
|
230
|
-
}()
|
|
231
|
+
}() // @ts-ignore
|
|
231
232
|
}, {
|
|
232
233
|
key: "postData",
|
|
233
234
|
value: function () {
|
|
@@ -249,7 +250,7 @@ var fakeFactory = function fakeFactory(implementation, implementationPost, imple
|
|
|
249
250
|
return _postData.apply(this, arguments);
|
|
250
251
|
}
|
|
251
252
|
return postData;
|
|
252
|
-
}()
|
|
253
|
+
}() // @ts-ignore
|
|
253
254
|
}, {
|
|
254
255
|
key: "prefetchData",
|
|
255
256
|
value: function () {
|
|
@@ -63,8 +63,7 @@ var ResolvedView = function ResolvedView(_ref) {
|
|
|
63
63
|
_ref$testId = _ref.testId,
|
|
64
64
|
testId = _ref$testId === void 0 ? 'block-card-resolved-view' : _ref$testId,
|
|
65
65
|
_ref$showActions = _ref.showActions,
|
|
66
|
-
showActions = _ref$showActions === void 0 ? true : _ref$showActions
|
|
67
|
-
isSupportTheming = _ref.isSupportTheming;
|
|
66
|
+
showActions = _ref$showActions === void 0 ? true : _ref$showActions;
|
|
68
67
|
var resolvedMetadata = details.length > 0 ? (0, _react.jsx)(_MetadataList.MetadataList, {
|
|
69
68
|
testId: testId ? "".concat(testId, "-meta") : undefined,
|
|
70
69
|
items: details
|
|
@@ -24,8 +24,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
24
24
|
* @see FlexibleCardProps
|
|
25
25
|
*/
|
|
26
26
|
var FlexibleResolvedView = function FlexibleResolvedView(_ref) {
|
|
27
|
-
var
|
|
28
|
-
cardState = _ref.cardState,
|
|
27
|
+
var cardState = _ref.cardState,
|
|
29
28
|
onClick = _ref.onClick,
|
|
30
29
|
onError = _ref.onError,
|
|
31
30
|
onResolve = _ref.onResolve,
|
|
@@ -60,8 +60,7 @@ var ActionGroup = function ActionGroup(_ref) {
|
|
|
60
60
|
appearance = _ref.appearance,
|
|
61
61
|
_ref$visibleButtonsNu = _ref.visibleButtonsNum,
|
|
62
62
|
visibleButtonsNum = _ref$visibleButtonsNu === void 0 ? 2 : _ref$visibleButtonsNu,
|
|
63
|
-
onDropdownOpenChange = _ref.onDropdownOpenChange
|
|
64
|
-
testId = _ref.testId;
|
|
63
|
+
onDropdownOpenChange = _ref.onDropdownOpenChange;
|
|
65
64
|
var context = (0, _flexibleUiContext.useFlexibleUiContext)();
|
|
66
65
|
var ui = (0, _flexibleUiContext.useFlexibleUiOptionContext)();
|
|
67
66
|
var _useState = (0, _react.useState)(false),
|
|
@@ -18,7 +18,7 @@ var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
|
18
18
|
/** @jsx jsx */
|
|
19
19
|
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); }
|
|
20
20
|
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; }
|
|
21
|
-
var getPositionStyles = function getPositionStyles(
|
|
21
|
+
var getPositionStyles = function getPositionStyles(position) {
|
|
22
22
|
switch (position) {
|
|
23
23
|
case _constants.SmartLinkPosition.Center:
|
|
24
24
|
return (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n align-self: center;\n "])));
|
|
@@ -27,8 +27,8 @@ var getPositionStyles = function getPositionStyles(size, position) {
|
|
|
27
27
|
return (0, _react2.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n align-self: flex-start;\n margin: 0;\n "])));
|
|
28
28
|
}
|
|
29
29
|
};
|
|
30
|
-
var getIconStyles = function getIconStyles(
|
|
31
|
-
return (0, _react2.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n ", "\n ", "\n"])), getPositionStyles(
|
|
30
|
+
var getIconStyles = function getIconStyles(position, width) {
|
|
31
|
+
return (0, _react2.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n ", "\n ", "\n"])), getPositionStyles(position), (0, _utils.getIconSizeStyles)(width));
|
|
32
32
|
};
|
|
33
33
|
var getCustomRenderStyles = function getCustomRenderStyles(value) {
|
|
34
34
|
return (0, _react2.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n ", "\n line-height: ", ";\n font-size: ", ";\n text-align: center;\n text-overflow: clip;\n -webkit-box-orient: unset;\n span {\n margin: 0;\n padding: 0;\n vertical-align: baseline;\n }\n"])), (0, _utils.getTruncateStyles)(1, value), value, value);
|
|
@@ -48,7 +48,7 @@ var renderDefaultIcon = function renderDefaultIcon(label, testId) {
|
|
|
48
48
|
testId: "".concat(testId, "-default")
|
|
49
49
|
});
|
|
50
50
|
};
|
|
51
|
-
var renderImageIcon = function renderImageIcon(defaultIcon,
|
|
51
|
+
var renderImageIcon = function renderImageIcon(defaultIcon, url, testId) {
|
|
52
52
|
if (url) {
|
|
53
53
|
return (0, _react2.jsx)(_imageIcon.default, {
|
|
54
54
|
defaultIcon: defaultIcon,
|
|
@@ -80,10 +80,10 @@ var Icon = function Icon(_ref) {
|
|
|
80
80
|
url = _ref.url;
|
|
81
81
|
var element = (0, _react.useMemo)(function () {
|
|
82
82
|
var defaultIcon = renderDefaultIcon(label, testId);
|
|
83
|
-
return (render === null || render === void 0 ? void 0 : render()) || renderImageIcon(defaultIcon,
|
|
83
|
+
return (render === null || render === void 0 ? void 0 : render()) || renderImageIcon(defaultIcon, url, testId) || renderAtlaskitIcon(icon, label, testId) || defaultIcon;
|
|
84
84
|
}, [icon, label, render, testId, url]);
|
|
85
85
|
var width = (0, _utils.getIconWidth)(size);
|
|
86
|
-
var styles = getIconStyles(
|
|
86
|
+
var styles = getIconStyles(position, width);
|
|
87
87
|
var renderStyles = render ? getCustomRenderStyles(width) : undefined;
|
|
88
88
|
return (0, _react2.jsx)("div", {
|
|
89
89
|
css: [styles, renderStyles, overrideCss],
|
|
@@ -62,9 +62,6 @@ var HoverCardResolvedView = function HoverCardResolvedView(_ref) {
|
|
|
62
62
|
var flexibleCardProps = _ref.flexibleCardProps,
|
|
63
63
|
titleBlockProps = _ref.titleBlockProps,
|
|
64
64
|
analytics = _ref.analytics,
|
|
65
|
-
_ref$id = _ref.id,
|
|
66
|
-
id = _ref$id === void 0 ? '' : _ref$id,
|
|
67
|
-
url = _ref.url,
|
|
68
65
|
cardState = _ref.cardState,
|
|
69
66
|
_ref$cardActions = _ref.cardActions,
|
|
70
67
|
cardActions = _ref$cardActions === void 0 ? [] : _ref$cardActions,
|
|
@@ -18,7 +18,7 @@ var _excluded = ["href", "children", "checkSafety", "onClick", "testId"],
|
|
|
18
18
|
_excluded2 = ["isLinkSafe", "showSafetyWarningModal"];
|
|
19
19
|
var PACKAGE_DATA = {
|
|
20
20
|
packageName: "@atlaskit/smart-card",
|
|
21
|
-
packageVersion: "26.
|
|
21
|
+
packageVersion: "26.30.0",
|
|
22
22
|
componentName: 'linkUrl'
|
|
23
23
|
};
|
|
24
24
|
var Link = (0, _click.withLinkClickedEvent)('a');
|
|
@@ -242,7 +242,6 @@ export const useSmartLinkAnalytics = (url, _dispatchAnalytics, id, defaultLocati
|
|
|
242
242
|
id,
|
|
243
243
|
actionType,
|
|
244
244
|
display,
|
|
245
|
-
invokeType,
|
|
246
245
|
extensionKey: overrideExtensionKey,
|
|
247
246
|
definitionId,
|
|
248
247
|
resourceType,
|
|
@@ -735,7 +734,7 @@ export const useSmartLinkAnalytics = (url, _dispatchAnalytics, id, defaultLocati
|
|
|
735
734
|
* Removed in EDM-5153: This is an even from an experiment.
|
|
736
735
|
* @deprecated
|
|
737
736
|
*/
|
|
738
|
-
linkUpdated:
|
|
737
|
+
linkUpdated: () => {},
|
|
739
738
|
/**
|
|
740
739
|
* This fires a tracking event before an action invoke api call is made
|
|
741
740
|
*/
|
|
@@ -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.30.0"
|
|
8
8
|
};
|
|
9
9
|
export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
10
10
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -175,12 +175,15 @@ export const mocks = {
|
|
|
175
175
|
};
|
|
176
176
|
export const fakeResponse = () => Promise.resolve(mocks.success);
|
|
177
177
|
export const fakeFactory = (implementation, implementationPost, implementationPrefetch) => class CustomClient extends CardClient {
|
|
178
|
+
// @ts-ignore
|
|
178
179
|
async fetchData(url) {
|
|
179
180
|
return await implementation(url);
|
|
180
181
|
}
|
|
182
|
+
// @ts-ignore
|
|
181
183
|
async postData() {
|
|
182
184
|
return await implementationPost();
|
|
183
185
|
}
|
|
186
|
+
// @ts-ignore
|
|
184
187
|
async prefetchData() {
|
|
185
188
|
return await implementationPrefetch();
|
|
186
189
|
}
|
|
@@ -39,8 +39,7 @@ export const ResolvedView = ({
|
|
|
39
39
|
lozenge,
|
|
40
40
|
details = [],
|
|
41
41
|
testId = 'block-card-resolved-view',
|
|
42
|
-
showActions = true
|
|
43
|
-
isSupportTheming
|
|
42
|
+
showActions = true
|
|
44
43
|
}) => {
|
|
45
44
|
const resolvedMetadata = details.length > 0 ? jsx(MetadataList, {
|
|
46
45
|
testId: testId ? `${testId}-meta` : undefined,
|
|
@@ -6,7 +6,7 @@ import { SmartLinkPosition, SmartLinkSize } from '../../../../../constants';
|
|
|
6
6
|
import AtlaskitIcon from '../../common/atlaskit-icon';
|
|
7
7
|
import ImageIcon from '../../common/image-icon';
|
|
8
8
|
import { getIconSizeStyles, getIconWidth, getTruncateStyles } from '../../utils';
|
|
9
|
-
const getPositionStyles =
|
|
9
|
+
const getPositionStyles = position => {
|
|
10
10
|
switch (position) {
|
|
11
11
|
case SmartLinkPosition.Center:
|
|
12
12
|
return css`
|
|
@@ -20,8 +20,8 @@ const getPositionStyles = (size, position) => {
|
|
|
20
20
|
`;
|
|
21
21
|
}
|
|
22
22
|
};
|
|
23
|
-
const getIconStyles = (
|
|
24
|
-
${getPositionStyles(
|
|
23
|
+
const getIconStyles = (position, width) => css`
|
|
24
|
+
${getPositionStyles(position)}
|
|
25
25
|
${getIconSizeStyles(width)}
|
|
26
26
|
`;
|
|
27
27
|
const getCustomRenderStyles = value => css`
|
|
@@ -50,7 +50,7 @@ const renderDefaultIcon = (label, testId) => jsx(LinkIcon, {
|
|
|
50
50
|
label: label,
|
|
51
51
|
testId: `${testId}-default`
|
|
52
52
|
});
|
|
53
|
-
const renderImageIcon = (defaultIcon,
|
|
53
|
+
const renderImageIcon = (defaultIcon, url, testId) => {
|
|
54
54
|
if (url) {
|
|
55
55
|
return jsx(ImageIcon, {
|
|
56
56
|
defaultIcon: defaultIcon,
|
|
@@ -79,10 +79,10 @@ const Icon = ({
|
|
|
79
79
|
}) => {
|
|
80
80
|
const element = useMemo(() => {
|
|
81
81
|
const defaultIcon = renderDefaultIcon(label, testId);
|
|
82
|
-
return (render === null || render === void 0 ? void 0 : render()) || renderImageIcon(defaultIcon,
|
|
82
|
+
return (render === null || render === void 0 ? void 0 : render()) || renderImageIcon(defaultIcon, url, testId) || renderAtlaskitIcon(icon, label, testId) || defaultIcon;
|
|
83
83
|
}, [icon, label, render, testId, url]);
|
|
84
84
|
const width = getIconWidth(size);
|
|
85
|
-
const styles = getIconStyles(
|
|
85
|
+
const styles = getIconStyles(position, width);
|
|
86
86
|
const renderStyles = render ? getCustomRenderStyles(width) : undefined;
|
|
87
87
|
return jsx("div", {
|
|
88
88
|
css: [styles, renderStyles, overrideCss],
|
|
@@ -8,7 +8,7 @@ import LinkWarningModal from './LinkWarningModal';
|
|
|
8
8
|
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
9
9
|
const PACKAGE_DATA = {
|
|
10
10
|
packageName: "@atlaskit/smart-card",
|
|
11
|
-
packageVersion: "26.
|
|
11
|
+
packageVersion: "26.30.0",
|
|
12
12
|
componentName: 'linkUrl'
|
|
13
13
|
};
|
|
14
14
|
const Link = withLinkClickedEvent('a');
|
|
@@ -14,10 +14,10 @@ var applyCommonAttributes = function applyCommonAttributes(event, commonAttribut
|
|
|
14
14
|
if (event && event.attributes) {
|
|
15
15
|
for (var _i = 0, _Object$entries = Object.entries(commonAttributes); _i < _Object$entries.length; _i++) {
|
|
16
16
|
var _Object$entries$_i = _slicedToArray(_Object$entries[_i], 2),
|
|
17
|
-
|
|
17
|
+
key = _Object$entries$_i[0],
|
|
18
18
|
value = _Object$entries$_i[1];
|
|
19
|
-
if (event.attributes[
|
|
20
|
-
event.attributes[
|
|
19
|
+
if (event.attributes[key] === undefined) {
|
|
20
|
+
event.attributes[key] = value;
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
23
|
}
|
|
@@ -254,7 +254,6 @@ export var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, _dispatch
|
|
|
254
254
|
var id = _ref6.id,
|
|
255
255
|
actionType = _ref6.actionType,
|
|
256
256
|
display = _ref6.display,
|
|
257
|
-
invokeType = _ref6.invokeType,
|
|
258
257
|
overrideExtensionKey = _ref6.extensionKey,
|
|
259
258
|
definitionId = _ref6.definitionId,
|
|
260
259
|
resourceType = _ref6.resourceType,
|
|
@@ -751,7 +750,7 @@ export var useSmartLinkAnalytics = function useSmartLinkAnalytics(url, _dispatch
|
|
|
751
750
|
* Removed in EDM-5153: This is an even from an experiment.
|
|
752
751
|
* @deprecated
|
|
753
752
|
*/
|
|
754
|
-
linkUpdated: function linkUpdated(
|
|
753
|
+
linkUpdated: function linkUpdated() {},
|
|
755
754
|
/**
|
|
756
755
|
* This fires a tracking event before an action invoke api call is made
|
|
757
756
|
*/
|
|
@@ -4,9 +4,7 @@ import { AnalyticsContext } from '@atlaskit/analytics-next';
|
|
|
4
4
|
* Provides an analytics context to supply attributes to events based on a URL
|
|
5
5
|
*/
|
|
6
6
|
export var LinkAnalyticsContext = function LinkAnalyticsContext(_ref) {
|
|
7
|
-
var
|
|
8
|
-
url = _ref$url === void 0 ? '' : _ref$url,
|
|
9
|
-
display = _ref.display,
|
|
7
|
+
var display = _ref.display,
|
|
10
8
|
id = _ref.id,
|
|
11
9
|
children = _ref.children,
|
|
12
10
|
source = _ref.source;
|
|
@@ -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.30.0"
|
|
19
19
|
};
|
|
20
20
|
export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
21
21
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
package/dist/esm/utils/mocks.js
CHANGED
|
@@ -197,7 +197,8 @@ export var fakeFactory = function fakeFactory(implementation, implementationPost
|
|
|
197
197
|
}
|
|
198
198
|
_createClass(CustomClient, [{
|
|
199
199
|
key: "fetchData",
|
|
200
|
-
value:
|
|
200
|
+
value: // @ts-ignore
|
|
201
|
+
function () {
|
|
201
202
|
var _fetchData = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(url) {
|
|
202
203
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
203
204
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -216,7 +217,7 @@ export var fakeFactory = function fakeFactory(implementation, implementationPost
|
|
|
216
217
|
return _fetchData.apply(this, arguments);
|
|
217
218
|
}
|
|
218
219
|
return fetchData;
|
|
219
|
-
}()
|
|
220
|
+
}() // @ts-ignore
|
|
220
221
|
}, {
|
|
221
222
|
key: "postData",
|
|
222
223
|
value: function () {
|
|
@@ -238,7 +239,7 @@ export var fakeFactory = function fakeFactory(implementation, implementationPost
|
|
|
238
239
|
return _postData.apply(this, arguments);
|
|
239
240
|
}
|
|
240
241
|
return postData;
|
|
241
|
-
}()
|
|
242
|
+
}() // @ts-ignore
|
|
242
243
|
}, {
|
|
243
244
|
key: "prefetchData",
|
|
244
245
|
value: function () {
|
|
@@ -53,8 +53,7 @@ export var ResolvedView = function ResolvedView(_ref) {
|
|
|
53
53
|
_ref$testId = _ref.testId,
|
|
54
54
|
testId = _ref$testId === void 0 ? 'block-card-resolved-view' : _ref$testId,
|
|
55
55
|
_ref$showActions = _ref.showActions,
|
|
56
|
-
showActions = _ref$showActions === void 0 ? true : _ref$showActions
|
|
57
|
-
isSupportTheming = _ref.isSupportTheming;
|
|
56
|
+
showActions = _ref$showActions === void 0 ? true : _ref$showActions;
|
|
58
57
|
var resolvedMetadata = details.length > 0 ? jsx(MetadataList, {
|
|
59
58
|
testId: testId ? "".concat(testId, "-meta") : undefined,
|
|
60
59
|
items: details
|
|
@@ -14,8 +14,7 @@ import { withFlexibleUIBlockCardStyle } from './utils/withFlexibleUIBlockCardSty
|
|
|
14
14
|
* @see FlexibleCardProps
|
|
15
15
|
*/
|
|
16
16
|
var FlexibleResolvedView = function FlexibleResolvedView(_ref) {
|
|
17
|
-
var
|
|
18
|
-
cardState = _ref.cardState,
|
|
17
|
+
var cardState = _ref.cardState,
|
|
19
18
|
onClick = _ref.onClick,
|
|
20
19
|
onError = _ref.onError,
|
|
21
20
|
onResolve = _ref.onResolve,
|
|
@@ -53,8 +53,7 @@ var ActionGroup = function ActionGroup(_ref) {
|
|
|
53
53
|
appearance = _ref.appearance,
|
|
54
54
|
_ref$visibleButtonsNu = _ref.visibleButtonsNum,
|
|
55
55
|
visibleButtonsNum = _ref$visibleButtonsNu === void 0 ? 2 : _ref$visibleButtonsNu,
|
|
56
|
-
onDropdownOpenChange = _ref.onDropdownOpenChange
|
|
57
|
-
testId = _ref.testId;
|
|
56
|
+
onDropdownOpenChange = _ref.onDropdownOpenChange;
|
|
58
57
|
var context = useFlexibleUiContext();
|
|
59
58
|
var ui = useFlexibleUiOptionContext();
|
|
60
59
|
var _useState = useState(false),
|
|
@@ -8,7 +8,7 @@ import { SmartLinkPosition, SmartLinkSize } from '../../../../../constants';
|
|
|
8
8
|
import AtlaskitIcon from '../../common/atlaskit-icon';
|
|
9
9
|
import ImageIcon from '../../common/image-icon';
|
|
10
10
|
import { getIconSizeStyles, getIconWidth, getTruncateStyles } from '../../utils';
|
|
11
|
-
var getPositionStyles = function getPositionStyles(
|
|
11
|
+
var getPositionStyles = function getPositionStyles(position) {
|
|
12
12
|
switch (position) {
|
|
13
13
|
case SmartLinkPosition.Center:
|
|
14
14
|
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n align-self: center;\n "])));
|
|
@@ -17,8 +17,8 @@ var getPositionStyles = function getPositionStyles(size, position) {
|
|
|
17
17
|
return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n align-self: flex-start;\n margin: 0;\n "])));
|
|
18
18
|
}
|
|
19
19
|
};
|
|
20
|
-
var getIconStyles = function getIconStyles(
|
|
21
|
-
return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n ", "\n ", "\n"])), getPositionStyles(
|
|
20
|
+
var getIconStyles = function getIconStyles(position, width) {
|
|
21
|
+
return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n ", "\n ", "\n"])), getPositionStyles(position), getIconSizeStyles(width));
|
|
22
22
|
};
|
|
23
23
|
var getCustomRenderStyles = function getCustomRenderStyles(value) {
|
|
24
24
|
return css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n ", "\n line-height: ", ";\n font-size: ", ";\n text-align: center;\n text-overflow: clip;\n -webkit-box-orient: unset;\n span {\n margin: 0;\n padding: 0;\n vertical-align: baseline;\n }\n"])), getTruncateStyles(1, value), value, value);
|
|
@@ -38,7 +38,7 @@ var renderDefaultIcon = function renderDefaultIcon(label, testId) {
|
|
|
38
38
|
testId: "".concat(testId, "-default")
|
|
39
39
|
});
|
|
40
40
|
};
|
|
41
|
-
var renderImageIcon = function renderImageIcon(defaultIcon,
|
|
41
|
+
var renderImageIcon = function renderImageIcon(defaultIcon, url, testId) {
|
|
42
42
|
if (url) {
|
|
43
43
|
return jsx(ImageIcon, {
|
|
44
44
|
defaultIcon: defaultIcon,
|
|
@@ -70,10 +70,10 @@ var Icon = function Icon(_ref) {
|
|
|
70
70
|
url = _ref.url;
|
|
71
71
|
var element = useMemo(function () {
|
|
72
72
|
var defaultIcon = renderDefaultIcon(label, testId);
|
|
73
|
-
return (render === null || render === void 0 ? void 0 : render()) || renderImageIcon(defaultIcon,
|
|
73
|
+
return (render === null || render === void 0 ? void 0 : render()) || renderImageIcon(defaultIcon, url, testId) || renderAtlaskitIcon(icon, label, testId) || defaultIcon;
|
|
74
74
|
}, [icon, label, render, testId, url]);
|
|
75
75
|
var width = getIconWidth(size);
|
|
76
|
-
var styles = getIconStyles(
|
|
76
|
+
var styles = getIconStyles(position, width);
|
|
77
77
|
var renderStyles = render ? getCustomRenderStyles(width) : undefined;
|
|
78
78
|
return jsx("div", {
|
|
79
79
|
css: [styles, renderStyles, overrideCss],
|
|
@@ -51,9 +51,6 @@ var HoverCardResolvedView = function HoverCardResolvedView(_ref) {
|
|
|
51
51
|
var flexibleCardProps = _ref.flexibleCardProps,
|
|
52
52
|
titleBlockProps = _ref.titleBlockProps,
|
|
53
53
|
analytics = _ref.analytics,
|
|
54
|
-
_ref$id = _ref.id,
|
|
55
|
-
id = _ref$id === void 0 ? '' : _ref$id,
|
|
56
|
-
url = _ref.url,
|
|
57
54
|
cardState = _ref.cardState,
|
|
58
55
|
_ref$cardActions = _ref.cardActions,
|
|
59
56
|
cardActions = _ref$cardActions === void 0 ? [] : _ref$cardActions,
|
|
@@ -11,7 +11,7 @@ import LinkWarningModal from './LinkWarningModal';
|
|
|
11
11
|
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
12
12
|
var PACKAGE_DATA = {
|
|
13
13
|
packageName: "@atlaskit/smart-card",
|
|
14
|
-
packageVersion: "26.
|
|
14
|
+
packageVersion: "26.30.0",
|
|
15
15
|
componentName: 'linkUrl'
|
|
16
16
|
};
|
|
17
17
|
var Link = withLinkClickedEvent('a');
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AnalyticsHandler, AnalyticsName, AnalyticsPayload } from '../../utils/types';
|
|
2
|
-
import {
|
|
2
|
+
import { ConnectFailedEventProps, ConnectSucceededEventProps, InstrumentEventProps, InvokeFailedEventProps, InvokeSucceededEventProps, ScreenAuthPopupEventProps, TrackAppAccountConnectedProps, UiActionClickedEventProps, UiAuthAlternateAccountEventProps, UiAuthEventProps, UiCardClickedEventProps, UiClosedAuthEventProps, UiHoverCardDismissedEventProps, UiHoverCardOpenLinkClickedEventProps, UiHoverCardViewedEventProps, UiIframeDwelledEventProps, UiIframeFocusedEventProps, UiRenderFailedEventProps, UiRenderSuccessEventProps, UiServerActionClickedEventProps } from '../../utils/analytics/types';
|
|
3
3
|
import { TrackQuickActionFailureReason, TrackQuickActionType } from '../../utils/analytics/analytics';
|
|
4
4
|
import { SmartLinkActionType } from '@atlaskit/linking-types';
|
|
5
5
|
/**
|
|
@@ -93,7 +93,7 @@ export declare const useSmartLinkAnalytics: (url: string, _dispatchAnalytics?: A
|
|
|
93
93
|
* @param invokeType @deprecated {@link https://hello.atlassian.net/browse/ENGHEALTH-2681 Internal documentation for deprecation (no external access)}
|
|
94
94
|
* @returns
|
|
95
95
|
*/
|
|
96
|
-
actionClickedEvent: ({ id, actionType, display,
|
|
96
|
+
actionClickedEvent: ({ id, actionType, display, extensionKey: overrideExtensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: UiActionClickedEventProps) => void;
|
|
97
97
|
/**
|
|
98
98
|
* This fires an event that represents when a user clicks on a hover preview's "navigate to link" button.
|
|
99
99
|
* https://product-fabric.atlassian.net/wiki/spaces/EM/pages/3206743323/Analytics+Metrics+-+Hover+Previews
|
|
@@ -246,9 +246,7 @@ export declare const useSmartLinkAnalytics: (url: string, _dispatchAnalytics?: A
|
|
|
246
246
|
* Removed in EDM-5153: This is an even from an experiment.
|
|
247
247
|
* @deprecated
|
|
248
248
|
*/
|
|
249
|
-
linkUpdated: (
|
|
250
|
-
[key: string]: any;
|
|
251
|
-
}) => void;
|
|
249
|
+
linkUpdated: () => void;
|
|
252
250
|
/**
|
|
253
251
|
* This fires a tracking event before an action invoke api call is made
|
|
254
252
|
*/
|
|
@@ -24,7 +24,7 @@ dispatchAnalytics?: AnalyticsHandler): {
|
|
|
24
24
|
cardClickedEvent: ({ id, display, status, definitionId, extensionKey, isModifierKeyPressed, location, destinationProduct, destinationSubproduct, actionSubjectId, }: import("../../utils/analytics/types").UiCardClickedEventProps) => void;
|
|
25
25
|
iframeDwelledEvent: ({ id, display, status, definitionId, extensionKey, location, destinationProduct, destinationSubproduct, dwellTime, dwellPercentVisible, }: import("../../utils/analytics/types").UiIframeDwelledEventProps) => void;
|
|
26
26
|
iframeFocusedEvent: ({ id, display, status, definitionId, extensionKey, location, destinationProduct, destinationSubproduct, }: import("../../utils/analytics/types").UiIframeFocusedEventProps) => void;
|
|
27
|
-
actionClickedEvent: ({ id, actionType, display,
|
|
27
|
+
actionClickedEvent: ({ id, actionType, display, extensionKey: overrideExtensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").UiActionClickedEventProps) => void;
|
|
28
28
|
hoverCardOpenLinkClickedEvent: ({ previewDisplay, definitionId, extensionKey, destinationProduct, destinationSubproduct, location, previewInvokeMethod, }: import("../../utils/analytics/types").UiHoverCardOpenLinkClickedEventProps) => void;
|
|
29
29
|
closedAuthEvent: ({ display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").UiClosedAuthEventProps) => void;
|
|
30
30
|
modalClosedEvent: (data: Partial<import("../../utils/types").AnalyticsPayload> & {
|
|
@@ -51,9 +51,7 @@ dispatchAnalytics?: AnalyticsHandler): {
|
|
|
51
51
|
track: {
|
|
52
52
|
appAccountConnected: ({ extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").CommonEventProps) => void;
|
|
53
53
|
appAccountAuthStarted: ({ extensionKey, location, }: import("../../utils/analytics/types").CommonEventProps) => void;
|
|
54
|
-
linkUpdated: (
|
|
55
|
-
[key: string]: any;
|
|
56
|
-
}) => void;
|
|
54
|
+
linkUpdated: () => void;
|
|
57
55
|
smartLinkQuickActionStarted: (props: {
|
|
58
56
|
smartLinkActionType: import("@atlaskit/linking-types").SmartLinkActionType | import("../../utils/analytics/analytics").TrackQuickActionType;
|
|
59
57
|
}) => void;
|
|
@@ -13,5 +13,5 @@ type LinkAnalyticsContextProps = {
|
|
|
13
13
|
/**
|
|
14
14
|
* Provides an analytics context to supply attributes to events based on a URL
|
|
15
15
|
*/
|
|
16
|
-
export declare const LinkAnalyticsContext: ({
|
|
16
|
+
export declare const LinkAnalyticsContext: ({ display, id, children, source, }: LinkAnalyticsContextProps) => JSX.Element;
|
|
17
17
|
export {};
|
|
@@ -90,7 +90,7 @@ export declare const mockAnalytics: {
|
|
|
90
90
|
cardClickedEvent: ({ id, display, status, definitionId, extensionKey, isModifierKeyPressed, location, destinationProduct, destinationSubproduct, actionSubjectId, }: import("./analytics/types").UiCardClickedEventProps) => void;
|
|
91
91
|
iframeDwelledEvent: ({ id, display, status, definitionId, extensionKey, location, destinationProduct, destinationSubproduct, dwellTime, dwellPercentVisible, }: import("./analytics/types").UiIframeDwelledEventProps) => void;
|
|
92
92
|
iframeFocusedEvent: ({ id, display, status, definitionId, extensionKey, location, destinationProduct, destinationSubproduct, }: import("./analytics/types").UiIframeFocusedEventProps) => void;
|
|
93
|
-
actionClickedEvent: ({ id, actionType, display,
|
|
93
|
+
actionClickedEvent: ({ id, actionType, display, extensionKey: overrideExtensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("./analytics/types").UiActionClickedEventProps) => void;
|
|
94
94
|
hoverCardOpenLinkClickedEvent: ({ previewDisplay, definitionId, extensionKey, destinationProduct, destinationSubproduct, location, previewInvokeMethod, }: import("./analytics/types").UiHoverCardOpenLinkClickedEventProps) => void;
|
|
95
95
|
closedAuthEvent: ({ display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("./analytics/types").UiClosedAuthEventProps) => void;
|
|
96
96
|
modalClosedEvent: (data: Partial<import("./types").AnalyticsPayload> & {
|
|
@@ -117,9 +117,7 @@ export declare const mockAnalytics: {
|
|
|
117
117
|
track: {
|
|
118
118
|
appAccountConnected: ({ extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("./analytics/types").CommonEventProps) => void;
|
|
119
119
|
appAccountAuthStarted: ({ extensionKey, location, }: import("./analytics/types").CommonEventProps) => void;
|
|
120
|
-
linkUpdated: (
|
|
121
|
-
[key: string]: any;
|
|
122
|
-
}) => void;
|
|
120
|
+
linkUpdated: () => void;
|
|
123
121
|
smartLinkQuickActionStarted: (props: {
|
|
124
122
|
smartLinkActionType: import("@atlaskit/linking-types").SmartLinkActionType | import("./analytics/analytics").TrackQuickActionType;
|
|
125
123
|
}) => void;
|
|
@@ -33,4 +33,4 @@ export interface ResolvedViewProps {
|
|
|
33
33
|
}
|
|
34
34
|
export declare const blockCardResolvedViewClassName = "block-card-resolved-view";
|
|
35
35
|
export declare const blockCardResolvedViewByClassName = "block-card-resolved-view-by";
|
|
36
|
-
export declare const ResolvedView: ({ icon, actions, thumbnail, context, title, titleTextColor, titlePrefix, isSelected, users, handleAvatarClick, handleMoreAvatarsClick, onClick, link, byline, lozenge, details, testId, showActions,
|
|
36
|
+
export declare const ResolvedView: ({ icon, actions, thumbnail, context, title, titleTextColor, titlePrefix, isSelected, users, handleAvatarClick, handleMoreAvatarsClick, onClick, link, byline, lozenge, details, testId, showActions, }: ResolvedViewProps) => jsx.JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AnalyticsHandler, AnalyticsName, AnalyticsPayload } from '../../utils/types';
|
|
2
|
-
import {
|
|
2
|
+
import { ConnectFailedEventProps, ConnectSucceededEventProps, InstrumentEventProps, InvokeFailedEventProps, InvokeSucceededEventProps, ScreenAuthPopupEventProps, TrackAppAccountConnectedProps, UiActionClickedEventProps, UiAuthAlternateAccountEventProps, UiAuthEventProps, UiCardClickedEventProps, UiClosedAuthEventProps, UiHoverCardDismissedEventProps, UiHoverCardOpenLinkClickedEventProps, UiHoverCardViewedEventProps, UiIframeDwelledEventProps, UiIframeFocusedEventProps, UiRenderFailedEventProps, UiRenderSuccessEventProps, UiServerActionClickedEventProps } from '../../utils/analytics/types';
|
|
3
3
|
import { TrackQuickActionFailureReason, TrackQuickActionType } from '../../utils/analytics/analytics';
|
|
4
4
|
import { SmartLinkActionType } from '@atlaskit/linking-types';
|
|
5
5
|
/**
|
|
@@ -93,7 +93,7 @@ export declare const useSmartLinkAnalytics: (url: string, _dispatchAnalytics?: A
|
|
|
93
93
|
* @param invokeType @deprecated {@link https://hello.atlassian.net/browse/ENGHEALTH-2681 Internal documentation for deprecation (no external access)}
|
|
94
94
|
* @returns
|
|
95
95
|
*/
|
|
96
|
-
actionClickedEvent: ({ id, actionType, display,
|
|
96
|
+
actionClickedEvent: ({ id, actionType, display, extensionKey: overrideExtensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: UiActionClickedEventProps) => void;
|
|
97
97
|
/**
|
|
98
98
|
* This fires an event that represents when a user clicks on a hover preview's "navigate to link" button.
|
|
99
99
|
* https://product-fabric.atlassian.net/wiki/spaces/EM/pages/3206743323/Analytics+Metrics+-+Hover+Previews
|
|
@@ -246,9 +246,7 @@ export declare const useSmartLinkAnalytics: (url: string, _dispatchAnalytics?: A
|
|
|
246
246
|
* Removed in EDM-5153: This is an even from an experiment.
|
|
247
247
|
* @deprecated
|
|
248
248
|
*/
|
|
249
|
-
linkUpdated: (
|
|
250
|
-
[key: string]: any;
|
|
251
|
-
}) => void;
|
|
249
|
+
linkUpdated: () => void;
|
|
252
250
|
/**
|
|
253
251
|
* This fires a tracking event before an action invoke api call is made
|
|
254
252
|
*/
|
|
@@ -24,7 +24,7 @@ dispatchAnalytics?: AnalyticsHandler): {
|
|
|
24
24
|
cardClickedEvent: ({ id, display, status, definitionId, extensionKey, isModifierKeyPressed, location, destinationProduct, destinationSubproduct, actionSubjectId, }: import("../../utils/analytics/types").UiCardClickedEventProps) => void;
|
|
25
25
|
iframeDwelledEvent: ({ id, display, status, definitionId, extensionKey, location, destinationProduct, destinationSubproduct, dwellTime, dwellPercentVisible, }: import("../../utils/analytics/types").UiIframeDwelledEventProps) => void;
|
|
26
26
|
iframeFocusedEvent: ({ id, display, status, definitionId, extensionKey, location, destinationProduct, destinationSubproduct, }: import("../../utils/analytics/types").UiIframeFocusedEventProps) => void;
|
|
27
|
-
actionClickedEvent: ({ id, actionType, display,
|
|
27
|
+
actionClickedEvent: ({ id, actionType, display, extensionKey: overrideExtensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").UiActionClickedEventProps) => void;
|
|
28
28
|
hoverCardOpenLinkClickedEvent: ({ previewDisplay, definitionId, extensionKey, destinationProduct, destinationSubproduct, location, previewInvokeMethod, }: import("../../utils/analytics/types").UiHoverCardOpenLinkClickedEventProps) => void;
|
|
29
29
|
closedAuthEvent: ({ display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").UiClosedAuthEventProps) => void;
|
|
30
30
|
modalClosedEvent: (data: Partial<import("../../utils/types").AnalyticsPayload> & {
|
|
@@ -51,9 +51,7 @@ dispatchAnalytics?: AnalyticsHandler): {
|
|
|
51
51
|
track: {
|
|
52
52
|
appAccountConnected: ({ extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("../../utils/analytics/types").CommonEventProps) => void;
|
|
53
53
|
appAccountAuthStarted: ({ extensionKey, location, }: import("../../utils/analytics/types").CommonEventProps) => void;
|
|
54
|
-
linkUpdated: (
|
|
55
|
-
[key: string]: any;
|
|
56
|
-
}) => void;
|
|
54
|
+
linkUpdated: () => void;
|
|
57
55
|
smartLinkQuickActionStarted: (props: {
|
|
58
56
|
smartLinkActionType: import("@atlaskit/linking-types").SmartLinkActionType | import("../../utils/analytics/analytics").TrackQuickActionType;
|
|
59
57
|
}) => void;
|
|
@@ -13,5 +13,5 @@ type LinkAnalyticsContextProps = {
|
|
|
13
13
|
/**
|
|
14
14
|
* Provides an analytics context to supply attributes to events based on a URL
|
|
15
15
|
*/
|
|
16
|
-
export declare const LinkAnalyticsContext: ({
|
|
16
|
+
export declare const LinkAnalyticsContext: ({ display, id, children, source, }: LinkAnalyticsContextProps) => JSX.Element;
|
|
17
17
|
export {};
|
|
@@ -90,7 +90,7 @@ export declare const mockAnalytics: {
|
|
|
90
90
|
cardClickedEvent: ({ id, display, status, definitionId, extensionKey, isModifierKeyPressed, location, destinationProduct, destinationSubproduct, actionSubjectId, }: import("./analytics/types").UiCardClickedEventProps) => void;
|
|
91
91
|
iframeDwelledEvent: ({ id, display, status, definitionId, extensionKey, location, destinationProduct, destinationSubproduct, dwellTime, dwellPercentVisible, }: import("./analytics/types").UiIframeDwelledEventProps) => void;
|
|
92
92
|
iframeFocusedEvent: ({ id, display, status, definitionId, extensionKey, location, destinationProduct, destinationSubproduct, }: import("./analytics/types").UiIframeFocusedEventProps) => void;
|
|
93
|
-
actionClickedEvent: ({ id, actionType, display,
|
|
93
|
+
actionClickedEvent: ({ id, actionType, display, extensionKey: overrideExtensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("./analytics/types").UiActionClickedEventProps) => void;
|
|
94
94
|
hoverCardOpenLinkClickedEvent: ({ previewDisplay, definitionId, extensionKey, destinationProduct, destinationSubproduct, location, previewInvokeMethod, }: import("./analytics/types").UiHoverCardOpenLinkClickedEventProps) => void;
|
|
95
95
|
closedAuthEvent: ({ display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("./analytics/types").UiClosedAuthEventProps) => void;
|
|
96
96
|
modalClosedEvent: (data: Partial<import("./types").AnalyticsPayload> & {
|
|
@@ -117,9 +117,7 @@ export declare const mockAnalytics: {
|
|
|
117
117
|
track: {
|
|
118
118
|
appAccountConnected: ({ extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: import("./analytics/types").CommonEventProps) => void;
|
|
119
119
|
appAccountAuthStarted: ({ extensionKey, location, }: import("./analytics/types").CommonEventProps) => void;
|
|
120
|
-
linkUpdated: (
|
|
121
|
-
[key: string]: any;
|
|
122
|
-
}) => void;
|
|
120
|
+
linkUpdated: () => void;
|
|
123
121
|
smartLinkQuickActionStarted: (props: {
|
|
124
122
|
smartLinkActionType: import("@atlaskit/linking-types").SmartLinkActionType | import("./analytics/analytics").TrackQuickActionType;
|
|
125
123
|
}) => void;
|
|
@@ -33,4 +33,4 @@ export interface ResolvedViewProps {
|
|
|
33
33
|
}
|
|
34
34
|
export declare const blockCardResolvedViewClassName = "block-card-resolved-view";
|
|
35
35
|
export declare const blockCardResolvedViewByClassName = "block-card-resolved-view-by";
|
|
36
|
-
export declare const ResolvedView: ({ icon, actions, thumbnail, context, title, titleTextColor, titlePrefix, isSelected, users, handleAvatarClick, handleMoreAvatarsClick, onClick, link, byline, lozenge, details, testId, showActions,
|
|
36
|
+
export declare const ResolvedView: ({ icon, actions, thumbnail, context, title, titleTextColor, titlePrefix, isSelected, users, handleAvatarClick, handleMoreAvatarsClick, onClick, link, byline, lozenge, details, testId, showActions, }: ResolvedViewProps) => jsx.JSX.Element;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/smart-card",
|
|
3
|
-
"version": "26.
|
|
3
|
+
"version": "26.30.0",
|
|
4
4
|
"description": "Smart card component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -86,6 +86,7 @@
|
|
|
86
86
|
"@testing-library/react": "^12.1.5",
|
|
87
87
|
"@testing-library/react-hooks": "^8.0.1",
|
|
88
88
|
"@testing-library/user-event": "^14.4.3",
|
|
89
|
+
"@types/facepaint": "^1.2.1",
|
|
89
90
|
"@types/lorem-ipsum": "^1.0.2",
|
|
90
91
|
"@types/react": "^16.8.0",
|
|
91
92
|
"@types/react-loadable": "^5.4.1",
|
package/report.api.md
CHANGED
|
@@ -1142,7 +1142,6 @@ export const useSmartLinkAnalytics: (
|
|
|
1142
1142
|
id,
|
|
1143
1143
|
actionType,
|
|
1144
1144
|
display,
|
|
1145
|
-
invokeType,
|
|
1146
1145
|
extensionKey: overrideExtensionKey,
|
|
1147
1146
|
definitionId,
|
|
1148
1147
|
resourceType,
|
|
@@ -1309,11 +1308,7 @@ export const useSmartLinkAnalytics: (
|
|
|
1309
1308
|
extensionKey,
|
|
1310
1309
|
location,
|
|
1311
1310
|
}: TrackAppAccountConnectedProps) => void;
|
|
1312
|
-
linkUpdated: (
|
|
1313
|
-
props: CommonEventProps & {
|
|
1314
|
-
[key: string]: any;
|
|
1315
|
-
},
|
|
1316
|
-
) => void;
|
|
1311
|
+
linkUpdated: () => void;
|
|
1317
1312
|
smartLinkQuickActionStarted: (props: {
|
|
1318
1313
|
smartLinkActionType: SmartLinkActionType | TrackQuickActionType;
|
|
1319
1314
|
}) => void;
|
package/tmp/api-report-tmp.d.ts
CHANGED
|
@@ -932,7 +932,7 @@ export const useSmartLinkAnalytics: (url: string, _dispatchAnalytics?: Analytics
|
|
|
932
932
|
cardClickedEvent: ({ id, display, status, definitionId, extensionKey, isModifierKeyPressed, location, destinationProduct, destinationSubproduct, actionSubjectId, }: UiCardClickedEventProps) => void;
|
|
933
933
|
iframeDwelledEvent: ({ id, display, status, definitionId, extensionKey, location, destinationProduct, destinationSubproduct, dwellTime, dwellPercentVisible, }: UiIframeDwelledEventProps) => void;
|
|
934
934
|
iframeFocusedEvent: ({ id, display, status, definitionId, extensionKey, location, destinationProduct, destinationSubproduct, }: UiIframeFocusedEventProps) => void;
|
|
935
|
-
actionClickedEvent: ({ id, actionType, display,
|
|
935
|
+
actionClickedEvent: ({ id, actionType, display, extensionKey: overrideExtensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: UiActionClickedEventProps) => void;
|
|
936
936
|
hoverCardOpenLinkClickedEvent: ({ previewDisplay, definitionId, extensionKey, destinationProduct, destinationSubproduct, location, previewInvokeMethod, }: UiHoverCardOpenLinkClickedEventProps) => void;
|
|
937
937
|
closedAuthEvent: ({ display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: UiClosedAuthEventProps) => void;
|
|
938
938
|
modalClosedEvent: (data: Partial<AnalyticsPayload> & {
|
|
@@ -959,9 +959,7 @@ export const useSmartLinkAnalytics: (url: string, _dispatchAnalytics?: Analytics
|
|
|
959
959
|
track: {
|
|
960
960
|
appAccountConnected: ({ extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: TrackAppAccountConnectedProps) => void;
|
|
961
961
|
appAccountAuthStarted: ({ extensionKey, location, }: TrackAppAccountConnectedProps) => void;
|
|
962
|
-
linkUpdated: (
|
|
963
|
-
[key: string]: any;
|
|
964
|
-
}) => void;
|
|
962
|
+
linkUpdated: () => void;
|
|
965
963
|
smartLinkQuickActionStarted: (props: {
|
|
966
964
|
smartLinkActionType: SmartLinkActionType | TrackQuickActionType;
|
|
967
965
|
}) => void;
|