@gen3/frontend 0.10.55 → 0.10.56
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 +119 -70
- package/dist/cjs/index.js.map +1 -1
- package/dist/dts/components/Content/TextContent.d.ts +6 -2
- package/dist/dts/components/Content/TextContent.d.ts.map +1 -1
- package/dist/dts/components/Content/TextContent.js +25 -4
- package/dist/dts/components/Content/TextContent.js.map +1 -1
- package/dist/dts/components/Login/LoginAccountButton.d.ts +4 -1
- package/dist/dts/components/Login/LoginAccountButton.d.ts.map +1 -1
- package/dist/dts/components/Login/LoginAccountButton.js +5 -2
- package/dist/dts/components/Login/LoginAccountButton.js.map +1 -1
- package/dist/dts/components/Login/LoginButton.d.ts.map +1 -1
- package/dist/dts/components/Login/LoginButton.js +4 -2
- package/dist/dts/components/Login/LoginButton.js.map +1 -1
- package/dist/dts/components/Login/LoginPanel.d.ts.map +1 -1
- package/dist/dts/components/Login/LoginPanel.js +1 -4
- package/dist/dts/components/Login/LoginPanel.js.map +1 -1
- package/dist/dts/features/Navigation/Footer/FooterColumn.d.ts.map +1 -1
- package/dist/dts/features/Navigation/Footer/FooterColumn.js +3 -2
- package/dist/dts/features/Navigation/Footer/FooterColumn.js.map +1 -1
- package/dist/dts/features/Navigation/Header.d.ts.map +1 -1
- package/dist/dts/features/Navigation/Header.js +1 -0
- package/dist/dts/features/Navigation/Header.js.map +1 -1
- package/dist/dts/features/Navigation/NavigationBar.d.ts.map +1 -1
- package/dist/dts/features/Navigation/NavigationBar.js +1 -1
- package/dist/dts/features/Navigation/NavigationBar.js.map +1 -1
- package/dist/dts/features/Navigation/NavigationBarButton.d.ts +2 -1
- package/dist/dts/features/Navigation/NavigationBarButton.d.ts.map +1 -1
- package/dist/dts/features/Navigation/NavigationBarButton.js +5 -4
- package/dist/dts/features/Navigation/NavigationBarButton.js.map +1 -1
- package/dist/dts/features/Navigation/NavigationLogo.js +1 -1
- package/dist/dts/features/Navigation/TopBar.d.ts.map +1 -1
- package/dist/dts/features/Navigation/TopBar.js +2 -1
- package/dist/dts/features/Navigation/TopBar.js.map +1 -1
- package/dist/dts/features/Navigation/types.d.ts +7 -6
- package/dist/dts/features/Navigation/types.d.ts.map +1 -1
- package/dist/dts/utils/mergeDefaultTailwindClassnames.d.ts +1 -0
- package/dist/dts/utils/mergeDefaultTailwindClassnames.d.ts.map +1 -1
- package/dist/dts/utils/mergeDefaultTailwindClassnames.js +1 -0
- package/dist/dts/utils/mergeDefaultTailwindClassnames.js.map +1 -1
- package/dist/esm/index.js +119 -70
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +12 -7
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/dist/dts/components/jobs/JobMonitor.d.ts +0 -2
- package/dist/dts/components/jobs/JobMonitor.d.ts.map +0 -1
- package/dist/dts/components/jobs/JobMonitor.js +0 -40
- package/dist/dts/components/jobs/JobMonitor.js.map +0 -1
- package/dist/dts/components/jobs/JobsList.d.ts +0 -6
- package/dist/dts/components/jobs/JobsList.d.ts.map +0 -1
- package/dist/dts/components/jobs/JobsList.js +0 -30
- package/dist/dts/components/jobs/JobsList.js.map +0 -1
- package/dist/dts/components/jobs/JobsModal.d.ts +0 -6
- package/dist/dts/components/jobs/JobsModal.d.ts.map +0 -1
- package/dist/dts/components/jobs/JobsModal.js +0 -10
- package/dist/dts/components/jobs/JobsModal.js.map +0 -1
- package/dist/dts/components/jobs/index.d.ts +0 -5
- package/dist/dts/components/jobs/index.d.ts.map +0 -1
- package/dist/dts/components/jobs/index.js +0 -5
- package/dist/dts/components/jobs/index.js.map +0 -1
- package/dist/dts/features/CohortBuilder/downloads/CohortDispatchActionButton.d.ts +0 -46
- package/dist/dts/features/CohortBuilder/downloads/CohortDispatchActionButton.d.ts.map +0 -1
- package/dist/dts/features/CohortBuilder/downloads/CohortDispatchActionButton.js +0 -44
- package/dist/dts/features/CohortBuilder/downloads/CohortDispatchActionButton.js.map +0 -1
- package/dist/dts/features/CohortBuilder/downloads/actions/TwoStepActionButton.d.ts +0 -42
- package/dist/dts/features/CohortBuilder/downloads/actions/TwoStepActionButton.d.ts.map +0 -1
- package/dist/dts/features/CohortBuilder/downloads/actions/TwoStepActionButton.js +0 -218
- package/dist/dts/features/CohortBuilder/downloads/actions/TwoStepActionButton.js.map +0 -1
- package/dist/dts/features/CohortBuilder/downloads/actions/sowerActions.d.ts +0 -2
- package/dist/dts/features/CohortBuilder/downloads/actions/sowerActions.d.ts.map +0 -1
- package/dist/dts/features/CohortBuilder/downloads/actions/sowerActions.js +0 -12
- package/dist/dts/features/CohortBuilder/downloads/actions/sowerActions.js.map +0 -1
- package/dist/dts/services/SowerJobsMonitor.d.ts +0 -30
- package/dist/dts/services/SowerJobsMonitor.d.ts.map +0 -1
- package/dist/dts/services/SowerJobsMonitor.js +0 -236
- package/dist/dts/services/SowerJobsMonitor.js.map +0 -1
package/dist/cjs/index.js
CHANGED
|
@@ -12,10 +12,10 @@ require('swr');
|
|
|
12
12
|
var cookiesNext = require('cookies-next');
|
|
13
13
|
var jose = require('jose');
|
|
14
14
|
var notifications = require('@mantine/notifications');
|
|
15
|
+
var tailwindMerge = require('tailwind-merge');
|
|
15
16
|
var iconsReact = require('@tabler/icons-react');
|
|
16
17
|
var Markdown = require('react-markdown');
|
|
17
18
|
var remarkGfm = require('remark-gfm');
|
|
18
|
-
var tailwindMerge = require('tailwind-merge');
|
|
19
19
|
var lodash = require('lodash');
|
|
20
20
|
var reactCookie = require('react-cookie');
|
|
21
21
|
var FileSaver = require('file-saver');
|
|
@@ -606,6 +606,36 @@ var LoginButtonVisibility;
|
|
|
606
606
|
LoginButtonVisibility["LogoutOnly"] = "logoutOnly";
|
|
607
607
|
})(LoginButtonVisibility || (LoginButtonVisibility = {}));
|
|
608
608
|
|
|
609
|
+
/**
|
|
610
|
+
* Merges default and user values for Tailwind classnames.
|
|
611
|
+
*
|
|
612
|
+
* @param {RecordType} defaultValues - The default values for the classnames.
|
|
613
|
+
* @param {RecordType} userValues - The user-defined values for the classnames.
|
|
614
|
+
* @param {StylingMergeMode} mode - Whether to merge or replace the default and user values. Default is merge.
|
|
615
|
+
* @returns {RecordType} - The merged default and user values for the classnames.
|
|
616
|
+
*/ const mergeDefaultTailwindClassnames = (defaultValues, { mode = 'merge', ...userValues })=>{
|
|
617
|
+
const defaultKeys = Object.keys(defaultValues);
|
|
618
|
+
const mergedValues = {
|
|
619
|
+
...defaultValues
|
|
620
|
+
};
|
|
621
|
+
if (mode === 'merge') {
|
|
622
|
+
defaultKeys.forEach((key)=>{
|
|
623
|
+
if (userValues[key]) {
|
|
624
|
+
mergedValues[key] = tailwindMerge.twMerge(defaultValues[key], userValues[key]);
|
|
625
|
+
}
|
|
626
|
+
});
|
|
627
|
+
}
|
|
628
|
+
if (mode === 'replace') {
|
|
629
|
+
defaultKeys.forEach((key)=>{
|
|
630
|
+
if (userValues[key]) {
|
|
631
|
+
mergedValues[key] = userValues[key];
|
|
632
|
+
}
|
|
633
|
+
});
|
|
634
|
+
}
|
|
635
|
+
return mergedValues;
|
|
636
|
+
};
|
|
637
|
+
const mergeTailwindClassnameWithDefault = (userValues, defaultValues)=>userValues ? tailwindMerge.twMerge(defaultValues, userValues) : defaultValues;
|
|
638
|
+
|
|
609
639
|
const handleSelected = async (isAuthenticated, router, referrer, endSession)=>{
|
|
610
640
|
if (!isAuthenticated) await router.push(`Login?redirect=${referrer}`);
|
|
611
641
|
else {
|
|
@@ -615,7 +645,7 @@ const handleSelected = async (isAuthenticated, router, referrer, endSession)=>{
|
|
|
615
645
|
const LoginButton = ({ icon = /*#__PURE__*/ jsxRuntime.jsx(md.MdLogin, {
|
|
616
646
|
className: "pl-1",
|
|
617
647
|
size: '1.55rem'
|
|
618
|
-
}), hideText = false, className =
|
|
648
|
+
}), hideText = false, className = undefined, tooltip, visibility })=>{
|
|
619
649
|
const router$1 = router.useRouter();
|
|
620
650
|
const pathname = navigation.usePathname();
|
|
621
651
|
const { endSession } = React.useContext(SessionContext) ?? {
|
|
@@ -624,6 +654,7 @@ const LoginButton = ({ icon = /*#__PURE__*/ jsxRuntime.jsx(md.MdLogin, {
|
|
|
624
654
|
const userStatus = core.useCoreSelector((state)=>core.selectUserAuthStatus(state));
|
|
625
655
|
const authenticated = core.isAuthenticated(userStatus);
|
|
626
656
|
if (visibility === LoginButtonVisibility.LogoutOnly && !authenticated) return null;
|
|
657
|
+
const mergedClassname = mergeTailwindClassnameWithDefault(className, 'flex flex-nowrap items-center font-content text-secondary-contrast-lighter align-middle border-b-2 hover:border-accent border-transparent mx-2');
|
|
627
658
|
return /*#__PURE__*/ jsxRuntime.jsx(core$1.Tooltip, {
|
|
628
659
|
label: tooltip,
|
|
629
660
|
position: "bottom",
|
|
@@ -635,7 +666,7 @@ const LoginButton = ({ icon = /*#__PURE__*/ jsxRuntime.jsx(md.MdLogin, {
|
|
|
635
666
|
children: /*#__PURE__*/ jsxRuntime.jsx(core$1.UnstyledButton, {
|
|
636
667
|
onClick: ()=>handleSelected(authenticated, router$1, pathname, endSession),
|
|
637
668
|
children: /*#__PURE__*/ jsxRuntime.jsxs("div", {
|
|
638
|
-
className:
|
|
669
|
+
className: mergedClassname,
|
|
639
670
|
children: [
|
|
640
671
|
!hideText ? authenticated ? 'Logout' : 'Login' : null,
|
|
641
672
|
icon
|
|
@@ -899,8 +930,11 @@ var ContentType;
|
|
|
899
930
|
ContentType["TextArray"] = "textArray";
|
|
900
931
|
ContentType["Html"] = "html";
|
|
901
932
|
ContentType["Markdown"] = "markdown";
|
|
933
|
+
ContentType["TextWithEmail"] = "textWithEmail";
|
|
934
|
+
ContentType["TextWithLink"] = "textWithLink";
|
|
935
|
+
ContentType["Link"] = "link";
|
|
902
936
|
})(ContentType || (ContentType = {}));
|
|
903
|
-
const TextContent = ({ text, className = 'inline text-base-contrast color-red-500 font-medium margin-block-start-1 margin-block-end-1', type = "text" })=>{
|
|
937
|
+
const TextContent = ({ text, className = 'inline text-base-contrast color-red-500 font-medium margin-block-start-1 margin-block-end-1', type = "text", email = undefined, link = undefined })=>{
|
|
904
938
|
switch(type){
|
|
905
939
|
case "html":
|
|
906
940
|
{
|
|
@@ -968,6 +1002,48 @@ const TextContent = ({ text, className = 'inline text-base-contrast color-red-50
|
|
|
968
1002
|
})
|
|
969
1003
|
});
|
|
970
1004
|
}
|
|
1005
|
+
case "textWithEmail":
|
|
1006
|
+
{
|
|
1007
|
+
const DEFAULT_STYLE = 'inline color-ink font-medium margin-block-start-1 margin-block-end-1';
|
|
1008
|
+
const mergedClassname = className ? tailwindMerge.twMerge(DEFAULT_STYLE, className) : DEFAULT_STYLE;
|
|
1009
|
+
const textString = Array.isArray(text) ? text.join('') : text;
|
|
1010
|
+
return /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
1011
|
+
className: mergedClassname,
|
|
1012
|
+
children: /*#__PURE__*/ jsxRuntime.jsxs("span", {
|
|
1013
|
+
children: [
|
|
1014
|
+
textString,
|
|
1015
|
+
email && /*#__PURE__*/ jsxRuntime.jsx(core$1.Anchor, {
|
|
1016
|
+
classNames: {
|
|
1017
|
+
root: mergedClassname
|
|
1018
|
+
},
|
|
1019
|
+
href: `mailto:${email}`,
|
|
1020
|
+
children: ` ${email}.`
|
|
1021
|
+
})
|
|
1022
|
+
]
|
|
1023
|
+
})
|
|
1024
|
+
});
|
|
1025
|
+
}
|
|
1026
|
+
case "textWithLink":
|
|
1027
|
+
{
|
|
1028
|
+
const DEFAULT_STYLE = 'inline color-ink font-medium margin-block-start-1 margin-block-end-1';
|
|
1029
|
+
const mergedClassname = className ? tailwindMerge.twMerge(DEFAULT_STYLE, className) : DEFAULT_STYLE;
|
|
1030
|
+
const textString = Array.isArray(text) ? text.join('') : text;
|
|
1031
|
+
return /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
1032
|
+
className: mergedClassname,
|
|
1033
|
+
children: /*#__PURE__*/ jsxRuntime.jsxs("span", {
|
|
1034
|
+
children: [
|
|
1035
|
+
textString,
|
|
1036
|
+
link && /*#__PURE__*/ jsxRuntime.jsx(core$1.Anchor, {
|
|
1037
|
+
classNames: {
|
|
1038
|
+
root: mergedClassname
|
|
1039
|
+
},
|
|
1040
|
+
href: link,
|
|
1041
|
+
children: ` ${email}.`
|
|
1042
|
+
})
|
|
1043
|
+
]
|
|
1044
|
+
})
|
|
1045
|
+
});
|
|
1046
|
+
}
|
|
971
1047
|
case "text":
|
|
972
1048
|
default:
|
|
973
1049
|
return /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
@@ -979,28 +1055,6 @@ const TextContent = ({ text, className = 'inline text-base-contrast color-red-50
|
|
|
979
1055
|
}
|
|
980
1056
|
};
|
|
981
1057
|
|
|
982
|
-
const DEFAULT_STYLE = 'inline color-ink font-medium margin-block-start-1 margin-block-end-1';
|
|
983
|
-
const ContactWithEmailContent = ({ text, email, className })=>{
|
|
984
|
-
const mergedClassname = className ? tailwindMerge.twMerge(DEFAULT_STYLE, className) : DEFAULT_STYLE;
|
|
985
|
-
const textString = Array.isArray(text) ? text.join(' ') : text;
|
|
986
|
-
// TODO: add better support for classnames
|
|
987
|
-
return /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
988
|
-
className: mergedClassname,
|
|
989
|
-
children: /*#__PURE__*/ jsxRuntime.jsxs("span", {
|
|
990
|
-
children: [
|
|
991
|
-
textString,
|
|
992
|
-
email && /*#__PURE__*/ jsxRuntime.jsx(core$1.Anchor, {
|
|
993
|
-
classNames: {
|
|
994
|
-
root: mergedClassname
|
|
995
|
-
},
|
|
996
|
-
href: `mailto:${email}`,
|
|
997
|
-
children: ` ${email}.`
|
|
998
|
-
})
|
|
999
|
-
]
|
|
1000
|
-
})
|
|
1001
|
-
});
|
|
1002
|
-
};
|
|
1003
|
-
|
|
1004
1058
|
const filterRedirect = (redirect)=>{
|
|
1005
1059
|
let redirectPath = '';
|
|
1006
1060
|
if (Array.isArray(redirect)) {
|
|
@@ -1056,10 +1110,7 @@ const LoginPanel = (loginConfig)=>{
|
|
|
1056
1110
|
loginConfig?.showCredentialsLogin && process.env.NODE_ENV === 'development' && /*#__PURE__*/ jsxRuntime.jsx(CredentialsLogin, {
|
|
1057
1111
|
handleLogin: handleCredentialsLogin
|
|
1058
1112
|
}),
|
|
1059
|
-
bottomContent?.map((content, index)
|
|
1060
|
-
...content,
|
|
1061
|
-
key: `bottomContent-${index}`
|
|
1062
|
-
}) : /*#__PURE__*/ React.createElement(TextContent, {
|
|
1113
|
+
bottomContent?.map((content, index)=>/*#__PURE__*/ React.createElement(TextContent, {
|
|
1063
1114
|
...content,
|
|
1064
1115
|
key: `bottomContent-${index}`
|
|
1065
1116
|
}))
|
|
@@ -2396,35 +2447,6 @@ const extractClassName = (key, classNames)=>{
|
|
|
2396
2447
|
return '';
|
|
2397
2448
|
};
|
|
2398
2449
|
|
|
2399
|
-
/**
|
|
2400
|
-
* Merges default and user values for Tailwind classnames.
|
|
2401
|
-
*
|
|
2402
|
-
* @param {RecordType} defaultValues - The default values for the classnames.
|
|
2403
|
-
* @param {RecordType} userValues - The user-defined values for the classnames.
|
|
2404
|
-
* @param {StylingMergeMode} mode - Whether to merge or replace the default and user values. Default is merge.
|
|
2405
|
-
* @returns {RecordType} - The merged default and user values for the classnames.
|
|
2406
|
-
*/ const mergeDefaultTailwindClassnames = (defaultValues, { mode = 'merge', ...userValues })=>{
|
|
2407
|
-
const defaultKeys = Object.keys(defaultValues);
|
|
2408
|
-
const mergedValues = {
|
|
2409
|
-
...defaultValues
|
|
2410
|
-
};
|
|
2411
|
-
if (mode === 'merge') {
|
|
2412
|
-
defaultKeys.forEach((key)=>{
|
|
2413
|
-
if (userValues[key]) {
|
|
2414
|
-
mergedValues[key] = tailwindMerge.twMerge(defaultValues[key], userValues[key]);
|
|
2415
|
-
}
|
|
2416
|
-
});
|
|
2417
|
-
}
|
|
2418
|
-
if (mode === 'replace') {
|
|
2419
|
-
defaultKeys.forEach((key)=>{
|
|
2420
|
-
if (userValues[key]) {
|
|
2421
|
-
mergedValues[key] = userValues[key];
|
|
2422
|
-
}
|
|
2423
|
-
});
|
|
2424
|
-
}
|
|
2425
|
-
return mergedValues;
|
|
2426
|
-
};
|
|
2427
|
-
|
|
2428
2450
|
const isPropertyKey = (value)=>{
|
|
2429
2451
|
return typeof value === 'string' || typeof value === 'number' || typeof value === 'symbol';
|
|
2430
2452
|
};
|
|
@@ -2475,8 +2497,9 @@ const FooterRowComponent = ({ item, rowClassname })=>{
|
|
|
2475
2497
|
case 'Links':
|
|
2476
2498
|
{
|
|
2477
2499
|
const links = item[itemType];
|
|
2500
|
+
const mergedClassname = mergeTailwindClassnameWithDefault(className, 'flex space-x-1');
|
|
2478
2501
|
return /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
2479
|
-
className:
|
|
2502
|
+
className: mergedClassname,
|
|
2480
2503
|
children: links?.links.map((link, i)=>{
|
|
2481
2504
|
return /*#__PURE__*/ jsxRuntime.jsxs(React.Fragment, {
|
|
2482
2505
|
children: [
|
|
@@ -2611,19 +2634,20 @@ const Gen3Link = ({ className, href, linkType, text, showExternalIcon = false })
|
|
|
2611
2634
|
});
|
|
2612
2635
|
};
|
|
2613
2636
|
|
|
2614
|
-
const LoginAccountButton = ()=>{
|
|
2637
|
+
const LoginAccountButton = ({ className = undefined })=>{
|
|
2615
2638
|
const router$1 = router.useRouter();
|
|
2616
2639
|
const handleSelected = async ()=>{
|
|
2617
2640
|
await router$1.push('Profile');
|
|
2618
2641
|
};
|
|
2619
2642
|
const userStatus = core.useCoreSelector((state)=>core.selectUserAuthStatus(state));
|
|
2620
2643
|
const userInfo = core.useCoreSelector((state)=>core.selectUserDetails(state));
|
|
2644
|
+
const mergedClassname = mergeTailwindClassnameWithDefault(className, 'flex flex-nowrap items-center align-middle border-b-2 hover:border-accent border-transparent');
|
|
2621
2645
|
if (userStatus && core.isAuthenticated(userStatus)) {
|
|
2622
2646
|
return /*#__PURE__*/ jsxRuntime.jsx(core$1.UnstyledButton, {
|
|
2623
2647
|
className: "mx-2",
|
|
2624
2648
|
onClick: ()=>handleSelected(),
|
|
2625
2649
|
children: /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
2626
|
-
className:
|
|
2650
|
+
className: mergedClassname,
|
|
2627
2651
|
children: userInfo?.username
|
|
2628
2652
|
})
|
|
2629
2653
|
});
|
|
@@ -2690,7 +2714,8 @@ const processTopBarItems = (items, showLogin)=>{
|
|
|
2690
2714
|
};
|
|
2691
2715
|
const TopBar = ({ items, loginButtonVisibility = LoginButtonVisibility.Hidden, classNames = {} })=>{
|
|
2692
2716
|
const classNamesDefaults = {
|
|
2693
|
-
root: 'flex justify-end items-center align-middle w-100 bg-secondary-lighter'
|
|
2717
|
+
root: 'flex justify-end items-center align-middle w-100 bg-secondary-lighter',
|
|
2718
|
+
login: 'font-content hover:border-accent'
|
|
2694
2719
|
};
|
|
2695
2720
|
const mergedClassnames = mergeDefaultTailwindClassnames(classNamesDefaults, classNames);
|
|
2696
2721
|
return /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
@@ -2702,9 +2727,12 @@ const TopBar = ({ items, loginButtonVisibility = LoginButtonVisibility.Hidden, c
|
|
|
2702
2727
|
className: "flex items-center align-middle",
|
|
2703
2728
|
children: [
|
|
2704
2729
|
processTopBarItems(items, loginButtonVisibility === LoginButtonVisibility.Visible),
|
|
2705
|
-
loginButtonVisibility != LoginButtonVisibility.Hidden ? /*#__PURE__*/ jsxRuntime.jsx(LoginAccountButton, {
|
|
2730
|
+
loginButtonVisibility != LoginButtonVisibility.Hidden ? /*#__PURE__*/ jsxRuntime.jsx(LoginAccountButton, {
|
|
2731
|
+
className: extractClassName('login', mergedClassnames)
|
|
2732
|
+
}) : null,
|
|
2706
2733
|
loginButtonVisibility != LoginButtonVisibility.Hidden ? /*#__PURE__*/ jsxRuntime.jsx(LoginButton, {
|
|
2707
|
-
visibility: loginButtonVisibility
|
|
2734
|
+
visibility: loginButtonVisibility,
|
|
2735
|
+
className: extractClassName('login', mergedClassnames)
|
|
2708
2736
|
}) : null
|
|
2709
2737
|
]
|
|
2710
2738
|
})
|
|
@@ -2733,7 +2761,7 @@ const TopBar = ({ items, loginButtonVisibility = LoginButtonVisibility.Hidden, c
|
|
|
2733
2761
|
|
|
2734
2762
|
const NavigationLogo = ({ src, title, description, width, height, divider = false, basePath = '', classNames = {} })=>{
|
|
2735
2763
|
const classNamesDefaults = {
|
|
2736
|
-
root: 'relative flex py-
|
|
2764
|
+
root: 'relative flex py-0 justify-start items-center align-middle font-heading font-bold tracking-wide text-xl ml-[5px] mr-[20px]',
|
|
2737
2765
|
link: 'relative object-contain',
|
|
2738
2766
|
logo: 'px-3',
|
|
2739
2767
|
title: 'border-solid border-base-darker ml-1 mr-3',
|
|
@@ -2781,9 +2809,10 @@ const NavigationLogo = ({ src, title, description, width, height, divider = fals
|
|
|
2781
2809
|
* @param name - the name of the button
|
|
2782
2810
|
* @param iconHeight - the height of the icon
|
|
2783
2811
|
* @param classNames - the class names to use for root, label, icon/tooltip and arrow'
|
|
2784
|
-
|
|
2812
|
+
* @param noBasePath - set to true to avoid prepending a basePath to the link
|
|
2813
|
+
*/ const NavigationBarButton = ({ tooltip, icon, href, name, iconHeight = '27px', classNames = {}, noBasePath = false })=>{
|
|
2785
2814
|
const classNamesDefaults = {
|
|
2786
|
-
root:
|
|
2815
|
+
root: 'flex flex-col flex-nowrap px-3 py-2 pt-4 items-center align-center text-primary hover:text-accent opacity-80 hover:opacity-100',
|
|
2787
2816
|
label: 'pt-1.5 body-typo font-heading text-sm text-nowrap',
|
|
2788
2817
|
icon: 'mt-0.5 ml-1',
|
|
2789
2818
|
...TooltipStyle
|
|
@@ -2792,13 +2821,31 @@ const NavigationLogo = ({ src, title, description, width, height, divider = fals
|
|
|
2792
2821
|
return /*#__PURE__*/ jsxRuntime.jsx(React.Fragment, {
|
|
2793
2822
|
children: /*#__PURE__*/ jsxRuntime.jsx(core$1.Tooltip, {
|
|
2794
2823
|
label: tooltip,
|
|
2824
|
+
disabled: !tooltip,
|
|
2795
2825
|
multiline: true,
|
|
2796
2826
|
position: "bottom",
|
|
2797
2827
|
arrowSize: 8,
|
|
2798
2828
|
withArrow: true,
|
|
2799
2829
|
zIndex: 1000,
|
|
2800
2830
|
w: 220,
|
|
2801
|
-
children: /*#__PURE__*/ jsxRuntime.jsx(
|
|
2831
|
+
children: noBasePath ? /*#__PURE__*/ jsxRuntime.jsx("a", {
|
|
2832
|
+
href: `${href}`,
|
|
2833
|
+
children: /*#__PURE__*/ jsxRuntime.jsxs("div", {
|
|
2834
|
+
className: extractClassName('root', mergedClassnames),
|
|
2835
|
+
role: "navigation",
|
|
2836
|
+
children: [
|
|
2837
|
+
/*#__PURE__*/ jsxRuntime.jsx(react.Icon, {
|
|
2838
|
+
height: iconHeight,
|
|
2839
|
+
icon: icon,
|
|
2840
|
+
className: extractClassName('icon', mergedClassnames)
|
|
2841
|
+
}),
|
|
2842
|
+
/*#__PURE__*/ jsxRuntime.jsx("p", {
|
|
2843
|
+
className: extractClassName('label', mergedClassnames),
|
|
2844
|
+
children: name
|
|
2845
|
+
})
|
|
2846
|
+
]
|
|
2847
|
+
})
|
|
2848
|
+
}) : /*#__PURE__*/ jsxRuntime.jsx(Link, {
|
|
2802
2849
|
href: `${// need this to preserve running in hybrid mode
|
|
2803
2850
|
process.env.NEXT_PUBLIC_PORTAL_BASENAME && process.env.NEXT_PUBLIC_PORTAL_BASENAME !== '/' ? process.env.NEXT_PUBLIC_PORTAL_BASENAME : ''}${href}`,
|
|
2804
2851
|
children: /*#__PURE__*/ jsxRuntime.jsxs("div", {
|
|
@@ -2868,7 +2915,8 @@ const NavigationLogo = ({ src, title, description, width, height, divider = fals
|
|
|
2868
2915
|
icon: x.icon,
|
|
2869
2916
|
href: x.href,
|
|
2870
2917
|
name: x.name,
|
|
2871
|
-
classNames: x.classNames
|
|
2918
|
+
classNames: x.classNames,
|
|
2919
|
+
noBasePath: x?.noBasePath
|
|
2872
2920
|
})
|
|
2873
2921
|
}, `${x.name}-${index}`);
|
|
2874
2922
|
})
|
|
@@ -3035,6 +3083,7 @@ const HorizontalNavigationBar = ({ actions, items, logo = undefined, loginIcon =
|
|
|
3035
3083
|
* @param {string} props.type - The type of header to render. Default value is 'original'.
|
|
3036
3084
|
* @returns {JSX.Element} - The rendered Header component.
|
|
3037
3085
|
*/ const Header = ({ top, navigation, banners, type = 'original' })=>{
|
|
3086
|
+
console.log('top', top);
|
|
3038
3087
|
return type === 'horizontal' ? /*#__PURE__*/ jsxRuntime.jsxs("div", {
|
|
3039
3088
|
className: "w-full",
|
|
3040
3089
|
children: [
|