@gen3/frontend 0.10.73 → 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.
- package/dist/cjs/index.js +194 -157
- package/dist/cjs/index.js.map +1 -1
- package/dist/dts/components/Buttons/UploadJSONButton.d.ts.map +1 -1
- package/dist/dts/components/Buttons/UploadJSONButton.js +12 -1
- package/dist/dts/components/Buttons/UploadJSONButton.js.map +1 -1
- package/dist/dts/features/CohortBuilder/CohortSelector.d.ts +1 -8
- package/dist/dts/features/CohortBuilder/CohortSelector.d.ts.map +1 -1
- package/dist/dts/features/CohortBuilder/CohortSelector.js +6 -8
- package/dist/dts/features/CohortBuilder/CohortSelector.js.map +1 -1
- package/dist/dts/features/CohortBuilder/QueryExpressionSection.js +1 -1
- package/dist/dts/features/CohortBuilder/QueryExpressionSection.js.map +1 -1
- package/dist/dts/features/Crosswalk/CrosswalkPanel.d.ts +1 -1
- package/dist/dts/features/Crosswalk/CrosswalkPanel.d.ts.map +1 -1
- package/dist/dts/features/Crosswalk/CrosswalkPanel.js +11 -11
- package/dist/dts/features/Crosswalk/CrosswalkPanel.js.map +1 -1
- package/dist/dts/features/Crosswalk/types.d.ts +1 -0
- package/dist/dts/features/Crosswalk/types.d.ts.map +1 -1
- package/dist/dts/features/Navigation/TopBar.d.ts.map +1 -1
- package/dist/dts/features/Navigation/TopBar.js +4 -3
- package/dist/dts/features/Navigation/TopBar.js.map +1 -1
- package/dist/dts/features/Workspace/PaymentPanel/PaymentPanel.d.ts.map +1 -1
- package/dist/dts/features/Workspace/PaymentPanel/PaymentPanel.js +1 -2
- package/dist/dts/features/Workspace/PaymentPanel/PaymentPanel.js.map +1 -1
- package/dist/dts/features/Workspace/StatusAndControls.d.ts.map +1 -1
- package/dist/dts/features/Workspace/StatusAndControls.js +2 -3
- package/dist/dts/features/Workspace/StatusAndControls.js.map +1 -1
- package/dist/dts/features/Workspace/WorkspaceNotebookPanelWithControls.d.ts.map +1 -1
- package/dist/dts/features/Workspace/WorkspaceNotebookPanelWithControls.js +2 -1
- package/dist/dts/features/Workspace/WorkspaceNotebookPanelWithControls.js.map +1 -1
- package/dist/dts/pages/Crosswalk/data.d.ts.map +1 -1
- package/dist/dts/pages/Crosswalk/data.js +27 -11
- package/dist/dts/pages/Crosswalk/data.js.map +1 -1
- package/dist/esm/index.js +196 -159
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
package/dist/esm/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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,
|
|
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
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';
|
|
@@ -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,
|
|
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
|
|
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__*/
|
|
2965
|
-
className:
|
|
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(
|
|
2968
|
-
|
|
2969
|
-
|
|
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 = (
|
|
8620
|
+
const CohortSelector = ()=>{
|
|
8599
8621
|
const dispatch = useCoreDispatch();
|
|
8600
|
-
const
|
|
8601
|
-
|
|
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(
|
|
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__*/
|
|
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
|
-
|
|
10826
|
-
|
|
10827
|
-
|
|
10828
|
-
|
|
10829
|
-
|
|
10830
|
-
|
|
10831
|
-
|
|
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
|
-
|
|
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, {})
|
|
@@ -19542,7 +19555,7 @@ const CrosswalkTable = ({ mapping, data, isFetching, isError, tableMessage, show
|
|
|
19542
19555
|
});
|
|
19543
19556
|
};
|
|
19544
19557
|
|
|
19545
|
-
const MIN_ROWS =
|
|
19558
|
+
const MIN_ROWS = 22;
|
|
19546
19559
|
/**
|
|
19547
19560
|
*
|
|
19548
19561
|
*/ const buildCSVData = (data, mapping, includeSourceId)=>{
|
|
@@ -19566,7 +19579,7 @@ const downloadData = (data)=>{
|
|
|
19566
19579
|
link.click();
|
|
19567
19580
|
document.body.removeChild(link);
|
|
19568
19581
|
};
|
|
19569
|
-
const CrosswalkPanel = ({ mapping, showSubmittedIdInTable })=>{
|
|
19582
|
+
const CrosswalkPanel = ({ mapping, showSubmittedIdInTable, idEntryPlaceholderText })=>{
|
|
19570
19583
|
const [query, setQuery] = useState('');
|
|
19571
19584
|
const [sourceIds, setSourceIds] = useState('');
|
|
19572
19585
|
const clipboard = useClipboard({
|
|
@@ -19623,29 +19636,35 @@ const CrosswalkPanel = ({ mapping, showSubmittedIdInTable })=>{
|
|
|
19623
19636
|
/*#__PURE__*/ jsxs(Stack, {
|
|
19624
19637
|
align: "stretch",
|
|
19625
19638
|
justify: "flex-start",
|
|
19626
|
-
className: "p-2 w-1/4",
|
|
19639
|
+
className: "p-2 w-1/4 h-full",
|
|
19627
19640
|
children: [
|
|
19628
19641
|
/*#__PURE__*/ jsxs(Group, {
|
|
19629
19642
|
wrap: "nowrap",
|
|
19630
19643
|
children: [
|
|
19631
|
-
/*#__PURE__*/ jsx(
|
|
19632
|
-
|
|
19633
|
-
|
|
19634
|
-
|
|
19635
|
-
|
|
19636
|
-
|
|
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
|
+
})
|
|
19637
19653
|
}),
|
|
19638
|
-
/*#__PURE__*/ jsx(
|
|
19639
|
-
|
|
19640
|
-
|
|
19641
|
-
|
|
19642
|
-
|
|
19643
|
-
|
|
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
|
+
})
|
|
19644
19663
|
})
|
|
19645
19664
|
]
|
|
19646
19665
|
}),
|
|
19647
19666
|
/*#__PURE__*/ jsx(Textarea, {
|
|
19648
|
-
placeholder:
|
|
19667
|
+
placeholder: idEntryPlaceholderText,
|
|
19649
19668
|
radius: "md",
|
|
19650
19669
|
size: "md",
|
|
19651
19670
|
required: true,
|
|
@@ -19672,24 +19691,30 @@ const CrosswalkPanel = ({ mapping, showSubmittedIdInTable })=>{
|
|
|
19672
19691
|
/*#__PURE__*/ jsxs(Group, {
|
|
19673
19692
|
justify: "flex-end",
|
|
19674
19693
|
children: [
|
|
19675
|
-
/*#__PURE__*/ jsx(
|
|
19676
|
-
|
|
19677
|
-
|
|
19678
|
-
|
|
19679
|
-
|
|
19680
|
-
|
|
19681
|
-
|
|
19682
|
-
|
|
19683
|
-
|
|
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
|
+
})
|
|
19684
19706
|
}),
|
|
19685
|
-
/*#__PURE__*/ jsx(
|
|
19686
|
-
|
|
19687
|
-
|
|
19688
|
-
|
|
19689
|
-
|
|
19690
|
-
|
|
19691
|
-
|
|
19692
|
-
|
|
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
|
+
})
|
|
19693
19718
|
})
|
|
19694
19719
|
]
|
|
19695
19720
|
}),
|
|
@@ -19724,26 +19749,38 @@ const CrosswalkPage = ({ headerProps, footerProps, config })=>{
|
|
|
19724
19749
|
};
|
|
19725
19750
|
|
|
19726
19751
|
const CrosswalkPageGetServerSideProps = async ()=>{
|
|
19727
|
-
|
|
19728
|
-
|
|
19729
|
-
|
|
19730
|
-
|
|
19731
|
-
|
|
19732
|
-
|
|
19733
|
-
|
|
19734
|
-
|
|
19735
|
-
|
|
19736
|
-
|
|
19737
|
-
|
|
19738
|
-
|
|
19739
|
-
|
|
19740
|
-
|
|
19741
|
-
|
|
19742
|
-
|
|
19743
|
-
|
|
19744
|
-
|
|
19745
|
-
|
|
19746
|
-
|
|
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
|
+
}
|
|
19747
19784
|
};
|
|
19748
19785
|
|
|
19749
19786
|
const TailwindConfig = (themer)=>{
|