pollination-react-io 1.81.0 → 1.82.0

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/index.js CHANGED
@@ -55679,8 +55679,8 @@ var RunCard = function (_a) {
55679
55679
  else {
55680
55680
  window.location.href = "/".concat(projectOwner, "/projects/").concat(projectName, "/?tab=local+studies");
55681
55681
  }
55682
- }, style: hover.project ? { all: 'unset', cursor: 'pointer', color: '#40a9ff' } : { all: 'unset', cursor: 'pointer' } }, projectName !== null && projectName !== void 0 ? projectName : '--',
55683
- localRun && React__default["default"].createElement(Tag, { style: { display: 'inline', marginLeft: '5px', fontSize: '11px' } }, "local"))),
55682
+ }, style: hover.project ? { all: 'unset', cursor: 'pointer', color: '#40a9ff' } : { all: 'unset', cursor: 'pointer' } }, projectName !== null && projectName !== void 0 ? projectName : '--'),
55683
+ localRun && React__default["default"].createElement(Tag, { style: { display: 'inline', marginLeft: '5px', fontSize: '11px' } }, "local")),
55684
55684
  React__default["default"].createElement("div", { className: 'item2' },
55685
55685
  React__default["default"].createElement("div", null,
55686
55686
  !localRun && (!isReady || !study) && React__default["default"].createElement(LoadingOutlined$1, { style: { margin: '0 10px 0 0' } }),
@@ -56470,13 +56470,14 @@ var css_248z$2 = ":root {\n --background: #FFFAEE;\n --primary: #1890ff;\n --
56470
56470
  styleInject(css_248z$2);
56471
56471
 
56472
56472
  var RunContent = function (_a) {
56473
- var inputData = _a.inputData, projectOwner = _a.projectOwner, projectName = _a.projectName, run = _a.run, client = _a.client, title = _a.title, style = _a.style, getFileCard = _a.getFileCard, getFolderCard = _a.getFolderCard, _b = _a.isCloud, isCloud = _b === void 0 ? true : _b;
56473
+ var inputData = _a.inputData, projectOwner = _a.projectOwner, projectName = _a.projectName, run = _a.run, client = _a.client, title = _a.title, style = _a.style, getFileCard = _a.getFileCard, getFolderCard = _a.getFolderCard, _b = _a.isCloud, isCloud = _b === void 0 ? true : _b, _c = _a.isOpen, isOpen = _c === void 0 ? true : _c;
56474
56474
  var getTrigger = useRuns(client).getTrigger;
56475
- var _c = React.useState([]), currData = _c[0], setCurrData = _c[1];
56475
+ var _d = React.useState([]), currData = _d[0], setCurrData = _d[1];
56476
56476
  var fileExplorer = usePollinationPanel().fileExplorer;
56477
- var _d = React.useState([]), currParams = _d[0], setCurrParams = _d[1];
56478
- var _e = React.useState([]), currFiles = _e[0], setCurrFiles = _e[1];
56479
- var _f = React.useState([]), currFolders = _f[0], setCurrFolders = _f[1];
56477
+ var _e = React.useState([]), currParams = _e[0], setCurrParams = _e[1];
56478
+ var _f = React.useState([]), currFiles = _f[0], setCurrFiles = _f[1];
56479
+ var _g = React.useState([]), currFolders = _g[0], setCurrFolders = _g[1];
56480
+ var _h = React.useState(isOpen), open = _h[0], setOpen = _h[1];
56480
56481
  var trigger = React.useMemo(function () { return isCloud ? getTrigger(run) : false; }, [run, isCloud]);
56481
56482
  React.useEffect(function () { return setCurrData(inputData); }, [inputData]);
56482
56483
  React.useEffect(function () {
@@ -56543,18 +56544,22 @@ var RunContent = function (_a) {
56543
56544
  }
56544
56545
  };
56545
56546
  return React__default["default"].createElement("div", { className: 'cards-container', style: __assign({}, style) },
56546
- React__default["default"].createElement("h5", { className: 'cards-container-title' }, title || 'Something'),
56547
- currFiles.length > 0 && projectOwner && projectName && client && run && React__default["default"].createElement("div", { style: { padding: '20px' } },
56547
+ React__default["default"].createElement("h5", { className: 'cards-container-title', role: 'button', onClick: function (e) {
56548
+ e.stopPropagation();
56549
+ setOpen(function (prev) { return !prev; });
56550
+ } }, title || 'Something'),
56551
+ !open && React__default["default"].createElement("p", null),
56552
+ open && currFiles.length > 0 && projectOwner && projectName && client && run && React__default["default"].createElement("div", { style: { padding: '20px' } },
56548
56553
  React__default["default"].createElement("div", { className: 'cards' }, currFiles.map(function (_a, index) {
56549
56554
  var label = _a.label, path = _a.path, description = _a.description;
56550
56555
  return React__default["default"].createElement(FileCard, { projectOwner: projectOwner, projectName: projectName, run: run, client: client, key: "filecard-".concat(index), label: label, path: path, description: description, onClicked: onFileClicked, isCloud: isCloud });
56551
56556
  }))),
56552
- currFolders.length > 0 && React__default["default"].createElement("div", { style: { padding: '20px' } },
56557
+ open && currFolders.length > 0 && React__default["default"].createElement("div", { style: { padding: '20px' } },
56553
56558
  React__default["default"].createElement("div", { className: 'cards' }, currFolders.map(function (_a, index) {
56554
56559
  var label = _a.label, path = _a.path, description = _a.description;
56555
56560
  return React__default["default"].createElement(FolderCard, { key: "foldercard-".concat(index), label: label, path: path, description: description, onClicked: onFolderClicked });
56556
56561
  }))),
56557
- currParams.length > 0 && React__default["default"].createElement("div", { style: { padding: '20px' } },
56562
+ open && currParams.length > 0 && React__default["default"].createElement("div", { style: { padding: '20px' } },
56558
56563
  React__default["default"].createElement("div", { className: 'cards' }, currParams && currParams.map(function (_a, index) {
56559
56564
  var label = _a.label, value = _a.value, type = _a.type, description = _a.description;
56560
56565
  return React__default["default"].createElement(ParamCard, { key: "parmcard-".concat(index), label: label, value: value, type: type, description: description });
@@ -56596,9 +56601,9 @@ var RunDetails = function (_a) {
56596
56601
  outputs &&
56597
56602
  React__default["default"].createElement(RunContent, { title: 'Outputs', inputData: outputs, projectName: projectName, projectOwner: projectOwner, run: run, client: client, style: style, getFileCard: getFileCard, getFolderCard: getFolderCard, isCloud: isCloud }),
56598
56603
  recipeInputs &&
56599
- React__default["default"].createElement(RunContent, { title: 'Inputs', inputData: recipeInputs, projectName: projectName, projectOwner: projectOwner, run: run, client: client, style: style, getFileCard: getFileCard, getFolderCard: getFolderCard, isCloud: isCloud }),
56604
+ React__default["default"].createElement(RunContent, { title: 'Inputs', inputData: recipeInputs, projectName: projectName, projectOwner: projectOwner, run: run, client: client, style: style, getFileCard: getFileCard, getFolderCard: getFolderCard, isCloud: isCloud, isOpen: false }),
56600
56605
  extraInputs && extraInputs.length > 0 &&
56601
- React__default["default"].createElement(RunContent, { title: 'Extra Inputs', inputData: extraInputs, projectName: projectName, projectOwner: projectOwner, run: run, client: client, style: style, getFileCard: getFileCard, getFolderCard: getFolderCard, isCloud: isCloud })));
56606
+ React__default["default"].createElement(RunContent, { title: 'Extra Inputs', inputData: extraInputs, projectName: projectName, projectOwner: projectOwner, run: run, client: client, style: style, getFileCard: getFileCard, getFolderCard: getFolderCard, isCloud: isCloud, isOpen: false })));
56602
56607
  };
56603
56608
 
56604
56609
  var css_248z$1 = ":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.run-progress {\n grid-area: runprogress;\n font-size: 0.9rem;\n text-align: left !important;\n}\n\n.run-link {\n grid-area: runlink;\n text-align: right !important;\n font-size: 1rem;\n white-space: nowrap;\n}\n\n.run-details {\n grid-area: rundetails;\n font-size: 0.9rem;\n}\n\n.study-run-container {\n display: grid;\n grid-template-areas: \"runprogress runprogress runprogress runprogress runprogress runlink\" \"rundetails rundetails rundetails rundetails rundetails rundetails\";\n gap: 0.35rem;\n border: 0.1rem solid;\n align-items: center;\n padding: 0.75rem;\n transition: box-shadow 0.3s ease 0s, border-color 0.3s ease 0s;\n grid-template-rows: max-content auto;\n border-radius: 6px;\n line-height: 1.5;\n}\n\n.study-run-container:hover {\n cursor: pointer;\n box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 2px -2px, rgba(0, 0, 0, 0.12) 0px 3px 6px 0px, rgba(0, 0, 0, 0.09) 0px 5px 12px 4px;\n}\n\n.run-navigator {\n display: grid;\n grid-template-columns: min-content auto min-content min-content;\n grid-auto-rows: auto;\n align-items: center;\n grid-gap: 0.9rem;\n}\n\n.run-pg-input {\n margin: 0 4px 0 4px;\n padding: 8px 8px;\n text-align: center;\n color: rgba(0, 0, 0, 0.8509803922);\n width: min-content;\n border-radius: 2px;\n font-size: 12px;\n border: 1px solid rgba(0, 0, 0, 0.125);\n}\n\n.container-scroll {\n display: inline-flex;\n flex-direction: row;\n overflow-x: auto;\n width: 100%;\n}\n\n.blink-effect {\n animation: blinker 5s linear infinite;\n}\n\n@keyframes blinker {\n 50% {\n border: 0.1rem solid white;\n }\n}";