@gen3/frontend 0.10.84 → 0.10.85
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 +269 -89
- package/dist/cjs/index.js.map +1 -1
- package/dist/dts/features/Analysis/AnalysisCard.d.ts +5 -0
- package/dist/dts/features/Analysis/AnalysisCard.d.ts.map +1 -0
- package/dist/dts/features/Analysis/AnalysisCard.js +14 -0
- package/dist/dts/features/Analysis/AnalysisCard.js.map +1 -0
- package/dist/dts/features/Analysis/AnalysisCardCompact.d.ts +6 -0
- package/dist/dts/features/Analysis/AnalysisCardCompact.d.ts.map +1 -0
- package/dist/dts/features/Analysis/AnalysisCardCompact.js +12 -0
- package/dist/dts/features/Analysis/AnalysisCardCompact.js.map +1 -0
- package/dist/dts/features/Analysis/AnalysisCardCompact.stories.d.ts +32 -0
- package/dist/dts/features/Analysis/AnalysisCardCompact.stories.d.ts.map +1 -0
- package/dist/dts/features/Analysis/AnalysisCardCompact.stories.js +23 -0
- package/dist/dts/features/Analysis/AnalysisCardCompact.stories.js.map +1 -0
- package/dist/dts/features/Analysis/AnalysisCardEditor.js.map +1 -1
- package/dist/dts/features/Analysis/AnalysisCenter.d.ts.map +1 -1
- package/dist/dts/features/Analysis/AnalysisCenter.js +3 -10
- package/dist/dts/features/Analysis/AnalysisCenter.js.map +1 -1
- package/dist/dts/features/Analysis/AnalysisCenterWithSections.d.ts +22 -0
- package/dist/dts/features/Analysis/AnalysisCenterWithSections.d.ts.map +1 -0
- package/dist/dts/features/Analysis/AnalysisCenterWithSections.js +53 -0
- package/dist/dts/features/Analysis/AnalysisCenterWithSections.js.map +1 -0
- package/dist/dts/features/Analysis/AnalysisCenterWithSections.stories.d.ts +13 -0
- package/dist/dts/features/Analysis/AnalysisCenterWithSections.stories.d.ts.map +1 -0
- package/dist/dts/features/Analysis/AnalysisCenterWithSections.stories.js +113 -0
- package/dist/dts/features/Analysis/AnalysisCenterWithSections.stories.js.map +1 -0
- package/dist/dts/features/Analysis/TextDescription.d.ts.map +1 -1
- package/dist/dts/features/Analysis/TextDescription.js +16 -2
- package/dist/dts/features/Analysis/TextDescription.js.map +1 -1
- package/dist/dts/features/Analysis/index.d.ts +3 -1
- package/dist/dts/features/Analysis/index.d.ts.map +1 -1
- package/dist/dts/features/Analysis/index.js +2 -1
- package/dist/dts/features/Analysis/index.js.map +1 -1
- package/dist/dts/features/Analysis/types.d.ts +15 -2
- package/dist/dts/features/Analysis/types.d.ts.map +1 -1
- package/dist/dts/features/Analysis/types.js +20 -1
- package/dist/dts/features/Analysis/types.js.map +1 -1
- package/dist/dts/pages/Analysis/Analysis.d.ts +1 -1
- package/dist/dts/pages/Analysis/Analysis.d.ts.map +1 -1
- package/dist/dts/pages/Analysis/Analysis.js +7 -4
- package/dist/dts/pages/Analysis/Analysis.js.map +1 -1
- package/dist/dts/pages/Analysis/data.d.ts.map +1 -1
- package/dist/dts/pages/Analysis/data.js +2 -2
- package/dist/dts/pages/Analysis/data.js.map +1 -1
- package/dist/dts/pages/Analysis/types.d.ts +4 -2
- package/dist/dts/pages/Analysis/types.d.ts.map +1 -1
- package/dist/esm/index.js +269 -90
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +39 -5
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -4
|
@@ -1,2 +1,21 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export var isAnalysisCenterWithSectionsConfiguration = function (value) {
|
|
2
|
+
if (!value || typeof value !== 'object') {
|
|
3
|
+
return false;
|
|
4
|
+
}
|
|
5
|
+
var candidate = value;
|
|
6
|
+
// Check that sections exists and is an array
|
|
7
|
+
if (!Array.isArray(candidate.sections)) {
|
|
8
|
+
return false;
|
|
9
|
+
}
|
|
10
|
+
for (var _i = 0, _a = candidate.sections; _i < _a.length; _i++) {
|
|
11
|
+
var section = _a[_i];
|
|
12
|
+
if (!section ||
|
|
13
|
+
typeof section !== 'object' ||
|
|
14
|
+
typeof section.label !== 'string' ||
|
|
15
|
+
!Array.isArray(section.tools)) {
|
|
16
|
+
return false;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
return true;
|
|
20
|
+
};
|
|
2
21
|
//# sourceMappingURL=types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/features/Analysis/types.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/features/Analysis/types.ts"],"names":[],"mappings":"AAgCA,MAAM,CAAC,IAAM,yCAAyC,GAAG,UACvD,KAAc;IAEd,IAAI,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QACxC,OAAO,KAAK,CAAC;IACf,CAAC;IAED,IAAM,SAAS,GAAG,KAAgC,CAAC;IAEnD,6CAA6C;IAC7C,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAE,CAAC;QACvC,OAAO,KAAK,CAAC;IACf,CAAC;IAED,KAAsB,UAAkB,EAAlB,KAAA,SAAS,CAAC,QAAQ,EAAlB,cAAkB,EAAlB,IAAkB,EAAE,CAAC;QAAtC,IAAM,OAAO,SAAA;QAChB,IACE,CAAC,OAAO;YACR,OAAO,OAAO,KAAK,QAAQ;YAC3B,OAAQ,OAAiC,CAAC,KAAK,KAAK,QAAQ;YAC5D,CAAC,KAAK,CAAC,OAAO,CAAE,OAAiC,CAAC,KAAK,CAAC,EACxD,CAAC;YACD,OAAO,KAAK,CAAC;QACf,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { AnalysisPageLayoutProps } from './types';
|
|
2
|
-
declare const AnalysisPage: ({ headerProps, footerProps, tools, }: AnalysisPageLayoutProps) => JSX.Element;
|
|
2
|
+
declare const AnalysisPage: ({ headerProps, footerProps, tools, sections, classNames, }: AnalysisPageLayoutProps) => JSX.Element;
|
|
3
3
|
export default AnalysisPage;
|
|
4
4
|
//# sourceMappingURL=Analysis.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Analysis.d.ts","sourceRoot":"","sources":["../../../../src/pages/Analysis/Analysis.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Analysis.d.ts","sourceRoot":"","sources":["../../../../src/pages/Analysis/Analysis.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAGlD,QAAA,MAAM,YAAY,GAAI,4DAMnB,uBAAuB,KAAG,GAAG,CAAC,OAwBhC,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -1,13 +1,16 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Center } from '@mantine/core';
|
|
2
3
|
import { NavPageLayout } from '../../features/Navigation';
|
|
3
4
|
import AnalysisPanel from '../../features/Analysis/AnalysisPanel';
|
|
5
|
+
import AnalysisCenterWithSections from '../../features/Analysis/AnalysisCenterWithSections';
|
|
6
|
+
import { ErrorCard } from '../../components/MessageCards';
|
|
4
7
|
var AnalysisPage = function (_a) {
|
|
5
|
-
var headerProps = _a.headerProps, footerProps = _a.footerProps, tools = _a.tools;
|
|
6
|
-
return (
|
|
8
|
+
var headerProps = _a.headerProps, footerProps = _a.footerProps, tools = _a.tools, sections = _a.sections, classNames = _a.classNames;
|
|
9
|
+
return (_jsxs(NavPageLayout, { headerProps: headerProps, footerProps: footerProps, headerData: {
|
|
7
10
|
title: 'Gen3 Analysis Center',
|
|
8
11
|
content: 'Analysis Center',
|
|
9
12
|
key: 'gen3-analysis-center',
|
|
10
|
-
}, children: _jsx(AnalysisPanel, { tools: tools }) }));
|
|
13
|
+
}, children: [!tools && !sections && (_jsx(Center, { className: "mt-20", children: _jsx(ErrorCard, { message: "No tools or sections found" }) })), tools && _jsx(AnalysisPanel, { tools: tools }), sections && (_jsx(AnalysisCenterWithSections, { sections: sections, classNames: classNames }))] }));
|
|
11
14
|
};
|
|
12
15
|
export default AnalysisPage;
|
|
13
16
|
//# sourceMappingURL=Analysis.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Analysis.js","sourceRoot":"","sources":["../../../../src/pages/Analysis/Analysis.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,aAAa,MAAM,uCAAuC,CAAC;
|
|
1
|
+
{"version":3,"file":"Analysis.js","sourceRoot":"","sources":["../../../../src/pages/Analysis/Analysis.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,aAAa,MAAM,uCAAuC,CAAC;AAClE,OAAO,0BAA0B,MAAM,oDAAoD,CAAC;AAE5F,OAAO,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAE1D,IAAM,YAAY,GAAG,UAAC,EAMI;QALxB,WAAW,iBAAA,EACX,WAAW,iBAAA,EACX,KAAK,WAAA,EACL,QAAQ,cAAA,EACR,UAAU,gBAAA;IAEV,OAAO,CACL,MAAC,aAAa,IACN,WAAW,aAAA,EAAE,WAAW,aAAA,EAC9B,UAAU,EAAE;YACV,KAAK,EAAE,sBAAsB;YAC7B,OAAO,EAAE,iBAAiB;YAC1B,GAAG,EAAE,sBAAsB;SAC5B,aAEA,CAAC,KAAK,IAAI,CAAC,QAAQ,IAAI,CACtB,KAAC,MAAM,IAAC,SAAS,EAAC,OAAO,YACvB,KAAC,SAAS,IAAC,OAAO,EAAC,4BAA4B,GAAG,GAC3C,CACV,EACA,KAAK,IAAI,KAAC,aAAa,IAAC,KAAK,EAAE,KAAK,GAAI,EACxC,QAAQ,IAAI,CACX,KAAC,0BAA0B,IACzB,QAAQ,EAAE,QAAQ,EAClB,UAAU,EAAE,UAAU,GACtB,CACH,IACa,CACjB,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data.d.ts","sourceRoot":"","sources":["../../../../src/pages/Analysis/data.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,MAAM,CAAC;AAE1C,OAAO,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"data.d.ts","sourceRoot":"","sources":["../../../../src/pages/Analysis/data.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,MAAM,CAAC;AAE1C,OAAO,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAQlD,eAAO,MAAM,8BAA8B,EAAE,kBAAkB,CAC7D,uBAAuB,CAuBxB,CAAC"}
|
|
@@ -65,11 +65,11 @@ export var AnalysisPageGetServerSideProps = function () { return __awaiter(void
|
|
|
65
65
|
_c)];
|
|
66
66
|
case 3:
|
|
67
67
|
err_1 = _e.sent();
|
|
68
|
-
console.
|
|
68
|
+
console.warn(err_1);
|
|
69
69
|
_d = {};
|
|
70
70
|
_b = [{}];
|
|
71
71
|
return [4 /*yield*/, getNavPageLayoutPropsFromConfig()];
|
|
72
|
-
case 4: return [2 /*return*/, (_d.props = __assign.apply(void 0,
|
|
72
|
+
case 4: return [2 /*return*/, (_d.props = __assign.apply(void 0, _b.concat([(_e.sent())])),
|
|
73
73
|
_d)];
|
|
74
74
|
case 5: return [2 /*return*/];
|
|
75
75
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data.js","sourceRoot":"","sources":["../../../../src/pages/Analysis/data.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,OAAO,EAAE,+BAA+B,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"data.js","sourceRoot":"","sources":["../../../../src/pages/Analysis/data.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,OAAO,EAAE,+BAA+B,EAAE,MAAM,8BAA8B,CAAC;AAM/E,OAAO,aAAa,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAE/C,MAAM,CAAC,IAAM,8BAA8B,GAEvC;;;;;;;gBAI8C,qBAAM,aAAa,CAAC,GAAG,CACnE,iBAAU,iBAAiB,wBAAqB,CACjD,EAAA;;gBAJK,cAAc,GAE0B,SAE7C;;;gBAIO,qBAAM,+BAA+B,EAAE,EAAA;oBAF/C,uBACE,QAAK,6DACA,CAAC,SAAuC,CAAC,KACzC,cAAc,EAClB;yBACD;;;gBAEF,OAAO,CAAC,IAAI,CAAC,KAAG,CAAC,CAAC;;;gBAGV,qBAAM,+BAA+B,EAAE,EAAA;oBAF/C,uBACE,QAAK,qCACA,CAAC,SAAuC,CAAC,GAC7C;yBACD;;;;KAEL,CAAC"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { NavPageLayoutProps } from '../../features/Navigation';
|
|
2
|
-
import { type
|
|
2
|
+
import { type AnalysisToolConfiguration, type AnalysisCenterSection } from '../../features/Analysis/types';
|
|
3
3
|
export interface AnalysisPageLayoutProps extends NavPageLayoutProps {
|
|
4
|
-
tools
|
|
4
|
+
tools?: Array<AnalysisToolConfiguration>;
|
|
5
|
+
sections?: Array<AnalysisCenterSection>;
|
|
6
|
+
classNames?: Record<string, string>;
|
|
5
7
|
}
|
|
6
8
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/pages/Analysis/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/pages/Analysis/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EACL,KAAK,yBAAyB,EAC9B,KAAK,qBAAqB,EAC3B,MAAM,+BAA+B,CAAC;AAEvC,MAAM,WAAW,uBAAwB,SAAQ,kBAAkB;IACjE,KAAK,CAAC,EAAE,KAAK,CAAC,yBAAyB,CAAC,CAAC;IACzC,QAAQ,CAAC,EAAE,KAAK,CAAC,qBAAqB,CAAC,CAAC;IACxC,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACrC"}
|
package/dist/esm/index.js
CHANGED
|
@@ -11934,18 +11934,35 @@ const Workspace = ({ config })=>{
|
|
|
11934
11934
|
|
|
11935
11935
|
const TextDescription = ({ description })=>{
|
|
11936
11936
|
const [extend, setExtend] = useState(false);
|
|
11937
|
+
const textRef = useRef(null);
|
|
11938
|
+
const [isClamped, setClamped] = useState(false);
|
|
11939
|
+
useEffect(()=>{
|
|
11940
|
+
// Function that should be called on window resize
|
|
11941
|
+
function handleResize() {
|
|
11942
|
+
if (textRef && textRef.current) {
|
|
11943
|
+
setClamped(textRef.current.scrollHeight > textRef.current.clientHeight);
|
|
11944
|
+
}
|
|
11945
|
+
}
|
|
11946
|
+
// Add event listener to window resize
|
|
11947
|
+
window.addEventListener('resize', handleResize);
|
|
11948
|
+
// Remove event listener on cleanup
|
|
11949
|
+
return ()=>window.removeEventListener('resize', handleResize);
|
|
11950
|
+
}, []); // Empty array ensures that it would only run on mount
|
|
11937
11951
|
return /*#__PURE__*/ jsxs(Fragment, {
|
|
11938
11952
|
children: [
|
|
11939
11953
|
!extend ? /*#__PURE__*/ jsx(Text, {
|
|
11954
|
+
ref: textRef,
|
|
11955
|
+
size: "sm",
|
|
11940
11956
|
lineClamp: 4,
|
|
11941
11957
|
children: description
|
|
11942
11958
|
}) : /*#__PURE__*/ jsx(Text, {
|
|
11959
|
+
size: "sm",
|
|
11943
11960
|
children: description
|
|
11944
11961
|
}),
|
|
11945
|
-
/*#__PURE__*/ jsx("button", {
|
|
11962
|
+
isClamped && /*#__PURE__*/ jsx("button", {
|
|
11946
11963
|
onClick: ()=>setExtend((extend)=>!extend),
|
|
11947
11964
|
children: /*#__PURE__*/ jsxs("div", {
|
|
11948
|
-
className: "flex text-xs font-semibold text-
|
|
11965
|
+
className: "flex text-xs font-semibold text-base-contrast-light",
|
|
11949
11966
|
children: [
|
|
11950
11967
|
!extend ? 'Extend Text' : 'Collapse Text',
|
|
11951
11968
|
' ',
|
|
@@ -11960,6 +11977,90 @@ const TextDescription = ({ description })=>{
|
|
|
11960
11977
|
});
|
|
11961
11978
|
};
|
|
11962
11979
|
|
|
11980
|
+
const AnalysisCard = ({ title, description, type, icon, image, hasDemo, loginRequired, href })=>{
|
|
11981
|
+
return /*#__PURE__*/ jsx(Stack, {
|
|
11982
|
+
children: /*#__PURE__*/ jsxs("div", {
|
|
11983
|
+
className: "rounded-sm bg-base-max",
|
|
11984
|
+
children: [
|
|
11985
|
+
/*#__PURE__*/ jsx("div", {
|
|
11986
|
+
className: "p-0 rounded-sm",
|
|
11987
|
+
children: /*#__PURE__*/ jsx(Image$1, {
|
|
11988
|
+
component: Image,
|
|
11989
|
+
src: `${image}`,
|
|
11990
|
+
alt: `${title} image`,
|
|
11991
|
+
height: 1000,
|
|
11992
|
+
width: 1000,
|
|
11993
|
+
radius: "md"
|
|
11994
|
+
})
|
|
11995
|
+
}),
|
|
11996
|
+
/*#__PURE__*/ jsxs("div", {
|
|
11997
|
+
className: "flex -mt-5 relative z-10",
|
|
11998
|
+
children: [
|
|
11999
|
+
/*#__PURE__*/ jsx("div", {
|
|
12000
|
+
className: "p-0.5 rounded-sm bg-base-lightest ml-5 border-2 border-base",
|
|
12001
|
+
children: /*#__PURE__*/ jsx(Image$1, {
|
|
12002
|
+
component: Image,
|
|
12003
|
+
src: `${icon}`,
|
|
12004
|
+
alt: `${title} logo`,
|
|
12005
|
+
width: 40,
|
|
12006
|
+
height: 40,
|
|
12007
|
+
radius: "lg"
|
|
12008
|
+
})
|
|
12009
|
+
}),
|
|
12010
|
+
/*#__PURE__*/ jsx("div", {
|
|
12011
|
+
className: "relative mb-0 ml-2",
|
|
12012
|
+
children: /*#__PURE__*/ jsx("span", {
|
|
12013
|
+
className: "absolute bottom-0 left-0 text-xs text-gray-700 w-max",
|
|
12014
|
+
children: type === 'application' ? 'Application' : 'Jupyter Notebook'
|
|
12015
|
+
})
|
|
12016
|
+
})
|
|
12017
|
+
]
|
|
12018
|
+
}),
|
|
12019
|
+
/*#__PURE__*/ jsxs("div", {
|
|
12020
|
+
className: "flex flex-col mt-2 ml-2",
|
|
12021
|
+
children: [
|
|
12022
|
+
/*#__PURE__*/ jsx("div", {
|
|
12023
|
+
className: "text-sm font-black h-6",
|
|
12024
|
+
children: title
|
|
12025
|
+
}),
|
|
12026
|
+
/*#__PURE__*/ jsx("div", {
|
|
12027
|
+
className: "text-xs text-gray-400 h-6",
|
|
12028
|
+
children: loginRequired ? 'Login Required' : ' '
|
|
12029
|
+
}),
|
|
12030
|
+
/*#__PURE__*/ jsx("div", {
|
|
12031
|
+
className: "text-sm p-2 h-fit",
|
|
12032
|
+
children: /*#__PURE__*/ jsx(TextDescription, {
|
|
12033
|
+
description: description
|
|
12034
|
+
})
|
|
12035
|
+
}),
|
|
12036
|
+
/*#__PURE__*/ jsx("div", {
|
|
12037
|
+
className: "flex mb-4 rounded-b-md",
|
|
12038
|
+
children: /*#__PURE__*/ jsxs("div", {
|
|
12039
|
+
className: "m-auto",
|
|
12040
|
+
children: [
|
|
12041
|
+
/*#__PURE__*/ jsx(NavLink, {
|
|
12042
|
+
component: Link,
|
|
12043
|
+
href: href ?? '_blank',
|
|
12044
|
+
classNames: {
|
|
12045
|
+
root: 'bg-accent text-accent-contrast hover:bg-accent-darker p-2 rounded-sm',
|
|
12046
|
+
label: 'text-sm font-semibold'
|
|
12047
|
+
},
|
|
12048
|
+
label: `Run ${type === 'application' ? 'App' : 'Notebook'}`
|
|
12049
|
+
}),
|
|
12050
|
+
hasDemo && /*#__PURE__*/ jsx("button", {
|
|
12051
|
+
className: "ml-2 p-1.5 rounded-sm text-sm font-semibold",
|
|
12052
|
+
children: "Demo"
|
|
12053
|
+
})
|
|
12054
|
+
]
|
|
12055
|
+
})
|
|
12056
|
+
})
|
|
12057
|
+
]
|
|
12058
|
+
})
|
|
12059
|
+
]
|
|
12060
|
+
})
|
|
12061
|
+
}, title);
|
|
12062
|
+
};
|
|
12063
|
+
|
|
11963
12064
|
const AnalysisCenter = ({ tools, showFilterAndSort = false })=>{
|
|
11964
12065
|
const [cards, setCards] = useState({
|
|
11965
12066
|
type: '',
|
|
@@ -12029,91 +12130,158 @@ const AnalysisCenter = ({ tools, showFilterAndSort = false })=>{
|
|
|
12029
12130
|
children: /*#__PURE__*/ jsx("div", {
|
|
12030
12131
|
className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-6 p-1 mx-4 overflow-y-scroll",
|
|
12031
12132
|
children: tools.map(({ title, description, type, icon, image, hasDemo, loginRequired, href }, key)=>{
|
|
12032
|
-
return /*#__PURE__*/ jsx(
|
|
12033
|
-
|
|
12034
|
-
|
|
12133
|
+
return /*#__PURE__*/ jsx(AnalysisCard, {
|
|
12134
|
+
title,
|
|
12135
|
+
description,
|
|
12136
|
+
type,
|
|
12137
|
+
icon,
|
|
12138
|
+
image,
|
|
12139
|
+
hasDemo,
|
|
12140
|
+
loginRequired,
|
|
12141
|
+
href,
|
|
12142
|
+
cardType: 'regular'
|
|
12143
|
+
}, title);
|
|
12144
|
+
})
|
|
12145
|
+
})
|
|
12146
|
+
})
|
|
12147
|
+
]
|
|
12148
|
+
});
|
|
12149
|
+
};
|
|
12150
|
+
|
|
12151
|
+
const AnalysisCardCompact = ({ title, description, type = 'application', icon, hasDemo = false, loginRequired = false, href, count, countUnits })=>{
|
|
12152
|
+
return /*#__PURE__*/ jsxs(Stack, {
|
|
12153
|
+
gap: "xs",
|
|
12154
|
+
classNames: {
|
|
12155
|
+
root: 'rounded-lg border-3 border-contrast bg-base-max h-full'
|
|
12156
|
+
},
|
|
12157
|
+
children: [
|
|
12158
|
+
/*#__PURE__*/ jsx("div", {
|
|
12159
|
+
className: "rounded-t-lg bg-secondary border-b-4 border-accent-warm h-12"
|
|
12160
|
+
}),
|
|
12161
|
+
/*#__PURE__*/ jsx("div", {
|
|
12162
|
+
className: "flex relative -mt-10 z-10 p-2 max-w-90",
|
|
12163
|
+
children: /*#__PURE__*/ jsx("div", {
|
|
12164
|
+
className: "relative rounded-lg bg-base-lightest ml-5 border-4 border-base-light mx-2 w-1/4 aspect-square",
|
|
12165
|
+
children: /*#__PURE__*/ jsx(Image$1, {
|
|
12166
|
+
component: Image,
|
|
12167
|
+
src: `${icon}`,
|
|
12168
|
+
alt: `${title} logo`,
|
|
12169
|
+
fill: true,
|
|
12170
|
+
fit: "cover",
|
|
12171
|
+
radius: "lg"
|
|
12172
|
+
})
|
|
12173
|
+
})
|
|
12174
|
+
}),
|
|
12175
|
+
/*#__PURE__*/ jsxs("div", {
|
|
12176
|
+
className: "flex flex-col ml-2 px-4 pb-2 h-full justify-between",
|
|
12177
|
+
children: [
|
|
12178
|
+
/*#__PURE__*/ jsxs("div", {
|
|
12179
|
+
className: "flex flex-col",
|
|
12180
|
+
children: [
|
|
12181
|
+
/*#__PURE__*/ jsx(Text, {
|
|
12182
|
+
fw: "bold",
|
|
12183
|
+
classNames: {
|
|
12184
|
+
root: 'font-header sm:text-xl lg:text-2xl'
|
|
12185
|
+
},
|
|
12186
|
+
children: title
|
|
12187
|
+
}),
|
|
12188
|
+
/*#__PURE__*/ jsxs(Text, {
|
|
12189
|
+
size: "md",
|
|
12190
|
+
fw: "semibold",
|
|
12191
|
+
c: "base-contrast.5",
|
|
12035
12192
|
children: [
|
|
12036
|
-
|
|
12037
|
-
|
|
12038
|
-
|
|
12039
|
-
component: Image,
|
|
12040
|
-
src: `${image}`,
|
|
12041
|
-
alt: `${title} image`,
|
|
12042
|
-
height: 1000,
|
|
12043
|
-
width: 1000,
|
|
12044
|
-
radius: "md"
|
|
12045
|
-
})
|
|
12046
|
-
}),
|
|
12047
|
-
/*#__PURE__*/ jsxs("div", {
|
|
12048
|
-
className: "flex -mt-5 relative z-10",
|
|
12049
|
-
children: [
|
|
12050
|
-
/*#__PURE__*/ jsx("div", {
|
|
12051
|
-
className: "p-0.5 rounded-sm bg-base-lightest ml-5 border-2 border-base",
|
|
12052
|
-
children: /*#__PURE__*/ jsx(Image$1, {
|
|
12053
|
-
component: Image,
|
|
12054
|
-
src: `${icon}`,
|
|
12055
|
-
alt: `${title} logo`,
|
|
12056
|
-
width: 40,
|
|
12057
|
-
height: 40,
|
|
12058
|
-
radius: "lg"
|
|
12059
|
-
})
|
|
12060
|
-
}),
|
|
12061
|
-
/*#__PURE__*/ jsx("div", {
|
|
12062
|
-
className: "relative mb-0 ml-2",
|
|
12063
|
-
children: /*#__PURE__*/ jsx("span", {
|
|
12064
|
-
className: "absolute bottom-0 left-0 text-xs text-gray-700 w-max",
|
|
12065
|
-
children: type === 'application' ? 'Application' : 'Jupyter Notebook'
|
|
12066
|
-
})
|
|
12067
|
-
})
|
|
12068
|
-
]
|
|
12069
|
-
}),
|
|
12070
|
-
/*#__PURE__*/ jsxs("div", {
|
|
12071
|
-
className: "flex flex-col mt-2 ml-2",
|
|
12072
|
-
children: [
|
|
12073
|
-
/*#__PURE__*/ jsx("div", {
|
|
12074
|
-
className: "text-sm font-black h-6",
|
|
12075
|
-
children: title
|
|
12076
|
-
}),
|
|
12077
|
-
/*#__PURE__*/ jsx("div", {
|
|
12078
|
-
className: "text-xs text-gray-400 h-6",
|
|
12079
|
-
children: loginRequired ? 'Login Required' : ' '
|
|
12080
|
-
}),
|
|
12081
|
-
/*#__PURE__*/ jsx("div", {
|
|
12082
|
-
className: "text-sm p-2 h-fit",
|
|
12083
|
-
children: /*#__PURE__*/ jsx(TextDescription, {
|
|
12084
|
-
description: description
|
|
12085
|
-
})
|
|
12086
|
-
}),
|
|
12087
|
-
/*#__PURE__*/ jsx("div", {
|
|
12088
|
-
className: "flex mb-4 rounded-b-md",
|
|
12089
|
-
children: /*#__PURE__*/ jsxs("div", {
|
|
12090
|
-
className: "m-auto",
|
|
12091
|
-
children: [
|
|
12092
|
-
/*#__PURE__*/ jsx(NavLink, {
|
|
12093
|
-
component: Link,
|
|
12094
|
-
href: href ?? '_blank',
|
|
12095
|
-
classNames: {
|
|
12096
|
-
root: 'bg-accent text-accent-contrast hover:bg-accent-darker p-2 rounded-sm',
|
|
12097
|
-
label: 'text-sm font-semibold'
|
|
12098
|
-
},
|
|
12099
|
-
label: `Run ${type === 'application' ? 'App' : 'Notebook'}`
|
|
12100
|
-
}),
|
|
12101
|
-
hasDemo && /*#__PURE__*/ jsx("button", {
|
|
12102
|
-
className: "ml-2 p-1.5 rounded-sm text-sm font-semibold",
|
|
12103
|
-
children: "Demo"
|
|
12104
|
-
})
|
|
12105
|
-
]
|
|
12106
|
-
})
|
|
12107
|
-
})
|
|
12108
|
-
]
|
|
12109
|
-
})
|
|
12193
|
+
count?.toLocaleString(),
|
|
12194
|
+
" ",
|
|
12195
|
+
countUnits
|
|
12110
12196
|
]
|
|
12197
|
+
}),
|
|
12198
|
+
/*#__PURE__*/ jsx("div", {
|
|
12199
|
+
className: "py-2 min-h-24 h-full",
|
|
12200
|
+
children: /*#__PURE__*/ jsx(TextDescription, {
|
|
12201
|
+
description: description
|
|
12202
|
+
})
|
|
12111
12203
|
})
|
|
12112
|
-
|
|
12204
|
+
]
|
|
12205
|
+
}),
|
|
12206
|
+
/*#__PURE__*/ jsxs(Group, {
|
|
12207
|
+
className: "mb-4",
|
|
12208
|
+
children: [
|
|
12209
|
+
/*#__PURE__*/ jsxs(Button, {
|
|
12210
|
+
color: "primary.4",
|
|
12211
|
+
children: [
|
|
12212
|
+
"Run ",
|
|
12213
|
+
type === 'application' ? 'App' : 'Notebook'
|
|
12214
|
+
]
|
|
12215
|
+
}),
|
|
12216
|
+
hasDemo && /*#__PURE__*/ jsx(Button, {
|
|
12217
|
+
variant: "outline",
|
|
12218
|
+
color: "primary.4",
|
|
12219
|
+
children: "Demo"
|
|
12220
|
+
})
|
|
12221
|
+
]
|
|
12113
12222
|
})
|
|
12114
|
-
|
|
12223
|
+
]
|
|
12115
12224
|
})
|
|
12116
12225
|
]
|
|
12226
|
+
}, title);
|
|
12227
|
+
};
|
|
12228
|
+
|
|
12229
|
+
/**
|
|
12230
|
+
* AnalysisPanelWithSections component.
|
|
12231
|
+
*
|
|
12232
|
+
* This React functional component renders a panel that organizes tools into sections. Each section
|
|
12233
|
+
* includes a title, a divider, and a grid of tool cards. The component supports customizable styling
|
|
12234
|
+
* for global and section-specific classNames.
|
|
12235
|
+
*
|
|
12236
|
+
* @type {React.FC<AnalysisCenterWithSectionsConfiguration>}
|
|
12237
|
+
*
|
|
12238
|
+
* @param {Object} props - The component properties.
|
|
12239
|
+
* @param {Array} props.sections - The array of sections to display in the panel. Each section includes
|
|
12240
|
+
* a label, an optional classNames object for custom styling, and an array of tools.
|
|
12241
|
+
* @param {Object} [props.classNames] - An optional object of global classNames used for styling
|
|
12242
|
+
* components within the panel. These can be overridden on a per-section basis.
|
|
12243
|
+
*
|
|
12244
|
+
* @returns {ReactElement} A React element that renders the analysis panel with sections.
|
|
12245
|
+
*/ const AnalysisCenterWithSections = ({ sections, classNames })=>{
|
|
12246
|
+
const rootClassNamesDefaults = {
|
|
12247
|
+
title: 'font-header font-bold text-2xl uppercase',
|
|
12248
|
+
divider: 'text-accent w-[100px] border-accent mb-4'
|
|
12249
|
+
};
|
|
12250
|
+
const mergedGlobalClassnames = mergeDefaultTailwindClassnames(rootClassNamesDefaults, classNames ?? {});
|
|
12251
|
+
const sectionPanels = useMemo(()=>sections.map((section)=>{
|
|
12252
|
+
const sectionClassnames = mergeDefaultTailwindClassnames(mergedGlobalClassnames, section.classNames ?? {});
|
|
12253
|
+
return /*#__PURE__*/ jsxs(Stack, {
|
|
12254
|
+
gap: "xs",
|
|
12255
|
+
children: [
|
|
12256
|
+
/*#__PURE__*/ jsx(Text, {
|
|
12257
|
+
classNames: {
|
|
12258
|
+
root: sectionClassnames['title']
|
|
12259
|
+
},
|
|
12260
|
+
children: section.label
|
|
12261
|
+
}),
|
|
12262
|
+
/*#__PURE__*/ jsx(Divider, {
|
|
12263
|
+
size: "lg",
|
|
12264
|
+
classNames: {
|
|
12265
|
+
root: sectionClassnames['divider']
|
|
12266
|
+
}
|
|
12267
|
+
}),
|
|
12268
|
+
/*#__PURE__*/ jsx("div", {
|
|
12269
|
+
className: "grid sm:grid-cols-2 md:grid-cols-4 lg:grid-cols-5 gap-4 items-stretch",
|
|
12270
|
+
children: section.tools.map((tool)=>{
|
|
12271
|
+
return /*#__PURE__*/ jsx("div", {
|
|
12272
|
+
children: /*#__PURE__*/ jsx(AnalysisCardCompact, {
|
|
12273
|
+
...tool
|
|
12274
|
+
})
|
|
12275
|
+
}, tool.title);
|
|
12276
|
+
})
|
|
12277
|
+
})
|
|
12278
|
+
]
|
|
12279
|
+
}, section.label);
|
|
12280
|
+
}), [
|
|
12281
|
+
sections
|
|
12282
|
+
]);
|
|
12283
|
+
return /*#__PURE__*/ jsx(Stack, {
|
|
12284
|
+
children: sectionPanels
|
|
12117
12285
|
});
|
|
12118
12286
|
};
|
|
12119
12287
|
|
|
@@ -17639,8 +17807,8 @@ const AnalysisPanel = ({ tools })=>{
|
|
|
17639
17807
|
});
|
|
17640
17808
|
};
|
|
17641
17809
|
|
|
17642
|
-
const AnalysisPage = ({ headerProps, footerProps, tools })=>{
|
|
17643
|
-
return /*#__PURE__*/
|
|
17810
|
+
const AnalysisPage = ({ headerProps, footerProps, tools, sections, classNames })=>{
|
|
17811
|
+
return /*#__PURE__*/ jsxs(NavPageLayout, {
|
|
17644
17812
|
headerProps,
|
|
17645
17813
|
footerProps,
|
|
17646
17814
|
headerData: {
|
|
@@ -17648,9 +17816,21 @@ const AnalysisPage = ({ headerProps, footerProps, tools })=>{
|
|
|
17648
17816
|
content: 'Analysis Center',
|
|
17649
17817
|
key: 'gen3-analysis-center'
|
|
17650
17818
|
},
|
|
17651
|
-
children:
|
|
17652
|
-
tools
|
|
17653
|
-
|
|
17819
|
+
children: [
|
|
17820
|
+
!tools && !sections && /*#__PURE__*/ jsx(Center, {
|
|
17821
|
+
className: "mt-20",
|
|
17822
|
+
children: /*#__PURE__*/ jsx(ErrorCard, {
|
|
17823
|
+
message: "No tools or sections found"
|
|
17824
|
+
})
|
|
17825
|
+
}),
|
|
17826
|
+
tools && /*#__PURE__*/ jsx(AnalysisPanel, {
|
|
17827
|
+
tools: tools
|
|
17828
|
+
}),
|
|
17829
|
+
sections && /*#__PURE__*/ jsx(AnalysisCenterWithSections, {
|
|
17830
|
+
sections: sections,
|
|
17831
|
+
classNames: classNames
|
|
17832
|
+
})
|
|
17833
|
+
]
|
|
17654
17834
|
});
|
|
17655
17835
|
};
|
|
17656
17836
|
|
|
@@ -17664,11 +17844,10 @@ const AnalysisPageGetServerSideProps = async ()=>{
|
|
|
17664
17844
|
}
|
|
17665
17845
|
};
|
|
17666
17846
|
} catch (err) {
|
|
17667
|
-
console.
|
|
17847
|
+
console.warn(err);
|
|
17668
17848
|
return {
|
|
17669
17849
|
props: {
|
|
17670
|
-
...await getNavPageLayoutPropsFromConfig()
|
|
17671
|
-
tools: []
|
|
17850
|
+
...await getNavPageLayoutPropsFromConfig()
|
|
17672
17851
|
}
|
|
17673
17852
|
};
|
|
17674
17853
|
}
|
|
@@ -20830,5 +21009,5 @@ async function credentialsLogout(req, res) {
|
|
|
20830
21009
|
res.redirect(307, '/');
|
|
20831
21010
|
}
|
|
20832
21011
|
|
|
20833
|
-
export { AISearchPageGetServerSideProps, ActionButton, AdminAuthZPageGetServerSideProps, AiSearch, AISearchPage as AiSearchPage, AnalysisCenter, AnalysisEditorPage, AnalysisEditorPageGetServerSideProps, AnalysisPage, AnalysisPageGetServerSideProps, AuthzPage, BaseModal, Charts, CohortBuilder, CollapsableSidebar, ColorThemePage, ColorThemePageGetServerSideProps, ContentSource, CreateCredentialsAPIKeyModal, CrosswalkPage, CrosswalkPageGetServerSideProps, Custom404Page, DataLibraryPage, DataLibraryPageGetServerSideProps, DictionaryPage, DictionaryPageGetServerSideProps, DiscoveryCellRendererFactory, DiscoveryProvider as DiscoveryConfigProvider, DiscoveryIndexPanel, DiscoveryPage, DiscoveryPageGetServerSideProps, DiscoveryRowRendererFactory, DropdownButton, EnumFacetChart, ErrorCard, ExplorerPage, ExplorerPageGetServerSideProps, ExplorerPageGetServerSidePropsForConfigId, ExplorerTableCellRendererFactory, ExplorerTableDetailsPanelFactory, FirstTimeModal, Footer, Gen3Button, Gen3ButtonReverse, Gen3Link, Gen3ModalsProvider, Gen3Provider, GqlQueryEditor$1 as GqlQueryEditor, Header, HoverLink, LandingPage, LandingPageGetStaticProps, LoginButton$1 as LoginButton, LoginPage, LoginPageGetServerSideProps, LoginPanel, LoginProvidersPanel, MinutesToMilliseconds, NavPageLayout, NavigationBar, NavigationButton, NoAccessModal, NotebookLitePage, NotebookLitePageGetStaticProps, ProfilePage, ProfilePageGetServerSideProps, ProfileProvider, ProtectedContent, QueryPage, QueryPageGetServerSideProps, ReactECharts, ResourcesFilters, SPECIAL_CASE_FIELDS, SessionExpiredModal, StudyGroup, SubmissionPage, SubmissionPageGetServerSideProps, TagCloud, TailwindConfig, TopBar, UploadJSONButton, User, Workspace, WorkspaceNoAccessPage, WorkspaceNoAccessPageServerSideProps, WorkspacePage, WorkspacePageGetServerSideProps, capitalize, computeRowSpan, convertMinutesToMilliseconds, convertSecondsToMilliseconds, create10ColorAccessibleContrast, create10ColorPallet, createMantineTheme, credentialsLogin, credentialsLogout, extractObjectKey, focusStyles, getCurrentUnixTimestamp, getNavPageLayoutPropsFromConfig, getParamsValueAsString, getTagInfo, hasOwnProperty, isArrayOfString, isPropertyKey, isTextTransform$1 as isTextTransform, processLabel$1 as processLabel, processRangeKeyLabel, registerCohortBuilderDefaultPreviewRenderers, registerCohortDiscoveryApp, registerCohortSimilarityApp, registerDefaultDiscoveryDataLoaders, registerDiscoveryDefaultCellRenderers, registerDiscoveryDefaultStudyPreviewRenderers, registerExplorerDefaultCellRenderers, registerMetadataSchemaApp, removeKey$1 as removeKey, resourcePathFromProjectID, sessionLogout, sessionToken, stripTrailingSlash, toDisplayName, truncateString, unixTimeToString, useDiscoveryContext, userHasMethodForServiceOnResource$1 as userHasMethodForServiceOnResource };
|
|
21012
|
+
export { AISearchPageGetServerSideProps, ActionButton, AdminAuthZPageGetServerSideProps, AiSearch, AISearchPage as AiSearchPage, AnalysisCenter, AnalysisCenterWithSections, AnalysisEditorPage, AnalysisEditorPageGetServerSideProps, AnalysisPage, AnalysisPageGetServerSideProps, AuthzPage, BaseModal, Charts, CohortBuilder, CollapsableSidebar, ColorThemePage, ColorThemePageGetServerSideProps, ContentSource, CreateCredentialsAPIKeyModal, CrosswalkPage, CrosswalkPageGetServerSideProps, Custom404Page, DataLibraryPage, DataLibraryPageGetServerSideProps, DictionaryPage, DictionaryPageGetServerSideProps, DiscoveryCellRendererFactory, DiscoveryProvider as DiscoveryConfigProvider, DiscoveryIndexPanel, DiscoveryPage, DiscoveryPageGetServerSideProps, DiscoveryRowRendererFactory, DropdownButton, EnumFacetChart, ErrorCard, ExplorerPage, ExplorerPageGetServerSideProps, ExplorerPageGetServerSidePropsForConfigId, ExplorerTableCellRendererFactory, ExplorerTableDetailsPanelFactory, FirstTimeModal, Footer, Gen3Button, Gen3ButtonReverse, Gen3Link, Gen3ModalsProvider, Gen3Provider, GqlQueryEditor$1 as GqlQueryEditor, Header, HoverLink, LandingPage, LandingPageGetStaticProps, LoginButton$1 as LoginButton, LoginPage, LoginPageGetServerSideProps, LoginPanel, LoginProvidersPanel, MinutesToMilliseconds, NavPageLayout, NavigationBar, NavigationButton, NoAccessModal, NotebookLitePage, NotebookLitePageGetStaticProps, ProfilePage, ProfilePageGetServerSideProps, ProfileProvider, ProtectedContent, QueryPage, QueryPageGetServerSideProps, ReactECharts, ResourcesFilters, SPECIAL_CASE_FIELDS, SessionExpiredModal, StudyGroup, SubmissionPage, SubmissionPageGetServerSideProps, TagCloud, TailwindConfig, TopBar, UploadJSONButton, User, Workspace, WorkspaceNoAccessPage, WorkspaceNoAccessPageServerSideProps, WorkspacePage, WorkspacePageGetServerSideProps, capitalize, computeRowSpan, convertMinutesToMilliseconds, convertSecondsToMilliseconds, create10ColorAccessibleContrast, create10ColorPallet, createMantineTheme, credentialsLogin, credentialsLogout, extractObjectKey, focusStyles, getCurrentUnixTimestamp, getNavPageLayoutPropsFromConfig, getParamsValueAsString, getTagInfo, hasOwnProperty, isArrayOfString, isPropertyKey, isTextTransform$1 as isTextTransform, processLabel$1 as processLabel, processRangeKeyLabel, registerCohortBuilderDefaultPreviewRenderers, registerCohortDiscoveryApp, registerCohortSimilarityApp, registerDefaultDiscoveryDataLoaders, registerDiscoveryDefaultCellRenderers, registerDiscoveryDefaultStudyPreviewRenderers, registerExplorerDefaultCellRenderers, registerMetadataSchemaApp, removeKey$1 as removeKey, resourcePathFromProjectID, sessionLogout, sessionToken, stripTrailingSlash, toDisplayName, truncateString, unixTimeToString, useDiscoveryContext, userHasMethodForServiceOnResource$1 as userHasMethodForServiceOnResource };
|
|
20834
21013
|
//# sourceMappingURL=index.js.map
|