@gooddata/sdk-ui-ext 11.52.0-alpha.6 → 11.52.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (125) hide show
  1. package/esm/dataLoaders/InsightDataLoader.d.ts +6 -0
  2. package/esm/dataLoaders/InsightDataLoader.d.ts.map +1 -1
  3. package/esm/dataLoaders/InsightDataLoader.js +4 -1
  4. package/esm/dataLoaders/index.d.ts +13 -0
  5. package/esm/dataLoaders/index.d.ts.map +1 -1
  6. package/esm/dataLoaders/index.js +14 -0
  7. package/esm/index.d.ts +1 -1
  8. package/esm/index.d.ts.map +1 -1
  9. package/esm/index.js +1 -1
  10. package/esm/insightView/InsightRenderer.d.ts +2 -5
  11. package/esm/insightView/InsightRenderer.d.ts.map +1 -1
  12. package/esm/insightView/InsightRenderer.js +1 -2
  13. package/esm/internal/components/pluggableVisualizations/mekko/PluggableMekko.d.ts +6 -1
  14. package/esm/internal/components/pluggableVisualizations/mekko/PluggableMekko.d.ts.map +1 -1
  15. package/esm/internal/components/pluggableVisualizations/mekko/PluggableMekko.js +25 -4
  16. package/esm/internal/components/pluggableVisualizations/pivotTable/PluggablePivotTable.d.ts.map +1 -1
  17. package/esm/internal/components/pluggableVisualizations/pivotTable/PluggablePivotTable.js +0 -1
  18. package/esm/internal/translations/de-DE.localization-bundle.d.ts +2 -0
  19. package/esm/internal/translations/de-DE.localization-bundle.d.ts.map +1 -1
  20. package/esm/internal/translations/de-DE.localization-bundle.js +2 -0
  21. package/esm/internal/translations/en-AU.localization-bundle.d.ts +2 -0
  22. package/esm/internal/translations/en-AU.localization-bundle.d.ts.map +1 -1
  23. package/esm/internal/translations/en-AU.localization-bundle.js +2 -0
  24. package/esm/internal/translations/en-GB.localization-bundle.d.ts +2 -0
  25. package/esm/internal/translations/en-GB.localization-bundle.d.ts.map +1 -1
  26. package/esm/internal/translations/en-GB.localization-bundle.js +2 -0
  27. package/esm/internal/translations/en-US.localization-bundle.d.ts +4 -0
  28. package/esm/internal/translations/en-US.localization-bundle.d.ts.map +1 -1
  29. package/esm/internal/translations/en-US.localization-bundle.js +4 -0
  30. package/esm/internal/translations/es-419.localization-bundle.d.ts +2 -0
  31. package/esm/internal/translations/es-419.localization-bundle.d.ts.map +1 -1
  32. package/esm/internal/translations/es-419.localization-bundle.js +2 -0
  33. package/esm/internal/translations/es-ES.localization-bundle.d.ts +2 -0
  34. package/esm/internal/translations/es-ES.localization-bundle.d.ts.map +1 -1
  35. package/esm/internal/translations/es-ES.localization-bundle.js +2 -0
  36. package/esm/internal/translations/fi-FI.localization-bundle.d.ts +2 -0
  37. package/esm/internal/translations/fi-FI.localization-bundle.d.ts.map +1 -1
  38. package/esm/internal/translations/fi-FI.localization-bundle.js +2 -0
  39. package/esm/internal/translations/fr-CA.localization-bundle.d.ts +2 -0
  40. package/esm/internal/translations/fr-CA.localization-bundle.d.ts.map +1 -1
  41. package/esm/internal/translations/fr-CA.localization-bundle.js +2 -0
  42. package/esm/internal/translations/fr-FR.localization-bundle.d.ts +2 -0
  43. package/esm/internal/translations/fr-FR.localization-bundle.d.ts.map +1 -1
  44. package/esm/internal/translations/fr-FR.localization-bundle.js +2 -0
  45. package/esm/internal/translations/id-ID.localization-bundle.d.ts +2 -0
  46. package/esm/internal/translations/id-ID.localization-bundle.d.ts.map +1 -1
  47. package/esm/internal/translations/id-ID.localization-bundle.js +2 -0
  48. package/esm/internal/translations/it-IT.localization-bundle.d.ts +2 -0
  49. package/esm/internal/translations/it-IT.localization-bundle.d.ts.map +1 -1
  50. package/esm/internal/translations/it-IT.localization-bundle.js +2 -0
  51. package/esm/internal/translations/ja-JP.localization-bundle.d.ts +2 -0
  52. package/esm/internal/translations/ja-JP.localization-bundle.d.ts.map +1 -1
  53. package/esm/internal/translations/ja-JP.localization-bundle.js +2 -0
  54. package/esm/internal/translations/ko-KR.localization-bundle.d.ts +2 -0
  55. package/esm/internal/translations/ko-KR.localization-bundle.d.ts.map +1 -1
  56. package/esm/internal/translations/ko-KR.localization-bundle.js +2 -0
  57. package/esm/internal/translations/nl-NL.localization-bundle.d.ts +2 -0
  58. package/esm/internal/translations/nl-NL.localization-bundle.d.ts.map +1 -1
  59. package/esm/internal/translations/nl-NL.localization-bundle.js +2 -0
  60. package/esm/internal/translations/pl-PL.localization-bundle.d.ts +2 -0
  61. package/esm/internal/translations/pl-PL.localization-bundle.d.ts.map +1 -1
  62. package/esm/internal/translations/pl-PL.localization-bundle.js +2 -0
  63. package/esm/internal/translations/pt-BR.localization-bundle.d.ts +2 -0
  64. package/esm/internal/translations/pt-BR.localization-bundle.d.ts.map +1 -1
  65. package/esm/internal/translations/pt-BR.localization-bundle.js +2 -0
  66. package/esm/internal/translations/pt-PT.localization-bundle.d.ts +2 -0
  67. package/esm/internal/translations/pt-PT.localization-bundle.d.ts.map +1 -1
  68. package/esm/internal/translations/pt-PT.localization-bundle.js +2 -0
  69. package/esm/internal/translations/ru-RU.localization-bundle.d.ts +2 -0
  70. package/esm/internal/translations/ru-RU.localization-bundle.d.ts.map +1 -1
  71. package/esm/internal/translations/ru-RU.localization-bundle.js +2 -0
  72. package/esm/internal/translations/sl-SI.localization-bundle.d.ts +2 -0
  73. package/esm/internal/translations/sl-SI.localization-bundle.d.ts.map +1 -1
  74. package/esm/internal/translations/sl-SI.localization-bundle.js +2 -0
  75. package/esm/internal/translations/th-TH.localization-bundle.d.ts +2 -0
  76. package/esm/internal/translations/th-TH.localization-bundle.d.ts.map +1 -1
  77. package/esm/internal/translations/th-TH.localization-bundle.js +2 -0
  78. package/esm/internal/translations/tr-TR.localization-bundle.d.ts +2 -0
  79. package/esm/internal/translations/tr-TR.localization-bundle.d.ts.map +1 -1
  80. package/esm/internal/translations/tr-TR.localization-bundle.js +2 -0
  81. package/esm/internal/translations/uk-UA.localization-bundle.d.ts +2 -0
  82. package/esm/internal/translations/uk-UA.localization-bundle.d.ts.map +1 -1
  83. package/esm/internal/translations/uk-UA.localization-bundle.js +2 -0
  84. package/esm/internal/translations/vi-VN.localization-bundle.d.ts +2 -0
  85. package/esm/internal/translations/vi-VN.localization-bundle.d.ts.map +1 -1
  86. package/esm/internal/translations/vi-VN.localization-bundle.js +2 -0
  87. package/esm/internal/translations/zh-HK.localization-bundle.d.ts +2 -0
  88. package/esm/internal/translations/zh-HK.localization-bundle.d.ts.map +1 -1
  89. package/esm/internal/translations/zh-HK.localization-bundle.js +2 -0
  90. package/esm/internal/translations/zh-Hans.localization-bundle.d.ts +2 -0
  91. package/esm/internal/translations/zh-Hans.localization-bundle.d.ts.map +1 -1
  92. package/esm/internal/translations/zh-Hans.localization-bundle.js +2 -0
  93. package/esm/internal/translations/zh-Hant.localization-bundle.d.ts +2 -0
  94. package/esm/internal/translations/zh-Hant.localization-bundle.d.ts.map +1 -1
  95. package/esm/internal/translations/zh-Hant.localization-bundle.js +2 -0
  96. package/esm/notificationsPanel/Notification/Notification.d.ts.map +1 -1
  97. package/esm/notificationsPanel/Notification/Notification.js +6 -3
  98. package/esm/notificationsPanel/NotificationFiltersDetail/NotificationFiltersDetail.d.ts +3 -3
  99. package/esm/notificationsPanel/NotificationFiltersDetail/NotificationFiltersDetail.d.ts.map +1 -1
  100. package/esm/notificationsPanel/NotificationFiltersDetail/NotificationFiltersDetail.js +4 -4
  101. package/esm/notificationsPanel/NotificationFiltersDetail/NotificationFiltersDetailDialog.d.ts +9 -3
  102. package/esm/notificationsPanel/NotificationFiltersDetail/NotificationFiltersDetailDialog.d.ts.map +1 -1
  103. package/esm/notificationsPanel/NotificationFiltersDetail/NotificationFiltersDetailDialog.js +4 -4
  104. package/esm/sdk-ui-ext.d.ts +13 -0
  105. package/esm/share/ObjectShareDialog.js +22 -6
  106. package/esm/share/messages.d.ts +7 -0
  107. package/esm/share/messages.d.ts.map +1 -1
  108. package/esm/share/messages.js +5 -0
  109. package/esm/share/objectShareController.helpers.d.ts +117 -17
  110. package/esm/share/objectShareController.helpers.d.ts.map +1 -1
  111. package/esm/share/objectShareController.helpers.js +181 -44
  112. package/esm/share/objectShareController.types.d.ts +34 -10
  113. package/esm/share/objectShareController.types.d.ts.map +1 -1
  114. package/esm/share/useAccessList.d.ts +6 -0
  115. package/esm/share/useAccessList.d.ts.map +1 -1
  116. package/esm/share/useAccessList.js +26 -6
  117. package/esm/share/useLabelScope.d.ts +46 -1
  118. package/esm/share/useLabelScope.d.ts.map +1 -1
  119. package/esm/share/useLabelScope.js +98 -6
  120. package/esm/share/useObjectShareController.d.ts.map +1 -1
  121. package/esm/share/useObjectShareController.js +213 -45
  122. package/esm/share/useObjectShareDialog.d.ts +7 -0
  123. package/esm/share/useObjectShareDialog.d.ts.map +1 -1
  124. package/esm/share/useObjectShareDialog.js +22 -2
  125. package/package.json +21 -21
@@ -1,5 +1,8 @@
1
1
  // (C) 2026 GoodData Corporation
2
2
  import { useCallback, useEffect, useState } from "react";
3
+ import { useIntl } from "react-intl";
4
+ import { objectShareMessages } from "./messages.js";
5
+ import { changesEffectiveLevel, removalChangesEffectiveLevel } from "./objectShareController.helpers.js";
3
6
  import { useObjectShareController } from "./useObjectShareController.js";
4
7
  /**
5
8
  * Owns everything {@link ObjectShareDialog} needs to render for one dialog session:
@@ -10,6 +13,7 @@ import { useObjectShareController } from "./useObjectShareController.js";
10
13
  * @internal
11
14
  */
12
15
  export function useObjectShareDialog({ target, onClose, onSummaryChange, labels, labelsLoading, labelsError, }) {
16
+ const intl = useIntl();
13
17
  const { state, actions } = useObjectShareController(target, { labels, labelsError, labelsLoading });
14
18
  const [pendingSelfChange, setPendingSelfChange] = useState(undefined);
15
19
  // Synchronize the displayed access summary out to the consumer — the legitimate
@@ -31,7 +35,12 @@ export function useObjectShareDialog({ target, onClose, onSummaryChange, labels,
31
35
  // classified it as self-managed — those changes route through the confirm.
32
36
  const onRowPermissionChange = useCallback((grantee, level) => {
33
37
  if (state.selfManagedGranteeId === grantee.id) {
34
- if (level !== grantee.level) {
38
+ // Stage the confirm only for a pick that would really move the level the
39
+ // user effectively holds. Comparing against the displayed level instead
40
+ // opened "Restrict your access?" for a pick under an inherited floor, which
41
+ // the controller then refuses — the user would confirm a restriction that
42
+ // never happens. Same predicate the controller applies.
43
+ if (changesEffectiveLevel(grantee, level)) {
35
44
  setPendingSelfChange({ granteeId: grantee.id, level });
36
45
  }
37
46
  return;
@@ -39,7 +48,11 @@ export function useObjectShareDialog({ target, onClose, onSummaryChange, labels,
39
48
  void actions.changePermissionLevel(grantee.id, level);
40
49
  }, [state.selfManagedGranteeId, actions]);
41
50
  const onRowRemove = useCallback((grantee) => {
42
- if (state.selfManagedGranteeId === grantee.id) {
51
+ // Stage the confirm only when the removal can lower the level the user
52
+ // effectively holds — under an inherited floor the revoke removes the local
53
+ // grant but restricts nothing, so the "Restrict your access?" warning would
54
+ // promise a restriction that never happens. Same policy as the picks above.
55
+ if (state.selfManagedGranteeId === grantee.id && removalChangesEffectiveLevel(grantee)) {
43
56
  setPendingSelfChange({ granteeId: grantee.id, level: "none" });
44
57
  return;
45
58
  }
@@ -60,6 +73,11 @@ export function useObjectShareDialog({ target, onClose, onSummaryChange, labels,
60
73
  }, [pendingSelfChange, actions]);
61
74
  const onSelfRestrictCancel = useCallback(() => setPendingSelfChange(undefined), []);
62
75
  const rowDisabledLevels = useCallback((grantee) => state.selfManagedGranteeId === grantee.id ? state.selfManagedDisabledLevels : undefined, [state.selfManagedGranteeId, state.selfManagedDisabledLevels]);
76
+ // Levels below an inherited one are deliberately NOT disabled: lowering the
77
+ // direct grant still reduces the effective level whenever it sits above what is
78
+ // inherited (direct EDIT under an inherited SHARE → picking VIEW yields SHARE).
79
+ // The row's warning badge is what explains the inherited floor.
80
+ const isRowRemoveDisabled = useCallback((grantee) => grantee.directLevel === undefined, []);
63
81
  const isMutable = state.status === "success" && state.labelsResolved;
64
82
  const isLoading = state.status === "loading" || state.labelsInitializing;
65
83
  return {
@@ -73,6 +91,8 @@ export function useObjectShareDialog({ target, onClose, onSummaryChange, labels,
73
91
  isLoading,
74
92
  workspaceDisabledLevels: state.workspaceDisabledLevels,
75
93
  rowDisabledLevels,
94
+ isRowRemoveDisabled,
95
+ rowRemoveDisabledTooltip: intl.formatMessage(objectShareMessages.granteeRemoveInherited),
76
96
  onClose,
77
97
  onRowPermissionChange,
78
98
  onRowRemove,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gooddata/sdk-ui-ext",
3
- "version": "11.52.0-alpha.6",
3
+ "version": "11.52.0",
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.52.0-alpha.6",
67
- "@gooddata/sdk-backend-spi": "11.52.0-alpha.6",
68
- "@gooddata/sdk-embedding": "11.52.0-alpha.6",
69
- "@gooddata/sdk-model": "11.52.0-alpha.6",
70
- "@gooddata/sdk-ui": "11.52.0-alpha.6",
71
- "@gooddata/sdk-ui-charts": "11.52.0-alpha.6",
72
- "@gooddata/sdk-ui-geo": "11.52.0-alpha.6",
73
- "@gooddata/sdk-ui-filters": "11.52.0-alpha.6",
74
- "@gooddata/sdk-ui-semantic-search": "11.52.0-alpha.6",
75
- "@gooddata/sdk-ui-kit": "11.52.0-alpha.6",
76
- "@gooddata/sdk-ui-theme-provider": "11.52.0-alpha.6",
77
- "@gooddata/sdk-ui-vis-commons": "11.52.0-alpha.6",
78
- "@gooddata/sdk-ui-pivot": "11.52.0-alpha.6",
79
- "@gooddata/util": "11.52.0-alpha.6"
66
+ "@gooddata/sdk-backend-base": "11.52.0",
67
+ "@gooddata/sdk-backend-spi": "11.52.0",
68
+ "@gooddata/sdk-model": "11.52.0",
69
+ "@gooddata/sdk-ui": "11.52.0",
70
+ "@gooddata/sdk-embedding": "11.52.0",
71
+ "@gooddata/sdk-ui-charts": "11.52.0",
72
+ "@gooddata/sdk-ui-filters": "11.52.0",
73
+ "@gooddata/sdk-ui-geo": "11.52.0",
74
+ "@gooddata/sdk-ui-kit": "11.52.0",
75
+ "@gooddata/sdk-ui-pivot": "11.52.0",
76
+ "@gooddata/sdk-ui-vis-commons": "11.52.0",
77
+ "@gooddata/sdk-ui-theme-provider": "11.52.0",
78
+ "@gooddata/sdk-ui-semantic-search": "11.52.0",
79
+ "@gooddata/util": "11.52.0"
80
80
  },
81
81
  "devDependencies": {
82
82
  "@microsoft/api-documenter": "^7.17.0",
@@ -124,12 +124,12 @@
124
124
  "typescript": "5.9.3",
125
125
  "vitest": "4.1.8",
126
126
  "vitest-dom": "0.1.1",
127
- "@gooddata/eslint-config": "11.52.0-alpha.6",
128
- "@gooddata/i18n-toolkit": "11.52.0-alpha.6",
129
- "@gooddata/oxlint-config": "11.52.0-alpha.6",
130
- "@gooddata/reference-workspace": "11.52.0-alpha.6",
131
- "@gooddata/sdk-backend-mockingbird": "11.52.0-alpha.6",
132
- "@gooddata/stylelint-config": "11.52.0-alpha.6"
127
+ "@gooddata/i18n-toolkit": "11.52.0",
128
+ "@gooddata/eslint-config": "11.52.0",
129
+ "@gooddata/oxlint-config": "11.52.0",
130
+ "@gooddata/reference-workspace": "11.52.0",
131
+ "@gooddata/sdk-backend-mockingbird": "11.52.0",
132
+ "@gooddata/stylelint-config": "11.52.0"
133
133
  },
134
134
  "peerDependencies": {
135
135
  "react": "^18.0.0 || ^19.0.0",