pollination-react-io 1.101.2 → 1.102.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
@@ -56459,8 +56459,8 @@ var StudyCard = function (_a) {
56459
56459
  var handle = setInterval(function () {
56460
56460
  setDuration(getDuration(study));
56461
56461
  }, 1000);
56462
- return study.status.finished_at ? undefined : function () { return clearInterval(handle); };
56463
- }, [study]);
56462
+ return function () { return clearInterval(handle); };
56463
+ }, [study, getDuration]);
56464
56464
  /*
56465
56465
  * Manage hover
56466
56466
  */
@@ -56644,7 +56644,7 @@ var StudyCard = function (_a) {
56644
56644
  React__default["default"].createElement("div", { className: 'item7' },
56645
56645
  React__default["default"].createElement(Button, { style: (width > 600)
56646
56646
  ? { display: 'inline', margin: '0 10px 0 0' }
56647
- : { display: 'inline', float: 'right', margin: '0 10px 0 0' }, disabled: false, onClick: function (e) {
56647
+ : { display: 'inline', float: 'right', margin: '0 10px 0 0' }, disabled: !study || (![dist$1.JobStatusEnum.Cancelled, dist$1.JobStatusEnum.Completed].includes(study.status.status)), onClick: function (e) {
56648
56648
  e.stopPropagation();
56649
56649
  if (!study)
56650
56650
  return;
@@ -56791,13 +56791,8 @@ var RunCard = function (_a) {
56791
56791
  var handle = setInterval(function () {
56792
56792
  setDuration(getDuration(run));
56793
56793
  }, 1000);
56794
- return run.status.finished_at ? undefined : function () { return clearInterval(handle); };
56794
+ return function () { return clearInterval(handle); };
56795
56795
  }, [run, getDuration]);
56796
- var daysSinceFinished = React.useMemo(function () {
56797
- if (!run || !run.status.finished_at)
56798
- return undefined;
56799
- return dayjs_min().diff(dayjs_min(run.status.finished_at), 'day');
56800
- }, [run]);
56801
56796
  /**
56802
56797
  * Manage hover effect
56803
56798
  */
@@ -57054,7 +57049,6 @@ var RunCard = function (_a) {
57054
57049
  " Cancel"),
57055
57050
  React__default["default"].createElement(Button, { style: { marginRight: '0.75rem' }, loading: retryLoading, disabled: !run || !run.status ||
57056
57051
  ![dist$1.RunStatusEnum.Failed, dist$1.RunStatusEnum.Cancelled].includes(run.status.status) ||
57057
- daysSinceFinished >= 14 ||
57058
57052
  retryLoading, onClick: function (e) {
57059
57053
  setRetryLoading(true);
57060
57054
  e.stopPropagation();