@atlaskit/smart-card 26.23.2 → 26.25.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.
Files changed (134) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/cjs/constants.js +1 -0
  3. package/dist/cjs/extractors/block/index.js +1 -1
  4. package/dist/cjs/extractors/common/actions/extractActions.js +3 -31
  5. package/dist/cjs/extractors/flexible/actions/extract-follow-action.js +53 -0
  6. package/dist/cjs/extractors/flexible/index.js +3 -0
  7. package/dist/cjs/messages.js +10 -0
  8. package/dist/cjs/state/analytics/useSmartLinkAnalytics.js +7 -15
  9. package/dist/cjs/state/hooks/use-invoke-client-action/index.js +20 -14
  10. package/dist/cjs/utils/analytics/analytics.js +1 -1
  11. package/dist/cjs/view/BlockCard/views/flexible/FlexibleErroredView.js +1 -0
  12. package/dist/cjs/view/BlockCard/views/flexible/FlexibleResolvedView.js +3 -45
  13. package/dist/cjs/view/BlockCard/views/flexible/styled.js +2 -2
  14. package/dist/cjs/view/EmbedCard/components/styled.js +2 -2
  15. package/dist/cjs/view/FlexibleCard/components/actions/action/download-action/index.js +33 -1
  16. package/dist/cjs/view/FlexibleCard/components/actions/action/preview-action/index.js +41 -15
  17. package/dist/cjs/view/FlexibleCard/components/actions/action/server-action/index.js +4 -4
  18. package/dist/cjs/view/FlexibleCard/components/actions/action/view-action/index.js +33 -1
  19. package/dist/cjs/view/FlexibleCard/components/actions/follow-action/index.js +43 -0
  20. package/dist/cjs/view/FlexibleCard/components/actions/follow-action/unfollow-icon/index.js +40 -0
  21. package/dist/cjs/view/FlexibleCard/components/actions/index.js +10 -1
  22. package/dist/cjs/view/FlexibleCard/components/blocks/action-group/index.js +2 -19
  23. package/dist/cjs/view/FlexibleCard/components/blocks/footer-block/index.js +8 -1
  24. package/dist/cjs/view/FlexibleCard/components/blocks/utils.js +22 -1
  25. package/dist/cjs/view/FlexibleCard/components/utils.js +9 -20
  26. package/dist/cjs/view/FlexibleCard/index.js +14 -1
  27. package/dist/cjs/view/HoverCard/components/HoverCardContent.js +1 -0
  28. package/dist/cjs/view/HoverCard/styled.js +2 -2
  29. package/dist/cjs/view/LinkUrl/index.js +1 -1
  30. package/dist/cjs/view/RedesignedInlineCard/Frame/styled.js +1 -1
  31. package/dist/cjs/view/RedesignedInlineCard/styled.js +1 -1
  32. package/dist/es2019/constants.js +1 -0
  33. package/dist/es2019/extractors/block/index.js +2 -2
  34. package/dist/es2019/extractors/common/actions/extractActions.js +2 -23
  35. package/dist/es2019/extractors/flexible/actions/extract-follow-action.js +45 -0
  36. package/dist/es2019/extractors/flexible/index.js +3 -0
  37. package/dist/es2019/messages.js +10 -0
  38. package/dist/es2019/state/analytics/useSmartLinkAnalytics.js +7 -15
  39. package/dist/es2019/state/hooks/use-invoke-client-action/index.js +14 -8
  40. package/dist/es2019/utils/analytics/analytics.js +1 -1
  41. package/dist/es2019/view/BlockCard/views/flexible/FlexibleErroredView.js +1 -0
  42. package/dist/es2019/view/BlockCard/views/flexible/FlexibleResolvedView.js +4 -42
  43. package/dist/es2019/view/BlockCard/views/flexible/styled.js +10 -1
  44. package/dist/es2019/view/EmbedCard/components/styled.js +2 -2
  45. package/dist/es2019/view/FlexibleCard/components/actions/action/download-action/index.js +15 -1
  46. package/dist/es2019/view/FlexibleCard/components/actions/action/preview-action/index.js +18 -7
  47. package/dist/es2019/view/FlexibleCard/components/actions/action/server-action/index.js +1 -1
  48. package/dist/es2019/view/FlexibleCard/components/actions/action/view-action/index.js +15 -1
  49. package/dist/es2019/view/FlexibleCard/components/actions/follow-action/index.js +31 -0
  50. package/dist/es2019/view/FlexibleCard/components/actions/follow-action/unfollow-icon/index.js +28 -0
  51. package/dist/es2019/view/FlexibleCard/components/actions/index.js +3 -0
  52. package/dist/es2019/view/FlexibleCard/components/blocks/action-group/index.js +2 -17
  53. package/dist/es2019/view/FlexibleCard/components/blocks/footer-block/index.js +9 -2
  54. package/dist/es2019/view/FlexibleCard/components/blocks/utils.js +19 -1
  55. package/dist/es2019/view/FlexibleCard/components/utils.js +3 -17
  56. package/dist/es2019/view/FlexibleCard/index.js +11 -1
  57. package/dist/es2019/view/HoverCard/components/HoverCardContent.js +1 -0
  58. package/dist/es2019/view/HoverCard/styled.js +3 -3
  59. package/dist/es2019/view/LinkUrl/index.js +1 -1
  60. package/dist/es2019/view/RedesignedInlineCard/Frame/styled.js +1 -1
  61. package/dist/es2019/view/RedesignedInlineCard/styled.js +1 -1
  62. package/dist/esm/constants.js +1 -0
  63. package/dist/esm/extractors/block/index.js +2 -2
  64. package/dist/esm/extractors/common/actions/extractActions.js +2 -30
  65. package/dist/esm/extractors/flexible/actions/extract-follow-action.js +45 -0
  66. package/dist/esm/extractors/flexible/index.js +3 -0
  67. package/dist/esm/messages.js +10 -0
  68. package/dist/esm/state/analytics/useSmartLinkAnalytics.js +7 -15
  69. package/dist/esm/state/hooks/use-invoke-client-action/index.js +20 -14
  70. package/dist/esm/utils/analytics/analytics.js +1 -1
  71. package/dist/esm/view/BlockCard/views/flexible/FlexibleErroredView.js +1 -0
  72. package/dist/esm/view/BlockCard/views/flexible/FlexibleResolvedView.js +4 -46
  73. package/dist/esm/view/BlockCard/views/flexible/styled.js +2 -2
  74. package/dist/esm/view/EmbedCard/components/styled.js +2 -2
  75. package/dist/esm/view/FlexibleCard/components/actions/action/download-action/index.js +33 -1
  76. package/dist/esm/view/FlexibleCard/components/actions/action/preview-action/index.js +41 -15
  77. package/dist/esm/view/FlexibleCard/components/actions/action/server-action/index.js +4 -4
  78. package/dist/esm/view/FlexibleCard/components/actions/action/view-action/index.js +33 -1
  79. package/dist/esm/view/FlexibleCard/components/actions/follow-action/index.js +32 -0
  80. package/dist/esm/view/FlexibleCard/components/actions/follow-action/unfollow-icon/index.js +32 -0
  81. package/dist/esm/view/FlexibleCard/components/actions/index.js +3 -0
  82. package/dist/esm/view/FlexibleCard/components/blocks/action-group/index.js +2 -19
  83. package/dist/esm/view/FlexibleCard/components/blocks/footer-block/index.js +9 -2
  84. package/dist/esm/view/FlexibleCard/components/blocks/utils.js +21 -1
  85. package/dist/esm/view/FlexibleCard/components/utils.js +9 -20
  86. package/dist/esm/view/FlexibleCard/index.js +14 -1
  87. package/dist/esm/view/HoverCard/components/HoverCardContent.js +1 -0
  88. package/dist/esm/view/HoverCard/styled.js +2 -2
  89. package/dist/esm/view/LinkUrl/index.js +1 -1
  90. package/dist/esm/view/RedesignedInlineCard/Frame/styled.js +1 -1
  91. package/dist/esm/view/RedesignedInlineCard/styled.js +1 -1
  92. package/dist/types/__fixtures__/atlas-project.d.ts +68 -0
  93. package/dist/types/constants.d.ts +1 -0
  94. package/dist/types/extractors/common/__mocks__/jsonld.d.ts +3 -1
  95. package/dist/types/extractors/common/actions/extractActions.d.ts +1 -1
  96. package/dist/types/extractors/flexible/actions/extract-follow-action.d.ts +5 -0
  97. package/dist/types/messages.d.ts +1 -1
  98. package/dist/types/state/analytics/useSmartLinkAnalytics.d.ts +4 -4
  99. package/dist/types/state/flexible-ui-context/index.d.ts +3 -119
  100. package/dist/types/state/flexible-ui-context/types.d.ts +17 -0
  101. package/dist/types/state/hooks/useSmartLink.d.ts +3 -3
  102. package/dist/types/utils/analytics/types.d.ts +3 -3
  103. package/dist/types/utils/mocks.d.ts +3 -3
  104. package/dist/types/view/Card/index.d.ts +1 -1
  105. package/dist/types/view/FlexibleCard/components/actions/follow-action/index.d.ts +4 -0
  106. package/dist/types/view/FlexibleCard/components/actions/follow-action/unfollow-icon/index.d.ts +4 -0
  107. package/dist/types/view/FlexibleCard/components/actions/index.d.ts +1 -0
  108. package/dist/types/view/FlexibleCard/components/blocks/types.d.ts +1 -1
  109. package/dist/types/view/FlexibleCard/components/blocks/utils.d.ts +3 -1
  110. package/dist/types/view/FlexibleCard/components/utils.d.ts +2 -63
  111. package/dist/types/view/FlexibleCard/types.d.ts +2 -3
  112. package/dist/types-ts4.5/__fixtures__/atlas-project.d.ts +68 -0
  113. package/dist/types-ts4.5/constants.d.ts +1 -0
  114. package/dist/types-ts4.5/extractors/common/__mocks__/jsonld.d.ts +3 -1
  115. package/dist/types-ts4.5/extractors/common/actions/extractActions.d.ts +1 -1
  116. package/dist/types-ts4.5/extractors/flexible/actions/extract-follow-action.d.ts +5 -0
  117. package/dist/types-ts4.5/messages.d.ts +1 -1
  118. package/dist/types-ts4.5/state/analytics/useSmartLinkAnalytics.d.ts +4 -4
  119. package/dist/types-ts4.5/state/flexible-ui-context/index.d.ts +3 -119
  120. package/dist/types-ts4.5/state/flexible-ui-context/types.d.ts +17 -0
  121. package/dist/types-ts4.5/state/hooks/useSmartLink.d.ts +3 -3
  122. package/dist/types-ts4.5/utils/analytics/types.d.ts +3 -3
  123. package/dist/types-ts4.5/utils/mocks.d.ts +3 -3
  124. package/dist/types-ts4.5/view/Card/index.d.ts +1 -1
  125. package/dist/types-ts4.5/view/FlexibleCard/components/actions/follow-action/index.d.ts +4 -0
  126. package/dist/types-ts4.5/view/FlexibleCard/components/actions/follow-action/unfollow-icon/index.d.ts +4 -0
  127. package/dist/types-ts4.5/view/FlexibleCard/components/actions/index.d.ts +1 -0
  128. package/dist/types-ts4.5/view/FlexibleCard/components/blocks/types.d.ts +1 -1
  129. package/dist/types-ts4.5/view/FlexibleCard/components/blocks/utils.d.ts +3 -1
  130. package/dist/types-ts4.5/view/FlexibleCard/components/utils.d.ts +2 -63
  131. package/dist/types-ts4.5/view/FlexibleCard/types.d.ts +2 -3
  132. package/package.json +2 -2
  133. package/report.api.md +9 -6
  134. package/tmp/api-report-tmp.d.ts +9 -7
@@ -1,10 +1,15 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
+ import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
2
3
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
4
+ import _regeneratorRuntime from "@babel/runtime/regenerator";
3
5
  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; }
4
6
  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; }
5
7
  import React from 'react';
6
8
  import Action from '../index';
7
9
  import { openUrl } from '../../../../../../utils';
10
+ import { ActionName } from '../../../../../../constants';
11
+ import { useFlexibleUiAnalyticsContext } from '../../../../../../state/flexible-ui-context';
12
+ import useInvokeClientAction from '../../../../../../state/hooks/use-invoke-client-action';
8
13
  var ViewAction = function ViewAction(props) {
9
14
  var appearance = props.appearance,
10
15
  asDropDownItem = props.asDropDownItem,
@@ -12,10 +17,37 @@ var ViewAction = function ViewAction(props) {
12
17
  _onClick = props.onClick,
13
18
  viewUrl = props.viewUrl,
14
19
  url = props.url;
20
+ var analytics = useFlexibleUiAnalyticsContext();
21
+ var invoke = useInvokeClientAction({
22
+ analytics: analytics
23
+ });
15
24
  if (viewUrl && url) {
16
25
  var action = _objectSpread(_objectSpread({}, props), {}, {
17
26
  onClick: function onClick() {
18
- openUrl(viewUrl);
27
+ invoke({
28
+ actionType: ActionName.ViewAction,
29
+ actionFn: function () {
30
+ var _actionFn = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
31
+ return _regeneratorRuntime.wrap(function _callee$(_context) {
32
+ while (1) switch (_context.prev = _context.next) {
33
+ case 0:
34
+ return _context.abrupt("return", openUrl(viewUrl));
35
+ case 1:
36
+ case "end":
37
+ return _context.stop();
38
+ }
39
+ }, _callee);
40
+ }));
41
+ function actionFn() {
42
+ return _actionFn.apply(this, arguments);
43
+ }
44
+ return actionFn;
45
+ }(),
46
+ // These values have already been set in analytics context.
47
+ // We only pass these here for ufo experience.
48
+ display: analytics === null || analytics === void 0 ? void 0 : analytics.display,
49
+ extensionKey: analytics === null || analytics === void 0 ? void 0 : analytics.extensionKey
50
+ });
19
51
  if (_onClick) {
20
52
  _onClick();
21
53
  }
@@ -0,0 +1,32 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
2
+ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
+ var _excluded = ["value"];
4
+ import InviteTeamIcon from '@atlaskit/icon/glyph/invite-team';
5
+ import React, { useContext } from 'react';
6
+ import { FormattedMessage } from 'react-intl-next';
7
+ import { messages } from '../../../../../messages';
8
+ import { FlexibleUiContext } from '../../../../../state/flexible-ui-context';
9
+ import ServerAction from '../action/server-action';
10
+ import UnfollowIcon from './unfollow-icon';
11
+ var FollowAction = function FollowAction(props) {
12
+ var context = useContext(FlexibleUiContext);
13
+ if (!context || !context.followAction) {
14
+ return null;
15
+ }
16
+ var _context$followAction = context.followAction,
17
+ value = _context$followAction.value,
18
+ data = _objectWithoutProperties(_context$followAction, _excluded);
19
+ var message = value ? messages.follow : messages.unfollow;
20
+ var icon = value ? /*#__PURE__*/React.createElement(InviteTeamIcon, {
21
+ label: "Follow"
22
+ }) : /*#__PURE__*/React.createElement(UnfollowIcon, {
23
+ label: "Unfollow"
24
+ });
25
+ return /*#__PURE__*/React.createElement(ServerAction, _extends({
26
+ content: /*#__PURE__*/React.createElement(FormattedMessage, message),
27
+ icon: icon,
28
+ testId: "smart-action-follow-action",
29
+ tooltipMessage: /*#__PURE__*/React.createElement(FormattedMessage, message)
30
+ }, data, props));
31
+ };
32
+ export default FollowAction;
@@ -0,0 +1,32 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
2
+ import Icon from '@atlaskit/icon';
3
+ import React from 'react';
4
+ var UnfollowGlyph = function UnfollowGlyph(props) {
5
+ return /*#__PURE__*/React.createElement("svg", {
6
+ width: "16",
7
+ height: "16",
8
+ viewBox: "0 0 16 16",
9
+ "data-testid": props['data-testid'],
10
+ "aria-label": props['aria-label'],
11
+ className: props.className,
12
+ role: "presentation",
13
+ xmlns: "http://www.w3.org/2000/svg"
14
+ }, /*#__PURE__*/React.createElement("path", {
15
+ d: "M14 4.66667H11.3333C10.9652 4.66667 10.6667 4.96514 10.6667 5.33333C10.6667 5.70152 10.9652 6 11.3333 6H14C14.3682 6 14.6667 5.70152 14.6667 5.33333C14.6667 4.96514 14.3682 4.66667 14 4.66667Z",
16
+ fill: "currentColor"
17
+ }), /*#__PURE__*/React.createElement("path", {
18
+ fillRule: "evenodd",
19
+ clipRule: "evenodd",
20
+ d: "M3.33334 9.33333C3.33334 8.59667 3.93468 8 4.67268 8H9.99401C10.734 8 11.3333 8.596 11.3333 9.33733V12.2973C11.3333 14.5673 3.33334 14.5673 3.33334 12.2973V9.33333Z",
21
+ fill: "currentColor"
22
+ }), /*#__PURE__*/React.createElement("path", {
23
+ d: "M7.33334 7.33333C8.8061 7.33333 10 6.13943 10 4.66667C10 3.19391 8.8061 2 7.33334 2C5.86058 2 4.66668 3.19391 4.66668 4.66667C4.66668 6.13943 5.86058 7.33333 7.33334 7.33333Z",
24
+ fill: "currentColor"
25
+ }));
26
+ };
27
+ var UnfollowIcon = function UnfollowIcon(props) {
28
+ return /*#__PURE__*/React.createElement(Icon, _extends({
29
+ glyph: UnfollowGlyph
30
+ }, props));
31
+ };
32
+ export default UnfollowIcon;
@@ -1,8 +1,11 @@
1
1
  import { ActionName } from '../../../../constants';
2
2
  import { createDataAction, createUIAction } from './utils';
3
+ export { default as FollowAction } from './follow-action';
4
+
3
5
  // Attention: Keep the export name and action name the same.
4
6
  // This will help reducing the code for mapping action inside
5
7
  // createAction and renderActionItems
8
+
6
9
  /**
7
10
  * Creates a DeleteAction component. Accepts default ActionProps, but defaults
8
11
  * the icon to a cross icon.
@@ -11,13 +11,14 @@ import { css, jsx } from '@emotion/react';
11
11
  import ButtonGroup from '@atlaskit/button/button-group';
12
12
  import Tooltip from '@atlaskit/tooltip';
13
13
  import DropdownMenu from '@atlaskit/dropdown-menu';
14
- import { ActionName, SmartLinkSize } from '../../../../../constants';
14
+ import { SmartLinkSize } from '../../../../../constants';
15
15
  import Button from '@atlaskit/button/standard-button';
16
16
  import MoreIcon from '@atlaskit/icon/glyph/more';
17
17
  import { sizeToButtonSpacing } from '../../utils';
18
18
  import { messages } from '../../../../../messages';
19
19
  import { useFlexibleUiContext, useFlexibleUiOptionContext } from '../../../../../state/flexible-ui-context';
20
20
  import ActionGroupItem from './action-group-item';
21
+ import { filterActionItems } from '../utils';
21
22
  var styles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: inline-flex;\n line-height: 1rem;\n > div {\n align-items: center;\n button:focus-visible {\n // AK button removes the default browser outline on focus and apply\n // box-shadow styling to create the outline appearance.\n // Due to our container elements (Container/Block/ElementGroup) has\n // overflow hidden to prevent the metadata element from leaking outside\n // of its container, the box-shadow doesn't show properly.\n // Invert the AK box-shadow styling.\n outline-offset: -2px;\n }\n }\n"])));
22
23
  var renderActionItems = function renderActionItems() {
23
24
  var items = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
@@ -36,24 +37,6 @@ var renderActionItems = function renderActionItems() {
36
37
  });
37
38
  });
38
39
  };
39
- var filterActionItems = function filterActionItems() {
40
- var items = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
41
- var context = arguments.length > 1 ? arguments[1] : undefined;
42
- return items.filter(function (item) {
43
- switch (item.name) {
44
- // Action that require data from the data context to render.
45
- case ActionName.DownloadAction:
46
- return Boolean(context === null || context === void 0 ? void 0 : context.downloadAction);
47
- case ActionName.PreviewAction:
48
- return Boolean(context === null || context === void 0 ? void 0 : context.previewAction);
49
- case ActionName.ViewAction:
50
- return Boolean(context === null || context === void 0 ? void 0 : context.viewAction);
51
- default:
52
- // Named and custom actions that user defines.
53
- return Boolean(ActionName[item.name]);
54
- }
55
- });
56
- };
57
40
 
58
41
  /**
59
42
  * Creates a group of Action components. Accepts an array of Actions, in addition to some styling
@@ -1,13 +1,15 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
3
3
  var _templateObject;
4
- import React, { useCallback } from 'react';
4
+ import React, { useCallback, useMemo } from 'react';
5
5
  import { css } from '@emotion/react';
6
6
  import { SmartLinkAlignment, SmartLinkDirection, SmartLinkSize, SmartLinkStatus, SmartLinkWidth } from '../../../../../constants';
7
7
  import Block from '../block';
8
8
  import ElementGroup from '../element-group';
9
9
  import { Provider } from '../../elements';
10
10
  import ActionGroup from '../action-group';
11
+ import { filterActionItems } from '../utils';
12
+ import { useFlexibleUiContext } from '../../../../../state/flexible-ui-context';
11
13
  var getActionGroupStyles = function getActionGroupStyles(size) {
12
14
  if (size === SmartLinkSize.XLarge) {
13
15
  // The biggest height of the action button exceeds the max line-height
@@ -32,6 +34,11 @@ var FooterBlock = function FooterBlock(props) {
32
34
  _props$testId = props.testId,
33
35
  testId = _props$testId === void 0 ? 'smart-footer-block' : _props$testId,
34
36
  onActionMenuOpenChange = props.onActionMenuOpenChange;
37
+ var context = useFlexibleUiContext();
38
+ var hasActions = useMemo(function () {
39
+ var _filterActionItems;
40
+ return ((_filterActionItems = filterActionItems(actions, context)) === null || _filterActionItems === void 0 ? void 0 : _filterActionItems.length) > 0;
41
+ }, [actions, context]);
35
42
  var onDropdownOpenChange = useCallback(function (isOpen) {
36
43
  if (onActionMenuOpenChange) {
37
44
  onActionMenuOpenChange({
@@ -46,7 +53,7 @@ var FooterBlock = function FooterBlock(props) {
46
53
  testId: "".concat(testId, "-resolved-view")
47
54
  }), /*#__PURE__*/React.createElement(Provider, {
48
55
  testId: "".concat(testId, "-provider")
49
- }), actions && actions.length > 0 ? /*#__PURE__*/React.createElement(ElementGroup, {
56
+ }), actions && hasActions ? /*#__PURE__*/React.createElement(ElementGroup, {
50
57
  testId: "smart-element-group-actions",
51
58
  align: SmartLinkAlignment.Right,
52
59
  direction: SmartLinkDirection.Horizontal,
@@ -7,7 +7,7 @@ var _excluded = ["name"];
7
7
  var _ElementDisplaySchema, _templateObject, _templateObject2, _templateObject3, _templateObject4;
8
8
  import React from 'react';
9
9
  import { css } from '@emotion/react';
10
- import { ElementName, SmartLinkDirection, SmartLinkSize } from '../../../../constants';
10
+ import { ActionName, ElementName, SmartLinkDirection, SmartLinkSize } from '../../../../constants';
11
11
  import * as Elements from '../elements';
12
12
  import { isFlexibleUiElement } from '../../../../utils/flexible';
13
13
  import ActionGroup from './action-group';
@@ -55,6 +55,26 @@ export var isJSXElementNull = function isJSXElementNull(children) {
55
55
  var isElementOrElementGroup = function isElementOrElementGroup(node) {
56
56
  return /*#__PURE__*/React.isValidElement(node) && (isFlexibleUiElement(node) || node.type === ElementGroup);
57
57
  };
58
+ export var filterActionItems = function filterActionItems() {
59
+ var items = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
60
+ var context = arguments.length > 1 ? arguments[1] : undefined;
61
+ return items.filter(function (item) {
62
+ switch (item.name) {
63
+ // Action that require data from the data context to render.
64
+ case ActionName.DownloadAction:
65
+ return Boolean(context === null || context === void 0 ? void 0 : context.downloadAction);
66
+ case ActionName.FollowAction:
67
+ return Boolean(context === null || context === void 0 ? void 0 : context.followAction);
68
+ case ActionName.PreviewAction:
69
+ return Boolean(context === null || context === void 0 ? void 0 : context.previewAction);
70
+ case ActionName.ViewAction:
71
+ return Boolean(context === null || context === void 0 ? void 0 : context.viewAction);
72
+ default:
73
+ // Named and custom actions that user defines.
74
+ return Boolean(ActionName[item.name]);
75
+ }
76
+ });
77
+ };
58
78
  export var renderChildren = function renderChildren(children, size) {
59
79
  return React.Children.map(children, function (child) {
60
80
  if (isElementOrElementGroup(child) || isActionGroup(child)) {
@@ -1,7 +1,11 @@
1
+ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
1
2
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
3
  import _extends from "@babel/runtime/helpers/extends";
3
4
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
5
+ var _excluded = ["linkIcon"];
4
6
  var _sizeToButtonSpacing, _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
7
+ 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; }
8
+ 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; }
5
9
  import React from 'react';
6
10
  import { css } from '@emotion/react';
7
11
  import { FormattedMessage } from 'react-intl-next';
@@ -98,34 +102,19 @@ export var hasWhiteSpace = function hasWhiteSpace(str) {
98
102
  return str.search(/\s/) >= 0;
99
103
  };
100
104
  export var openEmbedModalWithFlexibleUiIcon = function openEmbedModalWithFlexibleUiIcon(_ref) {
101
- var analytics = _ref.analytics,
102
- downloadUrl = _ref.downloadUrl,
103
- linkIcon = _ref.linkIcon,
104
- onClose = _ref.onClose,
105
- providerName = _ref.providerName,
106
- src = _ref.src,
107
- title = _ref.title,
108
- url = _ref.url,
109
- isSupportTheming = _ref.isSupportTheming;
105
+ var linkIcon = _ref.linkIcon,
106
+ props = _objectWithoutProperties(_ref, _excluded);
110
107
  var icon = {
111
108
  icon: /*#__PURE__*/React.createElement(Icon, _extends({}, linkIcon, {
112
109
  size: SmartLinkSize.Large
113
110
  })),
114
111
  isFlexibleUi: true
115
112
  };
116
- return openEmbedModal({
117
- analytics: analytics,
118
- download: downloadUrl,
113
+ return openEmbedModal(_objectSpread(_objectSpread({}, props), {}, {
119
114
  icon: icon,
120
115
  // Flex should not send origin as block card. It should be able to support
121
116
  // its internal parent components like hover card, block card and
122
117
  // itself as a standalone. To be investigated and fix in EDM-7520.
123
- origin: 'smartLinkCard',
124
- providerName: providerName,
125
- onClose: onClose,
126
- src: src,
127
- title: title,
128
- url: url,
129
- isSupportTheming: isSupportTheming
130
- });
118
+ origin: 'smartLinkCard'
119
+ }));
131
120
  };
@@ -1,4 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
+ 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; }
4
+ 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; }
2
5
  import React, { useEffect, useMemo } from 'react';
3
6
  import { SmartLinkStatus } from '../../constants';
4
7
  import Container from './components/container';
@@ -12,7 +15,10 @@ import { getContextByStatus, getRetryOptions } from './utils';
12
15
  * @see Container
13
16
  */
14
17
  var FlexibleCard = function FlexibleCard(_ref) {
18
+ var _details$meta2;
15
19
  var analytics = _ref.analytics,
20
+ _ref$appearance = _ref.appearance,
21
+ appearance = _ref$appearance === void 0 ? 'flexible' : _ref$appearance,
16
22
  cardState = _ref.cardState,
17
23
  children = _ref.children,
18
24
  id = _ref.id,
@@ -43,6 +49,13 @@ var FlexibleCard = function FlexibleCard(_ref) {
43
49
  var retry = getRetryOptions(url, status, details, onAuthorize);
44
50
  var _ref2 = context || {},
45
51
  title = _ref2.title;
52
+ var analyticsContext = useMemo(function () {
53
+ var _details$meta;
54
+ return analytics ? _objectSpread(_objectSpread({}, analytics), {}, {
55
+ display: appearance,
56
+ extensionKey: details === null || details === void 0 ? void 0 : (_details$meta = details.meta) === null || _details$meta === void 0 ? void 0 : _details$meta.key
57
+ }) : undefined;
58
+ }, [analytics, appearance, details === null || details === void 0 ? void 0 : (_details$meta2 = details.meta) === null || _details$meta2 === void 0 ? void 0 : _details$meta2.key]);
46
59
  useEffect(function () {
47
60
  switch (status) {
48
61
  case SmartLinkStatus.Resolved:
@@ -68,7 +81,7 @@ var FlexibleCard = function FlexibleCard(_ref) {
68
81
  }
69
82
  }, [onError, onResolve, status, title, url]);
70
83
  return /*#__PURE__*/React.createElement(FlexibleUiAnalyticsContext.Provider, {
71
- value: analytics
84
+ value: analyticsContext
72
85
  }, /*#__PURE__*/React.createElement(FlexibleUiOptionContext.Provider, {
73
86
  value: ui
74
87
  }, /*#__PURE__*/React.createElement(FlexibleUiContext.Provider, {
@@ -137,6 +137,7 @@ var HoverCardContent = function HoverCardContent(_ref) {
137
137
  subtitle: subtitle
138
138
  };
139
139
  var flexibleCardProps = {
140
+ appearance: CardDisplay.HoverCardPreview,
140
141
  cardState: cardState,
141
142
  onClick: onClick,
142
143
  onResolve: onResolve,
@@ -33,7 +33,7 @@ export var titleBlockCss = css(_templateObject3 || (_templateObject3 = _taggedTe
33
33
  export var getTransitionStyles = function getTransitionStyles(snippetHeight) {
34
34
  return css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n transition: height 300ms ease-in-out;\n height: ", "px;\n"])), snippetHeight);
35
35
  };
36
- export var popupContainerStyles = css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n border-radius: ", ";\n background-color: ", ";\n box-shadow: ", ";\n"])), "var(--ds-border-radius-300, 12px)", themed({
36
+ export var popupContainerStyles = css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n border-radius: ", ";\n background-color: ", ";\n box-shadow: ", ";\n"])), "var(--ds-border-radius-200, 8px)", themed({
37
37
  light: "var(--ds-surface-raised, white)",
38
38
  dark: "var(--ds-surface-raised, #262B31)"
39
39
  })(), themed({
@@ -41,5 +41,5 @@ export var popupContainerStyles = css(_templateObject5 || (_templateObject5 = _t
41
41
  dark: "var(--ds-shadow-overlay, 0px 0px 0px rgba(188, 214, 240, 0.12),0px 8px 12px rgba(3, 4, 4, 0.36),0px 0px 1px rgba(3, 4, 4, 0.5))"
42
42
  })());
43
43
  export var getPreviewBlockStyles = function getPreviewBlockStyles(snippetHeight) {
44
- return css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n height: ", "px;\n ", "\n"])), snippetHeight, getBooleanFF('platform.linking-platform.smart-card.show-smart-links-refreshed-design') ? " border-top-left-radius: ".concat("var(--ds-border-radius-300, 12px)", ";\n border-top-right-radius: ", "var(--ds-border-radius-300, 12px)", ";\n margin-bottom: ", blockGap, ";\n }") : "");
44
+ return css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n height: ", "px;\n ", "\n"])), snippetHeight, getBooleanFF('platform.linking-platform.smart-card.show-smart-links-refreshed-design') ? " border-top-left-radius: ".concat("var(--ds-border-radius-200, 8px)", ";\n border-top-right-radius: ", "var(--ds-border-radius-200, 8px)", ";\n margin-bottom: ", blockGap, ";\n }") : "");
45
45
  };
@@ -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.23.2",
14
+ packageVersion: "26.25.0",
15
15
  componentName: 'linkUrl'
16
16
  };
17
17
  var Link = withLinkClickedEvent('a');
@@ -41,7 +41,7 @@ var isSelected = function isSelected(_ref2) {
41
41
  // NB: `display: inline` required for `box-decoration-break` to work.
42
42
  // NB: `box-decoration-break` required for retaining properties (border-radius) on wrap.
43
43
  var baseWrapperStyle = function baseWrapperStyle(props) {
44
- return "\n line-height: 22px;\n padding: 2px 0px;\n ".concat(props.withoutBackground ? "padding-left: 0; margin-left:-2px;" : '', "\n display: inline;\n box-decoration-break: clone;\n border-radius: ", "var(--ds-border-radius-100, 3px)", ";\n color: ").concat(themed({
44
+ return "\n line-height: 22px;\n padding: 2px 0px;\n ".concat(props.withoutBackground ? "padding-left: 0; margin-left:-2px;" : '', "\n display: inline;\n box-decoration-break: clone;\n border-radius: ", "var(--ds-border-radius-100, 4px)", ";\n color: ").concat(themed({
45
45
  light: "var(--ds-link, ".concat(B400, ")"),
46
46
  dark: "var(--ds-link, #4794FF)"
47
47
  })(props), ";\n\n background-color: ").concat(props.withoutBackground ? '' : themed({
@@ -7,7 +7,7 @@ var LINK_COLOR_DARK = '#4794FF';
7
7
 
8
8
  // By default buttons will hide overflow and ellipsis content instead of wrapping.
9
9
  // This basically turns the button back into inline content
10
- export var IconStyledButton = styled.span(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n &&& {\n text-align: initial;\n display: inline;\n vertical-align: baseline;\n border-radius: ", ";\n border-top-left-radius: 0px;\n border-bottom-left-radius: 0px;\n padding: ", " ", ";\n background-clip: padding-box;\n box-decoration-break: clone;\n }\n > span {\n display: inline;\n overflow: initial;\n text-overflow: initial;\n white-space: initial;\n > span {\n overflow: initial;\n text-overflow: initial;\n white-space: initial;\n }\n }\n"])), "var(--ds-border-radius-100, 2px)", "var(--ds-space-025, 2px)", "var(--ds-space-075, 6px)");
10
+ export var IconStyledButton = styled.span(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n &&& {\n text-align: initial;\n display: inline;\n vertical-align: baseline;\n border-radius: ", ";\n border-top-left-radius: 0px;\n border-bottom-left-radius: 0px;\n padding: ", " ", ";\n background-clip: padding-box;\n box-decoration-break: clone;\n }\n > span {\n display: inline;\n overflow: initial;\n text-overflow: initial;\n white-space: initial;\n > span {\n overflow: initial;\n text-overflow: initial;\n white-space: initial;\n }\n }\n"])), "var(--ds-border-radius-100, 4px)", "var(--ds-space-025, 2px)", "var(--ds-space-075, 6px)");
11
11
  export var NoLinkAppearance = styled.span(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n color: ", ";\n margin-left: ", ";\n"])), themed({
12
12
  light: "var(--ds-text-subtlest, ".concat(N200, ")"),
13
13
  dark: "var(--ds-text-subtlest, ".concat(LINK_COLOR_DARK, ")")
@@ -0,0 +1,68 @@
1
+ declare const _default: {
2
+ meta: {
3
+ auth: never[];
4
+ definitionId: string;
5
+ product: string;
6
+ visibility: string;
7
+ access: string;
8
+ key: string;
9
+ };
10
+ data: {
11
+ '@context': {
12
+ '@vocab': string;
13
+ atlassian: string;
14
+ schema: string;
15
+ };
16
+ generator: {
17
+ '@type': string;
18
+ '@id': string;
19
+ name: string;
20
+ icon: {
21
+ '@type': string;
22
+ url: string;
23
+ };
24
+ };
25
+ '@type': string[];
26
+ url: string;
27
+ icon: {
28
+ '@type': string;
29
+ url: string;
30
+ };
31
+ name: string;
32
+ summary: string;
33
+ 'atlassian:state': {
34
+ '@type': string;
35
+ name: string;
36
+ appearance: string;
37
+ };
38
+ attributedTo: {
39
+ name: string;
40
+ icon: string;
41
+ }[];
42
+ 'atlassian:updatedBy': {
43
+ name: string;
44
+ icon: string;
45
+ }[];
46
+ preview: {
47
+ '@type': string;
48
+ href: string;
49
+ };
50
+ 'schema:commentCount': number;
51
+ 'atlassian:subscriberCount': number;
52
+ endTime: string;
53
+ updated: string;
54
+ 'atlassian:serverAction': {
55
+ '@type': string;
56
+ name: string;
57
+ dataUpdateAction: {
58
+ '@type': string;
59
+ name: string;
60
+ };
61
+ resourceIdentifiers: {
62
+ ari: string;
63
+ };
64
+ refField: string;
65
+ }[];
66
+ };
67
+ };
68
+ export default _default;
@@ -125,6 +125,7 @@ export declare enum ElementName {
125
125
  export declare enum ActionName {
126
126
  DeleteAction = "DeleteAction",
127
127
  EditAction = "EditAction",
128
+ FollowAction = "FollowAction",
128
129
  PreviewAction = "PreviewAction",
129
130
  ViewAction = "ViewAction",
130
131
  DownloadAction = "DownloadAction",
@@ -27,8 +27,10 @@ export declare const TEST_CURRENT_DOCUMENT: JsonLd.Data.Document;
27
27
  export declare const TEST_DOWNLOAD_ACTION: JsonLd.Data.BaseData['schema:potentialAction'];
28
28
  export declare const TEST_UNDEFINED_LINK: JsonLd.Data.UndefinedLinkDocument;
29
29
  export declare const TEST_ASSIGN_ACTION: JsonLd.Data.BaseData['schema:potentialAction'];
30
- export declare const TEST_NO_ID_ACTION: JsonLd.Data.BaseData['schema:potentialAction'];
31
30
  export declare const TEST_VIEW_ACTION: JsonLd.Data.BaseData['schema:potentialAction'];
31
+ export declare const TEST_FOLLOW_ACTION: JsonLd.Primitives.UpdateAction;
32
+ export declare const TEST_UNFOLLOW_ACTION: JsonLd.Primitives.UpdateAction;
33
+ export declare const TEST_STATUS_UPDATE_ACTION: JsonLd.Primitives.UpdateAction;
32
34
  export declare const TEST_DOCUMENT_WITH_ACTIONS: JsonLd.Data.BaseData;
33
35
  export declare const TEST_DOCUMENT_WITH_DOWNLOAD_ACTION: JsonLd.Data.BaseData;
34
36
  export declare const TEST_DOCUMENT_WITH_VIEW_ACTION: JsonLd.Data.BaseData;
@@ -2,4 +2,4 @@ import { JsonLd } from 'json-ld-types';
2
2
  import { InvokeHandler } from '../../../model/invoke-handler';
3
3
  import { ActionProps } from '../../../view/BlockCard/components/Action';
4
4
  export declare const getActionsFromJsonLd: (jsonLd: JsonLd.Data.BaseData) => JsonLd.Primitives.Action[];
5
- export declare function extractActions(jsonLd: JsonLd.Data.BaseData, handler: InvokeHandler): ActionProps[];
5
+ export declare function extractClientActions(jsonLd: JsonLd.Data.BaseData, handler: InvokeHandler): ActionProps[];
@@ -0,0 +1,5 @@
1
+ import type { JsonLd } from 'json-ld-types';
2
+ import { ServerActionProp } from '../../../state/flexible-ui-context/types';
3
+ import { ServerActionOptions } from '../../../view/FlexibleCard/types';
4
+ declare const extractFollowAction: (response?: JsonLd.Response, showServerActions?: boolean | ServerActionOptions, id?: string) => ServerActionProp<boolean> | undefined;
5
+ export default extractFollowAction;
@@ -1,6 +1,6 @@
1
1
  import { 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_description' | 'request_denied_description';
3
- export type MessageKey = 'assigned_to' | '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' | 'could_not_load_link' | 'download' | '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' | '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_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' | 'view' | 'viewIn' | 'viewOriginal' | 'actions' | 'add_account' | 'cancel' | 'close' | 'connect_to' | 'connect_account_description' | 'retry' | 'save' | 'unlink_account' | RequestAccessMessageKey;
3
+ export type MessageKey = 'assigned_to' | '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' | 'could_not_load_link' | 'download' | 'follow' | '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' | '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_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' | 'view' | 'viewIn' | 'viewOriginal' | 'actions' | 'add_account' | 'cancel' | 'close' | 'connect_to' | 'connect_account_description' | 'retry' | 'save' | 'unlink_account' | RequestAccessMessageKey;
4
4
  type Messages = {
5
5
  [K in MessageKey]: MessageDescriptor;
6
6
  };
@@ -90,10 +90,10 @@ export declare const useSmartLinkAnalytics: (url: string, _dispatchAnalytics?: A
90
90
  * @param extensionKey The extensionKey of the Smart Link resovler invoked.
91
91
  * @param actionType The type of the action that was clicked, e.g. PreviewAction
92
92
  * @param display Whether the card was an Inline, Block, Embed or Flexible UI.
93
- * @param invokeType Whether the action invoked made a call to a server.
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: experienceId, actionType, display, invokeType, extensionKey: overrideExtensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: UiActionClickedEventProps) => void;
96
+ actionClickedEvent: ({ id, actionType, display, invokeType, 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
@@ -181,7 +181,7 @@ export declare const useSmartLinkAnalytics: (url: string, _dispatchAnalytics?: A
181
181
  * @param actionType The type of action invoked, e.g. PreviewAction
182
182
  * @param display Whether the card was an Inline, Block, Embed or Flexible UI.
183
183
  */
184
- invokeSucceededEvent: ({ id: experienceId, actionType, display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: InvokeSucceededEventProps) => void;
184
+ invokeSucceededEvent: ({ id, actionType, display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: InvokeSucceededEventProps) => void;
185
185
  /**
186
186
  * This fires an event that represents an action being unsuccessfully invoked.
187
187
  * @param id The unique ID for this Smart Link.
@@ -190,7 +190,7 @@ export declare const useSmartLinkAnalytics: (url: string, _dispatchAnalytics?: A
190
190
  * @param display Whether the card was an Inline, Block, Embed or Flexible UI.
191
191
  * @param reason The reason the invocation failed.
192
192
  */
193
- invokeFailedEvent: ({ id: experienceId, actionType, display, reason, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: InvokeFailedEventProps) => void;
193
+ invokeFailedEvent: ({ id, actionType, display, reason, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: InvokeFailedEventProps) => void;
194
194
  /**
195
195
  * This fires an event that represents an account successfully being connected via a Smart Link.
196
196
  * @param id The unique ID for this Smart Link.