@gen3/frontend 0.10.56 → 0.10.58
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 +28 -16
- package/dist/cjs/index.js.map +1 -1
- package/dist/dts/components/Login/CredentialsLogin.d.ts.map +1 -1
- package/dist/dts/components/Login/CredentialsLogin.js +6 -2
- package/dist/dts/components/Login/CredentialsLogin.js.map +1 -1
- package/dist/dts/features/DataLibrary/modals/SelectedItemsModal.js +2 -2
- package/dist/dts/features/DataLibrary/modals/SelectedItemsModal.js.map +1 -1
- package/dist/dts/features/DataLibrary/selection/exportActions.d.ts.map +1 -1
- package/dist/dts/features/DataLibrary/selection/exportActions.js +9 -9
- package/dist/dts/features/DataLibrary/selection/exportActions.js.map +1 -1
- package/dist/dts/features/DataLibrary/tables/SelectedItemsTable.d.ts.map +1 -1
- package/dist/dts/features/DataLibrary/tables/SelectedItemsTable.js +6 -4
- package/dist/dts/features/DataLibrary/tables/SelectedItemsTable.js.map +1 -1
- package/dist/dts/features/Navigation/Header.d.ts.map +1 -1
- package/dist/dts/features/Navigation/Header.js +0 -1
- package/dist/dts/features/Navigation/Header.js.map +1 -1
- package/dist/dts/features/Navigation/HoverLink.d.ts +3 -2
- package/dist/dts/features/Navigation/HoverLink.d.ts.map +1 -1
- package/dist/dts/features/Navigation/HoverLink.js +3 -1
- package/dist/dts/features/Navigation/HoverLink.js.map +1 -1
- package/dist/dts/features/Navigation/NavigationLogo.d.ts +1 -1
- package/dist/dts/features/Navigation/NavigationLogo.d.ts.map +1 -1
- package/dist/dts/features/Navigation/NavigationLogo.js +2 -2
- package/dist/dts/features/Navigation/NavigationLogo.js.map +1 -1
- package/dist/dts/features/Navigation/types.d.ts +1 -1
- package/dist/dts/features/Navigation/types.d.ts.map +1 -1
- package/dist/esm/index.js +28 -16
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +4 -3
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -815,6 +815,7 @@ const CredentialsLogin = ({ handleLogin })=>{
|
|
|
815
815
|
const [credentials, setCredentials] = React.useState(null);
|
|
816
816
|
const [file, setFile] = React.useState(null);
|
|
817
817
|
const [isCredentialsPending, setIsCredentialsPending] = React.useState(false);
|
|
818
|
+
const { basePath } = router.useRouter();
|
|
818
819
|
React.useEffect(()=>{
|
|
819
820
|
if (file) {
|
|
820
821
|
const reader = new FileReader();
|
|
@@ -832,7 +833,7 @@ const CredentialsLogin = ({ handleLogin })=>{
|
|
|
832
833
|
try {
|
|
833
834
|
// setIsCredentialsPending(true);
|
|
834
835
|
const json = await JSON.parse(credentials);
|
|
835
|
-
await fetch('/api/auth/credentialsLogin', {
|
|
836
|
+
await fetch(basePath ? `/${basePath}/api/auth/credentialsLogin` : '/api/auth/credentialsLogin', {
|
|
836
837
|
method: 'POST',
|
|
837
838
|
headers: {
|
|
838
839
|
'Content-Type': 'application/json'
|
|
@@ -894,7 +895,7 @@ const CredentialsLogin = ({ handleLogin })=>{
|
|
|
894
895
|
})
|
|
895
896
|
}),
|
|
896
897
|
/*#__PURE__*/ jsxRuntime.jsx(core$1.Button, {
|
|
897
|
-
color: "
|
|
898
|
+
color: "primary.5",
|
|
898
899
|
loading: isCredentialsPending,
|
|
899
900
|
onClick: async ()=>{
|
|
900
901
|
await handleCredentialsLogin(credentials ?? '');
|
|
@@ -2748,7 +2749,14 @@ const TopBar = ({ items, loginButtonVisibility = LoginButtonVisibility.Hidden, c
|
|
|
2748
2749
|
* @param {string} props.href - The URL of the link.
|
|
2749
2750
|
* @param {ReactNode} props.children - The content of the link.
|
|
2750
2751
|
* @returns {ReactElement} - The rendered HoverLink component.
|
|
2751
|
-
*/ const HoverLink = ({ className, href, children })=>{
|
|
2752
|
+
*/ const HoverLink = ({ className, href, noBasePath, children })=>{
|
|
2753
|
+
if (noBasePath) return /*#__PURE__*/ jsxRuntime.jsx("span", {
|
|
2754
|
+
className: className,
|
|
2755
|
+
children: /*#__PURE__*/ jsxRuntime.jsx("a", {
|
|
2756
|
+
href: href,
|
|
2757
|
+
children: children
|
|
2758
|
+
})
|
|
2759
|
+
});
|
|
2752
2760
|
return /*#__PURE__*/ jsxRuntime.jsx("span", {
|
|
2753
2761
|
className: className,
|
|
2754
2762
|
children: /*#__PURE__*/ jsxRuntime.jsx(Link, {
|
|
@@ -2759,7 +2767,7 @@ const TopBar = ({ items, loginButtonVisibility = LoginButtonVisibility.Hidden, c
|
|
|
2759
2767
|
});
|
|
2760
2768
|
};
|
|
2761
2769
|
|
|
2762
|
-
const NavigationLogo = ({ src, title, description, width, height, divider = false,
|
|
2770
|
+
const NavigationLogo = ({ src, title, description, width, height, divider = false, noBasePath = undefined, classNames = {} })=>{
|
|
2763
2771
|
const classNamesDefaults = {
|
|
2764
2772
|
root: 'relative flex py-0 justify-start items-center align-middle font-heading font-bold tracking-wide text-xl ml-[5px] mr-[20px]',
|
|
2765
2773
|
link: 'relative object-contain',
|
|
@@ -2776,6 +2784,7 @@ const NavigationLogo = ({ src, title, description, width, height, divider = fals
|
|
|
2776
2784
|
/*#__PURE__*/ jsxRuntime.jsx(HoverLink, {
|
|
2777
2785
|
className: extractClassName('link', mergedClassnames),
|
|
2778
2786
|
href: "/",
|
|
2787
|
+
noBasePath: noBasePath,
|
|
2779
2788
|
children: /*#__PURE__*/ jsxRuntime.jsx(Image, {
|
|
2780
2789
|
className: extractClassName('logo', mergedClassnames),
|
|
2781
2790
|
width: width ?? undefined,
|
|
@@ -3083,7 +3092,6 @@ const HorizontalNavigationBar = ({ actions, items, logo = undefined, loginIcon =
|
|
|
3083
3092
|
* @param {string} props.type - The type of header to render. Default value is 'original'.
|
|
3084
3093
|
* @returns {JSX.Element} - The rendered Header component.
|
|
3085
3094
|
*/ const Header = ({ top, navigation, banners, type = 'original' })=>{
|
|
3086
|
-
console.log('top', top);
|
|
3087
3095
|
return type === 'horizontal' ? /*#__PURE__*/ jsxRuntime.jsxs("div", {
|
|
3088
3096
|
className: "w-full",
|
|
3089
3097
|
children: [
|
|
@@ -17615,10 +17623,10 @@ const HTTPUserFriendlyErrorMessages = {
|
|
|
17615
17623
|
const SelectedItemsTableHeader = ({ numberOfItems, numberOfWarnings, size = 'sm' })=>{
|
|
17616
17624
|
const iconSize = IconSize[size] || IconSize['sm'];
|
|
17617
17625
|
return /*#__PURE__*/ jsxRuntime.jsxs("div", {
|
|
17618
|
-
className: "flex items-center bg-primary
|
|
17626
|
+
className: "flex items-center bg-primary px-4 py-2 mt-2 min-h-10 text-heading",
|
|
17619
17627
|
children: [
|
|
17620
17628
|
numberOfItems > 0 && /*#__PURE__*/ jsxRuntime.jsxs("div", {
|
|
17621
|
-
className: "flex items-center flex-nowrap overflow-ellipsis text-primary-contrast
|
|
17629
|
+
className: "flex items-center flex-nowrap overflow-ellipsis text-primary-contrast",
|
|
17622
17630
|
children: [
|
|
17623
17631
|
/*#__PURE__*/ jsxRuntime.jsx(core$1.Text, {
|
|
17624
17632
|
fw: 600,
|
|
@@ -17629,14 +17637,14 @@ const SelectedItemsTableHeader = ({ numberOfItems, numberOfWarnings, size = 'sm'
|
|
|
17629
17637
|
/*#__PURE__*/ jsxRuntime.jsx(core$1.Text, {
|
|
17630
17638
|
fw: 400,
|
|
17631
17639
|
size: size,
|
|
17632
|
-
className: "mr-1 text-primary-contrast
|
|
17640
|
+
className: "mr-1 text-primary-contrast",
|
|
17633
17641
|
children: "selected"
|
|
17634
17642
|
})
|
|
17635
17643
|
]
|
|
17636
17644
|
}),
|
|
17637
17645
|
numberOfItems > 0 && numberOfWarnings > 0 && /*#__PURE__*/ jsxRuntime.jsx(react.Icon, {
|
|
17638
17646
|
icon: "gen3:dot",
|
|
17639
|
-
className: "text-primary-contrast
|
|
17647
|
+
className: "text-primary-contrast",
|
|
17640
17648
|
width: iconSize,
|
|
17641
17649
|
height: iconSize
|
|
17642
17650
|
}),
|
|
@@ -17711,18 +17719,21 @@ const SelectedItemsTable = ({ validatedItems, rowSelection, setRowSelection, siz
|
|
|
17711
17719
|
},
|
|
17712
17720
|
{
|
|
17713
17721
|
accessorKey: 'id',
|
|
17714
|
-
header: 'Id'
|
|
17722
|
+
header: 'Id',
|
|
17723
|
+
size: 150,
|
|
17724
|
+
maxSize: 250
|
|
17715
17725
|
},
|
|
17716
17726
|
{
|
|
17717
17727
|
accessorKey: 'description',
|
|
17718
17728
|
header: 'Description',
|
|
17719
|
-
size:
|
|
17720
|
-
maxSize:
|
|
17729
|
+
size: 100,
|
|
17730
|
+
maxSize: 150,
|
|
17721
17731
|
Cell: ({ cell })=>{
|
|
17722
17732
|
return /*#__PURE__*/ jsxRuntime.jsx(core$1.Text, {
|
|
17723
17733
|
fw: 400,
|
|
17724
17734
|
size: size,
|
|
17725
17735
|
lineClamp: 2,
|
|
17736
|
+
truncate: "end",
|
|
17726
17737
|
children: cell.getValue() ?? 'N/A'
|
|
17727
17738
|
});
|
|
17728
17739
|
}
|
|
@@ -17941,11 +17952,11 @@ const sendExistingPFBToURL = async (validatedSelections, params, done = ()=>null
|
|
|
17941
17952
|
});
|
|
17942
17953
|
return;
|
|
17943
17954
|
}
|
|
17944
|
-
const { guid } = validatedSelections[0];
|
|
17955
|
+
const { guid, id } = validatedSelections[0];
|
|
17945
17956
|
// get the pre-signed URL for the selected PFB
|
|
17946
17957
|
try {
|
|
17947
17958
|
const presignedURL = await core.fetchFencePresignedURL({
|
|
17948
|
-
guid: guid,
|
|
17959
|
+
guid: guid ?? id,
|
|
17949
17960
|
onAbort: onAbort,
|
|
17950
17961
|
signal: signal
|
|
17951
17962
|
});
|
|
@@ -17993,10 +18004,11 @@ registerDefaultDataLibraryActions();
|
|
|
17993
18004
|
|
|
17994
18005
|
const ModalHeader = ()=>{
|
|
17995
18006
|
return /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
17996
|
-
className: "flex justify-between items-center",
|
|
18007
|
+
className: "flex justify-between items-center mx-1",
|
|
17997
18008
|
children: /*#__PURE__*/ jsxRuntime.jsx(core$1.Text, {
|
|
17998
18009
|
fw: 600,
|
|
17999
18010
|
className: "text-heading",
|
|
18011
|
+
c: "secondary-contrast.5",
|
|
18000
18012
|
children: "Retrieve Data"
|
|
18001
18013
|
})
|
|
18002
18014
|
});
|
|
@@ -18127,7 +18139,7 @@ const SelectedItemsModal = (props)=>{
|
|
|
18127
18139
|
withinPortal: false,
|
|
18128
18140
|
title: /*#__PURE__*/ jsxRuntime.jsx(ModalHeader, {}),
|
|
18129
18141
|
classNames: {
|
|
18130
|
-
header: 'm-0 p-2 min-h-10 bg-
|
|
18142
|
+
header: 'm-0 p-2 min-h-10 bg-secondary',
|
|
18131
18143
|
content: 'scroll-smooth'
|
|
18132
18144
|
},
|
|
18133
18145
|
overlayProps: {
|