pollination-react-io 1.3.0 → 1.6.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.
@@ -4,7 +4,8 @@ export declare enum GetModelActions {
4
4
  subscribe = "subscribe"
5
5
  }
6
6
  export interface GetModelProps {
7
- setParentState?: (data: any) => any;
7
+ onChange?: (event: any) => void;
8
+ setHbjson?: (data: any) => any;
8
9
  optionsConfig?: {
9
10
  [index in GetModelActions]: {
10
11
  show?: boolean;
@@ -1,4 +1,6 @@
1
1
  import { RecipeInterface } from '@pollination-solutions/pollination-sdk';
2
2
  export interface RecipeInputsFormProps {
3
3
  recipe: RecipeInterface;
4
+ onSubmit?: (data: any) => Promise<void>;
5
+ disabled?: boolean;
4
6
  }
@@ -1,5 +1,17 @@
1
- import { XOR } from "../ts-utils";
1
+ import { XOR } from '../ts-utils';
2
+ export declare enum Action {
3
+ add = "add",
4
+ delete = "delete",
5
+ preview = "preview",
6
+ clear = "clear",
7
+ subscribePreview = "subscribe-preview"
8
+ }
2
9
  export interface SendResultsProps {
3
- geometry?: XOR<object, (args?: any) => Promise<object>>;
4
- key?: string;
10
+ results?: XOR<object, (args?: any) => Promise<object>>;
11
+ defaultAction?: Action;
12
+ defaultKey?: string;
13
+ optionsConfig?: {
14
+ [index in Action]: boolean;
15
+ };
16
+ buttonLabel?: string;
5
17
  }
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import { ButtonProps } from './Button.types';
3
+ import './Button.scss';
4
+ declare const Button: React.FC<ButtonProps>;
5
+ export default Button;
@@ -0,0 +1,4 @@
1
+ import { ButtonHTMLAttributes, DetailedHTMLProps } from 'react';
2
+ export declare type ButtonProps = DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement> & {
3
+ loading?: boolean;
4
+ };
@@ -1,4 +1,6 @@
1
+ import { CSSProperties, ReactNode } from 'react';
1
2
  export interface LabelProps {
2
- label: string;
3
+ label: string | ReactNode;
3
4
  name?: string;
5
+ style?: CSSProperties;
4
6
  }
@@ -7,4 +7,5 @@ export * from './useSendGeometry';
7
7
  export * from './useRunCommand';
8
8
  export * from './useManageSettings';
9
9
  export * from './useHbjsontoVTK';
10
+ export * from './useArtifacts';
10
11
  export * from './utilities';
@@ -4,7 +4,7 @@ export interface Options {
4
4
  }
5
5
  export declare type GeometryAction = 'BakeGeometry' | 'ClearGeometry' | 'DrawGeometry' | 'DisableDraw' | 'CombinedRendering';
6
6
  export declare type ModelAction = 'BakePollinationModel' | 'DisableDrawPollinationModel' | 'DrawPollinationModel' | 'CombinedRenderingPollinationModel';
7
- export declare type ResultsAction = 'AddResults' | 'ClearResults';
7
+ export declare type ResultsAction = 'DrawResults' | 'ClearResults' | 'SubscribeDrawResults' | 'AddResults' | 'DeleteResults';
8
8
  export declare type Action = GeometryAction | ModelAction | ResultsAction | 'RunCommand' | 'SetModelSettings';
9
9
  export interface Message {
10
10
  action?: Action;
@@ -0,0 +1,9 @@
1
+ import { FileMeta } from '@pollination-solutions/pollination-sdk';
2
+ import { FileWithPath } from 'react-dropzone';
3
+ import { APIClient } from './useAPIClient';
4
+ export declare const useArtifacts: (owner: string, name: string, client: APIClient) => {
5
+ listArtifacts: (path: string | undefined) => Promise<FileMeta[]>;
6
+ deleteArtifact: (path: string) => Promise<void>;
7
+ downloadArtifact: (path: string) => Promise<any>;
8
+ uploadArtifact: (folderRoot: FileMeta | undefined, file: FileWithPath) => Promise<import("@pollination-solutions/pollination-sdk").S3UploadRequest>;
9
+ };