@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.
- package/dist/cjs/index.js +207 -174
- 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/components/Providers/Gen3Provider.d.ts +2 -3
- package/dist/dts/components/Providers/Gen3Provider.d.ts.map +1 -1
- package/dist/dts/components/Providers/Gen3Provider.js +4 -5
- package/dist/dts/components/Providers/Gen3Provider.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/index.d.ts +2 -2
- package/dist/dts/index.d.ts.map +1 -1
- package/dist/dts/index.js +2 -2
- package/dist/dts/index.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 +210 -178
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +6 -5
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +9 -9
package/dist/cjs/index.js
CHANGED
|
@@ -2911,7 +2911,7 @@ const LoginAccountButton = ({ className = undefined })=>{
|
|
|
2911
2911
|
|
|
2912
2912
|
const TopIconButton = ({ name, leftIcon = undefined, rightIcon = undefined, classNames = {}, drawBorder = true })=>{
|
|
2913
2913
|
const classNamesDefaults = {
|
|
2914
|
-
root: `flex items-center align-middle px-2
|
|
2914
|
+
root: `flex items-center align-middle px-2 my-2`,
|
|
2915
2915
|
button: 'flex flex-nowrap items-center align-middle border-b-2 hover:border-accent border-transparent',
|
|
2916
2916
|
leftIcon: 'text-secondary-contrast-lighter pr-1',
|
|
2917
2917
|
label: 'font-content text-secondary-contrast-lighter block',
|
|
@@ -2960,7 +2960,15 @@ const processTopBarItems = (items, showLogin)=>{
|
|
|
2960
2960
|
classNames: item.classNames,
|
|
2961
2961
|
drawBorder: needsBorder
|
|
2962
2962
|
}),
|
|
2963
|
-
' '
|
|
2963
|
+
' ',
|
|
2964
|
+
/*#__PURE__*/ jsxRuntime.jsx(core$1.Divider, {
|
|
2965
|
+
size: "md",
|
|
2966
|
+
color: "accent.4",
|
|
2967
|
+
orientation: "vertical",
|
|
2968
|
+
classNames: {
|
|
2969
|
+
root: 'my-2'
|
|
2970
|
+
}
|
|
2971
|
+
})
|
|
2964
2972
|
]
|
|
2965
2973
|
}, `${item.href}_${item.name}`));
|
|
2966
2974
|
return acc;
|
|
@@ -2981,12 +2989,25 @@ const TopBar = ({ items, loginButtonVisibility = LoginButtonVisibility.Hidden, c
|
|
|
2981
2989
|
className: "flex items-center align-middle",
|
|
2982
2990
|
children: [
|
|
2983
2991
|
processTopBarItems(items, loginButtonVisibility === LoginButtonVisibility.Visible),
|
|
2984
|
-
loginButtonVisibility != LoginButtonVisibility.Hidden ? /*#__PURE__*/ jsxRuntime.
|
|
2985
|
-
className:
|
|
2992
|
+
loginButtonVisibility != LoginButtonVisibility.Hidden ? /*#__PURE__*/ jsxRuntime.jsxs("div", {
|
|
2993
|
+
className: "flex items-center",
|
|
2994
|
+
children: [
|
|
2995
|
+
/*#__PURE__*/ jsxRuntime.jsx(LoginAccountButton, {
|
|
2996
|
+
className: extractClassName('login', mergedClassnames)
|
|
2997
|
+
}),
|
|
2998
|
+
/*#__PURE__*/ jsxRuntime.jsx(core$1.Divider, {
|
|
2999
|
+
size: "md",
|
|
3000
|
+
color: "accent.4",
|
|
3001
|
+
orientation: "vertical"
|
|
3002
|
+
})
|
|
3003
|
+
]
|
|
2986
3004
|
}) : null,
|
|
2987
|
-
loginButtonVisibility != LoginButtonVisibility.Hidden ? /*#__PURE__*/ jsxRuntime.jsx(
|
|
2988
|
-
|
|
2989
|
-
|
|
3005
|
+
loginButtonVisibility != LoginButtonVisibility.Hidden ? /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
3006
|
+
className: "flex items-center",
|
|
3007
|
+
children: /*#__PURE__*/ jsxRuntime.jsx(LoginButton, {
|
|
3008
|
+
visibility: loginButtonVisibility,
|
|
3009
|
+
className: extractClassName('login', mergedClassnames)
|
|
3010
|
+
})
|
|
2990
3011
|
}) : null
|
|
2991
3012
|
]
|
|
2992
3013
|
})
|
|
@@ -8597,10 +8618,11 @@ const UploadJSONButton = ({ handleFileChange, tooltip, icon = 'gen3:upload' })=>
|
|
|
8597
8618
|
}
|
|
8598
8619
|
},
|
|
8599
8620
|
accept: "application/json",
|
|
8600
|
-
children: ()=>/*#__PURE__*/ jsxRuntime.jsx(core$1.Tooltip, {
|
|
8621
|
+
children: (props)=>/*#__PURE__*/ jsxRuntime.jsx(core$1.Tooltip, {
|
|
8601
8622
|
label: tooltip,
|
|
8602
8623
|
disabled: !tooltip,
|
|
8603
8624
|
children: /*#__PURE__*/ jsxRuntime.jsx(core$1.Button, {
|
|
8625
|
+
...props,
|
|
8604
8626
|
loading: processingFile,
|
|
8605
8627
|
variant: "outline",
|
|
8606
8628
|
classNames: {
|
|
@@ -8615,21 +8637,16 @@ const UploadJSONButton = ({ handleFileChange, tooltip, icon = 'gen3:upload' })=>
|
|
|
8615
8637
|
});
|
|
8616
8638
|
};
|
|
8617
8639
|
|
|
8618
|
-
const CohortSelector = (
|
|
8640
|
+
const CohortSelector = ()=>{
|
|
8619
8641
|
const dispatch = core.useCoreDispatch();
|
|
8620
|
-
const
|
|
8621
|
-
|
|
8622
|
-
}, [
|
|
8623
|
-
filters
|
|
8624
|
-
]);
|
|
8642
|
+
const cohortFilters = core.useCoreSelector(core.selectCohortFilters);
|
|
8643
|
+
const getData = ()=>cohortFilters;
|
|
8625
8644
|
const setCohort = useDeepCompare.useDeepCompareCallback((data)=>{
|
|
8626
8645
|
const jsonForm = JSON.parse(data);
|
|
8627
|
-
dispatch(core.
|
|
8628
|
-
index,
|
|
8646
|
+
dispatch(core.setCohortIndexFilters({
|
|
8629
8647
|
filters: jsonForm
|
|
8630
8648
|
}));
|
|
8631
8649
|
}, [
|
|
8632
|
-
index,
|
|
8633
8650
|
dispatch
|
|
8634
8651
|
]);
|
|
8635
8652
|
return /*#__PURE__*/ jsxRuntime.jsxs(core$1.Group, {
|
|
@@ -8799,10 +8816,7 @@ const QueryExpressionSection = ({ index, filters, currentCohortName, currentCoho
|
|
|
8799
8816
|
/*#__PURE__*/ jsxRuntime.jsxs("div", {
|
|
8800
8817
|
className: "display flex gap-2 ml-auto mr-3",
|
|
8801
8818
|
children: [
|
|
8802
|
-
/*#__PURE__*/ jsxRuntime.jsx(CohortSelector, {
|
|
8803
|
-
index: index,
|
|
8804
|
-
filters: filters
|
|
8805
|
-
}),
|
|
8819
|
+
/*#__PURE__*/ jsxRuntime.jsx(CohortSelector, {}),
|
|
8806
8820
|
/*#__PURE__*/ jsxRuntime.jsx(core$1.Tooltip, {
|
|
8807
8821
|
label: noFilters ? 'No values to expand/collapse' : allQueryExpressionsCollapsed ? 'Expand all values' : 'Collapse all values',
|
|
8808
8822
|
children: /*#__PURE__*/ jsxRuntime.jsx(core$1.Button, {
|
|
@@ -10764,94 +10778,21 @@ const PaymentNumberToString = (x, undefinedValue = 'N/A', precision = 2)=>{
|
|
|
10764
10778
|
return x.toFixed(precision);
|
|
10765
10779
|
};
|
|
10766
10780
|
|
|
10767
|
-
const StatusAndControls = ()=>{
|
|
10768
|
-
const { stopWorkspace, toggleFullscreen, isFullscreen } = useWorkspaceStatusContext();
|
|
10769
|
-
const openModal = ()=>modals.modals.openConfirmModal({
|
|
10770
|
-
title: 'Workspace',
|
|
10771
|
-
children: /*#__PURE__*/ jsxRuntime.jsx(core$1.Text, {
|
|
10772
|
-
size: "sm",
|
|
10773
|
-
children: "Please confirm workspace shutdown"
|
|
10774
|
-
}),
|
|
10775
|
-
labels: {
|
|
10776
|
-
confirm: 'Confirm',
|
|
10777
|
-
cancel: 'Cancel'
|
|
10778
|
-
},
|
|
10779
|
-
onConfirm: ()=>stopWorkspace()
|
|
10780
|
-
});
|
|
10781
|
-
const workspaceStatus = core.useCoreSelector(core.selectActiveWorkspaceStatus);
|
|
10782
|
-
const requestedStatus = core.useCoreSelector(core.selectRequestedWorkspaceStatus);
|
|
10783
|
-
return /*#__PURE__*/ jsxRuntime.jsx(core$1.Transition, {
|
|
10784
|
-
mounted: core.isWorkspaceRunningOrStopping(workspaceStatus),
|
|
10785
|
-
transition: "fade",
|
|
10786
|
-
duration: 1200,
|
|
10787
|
-
timingFunction: "ease",
|
|
10788
|
-
children: (styles)=>/*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
10789
|
-
style: styles,
|
|
10790
|
-
children: /*#__PURE__*/ jsxRuntime.jsxs(core$1.Group, {
|
|
10791
|
-
children: [
|
|
10792
|
-
/*#__PURE__*/ jsxRuntime.jsx(react.Icon, {
|
|
10793
|
-
height: '2.0rem',
|
|
10794
|
-
icon: 'workspace:jupyter'
|
|
10795
|
-
}),
|
|
10796
|
-
/*#__PURE__*/ jsxRuntime.jsx(core$1.Tooltip, {
|
|
10797
|
-
label: "Stop Workspace",
|
|
10798
|
-
children: /*#__PURE__*/ jsxRuntime.jsx(core$1.Button, {
|
|
10799
|
-
loading: requestedStatus === 'Terminate',
|
|
10800
|
-
size: "md",
|
|
10801
|
-
color: "accent.5",
|
|
10802
|
-
variant: "default",
|
|
10803
|
-
onClick: ()=>{
|
|
10804
|
-
openModal();
|
|
10805
|
-
},
|
|
10806
|
-
"aria-label": "Stop Workspace",
|
|
10807
|
-
leftSection: /*#__PURE__*/ jsxRuntime.jsx(fa.FaRegStopCircle, {
|
|
10808
|
-
color: "utility.2",
|
|
10809
|
-
size: "1rem",
|
|
10810
|
-
className: "text-accent-warm"
|
|
10811
|
-
}),
|
|
10812
|
-
children: "Stop Workspace"
|
|
10813
|
-
})
|
|
10814
|
-
}),
|
|
10815
|
-
/*#__PURE__*/ jsxRuntime.jsx(core$1.Tooltip, {
|
|
10816
|
-
label: "Toggle fullscreen mode",
|
|
10817
|
-
children: /*#__PURE__*/ jsxRuntime.jsx(core$1.Button, {
|
|
10818
|
-
color: "utility.2",
|
|
10819
|
-
size: "md",
|
|
10820
|
-
variant: "default",
|
|
10821
|
-
onClick: ()=>{
|
|
10822
|
-
toggleFullscreen();
|
|
10823
|
-
},
|
|
10824
|
-
"aria-label": isFullscreen ? 'Exit Fullscreen' : 'Make Fullscreen',
|
|
10825
|
-
leftSection: /*#__PURE__*/ jsxRuntime.jsx(bs.BsArrowsFullscreen, {
|
|
10826
|
-
className: "text-accent-warm"
|
|
10827
|
-
}),
|
|
10828
|
-
children: isFullscreen ? 'Exit Fullscreen' : 'Make Fullscreen'
|
|
10829
|
-
})
|
|
10830
|
-
})
|
|
10831
|
-
]
|
|
10832
|
-
})
|
|
10833
|
-
})
|
|
10834
|
-
});
|
|
10835
|
-
};
|
|
10836
|
-
|
|
10837
10781
|
const isNoPayModelError = (error)=>{
|
|
10838
10782
|
return 'status' in error && error.status === 'PARSING_ERROR' && error.originalStatus === 404;
|
|
10839
10783
|
};
|
|
10840
10784
|
const NoPayModel = ()=>{
|
|
10841
|
-
return /*#__PURE__*/ jsxRuntime.
|
|
10785
|
+
return /*#__PURE__*/ jsxRuntime.jsx(core$1.Group, {
|
|
10842
10786
|
className: "p-2 border-1 border-l-0 border-r-0 border-base-lighter w-full h-16",
|
|
10843
10787
|
justify: "space-between",
|
|
10844
|
-
children:
|
|
10845
|
-
|
|
10846
|
-
|
|
10847
|
-
|
|
10848
|
-
|
|
10849
|
-
|
|
10850
|
-
|
|
10851
|
-
|
|
10852
|
-
}),
|
|
10853
|
-
/*#__PURE__*/ jsxRuntime.jsx(StatusAndControls, {})
|
|
10854
|
-
]
|
|
10788
|
+
children: /*#__PURE__*/ jsxRuntime.jsx(core$1.Text, {
|
|
10789
|
+
className: "pl-4",
|
|
10790
|
+
size: "md",
|
|
10791
|
+
classNames: {
|
|
10792
|
+
root: 'font-heading text-utility-warning'
|
|
10793
|
+
},
|
|
10794
|
+
children: "No pay model defined"
|
|
10795
|
+
})
|
|
10855
10796
|
});
|
|
10856
10797
|
};
|
|
10857
10798
|
const PaymentPanel = ()=>{
|
|
@@ -11179,6 +11120,72 @@ const WorkspaceLaunchProgress = ()=>{
|
|
|
11179
11120
|
});
|
|
11180
11121
|
};
|
|
11181
11122
|
|
|
11123
|
+
const StatusAndControls = ()=>{
|
|
11124
|
+
const { stopWorkspace, toggleFullscreen, isFullscreen } = useWorkspaceStatusContext();
|
|
11125
|
+
const openModal = ()=>modals.modals.openConfirmModal({
|
|
11126
|
+
title: 'Workspace',
|
|
11127
|
+
children: /*#__PURE__*/ jsxRuntime.jsx(core$1.Text, {
|
|
11128
|
+
size: "sm",
|
|
11129
|
+
children: "Please confirm workspace shutdown"
|
|
11130
|
+
}),
|
|
11131
|
+
labels: {
|
|
11132
|
+
confirm: 'Confirm',
|
|
11133
|
+
cancel: 'Cancel'
|
|
11134
|
+
},
|
|
11135
|
+
onConfirm: ()=>stopWorkspace()
|
|
11136
|
+
});
|
|
11137
|
+
const workspaceStatus = core.useCoreSelector(core.selectActiveWorkspaceStatus);
|
|
11138
|
+
const requestedStatus = core.useCoreSelector(core.selectRequestedWorkspaceStatus);
|
|
11139
|
+
return /*#__PURE__*/ jsxRuntime.jsx(core$1.Transition, {
|
|
11140
|
+
mounted: core.isWorkspaceRunningOrStopping(workspaceStatus),
|
|
11141
|
+
transition: "fade",
|
|
11142
|
+
duration: 1200,
|
|
11143
|
+
timingFunction: "ease",
|
|
11144
|
+
children: (styles)=>/*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
11145
|
+
style: styles,
|
|
11146
|
+
children: /*#__PURE__*/ jsxRuntime.jsxs(core$1.Group, {
|
|
11147
|
+
children: [
|
|
11148
|
+
/*#__PURE__*/ jsxRuntime.jsx(core$1.Tooltip, {
|
|
11149
|
+
label: "Stop Workspace",
|
|
11150
|
+
children: /*#__PURE__*/ jsxRuntime.jsx(core$1.Button, {
|
|
11151
|
+
loading: requestedStatus === core.RequestedWorkspaceStatus.Terminate,
|
|
11152
|
+
size: "md",
|
|
11153
|
+
color: "accent.5",
|
|
11154
|
+
variant: "default",
|
|
11155
|
+
onClick: ()=>{
|
|
11156
|
+
openModal();
|
|
11157
|
+
},
|
|
11158
|
+
"aria-label": "Stop Workspace",
|
|
11159
|
+
leftSection: /*#__PURE__*/ jsxRuntime.jsx(fa.FaRegStopCircle, {
|
|
11160
|
+
color: "utility.2",
|
|
11161
|
+
size: "1rem",
|
|
11162
|
+
className: "text-accent-warm"
|
|
11163
|
+
}),
|
|
11164
|
+
children: "Stop Workspace"
|
|
11165
|
+
})
|
|
11166
|
+
}),
|
|
11167
|
+
/*#__PURE__*/ jsxRuntime.jsx(core$1.Tooltip, {
|
|
11168
|
+
label: "Toggle fullscreen mode",
|
|
11169
|
+
children: /*#__PURE__*/ jsxRuntime.jsx(core$1.Button, {
|
|
11170
|
+
color: "utility.2",
|
|
11171
|
+
size: "md",
|
|
11172
|
+
variant: "default",
|
|
11173
|
+
onClick: ()=>{
|
|
11174
|
+
toggleFullscreen();
|
|
11175
|
+
},
|
|
11176
|
+
"aria-label": isFullscreen ? 'Exit Fullscreen' : 'Make Fullscreen',
|
|
11177
|
+
leftSection: /*#__PURE__*/ jsxRuntime.jsx(bs.BsArrowsFullscreen, {
|
|
11178
|
+
className: "text-accent-warm"
|
|
11179
|
+
}),
|
|
11180
|
+
children: isFullscreen ? 'Exit Fullscreen' : 'Make Fullscreen'
|
|
11181
|
+
})
|
|
11182
|
+
})
|
|
11183
|
+
]
|
|
11184
|
+
})
|
|
11185
|
+
})
|
|
11186
|
+
});
|
|
11187
|
+
};
|
|
11188
|
+
|
|
11182
11189
|
const FULLSCREEN_STYLE = 'fixed top-0 left-0 w-full h-full flex flex-col flex-grow content-center items-center bg-base-lightest';
|
|
11183
11190
|
const WorkspaceNotebookPanelWithControls = ()=>{
|
|
11184
11191
|
const { isFullscreen } = useWorkspaceStatusContext();
|
|
@@ -11187,7 +11194,13 @@ const WorkspaceNotebookPanelWithControls = ()=>{
|
|
|
11187
11194
|
className: isFullscreen ? FULLSCREEN_STYLE : 'flex flex-col grow w-full h-full relative',
|
|
11188
11195
|
children: [
|
|
11189
11196
|
/*#__PURE__*/ jsxRuntime.jsx(ExternalLoginsStatus, {}),
|
|
11190
|
-
|
|
11197
|
+
/*#__PURE__*/ jsxRuntime.jsxs("div", {
|
|
11198
|
+
className: `flex w-full p-2 ${requirePayModel ? 'justify-between' : 'justify-end'}`,
|
|
11199
|
+
children: [
|
|
11200
|
+
requirePayModel && /*#__PURE__*/ jsxRuntime.jsx(PaymentPanel, {}),
|
|
11201
|
+
/*#__PURE__*/ jsxRuntime.jsx(StatusAndControls, {})
|
|
11202
|
+
]
|
|
11203
|
+
}),
|
|
11191
11204
|
/*#__PURE__*/ jsxRuntime.jsx(WorkspaceLaunchProgress, {}),
|
|
11192
11205
|
/*#__PURE__*/ jsxRuntime.jsx(WorkspacePanel, {}),
|
|
11193
11206
|
/*#__PURE__*/ jsxRuntime.jsx(WorkspaceNotebook, {})
|
|
@@ -14309,28 +14322,24 @@ const createMantineTheme = (fonts, colors)=>{
|
|
|
14309
14322
|
* Gen3Provider wraps around the entire app and provides general configurations
|
|
14310
14323
|
* for the whole website like color scheme, icons, fonts, and sessionConfigs like
|
|
14311
14324
|
* inactivity limits for session timeouts.
|
|
14312
|
-
*/ const Gen3Provider = ({
|
|
14325
|
+
*/ const Gen3Provider = ({ icons, sessionConfig, modalsConfig, children })=>{
|
|
14313
14326
|
React.useEffect(()=>{
|
|
14314
14327
|
icons.forEach((i)=>react.addCollection(i));
|
|
14315
14328
|
}, [
|
|
14316
14329
|
icons
|
|
14317
14330
|
]);
|
|
14318
|
-
const theme = createMantineTheme(fonts, colors);
|
|
14319
14331
|
return /*#__PURE__*/ jsxRuntime.jsx(core.CoreProvider, {
|
|
14320
|
-
children: /*#__PURE__*/ jsxRuntime.
|
|
14321
|
-
|
|
14322
|
-
|
|
14323
|
-
|
|
14324
|
-
|
|
14325
|
-
/*#__PURE__*/ jsxRuntime.jsx(
|
|
14326
|
-
|
|
14327
|
-
children:
|
|
14328
|
-
config: modalsConfig,
|
|
14329
|
-
children: children
|
|
14330
|
-
})
|
|
14332
|
+
children: /*#__PURE__*/ jsxRuntime.jsxs(modals.ModalsProvider, {
|
|
14333
|
+
children: [
|
|
14334
|
+
/*#__PURE__*/ jsxRuntime.jsx(notifications.Notifications, {}),
|
|
14335
|
+
/*#__PURE__*/ jsxRuntime.jsx(SessionProvider, {
|
|
14336
|
+
...sessionConfig,
|
|
14337
|
+
children: /*#__PURE__*/ jsxRuntime.jsx(Gen3ModalsProvider, {
|
|
14338
|
+
config: modalsConfig,
|
|
14339
|
+
children: children
|
|
14331
14340
|
})
|
|
14332
|
-
|
|
14333
|
-
|
|
14341
|
+
})
|
|
14342
|
+
]
|
|
14334
14343
|
})
|
|
14335
14344
|
});
|
|
14336
14345
|
};
|
|
@@ -16936,7 +16945,6 @@ const ALLOWED_IMAGE_TYPES = [
|
|
|
16936
16945
|
'image/png',
|
|
16937
16946
|
'image/svg+xml'
|
|
16938
16947
|
];
|
|
16939
|
-
const MAX_HISTORY = 50;
|
|
16940
16948
|
const AnalysisCardEditor = ()=>{
|
|
16941
16949
|
// Enhanced state management with history
|
|
16942
16950
|
const [history, setHistory] = React.useState({
|
|
@@ -16967,7 +16975,7 @@ const AnalysisCardEditor = ()=>{
|
|
|
16967
16975
|
past: [
|
|
16968
16976
|
...prev.past,
|
|
16969
16977
|
prev.present
|
|
16970
|
-
].slice(-
|
|
16978
|
+
].slice(-50),
|
|
16971
16979
|
present: newPresent,
|
|
16972
16980
|
future: []
|
|
16973
16981
|
}));
|
|
@@ -19567,7 +19575,7 @@ const CrosswalkTable = ({ mapping, data, isFetching, isError, tableMessage, show
|
|
|
19567
19575
|
});
|
|
19568
19576
|
};
|
|
19569
19577
|
|
|
19570
|
-
const MIN_ROWS =
|
|
19578
|
+
const MIN_ROWS = 22;
|
|
19571
19579
|
/**
|
|
19572
19580
|
*
|
|
19573
19581
|
*/ const buildCSVData = (data, mapping, includeSourceId)=>{
|
|
@@ -19591,7 +19599,7 @@ const downloadData = (data)=>{
|
|
|
19591
19599
|
link.click();
|
|
19592
19600
|
document.body.removeChild(link);
|
|
19593
19601
|
};
|
|
19594
|
-
const CrosswalkPanel = ({ mapping, showSubmittedIdInTable })=>{
|
|
19602
|
+
const CrosswalkPanel = ({ mapping, showSubmittedIdInTable, idEntryPlaceholderText })=>{
|
|
19595
19603
|
const [query, setQuery] = React.useState('');
|
|
19596
19604
|
const [sourceIds, setSourceIds] = React.useState('');
|
|
19597
19605
|
const clipboard = hooks.useClipboard({
|
|
@@ -19648,29 +19656,35 @@ const CrosswalkPanel = ({ mapping, showSubmittedIdInTable })=>{
|
|
|
19648
19656
|
/*#__PURE__*/ jsxRuntime.jsxs(core$1.Stack, {
|
|
19649
19657
|
align: "stretch",
|
|
19650
19658
|
justify: "flex-start",
|
|
19651
|
-
className: "p-2 w-1/4",
|
|
19659
|
+
className: "p-2 w-1/4 h-full",
|
|
19652
19660
|
children: [
|
|
19653
19661
|
/*#__PURE__*/ jsxRuntime.jsxs(core$1.Group, {
|
|
19654
19662
|
wrap: "nowrap",
|
|
19655
19663
|
children: [
|
|
19656
|
-
/*#__PURE__*/ jsxRuntime.jsx(core$1.
|
|
19657
|
-
|
|
19658
|
-
|
|
19659
|
-
|
|
19660
|
-
|
|
19661
|
-
|
|
19664
|
+
/*#__PURE__*/ jsxRuntime.jsx(core$1.Tooltip, {
|
|
19665
|
+
label: "Submit IDs to crosswalk service",
|
|
19666
|
+
children: /*#__PURE__*/ jsxRuntime.jsx(core$1.Button, {
|
|
19667
|
+
size: "md",
|
|
19668
|
+
color: "secondary.4",
|
|
19669
|
+
disabled: sourceIds.length == 0,
|
|
19670
|
+
onClick: ()=>onSubmit(),
|
|
19671
|
+
children: "Submit"
|
|
19672
|
+
})
|
|
19662
19673
|
}),
|
|
19663
|
-
/*#__PURE__*/ jsxRuntime.jsx(core$1.
|
|
19664
|
-
|
|
19665
|
-
|
|
19666
|
-
|
|
19667
|
-
|
|
19668
|
-
|
|
19674
|
+
/*#__PURE__*/ jsxRuntime.jsx(core$1.Tooltip, {
|
|
19675
|
+
label: "Clear all Ids",
|
|
19676
|
+
children: /*#__PURE__*/ jsxRuntime.jsx(core$1.Button, {
|
|
19677
|
+
size: "md",
|
|
19678
|
+
color: "secondary.4",
|
|
19679
|
+
disabled: sourceIds.length == 0,
|
|
19680
|
+
onClick: ()=>clear(),
|
|
19681
|
+
children: "Clear"
|
|
19682
|
+
})
|
|
19669
19683
|
})
|
|
19670
19684
|
]
|
|
19671
19685
|
}),
|
|
19672
19686
|
/*#__PURE__*/ jsxRuntime.jsx(core$1.Textarea, {
|
|
19673
|
-
placeholder:
|
|
19687
|
+
placeholder: idEntryPlaceholderText,
|
|
19674
19688
|
radius: "md",
|
|
19675
19689
|
size: "md",
|
|
19676
19690
|
required: true,
|
|
@@ -19697,24 +19711,30 @@ const CrosswalkPanel = ({ mapping, showSubmittedIdInTable })=>{
|
|
|
19697
19711
|
/*#__PURE__*/ jsxRuntime.jsxs(core$1.Group, {
|
|
19698
19712
|
justify: "flex-end",
|
|
19699
19713
|
children: [
|
|
19700
|
-
/*#__PURE__*/ jsxRuntime.jsx(core$1.
|
|
19701
|
-
|
|
19702
|
-
|
|
19703
|
-
|
|
19704
|
-
|
|
19705
|
-
|
|
19706
|
-
|
|
19707
|
-
|
|
19708
|
-
|
|
19714
|
+
/*#__PURE__*/ jsxRuntime.jsx(core$1.Tooltip, {
|
|
19715
|
+
label: "Copy mapping to clipboard",
|
|
19716
|
+
children: /*#__PURE__*/ jsxRuntime.jsx(core$1.Button, {
|
|
19717
|
+
variant: "outline",
|
|
19718
|
+
size: "md",
|
|
19719
|
+
color: clipboard.copied ? 'accent.4' : 'accent-warm.4',
|
|
19720
|
+
onClick: ()=>{
|
|
19721
|
+
if (data) clipboard.copy(buildCSVData(data, mapping, showSubmittedIdInTable));
|
|
19722
|
+
},
|
|
19723
|
+
disabled: !data || data.length == 0,
|
|
19724
|
+
children: "Copy"
|
|
19725
|
+
})
|
|
19709
19726
|
}),
|
|
19710
|
-
/*#__PURE__*/ jsxRuntime.jsx(core$1.
|
|
19711
|
-
|
|
19712
|
-
|
|
19713
|
-
|
|
19714
|
-
|
|
19715
|
-
|
|
19716
|
-
|
|
19717
|
-
|
|
19727
|
+
/*#__PURE__*/ jsxRuntime.jsx(core$1.Tooltip, {
|
|
19728
|
+
label: "Download mapping",
|
|
19729
|
+
children: /*#__PURE__*/ jsxRuntime.jsx(core$1.Button, {
|
|
19730
|
+
variant: "outline",
|
|
19731
|
+
size: "md",
|
|
19732
|
+
onClick: ()=>{
|
|
19733
|
+
if (data) downloadData(buildCSVData(data, mapping, showSubmittedIdInTable));
|
|
19734
|
+
},
|
|
19735
|
+
disabled: !data || data.length == 0,
|
|
19736
|
+
children: "Download"
|
|
19737
|
+
})
|
|
19718
19738
|
})
|
|
19719
19739
|
]
|
|
19720
19740
|
}),
|
|
@@ -19749,26 +19769,38 @@ const CrosswalkPage = ({ headerProps, footerProps, config })=>{
|
|
|
19749
19769
|
};
|
|
19750
19770
|
|
|
19751
19771
|
const CrosswalkPageGetServerSideProps = async ()=>{
|
|
19752
|
-
|
|
19753
|
-
|
|
19754
|
-
|
|
19755
|
-
|
|
19756
|
-
|
|
19757
|
-
|
|
19758
|
-
|
|
19759
|
-
|
|
19760
|
-
|
|
19761
|
-
|
|
19762
|
-
|
|
19763
|
-
|
|
19764
|
-
|
|
19765
|
-
|
|
19766
|
-
|
|
19767
|
-
|
|
19768
|
-
|
|
19769
|
-
|
|
19770
|
-
|
|
19771
|
-
|
|
19772
|
+
try {
|
|
19773
|
+
const initialConfig = await ContentSource.get(`config/${core.GEN3_COMMONS_NAME}/crosswalk.json`);
|
|
19774
|
+
const regex = /->/g;
|
|
19775
|
+
const processedConfig = {
|
|
19776
|
+
showSubmittedIdInTable: initialConfig.showSubmittedIdInTable,
|
|
19777
|
+
idEntryPlaceholderText: initialConfig?.showSubmittedIdInTable || 'Enter IDs, one per line.\nExample:\nD334343\nC343433',
|
|
19778
|
+
mapping: {
|
|
19779
|
+
source: initialConfig.mapping.source,
|
|
19780
|
+
external: initialConfig.mapping.external.map((entry)=>({
|
|
19781
|
+
...entry,
|
|
19782
|
+
dataPath: entry.dataPath.split(regex).map((x)=>JSON.stringify([
|
|
19783
|
+
x
|
|
19784
|
+
])).join('.')
|
|
19785
|
+
}))
|
|
19786
|
+
}
|
|
19787
|
+
};
|
|
19788
|
+
return {
|
|
19789
|
+
props: {
|
|
19790
|
+
...await getNavPageLayoutPropsFromConfig(),
|
|
19791
|
+
config: processedConfig
|
|
19792
|
+
}
|
|
19793
|
+
};
|
|
19794
|
+
} catch (error) {
|
|
19795
|
+
const errorMessage = error instanceof Error ? error.message : 'Unknown error in crosswalk config';
|
|
19796
|
+
console.error(errorMessage);
|
|
19797
|
+
return {
|
|
19798
|
+
props: {
|
|
19799
|
+
...await getNavPageLayoutPropsFromConfig(),
|
|
19800
|
+
config: undefined
|
|
19801
|
+
}
|
|
19802
|
+
};
|
|
19803
|
+
}
|
|
19772
19804
|
};
|
|
19773
19805
|
|
|
19774
19806
|
const TailwindConfig = (themer)=>{
|
|
@@ -20148,6 +20180,7 @@ exports.convertMinutesToMilliseconds = convertMinutesToMilliseconds;
|
|
|
20148
20180
|
exports.convertSecondsToMilliseconds = convertSecondsToMilliseconds;
|
|
20149
20181
|
exports.create10ColorAccessibleContrast = create10ColorAccessibleContrast;
|
|
20150
20182
|
exports.create10ColorPallet = create10ColorPallet;
|
|
20183
|
+
exports.createMantineTheme = createMantineTheme;
|
|
20151
20184
|
exports.credentialsLogin = credentialsLogin;
|
|
20152
20185
|
exports.credentialsLogout = credentialsLogout;
|
|
20153
20186
|
exports.extractObjectKey = extractObjectKey;
|