@atlaskit/smart-card 19.1.14 → 19.1.17
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 +18 -0
- package/dist/cjs/extractors/block/index.js +2 -1
- package/dist/cjs/extractors/common/actions/extractPreviewAction.js +2 -1
- package/dist/cjs/i18n/cs.js +29 -115
- package/dist/cjs/i18n/da.js +31 -116
- package/dist/cjs/i18n/de.js +30 -116
- package/dist/cjs/i18n/en.js +29 -115
- package/dist/cjs/i18n/en_GB.js +29 -115
- package/dist/cjs/i18n/en_ZZ.js +10 -129
- package/dist/cjs/i18n/es.js +29 -115
- package/dist/cjs/i18n/fi.js +29 -115
- package/dist/cjs/i18n/fr.js +30 -116
- package/dist/cjs/i18n/hu.js +30 -116
- package/dist/cjs/i18n/it.js +29 -115
- package/dist/cjs/i18n/ja.js +29 -115
- package/dist/cjs/i18n/ko.js +29 -115
- package/dist/cjs/i18n/nb.js +30 -116
- package/dist/cjs/i18n/nl.js +29 -115
- package/dist/cjs/i18n/pl.js +30 -116
- package/dist/cjs/i18n/pt_BR.js +29 -115
- package/dist/cjs/i18n/ru.js +30 -116
- package/dist/cjs/i18n/sv.js +29 -115
- package/dist/cjs/i18n/th.js +29 -115
- package/dist/cjs/i18n/tr.js +30 -116
- package/dist/cjs/i18n/uk.js +29 -115
- package/dist/cjs/i18n/vi.js +29 -115
- package/dist/cjs/i18n/zh.js +30 -116
- package/dist/cjs/i18n/zh_TW.js +29 -115
- package/dist/cjs/state/analytics/useSmartLinkAnalytics.js +12 -12
- package/dist/cjs/state/hooks-external/useSmartLinkActions.js +2 -1
- package/dist/cjs/utils/analytics/analytics.js +18 -7
- package/dist/cjs/version.json +1 -1
- package/dist/cjs/view/FlexibleCard/components/elements/date-time/index.js +3 -2
- package/dist/cjs/view/HoverCard/components/hover-card-content.js +125 -0
- package/dist/cjs/view/HoverCard/index.js +22 -89
- package/dist/cjs/view/HoverCard/utils.js +3 -1
- package/dist/es2019/extractors/block/index.js +2 -1
- package/dist/es2019/extractors/common/actions/extractPreviewAction.js +2 -2
- package/dist/es2019/i18n/cs.js +29 -115
- package/dist/es2019/i18n/da.js +31 -116
- package/dist/es2019/i18n/de.js +30 -116
- package/dist/es2019/i18n/en.js +29 -115
- package/dist/es2019/i18n/en_GB.js +29 -115
- package/dist/es2019/i18n/en_ZZ.js +10 -129
- package/dist/es2019/i18n/es.js +29 -115
- package/dist/es2019/i18n/fi.js +29 -115
- package/dist/es2019/i18n/fr.js +30 -116
- package/dist/es2019/i18n/hu.js +30 -116
- package/dist/es2019/i18n/it.js +29 -115
- package/dist/es2019/i18n/ja.js +29 -115
- package/dist/es2019/i18n/ko.js +29 -115
- package/dist/es2019/i18n/nb.js +30 -116
- package/dist/es2019/i18n/nl.js +29 -115
- package/dist/es2019/i18n/pl.js +30 -116
- package/dist/es2019/i18n/pt_BR.js +29 -115
- package/dist/es2019/i18n/ru.js +30 -116
- package/dist/es2019/i18n/sv.js +29 -115
- package/dist/es2019/i18n/th.js +29 -115
- package/dist/es2019/i18n/tr.js +30 -116
- package/dist/es2019/i18n/uk.js +29 -115
- package/dist/es2019/i18n/vi.js +29 -115
- package/dist/es2019/i18n/zh.js +30 -116
- package/dist/es2019/i18n/zh_TW.js +29 -115
- package/dist/es2019/state/analytics/useSmartLinkAnalytics.js +4 -4
- package/dist/es2019/state/hooks-external/useSmartLinkActions.js +2 -1
- package/dist/es2019/utils/analytics/analytics.js +18 -7
- package/dist/es2019/version.json +1 -1
- package/dist/es2019/view/FlexibleCard/components/elements/date-time/index.js +3 -2
- package/dist/es2019/view/HoverCard/components/hover-card-content.js +85 -0
- package/dist/es2019/view/HoverCard/index.js +23 -78
- package/dist/es2019/view/HoverCard/utils.js +1 -0
- package/dist/esm/extractors/block/index.js +2 -1
- package/dist/esm/extractors/common/actions/extractPreviewAction.js +2 -1
- package/dist/esm/i18n/cs.js +29 -115
- package/dist/esm/i18n/da.js +31 -116
- package/dist/esm/i18n/de.js +30 -116
- package/dist/esm/i18n/en.js +29 -115
- package/dist/esm/i18n/en_GB.js +29 -115
- package/dist/esm/i18n/en_ZZ.js +10 -129
- package/dist/esm/i18n/es.js +29 -115
- package/dist/esm/i18n/fi.js +29 -115
- package/dist/esm/i18n/fr.js +30 -116
- package/dist/esm/i18n/hu.js +30 -116
- package/dist/esm/i18n/it.js +29 -115
- package/dist/esm/i18n/ja.js +29 -115
- package/dist/esm/i18n/ko.js +29 -115
- package/dist/esm/i18n/nb.js +30 -116
- package/dist/esm/i18n/nl.js +29 -115
- package/dist/esm/i18n/pl.js +30 -116
- package/dist/esm/i18n/pt_BR.js +29 -115
- package/dist/esm/i18n/ru.js +30 -116
- package/dist/esm/i18n/sv.js +29 -115
- package/dist/esm/i18n/th.js +29 -115
- package/dist/esm/i18n/tr.js +30 -116
- package/dist/esm/i18n/uk.js +29 -115
- package/dist/esm/i18n/vi.js +29 -115
- package/dist/esm/i18n/zh.js +30 -116
- package/dist/esm/i18n/zh_TW.js +29 -115
- package/dist/esm/state/analytics/useSmartLinkAnalytics.js +12 -12
- package/dist/esm/state/hooks-external/useSmartLinkActions.js +2 -1
- package/dist/esm/utils/analytics/analytics.js +18 -7
- package/dist/esm/version.json +1 -1
- package/dist/esm/view/FlexibleCard/components/elements/date-time/index.js +3 -2
- package/dist/esm/view/HoverCard/components/hover-card-content.js +99 -0
- package/dist/esm/view/HoverCard/index.js +25 -87
- package/dist/esm/view/HoverCard/utils.js +1 -0
- package/dist/types/extractors/block/types.d.ts +2 -0
- package/dist/types/extractors/common/actions/extractPreviewAction.d.ts +2 -1
- package/dist/types/i18n/cs.d.ts +28 -114
- package/dist/types/i18n/da.d.ts +28 -113
- package/dist/types/i18n/de.d.ts +28 -114
- package/dist/types/i18n/en.d.ts +28 -114
- package/dist/types/i18n/en_GB.d.ts +28 -114
- package/dist/types/i18n/en_ZZ.d.ts +9 -128
- package/dist/types/i18n/es.d.ts +28 -114
- package/dist/types/i18n/fi.d.ts +28 -114
- package/dist/types/i18n/fr.d.ts +28 -114
- package/dist/types/i18n/hu.d.ts +28 -114
- package/dist/types/i18n/it.d.ts +28 -114
- package/dist/types/i18n/ja.d.ts +28 -114
- package/dist/types/i18n/ko.d.ts +28 -114
- package/dist/types/i18n/nb.d.ts +28 -114
- package/dist/types/i18n/nl.d.ts +28 -114
- package/dist/types/i18n/pl.d.ts +28 -114
- package/dist/types/i18n/pt_BR.d.ts +28 -114
- package/dist/types/i18n/ru.d.ts +28 -114
- package/dist/types/i18n/sv.d.ts +28 -114
- package/dist/types/i18n/th.d.ts +28 -114
- package/dist/types/i18n/tr.d.ts +28 -114
- package/dist/types/i18n/uk.d.ts +28 -114
- package/dist/types/i18n/vi.d.ts +28 -114
- package/dist/types/i18n/zh.d.ts +28 -114
- package/dist/types/i18n/zh_TW.d.ts +28 -114
- package/dist/types/state/actions/index.d.ts +2 -1
- package/dist/types/state/analytics/useSmartLinkAnalytics.d.ts +2 -2
- package/dist/types/state/hooks/useSmartLink.d.ts +3 -3
- package/dist/types/state/hooks-external/useSmartLinkActions.d.ts +2 -2
- package/dist/types/utils/analytics/analytics.d.ts +4 -4
- package/dist/types/view/Card/index.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/elements/date-time/types.d.ts +4 -0
- package/dist/types/view/HoverCard/components/hover-card-content.d.ts +4 -0
- package/dist/types/view/HoverCard/types.d.ts +12 -0
- package/dist/types/view/HoverCard/utils.d.ts +1 -0
- package/package.json +1 -1
package/dist/es2019/i18n/zh.js
CHANGED
|
@@ -6,152 +6,66 @@
|
|
|
6
6
|
*/
|
|
7
7
|
//Chinese (Simplified)
|
|
8
8
|
export default {
|
|
9
|
-
'fabric.linking.cannot_connect': '无法连接,请重试',
|
|
10
|
-
'fabric.linking.cannot_find_link': '未找到链接',
|
|
11
|
-
'fabric.linking.join_to_view': '加入{context}以查看此事务',
|
|
12
|
-
'fabric.linking.create_on': '{context}已创建',
|
|
13
|
-
'fabric.linking.created_by': '创建者:{context}',
|
|
14
|
-
'fabric.linking.delete': '删除',
|
|
15
|
-
'fabric.linking.edit': '编辑',
|
|
16
|
-
'fabric.linking.forbidden_access': '您的访问已被禁止',
|
|
17
|
-
'fabric.linking.restricted_link': '受限链接,请尝试其他帐户',
|
|
18
|
-
'fabric.linking.modified_on': '{context}已更新',
|
|
19
|
-
'fabric.linking.pending_request': '您的访问请求正等待处理',
|
|
20
|
-
'fabric.linking.priority_blocker': '阻止程序',
|
|
21
|
-
'fabric.linking.priority_critical': '紧急',
|
|
22
|
-
'fabric.linking.priority_high': '高',
|
|
23
|
-
'fabric.linking.priority_highest': '最高',
|
|
24
|
-
'fabric.linking.priority_low': '低',
|
|
25
|
-
'fabric.linking.priority_lowest': '最低',
|
|
26
|
-
'fabric.linking.priority_major': '重要',
|
|
27
|
-
'fabric.linking.priority_medium': '中等',
|
|
28
|
-
'fabric.linking.priority_minor': '次要',
|
|
29
|
-
'fabric.linking.priority_trivial': '微小',
|
|
30
|
-
'fabric.linking.priority_undefined': '未定义',
|
|
31
|
-
'fabric.linking.request_access_to_view': '请求访问{context}以查看此事务',
|
|
32
|
-
'fabric.linking.request_denied': '您的访问请求已被拒绝',
|
|
33
|
-
'fabric.linking.updated_by': '修改者:{context}',
|
|
34
|
-
'fabric.linking.accounts': '帐户',
|
|
35
9
|
'fabric.linking.actions': '操作',
|
|
36
10
|
'fabric.linking.add_account': '添加帐户',
|
|
37
|
-
'fabric.linking.annotate': '标注',
|
|
38
|
-
'fabric.linking.annotate.confirmation.close.anyway': '关闭',
|
|
39
|
-
'fabric.linking.annotate.confirmation.content': '您有一些尚未保存的更改。您确定要离开吗?',
|
|
40
|
-
'fabric.linking.annotate.confirmation.heading': '未保存的更改',
|
|
41
|
-
'fabric.linking.annotate.tool.arrow': '箭头',
|
|
42
|
-
'fabric.linking.annotate.tool.blur': '模糊',
|
|
43
|
-
'fabric.linking.annotate.tool.brush': '画笔',
|
|
44
|
-
'fabric.linking.annotate.tool.color': '颜色',
|
|
45
|
-
'fabric.linking.annotate.tool.line.thickness': '线的粗细',
|
|
46
|
-
'fabric.linking.annotate.tool.shape': '形状',
|
|
47
|
-
'fabric.linking.annotate.tool.text': '文本',
|
|
48
|
-
'fabric.linking.archive': '归档',
|
|
49
|
-
'fabric.linking.audio': '音频',
|
|
50
11
|
'fabric.linking.cancel': '取消',
|
|
51
|
-
'fabric.linking.
|
|
52
|
-
'fabric.linking.
|
|
53
|
-
'fabric.linking.cant_retrieve_gifs': '噢!检索不到任何 GIF',
|
|
54
|
-
'fabric.linking.change_view': '更改视图',
|
|
55
|
-
'fabric.linking.check_your_network': '检查网络连接',
|
|
12
|
+
'fabric.linking.cannot_connect': '无法连接,请重试',
|
|
13
|
+
'fabric.linking.cannot_find_link': '未找到链接',
|
|
56
14
|
'fabric.linking.click_to_join': '加入 {context}',
|
|
57
15
|
'fabric.linking.click_to_join_description': '您已获得批准,可以立即加入 {context}。',
|
|
58
16
|
'fabric.linking.close': '关闭',
|
|
59
|
-
'fabric.linking.close_and_reopen': '尝试关闭该文件并重新打开。',
|
|
60
17
|
'fabric.linking.connect_account_description': '我们将打开新页面帮助您连接 {name} 帐户',
|
|
61
18
|
'fabric.linking.connect_link_account': '连接以预览',
|
|
62
19
|
'fabric.linking.connect_link_account_card_view': '连接',
|
|
63
20
|
'fabric.linking.connect_link_account_card_view_description': '如要显示该链接的预览,请连接您的 {context} 帐户。',
|
|
64
21
|
'fabric.linking.connect_link_account_card_view_name': '连接您的 {context} 帐户',
|
|
65
22
|
'fabric.linking.connect_to': '连接到 {name}',
|
|
66
|
-
'fabric.linking.could_not_load_editor': '哎哟!我们无法加载编辑器。',
|
|
67
|
-
'fabric.linking.could_not_save_image': '哎哟!我们无法保存该图像',
|
|
68
|
-
'fabric.linking.couldnt_generate_encrypted_entry_preview': '无法预览已加密或受密码保护的文件。',
|
|
69
|
-
'fabric.linking.couldnt_generate_preview': '我们无法为此文件生成预览。',
|
|
70
|
-
'fabric.linking.couldnt_load_file': '无法加载文件。',
|
|
71
23
|
'fabric.linking.couldnt_load_link': '由于未知原因,无法加载此链接。',
|
|
72
|
-
'fabric.linking.
|
|
73
|
-
'fabric.linking.
|
|
74
|
-
'fabric.linking.
|
|
75
|
-
'fabric.linking.
|
|
76
|
-
'fabric.linking.document': '文档',
|
|
24
|
+
'fabric.linking.create_on_absolute': '创建时间:{context}',
|
|
25
|
+
'fabric.linking.create_on_relative': '创建时间:{context}',
|
|
26
|
+
'fabric.linking.created_by': '创建者:{context}',
|
|
27
|
+
'fabric.linking.delete': '删除',
|
|
77
28
|
'fabric.linking.download': '下载',
|
|
78
|
-
'fabric.linking.
|
|
79
|
-
'fabric.linking.
|
|
80
|
-
'fabric.linking.drag_and_drop_your_files_and_folders': '将您的文件和文件夹拖放至任意位置或',
|
|
81
|
-
'fabric.linking.drop_your_files': '拖放文件进行上传',
|
|
82
|
-
'fabric.linking.drop_your_files_here': '将您的文件放到这里',
|
|
83
|
-
'fabric.linking.email': '电子邮件',
|
|
84
|
-
'fabric.linking.enable_fullscreen': '启用全屏',
|
|
85
|
-
'fabric.linking.error_429': '错误 429',
|
|
86
|
-
'fabric.linking.error_generating_preview': '生成预览时出错',
|
|
87
|
-
'fabric.linking.error_hint_critical': '如果该问题仍无法解决,请联系我们。',
|
|
88
|
-
'fabric.linking.error_hint_retry': '请重试,我们会再给您一次机会。',
|
|
89
|
-
'fabric.linking.error_loading_file': '加载文件时出现错误',
|
|
90
|
-
'fabric.linking.failed_to_load': '无法加载',
|
|
91
|
-
'fabric.linking.failed_to_upload': '上传失败',
|
|
29
|
+
'fabric.linking.edit': '编辑',
|
|
30
|
+
'fabric.linking.forbidden_access': '您的访问已被禁止',
|
|
92
31
|
'fabric.linking.forbidden_description': '您无权访问此预览。如果需要访问,请联系站点管理员。',
|
|
93
|
-
'fabric.linking.give_feedback': '提供反馈意见',
|
|
94
|
-
'fabric.linking.image': '图像',
|
|
95
|
-
'fabric.linking.image_format_invalid_error': '无法加载图像,当前格式无效。',
|
|
96
|
-
'fabric.linking.image_size_too_large_error': '图像太大,必须小于{MAX_SIZE_MB} MB',
|
|
97
|
-
'fabric.linking.image_url_invalid_error': '无法加载图像,当前网址无效。',
|
|
98
|
-
'fabric.linking.insert_files': '{0, plural, other {插入 {0} 个文件}}',
|
|
99
32
|
'fabric.linking.invalid_permissions': '受限链接',
|
|
100
33
|
'fabric.linking.invalid_permissions_description': '您需要请求访问权限或尝试使用其他帐户来查看此预览。',
|
|
101
|
-
'fabric.linking.
|
|
102
|
-
'fabric.linking.learn_more': '了解更多',
|
|
103
|
-
'fabric.linking.load_more_gifs': '加载更多 GIF',
|
|
34
|
+
'fabric.linking.join_to_view': '加入{context}以查看此事务',
|
|
104
35
|
'fabric.linking.loading': '正在加载...',
|
|
105
|
-
'fabric.linking.
|
|
106
|
-
'fabric.linking.
|
|
107
|
-
'fabric.linking.
|
|
108
|
-
'fabric.linking.no_gifs_found_suggestion': '找不到“{query}”的任何信息',
|
|
109
|
-
'fabric.linking.no_pdf_artifacts': '此文件中未找到 PDF 文件。',
|
|
36
|
+
'fabric.linking.modified_on_absolute': '更新时间:{context}',
|
|
37
|
+
'fabric.linking.modified_on_relative': '更新时间:{context}',
|
|
38
|
+
'fabric.linking.more_actions': '更多操作',
|
|
110
39
|
'fabric.linking.not_found_description': '未找到此链接。请检查 URL,然后尝试编辑或重新粘贴。',
|
|
111
40
|
'fabric.linking.not_found_title': '噢。找不到此链接!',
|
|
112
|
-
'fabric.linking.
|
|
113
|
-
'fabric.linking.pause': '暂停',
|
|
114
|
-
'fabric.linking.play': '播放',
|
|
115
|
-
'fabric.linking.playback_default_speed': '默认',
|
|
116
|
-
'fabric.linking.playback_speed': '播放速度',
|
|
41
|
+
'fabric.linking.pending_request': '您的访问请求正等待处理',
|
|
117
42
|
'fabric.linking.preview': '预览',
|
|
118
|
-
'fabric.linking.
|
|
119
|
-
'fabric.linking.
|
|
120
|
-
'fabric.linking.
|
|
121
|
-
'fabric.linking.
|
|
43
|
+
'fabric.linking.priority_blocker': '紧急',
|
|
44
|
+
'fabric.linking.priority_critical': '严重',
|
|
45
|
+
'fabric.linking.priority_high': '高',
|
|
46
|
+
'fabric.linking.priority_highest': '最高',
|
|
47
|
+
'fabric.linking.priority_low': '低',
|
|
48
|
+
'fabric.linking.priority_lowest': '最低',
|
|
49
|
+
'fabric.linking.priority_major': '重要',
|
|
50
|
+
'fabric.linking.priority_medium': '中等',
|
|
51
|
+
'fabric.linking.priority_minor': '次要',
|
|
52
|
+
'fabric.linking.priority_trivial': '微小',
|
|
53
|
+
'fabric.linking.priority_undefined': '未定义',
|
|
122
54
|
'fabric.linking.request_access': '请求访问',
|
|
123
55
|
'fabric.linking.request_access_description': '请求访问 {context} 以查看此预览。',
|
|
124
56
|
'fabric.linking.request_access_pending': '访问待处理',
|
|
125
57
|
'fabric.linking.request_access_pending_description': '您的访问请求正等待处理。',
|
|
58
|
+
'fabric.linking.request_access_to_view': '请求访问{context}以查看此事务',
|
|
59
|
+
'fabric.linking.request_denied': '您的访问请求已被拒绝',
|
|
126
60
|
'fabric.linking.request_denied_description': '您的访问请求已被拒绝。如果您仍需访问,请联系站点管理员。',
|
|
61
|
+
'fabric.linking.restricted_link': '受限链接,请尝试其他帐户',
|
|
127
62
|
'fabric.linking.retry': '重试',
|
|
128
63
|
'fabric.linking.save': '保存',
|
|
129
|
-
'fabric.linking.search': '搜索',
|
|
130
|
-
'fabric.linking.search_all_gifs': '搜索所有 GIF!',
|
|
131
|
-
'fabric.linking.share_files_instantly': '我们会立即共享您的文件',
|
|
132
|
-
'fabric.linking.skip_backward': '后退 10 秒',
|
|
133
|
-
'fabric.linking.skip_forward': '前进 10 秒',
|
|
134
|
-
'fabric.linking.something_went_wrong': '出错了。',
|
|
135
64
|
'fabric.linking.srclink': '查看',
|
|
136
65
|
'fabric.linking.srclinkunknown': '查看原件',
|
|
137
|
-
'fabric.linking.
|
|
138
|
-
'fabric.linking.try_again': '重试',
|
|
66
|
+
'fabric.linking.try_again': '请重试',
|
|
139
67
|
'fabric.linking.try_another_account': '请尝试其他帐户',
|
|
140
|
-
'fabric.linking.try_downloading_file': '尝试下载该文件并查看。',
|
|
141
|
-
'fabric.linking.unable_to_annotate_image': '您无法标注此图像。',
|
|
142
|
-
'fabric.linking.unknown': '未知',
|
|
143
68
|
'fabric.linking.unlink_account': '取消帐户链接',
|
|
144
|
-
'fabric.linking.
|
|
145
|
-
'fabric.linking.
|
|
146
|
-
'fabric.linking.upload_file': '上传文件',
|
|
147
|
-
'fabric.linking.upload_file_from': '上传{name}中的文件',
|
|
148
|
-
'fabric.linking.upload_image': '上传图像',
|
|
149
|
-
'fabric.linking.upload_photo': '上传一张照片',
|
|
150
|
-
'fabric.linking.video': '视频',
|
|
151
|
-
'fabric.linking.view': '查看',
|
|
152
|
-
'fabric.linking.viewer_rateLimited': '加载您的文件时遇到问题。',
|
|
153
|
-
'fabric.linking.webgl_warning_description': '您的浏览器不支持 WebGL。请使用支持 WebGL 的浏览器来标注图像。',
|
|
154
|
-
'fabric.linking.zip_entry_load_failed': '无法将此 zip 文件项目加载到预览',
|
|
155
|
-
'fabric.linking.zoom_in': '放大',
|
|
156
|
-
'fabric.linking.zoom_out': '缩小'
|
|
69
|
+
'fabric.linking.updated_by': '修改者:{context}',
|
|
70
|
+
'fabric.linking.view': '查看'
|
|
157
71
|
};
|
|
@@ -6,152 +6,66 @@
|
|
|
6
6
|
*/
|
|
7
7
|
//Chinese (Traditional)
|
|
8
8
|
export default {
|
|
9
|
-
'fabric.linking.cannot_connect': '無法連結,請再試一次',
|
|
10
|
-
'fabric.linking.cannot_find_link': '找不到連結',
|
|
11
|
-
'fabric.linking.join_to_view': '加入 {context} 以查看此議題',
|
|
12
|
-
'fabric.linking.create_on': '建立時間:{context}',
|
|
13
|
-
'fabric.linking.created_by': '建立者:{context}',
|
|
14
|
-
'fabric.linking.delete': '刪除',
|
|
15
|
-
'fabric.linking.edit': '編輯',
|
|
16
|
-
'fabric.linking.forbidden_access': '您的存取遭拒',
|
|
17
|
-
'fabric.linking.restricted_link': '連結受到限制,請嘗試其他帳戶',
|
|
18
|
-
'fabric.linking.modified_on': '更新時間:{context}',
|
|
19
|
-
'fabric.linking.pending_request': '您的存取要求擱置中',
|
|
20
|
-
'fabric.linking.priority_blocker': '封鎖程式',
|
|
21
|
-
'fabric.linking.priority_critical': '重要',
|
|
22
|
-
'fabric.linking.priority_high': '高',
|
|
23
|
-
'fabric.linking.priority_highest': '最高',
|
|
24
|
-
'fabric.linking.priority_low': '低',
|
|
25
|
-
'fabric.linking.priority_lowest': '最低',
|
|
26
|
-
'fabric.linking.priority_major': '主要',
|
|
27
|
-
'fabric.linking.priority_medium': '中',
|
|
28
|
-
'fabric.linking.priority_minor': '次要',
|
|
29
|
-
'fabric.linking.priority_trivial': '不太重要',
|
|
30
|
-
'fabric.linking.priority_undefined': '未定義',
|
|
31
|
-
'fabric.linking.request_access_to_view': '要求存取 {context} 以檢視此議題',
|
|
32
|
-
'fabric.linking.request_denied': '您的存取要求遭拒',
|
|
33
|
-
'fabric.linking.updated_by': '修改者:{context}',
|
|
34
|
-
'fabric.linking.accounts': '帳戶',
|
|
35
9
|
'fabric.linking.actions': '動作',
|
|
36
10
|
'fabric.linking.add_account': '新增帳戶',
|
|
37
|
-
'fabric.linking.annotate': '加上註解',
|
|
38
|
-
'fabric.linking.annotate.confirmation.close.anyway': '仍要關閉',
|
|
39
|
-
'fabric.linking.annotate.confirmation.content': '您有一些未儲存的變更,確定要離開嗎?',
|
|
40
|
-
'fabric.linking.annotate.confirmation.heading': '未儲存的變更',
|
|
41
|
-
'fabric.linking.annotate.tool.arrow': '箭頭',
|
|
42
|
-
'fabric.linking.annotate.tool.blur': '模糊',
|
|
43
|
-
'fabric.linking.annotate.tool.brush': '筆刷',
|
|
44
|
-
'fabric.linking.annotate.tool.color': '顏色',
|
|
45
|
-
'fabric.linking.annotate.tool.line.thickness': '線條粗細',
|
|
46
|
-
'fabric.linking.annotate.tool.shape': '形狀',
|
|
47
|
-
'fabric.linking.annotate.tool.text': '文字',
|
|
48
|
-
'fabric.linking.archive': '封存',
|
|
49
|
-
'fabric.linking.audio': '音訊',
|
|
50
11
|
'fabric.linking.cancel': '取消',
|
|
51
|
-
'fabric.linking.
|
|
52
|
-
'fabric.linking.
|
|
53
|
-
'fabric.linking.cant_retrieve_gifs': '唉呦!我們無法擷取任何 GIF',
|
|
54
|
-
'fabric.linking.change_view': '變更檢視畫面',
|
|
55
|
-
'fabric.linking.check_your_network': '請檢查您的網路連線',
|
|
12
|
+
'fabric.linking.cannot_connect': '無法連結,請再試一次',
|
|
13
|
+
'fabric.linking.cannot_find_link': '找不到連結',
|
|
56
14
|
'fabric.linking.click_to_join': '加入 {context}',
|
|
57
15
|
'fabric.linking.click_to_join_description': '您已獲得核准,因此可以立即加入 {context}。',
|
|
58
16
|
'fabric.linking.close': '關閉',
|
|
59
|
-
'fabric.linking.close_and_reopen': '請試著關閉此檔案,然後再重新開啟。',
|
|
60
17
|
'fabric.linking.connect_account_description': '我們會開啟新的頁面來協助您連結 {name} 帳戶',
|
|
61
18
|
'fabric.linking.connect_link_account': '連線以預覽',
|
|
62
19
|
'fabric.linking.connect_link_account_card_view': '連結',
|
|
63
20
|
'fabric.linking.connect_link_account_card_view_description': '若要顯示此連結的預覽,請連接您的 {context} 帳戶。',
|
|
64
21
|
'fabric.linking.connect_link_account_card_view_name': '連結 {context} 帳戶',
|
|
65
22
|
'fabric.linking.connect_to': '連結至 {name}',
|
|
66
|
-
'fabric.linking.could_not_load_editor': '唉呦!我們無法載入編輯器',
|
|
67
|
-
'fabric.linking.could_not_save_image': '唉呦!我們無法儲存影像',
|
|
68
|
-
'fabric.linking.couldnt_generate_encrypted_entry_preview': '我們無法預覽加密或以密碼保護的檔案。',
|
|
69
|
-
'fabric.linking.couldnt_generate_preview': '我們無法為此檔案產生預覽。',
|
|
70
|
-
'fabric.linking.couldnt_load_file': '我們無法載入檔案。',
|
|
71
23
|
'fabric.linking.couldnt_load_link': '基於不明原因,我們無法載入此連結。',
|
|
72
|
-
'fabric.linking.
|
|
73
|
-
'fabric.linking.
|
|
74
|
-
'fabric.linking.
|
|
75
|
-
'fabric.linking.
|
|
76
|
-
'fabric.linking.document': '文件',
|
|
24
|
+
'fabric.linking.create_on_absolute': '於 {context} 建立',
|
|
25
|
+
'fabric.linking.create_on_relative': '建立時間:{context}',
|
|
26
|
+
'fabric.linking.created_by': '建立者:{context}',
|
|
27
|
+
'fabric.linking.delete': '刪除',
|
|
77
28
|
'fabric.linking.download': '下載',
|
|
78
|
-
'fabric.linking.
|
|
79
|
-
'fabric.linking.
|
|
80
|
-
'fabric.linking.drag_and_drop_your_files_and_folders': '將檔案和資料夾拖曳至任何位置或',
|
|
81
|
-
'fabric.linking.drop_your_files': '置放要上傳的檔案',
|
|
82
|
-
'fabric.linking.drop_your_files_here': '將檔案置放在此',
|
|
83
|
-
'fabric.linking.email': '電子郵件',
|
|
84
|
-
'fabric.linking.enable_fullscreen': '啟用全螢幕',
|
|
85
|
-
'fabric.linking.error_429': '錯誤 429',
|
|
86
|
-
'fabric.linking.error_generating_preview': '產生預覽時發生錯誤',
|
|
87
|
-
'fabric.linking.error_hint_critical': '如果問題持續發生,請聯絡支援人員。',
|
|
88
|
-
'fabric.linking.error_hint_retry': '請再試一次。',
|
|
89
|
-
'fabric.linking.error_loading_file': '載入檔案時發生錯誤',
|
|
90
|
-
'fabric.linking.failed_to_load': '無法載入',
|
|
91
|
-
'fabric.linking.failed_to_upload': '無法上傳',
|
|
29
|
+
'fabric.linking.edit': '編輯',
|
|
30
|
+
'fabric.linking.forbidden_access': '您的存取遭拒',
|
|
92
31
|
'fabric.linking.forbidden_description': '您沒有此預覽的存取權。如果您需要存取權,請連絡網站管理員。',
|
|
93
|
-
'fabric.linking.give_feedback': '提供意見反應',
|
|
94
|
-
'fabric.linking.image': '影像',
|
|
95
|
-
'fabric.linking.image_format_invalid_error': '無法載入影像,格式無效。',
|
|
96
|
-
'fabric.linking.image_size_too_large_error': '影像太大,不得大於 {MAX_SIZE_MB}Mb',
|
|
97
|
-
'fabric.linking.image_url_invalid_error': '無法載入影像,URL 無效。',
|
|
98
|
-
'fabric.linking.insert_files': '{0, plural, other {插入 {0} 個檔案}}',
|
|
99
32
|
'fabric.linking.invalid_permissions': '限制連結',
|
|
100
33
|
'fabric.linking.invalid_permissions_description': '您需要請求存取或嘗試不同的帳戶,來檢視此預覽。',
|
|
101
|
-
'fabric.linking.
|
|
102
|
-
'fabric.linking.learn_more': '深入了解',
|
|
103
|
-
'fabric.linking.load_more_gifs': '載入更多 GIF',
|
|
34
|
+
'fabric.linking.join_to_view': '加入 {context} 以查看此議題',
|
|
104
35
|
'fabric.linking.loading': '正在載入...',
|
|
105
|
-
'fabric.linking.
|
|
106
|
-
'fabric.linking.
|
|
107
|
-
'fabric.linking.
|
|
108
|
-
'fabric.linking.no_gifs_found_suggestion': '我們找不到符合「{query}」的項目',
|
|
109
|
-
'fabric.linking.no_pdf_artifacts': '找不到符合此檔案的 PDF 成品。',
|
|
36
|
+
'fabric.linking.modified_on_absolute': '更新於 {context}',
|
|
37
|
+
'fabric.linking.modified_on_relative': '更新時間:{context}',
|
|
38
|
+
'fabric.linking.more_actions': '更多動作',
|
|
110
39
|
'fabric.linking.not_found_description': '我們找不到此連結。請檢查 URL,然後試著編輯或再次貼上。',
|
|
111
40
|
'fabric.linking.not_found_title': '糟糕,我們找不到此連結!',
|
|
112
|
-
'fabric.linking.
|
|
113
|
-
'fabric.linking.pause': '暫停',
|
|
114
|
-
'fabric.linking.play': '播放',
|
|
115
|
-
'fabric.linking.playback_default_speed': '預設',
|
|
116
|
-
'fabric.linking.playback_speed': '播放速度',
|
|
41
|
+
'fabric.linking.pending_request': '您的存取要求擱置中',
|
|
117
42
|
'fabric.linking.preview': '預覽',
|
|
118
|
-
'fabric.linking.
|
|
119
|
-
'fabric.linking.
|
|
120
|
-
'fabric.linking.
|
|
121
|
-
'fabric.linking.
|
|
43
|
+
'fabric.linking.priority_blocker': '受阻',
|
|
44
|
+
'fabric.linking.priority_critical': '嚴重',
|
|
45
|
+
'fabric.linking.priority_high': '高',
|
|
46
|
+
'fabric.linking.priority_highest': '最高',
|
|
47
|
+
'fabric.linking.priority_low': '低',
|
|
48
|
+
'fabric.linking.priority_lowest': '最低',
|
|
49
|
+
'fabric.linking.priority_major': '主要',
|
|
50
|
+
'fabric.linking.priority_medium': '中',
|
|
51
|
+
'fabric.linking.priority_minor': '次要',
|
|
52
|
+
'fabric.linking.priority_trivial': '不太重要',
|
|
53
|
+
'fabric.linking.priority_undefined': '未定義',
|
|
122
54
|
'fabric.linking.request_access': '要求存取權',
|
|
123
55
|
'fabric.linking.request_access_description': '要求 {context} 的存取權以檢視此預覽。',
|
|
124
56
|
'fabric.linking.request_access_pending': '存取擱置',
|
|
125
57
|
'fabric.linking.request_access_pending_description': '您的存取要求擱置中。',
|
|
58
|
+
'fabric.linking.request_access_to_view': '要求存取 {context} 以檢視此議題',
|
|
59
|
+
'fabric.linking.request_denied': '您的存取要求遭拒',
|
|
126
60
|
'fabric.linking.request_denied_description': '您的存取要求遭到拒絕。如果您仍需要存取權,請連絡網站管理員。',
|
|
61
|
+
'fabric.linking.restricted_link': '連結受到限制,請嘗試其他帳戶',
|
|
127
62
|
'fabric.linking.retry': '重試',
|
|
128
63
|
'fabric.linking.save': '儲存',
|
|
129
|
-
'fabric.linking.search': '搜尋',
|
|
130
|
-
'fabric.linking.search_all_gifs': '搜尋所有 GIF!',
|
|
131
|
-
'fabric.linking.share_files_instantly': '我們會立即分享',
|
|
132
|
-
'fabric.linking.skip_backward': '倒退 10 秒',
|
|
133
|
-
'fabric.linking.skip_forward': '快轉 10 秒',
|
|
134
|
-
'fabric.linking.something_went_wrong': '發生錯誤。',
|
|
135
64
|
'fabric.linking.srclink': '使用以下檢視:',
|
|
136
65
|
'fabric.linking.srclinkunknown': '檢視原始狀態',
|
|
137
|
-
'fabric.linking.text': '文字',
|
|
138
66
|
'fabric.linking.try_again': '再試一次',
|
|
139
67
|
'fabric.linking.try_another_account': '使用其他帳戶嘗試',
|
|
140
|
-
'fabric.linking.try_downloading_file': '嘗試下載檔案來進行檢視。',
|
|
141
|
-
'fabric.linking.unable_to_annotate_image': '您無法對此影像加上註解',
|
|
142
|
-
'fabric.linking.unknown': '未知',
|
|
143
68
|
'fabric.linking.unlink_account': '取消帳戶的連結',
|
|
144
|
-
'fabric.linking.
|
|
145
|
-
'fabric.linking.
|
|
146
|
-
'fabric.linking.upload_file': '上傳檔案',
|
|
147
|
-
'fabric.linking.upload_file_from': '從 {name} 上傳檔案',
|
|
148
|
-
'fabric.linking.upload_image': '上傳影像',
|
|
149
|
-
'fabric.linking.upload_photo': '上傳相片',
|
|
150
|
-
'fabric.linking.video': '影片',
|
|
151
|
-
'fabric.linking.view': '檢視',
|
|
152
|
-
'fabric.linking.viewer_rateLimited': '載入您的檔案時發生問題。',
|
|
153
|
-
'fabric.linking.webgl_warning_description': '您的瀏覽器不支援 WebGL。使用啟用 WebGL 的瀏覽器來為影像加上註解。',
|
|
154
|
-
'fabric.linking.zip_entry_load_failed': '我們無法載入該 zip 檔案項目來進行預覽',
|
|
155
|
-
'fabric.linking.zoom_in': '縮小',
|
|
156
|
-
'fabric.linking.zoom_out': '放大'
|
|
69
|
+
'fabric.linking.updated_by': '修改者:{context}',
|
|
70
|
+
'fabric.linking.view': '檢視'
|
|
157
71
|
};
|
|
@@ -77,7 +77,7 @@ export const useSmartLinkAnalytics = (url, dispatchAnalytics, id, defaultLocatio
|
|
|
77
77
|
extensionKey,
|
|
78
78
|
invokeType
|
|
79
79
|
});
|
|
80
|
-
dispatchAnalytics(uiActionClickedEvent(actionType, extensionKey, display));
|
|
80
|
+
dispatchAnalytics(uiActionClickedEvent(id, actionType, extensionKey, display));
|
|
81
81
|
},
|
|
82
82
|
|
|
83
83
|
/**
|
|
@@ -89,7 +89,7 @@ export const useSmartLinkAnalytics = (url, dispatchAnalytics, id, defaultLocatio
|
|
|
89
89
|
* @param previewInvokeMethod How the preview was triggered.
|
|
90
90
|
*/
|
|
91
91
|
hoverCardOpenLinkClickedEvent: (previewDisplay, definitionId = extractedDefinitionId, extensionKey = extractedExtensionKey, previewInvokeMethod) => {
|
|
92
|
-
dispatchAnalytics(uiHoverCardOpenLinkClickedEvent(previewDisplay, definitionId, extensionKey, previewInvokeMethod));
|
|
92
|
+
dispatchAnalytics(uiHoverCardOpenLinkClickedEvent(defaultId, previewDisplay, definitionId, extensionKey, previewInvokeMethod));
|
|
93
93
|
},
|
|
94
94
|
|
|
95
95
|
/**
|
|
@@ -129,7 +129,7 @@ export const useSmartLinkAnalytics = (url, dispatchAnalytics, id, defaultLocatio
|
|
|
129
129
|
* @param previewInvokeMethod How the preview was triggered.
|
|
130
130
|
* @returns
|
|
131
131
|
*/
|
|
132
|
-
hoverCardViewedEvent: (
|
|
132
|
+
hoverCardViewedEvent: (previewDisplay, previewInvokeMethod, id = defaultId, definitionId = extractedDefinitionId, extensionKey = extractedExtensionKey) => dispatchAnalytics(uiHoverCardViewedEvent(id, previewDisplay, definitionId, extensionKey, previewInvokeMethod)),
|
|
133
133
|
|
|
134
134
|
/**
|
|
135
135
|
* This fires an event that represents a hover preview being dismissed.
|
|
@@ -140,7 +140,7 @@ export const useSmartLinkAnalytics = (url, dispatchAnalytics, id, defaultLocatio
|
|
|
140
140
|
* @param previewInvokeMethod How the preview was triggered.
|
|
141
141
|
* @returns
|
|
142
142
|
*/
|
|
143
|
-
hoverCardDismissedEvent: (
|
|
143
|
+
hoverCardDismissedEvent: (previewDisplay, hoverTime, previewInvokeMethod, id = defaultId, definitionId = extractedDefinitionId, extensionKey = extractedExtensionKey) => dispatchAnalytics(uiHoverCardDismissedEvent(id, previewDisplay, hoverTime, definitionId, extensionKey, previewInvokeMethod))
|
|
144
144
|
}), [defaultId, defaultLocation, extractedDefinitionId, extractedExtensionKey, dispatchAnalytics]);
|
|
145
145
|
/** Contains all operational analytics events */
|
|
146
146
|
|
|
@@ -24,7 +24,8 @@ export function useSmartLinkActions({
|
|
|
24
24
|
const cardProperties = extractCardProps(linkState.details.data, linkState.details.meta, {
|
|
25
25
|
handleInvoke: opts => linkActions.invoke(opts, appearance),
|
|
26
26
|
handleAnalytics: analyticsHandler,
|
|
27
|
-
extensionKey: getExtensionKey(linkState.details)
|
|
27
|
+
extensionKey: getExtensionKey(linkState.details),
|
|
28
|
+
source: appearance
|
|
28
29
|
}, undefined, platform);
|
|
29
30
|
|
|
30
31
|
if (!cardProperties.actions || cardProperties.actions.length === 0) {
|
|
@@ -6,6 +6,11 @@ export const context = {
|
|
|
6
6
|
packageName,
|
|
7
7
|
packageVersion
|
|
8
8
|
};
|
|
9
|
+
const uiActionSubjectIds = {
|
|
10
|
+
DownloadAction: 'downloadDocument',
|
|
11
|
+
PreviewAction: 'invokePreviewScreen',
|
|
12
|
+
ViewAction: 'shortcutGoToLink'
|
|
13
|
+
};
|
|
9
14
|
export class SmartLinkEvents {
|
|
10
15
|
insertSmartLink(url, type, createAnalyticsEvent) {
|
|
11
16
|
fireSmartLinkEvent({
|
|
@@ -172,6 +177,7 @@ export const uiAuthAlternateAccountEvent = (display, definitionId, extensionKey)
|
|
|
172
177
|
export const uiCardClickedEvent = (id, display, status, definitionId, extensionKey, isModifierKeyPressed, location, destinationProduct) => ({
|
|
173
178
|
action: 'clicked',
|
|
174
179
|
actionSubject: 'smartLink',
|
|
180
|
+
actionSubjectId: 'titleGoToLink',
|
|
175
181
|
eventType: 'ui',
|
|
176
182
|
attributes: { ...context,
|
|
177
183
|
id,
|
|
@@ -184,11 +190,13 @@ export const uiCardClickedEvent = (id, display, status, definitionId, extensionK
|
|
|
184
190
|
destinationProduct
|
|
185
191
|
}
|
|
186
192
|
});
|
|
187
|
-
export const uiActionClickedEvent = (actionType, extensionKey, display) => ({
|
|
193
|
+
export const uiActionClickedEvent = (id, actionType, extensionKey, display) => ({
|
|
188
194
|
action: 'clicked',
|
|
189
|
-
actionSubject: '
|
|
195
|
+
actionSubject: 'button',
|
|
196
|
+
actionSubjectId: uiActionSubjectIds[actionType],
|
|
190
197
|
eventType: 'ui',
|
|
191
198
|
attributes: { ...context,
|
|
199
|
+
id,
|
|
192
200
|
display,
|
|
193
201
|
extensionKey: extensionKey || '',
|
|
194
202
|
actionType: actionType
|
|
@@ -233,35 +241,38 @@ export const uiRenderFailedEvent = (display, error, errorInfo) => ({
|
|
|
233
241
|
display
|
|
234
242
|
}
|
|
235
243
|
});
|
|
236
|
-
export const uiHoverCardViewedEvent = (
|
|
244
|
+
export const uiHoverCardViewedEvent = (id, previewDisplay, definitionId, extensionKey, previewInvokeMethod) => ({
|
|
237
245
|
action: 'viewed',
|
|
238
246
|
actionSubject: 'hoverCard',
|
|
239
247
|
eventType: 'ui',
|
|
240
248
|
attributes: { ...context,
|
|
249
|
+
id,
|
|
241
250
|
definitionId: definitionId || '',
|
|
242
251
|
extensionKey: extensionKey || '',
|
|
243
|
-
|
|
252
|
+
previewDisplay,
|
|
244
253
|
previewInvokeMethod
|
|
245
254
|
}
|
|
246
255
|
});
|
|
247
|
-
export const uiHoverCardDismissedEvent = (
|
|
256
|
+
export const uiHoverCardDismissedEvent = (id, previewDisplay, hoverTime, definitionId, extensionKey, previewInvokeMethod) => ({
|
|
248
257
|
action: 'dismissed',
|
|
249
258
|
actionSubject: 'hoverCard',
|
|
250
259
|
eventType: 'ui',
|
|
251
260
|
attributes: { ...context,
|
|
261
|
+
id,
|
|
252
262
|
definitionId: definitionId || '',
|
|
253
263
|
extensionKey: extensionKey || '',
|
|
254
264
|
hoverTime,
|
|
255
|
-
|
|
265
|
+
previewDisplay,
|
|
256
266
|
previewInvokeMethod
|
|
257
267
|
}
|
|
258
268
|
});
|
|
259
|
-
export const uiHoverCardOpenLinkClickedEvent = (previewDisplay, definitionId, extensionKey, previewInvokeMethod) => ({
|
|
269
|
+
export const uiHoverCardOpenLinkClickedEvent = (id, previewDisplay, definitionId, extensionKey, previewInvokeMethod) => ({
|
|
260
270
|
action: 'clicked',
|
|
261
271
|
actionSubject: 'button',
|
|
262
272
|
actionSubjectId: 'shortcutGoToLink',
|
|
263
273
|
eventType: 'ui',
|
|
264
274
|
attributes: { ...context,
|
|
275
|
+
id,
|
|
265
276
|
definitionId: definitionId || '',
|
|
266
277
|
extensionKey: extensionKey || '',
|
|
267
278
|
previewDisplay,
|
package/dist/es2019/version.json
CHANGED
|
@@ -36,7 +36,8 @@ const DateTime = ({
|
|
|
36
36
|
date,
|
|
37
37
|
overrideCss,
|
|
38
38
|
type,
|
|
39
|
-
testId = 'smart-element-date-time'
|
|
39
|
+
testId = 'smart-element-date-time',
|
|
40
|
+
text
|
|
40
41
|
}) => {
|
|
41
42
|
const {
|
|
42
43
|
formatRelativeTime,
|
|
@@ -74,7 +75,7 @@ const DateTime = ({
|
|
|
74
75
|
"data-separator": true,
|
|
75
76
|
"data-smart-element-date-time": true,
|
|
76
77
|
"data-testid": testId
|
|
77
|
-
}, jsx(FormattedMessage, _extends({}, typeToDescriptorMap[type][typeVariant], {
|
|
78
|
+
}, text ? `${text} ${context}` : jsx(FormattedMessage, _extends({}, typeToDescriptorMap[type][typeVariant], {
|
|
78
79
|
values: {
|
|
79
80
|
context
|
|
80
81
|
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import React, { useCallback, useEffect, useMemo } from 'react';
|
|
2
|
+
import { extractMetadata } from '../../../extractors/hover/extractMetadata';
|
|
3
|
+
import { getSimulatedMetadata, HOVER_CARD_ANALYTICS_DISPLAY } from '../utils';
|
|
4
|
+
import extractPreview from '../../../extractors/flexible/extract-preview';
|
|
5
|
+
import { ActionName, SmartLinkSize, SmartLinkTheme } from '../../../constants';
|
|
6
|
+
import FlexibleCard from '../../FlexibleCard';
|
|
7
|
+
import { FooterBlock, MetadataBlock, PreviewBlock, SnippetBlock, TitleBlock } from '../../FlexibleCard/components/blocks';
|
|
8
|
+
import { isSpecialEvent } from '../../../utils';
|
|
9
|
+
import ShortcutIcon from '@atlaskit/icon/glyph/shortcut';
|
|
10
|
+
import { getExtensionKey } from '../../../state/helpers';
|
|
11
|
+
const flexibleUiOptions = {
|
|
12
|
+
hideElevation: true,
|
|
13
|
+
size: SmartLinkSize.Large,
|
|
14
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
15
|
+
theme: SmartLinkTheme.Black
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
const getOpenAction = (url, analytics) => ({
|
|
19
|
+
name: ActionName.CustomAction,
|
|
20
|
+
icon: /*#__PURE__*/React.createElement(ShortcutIcon, {
|
|
21
|
+
label: "open in new tab",
|
|
22
|
+
size: "medium"
|
|
23
|
+
}),
|
|
24
|
+
iconPosition: 'before',
|
|
25
|
+
onClick: () => {
|
|
26
|
+
window.open(url, '_blank');
|
|
27
|
+
analytics.ui.hoverCardOpenLinkClickedEvent('card');
|
|
28
|
+
},
|
|
29
|
+
testId: 'hover-card-open-button'
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
const toFooterActions = cardActions => cardActions.map(action => ({
|
|
33
|
+
content: action.text,
|
|
34
|
+
name: ActionName.CustomAction,
|
|
35
|
+
onClick: () => action.invoke(),
|
|
36
|
+
testId: action.id
|
|
37
|
+
}));
|
|
38
|
+
|
|
39
|
+
const HoverCardContent = ({
|
|
40
|
+
analytics,
|
|
41
|
+
cardActions = [],
|
|
42
|
+
cardState,
|
|
43
|
+
onResolve,
|
|
44
|
+
renderers,
|
|
45
|
+
url
|
|
46
|
+
}) => {
|
|
47
|
+
var _cardState$details;
|
|
48
|
+
|
|
49
|
+
useEffect(() => {
|
|
50
|
+
// Since hover preview only render on resolved status,
|
|
51
|
+
// there is no need to check for statuses.
|
|
52
|
+
analytics.ui.renderSuccessEvent(HOVER_CARD_ANALYTICS_DISPLAY, cardState.status);
|
|
53
|
+
}, [analytics.ui, cardState.status]);
|
|
54
|
+
const extensionKey = useMemo(() => getExtensionKey(cardState.details), [cardState.details]);
|
|
55
|
+
const onClick = useCallback(event => {
|
|
56
|
+
const isModifierKeyPressed = isSpecialEvent(event);
|
|
57
|
+
analytics.ui.cardClickedEvent(undefined, HOVER_CARD_ANALYTICS_DISPLAY, cardState.status, undefined, undefined, isModifierKeyPressed);
|
|
58
|
+
}, [cardState.status, analytics.ui]);
|
|
59
|
+
const titleActions = useMemo(() => [getOpenAction(url, analytics)], [url, analytics]);
|
|
60
|
+
const footerActions = useMemo(() => toFooterActions(cardActions), [cardActions]); //TODO: EDM-3224 deleted simulated and use real JsonLd
|
|
61
|
+
|
|
62
|
+
const {
|
|
63
|
+
primary,
|
|
64
|
+
secondary
|
|
65
|
+
} = extractMetadata(getSimulatedMetadata(extensionKey));
|
|
66
|
+
const data = (_cardState$details = cardState.details) === null || _cardState$details === void 0 ? void 0 : _cardState$details.data;
|
|
67
|
+
const body = data && extractPreview(data) ? /*#__PURE__*/React.createElement(PreviewBlock, null) : /*#__PURE__*/React.createElement(SnippetBlock, null);
|
|
68
|
+
return /*#__PURE__*/React.createElement(FlexibleCard, {
|
|
69
|
+
cardState: cardState,
|
|
70
|
+
onClick: onClick,
|
|
71
|
+
onResolve: onResolve,
|
|
72
|
+
renderers: renderers,
|
|
73
|
+
ui: flexibleUiOptions,
|
|
74
|
+
url: url
|
|
75
|
+
}, /*#__PURE__*/React.createElement(TitleBlock, {
|
|
76
|
+
actions: titleActions
|
|
77
|
+
}), /*#__PURE__*/React.createElement(MetadataBlock, {
|
|
78
|
+
primary: primary,
|
|
79
|
+
secondary: secondary
|
|
80
|
+
}), body, /*#__PURE__*/React.createElement(FooterBlock, {
|
|
81
|
+
actions: footerActions
|
|
82
|
+
}));
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
export default HoverCardContent;
|