synapse-react-client 4.0.21 → 4.0.22

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 (99) hide show
  1. package/dist/SWC.index.d.ts +1 -0
  2. package/dist/SWC.index.d.ts.map +1 -1
  3. package/dist/SWC.index.js +2 -1
  4. package/dist/SWC.index.js.map +1 -1
  5. package/dist/components/CardContainer/CardContainer.d.ts.map +1 -1
  6. package/dist/components/CardContainer/CardContainer.js +43 -49
  7. package/dist/components/CardContainer/CardContainer.js.map +1 -1
  8. package/dist/components/CardContainerLogic/CardContainerLogic.d.ts +13 -0
  9. package/dist/components/CardContainerLogic/CardContainerLogic.d.ts.map +1 -1
  10. package/dist/components/CardContainerLogic/CardContainerLogic.js +64 -40
  11. package/dist/components/CardContainerLogic/CardContainerLogic.js.map +1 -1
  12. package/dist/components/ChallengeSubmission/ChallengeSubmissionStepper.js +1 -1
  13. package/dist/components/ChallengeSubmission/ChallengeSubmissionStepper.js.map +1 -1
  14. package/dist/components/DataExplorer/DataExplorer.css +1 -1
  15. package/dist/components/DataExplorer/DataExplorer.module.js +16 -16
  16. package/dist/components/DataExplorer/DataExplorer.module.js.map +1 -1
  17. package/dist/components/DataExplorer/DataExplorer.module.scss +0 -1
  18. package/dist/components/DataGrid/DataGrid.d.ts +1 -0
  19. package/dist/components/DataGrid/DataGrid.d.ts.map +1 -1
  20. package/dist/components/DataGrid/DataGrid.js +72 -72
  21. package/dist/components/DataGrid/DataGrid.js.map +1 -1
  22. package/dist/components/DataGrid/SynapseGrid.d.ts.map +1 -1
  23. package/dist/components/DataGrid/SynapseGrid.js +209 -206
  24. package/dist/components/DataGrid/SynapseGrid.js.map +1 -1
  25. package/dist/components/DataGrid/components/ColumnHeaderWithTooltip.d.ts +2 -1
  26. package/dist/components/DataGrid/components/ColumnHeaderWithTooltip.d.ts.map +1 -1
  27. package/dist/components/DataGrid/components/ColumnHeaderWithTooltip.js +51 -42
  28. package/dist/components/DataGrid/components/ColumnHeaderWithTooltip.js.map +1 -1
  29. package/dist/components/DataGrid/useDataGridWebsocket.d.ts.map +1 -1
  30. package/dist/components/DataGrid/useDataGridWebsocket.js +68 -67
  31. package/dist/components/DataGrid/useDataGridWebsocket.js.map +1 -1
  32. package/dist/components/DataGrid/utils/columnFactory.d.ts +1 -0
  33. package/dist/components/DataGrid/utils/columnFactory.d.ts.map +1 -1
  34. package/dist/components/DataGrid/utils/columnFactory.js +4 -3
  35. package/dist/components/DataGrid/utils/columnFactory.js.map +1 -1
  36. package/dist/components/DataGrid/utils/modelColsToGrid.d.ts +1 -1
  37. package/dist/components/DataGrid/utils/modelColsToGrid.d.ts.map +1 -1
  38. package/dist/components/DataGrid/utils/modelColsToGrid.js +15 -14
  39. package/dist/components/DataGrid/utils/modelColsToGrid.js.map +1 -1
  40. package/dist/components/DataGrid/utils/normalizeWebsocketError.d.ts +7 -0
  41. package/dist/components/DataGrid/utils/normalizeWebsocketError.d.ts.map +1 -0
  42. package/dist/components/DataGrid/utils/normalizeWebsocketError.js +8 -0
  43. package/dist/components/DataGrid/utils/normalizeWebsocketError.js.map +1 -0
  44. package/dist/components/Goals/Goals.d.ts +8 -0
  45. package/dist/components/Goals/Goals.d.ts.map +1 -1
  46. package/dist/components/Goals/Goals.js +54 -40
  47. package/dist/components/Goals/Goals.js.map +1 -1
  48. package/dist/components/ProjectVisibilityChip/ProjectVisibilityChip.d.ts +9 -0
  49. package/dist/components/ProjectVisibilityChip/ProjectVisibilityChip.d.ts.map +1 -0
  50. package/dist/components/ProjectVisibilityChip/ProjectVisibilityChip.js +69 -0
  51. package/dist/components/ProjectVisibilityChip/ProjectVisibilityChip.js.map +1 -0
  52. package/dist/components/ProjectVisibilityChip/getProjectVisibilityFromACL.d.ts +13 -0
  53. package/dist/components/ProjectVisibilityChip/getProjectVisibilityFromACL.d.ts.map +1 -0
  54. package/dist/components/ProjectVisibilityChip/getProjectVisibilityFromACL.js +11 -0
  55. package/dist/components/ProjectVisibilityChip/getProjectVisibilityFromACL.js.map +1 -0
  56. package/dist/components/ProjectVisibilityChip/index.d.ts +5 -0
  57. package/dist/components/ProjectVisibilityChip/index.d.ts.map +1 -0
  58. package/dist/components/ProjectVisibilityChip/index.js +7 -0
  59. package/dist/components/ProjectVisibilityChip/index.js.map +1 -0
  60. package/dist/components/QueryVisualizationWrapper/QueryVisualizationWrapper.d.ts.map +1 -1
  61. package/dist/components/QueryVisualizationWrapper/QueryVisualizationWrapper.js +1 -1
  62. package/dist/components/QueryVisualizationWrapper/QueryVisualizationWrapper.js.map +1 -1
  63. package/dist/components/QueryWrapperPlotNav/RowSetView.d.ts.map +1 -1
  64. package/dist/components/QueryWrapperPlotNav/RowSetView.js +9 -12
  65. package/dist/components/QueryWrapperPlotNav/RowSetView.js.map +1 -1
  66. package/dist/components/RssFeedCards/RssFeedCards.d.ts +7 -15
  67. package/dist/components/RssFeedCards/RssFeedCards.d.ts.map +1 -1
  68. package/dist/components/RssFeedCards/RssFeedCards.js +114 -123
  69. package/dist/components/RssFeedCards/RssFeedCards.js.map +1 -1
  70. package/dist/components/UserCardList/UserCardList.d.ts +2 -20
  71. package/dist/components/UserCardList/UserCardList.d.ts.map +1 -1
  72. package/dist/components/UserCardList/UserCardList.js +49 -72
  73. package/dist/components/UserCardList/UserCardList.js.map +1 -1
  74. package/dist/components/UserCardList/UserCardListRotate.d.ts +13 -0
  75. package/dist/components/UserCardList/UserCardListRotate.d.ts.map +1 -1
  76. package/dist/components/UserCardList/UserCardListRotate.js +82 -57
  77. package/dist/components/UserCardList/UserCardListRotate.js.map +1 -1
  78. package/dist/style/abstracts/_cssVariables.scss +1 -0
  79. package/dist/style/main.css +1 -1
  80. package/dist/synapse-queries/KeyFactory.d.ts +1 -0
  81. package/dist/synapse-queries/KeyFactory.d.ts.map +1 -1
  82. package/dist/synapse-queries/KeyFactory.js +3 -0
  83. package/dist/synapse-queries/KeyFactory.js.map +1 -1
  84. package/dist/synapse-queries/index.js +46 -44
  85. package/dist/synapse-queries/user/index.js +3 -3
  86. package/dist/synapse-queries/user/useUserBundle.d.ts +12 -0
  87. package/dist/synapse-queries/user/useUserBundle.d.ts.map +1 -1
  88. package/dist/synapse-queries/user/useUserBundle.js +50 -36
  89. package/dist/synapse-queries/user/useUserBundle.js.map +1 -1
  90. package/dist/tsconfig.build.tsbuildinfo +1 -1
  91. package/dist/utils/AppUtils/session/SessionInitializedGuard.d.ts +10 -5
  92. package/dist/utils/AppUtils/session/SessionInitializedGuard.d.ts.map +1 -1
  93. package/dist/utils/AppUtils/session/SessionInitializedGuard.js +13 -9
  94. package/dist/utils/AppUtils/session/SessionInitializedGuard.js.map +1 -1
  95. package/dist/utils/functions/SqlFunctions.d.ts +1 -1
  96. package/dist/utils/functions/SqlFunctions.d.ts.map +1 -1
  97. package/dist/utils/functions/SqlFunctions.js +1 -1
  98. package/dist/utils/functions/SqlFunctions.js.map +1 -1
  99. package/package.json +4 -4
@@ -89,6 +89,7 @@ declare const SynapseComponents: {
89
89
  OrientationBanner: import("react").LazyExoticComponent<typeof import("./components").OrientationBanner>;
90
90
  PageProgress: import("react").LazyExoticComponent<typeof import("./components/PageProgress").PageProgress>;
91
91
  ProjectDataAvailability: import("react").LazyExoticComponent<typeof import("./components").ProjectDataAvailability>;
92
+ ProjectVisibilityChip: import("react").LazyExoticComponent<typeof import("./components/ProjectVisibilityChip").ProjectVisibilityChip>;
92
93
  ProvenanceGraph: import("react").LazyExoticComponent<(props: import("./components").ProvenanceProps) => React.ReactNode>;
93
94
  QueryWrapperPlotNav: import("react").LazyExoticComponent<typeof import("./components").QueryWrapperPlotNav>;
94
95
  RejectProfileValidationRequestModal: import("react").LazyExoticComponent<typeof import("./components/dataaccess/RejectProfileValidationRequestModal").RejectProfileValidationRequestModal>;
@@ -1 +1 @@
1
- {"version":3,"file":"SWC.index.d.ts","sourceRoot":"","sources":["../src/SWC.index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAEL,qBAAqB,EACtB,MA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,CAAA"}
package/dist/SWC.index.js CHANGED
@@ -77,6 +77,7 @@ var x = { BackendDestinationEnum: r }, S = {
77
77
  OrientationBanner: b(() => import("./components/OrientationBanner/OrientationBanner.js")),
78
78
  PageProgress: b(() => import("./components/PageProgress/PageProgress.js")),
79
79
  ProjectDataAvailability: b(() => import("./components/ProjectStorage/ProjectDataAvailability.js")),
80
+ ProjectVisibilityChip: b(() => import("./components/ProjectVisibilityChip/ProjectVisibilityChip.js")),
80
81
  ProvenanceGraph: b(() => import("./components/ProvenanceGraph/ProvenanceGraph.js")),
81
82
  QueryWrapperPlotNav: b(() => import("./components/QueryWrapperPlotNav/QueryWrapperPlotNav.js")),
82
83
  RejectProfileValidationRequestModal: b(() => import("./components/dataaccess/RejectProfileValidationRequestModal.js")),
@@ -112,7 +113,7 @@ var x = { BackendDestinationEnum: r }, S = {
112
113
  sendSearchResultsReturnedEvent: y,
113
114
  sendSearchResultReturnedEvent: v,
114
115
  sendSearchResultClickedEvent: _
115
- }, T = "4.0.21";
116
+ }, T = "4.0.22";
116
117
  //#endregion
117
118
  export { w as Analytics, a as HttpClient, d as Palettes, o as SynapseClient, C as SynapseComponents, n as SynapseConstants, S as SynapseContext, x as SynapseEnums, m as SynapseQueries, T as SynapseReactClientVersion, p as SynapseSessionManager, i as xssOptions };
118
119
 
@@ -1 +1 @@
1
- {"version":3,"file":"SWC.index.js","names":[],"sources":["../src/SWC.index.ts"],"sourcesContent":["/**\n * SWC.index.ts represents the entry point for the Synapse React Client library as it is published to NPM and\n * used by SynapseWebClient.\n *\n * If you wish to export a component or other object to be used by SynapseWebClient, you should add it to this file.\n */\n\nimport { lazy } from 'react'\nimport {\n displayToast,\n SynapseToastContainer,\n} from './components/ToastMessage/ToastMessage'\nimport SynapseClient, { HttpClient } from './synapse-client'\nimport * as SynapseQueries from './synapse-queries'\nimport Palettes from './theme/palette/Palettes'\nimport { SynapseConstants } from './utils'\nimport { sendAnalyticsEvent } from './utils/analytics/sendAnalyticsEvent'\nimport {\n sendSearchQuerySubmittedEvent,\n sendSearchResultClickedEvent,\n sendSearchResultReturnedEvent,\n sendSearchResultsReturnedEvent,\n} from './utils/analytics/sendSearchEvent'\nimport { FullContextProvider } from './utils/context/FullContextProvider'\nimport {\n SynapseContextConsumer,\n SynapseContextProvider,\n useSynapseContext,\n} from './utils/context/SynapseContext'\nimport { BackendDestinationEnum } from './utils/functions'\nimport { xssOptions } from './utils/functions/SanitizeHtmlUtils'\nimport { getCurrentCookiePreferences } from './utils/hooks'\nimport { SynapseSessionManager } from './utils/AppUtils'\n\n// Also include scss in the bundle\nimport './style/main.scss'\n\n// Injected at build time by Vite's `define`\ndeclare const __SRC_VERSION__: string\n\nconst SynapseEnums = {\n BackendDestinationEnum,\n}\n\nconst SynapseContext = {\n FullContextProvider,\n SynapseContextProvider,\n SynapseContextConsumer,\n useSynapseContext,\n}\n\nconst SynapseComponents = {\n AccessRequirementAclEditor: lazy(\n () => import('./components/AccessRequirementAclEditor'),\n ),\n AccessRequirementList: lazy(\n () => import('./components/AccessRequirementList/AccessRequirementList'),\n ),\n AccessRequirementRelatedProjectsList: lazy(\n () => import('./components/AccessRequirementRelatedProjectsList'),\n ),\n AccountLevelBadges: lazy(\n () => import('./components/AccountLevelBadges/AccountLevelBadges'),\n ),\n AddToDownloadListConfirmationAlert: lazy(\n () =>\n import('./components/download_list/AddToDownloadListConfirmationAlert/AddToDownloadListConfirmationAlert'),\n ),\n AvailableEvaluationQueueList: lazy(\n () =>\n import('./components/ChallengeSubmission/AvailableEvaluationQueueList'),\n ),\n CertificationQuiz: lazy(\n () => import('./components/CertificationQuiz/CertificationQuiz'),\n ),\n CookiesNotification: lazy(() => import('./components/CookiesNotification')),\n CreateOrUpdateAccessRequirementWizard: lazy(\n () => import('./components/CreateOrUpdateAccessRequirementWizard'),\n ),\n CreateOrUpdateDoiModal: lazy(\n () => import('./components/doi/CreateOrUpdateDoiModal'),\n ),\n CreateTableFromCsvDialog: lazy(\n () => import('./components/table/CsvPreview/CreateTableFromCsvDialog'),\n ),\n CreateTableViewWizard: lazy(\n () => import('./components/CreateTableViewWizard/CreateTableViewWizard'),\n ),\n CreatedByModifiedBy: lazy(\n () => import('./components/entity/page/CreatedByModifiedBy'),\n ),\n CsvPreview: lazy(() => import('./components/table/CsvPreview/CsvPreview')),\n CuratorDashboard: lazy(\n () => import('./features/curator/dashboard/CuratorDashboard'),\n ),\n DatasetItemsEditor: lazy(\n () => import('./components/SynapseTable/datasets/DatasetItemsEditor'),\n ),\n DiscussionThread: lazy(() => import('./components/Forum/DiscussionThread')),\n DownloadCartPage: lazy(\n () => import('./components/DownloadCart/DownloadCartPage'),\n ),\n EntityAclEditorModal: lazy(\n () => import('./components/EntityAclEditor/EntityAclEditorModal'),\n ),\n EntityActionMenu: lazy(\n () => import('./components/entity/page/action_menu/EntityActionMenu'),\n ),\n EntityBadgeIcons: lazy(\n () => import('./components/EntityBadgeIcons/EntityBadgeIcons'),\n ),\n EntityCitation: lazy(() => import('./components/EntityCitation')),\n EntityFinder: lazy(() => import('./components/EntityFinder/EntityFinder')),\n EntityForm: lazy(() => import('./components/EntityForm/EntityForm')),\n EntityHeaderTable: lazy(() => import('./components/EntityHeaderTable')),\n EntityModal: lazy(() => import('./components/entity/metadata/EntityModal')),\n EntityPageBreadcrumbs: lazy(\n () => import('./components/entity/page/breadcrumbs/EntityPageBreadcrumbs'),\n ),\n EntityPageTitleBar: lazy(\n () => import('./components/entity/page/title_bar/EntityPageTitleBar'),\n ),\n EntityTreeTable: lazy(\n () => import('./components/EntityTreeTable/EntityTreeTable'),\n ),\n EntityTypeIcon: lazy(() => import('./components/EntityIcon')),\n EntityUploadModal: lazy(\n () => import('./components/EntityUpload/EntityUploadModal'),\n ),\n EntityViewScopeEditorModal: lazy(\n () =>\n import('./components/EntityViewScopeEditor/EntityViewScopeEditorModal'),\n ),\n CreateProjectModal: lazy(() =>\n import('./components/CreateProjectModal/CreateProjectModal').then(m => ({\n default: m.CreateProjectModal,\n })),\n ),\n ErrorPage: lazy(() => import('./components/error/ErrorPage')),\n EvaluationCard: lazy(() => import('./components/Evaluation/EvaluationCard')),\n EvaluationEditorPage: lazy(\n () => import('./components/Evaluation/EvaluationEditorPage'),\n ),\n FavoritesPage: lazy(() => import('./components/favorites/FavoritesPage')),\n ForumSearch: lazy(() => import('./components/ForumSearch/ForumSearch')),\n FullWidthAlert: lazy(\n () => import('./components/FullWidthAlert/FullWidthAlert'),\n ),\n GoogleAnalytics: lazy(\n () => import('./components/GoogleAnalytics/GoogleAnalytics'),\n ),\n GovernanceMarkdownGithub: lazy(\n () => import('./components/Markdown/GovernanceMarkdownGithub'),\n ),\n GridPage: lazy(() => import('./features/curator/GridPage/GridPage')),\n HasAccess: lazy(() => import('./components/HasAccess/HasAccessV2')),\n HelpPopover: lazy(() => import('./components/HelpPopover/HelpPopover')),\n HtmlPreview: lazy(\n () => import('./components/FilePreview/HtmlPreview/HtmlPreview'),\n ),\n IDUReport: lazy(() => import('./components/IDUReport/IDUReport')),\n IconSvg: lazy(() => import('./components/IconSvg/IconSvg')),\n MetadataTasksPage: lazy(\n () =>\n import('./features/entity/metadata-task/components/MetadataTasksPage'),\n ),\n OAuthManagement: lazy(\n () => import('./components/OAuthClientManagement/OAuthManagement'),\n ),\n OrientationBanner: lazy(\n () => import('./components/OrientationBanner/OrientationBanner'),\n ),\n PageProgress: lazy(() => import('./components/PageProgress/PageProgress')),\n ProjectDataAvailability: lazy(\n () => import('./components/ProjectStorage/ProjectDataAvailability'),\n ),\n ProvenanceGraph: lazy(\n () => import('./components/ProvenanceGraph/ProvenanceGraph'),\n ),\n QueryWrapperPlotNav: lazy(\n () => import('./components/QueryWrapperPlotNav/QueryWrapperPlotNav'),\n ),\n RejectProfileValidationRequestModal: lazy(\n () => import('./components/dataaccess/RejectProfileValidationRequestModal'),\n ),\n ReviewerDashboard: lazy(\n () => import('./components/dataaccess/ReviewerDashboard'),\n ),\n SearchQueryWrapperPlotNav: lazy(\n () =>\n import('./components/SearchQueryWrapperPlotNav/SearchQueryWrapperPlotNav'),\n ),\n ShareThisPage: lazy(() => import('./components/ShareThisPage')),\n SkeletonButton: lazy(() => import('./components/Skeleton/SkeletonButton')),\n SqlDefinedTableEditorModal: lazy(\n () =>\n import('./components/SqlDefinedTableEditor/SqlDefinedTableEditorModal'),\n ),\n StandaloneQueryWrapper: lazy(\n () => import('./components/StandaloneQueryWrapper/StandaloneQueryWrapper'),\n ),\n StatisticsPlot: lazy(() => import('./components/StatisticsPlot')),\n SubmissionViewScopeEditorModal: lazy(\n () =>\n import('./components/SubmissionViewScopeEditor/SubmissionViewScopeEditorModal'),\n ),\n SubscriptionPage: lazy(() => import('./components/SubscriptionPage')),\n SynapseChat: lazy(() => import('./components/SynapseChat/SynapseChat')),\n SynapseGrid: lazy(() => import('./components/DataGrid/SynapseGrid')),\n SynapseFooter: lazy(() => import('./components/SynapseFooter/SynapseFooter')),\n SynapseHomepageV2: lazy(\n () => import('./components/SynapseHomepageV2/SynapseHomepageV2'),\n ),\n SynapseNavDrawer: lazy(\n () => import('./components/SynapseNavDrawer/SynapseNavDrawer'),\n ),\n SynapsePlansPage: lazy(\n () => import('./components/SynapseHomepageV2/SynapsePlansPage'),\n ),\n SynapsePortalBanners: lazy(\n () => import('./components/SynapsePortalBanners/SynapsePortalBanners'),\n ),\n SynapseSearchPage: lazy(\n () => import('./components/SynapseSearchPageResults/SynapseSearchPage'),\n ),\n SynapseToastContainer,\n TableColumnSchemaEditor: lazy(\n () =>\n import('./components/TableColumnSchemaEditor/TableColumnSchemaEditor'),\n ),\n TrashCanList: lazy(() => import('./components/trash/TrashCanList')),\n UpdateTableWithCsvDialog: lazy(\n () => import('./components/table/CsvPreview/UpdateTableWithCsvDialog'),\n ),\n UserAccessRequestHistoryPlace: lazy(\n () =>\n import('./components/dataaccess/UserAccessRequestHistory/UserAccessRequestHistoryPlace'),\n ),\n UserCard: lazy(() => import('./components/UserCard/UserCard')),\n UserProfileLinks: lazy(\n () => import('./components/UserProfileLinks/UserProfileLinks'),\n ),\n displayToast,\n getCurrentCookiePreferences,\n}\n\nconst Analytics = {\n sendAnalyticsEvent,\n sendSearchQuerySubmittedEvent,\n sendSearchResultsReturnedEvent,\n sendSearchResultReturnedEvent,\n sendSearchResultClickedEvent,\n}\n\n// Include the version in the build\nconst SynapseReactClientVersion = __SRC_VERSION__\n\nexport {\n Analytics,\n HttpClient,\n SynapseReactClientVersion,\n SynapseComponents,\n SynapseConstants,\n SynapseClient,\n SynapseContext,\n SynapseEnums,\n SynapseQueries,\n Palettes,\n xssOptions,\n SynapseSessionManager,\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAwCA,IAAM,IAAe,EACnB,0BACF,GAEM,IAAiB;CACrB;CACA;CACA;CACA;AACF,GAEM,IAAoB;CACxB,4BAA4B,QACpB,OAAO,mDACf;CACA,uBAAuB,QACf,OAAO,8DACf;CACA,sCAAsC,QAC9B,OAAO,6DACf;CACA,oBAAoB,QACZ,OAAO,wDACf;CACA,oCAAoC,QAEhC,OAAO,sGACX;CACA,8BAA8B,QAE1B,OAAO,mEACX;CACA,mBAAmB,QACX,OAAO,sDACf;CACA,qBAAqB,QAAW,OAAO,4CAAmC;CAC1E,uCAAuC,QAC/B,OAAO,8DACf;CACA,wBAAwB,QAChB,OAAO,6CACf;CACA,0BAA0B,QAClB,OAAO,4DACf;CACA,uBAAuB,QACf,OAAO,8DACf;CACA,qBAAqB,QACb,OAAO,kDACf;CACA,YAAY,QAAW,OAAO,8CAA2C;CACzE,kBAAkB,QACV,OAAO,mDACf;CACA,oBAAoB,QACZ,OAAO,2DACf;CACA,kBAAkB,QAAW,OAAO,yCAAsC;CAC1E,kBAAkB,QACV,OAAO,gDACf;CACA,sBAAsB,QACd,OAAO,uDACf;CACA,kBAAkB,QACV,OAAO,2DACf;CACA,kBAAkB,QACV,OAAO,oDACf;CACA,gBAAgB,QAAW,OAAO,uCAA8B;CAChE,cAAc,QAAW,OAAO,4CAAyC;CACzE,YAAY,QAAW,OAAO,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gEACf;CACA,gBAAgB,QAAW,OAAO,iCAA8B;CAChE,gCAAgC,QAE5B,OAAO,2EACX;CACA,kBAAkB,QAAW,OAAO,yCAAgC;CACpE,aAAa,QAAW,OAAO,0CAAuC;CACtE,aAAa,QAAW,OAAO,uCAAoC;CACnE,eAAe,QAAW,OAAO,8CAA2C;CAC5E,mBAAmB,QACX,OAAO,sDACf;CACA,kBAAkB,QACV,OAAO,oDACf;CACA,kBAAkB,QACV,OAAO,qDACf;CACA,sBAAsB,QACd,OAAO,4DACf;CACA,mBAAmB,QACX,OAAO,6DACf;CACA;CACA,yBAAyB,QAErB,OAAO,kEACX;CACA,cAAc,QAAW,OAAO,qCAAkC;CAClE,0BAA0B,QAClB,OAAO,4DACf;CACA,+BAA+B,QAE3B,OAAO,oFACX;CACA,UAAU,QAAW,OAAO,oCAAiC;CAC7D,kBAAkB,QACV,OAAO,oDACf;CACA;CACA;AACF,GAEM,IAAY;CAChB;CACA;CACA;CACA;CACA;AACF,GAGM,IAAA"}
1
+ {"version":3,"file":"SWC.index.js","names":[],"sources":["../src/SWC.index.ts"],"sourcesContent":["/**\n * SWC.index.ts represents the entry point for the Synapse React Client library as it is published to NPM and\n * used by SynapseWebClient.\n *\n * If you wish to export a component or other object to be used by SynapseWebClient, you should add it to this file.\n */\n\nimport { lazy } from 'react'\nimport {\n displayToast,\n SynapseToastContainer,\n} from './components/ToastMessage/ToastMessage'\nimport SynapseClient, { HttpClient } from './synapse-client'\nimport * as SynapseQueries from './synapse-queries'\nimport Palettes from './theme/palette/Palettes'\nimport { SynapseConstants } from './utils'\nimport { sendAnalyticsEvent } from './utils/analytics/sendAnalyticsEvent'\nimport {\n sendSearchQuerySubmittedEvent,\n sendSearchResultClickedEvent,\n sendSearchResultReturnedEvent,\n sendSearchResultsReturnedEvent,\n} from './utils/analytics/sendSearchEvent'\nimport { FullContextProvider } from './utils/context/FullContextProvider'\nimport {\n SynapseContextConsumer,\n SynapseContextProvider,\n useSynapseContext,\n} from './utils/context/SynapseContext'\nimport { BackendDestinationEnum } from './utils/functions'\nimport { xssOptions } from './utils/functions/SanitizeHtmlUtils'\nimport { getCurrentCookiePreferences } from './utils/hooks'\nimport { SynapseSessionManager } from './utils/AppUtils'\n\n// Also include scss in the bundle\nimport './style/main.scss'\n\n// Injected at build time by Vite's `define`\ndeclare const __SRC_VERSION__: string\n\nconst SynapseEnums = {\n BackendDestinationEnum,\n}\n\nconst SynapseContext = {\n FullContextProvider,\n SynapseContextProvider,\n SynapseContextConsumer,\n useSynapseContext,\n}\n\nconst SynapseComponents = {\n AccessRequirementAclEditor: lazy(\n () => import('./components/AccessRequirementAclEditor'),\n ),\n AccessRequirementList: lazy(\n () => import('./components/AccessRequirementList/AccessRequirementList'),\n ),\n AccessRequirementRelatedProjectsList: lazy(\n () => import('./components/AccessRequirementRelatedProjectsList'),\n ),\n AccountLevelBadges: lazy(\n () => import('./components/AccountLevelBadges/AccountLevelBadges'),\n ),\n AddToDownloadListConfirmationAlert: lazy(\n () =>\n import('./components/download_list/AddToDownloadListConfirmationAlert/AddToDownloadListConfirmationAlert'),\n ),\n AvailableEvaluationQueueList: lazy(\n () =>\n import('./components/ChallengeSubmission/AvailableEvaluationQueueList'),\n ),\n CertificationQuiz: lazy(\n () => import('./components/CertificationQuiz/CertificationQuiz'),\n ),\n CookiesNotification: lazy(() => import('./components/CookiesNotification')),\n CreateOrUpdateAccessRequirementWizard: lazy(\n () => import('./components/CreateOrUpdateAccessRequirementWizard'),\n ),\n CreateOrUpdateDoiModal: lazy(\n () => import('./components/doi/CreateOrUpdateDoiModal'),\n ),\n CreateTableFromCsvDialog: lazy(\n () => import('./components/table/CsvPreview/CreateTableFromCsvDialog'),\n ),\n CreateTableViewWizard: lazy(\n () => import('./components/CreateTableViewWizard/CreateTableViewWizard'),\n ),\n CreatedByModifiedBy: lazy(\n () => import('./components/entity/page/CreatedByModifiedBy'),\n ),\n CsvPreview: lazy(() => import('./components/table/CsvPreview/CsvPreview')),\n CuratorDashboard: lazy(\n () => import('./features/curator/dashboard/CuratorDashboard'),\n ),\n DatasetItemsEditor: lazy(\n () => import('./components/SynapseTable/datasets/DatasetItemsEditor'),\n ),\n DiscussionThread: lazy(() => import('./components/Forum/DiscussionThread')),\n DownloadCartPage: lazy(\n () => import('./components/DownloadCart/DownloadCartPage'),\n ),\n EntityAclEditorModal: lazy(\n () => import('./components/EntityAclEditor/EntityAclEditorModal'),\n ),\n EntityActionMenu: lazy(\n () => import('./components/entity/page/action_menu/EntityActionMenu'),\n ),\n EntityBadgeIcons: lazy(\n () => import('./components/EntityBadgeIcons/EntityBadgeIcons'),\n ),\n EntityCitation: lazy(() => import('./components/EntityCitation')),\n EntityFinder: lazy(() => import('./components/EntityFinder/EntityFinder')),\n EntityForm: lazy(() => import('./components/EntityForm/EntityForm')),\n EntityHeaderTable: lazy(() => import('./components/EntityHeaderTable')),\n EntityModal: lazy(() => import('./components/entity/metadata/EntityModal')),\n EntityPageBreadcrumbs: lazy(\n () => import('./components/entity/page/breadcrumbs/EntityPageBreadcrumbs'),\n ),\n EntityPageTitleBar: lazy(\n () => import('./components/entity/page/title_bar/EntityPageTitleBar'),\n ),\n EntityTreeTable: lazy(\n () => import('./components/EntityTreeTable/EntityTreeTable'),\n ),\n EntityTypeIcon: lazy(() => import('./components/EntityIcon')),\n EntityUploadModal: lazy(\n () => import('./components/EntityUpload/EntityUploadModal'),\n ),\n EntityViewScopeEditorModal: lazy(\n () =>\n import('./components/EntityViewScopeEditor/EntityViewScopeEditorModal'),\n ),\n CreateProjectModal: lazy(() =>\n import('./components/CreateProjectModal/CreateProjectModal').then(m => ({\n default: m.CreateProjectModal,\n })),\n ),\n ErrorPage: lazy(() => import('./components/error/ErrorPage')),\n EvaluationCard: lazy(() => import('./components/Evaluation/EvaluationCard')),\n EvaluationEditorPage: lazy(\n () => import('./components/Evaluation/EvaluationEditorPage'),\n ),\n FavoritesPage: lazy(() => import('./components/favorites/FavoritesPage')),\n ForumSearch: lazy(() => import('./components/ForumSearch/ForumSearch')),\n FullWidthAlert: lazy(\n () => import('./components/FullWidthAlert/FullWidthAlert'),\n ),\n GoogleAnalytics: lazy(\n () => import('./components/GoogleAnalytics/GoogleAnalytics'),\n ),\n GovernanceMarkdownGithub: lazy(\n () => import('./components/Markdown/GovernanceMarkdownGithub'),\n ),\n GridPage: lazy(() => import('./features/curator/GridPage/GridPage')),\n HasAccess: lazy(() => import('./components/HasAccess/HasAccessV2')),\n HelpPopover: lazy(() => import('./components/HelpPopover/HelpPopover')),\n HtmlPreview: lazy(\n () => import('./components/FilePreview/HtmlPreview/HtmlPreview'),\n ),\n IDUReport: lazy(() => import('./components/IDUReport/IDUReport')),\n IconSvg: lazy(() => import('./components/IconSvg/IconSvg')),\n MetadataTasksPage: lazy(\n () =>\n import('./features/entity/metadata-task/components/MetadataTasksPage'),\n ),\n OAuthManagement: lazy(\n () => import('./components/OAuthClientManagement/OAuthManagement'),\n ),\n OrientationBanner: lazy(\n () => import('./components/OrientationBanner/OrientationBanner'),\n ),\n PageProgress: lazy(() => import('./components/PageProgress/PageProgress')),\n ProjectDataAvailability: lazy(\n () => import('./components/ProjectStorage/ProjectDataAvailability'),\n ),\n ProjectVisibilityChip: lazy(\n () => import('./components/ProjectVisibilityChip/ProjectVisibilityChip'),\n ),\n ProvenanceGraph: lazy(\n () => import('./components/ProvenanceGraph/ProvenanceGraph'),\n ),\n QueryWrapperPlotNav: lazy(\n () => import('./components/QueryWrapperPlotNav/QueryWrapperPlotNav'),\n ),\n RejectProfileValidationRequestModal: lazy(\n () => import('./components/dataaccess/RejectProfileValidationRequestModal'),\n ),\n ReviewerDashboard: lazy(\n () => import('./components/dataaccess/ReviewerDashboard'),\n ),\n SearchQueryWrapperPlotNav: lazy(\n () =>\n import('./components/SearchQueryWrapperPlotNav/SearchQueryWrapperPlotNav'),\n ),\n ShareThisPage: lazy(() => import('./components/ShareThisPage')),\n SkeletonButton: lazy(() => import('./components/Skeleton/SkeletonButton')),\n SqlDefinedTableEditorModal: lazy(\n () =>\n import('./components/SqlDefinedTableEditor/SqlDefinedTableEditorModal'),\n ),\n StandaloneQueryWrapper: lazy(\n () => import('./components/StandaloneQueryWrapper/StandaloneQueryWrapper'),\n ),\n StatisticsPlot: lazy(() => import('./components/StatisticsPlot')),\n SubmissionViewScopeEditorModal: lazy(\n () =>\n import('./components/SubmissionViewScopeEditor/SubmissionViewScopeEditorModal'),\n ),\n SubscriptionPage: lazy(() => import('./components/SubscriptionPage')),\n SynapseChat: lazy(() => import('./components/SynapseChat/SynapseChat')),\n SynapseGrid: lazy(() => import('./components/DataGrid/SynapseGrid')),\n SynapseFooter: lazy(() => import('./components/SynapseFooter/SynapseFooter')),\n SynapseHomepageV2: lazy(\n () => import('./components/SynapseHomepageV2/SynapseHomepageV2'),\n ),\n SynapseNavDrawer: lazy(\n () => import('./components/SynapseNavDrawer/SynapseNavDrawer'),\n ),\n SynapsePlansPage: lazy(\n () => import('./components/SynapseHomepageV2/SynapsePlansPage'),\n ),\n SynapsePortalBanners: lazy(\n () => import('./components/SynapsePortalBanners/SynapsePortalBanners'),\n ),\n SynapseSearchPage: lazy(\n () => import('./components/SynapseSearchPageResults/SynapseSearchPage'),\n ),\n SynapseToastContainer,\n TableColumnSchemaEditor: lazy(\n () =>\n import('./components/TableColumnSchemaEditor/TableColumnSchemaEditor'),\n ),\n TrashCanList: lazy(() => import('./components/trash/TrashCanList')),\n UpdateTableWithCsvDialog: lazy(\n () => import('./components/table/CsvPreview/UpdateTableWithCsvDialog'),\n ),\n UserAccessRequestHistoryPlace: lazy(\n () =>\n import('./components/dataaccess/UserAccessRequestHistory/UserAccessRequestHistoryPlace'),\n ),\n UserCard: lazy(() => import('./components/UserCard/UserCard')),\n UserProfileLinks: lazy(\n () => import('./components/UserProfileLinks/UserProfileLinks'),\n ),\n displayToast,\n getCurrentCookiePreferences,\n}\n\nconst Analytics = {\n sendAnalyticsEvent,\n sendSearchQuerySubmittedEvent,\n sendSearchResultsReturnedEvent,\n sendSearchResultReturnedEvent,\n sendSearchResultClickedEvent,\n}\n\n// Include the version in the build\nconst SynapseReactClientVersion = __SRC_VERSION__\n\nexport {\n Analytics,\n HttpClient,\n SynapseReactClientVersion,\n SynapseComponents,\n SynapseConstants,\n SynapseClient,\n SynapseContext,\n SynapseEnums,\n SynapseQueries,\n Palettes,\n xssOptions,\n SynapseSessionManager,\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAwCA,IAAM,IAAe,EACnB,0BACF,GAEM,IAAiB;CACrB;CACA;CACA;CACA;AACF,GAEM,IAAoB;CACxB,4BAA4B,QACpB,OAAO,mDACf;CACA,uBAAuB,QACf,OAAO,8DACf;CACA,sCAAsC,QAC9B,OAAO,6DACf;CACA,oBAAoB,QACZ,OAAO,wDACf;CACA,oCAAoC,QAEhC,OAAO,sGACX;CACA,8BAA8B,QAE1B,OAAO,mEACX;CACA,mBAAmB,QACX,OAAO,sDACf;CACA,qBAAqB,QAAW,OAAO,4CAAmC;CAC1E,uCAAuC,QAC/B,OAAO,8DACf;CACA,wBAAwB,QAChB,OAAO,6CACf;CACA,0BAA0B,QAClB,OAAO,4DACf;CACA,uBAAuB,QACf,OAAO,8DACf;CACA,qBAAqB,QACb,OAAO,kDACf;CACA,YAAY,QAAW,OAAO,8CAA2C;CACzE,kBAAkB,QACV,OAAO,mDACf;CACA,oBAAoB,QACZ,OAAO,2DACf;CACA,kBAAkB,QAAW,OAAO,yCAAsC;CAC1E,kBAAkB,QACV,OAAO,gDACf;CACA,sBAAsB,QACd,OAAO,uDACf;CACA,kBAAkB,QACV,OAAO,2DACf;CACA,kBAAkB,QACV,OAAO,oDACf;CACA,gBAAgB,QAAW,OAAO,uCAA8B;CAChE,cAAc,QAAW,OAAO,4CAAyC;CACzE,YAAY,QAAW,OAAO,wCAAqC;CACnE,mBAAmB,QAAW,OAAO,0CAAiC;CACtE,aAAa,QAAW,OAAO,8CAA2C;CAC1E,uBAAuB,QACf,OAAO,gEACf;CACA,oBAAoB,QACZ,OAAO,2DAC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CACpE,aAAa,QAAW,OAAO,0CAAuC;CACtE,aAAa,QAAW,OAAO,uCAAoC;CACnE,eAAe,QAAW,OAAO,8CAA2C;CAC5E,mBAAmB,QACX,OAAO,sDACf;CACA,kBAAkB,QACV,OAAO,oDACf;CACA,kBAAkB,QACV,OAAO,qDACf;CACA,sBAAsB,QACd,OAAO,4DACf;CACA,mBAAmB,QACX,OAAO,6DACf;CACA;CACA,yBAAyB,QAErB,OAAO,kEACX;CACA,cAAc,QAAW,OAAO,qCAAkC;CAClE,0BAA0B,QAClB,OAAO,4DACf;CACA,+BAA+B,QAE3B,OAAO,oFACX;CACA,UAAU,QAAW,OAAO,oCAAiC;CAC7D,kBAAkB,QACV,OAAO,oDACf;CACA;CACA;AACF,GAEM,IAAY;CAChB;CACA;CACA;CACA;CACA;AACF,GAGM,IAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"CardContainer.d.ts","sourceRoot":"","sources":["../../../src/components/CardContainer/CardContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,8CAA8C,CAAA;AAYhF,OAAO,EAIL,MAAM,EACP,MAAM,iCAAiC,CAAA;AAcxC,OAAO,EAAE,4BAA4B,EAAE,MAAM,4BAA4B,CAAA;AAuBzE,MAAM,MAAM,kBAAkB,GAAG;IAC/B,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,uBAAuB,CAAC,EAAE,4BAA4B,CAAA;IACtD,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB,GAAG,iBAAiB,CAAA;AAoIrB,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,2CAYtD"}
1
+ {"version":3,"file":"CardContainer.d.ts","sourceRoot":"","sources":["../../../src/components/CardContainer/CardContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,8CAA8C,CAAA;AAYhF,OAAO,EAIL,MAAM,EACP,MAAM,iCAAiC,CAAA;AAaxC,OAAO,EAAE,4BAA4B,EAAE,MAAM,4BAA4B,CAAA;AAuBzE,MAAM,MAAM,kBAAkB,GAAG;IAC/B,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,uBAAuB,CAAC,EAAE,4BAA4B,CAAA;IACtD,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB,GAAG,iBAAiB,CAAA;AAoBrB,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,2CA0HtD"}
@@ -3,7 +3,7 @@ import o from "../../utils/hooks/useGetInfoFromIds.js";
3
3
  import s from "../LoadingScreen/LoadingScreen.js";
4
4
  import { useQueryContext as c } from "../QueryContext/QueryContext.js";
5
5
  import "../QueryContext/index.js";
6
- import { useSuspenseGetQueryMetadata as l } from "../QueryWrapper/useGetQueryMetadata.js";
6
+ import { useGetQueryMetadata as l } from "../QueryWrapper/useGetQueryMetadata.js";
7
7
  import { useQueryVisualizationContext as u } from "../QueryVisualizationWrapper/QueryVisualizationContext.js";
8
8
  import "../QueryVisualizationWrapper/index.js";
9
9
  import { TableRowGenericCard as d } from "../GenericCard/TableRowGenericCard.js";
@@ -15,19 +15,18 @@ import "../row_renderers/index.js";
15
15
  import { LoadingObservationCard as h, ObservationCard as g } from "../row_renderers/ObservationCard.js";
16
16
  import _ from "../TotalQueryResults.js";
17
17
  import { UserCardList as v } from "../UserCardList/UserCardList.js";
18
- import { Suspense as y } from "react";
19
- import { Box as b } from "@mui/material";
20
- import { Fragment as x, jsx as S, jsxs as C } from "react/jsx-runtime";
21
- import { ColumnTypeEnum as w } from "@sage-bionetworks/synapse-types";
18
+ import { Box as y } from "@mui/material";
19
+ import { Fragment as b, jsx as x, jsxs as S } from "react/jsx-runtime";
20
+ import { ColumnTypeEnum as C } from "@sage-bionetworks/synapse-types";
22
21
  //#region src/components/CardContainer/CardContainer.tsx
23
- var T = { display: "block" }, E = {
22
+ var w = { display: "block" }, T = {
24
23
  display: "grid",
25
24
  gridTemplateColumns: "repeat(auto-fill, 272px)",
26
25
  gridAutoRows: "auto",
27
26
  gridAutoFlow: "row",
28
27
  gap: "10px",
29
28
  mb: "30px"
30
- }, D = {
29
+ }, E = {
31
30
  display: "grid",
32
31
  gridTemplateColumns: "repeat(auto-fit, minmax(300px, 1fr))",
33
32
  gridColumnGap: "20px",
@@ -35,75 +34,70 @@ var T = { display: "block" }, E = {
35
34
  marginTop: "20px",
36
35
  "& .SRC-portalCard": { margin: "10px 0px" }
37
36
  };
38
- function O(r) {
37
+ function D(r) {
39
38
  let { propsToPass: o, type: s } = r;
40
39
  switch (s) {
41
- case e: return /* @__PURE__ */ S(p, { ...o });
42
- case t: return /* @__PURE__ */ S(m, { ...o });
43
- case n: return /* @__PURE__ */ S(d, { ...o });
44
- case i: return /* @__PURE__ */ S(g, { ...o });
45
- case a: return /* @__PURE__ */ S(f, { ...o });
46
- default: return /* @__PURE__ */ S("div", {});
40
+ case e: return /* @__PURE__ */ x(p, { ...o });
41
+ case t: return /* @__PURE__ */ x(m, { ...o });
42
+ case n: return /* @__PURE__ */ x(d, { ...o });
43
+ case i: return /* @__PURE__ */ x(g, { ...o });
44
+ case a: return /* @__PURE__ */ x(f, { ...o });
45
+ default: return /* @__PURE__ */ x("div", {});
47
46
  }
48
47
  }
49
- function k(e) {
50
- let { unitDescription: t, type: n, secondaryLabelLimit: i = 3, title: a, rowSet: s, multiCardList: d, ...f } = e, { NoContentPlaceholder: p } = u(), m = c(), { data: h } = l(), g = u(), y = s.rows, k = y.length > 1, A = o({
51
- ids: [s.tableId],
48
+ function O(e) {
49
+ let { unitDescription: t, type: n, secondaryLabelLimit: i = 3, title: a, rowSet: d, multiCardList: f, ...p } = e, { NoContentPlaceholder: m } = u(), g = c(), { data: O, isLoading: k } = l({ throwOnError: !0 }), A = u(), j = d.rows, M = j.length > 1, N = o({
50
+ ids: [d.tableId],
52
51
  type: "ENTITY_HEADER"
53
52
  });
54
- if (y.length === 0) return /* @__PURE__ */ S(p, {});
55
- let j = {};
56
- s.headers.forEach((e, t) => {
57
- j[e.name] = t;
53
+ if (k) return /* @__PURE__ */ S("div", { children: [n === "observation_card" && /* @__PURE__ */ x(h, {}), n !== "observation_card" && s] });
54
+ if (j.length === 0) return /* @__PURE__ */ x(m, {});
55
+ let P = {};
56
+ d.headers.forEach((e, t) => {
57
+ P[e.name] = t;
58
58
  });
59
- let M;
59
+ let F;
60
60
  if (n === "MEDIUM USER CARD") {
61
- let e = h.columnModels?.find((e) => e.columnType === w.USERID)?.name, t = e ? s.headers.findIndex((t) => t.name === e) : -1;
61
+ let e = O?.columnModels?.find((e) => e.columnType === C.USERID)?.name, t = e ? d.headers.findIndex((t) => t.name === e) : -1;
62
62
  if (t === -1) throw Error("Type MEDIUM_USER_CARD specified but no columnType USERID found");
63
- M = /* @__PURE__ */ S(v, {
64
- rowSet: s,
65
- list: y.map((e) => e.values[t]),
63
+ F = /* @__PURE__ */ x(v, {
64
+ rowSet: d,
65
+ list: j.map((e) => e.values[t]),
66
66
  size: r
67
67
  });
68
- } else M = y.length ? y.map((e, t) => /* @__PURE__ */ S(O, {
68
+ } else F = j.length ? j.map((e, t) => /* @__PURE__ */ x(D, {
69
69
  propsToPass: {
70
70
  type: n,
71
- schema: j,
71
+ schema: P,
72
72
  secondaryLabelLimit: i,
73
73
  rowId: e.rowId,
74
74
  versionNumber: e.versionNumber,
75
75
  data: e.values,
76
- selectColumns: s.headers,
77
- columnModels: h.columnModels,
78
- tableEntityConcreteType: A[0] && A[0].type,
79
- tableId: s.tableId,
80
- queryContext: m,
81
- queryVisualizationContext: g,
82
- ...f
76
+ selectColumns: d.headers,
77
+ columnModels: O.columnModels,
78
+ tableEntityConcreteType: N[0] && N[0].type,
79
+ tableId: d.tableId,
80
+ queryContext: g,
81
+ queryVisualizationContext: A,
82
+ ...p
83
83
  },
84
84
  type: n
85
- }, e.rowId ?? t)) : /* @__PURE__ */ S(x, {});
86
- let N = e.type === "release_card" && e.releaseCardConfig?.cardSize === "medium", P = T;
87
- return N ? P = E : d && k && (P = D), /* @__PURE__ */ S(x, { children: /* @__PURE__ */ C(b, {
85
+ }, e.rowId ?? t)) : /* @__PURE__ */ x(b, {});
86
+ let I = e.type === "release_card" && e.releaseCardConfig?.cardSize === "medium", L = w;
87
+ return I ? L = T : f && M && (L = E), /* @__PURE__ */ S(y, {
88
88
  role: "list",
89
- sx: P,
89
+ sx: L,
90
90
  children: [
91
- a && /* @__PURE__ */ S("h2", {
91
+ a && /* @__PURE__ */ x("h2", {
92
92
  className: "SRC-card-overview-title",
93
93
  children: a
94
94
  }),
95
- !a && t && /* @__PURE__ */ S(_, { frontText: "Displaying" }),
96
- M
95
+ !a && t && /* @__PURE__ */ x(_, { frontText: "Displaying" }),
96
+ F
97
97
  ]
98
- }) });
99
- }
100
- function A(e) {
101
- return /* @__PURE__ */ S(y, {
102
- fallback: /* @__PURE__ */ C("div", { children: [e.type === "observation_card" && /* @__PURE__ */ S(h, {}), e.type !== "observation_card" && s] }),
103
- children: /* @__PURE__ */ S(k, { ...e })
104
98
  });
105
99
  }
106
100
  //#endregion
107
- export { A as CardContainer };
101
+ export { O as CardContainer };
108
102
 
109
103
  //# sourceMappingURL=CardContainer.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CardContainer.js","names":[],"sources":["../../../src/components/CardContainer/CardContainer.tsx"],"sourcesContent":["import { CardConfiguration } from '@/components/CardContainer/CardConfiguration'\nimport TableRowGenericCard from '@/components/GenericCard/TableRowGenericCard'\nimport useGetInfoFromIds from '@/utils/hooks/useGetInfoFromIds'\nimport {\n DATASET,\n FUNDER,\n GENERIC_CARD,\n MEDIUM_USER_CARD,\n OBSERVATION_CARD,\n RELEASE_CARD,\n} from '@/utils/SynapseConstants'\nimport { Box } from '@mui/material'\nimport {\n ColumnTypeEnum,\n EntityHeader,\n Row,\n RowSet,\n} from '@sage-bionetworks/synapse-types'\nimport { Suspense } from 'react'\nimport loadingScreen from '../LoadingScreen/LoadingScreen'\nimport { useQueryContext } from '../QueryContext'\nimport { useQueryVisualizationContext } from '../QueryVisualizationWrapper'\nimport { useSuspenseGetQueryMetadata } from '../QueryWrapper/useGetQueryMetadata'\nimport { ReleaseCard } from '../ReleaseCard'\nimport { Dataset, Funder } from '../row_renderers'\nimport {\n LoadingObservationCard,\n ObservationCard,\n} from '../row_renderers/ObservationCard'\nimport TotalQueryResults from '../TotalQueryResults'\nimport UserCardList from '../UserCardList/UserCardList'\nimport { SustainabilityScorecardProps } from '../SustainabilityScorecard'\n\nconst defaultListSx = { display: 'block' }\nconst releaseCardMediumListSx = {\n display: 'grid',\n gridTemplateColumns: 'repeat(auto-fill, 272px)',\n gridAutoRows: 'auto',\n gridAutoFlow: 'row',\n gap: '10px',\n mb: '30px',\n}\nconst multiCardListSx = {\n display: 'grid',\n gridTemplateColumns: 'repeat(auto-fit, minmax(300px, 1fr))',\n gridColumnGap: '20px',\n marginBottom: '20px',\n marginTop: '20px',\n\n '& .SRC-portalCard': {\n margin: '10px 0px',\n },\n}\n\nexport type CardContainerProps = {\n rowSet: RowSet\n isHeader?: boolean\n sustainabilityScorecard?: SustainabilityScorecardProps\n isAlignToLeftNav?: boolean\n title?: string\n isLoading?: boolean\n unitDescription?: string\n multiCardList?: boolean\n} & CardConfiguration\n\nfunction Card(props: { propsToPass: any; type: string }) {\n const { propsToPass, type } = props\n switch (type) {\n case DATASET:\n return <Dataset {...propsToPass} />\n case FUNDER:\n return <Funder {...propsToPass} />\n case GENERIC_CARD:\n return <TableRowGenericCard {...propsToPass} />\n case OBSERVATION_CARD:\n return <ObservationCard {...propsToPass} />\n case RELEASE_CARD:\n return <ReleaseCard {...propsToPass} />\n default:\n return <div /> // this should never happen\n }\n}\n\nfunction CardContainerInternal(props: CardContainerProps) {\n const {\n unitDescription,\n type,\n secondaryLabelLimit = 3,\n title,\n rowSet,\n multiCardList,\n ...rest\n } = props\n const { NoContentPlaceholder } = useQueryVisualizationContext()\n const queryContext = useQueryContext()\n const { data: queryMetadata } = useSuspenseGetQueryMetadata()\n const queryVisualizationContext = useQueryVisualizationContext()\n\n const dataRows: Row[] = rowSet.rows\n const isMultipleCards = dataRows.length > 1\n\n const ids = [rowSet.tableId]\n const tableEntityConcreteType = useGetInfoFromIds<EntityHeader>({\n ids,\n type: 'ENTITY_HEADER',\n })\n\n // the cards only show the loading screen on initial load, this occurs when data is undefined\n if (dataRows.length === 0) {\n // Show \"no results\" UI (see PORTALS-1497)\n return <NoContentPlaceholder />\n }\n\n const schema: Record<string, number> = {}\n rowSet.headers.forEach((element, index) => {\n schema[element.name] = index\n })\n\n let cards\n if (type === MEDIUM_USER_CARD) {\n // Hard coding ownerId as a column name containing the user profile ownerId\n // for each row, grab the column with the ownerId\n const userIdColumnName = queryMetadata.columnModels?.find(\n cm => cm.columnType === ColumnTypeEnum.USERID,\n )?.name\n const userIdColumnIndex = userIdColumnName\n ? rowSet.headers.findIndex(el => el.name === userIdColumnName)\n : -1\n if (userIdColumnIndex === -1) {\n throw Error(\n 'Type MEDIUM_USER_CARD specified but no columnType USERID found',\n )\n }\n const listIds = dataRows.map(el => el.values[userIdColumnIndex])\n cards = (\n <UserCardList rowSet={rowSet} list={listIds} size={MEDIUM_USER_CARD} />\n )\n } else {\n // render the cards\n cards = dataRows.length ? (\n dataRows.map((rowData: Row, index) => {\n const propsForCard = {\n type,\n schema,\n secondaryLabelLimit,\n rowId: rowData.rowId,\n versionNumber: rowData.versionNumber,\n data: rowData.values,\n selectColumns: rowSet.headers,\n columnModels: queryMetadata.columnModels,\n tableEntityConcreteType:\n tableEntityConcreteType[0] && tableEntityConcreteType[0].type,\n tableId: rowSet.tableId,\n queryContext: queryContext,\n queryVisualizationContext,\n ...rest,\n }\n return (\n <Card\n key={rowData.rowId ?? index}\n propsToPass={propsForCard}\n type={type}\n />\n )\n })\n ) : (\n <></>\n )\n }\n\n const isReleaseCardMediumList =\n props.type === RELEASE_CARD &&\n props.releaseCardConfig?.cardSize === 'medium'\n\n let cardListSx = defaultListSx\n if (isReleaseCardMediumList) {\n cardListSx = releaseCardMediumListSx\n } else if (multiCardList && isMultipleCards) {\n cardListSx = multiCardListSx\n }\n\n return (\n <>\n <Box role=\"list\" sx={cardListSx}>\n {title && <h2 className=\"SRC-card-overview-title\">{title}</h2>}\n {!title && unitDescription && (\n <TotalQueryResults frontText={'Displaying'} />\n )}\n {/* ReactCSSTransitionGroup adds css fade in property for cards that come into view */}\n {cards}\n </Box>\n </>\n )\n}\n\nexport function CardContainer(props: CardContainerProps) {\n const fallback = (\n <div>\n {props.type === OBSERVATION_CARD && <LoadingObservationCard />}\n {props.type !== OBSERVATION_CARD && loadingScreen}\n </div>\n )\n return (\n <Suspense fallback={fallback}>\n <CardContainerInternal {...props} />\n </Suspense>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAiCA,IAAM,IAAgB,EAAE,SAAS,QAAQ,GACnC,IAA0B;CAC9B,SAAS;CACT,qBAAqB;CACrB,cAAc;CACd,cAAc;CACd,KAAK;CACL,IAAI;AACN,GACM,IAAkB;CACtB,SAAS;CACT,qBAAqB;CACrB,eAAe;CACf,cAAc;CACd,WAAW;CAEX,qBAAqB,EACnB,QAAQ,WACV;AACF;AAaA,SAAS,EAAK,GAA2C;CACvD,IAAM,EAAE,gBAAa,YAAS;CAC9B,QAAQ,GAAR;EACE,KAAK,GACH,OAAO,kBAAC,GAAD,EAAS,GAAI,EAAc,CAAA;EACpC,KAAK,GACH,OAAO,kBAAC,GAAD,EAAQ,GAAI,EAAc,CAAA;EACnC,KAAK,G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5B,yBACE,EAAwB,MAAM,EAAwB,GAAG;GAC3D,SAAS,EAAO;GACF;GACd;GACA,GAAG;EAKY;EACP;CACP,GAHM,EAAQ,SAAS,CAGvB,CAEJ,IAED,kBAAA,GAAA,CAAI,CAAA;CAIR,IAAM,IACJ,EAAM,SAAA,kBACN,EAAM,mBAAmB,aAAa,UAEpC,IAAa;CAOjB,OANI,IACF,IAAa,IACJ,KAAiB,MAC1B,IAAa,IAIb,kBAAA,GAAA,EAAA,UACE,kBAAC,GAAD;EAAK,MAAK;EAAO,IAAI;YAArB;GACG,KAAS,kBAAC,MAAD;IAAI,WAAU;cAA2B;GAAU,CAAA;GAC5D,CAAC,KAAS,KACT,kBAAC,GAAD,EAAmB,WAAW,aAAe,CAAA;GAG9C;EACE;IACL,CAAA;AAEN;AAEA,SAAgB,EAAc,GAA2B;CAOvD,OACE,kBAAC,GAAD;EAAoB,UANpB,kBAAC,OAAD,EAAA,UAAA,CACG,EAAM,SAAA,sBAA6B,kBAAC,GAAD,CAAyB,CAAA,GAC5D,EAAM,SAAA,sBAA6B,CACjC,EAAA,CAGe;YAClB,kBAAC,GAAD,EAAuB,GAAI,EAAQ,CAAA;CAC3B,CAAA;AAEd"}
1
+ {"version":3,"file":"CardContainer.js","names":[],"sources":["../../../src/components/CardContainer/CardContainer.tsx"],"sourcesContent":["import { CardConfiguration } from '@/components/CardContainer/CardConfiguration'\nimport TableRowGenericCard from '@/components/GenericCard/TableRowGenericCard'\nimport useGetInfoFromIds from '@/utils/hooks/useGetInfoFromIds'\nimport {\n DATASET,\n FUNDER,\n GENERIC_CARD,\n MEDIUM_USER_CARD,\n OBSERVATION_CARD,\n RELEASE_CARD,\n} from '@/utils/SynapseConstants'\nimport { Box } from '@mui/material'\nimport {\n ColumnTypeEnum,\n EntityHeader,\n Row,\n RowSet,\n} from '@sage-bionetworks/synapse-types'\nimport loadingScreen from '../LoadingScreen/LoadingScreen'\nimport { useQueryContext } from '../QueryContext'\nimport { useQueryVisualizationContext } from '../QueryVisualizationWrapper'\nimport { useGetQueryMetadata } from '../QueryWrapper/useGetQueryMetadata'\nimport { ReleaseCard } from '../ReleaseCard'\nimport { Dataset, Funder } from '../row_renderers'\nimport {\n LoadingObservationCard,\n ObservationCard,\n} from '../row_renderers/ObservationCard'\nimport TotalQueryResults from '../TotalQueryResults'\nimport UserCardList from '../UserCardList/UserCardList'\nimport { SustainabilityScorecardProps } from '../SustainabilityScorecard'\n\nconst defaultListSx = { display: 'block' }\nconst releaseCardMediumListSx = {\n display: 'grid',\n gridTemplateColumns: 'repeat(auto-fill, 272px)',\n gridAutoRows: 'auto',\n gridAutoFlow: 'row',\n gap: '10px',\n mb: '30px',\n}\nconst multiCardListSx = {\n display: 'grid',\n gridTemplateColumns: 'repeat(auto-fit, minmax(300px, 1fr))',\n gridColumnGap: '20px',\n marginBottom: '20px',\n marginTop: '20px',\n\n '& .SRC-portalCard': {\n margin: '10px 0px',\n },\n}\n\nexport type CardContainerProps = {\n rowSet: RowSet\n isHeader?: boolean\n sustainabilityScorecard?: SustainabilityScorecardProps\n isAlignToLeftNav?: boolean\n title?: string\n isLoading?: boolean\n unitDescription?: string\n multiCardList?: boolean\n} & CardConfiguration\n\nfunction Card(props: { propsToPass: any; type: string }) {\n const { propsToPass, type } = props\n switch (type) {\n case DATASET:\n return <Dataset {...propsToPass} />\n case FUNDER:\n return <Funder {...propsToPass} />\n case GENERIC_CARD:\n return <TableRowGenericCard {...propsToPass} />\n case OBSERVATION_CARD:\n return <ObservationCard {...propsToPass} />\n case RELEASE_CARD:\n return <ReleaseCard {...propsToPass} />\n default:\n return <div /> // this should never happen\n }\n}\n\nexport function CardContainer(props: CardContainerProps) {\n const {\n unitDescription,\n type,\n secondaryLabelLimit = 3,\n title,\n rowSet,\n multiCardList,\n ...rest\n } = props\n const { NoContentPlaceholder } = useQueryVisualizationContext()\n const queryContext = useQueryContext()\n const { data: queryMetadata, isLoading: queryMetadataIsLoading } =\n useGetQueryMetadata({ throwOnError: true })\n const queryVisualizationContext = useQueryVisualizationContext()\n\n const dataRows: Row[] = rowSet.rows\n const isMultipleCards = dataRows.length > 1\n\n const ids = [rowSet.tableId]\n const tableEntityConcreteType = useGetInfoFromIds<EntityHeader>({\n ids,\n type: 'ENTITY_HEADER',\n })\n\n // Render a loading placeholder while waiting for query metadata. Using a\n // non-suspense query (with conditional rendering) instead of Suspense keeps\n // the cards inline in the prerendered HTML when data is already cached,\n // rather than forcing React 19 streaming to stash them in a hidden div.\n if (queryMetadataIsLoading) {\n return (\n <div>\n {type === OBSERVATION_CARD && <LoadingObservationCard />}\n {type !== OBSERVATION_CARD && loadingScreen}\n </div>\n )\n }\n\n // the cards only show the loading screen on initial load, this occurs when data is undefined\n if (dataRows.length === 0) {\n // Show \"no results\" UI (see PORTALS-1497)\n return <NoContentPlaceholder />\n }\n\n const schema: Record<string, number> = {}\n rowSet.headers.forEach((element, index) => {\n schema[element.name] = index\n })\n\n let cards\n if (type === MEDIUM_USER_CARD) {\n // Hard coding ownerId as a column name containing the user profile ownerId\n // for each row, grab the column with the ownerId\n const userIdColumnName = queryMetadata?.columnModels?.find(\n cm => cm.columnType === ColumnTypeEnum.USERID,\n )?.name\n const userIdColumnIndex = userIdColumnName\n ? rowSet.headers.findIndex(el => el.name === userIdColumnName)\n : -1\n if (userIdColumnIndex === -1) {\n throw Error(\n 'Type MEDIUM_USER_CARD specified but no columnType USERID found',\n )\n }\n const listIds = dataRows.map(el => el.values[userIdColumnIndex])\n cards = (\n <UserCardList rowSet={rowSet} list={listIds} size={MEDIUM_USER_CARD} />\n )\n } else {\n // render the cards\n cards = dataRows.length ? (\n dataRows.map((rowData: Row, index) => {\n const propsForCard = {\n type,\n schema,\n secondaryLabelLimit,\n rowId: rowData.rowId,\n versionNumber: rowData.versionNumber,\n data: rowData.values,\n selectColumns: rowSet.headers,\n columnModels: queryMetadata!.columnModels,\n tableEntityConcreteType:\n tableEntityConcreteType[0] && tableEntityConcreteType[0].type,\n tableId: rowSet.tableId,\n queryContext: queryContext,\n queryVisualizationContext,\n ...rest,\n }\n return (\n <Card\n key={rowData.rowId ?? index}\n propsToPass={propsForCard}\n type={type}\n />\n )\n })\n ) : (\n <></>\n )\n }\n\n const isReleaseCardMediumList =\n props.type === RELEASE_CARD &&\n props.releaseCardConfig?.cardSize === 'medium'\n\n let cardListSx = defaultListSx\n if (isReleaseCardMediumList) {\n cardListSx = releaseCardMediumListSx\n } else if (multiCardList && isMultipleCards) {\n cardListSx = multiCardListSx\n }\n\n return (\n <Box role=\"list\" sx={cardListSx}>\n {title && <h2 className=\"SRC-card-overview-title\">{title}</h2>}\n {!title && unitDescription && (\n <TotalQueryResults frontText={'Displaying'} />\n )}\n {/* ReactCSSTransitionGroup adds css fade in property for cards that come into view */}\n {cards}\n </Box>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAgCA,IAAM,IAAgB,EAAE,SAAS,QAAQ,GACnC,IAA0B;CAC9B,SAAS;CACT,qBAAqB;CACrB,cAAc;CACd,cAAc;CACd,KAAK;CACL,IAAI;AACN,GACM,IAAkB;CACtB,SAAS;CACT,qBAAqB;CACrB,eAAe;CACf,cAAc;CACd,WAAW;CAEX,qBAAqB,EACnB,QAAQ,WACV;AACF;AAaA,SAAS,EAAK,GAA2C;CACvD,IAAM,EAAE,gBAAa,YAAS;CAC9B,QAAQ,GAAR;EACE,KAAK,GACH,OAAO,kBAAC,GAAD,EAAS,GAAI,EAAc,CAAA;EACpC,KAAK,GACH,OAAO,kBAAC,GAAD,EAAQ,GAAI,EAAc,CAAA;EACnC,KAAK,GACH,OAAO,kBAAC,GAAD,EAAqB,GAAI,EAAc,CAAA;EAChD,KAAK,GACH,OAAO,kBAAC,GAAD,EAAiB,GAAI,EAAc,CAAA;EAC5C,KAAK,GACH,OAAO,kBAAC,GAAD,EAAa,GAAI,EAAc,CAAA;EACxC,SACE,OAAO,kBAAC,OAAD,CAAM,CAAA;CACjB;AACF;AAEA,SAAgB,EAAc,GAA2B;CACvD,IAAM,E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,EAAQ,SAAS,CAGvB,CAEJ,IAED,kBAAA,GAAA,CAAI,CAAA;CAIR,IAAM,IACJ,EAAM,SAAA,kBACN,EAAM,mBAAmB,aAAa,UAEpC,IAAa;CAOjB,OANI,IACF,IAAa,IACJ,KAAiB,MAC1B,IAAa,IAIb,kBAAC,GAAD;EAAK,MAAK;EAAO,IAAI;YAArB;GACG,KAAS,kBAAC,MAAD;IAAI,WAAU;cAA2B;GAAU,CAAA;GAC5D,CAAC,KAAS,KACT,kBAAC,GAAD,EAAmB,WAAW,aAAe,CAAA;GAG9C;EACE;;AAET"}
@@ -3,6 +3,7 @@ import { CardLink } from '@/components/CardContainer/CardLink';
3
3
  import { LockedColumn, UniqueFacetIdentifier } from '@/utils';
4
4
  import { SQLOperator } from '@/utils/functions/SqlFunctions';
5
5
  import { Query, SelectColumn, SortDirection } from '@sage-bionetworks/synapse-types';
6
+ import { QueryClient } from '@tanstack/react-query';
6
7
  import React from 'react';
7
8
  import { SxProps } from '@mui/material';
8
9
  import { IconSvgProps } from '../IconSvg';
@@ -99,4 +100,16 @@ export type CardContainerLogicProps = QueryOrDeprecatedSearchParams & {
99
100
  */
100
101
  export declare function CardContainerLogic(props: CardContainerLogicProps): import("react/jsx-runtime").JSX.Element;
101
102
  export default CardContainerLogic;
103
+ /**
104
+ * Prefetches both the row data and query metadata for a CardContainerLogic query
105
+ * into a QueryClient for use with HydrationBoundary. Matches the exact query
106
+ * structure that CardContainerLogic builds (with deprecated `sql` prop and no
107
+ * sort/filter overrides). Uses anonymous access; warm-caches for unauthenticated users.
108
+ *
109
+ * CardContainerLogic renders with `isInfinite={true}`, so the row data must be
110
+ * primed via `prefetchInfiniteQuery` against the infinite query key — priming
111
+ * the non-infinite key here leaves `useInfiniteQuery` with a cache miss and
112
+ * RowSetView renders its loading screen during SSG.
113
+ */
114
+ export declare function prefetchCardContainerLogicData(queryClient: QueryClient, sql: string): Promise<void>;
102
115
  //# sourceMappingURL=CardContainerLogic.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CardContainerLogic.d.ts","sourceRoot":"","sources":["../../../src/components/CardContainerLogic/CardContainerLogic.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,8CAA8C,CAAA;AAChF,OAAO,EAAE,QAAQ,EAAE,MAAM,qCAAqC,CAAA;AAC9D,OAAO,EAAE,YAAY,EAAoB,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAC/E,OAAO,EAGL,WAAW,EACZ,MAAM,gCAAgC,CAAA;AAEvC,OAAO,EACL,KAAK,EAEL,YAAY,EACZ,aAAa,EACd,MAAM,iCAAiC,CAAA;AACxC,OAAO,KAAkB,MAAM,OAAO,CAAA;AAEtC,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAEzC,OAAO,EAEL,8BAA8B,EAC/B,MAAM,8BAA8B,CAAA;AAMrC;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAClC,UAAU,EAAE,KAAK,CAAA;IAEjB,eAAe,EAAE,MAAM,CAAA;IAEvB,cAAc,EAAE,MAAM,CAAA;IAEtB,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB;AAED;;;GAGG;AACH,MAAM,WAAW,WAAW;IAE1B,eAAe,EAAE,MAAM,CAAA;IACvB,aAAa,EAAE,OAAO,CAAA;CACvB;AAED,MAAM,MAAM,YAAY,GAAG;IACzB,UAAU,EAAE,IAAI,CAAA;IAEhB,eAAe,EAAE,MAAM,CAAA;IAEvB,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB,CAAA;AAED,MAAM,MAAM,iBAAiB,GAAG;IAE9B,aAAa,EAAE,MAAM,CAAA;IAErB,gBAAgB,EAAE,aAAa,CAAA;IAE/B,eAAe,EAAE,MAAM,EAAE,CAAA;CAC1B,CAAA;AAED,MAAM,MAAM,WAAW,GAAG;IAExB,IAAI,EAAE,MAAM,CAAA;IAEZ,IAAI,EAAE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AK,CAAC,EAAE,MAAM,CAAA;IACd,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,sGAAsG;IACtG,UAAU,CAAC,EAAE,iBAAiB,CAAA;IAC9B,kHAAkH;IAClH,+BAA+B,CAAC,EAAE,qBAAqB,CAAA;IACvD,iHAAiH;IACjH,YAAY,CAAC,EAAE,YAAY,CAAA;IAC3B,2EAA2E;IAC3E,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,iBAAiB,EAAE,iBAAiB,CAAA;CACrC,GAAG,IAAI,CACJ,8BAA8B,EAC5B,UAAU,GACV,iBAAiB,GACjB,eAAe,GACf,0BAA0B,GAC1B,oCAAoC,CACvC,CAAA;AAEH;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,uBAAuB,2CA0GhE;AAED,eAAe,kBAAkB,CAAA"}
1
+ {"version":3,"file":"CardContainerLogic.d.ts","sourceRoot":"","sources":["../../../src/components/CardContainerLogic/CardContainerLogic.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,8CAA8C,CAAA;AAChF,OAAO,EAAE,QAAQ,EAAE,MAAM,qCAAqC,CAAA;AAC9D,OAAO,EAAE,YAAY,EAAoB,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAC/E,OAAO,EAGL,WAAW,EACZ,MAAM,gCAAgC,CAAA;AAEvC,OAAO,EACL,KAAK,EAEL,YAAY,EACZ,aAAa,EACd,MAAM,iCAAiC,CAAA;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACnD,OAAO,KAAkB,MAAM,OAAO,CAAA;AAEtC,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAEzC,OAAO,EAEL,8BAA8B,EAC/B,MAAM,8BAA8B,CAAA;AASrC;;;GAGG;AACH,MAAM,WAAW,mBAAm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EACxB,GAAG,EAAE,MAAM,GACV,OAAO,CAAC,IAAI,CAAC,CA2Cf"}
@@ -1,76 +1,100 @@
1
1
  import "../../utils/SynapseConstants.js";
2
2
  import { getAdditionalFilters as e, parseEntityIdFromSqlStatement as t } from "../../utils/functions/SqlFunctions.js";
3
+ import { KeyFactory as n } from "../../synapse-queries/KeyFactory.js";
3
4
  import "../../utils/index.js";
4
- import { NoContentPlaceholderType as n } from "../SynapseTable/NoContentPlaceholderType.js";
5
- import { QueryVisualizationWrapper as r } from "../QueryVisualizationWrapper/QueryVisualizationWrapper.js";
5
+ import { tableQueryUseQueryDefaults as r } from "../../synapse-queries/entity/useGetQueryResultBundle.js";
6
+ import { NoContentPlaceholderType as i } from "../SynapseTable/NoContentPlaceholderType.js";
7
+ import { QueryVisualizationWrapper as a } from "../QueryVisualizationWrapper/QueryVisualizationWrapper.js";
6
8
  import "../QueryVisualizationWrapper/index.js";
7
- import { QueryWrapper as i } from "../QueryWrapper/QueryWrapper.js";
9
+ import { getTableQueryUseQueryOptions as o } from "../QueryWrapper/TableQueryUseQueryOptions.js";
10
+ import { QueryWrapper as s } from "../QueryWrapper/QueryWrapper.js";
8
11
  import "../QueryWrapper/index.js";
9
- import a from "../ColumnFilter/ColumnFilter.js";
10
- import o from "../QuerySortSelector.js";
11
- import { QueryWrapperErrorBoundary as s } from "../QueryWrapperErrorBoundary.js";
12
- import { RowSetView as c } from "../QueryWrapperPlotNav/RowSetView.js";
13
- import { createElement as l, useMemo as u } from "react";
14
- import { jsx as d, jsxs as f } from "react/jsx-runtime";
12
+ import c from "../ColumnFilter/ColumnFilter.js";
13
+ import l from "../QuerySortSelector.js";
14
+ import { QueryWrapperErrorBoundary as u } from "../QueryWrapperErrorBoundary.js";
15
+ import { RowSetView as d } from "../QueryWrapperPlotNav/RowSetView.js";
16
+ import { createElement as f, useMemo as p } from "react";
17
+ import { jsx as m, jsxs as h } from "react/jsx-runtime";
15
18
  //#region src/components/CardContainerLogic/CardContainerLogic.tsx
16
- function p(p) {
17
- let { sql: m } = p, h = t(p.query?.sql ?? m ?? ""), { sortConfig: g, columnAliases: _, topLevelEnumeratedFacetToFilter: v } = p, y = u(() => g ? [{
19
+ function g(n) {
20
+ let { sql: r } = n, o = t(n.query?.sql ?? r ?? ""), { sortConfig: g, columnAliases: _, topLevelEnumeratedFacetToFilter: v } = n, y = p(() => g ? [{
18
21
  column: g.defaultColumn,
19
22
  direction: g.defaultDirection
20
- }] : void 0, [g]), b = u(() => {
23
+ }] : void 0, [g]), b = p(() => {
21
24
  let t;
22
- if (p.query) t = {
25
+ if (n.query) t = {
23
26
  sort: y,
24
27
  limit: 25,
25
- ...p.query
28
+ ...n.query
26
29
  };
27
30
  else {
28
- let n = e(p.searchParams, p.sqlOperator, p.additionalFiltersSessionStorageKey);
31
+ let r = e(n.searchParams, n.sqlOperator, n.additionalFiltersSessionStorageKey);
29
32
  t = {
30
- sql: p.sql,
31
- limit: p.limit ?? 25,
33
+ sql: n.sql,
34
+ limit: n.limit ?? 25,
32
35
  sort: y,
33
- additionalFilters: n
36
+ additionalFilters: r
34
37
  };
35
38
  }
36
39
  return {
37
40
  concreteType: "org.sagebionetworks.repo.model.table.QueryBundleRequest",
38
- entityId: h,
41
+ entityId: o,
39
42
  query: t,
40
43
  partMask: 255
41
44
  };
42
45
  }, [
43
46
  y,
44
- h,
45
- p.additionalFiltersSessionStorageKey,
46
- p.limit,
47
- p.query,
48
- p.searchParams,
49
- p.sql,
50
- p.sqlOperator
47
+ o,
48
+ n.additionalFiltersSessionStorageKey,
49
+ n.limit,
50
+ n.query,
51
+ n.searchParams,
52
+ n.sql,
53
+ n.sqlOperator
51
54
  ]), x = JSON.stringify(b);
52
- return /* @__PURE__ */ l(i, {
53
- ...p,
55
+ return /* @__PURE__ */ f(s, {
56
+ ...n,
54
57
  initQueryRequest: b,
55
58
  isInfinite: !0,
56
59
  key: x
57
- }, /* @__PURE__ */ d(r, {
58
- rgbIndex: p.rgbIndex,
59
- unitDescription: p.unitDescription,
60
+ }, /* @__PURE__ */ m(a, {
61
+ rgbIndex: n.rgbIndex,
62
+ unitDescription: n.unitDescription,
60
63
  columnAliases: _,
61
- noContentPlaceholderType: p.noContentPlaceholderType ?? n.STATIC,
62
- children: /* @__PURE__ */ f(s, { children: [
63
- g && /* @__PURE__ */ d(o, { sortConfig: g }),
64
- v && /* @__PURE__ */ d(a, { topLevelEnumeratedFacetToFilter: v }),
65
- /* @__PURE__ */ d(c, {
66
- cardConfiguration: p.cardConfiguration,
67
- initialLimit: p.initialLimit,
68
- multiCardList: p.multiCardList
64
+ noContentPlaceholderType: n.noContentPlaceholderType ?? i.STATIC,
65
+ children: /* @__PURE__ */ h(u, { children: [
66
+ g && /* @__PURE__ */ m(l, { sortConfig: g }),
67
+ v && /* @__PURE__ */ m(c, { topLevelEnumeratedFacetToFilter: v }),
68
+ /* @__PURE__ */ m(d, {
69
+ cardConfiguration: n.cardConfiguration,
70
+ initialLimit: n.initialLimit,
71
+ multiCardList: n.multiCardList
69
72
  })
70
73
  ] })
71
74
  }));
72
75
  }
76
+ async function _(e, i) {
77
+ let a = t(i), s = new n(void 0), { rowDataInfiniteQueryOptions: c, queryMetadataQueryOptions: l } = o({
78
+ concreteType: "org.sagebionetworks.repo.model.table.QueryBundleRequest",
79
+ entityId: a,
80
+ query: {
81
+ sql: i,
82
+ limit: 25
83
+ },
84
+ partMask: 255
85
+ }, void 0, s, void 0);
86
+ await Promise.all([e.prefetchInfiniteQuery({
87
+ queryKey: c.queryKey,
88
+ queryFn: c.queryFn,
89
+ initialPageParam: c.initialPageParam,
90
+ staleTime: r.staleTime
91
+ }), e.prefetchQuery({
92
+ queryKey: l.queryKey,
93
+ queryFn: l.queryFn,
94
+ staleTime: r.staleTime
95
+ })]);
96
+ }
73
97
  //#endregion
74
- export { p as CardContainerLogic, p as default };
98
+ export { g as CardContainerLogic, g as default, _ as prefetchCardContainerLogicData };
75
99
 
76
100
  //# sourceMappingURL=CardContainerLogic.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CardContainerLogic.js","names":[],"sources":["../../../src/components/CardContainerLogic/CardContainerLogic.tsx"],"sourcesContent":["import { CardConfiguration } from '@/components/CardContainer/CardConfiguration'\nimport { CardLink } from '@/components/CardContainer/CardLink'\nimport { LockedColumn, SynapseConstants, UniqueFacetIdentifier } from '@/utils'\nimport {\n getAdditionalFilters,\n parseEntityIdFromSqlStatement,\n SQLOperator,\n} from '@/utils/functions/SqlFunctions'\nimport { DEFAULT_PAGE_SIZE } from '@/utils/SynapseConstants'\nimport {\n Query,\n QueryBundleRequest,\n SelectColumn,\n SortDirection,\n} from '@sage-bionetworks/synapse-types'\nimport React, { useMemo } from 'react'\nimport ColumnFilter from '../ColumnFilter/ColumnFilter'\nimport { SxProps } from '@mui/material'\nimport { IconSvgProps } from '../IconSvg'\nimport QuerySortSelector from '../QuerySortSelector'\nimport {\n QueryVisualizationWrapper,\n QueryVisualizationWrapperProps,\n} from '../QueryVisualizationWrapper'\nimport { QueryWrapper } from '../QueryWrapper'\nimport { QueryWrapperErrorBoundary } from '../QueryWrapperErrorBoundary'\nimport { RowSetView } from '../QueryWrapperPlotNav/RowSetView'\nimport { NoContentPlaceholderType } from '../SynapseTable/NoContentPlaceholderType'\n\n/**\n * Used when a column value should link to an external URL defined by a value in another column.\n * Currently only works in SynapseTable (not cards!)\n */\nexport interface ColumnSpecifiedLink {\n isMarkdown: false\n /* The column which should have the displayed value */\n matchColumnName: string\n /* The column which has the link. If the link is empty, the value will be displayed without a link. */\n linkColumnName: string\n // If set, also show a tooltip\n tooltipText?: string\n}\n\n/**\n * Used when a column value should be previewed\n * Currently only works in SynapseTable (not cards!)\n */\nexport interface EntityImage {\n // the columns whos value will be used for the markdown\n matchColumnName: string\n isEntityImage: boolean\n}\n\nexport type MarkdownLink = {\n isMarkdown: true\n // the columns whos value will be used for the markdown\n matchColumnName: string\n // If set, also show a tooltip\n tooltipText?: string\n}\n\nexport type SortConfiguration = {\n // the column that the query should be sorted on by default\n defaultColumn: string\n // the direction that the defaultColumn should be sorted on by default\n defaultDirection: SortDirection\n // the columns that the UI should surface as sortable\n sortableColumns: string[]\n}\n\nexport type CTACardLink = {\n // link text\n text: string\n // column name to use for href\n link: string\n // icon to display after link text\n endIcon?: React.ReactNode\n}\n\nexport type DescriptionConfig = {\n isMarkdown?: boolean\n showFullDescriptionByDefault?: boolean\n}\n\nexport type MapValueToReactComponentConfig = {\n // The column to apply the mapping to\n matchColumnName: string\n Component: React.ComponentType<{\n /* The value of the table cell. If the column is a _LIST type, then the LIST will be parsed and this will be a string array. */\n value: string | string[] | null\n selectColumn: SelectColumn\n }>\n // discriminator\n isMapValueToReactNodeConfig: true\n}\n\n// Specify the indices in the values [] that should be rendered specially\nexport type LabelLinkConfig = (\n | MarkdownLink\n | CardLink\n | ColumnSpecifiedLink\n | EntityImage\n | MapValueToReactComponentConfig\n)[]\n\nexport type ColumnIconConfig = IconSvgProps & {\n containerSx?: SxProps\n}\n\nexport type ColumnIconConfigs = {\n columns: {\n [index: string]: {\n [index: string]: ColumnIconConfig\n }\n }\n}\n\nexport type QueryOrDeprecatedSearchParams = {\n /** The initial SQL query which will be used to populate the data in the component */\n query?: Query\n /** @deprecated use `query` */\n sql?: string\n /** Optional limit for the number of cards shown per page\n * @deprecated use `query */\n limit?: number\n /** Applies filters to the query where the key is the column name and the value is the value to filter on.\n * The filter function is controlled by sqlOperator.\n * @deprecated use `query` */\n searchParams?: Record<string, string>\n /** Operator used in the filter created using the searchParams prop\n * @deprecated use `query` */\n sqlOperator?: SQLOperator\n}\n\nexport type CardContainerLogicProps = QueryOrDeprecatedSearchParams & {\n /** Optional title to display above the component */\n title?: string\n isAlignToLeftNav?: boolean\n /** Provide a `SortConfiguration` that can be used to render UI to toggle the sorting of the cards. */\n sortConfig?: SortConfiguration\n /** Configuration used to render UI that can be used to alter a filter against a column with enumerated facets. */\n topLevelEnumeratedFacetToFilter?: UniqueFacetIdentifier\n /** Optional column to 'lock'; Values and filter controls for a locked column will not be displayed in the UI. */\n lockedColumn?: LockedColumn\n /** Optionally limit the initial number of cards shown on the first page */\n initialLimit?: number\n multiCardList?: boolean\n cardConfiguration: CardConfiguration\n} & Pick<\n QueryVisualizationWrapperProps,\n | 'rgbIndex'\n | 'unitDescription'\n | 'columnAliases'\n | 'noContentPlaceholderType'\n | 'additionalFiltersSessionStorageKey'\n >\n\n/**\n * Class wraps around CardContainer and serves as a standalone logic container for rendering cards.\n */\nexport function CardContainerLogic(props: CardContainerLogicProps) {\n const { sql: deprecatedSql } = props\n const sql = props.query?.sql ?? deprecatedSql ?? ''\n const entityId = parseEntityIdFromSqlStatement(sql)\n\n const { sortConfig, columnAliases, topLevelEnumeratedFacetToFilter } = props\n const defaultSortItems = useMemo(\n () =>\n sortConfig\n ? [\n {\n column: sortConfig.defaultColumn,\n direction: sortConfig.defaultDirection,\n },\n ]\n : undefined,\n [sortConfig],\n )\n\n const initQueryRequest: QueryBundleRequest = useMemo(() => {\n let query: Query\n if (props.query) {\n query = {\n sort: defaultSortItems,\n limit: DEFAULT_PAGE_SIZE,\n ...props.query,\n }\n } else {\n // Deprecated props were used\n const queryFilters = getAdditionalFilters(\n props.searchParams,\n props.sqlOperator,\n props.additionalFiltersSessionStorageKey,\n )\n query = {\n sql: props.sql!,\n limit: props.limit ?? DEFAULT_PAGE_SIZE,\n sort: defaultSortItems,\n additionalFilters: queryFilters,\n }\n }\n\n return {\n concreteType: 'org.sagebionetworks.repo.model.table.QueryBundleRequest',\n entityId: entityId,\n query: query,\n partMask:\n SynapseConstants.BUNDLE_MASK_QUERY_RESULTS |\n SynapseConstants.BUNDLE_MASK_QUERY_COUNT |\n SynapseConstants.BUNDLE_MASK_QUERY_SELECT_COLUMNS |\n SynapseConstants.BUNDLE_MASK_QUERY_MAX_ROWS_PER_PAGE |\n SynapseConstants.BUNDLE_MASK_QUERY_COLUMN_MODELS |\n SynapseConstants.BUNDLE_MASK_QUERY_FACETS |\n SynapseConstants.BUNDLE_MASK_SUM_FILES_SIZE_BYTES |\n SynapseConstants.BUNDLE_MASK_LAST_UPDATED_ON,\n }\n }, [\n defaultSortItems,\n entityId,\n props.additionalFiltersSessionStorageKey,\n props.limit,\n props.query,\n props.searchParams,\n props.sql,\n props.sqlOperator,\n ])\n\n /**\n * Fully re-render the uncontrolled QueryWrapper component when the initial query changes. This eliminates a class of\n * bugs where our 'derived' state (the current query), which should be reset, is out of sync with props.\n *\n * See https://legacy.reactjs.org/blog/2018/06/07/you-probably-dont-need-derived-state.html#recommendation-fully-uncontrolled-component-with-a-key\n */\n const queryWrapperKey = JSON.stringify(initQueryRequest)\n\n return (\n <QueryWrapper\n {...props}\n initQueryRequest={initQueryRequest}\n isInfinite\n key={queryWrapperKey}\n >\n <QueryVisualizationWrapper\n rgbIndex={props.rgbIndex}\n unitDescription={props.unitDescription}\n columnAliases={columnAliases}\n noContentPlaceholderType={\n props.noContentPlaceholderType ?? NoContentPlaceholderType.STATIC\n }\n >\n <QueryWrapperErrorBoundary>\n {sortConfig && <QuerySortSelector sortConfig={sortConfig} />}\n {topLevelEnumeratedFacetToFilter && (\n <ColumnFilter\n topLevelEnumeratedFacetToFilter={topLevelEnumeratedFacetToFilter}\n />\n )}\n <RowSetView\n cardConfiguration={props.cardConfiguration}\n initialLimit={props.initialLimit}\n multiCardList={props.multiCardList}\n />\n </QueryWrapperErrorBoundary>\n </QueryVisualizationWrapper>\n </QueryWrapper>\n )\n}\n\nexport default CardContainerLogic\n"],"mappings":";;;;;;;;;;;;;;;AAgKA,SAAgB,EAAmB,GAAgC;CACjE,IAAM,EAAE,KAAK,MAAkB,GAEzB,IAAW,EADL,EAAM,OAAO,OAAO,KAAiB,EACC,GAE5C,EAAE,eAAY,kBAAe,uCAAoC,GACjE,IAAmB,QAErB,IACI,CACE;EACE,QAAQ,EAAW;EACnB,WAAW,EAAW;CACxB,CACF,IACA,KAAA,GACN,CAAC,CAAU,CACb,GAEM,IAAuC,QAAc;EACzD,IAAI;EACJ,IAAI,EAAM,OACR,IAAQ;GACN,MAAM;GACN,OAAA;GACA,GAAG,EAAM;EACX;OACK;GAEL,IAAM,IAAe,EACnB,EAAM,cACN,EAAM,aACN,EAAM,kCACR;GACA,IAAQ;IACN,KAAK,EAAM;IACX,OAAO,EAAM,SAAA;IACb,MAAM;IACN,mBAAmB;GACrB;EACF;EAEA,OAAO;GACL,cAAc;GACJ;GACH;GACP,UACE;EAQJ;CACF,GAAG;EACD;EACA;EACA,EAAM;EACN,EAAM;EACN,EAAM;EACN,EAAM;EACN,EAAM;EACN,EAAM;CACR,CAAC,GAQK,IAAkB,KAAK,UAAU,CAAgB;CAEvD,OACE,kBAAC,GAAD;EACE,GAAI;EACc;EAClB,YAAA;EACA,KAAK;CAwBO,GAtBZ,kBAAC,GAAD;EACE,UAAU,EAAM;EAChB,iBAAiB,EAAM;EACR;EACf,0BACE,EAAM,4BAA4B,EAAyB;YAG7D,kBAAC,GAAD,EAAA,UAAA;GACG,KAAc,kBAAC,GAAD,EAA+B,cAAa,CAAA;GAC1D,KACC,kBAAC,GAAD,EACmC,mCAClC,CAAA;GAEH,kBAAC,GAAD;IACE,mBAAmB,EAAM;IACzB,cAAc,EAAM;IACpB,eAAe,EAAM;GACtB,CAAA;EACwB,EAAA,CAAA;CACF,CAAA,CACf;AAElB"}
1
+ {"version":3,"file":"CardContainerLogic.js","names":[],"sources":["../../../src/components/CardContainerLogic/CardContainerLogic.tsx"],"sourcesContent":["import { CardConfiguration } from '@/components/CardContainer/CardConfiguration'\nimport { CardLink } from '@/components/CardContainer/CardLink'\nimport { LockedColumn, SynapseConstants, UniqueFacetIdentifier } from '@/utils'\nimport {\n getAdditionalFilters,\n parseEntityIdFromSqlStatement,\n SQLOperator,\n} from '@/utils/functions/SqlFunctions'\nimport { DEFAULT_PAGE_SIZE } from '@/utils/SynapseConstants'\nimport {\n Query,\n QueryBundleRequest,\n SelectColumn,\n SortDirection,\n} from '@sage-bionetworks/synapse-types'\nimport { QueryClient } from '@tanstack/react-query'\nimport React, { useMemo } from 'react'\nimport ColumnFilter from '../ColumnFilter/ColumnFilter'\nimport { SxProps } from '@mui/material'\nimport { IconSvgProps } from '../IconSvg'\nimport QuerySortSelector from '../QuerySortSelector'\nimport {\n QueryVisualizationWrapper,\n QueryVisualizationWrapperProps,\n} from '../QueryVisualizationWrapper'\nimport { QueryWrapper } from '../QueryWrapper'\nimport { QueryWrapperErrorBoundary } from '../QueryWrapperErrorBoundary'\nimport { RowSetView } from '../QueryWrapperPlotNav/RowSetView'\nimport { NoContentPlaceholderType } from '../SynapseTable/NoContentPlaceholderType'\nimport { KeyFactory } from '@/synapse-queries/KeyFactory'\nimport { tableQueryUseQueryDefaults } from '@/synapse-queries/entity/useGetQueryResultBundle'\nimport { getTableQueryUseQueryOptions } from '../QueryWrapper/TableQueryUseQueryOptions'\n\n/**\n * Used when a column value should link to an external URL defined by a value in another column.\n * Currently only works in SynapseTable (not cards!)\n */\nexport interface ColumnSpecifiedLink {\n isMarkdown: false\n /* The column which should have the displayed value */\n matchColumnName: string\n /* The column which has the link. If the link is empty, the value will be displayed without a link. */\n linkColumnName: string\n // If set, also show a tooltip\n tooltipText?: string\n}\n\n/**\n * Used when a column value should be previewed\n * Currently only works in SynapseTable (not cards!)\n */\nexport interface EntityImage {\n // the columns whos value will be used for the markdown\n matchColumnName: string\n isEntityImage: boolean\n}\n\nexport type MarkdownLink = {\n isMarkdown: true\n // the columns whos value will be used for the markdown\n matchColumnName: string\n // If set, also show a tooltip\n tooltipText?: string\n}\n\nexport type SortConfiguration = {\n // the column that the query should be sorted on by default\n defaultColumn: string\n // the direction that the defaultColumn should be sorted on by default\n defaultDirection: SortDirection\n // the columns that the UI should surface as sortable\n sortableColumns: string[]\n}\n\nexport type CTACardLink = {\n // link text\n text: string\n // column name to use for href\n link: string\n // icon to display after link text\n endIcon?: React.ReactNode\n}\n\nexport type DescriptionConfig = {\n isMarkdown?: boolean\n showFullDescriptionByDefault?: boolean\n}\n\nexport type MapValueToReactComponentConfig = {\n // The column to apply the mapping to\n matchColumnName: string\n Component: React.ComponentType<{\n /* The value of the table cell. If the column is a _LIST type, then the LIST will be parsed and this will be a string array. */\n value: string | string[] | null\n selectColumn: SelectColumn\n }>\n // discriminator\n isMapValueToReactNodeConfig: true\n}\n\n// Specify the indices in the values [] that should be rendered specially\nexport type LabelLinkConfig = (\n | MarkdownLink\n | CardLink\n | ColumnSpecifiedLink\n | EntityImage\n | MapValueToReactComponentConfig\n)[]\n\nexport type ColumnIconConfig = IconSvgProps & {\n containerSx?: SxProps\n}\n\nexport type ColumnIconConfigs = {\n columns: {\n [index: string]: {\n [index: string]: ColumnIconConfig\n }\n }\n}\n\nexport type QueryOrDeprecatedSearchParams = {\n /** The initial SQL query which will be used to populate the data in the component */\n query?: Query\n /** @deprecated use `query` */\n sql?: string\n /** Optional limit for the number of cards shown per page\n * @deprecated use `query */\n limit?: number\n /** Applies filters to the query where the key is the column name and the value is the value to filter on.\n * The filter function is controlled by sqlOperator.\n * @deprecated use `query` */\n searchParams?: Record<string, string>\n /** Operator used in the filter created using the searchParams prop\n * @deprecated use `query` */\n sqlOperator?: SQLOperator\n}\n\nexport type CardContainerLogicProps = QueryOrDeprecatedSearchParams & {\n /** Optional title to display above the component */\n title?: string\n isAlignToLeftNav?: boolean\n /** Provide a `SortConfiguration` that can be used to render UI to toggle the sorting of the cards. */\n sortConfig?: SortConfiguration\n /** Configuration used to render UI that can be used to alter a filter against a column with enumerated facets. */\n topLevelEnumeratedFacetToFilter?: UniqueFacetIdentifier\n /** Optional column to 'lock'; Values and filter controls for a locked column will not be displayed in the UI. */\n lockedColumn?: LockedColumn\n /** Optionally limit the initial number of cards shown on the first page */\n initialLimit?: number\n multiCardList?: boolean\n cardConfiguration: CardConfiguration\n} & Pick<\n QueryVisualizationWrapperProps,\n | 'rgbIndex'\n | 'unitDescription'\n | 'columnAliases'\n | 'noContentPlaceholderType'\n | 'additionalFiltersSessionStorageKey'\n >\n\n/**\n * Class wraps around CardContainer and serves as a standalone logic container for rendering cards.\n */\nexport function CardContainerLogic(props: CardContainerLogicProps) {\n const { sql: deprecatedSql } = props\n const sql = props.query?.sql ?? deprecatedSql ?? ''\n const entityId = parseEntityIdFromSqlStatement(sql)\n\n const { sortConfig, columnAliases, topLevelEnumeratedFacetToFilter } = props\n const defaultSortItems = useMemo(\n () =>\n sortConfig\n ? [\n {\n column: sortConfig.defaultColumn,\n direction: sortConfig.defaultDirection,\n },\n ]\n : undefined,\n [sortConfig],\n )\n\n const initQueryRequest: QueryBundleRequest = useMemo(() => {\n let query: Query\n if (props.query) {\n query = {\n sort: defaultSortItems,\n limit: DEFAULT_PAGE_SIZE,\n ...props.query,\n }\n } else {\n // Deprecated props were used\n const queryFilters = getAdditionalFilters(\n props.searchParams,\n props.sqlOperator,\n props.additionalFiltersSessionStorageKey,\n )\n query = {\n sql: props.sql!,\n limit: props.limit ?? DEFAULT_PAGE_SIZE,\n sort: defaultSortItems,\n additionalFilters: queryFilters,\n }\n }\n\n return {\n concreteType: 'org.sagebionetworks.repo.model.table.QueryBundleRequest',\n entityId: entityId,\n query: query,\n partMask:\n SynapseConstants.BUNDLE_MASK_QUERY_RESULTS |\n SynapseConstants.BUNDLE_MASK_QUERY_COUNT |\n SynapseConstants.BUNDLE_MASK_QUERY_SELECT_COLUMNS |\n SynapseConstants.BUNDLE_MASK_QUERY_MAX_ROWS_PER_PAGE |\n SynapseConstants.BUNDLE_MASK_QUERY_COLUMN_MODELS |\n SynapseConstants.BUNDLE_MASK_QUERY_FACETS |\n SynapseConstants.BUNDLE_MASK_SUM_FILES_SIZE_BYTES |\n SynapseConstants.BUNDLE_MASK_LAST_UPDATED_ON,\n }\n }, [\n defaultSortItems,\n entityId,\n props.additionalFiltersSessionStorageKey,\n props.limit,\n props.query,\n props.searchParams,\n props.sql,\n props.sqlOperator,\n ])\n\n /**\n * Fully re-render the uncontrolled QueryWrapper component when the initial query changes. This eliminates a class of\n * bugs where our 'derived' state (the current query), which should be reset, is out of sync with props.\n *\n * See https://legacy.reactjs.org/blog/2018/06/07/you-probably-dont-need-derived-state.html#recommendation-fully-uncontrolled-component-with-a-key\n */\n const queryWrapperKey = JSON.stringify(initQueryRequest)\n\n return (\n <QueryWrapper\n {...props}\n initQueryRequest={initQueryRequest}\n isInfinite\n key={queryWrapperKey}\n >\n <QueryVisualizationWrapper\n rgbIndex={props.rgbIndex}\n unitDescription={props.unitDescription}\n columnAliases={columnAliases}\n noContentPlaceholderType={\n props.noContentPlaceholderType ?? NoContentPlaceholderType.STATIC\n }\n >\n <QueryWrapperErrorBoundary>\n {sortConfig && <QuerySortSelector sortConfig={sortConfig} />}\n {topLevelEnumeratedFacetToFilter && (\n <ColumnFilter\n topLevelEnumeratedFacetToFilter={topLevelEnumeratedFacetToFilter}\n />\n )}\n <RowSetView\n cardConfiguration={props.cardConfiguration}\n initialLimit={props.initialLimit}\n multiCardList={props.multiCardList}\n />\n </QueryWrapperErrorBoundary>\n </QueryVisualizationWrapper>\n </QueryWrapper>\n )\n}\n\nexport default CardContainerLogic\n\n/**\n * Prefetches both the row data and query metadata for a CardContainerLogic query\n * into a QueryClient for use with HydrationBoundary. Matches the exact query\n * structure that CardContainerLogic builds (with deprecated `sql` prop and no\n * sort/filter overrides). Uses anonymous access; warm-caches for unauthenticated users.\n *\n * CardContainerLogic renders with `isInfinite={true}`, so the row data must be\n * primed via `prefetchInfiniteQuery` against the infinite query key — priming\n * the non-infinite key here leaves `useInfiniteQuery` with a cache miss and\n * RowSetView renders its loading screen during SSG.\n */\nexport async function prefetchCardContainerLogicData(\n queryClient: QueryClient,\n sql: string,\n): Promise<void> {\n const entityId = parseEntityIdFromSqlStatement(sql)\n const keyFactory = new KeyFactory(undefined)\n\n const initQueryRequest: QueryBundleRequest = {\n concreteType: 'org.sagebionetworks.repo.model.table.QueryBundleRequest',\n entityId,\n query: {\n sql,\n limit: DEFAULT_PAGE_SIZE,\n },\n partMask:\n SynapseConstants.BUNDLE_MASK_QUERY_RESULTS |\n SynapseConstants.BUNDLE_MASK_QUERY_COUNT |\n SynapseConstants.BUNDLE_MASK_QUERY_SELECT_COLUMNS |\n SynapseConstants.BUNDLE_MASK_QUERY_MAX_ROWS_PER_PAGE |\n SynapseConstants.BUNDLE_MASK_QUERY_COLUMN_MODELS |\n SynapseConstants.BUNDLE_MASK_QUERY_FACETS |\n SynapseConstants.BUNDLE_MASK_SUM_FILES_SIZE_BYTES |\n SynapseConstants.BUNDLE_MASK_LAST_UPDATED_ON,\n }\n\n const { rowDataInfiniteQueryOptions, queryMetadataQueryOptions } =\n getTableQueryUseQueryOptions(\n initQueryRequest,\n undefined,\n keyFactory,\n undefined,\n )\n\n await Promise.all([\n queryClient.prefetchInfiniteQuery({\n queryKey: rowDataInfiniteQueryOptions.queryKey,\n queryFn: rowDataInfiniteQueryOptions.queryFn!,\n initialPageParam: rowDataInfiniteQueryOptions.initialPageParam,\n staleTime: tableQueryUseQueryDefaults.staleTime,\n }),\n queryClient.prefetchQuery({\n queryKey: queryMetadataQueryOptions.queryKey,\n queryFn: queryMetadataQueryOptions.queryFn!,\n staleTime: tableQueryUseQueryDefaults.staleTime,\n }),\n ])\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAoKA,SAAgB,EAAmB,GAAgC;CACjE,IAAM,EAAE,KAAK,MAAkB,GAEzB,IAAW,EADL,EAAM,OAAO,OAAO,KAAiB,EACC,GAE5C,EAAE,eAAY,kBAAe,uCAAoC,GACjE,IAAmB,QAErB,IACI,CACE;EACE,QAAQ,EAAW;EACnB,WAAW,EAAW;CACxB,CACF,IACA,KAAA,GACN,CAAC,CAAU,CACb,GAEM,IAAuC,QAAc;EACzD,IAAI;EACJ,IAAI,EAAM,OACR,IAAQ;GACN,MAAM;GACN,OAAA;GACA,GAAG,EAAM;EACX;OACK;GAEL,IAAM,IAAe,EACnB,EAAM,cACN,EAAM,aACN,EAAM,kCACR;GACA,IAAQ;IACN,KAAK,EAAM;IACX,OAAO,EAAM,SAAA;IACb,MAAM;IACN,mBAAmB;GACrB;EACF;EAEA,OAAO;GACL,cAAc;GACJ;GACH;GACP,UACE;EAQJ;CACF,GAAG;EACD;EACA;EACA,EAAM;EACN,EAAM;EACN,EAAM;EACN,EAAM;EACN,EAAM;EACN,EAAM;CACR,CAAC,GAQK,IAAkB,KAAK,UAAU,CAAgB;CAEvD,OACE,kBAAC,GAAD;EACE,GAAI;EACc;EAClB,YAAA;EACA,KAAK;CAwBO,GAtBZ,kBAAC,GAAD;EACE,UAAU,EAAM;EAChB,iBAAiB,EAAM;EACR;EACf,0BACE,EAAM,4BAA4B,EAAyB;YAG7D,kBAAC,GAAD,EAAA,UAAA;GACG,KAAc,kBAAC,GAAD,EAA+B,cAAa,CAAA;GAC1D,KACC,kBAAC,GAAD,EACmC,mCAClC,CAAA;GAEH,kBAAC,GAAD;IACE,mBAAmB,EAAM;IACzB,cAAc,EAAM;IACpB,eAAe,EAAM;GACtB,CAAA;EACwB,EAAA,CAAA;CACF,CAAA,CACf;AAElB;AAeA,eAAsB,EACpB,GACA,GACe;CACf,IAAM,IAAW,EAA8B,CAAG,GAC5C,IAAa,IAAI,EAAW,KAAA,CAAS,GAoBrC,EAAE,gCAA6B,iCACnC,EACE;EAnBF,cAAc;EACd;EACA,OAAO;GACL;GACA,OAAA;EACF;EACA,UACE;CAYA,GACA,KAAA,GACA,GACA,KAAA,CACF;CAEF,MAAM,QAAQ,IAAI,CAChB,EAAY,sBAAsB;EAChC,UAAU,EAA4B;EACtC,SAAS,EAA4B;EACrC,kBAAkB,EAA4B;EAC9C,WAAW,EAA2B;CACxC,CAAC,GACD,EAAY,cAAc;EACxB,UAAU,EAA0B;EACpC,SAAS,EAA0B;EACnC,WAAW,EAA2B;CACxC,CAAC,CACH,CAAC;AACH"}
@@ -70,7 +70,7 @@ function m({ projectId: d, userId: f, teamId: m, entity: h, entityType: g, isSho
70
70
  userId: f,
71
71
  evaluationId: A,
72
72
  entityId: h.id,
73
- versionNumber: h.versionNumber ?? -1,
73
+ versionNumber: h.versionNumber ?? 1,
74
74
  teamId: m,
75
75
  contributors: r
76
76
  };