@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.
- package/esm/dataLoaders/InsightDataLoader.d.ts +6 -0
- package/esm/dataLoaders/InsightDataLoader.d.ts.map +1 -1
- package/esm/dataLoaders/InsightDataLoader.js +4 -1
- package/esm/dataLoaders/index.d.ts +13 -0
- package/esm/dataLoaders/index.d.ts.map +1 -1
- package/esm/dataLoaders/index.js +14 -0
- package/esm/index.d.ts +1 -1
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js +1 -1
- package/esm/insightView/InsightRenderer.d.ts +2 -5
- package/esm/insightView/InsightRenderer.d.ts.map +1 -1
- package/esm/insightView/InsightRenderer.js +1 -2
- package/esm/internal/components/pluggableVisualizations/mekko/PluggableMekko.d.ts +6 -1
- package/esm/internal/components/pluggableVisualizations/mekko/PluggableMekko.d.ts.map +1 -1
- package/esm/internal/components/pluggableVisualizations/mekko/PluggableMekko.js +25 -4
- package/esm/internal/components/pluggableVisualizations/pivotTable/PluggablePivotTable.d.ts.map +1 -1
- package/esm/internal/components/pluggableVisualizations/pivotTable/PluggablePivotTable.js +0 -1
- package/esm/internal/translations/de-DE.localization-bundle.d.ts +2 -0
- package/esm/internal/translations/de-DE.localization-bundle.d.ts.map +1 -1
- package/esm/internal/translations/de-DE.localization-bundle.js +2 -0
- package/esm/internal/translations/en-AU.localization-bundle.d.ts +2 -0
- package/esm/internal/translations/en-AU.localization-bundle.d.ts.map +1 -1
- package/esm/internal/translations/en-AU.localization-bundle.js +2 -0
- package/esm/internal/translations/en-GB.localization-bundle.d.ts +2 -0
- package/esm/internal/translations/en-GB.localization-bundle.d.ts.map +1 -1
- package/esm/internal/translations/en-GB.localization-bundle.js +2 -0
- package/esm/internal/translations/en-US.localization-bundle.d.ts +4 -0
- package/esm/internal/translations/en-US.localization-bundle.d.ts.map +1 -1
- package/esm/internal/translations/en-US.localization-bundle.js +4 -0
- package/esm/internal/translations/es-419.localization-bundle.d.ts +2 -0
- package/esm/internal/translations/es-419.localization-bundle.d.ts.map +1 -1
- package/esm/internal/translations/es-419.localization-bundle.js +2 -0
- package/esm/internal/translations/es-ES.localization-bundle.d.ts +2 -0
- package/esm/internal/translations/es-ES.localization-bundle.d.ts.map +1 -1
- package/esm/internal/translations/es-ES.localization-bundle.js +2 -0
- package/esm/internal/translations/fi-FI.localization-bundle.d.ts +2 -0
- package/esm/internal/translations/fi-FI.localization-bundle.d.ts.map +1 -1
- package/esm/internal/translations/fi-FI.localization-bundle.js +2 -0
- package/esm/internal/translations/fr-CA.localization-bundle.d.ts +2 -0
- package/esm/internal/translations/fr-CA.localization-bundle.d.ts.map +1 -1
- package/esm/internal/translations/fr-CA.localization-bundle.js +2 -0
- package/esm/internal/translations/fr-FR.localization-bundle.d.ts +2 -0
- package/esm/internal/translations/fr-FR.localization-bundle.d.ts.map +1 -1
- package/esm/internal/translations/fr-FR.localization-bundle.js +2 -0
- package/esm/internal/translations/id-ID.localization-bundle.d.ts +2 -0
- package/esm/internal/translations/id-ID.localization-bundle.d.ts.map +1 -1
- package/esm/internal/translations/id-ID.localization-bundle.js +2 -0
- package/esm/internal/translations/it-IT.localization-bundle.d.ts +2 -0
- package/esm/internal/translations/it-IT.localization-bundle.d.ts.map +1 -1
- package/esm/internal/translations/it-IT.localization-bundle.js +2 -0
- package/esm/internal/translations/ja-JP.localization-bundle.d.ts +2 -0
- package/esm/internal/translations/ja-JP.localization-bundle.d.ts.map +1 -1
- package/esm/internal/translations/ja-JP.localization-bundle.js +2 -0
- package/esm/internal/translations/ko-KR.localization-bundle.d.ts +2 -0
- package/esm/internal/translations/ko-KR.localization-bundle.d.ts.map +1 -1
- package/esm/internal/translations/ko-KR.localization-bundle.js +2 -0
- package/esm/internal/translations/nl-NL.localization-bundle.d.ts +2 -0
- package/esm/internal/translations/nl-NL.localization-bundle.d.ts.map +1 -1
- package/esm/internal/translations/nl-NL.localization-bundle.js +2 -0
- package/esm/internal/translations/pl-PL.localization-bundle.d.ts +2 -0
- package/esm/internal/translations/pl-PL.localization-bundle.d.ts.map +1 -1
- package/esm/internal/translations/pl-PL.localization-bundle.js +2 -0
- package/esm/internal/translations/pt-BR.localization-bundle.d.ts +2 -0
- package/esm/internal/translations/pt-BR.localization-bundle.d.ts.map +1 -1
- package/esm/internal/translations/pt-BR.localization-bundle.js +2 -0
- package/esm/internal/translations/pt-PT.localization-bundle.d.ts +2 -0
- package/esm/internal/translations/pt-PT.localization-bundle.d.ts.map +1 -1
- package/esm/internal/translations/pt-PT.localization-bundle.js +2 -0
- package/esm/internal/translations/ru-RU.localization-bundle.d.ts +2 -0
- package/esm/internal/translations/ru-RU.localization-bundle.d.ts.map +1 -1
- package/esm/internal/translations/ru-RU.localization-bundle.js +2 -0
- package/esm/internal/translations/sl-SI.localization-bundle.d.ts +2 -0
- package/esm/internal/translations/sl-SI.localization-bundle.d.ts.map +1 -1
- package/esm/internal/translations/sl-SI.localization-bundle.js +2 -0
- package/esm/internal/translations/th-TH.localization-bundle.d.ts +2 -0
- package/esm/internal/translations/th-TH.localization-bundle.d.ts.map +1 -1
- package/esm/internal/translations/th-TH.localization-bundle.js +2 -0
- package/esm/internal/translations/tr-TR.localization-bundle.d.ts +2 -0
- package/esm/internal/translations/tr-TR.localization-bundle.d.ts.map +1 -1
- package/esm/internal/translations/tr-TR.localization-bundle.js +2 -0
- package/esm/internal/translations/uk-UA.localization-bundle.d.ts +2 -0
- package/esm/internal/translations/uk-UA.localization-bundle.d.ts.map +1 -1
- package/esm/internal/translations/uk-UA.localization-bundle.js +2 -0
- package/esm/internal/translations/vi-VN.localization-bundle.d.ts +2 -0
- package/esm/internal/translations/vi-VN.localization-bundle.d.ts.map +1 -1
- package/esm/internal/translations/vi-VN.localization-bundle.js +2 -0
- package/esm/internal/translations/zh-HK.localization-bundle.d.ts +2 -0
- package/esm/internal/translations/zh-HK.localization-bundle.d.ts.map +1 -1
- package/esm/internal/translations/zh-HK.localization-bundle.js +2 -0
- package/esm/internal/translations/zh-Hans.localization-bundle.d.ts +2 -0
- package/esm/internal/translations/zh-Hans.localization-bundle.d.ts.map +1 -1
- package/esm/internal/translations/zh-Hans.localization-bundle.js +2 -0
- package/esm/internal/translations/zh-Hant.localization-bundle.d.ts +2 -0
- package/esm/internal/translations/zh-Hant.localization-bundle.d.ts.map +1 -1
- package/esm/internal/translations/zh-Hant.localization-bundle.js +2 -0
- package/esm/notificationsPanel/Notification/Notification.d.ts.map +1 -1
- package/esm/notificationsPanel/Notification/Notification.js +6 -3
- package/esm/notificationsPanel/NotificationFiltersDetail/NotificationFiltersDetail.d.ts +3 -3
- package/esm/notificationsPanel/NotificationFiltersDetail/NotificationFiltersDetail.d.ts.map +1 -1
- package/esm/notificationsPanel/NotificationFiltersDetail/NotificationFiltersDetail.js +4 -4
- package/esm/notificationsPanel/NotificationFiltersDetail/NotificationFiltersDetailDialog.d.ts +9 -3
- package/esm/notificationsPanel/NotificationFiltersDetail/NotificationFiltersDetailDialog.d.ts.map +1 -1
- package/esm/notificationsPanel/NotificationFiltersDetail/NotificationFiltersDetailDialog.js +4 -4
- package/esm/sdk-ui-ext.d.ts +13 -0
- package/esm/share/ObjectShareDialog.js +22 -6
- package/esm/share/messages.d.ts +7 -0
- package/esm/share/messages.d.ts.map +1 -1
- package/esm/share/messages.js +5 -0
- package/esm/share/objectShareController.helpers.d.ts +117 -17
- package/esm/share/objectShareController.helpers.d.ts.map +1 -1
- package/esm/share/objectShareController.helpers.js +181 -44
- package/esm/share/objectShareController.types.d.ts +34 -10
- package/esm/share/objectShareController.types.d.ts.map +1 -1
- package/esm/share/useAccessList.d.ts +6 -0
- package/esm/share/useAccessList.d.ts.map +1 -1
- package/esm/share/useAccessList.js +26 -6
- package/esm/share/useLabelScope.d.ts +46 -1
- package/esm/share/useLabelScope.d.ts.map +1 -1
- package/esm/share/useLabelScope.js +98 -6
- package/esm/share/useObjectShareController.d.ts.map +1 -1
- package/esm/share/useObjectShareController.js +213 -45
- package/esm/share/useObjectShareDialog.d.ts +7 -0
- package/esm/share/useObjectShareDialog.d.ts.map +1 -1
- package/esm/share/useObjectShareDialog.js +22 -2
- 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
|
-
|
|
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
|
-
|
|
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
|
|
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
|
|
67
|
-
"@gooddata/sdk-backend-spi": "11.52.0
|
|
68
|
-
"@gooddata/sdk-
|
|
69
|
-
"@gooddata/sdk-
|
|
70
|
-
"@gooddata/sdk-
|
|
71
|
-
"@gooddata/sdk-ui-charts": "11.52.0
|
|
72
|
-
"@gooddata/sdk-ui-
|
|
73
|
-
"@gooddata/sdk-ui-
|
|
74
|
-
"@gooddata/sdk-ui-
|
|
75
|
-
"@gooddata/sdk-ui-
|
|
76
|
-
"@gooddata/sdk-ui-
|
|
77
|
-
"@gooddata/sdk-ui-
|
|
78
|
-
"@gooddata/sdk-ui-
|
|
79
|
-
"@gooddata/util": "11.52.0
|
|
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/
|
|
128
|
-
"@gooddata/
|
|
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
|
|
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",
|