@atlaskit/smart-card 46.10.2 → 46.10.4

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 (142) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/analytics.spec.yaml +2 -39
  3. package/compass.yml +3 -0
  4. package/dist/cjs/messages.js +15 -45
  5. package/dist/cjs/utils/analytics/analytics.js +1 -1
  6. package/dist/cjs/utils/get-icon-for-file-type.js +14 -0
  7. package/dist/cjs/utils/lazy-component.js +81 -0
  8. package/dist/cjs/view/EmbedCard/views/ResolvedView.js +14 -2
  9. package/dist/cjs/view/EmbedCard/views/unauthorized-view/index.js +1 -9
  10. package/dist/cjs/view/FlexibleCard/components/actions/action/action-button/index.js +14 -5
  11. package/dist/cjs/view/FlexibleCard/components/actions/action/action-dropdown-item/index.js +4 -1
  12. package/dist/cjs/view/FlexibleCard/components/actions/action/index.js +1 -0
  13. package/dist/cjs/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/header/main.js +1 -9
  14. package/dist/cjs/view/FlexibleCard/components/actions/follow-action/index.js +31 -1
  15. package/dist/cjs/view/FlexibleCard/components/actions/preview-action/index.js +13 -2
  16. package/dist/cjs/view/FlexibleCard/components/common/atlaskit-icon/index.js +23 -4
  17. package/dist/cjs/view/LinkUrl/index.js +1 -1
  18. package/dist/es2019/messages.js +15 -57
  19. package/dist/es2019/utils/analytics/analytics.js +1 -1
  20. package/dist/es2019/utils/get-icon-for-file-type.js +14 -0
  21. package/dist/es2019/utils/lazy-component.js +65 -0
  22. package/dist/es2019/view/EmbedCard/views/ResolvedView.js +10 -2
  23. package/dist/es2019/view/EmbedCard/views/unauthorized-view/index.js +1 -9
  24. package/dist/es2019/view/FlexibleCard/components/actions/action/action-button/index.js +12 -5
  25. package/dist/es2019/view/FlexibleCard/components/actions/action/action-dropdown-item/index.js +3 -0
  26. package/dist/es2019/view/FlexibleCard/components/actions/action/index.js +1 -0
  27. package/dist/es2019/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/header/main.js +1 -10
  28. package/dist/es2019/view/FlexibleCard/components/actions/follow-action/index.js +21 -1
  29. package/dist/es2019/view/FlexibleCard/components/actions/preview-action/index.js +13 -2
  30. package/dist/es2019/view/FlexibleCard/components/common/atlaskit-icon/index.js +23 -4
  31. package/dist/es2019/view/LinkUrl/index.js +1 -1
  32. package/dist/esm/messages.js +15 -45
  33. package/dist/esm/utils/analytics/analytics.js +1 -1
  34. package/dist/esm/utils/get-icon-for-file-type.js +14 -0
  35. package/dist/esm/utils/lazy-component.js +73 -0
  36. package/dist/esm/view/EmbedCard/views/ResolvedView.js +12 -2
  37. package/dist/esm/view/EmbedCard/views/unauthorized-view/index.js +1 -9
  38. package/dist/esm/view/FlexibleCard/components/actions/action/action-button/index.js +14 -5
  39. package/dist/esm/view/FlexibleCard/components/actions/action/action-dropdown-item/index.js +4 -1
  40. package/dist/esm/view/FlexibleCard/components/actions/action/index.js +1 -0
  41. package/dist/esm/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/header/main.js +1 -9
  42. package/dist/esm/view/FlexibleCard/components/actions/follow-action/index.js +27 -1
  43. package/dist/esm/view/FlexibleCard/components/actions/preview-action/index.js +13 -2
  44. package/dist/esm/view/FlexibleCard/components/common/atlaskit-icon/index.js +23 -4
  45. package/dist/esm/view/LinkUrl/index.js +1 -1
  46. package/dist/types/common/analytics/generated/analytics.types.d.ts +1 -17
  47. package/dist/types/messages.d.ts +1 -1
  48. package/dist/types/utils/lazy-component.d.ts +36 -0
  49. package/dist/types/view/EmbedCard/views/unauthorized-view/index.d.ts +2 -2
  50. package/dist/types/view/FlexibleCard/components/actions/action/action-dropdown-item/index.d.ts +1 -1
  51. package/dist/types/view/FlexibleCard/components/actions/action/action-dropdown-item/types.d.ts +1 -0
  52. package/package.json +9 -9
  53. package/dist/cjs/__tests__/vr-tests/__snapshots__/embed-card/embed-card-unauthorized-carousel-dropbox-in-atlas-slide1--default.png +0 -3
  54. package/dist/cjs/__tests__/vr-tests/__snapshots__/embed-card/embed-card-unauthorized-carousel-figma-in-trello-slide1--default.png +0 -3
  55. package/dist/cjs/__tests__/vr-tests/__snapshots__/embed-card/embed-card-unauthorized-carousel-figma-in-trello-slide2--default.png +0 -3
  56. package/dist/cjs/__tests__/vr-tests/__snapshots__/embed-card/embed-card-unauthorized-carousel-figma-in-trello-slide3--default.png +0 -3
  57. package/dist/cjs/__tests__/vr-tests/__snapshots__/embed-card/embed-card-unauthorized-carousel-google-in-confluence-slide1--default.png +0 -3
  58. package/dist/cjs/__tests__/vr-tests/__snapshots__/embed-card/embed-card-unauthorized-carousel-google-in-confluence-slide2--default.png +0 -3
  59. package/dist/cjs/__tests__/vr-tests/__snapshots__/embed-card/embed-card-unauthorized-carousel-google-in-confluence-slide3--default.png +0 -3
  60. package/dist/cjs/view/EmbedCard/components/carousel/CarouselSlide.compiled.css +0 -64
  61. package/dist/cjs/view/EmbedCard/components/carousel/CarouselSlide.js +0 -158
  62. package/dist/cjs/view/EmbedCard/components/carousel/index.compiled.css +0 -12
  63. package/dist/cjs/view/EmbedCard/components/carousel/index.js +0 -127
  64. package/dist/cjs/view/EmbedCard/components/carousel/types.js +0 -5
  65. package/dist/cjs/view/EmbedCard/views/unauthorized-view/UnauthorizedCarouselView.js +0 -207
  66. package/dist/cjs/view/EmbedCard/views/unauthorized-view/carousel-images/IconSlot.compiled.css +0 -7
  67. package/dist/cjs/view/EmbedCard/views/unauthorized-view/carousel-images/IconSlot.js +0 -31
  68. package/dist/cjs/view/EmbedCard/views/unauthorized-view/carousel-images/LazyRovoChatBenefitImage.js +0 -16
  69. package/dist/cjs/view/EmbedCard/views/unauthorized-view/carousel-images/LazyRovoSearchBenefitImage.js +0 -16
  70. package/dist/cjs/view/EmbedCard/views/unauthorized-view/carousel-images/NoAuthAvailableImage.compiled.css +0 -6
  71. package/dist/cjs/view/EmbedCard/views/unauthorized-view/carousel-images/NoAuthAvailableImage.js +0 -22
  72. package/dist/cjs/view/EmbedCard/views/unauthorized-view/carousel-images/ProductIcon.js +0 -47
  73. package/dist/cjs/view/EmbedCard/views/unauthorized-view/carousel-images/RovoChatBenefitImage.js +0 -359
  74. package/dist/cjs/view/EmbedCard/views/unauthorized-view/carousel-images/RovoSearchBenefitImage.js +0 -281
  75. package/dist/cjs/view/EmbedCard/views/unauthorized-view/carousel-images/SmartLinkBenefitImage.js +0 -364
  76. package/dist/cjs/view/EmbedCard/views/unauthorized-view/carousel-images/assets/rovo-chat-avatar.png +0 -0
  77. package/dist/es2019/__tests__/vr-tests/__snapshots__/automation-modal-header/smart-card-automation-modal-header-title--default--platform-dst-modal-dialog-use-modal-title-true.png +0 -3
  78. package/dist/es2019/__tests__/vr-tests/__snapshots__/embed-card/embed-card-unauthorized-carousel-dropbox-in-atlas-slide1--default.png +0 -3
  79. package/dist/es2019/__tests__/vr-tests/__snapshots__/embed-card/embed-card-unauthorized-carousel-figma-in-trello-slide1--default.png +0 -3
  80. package/dist/es2019/__tests__/vr-tests/__snapshots__/embed-card/embed-card-unauthorized-carousel-figma-in-trello-slide2--default.png +0 -3
  81. package/dist/es2019/__tests__/vr-tests/__snapshots__/embed-card/embed-card-unauthorized-carousel-figma-in-trello-slide3--default.png +0 -3
  82. package/dist/es2019/__tests__/vr-tests/__snapshots__/embed-card/embed-card-unauthorized-carousel-google-in-confluence-slide1--default.png +0 -3
  83. package/dist/es2019/__tests__/vr-tests/__snapshots__/embed-card/embed-card-unauthorized-carousel-google-in-confluence-slide2--default.png +0 -3
  84. package/dist/es2019/__tests__/vr-tests/__snapshots__/embed-card/embed-card-unauthorized-carousel-google-in-confluence-slide3--default.png +0 -3
  85. package/dist/es2019/view/EmbedCard/components/carousel/CarouselSlide.compiled.css +0 -64
  86. package/dist/es2019/view/EmbedCard/components/carousel/CarouselSlide.js +0 -145
  87. package/dist/es2019/view/EmbedCard/components/carousel/index.compiled.css +0 -12
  88. package/dist/es2019/view/EmbedCard/components/carousel/index.js +0 -105
  89. package/dist/es2019/view/EmbedCard/components/carousel/types.js +0 -1
  90. package/dist/es2019/view/EmbedCard/views/unauthorized-view/UnauthorizedCarouselView.js +0 -200
  91. package/dist/es2019/view/EmbedCard/views/unauthorized-view/carousel-images/IconSlot.compiled.css +0 -7
  92. package/dist/es2019/view/EmbedCard/views/unauthorized-view/carousel-images/IconSlot.js +0 -25
  93. package/dist/es2019/view/EmbedCard/views/unauthorized-view/carousel-images/LazyRovoChatBenefitImage.js +0 -3
  94. package/dist/es2019/view/EmbedCard/views/unauthorized-view/carousel-images/LazyRovoSearchBenefitImage.js +0 -3
  95. package/dist/es2019/view/EmbedCard/views/unauthorized-view/carousel-images/NoAuthAvailableImage.compiled.css +0 -6
  96. package/dist/es2019/view/EmbedCard/views/unauthorized-view/carousel-images/NoAuthAvailableImage.js +0 -13
  97. package/dist/es2019/view/EmbedCard/views/unauthorized-view/carousel-images/ProductIcon.js +0 -40
  98. package/dist/es2019/view/EmbedCard/views/unauthorized-view/carousel-images/RovoChatBenefitImage.js +0 -353
  99. package/dist/es2019/view/EmbedCard/views/unauthorized-view/carousel-images/RovoSearchBenefitImage.js +0 -269
  100. package/dist/es2019/view/EmbedCard/views/unauthorized-view/carousel-images/SmartLinkBenefitImage.js +0 -358
  101. package/dist/es2019/view/EmbedCard/views/unauthorized-view/carousel-images/assets/rovo-chat-avatar.png +0 -0
  102. package/dist/esm/__tests__/vr-tests/__snapshots__/automation-modal-header/smart-card-automation-modal-header-title--default--platform-dst-modal-dialog-use-modal-title-false.png +0 -3
  103. package/dist/esm/__tests__/vr-tests/__snapshots__/automation-modal-header/smart-card-automation-modal-header-title--default--platform-dst-modal-dialog-use-modal-title-true.png +0 -3
  104. package/dist/esm/__tests__/vr-tests/__snapshots__/embed-card/embed-card-unauthorized-carousel-dropbox-in-atlas-slide1--default.png +0 -3
  105. package/dist/esm/__tests__/vr-tests/__snapshots__/embed-card/embed-card-unauthorized-carousel-figma-in-trello-slide1--default.png +0 -3
  106. package/dist/esm/__tests__/vr-tests/__snapshots__/embed-card/embed-card-unauthorized-carousel-figma-in-trello-slide2--default.png +0 -3
  107. package/dist/esm/__tests__/vr-tests/__snapshots__/embed-card/embed-card-unauthorized-carousel-figma-in-trello-slide3--default.png +0 -3
  108. package/dist/esm/__tests__/vr-tests/__snapshots__/embed-card/embed-card-unauthorized-carousel-google-in-confluence-slide1--default.png +0 -3
  109. package/dist/esm/__tests__/vr-tests/__snapshots__/embed-card/embed-card-unauthorized-carousel-google-in-confluence-slide2--default.png +0 -3
  110. package/dist/esm/__tests__/vr-tests/__snapshots__/embed-card/embed-card-unauthorized-carousel-google-in-confluence-slide3--default.png +0 -3
  111. package/dist/esm/view/EmbedCard/components/carousel/CarouselSlide.compiled.css +0 -64
  112. package/dist/esm/view/EmbedCard/components/carousel/CarouselSlide.js +0 -149
  113. package/dist/esm/view/EmbedCard/components/carousel/index.compiled.css +0 -12
  114. package/dist/esm/view/EmbedCard/components/carousel/index.js +0 -118
  115. package/dist/esm/view/EmbedCard/components/carousel/types.js +0 -1
  116. package/dist/esm/view/EmbedCard/views/unauthorized-view/UnauthorizedCarouselView.js +0 -198
  117. package/dist/esm/view/EmbedCard/views/unauthorized-view/carousel-images/IconSlot.compiled.css +0 -7
  118. package/dist/esm/view/EmbedCard/views/unauthorized-view/carousel-images/IconSlot.js +0 -24
  119. package/dist/esm/view/EmbedCard/views/unauthorized-view/carousel-images/LazyRovoChatBenefitImage.js +0 -5
  120. package/dist/esm/view/EmbedCard/views/unauthorized-view/carousel-images/LazyRovoSearchBenefitImage.js +0 -5
  121. package/dist/esm/view/EmbedCard/views/unauthorized-view/carousel-images/NoAuthAvailableImage.compiled.css +0 -6
  122. package/dist/esm/view/EmbedCard/views/unauthorized-view/carousel-images/NoAuthAvailableImage.js +0 -15
  123. package/dist/esm/view/EmbedCard/views/unauthorized-view/carousel-images/ProductIcon.js +0 -40
  124. package/dist/esm/view/EmbedCard/views/unauthorized-view/carousel-images/RovoChatBenefitImage.js +0 -352
  125. package/dist/esm/view/EmbedCard/views/unauthorized-view/carousel-images/RovoSearchBenefitImage.js +0 -274
  126. package/dist/esm/view/EmbedCard/views/unauthorized-view/carousel-images/SmartLinkBenefitImage.js +0 -357
  127. package/dist/esm/view/EmbedCard/views/unauthorized-view/carousel-images/assets/rovo-chat-avatar.png +0 -0
  128. package/dist/types/view/EmbedCard/components/carousel/CarouselSlide.d.ts +0 -39
  129. package/dist/types/view/EmbedCard/components/carousel/index.d.ts +0 -26
  130. package/dist/types/view/EmbedCard/components/carousel/types.d.ts +0 -32
  131. package/dist/types/view/EmbedCard/views/unauthorized-view/UnauthorizedCarouselView.d.ts +0 -4
  132. package/dist/types/view/EmbedCard/views/unauthorized-view/carousel-images/IconSlot.d.ts +0 -14
  133. package/dist/types/view/EmbedCard/views/unauthorized-view/carousel-images/LazyRovoChatBenefitImage.d.ts +0 -3
  134. package/dist/types/view/EmbedCard/views/unauthorized-view/carousel-images/LazyRovoSearchBenefitImage.d.ts +0 -3
  135. package/dist/types/view/EmbedCard/views/unauthorized-view/carousel-images/NoAuthAvailableImage.d.ts +0 -7
  136. package/dist/types/view/EmbedCard/views/unauthorized-view/carousel-images/ProductIcon.d.ts +0 -9
  137. package/dist/types/view/EmbedCard/views/unauthorized-view/carousel-images/RovoChatBenefitImage.d.ts +0 -8
  138. package/dist/types/view/EmbedCard/views/unauthorized-view/carousel-images/RovoSearchBenefitImage.d.ts +0 -8
  139. package/dist/types/view/EmbedCard/views/unauthorized-view/carousel-images/SmartLinkBenefitImage.d.ts +0 -7
  140. /package/dist/cjs/__tests__/vr-tests/__snapshots__/automation-modal-header/{smart-card-automation-modal-header-title--default--platform-dst-modal-dialog-use-modal-title-false.png → smart-card-automation-modal-header-title--default.png} +0 -0
  141. /package/dist/{cjs/__tests__/vr-tests/__snapshots__/automation-modal-header/smart-card-automation-modal-header-title--default--platform-dst-modal-dialog-use-modal-title-true.png → es2019/__tests__/vr-tests/__snapshots__/automation-modal-header/smart-card-automation-modal-header-title--default.png} +0 -0
  142. /package/dist/{es2019/__tests__/vr-tests/__snapshots__/automation-modal-header/smart-card-automation-modal-header-title--default--platform-dst-modal-dialog-use-modal-title-false.png → esm/__tests__/vr-tests/__snapshots__/automation-modal-header/smart-card-automation-modal-header-title--default.png} +0 -0
@@ -160,51 +160,6 @@ export var messages = defineMessages({
160
160
  defaultMessage: 'To show a preview of this link, connect your {context} account.',
161
161
  description: 'Shown when a user does not have access to a link, but can connect their external account to view the link on card view. Displayed in byline.'
162
162
  },
163
- connect_link_account_embed_carousel_dot_label: {
164
- id: 'fabric.linking.connect_link_account_embed_carousel_dot_label.non-final',
165
- defaultMessage: 'Go to slide {index} of {total}',
166
- description: 'Accessible label for a dot indicator button in the teaser carousel, describing which slide it navigates to'
167
- },
168
- connect_link_account_embed_carousel_dot_row_label: {
169
- id: 'fabric.linking.connect_link_account_embed_carousel_dot_row_label.non-final',
170
- defaultMessage: 'Slides',
171
- description: 'Accessible label for the group of dot indicator buttons in the teaser carousel'
172
- },
173
- connect_link_account_embed_carousel_button_next: {
174
- id: 'fabric.linking.connect_link_account_embed_carousel_button_next.non-final',
175
- defaultMessage: 'Next',
176
- description: 'A button to view next teaser on benefit of connecting account on Smart Link embed'
177
- },
178
- connect_link_account_embed_carousel_sl_description: {
179
- id: 'fabric.linking.connect_link_account_embed_carousel_sl_description.non-final',
180
- defaultMessage: "Embed live previews of {context, select,\n\t\t\t\tGoogle {Google Docs, Sheets, and Slides}\n\t\t\t\tother {{context}}} {product, select,\n\t\t\t\tBITBUCKET {right inside Bitbucket}\n\t\t\t\tCONFLUENCE {right inside Confluence and Jira}\n\t\t\t\tJIRA {right inside Confluence and Jira}\n\t\t\t\tTRELLO {right inside Trello}\n\t\t\t\tother {across Atlassian}}.",
181
- description: 'A description on a teaser slide 1 on benefit of connecting account on Smart Link embed.' + ' Example Google+CONFLUENCE: Embed live previews of Google Docs, Sheets, and Slides right inside Confluence and Jira.' + ' Example Google+TRELLO: Embed live previews of Google Docs, Sheets, and Slides right inside Trello.' + ' Example other+TRELLO: Embed live previews of Figma right inside Trello.' + ' Example other+other: Embed live previews of Figma across Atlassian.'
182
- },
183
- connect_link_account_embed_carousel_sl_title: {
184
- id: 'fabric.linking.connect_link_account_embed_carousel_sl_title.non-final',
185
- defaultMessage: 'Turn smart links into rich previews',
186
- description: 'A title on a teaser slide 1 on benefit of connecting account on Smart Link embed'
187
- },
188
- connect_link_account_embed_carousel_rovo_title: {
189
- id: 'fabric.linking.connect_link_account_embed_carousel_rovo_title.non-final',
190
- defaultMessage: 'Find everything in one search',
191
- description: 'A title on a teaser slide 2 on benefit of connecting account on Smart Link embed'
192
- },
193
- connect_link_account_embed_carousel_rovo_description: {
194
- id: 'fabric.linking.connect_link_account_embed_carousel_rovo_description.non-final',
195
- defaultMessage: "Access {context} files alongside your work in {product, select,\n\t\t\t\tBITBUCKET {Bitbucket}\n\t\t\t\tCONFLUENCE {Confluence and Jira}\n\t\t\t\tJIRA {Confluence and Jira}\n\t\t\t\tTRELLO {Trello}\n\t\t\t\tother {Atlassian}}. We'll always respect your {context} permissions.",
196
- description: 'A description on a teaser slide 2 on benefit of connecting account on Smart Link embed.' + " Example Figma+JIRA: Access Figma files alongside your work in Confluence and Jira. We'll always respect your Figma permissions." + " Example Figma+BITBUCKET: Access Figma files alongside your work in Bitbucket. We'll always respect your Figma permissions." + " Example Figma+other: Access Figma files alongside your work in Atlassian. We'll always respect your Figma permissions."
197
- },
198
- connect_link_account_embed_carousel_rovochat_title: {
199
- id: 'fabric.linking.connect_link_account_embed_carousel_rovochat_title.non-final',
200
- defaultMessage: 'Get help from Rovo',
201
- description: 'A title on a teaser slide 3 on benefit of connecting account on Smart Link embed'
202
- },
203
- connect_link_account_embed_carousel_rovochat_description: {
204
- id: 'fabric.linking.connect_link_account_embed_carousel_rovochat_description.non-final',
205
- defaultMessage: 'Rovo uses your {context} content to answer questions, summarise docs, and draft updates using the work you’ve already done.',
206
- description: 'A description on a teaser slide 3 on benefit of connecting account on Smart Link embed'
207
- },
208
163
  connect_link_account_success_flag_description: {
209
164
  id: 'fabric.linking.connect_link_account_success_flag_description',
210
165
  defaultMessage: 'Shared links now display rich previews.',
@@ -485,16 +440,31 @@ export var messages = defineMessages({
485
440
  defaultMessage: 'Open preview',
486
441
  description: 'Click to view a richer view of your content, without needing to navigate to it.'
487
442
  },
443
+ preview_with_title: {
444
+ id: 'smart-card.preview_with_title.ai-non-final',
445
+ defaultMessage: 'Open preview for {title}',
446
+ description: 'Accessible label for the smart link preview action. Opens a preview of the linked content. The {title} placeholder is the title of the linked resource, or its URL when no title is available.'
447
+ },
488
448
  preview_modal: {
489
449
  id: 'fabric.linking.preview_modal',
490
450
  defaultMessage: 'Open preview modal',
491
451
  description: 'Button used to view a modal view of your content without needing to navigate to it.'
492
452
  },
453
+ preview_modal_with_title: {
454
+ id: 'smart-card.preview_modal_with_title.ai-non-final',
455
+ defaultMessage: 'Open preview modal for {title}',
456
+ description: 'Accessible label for the smart link action that opens a preview modal. The {title} placeholder is the title of the linked resource, or its URL when no title is available.'
457
+ },
493
458
  preview_panel: {
494
459
  id: 'fabric.linking.preview_panel',
495
460
  defaultMessage: 'Open preview panel',
496
461
  description: 'Button used to view a side panel view of your content without needing to navigate to it.'
497
462
  },
463
+ preview_panel_with_title: {
464
+ id: 'smart-card.preview_panel_with_title.ai-non-final',
465
+ defaultMessage: 'Open preview panel for {title}',
466
+ description: 'Accessible label for the smart link action that opens a preview side panel. The {title} placeholder is the title of the linked resource, or its URL when no title is available.'
467
+ },
498
468
  preview_close: {
499
469
  id: 'fabric.linking.preview_close',
500
470
  defaultMessage: 'Close preview',
@@ -4,7 +4,7 @@ export var ANALYTICS_CHANNEL = 'media';
4
4
  export var context = {
5
5
  componentName: 'smart-cards',
6
6
  packageName: "@atlaskit/smart-card" || '',
7
- packageVersion: "46.10.1" || ''
7
+ packageVersion: "46.10.3" || ''
8
8
  };
9
9
  export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
10
10
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -1,8 +1,10 @@
1
1
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
2
  import React from 'react';
3
3
  import Loadable from 'react-loadable';
4
+ import { fg } from '@atlaskit/platform-feature-flags/fg';
4
5
  import extractFileFormatIcon from '../extractors/flexible/icon/extract-file-formatIcon';
5
6
  import { getLazyIcons } from './get-lazy-icons';
7
+ import { getLazyIconComponent } from './lazy-component';
6
8
  var getTypeToIconMap = function getTypeToIconMap(fileFormat) {
7
9
  var _lazyIcons$iconDescri, _iconDescriptor$label;
8
10
  var iconDescriptor = extractFileFormatIcon(fileFormat);
@@ -25,6 +27,18 @@ export var getIconForFileType = function getIconForFileType(fileMimeType, showIc
25
27
  if (!importCb) {
26
28
  return;
27
29
  }
30
+ if (fg('platform_sl_replace_react_loadable')) {
31
+ var _extractFileFormatIco;
32
+ var iconType = (_extractFileFormatIco = extractFileFormatIcon(fileMimeType.toLowerCase())) === null || _extractFileFormatIco === void 0 ? void 0 : _extractFileFormatIco.icon;
33
+ if (iconType) {
34
+ var LazyIcon = getLazyIconComponent("".concat(iconType, ":default"), importCb);
35
+ var lazyLabel = (showIconLabel !== null && showIconLabel !== void 0 ? showIconLabel : true) ? icon[1] || '' : '';
36
+ return /*#__PURE__*/React.createElement(LazyIcon, {
37
+ testId: "document-file-format-icon",
38
+ label: lazyLabel
39
+ });
40
+ }
41
+ }
28
42
  var Icon = Loadable({
29
43
  loader: function loader() {
30
44
  return importCb().then(function (module) {
@@ -0,0 +1,73 @@
1
+ import React, { lazy, Suspense } from 'react';
2
+ var RenderNothing = function RenderNothing() {
3
+ return null;
4
+ };
5
+
6
+ /**
7
+ * `.catch` handler for a lazy loader: renders nothing if the chunk fails to load, instead of
8
+ * throwing to the nearest error boundary (matches `react-loadable` with `loading: () => null`).
9
+ *
10
+ * @example lazy(() => import('./Foo').catch(renderNothingOnLoadError))
11
+ */
12
+ export var renderNothingOnLoadError = function renderNothingOnLoadError() {
13
+ return {
14
+ // Typed as `never` so the fallback is assignable to whatever component type the loader
15
+ // resolves to, and `lazy()` keeps inferring that component's props.
16
+ default: RenderNothing
17
+ };
18
+ };
19
+
20
+ /**
21
+ * Wraps a `React.lazy` component in its own `<Suspense fallback={null}>`, so it renders nothing
22
+ * while its chunk loads and never suspends (and blanks out) an ancestor such as the card itself.
23
+ *
24
+ * Call `lazy(() => import('...'))` inline at module scope and pass the result here, rather than
25
+ * passing a loader into a helper that calls `lazy()` for you. Product SSR tooling (e.g.
26
+ * Confluence's LoadableReactLazyBabelPlugin) only tracks and preloads `lazy()` calls whose loader
27
+ * reads no function parameters or other render-time values.
28
+ */
29
+ export var withSuspense = function withSuspense(LazyComponent, displayName) {
30
+ // Typed loosely internally: TS cannot spread generic props onto a LazyExoticComponent.
31
+ // The returned component is still strictly typed as ComponentType<P>.
32
+ var Component = LazyComponent;
33
+ var LazyComponentWithSuspense = function LazyComponentWithSuspense(props) {
34
+ return /*#__PURE__*/React.createElement(Suspense, {
35
+ fallback: null
36
+ }, /*#__PURE__*/React.createElement(Component, props));
37
+ };
38
+ if (displayName) {
39
+ LazyComponentWithSuspense.displayName = displayName;
40
+ }
41
+ return LazyComponentWithSuspense;
42
+ };
43
+ var lazyIconCache = new Map();
44
+
45
+ /**
46
+ * Returns a lazily loaded icon component for a dynamic icon import.
47
+ *
48
+ * Callers resolve the icon on every render, so the component is cached by `cacheKey` to keep a
49
+ * stable component identity across renders (otherwise React would remount and re-suspend the
50
+ * icon on every render). The cache entry is dropped if the chunk fails to load, so the next
51
+ * render retries the import.
52
+ *
53
+ * Prefer an inline module-scope `lazy(() => import('...'))` with `withSuspense` where the set of
54
+ * components is known up front, so product SSR tooling can preload the chunks. This helper is a
55
+ * deliberate exception for open-ended icon sets (any Atlaskit icon / file type) that cannot be
56
+ * enumerated statically: its loader reads render-time values, so SSR tooling cannot preload it.
57
+ *
58
+ * @param cacheKey Must uniquely identify the module `importFn` resolves to.
59
+ */
60
+ export var getLazyIconComponent = function getLazyIconComponent(cacheKey, importFn) {
61
+ var cached = lazyIconCache.get(cacheKey);
62
+ if (cached) {
63
+ return cached;
64
+ }
65
+ var LazyIcon = withSuspense( /*#__PURE__*/lazy(function () {
66
+ return importFn().catch(function () {
67
+ lazyIconCache.delete(cacheKey);
68
+ return renderNothingOnLoadError();
69
+ });
70
+ }), "lazy(".concat(cacheKey, ")"));
71
+ lazyIconCache.set(cacheKey, LazyIcon);
72
+ return LazyIcon;
73
+ };
@@ -2,7 +2,7 @@
2
2
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
3
3
  import "./ResolvedView.compiled.css";
4
4
  import { ax, ix } from "@compiled/react/runtime";
5
- import React from 'react';
5
+ import React, { lazy } from 'react';
6
6
  import Loadable from 'react-loadable';
7
7
  import LinkGlyph from '@atlaskit/icon/core/link';
8
8
  import { useSmartLinkContext } from '@atlaskit/link-provider/use-smart-link-context';
@@ -16,6 +16,7 @@ import useEmbedRovoActionsFooterExperiment from '../../../state/hooks/use-embed-
16
16
  import useRovoConfig from '../../../state/hooks/use-rovo-config';
17
17
  import { getPreviewUrlWithEmbedContext } from '../../../utils/get-preview-url-with-theme';
18
18
  import { isProfileType } from '../../../utils/is-profile-type';
19
+ import { renderNothingOnLoadError, withSuspense } from '../../../utils/lazy-component';
19
20
  import { getRovoPostAuthPromptKeys } from '../../common/rovo-post-auth-prompts';
20
21
  import { ExpandedFrame } from '../components/ExpandedFrame';
21
22
  import { Frame } from '../components/Frame';
@@ -32,6 +33,11 @@ var EmbedRovoActionsFooter = Loadable({
32
33
  }
33
34
  });
34
35
  EmbedRovoActionsFooter.displayName = 'lazy(EmbedRovoActionsFooter)';
36
+
37
+ // Inline module-scope lazy() so product SSR tooling can preload it before hydration.
38
+ var LazyEmbedRovoActionsFooter = withSuspense( /*#__PURE__*/lazy(function () {
39
+ return import( /* webpackChunkName: "smart-card-embed-rovo-actions-footer" */'../components/rovo-actions-footer').catch(renderNothingOnLoadError);
40
+ }), 'lazy(EmbedRovoActionsFooter)');
35
41
  var styles = {
36
42
  contentWithFooter: "_1e0c1txw _2lx21bp4 _4t3i1osq _1tkeidpf",
37
43
  frameWithFooter: "_16jlkb7n _1tkeidpf",
@@ -69,7 +75,11 @@ var EmbedFrameWithRovoFooter = function EmbedFrameWithRovoFooter(_ref) {
69
75
  });
70
76
  }, [details, isEmbedRovoActionsFooterEnabled]);
71
77
  var footer = React.useMemo(function () {
72
- return rovoActionData && prompts.length > 0 ? /*#__PURE__*/React.createElement(EmbedRovoActionsFooter, {
78
+ return rovoActionData && prompts.length > 0 ? fg('platform_sl_replace_react_loadable') ? /*#__PURE__*/React.createElement(LazyEmbedRovoActionsFooter, {
79
+ actionData: rovoActionData,
80
+ prompts: prompts,
81
+ testId: "".concat(testId, "-rovo-actions-footer")
82
+ }) : /*#__PURE__*/React.createElement(EmbedRovoActionsFooter, {
73
83
  actionData: rovoActionData,
74
84
  prompts: prompts,
75
85
  testId: "".concat(testId, "-rovo-actions-footer")
@@ -4,13 +4,11 @@ var _excluded = ["context", "extensionKey", "isProductIntegrationSupported", "on
4
4
  import React, { useCallback, useMemo } from 'react';
5
5
  import { FormattedMessage } from 'react-intl';
6
6
  import Button from '@atlaskit/button/default/button';
7
- import FeatureGates from '@atlaskit/feature-gate-js-client/feature-gates';
8
7
  import { useAnalyticsEvents } from '../../../../common/analytics/generated/use-analytics-events';
9
8
  import { messages } from '../../../../messages';
10
9
  import UnauthorisedViewContent from '../../../common/UnauthorisedViewContent';
11
10
  import UnresolvedView from '../unresolved-view';
12
11
  import { UnauthorizedSVG } from './unauthorized-svg';
13
- import UnauthorizedCarouselView from './UnauthorizedCarouselView';
14
12
  var UnauthorizedView = function UnauthorizedView(_ref) {
15
13
  var _context$image;
16
14
  var context = _ref.context,
@@ -91,10 +89,4 @@ var UnauthorizedView = function UnauthorizedView(_ref) {
91
89
  text: context === null || context === void 0 ? void 0 : context.text
92
90
  }));
93
91
  };
94
- var UnauthorizedViewGated = function UnauthorizedViewGated(props) {
95
- if (FeatureGates.initializeCompleted() && FeatureGates.getExperimentValue('platform_sl_embed_preauth_teaser_exp', 'isEnabled', false)) {
96
- return /*#__PURE__*/React.createElement(UnauthorizedCarouselView, props);
97
- }
98
- return /*#__PURE__*/React.createElement(UnauthorizedView, props);
99
- };
100
- export default UnauthorizedViewGated;
92
+ export default UnauthorizedView;
@@ -1,6 +1,9 @@
1
1
  /* index.tsx generated by @compiled/babel-plugin v3.0.2 */
2
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
3
  import "./index.compiled.css";
3
4
  import { ax, ix } from "@compiled/react/runtime";
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; }
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; }
4
7
  import React, { forwardRef, useCallback, useMemo } from 'react';
5
8
  import { cx } from '@compiled/react';
6
9
  import Button from '@atlaskit/button/default/button';
@@ -8,6 +11,7 @@ import IconButton from '@atlaskit/button/icon/button';
8
11
  import LinkIconButton from '@atlaskit/button/icon/link';
9
12
  import LinkButton from '@atlaskit/button/link';
10
13
  import LoadingButton from '@atlaskit/button/loading-button';
14
+ import { fg } from '@atlaskit/platform-feature-flags/fg';
11
15
  import { Box } from '@atlaskit/primitives/compiled/box';
12
16
  import Tooltip from '@atlaskit/tooltip/Tooltip';
13
17
  import { ActionName, SmartLinkSize } from '../../../../../../constants';
@@ -60,6 +64,7 @@ var ActionButtonRefresh = /*#__PURE__*/forwardRef(function (_ref, ref) {
60
64
  href = _ref.href,
61
65
  ariaLabel = _ref.ariaLabel;
62
66
  var iconOnly = !content;
67
+ var isPreviewA11yLabelEnabled = fg('platform_smart_link_preview_a11y_label');
63
68
  var context = useFlexibleUiContext();
64
69
  var _useRovoConfig = useRovoConfig(),
65
70
  product = _useRovoConfig.product;
@@ -78,6 +83,10 @@ var ActionButtonRefresh = /*#__PURE__*/forwardRef(function (_ref, ref) {
78
83
  return icon;
79
84
  } : undefined;
80
85
  if (iconOnly && iconFn) {
86
+ var label = isPreviewA11yLabelEnabled ? ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : tooltipMessage : tooltipMessage;
87
+ var tooltip = isPreviewA11yLabelEnabled ? _objectSpread(_objectSpread({}, tooltipOptions), {}, {
88
+ content: tooltipMessage
89
+ }) : tooltipOptions;
81
90
  if (isLinkButton && iconFn) {
82
91
  return /*#__PURE__*/React.createElement(LinkIconButton, {
83
92
  appearance: IconButtonAppearanceMap[appearance],
@@ -85,11 +94,11 @@ var ActionButtonRefresh = /*#__PURE__*/forwardRef(function (_ref, ref) {
85
94
  href: href,
86
95
  isDisabled: isDisabled,
87
96
  isTooltipDisabled: false,
88
- label: tooltipMessage,
97
+ label: label,
89
98
  onClick: onButtonClick(onClick),
90
99
  spacing: spacing,
91
100
  testId: testId,
92
- tooltip: tooltipOptions
101
+ tooltip: tooltip
93
102
  });
94
103
  }
95
104
  return /*#__PURE__*/React.createElement(IconButton, {
@@ -98,11 +107,11 @@ var ActionButtonRefresh = /*#__PURE__*/forwardRef(function (_ref, ref) {
98
107
  isDisabled: isDisabled,
99
108
  isLoading: isLoading,
100
109
  isTooltipDisabled: false,
101
- label: tooltipMessage,
110
+ label: label,
102
111
  onClick: onButtonClick(onClick),
103
112
  spacing: spacing,
104
113
  testId: testId,
105
- tooltip: tooltipOptions
114
+ tooltip: tooltip
106
115
  });
107
116
  }
108
117
  var iconBeforeFn = iconBefore ? function () {
@@ -143,7 +152,7 @@ var ActionButtonRefresh = /*#__PURE__*/forwardRef(function (_ref, ref) {
143
152
  spacing: spacing,
144
153
  testId: testId
145
154
  }, content));
146
- }, [appearance, ariaLabel, content, href, iconAfter, iconBefore, iconOnly, isDisabled, isLoading, onButtonClick, onClick, size, testId, tooltipMessage]);
155
+ }, [appearance, ariaLabel, content, href, iconAfter, iconBefore, iconOnly, isDisabled, isLoading, isPreviewA11yLabelEnabled, onButtonClick, onClick, size, testId, tooltipMessage]);
147
156
  return /*#__PURE__*/React.createElement(Box, {
148
157
  testId: "".concat(testId, "-button-wrapper"),
149
158
  ref: ref,
@@ -1,14 +1,17 @@
1
1
  import React from 'react';
2
2
  import DropdownItem from '@atlaskit/dropdown-menu/dropdown-menu-item';
3
+ import { fg } from '@atlaskit/platform-feature-flags/fg';
3
4
  import { handleOnClick } from '../../../../../../utils/handle-on-click';
4
5
  var ActionDropdownItem = function ActionDropdownItem(_ref) {
5
- var content = _ref.content,
6
+ var ariaLabel = _ref.ariaLabel,
7
+ content = _ref.content,
6
8
  iconAfter = _ref.iconAfter,
7
9
  iconBefore = _ref.iconBefore,
8
10
  isLoading = _ref.isLoading,
9
11
  onClick = _ref.onClick,
10
12
  testId = _ref.testId;
11
13
  return /*#__PURE__*/React.createElement(DropdownItem, {
14
+ "aria-label": fg('platform_smart_link_preview_a11y_label') ? ariaLabel : undefined,
12
15
  elemAfter: iconAfter,
13
16
  elemBefore: iconBefore,
14
17
  isDisabled: isLoading,
@@ -71,6 +71,7 @@ var Action = function Action(_ref) {
71
71
  }
72
72
  if (isDropdownItem) {
73
73
  return /*#__PURE__*/React.createElement(ActionDropdownItem, {
74
+ ariaLabel: ariaLabel,
74
75
  content: content,
75
76
  iconAfter: iconAfter,
76
77
  iconBefore: iconBefore,
@@ -3,12 +3,9 @@ import "./main.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
5
5
  import { defineMessages, useIntl } from 'react-intl';
6
- import Heading from '@atlaskit/heading/heading';
7
6
  import AutomationIcon from '@atlaskit/icon/core/automation';
8
- import { useModal } from '@atlaskit/modal-dialog/hooks';
9
7
  import ModalHeader from '@atlaskit/modal-dialog/modal-header';
10
8
  import ModalTitle from '@atlaskit/modal-dialog/modal-title';
11
- import { fg } from '@atlaskit/platform-feature-flags/fg';
12
9
  import { Box } from '@atlaskit/primitives/compiled/box';
13
10
  import { Inline } from '@atlaskit/primitives/compiled/inline';
14
11
  import { Stack } from '@atlaskit/primitives/compiled/stack';
@@ -32,8 +29,6 @@ export var AutomationModalHeader = function AutomationModalHeader(_ref) {
32
29
  var _useAutomationMenu = useAutomationMenu(),
33
30
  initialised = _useAutomationMenu.initialised,
34
31
  rules = _useAutomationMenu.rules;
35
- var _useModal = useModal(),
36
- titleId = _useModal.titleId;
37
32
  var showDescription = initialised && rules.length > 0 && !!modalDescription;
38
33
  return /*#__PURE__*/React.createElement(ModalHeader, {
39
34
  hasCloseButton: true
@@ -49,10 +44,7 @@ export var AutomationModalHeader = function AutomationModalHeader(_ref) {
49
44
  label: formatMessage(i18n.modalHeaderIconLabel),
50
45
  color: "var(--ds-icon-accent-green, #22A06B)",
51
46
  spacing: "compact"
52
- })), fg('platform_dst_modal-dialog-use-modal-title') ? /*#__PURE__*/React.createElement(ModalTitle, null, modalTitle) : /*#__PURE__*/React.createElement(Heading, {
53
- size: "medium",
54
- id: titleId
55
- }, modalTitle)), showDescription && /*#__PURE__*/React.createElement(Box, {
47
+ })), /*#__PURE__*/React.createElement(ModalTitle, null, modalTitle)), showDescription && /*#__PURE__*/React.createElement(Box, {
56
48
  xcss: styles.modalDescriptionStyle
57
49
  }, modalDescription)));
58
50
  };
@@ -1,12 +1,14 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
3
  var _excluded = ["value", "isProject"];
4
- import React from 'react';
4
+ import React, { lazy } from 'react';
5
5
  import { FormattedMessage, useIntl } from 'react-intl';
6
6
  import FeatureGates from '@atlaskit/feature-gate-js-client/feature-gates';
7
+ import { fg } from '@atlaskit/platform-feature-flags/fg';
7
8
  import { ActionName } from '../../../../../constants';
8
9
  import { messages } from '../../../../../messages';
9
10
  import { useFlexibleUiContext } from '../../../../../state/flexible-ui-context/useFlexibleUiContext';
11
+ import { renderNothingOnLoadError, withSuspense } from '../../../../../utils/lazy-component';
10
12
  import { importIcon } from '../../importIcon';
11
13
  import ServerAction from '../action/server-action';
12
14
  import { getFollowActionErrorMessage } from './utils';
@@ -28,7 +30,31 @@ var importIconMapper = {
28
30
  });
29
31
  }
30
32
  };
33
+
34
+ // Inline module-scope lazy() calls so product SSR tooling can preload them before hydration.
35
+ var lazyIconMapper = {
36
+ goal: withSuspense( /*#__PURE__*/lazy(function () {
37
+ return import( /* webpackChunkName: "glyphGoal" */'./goal-icon').then(function (_ref3) {
38
+ var GoalIcon = _ref3.GoalIcon;
39
+ return {
40
+ default: GoalIcon
41
+ };
42
+ }).catch(renderNothingOnLoadError);
43
+ }), 'lazy(GoalIcon)'),
44
+ projects: withSuspense( /*#__PURE__*/lazy(function () {
45
+ return import( /* webpackChunkName: "glyphProjects" */'./projects-icon').then(function (_ref4) {
46
+ var ProjectsIcon = _ref4.ProjectsIcon;
47
+ return {
48
+ default: ProjectsIcon
49
+ };
50
+ }).catch(renderNothingOnLoadError);
51
+ }), 'lazy(ProjectsIcon)')
52
+ };
31
53
  var getIcon = function getIcon(stackIconType) {
54
+ if (fg('platform_sl_replace_react_loadable')) {
55
+ var _lazyIconMapper$stack;
56
+ return (_lazyIconMapper$stack = lazyIconMapper[stackIconType]) !== null && _lazyIconMapper$stack !== void 0 ? _lazyIconMapper$stack : null;
57
+ }
32
58
  var importFn = importIconMapper[stackIconType];
33
59
  if (!importFn) {
34
60
  return null;
@@ -5,6 +5,7 @@ import React, { useCallback, useMemo } from 'react';
5
5
  import { FormattedMessage, useIntl } from 'react-intl';
6
6
  import MediaServicesActualSizeIcon from '@atlaskit/icon/core/grow-diagonal';
7
7
  import PanelRightIcon from '@atlaskit/icon/core/panel-right';
8
+ import { fg } from '@atlaskit/platform-feature-flags/fg';
8
9
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
9
10
  import { ActionName } from '../../../../../constants';
10
11
  import { messages } from '../../../../../messages';
@@ -12,7 +13,7 @@ import { useFlexibleUiContext } from '../../../../../state/flexible-ui-context/u
12
13
  import useInvokeClientAction from '../../../../../state/hooks/use-invoke-client-action';
13
14
  import Action from '../action';
14
15
  var PreviewAction = function PreviewAction(_ref) {
15
- var _context$actions;
16
+ var _context$actions, _context$linkTitle;
16
17
  var onClickCallback = _ref.onClick,
17
18
  props = _objectWithoutProperties(_ref, _excluded);
18
19
  var intl = useIntl();
@@ -57,8 +58,18 @@ var PreviewAction = function PreviewAction(_ref) {
57
58
  return messages.preview_improved;
58
59
  }, [hasPreviewPanel]);
59
60
  var actionMessage = intl.formatMessage(actionLabel);
61
+ var title = context === null || context === void 0 || (_context$linkTitle = context.linkTitle) === null || _context$linkTitle === void 0 || (_context$linkTitle = _context$linkTitle.text) === null || _context$linkTitle === void 0 ? void 0 : _context$linkTitle.trim();
62
+ var actionLabelWithTitle = messages.preview_with_title;
63
+ if (actionLabel === messages.preview_panel) {
64
+ actionLabelWithTitle = messages.preview_panel_with_title;
65
+ } else if (actionLabel === messages.preview_modal) {
66
+ actionLabelWithTitle = messages.preview_modal_with_title;
67
+ }
68
+ var ariaLabel = fg('platform_smart_link_preview_a11y_label') && title ? intl.formatMessage(actionLabelWithTitle, {
69
+ title: title
70
+ }) : actionMessage;
60
71
  return data ? /*#__PURE__*/React.createElement(Action, _extends({
61
- ariaLabel: actionMessage,
72
+ ariaLabel: ariaLabel,
62
73
  content: actionMessage,
63
74
  icon: actionIcon(),
64
75
  onClick: onClick,
@@ -9,6 +9,7 @@ import { transformSmartLinkSizeToIconTileSize } from '../../../../../common/ui/i
9
9
  import { IconType, SmartLinkSize } from '../../../../../constants';
10
10
  import { getLazyIcons } from '../../../../../utils/get-lazy-icons';
11
11
  import { isIconSizeLarge } from '../../../../../utils/is-icon-size-large';
12
+ import { getLazyIconComponent } from '../../../../../utils/lazy-component';
12
13
  var getIconImportFn = function getIconImportFn(icon, size) {
13
14
  var item = getLazyIcons()[icon];
14
15
  if (isIconSizeLarge(size) && item !== null && item !== void 0 && item.large) {
@@ -16,6 +17,16 @@ var getIconImportFn = function getIconImportFn(icon, size) {
16
17
  }
17
18
  return item === null || item === void 0 ? void 0 : item.default;
18
19
  };
20
+
21
+ // Only used when platform_sl_replace_react_loadable is on. Kept separate from getIconImportFn so
22
+ // the gate-off path is unchanged.
23
+ var getLazyIcon = function getLazyIcon(icon, size) {
24
+ var item = getLazyIcons()[icon];
25
+ if (isIconSizeLarge(size) && item !== null && item !== void 0 && item.large) {
26
+ return getLazyIconComponent("".concat(icon, ":large"), item.large);
27
+ }
28
+ return item !== null && item !== void 0 && item.default ? getLazyIconComponent("".concat(icon, ":default"), item.default) : undefined;
29
+ };
19
30
  var importIcon = function importIcon(importFn) {
20
31
  return Loadable({
21
32
  loader: function loader() {
@@ -83,11 +94,19 @@ var AtlaskitIcon = function AtlaskitIcon(_ref) {
83
94
  });
84
95
  }
85
96
  }
86
- var importFn = getIconImportFn(icon, size);
87
- if (!importFn) {
88
- return null;
97
+ var ImportedIcon;
98
+ if (fg('platform_sl_replace_react_loadable')) {
99
+ ImportedIcon = getLazyIcon(icon, size);
100
+ if (!ImportedIcon) {
101
+ return null;
102
+ }
103
+ } else {
104
+ var importFn = getIconImportFn(icon, size);
105
+ if (!importFn) {
106
+ return null;
107
+ }
108
+ ImportedIcon = importIcon(importFn);
89
109
  }
90
- var ImportedIcon = importIcon(importFn);
91
110
  if (isCoreIcon(icon)) {
92
111
  var color;
93
112
  if (icon === IconType.Error || icon === IconType.Forbidden) {
@@ -12,7 +12,7 @@ import LinkWarningModal from './LinkWarningModal';
12
12
  import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
13
13
  var PACKAGE_DATA = {
14
14
  packageName: "@atlaskit/smart-card",
15
- packageVersion: "46.10.1",
15
+ packageVersion: "46.10.3",
16
16
  componentName: 'linkUrl'
17
17
  };
18
18
  var LinkUrl = function LinkUrl(_ref) {
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * Generates Typescript types for analytics events from analytics.spec.yaml
5
5
  *
6
- * @codegen <<SignedSource::9cd75b85ebe2e335394c0d7f99ba9cb1>>
6
+ * @codegen <<SignedSource::7fd705fd40f738dda4aca53c5070ac66>>
7
7
  * @codegenCommand afm workspace @atlassian/analytics-tooling analytics:codegen smart-card
8
8
  */
9
9
  export type PackageMetaDataContextType = {
@@ -246,14 +246,6 @@ export type ButtonClickedConnectAccountAttributesType = {
246
246
  display: 'inline' | 'block' | 'embed' | 'embedPreview' | 'flexible' | 'hoverCardPreview' | 'url';
247
247
  definitionId?: string | null;
248
248
  };
249
- export type ButtonClickedCarouselNextAttributesType = {
250
- display: 'inline' | 'block' | 'embed' | 'embedPreview' | 'flexible' | 'hoverCardPreview' | 'url';
251
- slideId: string;
252
- };
253
- export type ButtonClickedCarouselConnectAttributesType = {
254
- display: 'inline' | 'block' | 'embed' | 'embedPreview' | 'flexible' | 'hoverCardPreview' | 'url';
255
- slideId: string;
256
- };
257
249
  export type SmartLinkClickedTryAnotherAccountAttributesType = {
258
250
  display: 'inline' | 'block' | 'embed' | 'embedPreview' | 'flexible' | 'hoverCardPreview' | 'url';
259
251
  definitionId?: string | null;
@@ -446,14 +438,6 @@ export type AnalyticsEventAttributes = {
446
438
  /**
447
439
  * fires an event that represents when a user clicks on the authentication call to action with no current authenticated account. (i.e. Connect to Preview). */
448
440
  'ui.button.clicked.connectAccount': ButtonClickedConnectAccountAttributesType;
449
- /**
450
- * Fires when a user clicks the "See next" button in a smart link carousel view. Used to measure engagement depth — how many users navigate past the first benefit slide.
451
- * */
452
- 'ui.button.clicked.carouselNext': ButtonClickedCarouselNextAttributesType;
453
- /**
454
- * Fires when a user clicks the connect account button from within a smart link carousel view. Captures which benefit slide the user was viewing when they decided to connect, enabling measurement of which slide is most persuasive.
455
- * */
456
- 'ui.button.clicked.carouselConnect': ButtonClickedCarouselConnectAttributesType;
457
441
  /**
458
442
  * fires an event that represents when a user clicks on the authentication call to action with a forbidden authenticated account. (i.e. Try another account). */
459
443
  'ui.smartLink.clicked.tryAnotherAccount': SmartLinkClickedTryAnotherAccountAttributesType;
@@ -1,7 +1,7 @@
1
1
  import { type MessageDescriptor } from 'react-intl';
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_title' | 'request_access_pending_description' | 'request_denied_description' | 'default_no_access_title' | 'direct_access_title' | 'direct_access_description' | 'direct_access' | 'access_exists_description' | 'not_found_description' | 'not_found_title';
3
3
  export type RovoChatActionMessageKey = 'rovo_prompt_context_generic' | 'rovo_prompt_context_generic_plural' | 'rovo_prompt_context_confluence_page' | 'rovo_prompt_context_jira_work_item' | 'rovo_prompt_message_summarize' | 'rovo_prompt_button_ask_rovo_anything' | 'rovo_prompt_message_ask_rovo_anything' | 'rovo_prompt_button_highlight_relevant_content' | 'rovo_prompt_message_highlight_relevant_content' | 'rovo_prompt_button_identify_key_trends' | 'rovo_prompt_message_identify_key_trends' | 'rovo_prompt_button_identify_key_points' | 'rovo_prompt_message_identify_key_points' | 'rovo_prompt_button_find_open_questions' | 'rovo_prompt_message_find_open_questions' | 'rovo_prompt_button_key_highlights' | 'rovo_prompt_message_key_highlights' | 'rovo_prompt_message_summarize_document' | 'rovo_prompt_message_summarize_presentation' | 'rovo_prompt_button_explain_code' | 'rovo_prompt_message_explain_code' | 'rovo_prompt_button_catch_up' | 'rovo_prompt_message_catch_up' | 'rovo_prompt_button_salesforce_prep' | 'rovo_prompt_message_salesforce_prep';
4
- export type MessageKey = 'assigned_to' | 'ai_summarize' | 'change_status' | 'ai_summarized_abbreviation' | 'ai_summarized_info' | 'ai_summarized_info_short' | 'ai_summary_error_generic_rebrand' | 'ai_summary_error_acceptable_use_violation' | 'ai_summary_error_hipaa_content_detected' | 'ai_summary_error_exceeding_context_length_error' | 'ai_summary_action_rebrand' | 'ai_summary_action_description' | 'ai_summary_action_description_rebrand' | 'automation_action_title' | 'automation_action_tooltip' | 'automation_action_icon_label' | 'automation_action_confluence_page_modal_title' | 'automation_action_confluence_page_modal_description' | 'copy_summary_action' | 'copy_summary_action_description' | 'copied_summary_action_description' | 'beta' | 'cannot_find_link' | 'compass_applied_components_count' | 'connect_link_account_card' | 'connect_link_account_card_name' | 'connect_link_account_card_description' | 'connect_link_account_embed_carousel_button_next' | 'connect_link_account_embed_carousel_dot_label' | 'connect_link_account_embed_carousel_dot_row_label' | 'connect_link_account_embed_carousel_sl_description' | 'connect_link_account_embed_carousel_sl_title' | 'connect_link_account_embed_carousel_rovo_description' | 'connect_link_account_embed_carousel_rovo_title' | 'connect_link_account_embed_carousel_rovochat_description' | 'connect_link_account_embed_carousel_rovochat_title' | 'connect_link_account_success_flag_description' | 'connect_link_account_success_flag_title' | 'connect_link_account_success_flag_title_default' | 'connect_unauthorised_account_action' | 'connect_3p_account' | 'connect_inline_provider_to_update' | 'connect_inline_social_proof' | 'connect_inline_to_update' | 'social_proof_inline_cta_tag_high_with_context' | 'social_proof_inline_cta_tag_high_no_context' | 'social_proof_inline_cta_tag_low_with_context' | 'social_proof_inline_cta_tag_low_no_context' | 'connect_unauthorised_account_description' | 'connect_unauthorised_account_description_no_provider' | 'continue' | 'copy_url_to_clipboard' | 'copied_url_to_clipboard' | 'could_not_load_link' | 'download' | 'download_description' | 'download_file' | 'follow' | 'follow_project_description' | 'follow_project_descriptionGalaxia' | 'follow_project' | 'follow_goal' | 'follow_goal_description' | 'follow_project_error' | 'follow_project_errorGalaxia' | 'follow_goal_error' | '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' | 'learn_more_about_connecting_account' | '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' | 'owned_by_override' | 'preview_description' | 'preview_improved' | 'preview_modal' | 'preview_panel' | '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' | 'rovo_actions_explore' | 'unassigned' | 'unfollow' | 'unfollow_project_description' | 'unfollow_project_descriptionGalaxia' | 'unfollow_project' | 'unfollow_project_error' | 'unfollow_project_errorGalaxia' | 'unfollow_goal' | 'unfollow_goal_description' | 'unfollow_goal_error' | 'user_attributes' | 'view' | 'viewIn' | 'viewInProvider' | 'viewOriginal' | 'actions' | 'add_account' | 'cancel' | 'close' | 'connect_to' | 'connect_account_description' | 'retry' | 'save' | 'unlink_account' | RequestAccessMessageKey | 'related' | 'generic_error_message' | 'related_links_modal_error_title' | 'related_links_modal_error_description' | 'related_links_modal_unavailable_title' | 'related_links_modal_unavailable_description' | 'related_links_modal_title' | 'related_links_view_related_urls' | 'related_links_view_related_links' | 'related_links_found_in' | 'related_links_includes_links_to' | 'related_links_not_found' | 'join_to_viewIssueTermRefresh' | 'open_issue_in_jiraIssueTermRefresh' | 'request_access_to_viewIssueTermRefresh' | 'team_members_count' | 'status_change_permission_errorIssueTermRefresh' | 'connect_unauthorised_account_description_appify' | 'connect_unauthorised_account_description_no_provider_appify' | 'learn_more_about_connecting_account_experiment_shorter' | 'learn_more_about_connecting_account_appify' | 'rovo_summary_loading' | 'ai_disclaimer' | 'rovo_unauthorised_title' | 'rovo_unauthorised_title_no_provider' | 'rovo_unauthorised_feature_clear_link_names' | 'rovo_unauthorised_feature_understand_linked_docs' | 'rovo_unauthorised_feature_go_deeper_smart_suggestions' | 'rovo_unauthorised_connect_account' | 'rovo_unauthorised_not_now' | 'rovo_chat_action_section_header' | 'rovo_prompt_button_summarize_this' | 'rovo_prompt_button_ask_a_specific_question' | 'rovo_prompt_button_show_me_whats_relevant' | RovoChatActionMessageKey | 'pre_auth_block_social_proof_not_low' | 'pre_auth_block_social_proof_low';
4
+ export type MessageKey = 'assigned_to' | 'ai_summarize' | 'change_status' | 'ai_summarized_abbreviation' | 'ai_summarized_info' | 'ai_summarized_info_short' | 'ai_summary_error_generic_rebrand' | 'ai_summary_error_acceptable_use_violation' | 'ai_summary_error_hipaa_content_detected' | 'ai_summary_error_exceeding_context_length_error' | 'ai_summary_action_rebrand' | 'ai_summary_action_description' | 'ai_summary_action_description_rebrand' | 'automation_action_title' | 'automation_action_tooltip' | 'automation_action_icon_label' | 'automation_action_confluence_page_modal_title' | 'automation_action_confluence_page_modal_description' | 'copy_summary_action' | 'copy_summary_action_description' | 'copied_summary_action_description' | 'beta' | 'cannot_find_link' | 'compass_applied_components_count' | 'connect_link_account_card' | 'connect_link_account_card_name' | 'connect_link_account_card_description' | 'connect_link_account_success_flag_description' | 'connect_link_account_success_flag_title' | 'connect_link_account_success_flag_title_default' | 'connect_unauthorised_account_action' | 'connect_3p_account' | 'connect_inline_provider_to_update' | 'connect_inline_social_proof' | 'connect_inline_to_update' | 'social_proof_inline_cta_tag_high_with_context' | 'social_proof_inline_cta_tag_high_no_context' | 'social_proof_inline_cta_tag_low_with_context' | 'social_proof_inline_cta_tag_low_no_context' | 'connect_unauthorised_account_description' | 'connect_unauthorised_account_description_no_provider' | 'continue' | 'copy_url_to_clipboard' | 'copied_url_to_clipboard' | 'could_not_load_link' | 'download' | 'download_description' | 'download_file' | 'follow' | 'follow_project_description' | 'follow_project_descriptionGalaxia' | 'follow_project' | 'follow_goal' | 'follow_goal_description' | 'follow_project_error' | 'follow_project_errorGalaxia' | 'follow_goal_error' | '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' | 'learn_more_about_connecting_account' | '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' | 'owned_by_override' | 'preview_description' | 'preview_improved' | 'preview_with_title' | 'preview_modal' | 'preview_modal_with_title' | 'preview_panel' | 'preview_panel_with_title' | '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' | 'rovo_actions_explore' | 'unassigned' | 'unfollow' | 'unfollow_project_description' | 'unfollow_project_descriptionGalaxia' | 'unfollow_project' | 'unfollow_project_error' | 'unfollow_project_errorGalaxia' | 'unfollow_goal' | 'unfollow_goal_description' | 'unfollow_goal_error' | 'user_attributes' | 'view' | 'viewIn' | 'viewInProvider' | 'viewOriginal' | 'actions' | 'add_account' | 'cancel' | 'close' | 'connect_to' | 'connect_account_description' | 'retry' | 'save' | 'unlink_account' | RequestAccessMessageKey | 'related' | 'generic_error_message' | 'related_links_modal_error_title' | 'related_links_modal_error_description' | 'related_links_modal_unavailable_title' | 'related_links_modal_unavailable_description' | 'related_links_modal_title' | 'related_links_view_related_urls' | 'related_links_view_related_links' | 'related_links_found_in' | 'related_links_includes_links_to' | 'related_links_not_found' | 'join_to_viewIssueTermRefresh' | 'open_issue_in_jiraIssueTermRefresh' | 'request_access_to_viewIssueTermRefresh' | 'team_members_count' | 'status_change_permission_errorIssueTermRefresh' | 'connect_unauthorised_account_description_appify' | 'connect_unauthorised_account_description_no_provider_appify' | 'learn_more_about_connecting_account_experiment_shorter' | 'learn_more_about_connecting_account_appify' | 'rovo_summary_loading' | 'ai_disclaimer' | 'rovo_unauthorised_title' | 'rovo_unauthorised_title_no_provider' | 'rovo_unauthorised_feature_clear_link_names' | 'rovo_unauthorised_feature_understand_linked_docs' | 'rovo_unauthorised_feature_go_deeper_smart_suggestions' | 'rovo_unauthorised_connect_account' | 'rovo_unauthorised_not_now' | 'rovo_chat_action_section_header' | 'rovo_prompt_button_summarize_this' | 'rovo_prompt_button_ask_a_specific_question' | 'rovo_prompt_button_show_me_whats_relevant' | RovoChatActionMessageKey | 'pre_auth_block_social_proof_not_low' | 'pre_auth_block_social_proof_low';
5
5
  type Messages = {
6
6
  [K in MessageKey]: MessageDescriptor;
7
7
  };