@gooddata/sdk-ui-ext 11.43.0-alpha.3 → 11.43.0-alpha.5

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 (99) hide show
  1. package/NOTICE +641 -841
  2. package/esm/index.d.ts +2 -2
  3. package/esm/index.d.ts.map +1 -1
  4. package/esm/index.js +1 -1
  5. package/esm/internal/translations/de-DE.localization-bundle.d.ts +42 -0
  6. package/esm/internal/translations/de-DE.localization-bundle.d.ts.map +1 -1
  7. package/esm/internal/translations/de-DE.localization-bundle.js +43 -1
  8. package/esm/internal/translations/en-AU.localization-bundle.d.ts +42 -0
  9. package/esm/internal/translations/en-AU.localization-bundle.d.ts.map +1 -1
  10. package/esm/internal/translations/en-AU.localization-bundle.js +44 -2
  11. package/esm/internal/translations/en-GB.localization-bundle.d.ts +42 -0
  12. package/esm/internal/translations/en-GB.localization-bundle.d.ts.map +1 -1
  13. package/esm/internal/translations/en-GB.localization-bundle.js +44 -2
  14. package/esm/internal/translations/es-419.localization-bundle.d.ts +42 -0
  15. package/esm/internal/translations/es-419.localization-bundle.d.ts.map +1 -1
  16. package/esm/internal/translations/es-419.localization-bundle.js +44 -2
  17. package/esm/internal/translations/es-ES.localization-bundle.d.ts +42 -0
  18. package/esm/internal/translations/es-ES.localization-bundle.d.ts.map +1 -1
  19. package/esm/internal/translations/es-ES.localization-bundle.js +44 -2
  20. package/esm/internal/translations/fi-FI.localization-bundle.d.ts +42 -0
  21. package/esm/internal/translations/fi-FI.localization-bundle.d.ts.map +1 -1
  22. package/esm/internal/translations/fi-FI.localization-bundle.js +43 -1
  23. package/esm/internal/translations/fr-CA.localization-bundle.d.ts +42 -0
  24. package/esm/internal/translations/fr-CA.localization-bundle.d.ts.map +1 -1
  25. package/esm/internal/translations/fr-CA.localization-bundle.js +43 -1
  26. package/esm/internal/translations/fr-FR.localization-bundle.d.ts +42 -0
  27. package/esm/internal/translations/fr-FR.localization-bundle.d.ts.map +1 -1
  28. package/esm/internal/translations/fr-FR.localization-bundle.js +43 -1
  29. package/esm/internal/translations/id-ID.localization-bundle.d.ts +42 -0
  30. package/esm/internal/translations/id-ID.localization-bundle.d.ts.map +1 -1
  31. package/esm/internal/translations/id-ID.localization-bundle.js +43 -1
  32. package/esm/internal/translations/it-IT.localization-bundle.d.ts +42 -0
  33. package/esm/internal/translations/it-IT.localization-bundle.d.ts.map +1 -1
  34. package/esm/internal/translations/it-IT.localization-bundle.js +43 -1
  35. package/esm/internal/translations/ja-JP.localization-bundle.d.ts +42 -0
  36. package/esm/internal/translations/ja-JP.localization-bundle.d.ts.map +1 -1
  37. package/esm/internal/translations/ja-JP.localization-bundle.js +43 -1
  38. package/esm/internal/translations/ko-KR.localization-bundle.d.ts +42 -0
  39. package/esm/internal/translations/ko-KR.localization-bundle.d.ts.map +1 -1
  40. package/esm/internal/translations/ko-KR.localization-bundle.js +43 -1
  41. package/esm/internal/translations/nl-NL.localization-bundle.d.ts +42 -0
  42. package/esm/internal/translations/nl-NL.localization-bundle.d.ts.map +1 -1
  43. package/esm/internal/translations/nl-NL.localization-bundle.js +43 -1
  44. package/esm/internal/translations/pl-PL.localization-bundle.d.ts +42 -0
  45. package/esm/internal/translations/pl-PL.localization-bundle.d.ts.map +1 -1
  46. package/esm/internal/translations/pl-PL.localization-bundle.js +43 -1
  47. package/esm/internal/translations/pt-BR.localization-bundle.d.ts +42 -0
  48. package/esm/internal/translations/pt-BR.localization-bundle.d.ts.map +1 -1
  49. package/esm/internal/translations/pt-BR.localization-bundle.js +43 -1
  50. package/esm/internal/translations/pt-PT.localization-bundle.d.ts +42 -0
  51. package/esm/internal/translations/pt-PT.localization-bundle.d.ts.map +1 -1
  52. package/esm/internal/translations/pt-PT.localization-bundle.js +43 -1
  53. package/esm/internal/translations/ru-RU.localization-bundle.d.ts +42 -0
  54. package/esm/internal/translations/ru-RU.localization-bundle.d.ts.map +1 -1
  55. package/esm/internal/translations/ru-RU.localization-bundle.js +43 -1
  56. package/esm/internal/translations/sl-SI.localization-bundle.d.ts +42 -0
  57. package/esm/internal/translations/sl-SI.localization-bundle.d.ts.map +1 -1
  58. package/esm/internal/translations/sl-SI.localization-bundle.js +43 -1
  59. package/esm/internal/translations/th-TH.localization-bundle.d.ts +42 -0
  60. package/esm/internal/translations/th-TH.localization-bundle.d.ts.map +1 -1
  61. package/esm/internal/translations/th-TH.localization-bundle.js +43 -1
  62. package/esm/internal/translations/tr-TR.localization-bundle.d.ts +42 -0
  63. package/esm/internal/translations/tr-TR.localization-bundle.d.ts.map +1 -1
  64. package/esm/internal/translations/tr-TR.localization-bundle.js +43 -1
  65. package/esm/internal/translations/uk-UA.localization-bundle.d.ts +42 -0
  66. package/esm/internal/translations/uk-UA.localization-bundle.d.ts.map +1 -1
  67. package/esm/internal/translations/uk-UA.localization-bundle.js +43 -1
  68. package/esm/internal/translations/vi-VN.localization-bundle.d.ts +42 -0
  69. package/esm/internal/translations/vi-VN.localization-bundle.d.ts.map +1 -1
  70. package/esm/internal/translations/vi-VN.localization-bundle.js +43 -1
  71. package/esm/internal/translations/zh-HK.localization-bundle.d.ts +42 -0
  72. package/esm/internal/translations/zh-HK.localization-bundle.d.ts.map +1 -1
  73. package/esm/internal/translations/zh-HK.localization-bundle.js +44 -2
  74. package/esm/internal/translations/zh-Hans.localization-bundle.d.ts +42 -0
  75. package/esm/internal/translations/zh-Hans.localization-bundle.d.ts.map +1 -1
  76. package/esm/internal/translations/zh-Hans.localization-bundle.js +43 -1
  77. package/esm/internal/translations/zh-Hant.localization-bundle.d.ts +42 -0
  78. package/esm/internal/translations/zh-Hant.localization-bundle.d.ts.map +1 -1
  79. package/esm/internal/translations/zh-Hant.localization-bundle.js +45 -3
  80. package/esm/sdk-ui-ext.d.ts +31 -10
  81. package/esm/share/ObjectShareDialog.js +2 -2
  82. package/esm/share/objectShareController.helpers.d.ts +1 -27
  83. package/esm/share/objectShareController.helpers.d.ts.map +1 -1
  84. package/esm/share/objectShareController.helpers.js +25 -48
  85. package/esm/share/objectShareController.types.d.ts +46 -4
  86. package/esm/share/objectShareController.types.d.ts.map +1 -1
  87. package/esm/share/useAccessList.d.ts +31 -18
  88. package/esm/share/useAccessList.d.ts.map +1 -1
  89. package/esm/share/useAccessList.js +85 -133
  90. package/esm/share/useLabelScope.d.ts +6 -8
  91. package/esm/share/useLabelScope.d.ts.map +1 -1
  92. package/esm/share/useLabelScope.js +34 -28
  93. package/esm/share/useObjectShareController.d.ts +19 -16
  94. package/esm/share/useObjectShareController.d.ts.map +1 -1
  95. package/esm/share/useObjectShareController.js +212 -119
  96. package/package.json +21 -22
  97. package/esm/share/useObjectShare.d.ts +0 -50
  98. package/esm/share/useObjectShare.d.ts.map +0 -1
  99. package/esm/share/useObjectShare.js +0 -17
@@ -1,6 +1,4 @@
1
- import { type MutableRefObject } from "react";
2
1
  import { type IObjectPermissionsObject } from "@gooddata/sdk-backend-spi";
3
- import type { IObjectAccessList } from "@gooddata/sdk-model";
4
2
  import { type LabelScopePrincipal } from "./objectShareController.helpers.js";
5
3
  import type { IObjectShareLabel } from "./types.js";
6
4
  /**
@@ -30,11 +28,6 @@ export interface ILabelScope {
30
28
  /** Per-grantee label scope: grantee id → label ids in scope (primary always in). */
31
29
  selectedLabelIdsByGrantee: Record<string, string[]>;
32
30
  setSelectedLabelIdsByGrantee: React.Dispatch<React.SetStateAction<Record<string, string[]>>>;
33
- /**
34
- * Grantee ids whose scope was just written optimistically; the resolution
35
- * effect keeps these instead of overwriting them through read-after-write lag.
36
- */
37
- optimisticScopeRef: MutableRefObject<Set<string>>;
38
31
  /**
39
32
  * The single per-label write path. Diffs `desired` vs `current` over the
40
33
  * permissionable labels and grants/revokes for one principal. Returns false
@@ -48,7 +41,12 @@ export interface ILabelScope {
48
41
  * which labels are permissionable, and exposes one reconcile primitive shared by
49
42
  * add / remove / general-access / the labels picker so their behavior can't drift.
50
43
  *
44
+ * The resolved scope is local-authoritative: the probe seeds a scope only for
45
+ * grantees it doesn't already know, so an optimistic scope written for a freshly
46
+ * added grantee is never overwritten by the backend's lagging read. Local scopes
47
+ * are dropped on a target switch so the next object re-resolves from scratch.
48
+ *
51
49
  * @internal
52
50
  */
53
- export declare function useLabelScope(target: IObjectPermissionsObject | undefined, targetKey: string | undefined, labels: IObjectShareLabel[], currentAccessList: IObjectAccessList | undefined, granteeIdsKey: string, labelsError: boolean, labelsLoading: boolean): ILabelScope;
51
+ export declare function useLabelScope(target: IObjectPermissionsObject | undefined, targetKey: string | undefined, labels: IObjectShareLabel[], hasList: boolean, committedGranteeIds: string[], labelsError: boolean, labelsLoading: boolean): ILabelScope;
54
52
  //# sourceMappingURL=useLabelScope.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useLabelScope.d.ts","sourceRoot":"","sources":["../../src/share/useLabelScope.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,gBAAgB,EAAqD,MAAM,OAAO,CAAC;AAEjG,OAAO,EAAE,KAAK,wBAAwB,EAA6B,MAAM,2BAA2B,CAAC;AACrG,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAG7D,OAAO,EACH,KAAK,mBAAmB,EAI3B,MAAM,oCAAoC,CAAC;AAC5C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAWpD;;;;;;GAMG;AACH,MAAM,WAAW,WAAW;IACxB;;;;OAIG;IACH,eAAe,EAAE,iBAAiB,EAAE,CAAC;IACrC;;;;;;;;OAQG;IACH,cAAc,EAAE,OAAO,CAAC;IACxB,sFAAoF;IACpF,yBAAyB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;IACpD,4BAA4B,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC;IAC7F;;;OAGG;IACH,kBAAkB,EAAE,gBAAgB,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC;IAClD;;;;OAIG;IACH,mBAAmB,EAAE,CACjB,SAAS,EAAE,mBAAmB,EAC9B,eAAe,EAAE,WAAW,CAAC,MAAM,CAAC,EACpC,eAAe,EAAE,WAAW,CAAC,MAAM,CAAC,KACnC,OAAO,CAAC,OAAO,CAAC,CAAC;CACzB;AAED;;;;;;;GAOG;AACH,wBAAgB,aAAa,CACzB,MAAM,EAAE,wBAAwB,GAAG,SAAS,EAC5C,SAAS,EAAE,MAAM,GAAG,SAAS,EAC7B,MAAM,EAAE,iBAAiB,EAAE,EAC3B,iBAAiB,EAAE,iBAAiB,GAAG,SAAS,EAChD,aAAa,EAAE,MAAM,EACrB,WAAW,EAAE,OAAO,EACpB,aAAa,EAAE,OAAO,GACvB,WAAW,CAoKb"}
1
+ {"version":3,"file":"useLabelScope.d.ts","sourceRoot":"","sources":["../../src/share/useLabelScope.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,wBAAwB,EAA6B,MAAM,2BAA2B,CAAC;AAGrG,OAAO,EACH,KAAK,mBAAmB,EAG3B,MAAM,oCAAoC,CAAC;AAC5C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAWpD;;;;;;GAMG;AACH,MAAM,WAAW,WAAW;IACxB;;;;OAIG;IACH,eAAe,EAAE,iBAAiB,EAAE,CAAC;IACrC;;;;;;;;OAQG;IACH,cAAc,EAAE,OAAO,CAAC;IACxB,sFAAoF;IACpF,yBAAyB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;IACpD,4BAA4B,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC;IAC7F;;;;OAIG;IACH,mBAAmB,EAAE,CACjB,SAAS,EAAE,mBAAmB,EAC9B,eAAe,EAAE,WAAW,CAAC,MAAM,CAAC,EACpC,eAAe,EAAE,WAAW,CAAC,MAAM,CAAC,KACnC,OAAO,CAAC,OAAO,CAAC,CAAC;CACzB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,aAAa,CACzB,MAAM,EAAE,wBAAwB,GAAG,SAAS,EAC5C,SAAS,EAAE,MAAM,GAAG,SAAS,EAC7B,MAAM,EAAE,iBAAiB,EAAE,EAC3B,OAAO,EAAE,OAAO,EAChB,mBAAmB,EAAE,MAAM,EAAE,EAC7B,WAAW,EAAE,OAAO,EACpB,aAAa,EAAE,OAAO,GACvB,WAAW,CAsKb"}
@@ -1,8 +1,8 @@
1
1
  // (C) 2026 GoodData Corporation
2
- import { useCallback, useEffect, useMemo, useRef, useState } from "react";
2
+ import { useCallback, useEffect, useMemo, useState } from "react";
3
3
  import { isUnexpectedResponseError } from "@gooddata/sdk-backend-spi";
4
4
  import { useBackendStrict, useWorkspaceStrict } from "@gooddata/sdk-ui";
5
- import { buildLabelMutations, granteesFromAccessList, isGranteeGrantedIn, } from "./objectShareController.helpers.js";
5
+ import { buildLabelMutations, isGranteeGrantedIn, } from "./objectShareController.helpers.js";
6
6
  /**
7
7
  * Whether a label's access-list error means the label is genuinely not
8
8
  * independently permissionable (a definitive 404 / 501), as opposed to a
@@ -17,13 +17,17 @@ function isNotPermissionable(error) {
17
17
  * which labels are permissionable, and exposes one reconcile primitive shared by
18
18
  * add / remove / general-access / the labels picker so their behavior can't drift.
19
19
  *
20
+ * The resolved scope is local-authoritative: the probe seeds a scope only for
21
+ * grantees it doesn't already know, so an optimistic scope written for a freshly
22
+ * added grantee is never overwritten by the backend's lagging read. Local scopes
23
+ * are dropped on a target switch so the next object re-resolves from scratch.
24
+ *
20
25
  * @internal
21
26
  */
22
- export function useLabelScope(target, targetKey, labels, currentAccessList, granteeIdsKey, labelsError, labelsLoading) {
27
+ export function useLabelScope(target, targetKey, labels, hasList, committedGranteeIds, labelsError, labelsLoading) {
23
28
  const backend = useBackendStrict();
24
29
  const workspace = useWorkspaceStrict();
25
30
  const [selectedLabelIdsByGrantee, setSelectedLabelIdsByGrantee] = useState({});
26
- const optimisticScopeRef = useRef(new Set());
27
31
  // Label ids whose permissions endpoint responded — not every display form is
28
32
  // independently permissionable (some 404). `undefined` means "not resolved
29
33
  // yet" (assume all).
@@ -39,19 +43,30 @@ export function useLabelScope(target, targetKey, labels, currentAccessList, gran
39
43
  useEffect(() => {
40
44
  setPermissionableLabelIds(undefined);
41
45
  }, [targetKey, labelsKey]);
46
+ // A target switch — or a label-set change under the same target (labels finish
47
+ // loading, a label added/removed) — drops every resolved scope so the seeding
48
+ // effect below re-resolves from the current label set's per-label lists rather
49
+ // than preserving scopes computed against the old labels. Without the labelsKey
50
+ // reset, an existing grantee would keep a scope missing a newly-added label even
51
+ // when the backend grants them access to it. (An add under the SAME labels only
52
+ // changes granteeIdsKey, not labelsKey, so an optimistic scope still survives.)
53
+ useEffect(() => {
54
+ setSelectedLabelIdsByGrantee({});
55
+ }, [targetKey, labelsKey]);
56
+ // Stable string key of the committed grantee ids — the array is rebuilt each
57
+ // render, so the effect keys on this instead to re-resolve only on a real change.
58
+ const granteeIdsKey = committedGranteeIds.slice().sort().join(",");
42
59
  // Resolve each grantee's label scope: fetch every label's access list once and
43
60
  // record, per grantee, which labels they appear in (primary label always counts).
44
61
  // Keyed on the committed grantee ids + labels so it re-resolves after add/remove.
45
- // `hasAccessList` is a dep too: a list that loads with no named grantees keeps
62
+ // `hasList` is a dep too: a list that loads with no named grantees keeps
46
63
  // `granteeIdsKey` empty, so without it the effect would never run and the
47
64
  // permissionable set (404 filtering) would never resolve.
48
- const hasAccessList = currentAccessList !== undefined;
49
65
  useEffect(() => {
50
- if (!target || labels.length === 0 || !currentAccessList) {
66
+ if (!target || labels.length === 0 || !hasList) {
51
67
  return;
52
68
  }
53
69
  let cancelled = false;
54
- const committedGranteeIds = granteesFromAccessList(currentAccessList).map((g) => g.id);
55
70
  Promise.all(labels.map((label) => backend
56
71
  .workspace(workspace)
57
72
  .objectPermissions()
@@ -89,13 +104,14 @@ export function useLabelScope(target, targetKey, labels, currentAccessList, gran
89
104
  }
90
105
  }
91
106
  setSelectedLabelIdsByGrantee((prev) => {
92
- // Keep a just-written optimistic scope through read-after-write lag;
93
- // take the freshly-resolved scope for everyone else.
94
- const next = { ...resolved };
95
- for (const id of optimisticScopeRef.current) {
96
- if (prev[id]) {
97
- next[id] = prev[id];
98
- }
107
+ // Seed a scope only for grantees we don't already have one for. A
108
+ // scope written optimistically (a fresh add, a labels edit) is
109
+ // local-authoritative and must survive the re-resolution that the
110
+ // grantee-set change triggers the backend's lagging read would
111
+ // otherwise reset it. Grantees gone from the list are dropped.
112
+ const next = {};
113
+ for (const id of committedGranteeIds) {
114
+ next[id] = prev[id] ?? resolved[id];
99
115
  }
100
116
  return next;
101
117
  });
@@ -105,23 +121,14 @@ export function useLabelScope(target, targetKey, labels, currentAccessList, gran
105
121
  cancelled = true;
106
122
  };
107
123
  // eslint-disable-next-line react-hooks/exhaustive-deps
108
- }, [backend, workspace, targetKey, labelsKey, granteeIdsKey, hasAccessList]);
109
- // A label-set change OR a target switch re-resolves scopes; drop the optimistic-
110
- // scope guard so the freshly-resolved scopes aren't held stale. Keying on
111
- // labelsKey alone leaked across objects that happen to share a labelsKey (e.g.
112
- // during navigation, before the new object's labels load): the prior object's
113
- // optimistic entries would then merge over the new object's resolved scopes and
114
- // show/save the wrong label grants. targetKey makes the guard per-object.
115
- useEffect(() => {
116
- optimisticScopeRef.current = new Set();
117
- }, [labelsKey, targetKey]);
124
+ }, [backend, workspace, targetKey, labelsKey, granteeIdsKey, hasList]);
118
125
  // Only labels whose permissions endpoint responded are scope-controllable; until
119
126
  // resolution completes (permissionableLabelIds undefined) assume all are usable.
120
127
  // While the current target's list isn't loaded yet, ignore a permissionable set
121
128
  // left over from a previous object so we never mis-filter the new labels.
122
- const effectiveLabels = useMemo(() => currentAccessList && permissionableLabelIds
129
+ const effectiveLabels = useMemo(() => hasList && permissionableLabelIds
123
130
  ? labels.filter((l) => permissionableLabelIds.has(l.id))
124
- : labels, [labels, permissionableLabelIds, currentAccessList]);
131
+ : labels, [labels, permissionableLabelIds, hasList]);
125
132
  // Resolution is done when the probe has produced a permissionable set, or when
126
133
  // there are genuinely no labels to probe (a label-free object). Until then
127
134
  // callers must treat the scope as unknown (not "all selected").
@@ -154,7 +161,6 @@ export function useLabelScope(target, targetKey, labels, currentAccessList, gran
154
161
  labelsResolved,
155
162
  selectedLabelIdsByGrantee,
156
163
  setSelectedLabelIdsByGrantee,
157
- optimisticScopeRef,
158
164
  reconcileLabelScope,
159
165
  };
160
166
  }
@@ -1,24 +1,27 @@
1
1
  import type { IObjectPermissionsObject } from "@gooddata/sdk-backend-spi";
2
- import { type IObjectShareController } from "./objectShareController.types.js";
3
- import type { IObjectShareLabel } from "./types.js";
2
+ import { type IObjectShareController, type IUseObjectShareOptions } from "./objectShareController.types.js";
4
3
  /**
5
- * Manages the share dialog state and backend I/O for a single shareable
6
- * object.
4
+ * Manages the share dialog state and backend I/O for a single shareable object.
7
5
  *
8
- * The access list is fetched (and re-fetched after every save) via
9
- * `useCancelablePromise`; everything that reflects the backend the grantee
10
- * rows, general-access value, summary is derived from it on render, never
11
- * copied into local state. Local state is only the dialog's own transient UI:
12
- * the active subview, the add-grantee buffer, the pending general-access
13
- * confirm, and an in-flight save flag. Top-level open/close is the consumer's
14
- * concern (see {@link ObjectShareDialog}).
6
+ * The access list is fetched once and seeded into local state, which is the
7
+ * source of truth while the dialog/summary is mounted. Each access change is
8
+ * written through to local state immediately and sent to the backend; on failure
9
+ * the one changed entry is rolled back. There is no post-write refetch, so the
10
+ * grantee list never blanks and never fights the backend's read-after-write lag.
11
+ * Top-level open/close is the consumer's concern (see {@link ObjectShareDialog}).
15
12
  *
16
- * Mutations follow a **commit-on-interaction** model: each access change is
17
- * sent immediately; the general-access toggle goes through a confirm step
18
- * because it is high-impact. There is no batched Save. The list is fetched
19
- * eagerly so `state.summary` also drives an inline access row while closed.
13
+ * Mutations follow a **commit-on-interaction** model: each access change is sent
14
+ * immediately; the general-access toggle goes through a confirm step because it
15
+ * is high-impact. There is no batched Save. The list is fetched eagerly so
16
+ * `state.summary` also drives an inline access row while closed.
17
+ *
18
+ * Most consumers do not call this directly — render {@link ObjectShareDialog} with
19
+ * plain props and it owns its controller. Call this (exported as `useObjectShare`)
20
+ * only to share a single access-list fetch between the dialog and an inline summary
21
+ * row: call it once, read `state.summary` for the row, and pass the controller into
22
+ * the dialog.
20
23
  *
21
24
  * @internal
22
25
  */
23
- export declare function useObjectShareController(target: IObjectPermissionsObject | undefined, onSaved?: () => void, labels?: IObjectShareLabel[], labelsError?: boolean, labelsLoading?: boolean): IObjectShareController;
26
+ export declare function useObjectShareController(target: IObjectPermissionsObject | undefined, options?: IUseObjectShareOptions): IObjectShareController;
24
27
  //# sourceMappingURL=useObjectShareController.d.ts.map
@@ -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;AAW1E,OAAO,EACH,KAAK,sBAAsB,EAK9B,MAAM,kCAAkC,CAAC;AAC1C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAIpD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,wBAAwB,CACpC,MAAM,EAAE,wBAAwB,GAAG,SAAS,EAC5C,OAAO,CAAC,EAAE,MAAM,IAAI,EACpB,MAAM,GAAE,iBAAiB,EAAc,EACvC,WAAW,UAAQ,EACnB,aAAa,UAAQ,GACtB,sBAAsB,CAyZxB"}
1
+ {"version":3,"file":"useObjectShareController.d.ts","sourceRoot":"","sources":["../../src/share/useObjectShareController.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AAa1E,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,CAggBxB"}