pollination-react-io 1.41.0 → 1.41.2
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/build/Cards/RunCard.types.d.ts +6 -0
- package/build/index.esm.js +28 -18
- package/build/index.esm.js.map +1 -1
- package/build/index.js +28 -18
- package/build/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { Run, UserPrivate } from '@pollination-solutions/pollination-sdk';
|
|
2
2
|
import { CSSProperties } from 'react';
|
|
3
3
|
import { APIClient } from '../hooks';
|
|
4
|
+
export declare enum RunTabs {
|
|
5
|
+
details = "details",
|
|
6
|
+
debug = "debug",
|
|
7
|
+
workspace = "workspace"
|
|
8
|
+
}
|
|
4
9
|
export interface RunCardProps {
|
|
5
10
|
projectOwner: string;
|
|
6
11
|
projectName: string;
|
|
@@ -10,4 +15,5 @@ export interface RunCardProps {
|
|
|
10
15
|
authUser?: UserPrivate;
|
|
11
16
|
client?: APIClient;
|
|
12
17
|
getValue?: (any: any) => any;
|
|
18
|
+
defaultTab?: RunTabs;
|
|
13
19
|
}
|
package/build/index.esm.js
CHANGED
|
@@ -48544,7 +48544,7 @@ var StudyCard = function (_a) {
|
|
|
48544
48544
|
window.location.href = "/".concat(projectOwner, "/projects/").concat(projectName, "/studies/").concat(study.id);
|
|
48545
48545
|
}
|
|
48546
48546
|
else if (study && run) {
|
|
48547
|
-
window.location.href = "/".concat(projectOwner, "/projects/").concat(projectName, "/studies/").concat(study.id, "/runs/").concat(run.id);
|
|
48547
|
+
window.location.href = "/".concat(projectOwner, "/projects/").concat(projectName, "/studies/").concat(study.id, "/runs/").concat(run.id, "?tab=details");
|
|
48548
48548
|
}
|
|
48549
48549
|
else ;
|
|
48550
48550
|
} },
|
|
@@ -48559,7 +48559,7 @@ var StudyCard = function (_a) {
|
|
|
48559
48559
|
React__default.createElement("div", null,
|
|
48560
48560
|
React__default.createElement(InfoCircleOutlined$1, { className: 'link', onClick: function (e) {
|
|
48561
48561
|
e.stopPropagation();
|
|
48562
|
-
document.location = "/".concat(projectOwner, "/projects/").concat(projectName, "/studies/").concat(study.id, "/runs/").concat(run.id, "?tab=
|
|
48562
|
+
document.location = "/".concat(projectOwner, "/projects/").concat(projectName, "/studies/").concat(study.id, "/runs/").concat(run.id, "?tab=details");
|
|
48563
48563
|
}, onMouseOver: function (e) {
|
|
48564
48564
|
toggleHover(e, 'detailsOver', true);
|
|
48565
48565
|
}, onMouseLeave: function (e) {
|
|
@@ -48632,6 +48632,13 @@ var StudyCard = function (_a) {
|
|
|
48632
48632
|
React__default.createElement("div", { className: 'item7' }, study ? study.spec.description : '--'))));
|
|
48633
48633
|
};
|
|
48634
48634
|
|
|
48635
|
+
var RunTabs;
|
|
48636
|
+
(function (RunTabs) {
|
|
48637
|
+
RunTabs["details"] = "details";
|
|
48638
|
+
RunTabs["debug"] = "debug";
|
|
48639
|
+
RunTabs["workspace"] = "workspace";
|
|
48640
|
+
})(RunTabs || (RunTabs = {}));
|
|
48641
|
+
|
|
48635
48642
|
dayjs_min.extend(duration);
|
|
48636
48643
|
dayjs_min.extend(utc);
|
|
48637
48644
|
var formatDuration = function (duration) {
|
|
@@ -48639,7 +48646,7 @@ var formatDuration = function (duration) {
|
|
|
48639
48646
|
};
|
|
48640
48647
|
var RunCard = function (_a) {
|
|
48641
48648
|
var _b, _c, _d, _e;
|
|
48642
|
-
var projectName = _a.projectName, projectOwner = _a.projectOwner, _run = _a.run, style = _a.style, authUser = _a.authUser, client = _a.client, enableClick = _a.enableClick, getValue = _a.getValue;
|
|
48649
|
+
var projectName = _a.projectName, projectOwner = _a.projectOwner, _run = _a.run, style = _a.style, authUser = _a.authUser, client = _a.client, enableClick = _a.enableClick, getValue = _a.getValue, defaultTab = _a.defaultTab;
|
|
48643
48650
|
/*
|
|
48644
48651
|
* Fetch run
|
|
48645
48652
|
*/
|
|
@@ -48726,39 +48733,42 @@ var RunCard = function (_a) {
|
|
|
48726
48733
|
React__default.createElement("div", null,
|
|
48727
48734
|
React__default.createElement(InfoCircleOutlined$1, { className: 'link', onClick: function (e) {
|
|
48728
48735
|
e.stopPropagation();
|
|
48729
|
-
getValue(
|
|
48730
|
-
toggleHover(e,
|
|
48731
|
-
toggleHover(e,
|
|
48732
|
-
toggleHover(e,
|
|
48736
|
+
getValue(RunTabs.details);
|
|
48737
|
+
toggleHover(e, RunTabs.workspace, false);
|
|
48738
|
+
toggleHover(e, RunTabs.details, true);
|
|
48739
|
+
toggleHover(e, RunTabs.debug, false);
|
|
48733
48740
|
}, onMouseOver: function (e) {
|
|
48734
48741
|
toggleHover(e, 'detailsOver', true);
|
|
48735
48742
|
}, onMouseLeave: function (e) {
|
|
48736
48743
|
toggleHover(e, 'detailsOver', false);
|
|
48737
48744
|
}, style: { marginRight: '0.75rem',
|
|
48738
|
-
color: "".concat((hover.details || hover.detailsOver)
|
|
48745
|
+
color: "".concat((hover.details || hover.detailsOver) || defaultTab === RunTabs.details
|
|
48746
|
+
? '#40a9ff' : '#000') } }),
|
|
48739
48747
|
React__default.createElement(FolderOutlined$1, { className: 'link', onClick: function (e) {
|
|
48740
48748
|
e.stopPropagation();
|
|
48741
|
-
getValue(
|
|
48742
|
-
toggleHover(e,
|
|
48743
|
-
toggleHover(e,
|
|
48744
|
-
toggleHover(e,
|
|
48749
|
+
getValue(RunTabs.workspace);
|
|
48750
|
+
toggleHover(e, RunTabs.workspace, true);
|
|
48751
|
+
toggleHover(e, RunTabs.details, false);
|
|
48752
|
+
toggleHover(e, RunTabs.debug, false);
|
|
48745
48753
|
}, onMouseOver: function (e) {
|
|
48746
48754
|
toggleHover(e, 'workspaceOver', true);
|
|
48747
48755
|
}, onMouseLeave: function (e) {
|
|
48748
48756
|
toggleHover(e, 'workspaceOver', false);
|
|
48749
48757
|
}, style: { marginRight: '0.75rem',
|
|
48750
|
-
color: "".concat((hover.workspace || hover.workspaceOver)
|
|
48758
|
+
color: "".concat((hover.workspace || hover.workspaceOver) || defaultTab === RunTabs.workspace
|
|
48759
|
+
? '#40a9ff' : '#000') } }),
|
|
48751
48760
|
React__default.createElement(PartitionOutlined$1, { className: 'link', onClick: function (e) {
|
|
48752
48761
|
e.stopPropagation();
|
|
48753
|
-
getValue(
|
|
48754
|
-
toggleHover(e,
|
|
48755
|
-
toggleHover(e,
|
|
48756
|
-
toggleHover(e,
|
|
48762
|
+
getValue(RunTabs.debug);
|
|
48763
|
+
toggleHover(e, RunTabs.workspace, false);
|
|
48764
|
+
toggleHover(e, RunTabs.details, false);
|
|
48765
|
+
toggleHover(e, RunTabs.debug, true);
|
|
48757
48766
|
}, onMouseOver: function (e) {
|
|
48758
48767
|
toggleHover(e, 'debugOver', true);
|
|
48759
48768
|
}, onMouseLeave: function (e) {
|
|
48760
48769
|
toggleHover(e, 'debugOver', false);
|
|
48761
|
-
}, style: { color: "".concat((hover.debug || hover.debugOver)
|
|
48770
|
+
}, style: { color: "".concat((hover.debug || hover.debugOver) || defaultTab === RunTabs.debug
|
|
48771
|
+
? '#40a9ff' : '#000') } }))),
|
|
48762
48772
|
React__default.createElement("div", { className: 'item3' },
|
|
48763
48773
|
React__default.createElement("div", null,
|
|
48764
48774
|
study ? (_d = study.spec.name) !== null && _d !== void 0 ? _d : "Study: ".concat(study.id) : '--',
|