@gooddata/sdk-ui-dashboard 11.58.0-alpha.4 → 11.58.0-alpha.6
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/esm/__version.d.ts +1 -1
- package/esm/__version.js +1 -1
- package/esm/_staging/insight/insightWidgetDescription.d.ts +9 -0
- package/esm/_staging/insight/insightWidgetDescription.d.ts.map +1 -0
- package/esm/_staging/insight/insightWidgetDescription.js +12 -0
- package/esm/_staging/sharedHooks/useRichTextFilters.d.ts +4 -22
- package/esm/_staging/sharedHooks/useRichTextFilters.d.ts.map +1 -1
- package/esm/_staging/sharedHooks/useRichTextFilters.js +11 -15
- package/esm/_staging/sharedHooks/useRichTextInputs.d.ts +35 -0
- package/esm/_staging/sharedHooks/useRichTextInputs.d.ts.map +1 -0
- package/esm/_staging/sharedHooks/useRichTextInputs.js +37 -0
- package/esm/index.d.ts +2 -2
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js +1 -1
- package/esm/model/DashboardTester.d.ts.map +1 -1
- package/esm/model/DashboardTester.js +2 -4
- package/esm/model/commandHandlers/dashboard/initializeDashboardHandler/index.d.ts.map +1 -1
- package/esm/model/commandHandlers/dashboard/initializeDashboardHandler/index.js +21 -13
- package/esm/model/commandHandlers/parameters/dashboardParameterRoots.d.ts +20 -0
- package/esm/model/commandHandlers/parameters/dashboardParameterRoots.d.ts.map +1 -0
- package/esm/model/commandHandlers/parameters/dashboardParameterRoots.js +61 -0
- package/esm/model/commandHandlers/parameters/loadParameterDependencies.d.ts +27 -0
- package/esm/model/commandHandlers/parameters/loadParameterDependencies.d.ts.map +1 -0
- package/esm/model/commandHandlers/parameters/loadParameterDependencies.js +114 -0
- package/esm/model/commandHandlers/parameters/parameterDependenciesWorker.d.ts +6 -0
- package/esm/model/commandHandlers/parameters/parameterDependenciesWorker.d.ts.map +1 -0
- package/esm/model/commandHandlers/parameters/parameterDependenciesWorker.js +107 -0
- package/esm/model/react/useInitializeDashboardStore.d.ts.map +1 -1
- package/esm/model/react/useInitializeDashboardStore.js +2 -4
- package/esm/model/react/useTextParameters.d.ts +34 -0
- package/esm/model/react/useTextParameters.d.ts.map +1 -0
- package/esm/model/react/useTextParameters.js +68 -0
- package/esm/model/react/useWidgetExecConfig.d.ts.map +1 -1
- package/esm/model/react/useWidgetExecConfig.js +3 -2
- package/esm/model/store/catalog/catalogReducers.d.ts +8 -8
- package/esm/model/store/catalog/catalogReducers.d.ts.map +1 -1
- package/esm/model/store/catalog/catalogReducers.js +25 -12
- package/esm/model/store/catalog/catalogSelectors.d.ts +8 -16
- package/esm/model/store/catalog/catalogSelectors.d.ts.map +1 -1
- package/esm/model/store/catalog/catalogSelectors.js +7 -15
- package/esm/model/store/catalog/catalogState.d.ts +15 -30
- package/esm/model/store/catalog/catalogState.d.ts.map +1 -1
- package/esm/model/store/catalog/catalogState.js +1 -2
- package/esm/model/store/catalog/index.d.ts +4 -4
- package/esm/model/store/tabs/parameters/parametersHelpers.d.ts +25 -9
- package/esm/model/store/tabs/parameters/parametersHelpers.d.ts.map +1 -1
- package/esm/model/store/tabs/parameters/parametersHelpers.js +46 -13
- package/esm/model/store/tabs/parameters/parametersSelectors.d.ts +9 -9
- package/esm/model/store/tabs/parameters/parametersSelectors.d.ts.map +1 -1
- package/esm/model/store/tabs/parameters/parametersSelectors.js +26 -22
- package/esm/presentation/dashboard/DashboardSidebar/SidebarResizeContext.d.ts.map +1 -1
- package/esm/presentation/dashboard/DashboardSidebar/SidebarResizeContext.js +7 -1
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/DashboardLayoutSectionHeaderDescription.d.ts.map +1 -1
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/DashboardLayoutSectionHeaderDescription.js +3 -10
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/EditableHeader/SectionHeaderEditable.d.ts.map +1 -1
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/EditableHeader/SectionHeaderEditable.js +5 -10
- package/esm/presentation/localization/bundles/de-DE.localization-bundle.d.ts +6 -1
- package/esm/presentation/localization/bundles/de-DE.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/de-DE.localization-bundle.js +8 -3
- package/esm/presentation/localization/bundles/en-AU.localization-bundle.d.ts +6 -1
- package/esm/presentation/localization/bundles/en-AU.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/en-AU.localization-bundle.js +8 -3
- package/esm/presentation/localization/bundles/en-GB.localization-bundle.d.ts +6 -1
- package/esm/presentation/localization/bundles/en-GB.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/en-GB.localization-bundle.js +8 -3
- package/esm/presentation/localization/bundles/es-419.localization-bundle.d.ts +6 -1
- package/esm/presentation/localization/bundles/es-419.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/es-419.localization-bundle.js +13 -8
- package/esm/presentation/localization/bundles/es-ES.localization-bundle.d.ts +6 -1
- package/esm/presentation/localization/bundles/es-ES.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/es-ES.localization-bundle.js +8 -3
- package/esm/presentation/localization/bundles/fi-FI.localization-bundle.d.ts +6 -1
- package/esm/presentation/localization/bundles/fi-FI.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/fi-FI.localization-bundle.js +8 -3
- package/esm/presentation/localization/bundles/fr-CA.localization-bundle.d.ts +6 -1
- package/esm/presentation/localization/bundles/fr-CA.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/fr-CA.localization-bundle.js +8 -3
- package/esm/presentation/localization/bundles/fr-FR.localization-bundle.d.ts +6 -1
- package/esm/presentation/localization/bundles/fr-FR.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/fr-FR.localization-bundle.js +8 -3
- package/esm/presentation/localization/bundles/id-ID.localization-bundle.d.ts +6 -1
- package/esm/presentation/localization/bundles/id-ID.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/id-ID.localization-bundle.js +8 -3
- package/esm/presentation/localization/bundles/it-IT.localization-bundle.d.ts +6 -1
- package/esm/presentation/localization/bundles/it-IT.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/it-IT.localization-bundle.js +10 -5
- package/esm/presentation/localization/bundles/ja-JP.localization-bundle.d.ts +6 -1
- package/esm/presentation/localization/bundles/ja-JP.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/ja-JP.localization-bundle.js +8 -3
- package/esm/presentation/localization/bundles/ko-KR.localization-bundle.d.ts +6 -1
- package/esm/presentation/localization/bundles/ko-KR.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/ko-KR.localization-bundle.js +9 -4
- package/esm/presentation/localization/bundles/nl-NL.localization-bundle.d.ts +6 -1
- package/esm/presentation/localization/bundles/nl-NL.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/nl-NL.localization-bundle.js +8 -3
- package/esm/presentation/localization/bundles/pl-PL.localization-bundle.d.ts +6 -1
- package/esm/presentation/localization/bundles/pl-PL.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/pl-PL.localization-bundle.js +8 -3
- package/esm/presentation/localization/bundles/pt-BR.localization-bundle.d.ts +6 -1
- package/esm/presentation/localization/bundles/pt-BR.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/pt-BR.localization-bundle.js +8 -3
- package/esm/presentation/localization/bundles/pt-PT.localization-bundle.d.ts +6 -1
- package/esm/presentation/localization/bundles/pt-PT.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/pt-PT.localization-bundle.js +8 -3
- package/esm/presentation/localization/bundles/ru-RU.localization-bundle.d.ts +6 -1
- package/esm/presentation/localization/bundles/ru-RU.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/ru-RU.localization-bundle.js +8 -3
- package/esm/presentation/localization/bundles/sl-SI.localization-bundle.d.ts +6 -1
- package/esm/presentation/localization/bundles/sl-SI.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/sl-SI.localization-bundle.js +9 -4
- package/esm/presentation/localization/bundles/th-TH.localization-bundle.d.ts +6 -1
- package/esm/presentation/localization/bundles/th-TH.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/th-TH.localization-bundle.js +9 -4
- package/esm/presentation/localization/bundles/tr-TR.localization-bundle.d.ts +6 -1
- package/esm/presentation/localization/bundles/tr-TR.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/tr-TR.localization-bundle.js +9 -4
- package/esm/presentation/localization/bundles/uk-UA.localization-bundle.d.ts +6 -1
- package/esm/presentation/localization/bundles/uk-UA.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/uk-UA.localization-bundle.js +18 -13
- package/esm/presentation/localization/bundles/vi-VN.localization-bundle.d.ts +6 -1
- package/esm/presentation/localization/bundles/vi-VN.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/vi-VN.localization-bundle.js +9 -4
- package/esm/presentation/localization/bundles/zh-HK.localization-bundle.d.ts +6 -1
- package/esm/presentation/localization/bundles/zh-HK.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/zh-HK.localization-bundle.js +10 -5
- package/esm/presentation/localization/bundles/zh-Hans.localization-bundle.d.ts +6 -1
- package/esm/presentation/localization/bundles/zh-Hans.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/zh-Hans.localization-bundle.js +9 -4
- package/esm/presentation/localization/bundles/zh-Hant.localization-bundle.d.ts +6 -1
- package/esm/presentation/localization/bundles/zh-Hant.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/zh-Hant.localization-bundle.js +12 -7
- package/esm/presentation/topBar/buttonBar/button/saveButton/DefaultSaveButton.d.ts.map +1 -1
- package/esm/presentation/topBar/buttonBar/button/saveButton/DefaultSaveButton.js +3 -2
- package/esm/presentation/widget/description/ExportModeInsightWidgetDescription.d.ts.map +1 -1
- package/esm/presentation/widget/description/ExportModeInsightWidgetDescription.js +4 -11
- package/esm/presentation/widget/description/InsightWidgetDescriptionTrigger.d.ts.map +1 -1
- package/esm/presentation/widget/description/InsightWidgetDescriptionTrigger.js +4 -9
- package/esm/presentation/widget/description/types.d.ts +3 -5
- package/esm/presentation/widget/description/types.d.ts.map +1 -1
- package/esm/presentation/widget/description/useInsightWidgetDescription.d.ts.map +1 -1
- package/esm/presentation/widget/description/useInsightWidgetDescription.js +2 -5
- package/esm/presentation/widget/insight/ViewModeDashboardInsight/InsightDrillDialog/InsightDrillDialog.d.ts.map +1 -1
- package/esm/presentation/widget/insight/ViewModeDashboardInsight/InsightDrillDialog/InsightDrillDialog.js +5 -10
- package/esm/presentation/widget/insight/configuration/InsightDescriptionConfig/InsightDescription.d.ts +4 -3
- package/esm/presentation/widget/insight/configuration/InsightDescriptionConfig/InsightDescription.d.ts.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightDescriptionConfig/InsightDescription.js +5 -7
- package/esm/presentation/widget/insight/configuration/InsightDescriptionConfig/InsightDescriptionConfig.d.ts.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightDescriptionConfig/InsightDescriptionConfig.js +1 -3
- package/esm/presentation/widget/richText/EditModeDashboardRichText.d.ts.map +1 -1
- package/esm/presentation/widget/richText/EditModeDashboardRichText.js +5 -9
- package/esm/presentation/widget/richText/ViewModeDashboardRichText.d.ts.map +1 -1
- package/esm/presentation/widget/richText/ViewModeDashboardRichText.js +4 -10
- package/esm/sdk-ui-dashboard.d.ts +34 -60
- package/package.json +21 -21
- package/esm/model/commandHandlers/parameters/filterParameterDependenciesWorker.d.ts +0 -45
- package/esm/model/commandHandlers/parameters/filterParameterDependenciesWorker.d.ts.map +0 -1
- package/esm/model/commandHandlers/parameters/filterParameterDependenciesWorker.js +0 -99
- package/esm/model/commandHandlers/parameters/insightParameterDependenciesWorker.d.ts +0 -11
- package/esm/model/commandHandlers/parameters/insightParameterDependenciesWorker.d.ts.map +0 -1
- package/esm/model/commandHandlers/parameters/insightParameterDependenciesWorker.js +0 -71
- package/esm/model/commandHandlers/parameters/loadFilterParameterDependencies.d.ts +0 -22
- package/esm/model/commandHandlers/parameters/loadFilterParameterDependencies.d.ts.map +0 -1
- package/esm/model/commandHandlers/parameters/loadFilterParameterDependencies.js +0 -39
- package/esm/model/commandHandlers/parameters/loadInsightParameterDependencies.d.ts +0 -21
- package/esm/model/commandHandlers/parameters/loadInsightParameterDependencies.d.ts.map +0 -1
- package/esm/model/commandHandlers/parameters/loadInsightParameterDependencies.js +0 -86
|
@@ -11,7 +11,7 @@ export const zh_Hant = {
|
|
|
11
11
|
"empty_value": "空值",
|
|
12
12
|
"deleted_value": "刪除的值",
|
|
13
13
|
"gs.list.cancel": "取消",
|
|
14
|
-
"gs.list.apply": "
|
|
14
|
+
"gs.list.apply": "套用",
|
|
15
15
|
"gs.list.only": "僅有的",
|
|
16
16
|
"attributesDropdown.onlyLabel": "僅選擇 {itemTitle}",
|
|
17
17
|
"messages.dashboardSaveSuccess": "偉大的。我們儲存了您的儀表板。",
|
|
@@ -22,7 +22,7 @@ export const zh_Hant = {
|
|
|
22
22
|
"insightNotSavedDialog.headline": "儲存儀表板",
|
|
23
23
|
"insightNotSavedDialog.message": "下列物件將與儀表板一併儲存。",
|
|
24
24
|
"insightNotSavedDialog.visualisations": "視覺化 ({count})",
|
|
25
|
-
"insightNotSavedDialog.
|
|
25
|
+
"insightNotSavedDialog.cancel": "取消",
|
|
26
26
|
"insightNotSavedDialog.saveAll": "儲存全部",
|
|
27
27
|
"messages.dashboard.incompatibleDefaultFilters.title": "<b>警告</b> 某些儀表板過濾器無法套用。檢查過濾器以確保您查看的是正確的資料。",
|
|
28
28
|
"messages.dashboard.invalidDrills.title": "<b>一些互動被刪除</b>",
|
|
@@ -37,7 +37,7 @@ export const zh_Hant = {
|
|
|
37
37
|
"messages.drill.InteractionUpdatedSuccess": "互動已更新。",
|
|
38
38
|
"filterBar.label": "過濾器",
|
|
39
39
|
"filterBar.restrictedFilters.remove": "移除受限制的篩選器",
|
|
40
|
-
"filterBar.restrictedFilters.reason": "{count, plural, other {您無權存取 #
|
|
40
|
+
"filterBar.restrictedFilters.reason": "{count, plural, other {您無權存取 # 個篩選器。請聯絡您的管理員申請存取權限。}}",
|
|
41
41
|
"filterBar.restrictedFilters": "{count, plural, other {# 個受限制的篩選器}}",
|
|
42
42
|
"filterBar.showAll": "顯示所有",
|
|
43
43
|
"filterBar.showLess": "顯示較少",
|
|
@@ -125,10 +125,11 @@ export const zh_Hant = {
|
|
|
125
125
|
"settingsDashboardDialog.section.alert.label": "評估頻率",
|
|
126
126
|
"settingsDashboardDialog.section.timezone": "時區",
|
|
127
127
|
"settingsDashboardDialog.section.timezone.defaultTimezone": "儀表板時區",
|
|
128
|
-
"settingsDashboardDialog.section.timezone.defaultTimezone.tooltip": "
|
|
128
|
+
"settingsDashboardDialog.section.timezone.defaultTimezone.tooltip": "用於此儀表板上的日期篩選器和日期值的時區。",
|
|
129
129
|
"settingsDashboardDialog.section.timezone.defaultTimezone.help": "更多資訊",
|
|
130
130
|
"settingsDashboardDialog.section.timezone.defaultTimezone.workspace": "預設",
|
|
131
131
|
"settingsDashboardDialog.section.timezone.defaultTimezone.workspace.tooltip": "遵循為您的組織、工作區或使用者帳戶設定的時區。如果該設定變更,將自動更新。",
|
|
132
|
+
"settingsDashboardDialog.section.timezone.defaultTimezone.workspace.tooltip.learnMore": "了解更多",
|
|
132
133
|
"settingsDashboardDialog.section.timezone.defaultTimezone.fromBrowser": "裝置時區",
|
|
133
134
|
"settingsDashboardDialog.section.timezone.defaultTimezone.fromBrowser.tooltip": "使用檢視者瀏覽器回報的時區。每位檢視者可能不同。",
|
|
134
135
|
"settingsDashboardDialog.section.timezone.allowUserOverride.toggle": "允許使用者變更儀表板時區",
|
|
@@ -245,6 +246,7 @@ export const zh_Hant = {
|
|
|
245
246
|
"dialogs.automation.filters.useFiltersMessage": "將來導出時始終使用這些過濾器",
|
|
246
247
|
"dialogs.automation.filters.searchAriaLabel": "搜尋過濾器",
|
|
247
248
|
"dialogs.automation.filters.deleteAriaLabel": "移除過濾器",
|
|
249
|
+
"dialogs.automation.filters.restricted.deleteTooltip": "{count, plural, other {移除受限制的篩選器}}",
|
|
248
250
|
"dialogs.automation.filters.deleteTooltip": "移除過濾器",
|
|
249
251
|
"dialogs.automation.filters.lockedTooltip": "此過濾器已鎖定,無法移除。",
|
|
250
252
|
"dialogs.automation.parameters.chip": "{title} 為 {value}",
|
|
@@ -288,6 +290,7 @@ export const zh_Hant = {
|
|
|
288
290
|
"dialogs.schedule.management.attachments.exportInfo": "包含匯出資訊表",
|
|
289
291
|
"dialogs.export.csv.delimiter": "CSV 分隔符號",
|
|
290
292
|
"dialogs.export.csv.headline": "匯出設定(.csv)",
|
|
293
|
+
"dialogs.export.csv.submit.disabledTooltip": "請輸入有效的單一字元分隔符號以匯出。",
|
|
291
294
|
"dialogs.export.pdf.headline": "匯出設定(.pdf)",
|
|
292
295
|
"dialogs.schedule.management.attachments.delete": "刪除 {format} 依戀",
|
|
293
296
|
"dialogs.schedule.management.attachments.removed": "{format} 附件已移除。",
|
|
@@ -334,7 +337,7 @@ export const zh_Hant = {
|
|
|
334
337
|
"cancel": "取消",
|
|
335
338
|
"save": "儲存",
|
|
336
339
|
"create": "建立",
|
|
337
|
-
"apply": "
|
|
340
|
+
"apply": "套用",
|
|
338
341
|
"gs.date.today": "今天",
|
|
339
342
|
"gs.date.tomorrow": "明天",
|
|
340
343
|
"gs.date.yesterday": "昨天",
|
|
@@ -387,7 +390,7 @@ export const zh_Hant = {
|
|
|
387
390
|
"widget.options.menu.exportToPDF.formatted": "格式化(.pdf)",
|
|
388
391
|
"widget.error.missing_insight.message": "沒有可用的可視化",
|
|
389
392
|
"widget.error.missing_insight.description": "該可視化已被刪除或無法再訪問。請聯絡您的管理員或將其從儀表板中刪除。",
|
|
390
|
-
"widget.error.restricted_insight.message": "
|
|
393
|
+
"widget.error.restricted_insight.message": "您沒有存取權",
|
|
391
394
|
"widget.error.restricted_insight.description": "請聯絡您的管理員以申請存取權限。",
|
|
392
395
|
"widget.drill.dialog.exportToXLSX": "格式化(.xlsx)",
|
|
393
396
|
"widget.drill.dialog.exportToPDF": "格式化(.pdf)",
|
|
@@ -580,7 +583,7 @@ export const zh_Hant = {
|
|
|
580
583
|
"configurationPanel.drillIntoUrl.editor.insightParametersSectionLabel": "視覺化",
|
|
581
584
|
"configurationPanel.drillIntoUrl.editor.identifierParametersSectionLabel": "身份識別",
|
|
582
585
|
"configurationPanel.drillIntoUrl.editor.dashboardParametersSectionLabel": "儀表板",
|
|
583
|
-
"configurationPanel.drillIntoUrl.editor.applyButtonLabel": "
|
|
586
|
+
"configurationPanel.drillIntoUrl.editor.applyButtonLabel": "套用",
|
|
584
587
|
"configurationPanel.drillIntoUrl.editor.cancelButtonLabel": "取消",
|
|
585
588
|
"configurationPanel.drillIntoUrl.editor.textAreaPlaceholder": "輸入 URL 並從右側面板新增佔位符。",
|
|
586
589
|
"configurationPanel.drillIntoUrl.editor.helpButtonLabel": "如何建立自訂 URL?",
|
|
@@ -652,6 +655,7 @@ export const zh_Hant = {
|
|
|
652
655
|
"richText.restrictedReferences.dialog.message": "此文字的部分內容受到限制。編輯後,將為所有使用者永久移除受限制的物件。",
|
|
653
656
|
"richText.restrictedReferences.dialog.submit": "移除並編輯",
|
|
654
657
|
"richText.emptyContent": "沒有富文本內容",
|
|
658
|
+
"drill_modal_picker.restricted": "受限制",
|
|
655
659
|
"visualizationSwitcher.restrictedEntry": "受限制",
|
|
656
660
|
"visualizationSwitcher.emptyContent": "切換器中沒有可視化",
|
|
657
661
|
"visualizationSwitcherToolbar.visualizationsList.header": "視覺化",
|
|
@@ -841,6 +845,7 @@ export const zh_Hant = {
|
|
|
841
845
|
"controlButtons.announcement.switchedToOriginal": "可視化切換回原始視圖",
|
|
842
846
|
"automationFilters.announcement.filterAdded": "篩選 {title} 額外。",
|
|
843
847
|
"automationFilters.announcement.filterRemoved": "篩選 {title} 已刪除。",
|
|
848
|
+
"automationFilters.announcement.restrictedFiltersRemoved": "{count, plural, other {已移除受限制的篩選器。}}",
|
|
844
849
|
"automationFilters.announcement.filterChanged": "篩選 {title} 變更。",
|
|
845
850
|
"dashboard.crossFilter.success": "成功: {count, plural, one {# 篩選} other {# 過濾器}} 從圖表中應用。",
|
|
846
851
|
"kdaDialog.dialog.filters.title": "過濾器",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DefaultSaveButton.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/topBar/buttonBar/button/saveButton/DefaultSaveButton.tsx"],"names":[],"mappings":"AAyBA,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEnD;;GAEG;AACH,wBAAgB,kBAAkB,IAAI,gBAAgB,
|
|
1
|
+
{"version":3,"file":"DefaultSaveButton.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/topBar/buttonBar/button/saveButton/DefaultSaveButton.tsx"],"names":[],"mappings":"AAyBA,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEnD;;GAEG;AACH,wBAAgB,kBAAkB,IAAI,gBAAgB,CAsDrD;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,EAC9B,SAAS,EACT,SAAS,EACT,QAAQ,EACR,WAAW,EACX,WAAW,GACd,EAAE,gBAAgB,kDAoClB"}
|
|
@@ -7,7 +7,7 @@ import { messages } from "../../../../../locales.js";
|
|
|
7
7
|
import { saveDashboard } from "../../../../../model/commands/dashboard.js";
|
|
8
8
|
import { useDashboardDispatch, useDashboardSelector, } from "../../../../../model/react/DashboardStoreProvider.js";
|
|
9
9
|
import { dispatchAndWaitFor } from "../../../../../model/store/_infra/dispatchAndWaitFor.js";
|
|
10
|
-
import { selectIsAiGenerating } from "../../../../../model/store/config/configSelectors.js";
|
|
10
|
+
import { selectIsAiGenerating, selectIsAiMode } from "../../../../../model/store/config/configSelectors.js";
|
|
11
11
|
import { selectIsDashboardDirty } from "../../../../../model/store/meta/metaSelectors.js";
|
|
12
12
|
import { selectIsInEditMode } from "../../../../../model/store/renderMode/renderModeSelectors.js";
|
|
13
13
|
import { selectIsDashboardSaving } from "../../../../../model/store/saving/savingSelectors.js";
|
|
@@ -36,6 +36,7 @@ export function useSaveButtonProps() {
|
|
|
36
36
|
}, [dispatch]);
|
|
37
37
|
const isEditing = useDashboardSelector(selectIsInEditMode);
|
|
38
38
|
const isAiGenerating = useDashboardSelector(selectIsAiGenerating);
|
|
39
|
+
const isAiMode = useDashboardSelector(selectIsAiMode);
|
|
39
40
|
const isSavingDashboard = useDashboardSelector(selectIsDashboardSaving);
|
|
40
41
|
const isPrivateDashboard = useDashboardSelector(selectIsPrivateDashboard);
|
|
41
42
|
const isEmptyDashboard = !useDashboardSelector(selectLayoutHasAnalyticalWidgets); // we need at least one non-custom widget there
|
|
@@ -48,7 +49,7 @@ export function useSaveButtonProps() {
|
|
|
48
49
|
if (isPrivateDashboard) {
|
|
49
50
|
buttonTitle = messages.controlButtonsSaveAsPrivateTitle;
|
|
50
51
|
}
|
|
51
|
-
if (!canSaveDashboard) {
|
|
52
|
+
if (!canSaveDashboard && !isAiMode) {
|
|
52
53
|
buttonTitle = messages.controlButtonsSaveAndPublishNoChanges;
|
|
53
54
|
}
|
|
54
55
|
if (isEmptyDashboard) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExportModeInsightWidgetDescription.d.ts","sourceRoot":"","sources":["../../../../src/presentation/widget/description/ExportModeInsightWidgetDescription.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ExportModeInsightWidgetDescription.d.ts","sourceRoot":"","sources":["../../../../src/presentation/widget/description/ExportModeInsightWidgetDescription.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,qCAAqC,EAAE,MAAM,YAAY,CAAC;AAGxE;;;;GAIG;AACH,wBAAgB,kCAAkC,CAAC,KAAK,EAAE,qCAAqC,kDAoB9F"}
|
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
// (C) 2025-2026 GoodData Corporation
|
|
3
3
|
import { DescriptionPanelContent } from "@gooddata/sdk-ui-kit";
|
|
4
|
-
import {
|
|
5
|
-
import { useDashboardSelector } from "../../../model/react/DashboardStoreProvider.js";
|
|
6
|
-
import { useDashboardExecConfig } from "../../../model/react/useWidgetExecConfig.js";
|
|
7
|
-
import { selectSeparators } from "../../../model/store/config/configSelectors.js";
|
|
8
|
-
import { selectRestrictedRichTextReferences } from "../../../model/store/unavailableObjects/unavailableObjectsSelectors.js";
|
|
4
|
+
import { useRichTextWidgetInputs } from "../../../_staging/sharedHooks/useRichTextInputs.js";
|
|
9
5
|
import { useDashboardComponentsContext } from "../../dashboardContexts/DashboardComponentsContext.js";
|
|
10
6
|
import { useInsightWidgetDescription } from "./useInsightWidgetDescription.js";
|
|
11
7
|
/**
|
|
@@ -14,15 +10,12 @@ import { useInsightWidgetDescription } from "./useInsightWidgetDescription.js";
|
|
|
14
10
|
* It is hidden, but holds the export data and content for exporter.
|
|
15
11
|
*/
|
|
16
12
|
export function ExportModeInsightWidgetDescription(props) {
|
|
17
|
-
const { exportData, widget } = props;
|
|
13
|
+
const { exportData, widget, insight } = props;
|
|
18
14
|
const { isVisible, description } = useInsightWidgetDescription(props);
|
|
19
|
-
const
|
|
20
|
-
const separators = useDashboardSelector(selectSeparators);
|
|
21
|
-
const restrictedReferences = useDashboardSelector(selectRestrictedRichTextReferences);
|
|
22
|
-
const execConfig = useDashboardExecConfig();
|
|
15
|
+
const richTextInputs = useRichTextWidgetInputs(widget, description ?? "", insight);
|
|
23
16
|
const { LoadingComponent } = useDashboardComponentsContext();
|
|
24
17
|
if (!isVisible) {
|
|
25
18
|
return null;
|
|
26
19
|
}
|
|
27
|
-
return (_jsx("div", { style: { display: "none" }, ...exportData, children: _jsx(DescriptionPanelContent, { description: description, useReferences: true,
|
|
20
|
+
return (_jsx("div", { style: { display: "none" }, ...exportData, children: _jsx(DescriptionPanelContent, { description: description, useReferences: true, ...richTextInputs, LoadingComponent: LoadingComponent }) }));
|
|
28
21
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InsightWidgetDescriptionTrigger.d.ts","sourceRoot":"","sources":["../../../../src/presentation/widget/description/InsightWidgetDescriptionTrigger.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"InsightWidgetDescriptionTrigger.d.ts","sourceRoot":"","sources":["../../../../src/presentation/widget/description/InsightWidgetDescriptionTrigger.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAE,KAAK,qCAAqC,EAAE,MAAM,YAAY,CAAC;AAGxE,wBAAgB,+BAA+B,CAAC,KAAK,EAAE,qCAAqC,kDA6B3F"}
|
|
@@ -2,22 +2,17 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
// (C) 2022-2026 GoodData Corporation
|
|
3
3
|
import { objRefToString, widgetRef } from "@gooddata/sdk-model";
|
|
4
4
|
import { simplifyText } from "@gooddata/util";
|
|
5
|
-
import {
|
|
6
|
-
import { useDashboardSelector } from "../../../model/react/DashboardStoreProvider.js";
|
|
5
|
+
import { useRichTextWidgetInputs } from "../../../_staging/sharedHooks/useRichTextInputs.js";
|
|
7
6
|
import { useDashboardUserInteraction } from "../../../model/react/useDashboardUserInteraction.js";
|
|
8
|
-
import { useDashboardExecConfig } from "../../../model/react/useWidgetExecConfig.js";
|
|
9
|
-
import { selectRestrictedRichTextReferences } from "../../../model/store/unavailableObjects/unavailableObjectsSelectors.js";
|
|
10
7
|
import { useDashboardComponentsContext } from "../../dashboardContexts/DashboardComponentsContext.js";
|
|
11
8
|
import { DescriptionClickTrigger } from "./DescriptionClickTrigger.js";
|
|
12
9
|
import { useInsightWidgetDescription } from "./useInsightWidgetDescription.js";
|
|
13
10
|
export function InsightWidgetDescriptionTrigger(props) {
|
|
14
|
-
const { widget } = props;
|
|
11
|
+
const { widget, insight } = props;
|
|
15
12
|
const { isVisible, description } = useInsightWidgetDescription(props);
|
|
16
13
|
const widgetRefAsString = objRefToString(widgetRef(widget));
|
|
17
14
|
const userInteraction = useDashboardUserInteraction();
|
|
18
|
-
const
|
|
19
|
-
const { filters } = useRichTextWidgetFilters(widget);
|
|
20
|
-
const restrictedReferences = useDashboardSelector(selectRestrictedRichTextReferences);
|
|
15
|
+
const richTextInputs = useRichTextWidgetInputs(widget, description ?? "", insight);
|
|
21
16
|
const { LoadingComponent } = useDashboardComponentsContext();
|
|
22
17
|
const eventPayload = {
|
|
23
18
|
from: "widget",
|
|
@@ -25,7 +20,7 @@ export function InsightWidgetDescriptionTrigger(props) {
|
|
|
25
20
|
description,
|
|
26
21
|
};
|
|
27
22
|
if (isVisible) {
|
|
28
|
-
return (_jsx(DescriptionClickTrigger, { className: `widget-description-${simplifyText(widgetRefAsString)}`, description: description, onOpen: () => userInteraction.descriptionTooltipOpened(eventPayload), useReferences: true,
|
|
23
|
+
return (_jsx(DescriptionClickTrigger, { className: `widget-description-${simplifyText(widgetRefAsString)}`, description: description, onOpen: () => userInteraction.descriptionTooltipOpened(eventPayload), useReferences: true, ...richTextInputs, LoadingComponent: LoadingComponent }));
|
|
29
24
|
}
|
|
30
25
|
return null;
|
|
31
26
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type ComponentType } from "react";
|
|
2
|
-
import { type
|
|
2
|
+
import { type IInsight, type IInsightWidget, type ScreenSize } from "@gooddata/sdk-model";
|
|
3
|
+
import { type IRichTextInputs } from "../../../_staging/sharedHooks/useRichTextInputs.js";
|
|
3
4
|
import { type DescriptionExportData } from "../../export/types.js";
|
|
4
5
|
export interface IInsightWidgetDescriptionTriggerProps {
|
|
5
6
|
widget: IInsightWidget;
|
|
@@ -7,15 +8,12 @@ export interface IInsightWidgetDescriptionTriggerProps {
|
|
|
7
8
|
screen: ScreenSize;
|
|
8
9
|
exportData?: DescriptionExportData;
|
|
9
10
|
}
|
|
10
|
-
export interface IDescriptionClickTriggerProps {
|
|
11
|
+
export interface IDescriptionClickTriggerProps extends IRichTextInputs {
|
|
11
12
|
className: string;
|
|
12
13
|
description?: string;
|
|
13
14
|
onOpen?: () => void;
|
|
14
15
|
useReferences?: boolean;
|
|
15
16
|
LoadingComponent?: ComponentType;
|
|
16
|
-
filters?: IFilter[];
|
|
17
|
-
restrictedReferences?: ObjRef[];
|
|
18
|
-
execConfig?: IExecutionConfig;
|
|
19
17
|
id?: string;
|
|
20
18
|
}
|
|
21
19
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/presentation/widget/description/types.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C,OAAO,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/presentation/widget/description/types.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,cAAc,EAAE,KAAK,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAE1F,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,oDAAoD,CAAC;AAC1F,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAEnE,MAAM,WAAW,qCAAqC;IAClD,MAAM,EAAE,cAAc,CAAC;IACvB,OAAO,CAAC,EAAE,QAAQ,CAAC;IACnB,MAAM,EAAE,UAAU,CAAC;IACnB,UAAU,CAAC,EAAE,qBAAqB,CAAC;CACtC;AAED,MAAM,WAAW,6BAA8B,SAAQ,eAAe;IAClE,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,gBAAgB,CAAC,EAAE,aAAa,CAAC;IACjC,EAAE,CAAC,EAAE,MAAM,CAAC;CACf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useInsightWidgetDescription.d.ts","sourceRoot":"","sources":["../../../../src/presentation/widget/description/useInsightWidgetDescription.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useInsightWidgetDescription.d.ts","sourceRoot":"","sources":["../../../../src/presentation/widget/description/useInsightWidgetDescription.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,qCAAqC,EAAE,MAAM,YAAY,CAAC;AAExE,eAAO,MAAM,2BAA2B,UAAW,qCAAqC;;;CAgBvF,CAAC"}
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
// (C) 2025-2026 GoodData Corporation
|
|
2
2
|
import { useMemo } from "react";
|
|
3
|
+
import { insightWidgetDescription } from "../../../_staging/insight/insightWidgetDescription.js";
|
|
3
4
|
export const useInsightWidgetDescription = (props) => {
|
|
4
5
|
const { widget, insight } = props;
|
|
5
|
-
const description = useMemo(() =>
|
|
6
|
-
return widget.configuration?.description?.source === "widget" || !insight
|
|
7
|
-
? widget.description
|
|
8
|
-
: insight.insight.summary;
|
|
9
|
-
}, [widget, insight]);
|
|
6
|
+
const description = useMemo(() => insightWidgetDescription(widget, insight), [widget, insight]);
|
|
10
7
|
const trimmedDescription = useMemo(() => description?.trim(), [description]);
|
|
11
8
|
const visible = widget.configuration?.description?.visible ?? true;
|
|
12
9
|
const isVisible = useMemo(() => visible && trimmedDescription && trimmedDescription !== "", [visible, trimmedDescription]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InsightDrillDialog.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/widget/insight/ViewModeDashboardInsight/InsightDrillDialog/InsightDrillDialog.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAsB,KAAK,YAAY,EAAyB,MAAM,OAAO,CAAC;AAKrF,OAAO,EAEH,KAAK,QAAQ,EACb,KAAK,cAAc,
|
|
1
|
+
{"version":3,"file":"InsightDrillDialog.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/widget/insight/ViewModeDashboardInsight/InsightDrillDialog/InsightDrillDialog.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAsB,KAAK,YAAY,EAAyB,MAAM,OAAO,CAAC;AAKrF,OAAO,EAEH,KAAK,QAAQ,EACb,KAAK,cAAc,EAMtB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,KAAK,OAAO,EAAyB,MAAM,kBAAkB,CAAC;AAwBvE,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,gBAAgB,EAAE,KAAK,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAe7G;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACrC,sBAAsB,EAAE,OAAO,CAAC;IAChC,MAAM,EAAE,OAAO,CAAC;IAChB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,MAAM,EAAE,cAAc,CAAC;IACvB,OAAO,EAAE,QAAQ,CAAC;IAClB,SAAS,EAAE,UAAU,CAAC;IACtB,WAAW,CAAC,EAAE,kBAAkB,CAAC;IACjC,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,iBAAiB,EAAE,MAAM,IAAI,CAAC;IAC9B,oBAAoB,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IACjD,YAAY,CAAC,EAAE,gBAAgB,CAAC;CACnC;AAmCD,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,wBAAwB,GAAG,YAAY,CA6MhF"}
|
|
@@ -7,12 +7,9 @@ import { insightTitle, insightVisualizationType, isInsight, } from "@gooddata/sd
|
|
|
7
7
|
import { supportsShowAsTable } from "@gooddata/sdk-ui-ext";
|
|
8
8
|
import { Button, FLOATING_ELEMENT_DATA_ATTR, FullScreenOverlay, Overlay, OverlayController, OverlayControllerProvider, RichText, UiIcon, UiTooltip, isNotDocumentFocused, useIdPrefixed, useMediaQuery, } from "@gooddata/sdk-ui-kit";
|
|
9
9
|
import { DOWNLOADER_ID } from "../../../../../_staging/fileUtils/downloadFile.js";
|
|
10
|
-
import {
|
|
11
|
-
import { useDashboardExecConfig } from "../../../../../model/react/useWidgetExecConfig.js";
|
|
10
|
+
import { useRichTextInputs } from "../../../../../_staging/sharedHooks/useRichTextInputs.js";
|
|
12
11
|
import { useWidgetExecutionsHandler } from "../../../../../model/react/useWidgetExecutionsHandler.js";
|
|
13
|
-
import { selectSeparators } from "../../../../../model/store/config/configSelectors.js";
|
|
14
12
|
import { DRILL_MODAL_EXECUTION_PSEUDO_REF } from "../../../../../model/store/executionResults/constants.js";
|
|
15
|
-
import { selectRestrictedRichTextReferences } from "../../../../../model/store/unavailableObjects/unavailableObjectsSelectors.js";
|
|
16
13
|
import { DASHBOARD_HEADER_OVERLAYS_Z_INDEX } from "../../../../constants/zIndex.js";
|
|
17
14
|
import { useDashboardComponentsContext } from "../../../../dashboardContexts/DashboardComponentsContext.js";
|
|
18
15
|
import { WithDrillSelect } from "../../../../drill/DrillSelect/WithDrillSelect.js";
|
|
@@ -103,7 +100,7 @@ export function InsightDrillDialog(props) {
|
|
|
103
100
|
return (_jsx(OverlayControllerProvider, { overlayController: overlayController, children: _jsx(OverlayComponent, { className: "gd-drill-modal-overlay", isModal: true, closeOnEscape: true, closeOnOutsideClick: true, ignoreClicksOnByClass: overlayIgnoredClasses, onClose: onCloseDialog, positionType: "fixed", children: _jsx(IntlWrapper, { locale: locale, children: _jsxs(DrillDialog, { insight: insight, widget: widget, insightTitle: baseInsightTitle, isBackButtonVisible: breadcrumbs.length > 1, onBackButtonClick: onBackButtonClick, onCloseDialog: onCloseDialog, breadcrumbs: breadcrumbs, exportAvailable: exportXLSXEnabled || exportCSVEnabled, exportXLSXEnabled: exportXLSXEnabled, exportCSVEnabled: exportCSVEnabled, exportCSVRawEnabled: exportCSVRawEnabled, exportPDFEnabled: exportPdfTabularEnabled, exportPDFVisible: isExportPdfTabularVisible, enableDrillDescription: enableDrillDescription, onExportXLSX: onExportXLSX, onExportCSV: onExportCSV, onExportCSVRaw: onExportRawCSV, onExportPDF: onExportPdfTabular, isLoading: isLoading, isExporting: isExporting, isExportRawVisible: isExportRawVisible, isShowAsTableVisible: isShowAsTableVisible, isWidgetAsTable: drillDialogIsAsTable, onShowAsTable: toggleWidgetAsTable, focusCheckFn: isNotDocumentFocused, accessibilityConfig: {
|
|
104
101
|
dialogId,
|
|
105
102
|
}, children: [_jsx(WithDrillSelect, { widgetRef: widget.ref, insight: props.insight, returnFocusToInsight: returnFocusToInsight, onDrillStart: onDrillStart, onDrillDownSuccess: onDrillDown, children: ({ onDrill }) => {
|
|
106
|
-
return description && enableDrillDescription ? (_jsxs("div", { className: "drill-dialog-insight-container", children: [_jsxs("div", { className: "drill-dialog-insight-container-insight", children: [_jsx(InsightDrillDialogDescriptionButton, { isOpen: isOpen, isMobileDevice: isMobileDevice, setIsOpen: setIsOpen, descriptionId: descriptionId }), _jsx(DrillDialogInsight, { ...props, onDrill: onDrill, onLoadingChanged: handleLoadingChanged, onError: executionsHandler.onError, onWidgetFiltersReady: handleFiltersReady, pushData: executionsHandler.onPushData, ErrorComponent: ErrorComponent, LoadingComponent: LoadingComponent, drillStep: drillStep, isWidgetAsTable: drillDialogIsAsTable })] }), _jsx(InsightDrillDialogDescriptionContent, { id: descriptionId, isOpen: isOpen, isMobileDevice: isMobileDevice, description: description, widgetFilters: widgetFilters, LoadingComponent: LoadingComponent })] })) : (_jsx(DrillDialogInsight, { ...props, onDrill: onDrill, onLoadingChanged: handleLoadingChanged, onError: executionsHandler.onError, pushData: executionsHandler.onPushData, ErrorComponent: ErrorComponent, LoadingComponent: LoadingComponent, drillStep: drillStep, isWidgetAsTable: drillDialogIsAsTable }));
|
|
103
|
+
return description && enableDrillDescription ? (_jsxs("div", { className: "drill-dialog-insight-container", children: [_jsxs("div", { className: "drill-dialog-insight-container-insight", children: [_jsx(InsightDrillDialogDescriptionButton, { isOpen: isOpen, isMobileDevice: isMobileDevice, setIsOpen: setIsOpen, descriptionId: descriptionId }), _jsx(DrillDialogInsight, { ...props, onDrill: onDrill, onLoadingChanged: handleLoadingChanged, onError: executionsHandler.onError, onWidgetFiltersReady: handleFiltersReady, pushData: executionsHandler.onPushData, ErrorComponent: ErrorComponent, LoadingComponent: LoadingComponent, drillStep: drillStep, isWidgetAsTable: drillDialogIsAsTable })] }), _jsx(InsightDrillDialogDescriptionContent, { id: descriptionId, isOpen: isOpen, isMobileDevice: isMobileDevice, description: description, widgetRef: widget.ref, insight: props.insight, widgetFilters: widgetFilters, LoadingComponent: LoadingComponent })] })) : (_jsx(DrillDialogInsight, { ...props, onDrill: onDrill, onLoadingChanged: handleLoadingChanged, onError: executionsHandler.onError, pushData: executionsHandler.onPushData, ErrorComponent: ErrorComponent, LoadingComponent: LoadingComponent, drillStep: drillStep, isWidgetAsTable: drillDialogIsAsTable }));
|
|
107
104
|
} }), limitBreaks.length > 0 && executionResult ? (_jsx(InsightWidgetWarningPartialResult, { className: "gd-warning-partial-result", limitBreaks: limitBreaks, onExportRawCSV: onExportRawCSV, isExporting: isExporting, isExportRawVisible: isExportRawVisible, isLoading: executionResult?.isLoading, executionResult: executionResult })) : null] }) }) }) }));
|
|
108
105
|
}
|
|
109
106
|
function InsightDrillDialogDescriptionButton({ isOpen, isMobileDevice, setIsOpen, descriptionId, }) {
|
|
@@ -120,12 +117,10 @@ function InsightDrillDialogDescriptionButton({ isOpen, isMobileDevice, setIsOpen
|
|
|
120
117
|
ariaExpanded: isOpen,
|
|
121
118
|
}, value: _jsx(UiIcon, { type: "question", size: 18 }) }) }));
|
|
122
119
|
}
|
|
123
|
-
function InsightDrillDialogDescriptionContent({ id, isOpen, isMobileDevice, description, widgetFilters, LoadingComponent, }) {
|
|
124
|
-
const
|
|
125
|
-
const restrictedReferences = useDashboardSelector(selectRestrictedRichTextReferences);
|
|
126
|
-
const execConfig = useDashboardExecConfig();
|
|
120
|
+
function InsightDrillDialogDescriptionContent({ id, isOpen, isMobileDevice, description, widgetRef, insight, widgetFilters, LoadingComponent, }) {
|
|
121
|
+
const richTextInputs = useRichTextInputs(description, widgetFilters, { widgetRef, insight });
|
|
127
122
|
return (_jsx("div", { id: id, className: cx("drill-dialog-insight-container-description", {
|
|
128
123
|
"drill-dialog-insight-container-description--open": isOpen,
|
|
129
124
|
"drill-dialog-insight-container-description--mobile": isMobileDevice,
|
|
130
|
-
}), children: _jsx("div", { className: "drill-dialog-insight-container-description-content", children: _jsx(RichText, { value: description,
|
|
125
|
+
}), children: _jsx("div", { className: "drill-dialog-insight-container-description-content", children: _jsx(RichText, { value: description, renderMode: "view", referencesEnabled: true, ...richTextInputs, LoadingComponent: LoadingComponent }) }) }));
|
|
131
126
|
}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { type ComponentType } from "react";
|
|
2
|
-
import { type IFilter, type
|
|
2
|
+
import { type IFilter, type IInsight, type ObjRef } from "@gooddata/sdk-model";
|
|
3
3
|
interface IInsightDescriptionProps {
|
|
4
4
|
description: string;
|
|
5
5
|
readOnly?: boolean;
|
|
6
6
|
setDescription: (newDescription: string) => void;
|
|
7
7
|
LoadingComponent?: ComponentType;
|
|
8
8
|
insightFilters?: IFilter[];
|
|
9
|
-
|
|
9
|
+
widgetRef: ObjRef;
|
|
10
|
+
insight?: IInsight;
|
|
10
11
|
}
|
|
11
|
-
export declare function InsightDescription({ description, setDescription, readOnly, LoadingComponent, insightFilters,
|
|
12
|
+
export declare function InsightDescription({ description, setDescription, readOnly, LoadingComponent, insightFilters, widgetRef, insight, }: IInsightDescriptionProps): import("react/jsx-runtime").JSX.Element;
|
|
12
13
|
export {};
|
|
13
14
|
//# sourceMappingURL=InsightDescription.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InsightDescription.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/widget/insight/configuration/InsightDescriptionConfig/InsightDescription.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,aAAa,EAAoC,MAAM,OAAO,CAAC;AAK7E,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"InsightDescription.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/widget/insight/configuration/InsightDescriptionConfig/InsightDescription.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,aAAa,EAAoC,MAAM,OAAO,CAAC;AAK7E,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAc/E,UAAU,wBAAwB;IAC9B,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,cAAc,EAAE,CAAC,cAAc,EAAE,MAAM,KAAK,IAAI,CAAC;IACjD,gBAAgB,CAAC,EAAE,aAAa,CAAC;IACjC,cAAc,CAAC,EAAE,OAAO,EAAE,CAAC;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,QAAQ,CAAC;CACtB;AAED,wBAAgB,kBAAkB,CAAC,EAC/B,WAAW,EACX,cAAc,EACd,QAAgB,EAChB,gBAAgB,EAChB,cAAc,EACd,SAAS,EACT,OAAO,GACV,EAAE,wBAAwB,2CAmG1B"}
|
package/esm/presentation/widget/insight/configuration/InsightDescriptionConfig/InsightDescription.js
CHANGED
|
@@ -4,15 +4,13 @@ import { useCallback, useEffect, useState } from "react";
|
|
|
4
4
|
import cx from "classnames";
|
|
5
5
|
import { useIntl } from "react-intl";
|
|
6
6
|
import { RichTextWithTooltip } from "@gooddata/sdk-ui-kit";
|
|
7
|
-
import {
|
|
8
|
-
import { useDashboardExecConfig } from "../../../../../model/react/useWidgetExecConfig.js";
|
|
9
|
-
import { selectRestrictedRichTextReferences } from "../../../../../model/store/unavailableObjects/unavailableObjectsSelectors.js";
|
|
7
|
+
import { useRichTextInputs } from "../../../../../_staging/sharedHooks/useRichTextInputs.js";
|
|
10
8
|
import { RestrictedReferencesDialog, useHasRestrictedReferences, } from "../../../richText/RestrictedReferencesDialog.js";
|
|
11
9
|
const richTextTooltipAlignPoints = [
|
|
12
10
|
{ align: "bl tl", offset: { x: 4, y: 5 } },
|
|
13
11
|
{ align: "tl bl", offset: { x: 4, y: -5 } },
|
|
14
12
|
];
|
|
15
|
-
export function InsightDescription({ description, setDescription, readOnly = false, LoadingComponent, insightFilters,
|
|
13
|
+
export function InsightDescription({ description, setDescription, readOnly = false, LoadingComponent, insightFilters, widgetRef, insight, }) {
|
|
16
14
|
const intl = useIntl();
|
|
17
15
|
const placeholder = intl.formatMessage({
|
|
18
16
|
id: "configurationPanel.visualprops.descriptionPlaceholder",
|
|
@@ -20,8 +18,6 @@ export function InsightDescription({ description, setDescription, readOnly = fal
|
|
|
20
18
|
// what the editor asked for; whether it is the question or the editor follows from the text
|
|
21
19
|
const [isEditingRequested, setIsEditingRequested] = useState(false);
|
|
22
20
|
const [richTextValue, setRichTextValue] = useState(description);
|
|
23
|
-
const execConfig = useDashboardExecConfig();
|
|
24
|
-
const restrictedReferences = useDashboardSelector(selectRestrictedRichTextReferences);
|
|
25
21
|
useEffect(() => {
|
|
26
22
|
setRichTextValue(description);
|
|
27
23
|
}, [description]);
|
|
@@ -35,6 +31,8 @@ export function InsightDescription({ description, setDescription, readOnly = fal
|
|
|
35
31
|
const hasRestrictedReferences = useHasRestrictedReferences(richTextValue);
|
|
36
32
|
const isRichTextEditing = isEditingRequested && !hasRestrictedReferences;
|
|
37
33
|
const isAskingToSanitize = isEditingRequested && hasRestrictedReferences;
|
|
34
|
+
// the editor shows no evaluated references, so a keystroke asks for no parameter dependencies
|
|
35
|
+
const richTextInputs = useRichTextInputs(isRichTextEditing ? description : richTextValue, insightFilters, { widgetRef, insight });
|
|
38
36
|
// the rewrite is committed at once: it was confirmed, and it is not a keystroke. The editor was
|
|
39
37
|
// already asked for, so the description opens as soon as the text no longer holds a reference
|
|
40
38
|
const onSanitized = useCallback((sanitized) => {
|
|
@@ -56,5 +54,5 @@ export function InsightDescription({ description, setDescription, readOnly = fal
|
|
|
56
54
|
startEditing();
|
|
57
55
|
}
|
|
58
56
|
}, [isEditingRequested, readOnly, startEditing]);
|
|
59
|
-
return (_jsxs("label", { className: "gd-input", children: [_jsx("div", { className: cx("gd-input-field gd-rich-text-insight-description", { disabled: readOnly }), onClick: onDescriptionClick, onBlur: onDescriptionBlur, children: _jsx(RichTextWithTooltip, { value: richTextValue, renderMode: isRichTextEditing ? "edit" : "view", onChange: onRichTextChange, editRows: 4, editPlaceholder: placeholder, emptyElement: readOnly ? undefined : (_jsx("div", { className: "gd-editable-label-richtext-empty", children: placeholder })), showTooltip: isRichTextEditing, tooltipAlignPoints: richTextTooltipAlignPoints, referencesEnabled: true, LoadingComponent: LoadingComponent,
|
|
57
|
+
return (_jsxs("label", { className: "gd-input", children: [_jsx("div", { className: cx("gd-input-field gd-rich-text-insight-description", { disabled: readOnly }), onClick: onDescriptionClick, onBlur: onDescriptionBlur, children: _jsx(RichTextWithTooltip, { value: richTextValue, renderMode: isRichTextEditing ? "edit" : "view", onChange: onRichTextChange, editRows: 4, editPlaceholder: placeholder, emptyElement: readOnly ? undefined : (_jsx("div", { className: "gd-editable-label-richtext-empty", children: placeholder })), showTooltip: isRichTextEditing, tooltipAlignPoints: richTextTooltipAlignPoints, referencesEnabled: true, LoadingComponent: LoadingComponent, ...richTextInputs }) }), isAskingToSanitize ? (_jsx(RestrictedReferencesDialog, { value: richTextValue, onSanitized: onSanitized, onCancel: stopEditing })) : null] }));
|
|
60
58
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InsightDescriptionConfig.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/widget/insight/configuration/InsightDescriptionConfig/InsightDescriptionConfig.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,sCAAsC,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"InsightDescriptionConfig.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/widget/insight/configuration/InsightDescriptionConfig/InsightDescriptionConfig.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,sCAAsC,EAAE,MAAM,qBAAqB,CAAC;AAgBvG,UAAU,8BAA8B;IACpC,MAAM,EAAE,cAAc,CAAC;IACvB,iBAAiB,EAAE,sCAAsC,CAAC;IAC1D,0BAA0B,EAAE,OAAO,CAAC;IACpC,2BAA2B,EAAE,CACzB,MAAM,EAAE,cAAc,EACtB,SAAS,EAAE,sCAAsC,KAChD,IAAI,CAAC;IACV,oBAAoB,EAAE,CAAC,MAAM,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,KAAK,IAAI,CAAC;CAClF;AA+BD,wBAAgB,wBAAwB,CAAC,EACrC,iBAAiB,EACjB,MAAM,EACN,2BAA2B,EAC3B,0BAA0B,EAC1B,oBAAoB,GACvB,EAAE,8BAA8B,2CAiJhC"}
|
|
@@ -5,7 +5,6 @@ import { FormattedMessage, useIntl } from "react-intl";
|
|
|
5
5
|
import { Dropdown, DropdownButton, DropdownList, SingleSelectListItem, Typography, } from "@gooddata/sdk-ui-kit";
|
|
6
6
|
import { useDashboardSelector } from "../../../../../model/react/DashboardStoreProvider.js";
|
|
7
7
|
import { useWidgetFilters } from "../../../../../model/react/useWidgetFilters.js";
|
|
8
|
-
import { selectSeparators } from "../../../../../model/store/config/configSelectors.js";
|
|
9
8
|
import { selectInsightByRef } from "../../../../../model/store/insights/insightsSelectors.js";
|
|
10
9
|
import { useDashboardComponentsContext } from "../../../../dashboardContexts/DashboardComponentsContext.js";
|
|
11
10
|
import { InsightDescription } from "./InsightDescription.js";
|
|
@@ -44,7 +43,6 @@ export function InsightDescriptionConfig({ descriptionConfig, widget, setDescrip
|
|
|
44
43
|
], [intl]);
|
|
45
44
|
const { LoadingComponent } = useDashboardComponentsContext();
|
|
46
45
|
const insight = useDashboardSelector(selectInsightByRef(widget.insight));
|
|
47
|
-
const separators = useDashboardSelector(selectSeparators);
|
|
48
46
|
const { result } = useWidgetFilters(widget, insight);
|
|
49
47
|
const [widgetDescriptionState, setWidgetDescriptionState] = useState(getStateFromConfig(descriptionConfig, widget.description, insight?.insight?.summary));
|
|
50
48
|
const [lastCustomWidgetDescription, setLastCustomWidgetDescription] = useState(widget.description);
|
|
@@ -94,5 +92,5 @@ export function InsightDescriptionConfig({ descriptionConfig, widget, setDescrip
|
|
|
94
92
|
} }));
|
|
95
93
|
} })), renderButton: ({ openDropdown, isOpen }) => (_jsx(DropdownButton, { value: dropdownItems.find((item) => item.id === widgetDescriptionState.config)
|
|
96
94
|
?.title, isOpen: isOpen, onClick: openDropdown, className: "description-config-dropdown-button s-description-config-dropdown-button" })) }), widgetDescriptionState.config === "widget" ||
|
|
97
|
-
widgetDescriptionState.config === "insight" ? (_jsx(InsightDescription, { description: widgetDescriptionState.description ?? "", setDescription: handleDescriptionChange, readOnly: widgetDescriptionState.config === "insight", LoadingComponent: LoadingComponent, insightFilters: result,
|
|
95
|
+
widgetDescriptionState.config === "insight" ? (_jsx(InsightDescription, { description: widgetDescriptionState.description ?? "", setDescription: handleDescriptionChange, readOnly: widgetDescriptionState.config === "insight", LoadingComponent: LoadingComponent, insightFilters: result, widgetRef: widget.ref, insight: insight })) : null] })) : null }));
|
|
98
96
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EditModeDashboardRichText.d.ts","sourceRoot":"","sources":["../../../../src/presentation/widget/richText/EditModeDashboardRichText.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"EditModeDashboardRichText.d.ts","sourceRoot":"","sources":["../../../../src/presentation/widget/richText/EditModeDashboardRichText.tsx"],"names":[],"mappings":"AA6BA,OAAO,EAAE,KAAK,uBAAuB,EAAE,MAAM,YAAY,CAAC;AAK1D;;GAEG;AACH,wBAAgB,yBAAyB,CAAC,EAAE,MAAM,EAAE,WAAW,EAAE,YAAY,EAAE,EAAE,uBAAuB,2CA+HvG"}
|
|
@@ -6,15 +6,13 @@ import { widgetRef } from "@gooddata/sdk-model";
|
|
|
6
6
|
import { usePrevious } from "@gooddata/sdk-ui";
|
|
7
7
|
import { ConfirmDialog, IconRichText, OverlayController, OverlayControllerProvider, RichText, Typography, } from "@gooddata/sdk-ui-kit";
|
|
8
8
|
import { useTheme } from "@gooddata/sdk-ui-theme-provider";
|
|
9
|
-
import {
|
|
9
|
+
import { useRichTextWidgetInputs } from "../../../_staging/sharedHooks/useRichTextInputs.js";
|
|
10
10
|
import { eagerRemoveSectionItemByWidgetRef } from "../../../model/commands/layout.js";
|
|
11
11
|
import { changeRichTextWidgetContent } from "../../../model/commands/richText.js";
|
|
12
12
|
import { useDashboardDispatch, useDashboardSelector } from "../../../model/react/DashboardStoreProvider.js";
|
|
13
|
-
import { useDashboardExecConfig } from "../../../model/react/useWidgetExecConfig.js";
|
|
14
13
|
import { useWidgetSelection } from "../../../model/react/useWidgetSelection.js";
|
|
15
|
-
import { selectIsWhiteLabeled
|
|
14
|
+
import { selectIsWhiteLabeled } from "../../../model/store/config/configSelectors.js";
|
|
16
15
|
import { uiActions } from "../../../model/store/ui/index.js";
|
|
17
|
-
import { selectRestrictedRichTextReferences } from "../../../model/store/unavailableObjects/unavailableObjectsSelectors.js";
|
|
18
16
|
import { DASHBOARD_OVERLAYS_FILTER_Z_INDEX } from "../../../presentation/constants/zIndex.js";
|
|
19
17
|
import { useDashboardComponentsContext } from "../../dashboardContexts/DashboardComponentsContext.js";
|
|
20
18
|
import { RestrictedReferencesDialog, useHasRestrictedReferences } from "./RestrictedReferencesDialog.js";
|
|
@@ -27,12 +25,8 @@ export function EditModeDashboardRichText({ widget, clientWidth, clientHeight })
|
|
|
27
25
|
const { isSelected, hasConfigPanelOpen, closeConfigPanel } = useWidgetSelection(widgetRef(widget));
|
|
28
26
|
const previousIsSelected = usePrevious(isSelected);
|
|
29
27
|
const isWhiteLabeled = useDashboardSelector(selectIsWhiteLabeled);
|
|
30
|
-
const restrictedReferences = useDashboardSelector(selectRestrictedRichTextReferences);
|
|
31
28
|
const intl = useIntl();
|
|
32
|
-
const execConfig = useDashboardExecConfig();
|
|
33
29
|
const { menuItems } = useEditableRichTextMenu({ closeMenu: closeConfigPanel, widget });
|
|
34
|
-
const { filters } = useRichTextWidgetFilters(widget);
|
|
35
|
-
const separators = useDashboardSelector(selectSeparators);
|
|
36
30
|
const dispatch = useDashboardDispatch();
|
|
37
31
|
const releaseWidget = useCallback(() => dispatch(uiActions.clearWidgetSelection()), [dispatch]);
|
|
38
32
|
const [richText, setRichText] = useState(widget?.content);
|
|
@@ -49,6 +43,8 @@ export function EditModeDashboardRichText({ widget, clientWidth, clientHeight })
|
|
|
49
43
|
const hasRestrictedReferences = useHasRestrictedReferences(richText);
|
|
50
44
|
const isRichTextEditing = isSelected && !hasRestrictedReferences;
|
|
51
45
|
const isAskingToSanitize = isSelected && hasRestrictedReferences;
|
|
46
|
+
// the editor shows no evaluated references, so a keystroke asks for no parameter dependencies
|
|
47
|
+
const richTextInputs = useRichTextWidgetInputs(widget, isRichTextEditing ? widget.content : richText);
|
|
52
48
|
const [isConfirmDeleteDialogVisible, setIsConfirmDeleteDialogVisible] = useState(false);
|
|
53
49
|
const theme = useTheme();
|
|
54
50
|
const emptyContentIconColor = theme?.palette?.complementary?.c7 ?? "#6D7680";
|
|
@@ -68,5 +64,5 @@ export function EditModeDashboardRichText({ widget, clientWidth, clientHeight })
|
|
|
68
64
|
clientWidth > 250 &&
|
|
69
65
|
typeof clientHeight !== "undefined" &&
|
|
70
66
|
clientHeight > 150;
|
|
71
|
-
return (_jsxs(_Fragment, { children: [hasConfigPanelOpen ? (_jsx(RichTextMenuComponent, { widget: widget, isOpen: hasConfigPanelOpen, onClose: closeConfigPanel, items: menuItems })) : null, _jsx(RichText, { referencesEnabled: true,
|
|
67
|
+
return (_jsxs(_Fragment, { children: [hasConfigPanelOpen ? (_jsx(RichTextMenuComponent, { widget: widget, isOpen: hasConfigPanelOpen, onClose: closeConfigPanel, items: menuItems })) : null, _jsx(RichText, { referencesEnabled: true, ...richTextInputs, className: "gd-rich-text-widget", value: richText, onChange: setRichText, renderMode: isRichTextEditing ? "edit" : "view", emptyElement: EmptyElement, LoadingComponent: LoadingComponent }), isRichTextEditing && showLink ? (_jsx("div", { className: "gd-rich-text-widget-footer", children: _jsx("div", { className: "gd-rich-text-footer-options", children: showLink ? (_jsx("a", { className: "gd-button-link-dimmed gd-icon-circle-question", href: "https://www.gooddata.com/docs/cloud/create-dashboards/rich-text/", rel: "noopener noreferrer", target: "_blank", children: _jsx(FormattedMessage, { id: "richText.formattingOptions" }) })) : null }) })) : null, isAskingToSanitize ? (_jsx(RestrictedReferencesDialog, { value: richText, onSanitized: onSanitized, onCancel: releaseWidget })) : null, isConfirmDeleteDialogVisible ? (_jsx(OverlayControllerProvider, { overlayController: overlayController, children: _jsx(ConfirmDialog, { className: "s-rich-text-remove-confirm-dialog", onSubmit: () => dispatch(eagerRemoveSectionItemByWidgetRef(widget.ref)), onCancel: () => setIsConfirmDeleteDialogVisible(false), headline: intl.formatMessage({ id: "richText.deleteDialog.header" }), submitButtonText: intl.formatMessage({ id: "delete" }), cancelButtonText: intl.formatMessage({ id: "cancel" }), children: _jsx(FormattedMessage, { id: "richText.deleteDialog.message" }) }) })) : null] }));
|
|
72
68
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ViewModeDashboardRichText.d.ts","sourceRoot":"","sources":["../../../../src/presentation/widget/richText/ViewModeDashboardRichText.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ViewModeDashboardRichText.d.ts","sourceRoot":"","sources":["../../../../src/presentation/widget/richText/ViewModeDashboardRichText.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAE,KAAK,uBAAuB,EAAE,MAAM,YAAY,CAAC;AAE1D;;GAEG;AACH,wBAAgB,yBAAyB,CAAC,EACtC,MAAM,EACN,kBAAkB,EAClB,gBAAgB,EAChB,OAAO,GACV,EAAE,uBAAuB,2CAkDzB"}
|
|
@@ -2,23 +2,17 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
// (C) 2020-2026 GoodData Corporation
|
|
3
3
|
import { useIntl } from "react-intl";
|
|
4
4
|
import { RichText } from "@gooddata/sdk-ui-kit";
|
|
5
|
-
import {
|
|
5
|
+
import { useRichTextWidgetInputs } from "../../../_staging/sharedHooks/useRichTextInputs.js";
|
|
6
6
|
import { useDashboardSelector } from "../../../model/react/DashboardStoreProvider.js";
|
|
7
|
-
import { useDashboardExecConfig } from "../../../model/react/useWidgetExecConfig.js";
|
|
8
|
-
import { selectSeparators } from "../../../model/store/config/configSelectors.js";
|
|
9
7
|
import { DASHBOARD_SUMMARY_MACRO } from "../../../model/store/dashboardSummaryWorkflow/constants.js";
|
|
10
8
|
import { selectCurrentDashboardSummaryWorkflowStatus } from "../../../model/store/dashboardSummaryWorkflow/dashboardSummaryWorkflowSelectors.js";
|
|
11
9
|
import { selectCurrentDashboardSummary } from "../../../model/store/listedDashboards/listedDashboardsSummarySelectors.js";
|
|
12
|
-
import { selectRestrictedRichTextReferences } from "../../../model/store/unavailableObjects/unavailableObjectsSelectors.js";
|
|
13
10
|
import { useDashboardComponentsContext } from "../../dashboardContexts/DashboardComponentsContext.js";
|
|
14
11
|
/**
|
|
15
12
|
* @internal
|
|
16
13
|
*/
|
|
17
14
|
export function ViewModeDashboardRichText({ widget, richTextExportData, onLoadingChanged, onError, }) {
|
|
18
15
|
const intl = useIntl();
|
|
19
|
-
const { filters } = useRichTextWidgetFilters(widget);
|
|
20
|
-
const separators = useDashboardSelector(selectSeparators);
|
|
21
|
-
const restrictedReferences = useDashboardSelector(selectRestrictedRichTextReferences);
|
|
22
16
|
const { LoadingComponent } = useDashboardComponentsContext();
|
|
23
17
|
const dashboardSummary = useDashboardSelector(selectCurrentDashboardSummary);
|
|
24
18
|
const summaryWorkflowStatus = useDashboardSelector(selectCurrentDashboardSummaryWorkflowStatus);
|
|
@@ -45,9 +39,9 @@ export function ViewModeDashboardRichText({ widget, richTextExportData, onLoadin
|
|
|
45
39
|
})();
|
|
46
40
|
const raw = widget?.content ?? "";
|
|
47
41
|
const value = raw.split(DASHBOARD_SUMMARY_MACRO).join(summaryWorkflowReplaceString);
|
|
48
|
-
const
|
|
49
|
-
return (_jsx(RichText, { referencesEnabled: true, className: "gd-rich-text-widget", value: value,
|
|
42
|
+
const richTextInputs = useRichTextWidgetInputs(widget, value);
|
|
43
|
+
return (_jsx(RichText, { referencesEnabled: true, className: "gd-rich-text-widget", value: value, ...richTextInputs, renderMode: "view", rawContent: {
|
|
50
44
|
show: !!richTextExportData,
|
|
51
45
|
dataAttributes: richTextExportData?.markdown,
|
|
52
|
-
},
|
|
46
|
+
}, onLoadingChanged: onLoadingChanged, onError: onError, LoadingComponent: LoadingComponent }));
|
|
53
47
|
}
|