@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.
- package/CHANGELOG.md +29 -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/utils/get-icon-for-file-type.js +14 -0
- package/dist/cjs/utils/lazy-component.js +81 -0
- package/dist/cjs/view/EmbedCard/views/ResolvedView.js +14 -2
- 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/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/header/main.js +1 -9
- package/dist/cjs/view/FlexibleCard/components/actions/follow-action/index.js +31 -1
- package/dist/cjs/view/FlexibleCard/components/actions/preview-action/index.js +13 -2
- package/dist/cjs/view/FlexibleCard/components/common/atlaskit-icon/index.js +23 -4
- 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/utils/get-icon-for-file-type.js +14 -0
- package/dist/es2019/utils/lazy-component.js +65 -0
- package/dist/es2019/view/EmbedCard/views/ResolvedView.js +10 -2
- 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/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/header/main.js +1 -10
- package/dist/es2019/view/FlexibleCard/components/actions/follow-action/index.js +21 -1
- package/dist/es2019/view/FlexibleCard/components/actions/preview-action/index.js +13 -2
- package/dist/es2019/view/FlexibleCard/components/common/atlaskit-icon/index.js +23 -4
- 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/utils/get-icon-for-file-type.js +14 -0
- package/dist/esm/utils/lazy-component.js +73 -0
- package/dist/esm/view/EmbedCard/views/ResolvedView.js +12 -2
- 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/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/header/main.js +1 -9
- package/dist/esm/view/FlexibleCard/components/actions/follow-action/index.js +27 -1
- package/dist/esm/view/FlexibleCard/components/actions/preview-action/index.js +13 -2
- package/dist/esm/view/FlexibleCard/components/common/atlaskit-icon/index.js +23 -4
- 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/utils/lazy-component.d.ts +36 -0
- 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 +9 -9
- 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__/automation-modal-header/smart-card-automation-modal-header-title--default--platform-dst-modal-dialog-use-modal-title-true.png +0 -3
- 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__/automation-modal-header/smart-card-automation-modal-header-title--default--platform-dst-modal-dialog-use-modal-title-false.png +0 -3
- 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
- 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/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
- /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
- /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
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,34 @@
|
|
|
1
1
|
# @atlaskit/smart-card
|
|
2
2
|
|
|
3
|
+
## 46.10.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`12b24838d8278`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/12b24838d8278) -
|
|
8
|
+
Replace react-loadable with React.lazy and Suspense for lazily loaded icons and the embed Rovo
|
|
9
|
+
actions footer, behind the feature gate platform_sl_replace_react_loadable, for React 19
|
|
10
|
+
compatibility. Loading and load-failure behaviour are unchanged: nothing renders while loading or
|
|
11
|
+
if the chunk fails to load.
|
|
12
|
+
|
|
13
|
+
Once the gate is fully rolled out, remove the react-loadable branches,
|
|
14
|
+
`components/importIcon.tsx`, the local `importIcon` in `get-icon-for-file-type.tsx`, the
|
|
15
|
+
`react-loadable` and `@types/react-loadable` dependencies, and the VR `ignoredErrors` entries for
|
|
16
|
+
react-loadable state update warnings.
|
|
17
|
+
|
|
18
|
+
- Updated dependencies
|
|
19
|
+
|
|
20
|
+
## 46.10.3
|
|
21
|
+
|
|
22
|
+
### Patch Changes
|
|
23
|
+
|
|
24
|
+
- [`8b154e90bc483`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/8b154e90bc483) -
|
|
25
|
+
Cleanup experiment `platform_sl_embed_preauth_teaser_exp` and retain the standard Embed Card
|
|
26
|
+
unauthorized view.
|
|
27
|
+
- [`5dbf2faf3ad04`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/5dbf2faf3ad04) -
|
|
28
|
+
Adds the resource title to Smart Link preview action accessible names across button and dropdown
|
|
29
|
+
presentations, behind platform_smart_link_preview_a11y_label.
|
|
30
|
+
- Updated dependencies
|
|
31
|
+
|
|
3
32
|
## 46.10.2
|
|
4
33
|
|
|
5
34
|
### 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.3" || ''
|
|
29
29
|
};
|
|
30
30
|
var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
31
31
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -8,8 +8,10 @@ exports.getIconForFileType = void 0;
|
|
|
8
8
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
9
9
|
var _react = _interopRequireDefault(require("react"));
|
|
10
10
|
var _reactLoadable = _interopRequireDefault(require("react-loadable"));
|
|
11
|
+
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
11
12
|
var _extractFileFormatIcon = _interopRequireDefault(require("../extractors/flexible/icon/extract-file-formatIcon"));
|
|
12
13
|
var _getLazyIcons = require("./get-lazy-icons");
|
|
14
|
+
var _lazyComponent = require("./lazy-component");
|
|
13
15
|
var getTypeToIconMap = function getTypeToIconMap(fileFormat) {
|
|
14
16
|
var _lazyIcons$iconDescri, _iconDescriptor$label;
|
|
15
17
|
var iconDescriptor = (0, _extractFileFormatIcon.default)(fileFormat);
|
|
@@ -32,6 +34,18 @@ var getIconForFileType = exports.getIconForFileType = function getIconForFileTyp
|
|
|
32
34
|
if (!importCb) {
|
|
33
35
|
return;
|
|
34
36
|
}
|
|
37
|
+
if ((0, _fg.fg)('platform_sl_replace_react_loadable')) {
|
|
38
|
+
var _extractFileFormatIco;
|
|
39
|
+
var iconType = (_extractFileFormatIco = (0, _extractFileFormatIcon.default)(fileMimeType.toLowerCase())) === null || _extractFileFormatIco === void 0 ? void 0 : _extractFileFormatIco.icon;
|
|
40
|
+
if (iconType) {
|
|
41
|
+
var LazyIcon = (0, _lazyComponent.getLazyIconComponent)("".concat(iconType, ":default"), importCb);
|
|
42
|
+
var lazyLabel = (showIconLabel !== null && showIconLabel !== void 0 ? showIconLabel : true) ? icon[1] || '' : '';
|
|
43
|
+
return /*#__PURE__*/_react.default.createElement(LazyIcon, {
|
|
44
|
+
testId: "document-file-format-icon",
|
|
45
|
+
label: lazyLabel
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
}
|
|
35
49
|
var Icon = (0, _reactLoadable.default)({
|
|
36
50
|
loader: function loader() {
|
|
37
51
|
return importCb().then(function (module) {
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.withSuspense = exports.renderNothingOnLoadError = exports.getLazyIconComponent = void 0;
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
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); }
|
|
10
|
+
var RenderNothing = function RenderNothing() {
|
|
11
|
+
return null;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* `.catch` handler for a lazy loader: renders nothing if the chunk fails to load, instead of
|
|
16
|
+
* throwing to the nearest error boundary (matches `react-loadable` with `loading: () => null`).
|
|
17
|
+
*
|
|
18
|
+
* @example lazy(() => import('./Foo').catch(renderNothingOnLoadError))
|
|
19
|
+
*/
|
|
20
|
+
var renderNothingOnLoadError = exports.renderNothingOnLoadError = function renderNothingOnLoadError() {
|
|
21
|
+
return {
|
|
22
|
+
// Typed as `never` so the fallback is assignable to whatever component type the loader
|
|
23
|
+
// resolves to, and `lazy()` keeps inferring that component's props.
|
|
24
|
+
default: RenderNothing
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Wraps a `React.lazy` component in its own `<Suspense fallback={null}>`, so it renders nothing
|
|
30
|
+
* while its chunk loads and never suspends (and blanks out) an ancestor such as the card itself.
|
|
31
|
+
*
|
|
32
|
+
* Call `lazy(() => import('...'))` inline at module scope and pass the result here, rather than
|
|
33
|
+
* passing a loader into a helper that calls `lazy()` for you. Product SSR tooling (e.g.
|
|
34
|
+
* Confluence's LoadableReactLazyBabelPlugin) only tracks and preloads `lazy()` calls whose loader
|
|
35
|
+
* reads no function parameters or other render-time values.
|
|
36
|
+
*/
|
|
37
|
+
var withSuspense = exports.withSuspense = function withSuspense(LazyComponent, displayName) {
|
|
38
|
+
// Typed loosely internally: TS cannot spread generic props onto a LazyExoticComponent.
|
|
39
|
+
// The returned component is still strictly typed as ComponentType<P>.
|
|
40
|
+
var Component = LazyComponent;
|
|
41
|
+
var LazyComponentWithSuspense = function LazyComponentWithSuspense(props) {
|
|
42
|
+
return /*#__PURE__*/_react.default.createElement(_react.Suspense, {
|
|
43
|
+
fallback: null
|
|
44
|
+
}, /*#__PURE__*/_react.default.createElement(Component, props));
|
|
45
|
+
};
|
|
46
|
+
if (displayName) {
|
|
47
|
+
LazyComponentWithSuspense.displayName = displayName;
|
|
48
|
+
}
|
|
49
|
+
return LazyComponentWithSuspense;
|
|
50
|
+
};
|
|
51
|
+
var lazyIconCache = new Map();
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Returns a lazily loaded icon component for a dynamic icon import.
|
|
55
|
+
*
|
|
56
|
+
* Callers resolve the icon on every render, so the component is cached by `cacheKey` to keep a
|
|
57
|
+
* stable component identity across renders (otherwise React would remount and re-suspend the
|
|
58
|
+
* icon on every render). The cache entry is dropped if the chunk fails to load, so the next
|
|
59
|
+
* render retries the import.
|
|
60
|
+
*
|
|
61
|
+
* Prefer an inline module-scope `lazy(() => import('...'))` with `withSuspense` where the set of
|
|
62
|
+
* components is known up front, so product SSR tooling can preload the chunks. This helper is a
|
|
63
|
+
* deliberate exception for open-ended icon sets (any Atlaskit icon / file type) that cannot be
|
|
64
|
+
* enumerated statically: its loader reads render-time values, so SSR tooling cannot preload it.
|
|
65
|
+
*
|
|
66
|
+
* @param cacheKey Must uniquely identify the module `importFn` resolves to.
|
|
67
|
+
*/
|
|
68
|
+
var getLazyIconComponent = exports.getLazyIconComponent = function getLazyIconComponent(cacheKey, importFn) {
|
|
69
|
+
var cached = lazyIconCache.get(cacheKey);
|
|
70
|
+
if (cached) {
|
|
71
|
+
return cached;
|
|
72
|
+
}
|
|
73
|
+
var LazyIcon = withSuspense( /*#__PURE__*/(0, _react.lazy)(function () {
|
|
74
|
+
return importFn().catch(function () {
|
|
75
|
+
lazyIconCache.delete(cacheKey);
|
|
76
|
+
return renderNothingOnLoadError();
|
|
77
|
+
});
|
|
78
|
+
}), "lazy(".concat(cacheKey, ")"));
|
|
79
|
+
lazyIconCache.set(cacheKey, LazyIcon);
|
|
80
|
+
return LazyIcon;
|
|
81
|
+
};
|
|
@@ -10,7 +10,7 @@ require("./ResolvedView.compiled.css");
|
|
|
10
10
|
var _runtime = require("@compiled/react/runtime");
|
|
11
11
|
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
12
12
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
13
|
-
var _react =
|
|
13
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
14
14
|
var _reactLoadable = _interopRequireDefault(require("react-loadable"));
|
|
15
15
|
var _link = _interopRequireDefault(require("@atlaskit/icon/core/link"));
|
|
16
16
|
var _useSmartLinkContext2 = require("@atlaskit/link-provider/use-smart-link-context");
|
|
@@ -24,6 +24,7 @@ var _useEmbedRovoActionsFooterExperiment = _interopRequireDefault(require("../..
|
|
|
24
24
|
var _useRovoConfig2 = _interopRequireDefault(require("../../../state/hooks/use-rovo-config"));
|
|
25
25
|
var _getPreviewUrlWithTheme = require("../../../utils/get-preview-url-with-theme");
|
|
26
26
|
var _isProfileType = require("../../../utils/is-profile-type");
|
|
27
|
+
var _lazyComponent = require("../../../utils/lazy-component");
|
|
27
28
|
var _rovoPostAuthPrompts = require("../../common/rovo-post-auth-prompts");
|
|
28
29
|
var _ExpandedFrame = require("../components/ExpandedFrame");
|
|
29
30
|
var _Frame = require("../components/Frame");
|
|
@@ -43,6 +44,13 @@ var EmbedRovoActionsFooter = (0, _reactLoadable.default)({
|
|
|
43
44
|
}
|
|
44
45
|
});
|
|
45
46
|
EmbedRovoActionsFooter.displayName = 'lazy(EmbedRovoActionsFooter)';
|
|
47
|
+
|
|
48
|
+
// Inline module-scope lazy() so product SSR tooling can preload it before hydration.
|
|
49
|
+
var LazyEmbedRovoActionsFooter = (0, _lazyComponent.withSuspense)( /*#__PURE__*/(0, _react.lazy)(function () {
|
|
50
|
+
return Promise.resolve().then(function () {
|
|
51
|
+
return _interopRequireWildcard(require( /* webpackChunkName: "smart-card-embed-rovo-actions-footer" */'../components/rovo-actions-footer'));
|
|
52
|
+
}).catch(_lazyComponent.renderNothingOnLoadError);
|
|
53
|
+
}), 'lazy(EmbedRovoActionsFooter)');
|
|
46
54
|
var styles = {
|
|
47
55
|
contentWithFooter: "_1e0c1txw _2lx21bp4 _4t3i1osq _1tkeidpf",
|
|
48
56
|
frameWithFooter: "_16jlkb7n _1tkeidpf",
|
|
@@ -80,7 +88,11 @@ var EmbedFrameWithRovoFooter = function EmbedFrameWithRovoFooter(_ref) {
|
|
|
80
88
|
});
|
|
81
89
|
}, [details, isEmbedRovoActionsFooterEnabled]);
|
|
82
90
|
var footer = _react.default.useMemo(function () {
|
|
83
|
-
return rovoActionData && prompts.length > 0 ? /*#__PURE__*/_react.default.createElement(
|
|
91
|
+
return rovoActionData && prompts.length > 0 ? (0, _fg.fg)('platform_sl_replace_react_loadable') ? /*#__PURE__*/_react.default.createElement(LazyEmbedRovoActionsFooter, {
|
|
92
|
+
actionData: rovoActionData,
|
|
93
|
+
prompts: prompts,
|
|
94
|
+
testId: "".concat(testId, "-rovo-actions-footer")
|
|
95
|
+
}) : /*#__PURE__*/_react.default.createElement(EmbedRovoActionsFooter, {
|
|
84
96
|
actionData: rovoActionData,
|
|
85
97
|
prompts: prompts,
|
|
86
98
|
testId: "".concat(testId, "-rovo-actions-footer")
|
|
@@ -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,
|
|
@@ -11,12 +11,9 @@ require("./main.compiled.css");
|
|
|
11
11
|
var React = _interopRequireWildcard(require("react"));
|
|
12
12
|
var _runtime = require("@compiled/react/runtime");
|
|
13
13
|
var _reactIntl = require("react-intl");
|
|
14
|
-
var _heading = _interopRequireDefault(require("@atlaskit/heading/heading"));
|
|
15
14
|
var _automation = _interopRequireDefault(require("@atlaskit/icon/core/automation"));
|
|
16
|
-
var _hooks = require("@atlaskit/modal-dialog/hooks");
|
|
17
15
|
var _modalHeader = _interopRequireDefault(require("@atlaskit/modal-dialog/modal-header"));
|
|
18
16
|
var _modalTitle = _interopRequireDefault(require("@atlaskit/modal-dialog/modal-title"));
|
|
19
|
-
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
20
17
|
var _box = require("@atlaskit/primitives/compiled/box");
|
|
21
18
|
var _inline = require("@atlaskit/primitives/compiled/inline");
|
|
22
19
|
var _stack = require("@atlaskit/primitives/compiled/stack");
|
|
@@ -41,8 +38,6 @@ var AutomationModalHeader = exports.AutomationModalHeader = function AutomationM
|
|
|
41
38
|
var _useAutomationMenu = (0, _useAutomationMenu2.useAutomationMenu)(),
|
|
42
39
|
initialised = _useAutomationMenu.initialised,
|
|
43
40
|
rules = _useAutomationMenu.rules;
|
|
44
|
-
var _useModal = (0, _hooks.useModal)(),
|
|
45
|
-
titleId = _useModal.titleId;
|
|
46
41
|
var showDescription = initialised && rules.length > 0 && !!modalDescription;
|
|
47
42
|
return /*#__PURE__*/React.createElement(_modalHeader.default, {
|
|
48
43
|
hasCloseButton: true
|
|
@@ -58,10 +53,7 @@ var AutomationModalHeader = exports.AutomationModalHeader = function AutomationM
|
|
|
58
53
|
label: formatMessage(i18n.modalHeaderIconLabel),
|
|
59
54
|
color: "var(--ds-icon-accent-green, #22A06B)",
|
|
60
55
|
spacing: "compact"
|
|
61
|
-
})),
|
|
62
|
-
size: "medium",
|
|
63
|
-
id: titleId
|
|
64
|
-
}, modalTitle)), showDescription && /*#__PURE__*/React.createElement(_box.Box, {
|
|
56
|
+
})), /*#__PURE__*/React.createElement(_modalTitle.default, null, modalTitle)), showDescription && /*#__PURE__*/React.createElement(_box.Box, {
|
|
65
57
|
xcss: styles.modalDescriptionStyle
|
|
66
58
|
}, modalDescription)));
|
|
67
59
|
};
|
|
@@ -8,12 +8,14 @@ exports.default = void 0;
|
|
|
8
8
|
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
9
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
10
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
11
|
-
var _react =
|
|
11
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
12
12
|
var _reactIntl = require("react-intl");
|
|
13
13
|
var _featureGates = _interopRequireDefault(require("@atlaskit/feature-gate-js-client/feature-gates"));
|
|
14
|
+
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
14
15
|
var _constants = require("../../../../../constants");
|
|
15
16
|
var _messages = require("../../../../../messages");
|
|
16
17
|
var _useFlexibleUiContext = require("../../../../../state/flexible-ui-context/useFlexibleUiContext");
|
|
18
|
+
var _lazyComponent = require("../../../../../utils/lazy-component");
|
|
17
19
|
var _importIcon = require("../../importIcon");
|
|
18
20
|
var _serverAction = _interopRequireDefault(require("../action/server-action"));
|
|
19
21
|
var _utils = require("./utils");
|
|
@@ -41,7 +43,35 @@ var importIconMapper = {
|
|
|
41
43
|
});
|
|
42
44
|
}
|
|
43
45
|
};
|
|
46
|
+
|
|
47
|
+
// Inline module-scope lazy() calls so product SSR tooling can preload them before hydration.
|
|
48
|
+
var lazyIconMapper = {
|
|
49
|
+
goal: (0, _lazyComponent.withSuspense)( /*#__PURE__*/(0, _react.lazy)(function () {
|
|
50
|
+
return Promise.resolve().then(function () {
|
|
51
|
+
return _interopRequireWildcard(require( /* webpackChunkName: "glyphGoal" */'./goal-icon'));
|
|
52
|
+
}).then(function (_ref3) {
|
|
53
|
+
var GoalIcon = _ref3.GoalIcon;
|
|
54
|
+
return {
|
|
55
|
+
default: GoalIcon
|
|
56
|
+
};
|
|
57
|
+
}).catch(_lazyComponent.renderNothingOnLoadError);
|
|
58
|
+
}), 'lazy(GoalIcon)'),
|
|
59
|
+
projects: (0, _lazyComponent.withSuspense)( /*#__PURE__*/(0, _react.lazy)(function () {
|
|
60
|
+
return Promise.resolve().then(function () {
|
|
61
|
+
return _interopRequireWildcard(require( /* webpackChunkName: "glyphProjects" */'./projects-icon'));
|
|
62
|
+
}).then(function (_ref4) {
|
|
63
|
+
var ProjectsIcon = _ref4.ProjectsIcon;
|
|
64
|
+
return {
|
|
65
|
+
default: ProjectsIcon
|
|
66
|
+
};
|
|
67
|
+
}).catch(_lazyComponent.renderNothingOnLoadError);
|
|
68
|
+
}), 'lazy(ProjectsIcon)')
|
|
69
|
+
};
|
|
44
70
|
var getIcon = function getIcon(stackIconType) {
|
|
71
|
+
if ((0, _fg.fg)('platform_sl_replace_react_loadable')) {
|
|
72
|
+
var _lazyIconMapper$stack;
|
|
73
|
+
return (_lazyIconMapper$stack = lazyIconMapper[stackIconType]) !== null && _lazyIconMapper$stack !== void 0 ? _lazyIconMapper$stack : null;
|
|
74
|
+
}
|
|
45
75
|
var importFn = importIconMapper[stackIconType];
|
|
46
76
|
if (!importFn) {
|
|
47
77
|
return null;
|
|
@@ -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,
|