@gooddata/sdk-ui-pluggable-host 11.40.0-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +19 -0
- package/README.md +20 -0
- package/esm/assets/logo-white.svg +3 -0
- package/esm/components/FullScreenLoader.d.ts +1 -0
- package/esm/components/FullScreenLoader.js +8 -0
- package/esm/components/HostUiContainer.d.ts +16 -0
- package/esm/components/HostUiContainer.js +141 -0
- package/esm/components/HostUiContainer.scss +5 -0
- package/esm/components/Root.d.ts +16 -0
- package/esm/components/Root.js +64 -0
- package/esm/components/Root.scss +14 -0
- package/esm/components/lib/translations.d.ts +7 -0
- package/esm/components/lib/translations.js +64 -0
- package/esm/components/useRedirectNavigation.d.ts +7 -0
- package/esm/components/useRedirectNavigation.js +23 -0
- package/esm/components/useRedirectTarget.d.ts +19 -0
- package/esm/components/useRedirectTarget.js +62 -0
- package/esm/debug.d.ts +9 -0
- package/esm/debug.js +18 -0
- package/esm/index.d.ts +11 -0
- package/esm/index.js +10 -0
- package/esm/lib/chunkReloadGuard.d.ts +89 -0
- package/esm/lib/chunkReloadGuard.js +203 -0
- package/esm/lib/hostNotifications.d.ts +20 -0
- package/esm/lib/hostNotifications.js +50 -0
- package/esm/lib/isProduction.d.ts +12 -0
- package/esm/lib/isProduction.js +13 -0
- package/esm/loader/lastVisitedApp.d.ts +11 -0
- package/esm/loader/lastVisitedApp.js +43 -0
- package/esm/loader/localLoader.d.ts +16 -0
- package/esm/loader/localLoader.js +38 -0
- package/esm/loader/pluggableApplicationsLoader.d.ts +13 -0
- package/esm/loader/pluggableApplicationsLoader.js +55 -0
- package/esm/loader/redirectLogic.d.ts +30 -0
- package/esm/loader/redirectLogic.js +143 -0
- package/esm/loader/remoteLoader.d.ts +5 -0
- package/esm/loader/remoteLoader.js +117 -0
- package/esm/loader/remoteUrlSecurity.d.ts +1 -0
- package/esm/loader/remoteUrlSecurity.js +26 -0
- package/esm/loader/routing.d.ts +22 -0
- package/esm/loader/routing.js +87 -0
- package/esm/platformContext/backend.d.ts +44 -0
- package/esm/platformContext/backend.js +131 -0
- package/esm/platformContext/bootstrap.d.ts +15 -0
- package/esm/platformContext/bootstrap.js +122 -0
- package/esm/platformContext/loadPlatformContext.d.ts +18 -0
- package/esm/platformContext/loadPlatformContext.js +50 -0
- package/esm/platformContext/tigerNotAuthenticatedHandler.d.ts +3 -0
- package/esm/platformContext/tigerNotAuthenticatedHandler.js +16 -0
- package/esm/platformContext/types.d.ts +17 -0
- package/esm/platformContext/types.js +2 -0
- package/esm/platformContext/useLoadPlatformContext.d.ts +35 -0
- package/esm/platformContext/useLoadPlatformContext.js +131 -0
- package/esm/platformContext/useWorkspacePermissions.d.ts +26 -0
- package/esm/platformContext/useWorkspacePermissions.js +52 -0
- package/esm/platformContext/useWorkspaceSettings.d.ts +25 -0
- package/esm/platformContext/useWorkspaceSettings.js +46 -0
- package/esm/registry/pluggableApplicationsRegistry.d.ts +55 -0
- package/esm/registry/pluggableApplicationsRegistry.js +203 -0
- package/esm/sdk-ui-pluggable-host.d.ts +262 -0
- package/esm/styles/global.css +16 -0
- package/esm/translations/de-DE.json +34 -0
- package/esm/translations/en-AU.json +34 -0
- package/esm/translations/en-GB.json +34 -0
- package/esm/translations/en-US.json +130 -0
- package/esm/translations/es-419.json +34 -0
- package/esm/translations/es-ES.json +34 -0
- package/esm/translations/fi-FI.json +34 -0
- package/esm/translations/fr-CA.json +34 -0
- package/esm/translations/fr-FR.json +34 -0
- package/esm/translations/id-ID.json +34 -0
- package/esm/translations/it-IT.json +34 -0
- package/esm/translations/ja-JP.json +34 -0
- package/esm/translations/ko-KR.json +34 -0
- package/esm/translations/nl-NL.json +34 -0
- package/esm/translations/pl-PL.json +34 -0
- package/esm/translations/pt-BR.json +34 -0
- package/esm/translations/pt-PT.json +34 -0
- package/esm/translations/ru-RU.json +34 -0
- package/esm/translations/sl-SI.json +34 -0
- package/esm/translations/th-TH.json +34 -0
- package/esm/translations/tr-TR.json +34 -0
- package/esm/translations/uk-UA.json +34 -0
- package/esm/translations/vi-VN.json +34 -0
- package/esm/translations/zh-HK.json +34 -0
- package/esm/translations/zh-Hans.json +34 -0
- package/esm/translations/zh-Hant.json +34 -0
- package/esm/tsdoc-metadata.json +11 -0
- package/esm/types/lifecycle.d.ts +18 -0
- package/esm/types/lifecycle.js +2 -0
- package/esm/ui/DefaultHostUi.d.ts +12 -0
- package/esm/ui/DefaultHostUi.js +101 -0
- package/esm/ui/DefaultHostUi.scss +8 -0
- package/esm/ui/GenAIChat.d.ts +43 -0
- package/esm/ui/GenAIChat.js +102 -0
- package/esm/ui/HostChrome.d.ts +19 -0
- package/esm/ui/HostChrome.js +115 -0
- package/esm/ui/HostChrome.scss +24 -0
- package/esm/ui/HostIntlProvider.d.ts +9 -0
- package/esm/ui/HostIntlProvider.js +13 -0
- package/esm/ui/HostNotificationDispatcher.d.ts +12 -0
- package/esm/ui/HostNotificationDispatcher.js +42 -0
- package/esm/ui/PluggableApplicationRenderer.d.ts +10 -0
- package/esm/ui/PluggableApplicationRenderer.js +100 -0
- package/esm/ui/PluggableApplicationRenderer.scss +29 -0
- package/esm/ui/SemanticSearch.d.ts +23 -0
- package/esm/ui/SemanticSearch.js +46 -0
- package/esm/ui/WorkspacePicker.d.ts +9 -0
- package/esm/ui/WorkspacePicker.js +29 -0
- package/esm/ui/appMenuItems.d.ts +17 -0
- package/esm/ui/appMenuItems.js +81 -0
- package/esm/ui/chromeHelpers.d.ts +17 -0
- package/esm/ui/chromeHelpers.js +29 -0
- package/esm/ui/hostChromeBem.d.ts +1 -0
- package/esm/ui/hostChromeBem.js +3 -0
- package/esm/ui/resolveHostUiModule.d.ts +8 -0
- package/esm/ui/resolveHostUiModule.js +22 -0
- package/esm/ui/useHostChromeChat.d.ts +29 -0
- package/esm/ui/useHostChromeChat.js +38 -0
- package/esm/ui/useHostChromePricing.d.ts +52 -0
- package/esm/ui/useHostChromePricing.js +37 -0
- package/esm/ui/useHostChromeSearch.d.ts +20 -0
- package/esm/ui/useHostChromeSearch.js +18 -0
- package/esm/ui/useHostChromeWorkspaceFeatures.d.ts +19 -0
- package/esm/ui/useHostChromeWorkspaceFeatures.js +36 -0
- package/package.json +114 -0
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"gs.header.help": "Справка",
|
|
3
|
+
"gs.header.help.label": "Справочные ссылки",
|
|
4
|
+
"gs.header.logout": "Выход",
|
|
5
|
+
"gs.header.menu": "Меню",
|
|
6
|
+
"gs.header.accessibility.label": "Глобальный заголовок приложения",
|
|
7
|
+
"gs.header.href.accessibility": "Перейти на главную страницу",
|
|
8
|
+
"gs.header.logo.title.accessibility": "{organizationName} Логотип",
|
|
9
|
+
"gs.header.mainMenu.ariaLabel": "Главное меню",
|
|
10
|
+
"gs.header.menu.accessibility.label": "Глобальная навигация",
|
|
11
|
+
"gs.header.account.title": "Учетная запись",
|
|
12
|
+
"gs.header.slack": "Slack",
|
|
13
|
+
"gs.header.community": "Сообщество",
|
|
14
|
+
"gs.header.university": "Университет",
|
|
15
|
+
"gs.header.documentation": "Документация",
|
|
16
|
+
"gs.host.error.applicationFailedToLoad": "Не удалось загрузить приложение",
|
|
17
|
+
"gs.host.error.failedToLoad": "Не удалось загрузить",
|
|
18
|
+
"gs.host.error.pageNotFound": "Страница не найдена",
|
|
19
|
+
"gs.host.error.pageNotFoundDescription": "Страница, которую вы ищете, не существует или у вас нет к ней доступа.",
|
|
20
|
+
"gs.host.error.somethingWentWrong": "Произошла ошибка",
|
|
21
|
+
"gs.host.notification.newDeployment.message": "Доступна новая версия GoodData.",
|
|
22
|
+
"gs.host.notification.newDeployment.reloadLink": "Перезагрузить",
|
|
23
|
+
"gs.header.helpMenu.gettingStarted": "Начало работы",
|
|
24
|
+
"gs.header.helpMenu.connectData": "Подключение данных",
|
|
25
|
+
"gs.header.helpMenu.manage.ws": "Управление рабочими областями и иерархией рабочих областей",
|
|
26
|
+
"gs.header.helpMenu.manage.user": "Управление пользователями и группами пользователей",
|
|
27
|
+
"messages.genAi.visualisation.saved.success": "Отлично! Мы сохранили вашу визуализацию.",
|
|
28
|
+
"messages.genAi.visualisation.saved.error": "К сожалению, при сохранении вашей визуализации возникла проблема.",
|
|
29
|
+
"messages.genAi.visualisation.saved.error.detail": "{errorType}: {errorMessage}",
|
|
30
|
+
"messages.genAi.visualisation.link.copied": "Ссылка на визуализацию скопирована в буфер обмена.",
|
|
31
|
+
"messages.showMore": "Раскрыть",
|
|
32
|
+
"messages.showLess": "Скрыть",
|
|
33
|
+
"gen-ai.ask-assistant.search": "Создайте новую визуализацию на основе: {question}"
|
|
34
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"gs.header.help": "Pomoč",
|
|
3
|
+
"gs.header.help.label": "Povezave za pomoč",
|
|
4
|
+
"gs.header.logout": "Odjava",
|
|
5
|
+
"gs.header.menu": "Meni",
|
|
6
|
+
"gs.header.accessibility.label": "Globalna glava aplikacije",
|
|
7
|
+
"gs.header.href.accessibility": "Pojdi na domačo stran",
|
|
8
|
+
"gs.header.logo.title.accessibility": "logotip {organizationName}",
|
|
9
|
+
"gs.header.mainMenu.ariaLabel": "Glavni meni",
|
|
10
|
+
"gs.header.menu.accessibility.label": "Globalna navigacija",
|
|
11
|
+
"gs.header.account.title": "Račun",
|
|
12
|
+
"gs.header.slack": "Slack",
|
|
13
|
+
"gs.header.community": "Skupnost",
|
|
14
|
+
"gs.header.university": "Univerza",
|
|
15
|
+
"gs.header.documentation": "Dokumentacija",
|
|
16
|
+
"gs.host.error.applicationFailedToLoad": "Aplikacije ni bilo mogoče naložiti",
|
|
17
|
+
"gs.host.error.failedToLoad": "Ni uspelo naložiti",
|
|
18
|
+
"gs.host.error.pageNotFound": "Strani ni mogoče najti",
|
|
19
|
+
"gs.host.error.pageNotFoundDescription": "Stran, ki jo iščete, ne obstaja ali pa nimate dostopa do nje.",
|
|
20
|
+
"gs.host.error.somethingWentWrong": "Nekaj je šlo narobe",
|
|
21
|
+
"gs.host.notification.newDeployment.message": "Na voljo je nova različica GoodData.",
|
|
22
|
+
"gs.host.notification.newDeployment.reloadLink": "Osveži",
|
|
23
|
+
"gs.header.helpMenu.gettingStarted": "Začetek",
|
|
24
|
+
"gs.header.helpMenu.connectData": "Povezovanje podatkov",
|
|
25
|
+
"gs.header.helpMenu.manage.ws": "Upravljanje delovnih prostorov in hierarhija",
|
|
26
|
+
"gs.header.helpMenu.manage.user": "Upravljanje uporabnikov in uporabniških skupin",
|
|
27
|
+
"messages.genAi.visualisation.saved.success": "Odlično! Shranili smo vašo vizualizacijo.",
|
|
28
|
+
"messages.genAi.visualisation.saved.error": "Ups, prišlo je do težave pri shranjevanju vaše vizualizacije.",
|
|
29
|
+
"messages.genAi.visualisation.saved.error.detail": "{errorType}: {errorMessage}",
|
|
30
|
+
"messages.genAi.visualisation.link.copied": "Povezava vizualizacije je bila kopirana v vašo odlagališče.",
|
|
31
|
+
"messages.showMore": "Prikaži več",
|
|
32
|
+
"messages.showLess": "Prikaži manj",
|
|
33
|
+
"gen-ai.ask-assistant.search": "Ustvarite novo vizualizacijo na osnovi: {question}"
|
|
34
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"gs.header.help": "วิธีใช้",
|
|
3
|
+
"gs.header.help.label": "ลิงก์ความช่วยเหลือ",
|
|
4
|
+
"gs.header.logout": "ออกจากระบบ",
|
|
5
|
+
"gs.header.menu": "เมนู",
|
|
6
|
+
"gs.header.accessibility.label": "ส่วนหัวของแอปพลิเคชันส่วนกลาง",
|
|
7
|
+
"gs.header.href.accessibility": "ไปที่หน้าแรก",
|
|
8
|
+
"gs.header.logo.title.accessibility": "โลโก้ {organizationName}",
|
|
9
|
+
"gs.header.mainMenu.ariaLabel": "เมนูหลัก",
|
|
10
|
+
"gs.header.menu.accessibility.label": "การนำทางส่วนกลาง",
|
|
11
|
+
"gs.header.account.title": "บัญชี",
|
|
12
|
+
"gs.header.slack": "Slack",
|
|
13
|
+
"gs.header.community": "ชุมชน",
|
|
14
|
+
"gs.header.university": "มหาวิทยาลัย",
|
|
15
|
+
"gs.header.documentation": "เอกสารประกอบ",
|
|
16
|
+
"gs.host.error.applicationFailedToLoad": "ไม่สามารถโหลดแอปพลิเคชันได้",
|
|
17
|
+
"gs.host.error.failedToLoad": "โหลดไม่สำเร็จ",
|
|
18
|
+
"gs.host.error.pageNotFound": "ไม่พบหน้า",
|
|
19
|
+
"gs.host.error.pageNotFoundDescription": "หน้าที่คุณกำลังค้นหาไม่มีอยู่ หรือคุณไม่มีสิทธิ์เข้าถึงหน้านั้น",
|
|
20
|
+
"gs.host.error.somethingWentWrong": "เกิดข้อผิดพลาดบางอย่าง",
|
|
21
|
+
"gs.host.notification.newDeployment.message": "GoodData เวอร์ชันใหม่พร้อมใช้งานแล้ว",
|
|
22
|
+
"gs.host.notification.newDeployment.reloadLink": "โหลดใหม่",
|
|
23
|
+
"gs.header.helpMenu.gettingStarted": "เริ่มต้นใช้งาน",
|
|
24
|
+
"gs.header.helpMenu.connectData": "การเชื่อมต่อข้อมูล",
|
|
25
|
+
"gs.header.helpMenu.manage.ws": "การจัดการพื้นที่ทำงานและลำดับชั้นพื้นที่ทำงาน",
|
|
26
|
+
"gs.header.helpMenu.manage.user": "การจัดการผู้ใช้และกลุ่มผู้ใช้",
|
|
27
|
+
"messages.genAi.visualisation.saved.success": "สำเร็จ! เราได้บันทึกการแสดงภาพข้อมูลของคุณแล้ว",
|
|
28
|
+
"messages.genAi.visualisation.saved.error": "ขออภัย มีปัญหาในการบันทึกการแสดงภาพข้อมูลของคุณ",
|
|
29
|
+
"messages.genAi.visualisation.saved.error.detail": "{errorType}: {errorMessage}",
|
|
30
|
+
"messages.genAi.visualisation.link.copied": "คัดลอกลิงก์การแสดงภาพข้อมูลไปยังคลิปบอร์ดของคุณแล้ว",
|
|
31
|
+
"messages.showMore": "แสดงเพิ่มเติม",
|
|
32
|
+
"messages.showLess": "แสดงน้อยลง",
|
|
33
|
+
"gen-ai.ask-assistant.search": "สร้างการแสดงภาพข้อมูลใหม่โดยอิงตาม: {question}"
|
|
34
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"gs.header.help": "Yardım",
|
|
3
|
+
"gs.header.help.label": "Yardım bağlantıları",
|
|
4
|
+
"gs.header.logout": "Çıkış Yap",
|
|
5
|
+
"gs.header.menu": "Menü",
|
|
6
|
+
"gs.header.accessibility.label": "Küresel uygulama başlığı",
|
|
7
|
+
"gs.header.href.accessibility": "Ana sayfaya git",
|
|
8
|
+
"gs.header.logo.title.accessibility": "{organizationName} logosu",
|
|
9
|
+
"gs.header.mainMenu.ariaLabel": "Ana menü",
|
|
10
|
+
"gs.header.menu.accessibility.label": "Küresel gezinme",
|
|
11
|
+
"gs.header.account.title": "Hesap",
|
|
12
|
+
"gs.header.slack": "Yığın",
|
|
13
|
+
"gs.header.community": "Topluluk",
|
|
14
|
+
"gs.header.university": "Üniversite",
|
|
15
|
+
"gs.header.documentation": "Dokümantasyon",
|
|
16
|
+
"gs.host.error.applicationFailedToLoad": "Uygulama yüklenemedi",
|
|
17
|
+
"gs.host.error.failedToLoad": "Yüklenemedi",
|
|
18
|
+
"gs.host.error.pageNotFound": "Sayfa bulunamadı",
|
|
19
|
+
"gs.host.error.pageNotFoundDescription": "Aradığınız sayfa mevcut değil veya bu sayfaya erişiminiz yok.",
|
|
20
|
+
"gs.host.error.somethingWentWrong": "Bir şeyler ters gitti",
|
|
21
|
+
"gs.host.notification.newDeployment.message": "GoodData'nın yeni bir sürümü kullanılabilir.",
|
|
22
|
+
"gs.host.notification.newDeployment.reloadLink": "Yeniden Yükle",
|
|
23
|
+
"gs.header.helpMenu.gettingStarted": "Başlarken",
|
|
24
|
+
"gs.header.helpMenu.connectData": "Veri bağlama",
|
|
25
|
+
"gs.header.helpMenu.manage.ws": "Çalışma alanlarını ve çalışma alanı hiyerarşisini yönetme",
|
|
26
|
+
"gs.header.helpMenu.manage.user": "Kullanıcıları ve kullanıcı gruplarını yönetme",
|
|
27
|
+
"messages.genAi.visualisation.saved.success": "Harika! Görselleştirmenizi kaydettik.",
|
|
28
|
+
"messages.genAi.visualisation.saved.error": "Görselleştirmenizi kaydederken bir sorun oluştu.",
|
|
29
|
+
"messages.genAi.visualisation.saved.error.detail": "{errorType}: {errorMessage}",
|
|
30
|
+
"messages.genAi.visualisation.link.copied": "Görselleştirme bağlantısı panonuza kopyalandı.",
|
|
31
|
+
"messages.showMore": "Daha fazla göster",
|
|
32
|
+
"messages.showLess": "Daha az göster",
|
|
33
|
+
"gen-ai.ask-assistant.search": "Yeni görselleştirme oluştur: {question}"
|
|
34
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"gs.header.help": "Довідка",
|
|
3
|
+
"gs.header.help.label": "Посилання довідки",
|
|
4
|
+
"gs.header.logout": "Вийти",
|
|
5
|
+
"gs.header.menu": "Меню",
|
|
6
|
+
"gs.header.accessibility.label": "Глобальний заголовок програми",
|
|
7
|
+
"gs.header.href.accessibility": "Перейти на домашню сторінку",
|
|
8
|
+
"gs.header.logo.title.accessibility": "логотип {organizationName}",
|
|
9
|
+
"gs.header.mainMenu.ariaLabel": "Головне меню",
|
|
10
|
+
"gs.header.menu.accessibility.label": "Глобальна навігація",
|
|
11
|
+
"gs.header.account.title": "Обліковий запис",
|
|
12
|
+
"gs.header.slack": "Slack",
|
|
13
|
+
"gs.header.community": "Спільнота",
|
|
14
|
+
"gs.header.university": "Університет",
|
|
15
|
+
"gs.header.documentation": "Документація",
|
|
16
|
+
"gs.host.error.applicationFailedToLoad": "Не вдалося завантажити застосунок",
|
|
17
|
+
"gs.host.error.failedToLoad": "Не вдалося завантажити",
|
|
18
|
+
"gs.host.error.pageNotFound": "Сторінку не знайдено",
|
|
19
|
+
"gs.host.error.pageNotFoundDescription": "Сторінка, яку ви шукаєте, не існує або у вас немає до неї доступу.",
|
|
20
|
+
"gs.host.error.somethingWentWrong": "Щось пішло не так",
|
|
21
|
+
"gs.host.notification.newDeployment.message": "Доступна нова версія GoodData.",
|
|
22
|
+
"gs.host.notification.newDeployment.reloadLink": "Перезавантажити",
|
|
23
|
+
"gs.header.helpMenu.gettingStarted": "Початок роботи",
|
|
24
|
+
"gs.header.helpMenu.connectData": "Підключення даних",
|
|
25
|
+
"gs.header.helpMenu.manage.ws": "Керування робочими областями та ієрархією робочих областей",
|
|
26
|
+
"gs.header.helpMenu.manage.user": "Керування користувачами та групами користувачів",
|
|
27
|
+
"messages.genAi.visualisation.saved.success": "Чудово! Ми зберегли вашу візуалізацію.",
|
|
28
|
+
"messages.genAi.visualisation.saved.error": "От халепа, виникла проблема під час збереження вашої візуалізації.",
|
|
29
|
+
"messages.genAi.visualisation.saved.error.detail": "{errorType}: {errorMessage}",
|
|
30
|
+
"messages.genAi.visualisation.link.copied": "Посилання на візуалізацію скопійовано до буфера обміну.",
|
|
31
|
+
"messages.showMore": "Показати більше",
|
|
32
|
+
"messages.showLess": "Показати менше",
|
|
33
|
+
"gen-ai.ask-assistant.search": "Створити нову візуалізацію на основі: {question}"
|
|
34
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"gs.header.help": "Trợ giúp",
|
|
3
|
+
"gs.header.help.label": "Liên kết trợ giúp",
|
|
4
|
+
"gs.header.logout": "Đăng xuất",
|
|
5
|
+
"gs.header.menu": "Menu",
|
|
6
|
+
"gs.header.accessibility.label": "Tiêu đề ứng dụng toàn cầu",
|
|
7
|
+
"gs.header.href.accessibility": "Đi tới trang chủ",
|
|
8
|
+
"gs.header.logo.title.accessibility": "logo {organizationName}",
|
|
9
|
+
"gs.header.mainMenu.ariaLabel": "Menu chính",
|
|
10
|
+
"gs.header.menu.accessibility.label": "Điều hướng toàn cầu",
|
|
11
|
+
"gs.header.account.title": "Tài khoản",
|
|
12
|
+
"gs.header.slack": "Slack",
|
|
13
|
+
"gs.header.community": "Cộng đồng",
|
|
14
|
+
"gs.header.university": "Đại học",
|
|
15
|
+
"gs.header.documentation": "Tài liệu",
|
|
16
|
+
"gs.host.error.applicationFailedToLoad": "Ứng dụng không tải được",
|
|
17
|
+
"gs.host.error.failedToLoad": "Không tải được",
|
|
18
|
+
"gs.host.error.pageNotFound": "Không tìm thấy trang",
|
|
19
|
+
"gs.host.error.pageNotFoundDescription": "Trang bạn đang tìm kiếm không tồn tại hoặc bạn không có quyền truy cập vào trang đó.",
|
|
20
|
+
"gs.host.error.somethingWentWrong": "Đã xảy ra lỗi",
|
|
21
|
+
"gs.host.notification.newDeployment.message": "Đã có phiên bản mới của GoodData.",
|
|
22
|
+
"gs.host.notification.newDeployment.reloadLink": "Tải lại",
|
|
23
|
+
"gs.header.helpMenu.gettingStarted": "Bắt đầu",
|
|
24
|
+
"gs.header.helpMenu.connectData": "Kết nối dữ liệu",
|
|
25
|
+
"gs.header.helpMenu.manage.ws": "Quản lý các không gian làm việc và phân cấp không gian làm việc",
|
|
26
|
+
"gs.header.helpMenu.manage.user": "Quản lý người dùng và nhóm người dùng",
|
|
27
|
+
"messages.genAi.visualisation.saved.success": "Tuyệt vời! Chúng tôi đã lưu trực quan hóa của bạn.",
|
|
28
|
+
"messages.genAi.visualisation.saved.error": "Rất tiếc, đã xảy ra sự cố khi lưu trực quan hóa của bạn.",
|
|
29
|
+
"messages.genAi.visualisation.saved.error.detail": "{errorType}: {errorMessage}",
|
|
30
|
+
"messages.genAi.visualisation.link.copied": "Liên kết trực quan hóa đã được sao chép vào bảng nhớ tạm của bạn.",
|
|
31
|
+
"messages.showMore": "Hiện thêm",
|
|
32
|
+
"messages.showLess": "Hiện ít",
|
|
33
|
+
"gen-ai.ask-assistant.search": "Tạo trực quan hóa mới dựa trên: {question}"
|
|
34
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"gs.header.help": "幫助",
|
|
3
|
+
"gs.header.help.label": "幫助連結",
|
|
4
|
+
"gs.header.logout": "登出",
|
|
5
|
+
"gs.header.menu": "選單",
|
|
6
|
+
"gs.header.accessibility.label": "全域應用程序頁首",
|
|
7
|
+
"gs.header.href.accessibility": "前往主頁",
|
|
8
|
+
"gs.header.logo.title.accessibility": "{organizationName} 嘜",
|
|
9
|
+
"gs.header.mainMenu.ariaLabel": "主餐",
|
|
10
|
+
"gs.header.menu.accessibility.label": "全域導航",
|
|
11
|
+
"gs.header.account.title": "帳戶",
|
|
12
|
+
"gs.header.slack": "鬆弛",
|
|
13
|
+
"gs.header.community": "社區",
|
|
14
|
+
"gs.header.university": "大學",
|
|
15
|
+
"gs.header.documentation": "文檔",
|
|
16
|
+
"gs.host.error.applicationFailedToLoad": "應用程式載入失敗",
|
|
17
|
+
"gs.host.error.failedToLoad": "無法載入",
|
|
18
|
+
"gs.host.error.pageNotFound": "找不到頁面",
|
|
19
|
+
"gs.host.error.pageNotFoundDescription": "您正在尋找的頁面不存在,或者您沒有權限存取該頁面。",
|
|
20
|
+
"gs.host.error.somethingWentWrong": "發生不可預見的錯誤。",
|
|
21
|
+
"gs.host.notification.newDeployment.message": "有新版本的 GoodData 可供使用。",
|
|
22
|
+
"gs.host.notification.newDeployment.reloadLink": "重新載入",
|
|
23
|
+
"gs.header.helpMenu.gettingStarted": "開始使用",
|
|
24
|
+
"gs.header.helpMenu.connectData": "連接數據",
|
|
25
|
+
"gs.header.helpMenu.manage.ws": "管理工作區和工作區層次結構",
|
|
26
|
+
"gs.header.helpMenu.manage.user": "管理使用者和使用者群組",
|
|
27
|
+
"messages.genAi.visualisation.saved.success": "很好!我哋儲存咗您嘅可視化效果。",
|
|
28
|
+
"messages.genAi.visualisation.saved.error": "糟糕,保存可視化時出現問題。",
|
|
29
|
+
"messages.genAi.visualisation.saved.error.detail": "{errorType}: {errorMessage}",
|
|
30
|
+
"messages.genAi.visualisation.link.copied": "可視化連結已複製到剪貼板。",
|
|
31
|
+
"messages.showMore": "顯示更多",
|
|
32
|
+
"messages.showLess": "顯示簡要信息",
|
|
33
|
+
"gen-ai.ask-assistant.search": "根據以下條件構建新嘅可視化: {question}"
|
|
34
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"gs.header.help": "帮助",
|
|
3
|
+
"gs.header.help.label": "帮助链接",
|
|
4
|
+
"gs.header.logout": "退出",
|
|
5
|
+
"gs.header.menu": "菜单",
|
|
6
|
+
"gs.header.accessibility.label": "全局应用程序标头",
|
|
7
|
+
"gs.header.href.accessibility": "转至主页",
|
|
8
|
+
"gs.header.logo.title.accessibility": "{organizationName} 标识",
|
|
9
|
+
"gs.header.mainMenu.ariaLabel": "主菜单",
|
|
10
|
+
"gs.header.menu.accessibility.label": "全球导航",
|
|
11
|
+
"gs.header.account.title": "账户",
|
|
12
|
+
"gs.header.slack": "Slack",
|
|
13
|
+
"gs.header.community": "社区",
|
|
14
|
+
"gs.header.university": "大学",
|
|
15
|
+
"gs.header.documentation": "文档",
|
|
16
|
+
"gs.host.error.applicationFailedToLoad": "应用程序加载失败",
|
|
17
|
+
"gs.host.error.failedToLoad": "加载失败",
|
|
18
|
+
"gs.host.error.pageNotFound": "网页未找到",
|
|
19
|
+
"gs.host.error.pageNotFoundDescription": "您查找的页面不存在,或者您无权访问该页面。",
|
|
20
|
+
"gs.host.error.somethingWentWrong": "发生了不可预见的错误。",
|
|
21
|
+
"gs.host.notification.newDeployment.message": "GoodData 的新版本已可用。",
|
|
22
|
+
"gs.host.notification.newDeployment.reloadLink": "重新加载",
|
|
23
|
+
"gs.header.helpMenu.gettingStarted": "开始使用",
|
|
24
|
+
"gs.header.helpMenu.connectData": "连接数据",
|
|
25
|
+
"gs.header.helpMenu.manage.ws": "管理工作区和工作区层次结构",
|
|
26
|
+
"gs.header.helpMenu.manage.user": "管理用户和用户组",
|
|
27
|
+
"messages.genAi.visualisation.saved.success": "太棒了!我们已保存您的可视化。",
|
|
28
|
+
"messages.genAi.visualisation.saved.error": "哎呀,保存可视化时出现问题。",
|
|
29
|
+
"messages.genAi.visualisation.saved.error.detail": "{errorType}: {errorMessage}",
|
|
30
|
+
"messages.genAi.visualisation.link.copied": "可视化链接已复制到您的剪贴板。",
|
|
31
|
+
"messages.showMore": "显示更多",
|
|
32
|
+
"messages.showLess": "显示更少",
|
|
33
|
+
"gen-ai.ask-assistant.search": "根据以下内容构建新的可视化:{question}"
|
|
34
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"gs.header.help": "幫助",
|
|
3
|
+
"gs.header.help.label": "幫助連結",
|
|
4
|
+
"gs.header.logout": "登出",
|
|
5
|
+
"gs.header.menu": "選單",
|
|
6
|
+
"gs.header.accessibility.label": "全域應用程式標頭",
|
|
7
|
+
"gs.header.href.accessibility": "前往首頁",
|
|
8
|
+
"gs.header.logo.title.accessibility": "{organizationName} 標識",
|
|
9
|
+
"gs.header.mainMenu.ariaLabel": "主選單",
|
|
10
|
+
"gs.header.menu.accessibility.label": "全球導航",
|
|
11
|
+
"gs.header.account.title": "帳戶",
|
|
12
|
+
"gs.header.slack": "鬆弛",
|
|
13
|
+
"gs.header.community": "社群",
|
|
14
|
+
"gs.header.university": "大學",
|
|
15
|
+
"gs.header.documentation": "文件",
|
|
16
|
+
"gs.host.error.applicationFailedToLoad": "應用程式載入失敗",
|
|
17
|
+
"gs.host.error.failedToLoad": "載入失敗",
|
|
18
|
+
"gs.host.error.pageNotFound": "找不到頁面",
|
|
19
|
+
"gs.host.error.pageNotFoundDescription": "您要尋找的頁面不存在,或您沒有存取權限。",
|
|
20
|
+
"gs.host.error.somethingWentWrong": "發生了不可預見的錯誤。",
|
|
21
|
+
"gs.host.notification.newDeployment.message": "有新版本的 GoodData 可供使用。",
|
|
22
|
+
"gs.host.notification.newDeployment.reloadLink": "重新載入",
|
|
23
|
+
"gs.header.helpMenu.gettingStarted": "開始使用",
|
|
24
|
+
"gs.header.helpMenu.connectData": "連接資料",
|
|
25
|
+
"gs.header.helpMenu.manage.ws": "管理工作區與工作區階層",
|
|
26
|
+
"gs.header.helpMenu.manage.user": "管理使用者與使用者群組",
|
|
27
|
+
"messages.genAi.visualisation.saved.success": "偉大的!我們保存了您的視覺化。",
|
|
28
|
+
"messages.genAi.visualisation.saved.error": "哎呀,保存可視化時出現問題。",
|
|
29
|
+
"messages.genAi.visualisation.saved.error.detail": "{errorType}: {errorMessage}",
|
|
30
|
+
"messages.genAi.visualisation.link.copied": "視覺化連結已複製到您的剪貼簿。",
|
|
31
|
+
"messages.showMore": "展示更多",
|
|
32
|
+
"messages.showLess": "顯示較少",
|
|
33
|
+
"gen-ai.ask-assistant.search": "根據以下內容建立新的視覺化:{question}"
|
|
34
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// This file is read by tools that parse documentation comments conforming to the TSDoc standard.
|
|
2
|
+
// It should be published with your NPM package. It should not be tracked by Git.
|
|
3
|
+
{
|
|
4
|
+
"tsdocVersion": "0.12",
|
|
5
|
+
"toolPackages": [
|
|
6
|
+
{
|
|
7
|
+
"packageName": "@microsoft/api-extractor",
|
|
8
|
+
"packageVersion": "7.55.2"
|
|
9
|
+
}
|
|
10
|
+
]
|
|
11
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type IPluggableAppTelemetryCallbacks } from "@gooddata/sdk-pluggable-application-model";
|
|
2
|
+
/**
|
|
3
|
+
* @alpha
|
|
4
|
+
*/
|
|
5
|
+
export interface IAppLifecycleCallbacks {
|
|
6
|
+
onHostUiMounted?: (durationMs: number) => void;
|
|
7
|
+
onAppNavigation?: (appId: string, pathname: string) => void;
|
|
8
|
+
onPageVisited?: (appId: string) => void;
|
|
9
|
+
onPreloadStarted?: (appId: string) => void;
|
|
10
|
+
onPreloadCompleted?: (appId: string, durationMs: number) => void;
|
|
11
|
+
onLoadStarted?: (appId: string) => void;
|
|
12
|
+
onLoadCompleted?: (appId: string, durationMs: number) => void;
|
|
13
|
+
onMountCompleted?: (appId: string, durationMs: number) => void;
|
|
14
|
+
onRendered?: (appId: string, totalDurationMs: number) => void;
|
|
15
|
+
onLoadFailed?: (appId: string, error: string) => void;
|
|
16
|
+
onUnmounted?: (appId: string) => void;
|
|
17
|
+
createTelemetryCallbacks?: (appId: string) => IPluggableAppTelemetryCallbacks;
|
|
18
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type IHostUiModule } from "@gooddata/sdk-pluggable-application-model";
|
|
2
|
+
import "./DefaultHostUi.scss";
|
|
3
|
+
/**
|
|
4
|
+
* Default host UI module.
|
|
5
|
+
*
|
|
6
|
+
* Renders the GoodData application host with the standard AppHeader (branding, navigation,
|
|
7
|
+
* user menu, help menu) and provides a container element for the active pluggable application.
|
|
8
|
+
*
|
|
9
|
+
* Navigation is handled via the host-provided `navigate` callback, keeping the host UI
|
|
10
|
+
* framework-agnostic and ensuring consistent behavior for both local and remote UI modules.
|
|
11
|
+
*/
|
|
12
|
+
export declare const defaultHostUiModule: IHostUiModule;
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
// (C) 2026 GoodData Corporation
|
|
3
|
+
import { useLayoutEffect, useRef, useState } from "react";
|
|
4
|
+
import { flushSync } from "react-dom";
|
|
5
|
+
import { createRoot } from "react-dom/client";
|
|
6
|
+
import { HostChrome } from "./HostChrome.js";
|
|
7
|
+
import { e } from "./hostChromeBem.js";
|
|
8
|
+
import "./DefaultHostUi.scss";
|
|
9
|
+
function HostUiBridge({ initialCtx, initialApps, initialPathname, navigate, replace, onAppContainerReady, onReady, }) {
|
|
10
|
+
const [ctx, setCtx] = useState(initialCtx);
|
|
11
|
+
const [apps, setApps] = useState(initialApps);
|
|
12
|
+
const [pathname, setPathname] = useState(initialPathname);
|
|
13
|
+
const [headerOptions, setHeaderOptions] = useState(undefined);
|
|
14
|
+
const [notification, setNotification] = useState(null);
|
|
15
|
+
const appContainerRef = useRef(null);
|
|
16
|
+
// Layout effect runs in the same synchronous commit as flushSync.
|
|
17
|
+
useLayoutEffect(() => {
|
|
18
|
+
onReady(setCtx, setApps, setPathname, setHeaderOptions, setNotification);
|
|
19
|
+
if (appContainerRef.current) {
|
|
20
|
+
onAppContainerReady(appContainerRef.current);
|
|
21
|
+
}
|
|
22
|
+
// Only call once on mount
|
|
23
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
24
|
+
}, []);
|
|
25
|
+
return (_jsx(HostChrome, { ctx: ctx, resolvedApplications: apps, pathname: pathname, onNavigate: navigate, onReplace: replace, headerOptions: headerOptions, notification: notification, children: _jsx("div", { ref: appContainerRef, className: e("app-container") }) }));
|
|
26
|
+
}
|
|
27
|
+
// ---------------------------------------------------------------------------
|
|
28
|
+
// Imperative mount function conforming to IHostUiModule
|
|
29
|
+
// ---------------------------------------------------------------------------
|
|
30
|
+
function mountDefaultHostUi(options) {
|
|
31
|
+
const { container, ctx, resolvedApplications, pathname, navigate, replace } = options;
|
|
32
|
+
let reactRoot = createRoot(container);
|
|
33
|
+
let appContainer = null;
|
|
34
|
+
let updateCtxFn = null;
|
|
35
|
+
let updateAppsFn = null;
|
|
36
|
+
let updatePathnameFn = null;
|
|
37
|
+
let updateHeaderFn = null;
|
|
38
|
+
let updateNotificationFn = null;
|
|
39
|
+
// Use flushSync so that the DOM is ready synchronously after mount() returns,
|
|
40
|
+
// making getAppContainer() safe to call immediately.
|
|
41
|
+
flushSync(() => {
|
|
42
|
+
reactRoot?.render(_jsx(HostUiBridge, { initialCtx: ctx, initialApps: resolvedApplications, initialPathname: pathname, navigate: navigate, replace: replace, onAppContainerReady: (el) => {
|
|
43
|
+
appContainer = el;
|
|
44
|
+
}, onReady: (setCtx, setApps, setPathname, setHeaderOptions, setNotification) => {
|
|
45
|
+
updateCtxFn = setCtx;
|
|
46
|
+
updateAppsFn = setApps;
|
|
47
|
+
updatePathnameFn = setPathname;
|
|
48
|
+
updateHeaderFn = setHeaderOptions;
|
|
49
|
+
updateNotificationFn = setNotification;
|
|
50
|
+
} }));
|
|
51
|
+
});
|
|
52
|
+
return {
|
|
53
|
+
unmount() {
|
|
54
|
+
if (reactRoot) {
|
|
55
|
+
const root = reactRoot;
|
|
56
|
+
reactRoot = null;
|
|
57
|
+
appContainer = null;
|
|
58
|
+
updateCtxFn = null;
|
|
59
|
+
updateAppsFn = null;
|
|
60
|
+
updatePathnameFn = null;
|
|
61
|
+
updateHeaderFn = null;
|
|
62
|
+
updateNotificationFn = null;
|
|
63
|
+
root.unmount();
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
updateContext(newCtx) {
|
|
67
|
+
updateCtxFn?.(newCtx);
|
|
68
|
+
},
|
|
69
|
+
updateApplications(apps) {
|
|
70
|
+
updateAppsFn?.(apps);
|
|
71
|
+
},
|
|
72
|
+
updatePathname(newPathname) {
|
|
73
|
+
updatePathnameFn?.(newPathname);
|
|
74
|
+
},
|
|
75
|
+
updateHeader(header) {
|
|
76
|
+
updateHeaderFn?.(header);
|
|
77
|
+
},
|
|
78
|
+
getAppContainer() {
|
|
79
|
+
if (!appContainer) {
|
|
80
|
+
throw new Error("Host UI app container is not available. " +
|
|
81
|
+
"Ensure the host UI has finished mounting before calling getAppContainer().");
|
|
82
|
+
}
|
|
83
|
+
return appContainer;
|
|
84
|
+
},
|
|
85
|
+
notify(notification) {
|
|
86
|
+
updateNotificationFn?.(notification);
|
|
87
|
+
},
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Default host UI module.
|
|
92
|
+
*
|
|
93
|
+
* Renders the GoodData application host with the standard AppHeader (branding, navigation,
|
|
94
|
+
* user menu, help menu) and provides a container element for the active pluggable application.
|
|
95
|
+
*
|
|
96
|
+
* Navigation is handled via the host-provided `navigate` callback, keeping the host UI
|
|
97
|
+
* framework-agnostic and ensuring consistent behavior for both local and remote UI modules.
|
|
98
|
+
*/
|
|
99
|
+
export const defaultHostUiModule = {
|
|
100
|
+
mount: mountDefaultHostUi,
|
|
101
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { type IUserWorkspaceSettings } from "@gooddata/sdk-backend-spi";
|
|
2
|
+
import { type ChatAssistantMessageEvent, type ChatClosedEvent, type ChatFeedbackEvent, type ChatOpenedEvent, type ChatResetEvent, type ChatUserMessageEvent } from "@gooddata/sdk-ui-gen-ai";
|
|
3
|
+
/**
|
|
4
|
+
* Discriminated union of GenAI chat events that are forwarded to the host
|
|
5
|
+
* caller via the `onEvent` callback.
|
|
6
|
+
*
|
|
7
|
+
* @remarks
|
|
8
|
+
* The standalone home-ui `GenAIChat` component called gdc-home-ui-specific
|
|
9
|
+
* `trackGenAIChat*` telemetry helpers directly. To keep the host runtime free
|
|
10
|
+
* of those deps, the host caller wires this through `onEvent`.
|
|
11
|
+
*/
|
|
12
|
+
export type GenAIChatEvent = {
|
|
13
|
+
name: "chat.opened";
|
|
14
|
+
payload: ChatOpenedEvent;
|
|
15
|
+
} | {
|
|
16
|
+
name: "chat.closed";
|
|
17
|
+
payload: ChatClosedEvent;
|
|
18
|
+
} | {
|
|
19
|
+
name: "chat.reset";
|
|
20
|
+
payload: ChatResetEvent;
|
|
21
|
+
} | {
|
|
22
|
+
name: "chat.feedback";
|
|
23
|
+
payload: ChatFeedbackEvent;
|
|
24
|
+
} | {
|
|
25
|
+
name: "chat.user-message";
|
|
26
|
+
payload: ChatUserMessageEvent;
|
|
27
|
+
} | {
|
|
28
|
+
name: "chat.assistant-message";
|
|
29
|
+
payload: ChatAssistantMessageEvent;
|
|
30
|
+
};
|
|
31
|
+
export interface IGenAIChatProps {
|
|
32
|
+
workspaceId: string;
|
|
33
|
+
open: boolean;
|
|
34
|
+
onOpen: () => void;
|
|
35
|
+
onClose: () => void;
|
|
36
|
+
askedQuestion?: string | null;
|
|
37
|
+
canManageProject?: boolean;
|
|
38
|
+
canAnalyzeProject?: boolean;
|
|
39
|
+
canFullControl?: boolean;
|
|
40
|
+
settings?: IUserWorkspaceSettings;
|
|
41
|
+
onEvent?: (event: GenAIChatEvent) => void;
|
|
42
|
+
}
|
|
43
|
+
export declare function GenAIChat({ workspaceId, open, onOpen, onClose, askedQuestion, canManageProject, canAnalyzeProject, canFullControl, settings, onEvent }: IGenAIChatProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
// (C) 2026 GoodData Corporation
|
|
3
|
+
import { useCallback, useEffect, useMemo, useState } from "react";
|
|
4
|
+
import { defineMessage, useIntl } from "react-intl";
|
|
5
|
+
import { useBackendStrict } from "@gooddata/sdk-ui";
|
|
6
|
+
import { isChatAssistantMessageEvent, isChatClosedEvent, isChatCopyToClipboardEvent, isChatFeedbackEvent, isChatOpenedEvent, isChatResetEvent, isChatSaveVisualizationErrorEvent, isChatSaveVisualizationSuccessEvent, isChatUserMessageEvent, makeUserItem, } from "@gooddata/sdk-ui-gen-ai";
|
|
7
|
+
import { GenAIChatDialog, clearThreadAction, makeTextContents, makeUserMessage, newMessageAction, } from "@gooddata/sdk-ui-gen-ai/internal";
|
|
8
|
+
import { HEADER_CHAT_BUTTON_ID, useToastMessage } from "@gooddata/sdk-ui-kit";
|
|
9
|
+
export function GenAIChat({ workspaceId, open, onOpen, onClose, askedQuestion, canManageProject, canAnalyzeProject, canFullControl, settings, onEvent, }) {
|
|
10
|
+
const { addSuccess, addError } = useToastMessage();
|
|
11
|
+
const intl = useIntl();
|
|
12
|
+
const backend = useBackendStrict();
|
|
13
|
+
const onLinkClick = useCallback(({ itemUrl, newTab, preventDefault }) => {
|
|
14
|
+
if (itemUrl) {
|
|
15
|
+
preventDefault();
|
|
16
|
+
if (newTab) {
|
|
17
|
+
window.open(itemUrl, "_blank");
|
|
18
|
+
}
|
|
19
|
+
else {
|
|
20
|
+
window.location.assign(itemUrl);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}, []);
|
|
24
|
+
const events = useMemo(() => {
|
|
25
|
+
return [
|
|
26
|
+
{
|
|
27
|
+
eval: isChatOpenedEvent,
|
|
28
|
+
handler: (data) => onEvent?.({ name: "chat.opened", payload: data }),
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
eval: isChatClosedEvent,
|
|
32
|
+
handler: (data) => onEvent?.({ name: "chat.closed", payload: data }),
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
eval: isChatResetEvent,
|
|
36
|
+
handler: (data) => onEvent?.({ name: "chat.reset", payload: data }),
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
eval: isChatFeedbackEvent,
|
|
40
|
+
handler: (data) => onEvent?.({ name: "chat.feedback", payload: data }),
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
eval: isChatUserMessageEvent,
|
|
44
|
+
handler: (data) => onEvent?.({ name: "chat.user-message", payload: data }),
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
eval: isChatAssistantMessageEvent,
|
|
48
|
+
handler: (data) => onEvent?.({ name: "chat.assistant-message", payload: data }),
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
eval: isChatSaveVisualizationSuccessEvent,
|
|
52
|
+
handler: () => {
|
|
53
|
+
addSuccess(defineMessage({ id: "messages.genAi.visualisation.saved.success" }));
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
eval: isChatSaveVisualizationErrorEvent,
|
|
58
|
+
handler: ({ errorType, errorMessage }) => {
|
|
59
|
+
addError(defineMessage({ id: "messages.genAi.visualisation.saved.error" }), {
|
|
60
|
+
showMore: intl.formatMessage({ id: "messages.showMore" }),
|
|
61
|
+
showLess: intl.formatMessage({ id: "messages.showLess" }),
|
|
62
|
+
errorDetail: intl.formatMessage({ id: "messages.genAi.visualisation.saved.error.detail" }, {
|
|
63
|
+
errorType,
|
|
64
|
+
errorMessage,
|
|
65
|
+
}),
|
|
66
|
+
duration: 0,
|
|
67
|
+
});
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
eval: isChatCopyToClipboardEvent,
|
|
72
|
+
handler: () => {
|
|
73
|
+
addSuccess(defineMessage({ id: "messages.genAi.visualisation.link.copied" }));
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
];
|
|
77
|
+
}, [addError, addSuccess, intl, onEvent]);
|
|
78
|
+
const objectTypes = useMemo(() => {
|
|
79
|
+
const types = ["dashboard", "visualization"];
|
|
80
|
+
if (canManageProject) {
|
|
81
|
+
types.push("metric");
|
|
82
|
+
}
|
|
83
|
+
return types;
|
|
84
|
+
}, [canManageProject]);
|
|
85
|
+
const [chatDispatcher, setDispatcher] = useState(null);
|
|
86
|
+
const onDispatcher = useCallback((dispatcher) => {
|
|
87
|
+
setDispatcher(() => dispatcher);
|
|
88
|
+
}, []);
|
|
89
|
+
useEffect(() => {
|
|
90
|
+
if (!chatDispatcher || !askedQuestion || !settings) {
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
chatDispatcher(clearThreadAction());
|
|
94
|
+
if (settings.enableAiAgenticConversations) {
|
|
95
|
+
chatDispatcher(newMessageAction(makeUserItem({ type: "text", text: askedQuestion })));
|
|
96
|
+
}
|
|
97
|
+
else {
|
|
98
|
+
chatDispatcher(newMessageAction(makeUserMessage([makeTextContents(askedQuestion, [])])));
|
|
99
|
+
}
|
|
100
|
+
}, [chatDispatcher, askedQuestion, settings]);
|
|
101
|
+
return (_jsx(GenAIChatDialog, { isOpen: open, locale: intl.locale, canManage: canManageProject, canAnalyze: canAnalyzeProject, canFullControl: canFullControl, objectTypes: objectTypes, onLinkClick: onLinkClick, onClose: onClose, onOpen: onOpen, workspace: workspaceId, backend: backend, settings: settings, eventHandlers: events, onDispatcher: onDispatcher, returnFocusTo: HEADER_CHAT_BUTTON_ID }));
|
|
102
|
+
}
|