synapse-react-client 3.3.1 → 3.3.2

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.
@@ -53512,6 +53512,9 @@ Please use another name.` : formatMuiErrorMessage$1(18));
53512
53512
  );
53513
53513
  };
53514
53514
  const createAccessRequirement = (accessToken, accessRequirement) => {
53515
+ if ("description" in accessRequirement) {
53516
+ delete accessRequirement.description;
53517
+ }
53515
53518
  return doPost(
53516
53519
  ACCESS_REQUIREMENT,
53517
53520
  accessRequirement,
@@ -53520,6 +53523,9 @@ Please use another name.` : formatMuiErrorMessage$1(18));
53520
53523
  );
53521
53524
  };
53522
53525
  const updateAccessRequirement = (accessToken, accessRequirement) => {
53526
+ if ("description" in accessRequirement) {
53527
+ delete accessRequirement.description;
53528
+ }
53523
53529
  return doPut(
53524
53530
  `${ACCESS_REQUIREMENT}/${accessRequirement.id}`,
53525
53531
  accessRequirement,
@@ -174099,9 +174105,19 @@ dl_list_file_entities = syn.get_download_list()`;
174099
174105
  }
174100
174106
  );
174101
174107
  };
174108
+ function ReadOnlyPermissionLevel(props) {
174109
+ const { accessType } = props;
174110
+ return permissionLevelToLabel[getPermissionLevelFromAccessType(accessType)];
174111
+ }
174102
174112
  const REMOVE_BUTTON_LABEL = "Remove from AR Permissions";
174103
174113
  const ResourceAccessItem = (props) => {
174104
- const { resourceAccess, availablePermissionLevels: availablePermissionLevels2, onChange, onRemove: onRemove2 } = props;
174114
+ const {
174115
+ resourceAccess,
174116
+ availablePermissionLevels: availablePermissionLevels2,
174117
+ isInEditMode,
174118
+ onChange,
174119
+ onRemove: onRemove2
174120
+ } = props;
174105
174121
  return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
174106
174122
  Stack$6,
174107
174123
  {
@@ -174114,27 +174130,30 @@ dl_list_file_entities = syn.get_download_list()`;
174114
174130
  children: [
174115
174131
  /* @__PURE__ */ jsxRuntimeExports.jsx(Typography, { fontSize: "16px", lineHeight: "20px", children: /* @__PURE__ */ jsxRuntimeExports.jsx(UserOrTeamBadge, { principalId: resourceAccess.principalId }) }),
174116
174132
  /* @__PURE__ */ jsxRuntimeExports.jsxs(Stack$6, { direction: "row", gap: "10px", alignItems: "center", width: "225px", children: [
174117
- /* @__PURE__ */ jsxRuntimeExports.jsx(
174118
- PermissionLevelMenu,
174119
- {
174120
- currentAccessType: resourceAccess.accessType,
174121
- availablePermissionLevels: availablePermissionLevels2,
174122
- onChange
174123
- }
174124
- ),
174125
- /* @__PURE__ */ jsxRuntimeExports.jsx(
174126
- IconSvgButton,
174127
- {
174128
- "aria-label": REMOVE_BUTTON_LABEL,
174129
- onClick: () => onRemove2(),
174130
- icon: "delete",
174131
- sx: {
174132
- "&:hover": {
174133
- color: "error.main"
174133
+ !isInEditMode && /* @__PURE__ */ jsxRuntimeExports.jsx(ReadOnlyPermissionLevel, { accessType: resourceAccess.accessType }),
174134
+ isInEditMode && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
174135
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
174136
+ PermissionLevelMenu,
174137
+ {
174138
+ currentAccessType: resourceAccess.accessType,
174139
+ availablePermissionLevels: availablePermissionLevels2,
174140
+ onChange
174141
+ }
174142
+ ),
174143
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
174144
+ IconSvgButton,
174145
+ {
174146
+ "aria-label": REMOVE_BUTTON_LABEL,
174147
+ onClick: () => onRemove2(),
174148
+ icon: "delete",
174149
+ sx: {
174150
+ "&:hover": {
174151
+ color: "error.main"
174152
+ }
174134
174153
  }
174135
174154
  }
174136
- }
174137
- )
174155
+ )
174156
+ ] })
174138
174157
  ] })
174139
174158
  ]
174140
174159
  }
@@ -174142,6 +174161,7 @@ dl_list_file_entities = syn.get_download_list()`;
174142
174161
  };
174143
174162
  function AclEditor(props) {
174144
174163
  const {
174164
+ isInEditMode,
174145
174165
  isLoading,
174146
174166
  resourceAccessList,
174147
174167
  availablePermissionLevels: availablePermissionLevels2,
@@ -174162,6 +174182,7 @@ dl_list_file_entities = syn.get_download_list()`;
174162
174182
  {
174163
174183
  resourceAccess,
174164
174184
  availablePermissionLevels: availablePermissionLevels2,
174185
+ isInEditMode,
174165
174186
  onChange: (accessType) => updateResourceAccessItem(
174166
174187
  resourceAccess.principalId,
174167
174188
  accessType
@@ -174172,7 +174193,7 @@ dl_list_file_entities = syn.get_download_list()`;
174172
174193
  ) }, resourceAccess.principalId);
174173
174194
  }) })
174174
174195
  ] }),
174175
- /* @__PURE__ */ jsxRuntimeExports.jsxs(Box, { children: [
174196
+ isInEditMode && /* @__PURE__ */ jsxRuntimeExports.jsxs(Box, { children: [
174176
174197
  /* @__PURE__ */ jsxRuntimeExports.jsx(Typography, { variant: "headline3", mb: "10px", children: "Add More" }),
174177
174198
  /* @__PURE__ */ jsxRuntimeExports.jsx(
174178
174199
  Typography,
@@ -174317,6 +174338,7 @@ dl_list_file_entities = syn.get_download_list()`;
174317
174338
  resourceAccessList,
174318
174339
  availablePermissionLevels,
174319
174340
  isLoading: isLoadingOriginalAcl,
174341
+ isInEditMode: true,
174320
174342
  emptyText: EMPTY_RESOURCE_ACCESS_LIST_TEXT,
174321
174343
  addResourceAccessItem,
174322
174344
  updateResourceAccessItem,