pollination-react-io 1.95.1 → 1.95.3
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.esm.js +23 -14
- package/build/index.esm.js.map +1 -1
- package/build/index.js +23 -14
- package/build/index.js.map +1 -1
- package/package.json +1 -1
- package/build/RunCard/RunCard.d.ts +0 -9
- package/build/RunCard/RunCard.types.d.ts +0 -13
package/build/index.js
CHANGED
@@ -47290,6 +47290,15 @@ var RecipeForm = function (_a) {
|
|
47290
47290
|
});
|
47291
47291
|
return data;
|
47292
47292
|
}, [recipe, handlers, triggers, controlledValues]);
|
47293
|
+
React.useEffect(function () {
|
47294
|
+
// Refresh input if controlled value changes
|
47295
|
+
if (!controlledValues)
|
47296
|
+
return;
|
47297
|
+
var names = Object.keys(controlledValues);
|
47298
|
+
inputs.forEach(function (_) {
|
47299
|
+
names.includes(_.name) && handleReset(_);
|
47300
|
+
});
|
47301
|
+
}, [inputs]);
|
47293
47302
|
/**
|
47294
47303
|
* LOCAL ONLY - Create a copy of the recipe and remove alias
|
47295
47304
|
*/
|
@@ -56427,16 +56436,16 @@ var RunCard = function (_a) {
|
|
56427
56436
|
*/
|
56428
56437
|
var fetchJob = useJobs(client).fetchJob;
|
56429
56438
|
var _5 = useRuns(client), fetchRun = _5.fetchRun, statusMap = _5.statusMap, getDuration = _5.getDuration, cancelRun = _5.cancelRun, retryRun = _5.retryRun;
|
56430
|
-
var
|
56431
|
-
var
|
56432
|
-
var
|
56433
|
-
var
|
56434
|
-
var
|
56435
|
-
var
|
56439
|
+
var width = useWindowDimensions().width;
|
56440
|
+
var _6 = React.useState(false), seeDescription = _6[0], setSeeDescription = _6[1];
|
56441
|
+
var _7 = React.useState(false), seeAction = _7[0], setSeeAction = _7[1];
|
56442
|
+
var _8 = React.useState(false), stopRefresh = _8[0], setStopRefresh = _8[1];
|
56443
|
+
var _9 = React.useState(false), isReady = _9[0], setIsReady = _9[1];
|
56444
|
+
var _10 = React.useState(false), retryLoading = _10[0], setRetryLoading = _10[1];
|
56436
56445
|
/*
|
56437
56446
|
* From run and stop when it is done
|
56438
56447
|
*/
|
56439
|
-
var
|
56448
|
+
var _11 = useSWR(authUser && _run ? (!localRun ? [projectOwner, projectName, _run.id] : [_run.id, _run['subfolder']]) : undefined, localRun ? fetchLocalRun : fetchRun, {
|
56440
56449
|
revalidateOnFocus: true,
|
56441
56450
|
refreshWhenHidden: true,
|
56442
56451
|
refreshInterval: stopRefresh ? undefined : interval,
|
@@ -56452,7 +56461,7 @@ var RunCard = function (_a) {
|
|
56452
56461
|
setStopRefresh(true);
|
56453
56462
|
setIsReady(true);
|
56454
56463
|
}
|
56455
|
-
}), run =
|
56464
|
+
}), run = _11.data, error = _11.error;
|
56456
56465
|
var sendRun = React.useCallback(function (run) { return getValue(run); }, [getValue]);
|
56457
56466
|
/**
|
56458
56467
|
* Fetch job just one time
|
@@ -56476,9 +56485,9 @@ var RunCard = function (_a) {
|
|
56476
56485
|
return undefined;
|
56477
56486
|
return run.status.status;
|
56478
56487
|
}, [run]);
|
56479
|
-
var
|
56480
|
-
var
|
56481
|
-
var
|
56488
|
+
var _12 = React.useState(), study = _12[0], setStudy = _12[1];
|
56489
|
+
var _13 = React.useState(), localStudy = _13[0], setLocalStudy = _13[1];
|
56490
|
+
var _14 = React.useState(getDuration(run)), duration = _14[0], setDuration = _14[1];
|
56482
56491
|
React.useEffect(function () {
|
56483
56492
|
if (!run)
|
56484
56493
|
return;
|
@@ -56510,7 +56519,7 @@ var RunCard = function (_a) {
|
|
56510
56519
|
info: false,
|
56511
56520
|
settings: false,
|
56512
56521
|
}); }, []);
|
56513
|
-
var
|
56522
|
+
var _15 = React.useState(__assign(__assign({}, emptyHover), (_b = {}, _b[defaultTab] = true, _b))), hover = _15[0], setHover = _15[1];
|
56514
56523
|
var toggleHover = React.useCallback(function (id, value) {
|
56515
56524
|
if (value === void 0) { value = false; }
|
56516
56525
|
setHover(function (prevHover) {
|
@@ -56755,8 +56764,8 @@ var RunCard = function (_a) {
|
|
56755
56764
|
n$1.promise(retryRun(projectOwner, projectName, run.id), {
|
56756
56765
|
loading: 'Loading',
|
56757
56766
|
success: function (data) {
|
56758
|
-
|
56759
|
-
return
|
56767
|
+
setStopRefresh(false);
|
56768
|
+
return 'Retry in progress. Please wait.';
|
56760
56769
|
},
|
56761
56770
|
error: function (err) {
|
56762
56771
|
console.log(err);
|