@atlaskit/smart-card 33.1.0 → 33.3.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 (247) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/cjs/extractors/flexible/actions/extract-copy-link-action.js +1 -20
  3. package/dist/cjs/extractors/flexible/actions/extract-download-action.js +1 -23
  4. package/dist/cjs/extractors/flexible/actions/extract-preview-action.js +1 -34
  5. package/dist/cjs/extractors/flexible/actions/index.js +2 -15
  6. package/dist/cjs/extractors/flexible/extract-state.js +1 -5
  7. package/dist/cjs/extractors/flexible/index.js +3 -7
  8. package/dist/cjs/state/actions/index.js +2 -4
  9. package/dist/cjs/state/analytics/index.js +1 -8
  10. package/dist/cjs/state/flexible-ui-context/index.js +1 -10
  11. package/dist/cjs/state/hooks/use-invoke-client-action/index.js +21 -44
  12. package/dist/cjs/state/hooks/useSmartLink.js +1 -4
  13. package/dist/cjs/state/hooks-external/useSmartLinkActions.js +5 -21
  14. package/dist/cjs/state/hooks-external/useSmartLinkReload.js +1 -3
  15. package/dist/cjs/state/index.js +1 -8
  16. package/dist/cjs/utils/analytics/SmartLinkAnalyticsContext.js +3 -37
  17. package/dist/cjs/utils/analytics/analytics.js +2 -144
  18. package/dist/cjs/utils/analytics/index.js +0 -30
  19. package/dist/cjs/utils/analytics/types.js +1 -5
  20. package/dist/cjs/utils/mocks.js +1 -23
  21. package/dist/cjs/view/BlockCard/index.js +1 -3
  22. package/dist/cjs/view/BlockCard/views/ResolvedView.js +1 -3
  23. package/dist/cjs/view/BlockCard/views/UnauthorisedView.js +2 -4
  24. package/dist/cjs/view/CardWithUrl/component.js +13 -33
  25. package/dist/cjs/view/CardWithUrl/loader.js +10 -22
  26. package/dist/cjs/view/EmbedCard/index.js +0 -4
  27. package/dist/cjs/view/EmbedCard/views/unauthorized-view/index.js +3 -5
  28. package/dist/cjs/view/EmbedModal/components/analytics/index.js +40 -89
  29. package/dist/cjs/view/EmbedModal/index.js +9 -68
  30. package/dist/cjs/view/FlexibleCard/components/actions/copy-link-action/index.js +27 -67
  31. package/dist/cjs/view/FlexibleCard/components/actions/download-action/index.js +5 -44
  32. package/dist/cjs/view/FlexibleCard/components/actions/preview-action/index.js +5 -51
  33. package/dist/cjs/view/FlexibleCard/components/elements/lozenge/lozenge-action/index.js +3 -3
  34. package/dist/cjs/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/index.js +10 -26
  35. package/dist/cjs/view/FlexibleCard/components/utils.js +1 -28
  36. package/dist/cjs/view/FlexibleCard/index.js +3 -17
  37. package/dist/cjs/view/HoverCard/components/HoverCardComponent.js +1 -3
  38. package/dist/cjs/view/HoverCard/components/HoverCardContent.js +1 -8
  39. package/dist/cjs/view/HoverCard/components/views/resolved/index.js +13 -30
  40. package/dist/cjs/view/HoverCard/components/views/unauthorised/index.js +3 -5
  41. package/dist/cjs/view/HoverCard/index.js +10 -22
  42. package/dist/cjs/view/InlineCard/index.js +1 -3
  43. package/dist/cjs/view/LinkUrl/index.js +1 -1
  44. package/dist/es2019/extractors/flexible/actions/extract-copy-link-action.js +0 -19
  45. package/dist/es2019/extractors/flexible/actions/extract-download-action.js +0 -21
  46. package/dist/es2019/extractors/flexible/actions/extract-preview-action.js +0 -34
  47. package/dist/es2019/extractors/flexible/actions/index.js +4 -23
  48. package/dist/es2019/extractors/flexible/extract-state.js +1 -5
  49. package/dist/es2019/extractors/flexible/index.js +3 -4
  50. package/dist/es2019/state/actions/index.js +2 -4
  51. package/dist/es2019/state/analytics/index.js +1 -2
  52. package/dist/es2019/state/flexible-ui-context/index.js +0 -7
  53. package/dist/es2019/state/hooks/use-invoke-client-action/index.js +21 -44
  54. package/dist/es2019/state/hooks/useSmartLink.js +1 -4
  55. package/dist/es2019/state/hooks-external/useSmartLinkActions.js +5 -21
  56. package/dist/es2019/state/hooks-external/useSmartLinkReload.js +1 -3
  57. package/dist/es2019/state/index.js +1 -2
  58. package/dist/es2019/utils/analytics/SmartLinkAnalyticsContext.js +3 -40
  59. package/dist/es2019/utils/analytics/analytics.js +2 -145
  60. package/dist/es2019/utils/analytics/index.js +1 -1
  61. package/dist/es2019/utils/analytics/types.js +0 -1
  62. package/dist/es2019/utils/mocks.js +1 -23
  63. package/dist/es2019/view/BlockCard/index.js +1 -3
  64. package/dist/es2019/view/BlockCard/views/ResolvedView.js +1 -3
  65. package/dist/es2019/view/BlockCard/views/UnauthorisedView.js +1 -3
  66. package/dist/es2019/view/CardWithUrl/component.js +14 -34
  67. package/dist/es2019/view/CardWithUrl/loader.js +11 -23
  68. package/dist/es2019/view/EmbedCard/index.js +0 -4
  69. package/dist/es2019/view/EmbedCard/views/unauthorized-view/index.js +1 -3
  70. package/dist/es2019/view/EmbedModal/components/analytics/index.js +39 -88
  71. package/dist/es2019/view/EmbedModal/index.js +10 -35
  72. package/dist/es2019/view/FlexibleCard/components/actions/copy-link-action/index.js +13 -37
  73. package/dist/es2019/view/FlexibleCard/components/actions/download-action/index.js +6 -27
  74. package/dist/es2019/view/FlexibleCard/components/actions/preview-action/index.js +6 -32
  75. package/dist/es2019/view/FlexibleCard/components/elements/lozenge/lozenge-action/index.js +3 -3
  76. package/dist/es2019/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/index.js +6 -24
  77. package/dist/es2019/view/FlexibleCard/components/utils.js +0 -25
  78. package/dist/es2019/view/FlexibleCard/index.js +3 -15
  79. package/dist/es2019/view/HoverCard/components/HoverCardComponent.js +1 -3
  80. package/dist/es2019/view/HoverCard/components/HoverCardContent.js +1 -8
  81. package/dist/es2019/view/HoverCard/components/views/resolved/index.js +12 -25
  82. package/dist/es2019/view/HoverCard/components/views/unauthorised/index.js +2 -4
  83. package/dist/es2019/view/HoverCard/index.js +11 -23
  84. package/dist/es2019/view/InlineCard/index.js +0 -2
  85. package/dist/es2019/view/LinkUrl/index.js +1 -1
  86. package/dist/esm/extractors/flexible/actions/extract-copy-link-action.js +0 -19
  87. package/dist/esm/extractors/flexible/actions/extract-download-action.js +0 -23
  88. package/dist/esm/extractors/flexible/actions/extract-preview-action.js +0 -34
  89. package/dist/esm/extractors/flexible/actions/index.js +4 -17
  90. package/dist/esm/extractors/flexible/extract-state.js +1 -5
  91. package/dist/esm/extractors/flexible/index.js +3 -4
  92. package/dist/esm/state/actions/index.js +2 -4
  93. package/dist/esm/state/analytics/index.js +1 -2
  94. package/dist/esm/state/flexible-ui-context/index.js +0 -9
  95. package/dist/esm/state/hooks/use-invoke-client-action/index.js +21 -44
  96. package/dist/esm/state/hooks/useSmartLink.js +1 -4
  97. package/dist/esm/state/hooks-external/useSmartLinkActions.js +5 -21
  98. package/dist/esm/state/hooks-external/useSmartLinkReload.js +1 -3
  99. package/dist/esm/state/index.js +1 -2
  100. package/dist/esm/utils/analytics/SmartLinkAnalyticsContext.js +3 -37
  101. package/dist/esm/utils/analytics/analytics.js +1 -143
  102. package/dist/esm/utils/analytics/index.js +1 -1
  103. package/dist/esm/utils/analytics/types.js +0 -1
  104. package/dist/esm/utils/mocks.js +0 -22
  105. package/dist/esm/view/BlockCard/index.js +1 -3
  106. package/dist/esm/view/BlockCard/views/ResolvedView.js +1 -3
  107. package/dist/esm/view/BlockCard/views/UnauthorisedView.js +2 -4
  108. package/dist/esm/view/CardWithUrl/component.js +14 -34
  109. package/dist/esm/view/CardWithUrl/loader.js +10 -22
  110. package/dist/esm/view/EmbedCard/index.js +0 -4
  111. package/dist/esm/view/EmbedCard/views/unauthorized-view/index.js +3 -5
  112. package/dist/esm/view/EmbedModal/components/analytics/index.js +40 -89
  113. package/dist/esm/view/EmbedModal/index.js +11 -70
  114. package/dist/esm/view/FlexibleCard/components/actions/copy-link-action/index.js +28 -68
  115. package/dist/esm/view/FlexibleCard/components/actions/download-action/index.js +6 -45
  116. package/dist/esm/view/FlexibleCard/components/actions/preview-action/index.js +6 -52
  117. package/dist/esm/view/FlexibleCard/components/elements/lozenge/lozenge-action/index.js +3 -3
  118. package/dist/esm/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/index.js +6 -26
  119. package/dist/esm/view/FlexibleCard/components/utils.js +0 -27
  120. package/dist/esm/view/FlexibleCard/index.js +4 -18
  121. package/dist/esm/view/HoverCard/components/HoverCardComponent.js +1 -3
  122. package/dist/esm/view/HoverCard/components/HoverCardContent.js +1 -8
  123. package/dist/esm/view/HoverCard/components/views/resolved/index.js +13 -30
  124. package/dist/esm/view/HoverCard/components/views/unauthorised/index.js +3 -5
  125. package/dist/esm/view/HoverCard/index.js +10 -22
  126. package/dist/esm/view/InlineCard/index.js +1 -3
  127. package/dist/esm/view/LinkUrl/index.js +1 -1
  128. package/dist/types/extractors/common/actions/types.d.ts +0 -2
  129. package/dist/types/extractors/flexible/actions/extract-copy-link-action.d.ts +0 -7
  130. package/dist/types/extractors/flexible/actions/extract-download-action.d.ts +0 -7
  131. package/dist/types/extractors/flexible/actions/extract-preview-action.d.ts +0 -7
  132. package/dist/types/extractors/flexible/actions/index.d.ts +0 -6
  133. package/dist/types/state/actions/index.d.ts +1 -2
  134. package/dist/types/state/analytics/index.d.ts +0 -2
  135. package/dist/types/state/flexible-ui-context/index.d.ts +1 -7
  136. package/dist/types/state/flexible-ui-context/types.d.ts +4 -25
  137. package/dist/types/state/hooks/use-invoke/types.d.ts +0 -6
  138. package/dist/types/state/hooks/use-invoke-client-action/index.d.ts +1 -1
  139. package/dist/types/state/hooks/use-invoke-client-action/types.d.ts +0 -6
  140. package/dist/types/state/hooks/useSmartLink.d.ts +0 -22
  141. package/dist/types/state/index.d.ts +0 -1
  142. package/dist/types/utils/analytics/SmartLinkAnalyticsContext.d.ts +1 -1
  143. package/dist/types/utils/analytics/analytics.d.ts +0 -6
  144. package/dist/types/utils/analytics/index.d.ts +1 -1
  145. package/dist/types/utils/analytics/types.d.ts +0 -42
  146. package/dist/types/utils/mocks.d.ts +0 -22
  147. package/dist/types/view/BlockCard/index.d.ts +1 -1
  148. package/dist/types/view/BlockCard/types.d.ts +0 -2
  149. package/dist/types/view/BlockCard/views/types.d.ts +1 -1
  150. package/dist/types/view/CardWithUrl/types.d.ts +0 -2
  151. package/dist/types/view/EmbedCard/types.d.ts +0 -2
  152. package/dist/types/view/EmbedCard/views/unauthorized-view/index.d.ts +1 -1
  153. package/dist/types/view/EmbedCard/views/unauthorized-view/types.d.ts +0 -2
  154. package/dist/types/view/EmbedModal/components/analytics/types.d.ts +0 -2
  155. package/dist/types/view/EmbedModal/index.d.ts +0 -2
  156. package/dist/types/view/EmbedModal/types.d.ts +0 -3
  157. package/dist/types/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/index.d.ts +1 -1
  158. package/dist/types/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/types.d.ts +0 -6
  159. package/dist/types/view/FlexibleCard/components/utils.d.ts +0 -6
  160. package/dist/types/view/FlexibleCard/index.d.ts +1 -1
  161. package/dist/types/view/FlexibleCard/types.d.ts +0 -6
  162. package/dist/types/view/HoverCard/components/CustomPopupContainer.d.ts +1 -1
  163. package/dist/types/view/HoverCard/components/HoverCardContent.d.ts +1 -1
  164. package/dist/types/view/HoverCard/components/views/resolved/index.d.ts +1 -1
  165. package/dist/types/view/HoverCard/components/views/resolved/types.d.ts +0 -2
  166. package/dist/types/view/HoverCard/components/views/unauthorised/index.d.ts +1 -1
  167. package/dist/types/view/HoverCard/components/views/unauthorised/types.d.ts +0 -5
  168. package/dist/types/view/HoverCard/types.d.ts +0 -3
  169. package/dist/types/view/InlineCard/UnauthorisedView/index.d.ts +0 -3
  170. package/dist/types/view/InlineCard/index.d.ts +1 -1
  171. package/dist/types/view/InlineCard/types.d.ts +0 -2
  172. package/dist/types/view/common/UnauthorisedViewContent.d.ts +0 -6
  173. package/dist/types-ts4.5/extractors/common/actions/types.d.ts +0 -2
  174. package/dist/types-ts4.5/extractors/flexible/actions/extract-copy-link-action.d.ts +0 -7
  175. package/dist/types-ts4.5/extractors/flexible/actions/extract-download-action.d.ts +0 -7
  176. package/dist/types-ts4.5/extractors/flexible/actions/extract-preview-action.d.ts +0 -7
  177. package/dist/types-ts4.5/extractors/flexible/actions/index.d.ts +0 -6
  178. package/dist/types-ts4.5/state/actions/index.d.ts +1 -2
  179. package/dist/types-ts4.5/state/analytics/index.d.ts +0 -2
  180. package/dist/types-ts4.5/state/flexible-ui-context/index.d.ts +1 -7
  181. package/dist/types-ts4.5/state/flexible-ui-context/types.d.ts +4 -25
  182. package/dist/types-ts4.5/state/hooks/use-invoke/types.d.ts +0 -6
  183. package/dist/types-ts4.5/state/hooks/use-invoke-client-action/index.d.ts +1 -1
  184. package/dist/types-ts4.5/state/hooks/use-invoke-client-action/types.d.ts +0 -6
  185. package/dist/types-ts4.5/state/hooks/useSmartLink.d.ts +0 -22
  186. package/dist/types-ts4.5/state/index.d.ts +0 -1
  187. package/dist/types-ts4.5/utils/analytics/SmartLinkAnalyticsContext.d.ts +1 -1
  188. package/dist/types-ts4.5/utils/analytics/analytics.d.ts +0 -6
  189. package/dist/types-ts4.5/utils/analytics/index.d.ts +1 -1
  190. package/dist/types-ts4.5/utils/analytics/types.d.ts +0 -42
  191. package/dist/types-ts4.5/utils/mocks.d.ts +0 -22
  192. package/dist/types-ts4.5/view/BlockCard/index.d.ts +1 -1
  193. package/dist/types-ts4.5/view/BlockCard/types.d.ts +0 -2
  194. package/dist/types-ts4.5/view/BlockCard/views/types.d.ts +1 -1
  195. package/dist/types-ts4.5/view/CardWithUrl/types.d.ts +0 -2
  196. package/dist/types-ts4.5/view/EmbedCard/types.d.ts +0 -2
  197. package/dist/types-ts4.5/view/EmbedCard/views/unauthorized-view/index.d.ts +1 -1
  198. package/dist/types-ts4.5/view/EmbedCard/views/unauthorized-view/types.d.ts +0 -2
  199. package/dist/types-ts4.5/view/EmbedModal/components/analytics/types.d.ts +0 -2
  200. package/dist/types-ts4.5/view/EmbedModal/index.d.ts +0 -2
  201. package/dist/types-ts4.5/view/EmbedModal/types.d.ts +0 -3
  202. package/dist/types-ts4.5/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/index.d.ts +1 -1
  203. package/dist/types-ts4.5/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/types.d.ts +0 -6
  204. package/dist/types-ts4.5/view/FlexibleCard/components/utils.d.ts +0 -6
  205. package/dist/types-ts4.5/view/FlexibleCard/index.d.ts +1 -1
  206. package/dist/types-ts4.5/view/FlexibleCard/types.d.ts +0 -6
  207. package/dist/types-ts4.5/view/HoverCard/components/CustomPopupContainer.d.ts +1 -1
  208. package/dist/types-ts4.5/view/HoverCard/components/HoverCardContent.d.ts +1 -1
  209. package/dist/types-ts4.5/view/HoverCard/components/views/resolved/index.d.ts +1 -1
  210. package/dist/types-ts4.5/view/HoverCard/components/views/resolved/types.d.ts +0 -2
  211. package/dist/types-ts4.5/view/HoverCard/components/views/unauthorised/index.d.ts +1 -1
  212. package/dist/types-ts4.5/view/HoverCard/components/views/unauthorised/types.d.ts +0 -5
  213. package/dist/types-ts4.5/view/HoverCard/types.d.ts +0 -3
  214. package/dist/types-ts4.5/view/InlineCard/UnauthorisedView/index.d.ts +0 -3
  215. package/dist/types-ts4.5/view/InlineCard/index.d.ts +1 -1
  216. package/dist/types-ts4.5/view/InlineCard/types.d.ts +0 -2
  217. package/dist/types-ts4.5/view/common/UnauthorisedViewContent.d.ts +0 -6
  218. package/package.json +1 -4
  219. package/dist/cjs/extractors/action/extractDownloadActionProps.js +0 -32
  220. package/dist/cjs/extractors/action/extractPreviewActionProps.js +0 -47
  221. package/dist/cjs/extractors/action/extractViewActionProps.js +0 -31
  222. package/dist/cjs/extractors/flexible/actions/extract-view-action.js +0 -27
  223. package/dist/cjs/state/analytics/useSmartLinkAnalytics.js +0 -311
  224. package/dist/es2019/extractors/action/extractDownloadActionProps.js +0 -24
  225. package/dist/es2019/extractors/action/extractPreviewActionProps.js +0 -36
  226. package/dist/es2019/extractors/action/extractViewActionProps.js +0 -23
  227. package/dist/es2019/extractors/flexible/actions/extract-view-action.js +0 -20
  228. package/dist/es2019/state/analytics/useSmartLinkAnalytics.js +0 -296
  229. package/dist/esm/extractors/action/extractDownloadActionProps.js +0 -27
  230. package/dist/esm/extractors/action/extractPreviewActionProps.js +0 -41
  231. package/dist/esm/extractors/action/extractViewActionProps.js +0 -26
  232. package/dist/esm/extractors/flexible/actions/extract-view-action.js +0 -22
  233. package/dist/esm/state/analytics/useSmartLinkAnalytics.js +0 -304
  234. package/dist/types/extractors/action/extractDownloadActionProps.d.ts +0 -7
  235. package/dist/types/extractors/action/extractPreviewActionProps.d.ts +0 -7
  236. package/dist/types/extractors/action/extractViewActionProps.d.ts +0 -7
  237. package/dist/types/extractors/flexible/actions/extract-view-action.d.ts +0 -7
  238. package/dist/types/state/analytics/useSmartLinkAnalytics.d.ts +0 -91
  239. package/dist/types/utils/analytics/__mocks__/analytics.d.ts +0 -2
  240. package/dist/types/view/FlexibleCard/components/actions/follow-action/__fixtures__/follow-goal-context.d.ts +0 -3
  241. package/dist/types-ts4.5/extractors/action/extractDownloadActionProps.d.ts +0 -7
  242. package/dist/types-ts4.5/extractors/action/extractPreviewActionProps.d.ts +0 -7
  243. package/dist/types-ts4.5/extractors/action/extractViewActionProps.d.ts +0 -7
  244. package/dist/types-ts4.5/extractors/flexible/actions/extract-view-action.d.ts +0 -7
  245. package/dist/types-ts4.5/state/analytics/useSmartLinkAnalytics.d.ts +0 -91
  246. package/dist/types-ts4.5/utils/analytics/__mocks__/analytics.d.ts +0 -2
  247. package/dist/types-ts4.5/view/FlexibleCard/components/actions/follow-action/__fixtures__/follow-goal-context.d.ts +0 -3
@@ -1,11 +1,10 @@
1
1
  import React, { useCallback, useEffect, useMemo } from 'react';
2
2
  import { useAnalyticsEvents as useAnalyticsEventsNext } from '@atlaskit/analytics-next';
3
- import { fg } from '@atlaskit/platform-feature-flags';
4
3
  import { useAnalyticsEvents } from '../../common/analytics/generated/use-analytics-events';
5
4
  import { CardDisplay } from '../../constants';
6
5
  import { useSmartLink } from '../../state';
7
6
  import { succeedUfoExperience } from '../../state/analytics';
8
- import { getCanBeDatasource, getClickUrl, getDefinitionId, getExtensionKey, getResourceType, getServices, isFinalState } from '../../state/helpers';
7
+ import { getClickUrl, getDefinitionId, getExtensionKey, getResourceType, getServices, isFinalState } from '../../state/helpers';
9
8
  import { SmartLinkModalProvider } from '../../state/modal';
10
9
  import { isSpecialEvent } from '../../utils';
11
10
  import { combineActionOptions } from '../../utils/actions/combine-action-options';
@@ -38,7 +37,6 @@ function Component(_ref) {
38
37
  children = _ref.children,
39
38
  showHoverPreview = _ref.showHoverPreview,
40
39
  hoverPreviewOptions = _ref.hoverPreviewOptions,
41
- analyticsEvents = _ref.analyticsEvents,
42
40
  removeTextHighlightingFromTitle = _ref.removeTextHighlightingFromTitle,
43
41
  resolvingPlaceholder = _ref.resolvingPlaceholder,
44
42
  truncateInline = _ref.truncateInline;
@@ -51,16 +49,13 @@ function Component(_ref) {
51
49
  var _useSmartLink = useSmartLink(id, url),
52
50
  state = _useSmartLink.state,
53
51
  actions = _useSmartLink.actions,
54
- defaultAnalytics = _useSmartLink.analytics,
55
52
  config = _useSmartLink.config,
56
53
  renderers = _useSmartLink.renderers,
57
54
  error = _useSmartLink.error;
58
- var analytics = analyticsEvents || defaultAnalytics;
59
55
  var definitionId = getDefinitionId(state.details);
60
56
  var extensionKey = getExtensionKey(state.details);
61
57
  var resourceType = getResourceType(state.details);
62
58
  var services = getServices(state.details);
63
- var canBeDatasource = getCanBeDatasource(state.details);
64
59
  var isFlexibleUi = useMemo(function () {
65
60
  return isFlexibleUiCard(children);
66
61
  }, [children]);
@@ -141,31 +136,20 @@ function Component(_ref) {
141
136
  // - the unresolved states: viz. forbidden, not_found, unauthorized, errored.
142
137
  useEffect(function () {
143
138
  if (isFinalState(state.status)) {
144
- if (fg('platform-smart-card-migrate-embed-modal-analytics')) {
145
- succeedUfoExperience('smart-link-rendered', id || 'NULL', {
146
- extensionKey: extensionKey,
147
- display: isFlexibleUi ? 'flexible' : appearance
148
- });
139
+ succeedUfoExperience('smart-link-rendered', id || 'NULL', {
140
+ extensionKey: extensionKey,
141
+ display: isFlexibleUi ? 'flexible' : appearance
142
+ });
149
143
 
150
- // UFO will disregard this if authentication experience has not yet been started
151
- succeedUfoExperience('smart-link-authenticated', id || 'NULL', {
152
- display: isFlexibleUi ? 'flexible' : appearance
153
- });
154
- fireEvent('ui.smartLink.renderSuccess', {
155
- display: isFlexibleUi ? 'flexible' : appearance
156
- });
157
- } else {
158
- analytics.ui.renderSuccessEvent({
159
- display: isFlexibleUi ? 'flexible' : appearance,
160
- status: state.status,
161
- id: id,
162
- definitionId: definitionId,
163
- extensionKey: extensionKey,
164
- canBeDatasource: canBeDatasource
165
- });
166
- }
144
+ // UFO will disregard this if authentication experience has not yet been started
145
+ succeedUfoExperience('smart-link-authenticated', id || 'NULL', {
146
+ display: isFlexibleUi ? 'flexible' : appearance
147
+ });
148
+ fireEvent('ui.smartLink.renderSuccess', {
149
+ display: isFlexibleUi ? 'flexible' : appearance
150
+ });
167
151
  }
168
- }, [isFlexibleUi, appearance, state.status, url, definitionId, extensionKey, analytics.ui, id, canBeDatasource, fireEvent]);
152
+ }, [appearance, extensionKey, fireEvent, id, isFlexibleUi, state.status]);
169
153
  var onIframeDwell = useCallback(function (dwellTime, dwellPercentVisible) {
170
154
  fireEvent('ui.smartLinkIframe.dwelled', {
171
155
  id: id,
@@ -207,8 +191,7 @@ function Component(_ref) {
207
191
  url: url,
208
192
  testId: testId,
209
193
  onResolve: onResolve,
210
- onError: onError,
211
- analytics: analytics
194
+ onError: onError
212
195
  }, children);
213
196
  }
214
197
 
@@ -219,7 +202,6 @@ function Component(_ref) {
219
202
  switch (appearance) {
220
203
  case 'inline':
221
204
  return /*#__PURE__*/React.createElement(InlineCard, {
222
- analytics: analytics,
223
205
  id: id,
224
206
  url: url,
225
207
  renderers: renderers,
@@ -248,7 +230,6 @@ function Component(_ref) {
248
230
  cardState: state,
249
231
  handleAuthorize: services.length && handleAuthorize || undefined,
250
232
  handleFrameClick: handleClickWrapper,
251
- analytics: analytics,
252
233
  isSelected: isSelected,
253
234
  onResolve: onResolve,
254
235
  onError: onError,
@@ -266,7 +247,6 @@ function Component(_ref) {
266
247
  handleErrorRetry: handleRetry,
267
248
  handleFrameClick: handleClickWrapper,
268
249
  handleInvoke: handleInvoke,
269
- analytics: analytics,
270
250
  isSelected: isSelected,
271
251
  frameStyle: frameStyle,
272
252
  platform: platform,
@@ -6,9 +6,7 @@ import React, { lazy, Suspense, useCallback, useEffect, useState } from 'react';
6
6
  import { ErrorBoundary } from 'react-error-boundary';
7
7
  import { di } from 'react-magnetic-di';
8
8
  import uuid from 'uuid';
9
- import { fg } from '@atlaskit/platform-feature-flags';
10
9
  import { useAnalyticsEvents } from '../../common/analytics/generated/use-analytics-events';
11
- import { useSmartLinkAnalytics } from '../../state';
12
10
  import { failUfoExperience, startUfoExperience } from '../../state/analytics';
13
11
  import { importWithRetry } from '../../utils';
14
12
  import { useSmartLinkAnalyticsContext } from '../../utils/analytics/SmartLinkAnalyticsContext';
@@ -60,7 +58,6 @@ export function CardWithURLRenderer(props) {
60
58
  removeTextHighlightingFromTitle = props.removeTextHighlightingFromTitle,
61
59
  resolvingPlaceholder = props.resolvingPlaceholder,
62
60
  truncateInline = props.truncateInline;
63
- var analytics = useSmartLinkAnalytics(url !== null && url !== void 0 ? url : '', id);
64
61
  var isFlexibleUi = isFlexibleUiCard(children);
65
62
  var analyticsContext = useSmartLinkAnalyticsContext({
66
63
  display: isFlexibleUi ? 'flexible' : appearance,
@@ -85,31 +82,22 @@ export function CardWithURLRenderer(props) {
85
82
  definitionId: null
86
83
  }));
87
84
  } else if (error.name !== 'APIError') {
88
- if (fg('platform-smart-card-migrate-embed-modal-analytics')) {
89
- startUfoExperience('smart-link-rendered', id || 'NULL');
90
- failUfoExperience('smart-link-rendered', id || 'NULL');
91
- failUfoExperience('smart-link-authenticated', id || 'NULL');
92
- fireEvent('ui.smartLink.renderFailed', _objectSpread(_objectSpread({}, analyticsContext === null || analyticsContext === void 0 ? void 0 : analyticsContext.attributes), {}, {
93
- display: isFlexibleUi ? 'flexible' : appearance,
94
- id: id !== null && id !== void 0 ? id : null,
95
- error: error,
96
- errorInfo: errorInfo
97
- }));
98
- } else {
99
- analytics.ui.renderFailedEvent({
100
- display: isFlexibleUi ? 'flexible' : appearance,
101
- id: id,
102
- error: error,
103
- errorInfo: errorInfo
104
- });
105
- }
85
+ startUfoExperience('smart-link-rendered', id || 'NULL');
86
+ failUfoExperience('smart-link-rendered', id || 'NULL');
87
+ failUfoExperience('smart-link-authenticated', id || 'NULL');
88
+ fireEvent('ui.smartLink.renderFailed', _objectSpread(_objectSpread({}, analyticsContext === null || analyticsContext === void 0 ? void 0 : analyticsContext.attributes), {}, {
89
+ display: isFlexibleUi ? 'flexible' : appearance,
90
+ id: id !== null && id !== void 0 ? id : null,
91
+ error: error,
92
+ errorInfo: errorInfo
93
+ }));
106
94
  }
107
95
  onError && onError({
108
96
  status: 'errored',
109
97
  url: url !== null && url !== void 0 ? url : '',
110
98
  err: error
111
99
  });
112
- }, [analytics.ui, analyticsContext, appearance, id, onError, url, isFlexibleUi, fireEvent]);
100
+ }, [analyticsContext === null || analyticsContext === void 0 ? void 0 : analyticsContext.attributes, appearance, fireEvent, id, isFlexibleUi, onError, url]);
113
101
  if (!url) {
114
102
  throw new Error('@atlaskit/smart-card: url property is missing.');
115
103
  }
@@ -20,7 +20,6 @@ export var EmbedCard = /*#__PURE__*/React.forwardRef(function (_ref, iframeRef)
20
20
  handleAuthorize = _ref.handleAuthorize,
21
21
  handleErrorRetry = _ref.handleErrorRetry,
22
22
  handleFrameClick = _ref.handleFrameClick,
23
- analytics = _ref.analytics,
24
23
  isSelected = _ref.isSelected,
25
24
  frameStyle = _ref.frameStyle,
26
25
  platform = _ref.platform,
@@ -52,7 +51,6 @@ export var EmbedCard = /*#__PURE__*/React.forwardRef(function (_ref, iframeRef)
52
51
  onResolve: onResolve,
53
52
  renderers: renderers,
54
53
  actionOptions: actionOptions,
55
- analytics: analytics,
56
54
  testId: testId ? "".concat(testId, "-resolving-view") : 'embed-card-resolving-view'
57
55
  });
58
56
  case 'resolved':
@@ -93,7 +91,6 @@ export var EmbedCard = /*#__PURE__*/React.forwardRef(function (_ref, iframeRef)
93
91
  onResolve: onResolve,
94
92
  renderers: renderers,
95
93
  actionOptions: actionOptions,
96
- analytics: analytics,
97
94
  testId: testId
98
95
  });
99
96
  }
@@ -106,7 +103,6 @@ export var EmbedCard = /*#__PURE__*/React.forwardRef(function (_ref, iframeRef)
106
103
  }
107
104
  var unauthorisedViewProps = extractEmbedProps(data, meta, platform);
108
105
  return /*#__PURE__*/React.createElement(UnauthorizedView, {
109
- analytics: analytics,
110
106
  context: unauthorisedViewProps.context,
111
107
  extensionKey: extensionKey,
112
108
  frameStyle: frameStyle,
@@ -1,6 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
- var _excluded = ["analytics", "context", "extensionKey", "isProductIntegrationSupported", "onAuthorize", "testId"];
3
+ var _excluded = ["context", "extensionKey", "isProductIntegrationSupported", "onAuthorize", "testId"];
4
4
  import React, { useCallback, useMemo } from 'react';
5
5
  import { FormattedMessage } from 'react-intl-next';
6
6
  import Button from '@atlaskit/button';
@@ -11,8 +11,7 @@ import UnresolvedView from '../unresolved-view';
11
11
  import { UnauthorizedSVG } from './unauthorized-svg';
12
12
  var UnauthorizedView = function UnauthorizedView(_ref) {
13
13
  var _context$image;
14
- var analytics = _ref.analytics,
15
- context = _ref.context,
14
+ var context = _ref.context,
16
15
  extensionKey = _ref.extensionKey,
17
16
  isProductIntegrationSupported = _ref.isProductIntegrationSupported,
18
17
  onAuthorize = _ref.onAuthorize,
@@ -44,7 +43,6 @@ var UnauthorizedView = function UnauthorizedView(_ref) {
44
43
  values: _values
45
44
  })),
46
45
  description: /*#__PURE__*/React.createElement(UnauthorisedViewContent, {
47
- analytics: analytics,
48
46
  providerName: context === null || context === void 0 ? void 0 : context.text,
49
47
  isProductIntegrationSupported: isProductIntegrationSupported,
50
48
  testId: testId
@@ -81,7 +79,7 @@ var UnauthorizedView = function UnauthorizedView(_ref) {
81
79
  title: /*#__PURE__*/React.createElement(FormattedMessage, messages.unauthorised_account_name_no_provider),
82
80
  description: /*#__PURE__*/React.createElement(FormattedMessage, messages.unauthorised_account_description_no_provider)
83
81
  };
84
- }, [analytics, context === null || context === void 0 ? void 0 : context.text, handleOnAuthorizeClick, isProductIntegrationSupported, onAuthorize, testId]);
82
+ }, [context === null || context === void 0 ? void 0 : context.text, handleOnAuthorizeClick, isProductIntegrationSupported, onAuthorize, testId]);
85
83
  return /*#__PURE__*/React.createElement(UnresolvedView, _extends({}, unresolvedViewProps, content, {
86
84
  icon: context === null || context === void 0 ? void 0 : context.icon,
87
85
  image: (_context$image = context === null || context === void 0 ? void 0 : context.image) !== null && _context$image !== void 0 ? _context$image : /*#__PURE__*/React.createElement(UnauthorizedSVG, null),
@@ -1,6 +1,5 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import React, { useCallback } from 'react';
3
- import { fg } from '@atlaskit/platform-feature-flags';
4
3
  import { CardDisplay } from '../../../../constants';
5
4
  import { failUfoExperience, startUfoExperience, succeedUfoExperience } from '../../../../state/analytics';
6
5
  import { EmbedModalSize } from '../../types';
@@ -9,8 +8,7 @@ var getResizeFrom = function getResizeFrom(size) {
9
8
  };
10
9
  var withAnalytics = function withAnalytics(Component) {
11
10
  return function (props) {
12
- var analytics = props.analytics,
13
- fireEvent = props.fireEvent,
11
+ var fireEvent = props.fireEvent,
14
12
  extensionKey = props.extensionKey,
15
13
  id = props.id,
16
14
  onClose = props.onClose,
@@ -19,108 +17,61 @@ var withAnalytics = function withAnalytics(Component) {
19
17
  onResize = props.onResize,
20
18
  origin = props.origin;
21
19
  var handleOnOpen = useCallback(function (context) {
22
- if (fg('platform-smart-card-migrate-embed-modal-analytics')) {
23
- fireEvent === null || fireEvent === void 0 || fireEvent('screen.embedPreviewModal.viewed', {
24
- origin: origin !== null && origin !== void 0 ? origin : null,
25
- size: context.size
26
- });
27
- } else {
28
- analytics === null || analytics === void 0 || analytics.screen.modalViewedEvent({
29
- name: 'embedPreviewModal',
30
- attributes: {
31
- origin: origin,
32
- size: context.size
33
- }
34
- });
35
- }
36
- if (fg('platform-smart-card-migrate-embed-modal-analytics')) {
37
- succeedUfoExperience('smart-link-rendered', id || 'NULL', {
38
- extensionKey: extensionKey,
39
- display: CardDisplay.EmbedPreview
40
- });
20
+ fireEvent === null || fireEvent === void 0 || fireEvent('screen.embedPreviewModal.viewed', {
21
+ origin: origin !== null && origin !== void 0 ? origin : null,
22
+ size: context.size
23
+ });
24
+ succeedUfoExperience('smart-link-rendered', id || 'NULL', {
25
+ extensionKey: extensionKey,
26
+ display: CardDisplay.EmbedPreview
27
+ });
41
28
 
42
- // UFO will disregard this if authentication experience has not yet been started
43
- succeedUfoExperience('smart-link-authenticated', id || 'NULL', {
44
- display: CardDisplay.EmbedPreview
45
- });
46
- fireEvent === null || fireEvent === void 0 || fireEvent('ui.smartLink.renderSuccess', {
47
- display: CardDisplay.EmbedPreview
48
- });
49
- } else {
50
- analytics === null || analytics === void 0 || analytics.ui.renderSuccessEvent({
51
- status: 'resolved',
52
- display: CardDisplay.EmbedPreview
53
- });
54
- }
29
+ // UFO will disregard this if authentication experience has not yet been started
30
+ succeedUfoExperience('smart-link-authenticated', id || 'NULL', {
31
+ display: CardDisplay.EmbedPreview
32
+ });
33
+ fireEvent === null || fireEvent === void 0 || fireEvent('ui.smartLink.renderSuccess', {
34
+ display: CardDisplay.EmbedPreview
35
+ });
55
36
  if (onOpen) {
56
37
  onOpen(context);
57
38
  }
58
- }, [analytics === null || analytics === void 0 ? void 0 : analytics.screen, analytics === null || analytics === void 0 ? void 0 : analytics.ui, fireEvent, extensionKey, id, onOpen, origin]);
39
+ }, [fireEvent, extensionKey, id, onOpen, origin]);
59
40
  var handleOnOpenFailed = useCallback(function (error, errorInfo) {
60
- if (fg('platform-smart-card-migrate-embed-modal-analytics')) {
61
- startUfoExperience('smart-link-rendered', id || 'NULL');
62
- failUfoExperience('smart-link-rendered', id || 'NULL');
63
- failUfoExperience('smart-link-authenticated', id || 'NULL');
64
- fireEvent === null || fireEvent === void 0 || fireEvent('ui.smartLink.renderFailed', {
65
- display: CardDisplay.EmbedPreview,
66
- error: error,
67
- errorInfo: errorInfo,
68
- id: id !== null && id !== void 0 ? id : null
69
- });
70
- } else {
71
- analytics === null || analytics === void 0 || analytics.ui.renderFailedEvent({
72
- display: CardDisplay.EmbedPreview,
73
- error: error,
74
- errorInfo: errorInfo
75
- });
76
- }
41
+ startUfoExperience('smart-link-rendered', id || 'NULL');
42
+ failUfoExperience('smart-link-rendered', id || 'NULL');
43
+ failUfoExperience('smart-link-authenticated', id || 'NULL');
44
+ fireEvent === null || fireEvent === void 0 || fireEvent('ui.smartLink.renderFailed', {
45
+ display: CardDisplay.EmbedPreview,
46
+ error: error,
47
+ errorInfo: errorInfo,
48
+ id: id !== null && id !== void 0 ? id : null
49
+ });
77
50
  if (onOpenFailed) {
78
51
  onOpenFailed(error, errorInfo);
79
52
  }
80
- }, [analytics === null || analytics === void 0 ? void 0 : analytics.ui, fireEvent, id, onOpenFailed]);
53
+ }, [fireEvent, id, onOpenFailed]);
81
54
  var handleOnClose = useCallback(function (context) {
82
- if (fg('platform-smart-card-migrate-embed-modal-analytics')) {
83
- var _context$duration;
84
- fireEvent === null || fireEvent === void 0 || fireEvent('ui.modal.closed.embedPreview', {
85
- origin: origin !== null && origin !== void 0 ? origin : null,
86
- previewTime: (_context$duration = context.duration) !== null && _context$duration !== void 0 ? _context$duration : null,
87
- size: context.size
88
- });
89
- } else {
90
- analytics === null || analytics === void 0 || analytics.ui.modalClosedEvent({
91
- actionSubjectId: 'embedPreview',
92
- attributes: {
93
- origin: origin,
94
- previewTime: context.duration,
95
- size: context.size
96
- }
97
- });
98
- }
55
+ var _context$duration;
56
+ fireEvent === null || fireEvent === void 0 || fireEvent('ui.modal.closed.embedPreview', {
57
+ origin: origin !== null && origin !== void 0 ? origin : null,
58
+ previewTime: (_context$duration = context.duration) !== null && _context$duration !== void 0 ? _context$duration : null,
59
+ size: context.size
60
+ });
99
61
  if (onClose) {
100
62
  onClose(context);
101
63
  }
102
- }, [analytics === null || analytics === void 0 ? void 0 : analytics.ui, fireEvent, onClose, origin]);
64
+ }, [fireEvent, onClose, origin]);
103
65
  var handleOnResize = useCallback(function (context) {
104
- if (fg('platform-smart-card-migrate-embed-modal-analytics')) {
105
- fireEvent === null || fireEvent === void 0 || fireEvent('ui.button.clicked.embedPreviewResize', {
106
- newSize: context.size,
107
- origin: origin !== null && origin !== void 0 ? origin : null,
108
- previousSize: getResizeFrom(context.size)
109
- });
110
- } else {
111
- analytics === null || analytics === void 0 || analytics.ui.buttonClickedEvent({
112
- actionSubjectId: 'embedPreviewResize',
113
- attributes: {
114
- newSize: context.size,
115
- origin: origin,
116
- previousSize: getResizeFrom(context.size)
117
- }
118
- });
119
- }
66
+ fireEvent === null || fireEvent === void 0 || fireEvent('ui.button.clicked.embedPreviewResize', {
67
+ newSize: context.size,
68
+ origin: origin !== null && origin !== void 0 ? origin : null,
69
+ previousSize: getResizeFrom(context.size)
70
+ });
120
71
  if (onResize) {
121
72
  onResize(context);
122
73
  }
123
- }, [analytics === null || analytics === void 0 ? void 0 : analytics.ui, fireEvent, onResize, origin]);
74
+ }, [fireEvent, onResize, origin]);
124
75
  return /*#__PURE__*/React.createElement(Component, _extends({}, props, {
125
76
  onClose: handleOnClose,
126
77
  onOpen: handleOnOpen,
@@ -1,14 +1,11 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
- import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
3
2
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
4
- import _regeneratorRuntime from "@babel/runtime/regenerator";
5
3
  import React, { useCallback, useRef, useState } from 'react';
6
4
  import ModalDialog, { ModalBody, ModalTransition } from '@atlaskit/modal-dialog';
7
- import { fg } from '@atlaskit/platform-feature-flags';
8
5
  import { useThemeObserver } from '@atlaskit/tokens';
9
- import { ActionName, CardDisplay, SmartLinkSize } from '../../constants';
6
+ import { SmartLinkSize } from '../../constants';
10
7
  import useInvokeClientAction from '../../state/hooks/use-invoke-client-action';
11
- import { downloadUrl, getPreviewUrlWithTheme, openUrl } from '../../utils';
8
+ import { getPreviewUrlWithTheme } from '../../utils';
12
9
  import Icon from '../FlexibleCard/components/elements/icon';
13
10
  import withAnalytics from './components/analytics';
14
11
  import EmbedContent from './components/embed-content';
@@ -23,12 +20,8 @@ var toWidth = function toWidth(size) {
23
20
  return size === EmbedModalSize.Large ? MAX_MODAL_SIZE : MIN_MODAL_SIZE;
24
21
  };
25
22
  var EmbedModal = function EmbedModal(_ref) {
26
- var analytics = _ref.analytics,
27
- download = _ref.download,
28
- invokeDownloadAction = _ref.invokeDownloadAction,
29
- extensionKey = _ref.extensionKey,
23
+ var invokeDownloadAction = _ref.invokeDownloadAction,
30
24
  fireEvent = _ref.fireEvent,
31
- icon = _ref.icon,
32
25
  iframeName = _ref.iframeName,
33
26
  isSupportTheming = _ref.isSupportTheming,
34
27
  _ref$isTrusted = _ref.isTrusted,
@@ -45,7 +38,6 @@ var EmbedModal = function EmbedModal(_ref) {
45
38
  _ref$testId = _ref.testId,
46
39
  testId = _ref$testId === void 0 ? 'smart-embed-preview-modal' : _ref$testId,
47
40
  title = _ref.title,
48
- url = _ref.url,
49
41
  invokeViewAction = _ref.invokeViewAction;
50
42
  var defaultWidth = toWidth(size);
51
43
  var _useState = useState(showModal),
@@ -58,7 +50,6 @@ var EmbedModal = function EmbedModal(_ref) {
58
50
  setWidth = _useState4[1];
59
51
  var openAt = useRef();
60
52
  var invoke = useInvokeClientAction({
61
- analytics: analytics,
62
53
  fireEvent: fireEvent
63
54
  });
64
55
  var handleOnOpenComplete = useCallback(function () {
@@ -93,61 +84,11 @@ var EmbedModal = function EmbedModal(_ref) {
93
84
  var themeState = useThemeObserver();
94
85
  var previewUrl = src;
95
86
  var handleOnViewActionClick = useCallback(function () {
96
- if (fg('platform-smart-card-migrate-embed-modal-analytics')) {
97
- invokeViewAction && invoke(invokeViewAction);
98
- } else {
99
- invoke({
100
- actionType: 'ViewAction',
101
- actionFn: function () {
102
- var _actionFn = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
103
- return _regeneratorRuntime.wrap(function _callee$(_context) {
104
- while (1) switch (_context.prev = _context.next) {
105
- case 0:
106
- return _context.abrupt("return", openUrl(url));
107
- case 1:
108
- case "end":
109
- return _context.stop();
110
- }
111
- }, _callee);
112
- }));
113
- function actionFn() {
114
- return _actionFn.apply(this, arguments);
115
- }
116
- return actionFn;
117
- }(),
118
- display: CardDisplay.EmbedPreview,
119
- extensionKey: extensionKey
120
- });
121
- }
122
- }, [extensionKey, invoke, url, invokeViewAction]);
87
+ invokeViewAction && invoke(invokeViewAction);
88
+ }, [invoke, invokeViewAction]);
123
89
  var handleOnDownloadActionClick = useCallback(function () {
124
- if (fg('platform-smart-card-migrate-embed-modal-analytics')) {
125
- invokeDownloadAction && invoke(invokeDownloadAction);
126
- } else {
127
- invoke({
128
- actionType: ActionName.DownloadAction,
129
- actionFn: function () {
130
- var _actionFn2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
131
- return _regeneratorRuntime.wrap(function _callee2$(_context2) {
132
- while (1) switch (_context2.prev = _context2.next) {
133
- case 0:
134
- return _context2.abrupt("return", downloadUrl(download));
135
- case 1:
136
- case "end":
137
- return _context2.stop();
138
- }
139
- }, _callee2);
140
- }));
141
- function actionFn() {
142
- return _actionFn2.apply(this, arguments);
143
- }
144
- return actionFn;
145
- }(),
146
- display: CardDisplay.EmbedPreview,
147
- extensionKey: extensionKey
148
- });
149
- }
150
- }, [download, invokeDownloadAction, extensionKey, invoke]);
90
+ invokeDownloadAction && invoke(invokeDownloadAction);
91
+ }, [invokeDownloadAction, invoke]);
151
92
  if (previewUrl && isSupportTheming) {
152
93
  previewUrl = getPreviewUrlWithTheme(previewUrl, themeState);
153
94
  }
@@ -159,15 +100,15 @@ var EmbedModal = function EmbedModal(_ref) {
159
100
  testId: testId,
160
101
  width: width
161
102
  }, /*#__PURE__*/React.createElement(LinkInfo, {
162
- icon: fg('platform-smart-card-migrate-embed-modal-analytics') ? linkIcon ? {
103
+ icon: linkIcon && {
163
104
  icon: /*#__PURE__*/React.createElement(Icon, _extends({}, linkIcon, {
164
105
  size: SmartLinkSize.Large
165
106
  })),
166
107
  isFlexibleUi: true
167
- } : undefined : icon,
108
+ },
168
109
  providerName: providerName,
169
- onViewButtonClick: fg('platform-smart-card-migrate-embed-modal-analytics') ? invokeViewAction ? handleOnViewActionClick : undefined : url ? handleOnViewActionClick : undefined,
170
- onDownloadButtonClick: fg('platform-smart-card-migrate-embed-modal-analytics') ? invokeDownloadAction ? handleOnDownloadActionClick : undefined : download ? handleOnDownloadActionClick : undefined,
110
+ onViewButtonClick: invokeViewAction ? handleOnViewActionClick : undefined,
111
+ onDownloadButtonClick: invokeDownloadAction ? handleOnDownloadActionClick : undefined,
171
112
  onResizeButtonClick: handleOnResizeClick,
172
113
  size: width,
173
114
  title: title,