@gen3/frontend 0.10.57 → 0.10.59
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 +34 -15
- 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.d.ts.map +1 -1
- package/dist/dts/features/DataLibrary/modals/SelectedItemsModal.js +4 -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 +13 -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/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 +34 -15
- 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,
|
|
@@ -17614,10 +17623,10 @@ const HTTPUserFriendlyErrorMessages = {
|
|
|
17614
17623
|
const SelectedItemsTableHeader = ({ numberOfItems, numberOfWarnings, size = 'sm' })=>{
|
|
17615
17624
|
const iconSize = IconSize[size] || IconSize['sm'];
|
|
17616
17625
|
return /*#__PURE__*/ jsxRuntime.jsxs("div", {
|
|
17617
|
-
className: "flex items-center bg-primary
|
|
17626
|
+
className: "flex items-center bg-primary px-4 py-2 mt-2 min-h-10 text-heading",
|
|
17618
17627
|
children: [
|
|
17619
17628
|
numberOfItems > 0 && /*#__PURE__*/ jsxRuntime.jsxs("div", {
|
|
17620
|
-
className: "flex items-center flex-nowrap overflow-ellipsis text-primary-contrast
|
|
17629
|
+
className: "flex items-center flex-nowrap overflow-ellipsis text-primary-contrast",
|
|
17621
17630
|
children: [
|
|
17622
17631
|
/*#__PURE__*/ jsxRuntime.jsx(core$1.Text, {
|
|
17623
17632
|
fw: 600,
|
|
@@ -17628,14 +17637,14 @@ const SelectedItemsTableHeader = ({ numberOfItems, numberOfWarnings, size = 'sm'
|
|
|
17628
17637
|
/*#__PURE__*/ jsxRuntime.jsx(core$1.Text, {
|
|
17629
17638
|
fw: 400,
|
|
17630
17639
|
size: size,
|
|
17631
|
-
className: "mr-1 text-primary-contrast
|
|
17640
|
+
className: "mr-1 text-primary-contrast",
|
|
17632
17641
|
children: "selected"
|
|
17633
17642
|
})
|
|
17634
17643
|
]
|
|
17635
17644
|
}),
|
|
17636
17645
|
numberOfItems > 0 && numberOfWarnings > 0 && /*#__PURE__*/ jsxRuntime.jsx(react.Icon, {
|
|
17637
17646
|
icon: "gen3:dot",
|
|
17638
|
-
className: "text-primary-contrast
|
|
17647
|
+
className: "text-primary-contrast",
|
|
17639
17648
|
width: iconSize,
|
|
17640
17649
|
height: iconSize
|
|
17641
17650
|
}),
|
|
@@ -17710,18 +17719,21 @@ const SelectedItemsTable = ({ validatedItems, rowSelection, setRowSelection, siz
|
|
|
17710
17719
|
},
|
|
17711
17720
|
{
|
|
17712
17721
|
accessorKey: 'id',
|
|
17713
|
-
header: 'Id'
|
|
17722
|
+
header: 'Id',
|
|
17723
|
+
size: 150,
|
|
17724
|
+
maxSize: 250
|
|
17714
17725
|
},
|
|
17715
17726
|
{
|
|
17716
17727
|
accessorKey: 'description',
|
|
17717
17728
|
header: 'Description',
|
|
17718
|
-
size:
|
|
17719
|
-
maxSize:
|
|
17729
|
+
size: 100,
|
|
17730
|
+
maxSize: 150,
|
|
17720
17731
|
Cell: ({ cell })=>{
|
|
17721
17732
|
return /*#__PURE__*/ jsxRuntime.jsx(core$1.Text, {
|
|
17722
17733
|
fw: 400,
|
|
17723
17734
|
size: size,
|
|
17724
17735
|
lineClamp: 2,
|
|
17736
|
+
truncate: "end",
|
|
17725
17737
|
children: cell.getValue() ?? 'N/A'
|
|
17726
17738
|
});
|
|
17727
17739
|
}
|
|
@@ -17940,18 +17952,22 @@ const sendExistingPFBToURL = async (validatedSelections, params, done = ()=>null
|
|
|
17940
17952
|
});
|
|
17941
17953
|
return;
|
|
17942
17954
|
}
|
|
17943
|
-
const { guid } = validatedSelections[0];
|
|
17955
|
+
const { guid, id } = validatedSelections[0];
|
|
17956
|
+
console.log('sendExistingPFBToURL', guid, id, targetURLTemplate);
|
|
17944
17957
|
// get the pre-signed URL for the selected PFB
|
|
17945
17958
|
try {
|
|
17959
|
+
console.log('fetchFencePresignedURL');
|
|
17946
17960
|
const presignedURL = await core.fetchFencePresignedURL({
|
|
17947
|
-
guid: guid,
|
|
17961
|
+
guid: guid ?? id,
|
|
17948
17962
|
onAbort: onAbort,
|
|
17949
17963
|
signal: signal
|
|
17950
17964
|
});
|
|
17965
|
+
console.log('received presignedURL', presignedURL);
|
|
17951
17966
|
// the PFB export target URL is a template URL that should have a {{PRESIGNED_URL}} template
|
|
17952
17967
|
// variable in it.
|
|
17953
17968
|
const signedURL = encodeURIComponent(presignedURL);
|
|
17954
17969
|
const targetURL = targetURLTemplate.replace(PRESIGNED_URL_TEMPLATE_VARIABLE, signedURL);
|
|
17970
|
+
console.log('targetURL', targetURL);
|
|
17955
17971
|
return new Promise(()=>{
|
|
17956
17972
|
if (window) window.open(targetURL, '_blank', 'noopener,noreferrer');
|
|
17957
17973
|
if (done) done(targetURL);
|
|
@@ -17992,10 +18008,11 @@ registerDefaultDataLibraryActions();
|
|
|
17992
18008
|
|
|
17993
18009
|
const ModalHeader = ()=>{
|
|
17994
18010
|
return /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
17995
|
-
className: "flex justify-between items-center",
|
|
18011
|
+
className: "flex justify-between items-center mx-1",
|
|
17996
18012
|
children: /*#__PURE__*/ jsxRuntime.jsx(core$1.Text, {
|
|
17997
18013
|
fw: 600,
|
|
17998
18014
|
className: "text-heading",
|
|
18015
|
+
c: "secondary-contrast.5",
|
|
17999
18016
|
children: "Retrieve Data"
|
|
18000
18017
|
})
|
|
18001
18018
|
});
|
|
@@ -18126,7 +18143,7 @@ const SelectedItemsModal = (props)=>{
|
|
|
18126
18143
|
withinPortal: false,
|
|
18127
18144
|
title: /*#__PURE__*/ jsxRuntime.jsx(ModalHeader, {}),
|
|
18128
18145
|
classNames: {
|
|
18129
|
-
header: 'm-0 p-2 min-h-10 bg-
|
|
18146
|
+
header: 'm-0 p-2 min-h-10 bg-secondary',
|
|
18130
18147
|
content: 'scroll-smooth'
|
|
18131
18148
|
},
|
|
18132
18149
|
overlayProps: {
|
|
@@ -18169,6 +18186,8 @@ const SelectedItemsModal = (props)=>{
|
|
|
18169
18186
|
disabled: actionButtonDisabled,
|
|
18170
18187
|
onClick: async ()=>{
|
|
18171
18188
|
setIsRunning(true);
|
|
18189
|
+
console.log('running action:', actionFunction.action.name);
|
|
18190
|
+
console.log('with params:', validatedLibrarySelections);
|
|
18172
18191
|
await actionFunction.action(validatedLibrarySelections, actionFunction.parameters, onDone, onError);
|
|
18173
18192
|
},
|
|
18174
18193
|
children: actionConfig ? actionConfig.buttonLabel : 'Submit'
|