@bigbinary/neeto-team-members-frontend 2.5.15 → 2.5.16

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/index.esm.js CHANGED
@@ -11382,11 +11382,17 @@ const AppList = _ref => {
11382
11382
  const selectedEmail = pluck("value", emails);
11383
11383
  useEffect(() => {
11384
11384
  if (savedStateRef.current.isAppListEnabled !== isAppListEnabled) {
11385
- appRoles.forEach((_, index) => {
11385
+ appRoles.forEach((appRole, index) => {
11386
+ var _globalProps$appName;
11387
+ if ((appRole === null || appRole === void 0 ? void 0 : appRole.appName) === ((_globalProps$appName = globalProps.appName) === null || _globalProps$appName === void 0 ? void 0 : _globalProps$appName.substring(5))) {
11388
+ setFieldValue(`appRoles[${index}].isEnabled`, true);
11389
+ return;
11390
+ }
11386
11391
  setFieldValue(`appRoles[${index}].isEnabled`, isAppListEnabled);
11387
11392
  });
11388
11393
  }
11389
11394
  savedStateRef.current.isAppListEnabled = isAppListEnabled;
11395
+ // eslint-disable-next-line react-hooks/exhaustive-deps
11390
11396
  }, [isAppListEnabled]);
11391
11397
  const buildRoleOptions = roles => roles.map(role => toLabelAndValue(role.name));
11392
11398
  return /*#__PURE__*/React.createElement("div", {
@@ -11410,10 +11416,10 @@ const AppList = _ref => {
11410
11416
  })), /*#__PURE__*/React.createElement("div", {
11411
11417
  className: "neeto-ui-w-full"
11412
11418
  }, appRoles.map((_ref2, index) => {
11413
- var _globalProps$appName;
11419
+ var _globalProps$appName2;
11414
11420
  let appName = _ref2.appName,
11415
11421
  isEnabled = _ref2.isEnabled;
11416
- const isCurrentApp = appName === ((_globalProps$appName = globalProps.appName) === null || _globalProps$appName === void 0 ? void 0 : _globalProps$appName.substring(5));
11422
+ const isCurrentApp = appName === ((_globalProps$appName2 = globalProps.appName) === null || _globalProps$appName2 === void 0 ? void 0 : _globalProps$appName2.substring(5));
11417
11423
  const isAppRoleSelectionChecked = isCurrentApp || isEnabled && isAppListEnabled;
11418
11424
  return /*#__PURE__*/React.createElement("div", {
11419
11425
  className: "ntm-manage-members__app-roles",