@gen3/frontend 0.10.72 → 0.10.74

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 (45) hide show
  1. package/dist/cjs/index.js +207 -174
  2. package/dist/cjs/index.js.map +1 -1
  3. package/dist/dts/components/Buttons/UploadJSONButton.d.ts.map +1 -1
  4. package/dist/dts/components/Buttons/UploadJSONButton.js +12 -1
  5. package/dist/dts/components/Buttons/UploadJSONButton.js.map +1 -1
  6. package/dist/dts/components/Providers/Gen3Provider.d.ts +2 -3
  7. package/dist/dts/components/Providers/Gen3Provider.d.ts.map +1 -1
  8. package/dist/dts/components/Providers/Gen3Provider.js +4 -5
  9. package/dist/dts/components/Providers/Gen3Provider.js.map +1 -1
  10. package/dist/dts/features/CohortBuilder/CohortSelector.d.ts +1 -8
  11. package/dist/dts/features/CohortBuilder/CohortSelector.d.ts.map +1 -1
  12. package/dist/dts/features/CohortBuilder/CohortSelector.js +6 -8
  13. package/dist/dts/features/CohortBuilder/CohortSelector.js.map +1 -1
  14. package/dist/dts/features/CohortBuilder/QueryExpressionSection.js +1 -1
  15. package/dist/dts/features/CohortBuilder/QueryExpressionSection.js.map +1 -1
  16. package/dist/dts/features/Crosswalk/CrosswalkPanel.d.ts +1 -1
  17. package/dist/dts/features/Crosswalk/CrosswalkPanel.d.ts.map +1 -1
  18. package/dist/dts/features/Crosswalk/CrosswalkPanel.js +11 -11
  19. package/dist/dts/features/Crosswalk/CrosswalkPanel.js.map +1 -1
  20. package/dist/dts/features/Crosswalk/types.d.ts +1 -0
  21. package/dist/dts/features/Crosswalk/types.d.ts.map +1 -1
  22. package/dist/dts/features/Navigation/TopBar.d.ts.map +1 -1
  23. package/dist/dts/features/Navigation/TopBar.js +4 -3
  24. package/dist/dts/features/Navigation/TopBar.js.map +1 -1
  25. package/dist/dts/features/Workspace/PaymentPanel/PaymentPanel.d.ts.map +1 -1
  26. package/dist/dts/features/Workspace/PaymentPanel/PaymentPanel.js +1 -2
  27. package/dist/dts/features/Workspace/PaymentPanel/PaymentPanel.js.map +1 -1
  28. package/dist/dts/features/Workspace/StatusAndControls.d.ts.map +1 -1
  29. package/dist/dts/features/Workspace/StatusAndControls.js +2 -3
  30. package/dist/dts/features/Workspace/StatusAndControls.js.map +1 -1
  31. package/dist/dts/features/Workspace/WorkspaceNotebookPanelWithControls.d.ts.map +1 -1
  32. package/dist/dts/features/Workspace/WorkspaceNotebookPanelWithControls.js +2 -1
  33. package/dist/dts/features/Workspace/WorkspaceNotebookPanelWithControls.js.map +1 -1
  34. package/dist/dts/index.d.ts +2 -2
  35. package/dist/dts/index.d.ts.map +1 -1
  36. package/dist/dts/index.js +2 -2
  37. package/dist/dts/index.js.map +1 -1
  38. package/dist/dts/pages/Crosswalk/data.d.ts.map +1 -1
  39. package/dist/dts/pages/Crosswalk/data.js +27 -11
  40. package/dist/dts/pages/Crosswalk/data.js.map +1 -1
  41. package/dist/esm/index.js +210 -178
  42. package/dist/esm/index.js.map +1 -1
  43. package/dist/index.d.ts +6 -5
  44. package/dist/tsconfig.tsbuildinfo +1 -1
  45. package/package.json +9 -9
package/dist/esm/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
2
2
  import * as React from 'react';
3
3
  import React__default, { createContext, useState, useMemo, useEffect, useContext, useCallback, useRef, createElement, forwardRef, useReducer } from 'react';
4
- import { useUserAuth, useCoreSelector, selectUserDetails, useGetAuthzMappingsQuery, WorkspaceStatus, useGetWorkspaceStatusQuery, useGetWorkspacePayModelsQuery, useTerminateWorkspaceMutation, selectRequestedWorkspaceStatus, selectRequestedWorkspaceStatusTimestamp, useCoreDispatch, setActiveWorkspaceStatus, RequestedWorkspaceStatus, setRequestedWorkspaceStatus, isTimeGreaterThan, useLazyFetchUserDetailsQuery, selectUserAuthStatus, GEN3_REDIRECT_URL, showModal, Modals, GEN3_FENCE_API, isAuthenticated, useGetLoginProvidersQuery, hideModal, useGetCSRFQuery, selectCurrentModal, fieldNameToTitle, useIsUserLoggedIn, useGetMDSQuery, selectAuthzMappingData, useGetAggMDSQuery, useAskQuestionMutation, useGetIndexAggMDSQuery, useGetTagsQuery, updateCohortFilter, selectIndexedFilterByName, isOperationWithField, removeCohortFilter, trimFirstFieldNameToTitle, selectCohortFilters, handleOperation, selectCurrentCohortId, setCohortFilter, clearCohortFilters, selectCurrentCohortName, useGeneralGQLQuery, selectIndexFilters, useGetRawDataAndTotalCountsQuery, Accessibility, downloadFromGuppyToBlob, downloadJSONDataFromGuppy, useGetAggsQuery, extractEnumFilterValue, useGetCountsQuery, selectHeadersWithCSRFToken, GEN3_GUPPY_API, useLaunchWorkspaceMutation, selectActiveWorkspaceStatus, isFetchBaseQueryError, setActiveWorkspace, getCurrentTimestamp, selectWorkspaceStatusFromService, selectActiveWorkspaceId, useGetWorkspaceOptionsQuery, GEN3_WORKSPACE_API, useGetExternalLoginsQuery, isWorkspaceRunningOrStopping, useSetCurrentPayModelMutation, PodStatus, PodConditionType, GEN3_COMMONS_NAME, createAppStore, createGen3AppWithOwnStore, createAppApiForRTKQ, getGen3AppId, useGetDictionaryQuery, useGetMetadataByIdQuery, createGen3App, CoreProvider, useGetCredentialsQuery, useRemoveCredentialMutation, useAddNewCredentialMutation, useGetProjectsDetailsQuery, useGetSubmissionsQuery, isCohortItem, isFileItem, fetchFencePresignedURL, HTTPError, isFilterSet, getNumberOfItemsInDatalist, isAdditionalDataItem, getTimestamp, useDataLibrary, useLazyGetCrosswalkDataQuery } from '@gen3/core';
5
- import { LoadingOverlay, Card, Group, Avatar, Text, Checkbox, Stack, Tooltip, UnstyledButton, ThemeIcon, Center, Box, Select, Button, Divider, Textarea, FileButton, Anchor, Modal, Grid, Table, ColorSwatch, useMantineTheme, Loader, Paper, Menu, Badge, Alert, Tabs, Accordion, Drawer, CopyButton, factory, useProps, getStyleObject, SegmentedControl, Switch, Autocomplete, TextInput, Title, ActionIcon, NumberInput, RangeSlider, MultiSelect, Transition, rem, Stepper, Image as Image$1, NavLink, Flex, ScrollArea, Highlight, List, MantineProvider, createTheme, FileInput, CloseButton } from '@mantine/core';
4
+ import { useUserAuth, useCoreSelector, selectUserDetails, useGetAuthzMappingsQuery, WorkspaceStatus, useGetWorkspaceStatusQuery, useGetWorkspacePayModelsQuery, useTerminateWorkspaceMutation, selectRequestedWorkspaceStatus, selectRequestedWorkspaceStatusTimestamp, useCoreDispatch, setActiveWorkspaceStatus, RequestedWorkspaceStatus, setRequestedWorkspaceStatus, isTimeGreaterThan, useLazyFetchUserDetailsQuery, selectUserAuthStatus, GEN3_REDIRECT_URL, showModal, Modals, GEN3_FENCE_API, isAuthenticated, useGetLoginProvidersQuery, hideModal, useGetCSRFQuery, selectCurrentModal, fieldNameToTitle, useIsUserLoggedIn, useGetMDSQuery, selectAuthzMappingData, useGetAggMDSQuery, useAskQuestionMutation, useGetIndexAggMDSQuery, useGetTagsQuery, updateCohortFilter, selectIndexedFilterByName, isOperationWithField, removeCohortFilter, trimFirstFieldNameToTitle, selectCohortFilters, handleOperation, selectCurrentCohortId, setCohortIndexFilters, clearCohortFilters, selectCurrentCohortName, useGeneralGQLQuery, selectIndexFilters, useGetRawDataAndTotalCountsQuery, Accessibility, downloadFromGuppyToBlob, downloadJSONDataFromGuppy, useGetAggsQuery, extractEnumFilterValue, useGetCountsQuery, selectHeadersWithCSRFToken, GEN3_GUPPY_API, useLaunchWorkspaceMutation, selectActiveWorkspaceStatus, isFetchBaseQueryError, setActiveWorkspace, getCurrentTimestamp, selectWorkspaceStatusFromService, selectActiveWorkspaceId, useGetWorkspaceOptionsQuery, GEN3_WORKSPACE_API, useGetExternalLoginsQuery, useSetCurrentPayModelMutation, PodStatus, PodConditionType, isWorkspaceRunningOrStopping, GEN3_COMMONS_NAME, createAppStore, createGen3AppWithOwnStore, createAppApiForRTKQ, getGen3AppId, useGetDictionaryQuery, useGetMetadataByIdQuery, createGen3App, CoreProvider, useGetCredentialsQuery, useRemoveCredentialMutation, useAddNewCredentialMutation, useGetProjectsDetailsQuery, useGetSubmissionsQuery, isCohortItem, isFileItem, fetchFencePresignedURL, HTTPError, isFilterSet, getNumberOfItemsInDatalist, isAdditionalDataItem, getTimestamp, useDataLibrary, useLazyGetCrosswalkDataQuery } from '@gen3/core';
5
+ import { LoadingOverlay, Card, Group, Avatar, Text, Checkbox, Stack, Tooltip, UnstyledButton, ThemeIcon, Center, Box, Select, Button, Divider, Textarea, FileButton, Anchor, Modal, Grid, Table, ColorSwatch, useMantineTheme, Loader, Paper, Menu, Badge, Alert, Tabs, Accordion, Drawer, CopyButton, factory, useProps, getStyleObject, SegmentedControl, Switch, Autocomplete, TextInput, Title, ActionIcon, NumberInput, RangeSlider, MultiSelect, Transition, rem, Stepper, Image as Image$1, NavLink, Flex, ScrollArea, Highlight, List, createTheme, FileInput, CloseButton } from '@mantine/core';
6
6
  import { useDeepCompareEffect, useDeepCompareMemo, useDeepCompareCallback } from 'use-deep-compare';
7
7
  import { useRouter } from 'next/router';
8
8
  import { usePathname } from 'next/navigation';
@@ -26,7 +26,7 @@ import { init, getInstanceByDom } from 'echarts';
26
26
  import { VictoryChart, VictoryTheme, VictoryContainer, VictoryAxis, VictoryStack, VictoryBar, VictoryTooltip, Bar } from 'victory';
27
27
  import Image from 'next/image';
28
28
  import Link from 'next/link';
29
- import { FaExternalLinkAlt, FaQuestion, FaExclamation, FaExclamationTriangle, FaUndo, FaPlus, FaRegStopCircle, FaUser, FaExclamationCircle, FaChartPie, FaCircle, FaCheck, FaGraduationCap, FaRegQuestionCircle, FaVideo, FaRedo, FaUpload, FaDownload } from 'react-icons/fa';
29
+ import { FaExternalLinkAlt, FaQuestion, FaExclamation, FaExclamationTriangle, FaUndo, FaPlus, FaUser, FaExclamationCircle, FaRegStopCircle, FaChartPie, FaCircle, FaCheck, FaGraduationCap, FaRegQuestionCircle, FaVideo, FaRedo, FaUpload, FaDownload } from 'react-icons/fa';
30
30
  import { AiOutlineLogin } from 'react-icons/ai';
31
31
  import { PiDotsThreeCircleThin, PiTrash, PiSparkleFill, PiCaretUpFill, PiCaretDownFill, PiCaretUpDownFill, PiCaretCircleDownFill } from 'react-icons/pi';
32
32
  import Head from 'next/head';
@@ -2891,7 +2891,7 @@ const LoginAccountButton = ({ className = undefined })=>{
2891
2891
 
2892
2892
  const TopIconButton = ({ name, leftIcon = undefined, rightIcon = undefined, classNames = {}, drawBorder = true })=>{
2893
2893
  const classNamesDefaults = {
2894
- root: `flex items-center align-middle px-2 ${drawBorder && 'border-r-2 border-accent'} my-2`,
2894
+ root: `flex items-center align-middle px-2 my-2`,
2895
2895
  button: 'flex flex-nowrap items-center align-middle border-b-2 hover:border-accent border-transparent',
2896
2896
  leftIcon: 'text-secondary-contrast-lighter pr-1',
2897
2897
  label: 'font-content text-secondary-contrast-lighter block',
@@ -2940,7 +2940,15 @@ const processTopBarItems = (items, showLogin)=>{
2940
2940
  classNames: item.classNames,
2941
2941
  drawBorder: needsBorder
2942
2942
  }),
2943
- ' '
2943
+ ' ',
2944
+ /*#__PURE__*/ jsx(Divider, {
2945
+ size: "md",
2946
+ color: "accent.4",
2947
+ orientation: "vertical",
2948
+ classNames: {
2949
+ root: 'my-2'
2950
+ }
2951
+ })
2944
2952
  ]
2945
2953
  }, `${item.href}_${item.name}`));
2946
2954
  return acc;
@@ -2961,12 +2969,25 @@ const TopBar = ({ items, loginButtonVisibility = LoginButtonVisibility.Hidden, c
2961
2969
  className: "flex items-center align-middle",
2962
2970
  children: [
2963
2971
  processTopBarItems(items, loginButtonVisibility === LoginButtonVisibility.Visible),
2964
- loginButtonVisibility != LoginButtonVisibility.Hidden ? /*#__PURE__*/ jsx(LoginAccountButton, {
2965
- className: extractClassName('login', mergedClassnames)
2972
+ loginButtonVisibility != LoginButtonVisibility.Hidden ? /*#__PURE__*/ jsxs("div", {
2973
+ className: "flex items-center",
2974
+ children: [
2975
+ /*#__PURE__*/ jsx(LoginAccountButton, {
2976
+ className: extractClassName('login', mergedClassnames)
2977
+ }),
2978
+ /*#__PURE__*/ jsx(Divider, {
2979
+ size: "md",
2980
+ color: "accent.4",
2981
+ orientation: "vertical"
2982
+ })
2983
+ ]
2966
2984
  }) : null,
2967
- loginButtonVisibility != LoginButtonVisibility.Hidden ? /*#__PURE__*/ jsx(LoginButton, {
2968
- visibility: loginButtonVisibility,
2969
- className: extractClassName('login', mergedClassnames)
2985
+ loginButtonVisibility != LoginButtonVisibility.Hidden ? /*#__PURE__*/ jsx("div", {
2986
+ className: "flex items-center",
2987
+ children: /*#__PURE__*/ jsx(LoginButton, {
2988
+ visibility: loginButtonVisibility,
2989
+ className: extractClassName('login', mergedClassnames)
2990
+ })
2970
2991
  }) : null
2971
2992
  ]
2972
2993
  })
@@ -8577,10 +8598,11 @@ const UploadJSONButton = ({ handleFileChange, tooltip, icon = 'gen3:upload' })=>
8577
8598
  }
8578
8599
  },
8579
8600
  accept: "application/json",
8580
- children: ()=>/*#__PURE__*/ jsx(Tooltip, {
8601
+ children: (props)=>/*#__PURE__*/ jsx(Tooltip, {
8581
8602
  label: tooltip,
8582
8603
  disabled: !tooltip,
8583
8604
  children: /*#__PURE__*/ jsx(Button, {
8605
+ ...props,
8584
8606
  loading: processingFile,
8585
8607
  variant: "outline",
8586
8608
  classNames: {
@@ -8595,21 +8617,16 @@ const UploadJSONButton = ({ handleFileChange, tooltip, icon = 'gen3:upload' })=>
8595
8617
  });
8596
8618
  };
8597
8619
 
8598
- const CohortSelector = ({ index, filters })=>{
8620
+ const CohortSelector = ()=>{
8599
8621
  const dispatch = useCoreDispatch();
8600
- const getData = useDeepCompareCallback(()=>{
8601
- return filters;
8602
- }, [
8603
- filters
8604
- ]);
8622
+ const cohortFilters = useCoreSelector(selectCohortFilters);
8623
+ const getData = ()=>cohortFilters;
8605
8624
  const setCohort = useDeepCompareCallback((data)=>{
8606
8625
  const jsonForm = JSON.parse(data);
8607
- dispatch(setCohortFilter({
8608
- index,
8626
+ dispatch(setCohortIndexFilters({
8609
8627
  filters: jsonForm
8610
8628
  }));
8611
8629
  }, [
8612
- index,
8613
8630
  dispatch
8614
8631
  ]);
8615
8632
  return /*#__PURE__*/ jsxs(Group, {
@@ -8779,10 +8796,7 @@ const QueryExpressionSection = ({ index, filters, currentCohortName, currentCoho
8779
8796
  /*#__PURE__*/ jsxs("div", {
8780
8797
  className: "display flex gap-2 ml-auto mr-3",
8781
8798
  children: [
8782
- /*#__PURE__*/ jsx(CohortSelector, {
8783
- index: index,
8784
- filters: filters
8785
- }),
8799
+ /*#__PURE__*/ jsx(CohortSelector, {}),
8786
8800
  /*#__PURE__*/ jsx(Tooltip, {
8787
8801
  label: noFilters ? 'No values to expand/collapse' : allQueryExpressionsCollapsed ? 'Expand all values' : 'Collapse all values',
8788
8802
  children: /*#__PURE__*/ jsx(Button, {
@@ -10744,94 +10758,21 @@ const PaymentNumberToString = (x, undefinedValue = 'N/A', precision = 2)=>{
10744
10758
  return x.toFixed(precision);
10745
10759
  };
10746
10760
 
10747
- const StatusAndControls = ()=>{
10748
- const { stopWorkspace, toggleFullscreen, isFullscreen } = useWorkspaceStatusContext();
10749
- const openModal = ()=>modals.openConfirmModal({
10750
- title: 'Workspace',
10751
- children: /*#__PURE__*/ jsx(Text, {
10752
- size: "sm",
10753
- children: "Please confirm workspace shutdown"
10754
- }),
10755
- labels: {
10756
- confirm: 'Confirm',
10757
- cancel: 'Cancel'
10758
- },
10759
- onConfirm: ()=>stopWorkspace()
10760
- });
10761
- const workspaceStatus = useCoreSelector(selectActiveWorkspaceStatus);
10762
- const requestedStatus = useCoreSelector(selectRequestedWorkspaceStatus);
10763
- return /*#__PURE__*/ jsx(Transition, {
10764
- mounted: isWorkspaceRunningOrStopping(workspaceStatus),
10765
- transition: "fade",
10766
- duration: 1200,
10767
- timingFunction: "ease",
10768
- children: (styles)=>/*#__PURE__*/ jsx("div", {
10769
- style: styles,
10770
- children: /*#__PURE__*/ jsxs(Group, {
10771
- children: [
10772
- /*#__PURE__*/ jsx(Icon, {
10773
- height: '2.0rem',
10774
- icon: 'workspace:jupyter'
10775
- }),
10776
- /*#__PURE__*/ jsx(Tooltip, {
10777
- label: "Stop Workspace",
10778
- children: /*#__PURE__*/ jsx(Button, {
10779
- loading: requestedStatus === 'Terminate',
10780
- size: "md",
10781
- color: "accent.5",
10782
- variant: "default",
10783
- onClick: ()=>{
10784
- openModal();
10785
- },
10786
- "aria-label": "Stop Workspace",
10787
- leftSection: /*#__PURE__*/ jsx(FaRegStopCircle, {
10788
- color: "utility.2",
10789
- size: "1rem",
10790
- className: "text-accent-warm"
10791
- }),
10792
- children: "Stop Workspace"
10793
- })
10794
- }),
10795
- /*#__PURE__*/ jsx(Tooltip, {
10796
- label: "Toggle fullscreen mode",
10797
- children: /*#__PURE__*/ jsx(Button, {
10798
- color: "utility.2",
10799
- size: "md",
10800
- variant: "default",
10801
- onClick: ()=>{
10802
- toggleFullscreen();
10803
- },
10804
- "aria-label": isFullscreen ? 'Exit Fullscreen' : 'Make Fullscreen',
10805
- leftSection: /*#__PURE__*/ jsx(BsArrowsFullscreen, {
10806
- className: "text-accent-warm"
10807
- }),
10808
- children: isFullscreen ? 'Exit Fullscreen' : 'Make Fullscreen'
10809
- })
10810
- })
10811
- ]
10812
- })
10813
- })
10814
- });
10815
- };
10816
-
10817
10761
  const isNoPayModelError = (error)=>{
10818
10762
  return 'status' in error && error.status === 'PARSING_ERROR' && error.originalStatus === 404;
10819
10763
  };
10820
10764
  const NoPayModel = ()=>{
10821
- return /*#__PURE__*/ jsxs(Group, {
10765
+ return /*#__PURE__*/ jsx(Group, {
10822
10766
  className: "p-2 border-1 border-l-0 border-r-0 border-base-lighter w-full h-16",
10823
10767
  justify: "space-between",
10824
- children: [
10825
- /*#__PURE__*/ jsx(Text, {
10826
- className: "pl-4",
10827
- size: "md",
10828
- classNames: {
10829
- root: 'font-heading text-utility-warning'
10830
- },
10831
- children: "No pay model defined"
10832
- }),
10833
- /*#__PURE__*/ jsx(StatusAndControls, {})
10834
- ]
10768
+ children: /*#__PURE__*/ jsx(Text, {
10769
+ className: "pl-4",
10770
+ size: "md",
10771
+ classNames: {
10772
+ root: 'font-heading text-utility-warning'
10773
+ },
10774
+ children: "No pay model defined"
10775
+ })
10835
10776
  });
10836
10777
  };
10837
10778
  const PaymentPanel = ()=>{
@@ -11159,6 +11100,72 @@ const WorkspaceLaunchProgress = ()=>{
11159
11100
  });
11160
11101
  };
11161
11102
 
11103
+ const StatusAndControls = ()=>{
11104
+ const { stopWorkspace, toggleFullscreen, isFullscreen } = useWorkspaceStatusContext();
11105
+ const openModal = ()=>modals.openConfirmModal({
11106
+ title: 'Workspace',
11107
+ children: /*#__PURE__*/ jsx(Text, {
11108
+ size: "sm",
11109
+ children: "Please confirm workspace shutdown"
11110
+ }),
11111
+ labels: {
11112
+ confirm: 'Confirm',
11113
+ cancel: 'Cancel'
11114
+ },
11115
+ onConfirm: ()=>stopWorkspace()
11116
+ });
11117
+ const workspaceStatus = useCoreSelector(selectActiveWorkspaceStatus);
11118
+ const requestedStatus = useCoreSelector(selectRequestedWorkspaceStatus);
11119
+ return /*#__PURE__*/ jsx(Transition, {
11120
+ mounted: isWorkspaceRunningOrStopping(workspaceStatus),
11121
+ transition: "fade",
11122
+ duration: 1200,
11123
+ timingFunction: "ease",
11124
+ children: (styles)=>/*#__PURE__*/ jsx("div", {
11125
+ style: styles,
11126
+ children: /*#__PURE__*/ jsxs(Group, {
11127
+ children: [
11128
+ /*#__PURE__*/ jsx(Tooltip, {
11129
+ label: "Stop Workspace",
11130
+ children: /*#__PURE__*/ jsx(Button, {
11131
+ loading: requestedStatus === RequestedWorkspaceStatus.Terminate,
11132
+ size: "md",
11133
+ color: "accent.5",
11134
+ variant: "default",
11135
+ onClick: ()=>{
11136
+ openModal();
11137
+ },
11138
+ "aria-label": "Stop Workspace",
11139
+ leftSection: /*#__PURE__*/ jsx(FaRegStopCircle, {
11140
+ color: "utility.2",
11141
+ size: "1rem",
11142
+ className: "text-accent-warm"
11143
+ }),
11144
+ children: "Stop Workspace"
11145
+ })
11146
+ }),
11147
+ /*#__PURE__*/ jsx(Tooltip, {
11148
+ label: "Toggle fullscreen mode",
11149
+ children: /*#__PURE__*/ jsx(Button, {
11150
+ color: "utility.2",
11151
+ size: "md",
11152
+ variant: "default",
11153
+ onClick: ()=>{
11154
+ toggleFullscreen();
11155
+ },
11156
+ "aria-label": isFullscreen ? 'Exit Fullscreen' : 'Make Fullscreen',
11157
+ leftSection: /*#__PURE__*/ jsx(BsArrowsFullscreen, {
11158
+ className: "text-accent-warm"
11159
+ }),
11160
+ children: isFullscreen ? 'Exit Fullscreen' : 'Make Fullscreen'
11161
+ })
11162
+ })
11163
+ ]
11164
+ })
11165
+ })
11166
+ });
11167
+ };
11168
+
11162
11169
  const FULLSCREEN_STYLE = 'fixed top-0 left-0 w-full h-full flex flex-col flex-grow content-center items-center bg-base-lightest';
11163
11170
  const WorkspaceNotebookPanelWithControls = ()=>{
11164
11171
  const { isFullscreen } = useWorkspaceStatusContext();
@@ -11167,7 +11174,13 @@ const WorkspaceNotebookPanelWithControls = ()=>{
11167
11174
  className: isFullscreen ? FULLSCREEN_STYLE : 'flex flex-col grow w-full h-full relative',
11168
11175
  children: [
11169
11176
  /*#__PURE__*/ jsx(ExternalLoginsStatus, {}),
11170
- requirePayModel && /*#__PURE__*/ jsx(PaymentPanel, {}),
11177
+ /*#__PURE__*/ jsxs("div", {
11178
+ className: `flex w-full p-2 ${requirePayModel ? 'justify-between' : 'justify-end'}`,
11179
+ children: [
11180
+ requirePayModel && /*#__PURE__*/ jsx(PaymentPanel, {}),
11181
+ /*#__PURE__*/ jsx(StatusAndControls, {})
11182
+ ]
11183
+ }),
11171
11184
  /*#__PURE__*/ jsx(WorkspaceLaunchProgress, {}),
11172
11185
  /*#__PURE__*/ jsx(WorkspacePanel, {}),
11173
11186
  /*#__PURE__*/ jsx(WorkspaceNotebook, {})
@@ -14289,28 +14302,24 @@ const createMantineTheme = (fonts, colors)=>{
14289
14302
  * Gen3Provider wraps around the entire app and provides general configurations
14290
14303
  * for the whole website like color scheme, icons, fonts, and sessionConfigs like
14291
14304
  * inactivity limits for session timeouts.
14292
- */ const Gen3Provider = ({ colors, icons, fonts, sessionConfig, modalsConfig, children })=>{
14305
+ */ const Gen3Provider = ({ icons, sessionConfig, modalsConfig, children })=>{
14293
14306
  useEffect(()=>{
14294
14307
  icons.forEach((i)=>addCollection(i));
14295
14308
  }, [
14296
14309
  icons
14297
14310
  ]);
14298
- const theme = createMantineTheme(fonts, colors);
14299
14311
  return /*#__PURE__*/ jsx(CoreProvider, {
14300
- children: /*#__PURE__*/ jsx(MantineProvider, {
14301
- theme: theme,
14302
- children: /*#__PURE__*/ jsxs(ModalsProvider, {
14303
- children: [
14304
- /*#__PURE__*/ jsx(Notifications, {}),
14305
- /*#__PURE__*/ jsx(SessionProvider, {
14306
- ...sessionConfig,
14307
- children: /*#__PURE__*/ jsx(Gen3ModalsProvider, {
14308
- config: modalsConfig,
14309
- children: children
14310
- })
14312
+ children: /*#__PURE__*/ jsxs(ModalsProvider, {
14313
+ children: [
14314
+ /*#__PURE__*/ jsx(Notifications, {}),
14315
+ /*#__PURE__*/ jsx(SessionProvider, {
14316
+ ...sessionConfig,
14317
+ children: /*#__PURE__*/ jsx(Gen3ModalsProvider, {
14318
+ config: modalsConfig,
14319
+ children: children
14311
14320
  })
14312
- ]
14313
- })
14321
+ })
14322
+ ]
14314
14323
  })
14315
14324
  });
14316
14325
  };
@@ -16916,7 +16925,6 @@ const ALLOWED_IMAGE_TYPES = [
16916
16925
  'image/png',
16917
16926
  'image/svg+xml'
16918
16927
  ];
16919
- const MAX_HISTORY = 50;
16920
16928
  const AnalysisCardEditor = ()=>{
16921
16929
  // Enhanced state management with history
16922
16930
  const [history, setHistory] = useState({
@@ -16947,7 +16955,7 @@ const AnalysisCardEditor = ()=>{
16947
16955
  past: [
16948
16956
  ...prev.past,
16949
16957
  prev.present
16950
- ].slice(-MAX_HISTORY),
16958
+ ].slice(-50),
16951
16959
  present: newPresent,
16952
16960
  future: []
16953
16961
  }));
@@ -19547,7 +19555,7 @@ const CrosswalkTable = ({ mapping, data, isFetching, isError, tableMessage, show
19547
19555
  });
19548
19556
  };
19549
19557
 
19550
- const MIN_ROWS = 18;
19558
+ const MIN_ROWS = 22;
19551
19559
  /**
19552
19560
  *
19553
19561
  */ const buildCSVData = (data, mapping, includeSourceId)=>{
@@ -19571,7 +19579,7 @@ const downloadData = (data)=>{
19571
19579
  link.click();
19572
19580
  document.body.removeChild(link);
19573
19581
  };
19574
- const CrosswalkPanel = ({ mapping, showSubmittedIdInTable })=>{
19582
+ const CrosswalkPanel = ({ mapping, showSubmittedIdInTable, idEntryPlaceholderText })=>{
19575
19583
  const [query, setQuery] = useState('');
19576
19584
  const [sourceIds, setSourceIds] = useState('');
19577
19585
  const clipboard = useClipboard({
@@ -19628,29 +19636,35 @@ const CrosswalkPanel = ({ mapping, showSubmittedIdInTable })=>{
19628
19636
  /*#__PURE__*/ jsxs(Stack, {
19629
19637
  align: "stretch",
19630
19638
  justify: "flex-start",
19631
- className: "p-2 w-1/4",
19639
+ className: "p-2 w-1/4 h-full",
19632
19640
  children: [
19633
19641
  /*#__PURE__*/ jsxs(Group, {
19634
19642
  wrap: "nowrap",
19635
19643
  children: [
19636
- /*#__PURE__*/ jsx(Button, {
19637
- size: "md",
19638
- color: "secondary.4",
19639
- disabled: sourceIds.length == 0,
19640
- onClick: ()=>onSubmit(),
19641
- children: "Submit"
19644
+ /*#__PURE__*/ jsx(Tooltip, {
19645
+ label: "Submit IDs to crosswalk service",
19646
+ children: /*#__PURE__*/ jsx(Button, {
19647
+ size: "md",
19648
+ color: "secondary.4",
19649
+ disabled: sourceIds.length == 0,
19650
+ onClick: ()=>onSubmit(),
19651
+ children: "Submit"
19652
+ })
19642
19653
  }),
19643
- /*#__PURE__*/ jsx(Button, {
19644
- size: "md",
19645
- color: "secondary.4",
19646
- disabled: sourceIds.length == 0,
19647
- onClick: ()=>clear(),
19648
- children: "Clear"
19654
+ /*#__PURE__*/ jsx(Tooltip, {
19655
+ label: "Clear all Ids",
19656
+ children: /*#__PURE__*/ jsx(Button, {
19657
+ size: "md",
19658
+ color: "secondary.4",
19659
+ disabled: sourceIds.length == 0,
19660
+ onClick: ()=>clear(),
19661
+ children: "Clear"
19662
+ })
19649
19663
  })
19650
19664
  ]
19651
19665
  }),
19652
19666
  /*#__PURE__*/ jsx(Textarea, {
19653
- placeholder: "IDs...",
19667
+ placeholder: idEntryPlaceholderText,
19654
19668
  radius: "md",
19655
19669
  size: "md",
19656
19670
  required: true,
@@ -19677,24 +19691,30 @@ const CrosswalkPanel = ({ mapping, showSubmittedIdInTable })=>{
19677
19691
  /*#__PURE__*/ jsxs(Group, {
19678
19692
  justify: "flex-end",
19679
19693
  children: [
19680
- /*#__PURE__*/ jsx(Button, {
19681
- variant: "outline",
19682
- size: "md",
19683
- color: clipboard.copied ? 'accent.4' : 'accent-warm.4',
19684
- onClick: ()=>{
19685
- if (data) clipboard.copy(buildCSVData(data, mapping, showSubmittedIdInTable));
19686
- },
19687
- disabled: !data || data.length == 0,
19688
- children: "Copy"
19694
+ /*#__PURE__*/ jsx(Tooltip, {
19695
+ label: "Copy mapping to clipboard",
19696
+ children: /*#__PURE__*/ jsx(Button, {
19697
+ variant: "outline",
19698
+ size: "md",
19699
+ color: clipboard.copied ? 'accent.4' : 'accent-warm.4',
19700
+ onClick: ()=>{
19701
+ if (data) clipboard.copy(buildCSVData(data, mapping, showSubmittedIdInTable));
19702
+ },
19703
+ disabled: !data || data.length == 0,
19704
+ children: "Copy"
19705
+ })
19689
19706
  }),
19690
- /*#__PURE__*/ jsx(Button, {
19691
- variant: "outline",
19692
- size: "md",
19693
- onClick: ()=>{
19694
- if (data) downloadData(buildCSVData(data, mapping, showSubmittedIdInTable));
19695
- },
19696
- disabled: !data || data.length == 0,
19697
- children: "Download"
19707
+ /*#__PURE__*/ jsx(Tooltip, {
19708
+ label: "Download mapping",
19709
+ children: /*#__PURE__*/ jsx(Button, {
19710
+ variant: "outline",
19711
+ size: "md",
19712
+ onClick: ()=>{
19713
+ if (data) downloadData(buildCSVData(data, mapping, showSubmittedIdInTable));
19714
+ },
19715
+ disabled: !data || data.length == 0,
19716
+ children: "Download"
19717
+ })
19698
19718
  })
19699
19719
  ]
19700
19720
  }),
@@ -19729,26 +19749,38 @@ const CrosswalkPage = ({ headerProps, footerProps, config })=>{
19729
19749
  };
19730
19750
 
19731
19751
  const CrosswalkPageGetServerSideProps = async ()=>{
19732
- const initialConfig = await ContentSource.get(`config/${GEN3_COMMONS_NAME}/crosswalk.json`);
19733
- const regex = /->/g;
19734
- const processedConfig = {
19735
- showSubmittedIdInTable: initialConfig.showSubmittedIdInTable,
19736
- mapping: {
19737
- source: initialConfig.mapping.source,
19738
- external: initialConfig.mapping.external.map((entry)=>({
19739
- ...entry,
19740
- dataPath: entry.dataPath.split(regex).map((x)=>JSON.stringify([
19741
- x
19742
- ])).join('.')
19743
- }))
19744
- }
19745
- };
19746
- return {
19747
- props: {
19748
- ...await getNavPageLayoutPropsFromConfig(),
19749
- config: processedConfig
19750
- }
19751
- };
19752
+ try {
19753
+ const initialConfig = await ContentSource.get(`config/${GEN3_COMMONS_NAME}/crosswalk.json`);
19754
+ const regex = /->/g;
19755
+ const processedConfig = {
19756
+ showSubmittedIdInTable: initialConfig.showSubmittedIdInTable,
19757
+ idEntryPlaceholderText: initialConfig?.showSubmittedIdInTable || 'Enter IDs, one per line.\nExample:\nD334343\nC343433',
19758
+ mapping: {
19759
+ source: initialConfig.mapping.source,
19760
+ external: initialConfig.mapping.external.map((entry)=>({
19761
+ ...entry,
19762
+ dataPath: entry.dataPath.split(regex).map((x)=>JSON.stringify([
19763
+ x
19764
+ ])).join('.')
19765
+ }))
19766
+ }
19767
+ };
19768
+ return {
19769
+ props: {
19770
+ ...await getNavPageLayoutPropsFromConfig(),
19771
+ config: processedConfig
19772
+ }
19773
+ };
19774
+ } catch (error) {
19775
+ const errorMessage = error instanceof Error ? error.message : 'Unknown error in crosswalk config';
19776
+ console.error(errorMessage);
19777
+ return {
19778
+ props: {
19779
+ ...await getNavPageLayoutPropsFromConfig(),
19780
+ config: undefined
19781
+ }
19782
+ };
19783
+ }
19752
19784
  };
19753
19785
 
19754
19786
  const TailwindConfig = (themer)=>{
@@ -20043,5 +20075,5 @@ async function credentialsLogout(req, res) {
20043
20075
  res.redirect(307, '/');
20044
20076
  }
20045
20077
 
20046
- export { AISearchPageGetServerSideProps, AdminAuthZPageGetServerSideProps, AiSearch, AISearchPage as AiSearchPage, AnalysisCenter, AnalysisEditorPage, AnalysisEditorPageGetServerSideProps, AnalysisPage, AnalysisPageGetServerSideProps, AuthzPage, BaseModal, Charts, CohortBuilder, ColorThemePage, ColorThemePageGetServerSideProps, ContentSource, CreateCredentialsAPIKeyModal, CrosswalkPage, CrosswalkPageGetServerSideProps, Custom404Page, DataLibraryPage, DataLibraryPageGetServerSideProps, DictionaryPage, DictionaryPageGetServerSideProps, DiscoveryCellRendererFactory, DiscoveryProvider as DiscoveryConfigProvider, DiscoveryIndexPanel, DiscoveryPage, DiscoveryPageGetServerSideProps, DiscoveryRowRendererFactory, EnumFacetChart, ErrorCard, ExplorerPage, ExplorerPageGetServerSideProps, ExplorerTableCellRendererFactory, ExplorerTableDetailsPanelFactory, FirstTimeModal, Footer, Gen3Link, Gen3ModalsProvider, Gen3Provider, GqlQueryEditor$1 as GqlQueryEditor, Header, HoverLink, LandingPage, LandingPageGetStaticProps, LoginButton, LoginPage, LoginPageGetServerSideProps, LoginPanel, LoginProvidersPanel, MinutesToMilliseconds, NavPageLayout, NavigationBar, NavigationButton, NoAccessModal, NotebookLitePage, NotebookLitePageGetStaticProps, ProfilePage, ProfilePageGetServerSideProps, ProfileProvider, ProtectedContent, QueryPage, QueryPageGetServerSideProps, ReactECharts, ResourcesFilters, SPECIAL_CASE_FIELDS, SessionExpiredModal, StudyGroup, SubmissionPage, SubmissionPageGetServerSideProps, TagCloud, TailwindConfig, User, Workspace, WorkspaceNoAccessPage, WorkspaceNoAccessPageServerSideProps, WorkspacePage, WorkspacePageGetServerSideProps, capitalize, computeRowSpan, convertMinutesToMilliseconds, convertSecondsToMilliseconds, create10ColorAccessibleContrast, create10ColorPallet, credentialsLogin, credentialsLogout, extractObjectKey, focusStyles, getCurrentUnixTimestamp, getNavPageLayoutPropsFromConfig, getParamsValueAsString, getTagInfo, hasOwnProperty, isArrayOfString, isPropertyKey, isTextTransform$1 as isTextTransform, processLabel$1 as processLabel, processRangeKeyLabel, registerCohortBuilderDefaultPreviewRenderers, registerCohortDiscoveryApp, registerCohortDiversityApp, registerDefaultDiscoveryDataLoaders, registerDiscoveryDefaultCellRenderers, registerDiscoveryDefaultStudyPreviewRenderers, registerExplorerDefaultCellRenderers, registerMetadataSchemaApp, removeKey$1 as removeKey, resourcePathFromProjectID, sessionLogout, sessionToken, stripTrailingSlash, toDisplayName, truncateString, unixTimeToString, useDiscoveryContext, userHasMethodForServiceOnResource$1 as userHasMethodForServiceOnResource };
20078
+ export { AISearchPageGetServerSideProps, AdminAuthZPageGetServerSideProps, AiSearch, AISearchPage as AiSearchPage, AnalysisCenter, AnalysisEditorPage, AnalysisEditorPageGetServerSideProps, AnalysisPage, AnalysisPageGetServerSideProps, AuthzPage, BaseModal, Charts, CohortBuilder, ColorThemePage, ColorThemePageGetServerSideProps, ContentSource, CreateCredentialsAPIKeyModal, CrosswalkPage, CrosswalkPageGetServerSideProps, Custom404Page, DataLibraryPage, DataLibraryPageGetServerSideProps, DictionaryPage, DictionaryPageGetServerSideProps, DiscoveryCellRendererFactory, DiscoveryProvider as DiscoveryConfigProvider, DiscoveryIndexPanel, DiscoveryPage, DiscoveryPageGetServerSideProps, DiscoveryRowRendererFactory, EnumFacetChart, ErrorCard, ExplorerPage, ExplorerPageGetServerSideProps, ExplorerTableCellRendererFactory, ExplorerTableDetailsPanelFactory, FirstTimeModal, Footer, Gen3Link, Gen3ModalsProvider, Gen3Provider, GqlQueryEditor$1 as GqlQueryEditor, Header, HoverLink, LandingPage, LandingPageGetStaticProps, LoginButton, LoginPage, LoginPageGetServerSideProps, LoginPanel, LoginProvidersPanel, MinutesToMilliseconds, NavPageLayout, NavigationBar, NavigationButton, NoAccessModal, NotebookLitePage, NotebookLitePageGetStaticProps, ProfilePage, ProfilePageGetServerSideProps, ProfileProvider, ProtectedContent, QueryPage, QueryPageGetServerSideProps, ReactECharts, ResourcesFilters, SPECIAL_CASE_FIELDS, SessionExpiredModal, StudyGroup, SubmissionPage, SubmissionPageGetServerSideProps, TagCloud, TailwindConfig, User, Workspace, WorkspaceNoAccessPage, WorkspaceNoAccessPageServerSideProps, WorkspacePage, WorkspacePageGetServerSideProps, capitalize, computeRowSpan, convertMinutesToMilliseconds, convertSecondsToMilliseconds, create10ColorAccessibleContrast, create10ColorPallet, createMantineTheme, credentialsLogin, credentialsLogout, extractObjectKey, focusStyles, getCurrentUnixTimestamp, getNavPageLayoutPropsFromConfig, getParamsValueAsString, getTagInfo, hasOwnProperty, isArrayOfString, isPropertyKey, isTextTransform$1 as isTextTransform, processLabel$1 as processLabel, processRangeKeyLabel, registerCohortBuilderDefaultPreviewRenderers, registerCohortDiscoveryApp, registerCohortDiversityApp, registerDefaultDiscoveryDataLoaders, registerDiscoveryDefaultCellRenderers, registerDiscoveryDefaultStudyPreviewRenderers, registerExplorerDefaultCellRenderers, registerMetadataSchemaApp, removeKey$1 as removeKey, resourcePathFromProjectID, sessionLogout, sessionToken, stripTrailingSlash, toDisplayName, truncateString, unixTimeToString, useDiscoveryContext, userHasMethodForServiceOnResource$1 as userHasMethodForServiceOnResource };
20047
20079
  //# sourceMappingURL=index.js.map