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

94 lines (93 loc) 3.4 kB
import { jsx as o, Fragment as a, jsxs as p } from "react/jsx-runtime"; import "../../synapse-client/SynapseClient.js"; import "@sage-bionetworks/synapse-client/generated/models/ErrorResponseCode"; import "@sage-bionetworks/synapse-client/generated/models/TwoFactorAuthErrorResponse"; import "@sage-bionetworks/synapse-client/util/SynapseClientError"; import "@sage-bionetworks/synapse-types"; import { isEntityRefCollectionView as u } from "../../utils/functions/EntityTypeUtils.js"; import { BUNDLE_MASK_QUERY_COUNT as c } from "../../utils/SynapseConstants.js"; import "lodash-es"; import "@sage-bionetworks/synapse-client/util/synapseClientFetch"; import "@tanstack/react-query"; import "../../utils/PermissionLevelToAccessType.js"; import "react"; import "../../utils/context/SynapseContext.js"; import "use-deep-compare-effect"; import { Typography as d } from "@mui/material"; import "../../utils/hooks/useCookiePreferences.js"; import "../../utils/hooks/useSourceAppConfigs.js"; import "universal-cookie"; import "../../utils/AppUtils/session/ApplicationSessionContext.js"; import "../../utils/context/FullContextProvider.js"; import "../../utils/context/DocumentMetadataContext.js"; import '../../style/components/_spinner.css';/* empty css */ import "@tanstack/query-core"; import "lodash-es/isEmpty"; import "lodash-es/isEqual"; import "lodash-es/xorWith"; import "react-router"; import "@sage-bionetworks/synapse-client"; import "../../utils/types/IsType.js"; import { useGetQueryResultBundleWithAsyncStatus as f } from "../../synapse-queries/entity/useGetQueryResultBundle.js"; import { WarningSharp as g } from "@mui/icons-material"; import { HelpPopover as S } from "../HelpPopover/HelpPopover.js"; const b = "Files may be unavailable because you do not have permission to see them, they have been deleted, or the Dataset has been misconfigured.", h = "Files may be unavailable because you do not have permission to see them or the Dataset was misconfigured."; function X({ entity: e }) { const r = e && u(e), n = { concreteType: "org.sagebionetworks.repo.model.table.QueryBundleRequest", query: { sql: `SELECT * FROM ${e.id}${!e.isLatestVersion && e.versionNumber ? `.${e.versionNumber}` : ""}` }, entityId: e.id, partMask: c }, { data: s } = f( n, { enabled: r } ); if (r && s && e) { const i = s.responseBody.queryCount, m = e.items?.length ?? 0; if (i >= m) return /* @__PURE__ */ o(a, {}); const l = m - i; let t = ""; return e.isLatestVersion ? t = b : t = h, /* @__PURE__ */ p( d, { component: "div", className: "SRC-centerContent", style: { marginLeft: 10 }, variant: "smallText1", color: "textSecondary", children: [ /* @__PURE__ */ o( g, { className: "SRC-color-warning", style: { fontSize: "16px" } } ), l.toLocaleString() + " Unavailable", /* @__PURE__ */ o( S, { className: "SRC-margin-left-5", markdownText: t, placement: "right" } ) ] } ); } else return /* @__PURE__ */ o(a, {}); } export { X as default }; //# sourceMappingURL=MissingQueryResultsWarning.js.map