@bigbinary/neeto-team-members-frontend 5.0.13 → 5.0.15

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/dist/Roles.js CHANGED
@@ -1895,23 +1895,31 @@ var getScrollBarWidth = function getScrollBarWidth() {
1895
1895
  };
1896
1896
 
1897
1897
  var _renderDescription = function renderDescription(permissions, filteredPermissions) {
1898
+ var permissionTooltip = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
1898
1899
  return permissions === null || permissions === void 0 ? void 0 : permissions.map(function (_ref) {
1899
1900
  var id = _ref.id,
1901
+ name = _ref.name,
1900
1902
  description = _ref.description,
1901
1903
  children = _ref.children;
1904
+ var tooltipContent = permissionTooltip[name];
1902
1905
  return /*#__PURE__*/jsxs(Fragment$1, {
1903
1906
  children: [filteredPermissions.includes(id) && /*#__PURE__*/jsx("div", {
1904
1907
  className: "ntm-roles-table-sidebar__list-item",
1905
1908
  "data-name": description,
1906
- children: /*#__PURE__*/jsx(Typography, {
1907
- "data-testid": "ntm-permission-category-description",
1908
- lineHeight: "normal",
1909
- style: "body2",
1910
- children: description
1909
+ children: /*#__PURE__*/jsx(Tooltip, {
1910
+ content: tooltipContent,
1911
+ disabled: !tooltipContent,
1912
+ position: "right",
1913
+ children: /*#__PURE__*/jsx(Typography, {
1914
+ "data-testid": "ntm-permission-category-description",
1915
+ lineHeight: "normal",
1916
+ style: "body2",
1917
+ children: description
1918
+ })
1911
1919
  })
1912
- }, id), /*#__PURE__*/jsx("div", {
1920
+ }), /*#__PURE__*/jsx("div", {
1913
1921
  className: "neeto-ui-relative neeto-ui-pl-6 ntm-roles-table-sidebar__sub-blocks",
1914
- children: _renderDescription(children, filteredPermissions)
1922
+ children: _renderDescription(children, filteredPermissions, permissionTooltip)
1915
1923
  })]
1916
1924
  }, id);
1917
1925
  });
@@ -2141,7 +2149,9 @@ var Sidebar = function Sidebar(_ref) {
2141
2149
  _ref$permissions = _ref.permissions,
2142
2150
  permissions = _ref$permissions === void 0 ? [] : _ref$permissions,
2143
2151
  _ref$permissionRelati = _ref.permissionRelationConfig,
2144
- permissionRelationConfig = _ref$permissionRelati === void 0 ? {} : _ref$permissionRelati;
2152
+ permissionRelationConfig = _ref$permissionRelati === void 0 ? {} : _ref$permissionRelati,
2153
+ _ref$permissionToolti = _ref.permissionTooltip,
2154
+ permissionTooltip = _ref$permissionToolti === void 0 ? {} : _ref$permissionToolti;
2145
2155
  var _useTranslation = useTranslation(),
2146
2156
  t = _useTranslation.t;
2147
2157
  var categories = useMemo(function () {
@@ -2205,7 +2215,7 @@ var Sidebar = function Sidebar(_ref) {
2205
2215
  })]
2206
2216
  }), isPermissionVisible && /*#__PURE__*/jsx("div", {
2207
2217
  className: "ntm-roles-table-sidebar__list-item-spacing-handler ms-[12px] px-[24px]",
2208
- children: _renderDescription(groupedPermissionsWithChildren[category], pluck("id", filteredGroupPermissions.get(category).get("permissions") || []))
2218
+ children: _renderDescription(groupedPermissionsWithChildren[category], pluck("id", filteredGroupPermissions.get(category).get("permissions") || []), permissionTooltip)
2209
2219
  })]
2210
2220
  }, index);
2211
2221
  })
@@ -2215,7 +2225,7 @@ var Sidebar = function Sidebar(_ref) {
2215
2225
  };
2216
2226
 
2217
2227
  var Table = function Table(_ref) {
2218
- var _config$permissionRel;
2228
+ var _config$permissionRel, _config$permissionToo;
2219
2229
  var config = _ref.config,
2220
2230
  filteredRoles = _ref.filteredRoles,
2221
2231
  roles = _ref.roles,
@@ -2281,7 +2291,8 @@ var Table = function Table(_ref) {
2281
2291
  isScrollPresent: isScrollPresent,
2282
2292
  permissions: permissions,
2283
2293
  toggleDropdown: toggleDropdown,
2284
- permissionRelationConfig: (_config$permissionRel = config === null || config === void 0 ? void 0 : config.permissionRelation) !== null && _config$permissionRel !== void 0 ? _config$permissionRel : {}
2294
+ permissionRelationConfig: (_config$permissionRel = config === null || config === void 0 ? void 0 : config.permissionRelation) !== null && _config$permissionRel !== void 0 ? _config$permissionRel : {},
2295
+ permissionTooltip: (_config$permissionToo = config === null || config === void 0 ? void 0 : config.permissionTooltip) !== null && _config$permissionToo !== void 0 ? _config$permissionToo : {}
2285
2296
  }), /*#__PURE__*/jsx(Columns, {
2286
2297
  config: config,
2287
2298
  filteredGroupPermissions: filteredGroupPermissions,