@gooddata/sdk-ui-ext 11.46.0-alpha.5 → 11.46.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/NOTICE +15 -15
- package/esm/sdk-ui-ext.d.ts +10 -0
- package/esm/share/ObjectShareDialog.d.ts.map +1 -1
- package/esm/share/ObjectShareDialog.js +5 -1
- package/esm/share/objectShareController.types.d.ts +10 -0
- package/esm/share/objectShareController.types.d.ts.map +1 -1
- package/esm/share/useAccessList.d.ts +14 -3
- package/esm/share/useAccessList.d.ts.map +1 -1
- package/esm/share/useAccessList.js +19 -3
- package/esm/share/useObjectShareController.d.ts.map +1 -1
- package/esm/share/useObjectShareController.js +4 -2
- package/package.json +22 -22
package/NOTICE
CHANGED
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
|
|
8
8
|
The following 3rd-party software packages may be used by or distributed with gooddata-ui-sdk. Any information relevant to third-party vendors listed below are collected using common, reasonable means.
|
|
9
9
|
|
|
10
|
-
Date generated: 2026-7-
|
|
10
|
+
Date generated: 2026-7-8
|
|
11
11
|
|
|
12
|
-
Revision ID:
|
|
12
|
+
Revision ID: 70f53b749a8d57ac2f01f75ea073f810922806d4
|
|
13
13
|
|
|
14
14
|
================================================================================
|
|
15
15
|
================================================================================
|
|
@@ -231,10 +231,10 @@ Revision ID: c60903358f56a496a9d470d006e98568e9a8b664
|
|
|
231
231
|
- @mapbox/whoots-js (3.1.0) [ISC]
|
|
232
232
|
- @maplibre/maplibre-gl-style-spec (20.4.0) [MIT, ISC, BSD-3-Clause]
|
|
233
233
|
- @marijn/find-cluster-break (1.0.2) [MIT]
|
|
234
|
-
- @module-federation/error-codes (2.
|
|
235
|
-
- @module-federation/runtime (2.
|
|
236
|
-
- @module-federation/runtime-core (2.
|
|
237
|
-
- @module-federation/sdk (2.
|
|
234
|
+
- @module-federation/error-codes (2.6.0) [MIT]
|
|
235
|
+
- @module-federation/runtime (2.6.0) [MIT]
|
|
236
|
+
- @module-federation/runtime-core (2.6.0) [MIT]
|
|
237
|
+
- @module-federation/sdk (2.6.0) [MIT]
|
|
238
238
|
- @noble/hashes (1.4.0) [MIT]
|
|
239
239
|
- @nodelib/fs.scandir (2.1.5) [MIT]
|
|
240
240
|
- @nodelib/fs.stat (2.0.5) [MIT]
|
|
@@ -3560,9 +3560,9 @@ MIT
|
|
|
3560
3560
|
|
|
3561
3561
|
|
|
3562
3562
|
--------------------------------------------------------------------------------
|
|
3563
|
-
Package Title: @module-federation/error-codes (2.
|
|
3563
|
+
Package Title: @module-federation/error-codes (2.6.0)
|
|
3564
3564
|
|
|
3565
|
-
Package Locator: npm+@module-federation/error-codes$2.
|
|
3565
|
+
Package Locator: npm+@module-federation/error-codes$2.6.0
|
|
3566
3566
|
|
|
3567
3567
|
Package Depth: Transitive
|
|
3568
3568
|
--------------------------------------------------------------------------------
|
|
@@ -3572,9 +3572,9 @@ MIT
|
|
|
3572
3572
|
|
|
3573
3573
|
|
|
3574
3574
|
--------------------------------------------------------------------------------
|
|
3575
|
-
Package Title: @module-federation/runtime (2.
|
|
3575
|
+
Package Title: @module-federation/runtime (2.6.0)
|
|
3576
3576
|
|
|
3577
|
-
Package Locator: npm+@module-federation/runtime$2.
|
|
3577
|
+
Package Locator: npm+@module-federation/runtime$2.6.0
|
|
3578
3578
|
|
|
3579
3579
|
Package Depth: Direct
|
|
3580
3580
|
--------------------------------------------------------------------------------
|
|
@@ -3584,9 +3584,9 @@ MIT
|
|
|
3584
3584
|
|
|
3585
3585
|
|
|
3586
3586
|
--------------------------------------------------------------------------------
|
|
3587
|
-
Package Title: @module-federation/runtime-core (2.
|
|
3587
|
+
Package Title: @module-federation/runtime-core (2.6.0)
|
|
3588
3588
|
|
|
3589
|
-
Package Locator: npm+@module-federation/runtime-core$2.
|
|
3589
|
+
Package Locator: npm+@module-federation/runtime-core$2.6.0
|
|
3590
3590
|
|
|
3591
3591
|
Package Depth: Transitive
|
|
3592
3592
|
--------------------------------------------------------------------------------
|
|
@@ -3596,9 +3596,9 @@ MIT
|
|
|
3596
3596
|
|
|
3597
3597
|
|
|
3598
3598
|
--------------------------------------------------------------------------------
|
|
3599
|
-
Package Title: @module-federation/sdk (2.
|
|
3599
|
+
Package Title: @module-federation/sdk (2.6.0)
|
|
3600
3600
|
|
|
3601
|
-
Package Locator: npm+@module-federation/sdk$2.
|
|
3601
|
+
Package Locator: npm+@module-federation/sdk$2.6.0
|
|
3602
3602
|
|
|
3603
3603
|
Package Depth: Transitive
|
|
3604
3604
|
--------------------------------------------------------------------------------
|
|
@@ -29272,4 +29272,4 @@ POSSIBILITY OF SUCH DAMAGE.
|
|
|
29272
29272
|
--------------------------------------------------------------------------------
|
|
29273
29273
|
--------------------------------------------------------------------------------
|
|
29274
29274
|
|
|
29275
|
-
Report Generated by FOSSA on 2026-7-
|
|
29275
|
+
Report Generated by FOSSA on 2026-7-8
|
package/esm/sdk-ui-ext.d.ts
CHANGED
|
@@ -1587,6 +1587,14 @@ export declare interface IObjectShareControllerState {
|
|
|
1587
1587
|
transferTargetIsOwner: boolean;
|
|
1588
1588
|
/** Whether the transfer write (or self-removal) is in flight. */
|
|
1589
1589
|
transferSaving: boolean;
|
|
1590
|
+
/**
|
|
1591
|
+
* Whether the signed-in user may transfer ownership (owner-only). Consumers hide
|
|
1592
|
+
* the transfer affordance when false — e.g. for a View&Share (SHARE) user.
|
|
1593
|
+
* Detects a direct EDIT grant only (ownership inherited via a user group is not
|
|
1594
|
+
* recognized) and gates the affordance, not the actions — the transfer write
|
|
1595
|
+
* stays callable and the backend remains the authority.
|
|
1596
|
+
*/
|
|
1597
|
+
canTransferOwnership: boolean;
|
|
1590
1598
|
}
|
|
1591
1599
|
|
|
1592
1600
|
/**
|
|
@@ -1813,6 +1821,8 @@ export declare interface IUseObjectShareOptions {
|
|
|
1813
1821
|
* controls would reconcile against an empty set and orphan real per-label grants.
|
|
1814
1822
|
*/
|
|
1815
1823
|
labelsLoading?: boolean;
|
|
1824
|
+
/** Whether the share dialog is open; a summary-only consumer leaves it false. */
|
|
1825
|
+
isOpen?: boolean;
|
|
1816
1826
|
}
|
|
1817
1827
|
|
|
1818
1828
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ObjectShareDialog.d.ts","sourceRoot":"","sources":["../../src/share/ObjectShareDialog.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AAW1E,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAC/E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAQpD;;;;GAIG;AACH,MAAM,WAAW,uBAAuB;IACpC,gDAAgD;IAChD,MAAM,EAAE,wBAAwB,GAAG,SAAS,CAAC;IAC7C,wEAAwE;IACxE,WAAW,EAAE,MAAM,CAAC;IACpB,0DAA0D;IAC1D,MAAM,EAAE,OAAO,CAAC;IAChB,sFAAsF;IACtF,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,4FAA0F;IAC1F,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;;;OAIG;IACH,MAAM,CAAC,EAAE,iBAAiB,EAAE,CAAC;IAC7B;;;;;OAKG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;;;;;;OAOG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;;OAIG;IACH,UAAU,CAAC,EAAE,sBAAsB,CAAC;CACvC;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,iBAAiB,CAAC,EAC9B,MAAM,EACN,WAAW,EACX,MAAM,EACN,OAAO,EACP,OAAO,EACP,MAAM,EACN,aAAa,EACb,WAAW,EACX,UAAU,EACb,EAAE,uBAAuB,
|
|
1
|
+
{"version":3,"file":"ObjectShareDialog.d.ts","sourceRoot":"","sources":["../../src/share/ObjectShareDialog.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AAW1E,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAC/E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAQpD;;;;GAIG;AACH,MAAM,WAAW,uBAAuB;IACpC,gDAAgD;IAChD,MAAM,EAAE,wBAAwB,GAAG,SAAS,CAAC;IAC7C,wEAAwE;IACxE,WAAW,EAAE,MAAM,CAAC;IACpB,0DAA0D;IAC1D,MAAM,EAAE,OAAO,CAAC;IAChB,sFAAsF;IACtF,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,4FAA0F;IAC1F,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;;;OAIG;IACH,MAAM,CAAC,EAAE,iBAAiB,EAAE,CAAC;IAC7B;;;;;OAKG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;;;;;;OAOG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;;OAIG;IACH,UAAU,CAAC,EAAE,sBAAsB,CAAC;CACvC;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,iBAAiB,CAAC,EAC9B,MAAM,EACN,WAAW,EACX,MAAM,EACN,OAAO,EACP,OAAO,EACP,MAAM,EACN,aAAa,EACb,WAAW,EACX,UAAU,EACb,EAAE,uBAAuB,2CAuPzB"}
|
|
@@ -37,6 +37,7 @@ export function ObjectShareDialog({ target, objectTitle, isOpen, onClose, onSave
|
|
|
37
37
|
labels,
|
|
38
38
|
labelsError,
|
|
39
39
|
labelsLoading,
|
|
40
|
+
isOpen,
|
|
40
41
|
});
|
|
41
42
|
const { state, actions } = controller ?? ownController;
|
|
42
43
|
const handleClose = useCallback(() => {
|
|
@@ -108,7 +109,10 @@ export function ObjectShareDialog({ target, objectTitle, isOpen, onClose, onSave
|
|
|
108
109
|
void actions.changePermissionLevel(g.id, level);
|
|
109
110
|
}, onRemoveAccess: () => {
|
|
110
111
|
void actions.removeGrantee(g.id);
|
|
111
|
-
},
|
|
112
|
+
},
|
|
113
|
+
// Owner-only — omitting the handler hides the menu item for
|
|
114
|
+
// users who can't transfer (e.g. View&Share).
|
|
115
|
+
onTransferOwnership: state.canTransferOwnership ? actions.openTransferOwnership : undefined })),
|
|
112
116
|
})), onAddClick: actions.openAddGrantee, isAddDisabled: isAddDisabled, generalAccess: state.generalAccess, onGeneralAccessChange: actions.requestGeneralAccessChange,
|
|
113
117
|
// Permission dropdown on the "All workspace members" row — only while
|
|
114
118
|
// workspace access is on (the rule must exist to be re-graded). No
|
|
@@ -117,6 +117,14 @@ export interface IObjectShareControllerState {
|
|
|
117
117
|
transferTargetIsOwner: boolean;
|
|
118
118
|
/** Whether the transfer write (or self-removal) is in flight. */
|
|
119
119
|
transferSaving: boolean;
|
|
120
|
+
/**
|
|
121
|
+
* Whether the signed-in user may transfer ownership (owner-only). Consumers hide
|
|
122
|
+
* the transfer affordance when false — e.g. for a View&Share (SHARE) user.
|
|
123
|
+
* Detects a direct EDIT grant only (ownership inherited via a user group is not
|
|
124
|
+
* recognized) and gates the affordance, not the actions — the transfer write
|
|
125
|
+
* stays callable and the backend remains the authority.
|
|
126
|
+
*/
|
|
127
|
+
canTransferOwnership: boolean;
|
|
120
128
|
}
|
|
121
129
|
/**
|
|
122
130
|
* @internal
|
|
@@ -216,5 +224,7 @@ export interface IUseObjectShareOptions {
|
|
|
216
224
|
* controls would reconcile against an empty set and orphan real per-label grants.
|
|
217
225
|
*/
|
|
218
226
|
labelsLoading?: boolean;
|
|
227
|
+
/** Whether the share dialog is open; a summary-only consumer leaves it false. */
|
|
228
|
+
isOpen?: boolean;
|
|
219
229
|
}
|
|
220
230
|
//# sourceMappingURL=objectShareController.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"objectShareController.types.d.ts","sourceRoot":"","sources":["../../src/share/objectShareController.types.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,wBAAwB,EAAE,M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CAAC;IAC5B;;;;;OAKG;IACH,cAAc,EAAE,OAAO,CAAC;IACxB;;;;OAIG;IACH,yBAAyB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;IAEpD,mEAAiE;IACjE,oBAAoB,CAAC,EAAE,kBAAkB,CAAC;IAC1C,qEAAqE;IACrE,eAAe,EAAE,gBAAgB,EAAE,CAAC;IAEpC;;;;OAIG;IACH,cAAc,EAAE,qBAAqB,GAAG,SAAS,CAAC;IAClD;;;;OAIG;IACH,sBAAsB,EAAE,OAAO,CAAC;IAChC;;;;OAIG;IACH,qBAAqB,EAAE,OAAO,CAAC;IAC/B,iEAAiE;IACjE,cAAc,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"objectShareController.types.d.ts","sourceRoot":"","sources":["../../src/share/objectShareController.types.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC5E,OAAO,KAAK,EACR,kBAAkB,EAClB,qBAAqB,EACrB,sBAAsB,EACtB,gBAAgB,EACnB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,KAAK,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAE1E;;;;;;;;GAQG;AACH,MAAM,MAAM,0BAA0B,GAAG,wBAAwB,CAAC;AAElE;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IAChC,kFAAkF;IAClF,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,0BAA0B,CAAC;IAClC;;;;;OAKG;IACH,mBAAmB,CAAC,EAAE,0BAA0B,CAAC;IACjD;;;;OAIG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;;;OAIG;IACH,O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OAAO,CAAC,IAAI,CAAC,CAAC;CACjD;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACnC,KAAK,EAAE,2BAA2B,CAAC;IACnC,OAAO,EAAE,6BAA6B,CAAC;CAC1C;AAED;;;;GAIG;AACH,MAAM,WAAW,sBAAsB;IACnC;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;;OAGG;IACH,MAAM,CAAC,EAAE,iBAAiB,EAAE,CAAC;IAC7B;;;;;;OAMG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;;;OAKG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,iFAAiF;IACjF,MAAM,CAAC,EAAE,OAAO,CAAC;CACpB"}
|
|
@@ -46,10 +46,21 @@ export interface IAccessList {
|
|
|
46
46
|
* The current user's ref, resolved on demand (and cached). Used by the
|
|
47
47
|
* transfer-ownership flow to write the current user's own grant change. The
|
|
48
48
|
* add-grantee *picker* excludes the current user, but `getAccessList` does
|
|
49
|
-
* not, so a self grant can still appear as a row.
|
|
50
|
-
*
|
|
49
|
+
* not, so a self grant can still appear as a row. Always an idRef in the
|
|
50
|
+
* access list's id space, so it is comparable to grantee refs. Rejects if
|
|
51
|
+
* the profile can't be read.
|
|
51
52
|
*/
|
|
52
53
|
getCurrentUserRef: () => Promise<ObjRef>;
|
|
54
|
+
/**
|
|
55
|
+
* Whether the signed-in user owns the object (holds a direct EDIT grant) — the
|
|
56
|
+
* gate for the owner-only transfer-ownership action. Resolved eagerly so the
|
|
57
|
+
* affordance is correct at render time; false until the current user resolves.
|
|
58
|
+
* Detects direct grants only: ownership held via a user group is not recognized
|
|
59
|
+
* (the row model drops inherited EDIT, and whether the access list surfaces a
|
|
60
|
+
* self row for group-only members is an open API question). Affordance-only by
|
|
61
|
+
* design — the transfer actions are never blocked on it, the backend decides.
|
|
62
|
+
*/
|
|
63
|
+
canTransferOwnership: boolean;
|
|
53
64
|
/** Resolve a grantee id back to the picker's original ObjRef (preserves Uri vs Id ref). */
|
|
54
65
|
refForId: (id: string) => ObjRef;
|
|
55
66
|
/** Write through a local grantee-row change (insert / level / remove); rolled back by the caller. */
|
|
@@ -79,5 +90,5 @@ export interface IAccessList {
|
|
|
79
90
|
*
|
|
80
91
|
* @internal
|
|
81
92
|
*/
|
|
82
|
-
export declare function useAccessList(target: IObjectPermissionsObject | undefined, onSaved: (() => void) | undefined): IAccessList;
|
|
93
|
+
export declare function useAccessList(target: IObjectPermissionsObject | undefined, onSaved: (() => void) | undefined, dialogOpen: boolean): IAccessList;
|
|
83
94
|
//# sourceMappingURL=useAccessList.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAccessList.d.ts","sourceRoot":"","sources":["../../src/share/useAccessList.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AAC1E,OAAO,EAEH,KAAK,sBAAsB,EAC3B,KAAK,MAAM,
|
|
1
|
+
{"version":3,"file":"useAccessList.d.ts","sourceRoot":"","sources":["../../src/share/useAccessList.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AAC1E,OAAO,EAEH,KAAK,sBAAsB,EAC3B,KAAK,MAAM,EAGd,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,KAAK,kBAAkB,EAAE,KAAK,sBAAsB,EAAmB,MAAM,sBAAsB,CAAC;AAW7G,OAAO,KAAK,EAAE,2BAA2B,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACzG,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAEvD;;;;GAIG;AACH,MAAM,WAAW,WAAW;IACxB,iFAAiF;IACjF,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,wFAAwF;IACxF,OAAO,EAAE,OAAO,CAAC;IACjB,iGAA+F;IAC/F,QAAQ,EAAE,mBA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CAAC,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;CAC/E;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,aAAa,CACzB,MAAM,EAAE,wBAAwB,GAAG,SAAS,EAC5C,OAAO,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,SAAS,EACjC,UAAU,EAAE,OAAO,GACpB,WAAW,CAwTb"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// (C) 2026 GoodData Corporation
|
|
2
2
|
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
3
|
-
import { objRefToString, } from "@gooddata/sdk-model";
|
|
3
|
+
import { idRef, objRefToString, } from "@gooddata/sdk-model";
|
|
4
4
|
import { useBackendStrict, useCancelablePromise, useWorkspaceStrict } from "@gooddata/sdk-ui";
|
|
5
5
|
import { useToastMessage } from "@gooddata/sdk-ui-kit";
|
|
6
6
|
import { isPermissionsNotAvailable } from "./accessErrors.js";
|
|
@@ -22,7 +22,7 @@ import { assigneeMatchesQuery, granteeId, granteeNameUnresolved, granteesFromAcc
|
|
|
22
22
|
*
|
|
23
23
|
* @internal
|
|
24
24
|
*/
|
|
25
|
-
export function useAccessList(target, onSaved) {
|
|
25
|
+
export function useAccessList(target, onSaved, dialogOpen) {
|
|
26
26
|
const backend = useBackendStrict();
|
|
27
27
|
const workspace = useWorkspaceStrict();
|
|
28
28
|
const toast = useToastMessage();
|
|
@@ -243,7 +243,11 @@ export function useAccessList(target, onSaved) {
|
|
|
243
243
|
currentUserRefCache.current = backend
|
|
244
244
|
.currentUser()
|
|
245
245
|
.getUser()
|
|
246
|
-
|
|
246
|
+
// Not `user.ref`: the profile resolves it as a uriRef while access-list
|
|
247
|
+
// grantee refs are idRefs keyed by user id (= profile login), and
|
|
248
|
+
// areObjRefsEqual never matches mixed shapes — self-row matching and
|
|
249
|
+
// the self grant write need the permission API's id space.
|
|
250
|
+
.then((user) => idRef(user.login))
|
|
247
251
|
.catch((error) => {
|
|
248
252
|
// Don't cache a rejected promise, or a transient profile-read
|
|
249
253
|
// failure would make every later transfer fail immediately.
|
|
@@ -253,6 +257,17 @@ export function useAccessList(target, onSaved) {
|
|
|
253
257
|
}
|
|
254
258
|
return currentUserRefCache.current;
|
|
255
259
|
}, [backend]);
|
|
260
|
+
// Resolve the current user only while the dialog is open — keeps the summary-only
|
|
261
|
+
// path free of a profile request (the transfer gate it feeds isn't shown there).
|
|
262
|
+
const { result: currentUserRef } = useCancelablePromise({
|
|
263
|
+
promise: dialogOpen && targetKey ? () => getCurrentUserRef() : undefined,
|
|
264
|
+
onError: () => { },
|
|
265
|
+
},
|
|
266
|
+
// Key on target presence, not identity — the resolved user is
|
|
267
|
+
// target-independent, so a target switch must not reset it.
|
|
268
|
+
[getCurrentUserRef, targetKey !== undefined, dialogOpen]);
|
|
269
|
+
const selfId = currentUserRef ? granteeId("user", currentUserRef) : undefined;
|
|
270
|
+
const canTransferOwnership = selfId !== undefined && namedGrantees.some((g) => g.id === selfId && g.level === "EDIT");
|
|
256
271
|
return {
|
|
257
272
|
targetKey,
|
|
258
273
|
hasList,
|
|
@@ -267,6 +282,7 @@ export function useAccessList(target, onSaved) {
|
|
|
267
282
|
loadOptions,
|
|
268
283
|
refForId,
|
|
269
284
|
getCurrentUserRef,
|
|
285
|
+
canTransferOwnership,
|
|
270
286
|
setGrantees,
|
|
271
287
|
setGeneralAccess,
|
|
272
288
|
setWorkspaceLevel,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useObjectShareController.d.ts","sourceRoot":"","sources":["../../src/share/useObjectShareController.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AAkB1E,OAAO,EACH,KAAK,sBAAsB,EAI3B,KAAK,sBAAsB,EAE9B,MAAM,kCAAkC,CAAC;AAI1C;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,wBAAwB,CACpC,MAAM,EAAE,wBAAwB,GAAG,SAAS,EAC5C,OAAO,CAAC,EAAE,sBAAsB,GACjC,sBAAsB,
|
|
1
|
+
{"version":3,"file":"useObjectShareController.d.ts","sourceRoot":"","sources":["../../src/share/useObjectShareController.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AAkB1E,OAAO,EACH,KAAK,sBAAsB,EAI3B,KAAK,sBAAsB,EAE9B,MAAM,kCAAkC,CAAC;AAI1C;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,wBAAwB,CACpC,MAAM,EAAE,wBAAwB,GAAG,SAAS,EAC5C,OAAO,CAAC,EAAE,sBAAsB,GACjC,sBAAsB,CAizBxB"}
|
|
@@ -30,7 +30,7 @@ import { useLabelScope } from "./useLabelScope.js";
|
|
|
30
30
|
* @internal
|
|
31
31
|
*/
|
|
32
32
|
export function useObjectShareController(target, options) {
|
|
33
|
-
const { onSaved, labels = NO_LABELS, labelsError = false, labelsLoading = false } = options ?? {};
|
|
33
|
+
const { onSaved, labels = NO_LABELS, labelsError = false, labelsLoading = false, isOpen = false, } = options ?? {};
|
|
34
34
|
const toast = useToastMessage();
|
|
35
35
|
// UI-local buffers — never backend data.
|
|
36
36
|
const [subview, setSubview] = useState("main");
|
|
@@ -47,7 +47,7 @@ export function useObjectShareController(target, options) {
|
|
|
47
47
|
const [workspaceLevelSaving, setWorkspaceLevelSaving] = useState(false);
|
|
48
48
|
// The backend access list, seeded into local state (rows, general access,
|
|
49
49
|
// summary, the commit/picker primitives) lives in its own hook.
|
|
50
|
-
const { targetKey, hasList, grantees, generalAccess, workspaceLevel, summary, status, loadError, accessUnavailable, commit, loadOptions, refForId, getCurrentUserRef, setGrantees, setGeneralAccess, setWorkspaceLevel, setKnownNames, } = useAccessList(target, onSaved);
|
|
50
|
+
const { targetKey, hasList, grantees, generalAccess, workspaceLevel, summary, status, loadError, accessUnavailable, commit, loadOptions, refForId, getCurrentUserRef, canTransferOwnership, setGrantees, setGeneralAccess, setWorkspaceLevel, setKnownNames, } = useAccessList(target, onSaved, isOpen);
|
|
51
51
|
// Always-current target key, read inside async mutation finalizers that captured
|
|
52
52
|
// an older one. A write started for object A resolves after the user navigated to
|
|
53
53
|
// object B; because local state is authoritative (no refetch), applying A's
|
|
@@ -665,6 +665,7 @@ export function useObjectShareController(target, options) {
|
|
|
665
665
|
transferAlsoRemoveSelf,
|
|
666
666
|
transferTargetIsOwner,
|
|
667
667
|
transferSaving,
|
|
668
|
+
canTransferOwnership,
|
|
668
669
|
}), [
|
|
669
670
|
subview,
|
|
670
671
|
status,
|
|
@@ -684,6 +685,7 @@ export function useObjectShareController(target, options) {
|
|
|
684
685
|
transferAlsoRemoveSelf,
|
|
685
686
|
transferTargetIsOwner,
|
|
686
687
|
transferSaving,
|
|
688
|
+
canTransferOwnership,
|
|
687
689
|
]);
|
|
688
690
|
return useMemo(() => ({ state, actions }), [state, actions]);
|
|
689
691
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gooddata/sdk-ui-ext",
|
|
3
|
-
"version": "11.46.0
|
|
3
|
+
"version": "11.46.0",
|
|
4
4
|
"description": "GoodData.UI SDK - Extensions",
|
|
5
5
|
"license": "LicenseRef-LICENSE",
|
|
6
6
|
"author": "GoodData Corporation",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@codemirror/commands": "6.10.1",
|
|
40
|
-
"@codemirror/lang-yaml": "6.1.
|
|
40
|
+
"@codemirror/lang-yaml": "6.1.3",
|
|
41
41
|
"@codemirror/language": "6.12.1",
|
|
42
42
|
"@codemirror/lint": "6.9.2",
|
|
43
43
|
"@codemirror/state": "6.5.3",
|
|
@@ -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-
|
|
71
|
-
"@gooddata/sdk-ui-charts": "11.46.0
|
|
72
|
-
"@gooddata/sdk-ui-filters": "11.46.0
|
|
73
|
-
"@gooddata/sdk-ui-geo": "11.46.0
|
|
74
|
-
"@gooddata/sdk-ui-kit": "11.46.0
|
|
75
|
-
"@gooddata/sdk-ui-pivot": "11.46.0
|
|
76
|
-
"@gooddata/sdk-ui-semantic-search": "11.46.0
|
|
77
|
-
"@gooddata/sdk-ui-
|
|
78
|
-
"@gooddata/
|
|
79
|
-
"@gooddata/
|
|
66
|
+
"@gooddata/sdk-backend-spi": "11.46.0",
|
|
67
|
+
"@gooddata/sdk-embedding": "11.46.0",
|
|
68
|
+
"@gooddata/sdk-backend-base": "11.46.0",
|
|
69
|
+
"@gooddata/sdk-ui": "11.46.0",
|
|
70
|
+
"@gooddata/sdk-model": "11.46.0",
|
|
71
|
+
"@gooddata/sdk-ui-charts": "11.46.0",
|
|
72
|
+
"@gooddata/sdk-ui-filters": "11.46.0",
|
|
73
|
+
"@gooddata/sdk-ui-geo": "11.46.0",
|
|
74
|
+
"@gooddata/sdk-ui-kit": "11.46.0",
|
|
75
|
+
"@gooddata/sdk-ui-pivot": "11.46.0",
|
|
76
|
+
"@gooddata/sdk-ui-semantic-search": "11.46.0",
|
|
77
|
+
"@gooddata/sdk-ui-vis-commons": "11.46.0",
|
|
78
|
+
"@gooddata/sdk-ui-theme-provider": "11.46.0",
|
|
79
|
+
"@gooddata/util": "11.46.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.46.0
|
|
128
|
-
"@gooddata/i18n-toolkit": "11.46.0
|
|
129
|
-
"@gooddata/oxlint-config": "11.46.0
|
|
130
|
-
"@gooddata/
|
|
131
|
-
"@gooddata/
|
|
132
|
-
"@gooddata/
|
|
127
|
+
"@gooddata/eslint-config": "11.46.0",
|
|
128
|
+
"@gooddata/i18n-toolkit": "11.46.0",
|
|
129
|
+
"@gooddata/oxlint-config": "11.46.0",
|
|
130
|
+
"@gooddata/reference-workspace": "11.46.0",
|
|
131
|
+
"@gooddata/sdk-backend-mockingbird": "11.46.0",
|
|
132
|
+
"@gooddata/stylelint-config": "11.46.0"
|
|
133
133
|
},
|
|
134
134
|
"peerDependencies": {
|
|
135
135
|
"react": "^18.0.0 || ^19.0.0",
|