@atlaskit/smart-card 40.10.0 → 40.10.2

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 (57) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/analytics.spec.yaml +15 -3
  3. package/dist/cjs/state/helpers.js +147 -1
  4. package/dist/cjs/utils/analytics/analytics.js +1 -1
  5. package/dist/cjs/view/CardWithUrl/component.js +2 -6
  6. package/dist/cjs/view/EmbedCard/views/ErroredView.js +1 -8
  7. package/dist/cjs/view/EmbedCard/views/forbidden-view/index.js +1 -4
  8. package/dist/cjs/view/EmbedCard/views/unauthorized-view/index.js +1 -4
  9. package/dist/cjs/view/EmbedModal/components/link-info/index.js +4 -39
  10. package/dist/cjs/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/empty-state/main.js +1 -19
  11. package/dist/cjs/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/footer/main.js +4 -15
  12. package/dist/cjs/view/HoverCard/components/views/forbidden/index.js +1 -4
  13. package/dist/cjs/view/LinkUrl/index.js +1 -1
  14. package/dist/es2019/state/helpers.js +145 -1
  15. package/dist/es2019/utils/analytics/analytics.js +1 -1
  16. package/dist/es2019/view/CardWithUrl/component.js +3 -7
  17. package/dist/es2019/view/EmbedCard/views/ErroredView.js +1 -8
  18. package/dist/es2019/view/EmbedCard/views/forbidden-view/index.js +1 -4
  19. package/dist/es2019/view/EmbedCard/views/unauthorized-view/index.js +1 -4
  20. package/dist/es2019/view/EmbedModal/components/link-info/index.js +4 -39
  21. package/dist/es2019/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/empty-state/main.js +1 -19
  22. package/dist/es2019/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/footer/main.js +4 -15
  23. package/dist/es2019/view/HoverCard/components/views/forbidden/index.js +1 -4
  24. package/dist/es2019/view/LinkUrl/index.js +1 -1
  25. package/dist/esm/state/helpers.js +146 -0
  26. package/dist/esm/utils/analytics/analytics.js +1 -1
  27. package/dist/esm/view/CardWithUrl/component.js +3 -7
  28. package/dist/esm/view/EmbedCard/views/ErroredView.js +1 -8
  29. package/dist/esm/view/EmbedCard/views/forbidden-view/index.js +1 -4
  30. package/dist/esm/view/EmbedCard/views/unauthorized-view/index.js +1 -4
  31. package/dist/esm/view/EmbedModal/components/link-info/index.js +4 -39
  32. package/dist/esm/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/empty-state/main.js +1 -19
  33. package/dist/esm/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/footer/main.js +4 -15
  34. package/dist/esm/view/HoverCard/components/views/forbidden/index.js +1 -4
  35. package/dist/esm/view/LinkUrl/index.js +1 -1
  36. package/dist/types/common/analytics/generated/analytics.types.d.ts +5 -2
  37. package/dist/types/state/helpers.d.ts +10 -0
  38. package/dist/types/view/EmbedModal/components/link-info/link-info-button/index.d.ts +9 -1
  39. package/dist/types-ts4.5/common/analytics/generated/analytics.types.d.ts +5 -2
  40. package/dist/types-ts4.5/state/helpers.d.ts +10 -0
  41. package/dist/types-ts4.5/view/EmbedModal/components/link-info/link-info-button/index.d.ts +9 -1
  42. package/hooks/package.json +1 -1
  43. package/hover-card/package.json +1 -1
  44. package/link-url/package.json +1 -1
  45. package/package.json +4 -7
  46. package/ssr/package.json +1 -1
  47. package/types/package.json +1 -1
  48. package/dist/cjs/view/EmbedModal/components/link-info/link-info-button/old.js +0 -40
  49. package/dist/cjs/view/EmbedModal/components/link-info/link-info-button/types.js +0 -5
  50. package/dist/es2019/view/EmbedModal/components/link-info/link-info-button/old.js +0 -34
  51. package/dist/es2019/view/EmbedModal/components/link-info/link-info-button/types.js +0 -1
  52. package/dist/esm/view/EmbedModal/components/link-info/link-info-button/old.js +0 -33
  53. package/dist/esm/view/EmbedModal/components/link-info/link-info-button/types.js +0 -1
  54. package/dist/types/view/EmbedModal/components/link-info/link-info-button/old.d.ts +0 -8
  55. package/dist/types/view/EmbedModal/components/link-info/link-info-button/types.d.ts +0 -17
  56. package/dist/types-ts4.5/view/EmbedModal/components/link-info/link-info-button/old.d.ts +0 -8
  57. package/dist/types-ts4.5/view/EmbedModal/components/link-info/link-info-button/types.d.ts +0 -17
@@ -35,6 +35,45 @@ export const getThirdPartyARI = details => {
35
35
  }
36
36
  return undefined;
37
37
  };
38
+ export const getPageId = details => {
39
+ if (fg('platform_smartlink_3pclick_analytics')) {
40
+ const currentProduct = getProductFromWindowUrl();
41
+ if (currentProduct === 'confluence') {
42
+ if (details !== null && details !== void 0 && details.data && 'url' in details.data) {
43
+ if (typeof details.data.url === 'string') {
44
+ return extractPageIdFromURL(details.data.url);
45
+ }
46
+ }
47
+ }
48
+ }
49
+ return undefined;
50
+ };
51
+ export const getContentId = details => {
52
+ if (fg('platform_smartlink_3pclick_analytics')) {
53
+ const currentProduct = getProductFromWindowUrl();
54
+ if (currentProduct === 'confluence') {
55
+ if (details !== null && details !== void 0 && details.data && 'url' in details.data) {
56
+ if (typeof details.data.url === 'string') {
57
+ return extractContentIdFromURL(details.data.url);
58
+ }
59
+ }
60
+ }
61
+ }
62
+ return undefined;
63
+ };
64
+ export const getJiraIssueId = details => {
65
+ if (fg('platform_smartlink_3pclick_analytics')) {
66
+ const currentProduct = getProductFromWindowUrl();
67
+ if (currentProduct === 'jira') {
68
+ if (details !== null && details !== void 0 && details.data && 'url' in details.data) {
69
+ if (typeof details.data.url === 'string') {
70
+ return extractJiraIssueIdFromURL(details.data.url);
71
+ }
72
+ }
73
+ }
74
+ }
75
+ return undefined;
76
+ };
38
77
  export const getObjectName = details => (details === null || details === void 0 ? void 0 : details.data) && 'name' in details.data && details.data.name || undefined;
39
78
  export const getObjectIconUrl = details => {
40
79
  if (details !== null && details !== void 0 && details.data && 'icon' in details.data && details.data.icon) {
@@ -80,4 +119,109 @@ export const getCanBeDatasource = details => {
80
119
  const datasources = getDatasources(details);
81
120
  return !!datasources && datasources.length > 0;
82
121
  };
83
- export const hasAuthScopeOverrides = details => !!(details !== null && details !== void 0 && details.meta.hasScopeOverrides);
122
+ export const hasAuthScopeOverrides = details => !!(details !== null && details !== void 0 && details.meta.hasScopeOverrides);
123
+
124
+ // Helper function to extract page ID from standard Confluence page URLs
125
+ const extractPageIdFromURL = url => {
126
+ try {
127
+ const urlObj = new URL(url);
128
+
129
+ // Following this pattern for confluence URL -> /wiki/spaces/{space}/pages/{pageId}/{title}
130
+ const pagesMatch = urlObj.pathname.match(/\/wiki\/spaces\/[^\/]+\/pages\/(\d+)/);
131
+ if (pagesMatch && pagesMatch[1]) {
132
+ return pagesMatch[1];
133
+ }
134
+
135
+ // Following this pattern for confluence URL -> /wiki/pages/viewpage.action?pageId={pageId}
136
+ const pageIdParam = urlObj.searchParams.get('pageId');
137
+ if (pageIdParam) {
138
+ return pageIdParam;
139
+ }
140
+
141
+ // Following this pattern for confluence URL -> /wiki/display/{space}/{pageId}
142
+ const displayMatch = urlObj.pathname.match(/\/wiki\/display\/[^\/]+\/(\d+)/);
143
+ if (displayMatch && displayMatch[1]) {
144
+ return displayMatch[1];
145
+ }
146
+ } catch {
147
+ return undefined;
148
+ }
149
+ return undefined;
150
+ };
151
+
152
+ // Helper function to extract content ID from app connector URLs
153
+ const extractContentIdFromURL = url => {
154
+ try {
155
+ const urlObj = new URL(url);
156
+
157
+ // Pattern: ?content.id={contentId} (for app connector URLs)
158
+ const contentId = urlObj.searchParams.get('content.id');
159
+ if (contentId) {
160
+ return contentId;
161
+ }
162
+ } catch {
163
+ return undefined;
164
+ }
165
+ return undefined;
166
+ };
167
+ const extractJiraIssueIdFromURL = url => {
168
+ try {
169
+ const urlObj = new URL(url);
170
+
171
+ // Following this pattern for jira URL -> /browse/{issueKey} (most common)
172
+ // Example: https://product-fabric.atlassian.net/browse/AI3W-1064
173
+ const browseMatch = urlObj.pathname.match(/\/browse\/([A-Z]+-\d+)/);
174
+ if (browseMatch && browseMatch[1]) {
175
+ return browseMatch[1];
176
+ }
177
+
178
+ // Following this pattern for jira URL -> /jira/browse/{issueKey} (for some installations)
179
+ const jiraBrowseMatch = urlObj.pathname.match(/\/jira\/browse\/([A-Z]+-\d+)/);
180
+ if (jiraBrowseMatch && jiraBrowseMatch[1]) {
181
+ return jiraBrowseMatch[1];
182
+ }
183
+
184
+ // Following this pattern for jira URL -> Query parameter ?selectedIssue={issueKey}
185
+ const selectedIssue = urlObj.searchParams.get('selectedIssue');
186
+ if (selectedIssue && /^[A-Z]+-\d+$/.test(selectedIssue)) {
187
+ return selectedIssue;
188
+ }
189
+
190
+ // Following this pattern for jira URL -> Query parameter ?issueKey={issueKey}
191
+ const issueKeyParam = urlObj.searchParams.get('issueKey');
192
+ if (issueKeyParam && /^[A-Z]+-\d+$/.test(issueKeyParam)) {
193
+ return issueKeyParam;
194
+ }
195
+ } catch {
196
+ return undefined;
197
+ }
198
+ return undefined;
199
+ };
200
+ export const getLinkClickAnalyticsThirdPartyAttributes = (thirdPartyARI, details) => ({
201
+ firstPartyARI: getObjectAri(details),
202
+ thirdPartyARI: thirdPartyARI,
203
+ jiraIssueId: getJiraIssueId(details),
204
+ confluenceContentId: getContentId(details),
205
+ confluencePageId: getPageId(details)
206
+ });
207
+ const getProductFromWindowUrl = () => {
208
+ try {
209
+ const currentUrl = window.location.href;
210
+ const urlObj = new URL(currentUrl);
211
+ const hostname = urlObj.hostname.toLowerCase();
212
+ const pathname = urlObj.pathname.toLowerCase();
213
+
214
+ // Check for Confluence patterns
215
+ if (hostname.includes('confluence') || pathname.includes('/wiki/') || pathname.includes('/display/') || pathname.includes('/spaces/')) {
216
+ return 'confluence';
217
+ }
218
+
219
+ // Check for Jira patterns
220
+ if (hostname.includes('jira') || pathname.includes('/browse/') || pathname.includes('/projects/') || pathname.includes('/secure/')) {
221
+ return 'jira';
222
+ }
223
+ } catch {
224
+ return undefined;
225
+ }
226
+ return undefined;
227
+ };
@@ -2,7 +2,7 @@ export const ANALYTICS_CHANNEL = 'media';
2
2
  export const context = {
3
3
  componentName: 'smart-cards',
4
4
  packageName: "@atlaskit/smart-card",
5
- packageVersion: "40.9.0"
5
+ packageVersion: "40.10.1"
6
6
  };
7
7
  export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
8
8
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -5,7 +5,7 @@ import { useAnalyticsEvents } from '../../common/analytics/generated/use-analyti
5
5
  import { CardDisplay } from '../../constants';
6
6
  import { useSmartLink } from '../../state';
7
7
  import { succeedUfoExperience } from '../../state/analytics';
8
- import { getClickUrl, getDefinitionId, getExtensionKey, getObjectAri, getObjectIconUrl, getObjectName, getResourceType, getServices, getThirdPartyARI, isFinalState } from '../../state/helpers';
8
+ import { getClickUrl, getDefinitionId, getExtensionKey, getLinkClickAnalyticsThirdPartyAttributes, getObjectAri, getObjectIconUrl, getObjectName, getResourceType, getServices, getThirdPartyARI, isFinalState } from '../../state/helpers';
9
9
  import { SmartLinkModalProvider } from '../../state/modal';
10
10
  import { isSpecialClick, isSpecialEvent, isSpecialKey } from '../../utils';
11
11
  import { combineActionOptions } from '../../utils/actions/combine-action-options';
@@ -63,12 +63,12 @@ function Component({
63
63
  openPreviewPanel
64
64
  } = useSmartLink(id, url);
65
65
  const ari = getObjectAri(state.details);
66
- const thirdPartyARI = getThirdPartyARI(state.details);
67
66
  const name = getObjectName(state.details);
68
67
  const definitionId = getDefinitionId(state.details);
69
68
  const extensionKey = getExtensionKey(state.details);
70
69
  const resourceType = getResourceType(state.details);
71
70
  const services = getServices(state.details);
71
+ const thirdPartyARI = getThirdPartyARI(state.details);
72
72
  let isFlexibleUi = useMemo(() => isFlexibleUiCard(children, ui), [children, ui]);
73
73
  const actionOptions = combineActionOptions({
74
74
  actionOptions: actionOptionsProp,
@@ -86,7 +86,6 @@ function Component({
86
86
  });
87
87
  if (fg('platform_smartlink_3pclick_analytics')) {
88
88
  if (thirdPartyARI && thirdPartyARI.startsWith(thirdPartyARIPrefix)) {
89
- const sourceURL = window.location.href;
90
89
  const clickURL = getClickUrl(url, state.details);
91
90
  if (clickURL === url) {
92
91
  // For questions or concerns about this event,
@@ -99,10 +98,7 @@ function Component({
99
98
  attributes: {
100
99
  eventName: 'smartLinkClickAnalyticsThirdPartyWorkflows'
101
100
  },
102
- nonPrivacySafeAttributes: {
103
- sourceURL: sourceURL,
104
- thirdPartyARI: thirdPartyARI
105
- }
101
+ nonPrivacySafeAttributes: getLinkClickAnalyticsThirdPartyAttributes(thirdPartyARI, state.details)
106
102
  });
107
103
  smartlinkClickAnalyticsEvent.fire('media');
108
104
  }
@@ -3,10 +3,8 @@ import "./ErroredView.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
5
5
  import { FormattedMessage } from 'react-intl-next';
6
- import ButtonOld from '@atlaskit/button';
7
6
  import Button from '@atlaskit/button/new';
8
7
  import ErrorIcon from '@atlaskit/icon/core/migration/status-error--error';
9
- import { fg } from '@atlaskit/platform-feature-flags';
10
8
  import { Box, Inline } from '@atlaskit/primitives/compiled';
11
9
  import { R300 } from '@atlaskit/theme/colors';
12
10
  import { messages } from '../../../messages';
@@ -30,13 +28,8 @@ export const EmbedCardErroredView = ({
30
28
  label: "error-icon"
31
29
  }), /*#__PURE__*/React.createElement(Box, {
32
30
  xcss: styles.boxStyles
33
- }, /*#__PURE__*/React.createElement(Inline, null, /*#__PURE__*/React.createElement(FormattedMessage, messages.could_not_load_link))), fg('platform-smart-card-remove-legacy-button') ? /*#__PURE__*/React.createElement(Button, {
31
+ }, /*#__PURE__*/React.createElement(Inline, null, /*#__PURE__*/React.createElement(FormattedMessage, messages.could_not_load_link))), /*#__PURE__*/React.createElement(Button, {
34
32
  testId: "err-view-retry",
35
33
  spacing: "compact",
36
34
  onClick: onRetry
37
- }, /*#__PURE__*/React.createElement(FormattedMessage, messages.try_again)) : /*#__PURE__*/React.createElement(ButtonOld, {
38
- testId: "err-view-retry",
39
- appearance: "link",
40
- spacing: "none",
41
- onClick: onRetry
42
35
  }, /*#__PURE__*/React.createElement(FormattedMessage, messages.try_again)));
@@ -1,9 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import React, { useMemo } from 'react';
3
3
  import { FormattedMessage } from 'react-intl-next';
4
- import ButtonOld from '@atlaskit/button';
5
4
  import Button from '@atlaskit/button/new';
6
- import { fg } from '@atlaskit/platform-feature-flags';
7
5
  import { messages } from '../../../../messages';
8
6
  import { toMessage } from '../../../../utils/intl-utils';
9
7
  import UnresolvedView from '../unresolved-view';
@@ -49,8 +47,7 @@ const ForbiddenView = ({
49
47
  if (!onEmbedCardClick) {
50
48
  return null;
51
49
  }
52
- const ButtonComponent = fg('platform-smart-card-remove-legacy-button') ? Button : ButtonOld;
53
- return /*#__PURE__*/React.createElement(ButtonComponent, {
50
+ return /*#__PURE__*/React.createElement(Button, {
54
51
  testId: `button-${(action === null || action === void 0 ? void 0 : action.id) || 'connect-other-account'}`,
55
52
  appearance: "primary",
56
53
  onClick: onEmbedCardClick,
@@ -1,9 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import React, { useCallback, useMemo } from 'react';
3
3
  import { FormattedMessage } from 'react-intl-next';
4
- import ButtonOld from '@atlaskit/button';
5
4
  import Button from '@atlaskit/button/new';
6
- import { fg } from '@atlaskit/platform-feature-flags';
7
5
  import { useAnalyticsEvents } from '../../../../common/analytics/generated/use-analytics-events';
8
6
  import { messages } from '../../../../messages';
9
7
  import UnauthorisedViewContent from '../../../common/UnauthorisedViewContent';
@@ -28,7 +26,6 @@ const UnauthorizedView = ({
28
26
  }
29
27
  }, [onAuthorize, fireEvent]);
30
28
  const content = useMemo(() => {
31
- const ButtonComponent = fg('platform-smart-card-remove-legacy-button') ? Button : ButtonOld;
32
29
  if (onAuthorize) {
33
30
  var _context$text;
34
31
  // Our title and button messages always expect the product name to be present
@@ -49,7 +46,7 @@ const UnauthorizedView = ({
49
46
  isProductIntegrationSupported: isProductIntegrationSupported,
50
47
  testId: testId
51
48
  }),
52
- button: /*#__PURE__*/React.createElement(ButtonComponent, {
49
+ button: /*#__PURE__*/React.createElement(Button, {
53
50
  testId: "connect-account",
54
51
  appearance: "primary",
55
52
  onClick: handleOnAuthorizeClick
@@ -12,12 +12,10 @@ import ShortcutIcon from '@atlaskit/icon/core/migration/link-external--shortcut'
12
12
  import DownloadIconLegacy from '@atlaskit/icon/glyph/download';
13
13
  import VidFullScreenOffIcon from '@atlaskit/icon/glyph/vid-full-screen-off';
14
14
  import { useModal } from '@atlaskit/modal-dialog';
15
- import { fg } from '@atlaskit/platform-feature-flags';
16
15
  import { messages } from '../../../../messages';
17
16
  import { Icon } from '../../../common/Icon';
18
17
  import { MAX_MODAL_SIZE } from '../../constants';
19
18
  import LinkInfoButton from './link-info-button';
20
- import LinkInfoButtonOld from './link-info-button/old';
21
19
  const containerStyles = null;
22
20
  const iconSize = '24px';
23
21
 
@@ -42,7 +40,7 @@ const LinkInfo = ({
42
40
  } = useModal();
43
41
  const downloadButton = useMemo(() => {
44
42
  if (onDownloadButtonClick) {
45
- return fg('platform-smart-card-remove-legacy-button') ? /*#__PURE__*/React.createElement(LinkInfoButton, {
43
+ return /*#__PURE__*/React.createElement(LinkInfoButton, {
46
44
  content: /*#__PURE__*/React.createElement(FormattedMessage, messages.download),
47
45
  icon: () => /*#__PURE__*/React.createElement(DownloadIcon, {
48
46
  label: messages.download.defaultMessage,
@@ -53,23 +51,13 @@ const LinkInfo = ({
53
51
  label: messages.download,
54
52
  onClick: onDownloadButtonClick,
55
53
  testId: `${testId}-download`
56
- }) : /*#__PURE__*/React.createElement(LinkInfoButtonOld, {
57
- content: /*#__PURE__*/React.createElement(FormattedMessage, messages.download),
58
- icon: /*#__PURE__*/React.createElement(DownloadIcon, {
59
- label: messages.download.defaultMessage,
60
- LEGACY_fallbackIcon: DownloadIconLegacy,
61
- spacing: "spacious",
62
- color: "currentColor"
63
- }),
64
- onClick: onDownloadButtonClick,
65
- testId: `${testId}-download`
66
54
  });
67
55
  }
68
56
  }, [onDownloadButtonClick, testId]);
69
57
  const urlButton = useMemo(() => {
70
58
  if (onViewButtonClick) {
71
59
  const content = providerName ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(FormattedMessage, messages.viewIn), " ", providerName) : /*#__PURE__*/React.createElement(FormattedMessage, messages.viewOriginal);
72
- return fg('platform-smart-card-remove-legacy-button') ? /*#__PURE__*/React.createElement(LinkInfoButton, {
60
+ return /*#__PURE__*/React.createElement(LinkInfoButton, {
73
61
  content: content,
74
62
  icon: () => /*#__PURE__*/React.createElement(ShortcutIcon, {
75
63
  label: messages.viewOriginal.defaultMessage,
@@ -79,15 +67,6 @@ const LinkInfo = ({
79
67
  label: messages.viewOriginal,
80
68
  onClick: onViewButtonClick,
81
69
  testId: `${testId}-url`
82
- }) : /*#__PURE__*/React.createElement(LinkInfoButtonOld, {
83
- content: content,
84
- icon: /*#__PURE__*/React.createElement(ShortcutIcon, {
85
- label: messages.viewOriginal.defaultMessage,
86
- spacing: "spacious",
87
- color: "currentColor"
88
- }),
89
- onClick: onViewButtonClick,
90
- testId: `${testId}-url`
91
70
  });
92
71
  }
93
72
  }, [onViewButtonClick, providerName, testId]);
@@ -109,17 +88,12 @@ const LinkInfo = ({
109
88
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
110
89
  React.createElement("span", {
111
90
  className: "smart-link-resize-button"
112
- }, fg('platform-smart-card-remove-legacy-button') ? /*#__PURE__*/React.createElement(LinkInfoButton, {
91
+ }, /*#__PURE__*/React.createElement(LinkInfoButton, {
113
92
  content: /*#__PURE__*/React.createElement(FormattedMessage, message),
114
93
  icon: () => icon,
115
94
  label: message,
116
95
  onClick: onResizeButtonClick,
117
96
  testId: `${testId}-resize`
118
- }) : /*#__PURE__*/React.createElement(LinkInfoButtonOld, {
119
- content: /*#__PURE__*/React.createElement(FormattedMessage, message),
120
- icon: icon,
121
- onClick: onResizeButtonClick,
122
- testId: `${testId}-resize`
123
97
  }))
124
98
  );
125
99
  }, [onResizeButtonClick, size, testId]);
@@ -140,7 +114,7 @@ const LinkInfo = ({
140
114
  "aria-hidden": true
141
115
  })), /*#__PURE__*/React.createElement("div", {
142
116
  className: ax(["_16jlidpf _1o9zidpf _i0dl1wug _zulp1b66 _1e0c1txw _3kllglyw"])
143
- }, downloadButton, urlButton, sizeButton, fg('platform-smart-card-remove-legacy-button') ? /*#__PURE__*/React.createElement(LinkInfoButton, {
117
+ }, downloadButton, urlButton, sizeButton, /*#__PURE__*/React.createElement(LinkInfoButton, {
144
118
  content: /*#__PURE__*/React.createElement(FormattedMessage, messages.preview_close),
145
119
  icon: () => /*#__PURE__*/React.createElement(CrossIcon, {
146
120
  label: messages.preview_close.defaultMessage,
@@ -150,15 +124,6 @@ const LinkInfo = ({
150
124
  label: messages.preview_close,
151
125
  onClick: onClose,
152
126
  testId: `${testId}-close`
153
- }) : /*#__PURE__*/React.createElement(LinkInfoButtonOld, {
154
- content: /*#__PURE__*/React.createElement(FormattedMessage, messages.preview_close),
155
- icon: /*#__PURE__*/React.createElement(CrossIcon, {
156
- label: messages.preview_close.defaultMessage,
157
- color: "currentColor",
158
- spacing: "spacious"
159
- }),
160
- onClick: onClose,
161
- testId: `${testId}-close`
162
127
  })));
163
128
  };
164
129
  export default LinkInfo;
@@ -4,9 +4,7 @@ import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
5
5
  import { defineMessages, FormattedMessage, useIntl } from 'react-intl-next';
6
6
  import { useAnalyticsEvents } from '@atlaskit/analytics-next';
7
- import ButtonOld from '@atlaskit/button';
8
7
  import Link from '@atlaskit/link';
9
- import { fg } from '@atlaskit/platform-feature-flags';
10
8
  import { Box, Stack } from '@atlaskit/primitives/compiled';
11
9
  import { useAutomationMenu } from '../../menu-context';
12
10
  import EmptyIcon from './empty-icon';
@@ -64,23 +62,7 @@ export const AutomationModalEmptyState = () => {
64
62
  alt: formatMessage(i18n.emptyAutomationListImageAlt)
65
63
  })), /*#__PURE__*/React.createElement(Box, {
66
64
  xcss: styles.description
67
- }, displayedEmptyStateDesc, canManageAutomation && /*#__PURE__*/React.createElement("div", null, fg('platform-smart-card-remove-legacy-button') ? /*#__PURE__*/React.createElement(Link, {
68
- href: "https://www.atlassian.com/platform/automation",
69
- target: "_blank",
70
- onClick: () => {
71
- createAnalyticsEvent({
72
- type: 'sendUIEvent',
73
- data: {
74
- action: 'clicked',
75
- actionSubject: 'link',
76
- actionSubjectId: 'learnMore',
77
- source: analyticsSource
78
- }
79
- }).fire();
80
- }
81
- }, /*#__PURE__*/React.createElement(FormattedMessage, i18n.learnMoreLink)) : /*#__PURE__*/React.createElement(ButtonOld, {
82
- appearance: "link",
83
- spacing: "none",
65
+ }, displayedEmptyStateDesc, canManageAutomation && /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Link, {
84
66
  href: "https://www.atlassian.com/platform/automation",
85
67
  target: "_blank",
86
68
  onClick: () => {
@@ -1,9 +1,7 @@
1
1
  import React from 'react';
2
2
  import { defineMessages, FormattedMessage } from 'react-intl-next';
3
3
  import { useAnalyticsEvents } from '@atlaskit/analytics-next';
4
- import ButtonOld from '@atlaskit/button';
5
4
  import Button, { LinkButton } from '@atlaskit/button/new';
6
- import { fg } from '@atlaskit/platform-feature-flags';
7
5
  import { useAutomationMenu } from '../../menu-context';
8
6
  const i18n = defineMessages({
9
7
  modalFooterCancelButton: {
@@ -62,8 +60,7 @@ export const AutomationModalFooter = ({
62
60
  }
63
61
  event.fire();
64
62
  };
65
- const ButtonComponent = fg('platform-smart-card-remove-legacy-button') ? Button : ButtonOld;
66
- const okButton = /*#__PURE__*/React.createElement(ButtonComponent, {
63
+ const okButton = /*#__PURE__*/React.createElement(Button, {
67
64
  key: "automation-modal-footer-ok",
68
65
  appearance: "primary",
69
66
  onClick: () => {
@@ -71,7 +68,7 @@ export const AutomationModalFooter = ({
71
68
  onClose();
72
69
  }
73
70
  }, /*#__PURE__*/React.createElement(FormattedMessage, i18n.modalFooterOkButton));
74
- const cancelButton = /*#__PURE__*/React.createElement(ButtonComponent, {
71
+ const cancelButton = /*#__PURE__*/React.createElement(Button, {
75
72
  key: "automation-modal-footer-cancel",
76
73
  appearance: "subtle",
77
74
  onClick: () => {
@@ -79,15 +76,7 @@ export const AutomationModalFooter = ({
79
76
  onClose();
80
77
  }
81
78
  }, /*#__PURE__*/React.createElement(FormattedMessage, i18n.modalFooterCancelButton));
82
- const createAutomationButton = fg('platform-smart-card-remove-legacy-button') ? /*#__PURE__*/React.createElement(LinkButton, {
83
- key: "automation-modal-footer-create-automation",
84
- appearance: "primary",
85
- href: `${baseAutomationUrl}#rule/new`,
86
- onClick: () => {
87
- sendFooterAnalyticsEvent('createAutomation');
88
- },
89
- target: "_blank"
90
- }, /*#__PURE__*/React.createElement(FormattedMessage, i18n.modalFooterCreateAutomationButton)) : /*#__PURE__*/React.createElement(ButtonOld, {
79
+ const createAutomationButton = /*#__PURE__*/React.createElement(LinkButton, {
91
80
  key: "automation-modal-footer-create-automation",
92
81
  appearance: "primary",
93
82
  href: `${baseAutomationUrl}#rule/new`,
@@ -96,7 +85,7 @@ export const AutomationModalFooter = ({
96
85
  },
97
86
  target: "_blank"
98
87
  }, /*#__PURE__*/React.createElement(FormattedMessage, i18n.modalFooterCreateAutomationButton));
99
- const automateButton = /*#__PURE__*/React.createElement(ButtonComponent, {
88
+ const automateButton = /*#__PURE__*/React.createElement(Button, {
100
89
  key: "automation-modal-footer-automate",
101
90
  appearance: "primary",
102
91
  onClick: () => {
@@ -5,10 +5,8 @@ import * as React from 'react';
5
5
  import { ax, ix } from "@compiled/react/runtime";
6
6
  import { FormattedMessage } from 'react-intl-next';
7
7
  import { useAnalyticsEvents } from '@atlaskit/analytics-next';
8
- import ButtonOld from '@atlaskit/button';
9
8
  import Button from '@atlaskit/button/new';
10
9
  import { extractSmartLinkProvider } from '@atlaskit/link-extractors';
11
- import { fg } from '@atlaskit/platform-feature-flags';
12
10
  import { extractRequestAccessContextImproved } from '../../../../../extractors/common/context/extractAccessContext';
13
11
  import extractHostname from '../../../../../extractors/common/hostname/extractHostname';
14
12
  import { messages } from '../../../../../messages';
@@ -47,7 +45,6 @@ const HoverCardForbiddenView = ({
47
45
  if (!titleMessageKey || !descriptiveMessageKey) {
48
46
  return null;
49
47
  }
50
- const ButtonComponent = fg('platform-smart-card-remove-legacy-button') ? Button : ButtonOld;
51
48
  return /*#__PURE__*/React.createElement(FlexibleCard, _extends({}, flexibleCardProps, {
52
49
  testId: testId
53
50
  }), /*#__PURE__*/React.createElement(PreviewBlock, {
@@ -71,7 +68,7 @@ const HoverCardForbiddenView = ({
71
68
  }
72
69
  }))), action && /*#__PURE__*/React.createElement(CustomBlock, {
73
70
  className: ax(["_1bah1h6o _19pku2gc"])
74
- }, /*#__PURE__*/React.createElement(ButtonComponent, {
71
+ }, /*#__PURE__*/React.createElement(Button, {
75
72
  testId: `${testId}-button`,
76
73
  onClick: action === null || action === void 0 ? void 0 : action.promise,
77
74
  appearance: "primary",
@@ -9,7 +9,7 @@ import LinkWarningModal from './LinkWarningModal';
9
9
  import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
10
10
  const PACKAGE_DATA = {
11
11
  packageName: "@atlaskit/smart-card",
12
- packageVersion: "40.9.0",
12
+ packageVersion: "40.10.1",
13
13
  componentName: 'linkUrl'
14
14
  };
15
15
  const Anchor = withLinkClickedEvent('a');