pollination-react-io 1.16.4 → 1.16.5

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.
@@ -5,7 +5,8 @@ export interface StudyCardProps {
5
5
  projectOwner: string;
6
6
  projectName: string;
7
7
  study: CloudJob;
8
+ runList?: boolean;
8
9
  style?: CSSProperties;
9
10
  authUser?: UserPrivate;
10
- client: APIClient;
11
+ client?: APIClient;
11
12
  }
@@ -42088,7 +42088,8 @@ var RunCard = function (_a) {
42088
42088
  display: 'flex',
42089
42089
  justifyContent: 'end',
42090
42090
  } },
42091
- " ", "Run ".concat(run.status.status, "."))),
42091
+ " ",
42092
+ run.status.status)),
42092
42093
  React__default.createElement(Tag, { style: {
42093
42094
  color: statusMap[run.status.status].color,
42094
42095
  borderColor: statusMap[run.status.status].color,
@@ -42144,7 +42145,7 @@ var RunCard = function (_a) {
42144
42145
  {
42145
42146
  options: [{
42146
42147
  type: 'button',
42147
- id: 'cancel-study',
42148
+ id: 'cancel-run',
42148
42149
  label: 'Cancel',
42149
42150
  icon: React__default.createElement(XOctagon$1, null),
42150
42151
  disabled: typeof run.status.finished_at === 'string',
@@ -42158,12 +42159,11 @@ var RunCard = function (_a) {
42158
42159
  React__default.createElement("div", { style: {
42159
42160
  display: 'flex',
42160
42161
  flexDirection: 'column',
42161
- gap: 4
42162
+ gap: 8
42162
42163
  } },
42163
42164
  React__default.createElement("div", { style: {
42164
42165
  display: 'flex',
42165
42166
  flexDirection: 'column',
42166
- gap: 8
42167
42167
  } },
42168
42168
  React__default.createElement("span", { style: {
42169
42169
  fontWeight: 600,
@@ -42183,7 +42183,6 @@ var RunCard = function (_a) {
42183
42183
  React__default.createElement("div", { style: {
42184
42184
  display: 'flex',
42185
42185
  flexDirection: 'column',
42186
- gap: 6
42187
42186
  } },
42188
42187
  React__default.createElement("span", { style: {
42189
42188
  fontWeight: 600,
@@ -42202,7 +42201,6 @@ var RunCard = function (_a) {
42202
42201
  React__default.createElement("div", { style: {
42203
42202
  display: 'flex',
42204
42203
  flexDirection: 'column',
42205
- gap: 6,
42206
42204
  } },
42207
42205
  React__default.createElement("span", { style: {
42208
42206
  fontWeight: 600,
@@ -42317,14 +42315,21 @@ var RunsList = function (_a) {
42317
42315
  width: '100%',
42318
42316
  display: 'flex',
42319
42317
  justifyContent: 'center'
42320
- } }, !runs ? React__default.createElement(ThreeDots$1, null) :
42318
+ } }, !runs ?
42321
42319
  React__default.createElement("span", { style: {
42320
+ height: '22px',
42322
42321
  display: 'flex',
42323
- alignItems: 'center',
42324
- cursor: 'pointer',
42325
- gap: 8
42326
- } }, "".concat(runs.total_count, " Total Runs"),
42327
- runs.total_count > 0 && (isValidating ? React__default.createElement(LoadingIcon, { size: 16 }) : React__default.createElement(ChevronCompactDown$1, null))))),
42322
+ alignItems: 'center'
42323
+ } },
42324
+ React__default.createElement(ThreeDots$1, null))
42325
+ :
42326
+ React__default.createElement("span", { style: {
42327
+ display: 'flex',
42328
+ alignItems: 'center',
42329
+ cursor: 'pointer',
42330
+ gap: 8
42331
+ } }, "".concat(runs.total_count, " Total Runs"),
42332
+ runs.total_count > 0 && (isValidating ? React__default.createElement(LoadingIcon, { size: 16 }) : React__default.createElement(ChevronCompactDown$1, null))))),
42328
42333
  runs &&
42329
42334
  React__default.createElement($409067139f391064$export$7c6e2c02157bb7d2, { className: 'collapse-content' },
42330
42335
  React__default.createElement("div", { style: {
@@ -43178,14 +43183,14 @@ var getStudyDuration = function (study) {
43178
43183
  dayjs_min.duration(end.diff(dayjs_min(study.status.started_at).utc(true)));
43179
43184
  };
43180
43185
  var StudyCard = function (_a) {
43181
- var _b;
43182
- var projectName = _a.projectName, projectOwner = _a.projectOwner, _study = _a.study, style = _a.style, authUser = _a.authUser, client = _a.client;
43183
- var _c = useJobs(client), cancelJob = _c.cancelJob, deleteJob = _c.deleteJob, fetchJob = _c.fetchJob;
43184
- var _d = useSWR(authUser ? [projectOwner, projectName, _study.id] : undefined, fetchJob, {
43186
+ var _b, _c;
43187
+ var projectName = _a.projectName, projectOwner = _a.projectOwner, _study = _a.study, runList = _a.runList, style = _a.style, authUser = _a.authUser, client = _a.client;
43188
+ var _d = useJobs(client), cancelJob = _d.cancelJob, deleteJob = _d.deleteJob, fetchJob = _d.fetchJob;
43189
+ var _e = useSWR(authUser ? [projectOwner, projectName, _study.id] : undefined, fetchJob, {
43185
43190
  revalidateOnFocus: false,
43186
43191
  refreshInterval: _study.status.finished_at ? undefined : 5000,
43187
43192
  fallbackData: _study
43188
- }), study = _d.data; _d.error; var isValidating = _d.isValidating;
43193
+ }), study = _e.data; _e.error; var isValidating = _e.isValidating;
43189
43194
  var status = useMemo(function () {
43190
43195
  var _a, _b, _c, _d, _e;
43191
43196
  if (!study)
@@ -43198,7 +43203,7 @@ var StudyCard = function (_a) {
43198
43203
  canceled: (_e = study.status.runs_cancelled) !== null && _e !== void 0 ? _e : 0,
43199
43204
  });
43200
43205
  }, [study]);
43201
- var _e = useState(getStudyDuration(study)), duration = _e[0], setDuration = _e[1];
43206
+ var _f = useState(getStudyDuration(study)), duration = _f[0], setDuration = _f[1];
43202
43207
  useEffect(function () {
43203
43208
  if (study.status.finished_at) {
43204
43209
  setDuration(getStudyDuration(study));
@@ -43222,24 +43227,24 @@ var StudyCard = function (_a) {
43222
43227
  alignContent: 'center',
43223
43228
  alignItems: 'center',
43224
43229
  flexDirection: 'column',
43225
- gap: 6,
43230
+ gap: 18,
43226
43231
  } },
43227
43232
  React__default.createElement("div", { style: {
43228
43233
  display: 'flex',
43229
43234
  flexDirection: 'column',
43230
- gap: 4
43231
43235
  } }, Object.entries(status).map(function (_a, i) {
43232
43236
  var key = _a[0], val = _a[1];
43233
43237
  return val > 0 &&
43234
43238
  React__default.createElement("span", { key: "".concat(key, "-").concat(i), style: {
43235
- fontSize: '1.4rem',
43239
+ fontSize: '1.25rem',
43240
+ lineHeight: '1.5rem',
43236
43241
  fontWeight: '500',
43237
43242
  color: statusMap[key].color,
43238
43243
  borderRadius: 999,
43239
43244
  display: 'flex',
43240
43245
  justifyContent: 'end',
43241
43246
  } },
43242
- " ", "".concat(val, " run").concat(val === 1 ? '' : 's', " ").concat(key, "."));
43247
+ " ", "".concat(val, " ").concat(key, "."));
43243
43248
  })),
43244
43249
  React__default.createElement(Tag, { style: {
43245
43250
  color: getSummaryColor(status),
@@ -43254,6 +43259,7 @@ var StudyCard = function (_a) {
43254
43259
  flexDirection: 'column',
43255
43260
  justifyContent: 'space-between',
43256
43261
  padding: '10px 18px',
43262
+ gap: 12
43257
43263
  } },
43258
43264
  React__default.createElement("div", { style: {
43259
43265
  display: 'grid',
@@ -43277,7 +43283,7 @@ var StudyCard = function (_a) {
43277
43283
  overflow: 'hidden',
43278
43284
  textOverflow: 'ellipsis',
43279
43285
  display: 'inline-block'
43280
- } }, study.spec.name),
43286
+ } }, (_b = study.spec.name) !== null && _b !== void 0 ? _b : "Study: ".concat(study.id)),
43281
43287
  React__default.createElement("div", { style: {
43282
43288
  display: 'flex',
43283
43289
  alignItems: 'center'
@@ -43291,7 +43297,8 @@ var StudyCard = function (_a) {
43291
43297
  borderRadius: 9999,
43292
43298
  border: '1px solid #d0d7de',
43293
43299
  backgroundColor: 'white',
43294
- outlineColor: 'var(--primary)'
43300
+ outlineColor: 'var(--primary)',
43301
+ cursor: 'pointer'
43295
43302
  } }, isValidating ? React__default.createElement(LoadingIcon, null) : React__default.createElement(Gear$1, null)), optionGroups: [
43296
43303
  {
43297
43304
  options: [{
@@ -43318,7 +43325,10 @@ var StudyCard = function (_a) {
43318
43325
  flexDirection: 'column',
43319
43326
  gap: 8
43320
43327
  } },
43321
- React__default.createElement("div", null,
43328
+ React__default.createElement("div", { style: {
43329
+ display: 'flex',
43330
+ flexDirection: 'column',
43331
+ } },
43322
43332
  React__default.createElement("span", { style: {
43323
43333
  fontWeight: 600,
43324
43334
  } }, "Recipe"),
@@ -43337,7 +43347,6 @@ var StudyCard = function (_a) {
43337
43347
  React__default.createElement("div", { style: {
43338
43348
  display: 'flex',
43339
43349
  flexDirection: 'column',
43340
- gap: 6
43341
43350
  } },
43342
43351
  React__default.createElement("span", { style: {
43343
43352
  fontWeight: 600,
@@ -43352,14 +43361,15 @@ var StudyCard = function (_a) {
43352
43361
  React__default.createElement("a", { href: "/".concat(study.author.name), target: '_blank', rel: "noreferrer", style: {
43353
43362
  fontSize: '1.125rem',
43354
43363
  color: 'var(--primary)'
43355
- } }, (_b = study.author.display_name) !== null && _b !== void 0 ? _b : study.author.name))))),
43356
- React__default.createElement("div", { style: {
43357
- width: '100%',
43358
- gridArea: '2 / 1 / 2 / 3',
43359
- borderTop: '1px solid #d0d7de',
43360
- padding: '4px 8px'
43361
- } },
43362
- React__default.createElement(RunsList, { projectOwner: projectOwner, projectName: projectName, jobId: [study.id], subscribe: !study.status.finished_at, client: client, authUser: authUser }))));
43364
+ } }, (_c = study.author.display_name) !== null && _c !== void 0 ? _c : study.author.name))))),
43365
+ runList &&
43366
+ React__default.createElement("div", { style: {
43367
+ width: '100%',
43368
+ gridArea: '2 / 1 / 2 / 3',
43369
+ borderTop: '1px solid #d0d7de',
43370
+ padding: '4px 8px'
43371
+ } },
43372
+ React__default.createElement(RunsList, { projectOwner: projectOwner, projectName: projectName, jobId: [study.id], subscribe: !study.status.finished_at, client: client, authUser: authUser }))));
43363
43373
  };
43364
43374
 
43365
43375
  export { APIClient, AuthUser, ComboFileSelector, ConfigureLocalRun, CreateStudy, GetGeometry, GetModel, RecipeInputsForm, RunCard, SelectAccount, SelectCloudArtifacts, SelectLocalArtifacts, SelectProject, SelectRecipe, SelectRun, SelectStudy, SendGeometry, SendModel, SendResults, StudyCard, checkDotNet, checkRuby, formatBytes, getDuration, getHost, getSummaryColor, recipeLinkFromSource, sendMessageDotNet, sendMessageRuby, statusMap, useAPIClient, useArtifacts, useCreateStudy, useGetGeometry, useGetHbjson, useHbjsontoVTK, useJobs, useManageSettings, useRunCommand, useRuns, useSendHbjson, useSendMessage };