pollination-react-io 1.35.2 → 1.36.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.
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import { RunCardProps } from './RunCard.types';
3
+ import './Card.scss';
4
+ export declare const RunCard: React.FC<RunCardProps>;
5
+ export default RunCard;
@@ -0,0 +1,12 @@
1
+ import { CloudJob, Run, UserPrivate } from '@pollination-solutions/pollination-sdk';
2
+ import { CSSProperties } from 'react';
3
+ import { APIClient } from '../hooks';
4
+ export interface RunCardProps {
5
+ projectOwner: string;
6
+ projectName: string;
7
+ study?: CloudJob;
8
+ run?: Run;
9
+ style?: CSSProperties;
10
+ authUser?: UserPrivate;
11
+ client?: APIClient;
12
+ }
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
2
  import { StudyCardProps } from './StudyCard.types';
3
- import './StudyCard.scss';
3
+ import './Card.scss';
4
4
  export declare const StudyCard: React.FC<StudyCardProps>;
5
5
  export default StudyCard;
@@ -5,11 +5,7 @@ export interface StudyCardProps {
5
5
  projectOwner: string;
6
6
  projectName: string;
7
7
  study?: CloudJob;
8
- canWrite?: boolean;
9
- runList?: boolean;
10
8
  style?: CSSProperties;
11
9
  authUser?: UserPrivate;
12
10
  client?: APIClient;
13
- showMenu: boolean;
14
- onDelete?: () => void;
15
11
  }
@@ -1,8 +1,27 @@
1
1
  import type { CloudJob, CloudJobList, JobStatusEnum } from '@pollination-solutions/pollination-sdk';
2
2
  import { APIClient } from './useAPIClient';
3
+ import duration from 'dayjs/plugin/duration';
3
4
  export declare const useJobs: (client: APIClient) => {
4
5
  listJobs: (projectOwner: string, projectName: string, jobIds?: string[], page?: number, perPage?: number, status?: JobStatusEnum) => Promise<CloudJobList>;
5
6
  fetchJob: (projectOwner: string, projectName: string, jobId: string) => Promise<CloudJob>;
6
7
  deleteJob: (projectOwner: string, projectName: string, jobId: string) => Promise<any>;
7
8
  cancelJob: (projectOwner: string, projectName: string, jobId: string) => Promise<any>;
9
+ statusMap: {
10
+ pending: {
11
+ color: string;
12
+ };
13
+ running: {
14
+ color: string;
15
+ };
16
+ failed: {
17
+ color: string;
18
+ };
19
+ canceled: {
20
+ color: string;
21
+ };
22
+ completed: {
23
+ color: string;
24
+ };
25
+ };
26
+ getDuration: (item?: CloudJob) => duration.Duration;
8
27
  };
@@ -1,54 +1,39 @@
1
1
  import duration from 'dayjs/plugin/duration';
2
- import { CloudJob, Run, RunStatusEnum } from '@pollination-solutions/pollination-sdk';
2
+ import { Run, RunStatusEnum } from '@pollination-solutions/pollination-sdk';
3
3
  import { APIClient } from './useAPIClient';
4
- export declare const statusMap: {
5
- pending: {
6
- color: string;
7
- };
8
- running: {
9
- color: string;
10
- };
11
- failed: {
12
- color: string;
13
- };
14
- canceled: {
15
- color: string;
16
- };
17
- completed: {
18
- color: string;
19
- };
20
- Created: {
21
- color: string;
22
- };
23
- Scheduled: {
24
- color: string;
25
- };
26
- Running: {
27
- color: string;
28
- };
29
- 'Pre-Processing': {
30
- color: string;
31
- };
32
- PostProcessing: {
33
- color: string;
34
- };
35
- Failed: {
36
- color: string;
37
- };
38
- Cancelled: {
39
- color: string;
40
- };
41
- Succeeded: {
42
- color: string;
43
- };
44
- Unknown: {
45
- color: string;
46
- };
47
- };
48
- export declare const getSummaryColor: (status: any) => string;
49
- export declare const getDuration: (item?: Run | CloudJob) => duration.Duration;
50
4
  export declare const useRuns: (client: APIClient) => {
51
5
  listRuns: (projectOwner: string, projectName: string, jobId?: string[], page?: number, perPage?: number, statusFilter?: RunStatusEnum) => Promise<import("@pollination-solutions/pollination-sdk").RunList>;
52
6
  fetchRun: (projectOwner: string, projectName: string, runId: string) => Promise<Run>;
53
7
  cancelRun: (projectOwner: string, projectName: string, runId: string) => Promise<any>;
8
+ statusMap: {
9
+ Created: {
10
+ color: string;
11
+ };
12
+ Scheduled: {
13
+ color: string;
14
+ };
15
+ Running: {
16
+ color: string;
17
+ };
18
+ 'Pre-Processing': {
19
+ color: string;
20
+ };
21
+ PostProcessing: {
22
+ color: string;
23
+ };
24
+ Failed: {
25
+ color: string;
26
+ };
27
+ Cancelled: {
28
+ color: string;
29
+ };
30
+ Succeeded: {
31
+ color: string;
32
+ };
33
+ Unknown: {
34
+ color: string;
35
+ };
36
+ };
37
+ getSummaryColor: (status: any) => any;
38
+ getDuration: (item?: Run) => duration.Duration;
54
39
  };
package/build/index.d.ts CHANGED
@@ -7,7 +7,6 @@ export * from './CreateStudy/CreateStudy';
7
7
  export * from './GetGeometry/GetGeometry';
8
8
  export * from './GetModel/GetModel';
9
9
  export * from './RecipeInputsForm/RecipeInputsForm';
10
- export * from './RunCard/RunCard';
11
10
  export * from './RunCommand/RunCommand';
12
11
  export * from './RunsList/RunsList';
13
12
  export * from './SelectAccount/SelectAccount';
@@ -20,5 +19,6 @@ export * from './SelectStudy/SelectStudy';
20
19
  export * from './SendGeometry/SendGeometry';
21
20
  export * from './SendModel/SendModel';
22
21
  export * from './SendResults/SendResults';
23
- export * from './NewStudyCard/StudyCard';
22
+ export * from './Cards/StudyCard';
23
+ export * from './Cards/RunCard';
24
24
  export * from './FilePreview/FilePreview';