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.
Files changed (225) hide show
  1. package/README.md +5 -3
  2. package/dist/SWC.index.d.ts.map +1 -1
  3. package/dist/SWC.index.js +1 -1
  4. package/dist/SWC.index.js.map +1 -1
  5. package/dist/assets/homepage/BlinkingLiveIcon.d.ts +1 -1
  6. package/dist/components/AccessRequirementAclEditor/AccessRequirementAclEditor.d.ts.map +1 -1
  7. package/dist/components/AccessRequirementAclEditor/AccessRequirementAclEditor.js.map +1 -1
  8. package/dist/components/AccessRequirementList/AccessRequirementList.js.map +1 -1
  9. package/dist/components/AccessRequirementList/RequirementItem/CertificationRequirement.js.map +1 -1
  10. package/dist/components/AccessRequirementList/RequirementItem/SelfSignAccessRequirementItem.js.map +1 -1
  11. package/dist/components/AccessRequirementList/RequirementItem/UnmanagedACTAccessRequirementItem.js.map +1 -1
  12. package/dist/components/AccessRequirementList/RequirementItem/ValidationRequirement.js.map +1 -1
  13. package/dist/components/AccessTokenPage/CreateAccessTokenModal.d.ts.map +1 -1
  14. package/dist/components/AccessTokenPage/CreateAccessTokenModal.js +56 -54
  15. package/dist/components/AccessTokenPage/CreateAccessTokenModal.js.map +1 -1
  16. package/dist/components/Authentication/PasswordField.d.ts +1 -1
  17. package/dist/components/Authentication/PasswordField.d.ts.map +1 -1
  18. package/dist/components/Authentication/PasswordField.js.map +1 -1
  19. package/dist/components/Authentication/TwoFactorEnrollmentForm.d.ts.map +1 -1
  20. package/dist/components/Authentication/TwoFactorEnrollmentForm.js +1 -2
  21. package/dist/components/Authentication/TwoFactorEnrollmentForm.js.map +1 -1
  22. package/dist/components/Authentication/UsernamePasswordForm.d.ts.map +1 -1
  23. package/dist/components/Authentication/UsernamePasswordForm.js +32 -29
  24. package/dist/components/Authentication/UsernamePasswordForm.js.map +1 -1
  25. package/dist/components/CardContainer/CardLink.d.ts +2 -2
  26. package/dist/components/CardContainer/CardLink.d.ts.map +1 -1
  27. package/dist/components/CardDeck/CardDeckCardProps.d.ts.map +1 -1
  28. package/dist/components/ChallengeSubmission/SubmissionDirectoryList.js.map +1 -1
  29. package/dist/components/ChallengeTeamWizard/CreateChallengeTeam.d.ts.map +1 -1
  30. package/dist/components/ChallengeTeamWizard/CreateChallengeTeam.js +106 -103
  31. package/dist/components/ChallengeTeamWizard/CreateChallengeTeam.js.map +1 -1
  32. package/dist/components/ChallengeTeamWizard/MembershipRequestForm.d.ts.map +1 -1
  33. package/dist/components/ChallengeTeamWizard/MembershipRequestForm.js.map +1 -1
  34. package/dist/components/ChallengeTeamWizard/useCreateAndRegisterChallengeTeam.d.ts.map +1 -1
  35. package/dist/components/ChallengeTeamWizard/useCreateAndRegisterChallengeTeam.js.map +1 -1
  36. package/dist/components/CreateProjectModal/CreateProjectModal.d.ts.map +1 -1
  37. package/dist/components/CreateProjectModal/CreateProjectModal.js +4 -4
  38. package/dist/components/CreateProjectModal/CreateProjectModal.js.map +1 -1
  39. package/dist/components/CreateTableViewWizard/TableNameForm.js +6 -6
  40. package/dist/components/CreateTableViewWizard/TableNameForm.js.map +1 -1
  41. package/dist/components/CrispChat/CrispChat.js +4 -4
  42. package/dist/components/CrispChat/CrispChat.js.map +1 -1
  43. package/dist/components/DataGrid/utils/json-rx/JsonRxResponseComplete.js.map +1 -1
  44. package/dist/components/DownloadCart/RequestDownloadCard.js +14 -14
  45. package/dist/components/DownloadCart/RequestDownloadCard.js.map +1 -1
  46. package/dist/components/EntityAclEditor/EntityAclEditor.d.ts.map +1 -1
  47. package/dist/components/EntityAclEditor/EntityAclEditor.js.map +1 -1
  48. package/dist/components/EntityBadgeIcons/EntityBadgeIcons.d.ts.map +1 -1
  49. package/dist/components/EntityBadgeIcons/EntityBadgeIcons.js.map +1 -1
  50. package/dist/components/EntityCitation/EntityCitationUtils.js.map +1 -1
  51. package/dist/components/EntityDownloadConfirmation/EntityDownloadConfirmation.js.map +1 -1
  52. package/dist/components/EntityFinder/EntityFinder.js.map +1 -1
  53. package/dist/components/EntityFinder/EntityIdTextField.d.ts +17 -0
  54. package/dist/components/EntityFinder/EntityIdTextField.d.ts.map +1 -0
  55. package/dist/components/EntityFinder/EntityIdTextField.js +35 -0
  56. package/dist/components/EntityFinder/EntityIdTextField.js.map +1 -0
  57. package/dist/components/Evaluation/round_limits/EvaluationRoundLimitOptions.d.ts.map +1 -1
  58. package/dist/components/Evaluation/round_limits/EvaluationRoundLimitOptions.js +22 -16
  59. package/dist/components/Evaluation/round_limits/EvaluationRoundLimitOptions.js.map +1 -1
  60. package/dist/components/FeaturedDataTabs/FacetPlotsCardGrid.js.map +1 -1
  61. package/dist/components/Forum/ForumThreadEditor.js.map +1 -1
  62. package/dist/components/FullWidthAlert/FullWidthAlert.d.ts.map +1 -1
  63. package/dist/components/FullWidthAlert/FullWidthAlert.js.map +1 -1
  64. package/dist/components/GenericCard/PortalDOI/PortalDOIUtils.d.ts.map +1 -1
  65. package/dist/components/GenericCard/PortalDOI/PortalDOIUtils.js.map +1 -1
  66. package/dist/components/Markdown/widget/MarkdownSynapsePlot.js.map +1 -1
  67. package/dist/components/OAuthClientAclEditor/OAuthClientAclEditor.d.ts.map +1 -1
  68. package/dist/components/OAuthClientAclEditor/OAuthClientAclEditor.js.map +1 -1
  69. package/dist/components/PortalAclEditor/PortalAclEditor.d.ts.map +1 -1
  70. package/dist/components/PortalAclEditor/PortalAclEditor.js.map +1 -1
  71. package/dist/components/PortalHomePageHeader/PortalHomePageHeader.d.ts +1 -1
  72. package/dist/components/PortalHomePageHeader/PortalHomePageHeader.d.ts.map +1 -1
  73. package/dist/components/PortalHomePageHeader/PortalHomePageHeader.js +1 -1
  74. package/dist/components/PortalHomePageHeader/PortalHomePageHeader.js.map +1 -1
  75. package/dist/components/PortalList/CreatePortalModal.d.ts.map +1 -1
  76. package/dist/components/PortalList/CreatePortalModal.js +34 -33
  77. package/dist/components/PortalList/CreatePortalModal.js.map +1 -1
  78. package/dist/components/QueryVisualizationWrapper/QueryVisualizationWrapper.d.ts.map +1 -1
  79. package/dist/components/QueryVisualizationWrapper/QueryVisualizationWrapper.js.map +1 -1
  80. package/dist/components/QueryWrapperPlotNav/RowSetView.d.ts.map +1 -1
  81. package/dist/components/QueryWrapperPlotNav/RowSetView.js.map +1 -1
  82. package/dist/components/Resources/Resources.Desktop.js.map +1 -1
  83. package/dist/components/SearchQueryWrapper/SearchQueryUseQueryOptions.js.map +1 -1
  84. package/dist/components/SetAccessRequirementCommonFields/SetAccessRequirementCommonFields.d.ts.map +1 -1
  85. package/dist/components/SetAccessRequirementCommonFields/SetAccessRequirementCommonFields.js.map +1 -1
  86. package/dist/components/SetBasicAccessRequirementFields/SetBasicAccessRequirementFields.d.ts.map +1 -1
  87. package/dist/components/SetBasicAccessRequirementFields/SetBasicAccessRequirementFields.js.map +1 -1
  88. package/dist/components/SetManagedAccessRequirementFields/SetManagedAccessRequirementFields.d.ts.map +1 -1
  89. package/dist/components/SetManagedAccessRequirementFields/SetManagedAccessRequirementFields.js.map +1 -1
  90. package/dist/components/SynapseChat/SynapseChatInteraction.js.map +1 -1
  91. package/dist/components/SynapsePortalBanners/SynapsePortalBanners.d.ts.map +1 -1
  92. package/dist/components/SynapsePortalBanners/SynapsePortalBanners.js +1 -1
  93. package/dist/components/SynapsePortalBanners/SynapsePortalBanners.js.map +1 -1
  94. package/dist/components/SynapseTable/SearchV2.js.map +1 -1
  95. package/dist/components/SynapseTable/SynapseTable.js.map +1 -1
  96. package/dist/components/SynapseTable/SynapseTableUtils.d.ts.map +1 -1
  97. package/dist/components/SynapseTable/SynapseTableUtils.js.map +1 -1
  98. package/dist/components/SynapseTable/datasets/DatasetItemsEditor.js.map +1 -1
  99. package/dist/components/TableColumnSchemaEditor/ColumnModelForm.js.map +1 -1
  100. package/dist/components/TableColumnSchemaEditor/TableColumnSchemaForm.d.ts.map +1 -1
  101. package/dist/components/TableColumnSchemaEditor/TableColumnSchemaForm.js.map +1 -1
  102. package/dist/components/TanStackTable/TanStackTableUtils.js.map +1 -1
  103. package/dist/components/TextField/TextField.css +1 -1
  104. package/dist/components/TextField/TextField.d.ts +14 -3
  105. package/dist/components/TextField/TextField.d.ts.map +1 -1
  106. package/dist/components/TextField/TextField.js +41 -43
  107. package/dist/components/TextField/TextField.js.map +1 -1
  108. package/dist/components/TextField/TextField.module.js +3 -4
  109. package/dist/components/TextField/TextField.module.js.map +1 -1
  110. package/dist/components/TextField/TextField.module.scss +18 -10
  111. package/dist/components/TimelinePlot/TimelinePlotSpeciesSelector.d.ts.map +1 -1
  112. package/dist/components/TimelinePlot/TimelinePlotSpeciesSelector.js +20 -16
  113. package/dist/components/TimelinePlot/TimelinePlotSpeciesSelector.js.map +1 -1
  114. package/dist/components/UserCardList/UserCardList.d.ts.map +1 -1
  115. package/dist/components/UserCardList/UserCardList.js.map +1 -1
  116. package/dist/components/UserCardList/UserCardListGroups/UserCardListGroups.Desktop.js.map +1 -1
  117. package/dist/components/UserOrTeamBadge/useUserOrTeam.js.map +1 -1
  118. package/dist/components/UserSearchBox/UserSearchBox.d.ts.map +1 -1
  119. package/dist/components/UserSearchBox/UserSearchBox.js.map +1 -1
  120. package/dist/components/WikiMarkdownEditorButton/WikiMarkdownEditorButton.js.map +1 -1
  121. package/dist/components/dataaccess/SubmissionPage/SubmissionPage.js.map +1 -1
  122. package/dist/components/doi/CreateOrUpdateDoiModal.js +13 -13
  123. package/dist/components/doi/CreateOrUpdateDoiModal.js.map +1 -1
  124. package/dist/components/entity/page/title_bar/TitleBarProperties.js +23 -23
  125. package/dist/components/entity/page/title_bar/TitleBarProperties.js.map +1 -1
  126. package/dist/components/entity/page/title_bar/useGetMentions.js.map +1 -1
  127. package/dist/components/index.js +17 -17
  128. package/dist/components/styled/StyledFormControl.d.ts +15 -0
  129. package/dist/components/styled/StyledFormControl.d.ts.map +1 -1
  130. package/dist/components/styled/StyledFormControl.js +1 -0
  131. package/dist/components/styled/StyledFormControl.js.map +1 -1
  132. package/dist/components/styled/index.js +3 -3
  133. package/dist/components/utils/ConditionalWrapper.d.ts.map +1 -1
  134. package/dist/components/utils/ConditionalWrapper.js.map +1 -1
  135. package/dist/components/widgets/ElementWithTooltip.js.map +1 -1
  136. package/dist/components/widgets/facet-nav/FacetNavPanel.d.ts.map +1 -1
  137. package/dist/components/widgets/facet-nav/FacetNavPanel.js +69 -62
  138. package/dist/components/widgets/facet-nav/FacetNavPanel.js.map +1 -1
  139. package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilter.d.ts +1 -0
  140. package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilter.d.ts.map +1 -1
  141. package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilter.js +27 -26
  142. package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilter.js.map +1 -1
  143. package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilterDropdown.d.ts +1 -0
  144. package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilterDropdown.d.ts.map +1 -1
  145. package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilterDropdown.js +2 -1
  146. package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilterDropdown.js.map +1 -1
  147. package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilterUI.d.ts +1 -0
  148. package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilterUI.d.ts.map +1 -1
  149. package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilterUI.js +44 -43
  150. package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilterUI.js.map +1 -1
  151. package/dist/features/entity/metadata-task/components/CreateOrUpdateCurationTaskDialog.d.ts +13 -0
  152. package/dist/features/entity/metadata-task/components/CreateOrUpdateCurationTaskDialog.d.ts.map +1 -0
  153. package/dist/features/entity/metadata-task/components/CreateOrUpdateCurationTaskDialog.js +398 -0
  154. package/dist/features/entity/metadata-task/components/CreateOrUpdateCurationTaskDialog.js.map +1 -0
  155. package/dist/features/entity/metadata-task/components/MetadataTaskTableActionCell.d.ts.map +1 -1
  156. package/dist/features/entity/metadata-task/components/MetadataTaskTableActionCell.js +49 -19
  157. package/dist/features/entity/metadata-task/components/MetadataTaskTableActionCell.js.map +1 -1
  158. package/dist/features/entity/metadata-task/components/MetadataTasksPage.d.ts.map +1 -1
  159. package/dist/features/entity/metadata-task/components/MetadataTasksPage.js +46 -25
  160. package/dist/features/entity/metadata-task/components/MetadataTasksPage.js.map +1 -1
  161. package/dist/features/entity/metadata-task/hooks/useGridSessionForCurationTask.d.ts +0 -1
  162. package/dist/features/entity/metadata-task/hooks/useGridSessionForCurationTask.d.ts.map +1 -1
  163. package/dist/features/entity/metadata-task/hooks/useGridSessionForCurationTask.js +20 -22
  164. package/dist/features/entity/metadata-task/hooks/useGridSessionForCurationTask.js.map +1 -1
  165. package/dist/features/entity/metadata-task/hooks/useOpenCuratorButton.d.ts.map +1 -1
  166. package/dist/features/entity/metadata-task/hooks/useOpenCuratorButton.js +25 -27
  167. package/dist/features/entity/metadata-task/hooks/useOpenCuratorButton.js.map +1 -1
  168. package/dist/features/entity/metadata-task/utils/constants.d.ts +26 -0
  169. package/dist/features/entity/metadata-task/utils/constants.d.ts.map +1 -1
  170. package/dist/features/entity/metadata-task/utils/constants.js +2 -2
  171. package/dist/features/entity/metadata-task/utils/constants.js.map +1 -1
  172. package/dist/index.js +17 -17
  173. package/dist/mockServiceWorker.js +6 -8
  174. package/dist/mocks/curation/mockCurationTask.d.ts +2 -2
  175. package/dist/mocks/curation/mockCurationTask.d.ts.map +1 -1
  176. package/dist/mocks/curation/mockCurationTask.js +9 -5
  177. package/dist/mocks/curation/mockCurationTask.js.map +1 -1
  178. package/dist/mocks/msw/handlers/featureFlagHandlers.d.ts +1 -1
  179. package/dist/mocks/msw/handlers/featureFlagHandlers.d.ts.map +1 -1
  180. package/dist/mocks/msw/handlers/featureFlagHandlers.js +1 -1
  181. package/dist/mocks/msw/handlers/featureFlagHandlers.js.map +1 -1
  182. package/dist/style/components/_cards.scss +0 -3
  183. package/dist/style/components/_data-grid-extra.scss +2 -2
  184. package/dist/style/components/_login.scss +6 -2
  185. package/dist/style/main.css +1 -1
  186. package/dist/synapse-client/SynapseClient.d.ts +2 -1
  187. package/dist/synapse-client/SynapseClient.d.ts.map +1 -1
  188. package/dist/synapse-client/SynapseClient.js.map +1 -1
  189. package/dist/synapse-queries/QueryFilterUtils.js.map +1 -1
  190. package/dist/synapse-queries/curation/task/useCurationTask.d.ts +1 -0
  191. package/dist/synapse-queries/curation/task/useCurationTask.d.ts.map +1 -1
  192. package/dist/synapse-queries/curation/task/useCurationTask.js +16 -6
  193. package/dist/synapse-queries/curation/task/useCurationTask.js.map +1 -1
  194. package/dist/synapse-queries/dataaccess/useAccessRequirements.d.ts.map +1 -1
  195. package/dist/synapse-queries/dataaccess/useAccessRequirements.js.map +1 -1
  196. package/dist/synapse-queries/entity/useGetQueryResultBundle.js.map +1 -1
  197. package/dist/synapse-queries/featureflags/useGetFeatureFlag.d.ts +1 -1
  198. package/dist/synapse-queries/featureflags/useGetFeatureFlag.d.ts.map +1 -1
  199. package/dist/synapse-queries/featureflags/useGetFeatureFlag.js.map +1 -1
  200. package/dist/synapse-queries/file/useFiles.d.ts.map +1 -1
  201. package/dist/synapse-queries/file/useFiles.js.map +1 -1
  202. package/dist/synapse-queries/termsOfService/useTermsOfService.d.ts.map +1 -1
  203. package/dist/synapse-queries/termsOfService/useTermsOfService.js.map +1 -1
  204. package/dist/synapse-queries/user/useGetUserChallenges.d.ts.map +1 -1
  205. package/dist/synapse-queries/user/useGetUserChallenges.js.map +1 -1
  206. package/dist/testutils/ReactQueryMockUtils.js.map +1 -1
  207. package/dist/theme/palette/Palettes.d.ts +2 -2
  208. package/dist/theme/palette/Palettes.d.ts.map +1 -1
  209. package/dist/theme/palette/Palettes.js +2 -2
  210. package/dist/theme/palette/Palettes.js.map +1 -1
  211. package/dist/tsconfig.build.tsbuildinfo +1 -1
  212. package/dist/types/ThemeTypes.d.ts +5 -6
  213. package/dist/utils/AppUtils/session/SynapseSessionManager.d.ts.map +1 -1
  214. package/dist/utils/AppUtils/session/SynapseSessionManager.js.map +1 -1
  215. package/dist/utils/featureflag/FeatureFlags.d.ts +12 -0
  216. package/dist/utils/featureflag/FeatureFlags.d.ts.map +1 -0
  217. package/dist/utils/featureflag/FeatureFlags.js +8 -0
  218. package/dist/utils/featureflag/FeatureFlags.js.map +1 -0
  219. package/dist/utils/functions/SanitizeHtmlUtils.js.map +1 -1
  220. package/dist/utils/functions/queryUtils.js.map +1 -1
  221. package/dist/utils/hooks/useGetInfoFromIds.d.ts.map +1 -1
  222. package/dist/utils/hooks/useGetInfoFromIds.js.map +1 -1
  223. package/dist/utils/slots/SlotUtils.d.ts.map +1 -1
  224. package/dist/utils/slots/SlotUtils.js.map +1 -1
  225. 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 "../../../AccessRequirement/AddConditionsForUseButton/AddConditionsForUseButton.js";
5
- import { useGetEntityTitleBarProperties as r } from "./useGetEntityTitleBarProperties.js";
6
- import { useState as i } from "react";
7
- import { Box as a, Divider as o, Link as s, Stack as c, Typography as l } from "@mui/material";
8
- import { jsx as u, jsxs as d } from "react/jsx-runtime";
9
- import { FeatureFlagEnum as f } from "@sage-bionetworks/synapse-types";
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__ */ d("tr", { children: [/* @__PURE__ */ u("td", {
13
+ return /* @__PURE__ */ f("tr", { children: [/* @__PURE__ */ d("td", {
14
14
  style: { paddingRight: "1em" },
15
- children: /* @__PURE__ */ u(l, {
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__ */ u("td", { children: /* @__PURE__ */ u(l, {
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(l) {
28
- let { entityId: m, versionNumber: h, onActMemberClickAddConditionsForUse: g } = l, { data: _ } = e(m, h), v = t(f.DESCRIPTION_FIELD), y = r(m, h), [b, x] = i(!1);
29
- return /* @__PURE__ */ d(a, {
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__ */ d(c, {
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__ */ d(c, {
38
+ children: [/* @__PURE__ */ f(l, {
39
39
  direction: "row",
40
- divider: /* @__PURE__ */ u(o, {
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__ */ u("table", { children: /* @__PURE__ */ u("tbody", { children: y.slice(0, 2).map((e) => /* @__PURE__ */ u(p, {
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__ */ u("table", { children: /* @__PURE__ */ u("tbody", { children: y.slice(2, 4).map((e) => /* @__PURE__ */ u(p, {
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__ */ u("table", { children: /* @__PURE__ */ u("tbody", { children: y.slice(4, 6).map((e) => /* @__PURE__ */ u(p, {
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__ */ u(s, {
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__ */ u(n, {
64
+ }), /* @__PURE__ */ d(r, {
65
65
  entityId: m,
66
66
  onACTMemberClick: g
67
67
  })]
68
68
  }),
69
- b && /* @__PURE__ */ u(a, {
69
+ b && /* @__PURE__ */ d(o, {
70
70
  sx: { pt: "20px" },
71
- children: /* @__PURE__ */ u("table", { children: /* @__PURE__ */ u("tbody", { children: y.slice(4, Infinity).map((e) => /* @__PURE__ */ u(p, {
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__ */ u(a, {
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 '@sage-bionetworks/synapse-types'\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,k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AC,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
+ {"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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A;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),\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,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,GAE/C;EACL,CAAC"}
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"}
@@ -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 { StyledFormControl as S } from "./styled/StyledFormControl.js";
19
- import C from "./TextField/TextField.js";
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 T } from "./AccountLevelBadges/AccountLevelBadges.js";
21
+ import { AccountLevelBadges as w } from "./AccountLevelBadges/AccountLevelBadges.js";
23
22
  import "./AccountLevelBadges/index.js";
24
- import E, { useLastLoginInfo as D, useLastLoginInfoState as O } from "./Authentication/LastLoginInfo.js";
23
+ import T, { useLastLoginInfo as E, useLastLoginInfoState as D } from "./Authentication/LastLoginInfo.js";
25
24
  import "./TextField/index.js";
26
- import k from "./Authentication/PasswordField.js";
25
+ import O from "./Authentication/PasswordField.js";
27
26
  import "./IconSvg/index.js";
28
- import A from "./Authentication/OneTimePasswordForm.js";
29
- import j from "./Authentication/StandaloneLoginForm.js";
30
- import { LeftRightPanel as M, StyledInnerContainer as N, StyledOuterContainer as P } from "./styled/LeftRightPanel.js";
31
- import F from "./Authentication/TwoFactorEnrollmentForm.js";
32
- import I from "./Authentication/TwoFactorAuthSettingsPanel.js";
33
- import L from "./Authentication/TwoFactorBackupCodes.js";
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 R, getLinkParams as z, getValueOrMultiValue as B } from "./GenericCard/CardUtils.js";
36
- import { Project as V } from "../assets/themed_icons/Project.js";
37
- import H from "./Icon/Icon.js";
38
- import U from "./ShowMore/ShowMore.js";
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, w as AccessTokenPage, T 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, H as Icon, x as IconSvg, Bt as ImageCardGridWithLinks, yt as InputSizedButton, It as JsonLdScript, E as LastLoginInfo, M 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, A as OneTimePasswordForm, et as OrientationBanner, k 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, V 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, U as ShowMore, s as SignInPrompt, f as SkeletonButton, p as SkeletonInlineBlock, h as SkeletonParagraph, m as SkeletonTable, j as StandaloneLoginForm, vt as StandaloneQueryWrapper, S as StyledFormControl, N as StyledInnerContainer, P 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, C as TextField, tt as ThemesPlot, kt as TimelinePlot, I as TwoFactorAuthSettingsPanel, L as TwoFactorBackupCodes, F 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, R as getFileHandleAssociation, z as getLinkParams, B as getValueOrMultiValue, ft as isSearchQueryWrapperPlotNavProps, D as useLastLoginInfo, O as useLastLoginInfoState, J as useQueryContext, Xt as visuallyHidden };
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;AAWjD,eAAO,MAAM,iBAAiB,EAAE,eAAe,CAAC,gBAAgB,CA0B7D,CAAA;AAEH,eAAe,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/* bootstrap-like label/text inputs\n usage:\n <StyledFormControl fullWidth variant=\"standard\" margin=\"normal\">\n <InputLabel shrink htmlFor=\"someinput\">\n labelText\n </InputLabel>\n <InputBase id=\"someinput\"/>\n </StyledFormControl>\n*/\nexport const StyledFormControl: StyledComponent<FormControlProps> = styled(\n FormControl,\n {\n label: 'StyledFormControl',\n },\n)(({ theme }) => ({\n '& label': {\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":";;AAkBA,IAAa,IAAuD,EAClE,GACA,EACE,OAAO,qBACR,CACF,EAAE,EAAE,gBAAa;CAChB,WAAW;EACT,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
+ {"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 { StyledFormControl as t } from "./StyledFormControl.js";
3
- import { LeftRightPanel as n, StyledInnerContainer as r, StyledOuterContainer as i } from "./LeftRightPanel.js";
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, n as LeftRightPanel, e as LightTooltip, t as StyledFormControl, r as StyledInnerContainer, i as StyledOuterContainer, a as WideButton };
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,GAAG,aAAa,CAAC,iBAAiB,CAAC,IAClF;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
+ {"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> = 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":";;AAgBA,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
+ {"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 ? 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,IACA,EAA0B,GAAO,GAAY,EAAK,GAClD,KAAY,kBAAA,GAAA,EAAK,CAAA,GAEf,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
+ {"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,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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 { useMemo as g, useState as _ } from "react";
19
- import { Box as v, InputLabel as y, MenuItem as b, Select as x, Stack as S, Tooltip as C } from "@mui/material";
20
- import { Fragment as w, jsx as T, jsxs as E } from "react/jsx-runtime";
21
- import { ColumnTypeEnum as D } from "@sage-bionetworks/synapse-types";
22
- import { useQuery as O } from "@tanstack/react-query";
23
- import { InfoOutlined as k } from "@mui/icons-material";
24
- import { useMeasure as A } from "@react-hookz/web";
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 j = 19, M = {
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 N(r, i, a, o, s) {
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 === D.ENTITYID || i === D.ENTITYID_LIST) {
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 === D.USERID || i === D.USERID_LIST) {
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, j)), 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 P = (e, t, n) => {
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 F(e, t, n) {
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 I(e) {
130
- let { onHide: t, isModalView: n, applyChangesToGraphSlice: f, index: h, facetToPlot: D, plotType: j, onSetPlotType: L } = e, { accessToken: R } = r(), { data: z, isLoading: B } = c(), [V, H] = A(), { getColumnDisplayName: U } = l(), [W, G] = _(!1), K = U(D.columnName, D.jsonPath), q = g(() => a(D, z?.columnModels ?? []), [z?.columnModels, D]), J = q?.columnType, { data: Y } = O({
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
- D,
134
- J,
133
+ O,
134
+ Y,
135
135
  h,
136
- j,
137
- R
136
+ M,
137
+ z
138
138
  ],
139
- queryFn: () => N(D, J, h, j, R),
140
- enabled: !!D
141
- }), X = /* @__PURE__ */ E(s, {
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__ */ T(y, { children: "Chart Type" }), /* @__PURE__ */ E(x, {
144
- value: j,
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
- L(e.target.value);
151
+ R(e.target.value);
147
152
  },
148
- children: [/* @__PURE__ */ T(b, {
153
+ children: [/* @__PURE__ */ E(x, {
149
154
  value: "BAR",
150
155
  children: "Bar Chart"
151
- }), /* @__PURE__ */ T(b, {
156
+ }), /* @__PURE__ */ E(x, {
152
157
  value: "PIE",
153
158
  children: "Pie Chart"
154
159
  })]
155
160
  })]
156
161
  });
157
- return !z && B || !D || !q ? /* @__PURE__ */ T("div", {
162
+ return !B && V || !O || !J ? /* @__PURE__ */ E("div", {
158
163
  className: "SRC-loadingContainer SRC-centerContentColumn",
159
164
  children: i
160
- }) : /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T(o, {
161
- open: W,
162
- onCancel: () => G(!1),
163
- title: K ?? "",
164
- content: /* @__PURE__ */ T(I, {
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: () => G(!1),
175
+ onConfirm: () => K(!1),
171
176
  maxWidth: "md"
172
- }), /* @__PURE__ */ E("div", {
177
+ }), /* @__PURE__ */ D("div", {
173
178
  role: "figure",
174
179
  className: `FacetNavPanel${n ? "--expanded" : ""}`,
175
180
  children: [
176
- !n && /* @__PURE__ */ T(p, {
177
- data: z,
178
- isLoading: B,
179
- title: K,
180
- facetToPlot: D,
181
+ !n && /* @__PURE__ */ E(p, {
182
+ data: B,
183
+ isLoading: V,
184
+ title: q,
185
+ facetToPlot: O,
181
186
  onHide: t,
182
- setShowModal: G
187
+ setShowModal: K
183
188
  }),
184
- n && /* @__PURE__ */ E(S, {
189
+ n && /* @__PURE__ */ D(C, {
185
190
  sx: { gap: 2 },
186
- children: [/* @__PURE__ */ E(s, { children: [/* @__PURE__ */ E(y, {
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__ */ T("span", { children: "Filter All Data By" }), /* @__PURE__ */ T(C, {
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__ */ T(k, { className: "SRC-hand-cursor SRC-secondary-text-color" })
200
+ children: /* @__PURE__ */ E(A, { className: "SRC-hand-cursor SRC-secondary-text-color" })
195
201
  })]
196
- }), /* @__PURE__ */ T(u, {
197
- facet: D,
202
+ }), /* @__PURE__ */ E(u, {
203
+ labelId: Q,
204
+ facet: O,
198
205
  containerAs: "Dropdown",
199
206
  dropdownType: "SelectBox"
200
- })] }), X]
207
+ })] }), $]
201
208
  }),
202
- /* @__PURE__ */ E(v, {
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__ */ T("div", {
211
- ref: H,
212
- children: /* @__PURE__ */ T(d, {
213
- layout: M,
214
- data: Y?.data ?? [],
215
- style: F(V?.width, j, n ? 300 : 150),
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) => P(e, D, f)
218
- }, `${D.columnName}-${D.jsonPath}-${j}-${V?.width}`)
219
- }), /* @__PURE__ */ T(m, {
220
- labels: Y?.labels,
221
- colors: Y?.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 { I as default, N as extractPlotDataArray, F as getPlotStyle };
236
+ export { L as default, P as extractPlotDataArray, I as getPlotStyle };
230
237
 
231
238
  //# sourceMappingURL=FacetNavPanel.js.map