@atlaskit/smart-card 26.47.0 → 26.48.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/dist/cjs/extractors/common/meta/extractIsTrusted.js +0 -7
- package/dist/cjs/i18n/cs.js +17 -21
- package/dist/cjs/i18n/da.js +17 -21
- package/dist/cjs/i18n/de.js +17 -21
- package/dist/cjs/i18n/en.js +17 -21
- package/dist/cjs/i18n/en_GB.js +17 -21
- package/dist/cjs/i18n/en_ZZ.js +17 -21
- package/dist/cjs/i18n/es.js +17 -21
- package/dist/cjs/i18n/fi.js +17 -21
- package/dist/cjs/i18n/fr.js +17 -21
- package/dist/cjs/i18n/hu.js +17 -21
- package/dist/cjs/i18n/it.js +17 -21
- package/dist/cjs/i18n/ja.js +17 -21
- package/dist/cjs/i18n/ko.js +17 -21
- package/dist/cjs/i18n/nb.js +17 -21
- package/dist/cjs/i18n/nl.js +17 -21
- package/dist/cjs/i18n/pl.js +17 -21
- package/dist/cjs/i18n/pt_BR.js +17 -21
- package/dist/cjs/i18n/ru.js +17 -21
- package/dist/cjs/i18n/sv.js +17 -21
- package/dist/cjs/i18n/th.js +17 -21
- package/dist/cjs/i18n/tr.js +17 -21
- package/dist/cjs/i18n/uk.js +17 -21
- package/dist/cjs/i18n/vi.js +17 -21
- package/dist/cjs/i18n/zh.js +13 -21
- package/dist/cjs/i18n/zh_TW.js +17 -21
- package/dist/cjs/state/hooks/use-ai-summary/ai-summary-service/index.js +179 -0
- package/dist/cjs/state/hooks/use-ai-summary/ai-summary-service/store.js +11 -0
- package/dist/cjs/state/hooks/use-ai-summary/ai-summary-service/types.js +5 -0
- package/dist/cjs/state/hooks/use-ai-summary/ai-summary-service/utils.js +131 -0
- package/dist/cjs/state/hooks/use-ai-summary/index.js +44 -0
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/utils/index.js +0 -5
- package/dist/cjs/view/FlexibleCard/components/blocks/ai-summary-block/resolved/index.js +12 -0
- package/dist/cjs/view/HoverCard/components/ContentContainer.js +43 -0
- package/dist/cjs/view/HoverCard/components/CustomPopupContainer.js +7 -1
- package/dist/cjs/view/HoverCard/components/HoverCardContent.js +18 -3
- package/dist/cjs/view/HoverCard/components/views/resolved/index.js +6 -7
- package/dist/cjs/view/HoverCard/styled.js +4 -2
- package/dist/cjs/view/HoverCard/utils.js +7 -1
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/es2019/extractors/common/meta/extractIsTrusted.js +0 -7
- package/dist/es2019/i18n/cs.js +17 -21
- package/dist/es2019/i18n/da.js +17 -21
- package/dist/es2019/i18n/de.js +17 -21
- package/dist/es2019/i18n/en.js +17 -21
- package/dist/es2019/i18n/en_GB.js +17 -21
- package/dist/es2019/i18n/en_ZZ.js +17 -21
- package/dist/es2019/i18n/es.js +17 -21
- package/dist/es2019/i18n/fi.js +17 -21
- package/dist/es2019/i18n/fr.js +17 -21
- package/dist/es2019/i18n/hu.js +17 -21
- package/dist/es2019/i18n/it.js +17 -21
- package/dist/es2019/i18n/ja.js +17 -21
- package/dist/es2019/i18n/ko.js +17 -21
- package/dist/es2019/i18n/nb.js +17 -21
- package/dist/es2019/i18n/nl.js +17 -21
- package/dist/es2019/i18n/pl.js +17 -21
- package/dist/es2019/i18n/pt_BR.js +17 -21
- package/dist/es2019/i18n/ru.js +17 -21
- package/dist/es2019/i18n/sv.js +17 -21
- package/dist/es2019/i18n/th.js +17 -21
- package/dist/es2019/i18n/tr.js +17 -21
- package/dist/es2019/i18n/uk.js +17 -21
- package/dist/es2019/i18n/vi.js +17 -21
- package/dist/es2019/i18n/zh.js +13 -21
- package/dist/es2019/i18n/zh_TW.js +17 -21
- package/dist/es2019/state/hooks/use-ai-summary/ai-summary-service/index.js +71 -0
- package/dist/es2019/state/hooks/use-ai-summary/ai-summary-service/store.js +5 -0
- package/dist/es2019/state/hooks/use-ai-summary/ai-summary-service/types.js +1 -0
- package/dist/es2019/state/hooks/use-ai-summary/ai-summary-service/utils.js +55 -0
- package/dist/es2019/state/hooks/use-ai-summary/index.js +35 -0
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/utils/index.js +0 -5
- package/dist/es2019/view/FlexibleCard/components/blocks/ai-summary-block/resolved/index.js +15 -1
- package/dist/es2019/view/HoverCard/components/ContentContainer.js +33 -0
- package/dist/es2019/view/HoverCard/components/CustomPopupContainer.js +8 -1
- package/dist/es2019/view/HoverCard/components/HoverCardContent.js +18 -6
- package/dist/es2019/view/HoverCard/components/views/resolved/index.js +6 -8
- package/dist/es2019/view/HoverCard/styled.js +4 -1
- package/dist/es2019/view/HoverCard/utils.js +4 -0
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/esm/extractors/common/meta/extractIsTrusted.js +0 -7
- package/dist/esm/i18n/cs.js +17 -21
- package/dist/esm/i18n/da.js +17 -21
- package/dist/esm/i18n/de.js +17 -21
- package/dist/esm/i18n/en.js +17 -21
- package/dist/esm/i18n/en_GB.js +17 -21
- package/dist/esm/i18n/en_ZZ.js +17 -21
- package/dist/esm/i18n/es.js +17 -21
- package/dist/esm/i18n/fi.js +17 -21
- package/dist/esm/i18n/fr.js +17 -21
- package/dist/esm/i18n/hu.js +17 -21
- package/dist/esm/i18n/it.js +17 -21
- package/dist/esm/i18n/ja.js +17 -21
- package/dist/esm/i18n/ko.js +17 -21
- package/dist/esm/i18n/nb.js +17 -21
- package/dist/esm/i18n/nl.js +17 -21
- package/dist/esm/i18n/pl.js +17 -21
- package/dist/esm/i18n/pt_BR.js +17 -21
- package/dist/esm/i18n/ru.js +17 -21
- package/dist/esm/i18n/sv.js +17 -21
- package/dist/esm/i18n/th.js +17 -21
- package/dist/esm/i18n/tr.js +17 -21
- package/dist/esm/i18n/uk.js +17 -21
- package/dist/esm/i18n/vi.js +17 -21
- package/dist/esm/i18n/zh.js +13 -21
- package/dist/esm/i18n/zh_TW.js +17 -21
- package/dist/esm/state/hooks/use-ai-summary/ai-summary-service/index.js +172 -0
- package/dist/esm/state/hooks/use-ai-summary/ai-summary-service/store.js +5 -0
- package/dist/esm/state/hooks/use-ai-summary/ai-summary-service/types.js +1 -0
- package/dist/esm/state/hooks/use-ai-summary/ai-summary-service/utils.js +123 -0
- package/dist/esm/state/hooks/use-ai-summary/index.js +37 -0
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/utils/index.js +0 -5
- package/dist/esm/view/FlexibleCard/components/blocks/ai-summary-block/resolved/index.js +13 -1
- package/dist/esm/view/HoverCard/components/ContentContainer.js +36 -0
- package/dist/esm/view/HoverCard/components/CustomPopupContainer.js +8 -1
- package/dist/esm/view/HoverCard/components/HoverCardContent.js +21 -6
- package/dist/esm/view/HoverCard/components/views/resolved/index.js +6 -7
- package/dist/esm/view/HoverCard/styled.js +4 -1
- package/dist/esm/view/HoverCard/utils.js +6 -0
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/types/i18n/cs.d.ts +10 -14
- package/dist/types/i18n/da.d.ts +10 -14
- package/dist/types/i18n/de.d.ts +10 -14
- package/dist/types/i18n/en.d.ts +10 -14
- package/dist/types/i18n/en_GB.d.ts +10 -14
- package/dist/types/i18n/en_ZZ.d.ts +10 -14
- package/dist/types/i18n/es.d.ts +10 -14
- package/dist/types/i18n/fi.d.ts +10 -14
- package/dist/types/i18n/fr.d.ts +10 -14
- package/dist/types/i18n/hu.d.ts +10 -14
- package/dist/types/i18n/it.d.ts +10 -14
- package/dist/types/i18n/ja.d.ts +10 -14
- package/dist/types/i18n/ko.d.ts +10 -14
- package/dist/types/i18n/nb.d.ts +10 -14
- package/dist/types/i18n/nl.d.ts +10 -14
- package/dist/types/i18n/pl.d.ts +10 -14
- package/dist/types/i18n/pt_BR.d.ts +10 -14
- package/dist/types/i18n/ru.d.ts +10 -14
- package/dist/types/i18n/sv.d.ts +10 -14
- package/dist/types/i18n/th.d.ts +10 -14
- package/dist/types/i18n/tr.d.ts +10 -14
- package/dist/types/i18n/uk.d.ts +10 -14
- package/dist/types/i18n/vi.d.ts +10 -14
- package/dist/types/i18n/zh.d.ts +6 -14
- package/dist/types/i18n/zh_TW.d.ts +10 -14
- package/dist/types/state/hooks/use-ai-summary/ai-summary-service/index.d.ts +11 -0
- package/dist/types/state/hooks/use-ai-summary/ai-summary-service/store.d.ts +3 -0
- package/dist/types/state/hooks/use-ai-summary/ai-summary-service/types.d.ts +158 -0
- package/dist/types/state/hooks/use-ai-summary/ai-summary-service/utils.d.ts +3 -0
- package/dist/types/state/hooks/use-ai-summary/index.d.ts +9 -0
- package/dist/types/utils/index.d.ts +1 -1
- package/dist/types/view/HoverCard/components/ContentContainer.d.ts +4 -0
- package/dist/types/view/HoverCard/components/CustomPopupContainer.d.ts +5 -0
- package/dist/types/view/HoverCard/components/views/resolved/types.d.ts +3 -0
- package/dist/types/view/HoverCard/styled.d.ts +1 -0
- package/dist/types/view/HoverCard/types.d.ts +5 -0
- package/dist/types/view/HoverCard/utils.d.ts +2 -1
- package/dist/types-ts4.5/i18n/cs.d.ts +10 -14
- package/dist/types-ts4.5/i18n/da.d.ts +10 -14
- package/dist/types-ts4.5/i18n/de.d.ts +10 -14
- package/dist/types-ts4.5/i18n/en.d.ts +10 -14
- package/dist/types-ts4.5/i18n/en_GB.d.ts +10 -14
- package/dist/types-ts4.5/i18n/en_ZZ.d.ts +10 -14
- package/dist/types-ts4.5/i18n/es.d.ts +10 -14
- package/dist/types-ts4.5/i18n/fi.d.ts +10 -14
- package/dist/types-ts4.5/i18n/fr.d.ts +10 -14
- package/dist/types-ts4.5/i18n/hu.d.ts +10 -14
- package/dist/types-ts4.5/i18n/it.d.ts +10 -14
- package/dist/types-ts4.5/i18n/ja.d.ts +10 -14
- package/dist/types-ts4.5/i18n/ko.d.ts +10 -14
- package/dist/types-ts4.5/i18n/nb.d.ts +10 -14
- package/dist/types-ts4.5/i18n/nl.d.ts +10 -14
- package/dist/types-ts4.5/i18n/pl.d.ts +10 -14
- package/dist/types-ts4.5/i18n/pt_BR.d.ts +10 -14
- package/dist/types-ts4.5/i18n/ru.d.ts +10 -14
- package/dist/types-ts4.5/i18n/sv.d.ts +10 -14
- package/dist/types-ts4.5/i18n/th.d.ts +10 -14
- package/dist/types-ts4.5/i18n/tr.d.ts +10 -14
- package/dist/types-ts4.5/i18n/uk.d.ts +10 -14
- package/dist/types-ts4.5/i18n/vi.d.ts +10 -14
- package/dist/types-ts4.5/i18n/zh.d.ts +6 -14
- package/dist/types-ts4.5/i18n/zh_TW.d.ts +10 -14
- package/dist/types-ts4.5/state/hooks/use-ai-summary/ai-summary-service/index.d.ts +11 -0
- package/dist/types-ts4.5/state/hooks/use-ai-summary/ai-summary-service/store.d.ts +3 -0
- package/dist/types-ts4.5/state/hooks/use-ai-summary/ai-summary-service/types.d.ts +158 -0
- package/dist/types-ts4.5/state/hooks/use-ai-summary/ai-summary-service/utils.d.ts +3 -0
- package/dist/types-ts4.5/state/hooks/use-ai-summary/index.d.ts +9 -0
- package/dist/types-ts4.5/utils/index.d.ts +1 -1
- package/dist/types-ts4.5/view/HoverCard/components/ContentContainer.d.ts +4 -0
- package/dist/types-ts4.5/view/HoverCard/components/CustomPopupContainer.d.ts +5 -0
- package/dist/types-ts4.5/view/HoverCard/components/views/resolved/types.d.ts +3 -0
- package/dist/types-ts4.5/view/HoverCard/styled.d.ts +1 -0
- package/dist/types-ts4.5/view/HoverCard/types.d.ts +5 -0
- package/dist/types-ts4.5/view/HoverCard/utils.d.ts +2 -1
- package/package.json +7 -12
package/dist/esm/i18n/vi.js
CHANGED
|
@@ -10,6 +10,10 @@ export default {
|
|
|
10
10
|
'fabric.linking.access_exists_description': 'Yêu cầu quyền truy cập để xem nội dung này từ {hostname}.',
|
|
11
11
|
'fabric.linking.actions': 'Hành động',
|
|
12
12
|
'fabric.linking.add_account': 'Thêm tài khoản',
|
|
13
|
+
'fabric.linking.ai_summarize': 'Tóm tắt',
|
|
14
|
+
'fabric.linking.ai_summarized': 'Do Atlassian Intelligence tóm tắt',
|
|
15
|
+
'fabric.linking.ai_summarized_info': 'Chất lượng thông tin có thể khác nhau. <a>Tìm hiểu thêm</a>',
|
|
16
|
+
'fabric.linking.ai_summarizing': 'Atlassian Intelligence đang xử lý...',
|
|
13
17
|
'fabric.linking.assigned_to': 'Đã chỉ định cho {context}',
|
|
14
18
|
'fabric.linking.cancel': 'Hủy',
|
|
15
19
|
'fabric.linking.cannot_connect': 'Không thể kết nối, hãy thử lại',
|
|
@@ -34,16 +38,15 @@ export default {
|
|
|
34
38
|
'fabric.linking.create_on_relative': 'Đã tạo {context}',
|
|
35
39
|
'fabric.linking.created_by': 'Được tạo bởi {context}',
|
|
36
40
|
'fabric.linking.delete': 'Xóa',
|
|
37
|
-
'fabric.linking.
|
|
38
|
-
'fabric.linking.
|
|
39
|
-
'fabric.linking.
|
|
41
|
+
'fabric.linking.direct_access': 'Tham gia ngay',
|
|
42
|
+
'fabric.linking.direct_access_description': 'Nhóm của bạn sử dụng {product} để cộng tác và bạn có thể bắt đầu sử dụng sản phẩm này ngay lập tức!',
|
|
43
|
+
'fabric.linking.direct_access_title': 'Tham gia {product} để xem nội dung này',
|
|
40
44
|
'fabric.linking.download': 'Tải xuống',
|
|
41
45
|
'fabric.linking.edit': 'Chỉnh sửa',
|
|
42
46
|
'fabric.linking.follow': 'Theo dõi',
|
|
43
47
|
'fabric.linking.forbidden_access': 'Quyền truy cập của bạn bị cấm',
|
|
44
|
-
'fabric.linking.forbidden_description': '
|
|
45
|
-
'fabric.linking.
|
|
46
|
-
'fabric.linking.forbidden_title_crossjoin': 'Bạn không có quyền truy cập nội dung này',
|
|
48
|
+
'fabric.linking.forbidden_description': 'Hãy liên hệ với quản trị viên để yêu cầu cấp quyền truy cập vào {hostname}.',
|
|
49
|
+
'fabric.linking.forbidden_title': 'Bạn không có quyền truy cập nội dung này',
|
|
47
50
|
'fabric.linking.generic_error_message': 'Đã xảy ra lỗi',
|
|
48
51
|
'fabric.linking.go_back': 'Quay lại',
|
|
49
52
|
'fabric.linking.invalid_permissions': 'Nội dung bị hạn chế',
|
|
@@ -57,11 +60,9 @@ export default {
|
|
|
57
60
|
'fabric.linking.modified_on_absolute': 'Đã cập nhật trên {context}',
|
|
58
61
|
'fabric.linking.modified_on_relative': 'Đã cập nhật {context}',
|
|
59
62
|
'fabric.linking.more_actions': 'Hành động khác',
|
|
60
|
-
'fabric.linking.
|
|
61
|
-
'fabric.linking.not_found_description': '
|
|
62
|
-
'fabric.linking.
|
|
63
|
-
'fabric.linking.not_found_title': 'Ôi! Chúng tôi không thể tìm thấy liên kết này!',
|
|
64
|
-
'fabric.linking.not_found_title_crossjoin': 'Chúng tôi không thể hiển thị cho bạn trang {product} này',
|
|
63
|
+
'fabric.linking.no_access_title': 'Tham gia {product} để xem nội dung này',
|
|
64
|
+
'fabric.linking.not_found_description': 'Trang này không tồn tại hoặc có thể đã thay đổi sau khi liên kết này được thêm vào.',
|
|
65
|
+
'fabric.linking.not_found_title': 'Chúng tôi không thể hiển thị cho bạn trang {product} này',
|
|
65
66
|
'fabric.linking.open_issue_in_jira': 'Mở vấn đề trong Jira',
|
|
66
67
|
'fabric.linking.open_link_in_a_new_tab': 'Mở liên kết trong tab mới',
|
|
67
68
|
'fabric.linking.owned_by': 'Sở hữu bởi {context}',
|
|
@@ -85,18 +86,13 @@ export default {
|
|
|
85
86
|
'fabric.linking.related': 'Có liên quan',
|
|
86
87
|
'fabric.linking.related_work_items_not_found': 'Liên kết này chưa được nhắc đến ở bất cứ đâu.',
|
|
87
88
|
'fabric.linking.request_access': 'Yêu cầu cấp quyền truy cập',
|
|
88
|
-
'fabric.linking.
|
|
89
|
-
'fabric.linking.
|
|
90
|
-
'fabric.linking.
|
|
91
|
-
'fabric.linking.
|
|
92
|
-
'fabric.linking.request_access_pending_crossjoin': 'Đang chờ phê duyệt',
|
|
93
|
-
'fabric.linking.request_access_pending_description': 'Đang chờ xử lý yêu cầu quyền truy cập của bạn.',
|
|
94
|
-
'fabric.linking.request_access_pending_description_crossjoin': 'Yêu cầu quyền truy cập {hostname} của bạn đang chờ quản trị viên phê duyệt.',
|
|
95
|
-
'fabric.linking.request_access_pending_title_crossjoin': 'Đang chờ cấp quyền truy cập {product}',
|
|
89
|
+
'fabric.linking.request_access_description': 'Nhóm của bạn sử dụng {product} để cộng tác. Hãy gửi yêu cầu cho quản trị viên của bạn để được cấp quyền truy cập.',
|
|
90
|
+
'fabric.linking.request_access_pending': 'Đang chờ phê duyệt',
|
|
91
|
+
'fabric.linking.request_access_pending_description': 'Yêu cầu quyền truy cập {hostname} của bạn đang chờ quản trị viên phê duyệt.',
|
|
92
|
+
'fabric.linking.request_access_pending_title': 'Đang chờ cấp quyền truy cập {product}',
|
|
96
93
|
'fabric.linking.request_access_to_view': 'Yêu cầu quyền truy cập vào {context} để xem vấn đề này',
|
|
97
94
|
'fabric.linking.request_denied': 'Yêu cầu quyền truy cập của bạn đã bị từ chối',
|
|
98
|
-
'fabric.linking.request_denied_description': '
|
|
99
|
-
'fabric.linking.request_denied_description_crossjoin': 'Quản trị viên không chấp thuận yêu cầu xem các trang {product} từ {hostname} của bạn.',
|
|
95
|
+
'fabric.linking.request_denied_description': 'Quản trị viên không chấp thuận yêu cầu xem các trang {product} từ {hostname} của bạn.',
|
|
100
96
|
'fabric.linking.restricted_link': 'Liên kết bị hạn chế, thử một tài khoản khác',
|
|
101
97
|
'fabric.linking.retry': 'Thử lại',
|
|
102
98
|
'fabric.linking.save': 'Lưu',
|
package/dist/esm/i18n/zh.js
CHANGED
|
@@ -10,6 +10,7 @@ export default {
|
|
|
10
10
|
'fabric.linking.access_exists_description': '要从 {hostname} 查看此内容,请申请访问权限。',
|
|
11
11
|
'fabric.linking.actions': '操作',
|
|
12
12
|
'fabric.linking.add_account': '添加帐户',
|
|
13
|
+
'fabric.linking.ai_summarize': '汇总',
|
|
13
14
|
'fabric.linking.assigned_to': '已分配给 {context}',
|
|
14
15
|
'fabric.linking.cancel': '取消',
|
|
15
16
|
'fabric.linking.cannot_connect': '无法连接,请重试',
|
|
@@ -34,16 +35,14 @@ export default {
|
|
|
34
35
|
'fabric.linking.create_on_relative': '创建时间:{context}',
|
|
35
36
|
'fabric.linking.created_by': '创建者:{context}',
|
|
36
37
|
'fabric.linking.delete': '删除',
|
|
37
|
-
'fabric.linking.
|
|
38
|
-
'fabric.linking.
|
|
39
|
-
'fabric.linking.direct_access_title_crossjoin': '加入 {product} 即可查看此内容',
|
|
38
|
+
'fabric.linking.direct_access_description': '您的团队使用 {product} 进行协作,而您可以立即开始使用该产品!',
|
|
39
|
+
'fabric.linking.direct_access_title': '加入 {product} 即可查看此内容',
|
|
40
40
|
'fabric.linking.download': '下载',
|
|
41
41
|
'fabric.linking.edit': '编辑',
|
|
42
42
|
'fabric.linking.follow': '关注',
|
|
43
43
|
'fabric.linking.forbidden_access': '您的访问已被禁止',
|
|
44
|
-
'fabric.linking.forbidden_description': '
|
|
45
|
-
'fabric.linking.
|
|
46
|
-
'fabric.linking.forbidden_title_crossjoin': '您无权访问此内容',
|
|
44
|
+
'fabric.linking.forbidden_description': '请联系您的管理员申请对 {hostname} 的访问权限。',
|
|
45
|
+
'fabric.linking.forbidden_title': '您无权访问此内容',
|
|
47
46
|
'fabric.linking.generic_error_message': '出错了',
|
|
48
47
|
'fabric.linking.go_back': '返回',
|
|
49
48
|
'fabric.linking.invalid_permissions': '受限内容',
|
|
@@ -57,11 +56,9 @@ export default {
|
|
|
57
56
|
'fabric.linking.modified_on_absolute': '更新时间:{context}',
|
|
58
57
|
'fabric.linking.modified_on_relative': '更新时间:{context}',
|
|
59
58
|
'fabric.linking.more_actions': '更多操作',
|
|
60
|
-
'fabric.linking.
|
|
61
|
-
'fabric.linking.not_found_description': '
|
|
62
|
-
'fabric.linking.
|
|
63
|
-
'fabric.linking.not_found_title': '噢。找不到此链接!',
|
|
64
|
-
'fabric.linking.not_found_title_crossjoin': '无法显示此 {product} 页面',
|
|
59
|
+
'fabric.linking.no_access_title': '加入 {product} 即可查看此内容',
|
|
60
|
+
'fabric.linking.not_found_description': '该页面不存在或者在添加此链接后可能已发生更改。',
|
|
61
|
+
'fabric.linking.not_found_title': '无法显示此 {product} 页面',
|
|
65
62
|
'fabric.linking.open_issue_in_jira': '在 Jira 中打开事务',
|
|
66
63
|
'fabric.linking.open_link_in_a_new_tab': '在新选项卡中打开链接',
|
|
67
64
|
'fabric.linking.owned_by': '负责人:{context}',
|
|
@@ -85,18 +82,13 @@ export default {
|
|
|
85
82
|
'fabric.linking.related': '相关',
|
|
86
83
|
'fabric.linking.related_work_items_not_found': '此链接在其他任何地方均未提及。',
|
|
87
84
|
'fabric.linking.request_access': '请求访问',
|
|
88
|
-
'fabric.linking.
|
|
89
|
-
'fabric.linking.
|
|
90
|
-
'fabric.linking.
|
|
91
|
-
'fabric.linking.
|
|
92
|
-
'fabric.linking.request_access_pending_crossjoin': '待批准',
|
|
93
|
-
'fabric.linking.request_access_pending_description': '您的访问请求正等待处理。',
|
|
94
|
-
'fabric.linking.request_access_pending_description_crossjoin': '您对 {hostname} 的访问请求正在等待管理员批准。',
|
|
95
|
-
'fabric.linking.request_access_pending_title_crossjoin': '对 {product} 的访问权限正在等待处理',
|
|
85
|
+
'fabric.linking.request_access_description': '您的团队使用 {product} 进行协作。请向您的管理员发送访问请求。',
|
|
86
|
+
'fabric.linking.request_access_pending': '待批准',
|
|
87
|
+
'fabric.linking.request_access_pending_description': '您对 {hostname} 的访问请求正在等待管理员批准。',
|
|
88
|
+
'fabric.linking.request_access_pending_title': '对 {product} 的访问权限正在等待处理',
|
|
96
89
|
'fabric.linking.request_access_to_view': '请求访问{context}以查看此事务',
|
|
97
90
|
'fabric.linking.request_denied': '您的访问请求已被拒绝',
|
|
98
|
-
'fabric.linking.request_denied_description': '
|
|
99
|
-
'fabric.linking.request_denied_description_crossjoin': '您的管理员未批准您从 {hostname} 查看 {product} 页面的请求。',
|
|
91
|
+
'fabric.linking.request_denied_description': '您的管理员未批准您从 {hostname} 查看 {product} 页面的请求。',
|
|
100
92
|
'fabric.linking.restricted_link': '受限链接,请尝试其他帐户',
|
|
101
93
|
'fabric.linking.retry': '重试',
|
|
102
94
|
'fabric.linking.save': '保存',
|
package/dist/esm/i18n/zh_TW.js
CHANGED
|
@@ -10,6 +10,10 @@ export default {
|
|
|
10
10
|
'fabric.linking.access_exists_description': '要求存取權以檢視 {hostname} 的這項內容。',
|
|
11
11
|
'fabric.linking.actions': '動作',
|
|
12
12
|
'fabric.linking.add_account': '新增帳戶',
|
|
13
|
+
'fabric.linking.ai_summarize': '總結',
|
|
14
|
+
'fabric.linking.ai_summarized': '由 Atlassian Intelligence 總結',
|
|
15
|
+
'fabric.linking.ai_summarized_info': '資訊品質可能會有變化。<a>深入了解</a>',
|
|
16
|
+
'fabric.linking.ai_summarizing': 'Atlassian Intelligence 運作中...',
|
|
13
17
|
'fabric.linking.assigned_to': '已指派給 {context}',
|
|
14
18
|
'fabric.linking.cancel': '取消',
|
|
15
19
|
'fabric.linking.cannot_connect': '無法連結,請再試一次',
|
|
@@ -34,16 +38,15 @@ export default {
|
|
|
34
38
|
'fabric.linking.create_on_relative': '建立時間:{context}',
|
|
35
39
|
'fabric.linking.created_by': '建立者:{context}',
|
|
36
40
|
'fabric.linking.delete': '刪除',
|
|
37
|
-
'fabric.linking.
|
|
38
|
-
'fabric.linking.
|
|
39
|
-
'fabric.linking.
|
|
41
|
+
'fabric.linking.direct_access': '立即加入',
|
|
42
|
+
'fabric.linking.direct_access_description': '您的團隊使用 {product} 協作,您可以立即開始使用!',
|
|
43
|
+
'fabric.linking.direct_access_title': '加入 {product} 以檢視此內容',
|
|
40
44
|
'fabric.linking.download': '下載',
|
|
41
45
|
'fabric.linking.edit': '編輯',
|
|
42
46
|
'fabric.linking.follow': '追蹤',
|
|
43
47
|
'fabric.linking.forbidden_access': '您的存取遭拒',
|
|
44
|
-
'fabric.linking.forbidden_description': '
|
|
45
|
-
'fabric.linking.
|
|
46
|
-
'fabric.linking.forbidden_title_crossjoin': '您無法存取此內容',
|
|
48
|
+
'fabric.linking.forbidden_description': '請連絡您的管理員以要求 {hostname} 存取權。',
|
|
49
|
+
'fabric.linking.forbidden_title': '您無法存取此內容',
|
|
47
50
|
'fabric.linking.generic_error_message': '發生錯誤',
|
|
48
51
|
'fabric.linking.go_back': '返回',
|
|
49
52
|
'fabric.linking.invalid_permissions': '受限制的內容',
|
|
@@ -57,11 +60,9 @@ export default {
|
|
|
57
60
|
'fabric.linking.modified_on_absolute': '更新於 {context}',
|
|
58
61
|
'fabric.linking.modified_on_relative': '更新時間:{context}',
|
|
59
62
|
'fabric.linking.more_actions': '更多動作',
|
|
60
|
-
'fabric.linking.
|
|
61
|
-
'fabric.linking.not_found_description': '
|
|
62
|
-
'fabric.linking.
|
|
63
|
-
'fabric.linking.not_found_title': '糟糕,我們找不到此連結!',
|
|
64
|
-
'fabric.linking.not_found_title_crossjoin': '我們無法向您顯示此 {product} 頁面',
|
|
63
|
+
'fabric.linking.no_access_title': '加入 {product} 以檢視此內容',
|
|
64
|
+
'fabric.linking.not_found_description': '該頁面不存在,或在新增此連結後可能已變更。',
|
|
65
|
+
'fabric.linking.not_found_title': '我們無法向您顯示此 {product} 頁面',
|
|
65
66
|
'fabric.linking.open_issue_in_jira': 'Jira 中的待處理議題',
|
|
66
67
|
'fabric.linking.open_link_in_a_new_tab': '在新分頁中開啟連結',
|
|
67
68
|
'fabric.linking.owned_by': '負責人:{context}',
|
|
@@ -85,18 +86,13 @@ export default {
|
|
|
85
86
|
'fabric.linking.related': '相關',
|
|
86
87
|
'fabric.linking.related_work_items_not_found': '這個連結並未在其他任何位置提及。',
|
|
87
88
|
'fabric.linking.request_access': '要求存取權',
|
|
88
|
-
'fabric.linking.
|
|
89
|
-
'fabric.linking.
|
|
90
|
-
'fabric.linking.
|
|
91
|
-
'fabric.linking.
|
|
92
|
-
'fabric.linking.request_access_pending_crossjoin': '待核准',
|
|
93
|
-
'fabric.linking.request_access_pending_description': '您的存取要求擱置中。',
|
|
94
|
-
'fabric.linking.request_access_pending_description_crossjoin': '您的 {hostname} 存取要求正在等待管理員核准。',
|
|
95
|
-
'fabric.linking.request_access_pending_title_crossjoin': '{product} 的存取權待核准',
|
|
89
|
+
'fabric.linking.request_access_description': '您的團隊使用 {product} 來協作。向您的管理員傳送存取要求。',
|
|
90
|
+
'fabric.linking.request_access_pending': '待核准',
|
|
91
|
+
'fabric.linking.request_access_pending_description': '您的 {hostname} 存取要求正在等待管理員核准。',
|
|
92
|
+
'fabric.linking.request_access_pending_title': '{product} 的存取權待核准',
|
|
96
93
|
'fabric.linking.request_access_to_view': '要求存取 {context} 以檢視此議題',
|
|
97
94
|
'fabric.linking.request_denied': '您的存取要求遭拒',
|
|
98
|
-
'fabric.linking.request_denied_description': '
|
|
99
|
-
'fabric.linking.request_denied_description_crossjoin': '您的管理員並未核准您的要求,因此您無法檢視 {hostname} 的 {product} 頁面。',
|
|
95
|
+
'fabric.linking.request_denied_description': '您的管理員並未核准您的要求,因此您無法檢視 {hostname} 的 {product} 頁面。',
|
|
100
96
|
'fabric.linking.restricted_link': '連結受到限制,請嘗試其他帳戶',
|
|
101
97
|
'fabric.linking.retry': '重試',
|
|
102
98
|
'fabric.linking.save': '儲存',
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
2
|
+
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
3
|
+
import _createClass from "@babel/runtime/helpers/createClass";
|
|
4
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
5
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
6
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
7
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
8
|
+
function _asyncIterator(r) { var n, t, o, e = 2; for ("undefined" != typeof Symbol && (t = Symbol.asyncIterator, o = Symbol.iterator); e--;) { if (t && null != (n = r[t])) return n.call(r); if (o && null != (n = r[o])) return new AsyncFromSyncIterator(n.call(r)); t = "@@asyncIterator", o = "@@iterator"; } throw new TypeError("Object is not async iterable"); }
|
|
9
|
+
function AsyncFromSyncIterator(r) { function AsyncFromSyncIteratorContinuation(r) { if (Object(r) !== r) return Promise.reject(new TypeError(r + " is not an object.")); var n = r.done; return Promise.resolve(r.value).then(function (r) { return { value: r, done: n }; }); } return AsyncFromSyncIterator = function AsyncFromSyncIterator(r) { this.s = r, this.n = r.next; }, AsyncFromSyncIterator.prototype = { s: null, n: null, next: function next() { return AsyncFromSyncIteratorContinuation(this.n.apply(this.s, arguments)); }, return: function _return(r) { var n = this.s.return; return void 0 === n ? Promise.resolve({ value: r, done: !0 }) : AsyncFromSyncIteratorContinuation(n.apply(this.s, arguments)); }, throw: function _throw(r) { var n = this.s.return; return void 0 === n ? Promise.reject(r) : AsyncFromSyncIteratorContinuation(n.apply(this.s, arguments)); } }, new AsyncFromSyncIterator(r); }
|
|
10
|
+
import { readStream, addPath } from './utils';
|
|
11
|
+
export var AISummaryService = /*#__PURE__*/function () {
|
|
12
|
+
function AISummaryService(props) {
|
|
13
|
+
var _this = this;
|
|
14
|
+
_classCallCheck(this, AISummaryService);
|
|
15
|
+
_defineProperty(this, "state", {
|
|
16
|
+
content: '',
|
|
17
|
+
status: 'ready'
|
|
18
|
+
});
|
|
19
|
+
_defineProperty(this, "subscribedStateSetter", function (state) {});
|
|
20
|
+
_defineProperty(this, "fetchStream", /*#__PURE__*/function () {
|
|
21
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(summaryStyle) {
|
|
22
|
+
var payload, options, path, requestUrl, response;
|
|
23
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
24
|
+
while (1) switch (_context.prev = _context.next) {
|
|
25
|
+
case 0:
|
|
26
|
+
payload = {
|
|
27
|
+
recipient_agent_named_id: 'summary_agent',
|
|
28
|
+
agent_input: {
|
|
29
|
+
urls: [_this.url],
|
|
30
|
+
summary_style: summaryStyle
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
options = {
|
|
34
|
+
method: 'POST',
|
|
35
|
+
headers: _this.config.headers,
|
|
36
|
+
body: JSON.stringify(payload)
|
|
37
|
+
};
|
|
38
|
+
path = 'chat/v1/invoke_agent/stream';
|
|
39
|
+
requestUrl = addPath(_this.config.baseUrl, path);
|
|
40
|
+
_context.next = 6;
|
|
41
|
+
return fetch(requestUrl, options);
|
|
42
|
+
case 6:
|
|
43
|
+
response = _context.sent;
|
|
44
|
+
return _context.abrupt("return", readStream(response));
|
|
45
|
+
case 8:
|
|
46
|
+
case "end":
|
|
47
|
+
return _context.stop();
|
|
48
|
+
}
|
|
49
|
+
}, _callee);
|
|
50
|
+
}));
|
|
51
|
+
return function (_x) {
|
|
52
|
+
return _ref.apply(this, arguments);
|
|
53
|
+
};
|
|
54
|
+
}());
|
|
55
|
+
var defaultConfig = {
|
|
56
|
+
baseUrl: '/gateway/api/assist',
|
|
57
|
+
headers: {
|
|
58
|
+
'Content-Type': 'application/json;charset=UTF-8',
|
|
59
|
+
'x-experience-id': 'smart-link',
|
|
60
|
+
//TODO: EDM-9337 - Remove the hardcoded Confluence product name and find a way to populate the product name here
|
|
61
|
+
'x-product': props.product || 'confluence'
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
this.config = {
|
|
65
|
+
baseUrl: props.baseUrl || defaultConfig.baseUrl,
|
|
66
|
+
headers: _objectSpread({}, props.headers || defaultConfig.headers)
|
|
67
|
+
};
|
|
68
|
+
this.url = props.url;
|
|
69
|
+
}
|
|
70
|
+
_createClass(AISummaryService, [{
|
|
71
|
+
key: "summariseUrl",
|
|
72
|
+
value: function () {
|
|
73
|
+
var _summariseUrl = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
|
|
74
|
+
var summaryStyle,
|
|
75
|
+
stream,
|
|
76
|
+
bufferContent,
|
|
77
|
+
_iteratorAbruptCompletion,
|
|
78
|
+
_didIteratorError,
|
|
79
|
+
_iteratorError,
|
|
80
|
+
_iterator,
|
|
81
|
+
_step,
|
|
82
|
+
chunk,
|
|
83
|
+
_args2 = arguments;
|
|
84
|
+
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
85
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
86
|
+
case 0:
|
|
87
|
+
summaryStyle = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : 'short';
|
|
88
|
+
this.state = _objectSpread(_objectSpread({}, this.state), {}, {
|
|
89
|
+
status: 'loading'
|
|
90
|
+
});
|
|
91
|
+
this.subscribedStateSetter(this.state);
|
|
92
|
+
_context2.next = 5;
|
|
93
|
+
return this.fetchStream(summaryStyle);
|
|
94
|
+
case 5:
|
|
95
|
+
stream = _context2.sent;
|
|
96
|
+
bufferContent = '';
|
|
97
|
+
_iteratorAbruptCompletion = false;
|
|
98
|
+
_didIteratorError = false;
|
|
99
|
+
_context2.prev = 9;
|
|
100
|
+
_iterator = _asyncIterator(stream);
|
|
101
|
+
case 11:
|
|
102
|
+
_context2.next = 13;
|
|
103
|
+
return _iterator.next();
|
|
104
|
+
case 13:
|
|
105
|
+
if (!(_iteratorAbruptCompletion = !(_step = _context2.sent).done)) {
|
|
106
|
+
_context2.next = 19;
|
|
107
|
+
break;
|
|
108
|
+
}
|
|
109
|
+
chunk = _step.value;
|
|
110
|
+
if (chunk.type === 'ANSWER_PART') {
|
|
111
|
+
bufferContent += chunk.message.content;
|
|
112
|
+
this.subscribedStateSetter(_objectSpread(_objectSpread({}, this.state), {}, {
|
|
113
|
+
content: bufferContent
|
|
114
|
+
}));
|
|
115
|
+
}
|
|
116
|
+
case 16:
|
|
117
|
+
_iteratorAbruptCompletion = false;
|
|
118
|
+
_context2.next = 11;
|
|
119
|
+
break;
|
|
120
|
+
case 19:
|
|
121
|
+
_context2.next = 25;
|
|
122
|
+
break;
|
|
123
|
+
case 21:
|
|
124
|
+
_context2.prev = 21;
|
|
125
|
+
_context2.t0 = _context2["catch"](9);
|
|
126
|
+
_didIteratorError = true;
|
|
127
|
+
_iteratorError = _context2.t0;
|
|
128
|
+
case 25:
|
|
129
|
+
_context2.prev = 25;
|
|
130
|
+
_context2.prev = 26;
|
|
131
|
+
if (!(_iteratorAbruptCompletion && _iterator.return != null)) {
|
|
132
|
+
_context2.next = 30;
|
|
133
|
+
break;
|
|
134
|
+
}
|
|
135
|
+
_context2.next = 30;
|
|
136
|
+
return _iterator.return();
|
|
137
|
+
case 30:
|
|
138
|
+
_context2.prev = 30;
|
|
139
|
+
if (!_didIteratorError) {
|
|
140
|
+
_context2.next = 33;
|
|
141
|
+
break;
|
|
142
|
+
}
|
|
143
|
+
throw _iteratorError;
|
|
144
|
+
case 33:
|
|
145
|
+
return _context2.finish(30);
|
|
146
|
+
case 34:
|
|
147
|
+
return _context2.finish(25);
|
|
148
|
+
case 35:
|
|
149
|
+
this.state = {
|
|
150
|
+
status: 'done',
|
|
151
|
+
content: bufferContent
|
|
152
|
+
};
|
|
153
|
+
this.subscribedStateSetter(this.state);
|
|
154
|
+
case 37:
|
|
155
|
+
case "end":
|
|
156
|
+
return _context2.stop();
|
|
157
|
+
}
|
|
158
|
+
}, _callee2, this, [[9, 21, 25, 35], [26,, 30, 34]]);
|
|
159
|
+
}));
|
|
160
|
+
function summariseUrl() {
|
|
161
|
+
return _summariseUrl.apply(this, arguments);
|
|
162
|
+
}
|
|
163
|
+
return summariseUrl;
|
|
164
|
+
}()
|
|
165
|
+
}, {
|
|
166
|
+
key: "subscribe",
|
|
167
|
+
value: function subscribe(stateSetter) {
|
|
168
|
+
this.subscribedStateSetter = stateSetter;
|
|
169
|
+
}
|
|
170
|
+
}]);
|
|
171
|
+
return AISummaryService;
|
|
172
|
+
}();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import _awaitAsyncGenerator from "@babel/runtime/helpers/awaitAsyncGenerator";
|
|
2
|
+
import _wrapAsyncGenerator from "@babel/runtime/helpers/wrapAsyncGenerator";
|
|
3
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
4
|
+
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
5
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
6
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
7
|
+
export function readStream(_x) {
|
|
8
|
+
return _readStream.apply(this, arguments);
|
|
9
|
+
}
|
|
10
|
+
function _readStream() {
|
|
11
|
+
_readStream = _wrapAsyncGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(response) {
|
|
12
|
+
var reader, doneStreaming, chunkBuffer, _yield$_awaitAsyncGen, value, done, processedChunks, _iterator, _step, chunk, error, _error;
|
|
13
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
14
|
+
while (1) switch (_context.prev = _context.next) {
|
|
15
|
+
case 0:
|
|
16
|
+
reader = getBufferReader(response);
|
|
17
|
+
doneStreaming = false;
|
|
18
|
+
chunkBuffer = '';
|
|
19
|
+
case 3:
|
|
20
|
+
_context.prev = 3;
|
|
21
|
+
_context.next = 6;
|
|
22
|
+
return _awaitAsyncGenerator(reader.read());
|
|
23
|
+
case 6:
|
|
24
|
+
_yield$_awaitAsyncGen = _context.sent;
|
|
25
|
+
value = _yield$_awaitAsyncGen.value;
|
|
26
|
+
done = _yield$_awaitAsyncGen.done;
|
|
27
|
+
doneStreaming = done;
|
|
28
|
+
if (!value) {
|
|
29
|
+
_context.next = 43;
|
|
30
|
+
break;
|
|
31
|
+
}
|
|
32
|
+
_context.prev = 11;
|
|
33
|
+
processedChunks = "".concat(chunkBuffer).concat(value).split('\n'); // assumes that all JSON chunks are separated by a new-line;
|
|
34
|
+
chunkBuffer = '';
|
|
35
|
+
_iterator = _createForOfIteratorHelper(processedChunks);
|
|
36
|
+
_context.prev = 15;
|
|
37
|
+
_iterator.s();
|
|
38
|
+
case 17:
|
|
39
|
+
if ((_step = _iterator.n()).done) {
|
|
40
|
+
_context.next = 29;
|
|
41
|
+
break;
|
|
42
|
+
}
|
|
43
|
+
chunk = _step.value;
|
|
44
|
+
_context.prev = 19;
|
|
45
|
+
_context.next = 22;
|
|
46
|
+
return JSON.parse(chunk);
|
|
47
|
+
case 22:
|
|
48
|
+
_context.next = 27;
|
|
49
|
+
break;
|
|
50
|
+
case 24:
|
|
51
|
+
_context.prev = 24;
|
|
52
|
+
_context.t0 = _context["catch"](19);
|
|
53
|
+
// the chunk may be incomplete, so we'll save it for the next iteration.
|
|
54
|
+
chunkBuffer = chunk;
|
|
55
|
+
case 27:
|
|
56
|
+
_context.next = 17;
|
|
57
|
+
break;
|
|
58
|
+
case 29:
|
|
59
|
+
_context.next = 34;
|
|
60
|
+
break;
|
|
61
|
+
case 31:
|
|
62
|
+
_context.prev = 31;
|
|
63
|
+
_context.t1 = _context["catch"](15);
|
|
64
|
+
_iterator.e(_context.t1);
|
|
65
|
+
case 34:
|
|
66
|
+
_context.prev = 34;
|
|
67
|
+
_iterator.f();
|
|
68
|
+
return _context.finish(34);
|
|
69
|
+
case 37:
|
|
70
|
+
_context.next = 43;
|
|
71
|
+
break;
|
|
72
|
+
case 39:
|
|
73
|
+
_context.prev = 39;
|
|
74
|
+
_context.t2 = _context["catch"](11);
|
|
75
|
+
error = new Error("Error Processing Stream Data: ".concat(value));
|
|
76
|
+
throw error;
|
|
77
|
+
case 43:
|
|
78
|
+
_context.next = 52;
|
|
79
|
+
break;
|
|
80
|
+
case 45:
|
|
81
|
+
_context.prev = 45;
|
|
82
|
+
_context.t3 = _context["catch"](3);
|
|
83
|
+
if (!(_context.t3 instanceof DOMException && _context.t3.name === 'AbortError')) {
|
|
84
|
+
_context.next = 51;
|
|
85
|
+
break;
|
|
86
|
+
}
|
|
87
|
+
doneStreaming = true;
|
|
88
|
+
_context.next = 52;
|
|
89
|
+
break;
|
|
90
|
+
case 51:
|
|
91
|
+
throw _context.t3;
|
|
92
|
+
case 52:
|
|
93
|
+
if (!doneStreaming) {
|
|
94
|
+
_context.next = 3;
|
|
95
|
+
break;
|
|
96
|
+
}
|
|
97
|
+
case 53:
|
|
98
|
+
if (!chunkBuffer) {
|
|
99
|
+
_context.next = 56;
|
|
100
|
+
break;
|
|
101
|
+
}
|
|
102
|
+
_error = new Error("Not all the data was processed: ".concat(chunkBuffer));
|
|
103
|
+
throw _error;
|
|
104
|
+
case 56:
|
|
105
|
+
case "end":
|
|
106
|
+
return _context.stop();
|
|
107
|
+
}
|
|
108
|
+
}, _callee, null, [[3, 45], [11, 39], [15, 31, 34, 37], [19, 24]]);
|
|
109
|
+
}));
|
|
110
|
+
return _readStream.apply(this, arguments);
|
|
111
|
+
}
|
|
112
|
+
export var getBufferReader = function getBufferReader(response) {
|
|
113
|
+
if (!response.body) {
|
|
114
|
+
throw new Error('Response body is empty');
|
|
115
|
+
}
|
|
116
|
+
return response.body.pipeThrough(new TextDecoderStream()).getReader();
|
|
117
|
+
};
|
|
118
|
+
export var addPath = function addPath(baseUrl, path) {
|
|
119
|
+
var urlWithTrailingSlash = baseUrl.endsWith('/') ? baseUrl : "".concat(baseUrl, "/");
|
|
120
|
+
var pathWithoutLeadingSlash = !path.startsWith('/') ? path : path.substring(1, path.length);
|
|
121
|
+
var url = [urlWithTrailingSlash, pathWithoutLeadingSlash].join('');
|
|
122
|
+
return url;
|
|
123
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
|
+
import { useState, useEffect } from 'react';
|
|
3
|
+
import { AISummariesStore } from './ai-summary-service/store';
|
|
4
|
+
import { AISummaryService } from './ai-summary-service';
|
|
5
|
+
export var useAISummary = function useAISummary(props) {
|
|
6
|
+
var url = props.url;
|
|
7
|
+
var aISummaryService = AISummariesStore.get(url);
|
|
8
|
+
var isAISummaryServiceInitiated = !!aISummaryService;
|
|
9
|
+
var _useState = useState(isAISummaryServiceInitiated ? aISummaryService.state : {
|
|
10
|
+
status: 'ready',
|
|
11
|
+
content: ''
|
|
12
|
+
}),
|
|
13
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
14
|
+
state = _useState2[0],
|
|
15
|
+
setState = _useState2[1];
|
|
16
|
+
var isSummarised = isAISummaryServiceInitiated && state.status === 'done';
|
|
17
|
+
useEffect(function () {
|
|
18
|
+
if (!isSummarised) {
|
|
19
|
+
var _AISummariesStore$get;
|
|
20
|
+
if (!isAISummaryServiceInitiated) {
|
|
21
|
+
AISummariesStore.set(url, new AISummaryService(props));
|
|
22
|
+
}
|
|
23
|
+
return (_AISummariesStore$get = AISummariesStore.get(url)) === null || _AISummariesStore$get === void 0 ? void 0 : _AISummariesStore$get.subscribe(setState);
|
|
24
|
+
}
|
|
25
|
+
}, [isSummarised, isAISummaryServiceInitiated, url, props]);
|
|
26
|
+
var summariseUrl = function summariseUrl() {
|
|
27
|
+
if (isAISummaryServiceInitiated) {
|
|
28
|
+
return aISummaryService.summariseUrl();
|
|
29
|
+
}
|
|
30
|
+
return;
|
|
31
|
+
};
|
|
32
|
+
return {
|
|
33
|
+
isSummarised: isSummarised,
|
|
34
|
+
summariseUrl: summariseUrl,
|
|
35
|
+
state: state
|
|
36
|
+
};
|
|
37
|
+
};
|
|
@@ -15,7 +15,7 @@ export var ANALYTICS_CHANNEL = 'media';
|
|
|
15
15
|
export var context = {
|
|
16
16
|
componentName: 'smart-cards',
|
|
17
17
|
packageName: "@atlaskit/smart-card",
|
|
18
|
-
packageVersion: "26.
|
|
18
|
+
packageVersion: "26.48.0"
|
|
19
19
|
};
|
|
20
20
|
export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
21
21
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
package/dist/esm/utils/index.js
CHANGED
|
@@ -3,7 +3,6 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
|
3
3
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import Loadable from 'react-loadable';
|
|
6
|
-
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
7
6
|
export var isCardWithData = function isCardWithData(props) {
|
|
8
7
|
return !!props.data;
|
|
9
8
|
};
|
|
@@ -226,10 +225,6 @@ export var getIframeSandboxAttribute = function getIframeSandboxAttribute(isTrus
|
|
|
226
225
|
return undefined;
|
|
227
226
|
}
|
|
228
227
|
var sandboxPermissions = 'allow-downloads allow-forms allow-popups allow-popups-to-escape-sandbox allow-presentation allow-same-origin allow-scripts';
|
|
229
|
-
var allowStorageAccess = 'allow-storage-access-by-user-activation';
|
|
230
|
-
if (getBooleanFF('platform.linking-platform.smart-card.iframes-allow-storage-access-by-user-activation')) {
|
|
231
|
-
return "".concat(sandboxPermissions, " ").concat(allowStorageAccess);
|
|
232
|
-
}
|
|
233
228
|
return sandboxPermissions;
|
|
234
229
|
};
|
|
235
230
|
export var handleOnClick = function handleOnClick(handler) {
|
|
@@ -4,7 +4,7 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
|
4
4
|
import React, { useCallback, useMemo, useState } from 'react';
|
|
5
5
|
import { FormattedMessage } from 'react-intl-next';
|
|
6
6
|
import { Box, Inline } from '@atlaskit/primitives';
|
|
7
|
-
import { ActionName, SmartLinkSize, SmartLinkWidth } from '../../../../../../constants';
|
|
7
|
+
import { ActionName, SmartLinkSize, SmartLinkWidth, SmartLinkDirection } from '../../../../../../constants';
|
|
8
8
|
import ActionGroup from '../../action-group';
|
|
9
9
|
import Block from '../../block';
|
|
10
10
|
import ElementGroup from '../../element-group';
|
|
@@ -12,6 +12,9 @@ import AIStateIndicator from '../ai-state-indicator';
|
|
|
12
12
|
import { renderElementItems } from '../../utils';
|
|
13
13
|
import { messages } from '../../../../../../messages';
|
|
14
14
|
import AiIcon from '../../../../../common/ai-icon';
|
|
15
|
+
import AISummary from '../../../../../common/ai-summary';
|
|
16
|
+
import { useAISummary } from '../../../../../../state/hooks/use-ai-summary';
|
|
17
|
+
import { useFlexibleUiContext } from '../../../../../../state/flexible-ui-context';
|
|
15
18
|
var AISummaryBlockResolvedView = function AISummaryBlockResolvedView(props) {
|
|
16
19
|
var _props$actions = props.actions,
|
|
17
20
|
actions = _props$actions === void 0 ? [] : _props$actions,
|
|
@@ -26,6 +29,12 @@ var AISummaryBlockResolvedView = function AISummaryBlockResolvedView(props) {
|
|
|
26
29
|
aiState = _useState2[0],
|
|
27
30
|
setAIState = _useState2[1];
|
|
28
31
|
var metadataElements = renderElementItems(metadata);
|
|
32
|
+
var context = useFlexibleUiContext();
|
|
33
|
+
var url = (context === null || context === void 0 ? void 0 : context.url) || '';
|
|
34
|
+
var aiSummary = useAISummary({
|
|
35
|
+
url: url
|
|
36
|
+
});
|
|
37
|
+
var content = aiSummary.state.content;
|
|
29
38
|
var onAIActionClick = useCallback(function () {
|
|
30
39
|
setAIState('loading');
|
|
31
40
|
if (onAIActionChange) {
|
|
@@ -55,7 +64,10 @@ var AISummaryBlockResolvedView = function AISummaryBlockResolvedView(props) {
|
|
|
55
64
|
}
|
|
56
65
|
}, [onActionMenuOpenChange]);
|
|
57
66
|
return /*#__PURE__*/React.createElement(Block, _extends({}, props, {
|
|
67
|
+
direction: SmartLinkDirection.Vertical,
|
|
58
68
|
testId: "".concat(testId, "-resolved-view")
|
|
69
|
+
}), /*#__PURE__*/React.createElement(AISummary, {
|
|
70
|
+
content: content
|
|
59
71
|
}), /*#__PURE__*/React.createElement(Inline, {
|
|
60
72
|
alignBlock: "center",
|
|
61
73
|
alignInline: "end",
|