@gooddata/sdk-ui-catalog 11.52.0-alpha.5 → 11.52.0-alpha.7

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.
@@ -1 +1 @@
1
- {"version":3,"file":"CatalogItemShareProvider.d.ts","sourceRoot":"","sources":["../../../src/catalogDetail/share/CatalogItemShareProvider.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAA6D,MAAM,OAAO,CAAC;AAElG,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AAG1E,OAAO,EACH,KAAK,oBAAoB,EAG5B,MAAM,sBAAsB,CAAC;AAE9B,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AACvD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAEhE;;;;;GAKG;AACH,UAAU,sBAAsB;IAC5B,MAAM,EAAE,OAAO,CAAC;IAChB;;;OAGG;IACH,OAAO,EAAE,oBAAoB,GAAG,SAAS,CAAC;IAC1C;;;;;OAKG;IACH,YAAY,EAAE,OAAO,CAAC;IACtB,MAAM,EAAE,wBAAwB,GAAG,SAAS,CAAC;IAC7C,WAAW,EAAE,MAAM,CAAC;IACpB,gEAAgE;IAChE,MAAM,EAAE,OAAO,CAAC;IAChB,yDAAyD;IACzD,MAAM,EAAE,gBAAgB,CAAC;CAC5B;AAED;;;GAGG;AACH,UAAU,wBAAwB;IAC9B,MAAM,EAAE,OAAO,CAAC;IAChB,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,kGAAkG;IAClG,eAAe,EAAE,CAAC,OAAO,EAAE,oBAAoB,KAAK,IAAI,CAAC;CAC5D;AAyBD;;GAEG;AACH,MAAM,WAAW,8BAA8B;IAC3C,+FAA+F;IAC/F,aAAa,EAAE,oBAAoB,GAAG,SAAS,CAAC;IAChD,sDAAsD;IACtD,MAAM,EAAE,wBAAwB,GAAG,SAAS,CAAC;IAC7C,mFAAmF;IACnF,MAAM,EAAE,gBAAgB,CAAC;IACzB,QAAQ,EAAE,SAAS,CAAC;CACvB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,wBAAwB,CAAC,EACrC,aAAa,EACb,MAAM,EACN,MAAM,EACN,QAAQ,EACX,EAAE,8BAA8B,2CA2FhC;AAED;;;;;GAKG;AACH,wBAAgB,wBAAwB,IAAI,sBAAsB,CAEjE;AAED;;;;;;GAMG;AACH,wBAAgB,0BAA0B,IAAI,wBAAwB,CAErE"}
1
+ {"version":3,"file":"CatalogItemShareProvider.d.ts","sourceRoot":"","sources":["../../../src/catalogDetail/share/CatalogItemShareProvider.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAA6D,MAAM,OAAO,CAAC;AAElG,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AAG1E,OAAO,EACH,KAAK,oBAAoB,EAG5B,MAAM,sBAAsB,CAAC;AAE9B,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AACvD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAEhE;;;;;GAKG;AACH,UAAU,sBAAsB;IAC5B,MAAM,EAAE,OAAO,CAAC;IAChB;;;OAGG;IACH,OAAO,EAAE,oBAAoB,GAAG,SAAS,CAAC;IAC1C;;;;;OAKG;IACH,YAAY,EAAE,OAAO,CAAC;IACtB,MAAM,EAAE,wBAAwB,GAAG,SAAS,CAAC;IAC7C,WAAW,EAAE,MAAM,CAAC;IACpB,gEAAgE;IAChE,MAAM,EAAE,OAAO,CAAC;IAChB,yDAAyD;IACzD,MAAM,EAAE,gBAAgB,CAAC;CAC5B;AAED;;;GAGG;AACH,UAAU,wBAAwB;IAC9B,MAAM,EAAE,OAAO,CAAC;IAChB,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,kGAAkG;IAClG,eAAe,EAAE,CAAC,OAAO,EAAE,oBAAoB,KAAK,IAAI,CAAC;CAC5D;AAyBD;;GAEG;AACH,MAAM,WAAW,8BAA8B;IAC3C,+FAA+F;IAC/F,aAAa,EAAE,oBAAoB,GAAG,SAAS,CAAC;IAChD,sDAAsD;IACtD,MAAM,EAAE,wBAAwB,GAAG,SAAS,CAAC;IAC7C,mFAAmF;IACnF,MAAM,EAAE,gBAAgB,CAAC;IACzB,QAAQ,EAAE,SAAS,CAAC;CACvB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,wBAAwB,CAAC,EACrC,aAAa,EACb,MAAM,EACN,MAAM,EACN,QAAQ,EACX,EAAE,8BAA8B,2CAiHhC;AAED;;;;;GAKG;AACH,wBAAgB,wBAAwB,IAAI,sBAAsB,CAEjE;AAED;;;;;;GAMG;AACH,wBAAgB,0BAA0B,IAAI,wBAAwB,CAErE"}
@@ -87,6 +87,12 @@ export function CatalogItemShareProvider({ shareableItem, target, labels, childr
87
87
  const accessUnavailable = status === "error" && isPermissionsNotAvailable(error);
88
88
  const active = Boolean(shareableItem) && !accessUnavailable;
89
89
  const summaryError = status === "error" && !accessUnavailable;
90
+ // Whether the access list has come back at all. Read off the summary rather than
91
+ // the fetch status, which returns to idle once the summary is known (the promise
92
+ // is armed only while it is unknown) and would read as unresolved again. An item
93
+ // change clears the summary, so the next item is unresolved until its own fetch
94
+ // lands.
95
+ const accessResolved = summary !== undefined || status === "error";
90
96
  const isOpen = dialogFor !== undefined && dialogFor === itemKey;
91
97
  const open = useCallback(() => setDialogFor(itemKey), [itemKey]);
92
98
  const close = useCallback(() => setDialogFor(undefined), []);
@@ -101,7 +107,19 @@ export function CatalogItemShareProvider({ shareableItem, target, labels, childr
101
107
  labels,
102
108
  }
103
109
  : INACTIVE_STATE, [active, shareableItem, summary, summaryError, target, isOpen, labels]);
104
- const actions = useMemo(() => (active ? { active: true, open, close, onSummaryChange: setSummary } : INACTIVE_ACTIONS), [active, open, close]);
110
+ // The Share button waits for the access list; the inline row does not. Sharing is
111
+ // hidden for a caller the manage-gated endpoint 404s, but that verdict only
112
+ // arrives with the response — offering the button optimistically made it appear
113
+ // and then vanish for a view-only user. The row instead shows its skeleton while
114
+ // the fetch is in flight, which is why only the actions gate on resolution.
115
+ // `onSummaryChange` stays live even while sharing is not offered: it is a state
116
+ // channel, not a capability, and an open dialog's report must still win over a
117
+ // page fetch that lands later (the summary is seed-only). Memoized separately so
118
+ // the inactive value keeps one identity across renders.
119
+ const inactiveActions = useMemo(() => ({ ...INACTIVE_ACTIONS, onSummaryChange: setSummary }), []);
120
+ const actions = useMemo(() => active && accessResolved
121
+ ? { active: true, open, close, onSummaryChange: setSummary }
122
+ : inactiveActions, [active, accessResolved, open, close, inactiveActions]);
105
123
  return (_jsx(ShareActionsContext.Provider, { value: actions, children: _jsx(ShareStateContext.Provider, { value: state, children: children }) }));
106
124
  }
107
125
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gooddata/sdk-ui-catalog",
3
- "version": "11.52.0-alpha.5",
3
+ "version": "11.52.0-alpha.7",
4
4
  "description": "GoodData SDK - Analytics Catalog",
5
5
  "license": "MIT",
6
6
  "author": "GoodData Corporation",
@@ -41,15 +41,15 @@
41
41
  "tslib": "2.8.1",
42
42
  "yaml": "2.8.3",
43
43
  "zod": "4.3.6",
44
- "@gooddata/sdk-backend-spi": "11.52.0-alpha.5",
45
- "@gooddata/sdk-code-schemas": "11.52.0-alpha.5",
46
- "@gooddata/sdk-ui": "11.52.0-alpha.5",
47
- "@gooddata/sdk-model": "11.52.0-alpha.5",
48
- "@gooddata/sdk-ui-ext": "11.52.0-alpha.5",
49
- "@gooddata/sdk-ui-kit": "11.52.0-alpha.5",
50
- "@gooddata/util": "11.52.0-alpha.5",
51
- "@gooddata/sdk-ui-semantic-search": "11.52.0-alpha.5",
52
- "@gooddata/sdk-ui-theme-provider": "11.52.0-alpha.5"
44
+ "@gooddata/sdk-backend-spi": "11.52.0-alpha.7",
45
+ "@gooddata/sdk-model": "11.52.0-alpha.7",
46
+ "@gooddata/sdk-code-schemas": "11.52.0-alpha.7",
47
+ "@gooddata/sdk-ui": "11.52.0-alpha.7",
48
+ "@gooddata/sdk-ui-ext": "11.52.0-alpha.7",
49
+ "@gooddata/sdk-ui-kit": "11.52.0-alpha.7",
50
+ "@gooddata/sdk-ui-semantic-search": "11.52.0-alpha.7",
51
+ "@gooddata/sdk-ui-theme-provider": "11.52.0-alpha.7",
52
+ "@gooddata/util": "11.52.0-alpha.7"
53
53
  },
54
54
  "devDependencies": {
55
55
  "@microsoft/api-documenter": "^7.17.0",
@@ -89,11 +89,11 @@
89
89
  "typescript": "5.9.3",
90
90
  "vitest": "4.1.8",
91
91
  "vitest-dom": "0.1.1",
92
- "@gooddata/eslint-config": "11.52.0-alpha.5",
93
- "@gooddata/i18n-toolkit": "11.52.0-alpha.5",
94
- "@gooddata/oxlint-config": "11.52.0-alpha.5",
95
- "@gooddata/sdk-backend-mockingbird": "11.52.0-alpha.5",
96
- "@gooddata/stylelint-config": "11.52.0-alpha.5"
92
+ "@gooddata/eslint-config": "11.52.0-alpha.7",
93
+ "@gooddata/i18n-toolkit": "11.52.0-alpha.7",
94
+ "@gooddata/oxlint-config": "11.52.0-alpha.7",
95
+ "@gooddata/sdk-backend-mockingbird": "11.52.0-alpha.7",
96
+ "@gooddata/stylelint-config": "11.52.0-alpha.7"
97
97
  },
98
98
  "peerDependencies": {
99
99
  "react": "^18.0.0 || ^19.0.0",