@gooddata/sdk-ui-kit 11.49.0-alpha.1 → 11.49.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 (67) hide show
  1. package/esm/@ui/UiButton/UiButton.d.ts +1 -0
  2. package/esm/@ui/UiButton/UiButton.d.ts.map +1 -1
  3. package/esm/@ui/UiButton/UiButton.js +2 -2
  4. package/esm/@ui/UiControlButton/UiControlButton.d.ts +2 -2
  5. package/esm/@ui/UiControlButton/UiControlButton.js +2 -2
  6. package/esm/@ui/UiGranteeRow/UiGranteeRow.d.ts +2 -4
  7. package/esm/@ui/UiGranteeRow/UiGranteeRow.d.ts.map +1 -1
  8. package/esm/@ui/UiGranteeRow/UiGranteeRow.js +3 -7
  9. package/esm/@ui/UiGranteeRowControls/UiGranteeRowControls.d.ts +13 -4
  10. package/esm/@ui/UiGranteeRowControls/UiGranteeRowControls.d.ts.map +1 -1
  11. package/esm/@ui/UiGranteeRowControls/UiGranteeRowControls.js +13 -9
  12. package/esm/@ui/UiMoreOptionsMenu/UiMoreOptionsMenu.d.ts +5 -7
  13. package/esm/@ui/UiMoreOptionsMenu/UiMoreOptionsMenu.d.ts.map +1 -1
  14. package/esm/@ui/UiMoreOptionsMenu/UiMoreOptionsMenu.js +7 -19
  15. package/esm/@ui/UiObjectShareDialog/UiObjectShareDialogCard.d.ts +4 -3
  16. package/esm/@ui/UiObjectShareDialog/UiObjectShareDialogCard.d.ts.map +1 -1
  17. package/esm/@ui/UiObjectShareDialog/UiObjectShareDialogCard.js +1 -1
  18. package/esm/@ui/UiPermissionMenu/UiPermissionMenu.d.ts +22 -5
  19. package/esm/@ui/UiPermissionMenu/UiPermissionMenu.d.ts.map +1 -1
  20. package/esm/@ui/UiPermissionMenu/UiPermissionMenu.js +41 -23
  21. package/esm/List/DateDatasetsListItem.d.ts +6 -1
  22. package/esm/List/DateDatasetsListItem.d.ts.map +1 -1
  23. package/esm/List/DateDatasetsListItem.js +17 -3
  24. package/esm/ParameterControl/NumberParameterControlDropdown.d.ts +1 -1
  25. package/esm/ParameterControl/NumberParameterControlDropdown.d.ts.map +1 -1
  26. package/esm/ParameterControl/NumberParameterControlDropdown.js +2 -2
  27. package/esm/ParameterControl/ParameterControlButton.js +1 -1
  28. package/esm/ParameterControl/ParameterControlDropdown.d.ts +6 -4
  29. package/esm/ParameterControl/ParameterControlDropdown.d.ts.map +1 -1
  30. package/esm/ParameterControl/ParameterControlDropdown.js +17 -12
  31. package/esm/ParameterControl/ParameterInput.d.ts +21 -0
  32. package/esm/ParameterControl/ParameterInput.d.ts.map +1 -0
  33. package/esm/ParameterControl/ParameterInput.js +37 -0
  34. package/esm/ParameterControl/StringParameterControlDropdown.d.ts +1 -1
  35. package/esm/ParameterControl/StringParameterControlDropdown.d.ts.map +1 -1
  36. package/esm/ParameterControl/StringParameterControlDropdown.js +2 -2
  37. package/esm/ShortenedText/ShortenedText.d.ts +1 -0
  38. package/esm/ShortenedText/ShortenedText.d.ts.map +1 -1
  39. package/esm/ShortenedText/ShortenedText.js +26 -3
  40. package/esm/index.d.ts +1 -5
  41. package/esm/index.d.ts.map +1 -1
  42. package/esm/index.js +1 -5
  43. package/esm/locales.d.ts +0 -34
  44. package/esm/locales.d.ts.map +1 -1
  45. package/esm/locales.js +0 -14
  46. package/esm/sdk-ui-kit.d.ts +56 -152
  47. package/package.json +11 -11
  48. package/src/@ui/UiControlButton/UiControlButton.scss +20 -14
  49. package/src/@ui/UiPermissionMenu/UiPermissionMenu.scss +5 -0
  50. package/src/@ui/index.scss +0 -1
  51. package/src/ParameterControl/ParameterControl.scss +7 -17
  52. package/src/ParameterControl/ParameterInput.scss +91 -0
  53. package/styles/css/UiControlButton.css +13 -3
  54. package/styles/css/UiControlButton.css.map +1 -1
  55. package/styles/css/button.css +0 -3
  56. package/styles/css/button.css.map +1 -1
  57. package/styles/css/main.css +269 -221
  58. package/styles/css/main.css.map +1 -1
  59. package/styles/scss/Button/_mixins.scss +10 -3
  60. package/styles/scss/button.scss +1 -4
  61. package/esm/@ui/UiTransferOwnershipDialog/UiTransferOwnershipDialog.d.ts +0 -17
  62. package/esm/@ui/UiTransferOwnershipDialog/UiTransferOwnershipDialog.d.ts.map +0 -1
  63. package/esm/@ui/UiTransferOwnershipDialog/UiTransferOwnershipDialog.js +0 -14
  64. package/esm/@ui/UiTransferOwnershipDialog/UiTransferOwnershipDialogCard.d.ts +0 -53
  65. package/esm/@ui/UiTransferOwnershipDialog/UiTransferOwnershipDialogCard.d.ts.map +0 -1
  66. package/esm/@ui/UiTransferOwnershipDialog/UiTransferOwnershipDialogCard.js +0 -71
  67. package/src/@ui/UiTransferOwnershipDialog/UiTransferOwnershipDialog.scss +0 -29
@@ -23,6 +23,7 @@ export interface IUiButtonProps {
23
23
  iconAfter?: IconType;
24
24
  iconAfterSize?: number;
25
25
  label: string;
26
+ type?: "button" | "submit" | "reset";
26
27
  isDisabled?: boolean;
27
28
  isLoading?: boolean;
28
29
  isSelected?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"UiButton.d.ts","sourceRoot":"","sources":["../../../src/@ui/UiButton/UiButton.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,UAAU,EAAE,KAAK,SAAS,EAAc,MAAM,OAAO,CAAC;AAIxF,OAAO,EAAE,KAAK,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAE/E,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,UAAU,EAAE,KAAK,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACpF,OAAO,EACH,KAAK,aAAa,EAClB,KAAK,qBAAqB,EAC1B,KAAK,WAAW,EAChB,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,cAAc,EACtB,MAAM,sBAAsB,CAAC;AAI9B;;GAEG;AACH,MAAM,WAAW,4BAA6B,SAAQ,wBAAwB;IAC1E,cAAc,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC3B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,SAAS,GAAG,UAAU,GAAG,SAAS,CAAC;IAC1C,OAAO,CAAC,EACF,cAAc,GACd,gBAAgB,GAChB,eAAe,GACf,aAAa,GACb,aAAa,GACb,cAAc,GACd,WAAW,GACX,iBAAiB,GACjB,qBAAqB,CAAC;IAC5B,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,UAAU,CAAC,EAAE,QAAQ,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B,SAAS,CAAC,EAAE,QAAQ,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;IACrD,SAAS,CAAC,EAAE,CAAC,CAAC,EAAE,aAAa,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;IAC1D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,mBAAmB,CAAC,EAAE,4BAA4B,CAAC;IACnD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACvB;AAQD;;GAEG;AACH,eAAO,MAAM,QAAQ,8GAmFpB,CAAC"}
1
+ {"version":3,"file":"UiButton.d.ts","sourceRoot":"","sources":["../../../src/@ui/UiButton/UiButton.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,UAAU,EAAE,KAAK,SAAS,EAAc,MAAM,OAAO,CAAC;AAIxF,OAAO,EAAE,KAAK,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAE/E,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,UAAU,EAAE,KAAK,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACpF,OAAO,EACH,KAAK,aAAa,EAClB,KAAK,qBAAqB,EAC1B,KAAK,WAAW,EAChB,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,cAAc,EACtB,MAAM,sBAAsB,CAAC;AAI9B;;GAEG;AACH,MAAM,WAAW,4BAA6B,SAAQ,wBAAwB;IAC1E,cAAc,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC3B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,SAAS,GAAG,UAAU,GAAG,SAAS,CAAC;IAC1C,OAAO,CAAC,EACF,cAAc,GACd,gBAAgB,GAChB,eAAe,GACf,aAAa,GACb,aAAa,GACb,cAAc,GACd,WAAW,GACX,iBAAiB,GACjB,qBAAqB,CAAC;IAC5B,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,UAAU,CAAC,EAAE,QAAQ,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B,SAAS,CAAC,EAAE,QAAQ,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;IACrC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;IACrD,SAAS,CAAC,EAAE,CAAC,CAAC,EAAE,aAAa,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;IAC1D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,mBAAmB,CAAC,EAAE,4BAA4B,CAAC;IACnD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACvB;AAQD;;GAEG;AACH,eAAO,MAAM,QAAQ,8GAqFpB,CAAC"}
@@ -12,13 +12,13 @@ const getGeneratedTestId = (label, ariaLabel) => {
12
12
  /**
13
13
  * @internal
14
14
  */
15
- export const UiButton = forwardRef(({ id, size = "medium", variant = "secondary", tabIndex = 0, label, isDisabled, isSelected, isLoading, disableIconAnimation, iconBefore, iconBeforeSize: iconBeforeSizeProp, iconAfter, iconAfterSize: iconAfterSizeProp, badgeAfter, onClick, onKeyDown, dataId, dataTestId, accessibilityConfig, maxWidth, autoFocus, }, ref) => {
15
+ export const UiButton = forwardRef(({ id, size = "medium", variant = "secondary", tabIndex = 0, label, type, isDisabled, isSelected, isLoading, disableIconAnimation, iconBefore, iconBeforeSize: iconBeforeSizeProp, iconAfter, iconAfterSize: iconAfterSizeProp, badgeAfter, onClick, onKeyDown, dataId, dataTestId, accessibilityConfig, maxWidth, autoFocus, }, ref) => {
16
16
  const iconBeforeSize = iconBeforeSizeProp ?? (size === "small" ? 16 : 18);
17
17
  const iconAfterSize = iconAfterSizeProp ?? (size === "small" ? 16 : 18);
18
18
  const hasIconBefore = !!iconBefore;
19
19
  const hasIconAfter = !!iconAfter;
20
20
  const testId = dataTestId || getGeneratedTestId(label, accessibilityConfig?.ariaLabel ?? "");
21
- return (_jsxs("button", { id: id, ref: ref, className: b({
21
+ return (_jsxs("button", { id: id, ref: ref, type: type, className: b({
22
22
  size,
23
23
  variant,
24
24
  isLoading: isLoading ?? false,
@@ -42,8 +42,8 @@ export interface IUiControlButtonProps {
42
42
  ariaLabel?: string;
43
43
  }
44
44
  /**
45
- * Generic chip-shaped dropdown trigger primitive. One source of truth for filter-bar chip
46
- * visuals; consumed by both attribute filter chips and parameter chips.
45
+ * Generic dropdown trigger primitive. One source of truth for filter-bar button visuals;
46
+ * consumed by both attribute filter buttons and parameter controls.
47
47
  *
48
48
  * Owns: layout, visual states, keyboard activation, ARIA contract.
49
49
  *
@@ -12,8 +12,8 @@ const TITLE_TOOLTIP_ALIGN_POINTS = [
12
12
  { align: "bl tr", offset: { x: -2, y: -8 } },
13
13
  ];
14
14
  /**
15
- * Generic chip-shaped dropdown trigger primitive. One source of truth for filter-bar chip
16
- * visuals; consumed by both attribute filter chips and parameter chips.
15
+ * Generic dropdown trigger primitive. One source of truth for filter-bar button visuals;
16
+ * consumed by both attribute filter buttons and parameter controls.
17
17
  *
18
18
  * Owns: layout, visual states, keyboard activation, ARIA contract.
19
19
  *
@@ -10,8 +10,6 @@ export interface IUiGranteeRowProps {
10
10
  name: string;
11
11
  /** Optional email subline shown below the name. */
12
12
  email?: string;
13
- /** When true, an "Owner" tag is rendered between the text block and the controls slot. */
14
- isOwner?: boolean;
15
13
  /** When true, the row is visually muted to signal an in-flight save. */
16
14
  isPending?: boolean;
17
15
  /** Trailing controls slot — typically the `UiGranteeRowControls` trigger pair. */
@@ -21,9 +19,9 @@ export interface IUiGranteeRowProps {
21
19
  }
22
20
  /**
23
21
  * Grantee row used by the OLP share dialog. Renders avatar + name + optional
24
- * email subline + optional "Owner" tag + trailing controls slot.
22
+ * email subline + trailing controls slot.
25
23
  *
26
24
  * @internal
27
25
  */
28
- export declare function UiGranteeRow({ kind, name, email, isOwner, isPending, controls, dataTestId }: IUiGranteeRowProps): import("react/jsx-runtime").JSX.Element;
26
+ export declare function UiGranteeRow({ kind, name, email, isPending, controls, dataTestId }: IUiGranteeRowProps): import("react/jsx-runtime").JSX.Element;
29
27
  //# sourceMappingURL=UiGranteeRow.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"UiGranteeRow.d.ts","sourceRoot":"","sources":["../../../src/@ui/UiGranteeRow/UiGranteeRow.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAMvC,OAAO,EAAE,KAAK,iBAAiB,EAAmB,MAAM,uCAAuC,CAAC;AAKhG;;GAEG;AACH,MAAM,WAAW,kBAAkB;IAC/B,oDAAkD;IAClD,IAAI,EAAE,iBAAiB,CAAC;IACxB,4CAA4C;IAC5C,IAAI,EAAE,MAAM,CAAC;IACb,mDAAmD;IACnD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,0FAA0F;IAC1F,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,wEAAwE;IACxE,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,oFAAkF;IAClF,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,6CAA6C;IAC7C,UAAU,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,EACzB,IAAI,EACJ,IAAI,EACJ,KAAK,EACL,OAAO,EACP,SAAS,EACT,QAAQ,EACR,UAAU,EACb,EAAE,kBAAkB,2CAyBpB"}
1
+ {"version":3,"file":"UiGranteeRow.d.ts","sourceRoot":"","sources":["../../../src/@ui/UiGranteeRow/UiGranteeRow.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,OAAO,EAAE,KAAK,iBAAiB,EAAmB,MAAM,uCAAuC,CAAC;AAIhG;;GAEG;AACH,MAAM,WAAW,kBAAkB;IAC/B,oDAAkD;IAClD,IAAI,EAAE,iBAAiB,CAAC;IACxB,4CAA4C;IAC5C,IAAI,EAAE,MAAM,CAAC;IACb,mDAAmD;IACnD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,wEAAwE;IACxE,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,oFAAkF;IAClF,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,6CAA6C;IAC7C,UAAU,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,UAAU,EAAE,EAAE,kBAAkB,2CAiBtG"}
@@ -1,19 +1,15 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useIntl } from "react-intl";
3
- import { olpGranteeRowMessages } from "../../locales.js";
4
2
  import { bem } from "../@utils/bem.js";
5
3
  import { UiGranteeAvatar } from "../UiGranteeAvatar/UiGranteeAvatar.js";
6
- import { UiTag } from "../UiTag/UiTag.js";
7
4
  const { b, e } = bem("gd-ui-kit-grantee-row");
8
5
  /**
9
6
  * Grantee row used by the OLP share dialog. Renders avatar + name + optional
10
- * email subline + optional "Owner" tag + trailing controls slot.
7
+ * email subline + trailing controls slot.
11
8
  *
12
9
  * @internal
13
10
  */
14
- export function UiGranteeRow({ kind, name, email, isOwner, isPending, controls, dataTestId, }) {
15
- const intl = useIntl();
11
+ export function UiGranteeRow({ kind, name, email, isPending, controls, dataTestId }) {
16
12
  return (_jsxs("div", { className: b({ pending: Boolean(isPending) }), "data-testid": dataTestId, children: [
17
13
  _jsx(UiGranteeAvatar, { kind: kind, decorative: true }), _jsxs("div", { className: e("text"), children: [
18
- _jsx("span", { className: e("name"), title: name, children: name }), email ? (_jsx("span", { className: e("email"), title: email, children: email })) : null] }), isOwner ? (_jsx(UiTag, { label: intl.formatMessage(olpGranteeRowMessages.ownerTag), size: "small", variant: "solid" })) : null, controls] }));
14
+ _jsx("span", { className: e("name"), title: name, children: name }), email ? (_jsx("span", { className: e("email"), title: email, children: email })) : null] }), controls] }));
19
15
  }
@@ -15,10 +15,20 @@ export interface IUiGranteeRowControlsProps {
15
15
  * (e.g. from a group); drives the warning badge. Undefined when not elevated.
16
16
  */
17
17
  effectivePermission?: AccessGranularPermission;
18
+ /**
19
+ * Merge every action into the permission dropdown: the labels drill-in and
20
+ * Remove access render inside {@link UiPermissionMenu} (no "⋯" menu), and
21
+ * the level dropdown is offered even for an EDIT row. Used for the signed-in
22
+ * user's own row when they manage their own access.
23
+ */
24
+ mergedControls?: boolean;
25
+ /** Levels rendered disabled in the permission menu — see {@link UiPermissionMenu}. */
26
+ disabledLevels?: ReadonlyArray<PermissionMenuLevel>;
27
+ /** Tooltip shown on disabled level rows in place of the level's info text. */
28
+ disabledTooltip?: string;
18
29
  onLabelsChange: (selectedIds: string[]) => void;
19
30
  /** Fires only for selectable rows (VIEW/SHARE); EDIT rows have no level control. */
20
31
  onPermissionChange: (level: PermissionMenuLevel) => void;
21
- onTransferOwnership?: () => void;
22
32
  onRemoveAccess?: () => void;
23
33
  /** Disables both triggers, e.g. while the row's change is saving. */
24
34
  isDisabled?: boolean;
@@ -27,10 +37,9 @@ export interface IUiGranteeRowControlsProps {
27
37
  /**
28
38
  * Per-row controls in the OLP share dialog: a permission trigger
29
39
  * ({@link UiPermissionMenu}) plus a "⋯" menu ({@link UiMoreOptionsMenu}) for
30
- * labels access and Transfer ownership, with an optional inherited-permission
31
- * warning badge.
40
+ * labels access, with an optional inherited-permission warning badge.
32
41
  *
33
42
  * @internal
34
43
  */
35
- export declare function UiGranteeRowControls({ labels, selectedLabelIds, permissionLevel, effectivePermission, onLabelsChange, onPermissionChange, onTransferOwnership, onRemoveAccess, isDisabled, dataTestId }: IUiGranteeRowControlsProps): import("react/jsx-runtime").JSX.Element;
44
+ export declare function UiGranteeRowControls({ labels, selectedLabelIds, permissionLevel, effectivePermission, mergedControls, disabledLevels, disabledTooltip, onLabelsChange, onPermissionChange, onRemoveAccess, isDisabled, dataTestId }: IUiGranteeRowControlsProps): import("react/jsx-runtime").JSX.Element;
36
45
  //# sourceMappingURL=UiGranteeRowControls.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"UiGranteeRowControls.d.ts","sourceRoot":"","sources":["../../../src/@ui/UiGranteeRowControls/UiGranteeRowControls.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAMpE,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,2CAA2C,CAAC;AAExF,OAAO,EAAE,KAAK,mBAAmB,EAAoB,MAAM,yCAAyC,CAAC;AAKrG;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACvC,mDAAmD;IACnD,MAAM,EAAE,aAAa,CAAC,sBAAsB,CAAC,CAAC;IAC9C,gBAAgB,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IACxC,iFAAiF;IACjF,eAAe,EAAE,wBAAwB,CAAC;IAC1C;;;OAGG;IACH,mBAAmB,CAAC,EAAE,wBAAwB,CAAC;IAC/C,cAAc,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IAChD,oFAAoF;IACpF,kBAAkB,EAAE,CAAC,KAAK,EAAE,mBAAmB,KAAK,IAAI,CAAC;IACzD,mBAAmB,CAAC,EAAE,MAAM,IAAI,CAAC;IACjC,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,qEAAqE;IACrE,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,EACjC,MAAM,EACN,gBAAgB,EAChB,eAAe,EACf,mBAAmB,EACnB,cAAc,EACd,kBAAkB,EAClB,mBAAmB,EACnB,cAAc,EACd,UAAU,EACV,UAAU,EACb,EAAE,0BAA0B,2CAmF5B"}
1
+ {"version":3,"file":"UiGranteeRowControls.d.ts","sourceRoot":"","sources":["../../../src/@ui/UiGranteeRowControls/UiGranteeRowControls.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAMpE,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,2CAA2C,CAAC;AAExF,OAAO,EAAE,KAAK,mBAAmB,EAAoB,MAAM,yCAAyC,CAAC;AAKrG;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACvC,mDAAmD;IACnD,MAAM,EAAE,aAAa,CAAC,sBAAsB,CAAC,CAAC;IAC9C,gBAAgB,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IACxC,iFAAiF;IACjF,eAAe,EAAE,wBAAwB,CAAC;IAC1C;;;OAGG;IACH,mBAAmB,CAAC,EAAE,wBAAwB,CAAC;IAC/C;;;;;OAKG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,wFAAsF;IACtF,cAAc,CAAC,EAAE,aAAa,CAAC,mBAAmB,CAAC,CAAC;IACpD,8EAA8E;IAC9E,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,cAAc,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IAChD,oFAAoF;IACpF,kBAAkB,EAAE,CAAC,KAAK,EAAE,mBAAmB,KAAK,IAAI,CAAC;IACzD,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,qEAAqE;IACrE,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,EACjC,MAAM,EACN,gBAAgB,EAChB,eAAe,EACf,mBAAmB,EACnB,cAAc,EACd,cAAc,EACd,eAAe,EACf,cAAc,EACd,kBAAkB,EAClB,cAAc,EACd,UAAU,EACV,UAAU,EACb,EAAE,0BAA0B,2CA4F5B"}
@@ -12,20 +12,23 @@ const { b, e } = bem("gd-ui-kit-grantee-row-controls");
12
12
  /**
13
13
  * Per-row controls in the OLP share dialog: a permission trigger
14
14
  * ({@link UiPermissionMenu}) plus a "⋯" menu ({@link UiMoreOptionsMenu}) for
15
- * labels access and Transfer ownership, with an optional inherited-permission
16
- * warning badge.
15
+ * labels access, with an optional inherited-permission warning badge.
17
16
  *
18
17
  * @internal
19
18
  */
20
- export function UiGranteeRowControls({ labels, selectedLabelIds, permissionLevel, effectivePermission, onLabelsChange, onPermissionChange, onTransferOwnership, onRemoveAccess, isDisabled, dataTestId, }) {
19
+ export function UiGranteeRowControls({ labels, selectedLabelIds, permissionLevel, effectivePermission, mergedControls, disabledLevels, disabledTooltip, onLabelsChange, onPermissionChange, onRemoveAccess, isDisabled, dataTestId, }) {
21
20
  const intl = useIntl();
22
21
  const hasLabels = labels.length > 0;
23
22
  // EDIT is display-only: the dialog can't assign or change it, and offering the
24
23
  // VIEW/SHARE menu on an EDIT row would silently downgrade the grant on pick.
25
24
  // So an EDIT row shows a static, non-interactive "Can edit" label instead of
26
- // the permission dropdown.
27
- const isReadOnlyLevel = permissionLevel === "EDIT";
28
- const permissionTriggerText = intl.formatMessage(isReadOnlyLevel
25
+ // the permission dropdown — except in merged mode, where the user manages
26
+ // their own access and downgrading is exactly the offered action.
27
+ const isReadOnlyLevel = permissionLevel === "EDIT" && !mergedControls;
28
+ // EDIT is not selectable — a merged EDIT row anchors on "Can edit" with no
29
+ // radio checked, offering only the (lower) selectable levels.
30
+ const selectedLevel = permissionLevel === "EDIT" ? undefined : permissionLevel;
31
+ const permissionTriggerText = intl.formatMessage(permissionLevel === "EDIT"
29
32
  ? olpPermissionMessages.canEdit
30
33
  : permissionLevel === "SHARE"
31
34
  ? olpPermissionMessages.canViewAndShare
@@ -33,13 +36,14 @@ export function UiGranteeRowControls({ labels, selectedLabelIds, permissionLevel
33
36
  // A read-only level has no permission dropdown to host Remove access, so that
34
37
  // action moves into the ⋯ menu for those rows (dropdown rows keep it in the menu).
35
38
  const removeInMoreOptions = isReadOnlyLevel ? onRemoveAccess : undefined;
36
- // Nothing to put in the ⋯ menu → drop it.
37
- const hasMoreOptions = hasLabels || !!onTransferOwnership || !!removeInMoreOptions;
39
+ // Nothing to put in the ⋯ menu → drop it. Merged mode hosts everything in
40
+ // the permission dropdown, so the menu never renders there.
41
+ const hasMoreOptions = !mergedControls && (hasLabels || !!removeInMoreOptions);
38
42
  // Guard on permissionLevel too, so the badge can't show when the assigned
39
43
  // level already matches the inherited one.
40
44
  const isInheritedHigherPermission = permissionLevel === "VIEW" && effectivePermission === "SHARE";
41
45
  const effectiveTooltip = isInheritedHigherPermission
42
46
  ? intl.formatMessage(olpPermissionMessages.effectivePermissionTooltipShare)
43
47
  : undefined;
44
- return (_jsxs("div", { className: b(), "data-testid": dataTestId, children: [effectiveTooltip ? (_jsx(UiTooltip, { triggerBy: ["hover", "focus"], content: effectiveTooltip, anchor: _jsx("span", { className: e("effective-warning"), role: "img", "aria-label": intl.formatMessage(olpPermissionMessages.effectivePermissionAriaLabel), tabIndex: 0, children: _jsx(UiIcon, { type: "warning", size: 16, color: "warning" }) }) })) : null, permissionLevel === "EDIT" ? (_jsx("span", { className: e("readonly-permission"), children: permissionTriggerText })) : (_jsx(UiPermissionMenu, { anchor: _jsx(UiButton, { label: permissionTriggerText, size: "small", variant: "dropdownInline", iconAfter: "navigateDown", isDisabled: isDisabled }), selectedLevel: permissionLevel, onPermissionChange: onPermissionChange, onRemoveAccess: onRemoveAccess })), hasMoreOptions ? (_jsx(UiMoreOptionsMenu, { labels: hasLabels ? labels : undefined, selectedLabelIds: selectedLabelIds, onLabelsChange: onLabelsChange, onTransferOwnership: onTransferOwnership, onRemoveAccess: removeInMoreOptions, isDisabled: isDisabled })) : null] }));
48
+ return (_jsxs("div", { className: b(), "data-testid": dataTestId, children: [effectiveTooltip ? (_jsx(UiTooltip, { triggerBy: ["hover", "focus"], content: effectiveTooltip, anchor: _jsx("span", { className: e("effective-warning"), role: "img", "aria-label": intl.formatMessage(olpPermissionMessages.effectivePermissionAriaLabel), tabIndex: 0, children: _jsx(UiIcon, { type: "warning", size: 16, color: "warning" }) }) })) : null, isReadOnlyLevel ? (_jsx("span", { className: e("readonly-permission"), children: permissionTriggerText })) : (_jsx(UiPermissionMenu, { anchor: _jsx(UiButton, { label: permissionTriggerText, size: "small", variant: "dropdownInline", iconAfter: "navigateDown", isDisabled: isDisabled }), selectedLevel: selectedLevel, onPermissionChange: onPermissionChange, disabledLevels: disabledLevels, disabledTooltip: disabledTooltip, labels: mergedControls && hasLabels ? labels : undefined, selectedLabelIds: mergedControls ? selectedLabelIds : undefined, onLabelsChange: mergedControls ? onLabelsChange : undefined, onRemoveAccess: onRemoveAccess })), hasMoreOptions ? (_jsx(UiMoreOptionsMenu, { labels: hasLabels ? labels : undefined, selectedLabelIds: selectedLabelIds, onLabelsChange: onLabelsChange, onRemoveAccess: removeInMoreOptions, isDisabled: isDisabled })) : null] }));
45
49
  }
@@ -8,8 +8,6 @@ export interface IUiMoreOptionsMenuProps {
8
8
  /** Locked items are always treated as selected. */
9
9
  selectedLabelIds?: ReadonlyArray<string>;
10
10
  onLabelsChange?: (selectedIds: string[]) => void;
11
- /** Omit to hide the row (Transfer ownership is gated until wired). */
12
- onTransferOwnership?: () => void;
13
11
  /**
14
12
  * Omit to hide the row. Used for read-only permission rows (e.g. EDIT), whose
15
13
  * level control has no dropdown to host Remove access — so the action lives here.
@@ -19,12 +17,12 @@ export interface IUiMoreOptionsMenuProps {
19
17
  dataTestId?: string;
20
18
  }
21
19
  /**
22
- * Per-grantee "⋯" menu: "Manage labels access" (drills into {@link UiLabelsChecklist}),
23
- * "Transfer ownership" and "Remove access". Each row shows only when its data/handler
24
- * is given. Remove access appears here for read-only permission rows whose level control
25
- * has no dropdown to host it.
20
+ * Per-grantee "⋯" menu: "Manage labels access" (drills into {@link UiLabelsChecklist})
21
+ * and "Remove access". Each row shows only when its data/handler is given. Remove
22
+ * access appears here for read-only permission rows whose level control has no
23
+ * dropdown to host it.
26
24
  *
27
25
  * @internal
28
26
  */
29
- export declare function UiMoreOptionsMenu({ labels, selectedLabelIds, onLabelsChange, onTransferOwnership, onRemoveAccess, isDisabled, dataTestId }: IUiMoreOptionsMenuProps): import("react/jsx-runtime").JSX.Element;
27
+ export declare function UiMoreOptionsMenu({ labels, selectedLabelIds, onLabelsChange, onRemoveAccess, isDisabled, dataTestId }: IUiMoreOptionsMenuProps): import("react/jsx-runtime").JSX.Element;
30
28
  //# sourceMappingURL=UiMoreOptionsMenu.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"UiMoreOptionsMenu.d.ts","sourceRoot":"","sources":["../../../src/@ui/UiMoreOptionsMenu/UiMoreOptionsMenu.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,KAAK,sBAAsB,EAAqB,MAAM,2CAA2C,CAAC;AAO3G;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACpC,sFAAsF;IACtF,MAAM,CAAC,EAAE,aAAa,CAAC,sBAAsB,CAAC,CAAC;IAC/C,mDAAmD;IACnD,gBAAgB,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IACzC,cAAc,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACjD,sEAAsE;IACtE,mBAAmB,CAAC,EAAE,MAAM,IAAI,CAAC;IACjC;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;CACvB;AAuCD;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,EAC9B,MAAM,EACN,gBAAgB,EAChB,cAAc,EACd,mBAAmB,EACnB,cAAc,EACd,UAAU,EACV,UAAU,EACb,EAAE,uBAAuB,2CAmGzB"}
1
+ {"version":3,"file":"UiMoreOptionsMenu.d.ts","sourceRoot":"","sources":["../../../src/@ui/UiMoreOptionsMenu/UiMoreOptionsMenu.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,KAAK,sBAAsB,EAAqB,MAAM,2CAA2C,CAAC;AAO3G;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACpC,sFAAsF;IACtF,MAAM,CAAC,EAAE,aAAa,CAAC,sBAAsB,CAAC,CAAC;IAC/C,mDAAmD;IACnD,gBAAgB,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IACzC,cAAc,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACjD;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;CACvB;AAuCD;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,EAC9B,MAAM,EACN,gBAAgB,EAChB,cAAc,EACd,cAAc,EACd,UAAU,EACV,UAAU,EACb,EAAE,uBAAuB,2CAwFzB"}
@@ -18,14 +18,14 @@ function LabelsChecklistContent({ onBack, onClose, dataRef }) {
18
18
  return (_jsx(UiLabelsChecklist, { items: data.labels, defaultSelectedIds: data.selectedLabelIds, onApply: (ids) => data.onLabelsChange?.(ids), onBack: onBack, onClose: onClose, dataTestId: data.dataTestId }));
19
19
  }
20
20
  /**
21
- * Per-grantee "⋯" menu: "Manage labels access" (drills into {@link UiLabelsChecklist}),
22
- * "Transfer ownership" and "Remove access". Each row shows only when its data/handler
23
- * is given. Remove access appears here for read-only permission rows whose level control
24
- * has no dropdown to host it.
21
+ * Per-grantee "⋯" menu: "Manage labels access" (drills into {@link UiLabelsChecklist})
22
+ * and "Remove access". Each row shows only when its data/handler is given. Remove
23
+ * access appears here for read-only permission rows whose level control has no
24
+ * dropdown to host it.
25
25
  *
26
26
  * @internal
27
27
  */
28
- export function UiMoreOptionsMenu({ labels, selectedLabelIds, onLabelsChange, onTransferOwnership, onRemoveAccess, isDisabled, dataTestId, }) {
28
+ export function UiMoreOptionsMenu({ labels, selectedLabelIds, onLabelsChange, onRemoveAccess, isDisabled, dataTestId, }) {
29
29
  const intl = useIntl();
30
30
  const menuId = useId();
31
31
  const hasLabels = (labels?.length ?? 0) > 0;
@@ -61,15 +61,6 @@ export function UiMoreOptionsMenu({ labels, selectedLabelIds, onLabelsChange, on
61
61
  Component: labelsContentRef.current,
62
62
  });
63
63
  }
64
- if (onTransferOwnership) {
65
- result.push({
66
- type: "interactive",
67
- id: "transfer",
68
- stringTitle: intl.formatMessage(olpPermissionMessages.transferOwnership),
69
- iconLeft: _jsx(UiIcon, { type: "sync", size: 16, color: "complementary-7" }),
70
- data: undefined,
71
- });
72
- }
73
64
  if (onRemoveAccess) {
74
65
  result.push({
75
66
  type: "interactive",
@@ -80,14 +71,11 @@ export function UiMoreOptionsMenu({ labels, selectedLabelIds, onLabelsChange, on
80
71
  });
81
72
  }
82
73
  return result;
83
- }, [hasLabels, onTransferOwnership, onRemoveAccess, intl]);
74
+ }, [hasLabels, onRemoveAccess, intl]);
84
75
  return (_jsx(UiPopover, { anchor: _jsx(UiIconButton, { icon: "ellipsis", variant: "tertiary", size: "large", iconColor: "complementary-6", isDisabled: isDisabled, accessibilityConfig: {
85
76
  ariaLabel: intl.formatMessage(olpPermissionMessages.moreOptionsAriaLabel),
86
77
  } }), anchorAccessibilityConfig: { ariaHaspopup: "menu" }, width: 200, content: ({ onClose }) => (_jsx("div", { className: b(), "data-testid": dataTestId, children: _jsx(UiMenu, { items: items, size: "small", onSelect: (item) => {
87
- if (item.id === "transfer") {
88
- onTransferOwnership?.();
89
- }
90
- else if (item.id === "remove") {
78
+ if (item.id === "remove") {
91
79
  onRemoveAccess?.();
92
80
  }
93
81
  }, onClose: onClose, ariaAttributes: {
@@ -17,11 +17,12 @@ export interface IUiObjectShareDialogGrantee {
17
17
  name: string;
18
18
  /** Optional email subline. */
19
19
  email?: string;
20
- /** When true, the row is rendered with the "Owner" tag instead of controls. */
21
- isOwner?: boolean;
22
20
  /** When true, the row is visually muted to signal an in-flight save. */
23
21
  isPending?: boolean;
24
- /** Per-row controls — usually `UiGranteeRowControls`. Owner rows leave this empty. */
22
+ /**
23
+ * Per-row controls — usually `UiGranteeRowControls`; the caller may plug in
24
+ * any other trailing content (e.g. a static tag) instead.
25
+ */
25
26
  controls?: ReactNode;
26
27
  }
27
28
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"UiObjectShareDialogCard.d.ts","sourceRoot":"","sources":["../../../src/@ui/UiObjectShareDialog/UiObjectShareDialogCard.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAOvC,OAAO,EACH,KAAK,kBAAkB,EAE1B,MAAM,iDAAiD,CAAC;AACzD,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AAQ/E;;;;;;GAMG;AACH,MAAM,WAAW,2BAA2B;IACxC,+DAA6D;IAC7D,EAAE,EAAE,MAAM,CAAC;IACX,sBAAsB;IACtB,IAAI,EAAE,iBAAiB,CAAC;IACxB,oBAAoB;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,8BAA8B;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,+EAA+E;IAC/E,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,wEAAwE;IACxE,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,wFAAsF;IACtF,QAAQ,CAAC,EAAE,SAAS,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,6BAA6B;IAC1C,6EAA2E;IAC3E,WAAW,EAAE,MAAM,CAAC;IACpB,iFAAiF;IACjF,OAAO,EAAE,MAAM,IAAI,CAAC;IAEpB,0EAA0E;IAC1E,QAAQ,EAAE,2BAA2B,EAAE,CAAC;IACxC,4EAA4E;IAC5E,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,sFAAoF;IACpF,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB,sCAAsC;IACtC,aAAa,EAAE,kBAAkB,CAAC;IAClC,mEAAmE;IACnE,qBAAqB,EAAE,CAAC,KAAK,EAAE,kBAAkB,KAAK,IAAI,CAAC;IAC3D,yFAAuF;IACvF,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC;;;OAGG;IACH,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,SAAS,CAAC;IAC9B;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAElC;;;;;OAKG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAElB,6CAA6C;IAC7C,UAAU,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CAAC,EACpC,WAAW,EACX,OAAO,EACP,QAAQ,EACR,UAAU,EACV,aAAa,EACb,aAAa,EACb,qBAAqB,EACrB,uBAAuB,EACvB,wBAAwB,EACxB,iBAAiB,EACjB,cAAc,EACd,KAAK,EACL,UAAU,EACb,EAAE,6BAA6B,2CAgE/B"}
1
+ {"version":3,"file":"UiObjectShareDialogCard.d.ts","sourceRoot":"","sources":["../../../src/@ui/UiObjectShareDialog/UiObjectShareDialogCard.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAOvC,OAAO,EACH,KAAK,kBAAkB,EAE1B,MAAM,iDAAiD,CAAC;AACzD,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AAQ/E;;;;;;GAMG;AACH,MAAM,WAAW,2BAA2B;IACxC,+DAA6D;IAC7D,EAAE,EAAE,MAAM,CAAC;IACX,sBAAsB;IACtB,IAAI,EAAE,iBAAiB,CAAC;IACxB,oBAAoB;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,8BAA8B;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,wEAAwE;IACxE,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;OAGG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,6BAA6B;IAC1C,6EAA2E;IAC3E,WAAW,EAAE,MAAM,CAAC;IACpB,iFAAiF;IACjF,OAAO,EAAE,MAAM,IAAI,CAAC;IAEpB,0EAA0E;IAC1E,QAAQ,EAAE,2BAA2B,EAAE,CAAC;IACxC,4EAA4E;IAC5E,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,sFAAoF;IACpF,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB,sCAAsC;IACtC,aAAa,EAAE,kBAAkB,CAAC;IAClC,mEAAmE;IACnE,qBAAqB,EAAE,CAAC,KAAK,EAAE,kBAAkB,KAAK,IAAI,CAAC;IAC3D,yFAAuF;IACvF,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC;;;OAGG;IACH,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,SAAS,CAAC;IAC9B;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAElC;;;;;OAKG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAElB,6CAA6C;IAC7C,UAAU,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CAAC,EACpC,WAAW,EACX,OAAO,EACP,QAAQ,EACR,UAAU,EACV,aAAa,EACb,aAAa,EACb,qBAAqB,EACrB,uBAAuB,EACvB,wBAAwB,EACxB,iBAAiB,EACjB,cAAc,EACd,KAAK,EACL,UAAU,EACb,EAAE,6BAA6B,2CA+D/B"}
@@ -22,7 +22,7 @@ export function UiObjectShareDialogCard({ objectTitle, onClose, grantees, onAddC
22
22
  const dialogTitle = intl.formatMessage(olpObjectShareDialogMessages.title, { title: objectTitle });
23
23
  return (_jsxs("div", { className: b(), "data-testid": dataTestId, children: [
24
24
  _jsx(UiDialogHeader, { title: dialogTitle, onClose: onClose }), error ? (_jsx("div", { className: e("error"), role: "alert", children: error })) : (_jsxs(_Fragment, { children: [
25
- _jsx(UiSectionHeading, { label: intl.formatMessage(olpObjectShareDialogMessages.sharedWith), action: _jsx(UiButton, { label: intl.formatMessage(olpObjectShareDialogMessages.add), variant: "popout", size: "small", iconBefore: "plus", isDisabled: isAddDisabled, onClick: onAddClick }) }), _jsx("div", { className: e("grantees"), children: grantees.map((grantee) => (_jsx(UiGranteeRow, { kind: grantee.kind, name: grantee.name, email: grantee.email, isOwner: grantee.isOwner, isPending: grantee.isPending, controls: grantee.controls }, grantee.id))) }), _jsx(UiSectionHeading, { label: intl.formatMessage(olpObjectShareDialogMessages.generalAccess) }), _jsx(UiGeneralAccessRadio, { value: generalAccess, onChange: onGeneralAccessChange, disabled: isGeneralAccessDisabled, workspaceAccessInherited: workspaceAccessInherited, workspaceControls: workspaceControls, workspaceLevel: workspaceLevel })
25
+ _jsx(UiSectionHeading, { label: intl.formatMessage(olpObjectShareDialogMessages.sharedWith), action: _jsx(UiButton, { label: intl.formatMessage(olpObjectShareDialogMessages.add), variant: "popout", size: "small", iconBefore: "plus", isDisabled: isAddDisabled, onClick: onAddClick }) }), _jsx("div", { className: e("grantees"), children: grantees.map((grantee) => (_jsx(UiGranteeRow, { kind: grantee.kind, name: grantee.name, email: grantee.email, isPending: grantee.isPending, controls: grantee.controls }, grantee.id))) }), _jsx(UiSectionHeading, { label: intl.formatMessage(olpObjectShareDialogMessages.generalAccess) }), _jsx(UiGeneralAccessRadio, { value: generalAccess, onChange: onGeneralAccessChange, disabled: isGeneralAccessDisabled, workspaceAccessInherited: workspaceAccessInherited, workspaceControls: workspaceControls, workspaceLevel: workspaceLevel })
26
26
  ] })), _jsx(UiDialogFooter, { divider: true, children: _jsx(UiButton, { label: intl.formatMessage(commonDialogMessages.close), variant: "secondary", size: "medium", onClick: onClose }) })
27
27
  ] }));
28
28
  }
@@ -1,4 +1,5 @@
1
1
  import { type ReactElement } from "react";
2
+ import { type IUiLabelsChecklistItem } from "../UiLabelsChecklist/UiLabelsChecklist.js";
2
3
  /**
3
4
  * Selectable permission level. The menu and the add-grantee picker only ever
4
5
  * assign VIEW or SHARE — EDIT is shown as a read-only row (via the model's
@@ -12,11 +13,27 @@ export type PermissionMenuLevel = "VIEW" | "SHARE";
12
13
  */
13
14
  export interface IUiPermissionMenuProps {
14
15
  /** Element that opens the menu on click. */
15
- anchor: ReactElement<any>;
16
+ anchor: ReactElement;
16
17
  /** Currently selected permission level — drives `aria-checked`. */
17
18
  selectedLevel?: PermissionMenuLevel;
18
19
  /** Fires when the user picks a permission level. */
19
20
  onPermissionChange: (level: PermissionMenuLevel) => void;
21
+ /**
22
+ * Levels rendered disabled (`aria-disabled`, click blocked) — e.g. levels
23
+ * above the caller's own when they manage their own access.
24
+ */
25
+ disabledLevels?: ReadonlyArray<PermissionMenuLevel>;
26
+ /** Tooltip shown on disabled level rows in place of the level's info text. */
27
+ disabledTooltip?: string;
28
+ /**
29
+ * Non-empty enables a labels row that drills into {@link UiLabelsChecklist}
30
+ * within the menu — for rows whose menu hosts every action (no "⋯" menu).
31
+ */
32
+ labels?: ReadonlyArray<IUiLabelsChecklistItem>;
33
+ /** Locked items are always treated as selected. */
34
+ selectedLabelIds?: ReadonlyArray<string>;
35
+ /** Fires with the applied label selection from the labels drill-in. */
36
+ onLabelsChange?: (selectedIds: string[]) => void;
20
37
  /** Fires when the user picks Remove access. */
21
38
  onRemoveAccess?: () => void;
22
39
  /** Test id forwarded to the menu body. */
@@ -25,11 +42,11 @@ export interface IUiPermissionMenuProps {
25
42
  /**
26
43
  * Per-grantee permission popover. Renders a fixed set of rows — two
27
44
  * permission levels (Can view & share / Can view), an optional divider,
28
- * and an optional Remove access action row. Each level row carries an
29
- * `infoCircle` tooltip. Labels and Transfer ownership live in the separate
30
- * {@link UiMoreOptionsMenu}.
45
+ * an optional labels drill-in and an optional Remove access action row.
46
+ * Each level row carries an `infoCircle` tooltip; disabled level rows
47
+ * (`disabledLevels`) swap it for `disabledTooltip`.
31
48
  *
32
49
  * @internal
33
50
  */
34
- export declare function UiPermissionMenu({ anchor, selectedLevel, onPermissionChange, onRemoveAccess, dataTestId }: IUiPermissionMenuProps): import("react/jsx-runtime").JSX.Element;
51
+ export declare function UiPermissionMenu({ anchor, selectedLevel, onPermissionChange, disabledLevels, disabledTooltip, labels, selectedLabelIds, onLabelsChange, onRemoveAccess, dataTestId }: IUiPermissionMenuProps): import("react/jsx-runtime").JSX.Element;
35
52
  //# sourceMappingURL=UiPermissionMenu.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"UiPermissionMenu.d.ts","sourceRoot":"","sources":["../../../src/@ui/UiPermissionMenu/UiPermissionMenu.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAsB,KAAK,YAAY,EAAU,MAAM,OAAO,CAAC;AActE;;;;;;GAMG;AACH,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG,OAAO,CAAC;AAEnD;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACnC,4CAA4C;IAC5C,MAAM,EAAE,YAAY,CAAC,GAAG,CAAC,CAAC;IAC1B,qEAAmE;IACnE,aAAa,CAAC,EAAE,mBAAmB,CAAC;IACpC,oDAAoD;IACpD,kBAAkB,EAAE,CAAC,KAAK,EAAE,mBAAmB,KAAK,IAAI,CAAC;IACzD,+CAA+C;IAC/C,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,0CAA0C;IAC1C,UAAU,CAAC,EAAE,MAAM,CAAC;CACvB;AAkBD;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,EAC7B,MAAM,EACN,aAAa,EACb,kBAAkB,EAClB,cAAc,EACd,UAAU,EACb,EAAE,sBAAsB,2CAiBxB"}
1
+ {"version":3,"file":"UiPermissionMenu.d.ts","sourceRoot":"","sources":["../../../src/@ui/UiPermissionMenu/UiPermissionMenu.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAsB,KAAK,YAAY,EAAoB,MAAM,OAAO,CAAC;AAShF,OAAO,EAAE,KAAK,sBAAsB,EAAqB,MAAM,2CAA2C,CAAC;AAM3G;;;;;;GAMG;AACH,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG,OAAO,CAAC;AAEnD;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACnC,4CAA4C;IAC5C,MAAM,EAAE,YAAY,CAAC;IACrB,qEAAmE;IACnE,aAAa,CAAC,EAAE,mBAAmB,CAAC;IACpC,oDAAoD;IACpD,kBAAkB,EAAE,CAAC,KAAK,EAAE,mBAAmB,KAAK,IAAI,CAAC;IACzD;;;OAGG;IACH,cAAc,CAAC,EAAE,aAAa,CAAC,mBAAmB,CAAC,CAAC;IACpD,8EAA8E;IAC9E,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;OAGG;IACH,MAAM,CAAC,EAAE,aAAa,CAAC,sBAAsB,CAAC,CAAC;IAC/C,mDAAmD;IACnD,gBAAgB,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IACzC,uEAAuE;IACvE,cAAc,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACjD,+CAA+C;IAC/C,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,0CAA0C;IAC1C,UAAU,CAAC,EAAE,MAAM,CAAC;CACvB;AAsBD;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,EAC7B,MAAM,EACN,aAAa,EACb,kBAAkB,EAClB,cAAc,EACd,eAAe,EACf,MAAM,EACN,gBAAgB,EAChB,cAAc,EACd,cAAc,EACd,UAAU,EACb,EAAE,sBAAsB,2CAuBxB"}
@@ -1,49 +1,65 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  // (C) 2026 GoodData Corporation
3
- import { useRef } from "react";
3
+ import { useRef, useState } from "react";
4
4
  import { useIntl } from "react-intl";
5
5
  import { olpPermissionMessages } from "../../locales.js";
6
6
  import { bem } from "../@utils/bem.js";
7
7
  import { UiIcon } from "../UiIcon/UiIcon.js";
8
8
  import { UiIconButton } from "../UiIconButton/UiIconButton.js";
9
+ import { UiLabelsChecklist } from "../UiLabelsChecklist/UiLabelsChecklist.js";
9
10
  import { UiPopover } from "../UiPopover/UiPopover.js";
10
11
  import { UiTooltip } from "../UiTooltip/UiTooltip.js";
11
12
  const { b, e } = bem("gd-ui-kit-permission-menu");
12
13
  /**
13
14
  * Per-grantee permission popover. Renders a fixed set of rows — two
14
15
  * permission levels (Can view & share / Can view), an optional divider,
15
- * and an optional Remove access action row. Each level row carries an
16
- * `infoCircle` tooltip. Labels and Transfer ownership live in the separate
17
- * {@link UiMoreOptionsMenu}.
16
+ * an optional labels drill-in and an optional Remove access action row.
17
+ * Each level row carries an `infoCircle` tooltip; disabled level rows
18
+ * (`disabledLevels`) swap it for `disabledTooltip`.
18
19
  *
19
20
  * @internal
20
21
  */
21
- export function UiPermissionMenu({ anchor, selectedLevel, onPermissionChange, onRemoveAccess, dataTestId, }) {
22
- return (_jsx(UiPopover, { anchor: anchor, anchorAccessibilityConfig: { ariaHaspopup: "menu" }, width: 180, content: ({ onClose }) => (_jsx(MenuBody, { selectedLevel: selectedLevel, onPermissionChange: onPermissionChange, onRemoveAccess: onRemoveAccess, onClose: onClose, dataTestId: dataTestId })) }));
22
+ export function UiPermissionMenu({ anchor, selectedLevel, onPermissionChange, disabledLevels, disabledTooltip, labels, selectedLabelIds, onLabelsChange, onRemoveAccess, dataTestId, }) {
23
+ const hasLabels = (labels?.length ?? 0) > 0;
24
+ return (_jsx(UiPopover, { anchor: anchor, anchorAccessibilityConfig: { ariaHaspopup: "menu" }, width: hasLabels ? 200 : 180, content: ({ onClose }) => (_jsx(MenuBody, { selectedLevel: selectedLevel, onPermissionChange: onPermissionChange, disabledLevels: disabledLevels, disabledTooltip: disabledTooltip, labels: labels, selectedLabelIds: selectedLabelIds, onLabelsChange: onLabelsChange, onRemoveAccess: onRemoveAccess, onClose: onClose, dataTestId: dataTestId })) }));
23
25
  }
24
- function MenuBody({ selectedLevel, onPermissionChange, onRemoveAccess, onClose, dataTestId, }) {
26
+ function MenuBody({ selectedLevel, onPermissionChange, disabledLevels, disabledTooltip, labels, selectedLabelIds, onLabelsChange, onRemoveAccess, onClose, dataTestId, }) {
25
27
  const intl = useIntl();
28
+ // Drill-in state — swaps the row list for the labels checklist. Local to the
29
+ // popover content, so it resets every time the menu opens.
30
+ const [view, setView] = useState("menu");
26
31
  const choose = (next) => () => {
27
32
  next();
28
33
  onClose();
29
34
  };
35
+ const hasLabels = (labels?.length ?? 0) > 0;
36
+ const levelItem = (level, label, tooltip) => {
37
+ const disabled = disabledLevels?.includes(level) ?? false;
38
+ return {
39
+ key: level,
40
+ label,
41
+ // A disabled level explains why it can't be picked instead of what it does.
42
+ tooltip: disabled && disabledTooltip ? disabledTooltip : tooltip,
43
+ radioValue: level,
44
+ disabled,
45
+ onClick: disabled ? () => { } : choose(() => onPermissionChange(level)),
46
+ };
47
+ };
30
48
  const levelItems = [
31
- {
32
- key: "SHARE",
33
- label: intl.formatMessage(olpPermissionMessages.canViewAndShare),
34
- tooltip: intl.formatMessage(olpPermissionMessages.canViewAndShareTooltip),
35
- radioValue: "SHARE",
36
- onClick: choose(() => onPermissionChange("SHARE")),
37
- },
38
- {
39
- key: "VIEW",
40
- label: intl.formatMessage(olpPermissionMessages.canView),
41
- tooltip: intl.formatMessage(olpPermissionMessages.canViewTooltip),
42
- radioValue: "VIEW",
43
- onClick: choose(() => onPermissionChange("VIEW")),
44
- },
49
+ levelItem("SHARE", intl.formatMessage(olpPermissionMessages.canViewAndShare), intl.formatMessage(olpPermissionMessages.canViewAndShareTooltip)),
50
+ levelItem("VIEW", intl.formatMessage(olpPermissionMessages.canView), intl.formatMessage(olpPermissionMessages.canViewTooltip)),
45
51
  ];
46
52
  const actionItems = [];
53
+ if (hasLabels) {
54
+ actionItems.push({
55
+ key: "labels",
56
+ label: intl.formatMessage(olpPermissionMessages.labels),
57
+ icon: "ldmLabel",
58
+ iconRight: "navigateRight",
59
+ // Drill in — the checklist owns Back/Cancel/Apply and closes the menu itself.
60
+ onClick: () => setView("labels"),
61
+ });
62
+ }
47
63
  if (onRemoveAccess) {
48
64
  actionItems.push({
49
65
  key: "remove",
@@ -81,6 +97,9 @@ function MenuBody({ selectedLevel, onPermissionChange, onRemoveAccess, onClose,
81
97
  event.preventDefault();
82
98
  focusable[nextIndex]?.focus();
83
99
  };
100
+ if (view === "labels") {
101
+ return (_jsx("div", { className: b(), "data-testid": dataTestId, children: _jsx(UiLabelsChecklist, { items: labels ?? [], defaultSelectedIds: selectedLabelIds ?? [], onApply: (ids) => onLabelsChange?.(ids), onBack: () => setView("menu"), onClose: onClose, dataTestId: dataTestId }) }));
102
+ }
84
103
  return (_jsx("div", { className: b(), "data-testid": dataTestId, children: _jsxs("div", { ref: menuRef, className: e("items"), role: "menu", "aria-orientation": "vertical", "aria-label": intl.formatMessage(olpPermissionMessages.menuLabel), onKeyDown: handleKeyDown, children: [levelItems.map((item) => (_jsx(PermissionMenuItem, { item: item, selectedLevel: selectedLevel }, item.key))), actionItems.length > 0 ? _jsx("div", { className: e("divider"), role: "separator" }) : null, actionItems.map((item) => (_jsx(PermissionMenuItem, { item: item, selectedLevel: selectedLevel }, item.key)))] }) }));
85
104
  }
86
105
  function PermissionMenuItem({ item, selectedLevel }) {
@@ -92,8 +111,7 @@ function PermissionMenuItem({ item, selectedLevel }) {
92
111
  const isRadio = !!item.radioValue;
93
112
  const isChecked = isRadio && item.radioValue === selectedLevel;
94
113
  return (_jsxs("div", { className: e("item-row"), children: [
95
- _jsxs("button", { type: "button", role: isRadio ? "menuitemradio" : "menuitem", "aria-checked": isRadio ? isChecked : undefined, className: e("item"), onClick: item.onClick, children: [item.icon ? _jsx(UiIcon, { type: item.icon, size: 16, color: "complementary-7" }) : null, _jsx("span", { className: e("item-label"), children: item.label })
96
- ] }), item.tooltip ? (_jsx(UiTooltip, { triggerBy: ["hover", "focus"], content: item.tooltip, anchor: _jsx(UiIconButton, { icon: "infoCircle", variant: "tertiary", size: "small", accessibilityConfig: {
114
+ _jsxs("button", { type: "button", role: isRadio ? "menuitemradio" : "menuitem", "aria-checked": isRadio ? isChecked : undefined, "aria-disabled": item.disabled ? true : undefined, className: e("item", { disabled: Boolean(item.disabled) }), onClick: item.onClick, children: [item.icon ? _jsx(UiIcon, { type: item.icon, size: 16, color: "complementary-7" }) : null, _jsx("span", { className: e("item-label"), children: item.label }), item.iconRight ? _jsx(UiIcon, { type: item.iconRight, size: 14, color: "complementary-7" }) : null] }), item.tooltip ? (_jsx(UiTooltip, { triggerBy: ["hover", "focus"], content: item.tooltip, anchor: _jsx(UiIconButton, { icon: "infoCircle", variant: "tertiary", size: "small", accessibilityConfig: {
97
115
  ariaLabel: intl.formatMessage(olpPermissionMessages.moreInfoAriaLabel, {
98
116
  label: item.label,
99
117
  }),
@@ -1,4 +1,8 @@
1
1
  import { type MouseEvent } from "react";
2
+ /**
3
+ * @internal
4
+ */
5
+ export declare const DATE_DATASET_LIST_ITEM_CLASSNAME = "gd-list-item gd-list-item-shortened";
2
6
  /**
3
7
  * @internal
4
8
  */
@@ -8,10 +12,11 @@ export interface IDateDatasetsListItemProps {
8
12
  isHeader?: boolean;
9
13
  isSelected?: boolean;
10
14
  isUnrelated?: boolean;
15
+ width?: number;
11
16
  onClick: (e: MouseEvent<HTMLDivElement>) => void;
12
17
  }
13
18
  /**
14
19
  * @internal
15
20
  */
16
- export declare function DateDatasetsListItem({ id, title, isHeader, isSelected, isUnrelated, onClick }: IDateDatasetsListItemProps): import("react/jsx-runtime").JSX.Element;
21
+ export declare function DateDatasetsListItem({ id, title, isHeader, isSelected, isUnrelated, width, onClick }: IDateDatasetsListItemProps): import("react/jsx-runtime").JSX.Element;
17
22
  //# sourceMappingURL=DateDatasetsListItem.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DateDatasetsListItem.d.ts","sourceRoot":"","sources":["../../src/List/DateDatasetsListItem.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,OAAO,CAAC;AASxC;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACvC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,OAAO,EAAE,CAAC,CAAC,EAAE,UAAU,CAAC,cAAc,CAAC,KAAK,IAAI,CAAC;CACpD;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,EACjC,EAAE,EACF,KAAK,EACL,QAAQ,EACR,UAAU,EACV,WAAW,EACX,OAAO,EACV,EAAE,0BAA0B,2CA8B5B"}
1
+ {"version":3,"file":"DateDatasetsListItem.d.ts","sourceRoot":"","sources":["../../src/List/DateDatasetsListItem.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,UAAU,EAAqB,MAAM,OAAO,CAAC;AAS3D;;GAEG;AACH,eAAO,MAAM,gCAAgC,wCAAwC,CAAC;AAEtF;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACvC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,CAAC,CAAC,EAAE,UAAU,CAAC,cAAc,CAAC,KAAK,IAAI,CAAC;CACpD;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,EACjC,EAAE,EACF,KAAK,EACL,QAAQ,EACR,UAAU,EACV,WAAW,EACX,KAAK,EACL,OAAO,EACV,EAAE,0BAA0B,2CAwC5B"}
@@ -1,4 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
+ // (C) 2007-2026 GoodData Corporation
3
+ import { useEffect, useRef } from "react";
2
4
  import cx from "classnames";
3
5
  import { FormattedMessage } from "react-intl";
4
6
  import { simplifyText } from "@gooddata/util";
@@ -6,11 +8,23 @@ import { ShortenedText } from "../ShortenedText/ShortenedText.js";
6
8
  /**
7
9
  * @internal
8
10
  */
9
- export function DateDatasetsListItem({ id, title, isHeader, isSelected, isUnrelated, onClick, }) {
11
+ export const DATE_DATASET_LIST_ITEM_CLASSNAME = "gd-list-item gd-list-item-shortened";
12
+ /**
13
+ * @internal
14
+ */
15
+ export function DateDatasetsListItem({ id, title, isHeader, isSelected, isUnrelated, width, onClick, }) {
16
+ const shortenedTextRef = useRef(null);
17
+ const currentWidthRef = useRef(width);
18
+ useEffect(() => {
19
+ if (shortenedTextRef.current && currentWidthRef.current !== width) {
20
+ currentWidthRef.current = width;
21
+ shortenedTextRef.current.recomputeShortening();
22
+ }
23
+ }, [width]);
10
24
  if (isHeader) {
11
25
  return (_jsx("div", { className: "gd-list-item gd-list-item-header", children: _jsx(FormattedMessage, { id: title }) }));
12
26
  }
13
- const classNames = cx("gd-list-item", "gd-list-item-shortened", `s-${id}`, `s-${simplifyText(title ?? "")}`, {
27
+ const classNames = cx(DATE_DATASET_LIST_ITEM_CLASSNAME, `s-${id}`, `s-${simplifyText(title ?? "")}`, {
14
28
  "is-selected": isSelected,
15
29
  "is-unrelated": isUnrelated,
16
30
  });
@@ -18,5 +32,5 @@ export function DateDatasetsListItem({ id, title, isHeader, isSelected, isUnrela
18
32
  { align: "cl cr", offset: { x: -10, y: 0 } },
19
33
  { align: "cr cl", offset: { x: 10, y: 0 } },
20
34
  ];
21
- return (_jsx("div", { className: classNames, onClick: onClick, children: _jsx(ShortenedText, { tooltipAlignPoints: tooltipAlignPoints, children: title ?? "" }) }));
35
+ return (_jsx("div", { className: classNames, onClick: onClick, children: _jsx(ShortenedText, { ref: shortenedTextRef, tooltipAlignPoints: tooltipAlignPoints, ellipsisPosition: "end", children: title ?? "" }) }));
22
36
  }
@@ -21,7 +21,7 @@ export interface INumberParameterControlDropdownProps {
21
21
  }
22
22
  /**
23
23
  * Dropdown panel for editing a numeric parameter value. Owns the draft, inline validation,
24
- * preview, and (mode-aware) Reset via `resetValue`.
24
+ * and (mode-aware) Reset via `resetValue`.
25
25
  *
26
26
  * @internal
27
27
  */
@@ -1 +1 @@
1
- {"version":3,"file":"NumberParameterControlDropdown.d.ts","sourceRoot":"","sources":["../../src/ParameterControl/NumberParameterControlDropdown.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAoB,KAAK,iBAAiB,EAAkB,MAAM,YAAY,CAAC;AAEtF,OAAO,EAAE,KAAK,2BAA2B,EAA+B,MAAM,qBAAqB,CAAC;AAEpG,OAAO,EAAE,KAAK,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AAWxE;;GAEG;AACH,MAAM,WAAW,oCAAoC;IACjD,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,2BAA2B,CAAC;IAC1C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,cAAc,CAAC,EAAE,wBAAwB,CAAC,gBAAgB,CAAC,CAAC;IAC5D,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACjC,QAAQ,EAAE,MAAM,IAAI,CAAC;CACxB;AAED;;;;;GAKG;AACH,wBAAgB,8BAA8B,CAAC,EAC3C,IAAI,EACJ,KAAK,EACL,UAAU,EACV,WAAW,EACX,OAAO,EACP,cAAc,EACd,OAAO,EACP,QAAQ,EACX,EAAE,oCAAoC,2CA0BtC;AAED;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CACnC,KAAK,EAAE,MAAM,EACb,WAAW,CAAC,EAAE,2BAA2B,GAC1C,iBAAiB,GAAG,SAAS,CAgB/B"}
1
+ {"version":3,"file":"NumberParameterControlDropdown.d.ts","sourceRoot":"","sources":["../../src/ParameterControl/NumberParameterControlDropdown.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAoB,KAAK,iBAAiB,EAAkB,MAAM,YAAY,CAAC;AAEtF,OAAO,EAAE,KAAK,2BAA2B,EAA+B,MAAM,qBAAqB,CAAC;AAEpG,OAAO,EAAE,KAAK,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AAWxE;;GAEG;AACH,MAAM,WAAW,oCAAoC;IACjD,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,2BAA2B,CAAC;IAC1C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,cAAc,CAAC,EAAE,wBAAwB,CAAC,gBAAgB,CAAC,CAAC;IAC5D,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACjC,QAAQ,EAAE,MAAM,IAAI,CAAC;CACxB;AAED;;;;;GAKG;AACH,wBAAgB,8BAA8B,CAAC,EAC3C,IAAI,EACJ,KAAK,EACL,UAAU,EACV,WAAW,EACX,OAAO,EACP,cAAc,EACd,OAAO,EACP,QAAQ,EACX,EAAE,oCAAoC,2CA2BtC;AAED;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CACnC,KAAK,EAAE,MAAM,EACb,WAAW,CAAC,EAAE,2BAA2B,GAC1C,iBAAiB,GAAG,SAAS,CAgB/B"}