pollination-react-io 1.21.0 → 1.22.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.
@@ -1,14 +1,20 @@
1
+ import { FileMeta } from '@pollination-solutions/pollination-sdk';
1
2
  import { HTMLProps } from 'react';
2
3
  import { APIClient } from '../hooks';
4
+ declare type ComboFileSelectorOptions = 'get_model' | 'get_file' | 'get_cloud' | 'get_local';
3
5
  export interface ComboFileSelectorProps {
4
6
  projectOwner?: string;
5
7
  projectName?: string;
6
- defaultValue?: string;
8
+ value?: FileMeta;
7
9
  hidden?: boolean;
10
+ disabled?: boolean;
8
11
  defaultOption?: 'get_model' | 'get_file' | 'get_cloud' | 'get_local';
12
+ optionsConfig?: {
13
+ [index in ComboFileSelectorOptions]?: boolean;
14
+ };
9
15
  mode?: 'local' | 'cloud';
10
16
  onChange?: (...any: any) => void;
11
- disabled?: boolean;
12
17
  client: APIClient;
13
18
  inputProps?: HTMLProps<HTMLInputElement>;
14
19
  }
20
+ export {};
@@ -5,6 +5,7 @@ export declare const _defaultConfig: {
5
5
  localRunFolder: string;
6
6
  isLocalJob: boolean;
7
7
  cloudProjectName: any;
8
+ cloudProjectOwner: any;
8
9
  };
9
10
  export declare const ConfigureLocalRun: React.FC<ConfigureLocalRunProps>;
10
11
  export default ConfigureLocalRun;
@@ -5,4 +5,11 @@ export declare type CreateStudyProps = {
5
5
  authUser?: UserPrivate;
6
6
  client?: APIClient;
7
7
  style?: CSSProperties;
8
+ controlledRecipeInputs?: {
9
+ [index: string]: {
10
+ value: string;
11
+ hidden?: boolean;
12
+ };
13
+ };
14
+ createStudySuccess: (accountName: string, projectName: string, studyId: string) => void;
8
15
  };
@@ -4,6 +4,6 @@ export declare type Account = Organization | UserPrivate;
4
4
  export interface SelectAccountProps {
5
5
  authUser?: UserPrivate;
6
6
  client?: APIClient;
7
- defaultValue?: string;
8
- setSelAccount?: (account: Account) => void;
7
+ value?: Account;
8
+ onChange?: (account: Account) => void;
9
9
  }
@@ -1,16 +1,12 @@
1
1
  import { FileMeta } from '@pollination-solutions/pollination-sdk';
2
2
  import { APIClient } from '../hooks';
3
- declare type CloudFileMeta = FileMeta & {
4
- pollination_cloud_path: string;
5
- };
6
3
  export interface SelectCloudArtifactsProps {
7
4
  projectOwner?: string;
8
5
  projectName?: string;
9
6
  jobId?: string;
10
- defaultValue?: string;
7
+ value?: FileMeta;
11
8
  hidden?: boolean;
12
9
  fileNameMatch?: string;
13
- onChange?: (artifact: CloudFileMeta) => void;
10
+ onChange?: (artifact: FileMeta) => void;
14
11
  client?: APIClient;
15
12
  }
16
- export {};
@@ -1,8 +1,9 @@
1
1
  export interface SelectLocalArtifactNativeProps {
2
- onChange?: (path: string) => void;
3
- defaultKey?: string;
2
+ key?: string;
3
+ value?: string;
4
4
  disabled?: boolean;
5
5
  buttonLabel?: string;
6
6
  fileMatchPattern?: string;
7
7
  mode?: 'directory' | 'file';
8
+ onChange?: (path: string) => void;
8
9
  }
@@ -4,6 +4,6 @@ export interface SelectProjectProps {
4
4
  authUser?: UserPrivate;
5
5
  client?: APIClient;
6
6
  projectOwner?: string;
7
- defaultValue?: string;
8
- setSelProject?: (project: Project) => void;
7
+ value?: Project;
8
+ onChange?: (project: Project) => void;
9
9
  }
@@ -5,6 +5,6 @@ export interface SelectRecipeProps {
5
5
  client?: APIClient;
6
6
  projectName?: string;
7
7
  projectOwner?: string;
8
- setSelRecipe?: (recipe: RecipeInterface) => void;
9
- environment?: Window;
8
+ value?: RecipeInterface;
9
+ onChange?: (recipe: RecipeInterface) => void;
10
10
  }
@@ -4,8 +4,8 @@ export interface SelectRunProps {
4
4
  projectOwner?: string;
5
5
  projectName?: string;
6
6
  jobId?: string[];
7
- defaultValue?: string;
8
- setSelRun?: (recipe: Run) => void;
7
+ value?: Run;
8
+ onChange?: (recipe: Run) => void;
9
9
  authUser?: UserPrivate;
10
10
  client?: APIClient;
11
11
  }
@@ -4,7 +4,7 @@ export interface SelectStudyProps {
4
4
  projectName?: string;
5
5
  projectOwner?: string;
6
6
  authUser?: UserPrivate;
7
- defaultValue?: string;
7
+ value?: CloudJob;
8
+ onChange?: (project: CloudJob) => void;
8
9
  client?: APIClient;
9
- setSelStudy?: (project: CloudJob) => void;
10
10
  }
@@ -16,10 +16,11 @@ export interface LocalConfig {
16
16
  localRunFolder: string;
17
17
  isLocalJob: boolean;
18
18
  cloudProjectName: string;
19
+ cloudProjectOwner: string;
19
20
  }
20
21
  export declare const useCreateStudy: (accountName: string, projectName: string, client: APIClient) => {
21
22
  host: string;
22
23
  createStudy: ({ name, recipe, description }: JobArgs, data: object, onSuccess?: (accountName: string, projectName: string, studyId: string) => void) => Promise<void>;
23
- createLocalStudy: ({ name, description, recipe }: JobArgs, data: object, { localCPUCount, localRunFolder, isLocalJob, cloudProjectName }: LocalConfig, key?: string) => Promise<import("./types").PanelMessageIn>;
24
+ createLocalStudy: ({ name, description, recipe }: JobArgs, data: object, { localCPUCount, localRunFolder, isLocalJob, cloudProjectName, cloudProjectOwner }: LocalConfig, onSuccess?: (accountName: string, projectName: string, studyId: string) => void, key?: string) => Promise<import("./types").PanelMessageIn>;
24
25
  };
25
26
  export {};