pollination-react-io 1.6.1 → 1.7.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/GetModel/GetModel.types.d.ts +1 -0
- package/build/RecipeInputsForm/RecipeInputsForm.types.d.ts +2 -1
- package/build/SelectCloudArtifacts/SelectCloudArtifacts.d.ts +4 -0
- package/build/SelectCloudArtifacts/SelectCloudArtifacts.types.d.ts +9 -0
- package/build/SelectCloudArtifacts/getFileTypeIcon.d.ts +2 -0
- package/build/atoms/ComboBox/ComboBox.types.d.ts +14 -1
- package/build/atoms/NumberInput/NumberInput.types.d.ts +1 -0
- package/build/atoms/SettingsButton/index.d.ts +1 -0
- package/build/atoms/TextInput/TextInput.types.d.ts +1 -0
- package/build/hooks/index.d.ts +1 -0
- package/build/hooks/types.d.ts +8 -1
- package/build/hooks/useArtifacts.d.ts +1 -1
- package/build/hooks/useCreateStudy.d.ts +17 -0
- package/build/index.esm.js +306 -199
- package/build/index.esm.js.map +1 -1
- package/build/index.js +306 -198
- package/build/index.js.map +1 -1
- package/package.json +1 -1
- package/build/hooks/hooks.types.d.ts +0 -5
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { RecipeInterface } from '@pollination-solutions/pollination-sdk';
|
|
2
|
+
import { Message } from '../hooks';
|
|
2
3
|
export interface RecipeInputsFormProps {
|
|
3
4
|
recipe: RecipeInterface;
|
|
4
|
-
onSubmit?: (data: any) => Promise<void
|
|
5
|
+
onSubmit?: (data: any) => Promise<void> | Promise<Message> | void;
|
|
5
6
|
disabled?: boolean;
|
|
6
7
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FileMeta } from '@pollination-solutions/pollination-sdk';
|
|
2
|
+
import { APIClient } from '../hooks';
|
|
3
|
+
export interface SelectCloudArtifactsProps {
|
|
4
|
+
projectOwner?: string;
|
|
5
|
+
projectName?: string;
|
|
6
|
+
fileExtensionMatch?: string;
|
|
7
|
+
onChange?: (artifact: FileMeta) => void;
|
|
8
|
+
client?: APIClient;
|
|
9
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { UseComboboxState, UseComboboxStateChangeOptions } from 'downshift';
|
|
2
|
+
import { CSSProperties, HTMLProps, ReactElement, ReactNode, Ref } from 'react';
|
|
2
3
|
export interface ComboBoxProps {
|
|
3
4
|
items: {
|
|
4
5
|
id: string;
|
|
@@ -8,11 +9,23 @@ export interface ComboBoxProps {
|
|
|
8
9
|
setSelected?: (item: any) => void;
|
|
9
10
|
loading?: boolean;
|
|
10
11
|
disabled?: boolean;
|
|
12
|
+
icon?: ReactElement;
|
|
11
13
|
inputStyle?: CSSProperties;
|
|
12
14
|
menuStyle?: CSSProperties;
|
|
13
15
|
inputProps?: HTMLProps<HTMLInputElement>;
|
|
16
|
+
header?: ReactNode;
|
|
14
17
|
footer?: string | ReactNode;
|
|
15
18
|
noMatchText?: string;
|
|
16
19
|
ref?: Ref<any>;
|
|
17
20
|
onScrollReachEnd?: (...args: any) => void;
|
|
21
|
+
stateReducer?: (state: UseComboboxState<{
|
|
22
|
+
id: string;
|
|
23
|
+
name: string;
|
|
24
|
+
}>, actionAndChanges: UseComboboxStateChangeOptions<{
|
|
25
|
+
id: string;
|
|
26
|
+
name: string;
|
|
27
|
+
}>) => Partial<UseComboboxState<{
|
|
28
|
+
id: string;
|
|
29
|
+
name: string;
|
|
30
|
+
}>>;
|
|
18
31
|
}
|
package/build/hooks/index.d.ts
CHANGED
package/build/hooks/types.d.ts
CHANGED
|
@@ -5,11 +5,13 @@ export interface Options {
|
|
|
5
5
|
export declare type GeometryAction = 'BakeGeometry' | 'ClearGeometry' | 'DrawGeometry' | 'DisableDraw' | 'CombinedRendering';
|
|
6
6
|
export declare type ModelAction = 'BakePollinationModel' | 'DisableDrawPollinationModel' | 'DrawPollinationModel' | 'CombinedRenderingPollinationModel';
|
|
7
7
|
export declare type ResultsAction = 'DrawResults' | 'ClearResults' | 'SubscribeDrawResults' | 'AddResults' | 'DeleteResults';
|
|
8
|
-
export declare type
|
|
8
|
+
export declare type StudyAction = 'CreateStudy';
|
|
9
|
+
export declare type Action = GeometryAction | ModelAction | ResultsAction | StudyAction | 'RunCommand' | 'SetModelSettings';
|
|
9
10
|
export interface Message {
|
|
10
11
|
action?: Action;
|
|
11
12
|
data?: any;
|
|
12
13
|
options?: any;
|
|
14
|
+
uniqueId?: string;
|
|
13
15
|
}
|
|
14
16
|
export interface Coordinates {
|
|
15
17
|
lat: number;
|
|
@@ -19,3 +21,8 @@ export interface SettingsOptions {
|
|
|
19
21
|
earth_anchor?: Coordinates;
|
|
20
22
|
units?: number;
|
|
21
23
|
}
|
|
24
|
+
export interface UseGetHBJSONArgs {
|
|
25
|
+
isPollinationModel: boolean;
|
|
26
|
+
syncToken: string;
|
|
27
|
+
key: string;
|
|
28
|
+
}
|
|
@@ -2,7 +2,7 @@ import { FileMeta } from '@pollination-solutions/pollination-sdk';
|
|
|
2
2
|
import { FileWithPath } from 'react-dropzone';
|
|
3
3
|
import { APIClient } from './useAPIClient';
|
|
4
4
|
export declare const useArtifacts: (owner: string, name: string, client: APIClient) => {
|
|
5
|
-
listArtifacts: (path
|
|
5
|
+
listArtifacts: (path?: string[]) => Promise<FileMeta[]>;
|
|
6
6
|
deleteArtifact: (path: string) => Promise<void>;
|
|
7
7
|
downloadArtifact: (path: string) => Promise<any>;
|
|
8
8
|
uploadArtifact: (folderRoot: FileMeta | undefined, file: FileWithPath) => Promise<import("@pollination-solutions/pollination-sdk").S3UploadRequest>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { APIClient } from './useAPIClient';
|
|
2
|
+
declare global {
|
|
3
|
+
interface Window {
|
|
4
|
+
sketchup?: any;
|
|
5
|
+
chrome?: any;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
interface JobArgs {
|
|
9
|
+
name: string;
|
|
10
|
+
source: string;
|
|
11
|
+
description?: string;
|
|
12
|
+
}
|
|
13
|
+
export declare const useCreateStudy: (accountName: string, projectName: string, client: APIClient) => {
|
|
14
|
+
host: string;
|
|
15
|
+
createStudy: (({ name, source, description }: JobArgs, data: object) => Promise<void>) | (({ name, source, description }: JobArgs, data: object, key?: string) => Promise<import("./types").Message>);
|
|
16
|
+
};
|
|
17
|
+
export {};
|