UNPKG

synapse-react-client

Version:

[![npm version](https://badge.fury.io/js/synapse-react-client.svg)](https://badge.fury.io/js/synapse-react-client) [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettie

64 lines (63 loc) 2.47 kB
import { jsxs as e, Fragment as i, jsx as n } from "react/jsx-runtime"; import { useGetEntityHeader as c } from "../../synapse-queries/entity/useGetEntityHeaders.js"; import { entityTypeToFriendlyName as f, convertToEntityType as g } from "../../utils/functions/EntityTypeUtils.js"; import { SYNAPSE_DOCS_SHARING_SETTINGS_PERMISSIONS_CONDITIONS_FOR_USE_URL as m } from "../../utils/SynapseConstants.js"; import { Typography as r, Link as y } from "@mui/material"; import { EntityLink as a } from "../EntityLink.js"; function v(s) { const { isProject: h, isInherited: l, isAfterUpload: d = !1, benefactorId: t } = s, { data: o } = c( t, void 0, { enabled: !!t } ); return d ? /* @__PURE__ */ e(i, { children: [ /* @__PURE__ */ e(r, { variant: "body1", children: [ "Currently, the sharing settings are inherited from the", " ", o ? f( g(o.type) ).toLowerCase() : "container", " ", "named", t ? /* @__PURE__ */ e(i, { children: [ " ", /* @__PURE__ */ n(a, { entity: t }), " " ] }) : "", ". If you wish to customize settings for a particular file, folder, or table, you must establish ", /* @__PURE__ */ n("strong", { children: "Local Sharing Settings" }), " to make modifications." ] }), /* @__PURE__ */ e(r, { variant: "body1", children: [ "After uploading, choose the file you want to customize sharing settings for, then navigate to File Tools >", " ", /* @__PURE__ */ n( y, { href: m, children: "File Sharing Settings" } ), "." ] }) ] }) : h ? /* @__PURE__ */ n(r, { variant: "body1", children: "The sharing settings shown below apply to this project and are inherited by all project contents unless local sharing settings have been set." }) : l ? /* @__PURE__ */ e(r, { variant: "body1", children: [ "The sharing settings shown below are currently being inherited", " ", t ? /* @__PURE__ */ e(i, { children: [ "from ", /* @__PURE__ */ n(a, { entity: t }), " " ] }) : "", "and cannot be modified here." ] }) : /* @__PURE__ */ e(r, { variant: "body1", children: [ "The local sharing settings shown below are ", /* @__PURE__ */ n("strong", { children: "not" }), " being inherited from a parent resource." ] }); } export { v as InheritanceMessage }; //# sourceMappingURL=InheritanceMessage.js.map