@gooddata/sdk-ui-ext 11.68.0-alpha.7 → 11.68.0-alpha.9

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.
Files changed (176) hide show
  1. package/NOTICE +161 -126
  2. package/esm/internal/components/BaseVisualization.d.ts.map +1 -1
  3. package/esm/internal/components/BaseVisualization.js +2 -3
  4. package/esm/internal/components/attributeHierarchies/attributeHierarchyDialog/utils.d.ts.map +1 -1
  5. package/esm/internal/components/attributeHierarchies/attributeHierarchyDialog/utils.js +2 -2
  6. package/esm/internal/components/configurationControls/CheckboxControl.d.ts.map +1 -1
  7. package/esm/internal/components/configurationControls/CheckboxControl.js +2 -3
  8. package/esm/internal/components/configurationControls/ConfigSection.d.ts.map +1 -1
  9. package/esm/internal/components/configurationControls/ConfigSection.js +2 -3
  10. package/esm/internal/components/configurationControls/ConfigSubsection.d.ts.map +1 -1
  11. package/esm/internal/components/configurationControls/ConfigSubsection.js +2 -3
  12. package/esm/internal/components/configurationControls/ContinuousLineControl.d.ts.map +1 -1
  13. package/esm/internal/components/configurationControls/ContinuousLineControl.js +2 -3
  14. package/esm/internal/components/configurationControls/DistintcPointShapesControl.d.ts.map +1 -1
  15. package/esm/internal/components/configurationControls/DistintcPointShapesControl.js +2 -3
  16. package/esm/internal/components/configurationControls/DropdownControl.d.ts.map +1 -1
  17. package/esm/internal/components/configurationControls/DropdownControl.js +2 -3
  18. package/esm/internal/components/configurationControls/GeoViewportControl.d.ts.map +1 -1
  19. package/esm/internal/components/configurationControls/GeoViewportControl.js +13 -14
  20. package/esm/internal/components/configurationControls/InputControl.d.ts.map +1 -1
  21. package/esm/internal/components/configurationControls/InputControl.js +2 -3
  22. package/esm/internal/components/configurationControls/PagingSection.d.ts.map +1 -1
  23. package/esm/internal/components/configurationControls/PagingSection.js +3 -4
  24. package/esm/internal/components/configurationControls/PushpinShapeControl.d.ts.map +1 -1
  25. package/esm/internal/components/configurationControls/PushpinShapeControl.js +3 -4
  26. package/esm/internal/components/configurationControls/advanced/AdvancedSection.d.ts.map +1 -1
  27. package/esm/internal/components/configurationControls/advanced/AdvancedSection.js +2 -3
  28. package/esm/internal/components/configurationControls/colors/ColorsSection.d.ts.map +1 -1
  29. package/esm/internal/components/configurationControls/colors/ColorsSection.js +3 -4
  30. package/esm/internal/components/configurationControls/comparison/indicators/colorsControl/ColorCheckbox.d.ts.map +1 -1
  31. package/esm/internal/components/configurationControls/comparison/indicators/colorsControl/ColorCheckbox.js +2 -3
  32. package/esm/internal/components/configurationControls/comparison/indicators/colorsControl/ColorItem.d.ts.map +1 -1
  33. package/esm/internal/components/configurationControls/comparison/indicators/colorsControl/ColorItem.js +2 -3
  34. package/esm/internal/components/configurationControls/comparison/indicators/colorsControl/ColorResetButton.d.ts.map +1 -1
  35. package/esm/internal/components/configurationControls/comparison/indicators/colorsControl/ColorResetButton.js +4 -5
  36. package/esm/internal/components/configurationControls/comparison/values/numberFormat/NumberFormatControl.d.ts.map +1 -1
  37. package/esm/internal/components/configurationControls/comparison/values/numberFormat/NumberFormatControl.js +2 -3
  38. package/esm/internal/components/configurationControls/conditionalFormatting/ConditionalFormattingSection.d.ts.map +1 -1
  39. package/esm/internal/components/configurationControls/conditionalFormatting/ConditionalFormattingSection.js +2 -3
  40. package/esm/internal/components/configurationControls/customTooltip/CustomTooltipSection.d.ts.map +1 -1
  41. package/esm/internal/components/configurationControls/customTooltip/CustomTooltipSection.js +2 -3
  42. package/esm/internal/components/configurationControls/interactions/InteractionsSection.d.ts +1 -2
  43. package/esm/internal/components/configurationControls/interactions/InteractionsSection.d.ts.map +1 -1
  44. package/esm/internal/components/configurationControls/interactions/InteractionsSection.js +2 -2
  45. package/esm/internal/components/configurationControls/total/TotalSection.d.ts.map +1 -1
  46. package/esm/internal/components/configurationControls/total/TotalSection.js +2 -3
  47. package/esm/internal/components/configurationPanels/ConfigurationPanelContent.d.ts.map +1 -1
  48. package/esm/internal/components/configurationPanels/ConfigurationPanelContent.js +1 -2
  49. package/esm/internal/components/configurationPanels/UnsupportedConfigurationPanel.js +2 -2
  50. package/esm/internal/components/insightList/useInsightPagedList.d.ts.map +1 -1
  51. package/esm/internal/components/insightList/useInsightPagedList.js +2 -3
  52. package/esm/internal/components/pluggableVisualizations/PluggableColumnBarCharts.d.ts.map +1 -1
  53. package/esm/internal/components/pluggableVisualizations/PluggableColumnBarCharts.js +2 -3
  54. package/esm/internal/components/pluggableVisualizations/areaChart/PluggableAreaChart.d.ts.map +1 -1
  55. package/esm/internal/components/pluggableVisualizations/areaChart/PluggableAreaChart.js +2 -3
  56. package/esm/internal/components/pluggableVisualizations/baseChart/PluggableBaseChart.js +4 -4
  57. package/esm/internal/components/pluggableVisualizations/bubbleChart/PluggableBubbleChart.d.ts.map +1 -1
  58. package/esm/internal/components/pluggableVisualizations/bubbleChart/PluggableBubbleChart.js +2 -4
  59. package/esm/internal/components/pluggableVisualizations/comboChart/PluggableComboChart.d.ts.map +1 -1
  60. package/esm/internal/components/pluggableVisualizations/comboChart/PluggableComboChart.js +3 -4
  61. package/esm/internal/components/pluggableVisualizations/comboChart/PluggableComboChartDeprecated.js +3 -3
  62. package/esm/internal/components/pluggableVisualizations/geoAreaChart/PluggableGeoAreaChart.d.ts.map +1 -1
  63. package/esm/internal/components/pluggableVisualizations/geoAreaChart/PluggableGeoAreaChart.js +2 -4
  64. package/esm/internal/components/pluggableVisualizations/geoChart/PluggableGeoPushpinChart.d.ts.map +1 -1
  65. package/esm/internal/components/pluggableVisualizations/geoChart/PluggableGeoPushpinChart.js +5 -7
  66. package/esm/internal/components/pluggableVisualizations/geoChartNext/PluggableGeoPushpinChartNext.d.ts.map +1 -1
  67. package/esm/internal/components/pluggableVisualizations/geoChartNext/PluggableGeoPushpinChartNext.js +10 -12
  68. package/esm/internal/components/pluggableVisualizations/geoCommon/geoPropertySanitization.d.ts.map +1 -1
  69. package/esm/internal/components/pluggableVisualizations/geoCommon/geoPropertySanitization.js +6 -7
  70. package/esm/internal/components/pluggableVisualizations/heatMap/PluggableHeatmap.js +3 -3
  71. package/esm/internal/components/pluggableVisualizations/lineChart/PluggableLineChart.d.ts.map +1 -1
  72. package/esm/internal/components/pluggableVisualizations/lineChart/PluggableLineChart.js +4 -5
  73. package/esm/internal/components/pluggableVisualizations/mekko/PluggableMekko.d.ts.map +1 -1
  74. package/esm/internal/components/pluggableVisualizations/mekko/PluggableMekko.js +4 -5
  75. package/esm/internal/components/pluggableVisualizations/pieChart/PluggablePieChart.d.ts.map +1 -1
  76. package/esm/internal/components/pluggableVisualizations/pieChart/PluggablePieChart.js +5 -6
  77. package/esm/internal/components/pluggableVisualizations/pivotTable/pivotTableAdditionalFactories.d.ts.map +1 -1
  78. package/esm/internal/components/pluggableVisualizations/pivotTable/pivotTableAdditionalFactories.js +2 -2
  79. package/esm/internal/components/pluggableVisualizations/pivotTableNext/pivotTableNextAdditionalFactories.d.ts.map +1 -1
  80. package/esm/internal/components/pluggableVisualizations/pivotTableNext/pivotTableNextAdditionalFactories.js +2 -2
  81. package/esm/internal/components/pluggableVisualizations/radarChart/PluggableRadarChart.d.ts.map +1 -1
  82. package/esm/internal/components/pluggableVisualizations/radarChart/PluggableRadarChart.js +2 -3
  83. package/esm/internal/components/pluggableVisualizations/repeater/PluggableRepeater.d.ts.map +1 -1
  84. package/esm/internal/components/pluggableVisualizations/repeater/PluggableRepeater.js +3 -5
  85. package/esm/internal/components/pluggableVisualizations/scatterPlot/PluggableScatterPlot.d.ts.map +1 -1
  86. package/esm/internal/components/pluggableVisualizations/scatterPlot/PluggableScatterPlot.js +3 -5
  87. package/esm/internal/components/pluggableVisualizations/treeMap/PluggableTreemap.js +4 -4
  88. package/esm/internal/components/pluggableVisualizations/waterfallChart/PluggableWaterfallChart.d.ts.map +1 -1
  89. package/esm/internal/components/pluggableVisualizations/waterfallChart/PluggableWaterfallChart.js +7 -8
  90. package/esm/internal/translations/en-US.localization-bundle.d.ts +28 -0
  91. package/esm/internal/translations/en-US.localization-bundle.d.ts.map +1 -1
  92. package/esm/internal/translations/en-US.localization-bundle.js +29 -1
  93. package/esm/internal/utils/bucketConfig.d.ts.map +1 -1
  94. package/esm/internal/utils/bucketConfig.js +2 -3
  95. package/esm/internal/utils/bucketHelper.js +8 -8
  96. package/esm/internal/utils/colors.d.ts.map +1 -1
  97. package/esm/internal/utils/colors.js +6 -7
  98. package/esm/internal/utils/controlsHelper.d.ts.map +1 -1
  99. package/esm/internal/utils/controlsHelper.js +7 -7
  100. package/esm/internal/utils/dimensions.d.ts.map +1 -1
  101. package/esm/internal/utils/dimensions.js +4 -4
  102. package/esm/internal/utils/drillablePredicates.d.ts.map +1 -1
  103. package/esm/internal/utils/drillablePredicates.js +4 -4
  104. package/esm/internal/utils/embeddingCodeGenerator/getReactEmbeddingCodeGenerator.js +8 -8
  105. package/esm/internal/utils/propertiesHelper.js +8 -8
  106. package/esm/internal/utils/removeUseless.d.ts.map +1 -1
  107. package/esm/internal/utils/removeUseless.js +2 -3
  108. package/esm/internal/utils/translations.d.ts.map +1 -1
  109. package/esm/internal/utils/translations.js +2 -3
  110. package/esm/internal/utils/uiConfigHelpers/areaChartUiConfigHelper.d.ts.map +1 -1
  111. package/esm/internal/utils/uiConfigHelpers/areaChartUiConfigHelper.js +9 -10
  112. package/esm/internal/utils/uiConfigHelpers/baseChartUiConfigHelper.d.ts.map +1 -1
  113. package/esm/internal/utils/uiConfigHelpers/baseChartUiConfigHelper.js +16 -17
  114. package/esm/internal/utils/uiConfigHelpers/bubbleChartUiConfigHelper.d.ts.map +1 -1
  115. package/esm/internal/utils/uiConfigHelpers/bubbleChartUiConfigHelper.js +6 -7
  116. package/esm/internal/utils/uiConfigHelpers/columnBarChartUiConfigHelper.d.ts.map +1 -1
  117. package/esm/internal/utils/uiConfigHelpers/columnBarChartUiConfigHelper.js +4 -5
  118. package/esm/internal/utils/uiConfigHelpers/comboChartUiConfigHelper.d.ts.map +1 -1
  119. package/esm/internal/utils/uiConfigHelpers/comboChartUiConfigHelper.js +6 -7
  120. package/esm/internal/utils/uiConfigHelpers/comboChartUiConfigHelperDeprecated.d.ts.map +1 -1
  121. package/esm/internal/utils/uiConfigHelpers/comboChartUiConfigHelperDeprecated.js +8 -9
  122. package/esm/internal/utils/uiConfigHelpers/dependencyWheelChartUiConfigHelper.d.ts.map +1 -1
  123. package/esm/internal/utils/uiConfigHelpers/dependencyWheelChartUiConfigHelper.js +4 -5
  124. package/esm/internal/utils/uiConfigHelpers/donutChartUiConfigHelper.d.ts.map +1 -1
  125. package/esm/internal/utils/uiConfigHelpers/donutChartUiConfigHelper.js +3 -4
  126. package/esm/internal/utils/uiConfigHelpers/funnelChartUiConfigHelper.d.ts.map +1 -1
  127. package/esm/internal/utils/uiConfigHelpers/funnelChartUiConfigHelper.js +4 -5
  128. package/esm/internal/utils/uiConfigHelpers/geoAreaChartUiConfigHelper.d.ts.map +1 -1
  129. package/esm/internal/utils/uiConfigHelpers/geoAreaChartUiConfigHelper.js +3 -3
  130. package/esm/internal/utils/uiConfigHelpers/geoPushpinChartUiConfigHelper.d.ts.map +1 -1
  131. package/esm/internal/utils/uiConfigHelpers/geoPushpinChartUiConfigHelper.js +14 -15
  132. package/esm/internal/utils/uiConfigHelpers/headlineUiConfigHelper.d.ts.map +1 -1
  133. package/esm/internal/utils/uiConfigHelpers/headlineUiConfigHelper.js +9 -10
  134. package/esm/internal/utils/uiConfigHelpers/heatmapUiConfigHelper.d.ts.map +1 -1
  135. package/esm/internal/utils/uiConfigHelpers/heatmapUiConfigHelper.js +5 -6
  136. package/esm/internal/utils/uiConfigHelpers/lineChartUiConfigHelper.d.ts.map +1 -1
  137. package/esm/internal/utils/uiConfigHelpers/lineChartUiConfigHelper.js +11 -12
  138. package/esm/internal/utils/uiConfigHelpers/mekkoUiConfigHelper.d.ts.map +1 -1
  139. package/esm/internal/utils/uiConfigHelpers/mekkoUiConfigHelper.js +6 -7
  140. package/esm/internal/utils/uiConfigHelpers/pieChartUiConfigHelper.d.ts.map +1 -1
  141. package/esm/internal/utils/uiConfigHelpers/pieChartUiConfigHelper.js +9 -10
  142. package/esm/internal/utils/uiConfigHelpers/pivotTableNextUiConfigHelper.d.ts.map +1 -1
  143. package/esm/internal/utils/uiConfigHelpers/pivotTableNextUiConfigHelper.js +13 -14
  144. package/esm/internal/utils/uiConfigHelpers/pivotTableUiConfigHelper.d.ts.map +1 -1
  145. package/esm/internal/utils/uiConfigHelpers/pivotTableUiConfigHelper.js +13 -14
  146. package/esm/internal/utils/uiConfigHelpers/pyramidChartUiConfigHelper.d.ts.map +1 -1
  147. package/esm/internal/utils/uiConfigHelpers/pyramidChartUiConfigHelper.js +3 -4
  148. package/esm/internal/utils/uiConfigHelpers/radarChartUiConfigHelper.d.ts.map +1 -1
  149. package/esm/internal/utils/uiConfigHelpers/radarChartUiConfigHelper.js +11 -12
  150. package/esm/internal/utils/uiConfigHelpers/repeaterUiConfigHelper.d.ts.map +1 -1
  151. package/esm/internal/utils/uiConfigHelpers/repeaterUiConfigHelper.js +9 -10
  152. package/esm/internal/utils/uiConfigHelpers/sankeyChartUiConfigHelper.d.ts.map +1 -1
  153. package/esm/internal/utils/uiConfigHelpers/sankeyChartUiConfigHelper.js +6 -7
  154. package/esm/internal/utils/uiConfigHelpers/scatterPlotUiConfigHelper.d.ts.map +1 -1
  155. package/esm/internal/utils/uiConfigHelpers/scatterPlotUiConfigHelper.js +6 -7
  156. package/esm/internal/utils/uiConfigHelpers/treemapUiConfigHelper.d.ts.map +1 -1
  157. package/esm/internal/utils/uiConfigHelpers/treemapUiConfigHelper.js +10 -11
  158. package/esm/internal/utils/uiConfigHelpers/waterfallChartUiConfigHelper.d.ts.map +1 -1
  159. package/esm/internal/utils/uiConfigHelpers/waterfallChartUiConfigHelper.js +9 -10
  160. package/esm/internal/utils/uiConfigHelpers/xirrUiConfigHelper.d.ts.map +1 -1
  161. package/esm/internal/utils/uiConfigHelpers/xirrUiConfigHelper.js +3 -4
  162. package/esm/notificationsPanel/Notification/Notification.d.ts.map +1 -1
  163. package/esm/notificationsPanel/Notification/Notification.js +4 -4
  164. package/esm/sdk-ui-ext.d.ts +1 -1
  165. package/esm/share/ObjectShareDialog.d.ts +1 -1
  166. package/esm/share/ObjectShareDialog.js +3 -3
  167. package/esm/share/messages.d.ts +28 -0
  168. package/esm/share/messages.d.ts.map +1 -1
  169. package/esm/share/messages.js +14 -0
  170. package/esm/share/removeAccessConfirm.d.ts +21 -0
  171. package/esm/share/removeAccessConfirm.d.ts.map +1 -0
  172. package/esm/share/removeAccessConfirm.js +27 -0
  173. package/esm/share/useObjectShareDialog.d.ts +14 -11
  174. package/esm/share/useObjectShareDialog.d.ts.map +1 -1
  175. package/esm/share/useObjectShareDialog.js +54 -24
  176. package/package.json +21 -21
@@ -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 self-restriction confirm flow, open/close and 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
- /** Whether the "Restrict your access?" self-restriction confirm is visible. */
25
- isSelfRestrictConfirmOpen: boolean;
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 self-restriction. */
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 self-restriction confirm; every other row commits immediately.
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. Same self-restriction routing as {@link onRowPermissionChange}. */
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 self-restriction confirm, leaving the user's own access unchanged. */
75
- onSelfRestrictCancel: () => void;
76
- /** Apply the staged self-restriction — lower the user's own level, or remove their grant. */
77
- onSelfRestrictConfirm: () => void;
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 self-restriction confirm flow, the mutation-gating flags, and
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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IACjG,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,wFAAwF;IACxF,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,yEAAyE;IACzE,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,CAAC;IACnD,2DAA2D;IAC3D,YAAY,CAAC,EAAE,iBAAiB,CAAC;IACjC,iFAAiF;IACjF,yBAAyB,CAAC,EAAE,kBAAkB,CAAC;CAClD;AAED;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,EACjC,MAAM,EACN,OAAO,EACP,eAAe,EACf,KAAK,EACL,aAAa,EACb,YAAY,EACZ,yBAAyB,EACzB,MAAM,EACN,aAAa,EACb,WAAW,GACd,EAAE,2BAA2B,GAAG,2BAA2B,CA0N3D"}
@@ -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 self-restriction confirm flow, the mutation-gating flags, and
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 [pendingSelfChange, setPendingSelfChange] = useState(undefined);
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
- setPendingSelfChange({ granteeId: grantee.id, level });
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 = useCallback((grantee) => {
74
- // Stage the confirm only when the removal can lower the level the user
75
- // effectively holds — under an inherited floor the revoke removes the local
76
- // grant but restricts nothing, so the "Restrict your access?" warning would
77
- // promise a restriction that never happens. Same policy as the picks above.
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
- }, [state.selfManagedGranteeId, actions]);
84
- const onSelfRestrictConfirm = useCallback(() => {
85
- if (!pendingSelfChange) {
108
+ };
109
+ const onRowConfirm = () => {
110
+ if (!pendingRowChange) {
86
111
  return;
87
112
  }
88
- const { granteeId, level } = pendingSelfChange;
89
- setPendingSelfChange(undefined);
113
+ const { grantee, level } = pendingRowChange;
114
+ setPendingRowChange(undefined);
90
115
  if (level === "none") {
91
- void actions.removeGrantee(granteeId);
116
+ void actions.removeGrantee(grantee.id);
92
117
  }
93
118
  else {
94
- void actions.changePermissionLevel(granteeId, level);
119
+ void actions.changePermissionLevel(grantee.id, level);
95
120
  }
96
- }, [pendingSelfChange, actions]);
97
- const onSelfRestrictCancel = useCallback(() => setPendingSelfChange(undefined), []);
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
- isSelfRestrictConfirmOpen: pendingSelfChange !== undefined,
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
- onSelfRestrictCancel,
185
- onSelfRestrictConfirm,
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.7",
3
+ "version": "11.68.0-alpha.9",
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-base": "11.68.0-alpha.7",
67
- "@gooddata/sdk-backend-spi": "11.68.0-alpha.7",
68
- "@gooddata/sdk-embedding": "11.68.0-alpha.7",
69
- "@gooddata/sdk-model": "11.68.0-alpha.7",
70
- "@gooddata/sdk-ui": "11.68.0-alpha.7",
71
- "@gooddata/sdk-ui-charts": "11.68.0-alpha.7",
72
- "@gooddata/sdk-ui-filters": "11.68.0-alpha.7",
73
- "@gooddata/sdk-ui-geo": "11.68.0-alpha.7",
74
- "@gooddata/sdk-ui-pivot": "11.68.0-alpha.7",
75
- "@gooddata/sdk-ui-kit": "11.68.0-alpha.7",
76
- "@gooddata/sdk-ui-semantic-search": "11.68.0-alpha.7",
77
- "@gooddata/sdk-ui-theme-provider": "11.68.0-alpha.7",
78
- "@gooddata/util": "11.68.0-alpha.7",
79
- "@gooddata/sdk-ui-vis-commons": "11.68.0-alpha.7"
66
+ "@gooddata/sdk-backend-base": "11.68.0-alpha.9",
67
+ "@gooddata/sdk-backend-spi": "11.68.0-alpha.9",
68
+ "@gooddata/sdk-embedding": "11.68.0-alpha.9",
69
+ "@gooddata/sdk-model": "11.68.0-alpha.9",
70
+ "@gooddata/sdk-ui": "11.68.0-alpha.9",
71
+ "@gooddata/sdk-ui-charts": "11.68.0-alpha.9",
72
+ "@gooddata/sdk-ui-filters": "11.68.0-alpha.9",
73
+ "@gooddata/sdk-ui-geo": "11.68.0-alpha.9",
74
+ "@gooddata/sdk-ui-kit": "11.68.0-alpha.9",
75
+ "@gooddata/sdk-ui-semantic-search": "11.68.0-alpha.9",
76
+ "@gooddata/sdk-ui-pivot": "11.68.0-alpha.9",
77
+ "@gooddata/sdk-ui-theme-provider": "11.68.0-alpha.9",
78
+ "@gooddata/util": "11.68.0-alpha.9",
79
+ "@gooddata/sdk-ui-vis-commons": "11.68.0-alpha.9"
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/eslint-config": "11.68.0-alpha.7",
124
- "@gooddata/oxlint-config": "11.68.0-alpha.7",
125
- "@gooddata/i18n-toolkit": "11.68.0-alpha.7",
126
- "@gooddata/sdk-backend-mockingbird": "11.68.0-alpha.7",
127
- "@gooddata/stylelint-config": "11.68.0-alpha.7",
128
- "@gooddata/reference-workspace": "11.68.0-alpha.7"
123
+ "@gooddata/eslint-config": "11.68.0-alpha.9",
124
+ "@gooddata/i18n-toolkit": "11.68.0-alpha.9",
125
+ "@gooddata/reference-workspace": "11.68.0-alpha.9",
126
+ "@gooddata/oxlint-config": "11.68.0-alpha.9",
127
+ "@gooddata/sdk-backend-mockingbird": "11.68.0-alpha.9",
128
+ "@gooddata/stylelint-config": "11.68.0-alpha.9"
129
129
  },
130
130
  "peerDependencies": {
131
131
  "react": "^18.0.0 || ^19.0.0",