synapse-react-client 4.0.17 → 4.0.18
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/README.md +5 -3
- package/dist/SWC.index.d.ts.map +1 -1
- package/dist/SWC.index.js +1 -1
- package/dist/SWC.index.js.map +1 -1
- package/dist/assets/homepage/BlinkingLiveIcon.d.ts +1 -1
- package/dist/components/AccessRequirementAclEditor/AccessRequirementAclEditor.d.ts.map +1 -1
- package/dist/components/AccessRequirementAclEditor/AccessRequirementAclEditor.js.map +1 -1
- package/dist/components/AccessRequirementList/AccessRequirementList.js.map +1 -1
- package/dist/components/AccessRequirementList/RequirementItem/CertificationRequirement.js.map +1 -1
- package/dist/components/AccessRequirementList/RequirementItem/SelfSignAccessRequirementItem.js.map +1 -1
- package/dist/components/AccessRequirementList/RequirementItem/UnmanagedACTAccessRequirementItem.js.map +1 -1
- package/dist/components/AccessRequirementList/RequirementItem/ValidationRequirement.js.map +1 -1
- package/dist/components/AccessTokenPage/CreateAccessTokenModal.d.ts.map +1 -1
- package/dist/components/AccessTokenPage/CreateAccessTokenModal.js +56 -54
- package/dist/components/AccessTokenPage/CreateAccessTokenModal.js.map +1 -1
- package/dist/components/Authentication/PasswordField.d.ts +1 -1
- package/dist/components/Authentication/PasswordField.d.ts.map +1 -1
- package/dist/components/Authentication/PasswordField.js.map +1 -1
- package/dist/components/Authentication/TwoFactorEnrollmentForm.d.ts.map +1 -1
- package/dist/components/Authentication/TwoFactorEnrollmentForm.js +1 -2
- package/dist/components/Authentication/TwoFactorEnrollmentForm.js.map +1 -1
- package/dist/components/Authentication/UsernamePasswordForm.d.ts.map +1 -1
- package/dist/components/Authentication/UsernamePasswordForm.js +32 -29
- package/dist/components/Authentication/UsernamePasswordForm.js.map +1 -1
- package/dist/components/CardContainer/CardLink.d.ts +2 -2
- package/dist/components/CardContainer/CardLink.d.ts.map +1 -1
- package/dist/components/CardDeck/CardDeckCardProps.d.ts.map +1 -1
- package/dist/components/ChallengeSubmission/SubmissionDirectoryList.js.map +1 -1
- package/dist/components/ChallengeTeamWizard/CreateChallengeTeam.d.ts.map +1 -1
- package/dist/components/ChallengeTeamWizard/CreateChallengeTeam.js +106 -103
- package/dist/components/ChallengeTeamWizard/CreateChallengeTeam.js.map +1 -1
- package/dist/components/ChallengeTeamWizard/MembershipRequestForm.d.ts.map +1 -1
- package/dist/components/ChallengeTeamWizard/MembershipRequestForm.js.map +1 -1
- package/dist/components/ChallengeTeamWizard/useCreateAndRegisterChallengeTeam.d.ts.map +1 -1
- package/dist/components/ChallengeTeamWizard/useCreateAndRegisterChallengeTeam.js.map +1 -1
- package/dist/components/CreateProjectModal/CreateProjectModal.d.ts.map +1 -1
- package/dist/components/CreateProjectModal/CreateProjectModal.js +4 -4
- package/dist/components/CreateProjectModal/CreateProjectModal.js.map +1 -1
- package/dist/components/CreateTableViewWizard/TableNameForm.js +6 -6
- package/dist/components/CreateTableViewWizard/TableNameForm.js.map +1 -1
- package/dist/components/CrispChat/CrispChat.js +4 -4
- package/dist/components/CrispChat/CrispChat.js.map +1 -1
- package/dist/components/DataGrid/utils/json-rx/JsonRxResponseComplete.js.map +1 -1
- package/dist/components/DownloadCart/RequestDownloadCard.js +14 -14
- package/dist/components/DownloadCart/RequestDownloadCard.js.map +1 -1
- package/dist/components/EntityAclEditor/EntityAclEditor.d.ts.map +1 -1
- package/dist/components/EntityAclEditor/EntityAclEditor.js.map +1 -1
- package/dist/components/EntityBadgeIcons/EntityBadgeIcons.d.ts.map +1 -1
- package/dist/components/EntityBadgeIcons/EntityBadgeIcons.js.map +1 -1
- package/dist/components/EntityCitation/EntityCitationUtils.js.map +1 -1
- package/dist/components/EntityDownloadConfirmation/EntityDownloadConfirmation.js.map +1 -1
- package/dist/components/EntityFinder/EntityFinder.js.map +1 -1
- package/dist/components/EntityFinder/EntityIdTextField.d.ts +17 -0
- package/dist/components/EntityFinder/EntityIdTextField.d.ts.map +1 -0
- package/dist/components/EntityFinder/EntityIdTextField.js +35 -0
- package/dist/components/EntityFinder/EntityIdTextField.js.map +1 -0
- package/dist/components/Evaluation/round_limits/EvaluationRoundLimitOptions.d.ts.map +1 -1
- package/dist/components/Evaluation/round_limits/EvaluationRoundLimitOptions.js +22 -16
- package/dist/components/Evaluation/round_limits/EvaluationRoundLimitOptions.js.map +1 -1
- package/dist/components/FeaturedDataTabs/FacetPlotsCardGrid.js.map +1 -1
- package/dist/components/Forum/ForumThreadEditor.js.map +1 -1
- package/dist/components/FullWidthAlert/FullWidthAlert.d.ts.map +1 -1
- package/dist/components/FullWidthAlert/FullWidthAlert.js.map +1 -1
- package/dist/components/GenericCard/PortalDOI/PortalDOIUtils.d.ts.map +1 -1
- package/dist/components/GenericCard/PortalDOI/PortalDOIUtils.js.map +1 -1
- package/dist/components/Markdown/widget/MarkdownSynapsePlot.js.map +1 -1
- package/dist/components/OAuthClientAclEditor/OAuthClientAclEditor.d.ts.map +1 -1
- package/dist/components/OAuthClientAclEditor/OAuthClientAclEditor.js.map +1 -1
- package/dist/components/PortalAclEditor/PortalAclEditor.d.ts.map +1 -1
- package/dist/components/PortalAclEditor/PortalAclEditor.js.map +1 -1
- package/dist/components/PortalHomePageHeader/PortalHomePageHeader.d.ts +1 -1
- package/dist/components/PortalHomePageHeader/PortalHomePageHeader.d.ts.map +1 -1
- package/dist/components/PortalHomePageHeader/PortalHomePageHeader.js +1 -1
- package/dist/components/PortalHomePageHeader/PortalHomePageHeader.js.map +1 -1
- package/dist/components/PortalList/CreatePortalModal.d.ts.map +1 -1
- package/dist/components/PortalList/CreatePortalModal.js +34 -33
- package/dist/components/PortalList/CreatePortalModal.js.map +1 -1
- package/dist/components/QueryVisualizationWrapper/QueryVisualizationWrapper.d.ts.map +1 -1
- package/dist/components/QueryVisualizationWrapper/QueryVisualizationWrapper.js.map +1 -1
- package/dist/components/QueryWrapperPlotNav/RowSetView.d.ts.map +1 -1
- package/dist/components/QueryWrapperPlotNav/RowSetView.js.map +1 -1
- package/dist/components/Resources/Resources.Desktop.js.map +1 -1
- package/dist/components/SearchQueryWrapper/SearchQueryUseQueryOptions.js.map +1 -1
- package/dist/components/SetAccessRequirementCommonFields/SetAccessRequirementCommonFields.d.ts.map +1 -1
- package/dist/components/SetAccessRequirementCommonFields/SetAccessRequirementCommonFields.js.map +1 -1
- package/dist/components/SetBasicAccessRequirementFields/SetBasicAccessRequirementFields.d.ts.map +1 -1
- package/dist/components/SetBasicAccessRequirementFields/SetBasicAccessRequirementFields.js.map +1 -1
- package/dist/components/SetManagedAccessRequirementFields/SetManagedAccessRequirementFields.d.ts.map +1 -1
- package/dist/components/SetManagedAccessRequirementFields/SetManagedAccessRequirementFields.js.map +1 -1
- package/dist/components/SynapseChat/SynapseChatInteraction.js.map +1 -1
- package/dist/components/SynapsePortalBanners/SynapsePortalBanners.d.ts.map +1 -1
- package/dist/components/SynapsePortalBanners/SynapsePortalBanners.js +1 -1
- package/dist/components/SynapsePortalBanners/SynapsePortalBanners.js.map +1 -1
- package/dist/components/SynapseTable/SearchV2.js.map +1 -1
- package/dist/components/SynapseTable/SynapseTable.js.map +1 -1
- package/dist/components/SynapseTable/SynapseTableUtils.d.ts.map +1 -1
- package/dist/components/SynapseTable/SynapseTableUtils.js.map +1 -1
- package/dist/components/SynapseTable/datasets/DatasetItemsEditor.js.map +1 -1
- package/dist/components/TableColumnSchemaEditor/ColumnModelForm.js.map +1 -1
- package/dist/components/TableColumnSchemaEditor/TableColumnSchemaForm.d.ts.map +1 -1
- package/dist/components/TableColumnSchemaEditor/TableColumnSchemaForm.js.map +1 -1
- package/dist/components/TanStackTable/TanStackTableUtils.js.map +1 -1
- package/dist/components/TextField/TextField.css +1 -1
- package/dist/components/TextField/TextField.d.ts +14 -3
- package/dist/components/TextField/TextField.d.ts.map +1 -1
- package/dist/components/TextField/TextField.js +41 -43
- package/dist/components/TextField/TextField.js.map +1 -1
- package/dist/components/TextField/TextField.module.js +3 -4
- package/dist/components/TextField/TextField.module.js.map +1 -1
- package/dist/components/TextField/TextField.module.scss +18 -10
- package/dist/components/TimelinePlot/TimelinePlotSpeciesSelector.d.ts.map +1 -1
- package/dist/components/TimelinePlot/TimelinePlotSpeciesSelector.js +20 -16
- package/dist/components/TimelinePlot/TimelinePlotSpeciesSelector.js.map +1 -1
- package/dist/components/UserCardList/UserCardList.d.ts.map +1 -1
- package/dist/components/UserCardList/UserCardList.js.map +1 -1
- package/dist/components/UserCardList/UserCardListGroups/UserCardListGroups.Desktop.js.map +1 -1
- package/dist/components/UserOrTeamBadge/useUserOrTeam.js.map +1 -1
- package/dist/components/UserSearchBox/UserSearchBox.d.ts.map +1 -1
- package/dist/components/UserSearchBox/UserSearchBox.js.map +1 -1
- package/dist/components/WikiMarkdownEditorButton/WikiMarkdownEditorButton.js.map +1 -1
- package/dist/components/dataaccess/SubmissionPage/SubmissionPage.js.map +1 -1
- package/dist/components/doi/CreateOrUpdateDoiModal.js +13 -13
- package/dist/components/doi/CreateOrUpdateDoiModal.js.map +1 -1
- package/dist/components/entity/page/title_bar/TitleBarProperties.js +23 -23
- package/dist/components/entity/page/title_bar/TitleBarProperties.js.map +1 -1
- package/dist/components/entity/page/title_bar/useGetMentions.js.map +1 -1
- package/dist/components/index.js +17 -17
- package/dist/components/styled/StyledFormControl.d.ts +15 -0
- package/dist/components/styled/StyledFormControl.d.ts.map +1 -1
- package/dist/components/styled/StyledFormControl.js +1 -0
- package/dist/components/styled/StyledFormControl.js.map +1 -1
- package/dist/components/styled/index.js +3 -3
- package/dist/components/utils/ConditionalWrapper.d.ts.map +1 -1
- package/dist/components/utils/ConditionalWrapper.js.map +1 -1
- package/dist/components/widgets/ElementWithTooltip.js.map +1 -1
- package/dist/components/widgets/facet-nav/FacetNavPanel.d.ts.map +1 -1
- package/dist/components/widgets/facet-nav/FacetNavPanel.js +69 -62
- package/dist/components/widgets/facet-nav/FacetNavPanel.js.map +1 -1
- package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilter.d.ts +1 -0
- package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilter.d.ts.map +1 -1
- package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilter.js +27 -26
- package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilter.js.map +1 -1
- package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilterDropdown.d.ts +1 -0
- package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilterDropdown.d.ts.map +1 -1
- package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilterDropdown.js +2 -1
- package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilterDropdown.js.map +1 -1
- package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilterUI.d.ts +1 -0
- package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilterUI.d.ts.map +1 -1
- package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilterUI.js +44 -43
- package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilterUI.js.map +1 -1
- package/dist/features/entity/metadata-task/components/CreateOrUpdateCurationTaskDialog.d.ts +13 -0
- package/dist/features/entity/metadata-task/components/CreateOrUpdateCurationTaskDialog.d.ts.map +1 -0
- package/dist/features/entity/metadata-task/components/CreateOrUpdateCurationTaskDialog.js +398 -0
- package/dist/features/entity/metadata-task/components/CreateOrUpdateCurationTaskDialog.js.map +1 -0
- package/dist/features/entity/metadata-task/components/MetadataTaskTableActionCell.d.ts.map +1 -1
- package/dist/features/entity/metadata-task/components/MetadataTaskTableActionCell.js +49 -19
- package/dist/features/entity/metadata-task/components/MetadataTaskTableActionCell.js.map +1 -1
- package/dist/features/entity/metadata-task/components/MetadataTasksPage.d.ts.map +1 -1
- package/dist/features/entity/metadata-task/components/MetadataTasksPage.js +46 -25
- package/dist/features/entity/metadata-task/components/MetadataTasksPage.js.map +1 -1
- package/dist/features/entity/metadata-task/hooks/useGridSessionForCurationTask.d.ts +0 -1
- package/dist/features/entity/metadata-task/hooks/useGridSessionForCurationTask.d.ts.map +1 -1
- package/dist/features/entity/metadata-task/hooks/useGridSessionForCurationTask.js +20 -22
- package/dist/features/entity/metadata-task/hooks/useGridSessionForCurationTask.js.map +1 -1
- package/dist/features/entity/metadata-task/hooks/useOpenCuratorButton.d.ts.map +1 -1
- package/dist/features/entity/metadata-task/hooks/useOpenCuratorButton.js +25 -27
- package/dist/features/entity/metadata-task/hooks/useOpenCuratorButton.js.map +1 -1
- package/dist/features/entity/metadata-task/utils/constants.d.ts +26 -0
- package/dist/features/entity/metadata-task/utils/constants.d.ts.map +1 -1
- package/dist/features/entity/metadata-task/utils/constants.js +2 -2
- package/dist/features/entity/metadata-task/utils/constants.js.map +1 -1
- package/dist/index.js +17 -17
- package/dist/mockServiceWorker.js +6 -8
- package/dist/mocks/curation/mockCurationTask.d.ts +2 -2
- package/dist/mocks/curation/mockCurationTask.d.ts.map +1 -1
- package/dist/mocks/curation/mockCurationTask.js +9 -5
- package/dist/mocks/curation/mockCurationTask.js.map +1 -1
- package/dist/mocks/msw/handlers/featureFlagHandlers.d.ts +1 -1
- package/dist/mocks/msw/handlers/featureFlagHandlers.d.ts.map +1 -1
- package/dist/mocks/msw/handlers/featureFlagHandlers.js +1 -1
- package/dist/mocks/msw/handlers/featureFlagHandlers.js.map +1 -1
- package/dist/style/components/_cards.scss +0 -3
- package/dist/style/components/_data-grid-extra.scss +2 -2
- package/dist/style/components/_login.scss +6 -2
- package/dist/style/main.css +1 -1
- package/dist/synapse-client/SynapseClient.d.ts +2 -1
- package/dist/synapse-client/SynapseClient.d.ts.map +1 -1
- package/dist/synapse-client/SynapseClient.js.map +1 -1
- package/dist/synapse-queries/QueryFilterUtils.js.map +1 -1
- package/dist/synapse-queries/curation/task/useCurationTask.d.ts +1 -0
- package/dist/synapse-queries/curation/task/useCurationTask.d.ts.map +1 -1
- package/dist/synapse-queries/curation/task/useCurationTask.js +16 -6
- package/dist/synapse-queries/curation/task/useCurationTask.js.map +1 -1
- package/dist/synapse-queries/dataaccess/useAccessRequirements.d.ts.map +1 -1
- package/dist/synapse-queries/dataaccess/useAccessRequirements.js.map +1 -1
- package/dist/synapse-queries/entity/useGetQueryResultBundle.js.map +1 -1
- package/dist/synapse-queries/featureflags/useGetFeatureFlag.d.ts +1 -1
- package/dist/synapse-queries/featureflags/useGetFeatureFlag.d.ts.map +1 -1
- package/dist/synapse-queries/featureflags/useGetFeatureFlag.js.map +1 -1
- package/dist/synapse-queries/file/useFiles.d.ts.map +1 -1
- package/dist/synapse-queries/file/useFiles.js.map +1 -1
- package/dist/synapse-queries/termsOfService/useTermsOfService.d.ts.map +1 -1
- package/dist/synapse-queries/termsOfService/useTermsOfService.js.map +1 -1
- package/dist/synapse-queries/user/useGetUserChallenges.d.ts.map +1 -1
- package/dist/synapse-queries/user/useGetUserChallenges.js.map +1 -1
- package/dist/testutils/ReactQueryMockUtils.js.map +1 -1
- package/dist/theme/palette/Palettes.d.ts +2 -2
- package/dist/theme/palette/Palettes.d.ts.map +1 -1
- package/dist/theme/palette/Palettes.js +2 -2
- package/dist/theme/palette/Palettes.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/types/ThemeTypes.d.ts +5 -6
- package/dist/utils/AppUtils/session/SynapseSessionManager.d.ts.map +1 -1
- package/dist/utils/AppUtils/session/SynapseSessionManager.js.map +1 -1
- package/dist/utils/featureflag/FeatureFlags.d.ts +12 -0
- package/dist/utils/featureflag/FeatureFlags.d.ts.map +1 -0
- package/dist/utils/featureflag/FeatureFlags.js +8 -0
- package/dist/utils/featureflag/FeatureFlags.js.map +1 -0
- package/dist/utils/functions/SanitizeHtmlUtils.js.map +1 -1
- package/dist/utils/functions/queryUtils.js.map +1 -1
- package/dist/utils/hooks/useGetInfoFromIds.d.ts.map +1 -1
- package/dist/utils/hooks/useGetInfoFromIds.js.map +1 -1
- package/dist/utils/slots/SlotUtils.d.ts.map +1 -1
- package/dist/utils/slots/SlotUtils.js.map +1 -1
- package/package.json +7 -8
|
@@ -1,79 +1,79 @@
|
|
|
1
1
|
import e from "../../../../synapse-queries/entity/useEntityBundle.js";
|
|
2
2
|
import { useGetFeatureFlag as t } from "../../../../synapse-queries/featureflags/useGetFeatureFlag.js";
|
|
3
3
|
import "../../../../synapse-queries/index.js";
|
|
4
|
-
import n from "
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
4
|
+
import { FeatureFlagEnum as n } from "../../../../utils/featureflag/FeatureFlags.js";
|
|
5
|
+
import r from "../../../AccessRequirement/AddConditionsForUseButton/AddConditionsForUseButton.js";
|
|
6
|
+
import { useGetEntityTitleBarProperties as i } from "./useGetEntityTitleBarProperties.js";
|
|
7
|
+
import { useState as a } from "react";
|
|
8
|
+
import { Box as o, Divider as s, Link as c, Stack as l, Typography as u } from "@mui/material";
|
|
9
|
+
import { jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
10
10
|
//#region src/components/entity/page/title_bar/TitleBarProperties.tsx
|
|
11
11
|
function p(e) {
|
|
12
12
|
let { title: t, value: n } = e;
|
|
13
|
-
return /* @__PURE__ */
|
|
13
|
+
return /* @__PURE__ */ f("tr", { children: [/* @__PURE__ */ d("td", {
|
|
14
14
|
style: { paddingRight: "1em" },
|
|
15
|
-
children: /* @__PURE__ */ u
|
|
15
|
+
children: /* @__PURE__ */ d(u, {
|
|
16
16
|
component: "span",
|
|
17
17
|
variant: "smallText1",
|
|
18
18
|
sx: { fontWeight: 700 },
|
|
19
19
|
children: t
|
|
20
20
|
})
|
|
21
|
-
}), /* @__PURE__ */
|
|
21
|
+
}), /* @__PURE__ */ d("td", { children: /* @__PURE__ */ d(u, {
|
|
22
22
|
component: "span",
|
|
23
23
|
variant: "smallText1",
|
|
24
24
|
children: n
|
|
25
25
|
}) })] });
|
|
26
26
|
}
|
|
27
|
-
function m(
|
|
28
|
-
let { entityId: m, versionNumber: h, onActMemberClickAddConditionsForUse: g } =
|
|
29
|
-
return /* @__PURE__ */
|
|
27
|
+
function m(u) {
|
|
28
|
+
let { entityId: m, versionNumber: h, onActMemberClickAddConditionsForUse: g } = u, { data: _ } = e(m, h), v = t(n.DESCRIPTION_FIELD), y = i(m, h), [b, x] = a(!1);
|
|
29
|
+
return /* @__PURE__ */ f(o, {
|
|
30
30
|
sx: { padding: "20px 40px" },
|
|
31
31
|
children: [
|
|
32
|
-
/* @__PURE__ */
|
|
32
|
+
/* @__PURE__ */ f(l, {
|
|
33
33
|
direction: "row",
|
|
34
34
|
sx: {
|
|
35
35
|
justifyContent: "space-between",
|
|
36
36
|
alignItems: "flex-start"
|
|
37
37
|
},
|
|
38
|
-
children: [/* @__PURE__ */
|
|
38
|
+
children: [/* @__PURE__ */ f(l, {
|
|
39
39
|
direction: "row",
|
|
40
|
-
divider: /* @__PURE__ */
|
|
40
|
+
divider: /* @__PURE__ */ d(s, {
|
|
41
41
|
orientation: "vertical",
|
|
42
42
|
flexItem: !0
|
|
43
43
|
}),
|
|
44
44
|
spacing: 2,
|
|
45
45
|
sx: { alignItems: "flex-start" },
|
|
46
46
|
children: [
|
|
47
|
-
/* @__PURE__ */
|
|
47
|
+
/* @__PURE__ */ d("table", { children: /* @__PURE__ */ d("tbody", { children: y.slice(0, 2).map((e) => /* @__PURE__ */ d(p, {
|
|
48
48
|
title: e.title,
|
|
49
49
|
value: e.value
|
|
50
50
|
}, e.key)) }) }),
|
|
51
|
-
y.length > 2 && /* @__PURE__ */
|
|
51
|
+
y.length > 2 && /* @__PURE__ */ d("table", { children: /* @__PURE__ */ d("tbody", { children: y.slice(2, 4).map((e) => /* @__PURE__ */ d(p, {
|
|
52
52
|
title: e.title,
|
|
53
53
|
value: e.value
|
|
54
54
|
}, e.key)) }) }),
|
|
55
|
-
(y.length === 5 || y.length === 6) && /* @__PURE__ */
|
|
55
|
+
(y.length === 5 || y.length === 6) && /* @__PURE__ */ d("table", { children: /* @__PURE__ */ d("tbody", { children: y.slice(4, 6).map((e) => /* @__PURE__ */ d(p, {
|
|
56
56
|
title: e.title,
|
|
57
57
|
value: e.value
|
|
58
58
|
}, e.key)) }) }),
|
|
59
|
-
y.length > 6 && /* @__PURE__ */
|
|
59
|
+
y.length > 6 && /* @__PURE__ */ d(c, {
|
|
60
60
|
onClick: () => x((e) => !e),
|
|
61
61
|
children: b ? "Hide properties" : `${y.length - 4} more properties`
|
|
62
62
|
})
|
|
63
63
|
]
|
|
64
|
-
}), /* @__PURE__ */
|
|
64
|
+
}), /* @__PURE__ */ d(r, {
|
|
65
65
|
entityId: m,
|
|
66
66
|
onACTMemberClick: g
|
|
67
67
|
})]
|
|
68
68
|
}),
|
|
69
|
-
b && /* @__PURE__ */
|
|
69
|
+
b && /* @__PURE__ */ d(o, {
|
|
70
70
|
sx: { pt: "20px" },
|
|
71
|
-
children: /* @__PURE__ */
|
|
71
|
+
children: /* @__PURE__ */ d("table", { children: /* @__PURE__ */ d("tbody", { children: y.slice(4, Infinity).map((e) => /* @__PURE__ */ d(p, {
|
|
72
72
|
title: e.title,
|
|
73
73
|
value: e.value
|
|
74
74
|
}, e.key)) }) })
|
|
75
75
|
}),
|
|
76
|
-
_?.entity?.description && v && /* @__PURE__ */
|
|
76
|
+
_?.entity?.description && v && /* @__PURE__ */ d(o, {
|
|
77
77
|
sx: {
|
|
78
78
|
marginTop: "10px",
|
|
79
79
|
maxWidth: "720px"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TitleBarProperties.js","names":[],"sources":["../../../../../src/components/entity/page/title_bar/TitleBarProperties.tsx"],"sourcesContent":["import { useGetEntityBundle, useGetFeatureFlag } from '@/synapse-queries'\nimport { Box, Divider, Link, Stack, Typography } from '@mui/material'\nimport { FeatureFlagEnum } from '
|
|
1
|
+
{"version":3,"file":"TitleBarProperties.js","names":[],"sources":["../../../../../src/components/entity/page/title_bar/TitleBarProperties.tsx"],"sourcesContent":["import { useGetEntityBundle, useGetFeatureFlag } from '@/synapse-queries'\nimport { Box, Divider, Link, Stack, Typography } from '@mui/material'\nimport { FeatureFlagEnum } from '@/utils/featureflag/FeatureFlags'\nimport { ReactNode, useState } from 'react'\nimport AddConditionsForUseButton from '../../../AccessRequirement/AddConditionsForUseButton/AddConditionsForUseButton'\nimport { useGetEntityTitleBarProperties } from './useGetEntityTitleBarProperties'\n\nexport type TitleBarPropertiesProps = {\n entityId: string\n versionNumber?: number\n /* Callback invoked when an ACT member clicks \"Add Conditions for Use\". */\n onActMemberClickAddConditionsForUse: () => void\n}\n\ntype PropertyProps = {\n title: string\n value: ReactNode\n}\nfunction Property(props: PropertyProps) {\n const { title, value } = props\n return (\n <tr>\n <td style={{ paddingRight: '1em' }}>\n <Typography\n component={'span'}\n variant={'smallText1'}\n sx={{\n fontWeight: 700,\n }}\n >\n {title}\n </Typography>\n </td>\n <td>\n <Typography component={'span'} variant={'smallText1'}>\n {value}\n </Typography>\n </td>\n </tr>\n )\n}\n\n/**\n * The TitleBarProperties component displays a tabular view of the entity metadata on the Entity page.\n */\nexport default function TitleBarProperties(props: TitleBarPropertiesProps) {\n const { entityId, versionNumber, onActMemberClickAddConditionsForUse } = props\n\n // We don't need the entire bundle, but it's fetched for the rest of the title bar and useGetEntityTitleBarProperties below, so the cache will be hot.\n const { data: bundle } = useGetEntityBundle(entityId, versionNumber)\n\n const isFeatureEnabled = useGetFeatureFlag(FeatureFlagEnum.DESCRIPTION_FIELD)\n\n // Actual entity data is fetched and transformed in this custom hook\n const properties = useGetEntityTitleBarProperties(entityId, versionNumber)\n\n const [showAllProperties, setShowAllProperties] = useState(false)\n\n return (\n <Box sx={{ padding: '20px 40px' }}>\n <Stack\n direction={'row'}\n sx={{\n justifyContent: 'space-between',\n alignItems: 'flex-start',\n }}\n >\n <Stack\n direction=\"row\"\n divider={<Divider orientation=\"vertical\" flexItem />}\n spacing={2}\n sx={{\n alignItems: 'flex-start',\n }}\n >\n {/* Always show the first 4 properties*/}\n <table>\n <tbody>\n {properties.slice(0, 2).map(p => {\n return <Property key={p.key} title={p.title} value={p.value} />\n })}\n </tbody>\n </table>\n {properties.length > 2 && (\n <table>\n <tbody>\n {properties.slice(2, 4).map(p => {\n return (\n <Property key={p.key} title={p.title} value={p.value} />\n )\n })}\n </tbody>\n </table>\n )}\n {/* If there are 5 or 6 properties, show them in the last column */}\n {(properties.length === 5 || properties.length === 6) && (\n <table>\n <tbody>\n {properties.slice(4, 6).map(p => {\n return (\n <Property key={p.key} title={p.title} value={p.value} />\n )\n })}\n </tbody>\n </table>\n )}\n {/* If there are more than 6 properties, then just show a button that toggles showing the rest */}\n {properties.length > 6 && (\n <Link onClick={() => setShowAllProperties(v => !v)}>\n {showAllProperties\n ? 'Hide properties'\n : `${properties.length - 4} more properties`}\n </Link>\n )}\n </Stack>\n <AddConditionsForUseButton\n entityId={entityId}\n onACTMemberClick={onActMemberClickAddConditionsForUse}\n />\n </Stack>\n {showAllProperties && (\n <Box sx={{ pt: '20px' }}>\n <table>\n <tbody>\n {/* Show the remaining properties. */}\n {properties.slice(4, Infinity).map(p => {\n return <Property key={p.key} title={p.title} value={p.value} />\n })}\n </tbody>\n </table>\n </Box>\n )}\n {bundle?.entity?.description && isFeatureEnabled && (\n <Box sx={{ marginTop: '10px', maxWidth: '720px' }}>\n {bundle?.entity?.description}\n </Box>\n )}\n </Box>\n )\n}\n"],"mappings":";;;;;;;;;;AAkBA,SAAS,EAAS,GAAsB;CACtC,IAAM,EAAE,UAAO,aAAU;AACzB,QACE,kBAAC,MAAD,EAAA,UAAA,CACE,kBAAC,MAAD;EAAI,OAAO,EAAE,cAAc,OAAO;YAChC,kBAAC,GAAD;GACE,WAAW;GACX,SAAS;GACT,IAAI,EACF,YAAY,KACb;aAEA;GACU,CAAA;EACV,CAAA,EACL,kBAAC,MAAD,EAAA,UACE,kBAAC,GAAD;EAAY,WAAW;EAAQ,SAAS;YACrC;EACU,CAAA,EACV,CAAA,CACF,EAAA,CAAA;;AAOT,SAAwB,EAAmB,GAAgC;CACzE,IAAM,EAAE,aAAU,kBAAe,2CAAwC,GAGnE,EAAE,MAAM,MAAW,EAAmB,GAAU,EAAc,EAE9D,IAAmB,EAAkB,EAAgB,kBAAkB,EAGvE,IAAa,EAA+B,GAAU,EAAc,EAEpE,CAAC,GAAmB,KAAwB,EAAS,GAAM;AAEjE,QACE,kBAAC,GAAD;EAAK,IAAI,EAAE,SAAS,aAAa;YAAjC;GACE,kBAAC,GAAD;IACE,WAAW;IACX,IAAI;KACF,gBAAgB;KAChB,YAAY;KACb;cALH,CAOE,kBAAC,GAAD;KACE,WAAU;KACV,SAAS,kBAAC,GAAD;MAAS,aAAY;MAAW,UAAA;MAAW,CAAA;KACpD,SAAS;KACT,IAAI,EACF,YAAY,cACb;eANH;MASE,kBAAC,SAAD,EAAA,UACE,kBAAC,SAAD,EAAA,UACG,EAAW,MAAM,GAAG,EAAE,CAAC,KAAI,MACnB,kBAAC,GAAD;OAAsB,OAAO,EAAE;OAAO,OAAO,EAAE;OAAS,EAAzC,EAAE,IAAuC,CAC/D,EACI,CAAA,EACF,CAAA;MACP,EAAW,SAAS,KACnB,kBAAC,SAAD,EAAA,UACE,kBAAC,SAAD,EAAA,UACG,EAAW,MAAM,GAAG,EAAE,CAAC,KAAI,MAExB,kBAAC,GAAD;OAAsB,OAAO,EAAE;OAAO,OAAO,EAAE;OAAS,EAAzC,EAAE,IAAuC,CAE1D,EACI,CAAA,EACF,CAAA;OAGR,EAAW,WAAW,KAAK,EAAW,WAAW,MACjD,kBAAC,SAAD,EAAA,UACE,kBAAC,SAAD,EAAA,UACG,EAAW,MAAM,GAAG,EAAE,CAAC,KAAI,MAExB,kBAAC,GAAD;OAAsB,OAAO,EAAE;OAAO,OAAO,EAAE;OAAS,EAAzC,EAAE,IAAuC,CAE1D,EACI,CAAA,EACF,CAAA;MAGT,EAAW,SAAS,KACnB,kBAAC,GAAD;OAAM,eAAe,GAAqB,MAAK,CAAC,EAAE;iBAC/C,IACG,oBACA,GAAG,EAAW,SAAS,EAAE;OACxB,CAAA;MAEH;QACR,kBAAC,GAAD;KACY;KACV,kBAAkB;KAClB,CAAA,CACI;;GACP,KACC,kBAAC,GAAD;IAAK,IAAI,EAAE,IAAI,QAAQ;cACrB,kBAAC,SAAD,EAAA,UACE,kBAAC,SAAD,EAAA,UAEG,EAAW,MAAM,GAAG,SAAS,CAAC,KAAI,MAC1B,kBAAC,GAAD;KAAsB,OAAO,EAAE;KAAO,OAAO,EAAE;KAAS,EAAzC,EAAE,IAAuC,CAC/D,EACI,CAAA,EACF,CAAA;IACJ,CAAA;GAEP,GAAQ,QAAQ,eAAe,KAC9B,kBAAC,GAAD;IAAK,IAAI;KAAE,WAAW;KAAQ,UAAU;KAAS;cAC9C,GAAQ,QAAQ;IACb,CAAA;GAEJ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useGetMentions.js","names":[],"sources":["../../../../../src/components/entity/page/title_bar/useGetMentions.ts"],"sourcesContent":["import { useMemo } from 'react'\nimport { skipToken, useQuery, UseQueryOptions } from '@tanstack/react-query'\nimport {\n COLUMN_SINGLE_VALUE_QUERY_FILTER_CONCRETE_TYPE_VALUE,\n ColumnSingleValueFilterOperator,\n Query,\n} from '@sage-bionetworks/synapse-types'\nimport { useGetQueryResultBundleWithAsyncStatus } from '@/synapse-queries'\nimport { BUNDLE_MASK_QUERY_RESULTS } from '@/utils/SynapseConstants'\nimport { CitingWork } from './useDataCiteUsage'\n\nconst MENTIONS_SYNAPSE_TABLE_ID = 'syn66047339'\n\nexport type EuropePMCAuthor = {\n fullName?: string\n firstName?: string\n lastName?: string\n}\n\nexport type EuropePMCAuthorList = {\n author?: EuropePMCAuthor[]\n}\n\nexport type EuropePMCResult = {\n id?: string\n pmid?: string\n pmcid?: string\n doi?: string\n title?: string\n journalTitle?: string\n pubYear?: string\n authorList?: EuropePMCAuthorList\n}\n\nexport type EuropePMCResponse = {\n resultList: {\n result: EuropePMCResult[]\n }\n}\n\nexport const getMentionsQueryKey = (entityId: string) =>\n ['europepmc', entityId] as const\n\nexport async function fetchMetadataForPMCIDs(\n signal: AbortSignal,\n pmcids: string[],\n): Promise<CitingWork[]> {\n if (pmcids.length === 0) return []\n const query = pmcids.map(id => `PMCID:${id}`).join(' OR ')\n\n const url = new URL('https://www.ebi.ac.uk/europepmc/webservices/rest/search')\n url.searchParams.set('query', query)\n url.searchParams.set('format', 'json')\n url.searchParams.set('pageSize', String(pmcids.length))\n\n const resp = await fetch(url.toString(), {\n headers: { Accept: 'application/json' },\n signal,\n })\n if (!resp.ok)\n throw new Error(`Europe PMC error ${resp.status}: ${await resp.text()}`)\n\n const json = (await resp.json()) as EuropePMCResponse\n return mapEuropePMCResponseToCitingWorks(json)\n}\n\nexport function mapEuropePMCResponseToCitingWorks(\n json: EuropePMCResponse,\n): CitingWork[] {\n return json.resultList.result.map(\n r =>\n ({\n id: r.pmcid,\n title: r.title ?? '(Untitled)',\n doi: r.doi,\n publisher: r.journalTitle,\n publicationYear: r.pubYear ? Number(r.pubYear) : undefined,\n // authors: r.authorList?.author?.map((a: EuropePMCAuthor) => a.fullName ?? `${a.firstName ?? \"\"} ${a.lastName ?? \"\"}`.trim()) ?? [],\n } as CitingWork
|
|
1
|
+
{"version":3,"file":"useGetMentions.js","names":[],"sources":["../../../../../src/components/entity/page/title_bar/useGetMentions.ts"],"sourcesContent":["import { useMemo } from 'react'\nimport { skipToken, useQuery, UseQueryOptions } from '@tanstack/react-query'\nimport {\n COLUMN_SINGLE_VALUE_QUERY_FILTER_CONCRETE_TYPE_VALUE,\n ColumnSingleValueFilterOperator,\n Query,\n} from '@sage-bionetworks/synapse-types'\nimport { useGetQueryResultBundleWithAsyncStatus } from '@/synapse-queries'\nimport { BUNDLE_MASK_QUERY_RESULTS } from '@/utils/SynapseConstants'\nimport { CitingWork } from './useDataCiteUsage'\n\nconst MENTIONS_SYNAPSE_TABLE_ID = 'syn66047339'\n\nexport type EuropePMCAuthor = {\n fullName?: string\n firstName?: string\n lastName?: string\n}\n\nexport type EuropePMCAuthorList = {\n author?: EuropePMCAuthor[]\n}\n\nexport type EuropePMCResult = {\n id?: string\n pmid?: string\n pmcid?: string\n doi?: string\n title?: string\n journalTitle?: string\n pubYear?: string\n authorList?: EuropePMCAuthorList\n}\n\nexport type EuropePMCResponse = {\n resultList: {\n result: EuropePMCResult[]\n }\n}\n\nexport const getMentionsQueryKey = (entityId: string) =>\n ['europepmc', entityId] as const\n\nexport async function fetchMetadataForPMCIDs(\n signal: AbortSignal,\n pmcids: string[],\n): Promise<CitingWork[]> {\n if (pmcids.length === 0) return []\n const query = pmcids.map(id => `PMCID:${id}`).join(' OR ')\n\n const url = new URL('https://www.ebi.ac.uk/europepmc/webservices/rest/search')\n url.searchParams.set('query', query)\n url.searchParams.set('format', 'json')\n url.searchParams.set('pageSize', String(pmcids.length))\n\n const resp = await fetch(url.toString(), {\n headers: { Accept: 'application/json' },\n signal,\n })\n if (!resp.ok)\n throw new Error(`Europe PMC error ${resp.status}: ${await resp.text()}`)\n\n const json = (await resp.json()) as EuropePMCResponse\n return mapEuropePMCResponseToCitingWorks(json)\n}\n\nexport function mapEuropePMCResponseToCitingWorks(\n json: EuropePMCResponse,\n): CitingWork[] {\n return json.resultList.result.map(\n r =>\n ({\n id: r.pmcid,\n title: r.title ?? '(Untitled)',\n doi: r.doi,\n publisher: r.journalTitle,\n publicationYear: r.pubYear ? Number(r.pubYear) : undefined,\n // authors: r.authorList?.author?.map((a: EuropePMCAuthor) => a.fullName ?? `${a.firstName ?? \"\"} ${a.lastName ?? \"\"}`.trim()) ?? [],\n }) as CitingWork,\n )\n}\n\nexport function useGetMentions(\n entityId: string,\n options?: Omit<UseQueryOptions<CitingWork[], Error>, 'queryKey' | 'queryFn'>,\n) {\n const query: Query = {\n sql: `select pmcid from ${MENTIONS_SYNAPSE_TABLE_ID}`,\n additionalFilters: [\n {\n concreteType: COLUMN_SINGLE_VALUE_QUERY_FILTER_CONCRETE_TYPE_VALUE,\n columnName: 'synid',\n operator: ColumnSingleValueFilterOperator.EQUAL,\n values: [entityId],\n },\n ],\n }\n\n const { data } = useGetQueryResultBundleWithAsyncStatus({\n entityId: entityId,\n query,\n partMask: BUNDLE_MASK_QUERY_RESULTS,\n concreteType: 'org.sagebionetworks.repo.model.table.QueryBundleRequest',\n })\n\n const rows = data?.responseBody?.queryResult?.queryResults?.rows\n const pcmids = rows\n ?.map(row => {\n const pmcid = row.values[0]\n // remove \"pmc:\" prefix if present\n return pmcid?.toString().replace(/^pmc:/i, '')\n })\n .filter(pmcid => pmcid != null) as string[]\n const key = useMemo(() => getMentionsQueryKey(entityId), [entityId])\n return useQuery({\n ...options,\n queryKey: key,\n queryFn: pcmids\n ? ({ signal }) => {\n return fetchMetadataForPMCIDs(signal, pcmids)\n }\n : skipToken,\n })\n}\n"],"mappings":";;;;;;;AAWA,IAAM,IAA4B,eA6BrB,KAAuB,MAClC,CAAC,aAAa,EAAS;AAEzB,eAAsB,EACpB,GACA,GACuB;AACvB,KAAI,EAAO,WAAW,EAAG,QAAO,EAAE;CAClC,IAAM,IAAQ,EAAO,KAAI,MAAM,SAAS,IAAK,CAAC,KAAK,OAAO,EAEpD,IAAM,IAAI,IAAI,0DAA0D;AAG9E,CAFA,EAAI,aAAa,IAAI,SAAS,EAAM,EACpC,EAAI,aAAa,IAAI,UAAU,OAAO,EACtC,EAAI,aAAa,IAAI,YAAY,OAAO,EAAO,OAAO,CAAC;CAEvD,IAAM,IAAO,MAAM,MAAM,EAAI,UAAU,EAAE;EACvC,SAAS,EAAE,QAAQ,oBAAoB;EACvC;EACD,CAAC;AACF,KAAI,CAAC,EAAK,GACR,OAAU,MAAM,oBAAoB,EAAK,OAAO,IAAI,MAAM,EAAK,MAAM,GAAG;AAG1E,QAAO,EAAkC,MADrB,EAAK,MAAM,CACe;;AAGhD,SAAgB,EACd,GACc;AACd,QAAO,EAAK,WAAW,OAAO,KAC5B,OACG;EACC,IAAI,EAAE;EACN,OAAO,EAAE,SAAS;EAClB,KAAK,EAAE;EACP,WAAW,EAAE;EACb,iBAAiB,EAAE,UAAU,OAAO,EAAE,QAAQ,GAAG,KAAA;EAElD,EACJ;;AAGH,SAAgB,EACd,GACA,GACA;CAaA,IAAM,EAAE,YAAS,EAAuC;EAC5C;EACV,OAAA;GAbA,KAAK,qBAAqB;GAC1B,mBAAmB,CACjB;IACE,cAAc;IACd,YAAY;IACZ,UAAU,EAAgC;IAC1C,QAAQ,CAAC,EAAS;IACnB,CACF;GAKD;EACA,UAAA;EACA,cAAc;EACf,CAAC,EAGI,KADO,GAAM,cAAc,aAAa,cAAc,OAExD,KAAI,MACU,EAAI,OAAO,IAEX,UAAU,CAAC,QAAQ,UAAU,GAAG,CAC9C,CACD,QAAO,MAAS,KAAS,KAAK,EAC3B,IAAM,QAAc,EAAoB,EAAS,EAAE,CAAC,EAAS,CAAC;AACpE,QAAO,EAAS;EACd,GAAG;EACH,UAAU;EACV,SAAS,KACJ,EAAE,gBACM,EAAuB,GAAQ,EAAO,GAE/C;EACL,CAAC"}
|
package/dist/components/index.js
CHANGED
|
@@ -15,27 +15,27 @@ import "./ToastMessage/index.js";
|
|
|
15
15
|
import v, { SynapseErrorType as y } from "./error/ErrorPage.js";
|
|
16
16
|
import b from "./SynapseTable/NoContentAvailable.js";
|
|
17
17
|
import x from "./IconSvg/IconSvg.js";
|
|
18
|
-
import
|
|
19
|
-
import C from "./
|
|
20
|
-
import { AccessTokenPage as w } from "./AccessTokenPage/AccessTokenPage.js";
|
|
18
|
+
import S from "./TextField/TextField.js";
|
|
19
|
+
import { AccessTokenPage as C } from "./AccessTokenPage/AccessTokenPage.js";
|
|
21
20
|
import "./AccessTokenPage/index.js";
|
|
22
|
-
import { AccountLevelBadges as
|
|
21
|
+
import { AccountLevelBadges as w } from "./AccountLevelBadges/AccountLevelBadges.js";
|
|
23
22
|
import "./AccountLevelBadges/index.js";
|
|
24
|
-
import
|
|
23
|
+
import T, { useLastLoginInfo as E, useLastLoginInfoState as D } from "./Authentication/LastLoginInfo.js";
|
|
25
24
|
import "./TextField/index.js";
|
|
26
|
-
import
|
|
25
|
+
import O from "./Authentication/PasswordField.js";
|
|
27
26
|
import "./IconSvg/index.js";
|
|
28
|
-
import
|
|
29
|
-
import
|
|
30
|
-
import { LeftRightPanel as
|
|
31
|
-
import
|
|
32
|
-
import
|
|
33
|
-
import
|
|
27
|
+
import k from "./Authentication/OneTimePasswordForm.js";
|
|
28
|
+
import A from "./Authentication/StandaloneLoginForm.js";
|
|
29
|
+
import { LeftRightPanel as j, StyledInnerContainer as M, StyledOuterContainer as N } from "./styled/LeftRightPanel.js";
|
|
30
|
+
import P from "./Authentication/TwoFactorEnrollmentForm.js";
|
|
31
|
+
import F from "./Authentication/TwoFactorAuthSettingsPanel.js";
|
|
32
|
+
import I from "./Authentication/TwoFactorBackupCodes.js";
|
|
34
33
|
import "./Authentication/index.js";
|
|
35
|
-
import { getFileHandleAssociation as
|
|
36
|
-
import { Project as
|
|
37
|
-
import
|
|
38
|
-
import
|
|
34
|
+
import { getFileHandleAssociation as L, getLinkParams as R, getValueOrMultiValue as z } from "./GenericCard/CardUtils.js";
|
|
35
|
+
import { Project as B } from "../assets/themed_icons/Project.js";
|
|
36
|
+
import V from "./Icon/Icon.js";
|
|
37
|
+
import H from "./ShowMore/ShowMore.js";
|
|
38
|
+
import { StyledFormControl as U } from "./styled/StyledFormControl.js";
|
|
39
39
|
import { EntityDownloadConfirmation as W } from "./EntityDownloadConfirmation/EntityDownloadConfirmation.js";
|
|
40
40
|
import "./EntityDownloadConfirmation/index.js";
|
|
41
41
|
import { QueryContext as G, QueryContextConsumer as K, QueryContextProvider as q, useQueryContext as J } from "./QueryContext/QueryContext.js";
|
|
@@ -225,4 +225,4 @@ import { PortalList as Yt } from "./PortalList/PortalList.js";
|
|
|
225
225
|
import "./PortalList/index.js";
|
|
226
226
|
import "./PortalAclEditor/index.js";
|
|
227
227
|
import { visuallyHidden as Xt } from "./SynapseHomepageV2/HomepageStyles.js";
|
|
228
|
-
export { gt as AccessRequirementAclEditor, Pt as AccessRequirementRelatedProjectsList,
|
|
228
|
+
export { gt as AccessRequirementAclEditor, Pt as AccessRequirementRelatedProjectsList, C as AccessTokenPage, w as AccountLevelBadges, be as AvailableEvaluationQueueList, Y as CARD_SHORT_DESCRIPTION_CSS, De as CTASectionWrapper, ae as CardContainer, de as CardContainerLogic, fe as CardGridWithLinks, he as CertificationQuiz, ye as ChallengeDataDownload, ge as ChallengeDetailPage, xe as ChallengeSubmission, Se as ChangePassword, Ce as ChangePasswordWithToken, r as ClientError, Ee as ColoredBulletListItem, _ as ConfirmationDialog, we as CookiePreferencesDialog, Te as CookiesNotification, Jt as CreatePortalModal, Lt as DatasetJsonLdScript, He as DiscussionThread, ke as DownloadCartPage, Oe as DownloadIneligibleForPackagingFilesFromListButton, je as DynamicForm, Me as DynamicFormModal, i as EmptyFallbackComponent, ve as EntityBadgeIcons, W as EntityDownloadConfirmation, Ne as EntityFinder, Pe as EntityForm, Nt as EntityHeaderTable, a as ErrorBanner, o as ErrorFallbackComponent, v as ErrorPage, Fe as EvaluationCard, Ie as EvaluationEditorPage, Le as ExperimentalMode, Re as ExternalFileHandleLink, ze as FeaturedDataTabs, Ht as FeaturedResearch, Be as FeaturedToolsList, se as FileUpload, Ue as ForumPage, e as FullWidthAlert, Q as GenericCard, Ge as Goals, qe as GoalsV2, Je as GoalsV3, Ye as GoogleAnalytics, le as HasAccess, g as HelpPopover, _e as HoverPopover, V as Icon, x as IconSvg, Bt as ImageCardGridWithLinks, yt as InputSizedButton, It as JsonLdScript, T as LastLoginInfo, j as LeftRightPanel, d as LightTooltip, X as LongDescription, Xe as Map, Ze as MarkdownCollapse, Ve as MarkdownEditor, Qe as MarkdownGithubLatestTag, ce as ModalDownload, Ft as MuiContainer, b as NoContentAvailable, $e as OAuthClientManagement, k as OneTimePasswordForm, et as OrientationBanner, O as PasswordField, Gt as PortalAclEditor, Kt as PortalAclEditorModal, qt as PortalCard, Vt as PortalFeatureHighlights, Wt as PortalFeaturedPartners, Ut as PortalHomePageHeader, Yt as PortalList, Ke as PortalSectionHeader, at as ProgrammaticTableDownload, it as Programs, st as ProjectDataAvailability, B as ProjectIcon, ot as ProvenanceGraph, G as QueryContext, K as QueryContextConsumer, q as QueryContextProvider, We as QueryCount, ne as QueryWrapper, lt as QueryWrapperPlotNav, ct as QueryWrapperSynapsePlot, zt as RecentPublicationsGrid, pt as RegisterPageLogoutPrompt, mt as RenderIfInView, ht as Resources, pe as RowDataTable, me as RowDataTableWithQuery, _t as RssFeedCards, Rt as SageResourcesPopover, ut as SearchQueryWrapper, dt as SearchQueryWrapperPlotNav, Z as ShortDescription, Ae as ShowDownloadV2, H as ShowMore, s as SignInPrompt, f as SkeletonButton, p as SkeletonInlineBlock, h as SkeletonParagraph, m as SkeletonTable, A as StandaloneLoginForm, vt as StandaloneQueryWrapper, U as StyledFormControl, M as StyledInnerContainer, N as StyledOuterContainer, bt as SubscriptionPage, xt as SubsectionRowRenderer, ee as SynapseCardLabel, wt as SynapseChat, c as SynapseErrorBoundary, y as SynapseErrorType, Ct as SynapseFormSubmissionGrid, St as SynapseFormWrapper, rt as SynapsePlot, Tt as SynapsePortalChatDialog, ue as SynapseTable, t as SynapseToastContainer, Et as SystemUseNotification, Dt as TableFeedCards, l as TableRowFallbackComponent, Ot as TermsAndConditions, S as TextField, tt as ThemesPlot, kt as TimelinePlot, F as TwoFactorAuthSettingsPanel, I as TwoFactorBackupCodes, P as TwoFactorEnrollmentForm, nt as UpsetPlot, $ as UserCard, ie as UserCardList, jt as UserCardListGroups, At as UserCardListRotate, oe as UserOrTeamBadge, Mt as UserProfileLinks, re as WideButton, u as YOU_ARE_NOT_AUTHORIZED_MESSAGE, n as displayToast, te as generateEncodedPathAndQueryForSelectedFacetURL, L as getFileHandleAssociation, R as getLinkParams, z as getValueOrMultiValue, ft as isSearchQueryWrapperPlotNavProps, E as useLastLoginInfo, D as useLastLoginInfoState, J as useQueryContext, Xt as visuallyHidden };
|
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
import { FormControlProps } from '@mui/material';
|
|
2
2
|
import { StyledComponent } from '@emotion/styled';
|
|
3
|
+
/**
|
|
4
|
+
* Provides bootstrap-like label/text inputs for a MUI FormControl.
|
|
5
|
+
*
|
|
6
|
+
* This should not be used with components that provide their own FormControl, such as TextField.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```tsx
|
|
10
|
+
* <StyledFormControl fullWidth variant="standard" margin="normal">
|
|
11
|
+
* <InputLabel shrink htmlFor="someinput">
|
|
12
|
+
* labelText
|
|
13
|
+
* </InputLabel>
|
|
14
|
+
* <InputBase id="someinput"/>
|
|
15
|
+
* </StyledFormControl>
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
3
18
|
export declare const StyledFormControl: StyledComponent<FormControlProps>;
|
|
4
19
|
export default StyledFormControl;
|
|
5
20
|
//# sourceMappingURL=StyledFormControl.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StyledFormControl.d.ts","sourceRoot":"","sources":["../../../src/components/styled/StyledFormControl.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,gBAAgB,EAIjB,MAAM,eAAe,CAAA;AACtB,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;
|
|
1
|
+
{"version":3,"file":"StyledFormControl.d.ts","sourceRoot":"","sources":["../../../src/components/styled/StyledFormControl.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,gBAAgB,EAIjB,MAAM,eAAe,CAAA;AACtB,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAEjD;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,iBAAiB,EAAE,eAAe,CAAC,gBAAgB,CA2B7D,CAAA;AAEH,eAAe,iBAAiB,CAAA"}
|
|
@@ -2,6 +2,7 @@ import { FormControl as e, formHelperTextClasses as t, inputBaseClasses as n, st
|
|
|
2
2
|
//#region src/components/styled/StyledFormControl.tsx
|
|
3
3
|
var i = r(e, { label: "StyledFormControl" })(({ theme: e }) => ({
|
|
4
4
|
"& label": {
|
|
5
|
+
position: "static",
|
|
5
6
|
fontSize: "14px",
|
|
6
7
|
transform: "none"
|
|
7
8
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StyledFormControl.js","names":[],"sources":["../../../src/components/styled/StyledFormControl.tsx"],"sourcesContent":["import {\n FormControl,\n FormControlProps,\n formHelperTextClasses,\n inputBaseClasses,\n styled,\n} from '@mui/material'\nimport { StyledComponent } from '@emotion/styled'\n\n
|
|
1
|
+
{"version":3,"file":"StyledFormControl.js","names":[],"sources":["../../../src/components/styled/StyledFormControl.tsx"],"sourcesContent":["import {\n FormControl,\n FormControlProps,\n formHelperTextClasses,\n inputBaseClasses,\n styled,\n} from '@mui/material'\nimport { StyledComponent } from '@emotion/styled'\n\n/**\n * Provides bootstrap-like label/text inputs for a MUI FormControl.\n *\n * This should not be used with components that provide their own FormControl, such as TextField.\n *\n * @example\n * ```tsx\n * <StyledFormControl fullWidth variant=\"standard\" margin=\"normal\">\n * <InputLabel shrink htmlFor=\"someinput\">\n * labelText\n * </InputLabel>\n * <InputBase id=\"someinput\"/>\n * </StyledFormControl>\n * ```\n */\nexport const StyledFormControl: StyledComponent<FormControlProps> = styled(\n FormControl,\n {\n label: 'StyledFormControl',\n },\n)(({ theme }) => ({\n '& label': {\n position: 'static',\n fontSize: '14px',\n transform: 'none',\n },\n [`& .${formHelperTextClasses.root}`]: {\n marginLeft: '0',\n [`&.Mui-error`]: {\n color: '#c13415',\n },\n },\n\n [`& .${inputBaseClasses.root}`]: {\n marginTop: theme.spacing(0.5),\n },\n '& .MuiInputBase-multiline': {\n padding: '0px',\n },\n '& fieldset': {\n border: 'none',\n },\n}))\n\nexport default StyledFormControl\n"],"mappings":";;AAwBA,IAAa,IAAuD,EAClE,GACA,EACE,OAAO,qBACR,CACF,EAAE,EAAE,gBAAa;CAChB,WAAW;EACT,UAAU;EACV,UAAU;EACV,WAAW;EACZ;EACA,MAAM,EAAsB,SAAS;EACpC,YAAY;EACX,eAAgB,EACf,OAAO,WACR;EACF;EAEA,MAAM,EAAiB,SAAS,EAC/B,WAAW,EAAM,QAAQ,GAAI,EAC9B;CACD,6BAA6B,EAC3B,SAAS,OACV;CACD,cAAc,EACZ,QAAQ,QACT;CACF,EAAE"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { LightTooltip as e } from "./LightTooltip.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { LeftRightPanel as t, StyledInnerContainer as n, StyledOuterContainer as r } from "./LeftRightPanel.js";
|
|
3
|
+
import { StyledFormControl as i } from "./StyledFormControl.js";
|
|
4
4
|
import { WideButton as a } from "./WideButton.js";
|
|
5
5
|
import { HoverPopover as o } from "./HoverPopover.js";
|
|
6
6
|
import { InputSizedButton as s } from "./InputSizedButton.js";
|
|
7
|
-
export { o as HoverPopover, s as InputSizedButton,
|
|
7
|
+
export { o as HoverPopover, s as InputSizedButton, t as LeftRightPanel, e as LightTooltip, i as StyledFormControl, n as StyledInnerContainer, r as StyledOuterContainer, a as WideButton };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConditionalWrapper.d.ts","sourceRoot":"","sources":["../../../src/components/utils/ConditionalWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,aAAa,EACb,iBAAiB,EACjB,SAAS,EACV,MAAM,OAAO,CAAA;AAEd,KAAK,uBAAuB,CAC1B,QAAQ,SAAS,aAAa,CAAC,iBAAiB,CAAC,
|
|
1
|
+
{"version":3,"file":"ConditionalWrapper.d.ts","sourceRoot":"","sources":["../../../src/components/utils/ConditionalWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,aAAa,EACb,iBAAiB,EACjB,SAAS,EACV,MAAM,OAAO,CAAA;AAEd,KAAK,uBAAuB,CAC1B,QAAQ,SAAS,aAAa,CAAC,iBAAiB,CAAC,GAC/C,aAAa,CAAC,iBAAiB,CAAC,IAChC;IACF,SAAS,EAAE,OAAO,CAAA;IAClB,OAAO,EAAE,QAAQ,CAAA;IACjB,YAAY,CAAC,EAAE,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE,UAAU,CAAC,CAAA;IACzD,QAAQ,EAAE,SAAS,CAAA;CACpB,CAAA;AAED,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,KAAK,EAAE,uBAAuB,2CAQxE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConditionalWrapper.js","names":[],"sources":["../../../src/components/utils/ConditionalWrapper.tsx"],"sourcesContent":["import {\n ComponentProps,\n ComponentType,\n PropsWithChildren,\n ReactNode,\n} from 'react'\n\ntype ConditionalWrapperProps<\n TWrapper extends ComponentType<PropsWithChildren>
|
|
1
|
+
{"version":3,"file":"ConditionalWrapper.js","names":[],"sources":["../../../src/components/utils/ConditionalWrapper.tsx"],"sourcesContent":["import {\n ComponentProps,\n ComponentType,\n PropsWithChildren,\n ReactNode,\n} from 'react'\n\ntype ConditionalWrapperProps<\n TWrapper extends ComponentType<PropsWithChildren> =\n ComponentType<PropsWithChildren>,\n> = {\n condition: boolean\n wrapper: TWrapper\n wrapperProps?: Omit<ComponentProps<TWrapper>, 'children'>\n children: ReactNode\n}\n\nexport default function ConditionalWrapper(props: ConditionalWrapperProps) {\n const { condition, wrapper: Wrapper, wrapperProps, children } = props\n\n return condition ? (\n <Wrapper {...wrapperProps}>{children}</Wrapper>\n ) : (\n <>{children}</>\n )\n}\n"],"mappings":";;AAiBA,SAAwB,EAAmB,GAAgC;CACzE,IAAM,EAAE,cAAW,SAAS,GAAS,iBAAc,gBAAa;AAEhE,QAAO,IACL,kBAAC,GAAD;EAAS,GAAI;EAAe;EAAmB,CAAA,GAE/C,kBAAA,GAAA,EAAG,aAAY,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ElementWithTooltip.js","names":[],"sources":["../../../src/components/widgets/ElementWithTooltip.tsx"],"sourcesContent":["import React from 'react'\nimport { Menu, Tooltip } from '@mui/material'\nimport {\n ComponentElement,\n CSSProperties,\n MouseEvent,\n PropsWithChildren,\n ReactNode,\n useState,\n} from 'react'\nimport IconSvg, { IconSvgProps } from '../IconSvg/IconSvg'\nimport { Icon } from '../row_renderers/utils'\nimport { TOOLTIP_DELAY_SHOW } from '../SynapseTable/SynapseTableConstants'\n\ntype CustomImageProps = {\n svgImg: ComponentElement<any, any>\n altText: string\n}\n\nexport type TooltipVisualProps = {\n delayShow: number\n place: 'top' | 'right' | 'bottom' | 'left'\n type: 'dark' | 'success' | 'warning' | 'error' | 'info' | 'light'\n effect: 'float' | 'solid'\n border?: boolean\n}\n\nconst DEFAULT_TOOLTIP_VISUAL_PROPS: Partial<TooltipVisualProps> = {\n place: 'top',\n}\n\n/*****************************************\n * The control needs to either have a child element or needs to have an image supplied\n * If the child element is supplied the control renders the child applying additional properties\n * If the image is supplied the control renders a clickable image\n * If there are no children and callback Fn is not supplied it is assumed to be a a dropdown trigger\n */\n\ntype ElementWithTooltipProps = PropsWithChildren<{\n image?: IconSvgProps | CustomImageProps\n imageColor?: string\n tooltipText: string\n callbackFn?: () => void\n className?: string\n tooltipVisualProps?: Partial<TooltipVisualProps>\n darkTheme?: boolean\n size?: string\n icon?: ReactNode\n /** The items to show in the menu -- NOTE: this cannot be a Fragment!\n * @see https://stackoverflow.com/questions/75083605/mui-the-menu-component-doesnt-accept-a-fragment-as-a-child-consider-providing\n */\n menuItems?: React.ReactNode\n}>\n\nfunction getTooltipTriggerContents(\n image: IconSvgProps | CustomImageProps,\n imageColor: string | undefined,\n size: CSSProperties['width'] | undefined,\n) {\n if ('svgImg' in image) {\n return image.svgImg\n } else {\n return <IconSvg {...image} sx={{ color: imageColor, width: size }} />\n }\n}\n\nexport const ElementWithTooltip = ({\n image,\n callbackFn,\n tooltipText,\n className = '',\n imageColor,\n tooltipVisualProps = DEFAULT_TOOLTIP_VISUAL_PROPS,\n children,\n darkTheme,\n size,\n icon,\n menuItems,\n}: ElementWithTooltipProps): React.ReactNode => {\n const { place } = tooltipVisualProps\n const iconComponent = icon ? (\n typeof icon === 'string' ? (\n <Icon type={icon}></Icon>\n ) : (\n icon\n )\n ) : undefined\n const tooltipTriggerContents = iconComponent\n ? iconComponent\n : image\n
|
|
1
|
+
{"version":3,"file":"ElementWithTooltip.js","names":[],"sources":["../../../src/components/widgets/ElementWithTooltip.tsx"],"sourcesContent":["import React from 'react'\nimport { Menu, Tooltip } from '@mui/material'\nimport {\n ComponentElement,\n CSSProperties,\n MouseEvent,\n PropsWithChildren,\n ReactNode,\n useState,\n} from 'react'\nimport IconSvg, { IconSvgProps } from '../IconSvg/IconSvg'\nimport { Icon } from '../row_renderers/utils'\nimport { TOOLTIP_DELAY_SHOW } from '../SynapseTable/SynapseTableConstants'\n\ntype CustomImageProps = {\n svgImg: ComponentElement<any, any>\n altText: string\n}\n\nexport type TooltipVisualProps = {\n delayShow: number\n place: 'top' | 'right' | 'bottom' | 'left'\n type: 'dark' | 'success' | 'warning' | 'error' | 'info' | 'light'\n effect: 'float' | 'solid'\n border?: boolean\n}\n\nconst DEFAULT_TOOLTIP_VISUAL_PROPS: Partial<TooltipVisualProps> = {\n place: 'top',\n}\n\n/*****************************************\n * The control needs to either have a child element or needs to have an image supplied\n * If the child element is supplied the control renders the child applying additional properties\n * If the image is supplied the control renders a clickable image\n * If there are no children and callback Fn is not supplied it is assumed to be a a dropdown trigger\n */\n\ntype ElementWithTooltipProps = PropsWithChildren<{\n image?: IconSvgProps | CustomImageProps\n imageColor?: string\n tooltipText: string\n callbackFn?: () => void\n className?: string\n tooltipVisualProps?: Partial<TooltipVisualProps>\n darkTheme?: boolean\n size?: string\n icon?: ReactNode\n /** The items to show in the menu -- NOTE: this cannot be a Fragment!\n * @see https://stackoverflow.com/questions/75083605/mui-the-menu-component-doesnt-accept-a-fragment-as-a-child-consider-providing\n */\n menuItems?: React.ReactNode\n}>\n\nfunction getTooltipTriggerContents(\n image: IconSvgProps | CustomImageProps,\n imageColor: string | undefined,\n size: CSSProperties['width'] | undefined,\n) {\n if ('svgImg' in image) {\n return image.svgImg\n } else {\n return <IconSvg {...image} sx={{ color: imageColor, width: size }} />\n }\n}\n\nexport const ElementWithTooltip = ({\n image,\n callbackFn,\n tooltipText,\n className = '',\n imageColor,\n tooltipVisualProps = DEFAULT_TOOLTIP_VISUAL_PROPS,\n children,\n darkTheme,\n size,\n icon,\n menuItems,\n}: ElementWithTooltipProps): React.ReactNode => {\n const { place } = tooltipVisualProps\n const iconComponent = icon ? (\n typeof icon === 'string' ? (\n <Icon type={icon}></Icon>\n ) : (\n icon\n )\n ) : undefined\n const tooltipTriggerContents = iconComponent\n ? iconComponent\n : image\n ? getTooltipTriggerContents(image, imageColor, size)\n : children || <></>\n\n const [anchorEl, setAnchorEl] = useState<null | HTMLElement>(null)\n const open = Boolean(anchorEl)\n const handleClick = (event: MouseEvent<HTMLButtonElement>) => {\n setAnchorEl(event.currentTarget)\n }\n const handleClose = () => {\n setAnchorEl(null)\n }\n //if there is no callbackFn - assume it's a toggle\n\n let tooltipTrigger: ReactNode\n if (!children) {\n tooltipTrigger = (\n <button\n tabIndex={0}\n className={`ElementWithTooltip SRC-hand-cursor SRC-grey-background-hover ${className} ${\n darkTheme ? 'dark-theme' : ''\n } `}\n onClick={e => {\n if (callbackFn) {\n callbackFn()\n } else {\n // open dropdown menu\n handleClick(e)\n }\n }}\n aria-label={tooltipText}\n >\n {tooltipTriggerContents}\n </button>\n )\n } else {\n tooltipTrigger = <div className=\"SRC-hand-cursor\">{children}</div>\n }\n\n return (\n <>\n <Tooltip\n title={tooltipText}\n enterNextDelay={TOOLTIP_DELAY_SHOW}\n placement={place}\n data-testid=\"ElementTooltip\"\n >\n {tooltipTrigger}\n </Tooltip>\n {menuItems && (\n <Menu anchorEl={anchorEl} open={open} onClose={handleClose}>\n {menuItems}\n </Menu>\n )}\n </>\n )\n}\n"],"mappings":";;;;;;;;AA2BA,IAAM,IAA4D,EAChE,OAAO,OACR;AAyBD,SAAS,EACP,GACA,GACA,GACA;AAIE,QAHE,YAAY,IACP,EAAM,SAEN,kBAAC,GAAD;EAAS,GAAI;EAAO,IAAI;GAAE,OAAO;GAAY,OAAO;GAAM;EAAI,CAAA;;AAIzE,IAAa,KAAsB,EACjC,UACA,eACA,gBACA,eAAY,IACZ,eACA,wBAAqB,GACrB,aACA,cACA,SACA,SACA,mBAC8C;CAC9C,IAAM,EAAE,aAAU,GAQZ,KAPgB,IACpB,OAAO,KAAS,WACd,kBAAC,GAAD,EAAM,MAAM,GAAa,CAAA,GAEzB,IAEA,KAAA,OAGA,IACE,EAA0B,GAAO,GAAY,EAAK,GAClD,KAAY,kBAAA,GAAA,EAAK,CAAA,GAEjB,CAAC,GAAU,KAAe,EAA6B,KAAK,EAC5D,IAAO,EAAQ,GACf,KAAe,MAAyC;AAC5D,IAAY,EAAM,cAAc;IAE5B,UAAoB;AACxB,IAAY,KAAK;IAIf;AAyBJ,QAxBA,AACE,IADG,IAqBc,kBAAC,OAAD;EAAK,WAAU;EAAmB;EAAe,CAAA,GAnBhE,kBAAC,UAAD;EACE,UAAU;EACV,WAAW,gEAAgE,EAAU,GACnF,IAAY,eAAe,GAC5B;EACD,UAAS,MAAK;AACZ,GAAI,IACF,GAAY,GAGZ,EAAY,EAAE;;EAGlB,cAAY;YAEX;EACM,CAAA,EAOX,kBAAA,GAAA,EAAA,UAAA,CACE,kBAAC,GAAD;EACE,OAAO;EACP,gBAAA;EACA,WAAW;EACX,eAAY;YAEX;EACO,CAAA,EACT,KACC,kBAAC,GAAD;EAAgB;EAAgB;EAAM,SAAS;YAC5C;EACI,CAAA,CAER,EAAA,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FacetNavPanel.d.ts","sourceRoot":"","sources":["../../../../src/components/widgets/facet-nav/FacetNavPanel.tsx"],"names":[],"mappings":"AAcA,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,2BAA2B,EAC3B,uBAAuB,EACxB,MAAM,iCAAiC,CAAA;AAExC,OAAO,KAAK,MAAM,MAAM,sBAAsB,CAAA;AAW9C,OAAO,EAAE,cAAc,EAAY,MAAM,wBAAwB,CAAA;AAGjE,MAAM,MAAM,kBAAkB,GAAG;IAC/B,wBAAwB,EAAE,CACxB,KAAK,EAAE,uBAAuB,EAC9B,KAAK,EAAE,2BAA2B,GAAG,SAAS,EAC9C,UAAU,EAAE,OAAO,KAChB,IAAI,CAAA;IACT,yBAAyB,EAAE,CAAC,MAAM,EAAE,kBAAkB,EAAE,KAAK,IAAI,CAAA;IACjE,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,uBAAuB,CAAA;IACpC,QAAQ,EAAE,QAAQ,CAAA;IAClB,aAAa,EAAE,CAAC,QAAQ,EAAE,QAAQ,KAAK,IAAI,CAAA;IAC3C,MAAM,EAAE,MAAM,IAAI,CAAA;IAClB,WAAW,EAAE,OAAO,CAAA;IACpB,YAAY,CAAC,EAAE,MAAM,IAAI,CAAA;CAC1B,CAAA;AAKD,MAAM,MAAM,QAAQ,GAAG,KAAK,GAAG,KAAK,GAAG,wBAAwB,CAAA;AAgB/D,MAAM,MAAM,SAAS,GAAG;IACtB,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,CAAA;IACnB,MAAM,EAAE,cAAc,EAAE,CAAA;IACxB,MAAM,EAAE,MAAM,EAAE,CAAA;CACjB,CAAA;AAED,wBAAsB,oBAAoB,CACxC,WAAW,EAAE,uBAAuB,EACpC,UAAU,EAAE,cAAc,GAAG,SAAS,EACtC,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,QAAQ,EAClB,WAAW,CAAC,EAAE,MAAM;;;;;;;;;GA+JrB;AAsBD,wBAAgB,YAAY,CAC1B,WAAW,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACtC,QAAQ,EAAE,QAAQ,EAClB,SAAS,EAAE,MAAM,GAChB;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CA8BnC;AAED,iBAAS,aAAa,CAAC,KAAK,EAAE,kBAAkB,
|
|
1
|
+
{"version":3,"file":"FacetNavPanel.d.ts","sourceRoot":"","sources":["../../../../src/components/widgets/facet-nav/FacetNavPanel.tsx"],"names":[],"mappings":"AAcA,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,2BAA2B,EAC3B,uBAAuB,EACxB,MAAM,iCAAiC,CAAA;AAExC,OAAO,KAAK,MAAM,MAAM,sBAAsB,CAAA;AAW9C,OAAO,EAAE,cAAc,EAAY,MAAM,wBAAwB,CAAA;AAGjE,MAAM,MAAM,kBAAkB,GAAG;IAC/B,wBAAwB,EAAE,CACxB,KAAK,EAAE,uBAAuB,EAC9B,KAAK,EAAE,2BAA2B,GAAG,SAAS,EAC9C,UAAU,EAAE,OAAO,KAChB,IAAI,CAAA;IACT,yBAAyB,EAAE,CAAC,MAAM,EAAE,kBAAkB,EAAE,KAAK,IAAI,CAAA;IACjE,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,uBAAuB,CAAA;IACpC,QAAQ,EAAE,QAAQ,CAAA;IAClB,aAAa,EAAE,CAAC,QAAQ,EAAE,QAAQ,KAAK,IAAI,CAAA;IAC3C,MAAM,EAAE,MAAM,IAAI,CAAA;IAClB,WAAW,EAAE,OAAO,CAAA;IACpB,YAAY,CAAC,EAAE,MAAM,IAAI,CAAA;CAC1B,CAAA;AAKD,MAAM,MAAM,QAAQ,GAAG,KAAK,GAAG,KAAK,GAAG,wBAAwB,CAAA;AAgB/D,MAAM,MAAM,SAAS,GAAG;IACtB,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,CAAA;IACnB,MAAM,EAAE,cAAc,EAAE,CAAA;IACxB,MAAM,EAAE,MAAM,EAAE,CAAA;CACjB,CAAA;AAED,wBAAsB,oBAAoB,CACxC,WAAW,EAAE,uBAAuB,EACpC,UAAU,EAAE,cAAc,GAAG,SAAS,EACtC,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,QAAQ,EAClB,WAAW,CAAC,EAAE,MAAM;;;;;;;;;GA+JrB;AAsBD,wBAAgB,YAAY,CAC1B,WAAW,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACtC,QAAQ,EAAE,QAAQ,EAClB,SAAS,EAAE,MAAM,GAChB;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CA8BnC;AAED,iBAAS,aAAa,CAAC,KAAK,EAAE,kBAAkB,2CAgL/C;AAED,eAAe,aAAa,CAAA"}
|
|
@@ -15,15 +15,15 @@ import { getContrastColorPalette as f } from "../../ColorGradient/ColorGradient.
|
|
|
15
15
|
import p from "../../Plot/PlotPanelHeader.js";
|
|
16
16
|
import { FacetPlotLegendList as m } from "./FacetPlotLegendList.js";
|
|
17
17
|
import { truncate as h } from "./FacetPlotLegendUtils.js";
|
|
18
|
-
import {
|
|
19
|
-
import { Box as
|
|
20
|
-
import { Fragment as
|
|
21
|
-
import { ColumnTypeEnum as
|
|
22
|
-
import { useQuery as
|
|
23
|
-
import { InfoOutlined as
|
|
24
|
-
import { useMeasure as
|
|
18
|
+
import { useId as g, useMemo as _, useState as v } from "react";
|
|
19
|
+
import { Box as y, InputLabel as b, MenuItem as x, Select as S, Stack as C, Tooltip as w } from "@mui/material";
|
|
20
|
+
import { Fragment as T, jsx as E, jsxs as D } from "react/jsx-runtime";
|
|
21
|
+
import { ColumnTypeEnum as O } from "@sage-bionetworks/synapse-types";
|
|
22
|
+
import { useQuery as k } from "@tanstack/react-query";
|
|
23
|
+
import { InfoOutlined as A } from "@mui/icons-material";
|
|
24
|
+
import { useMeasure as j } from "@react-hookz/web";
|
|
25
25
|
//#region src/components/widgets/facet-nav/FacetNavPanel.tsx
|
|
26
|
-
var
|
|
26
|
+
var M = 19, N = {
|
|
27
27
|
showlegend: !1,
|
|
28
28
|
annotations: [],
|
|
29
29
|
margin: {
|
|
@@ -42,15 +42,15 @@ var j = 19, M = {
|
|
|
42
42
|
showgrid: !1
|
|
43
43
|
}
|
|
44
44
|
};
|
|
45
|
-
async function
|
|
45
|
+
async function P(r, i, a, o, s) {
|
|
46
46
|
let c = f("odd", 0, r.facetValues.length), l = async (r, i, a) => {
|
|
47
47
|
let o = /* @__PURE__ */ new Map();
|
|
48
48
|
o.set(t, e);
|
|
49
49
|
let s = r.map((e) => e.value).filter((e) => e !== t);
|
|
50
|
-
if (i ===
|
|
50
|
+
if (i === O.ENTITYID || i === O.ENTITYID_LIST) {
|
|
51
51
|
let e = await n.getEntityHeadersByIds(s, a);
|
|
52
52
|
for (let t of e.results) o.set(t.id, t.name);
|
|
53
|
-
} else if (i ===
|
|
53
|
+
} else if (i === O.USERID || i === O.USERID_LIST) {
|
|
54
54
|
let e = await n.getGroupHeadersBatch(s, a);
|
|
55
55
|
for (let t of e.children) o.set(t.ownerId, t.userName);
|
|
56
56
|
}
|
|
@@ -62,7 +62,7 @@ async function N(r, i, a, o, s) {
|
|
|
62
62
|
}));
|
|
63
63
|
}, u = (e, t, n) => {
|
|
64
64
|
let r = n.get(e.value) ?? e.value;
|
|
65
|
-
return t && (r = h(r,
|
|
65
|
+
return t && (r = h(r, M)), r;
|
|
66
66
|
}, d = await l(r.facetValues, i, s), p = d.map((e) => e.truncatedLabel), m = r.facetValues.some((e) => e.isSelected), g = m ? r.facetValues.map((e, t) => e.isSelected ? c[t] : c[t].replace("rgb(", "rgba(").replace(")", ", 0.25)")) : c, _ = r.facetValues.map((e) => e.count), v;
|
|
67
67
|
o === "BAR" ? v = r.facetValues.map((e) => d.find((t) => t.facet === e)?.label ?? e.value) : o === "STACKED_HORIZONTAL_BAR" && (v = _);
|
|
68
68
|
let y;
|
|
@@ -95,13 +95,13 @@ async function N(r, i, a, o, s) {
|
|
|
95
95
|
colors: o === "PIE" ? b.marker?.colors : b.marker?.color
|
|
96
96
|
};
|
|
97
97
|
}
|
|
98
|
-
var
|
|
98
|
+
var F = (e, t, n) => {
|
|
99
99
|
if (e.points && e.points[0]) {
|
|
100
100
|
let r = e.points[0], i = r.data.facetEnumerationValues[r.pointNumber], a = t.facetValues.find((e) => e.value === i);
|
|
101
101
|
n(t, a, !a.isSelected);
|
|
102
102
|
}
|
|
103
103
|
};
|
|
104
|
-
function
|
|
104
|
+
function I(e, t, n) {
|
|
105
105
|
if (e != null) {
|
|
106
106
|
let r = 1;
|
|
107
107
|
switch (t) {
|
|
@@ -126,80 +126,87 @@ function F(e, t, n) {
|
|
|
126
126
|
height: `${n}px`
|
|
127
127
|
};
|
|
128
128
|
}
|
|
129
|
-
function
|
|
130
|
-
let { onHide: t, isModalView: n, applyChangesToGraphSlice: f, index: h, facetToPlot:
|
|
129
|
+
function L(e) {
|
|
130
|
+
let { onHide: t, isModalView: n, applyChangesToGraphSlice: f, index: h, facetToPlot: O, plotType: M, onSetPlotType: R } = e, { accessToken: z } = r(), { data: B, isLoading: V } = c(), [H, U] = j(), { getColumnDisplayName: W } = l(), [G, K] = v(!1), q = W(O.columnName, O.jsonPath), J = _(() => a(O, B?.columnModels ?? []), [B?.columnModels, O]), Y = J?.columnType, { data: X } = k({
|
|
131
131
|
queryKey: [
|
|
132
132
|
"extractPlotDataArray",
|
|
133
|
-
|
|
134
|
-
|
|
133
|
+
O,
|
|
134
|
+
Y,
|
|
135
135
|
h,
|
|
136
|
-
|
|
137
|
-
|
|
136
|
+
M,
|
|
137
|
+
z
|
|
138
138
|
],
|
|
139
|
-
queryFn: () =>
|
|
140
|
-
enabled: !!
|
|
141
|
-
}),
|
|
139
|
+
queryFn: () => P(O, Y, h, M, z),
|
|
140
|
+
enabled: !!O
|
|
141
|
+
}), Z = g(), Q = g(), $ = /* @__PURE__ */ D(s, {
|
|
142
142
|
fullWidth: !0,
|
|
143
|
-
children: [/* @__PURE__ */
|
|
144
|
-
|
|
143
|
+
children: [/* @__PURE__ */ E(b, {
|
|
144
|
+
id: Z,
|
|
145
|
+
children: "Chart Type"
|
|
146
|
+
}), /* @__PURE__ */ D(S, {
|
|
147
|
+
labelId: Z,
|
|
148
|
+
label: "Chart Type",
|
|
149
|
+
value: M,
|
|
145
150
|
onChange: (e) => {
|
|
146
|
-
|
|
151
|
+
R(e.target.value);
|
|
147
152
|
},
|
|
148
|
-
children: [/* @__PURE__ */
|
|
153
|
+
children: [/* @__PURE__ */ E(x, {
|
|
149
154
|
value: "BAR",
|
|
150
155
|
children: "Bar Chart"
|
|
151
|
-
}), /* @__PURE__ */
|
|
156
|
+
}), /* @__PURE__ */ E(x, {
|
|
152
157
|
value: "PIE",
|
|
153
158
|
children: "Pie Chart"
|
|
154
159
|
})]
|
|
155
160
|
})]
|
|
156
161
|
});
|
|
157
|
-
return !
|
|
162
|
+
return !B && V || !O || !J ? /* @__PURE__ */ E("div", {
|
|
158
163
|
className: "SRC-loadingContainer SRC-centerContentColumn",
|
|
159
164
|
children: i
|
|
160
|
-
}) : /* @__PURE__ */
|
|
161
|
-
open:
|
|
162
|
-
onCancel: () =>
|
|
163
|
-
title:
|
|
164
|
-
content: /* @__PURE__ */
|
|
165
|
+
}) : /* @__PURE__ */ D(T, { children: [/* @__PURE__ */ E(o, {
|
|
166
|
+
open: G,
|
|
167
|
+
onCancel: () => K(!1),
|
|
168
|
+
title: q ?? "",
|
|
169
|
+
content: /* @__PURE__ */ E(L, {
|
|
165
170
|
...e,
|
|
166
171
|
isModalView: !0
|
|
167
172
|
}),
|
|
168
173
|
hasCancelButton: !1,
|
|
169
174
|
confirmButtonProps: { children: "Apply Filters" },
|
|
170
|
-
onConfirm: () =>
|
|
175
|
+
onConfirm: () => K(!1),
|
|
171
176
|
maxWidth: "md"
|
|
172
|
-
}), /* @__PURE__ */
|
|
177
|
+
}), /* @__PURE__ */ D("div", {
|
|
173
178
|
role: "figure",
|
|
174
179
|
className: `FacetNavPanel${n ? "--expanded" : ""}`,
|
|
175
180
|
children: [
|
|
176
|
-
!n && /* @__PURE__ */
|
|
177
|
-
data:
|
|
178
|
-
isLoading:
|
|
179
|
-
title:
|
|
180
|
-
facetToPlot:
|
|
181
|
+
!n && /* @__PURE__ */ E(p, {
|
|
182
|
+
data: B,
|
|
183
|
+
isLoading: V,
|
|
184
|
+
title: q,
|
|
185
|
+
facetToPlot: O,
|
|
181
186
|
onHide: t,
|
|
182
|
-
setShowModal:
|
|
187
|
+
setShowModal: K
|
|
183
188
|
}),
|
|
184
|
-
n && /* @__PURE__ */
|
|
189
|
+
n && /* @__PURE__ */ D(C, {
|
|
185
190
|
sx: { gap: 2 },
|
|
186
|
-
children: [/* @__PURE__ */
|
|
191
|
+
children: [/* @__PURE__ */ D(s, { children: [/* @__PURE__ */ D(b, {
|
|
192
|
+
id: Q,
|
|
187
193
|
sx: {
|
|
188
194
|
display: "flex",
|
|
189
195
|
alignItems: "center",
|
|
190
196
|
gap: .5
|
|
191
197
|
},
|
|
192
|
-
children: [/* @__PURE__ */
|
|
198
|
+
children: [/* @__PURE__ */ E("span", { children: "Filter All Data By" }), /* @__PURE__ */ E(w, {
|
|
193
199
|
title: "Selecting items in this dropdown will affect all facets on the Explore page.",
|
|
194
|
-
children: /* @__PURE__ */
|
|
200
|
+
children: /* @__PURE__ */ E(A, { className: "SRC-hand-cursor SRC-secondary-text-color" })
|
|
195
201
|
})]
|
|
196
|
-
}), /* @__PURE__ */
|
|
197
|
-
|
|
202
|
+
}), /* @__PURE__ */ E(u, {
|
|
203
|
+
labelId: Q,
|
|
204
|
+
facet: O,
|
|
198
205
|
containerAs: "Dropdown",
|
|
199
206
|
dropdownType: "SelectBox"
|
|
200
|
-
})] }),
|
|
207
|
+
})] }), $]
|
|
201
208
|
}),
|
|
202
|
-
/* @__PURE__ */
|
|
209
|
+
/* @__PURE__ */ D(y, {
|
|
203
210
|
sx: {
|
|
204
211
|
display: "grid",
|
|
205
212
|
gridTemplateColumns: "50% 50%",
|
|
@@ -207,18 +214,18 @@ function I(e) {
|
|
|
207
214
|
},
|
|
208
215
|
role: "graphics-object",
|
|
209
216
|
className: "FacetNavPanel__body",
|
|
210
|
-
children: [/* @__PURE__ */
|
|
211
|
-
ref:
|
|
212
|
-
children: /* @__PURE__ */
|
|
213
|
-
layout:
|
|
214
|
-
data:
|
|
215
|
-
style:
|
|
217
|
+
children: [/* @__PURE__ */ E("div", {
|
|
218
|
+
ref: U,
|
|
219
|
+
children: /* @__PURE__ */ E(d, {
|
|
220
|
+
layout: N,
|
|
221
|
+
data: X?.data ?? [],
|
|
222
|
+
style: I(H?.width, M, n ? 300 : 150),
|
|
216
223
|
config: { displayModeBar: !1 },
|
|
217
|
-
onClick: (e) =>
|
|
218
|
-
}, `${
|
|
219
|
-
}), /* @__PURE__ */
|
|
220
|
-
labels:
|
|
221
|
-
colors:
|
|
224
|
+
onClick: (e) => F(e, O, f)
|
|
225
|
+
}, `${O.columnName}-${O.jsonPath}-${M}-${H?.width}`)
|
|
226
|
+
}), /* @__PURE__ */ E(m, {
|
|
227
|
+
labels: X?.labels,
|
|
228
|
+
colors: X?.colors,
|
|
222
229
|
isExpanded: n
|
|
223
230
|
})]
|
|
224
231
|
})
|
|
@@ -226,6 +233,6 @@ function I(e) {
|
|
|
226
233
|
})] });
|
|
227
234
|
}
|
|
228
235
|
//#endregion
|
|
229
|
-
export {
|
|
236
|
+
export { L as default, P as extractPlotDataArray, I as getPlotStyle };
|
|
230
237
|
|
|
231
238
|
//# sourceMappingURL=FacetNavPanel.js.map
|