@atlaskit/smart-card 46.10.2 → 46.10.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/analytics.spec.yaml +2 -39
- package/compass.yml +3 -0
- package/dist/cjs/messages.js +15 -45
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/view/EmbedCard/views/unauthorized-view/index.js +1 -9
- package/dist/cjs/view/FlexibleCard/components/actions/action/action-button/index.js +14 -5
- package/dist/cjs/view/FlexibleCard/components/actions/action/action-dropdown-item/index.js +4 -1
- package/dist/cjs/view/FlexibleCard/components/actions/action/index.js +1 -0
- package/dist/cjs/view/FlexibleCard/components/actions/preview-action/index.js +13 -2
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/es2019/messages.js +15 -57
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/view/EmbedCard/views/unauthorized-view/index.js +1 -9
- package/dist/es2019/view/FlexibleCard/components/actions/action/action-button/index.js +12 -5
- package/dist/es2019/view/FlexibleCard/components/actions/action/action-dropdown-item/index.js +3 -0
- package/dist/es2019/view/FlexibleCard/components/actions/action/index.js +1 -0
- package/dist/es2019/view/FlexibleCard/components/actions/preview-action/index.js +13 -2
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/esm/messages.js +15 -45
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/view/EmbedCard/views/unauthorized-view/index.js +1 -9
- package/dist/esm/view/FlexibleCard/components/actions/action/action-button/index.js +14 -5
- package/dist/esm/view/FlexibleCard/components/actions/action/action-dropdown-item/index.js +4 -1
- package/dist/esm/view/FlexibleCard/components/actions/action/index.js +1 -0
- package/dist/esm/view/FlexibleCard/components/actions/preview-action/index.js +13 -2
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/types/common/analytics/generated/analytics.types.d.ts +1 -17
- package/dist/types/messages.d.ts +1 -1
- package/dist/types/view/EmbedCard/views/unauthorized-view/index.d.ts +2 -2
- package/dist/types/view/FlexibleCard/components/actions/action/action-dropdown-item/index.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/actions/action/action-dropdown-item/types.d.ts +1 -0
- package/package.json +5 -5
- package/dist/cjs/__tests__/vr-tests/__snapshots__/embed-card/embed-card-unauthorized-carousel-dropbox-in-atlas-slide1--default.png +0 -3
- package/dist/cjs/__tests__/vr-tests/__snapshots__/embed-card/embed-card-unauthorized-carousel-figma-in-trello-slide1--default.png +0 -3
- package/dist/cjs/__tests__/vr-tests/__snapshots__/embed-card/embed-card-unauthorized-carousel-figma-in-trello-slide2--default.png +0 -3
- package/dist/cjs/__tests__/vr-tests/__snapshots__/embed-card/embed-card-unauthorized-carousel-figma-in-trello-slide3--default.png +0 -3
- package/dist/cjs/__tests__/vr-tests/__snapshots__/embed-card/embed-card-unauthorized-carousel-google-in-confluence-slide1--default.png +0 -3
- package/dist/cjs/__tests__/vr-tests/__snapshots__/embed-card/embed-card-unauthorized-carousel-google-in-confluence-slide2--default.png +0 -3
- package/dist/cjs/__tests__/vr-tests/__snapshots__/embed-card/embed-card-unauthorized-carousel-google-in-confluence-slide3--default.png +0 -3
- package/dist/cjs/view/EmbedCard/components/carousel/CarouselSlide.compiled.css +0 -64
- package/dist/cjs/view/EmbedCard/components/carousel/CarouselSlide.js +0 -158
- package/dist/cjs/view/EmbedCard/components/carousel/index.compiled.css +0 -12
- package/dist/cjs/view/EmbedCard/components/carousel/index.js +0 -127
- package/dist/cjs/view/EmbedCard/components/carousel/types.js +0 -5
- package/dist/cjs/view/EmbedCard/views/unauthorized-view/UnauthorizedCarouselView.js +0 -207
- package/dist/cjs/view/EmbedCard/views/unauthorized-view/carousel-images/IconSlot.compiled.css +0 -7
- package/dist/cjs/view/EmbedCard/views/unauthorized-view/carousel-images/IconSlot.js +0 -31
- package/dist/cjs/view/EmbedCard/views/unauthorized-view/carousel-images/LazyRovoChatBenefitImage.js +0 -16
- package/dist/cjs/view/EmbedCard/views/unauthorized-view/carousel-images/LazyRovoSearchBenefitImage.js +0 -16
- package/dist/cjs/view/EmbedCard/views/unauthorized-view/carousel-images/NoAuthAvailableImage.compiled.css +0 -6
- package/dist/cjs/view/EmbedCard/views/unauthorized-view/carousel-images/NoAuthAvailableImage.js +0 -22
- package/dist/cjs/view/EmbedCard/views/unauthorized-view/carousel-images/ProductIcon.js +0 -47
- package/dist/cjs/view/EmbedCard/views/unauthorized-view/carousel-images/RovoChatBenefitImage.js +0 -359
- package/dist/cjs/view/EmbedCard/views/unauthorized-view/carousel-images/RovoSearchBenefitImage.js +0 -281
- package/dist/cjs/view/EmbedCard/views/unauthorized-view/carousel-images/SmartLinkBenefitImage.js +0 -364
- package/dist/cjs/view/EmbedCard/views/unauthorized-view/carousel-images/assets/rovo-chat-avatar.png +0 -0
- package/dist/es2019/__tests__/vr-tests/__snapshots__/embed-card/embed-card-unauthorized-carousel-dropbox-in-atlas-slide1--default.png +0 -3
- package/dist/es2019/__tests__/vr-tests/__snapshots__/embed-card/embed-card-unauthorized-carousel-figma-in-trello-slide1--default.png +0 -3
- package/dist/es2019/__tests__/vr-tests/__snapshots__/embed-card/embed-card-unauthorized-carousel-figma-in-trello-slide2--default.png +0 -3
- package/dist/es2019/__tests__/vr-tests/__snapshots__/embed-card/embed-card-unauthorized-carousel-figma-in-trello-slide3--default.png +0 -3
- package/dist/es2019/__tests__/vr-tests/__snapshots__/embed-card/embed-card-unauthorized-carousel-google-in-confluence-slide1--default.png +0 -3
- package/dist/es2019/__tests__/vr-tests/__snapshots__/embed-card/embed-card-unauthorized-carousel-google-in-confluence-slide2--default.png +0 -3
- package/dist/es2019/__tests__/vr-tests/__snapshots__/embed-card/embed-card-unauthorized-carousel-google-in-confluence-slide3--default.png +0 -3
- package/dist/es2019/view/EmbedCard/components/carousel/CarouselSlide.compiled.css +0 -64
- package/dist/es2019/view/EmbedCard/components/carousel/CarouselSlide.js +0 -145
- package/dist/es2019/view/EmbedCard/components/carousel/index.compiled.css +0 -12
- package/dist/es2019/view/EmbedCard/components/carousel/index.js +0 -105
- package/dist/es2019/view/EmbedCard/components/carousel/types.js +0 -1
- package/dist/es2019/view/EmbedCard/views/unauthorized-view/UnauthorizedCarouselView.js +0 -200
- package/dist/es2019/view/EmbedCard/views/unauthorized-view/carousel-images/IconSlot.compiled.css +0 -7
- package/dist/es2019/view/EmbedCard/views/unauthorized-view/carousel-images/IconSlot.js +0 -25
- package/dist/es2019/view/EmbedCard/views/unauthorized-view/carousel-images/LazyRovoChatBenefitImage.js +0 -3
- package/dist/es2019/view/EmbedCard/views/unauthorized-view/carousel-images/LazyRovoSearchBenefitImage.js +0 -3
- package/dist/es2019/view/EmbedCard/views/unauthorized-view/carousel-images/NoAuthAvailableImage.compiled.css +0 -6
- package/dist/es2019/view/EmbedCard/views/unauthorized-view/carousel-images/NoAuthAvailableImage.js +0 -13
- package/dist/es2019/view/EmbedCard/views/unauthorized-view/carousel-images/ProductIcon.js +0 -40
- package/dist/es2019/view/EmbedCard/views/unauthorized-view/carousel-images/RovoChatBenefitImage.js +0 -353
- package/dist/es2019/view/EmbedCard/views/unauthorized-view/carousel-images/RovoSearchBenefitImage.js +0 -269
- package/dist/es2019/view/EmbedCard/views/unauthorized-view/carousel-images/SmartLinkBenefitImage.js +0 -358
- package/dist/es2019/view/EmbedCard/views/unauthorized-view/carousel-images/assets/rovo-chat-avatar.png +0 -0
- package/dist/esm/__tests__/vr-tests/__snapshots__/embed-card/embed-card-unauthorized-carousel-dropbox-in-atlas-slide1--default.png +0 -3
- package/dist/esm/__tests__/vr-tests/__snapshots__/embed-card/embed-card-unauthorized-carousel-figma-in-trello-slide1--default.png +0 -3
- package/dist/esm/__tests__/vr-tests/__snapshots__/embed-card/embed-card-unauthorized-carousel-figma-in-trello-slide2--default.png +0 -3
- package/dist/esm/__tests__/vr-tests/__snapshots__/embed-card/embed-card-unauthorized-carousel-figma-in-trello-slide3--default.png +0 -3
- package/dist/esm/__tests__/vr-tests/__snapshots__/embed-card/embed-card-unauthorized-carousel-google-in-confluence-slide1--default.png +0 -3
- package/dist/esm/__tests__/vr-tests/__snapshots__/embed-card/embed-card-unauthorized-carousel-google-in-confluence-slide2--default.png +0 -3
- package/dist/esm/__tests__/vr-tests/__snapshots__/embed-card/embed-card-unauthorized-carousel-google-in-confluence-slide3--default.png +0 -3
- package/dist/esm/view/EmbedCard/components/carousel/CarouselSlide.compiled.css +0 -64
- package/dist/esm/view/EmbedCard/components/carousel/CarouselSlide.js +0 -149
- package/dist/esm/view/EmbedCard/components/carousel/index.compiled.css +0 -12
- package/dist/esm/view/EmbedCard/components/carousel/index.js +0 -118
- package/dist/esm/view/EmbedCard/components/carousel/types.js +0 -1
- package/dist/esm/view/EmbedCard/views/unauthorized-view/UnauthorizedCarouselView.js +0 -198
- package/dist/esm/view/EmbedCard/views/unauthorized-view/carousel-images/IconSlot.compiled.css +0 -7
- package/dist/esm/view/EmbedCard/views/unauthorized-view/carousel-images/IconSlot.js +0 -24
- package/dist/esm/view/EmbedCard/views/unauthorized-view/carousel-images/LazyRovoChatBenefitImage.js +0 -5
- package/dist/esm/view/EmbedCard/views/unauthorized-view/carousel-images/LazyRovoSearchBenefitImage.js +0 -5
- package/dist/esm/view/EmbedCard/views/unauthorized-view/carousel-images/NoAuthAvailableImage.compiled.css +0 -6
- package/dist/esm/view/EmbedCard/views/unauthorized-view/carousel-images/NoAuthAvailableImage.js +0 -15
- package/dist/esm/view/EmbedCard/views/unauthorized-view/carousel-images/ProductIcon.js +0 -40
- package/dist/esm/view/EmbedCard/views/unauthorized-view/carousel-images/RovoChatBenefitImage.js +0 -352
- package/dist/esm/view/EmbedCard/views/unauthorized-view/carousel-images/RovoSearchBenefitImage.js +0 -274
- package/dist/esm/view/EmbedCard/views/unauthorized-view/carousel-images/SmartLinkBenefitImage.js +0 -357
- package/dist/esm/view/EmbedCard/views/unauthorized-view/carousel-images/assets/rovo-chat-avatar.png +0 -0
- package/dist/types/view/EmbedCard/components/carousel/CarouselSlide.d.ts +0 -39
- package/dist/types/view/EmbedCard/components/carousel/index.d.ts +0 -26
- package/dist/types/view/EmbedCard/components/carousel/types.d.ts +0 -32
- package/dist/types/view/EmbedCard/views/unauthorized-view/UnauthorizedCarouselView.d.ts +0 -4
- package/dist/types/view/EmbedCard/views/unauthorized-view/carousel-images/IconSlot.d.ts +0 -14
- package/dist/types/view/EmbedCard/views/unauthorized-view/carousel-images/LazyRovoChatBenefitImage.d.ts +0 -3
- package/dist/types/view/EmbedCard/views/unauthorized-view/carousel-images/LazyRovoSearchBenefitImage.d.ts +0 -3
- package/dist/types/view/EmbedCard/views/unauthorized-view/carousel-images/NoAuthAvailableImage.d.ts +0 -7
- package/dist/types/view/EmbedCard/views/unauthorized-view/carousel-images/ProductIcon.d.ts +0 -9
- package/dist/types/view/EmbedCard/views/unauthorized-view/carousel-images/RovoChatBenefitImage.d.ts +0 -8
- package/dist/types/view/EmbedCard/views/unauthorized-view/carousel-images/RovoSearchBenefitImage.d.ts +0 -8
- package/dist/types/view/EmbedCard/views/unauthorized-view/carousel-images/SmartLinkBenefitImage.d.ts +0 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/smart-card
|
|
2
2
|
|
|
3
|
+
## 46.10.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`8b154e90bc483`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/8b154e90bc483) -
|
|
8
|
+
Cleanup experiment `platform_sl_embed_preauth_teaser_exp` and retain the standard Embed Card
|
|
9
|
+
unauthorized view.
|
|
10
|
+
- [`5dbf2faf3ad04`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/5dbf2faf3ad04) -
|
|
11
|
+
Adds the resource title to Smart Link preview action accessible names across button and dropdown
|
|
12
|
+
presentations, behind platform_smart_link_preview_a11y_label.
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
|
|
3
15
|
## 46.10.2
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/analytics.spec.yaml
CHANGED
|
@@ -325,8 +325,8 @@ events:
|
|
|
325
325
|
- modal opened (preAuthValueProposition):
|
|
326
326
|
type: ui
|
|
327
327
|
description: >
|
|
328
|
-
Fired when the pre-auth value proposition modal is shown after an eligible
|
|
329
|
-
|
|
328
|
+
Fired when the pre-auth value proposition modal is shown after an eligible unauthorized
|
|
329
|
+
Smart Link is created or converted.
|
|
330
330
|
attributes:
|
|
331
331
|
<<: [*PackageMetaDataContext, *CommonContext]
|
|
332
332
|
|
|
@@ -782,43 +782,6 @@ events:
|
|
|
782
782
|
required: false
|
|
783
783
|
type: string
|
|
784
784
|
description: The definitionId of the Smart Link resolver invoked.
|
|
785
|
-
- button clicked (carouselNext):
|
|
786
|
-
type: ui
|
|
787
|
-
description: >
|
|
788
|
-
Fires when a user clicks the "See next" button in a smart link carousel view. Used to
|
|
789
|
-
measure engagement depth — how many users navigate past the first benefit slide.
|
|
790
|
-
attributes:
|
|
791
|
-
<<: [*PackageMetaDataContext, *CommonContext]
|
|
792
|
-
display:
|
|
793
|
-
required: true
|
|
794
|
-
type: ['inline', 'block', 'embed', 'embedPreview', 'flexible', 'hoverCardPreview', 'url']
|
|
795
|
-
description: The card display type from which the carousel is rendered.
|
|
796
|
-
slideId:
|
|
797
|
-
required: true
|
|
798
|
-
type: string
|
|
799
|
-
description: >
|
|
800
|
-
Stable semantic identifier for the slide (e.g. 'smart-link-benefit',
|
|
801
|
-
'rovo-search-benefit'). Used instead of slideIndex so analytics remain accurate if slide
|
|
802
|
-
order changes.
|
|
803
|
-
- button clicked (carouselConnect):
|
|
804
|
-
type: ui
|
|
805
|
-
description: >
|
|
806
|
-
Fires when a user clicks the connect account button from within a smart link carousel view.
|
|
807
|
-
Captures which benefit slide the user was viewing when they decided to connect, enabling
|
|
808
|
-
measurement of which slide is most persuasive.
|
|
809
|
-
attributes:
|
|
810
|
-
<<: [*PackageMetaDataContext, *CommonContext]
|
|
811
|
-
display:
|
|
812
|
-
required: true
|
|
813
|
-
type: ['inline', 'block', 'embed', 'embedPreview', 'flexible', 'hoverCardPreview', 'url']
|
|
814
|
-
description: The card display type from which the carousel is rendered.
|
|
815
|
-
slideId:
|
|
816
|
-
required: true
|
|
817
|
-
type: string
|
|
818
|
-
description: >
|
|
819
|
-
Stable semantic identifier for the slide (e.g. 'smart-link-benefit',
|
|
820
|
-
'rovo-search-benefit'). Used instead of slideIndex so analytics remain accurate if slide
|
|
821
|
-
order changes.
|
|
822
785
|
- smartLink clicked (tryAnotherAccount):
|
|
823
786
|
type: ui
|
|
824
787
|
description:
|
package/compass.yml
CHANGED
package/dist/cjs/messages.js
CHANGED
|
@@ -166,51 +166,6 @@ var messages = exports.messages = (0, _reactIntl.defineMessages)({
|
|
|
166
166
|
defaultMessage: 'To show a preview of this link, connect your {context} account.',
|
|
167
167
|
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.'
|
|
168
168
|
},
|
|
169
|
-
connect_link_account_embed_carousel_dot_label: {
|
|
170
|
-
id: 'fabric.linking.connect_link_account_embed_carousel_dot_label.non-final',
|
|
171
|
-
defaultMessage: 'Go to slide {index} of {total}',
|
|
172
|
-
description: 'Accessible label for a dot indicator button in the teaser carousel, describing which slide it navigates to'
|
|
173
|
-
},
|
|
174
|
-
connect_link_account_embed_carousel_dot_row_label: {
|
|
175
|
-
id: 'fabric.linking.connect_link_account_embed_carousel_dot_row_label.non-final',
|
|
176
|
-
defaultMessage: 'Slides',
|
|
177
|
-
description: 'Accessible label for the group of dot indicator buttons in the teaser carousel'
|
|
178
|
-
},
|
|
179
|
-
connect_link_account_embed_carousel_button_next: {
|
|
180
|
-
id: 'fabric.linking.connect_link_account_embed_carousel_button_next.non-final',
|
|
181
|
-
defaultMessage: 'Next',
|
|
182
|
-
description: 'A button to view next teaser on benefit of connecting account on Smart Link embed'
|
|
183
|
-
},
|
|
184
|
-
connect_link_account_embed_carousel_sl_description: {
|
|
185
|
-
id: 'fabric.linking.connect_link_account_embed_carousel_sl_description.non-final',
|
|
186
|
-
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}}.",
|
|
187
|
-
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.'
|
|
188
|
-
},
|
|
189
|
-
connect_link_account_embed_carousel_sl_title: {
|
|
190
|
-
id: 'fabric.linking.connect_link_account_embed_carousel_sl_title.non-final',
|
|
191
|
-
defaultMessage: 'Turn smart links into rich previews',
|
|
192
|
-
description: 'A title on a teaser slide 1 on benefit of connecting account on Smart Link embed'
|
|
193
|
-
},
|
|
194
|
-
connect_link_account_embed_carousel_rovo_title: {
|
|
195
|
-
id: 'fabric.linking.connect_link_account_embed_carousel_rovo_title.non-final',
|
|
196
|
-
defaultMessage: 'Find everything in one search',
|
|
197
|
-
description: 'A title on a teaser slide 2 on benefit of connecting account on Smart Link embed'
|
|
198
|
-
},
|
|
199
|
-
connect_link_account_embed_carousel_rovo_description: {
|
|
200
|
-
id: 'fabric.linking.connect_link_account_embed_carousel_rovo_description.non-final',
|
|
201
|
-
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.",
|
|
202
|
-
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."
|
|
203
|
-
},
|
|
204
|
-
connect_link_account_embed_carousel_rovochat_title: {
|
|
205
|
-
id: 'fabric.linking.connect_link_account_embed_carousel_rovochat_title.non-final',
|
|
206
|
-
defaultMessage: 'Get help from Rovo',
|
|
207
|
-
description: 'A title on a teaser slide 3 on benefit of connecting account on Smart Link embed'
|
|
208
|
-
},
|
|
209
|
-
connect_link_account_embed_carousel_rovochat_description: {
|
|
210
|
-
id: 'fabric.linking.connect_link_account_embed_carousel_rovochat_description.non-final',
|
|
211
|
-
defaultMessage: 'Rovo uses your {context} content to answer questions, summarise docs, and draft updates using the work you’ve already done.',
|
|
212
|
-
description: 'A description on a teaser slide 3 on benefit of connecting account on Smart Link embed'
|
|
213
|
-
},
|
|
214
169
|
connect_link_account_success_flag_description: {
|
|
215
170
|
id: 'fabric.linking.connect_link_account_success_flag_description',
|
|
216
171
|
defaultMessage: 'Shared links now display rich previews.',
|
|
@@ -491,16 +446,31 @@ var messages = exports.messages = (0, _reactIntl.defineMessages)({
|
|
|
491
446
|
defaultMessage: 'Open preview',
|
|
492
447
|
description: 'Click to view a richer view of your content, without needing to navigate to it.'
|
|
493
448
|
},
|
|
449
|
+
preview_with_title: {
|
|
450
|
+
id: 'smart-card.preview_with_title.ai-non-final',
|
|
451
|
+
defaultMessage: 'Open preview for {title}',
|
|
452
|
+
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.'
|
|
453
|
+
},
|
|
494
454
|
preview_modal: {
|
|
495
455
|
id: 'fabric.linking.preview_modal',
|
|
496
456
|
defaultMessage: 'Open preview modal',
|
|
497
457
|
description: 'Button used to view a modal view of your content without needing to navigate to it.'
|
|
498
458
|
},
|
|
459
|
+
preview_modal_with_title: {
|
|
460
|
+
id: 'smart-card.preview_modal_with_title.ai-non-final',
|
|
461
|
+
defaultMessage: 'Open preview modal for {title}',
|
|
462
|
+
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.'
|
|
463
|
+
},
|
|
499
464
|
preview_panel: {
|
|
500
465
|
id: 'fabric.linking.preview_panel',
|
|
501
466
|
defaultMessage: 'Open preview panel',
|
|
502
467
|
description: 'Button used to view a side panel view of your content without needing to navigate to it.'
|
|
503
468
|
},
|
|
469
|
+
preview_panel_with_title: {
|
|
470
|
+
id: 'smart-card.preview_panel_with_title.ai-non-final',
|
|
471
|
+
defaultMessage: 'Open preview panel for {title}',
|
|
472
|
+
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.'
|
|
473
|
+
},
|
|
504
474
|
preview_close: {
|
|
505
475
|
id: 'fabric.linking.preview_close',
|
|
506
476
|
defaultMessage: 'Close preview',
|
|
@@ -25,7 +25,7 @@ var ANALYTICS_CHANNEL = exports.ANALYTICS_CHANNEL = 'media';
|
|
|
25
25
|
var context = exports.context = {
|
|
26
26
|
componentName: 'smart-cards',
|
|
27
27
|
packageName: "@atlaskit/smart-card" || '',
|
|
28
|
-
packageVersion: "46.10.
|
|
28
|
+
packageVersion: "46.10.2" || ''
|
|
29
29
|
};
|
|
30
30
|
var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
31
31
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -11,13 +11,11 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/h
|
|
|
11
11
|
var _react = _interopRequireWildcard(require("react"));
|
|
12
12
|
var _reactIntl = require("react-intl");
|
|
13
13
|
var _button = _interopRequireDefault(require("@atlaskit/button/default/button"));
|
|
14
|
-
var _featureGates = _interopRequireDefault(require("@atlaskit/feature-gate-js-client/feature-gates"));
|
|
15
14
|
var _useAnalyticsEvents2 = require("../../../../common/analytics/generated/use-analytics-events");
|
|
16
15
|
var _messages = require("../../../../messages");
|
|
17
16
|
var _UnauthorisedViewContent = _interopRequireDefault(require("../../../common/UnauthorisedViewContent"));
|
|
18
17
|
var _unresolvedView = _interopRequireDefault(require("../unresolved-view"));
|
|
19
18
|
var _unauthorizedSvg = require("./unauthorized-svg");
|
|
20
|
-
var _UnauthorizedCarouselView = _interopRequireDefault(require("./UnauthorizedCarouselView"));
|
|
21
19
|
var _excluded = ["context", "extensionKey", "isProductIntegrationSupported", "onAuthorize", "testId"];
|
|
22
20
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
23
21
|
var UnauthorizedView = function UnauthorizedView(_ref) {
|
|
@@ -100,10 +98,4 @@ var UnauthorizedView = function UnauthorizedView(_ref) {
|
|
|
100
98
|
text: context === null || context === void 0 ? void 0 : context.text
|
|
101
99
|
}));
|
|
102
100
|
};
|
|
103
|
-
var
|
|
104
|
-
if (_featureGates.default.initializeCompleted() && _featureGates.default.getExperimentValue('platform_sl_embed_preauth_teaser_exp', 'isEnabled', false)) {
|
|
105
|
-
return /*#__PURE__*/_react.default.createElement(_UnauthorizedCarouselView.default, props);
|
|
106
|
-
}
|
|
107
|
-
return /*#__PURE__*/_react.default.createElement(UnauthorizedView, props);
|
|
108
|
-
};
|
|
109
|
-
var _default = exports.default = UnauthorizedViewGated;
|
|
101
|
+
var _default = exports.default = UnauthorizedView;
|
|
@@ -9,6 +9,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
9
9
|
exports.default = void 0;
|
|
10
10
|
require("./index.compiled.css");
|
|
11
11
|
var _runtime = require("@compiled/react/runtime");
|
|
12
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
12
13
|
var _react = _interopRequireWildcard(require("react"));
|
|
13
14
|
var _react2 = require("@compiled/react");
|
|
14
15
|
var _button = _interopRequireDefault(require("@atlaskit/button/default/button"));
|
|
@@ -16,6 +17,7 @@ var _button2 = _interopRequireDefault(require("@atlaskit/button/icon/button"));
|
|
|
16
17
|
var _link = _interopRequireDefault(require("@atlaskit/button/icon/link"));
|
|
17
18
|
var _link2 = _interopRequireDefault(require("@atlaskit/button/link"));
|
|
18
19
|
var _loadingButton = _interopRequireDefault(require("@atlaskit/button/loading-button"));
|
|
20
|
+
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
19
21
|
var _box = require("@atlaskit/primitives/compiled/box");
|
|
20
22
|
var _Tooltip = _interopRequireDefault(require("@atlaskit/tooltip/Tooltip"));
|
|
21
23
|
var _constants = require("../../../../../../constants");
|
|
@@ -25,6 +27,8 @@ var _useRovoConfig2 = _interopRequireDefault(require("../../../../../../state/ho
|
|
|
25
27
|
var _withOverrideCss = require("../../../common/with-override-css");
|
|
26
28
|
var _utils = require("../../../utils");
|
|
27
29
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
30
|
+
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; }
|
|
31
|
+
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) { (0, _defineProperty2.default)(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; }
|
|
28
32
|
var IconOnlyLarge = null;
|
|
29
33
|
var SizeSmall = null;
|
|
30
34
|
var styles = {
|
|
@@ -69,6 +73,7 @@ var ActionButtonRefresh = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, re
|
|
|
69
73
|
href = _ref.href,
|
|
70
74
|
ariaLabel = _ref.ariaLabel;
|
|
71
75
|
var iconOnly = !content;
|
|
76
|
+
var isPreviewA11yLabelEnabled = (0, _fg.fg)('platform_smart_link_preview_a11y_label');
|
|
72
77
|
var context = (0, _useFlexibleUiContext.useFlexibleUiContext)();
|
|
73
78
|
var _useRovoConfig = (0, _useRovoConfig2.default)(),
|
|
74
79
|
product = _useRovoConfig.product;
|
|
@@ -87,6 +92,10 @@ var ActionButtonRefresh = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, re
|
|
|
87
92
|
return icon;
|
|
88
93
|
} : undefined;
|
|
89
94
|
if (iconOnly && iconFn) {
|
|
95
|
+
var label = isPreviewA11yLabelEnabled ? ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : tooltipMessage : tooltipMessage;
|
|
96
|
+
var tooltip = isPreviewA11yLabelEnabled ? _objectSpread(_objectSpread({}, tooltipOptions), {}, {
|
|
97
|
+
content: tooltipMessage
|
|
98
|
+
}) : tooltipOptions;
|
|
90
99
|
if (isLinkButton && iconFn) {
|
|
91
100
|
return /*#__PURE__*/_react.default.createElement(_link.default, {
|
|
92
101
|
appearance: IconButtonAppearanceMap[appearance],
|
|
@@ -94,11 +103,11 @@ var ActionButtonRefresh = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, re
|
|
|
94
103
|
href: href,
|
|
95
104
|
isDisabled: isDisabled,
|
|
96
105
|
isTooltipDisabled: false,
|
|
97
|
-
label:
|
|
106
|
+
label: label,
|
|
98
107
|
onClick: onButtonClick(onClick),
|
|
99
108
|
spacing: spacing,
|
|
100
109
|
testId: testId,
|
|
101
|
-
tooltip:
|
|
110
|
+
tooltip: tooltip
|
|
102
111
|
});
|
|
103
112
|
}
|
|
104
113
|
return /*#__PURE__*/_react.default.createElement(_button2.default, {
|
|
@@ -107,11 +116,11 @@ var ActionButtonRefresh = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, re
|
|
|
107
116
|
isDisabled: isDisabled,
|
|
108
117
|
isLoading: isLoading,
|
|
109
118
|
isTooltipDisabled: false,
|
|
110
|
-
label:
|
|
119
|
+
label: label,
|
|
111
120
|
onClick: onButtonClick(onClick),
|
|
112
121
|
spacing: spacing,
|
|
113
122
|
testId: testId,
|
|
114
|
-
tooltip:
|
|
123
|
+
tooltip: tooltip
|
|
115
124
|
});
|
|
116
125
|
}
|
|
117
126
|
var iconBeforeFn = iconBefore ? function () {
|
|
@@ -152,7 +161,7 @@ var ActionButtonRefresh = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, re
|
|
|
152
161
|
spacing: spacing,
|
|
153
162
|
testId: testId
|
|
154
163
|
}, content));
|
|
155
|
-
}, [appearance, ariaLabel, content, href, iconAfter, iconBefore, iconOnly, isDisabled, isLoading, onButtonClick, onClick, size, testId, tooltipMessage]);
|
|
164
|
+
}, [appearance, ariaLabel, content, href, iconAfter, iconBefore, iconOnly, isDisabled, isLoading, isPreviewA11yLabelEnabled, onButtonClick, onClick, size, testId, tooltipMessage]);
|
|
156
165
|
return /*#__PURE__*/_react.default.createElement(_box.Box, {
|
|
157
166
|
testId: "".concat(testId, "-button-wrapper"),
|
|
158
167
|
ref: ref,
|
|
@@ -7,15 +7,18 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.default = void 0;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _dropdownMenuItem = _interopRequireDefault(require("@atlaskit/dropdown-menu/dropdown-menu-item"));
|
|
10
|
+
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
10
11
|
var _handleOnClick = require("../../../../../../utils/handle-on-click");
|
|
11
12
|
var ActionDropdownItem = function ActionDropdownItem(_ref) {
|
|
12
|
-
var
|
|
13
|
+
var ariaLabel = _ref.ariaLabel,
|
|
14
|
+
content = _ref.content,
|
|
13
15
|
iconAfter = _ref.iconAfter,
|
|
14
16
|
iconBefore = _ref.iconBefore,
|
|
15
17
|
isLoading = _ref.isLoading,
|
|
16
18
|
onClick = _ref.onClick,
|
|
17
19
|
testId = _ref.testId;
|
|
18
20
|
return /*#__PURE__*/_react.default.createElement(_dropdownMenuItem.default, {
|
|
21
|
+
"aria-label": (0, _fg.fg)('platform_smart_link_preview_a11y_label') ? ariaLabel : undefined,
|
|
19
22
|
elemAfter: iconAfter,
|
|
20
23
|
elemBefore: iconBefore,
|
|
21
24
|
isDisabled: isLoading,
|
|
@@ -12,6 +12,7 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
12
12
|
var _reactIntl = require("react-intl");
|
|
13
13
|
var _growDiagonal = _interopRequireDefault(require("@atlaskit/icon/core/grow-diagonal"));
|
|
14
14
|
var _panelRight = _interopRequireDefault(require("@atlaskit/icon/core/panel-right"));
|
|
15
|
+
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
15
16
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
16
17
|
var _constants = require("../../../../../constants");
|
|
17
18
|
var _messages = require("../../../../../messages");
|
|
@@ -21,7 +22,7 @@ var _action = _interopRequireDefault(require("../action"));
|
|
|
21
22
|
var _excluded = ["onClick"];
|
|
22
23
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
23
24
|
var PreviewAction = function PreviewAction(_ref) {
|
|
24
|
-
var _context$actions;
|
|
25
|
+
var _context$actions, _context$linkTitle;
|
|
25
26
|
var onClickCallback = _ref.onClick,
|
|
26
27
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
27
28
|
var intl = (0, _reactIntl.useIntl)();
|
|
@@ -66,8 +67,18 @@ var PreviewAction = function PreviewAction(_ref) {
|
|
|
66
67
|
return _messages.messages.preview_improved;
|
|
67
68
|
}, [hasPreviewPanel]);
|
|
68
69
|
var actionMessage = intl.formatMessage(actionLabel);
|
|
70
|
+
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();
|
|
71
|
+
var actionLabelWithTitle = _messages.messages.preview_with_title;
|
|
72
|
+
if (actionLabel === _messages.messages.preview_panel) {
|
|
73
|
+
actionLabelWithTitle = _messages.messages.preview_panel_with_title;
|
|
74
|
+
} else if (actionLabel === _messages.messages.preview_modal) {
|
|
75
|
+
actionLabelWithTitle = _messages.messages.preview_modal_with_title;
|
|
76
|
+
}
|
|
77
|
+
var ariaLabel = (0, _fg.fg)('platform_smart_link_preview_a11y_label') && title ? intl.formatMessage(actionLabelWithTitle, {
|
|
78
|
+
title: title
|
|
79
|
+
}) : actionMessage;
|
|
69
80
|
return data ? /*#__PURE__*/_react.default.createElement(_action.default, (0, _extends2.default)({
|
|
70
|
-
ariaLabel:
|
|
81
|
+
ariaLabel: ariaLabel,
|
|
71
82
|
content: actionMessage,
|
|
72
83
|
icon: actionIcon(),
|
|
73
84
|
onClick: onClick,
|
|
@@ -19,7 +19,7 @@ var _excluded = ["href", "children", "checkSafety", "onClick", "testId", "isLink
|
|
|
19
19
|
_excluded2 = ["isLinkSafe", "showSafetyWarningModal"];
|
|
20
20
|
var PACKAGE_DATA = {
|
|
21
21
|
packageName: "@atlaskit/smart-card",
|
|
22
|
-
packageVersion: "46.10.
|
|
22
|
+
packageVersion: "46.10.2",
|
|
23
23
|
componentName: 'linkUrl'
|
|
24
24
|
};
|
|
25
25
|
var LinkUrl = function LinkUrl(_ref) {
|
package/dist/es2019/messages.js
CHANGED
|
@@ -160,63 +160,6 @@ export const 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,
|
|
181
|
-
Google {Google Docs, Sheets, and Slides}
|
|
182
|
-
other {{context}}} {product, select,
|
|
183
|
-
BITBUCKET {right inside Bitbucket}
|
|
184
|
-
CONFLUENCE {right inside Confluence and Jira}
|
|
185
|
-
JIRA {right inside Confluence and Jira}
|
|
186
|
-
TRELLO {right inside Trello}
|
|
187
|
-
other {across Atlassian}}.`,
|
|
188
|
-
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.'
|
|
189
|
-
},
|
|
190
|
-
connect_link_account_embed_carousel_sl_title: {
|
|
191
|
-
id: 'fabric.linking.connect_link_account_embed_carousel_sl_title.non-final',
|
|
192
|
-
defaultMessage: 'Turn smart links into rich previews',
|
|
193
|
-
description: 'A title on a teaser slide 1 on benefit of connecting account on Smart Link embed'
|
|
194
|
-
},
|
|
195
|
-
connect_link_account_embed_carousel_rovo_title: {
|
|
196
|
-
id: 'fabric.linking.connect_link_account_embed_carousel_rovo_title.non-final',
|
|
197
|
-
defaultMessage: 'Find everything in one search',
|
|
198
|
-
description: 'A title on a teaser slide 2 on benefit of connecting account on Smart Link embed'
|
|
199
|
-
},
|
|
200
|
-
connect_link_account_embed_carousel_rovo_description: {
|
|
201
|
-
id: 'fabric.linking.connect_link_account_embed_carousel_rovo_description.non-final',
|
|
202
|
-
defaultMessage: `Access {context} files alongside your work in {product, select,
|
|
203
|
-
BITBUCKET {Bitbucket}
|
|
204
|
-
CONFLUENCE {Confluence and Jira}
|
|
205
|
-
JIRA {Confluence and Jira}
|
|
206
|
-
TRELLO {Trello}
|
|
207
|
-
other {Atlassian}}. We'll always respect your {context} permissions.`,
|
|
208
|
-
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."
|
|
209
|
-
},
|
|
210
|
-
connect_link_account_embed_carousel_rovochat_title: {
|
|
211
|
-
id: 'fabric.linking.connect_link_account_embed_carousel_rovochat_title.non-final',
|
|
212
|
-
defaultMessage: 'Get help from Rovo',
|
|
213
|
-
description: 'A title on a teaser slide 3 on benefit of connecting account on Smart Link embed'
|
|
214
|
-
},
|
|
215
|
-
connect_link_account_embed_carousel_rovochat_description: {
|
|
216
|
-
id: 'fabric.linking.connect_link_account_embed_carousel_rovochat_description.non-final',
|
|
217
|
-
defaultMessage: 'Rovo uses your {context} content to answer questions, summarise docs, and draft updates using the work you’ve already done.',
|
|
218
|
-
description: 'A description on a teaser slide 3 on benefit of connecting account on Smart Link embed'
|
|
219
|
-
},
|
|
220
163
|
connect_link_account_success_flag_description: {
|
|
221
164
|
id: 'fabric.linking.connect_link_account_success_flag_description',
|
|
222
165
|
defaultMessage: 'Shared links now display rich previews.',
|
|
@@ -497,16 +440,31 @@ export const messages = defineMessages({
|
|
|
497
440
|
defaultMessage: 'Open preview',
|
|
498
441
|
description: 'Click to view a richer view of your content, without needing to navigate to it.'
|
|
499
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
|
+
},
|
|
500
448
|
preview_modal: {
|
|
501
449
|
id: 'fabric.linking.preview_modal',
|
|
502
450
|
defaultMessage: 'Open preview modal',
|
|
503
451
|
description: 'Button used to view a modal view of your content without needing to navigate to it.'
|
|
504
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
|
+
},
|
|
505
458
|
preview_panel: {
|
|
506
459
|
id: 'fabric.linking.preview_panel',
|
|
507
460
|
defaultMessage: 'Open preview panel',
|
|
508
461
|
description: 'Button used to view a side panel view of your content without needing to navigate to it.'
|
|
509
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
|
+
},
|
|
510
468
|
preview_close: {
|
|
511
469
|
id: 'fabric.linking.preview_close',
|
|
512
470
|
defaultMessage: 'Close preview',
|
|
@@ -4,7 +4,7 @@ export const ANALYTICS_CHANNEL = 'media';
|
|
|
4
4
|
export const context = {
|
|
5
5
|
componentName: 'smart-cards',
|
|
6
6
|
packageName: "@atlaskit/smart-card" || '',
|
|
7
|
-
packageVersion: "46.10.
|
|
7
|
+
packageVersion: "46.10.2" || ''
|
|
8
8
|
};
|
|
9
9
|
export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
10
10
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -2,13 +2,11 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import React, { useCallback, useMemo } from 'react';
|
|
3
3
|
import { FormattedMessage } from 'react-intl';
|
|
4
4
|
import Button from '@atlaskit/button/default/button';
|
|
5
|
-
import FeatureGates from '@atlaskit/feature-gate-js-client/feature-gates';
|
|
6
5
|
import { useAnalyticsEvents } from '../../../../common/analytics/generated/use-analytics-events';
|
|
7
6
|
import { messages } from '../../../../messages';
|
|
8
7
|
import UnauthorisedViewContent from '../../../common/UnauthorisedViewContent';
|
|
9
8
|
import UnresolvedView from '../unresolved-view';
|
|
10
9
|
import { UnauthorizedSVG } from './unauthorized-svg';
|
|
11
|
-
import UnauthorizedCarouselView from './UnauthorizedCarouselView';
|
|
12
10
|
const UnauthorizedView = ({
|
|
13
11
|
context,
|
|
14
12
|
extensionKey,
|
|
@@ -90,10 +88,4 @@ const UnauthorizedView = ({
|
|
|
90
88
|
text: context === null || context === void 0 ? void 0 : context.text
|
|
91
89
|
}));
|
|
92
90
|
};
|
|
93
|
-
|
|
94
|
-
if (FeatureGates.initializeCompleted() && FeatureGates.getExperimentValue('platform_sl_embed_preauth_teaser_exp', 'isEnabled', false)) {
|
|
95
|
-
return /*#__PURE__*/React.createElement(UnauthorizedCarouselView, props);
|
|
96
|
-
}
|
|
97
|
-
return /*#__PURE__*/React.createElement(UnauthorizedView, props);
|
|
98
|
-
};
|
|
99
|
-
export default UnauthorizedViewGated;
|
|
91
|
+
export default UnauthorizedView;
|
|
@@ -8,6 +8,7 @@ import IconButton from '@atlaskit/button/icon/button';
|
|
|
8
8
|
import LinkIconButton from '@atlaskit/button/icon/link';
|
|
9
9
|
import LinkButton from '@atlaskit/button/link';
|
|
10
10
|
import LoadingButton from '@atlaskit/button/loading-button';
|
|
11
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
11
12
|
import { Box } from '@atlaskit/primitives/compiled/box';
|
|
12
13
|
import Tooltip from '@atlaskit/tooltip/Tooltip';
|
|
13
14
|
import { ActionName, SmartLinkSize } from '../../../../../../constants';
|
|
@@ -60,6 +61,7 @@ const ActionButtonRefresh = /*#__PURE__*/forwardRef(({
|
|
|
60
61
|
}, ref) => {
|
|
61
62
|
var _context$actions;
|
|
62
63
|
const iconOnly = !content;
|
|
64
|
+
const isPreviewA11yLabelEnabled = fg('platform_smart_link_preview_a11y_label');
|
|
63
65
|
const context = useFlexibleUiContext();
|
|
64
66
|
const {
|
|
65
67
|
product
|
|
@@ -75,6 +77,11 @@ const ActionButtonRefresh = /*#__PURE__*/forwardRef(({
|
|
|
75
77
|
const icon = iconBefore || iconAfter;
|
|
76
78
|
const iconFn = icon ? () => icon : undefined;
|
|
77
79
|
if (iconOnly && iconFn) {
|
|
80
|
+
const label = isPreviewA11yLabelEnabled ? ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : tooltipMessage : tooltipMessage;
|
|
81
|
+
const tooltip = isPreviewA11yLabelEnabled ? {
|
|
82
|
+
...tooltipOptions,
|
|
83
|
+
content: tooltipMessage
|
|
84
|
+
} : tooltipOptions;
|
|
78
85
|
if (isLinkButton && iconFn) {
|
|
79
86
|
return /*#__PURE__*/React.createElement(LinkIconButton, {
|
|
80
87
|
appearance: IconButtonAppearanceMap[appearance],
|
|
@@ -82,11 +89,11 @@ const ActionButtonRefresh = /*#__PURE__*/forwardRef(({
|
|
|
82
89
|
href: href,
|
|
83
90
|
isDisabled: isDisabled,
|
|
84
91
|
isTooltipDisabled: false,
|
|
85
|
-
label:
|
|
92
|
+
label: label,
|
|
86
93
|
onClick: onButtonClick(onClick),
|
|
87
94
|
spacing: spacing,
|
|
88
95
|
testId: testId,
|
|
89
|
-
tooltip:
|
|
96
|
+
tooltip: tooltip
|
|
90
97
|
});
|
|
91
98
|
}
|
|
92
99
|
return /*#__PURE__*/React.createElement(IconButton, {
|
|
@@ -95,11 +102,11 @@ const ActionButtonRefresh = /*#__PURE__*/forwardRef(({
|
|
|
95
102
|
isDisabled: isDisabled,
|
|
96
103
|
isLoading: isLoading,
|
|
97
104
|
isTooltipDisabled: false,
|
|
98
|
-
label:
|
|
105
|
+
label: label,
|
|
99
106
|
onClick: onButtonClick(onClick),
|
|
100
107
|
spacing: spacing,
|
|
101
108
|
testId: testId,
|
|
102
|
-
tooltip:
|
|
109
|
+
tooltip: tooltip
|
|
103
110
|
});
|
|
104
111
|
}
|
|
105
112
|
const iconBeforeFn = iconBefore ? () => iconBefore : undefined;
|
|
@@ -136,7 +143,7 @@ const ActionButtonRefresh = /*#__PURE__*/forwardRef(({
|
|
|
136
143
|
spacing: spacing,
|
|
137
144
|
testId: testId
|
|
138
145
|
}, content));
|
|
139
|
-
}, [appearance, ariaLabel, content, href, iconAfter, iconBefore, iconOnly, isDisabled, isLoading, onButtonClick, onClick, size, testId, tooltipMessage]);
|
|
146
|
+
}, [appearance, ariaLabel, content, href, iconAfter, iconBefore, iconOnly, isDisabled, isLoading, isPreviewA11yLabelEnabled, onButtonClick, onClick, size, testId, tooltipMessage]);
|
|
140
147
|
return /*#__PURE__*/React.createElement(Box, {
|
|
141
148
|
testId: `${testId}-button-wrapper`,
|
|
142
149
|
ref: ref,
|
package/dist/es2019/view/FlexibleCard/components/actions/action/action-dropdown-item/index.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
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
|
const ActionDropdownItem = ({
|
|
6
|
+
ariaLabel,
|
|
5
7
|
content,
|
|
6
8
|
iconAfter,
|
|
7
9
|
iconBefore,
|
|
@@ -9,6 +11,7 @@ const ActionDropdownItem = ({
|
|
|
9
11
|
onClick,
|
|
10
12
|
testId
|
|
11
13
|
}) => /*#__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,
|
|
@@ -3,6 +3,7 @@ import React, { useCallback, useMemo } from 'react';
|
|
|
3
3
|
import { FormattedMessage, useIntl } from 'react-intl';
|
|
4
4
|
import MediaServicesActualSizeIcon from '@atlaskit/icon/core/grow-diagonal';
|
|
5
5
|
import PanelRightIcon from '@atlaskit/icon/core/panel-right';
|
|
6
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
6
7
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
7
8
|
import { ActionName } from '../../../../../constants';
|
|
8
9
|
import { messages } from '../../../../../messages';
|
|
@@ -13,7 +14,7 @@ const PreviewAction = ({
|
|
|
13
14
|
onClick: onClickCallback,
|
|
14
15
|
...props
|
|
15
16
|
}) => {
|
|
16
|
-
var _context$actions;
|
|
17
|
+
var _context$actions, _context$linkTitle, _context$linkTitle$te;
|
|
17
18
|
const intl = useIntl();
|
|
18
19
|
const context = useFlexibleUiContext();
|
|
19
20
|
const invoke = useInvokeClientAction({});
|
|
@@ -56,8 +57,18 @@ const PreviewAction = ({
|
|
|
56
57
|
return messages.preview_improved;
|
|
57
58
|
}, [hasPreviewPanel]);
|
|
58
59
|
const actionMessage = intl.formatMessage(actionLabel);
|
|
60
|
+
const title = context === null || context === void 0 ? void 0 : (_context$linkTitle = context.linkTitle) === null || _context$linkTitle === void 0 ? void 0 : (_context$linkTitle$te = _context$linkTitle.text) === null || _context$linkTitle$te === void 0 ? void 0 : _context$linkTitle$te.trim();
|
|
61
|
+
let actionLabelWithTitle = messages.preview_with_title;
|
|
62
|
+
if (actionLabel === messages.preview_panel) {
|
|
63
|
+
actionLabelWithTitle = messages.preview_panel_with_title;
|
|
64
|
+
} else if (actionLabel === messages.preview_modal) {
|
|
65
|
+
actionLabelWithTitle = messages.preview_modal_with_title;
|
|
66
|
+
}
|
|
67
|
+
const ariaLabel = fg('platform_smart_link_preview_a11y_label') && title ? intl.formatMessage(actionLabelWithTitle, {
|
|
68
|
+
title
|
|
69
|
+
}) : actionMessage;
|
|
59
70
|
return data ? /*#__PURE__*/React.createElement(Action, _extends({
|
|
60
|
-
ariaLabel:
|
|
71
|
+
ariaLabel: ariaLabel,
|
|
61
72
|
content: actionMessage,
|
|
62
73
|
icon: actionIcon(),
|
|
63
74
|
onClick: onClick,
|
|
@@ -9,7 +9,7 @@ import LinkWarningModal from './LinkWarningModal';
|
|
|
9
9
|
import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
|
|
10
10
|
const PACKAGE_DATA = {
|
|
11
11
|
packageName: "@atlaskit/smart-card",
|
|
12
|
-
packageVersion: "46.10.
|
|
12
|
+
packageVersion: "46.10.2",
|
|
13
13
|
componentName: 'linkUrl'
|
|
14
14
|
};
|
|
15
15
|
const LinkUrl = ({
|