pollination-react-io 1.36.0 → 1.36.1
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 +1 -2
- package/build/index.esm.js +17 -6
- package/build/index.esm.js.map +1 -1
- package/build/index.js +17 -6
- package/build/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Run, UserPrivate } from '@pollination-solutions/pollination-sdk';
|
|
2
2
|
import { CSSProperties } from 'react';
|
|
3
3
|
import { APIClient } from '../hooks';
|
|
4
4
|
export interface RunCardProps {
|
|
5
5
|
projectOwner: string;
|
|
6
6
|
projectName: string;
|
|
7
|
-
study?: CloudJob;
|
|
8
7
|
run?: Run;
|
|
9
8
|
style?: CSSProperties;
|
|
10
9
|
authUser?: UserPrivate;
|
package/build/index.esm.js
CHANGED
|
@@ -46970,7 +46970,7 @@ var SendModel = function (_a) {
|
|
|
46970
46970
|
}], asButtons: true, label: buttonLabel, helpText: "".concat(selOpt ? selOpt.charAt(0).toUpperCase() + selOpt.replace('-', ' ').slice(1) : 'Send', " model.") }));
|
|
46971
46971
|
};
|
|
46972
46972
|
|
|
46973
|
-
var css_248z = ":root {\n --background: #FFFAEE;\n --primary: #1890ff;\n --primary2: #40a9ff;\n --primary1: #cceefe;\n --primary0: #e6f7ff;\n --secondary: #fff566;\n --primary3: #000;\n --success: #46A758;\n --warning: #F76809;\n --danger: #FF4616;\n /* radix-ui/colors */\n --slate1: hsl(206, 30.0%, 98.8%);\n --slate2: hsl(210, 16.7%, 97.6%);\n --slate3: hsl(209, 13.3%, 95.3%);\n --slate4: hsl(209, 12.2%, 93.2%);\n --slate5: hsl(208, 11.7%, 91.1%);\n --slate6: hsl(208, 11.3%, 88.9%);\n --slate7: hsl(207, 11.1%, 85.9%);\n --slate8: hsl(205, 10.7%, 78.0%);\n --slate9: hsl(206, 6.0%, 56.1%);\n --slate10: hsl(206, 5.8%, 52.3%);\n --slate11: hsl(206, 6.0%, 43.5%);\n --slate12: hsl(206, 24.0%, 9.0%);\n}\n\n@keyframes spin {\n from {\n transform: rotate(0);\n }\n to {\n transform: rotate(360deg);\n }\n}\n.spin {\n animation: spin 1s linear 0s infinite;\n}\n\n@keyframes Animation {\n 0% {\n background-position: 200%;\n }\n 50% {\n background-position: 100%;\n }\n 100% {\n background-position: 0%;\n }\n}\n.loading {\n background: linear-gradient(45deg, transparent, var(--primary), 12%, transparent);\n background-size: 200%;\n animation: Animation 3s ease infinite;\n}\n\n@keyframes open {\n from {\n height: 0;\n }\n to {\n height: var(--radix-collapsible-content-height);\n }\n}\n@keyframes close {\n from {\n height: var(--radix-collapsible-content-height);\n }\n to {\n height: 0;\n }\n}\n.collapse-content {\n overflow: hidden;\n font-size: inherit;\n color: inherit;\n}\n\n.collapse-content[data-state=open] {\n animation: open 300ms ease-out;\n}\n\n.collapse-content[data-state=closed] {\n animation: close 300ms ease-out;\n}\n\n.item1 {\n grid-area: accountprj;\n font-size: 1.125rem;\n font-weight: 500;\n white-space: wrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.item2 {\n grid-area: runworkspacedebug;\n text-align: right !important;\n font-size: 1.25rem;\n white-space: nowrap;\n}\n\n.item3 {\n grid-area: studyrun;\n font-size: 1.25rem;\n font-weight: 500;\n white-space: wrap;\n overflow: hidden;\n text-overflow: ellipsis;\n line-height: normal;\n}\n\n.item4 {\n grid-area: date;\n color: var(--slate10);\n font-size: 0.9rem;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n text-align: right !important;\n}\n\n.item5 {\n grid-area: author;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.item6 {\n grid-area: recipe;\n white-space: wrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.item7 {\n grid-area: description;\n white-space: wrap;\n color: var(--slate10);\n font-size: 0.9rem;\n}\n\n.item8 {\n grid-area: status;\n}\n\n.status-label {\n font-size: 1.125rem;\n line-height: 1.5rem;\n font-weight: 500;\n}\n\n.item9 {\n grid-area: timecpu;\n text-align: right !important;\n white-space: wrap;\n}\n\n.item10 {\n grid-area: seemore;\n text-align: center !important;\n}\n\n.link {\n cursor:
|
|
46973
|
+
var css_248z = ":root {\n --background: #FFFAEE;\n --primary: #1890ff;\n --primary2: #40a9ff;\n --primary1: #cceefe;\n --primary0: #e6f7ff;\n --secondary: #fff566;\n --primary3: #000;\n --success: #46A758;\n --warning: #F76809;\n --danger: #FF4616;\n /* radix-ui/colors */\n --slate1: hsl(206, 30.0%, 98.8%);\n --slate2: hsl(210, 16.7%, 97.6%);\n --slate3: hsl(209, 13.3%, 95.3%);\n --slate4: hsl(209, 12.2%, 93.2%);\n --slate5: hsl(208, 11.7%, 91.1%);\n --slate6: hsl(208, 11.3%, 88.9%);\n --slate7: hsl(207, 11.1%, 85.9%);\n --slate8: hsl(205, 10.7%, 78.0%);\n --slate9: hsl(206, 6.0%, 56.1%);\n --slate10: hsl(206, 5.8%, 52.3%);\n --slate11: hsl(206, 6.0%, 43.5%);\n --slate12: hsl(206, 24.0%, 9.0%);\n}\n\n@keyframes spin {\n from {\n transform: rotate(0);\n }\n to {\n transform: rotate(360deg);\n }\n}\n.spin {\n animation: spin 1s linear 0s infinite;\n}\n\n@keyframes Animation {\n 0% {\n background-position: 200%;\n }\n 50% {\n background-position: 100%;\n }\n 100% {\n background-position: 0%;\n }\n}\n.loading {\n background: linear-gradient(45deg, transparent, var(--primary), 12%, transparent);\n background-size: 200%;\n animation: Animation 3s ease infinite;\n}\n\n@keyframes open {\n from {\n height: 0;\n }\n to {\n height: var(--radix-collapsible-content-height);\n }\n}\n@keyframes close {\n from {\n height: var(--radix-collapsible-content-height);\n }\n to {\n height: 0;\n }\n}\n.collapse-content {\n overflow: hidden;\n font-size: inherit;\n color: inherit;\n}\n\n.collapse-content[data-state=open] {\n animation: open 300ms ease-out;\n}\n\n.collapse-content[data-state=closed] {\n animation: close 300ms ease-out;\n}\n\n.item1 {\n grid-area: accountprj;\n font-size: 1.125rem;\n font-weight: 500;\n white-space: wrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.item2 {\n grid-area: runworkspacedebug;\n text-align: right !important;\n font-size: 1.25rem;\n white-space: nowrap;\n}\n\n.item3 {\n grid-area: studyrun;\n font-size: 1.25rem;\n font-weight: 500;\n white-space: wrap;\n overflow: hidden;\n text-overflow: ellipsis;\n line-height: normal;\n}\n\n.item4 {\n grid-area: date;\n color: var(--slate10);\n font-size: 0.9rem;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n text-align: right !important;\n}\n\n.item5 {\n grid-area: author;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.item6 {\n grid-area: recipe;\n white-space: wrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.item7 {\n grid-area: description;\n white-space: wrap;\n color: var(--slate10);\n font-size: 0.9rem;\n}\n\n.item8 {\n grid-area: status;\n}\n\n.status-label {\n font-size: 1.125rem;\n line-height: 1.5rem;\n font-weight: 500;\n}\n\n.item9 {\n grid-area: timecpu;\n text-align: right !important;\n white-space: wrap;\n}\n\n.item10 {\n grid-area: seemore;\n text-align: center !important;\n}\n\n.link {\n cursor: crosshair;\n text-decoration: none;\n color: var(--primary3);\n}\n\n.link:hover {\n color: var(--primary3);\n}\n\n.light-text {\n color: var(--slate10);\n font-size: 0.9rem;\n}\n\n.grid-container {\n display: grid;\n grid-template-areas: \"accountprj accountprj accountprj accountprj accountprj runworkspacedebug\" \"studyrun studyrun studyrun studyrun date date\" \"author author recipe recipe recipe recipe\" \"description description description description description description\" \"status status status status status timecpu\" \"seemore seemore seemore seemore seemore seemore\";\n gap: 0.35rem;\n border: 0.1rem solid;\n align-items: center;\n padding: 0.35rem;\n transition: box-shadow 0.3s;\n grid-template-rows: auto auto 46px auto auto 18px;\n}\n\n.grid-container:hover {\n box-shadow: 0 0 0.75rem var(--slate9);\n cursor: pointer;\n}\n\n.grid-container > div {\n text-align: left;\n padding: 1rem;\n vertical-align: middle;\n}\n\n@media (max-width: 600px) {\n .grid-container {\n display: grid;\n grid-template-areas: \"accountprj accountprj accountprj accountprj accountprj runworkspacedebug\" \"studyrun studyrun studyrun studyrun studyrun studyrun\" \"date date date date date date\" \"author author recipe recipe recipe recipe\" \"description description description description description description\" \"status status status status status timecpu\" \"seemore seemore seemore seemore seemore seemore\";\n gap: 0.35rem;\n border: 0.1rem solid;\n align-items: center;\n padding: 0.15rem;\n transition: box-shadow 0.3s;\n grid-template-rows: auto auto 32px 24px auto auto 18px;\n }\n .item1 {\n font-size: 1rem;\n white-space: nowrap;\n text-align: left !important;\n }\n .item2 {\n text-align: right !important;\n font-size: 1rem;\n white-space: nowrap;\n }\n .item3, .item4 {\n text-align: center !important;\n }\n .item5 {\n font-size: 0.8rem;\n }\n .item6 {\n white-space: nowrap;\n font-size: 0.8rem;\n }\n .item7 {\n font-size: 0.8rem;\n text-align: center !important;\n }\n .grid-container > div {\n text-align: left;\n vertical-align: middle;\n }\n}";
|
|
46974
46974
|
styleInject(css_248z);
|
|
46975
46975
|
|
|
46976
46976
|
var IconContext = /*#__PURE__*/createContext({});
|
|
@@ -48406,7 +48406,15 @@ var StudyCard = function (_a) {
|
|
|
48406
48406
|
}, 1000);
|
|
48407
48407
|
return study.status.finished_at ? undefined : function () { return clearInterval(handle); };
|
|
48408
48408
|
}, [study]);
|
|
48409
|
-
return (React__default.createElement("div", { className: 'grid-container', style: __assign({ borderColor: (_c = (_b = statusMap[status]) === null || _b === void 0 ? void 0 : _b.color) !== null && _c !== void 0 ? _c : '#d0d7de' }, style)
|
|
48409
|
+
return (React__default.createElement("div", { className: 'grid-container', style: __assign({ borderColor: (_c = (_b = statusMap[status]) === null || _b === void 0 ? void 0 : _b.color) !== null && _c !== void 0 ? _c : '#d0d7de' }, style), onClick: function () {
|
|
48410
|
+
if (study && total > 1) {
|
|
48411
|
+
window.location.href = "/".concat(projectOwner, "/projects/").concat(projectName, "/studies/").concat(study.id);
|
|
48412
|
+
}
|
|
48413
|
+
else if (study && run) {
|
|
48414
|
+
window.location.href = "/".concat(projectOwner, "/projects/").concat(projectName, "/studies/").concat(study.id, "/runs/").concat(run.id);
|
|
48415
|
+
}
|
|
48416
|
+
else ;
|
|
48417
|
+
} },
|
|
48410
48418
|
React__default.createElement("div", { className: 'item1' },
|
|
48411
48419
|
React__default.createElement("a", { className: 'link', style: { marginRight: '0.75rem' }, href: study && "/".concat(study.owner.name) },
|
|
48412
48420
|
React__default.createElement(Avatar, { src: study ? study.owner.picture_url : '', size: 32 })),
|
|
@@ -48428,7 +48436,7 @@ var StudyCard = function (_a) {
|
|
|
48428
48436
|
React__default.createElement(FolderOutlined$1, null)))),
|
|
48429
48437
|
React__default.createElement("div", { className: 'item3' },
|
|
48430
48438
|
React__default.createElement("div", null,
|
|
48431
|
-
|
|
48439
|
+
study ? (_d = study.spec.name) !== null && _d !== void 0 ? _d : "Study: ".concat(study.id) : '--',
|
|
48432
48440
|
study && total > 1 && "(#".concat(total, ")"))),
|
|
48433
48441
|
React__default.createElement("div", { className: 'item4' }, study ? dayjs_min(study.status.started_at).format('[on] MMM DD YYYY') : '--'),
|
|
48434
48442
|
React__default.createElement("div", { className: 'item5' },
|
|
@@ -48509,7 +48517,11 @@ var RunCard = function (_a) {
|
|
|
48509
48517
|
}, 1000);
|
|
48510
48518
|
return run.status.finished_at ? undefined : function () { return clearInterval(handle); };
|
|
48511
48519
|
}, [run]);
|
|
48512
|
-
return (React__default.createElement("div", { className: 'grid-container', style: __assign({ borderColor: (_c = (_b = statusMap[status]) === null || _b === void 0 ? void 0 : _b.color) !== null && _c !== void 0 ? _c : '#d0d7de' }, style)
|
|
48520
|
+
return (React__default.createElement("div", { className: 'grid-container', style: __assign({ borderColor: (_c = (_b = statusMap[status]) === null || _b === void 0 ? void 0 : _b.color) !== null && _c !== void 0 ? _c : '#d0d7de' }, style), onClick: function () {
|
|
48521
|
+
if (run) {
|
|
48522
|
+
window.location.href = "/".concat(projectOwner, "/projects/").concat(projectName, "/studies/").concat(study.id, "/runs/").concat(run.id);
|
|
48523
|
+
}
|
|
48524
|
+
} },
|
|
48513
48525
|
React__default.createElement("div", { className: 'item1' },
|
|
48514
48526
|
React__default.createElement("a", { className: 'link', style: { marginRight: '0.75rem' }, href: study && "/".concat(study.owner.name) },
|
|
48515
48527
|
React__default.createElement(Avatar, { src: study ? study.owner.picture_url : '', size: 32 })),
|
|
@@ -48526,8 +48538,7 @@ var RunCard = function (_a) {
|
|
|
48526
48538
|
React__default.createElement("a", { className: 'link', href: "/".concat(projectOwner, "/projects/").concat(projectName, "/studies/").concat(study.id, "/runs/").concat(run.id, "/debug") },
|
|
48527
48539
|
React__default.createElement(PartitionOutlined$1, null)))),
|
|
48528
48540
|
React__default.createElement("div", { className: 'item3' },
|
|
48529
|
-
React__default.createElement("div", null,
|
|
48530
|
-
React__default.createElement("a", { style: { marginRight: '0.75rem' }, className: 'link', href: study && "/".concat(projectOwner, "/projects/").concat(projectName, "/studies/").concat(study.id) }, study ? (_d = study.spec.name) !== null && _d !== void 0 ? _d : "Study: ".concat(study.id) : '--'))),
|
|
48541
|
+
React__default.createElement("div", null, study ? (_d = study.spec.name) !== null && _d !== void 0 ? _d : "Study: ".concat(study.id) : '--')),
|
|
48531
48542
|
React__default.createElement("div", { className: 'item4' }, study ? dayjs_min(study.status.started_at).format('[on] MMM DD YYYY') : '--'),
|
|
48532
48543
|
React__default.createElement("div", { className: 'item5' },
|
|
48533
48544
|
React__default.createElement("span", { style: { marginRight: '0.75rem' } },
|