@gooddata/sdk-ui-ext 11.68.0-alpha.1 → 11.68.0-alpha.10
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/NOTICE +8336 -63104
- package/esm/insightView/InsightRenderer.d.ts.map +1 -1
- package/esm/insightView/InsightRenderer.js +4 -4
- package/esm/internal/components/BaseVisualization.d.ts.map +1 -1
- package/esm/internal/components/BaseVisualization.js +7 -7
- package/esm/internal/components/attributeHierarchies/attributeHierarchyDialog/AttributeHierarchyDialogFooter.js +2 -2
- package/esm/internal/components/attributeHierarchies/attributeHierarchyDialog/AttributeHierarchyDialogProvider.d.ts.map +1 -1
- package/esm/internal/components/attributeHierarchies/attributeHierarchyDialog/AttributeHierarchyDialogProvider.js +4 -4
- package/esm/internal/components/attributeHierarchies/attributeHierarchyDialog/useBackendProvider.d.ts.map +1 -1
- package/esm/internal/components/attributeHierarchies/attributeHierarchyDialog/useBackendProvider.js +2 -2
- package/esm/internal/components/attributeHierarchies/attributeHierarchyDialog/utils.d.ts.map +1 -1
- package/esm/internal/components/attributeHierarchies/attributeHierarchyDialog/utils.js +2 -2
- package/esm/internal/components/configurationControls/CheckboxControl.d.ts.map +1 -1
- package/esm/internal/components/configurationControls/CheckboxControl.js +3 -3
- package/esm/internal/components/configurationControls/ConfigSection.d.ts.map +1 -1
- package/esm/internal/components/configurationControls/ConfigSection.js +3 -3
- package/esm/internal/components/configurationControls/ConfigSubsection.d.ts.map +1 -1
- package/esm/internal/components/configurationControls/ConfigSubsection.js +3 -3
- package/esm/internal/components/configurationControls/ContinuousLineControl.js +3 -3
- package/esm/internal/components/configurationControls/DistintcPointShapesControl.js +3 -3
- package/esm/internal/components/configurationControls/DropdownControl.d.ts.map +1 -1
- package/esm/internal/components/configurationControls/DropdownControl.js +3 -3
- package/esm/internal/components/configurationControls/GeoViewportControl.d.ts.map +1 -1
- package/esm/internal/components/configurationControls/GeoViewportControl.js +14 -14
- package/esm/internal/components/configurationControls/InputControl.d.ts.map +1 -1
- package/esm/internal/components/configurationControls/InputControl.js +4 -4
- package/esm/internal/components/configurationControls/LineShapeControl.d.ts.map +1 -1
- package/esm/internal/components/configurationControls/LineShapeControl.js +3 -2
- package/esm/internal/components/configurationControls/PagingSection.js +5 -5
- package/esm/internal/components/configurationControls/PivotTableTextWrappingControl.d.ts.map +1 -1
- package/esm/internal/components/configurationControls/PivotTableTextWrappingControl.js +3 -3
- package/esm/internal/components/configurationControls/PushpinShapeControl.d.ts.map +1 -1
- package/esm/internal/components/configurationControls/PushpinShapeControl.js +5 -5
- package/esm/internal/components/configurationControls/advanced/AdvancedSection.d.ts.map +1 -1
- package/esm/internal/components/configurationControls/advanced/AdvancedSection.js +3 -3
- package/esm/internal/components/configurationControls/colors/ColorsSection.js +3 -3
- package/esm/internal/components/configurationControls/comparison/indicators/colorsControl/ColorCheckbox.d.ts.map +1 -1
- package/esm/internal/components/configurationControls/comparison/indicators/colorsControl/ColorCheckbox.js +4 -4
- package/esm/internal/components/configurationControls/comparison/indicators/colorsControl/ColorItem.d.ts.map +1 -1
- package/esm/internal/components/configurationControls/comparison/indicators/colorsControl/ColorItem.js +3 -3
- package/esm/internal/components/configurationControls/comparison/indicators/colorsControl/ColorResetButton.d.ts.map +1 -1
- package/esm/internal/components/configurationControls/comparison/indicators/colorsControl/ColorResetButton.js +6 -6
- package/esm/internal/components/configurationControls/comparison/values/numberFormat/NumberFormatControl.d.ts.map +1 -1
- package/esm/internal/components/configurationControls/comparison/values/numberFormat/NumberFormatControl.js +3 -3
- package/esm/internal/components/configurationControls/conditionalFormatting/ConditionalFormattingDialog.d.ts.map +1 -1
- package/esm/internal/components/configurationControls/conditionalFormatting/ConditionalFormattingDialog.js +2 -2
- package/esm/internal/components/configurationControls/conditionalFormatting/ConditionalFormattingSection.d.ts.map +1 -1
- package/esm/internal/components/configurationControls/conditionalFormatting/ConditionalFormattingSection.js +3 -3
- package/esm/internal/components/configurationControls/customTooltip/CustomTooltipSection.js +3 -3
- package/esm/internal/components/configurationControls/interactions/InteractionsSection.d.ts +1 -2
- package/esm/internal/components/configurationControls/interactions/InteractionsSection.d.ts.map +1 -1
- package/esm/internal/components/configurationControls/interactions/InteractionsSection.js +2 -2
- package/esm/internal/components/configurationControls/total/TotalSection.d.ts.map +1 -1
- package/esm/internal/components/configurationControls/total/TotalSection.js +4 -4
- package/esm/internal/components/configurationPanels/BaseChartConfigurationPanel.js +2 -2
- package/esm/internal/components/configurationPanels/ConfigurationPanelContent.d.ts.map +1 -1
- package/esm/internal/components/configurationPanels/ConfigurationPanelContent.js +1 -2
- package/esm/internal/components/configurationPanels/LineChartBasedConfigurationPanel.js +1 -1
- package/esm/internal/components/configurationPanels/UnsupportedConfigurationPanel.js +2 -2
- package/esm/internal/components/dialogs/userManagementDialogs/Workspace/WorkspaceItem/granularPermissionUtils.d.ts.map +1 -1
- package/esm/internal/components/dialogs/userManagementDialogs/Workspace/WorkspaceItem/granularPermissionUtils.js +3 -3
- package/esm/internal/components/dialogs/userManagementDialogs/types.d.ts.map +1 -1
- package/esm/internal/components/dialogs/userManagementDialogs/types.js +6 -6
- package/esm/internal/components/insightList/useInsightPagedList.d.ts.map +1 -1
- package/esm/internal/components/insightList/useInsightPagedList.js +3 -3
- package/esm/internal/components/pluggableVisualizations/AbstractPluggableVisualization.d.ts.map +1 -1
- package/esm/internal/components/pluggableVisualizations/AbstractPluggableVisualization.js +4 -4
- package/esm/internal/components/pluggableVisualizations/PluggableColumnBarCharts.d.ts.map +1 -1
- package/esm/internal/components/pluggableVisualizations/PluggableColumnBarCharts.js +3 -4
- package/esm/internal/components/pluggableVisualizations/areaChart/PluggableAreaChart.d.ts.map +1 -1
- package/esm/internal/components/pluggableVisualizations/areaChart/PluggableAreaChart.js +6 -6
- package/esm/internal/components/pluggableVisualizations/barChart/PluggableBarChart.d.ts.map +1 -1
- package/esm/internal/components/pluggableVisualizations/barChart/PluggableBarChart.js +7 -7
- package/esm/internal/components/pluggableVisualizations/baseChart/PluggableBaseChart.d.ts.map +1 -1
- package/esm/internal/components/pluggableVisualizations/baseChart/PluggableBaseChart.js +9 -8
- package/esm/internal/components/pluggableVisualizations/bubbleChart/PluggableBubbleChart.d.ts.map +1 -1
- package/esm/internal/components/pluggableVisualizations/bubbleChart/PluggableBubbleChart.js +4 -5
- package/esm/internal/components/pluggableVisualizations/bulletChart/PluggableBulletChart.d.ts.map +1 -1
- package/esm/internal/components/pluggableVisualizations/bulletChart/PluggableBulletChart.js +3 -3
- package/esm/internal/components/pluggableVisualizations/columnChart/PluggableColumnChart.d.ts.map +1 -1
- package/esm/internal/components/pluggableVisualizations/columnChart/PluggableColumnChart.js +7 -7
- package/esm/internal/components/pluggableVisualizations/comboChart/PluggableComboChart.d.ts.map +1 -1
- package/esm/internal/components/pluggableVisualizations/comboChart/PluggableComboChart.js +6 -6
- package/esm/internal/components/pluggableVisualizations/comboChart/PluggableComboChartDeprecated.d.ts.map +1 -1
- package/esm/internal/components/pluggableVisualizations/comboChart/PluggableComboChartDeprecated.js +5 -4
- package/esm/internal/components/pluggableVisualizations/geoAreaChart/PluggableGeoAreaChart.d.ts.map +1 -1
- package/esm/internal/components/pluggableVisualizations/geoAreaChart/PluggableGeoAreaChart.js +4 -5
- package/esm/internal/components/pluggableVisualizations/geoChart/PluggableGeoPushpinChart.d.ts.map +1 -1
- package/esm/internal/components/pluggableVisualizations/geoChart/PluggableGeoPushpinChart.js +8 -9
- package/esm/internal/components/pluggableVisualizations/geoChartNext/PluggableGeoPushpinChartNext.d.ts.map +1 -1
- package/esm/internal/components/pluggableVisualizations/geoChartNext/PluggableGeoPushpinChartNext.js +15 -16
- package/esm/internal/components/pluggableVisualizations/geoCommon/geoPropertySanitization.d.ts.map +1 -1
- package/esm/internal/components/pluggableVisualizations/geoCommon/geoPropertySanitization.js +8 -8
- package/esm/internal/components/pluggableVisualizations/headline/PluggableHeadline.d.ts.map +1 -1
- package/esm/internal/components/pluggableVisualizations/headline/PluggableHeadline.js +2 -3
- package/esm/internal/components/pluggableVisualizations/headline/headlineBucketHelper.js +3 -3
- package/esm/internal/components/pluggableVisualizations/heatMap/PluggableHeatmap.d.ts.map +1 -1
- package/esm/internal/components/pluggableVisualizations/heatMap/PluggableHeatmap.js +8 -7
- package/esm/internal/components/pluggableVisualizations/lineChart/PluggableLineChart.d.ts.map +1 -1
- package/esm/internal/components/pluggableVisualizations/lineChart/PluggableLineChart.js +8 -8
- package/esm/internal/components/pluggableVisualizations/mekko/PluggableMekko.d.ts.map +1 -1
- package/esm/internal/components/pluggableVisualizations/mekko/PluggableMekko.js +11 -11
- package/esm/internal/components/pluggableVisualizations/pieChart/PluggablePieChart.d.ts.map +1 -1
- package/esm/internal/components/pluggableVisualizations/pieChart/PluggablePieChart.js +8 -8
- package/esm/internal/components/pluggableVisualizations/pivotTable/PluggablePivotTable.d.ts.map +1 -1
- package/esm/internal/components/pluggableVisualizations/pivotTable/PluggablePivotTable.js +5 -5
- package/esm/internal/components/pluggableVisualizations/pivotTable/pivotTableAdditionalFactories.d.ts.map +1 -1
- package/esm/internal/components/pluggableVisualizations/pivotTable/pivotTableAdditionalFactories.js +2 -2
- package/esm/internal/components/pluggableVisualizations/pivotTable/pivotTableConfigFromInsight.d.ts.map +1 -1
- package/esm/internal/components/pluggableVisualizations/pivotTable/pivotTableConfigFromInsight.js +6 -6
- package/esm/internal/components/pluggableVisualizations/pivotTableNext/PluggablePivotTableNext.d.ts.map +1 -1
- package/esm/internal/components/pluggableVisualizations/pivotTableNext/PluggablePivotTableNext.js +4 -5
- package/esm/internal/components/pluggableVisualizations/pivotTableNext/pivotTableNextAdditionalFactories.d.ts.map +1 -1
- package/esm/internal/components/pluggableVisualizations/pivotTableNext/pivotTableNextAdditionalFactories.js +2 -2
- package/esm/internal/components/pluggableVisualizations/pivotTableNext/sortHelpers.d.ts.map +1 -1
- package/esm/internal/components/pluggableVisualizations/pivotTableNext/sortHelpers.js +2 -2
- package/esm/internal/components/pluggableVisualizations/radarChart/PluggableRadarChart.d.ts.map +1 -1
- package/esm/internal/components/pluggableVisualizations/radarChart/PluggableRadarChart.js +4 -4
- package/esm/internal/components/pluggableVisualizations/repeater/PluggableRepeater.d.ts.map +1 -1
- package/esm/internal/components/pluggableVisualizations/repeater/PluggableRepeater.js +6 -7
- package/esm/internal/components/pluggableVisualizations/sankeyChart/PluggableSankeyChart.d.ts.map +1 -1
- package/esm/internal/components/pluggableVisualizations/sankeyChart/PluggableSankeyChart.js +3 -4
- package/esm/internal/components/pluggableVisualizations/scatterPlot/PluggableScatterPlot.d.ts.map +1 -1
- package/esm/internal/components/pluggableVisualizations/scatterPlot/PluggableScatterPlot.js +5 -6
- package/esm/internal/components/pluggableVisualizations/treeMap/PluggableTreemap.d.ts.map +1 -1
- package/esm/internal/components/pluggableVisualizations/treeMap/PluggableTreemap.js +6 -5
- package/esm/internal/components/pluggableVisualizations/waterfallChart/PluggableWaterfallChart.d.ts.map +1 -1
- package/esm/internal/components/pluggableVisualizations/waterfallChart/PluggableWaterfallChart.js +11 -11
- package/esm/internal/components/pluggableVisualizations/xirr/PluggableXirr.d.ts.map +1 -1
- package/esm/internal/components/pluggableVisualizations/xirr/PluggableXirr.js +2 -3
- package/esm/internal/interfaces/Visualization.d.ts.map +1 -1
- package/esm/internal/interfaces/Visualization.js +6 -6
- package/esm/internal/translations/en-US.localization-bundle.d.ts +28 -0
- package/esm/internal/translations/en-US.localization-bundle.d.ts.map +1 -1
- package/esm/internal/translations/en-US.localization-bundle.js +29 -1
- package/esm/internal/translations/fr-CA.localization-bundle.js +1 -1
- package/esm/internal/translations/it-IT.localization-bundle.js +2 -2
- package/esm/internal/translations/ru-RU.localization-bundle.js +1 -1
- package/esm/internal/translations/tr-TR.localization-bundle.js +1 -1
- package/esm/internal/translations/zh-Hant.localization-bundle.js +4 -4
- package/esm/internal/utils/bucketConfig.d.ts.map +1 -1
- package/esm/internal/utils/bucketConfig.js +5 -5
- package/esm/internal/utils/bucketHelper.d.ts.map +1 -1
- package/esm/internal/utils/bucketHelper.js +15 -14
- package/esm/internal/utils/bucketRules.d.ts.map +1 -1
- package/esm/internal/utils/bucketRules.js +3 -2
- package/esm/internal/utils/colors.d.ts.map +1 -1
- package/esm/internal/utils/colors.js +11 -11
- package/esm/internal/utils/controlsHelper.d.ts.map +1 -1
- package/esm/internal/utils/controlsHelper.js +7 -7
- package/esm/internal/utils/dimensions.d.ts.map +1 -1
- package/esm/internal/utils/dimensions.js +4 -4
- package/esm/internal/utils/drillablePredicates.d.ts.map +1 -1
- package/esm/internal/utils/drillablePredicates.js +4 -4
- package/esm/internal/utils/embeddingCodeGenerator/getReactEmbeddingCodeGenerator.d.ts.map +1 -1
- package/esm/internal/utils/embeddingCodeGenerator/getReactEmbeddingCodeGenerator.js +11 -10
- package/esm/internal/utils/propertiesHelper.d.ts.map +1 -1
- package/esm/internal/utils/propertiesHelper.js +16 -15
- package/esm/internal/utils/removeUseless.js +3 -3
- package/esm/internal/utils/sort.d.ts.map +1 -1
- package/esm/internal/utils/sort.js +9 -8
- package/esm/internal/utils/translations.d.ts.map +1 -1
- package/esm/internal/utils/translations.js +2 -3
- package/esm/internal/utils/uiConfigHelpers/areaChartUiConfigHelper.d.ts.map +1 -1
- package/esm/internal/utils/uiConfigHelpers/areaChartUiConfigHelper.js +10 -10
- package/esm/internal/utils/uiConfigHelpers/baseChartUiConfigHelper.d.ts.map +1 -1
- package/esm/internal/utils/uiConfigHelpers/baseChartUiConfigHelper.js +19 -19
- package/esm/internal/utils/uiConfigHelpers/bubbleChartUiConfigHelper.d.ts.map +1 -1
- package/esm/internal/utils/uiConfigHelpers/bubbleChartUiConfigHelper.js +8 -8
- package/esm/internal/utils/uiConfigHelpers/bulletChartUiConfigHelper.d.ts.map +1 -1
- package/esm/internal/utils/uiConfigHelpers/bulletChartUiConfigHelper.js +2 -2
- package/esm/internal/utils/uiConfigHelpers/columnBarChartUiConfigHelper.d.ts.map +1 -1
- package/esm/internal/utils/uiConfigHelpers/columnBarChartUiConfigHelper.js +6 -6
- package/esm/internal/utils/uiConfigHelpers/comboChartUiConfigHelper.d.ts.map +1 -1
- package/esm/internal/utils/uiConfigHelpers/comboChartUiConfigHelper.js +8 -8
- package/esm/internal/utils/uiConfigHelpers/comboChartUiConfigHelperDeprecated.d.ts.map +1 -1
- package/esm/internal/utils/uiConfigHelpers/comboChartUiConfigHelperDeprecated.js +10 -10
- package/esm/internal/utils/uiConfigHelpers/dependencyWheelChartUiConfigHelper.js +6 -6
- package/esm/internal/utils/uiConfigHelpers/donutChartUiConfigHelper.js +5 -5
- package/esm/internal/utils/uiConfigHelpers/funnelChartUiConfigHelper.d.ts.map +1 -1
- package/esm/internal/utils/uiConfigHelpers/funnelChartUiConfigHelper.js +6 -6
- package/esm/internal/utils/uiConfigHelpers/geoAreaChartUiConfigHelper.d.ts.map +1 -1
- package/esm/internal/utils/uiConfigHelpers/geoAreaChartUiConfigHelper.js +3 -3
- package/esm/internal/utils/uiConfigHelpers/geoPushpinChartUiConfigHelper.d.ts.map +1 -1
- package/esm/internal/utils/uiConfigHelpers/geoPushpinChartUiConfigHelper.js +15 -15
- package/esm/internal/utils/uiConfigHelpers/headlineUiConfigHelper.d.ts.map +1 -1
- package/esm/internal/utils/uiConfigHelpers/headlineUiConfigHelper.js +10 -10
- package/esm/internal/utils/uiConfigHelpers/heatmapUiConfigHelper.d.ts.map +1 -1
- package/esm/internal/utils/uiConfigHelpers/heatmapUiConfigHelper.js +7 -7
- package/esm/internal/utils/uiConfigHelpers/lineChartUiConfigHelper.d.ts.map +1 -1
- package/esm/internal/utils/uiConfigHelpers/lineChartUiConfigHelper.js +13 -13
- package/esm/internal/utils/uiConfigHelpers/mekkoUiConfigHelper.d.ts.map +1 -1
- package/esm/internal/utils/uiConfigHelpers/mekkoUiConfigHelper.js +7 -7
- package/esm/internal/utils/uiConfigHelpers/pieChartUiConfigHelper.d.ts.map +1 -1
- package/esm/internal/utils/uiConfigHelpers/pieChartUiConfigHelper.js +12 -12
- package/esm/internal/utils/uiConfigHelpers/pivotTableNextUiConfigHelper.d.ts.map +1 -1
- package/esm/internal/utils/uiConfigHelpers/pivotTableNextUiConfigHelper.js +14 -14
- package/esm/internal/utils/uiConfigHelpers/pivotTableUiConfigHelper.d.ts.map +1 -1
- package/esm/internal/utils/uiConfigHelpers/pivotTableUiConfigHelper.js +14 -14
- package/esm/internal/utils/uiConfigHelpers/pyramidChartUiConfigHelper.js +5 -5
- package/esm/internal/utils/uiConfigHelpers/radarChartUiConfigHelper.d.ts.map +1 -1
- package/esm/internal/utils/uiConfigHelpers/radarChartUiConfigHelper.js +13 -13
- package/esm/internal/utils/uiConfigHelpers/repeaterUiConfigHelper.d.ts.map +1 -1
- package/esm/internal/utils/uiConfigHelpers/repeaterUiConfigHelper.js +14 -14
- package/esm/internal/utils/uiConfigHelpers/sankeyChartUiConfigHelper.d.ts.map +1 -1
- package/esm/internal/utils/uiConfigHelpers/sankeyChartUiConfigHelper.js +10 -10
- package/esm/internal/utils/uiConfigHelpers/scatterPlotUiConfigHelper.d.ts.map +1 -1
- package/esm/internal/utils/uiConfigHelpers/scatterPlotUiConfigHelper.js +8 -8
- package/esm/internal/utils/uiConfigHelpers/treemapUiConfigHelper.d.ts.map +1 -1
- package/esm/internal/utils/uiConfigHelpers/treemapUiConfigHelper.js +12 -12
- package/esm/internal/utils/uiConfigHelpers/waterfallChartUiConfigHelper.d.ts.map +1 -1
- package/esm/internal/utils/uiConfigHelpers/waterfallChartUiConfigHelper.js +11 -11
- package/esm/internal/utils/uiConfigHelpers/xirrUiConfigHelper.d.ts.map +1 -1
- package/esm/internal/utils/uiConfigHelpers/xirrUiConfigHelper.js +5 -5
- package/esm/notificationsPanel/Notification/Notification.d.ts.map +1 -1
- package/esm/notificationsPanel/Notification/Notification.js +4 -4
- package/esm/sdk-ui-ext.d.ts +1 -1
- package/esm/share/ObjectShareDialog.d.ts +1 -1
- package/esm/share/ObjectShareDialog.js +3 -3
- package/esm/share/messages.d.ts +28 -0
- package/esm/share/messages.d.ts.map +1 -1
- package/esm/share/messages.js +14 -0
- package/esm/share/removeAccessConfirm.d.ts +21 -0
- package/esm/share/removeAccessConfirm.d.ts.map +1 -0
- package/esm/share/removeAccessConfirm.js +27 -0
- package/esm/share/useObjectShareDialog.d.ts +14 -11
- package/esm/share/useObjectShareDialog.d.ts.map +1 -1
- package/esm/share/useObjectShareDialog.js +54 -24
- package/package.json +21 -21
|
@@ -20,7 +20,7 @@ function grantLimitTooltips(levels, tooltip) {
|
|
|
20
20
|
}
|
|
21
21
|
/**
|
|
22
22
|
* Connected share dialog. Renders the main share modal, the add-grantee
|
|
23
|
-
* sub-dialog and the
|
|
23
|
+
* sub-dialog and the confirm dialogs, all driven by one
|
|
24
24
|
* controller. Each underlying dialog manages its own open state, so they can
|
|
25
25
|
* be safely co-mounted; focus, backdrop and portal lifecycles are owned by
|
|
26
26
|
* `UiModalDialog` inside the kit.
|
|
@@ -44,7 +44,7 @@ export function ObjectShareDialog(props) {
|
|
|
44
44
|
/** The dialog session — mounted only while open, so its state cannot outlive a close. */
|
|
45
45
|
function ObjectShareDialogSession({ target, objectTitle, onClose, onSummaryChange, labels, labelsLoading, labelsError, draft, onDraftChange, initialDraft, initialDraftGeneralAccess, }) {
|
|
46
46
|
const intl = useIntl();
|
|
47
|
-
const { state, actions, isShareViewOpen, isAddGranteeOpen, isGeneralAccessConfirmOpen,
|
|
47
|
+
const { state, actions, isShareViewOpen, isAddGranteeOpen, isGeneralAccessConfirmOpen, rowConfirm, isMutable, isLoading, workspaceDisabledLevels, grantableDisabledLevels, grantLimitTooltip, rowDisabledLevels, rowDisabledLevelTooltips, isRowRemoveDisabled, isRowControlsLocked, rowRemoveDisabledTooltip, isRowAboveCaller, onClose: closeDialog, onRowPermissionChange, onRowRemove, onRowConfirmCancel, onRowConfirm, } = useObjectShareDialog({
|
|
48
48
|
target,
|
|
49
49
|
onClose,
|
|
50
50
|
onSummaryChange,
|
|
@@ -161,5 +161,5 @@ function ObjectShareDialogSession({ target, objectTitle, onClose, onSummaryChang
|
|
|
161
161
|
? objectShareMessages.confirmRestrictDescription
|
|
162
162
|
: objectShareMessages.confirmGrantWorkspaceDescription, { title: objectTitle }), confirmLabel: intl.formatMessage(objectShareMessages.confirmButton), confirmVariant: "primary", onCancel: actions.cancelGeneralAccessChange, onClose: actions.cancelGeneralAccessChange, onConfirm: () => {
|
|
163
163
|
void actions.confirmGeneralAccessChange();
|
|
164
|
-
} }), _jsx(UiConfirmDialog, { isOpen:
|
|
164
|
+
} }), rowConfirm ? (_jsx(UiConfirmDialog, { isOpen: true, title: rowConfirm.title, description: rowConfirm.description, confirmLabel: intl.formatMessage(objectShareMessages.confirmButton), confirmVariant: "primary", onCancel: onRowConfirmCancel, onClose: onRowConfirmCancel, onConfirm: onRowConfirm })) : null] }));
|
|
165
165
|
}
|
package/esm/share/messages.d.ts
CHANGED
|
@@ -33,6 +33,12 @@ export declare const objectShareMessages: {
|
|
|
33
33
|
selfRestrictWarning: {
|
|
34
34
|
id: string;
|
|
35
35
|
};
|
|
36
|
+
removeAccessTitle: {
|
|
37
|
+
id: string;
|
|
38
|
+
};
|
|
39
|
+
removeAccessSelfTitle: {
|
|
40
|
+
id: string;
|
|
41
|
+
};
|
|
36
42
|
/**
|
|
37
43
|
* Disabled-option tooltip on the workspace rule's permission menu for levels
|
|
38
44
|
* below an inherited workspace-wide grant, which they could never lower.
|
|
@@ -100,6 +106,28 @@ export declare const objectShareMessages: {
|
|
|
100
106
|
id: string;
|
|
101
107
|
};
|
|
102
108
|
};
|
|
109
|
+
/**
|
|
110
|
+
* Remove-access confirm bodies by kind; `selfRestrict` reuses the self-restriction warning.
|
|
111
|
+
*
|
|
112
|
+
* @internal
|
|
113
|
+
*/
|
|
114
|
+
export declare const objectShareRemoveAccessMessages: {
|
|
115
|
+
loseAccess: {
|
|
116
|
+
id: string;
|
|
117
|
+
};
|
|
118
|
+
inheritedStays: {
|
|
119
|
+
id: string;
|
|
120
|
+
};
|
|
121
|
+
workspaceStays: {
|
|
122
|
+
id: string;
|
|
123
|
+
};
|
|
124
|
+
selfLoseAccess: {
|
|
125
|
+
id: string;
|
|
126
|
+
};
|
|
127
|
+
selfLoseEditAccess: {
|
|
128
|
+
id: string;
|
|
129
|
+
};
|
|
130
|
+
};
|
|
103
131
|
/**
|
|
104
132
|
* @internal
|
|
105
133
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../src/share/messages.ts"],"names":[],"mappings":"AAIA;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB;;QACJ,EAAE;;;QACI,EAAE;;;QACF,EAAE;;;QACI,EAAE;;;QACrB,EAAE;;;QACE,EAAE;;IACvB;;;;OAIG;;QACoB,EAAE;;
|
|
1
|
+
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../src/share/messages.ts"],"names":[],"mappings":"AAIA;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB;;QACJ,EAAE;;;QACI,EAAE;;;QACF,EAAE;;;QACI,EAAE;;;QACrB,EAAE;;;QACE,EAAE;;IACvB;;;;OAIG;;QACoB,EAAE;;;QACJ,EAAE;;;QACE,EAAE;;IAC3B;;;OAGG;;QACwB,EAAE;;IAC7B;;;OAGG;;QACuB,EAAE;;IAC5B,wGAAwG;;QAC9E,EAAE;;IAC5B,sEAAsE;;QAC3C,EAAE;;IAC7B,0EAA0E;;QAC1C,EAAE;;IAClC;;;OAGG;;QACuB,EAAE;;;QACd,EAAE;;;QACE,EAAE;;;QACmB,EAAE;;;QACxB,EAAE;;;QACE,EAAE;;;QACF,EAAE;;;QACD,EAAE;;;QACK,EAAE;;;QACjB,EAAE;;;QACU,EAAE;;;QACf,EAAE;;CACjB,CAAC;AAEH;;;;GAIG;AACH,eAAO,MAAM,+BAA+B;;QAC1B,EAAE;;;QACE,EAAE;;;QACF,EAAE;;;QACF,EAAE;;;QACE,EAAE;;CAC1B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,2BAA2B;;QAChB,EAAE;;;QACE,EAAE;;CAC5B,CAAC;AAEH;;;;;;GAMG;AACH,eAAO,MAAM,wBAAwB;;QACpB,EAAE;;;QACP,EAAE;;;QACD,EAAE;;;QACA,EAAE;;;QACQ,EAAE;;;QACZ,EAAE;;;QACJ,EAAE;;CACb,CAAC"}
|
package/esm/share/messages.js
CHANGED
|
@@ -21,6 +21,8 @@ export const objectShareMessages = defineMessages({
|
|
|
21
21
|
* the copy must stay identical in both places by design.
|
|
22
22
|
*/
|
|
23
23
|
selfRestrictWarning: { id: "objectShare.selfRestrict.warning" },
|
|
24
|
+
removeAccessTitle: { id: "objectShare.removeAccess.title" },
|
|
25
|
+
removeAccessSelfTitle: { id: "objectShare.removeAccess.self.title" },
|
|
24
26
|
/**
|
|
25
27
|
* Disabled-option tooltip on the workspace rule's permission menu for levels
|
|
26
28
|
* below an inherited workspace-wide grant, which they could never lower.
|
|
@@ -54,6 +56,18 @@ export const objectShareMessages = defineMessages({
|
|
|
54
56
|
toastLabelScopePartial: { id: "objectShare.toast.labelScopePartial" },
|
|
55
57
|
loadError: { id: "objectShare.loadError" },
|
|
56
58
|
});
|
|
59
|
+
/**
|
|
60
|
+
* Remove-access confirm bodies by kind; `selfRestrict` reuses the self-restriction warning.
|
|
61
|
+
*
|
|
62
|
+
* @internal
|
|
63
|
+
*/
|
|
64
|
+
export const objectShareRemoveAccessMessages = defineMessages({
|
|
65
|
+
loseAccess: { id: "objectShare.removeAccess.loseAccess" },
|
|
66
|
+
inheritedStays: { id: "objectShare.removeAccess.inheritedStays" },
|
|
67
|
+
workspaceStays: { id: "objectShare.removeAccess.workspaceStays" },
|
|
68
|
+
selfLoseAccess: { id: "objectShare.removeAccess.selfLoseAccess" },
|
|
69
|
+
selfLoseEditAccess: { id: "objectShare.removeAccess.selfLoseEditAccess" },
|
|
70
|
+
});
|
|
57
71
|
/**
|
|
58
72
|
* @internal
|
|
59
73
|
*/
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { GeneralAccessValue } from "@gooddata/sdk-ui-kit";
|
|
2
|
+
import type { IObjectShareGrantee, ObjectSharePermissionLevel } from "./objectShareController.types.js";
|
|
3
|
+
/**
|
|
4
|
+
* Which confirm a row change waits on, by the access the grantee keeps afterwards. Lowering
|
|
5
|
+
* your own level is always `selfRestrict`.
|
|
6
|
+
*
|
|
7
|
+
* @internal
|
|
8
|
+
*/
|
|
9
|
+
export type RowConfirmKind = "loseAccess" | "inheritedStays" | "workspaceStays" | "selfLoseAccess" | "selfLoseEditAccess" | "selfRestrict";
|
|
10
|
+
/**
|
|
11
|
+
* Picks the confirm for removing `grantee`. Undefined for the caller's own row when it is not
|
|
12
|
+
* self-managed: a workspace manager keeps access through the role.
|
|
13
|
+
*
|
|
14
|
+
* @internal
|
|
15
|
+
*/
|
|
16
|
+
export declare function removeAccessConfirmKind(grantee: Pick<IObjectShareGrantee, "id" | "isSelf" | "level" | "inheritedLevel">, access: {
|
|
17
|
+
selfManagedGranteeId: string | undefined;
|
|
18
|
+
generalAccess: GeneralAccessValue;
|
|
19
|
+
workspaceLevel: ObjectSharePermissionLevel;
|
|
20
|
+
}): RowConfirmKind | undefined;
|
|
21
|
+
//# sourceMappingURL=removeAccessConfirm.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"removeAccessConfirm.d.ts","sourceRoot":"","sources":["../../src/share/removeAccessConfirm.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAG/D,OAAO,KAAK,EAAE,mBAAmB,EAAE,0BAA0B,EAAE,MAAM,kCAAkC,CAAC;AAExG;;;;;GAKG;AACH,MAAM,MAAM,cAAc,GACpB,YAAY,GACZ,gBAAgB,GAChB,gBAAgB,GAChB,gBAAgB,GAChB,oBAAoB,GACpB,cAAc,CAAC;AAErB;;;;;GAKG;AACH,wBAAgB,uBAAuB,CACnC,OAAO,EAAE,IAAI,CAAC,mBAAmB,EAAE,IAAI,GAAG,QAAQ,GAAG,OAAO,GAAG,gBAAgB,CAAC,EAChF,MAAM,EAAE;IACJ,oBAAoB,EAAE,MAAM,GAAG,SAAS,CAAC;IACzC,aAAa,EAAE,kBAAkB,CAAC;IAClC,cAAc,EAAE,0BAA0B,CAAC;CAC9C,GACF,cAAc,GAAG,SAAS,CAiB5B"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// (C) 2026 GoodData Corporation
|
|
2
|
+
import { levelsBelow, maxLevel } from "./objectShareController.helpers.js";
|
|
3
|
+
/**
|
|
4
|
+
* Picks the confirm for removing `grantee`. Undefined for the caller's own row when it is not
|
|
5
|
+
* self-managed: a workspace manager keeps access through the role.
|
|
6
|
+
*
|
|
7
|
+
* @internal
|
|
8
|
+
*/
|
|
9
|
+
export function removeAccessConfirmKind(grantee, access) {
|
|
10
|
+
const workspaceKept = access.generalAccess === "WORKSPACE" ? access.workspaceLevel : undefined;
|
|
11
|
+
if (access.selfManagedGranteeId === grantee.id) {
|
|
12
|
+
const kept = maxLevel(grantee.inheritedLevel, workspaceKept);
|
|
13
|
+
if (kept === undefined) {
|
|
14
|
+
return grantee.level === "EDIT" ? "selfLoseEditAccess" : "selfLoseAccess";
|
|
15
|
+
}
|
|
16
|
+
if (levelsBelow(grantee.level).includes(kept)) {
|
|
17
|
+
return "selfRestrict";
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
else if (grantee.isSelf) {
|
|
21
|
+
return undefined;
|
|
22
|
+
}
|
|
23
|
+
if (grantee.inheritedLevel !== undefined) {
|
|
24
|
+
return "inheritedStays";
|
|
25
|
+
}
|
|
26
|
+
return workspaceKept === undefined ? "loseAccess" : "workspaceStays";
|
|
27
|
+
}
|
|
@@ -4,7 +4,7 @@ import type { IObjectShareControllerActions, IObjectShareControllerState, IObjec
|
|
|
4
4
|
import type { IObjectAccessSummary, IObjectShareLabel } from "./types.js";
|
|
5
5
|
/**
|
|
6
6
|
* The presentational state {@link ObjectShareDialog} renders from. All logic —
|
|
7
|
-
* controller ownership, the
|
|
7
|
+
* controller ownership, the row confirm flow, open/close and the
|
|
8
8
|
* mutation gating — lives here; the component maps this to JSX and holds no logic
|
|
9
9
|
* of its own.
|
|
10
10
|
*
|
|
@@ -21,8 +21,11 @@ export interface IObjectShareDialogViewModel {
|
|
|
21
21
|
isAddGranteeOpen: boolean;
|
|
22
22
|
/** Whether the general-access RESTRICTED↔WORKSPACE confirm is visible. */
|
|
23
23
|
isGeneralAccessConfirmOpen: boolean;
|
|
24
|
-
/**
|
|
25
|
-
|
|
24
|
+
/** Title and body of the confirm a staged row change waits on, or undefined when none is. */
|
|
25
|
+
rowConfirm: {
|
|
26
|
+
title: string;
|
|
27
|
+
description: string;
|
|
28
|
+
} | undefined;
|
|
26
29
|
/**
|
|
27
30
|
* Whether access-changing controls may be used. False until the list has loaded
|
|
28
31
|
* AND per-label scope resolved: before then the controller reports a placeholder
|
|
@@ -62,19 +65,19 @@ export interface IObjectShareDialogViewModel {
|
|
|
62
65
|
isRowAboveCaller: (grantee: IObjectShareGrantee) => boolean;
|
|
63
66
|
/** Whether this row's controls must stay disabled (see `granteeControlsLocked`). */
|
|
64
67
|
isRowControlsLocked: (grantee: IObjectShareGrantee) => boolean;
|
|
65
|
-
/** Close the whole dialog, handing the draft over and discarding any staged
|
|
68
|
+
/** Close the whole dialog, handing the draft over and discarding any staged row change. */
|
|
66
69
|
onClose: () => void;
|
|
67
70
|
/**
|
|
68
71
|
* Handle a grantee row's permission change. The signed-in user's own sole grant is
|
|
69
|
-
* staged for the
|
|
72
|
+
* staged for the "Restrict your access?" row confirm; every other row commits immediately.
|
|
70
73
|
*/
|
|
71
74
|
onRowPermissionChange: (grantee: IObjectShareGrantee, level: ObjectSharePermissionLevel) => void;
|
|
72
|
-
/** Handle a grantee row's remove
|
|
75
|
+
/** Handle a grantee row's remove: staged for the row confirm, except in a draft. */
|
|
73
76
|
onRowRemove: (grantee: IObjectShareGrantee) => void;
|
|
74
|
-
/** Dismiss the
|
|
75
|
-
|
|
76
|
-
/** Apply the staged
|
|
77
|
-
|
|
77
|
+
/** Dismiss the row confirm, leaving the grantee's access unchanged. */
|
|
78
|
+
onRowConfirmCancel: () => void;
|
|
79
|
+
/** Apply the staged row change: lower the user's own level, or remove the grantee. */
|
|
80
|
+
onRowConfirm: () => void;
|
|
78
81
|
}
|
|
79
82
|
/**
|
|
80
83
|
* Inputs to {@link useObjectShareDialog} — the subset of {@link ObjectShareDialog}'s
|
|
@@ -105,7 +108,7 @@ interface IUseObjectShareDialogParams {
|
|
|
105
108
|
}
|
|
106
109
|
/**
|
|
107
110
|
* Owns everything {@link ObjectShareDialog} needs to render for one dialog session:
|
|
108
|
-
* the controller, the
|
|
111
|
+
* the controller, the row confirm flow, the mutation-gating flags, and
|
|
109
112
|
* the outward summary synchronization. Returns a flat view model the component
|
|
110
113
|
* renders — no JSX and no rendering logic here.
|
|
111
114
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useObjectShareDialog.d.ts","sourceRoot":"","sources":["../../src/share/useObjectShareDialog.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AAC1E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"useObjectShareDialog.d.ts","sourceRoot":"","sources":["../../src/share/useObjectShareDialog.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,9 +1,36 @@
|
|
|
1
1
|
// (C) 2026 GoodData Corporation
|
|
2
2
|
import { useCallback, useEffect, useState } from "react";
|
|
3
3
|
import { useIntl } from "react-intl";
|
|
4
|
-
import { objectShareMessages } from "./messages.js";
|
|
5
|
-
import { ALL_LEVELS, changesEffectiveLevel, levelsAbove, levelsBelow, removalChangesEffectiveLevel, } from "./objectShareController.helpers.js";
|
|
4
|
+
import { objectShareMessages, objectShareRemoveAccessMessages } from "./messages.js";
|
|
5
|
+
import { ALL_LEVELS, changesEffectiveLevel, granteeDisplayPair, levelsAbove, levelsBelow, removalChangesEffectiveLevel, } from "./objectShareController.helpers.js";
|
|
6
|
+
import { removeAccessConfirmKind } from "./removeAccessConfirm.js";
|
|
6
7
|
import { useObjectShareController } from "./useObjectShareController.js";
|
|
8
|
+
const ROW_CONFIRM_COPY = {
|
|
9
|
+
loseAccess: {
|
|
10
|
+
title: objectShareMessages.removeAccessTitle,
|
|
11
|
+
description: objectShareRemoveAccessMessages.loseAccess,
|
|
12
|
+
},
|
|
13
|
+
inheritedStays: {
|
|
14
|
+
title: objectShareMessages.removeAccessTitle,
|
|
15
|
+
description: objectShareRemoveAccessMessages.inheritedStays,
|
|
16
|
+
},
|
|
17
|
+
workspaceStays: {
|
|
18
|
+
title: objectShareMessages.removeAccessTitle,
|
|
19
|
+
description: objectShareRemoveAccessMessages.workspaceStays,
|
|
20
|
+
},
|
|
21
|
+
selfLoseAccess: {
|
|
22
|
+
title: objectShareMessages.removeAccessSelfTitle,
|
|
23
|
+
description: objectShareRemoveAccessMessages.selfLoseAccess,
|
|
24
|
+
},
|
|
25
|
+
selfLoseEditAccess: {
|
|
26
|
+
title: objectShareMessages.removeAccessSelfTitle,
|
|
27
|
+
description: objectShareRemoveAccessMessages.selfLoseEditAccess,
|
|
28
|
+
},
|
|
29
|
+
selfRestrict: {
|
|
30
|
+
title: objectShareMessages.selfRestrictTitle,
|
|
31
|
+
description: objectShareMessages.selfRestrictWarning,
|
|
32
|
+
},
|
|
33
|
+
};
|
|
7
34
|
/**
|
|
8
35
|
* Level picks an inherited grant already covers, which the controller refuses as
|
|
9
36
|
* no-ops ({@link changesEffectiveLevel}). Lowering a direct grant that sits ABOVE
|
|
@@ -15,7 +42,7 @@ function inheritedCoveredLevels(grantee) {
|
|
|
15
42
|
}
|
|
16
43
|
/**
|
|
17
44
|
* Owns everything {@link ObjectShareDialog} needs to render for one dialog session:
|
|
18
|
-
* the controller, the
|
|
45
|
+
* the controller, the row confirm flow, the mutation-gating flags, and
|
|
19
46
|
* the outward summary synchronization. Returns a flat view model the component
|
|
20
47
|
* renders — no JSX and no rendering logic here.
|
|
21
48
|
*
|
|
@@ -31,7 +58,7 @@ export function useObjectShareDialog({ target, onClose, onSummaryChange, draft,
|
|
|
31
58
|
initialDraft,
|
|
32
59
|
initialDraftGeneralAccess,
|
|
33
60
|
});
|
|
34
|
-
const [
|
|
61
|
+
const [pendingRowChange, setPendingRowChange] = useState(undefined);
|
|
35
62
|
// Synchronize the displayed access summary out to the consumer — the legitimate
|
|
36
63
|
// effect kind (notifying an external system of a change). `state.summary` is
|
|
37
64
|
// content-stable, so this fires exactly when the displayed access changes: on
|
|
@@ -64,37 +91,40 @@ export function useObjectShareDialog({ target, onClose, onSummaryChange, draft,
|
|
|
64
91
|
// the controller then refuses — the user would confirm a restriction that
|
|
65
92
|
// never happens. Same predicate the controller applies.
|
|
66
93
|
if (changesEffectiveLevel(grantee, level)) {
|
|
67
|
-
|
|
94
|
+
setPendingRowChange({ grantee, level, kind: "selfRestrict" });
|
|
68
95
|
}
|
|
69
96
|
return;
|
|
70
97
|
}
|
|
71
98
|
void actions.changePermissionLevel(grantee.id, level);
|
|
72
99
|
}, [state.selfManagedGranteeId, actions]);
|
|
73
|
-
const onRowRemove =
|
|
74
|
-
//
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
if (state.selfManagedGranteeId === grantee.id && removalChangesEffectiveLevel(grantee)) {
|
|
79
|
-
setPendingSelfChange({ granteeId: grantee.id, level: "none" });
|
|
100
|
+
const onRowRemove = (grantee) => {
|
|
101
|
+
// A draft row is only staged, so removing it takes no one's access away.
|
|
102
|
+
const kind = draft ? undefined : removeAccessConfirmKind(grantee, state);
|
|
103
|
+
if (kind) {
|
|
104
|
+
setPendingRowChange({ grantee, level: "none", kind });
|
|
80
105
|
return;
|
|
81
106
|
}
|
|
82
107
|
void actions.removeGrantee(grantee.id);
|
|
83
|
-
}
|
|
84
|
-
const
|
|
85
|
-
if (!
|
|
108
|
+
};
|
|
109
|
+
const onRowConfirm = () => {
|
|
110
|
+
if (!pendingRowChange) {
|
|
86
111
|
return;
|
|
87
112
|
}
|
|
88
|
-
const {
|
|
89
|
-
|
|
113
|
+
const { grantee, level } = pendingRowChange;
|
|
114
|
+
setPendingRowChange(undefined);
|
|
90
115
|
if (level === "none") {
|
|
91
|
-
void actions.removeGrantee(
|
|
116
|
+
void actions.removeGrantee(grantee.id);
|
|
92
117
|
}
|
|
93
118
|
else {
|
|
94
|
-
void actions.changePermissionLevel(
|
|
119
|
+
void actions.changePermissionLevel(grantee.id, level);
|
|
95
120
|
}
|
|
96
|
-
}
|
|
97
|
-
const
|
|
121
|
+
};
|
|
122
|
+
const rowConfirm = pendingRowChange && {
|
|
123
|
+
title: intl.formatMessage(ROW_CONFIRM_COPY[pendingRowChange.kind].title),
|
|
124
|
+
description: intl.formatMessage(ROW_CONFIRM_COPY[pendingRowChange.kind].description, {
|
|
125
|
+
name: granteeDisplayPair(pendingRowChange.grantee).name,
|
|
126
|
+
}),
|
|
127
|
+
};
|
|
98
128
|
const inheritedCoveredTooltip = intl.formatMessage(objectShareMessages.granteeLevelInheritedCovered);
|
|
99
129
|
// The server refuses changing or removing a grant above the caller's own level.
|
|
100
130
|
const isRowAboveCaller = useCallback((grantee) => state.callerLevel !== undefined &&
|
|
@@ -166,7 +196,7 @@ export function useObjectShareDialog({ target, onClose, onSummaryChange, draft,
|
|
|
166
196
|
isShareViewOpen: state.subview === "main",
|
|
167
197
|
isAddGranteeOpen: state.subview === "addGrantee",
|
|
168
198
|
isGeneralAccessConfirmOpen: !!state.pendingGeneralAccess,
|
|
169
|
-
|
|
199
|
+
rowConfirm,
|
|
170
200
|
isMutable,
|
|
171
201
|
isLoading,
|
|
172
202
|
workspaceDisabledLevels: state.workspaceDisabledLevels,
|
|
@@ -181,7 +211,7 @@ export function useObjectShareDialog({ target, onClose, onSummaryChange, draft,
|
|
|
181
211
|
onClose: closeDialog,
|
|
182
212
|
onRowPermissionChange,
|
|
183
213
|
onRowRemove,
|
|
184
|
-
|
|
185
|
-
|
|
214
|
+
onRowConfirmCancel: () => setPendingRowChange(undefined),
|
|
215
|
+
onRowConfirm,
|
|
186
216
|
};
|
|
187
217
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gooddata/sdk-ui-ext",
|
|
3
|
-
"version": "11.68.0-alpha.
|
|
3
|
+
"version": "11.68.0-alpha.10",
|
|
4
4
|
"description": "GoodData.UI SDK - Extensions",
|
|
5
5
|
"license": "LicenseRef-LICENSE",
|
|
6
6
|
"author": "GoodData Corporation",
|
|
@@ -63,20 +63,20 @@
|
|
|
63
63
|
"ts-invariant": "0.10.3",
|
|
64
64
|
"tslib": "2.8.1",
|
|
65
65
|
"uuid": "11.1.1",
|
|
66
|
-
"@gooddata/sdk-backend-
|
|
67
|
-
"@gooddata/sdk-
|
|
68
|
-
"@gooddata/sdk-
|
|
69
|
-
"@gooddata/sdk-
|
|
70
|
-
"@gooddata/sdk-ui-
|
|
71
|
-
"@gooddata/sdk-
|
|
72
|
-
"@gooddata/sdk-ui-
|
|
73
|
-
"@gooddata/sdk-
|
|
74
|
-
"@gooddata/sdk-ui-
|
|
75
|
-
"@gooddata/sdk-ui-semantic-search": "11.68.0-alpha.
|
|
76
|
-
"@gooddata/sdk-ui-
|
|
77
|
-
"@gooddata/
|
|
78
|
-
"@gooddata/
|
|
79
|
-
"@gooddata/sdk-ui-theme-provider": "11.68.0-alpha.
|
|
66
|
+
"@gooddata/sdk-backend-base": "11.68.0-alpha.10",
|
|
67
|
+
"@gooddata/sdk-backend-spi": "11.68.0-alpha.10",
|
|
68
|
+
"@gooddata/sdk-model": "11.68.0-alpha.10",
|
|
69
|
+
"@gooddata/sdk-ui": "11.68.0-alpha.10",
|
|
70
|
+
"@gooddata/sdk-ui-charts": "11.68.0-alpha.10",
|
|
71
|
+
"@gooddata/sdk-embedding": "11.68.0-alpha.10",
|
|
72
|
+
"@gooddata/sdk-ui-filters": "11.68.0-alpha.10",
|
|
73
|
+
"@gooddata/sdk-ui-geo": "11.68.0-alpha.10",
|
|
74
|
+
"@gooddata/sdk-ui-kit": "11.68.0-alpha.10",
|
|
75
|
+
"@gooddata/sdk-ui-semantic-search": "11.68.0-alpha.10",
|
|
76
|
+
"@gooddata/sdk-ui-pivot": "11.68.0-alpha.10",
|
|
77
|
+
"@gooddata/util": "11.68.0-alpha.10",
|
|
78
|
+
"@gooddata/sdk-ui-vis-commons": "11.68.0-alpha.10",
|
|
79
|
+
"@gooddata/sdk-ui-theme-provider": "11.68.0-alpha.10"
|
|
80
80
|
},
|
|
81
81
|
"devDependencies": {
|
|
82
82
|
"@microsoft/api-documenter": "7.30.20",
|
|
@@ -120,12 +120,12 @@
|
|
|
120
120
|
"svgo": "2.8.4",
|
|
121
121
|
"typescript": "7.0.2",
|
|
122
122
|
"vitest": "5.0.4",
|
|
123
|
-
"@gooddata/i18n-toolkit": "11.68.0-alpha.
|
|
124
|
-
"@gooddata/eslint-config": "11.68.0-alpha.
|
|
125
|
-
"@gooddata/
|
|
126
|
-
"@gooddata/
|
|
127
|
-
"@gooddata/
|
|
128
|
-
"@gooddata/
|
|
123
|
+
"@gooddata/i18n-toolkit": "11.68.0-alpha.10",
|
|
124
|
+
"@gooddata/eslint-config": "11.68.0-alpha.10",
|
|
125
|
+
"@gooddata/oxlint-config": "11.68.0-alpha.10",
|
|
126
|
+
"@gooddata/reference-workspace": "11.68.0-alpha.10",
|
|
127
|
+
"@gooddata/stylelint-config": "11.68.0-alpha.10",
|
|
128
|
+
"@gooddata/sdk-backend-mockingbird": "11.68.0-alpha.10"
|
|
129
129
|
},
|
|
130
130
|
"peerDependencies": {
|
|
131
131
|
"react": "^18.0.0 || ^19.0.0",
|