pollination-react-io 1.9.1 → 1.11.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.
@@ -5,6 +5,7 @@ export interface ComboFileSelectorProps {
5
5
  projectName?: string;
6
6
  defaultOption?: 'get_model' | 'get_file' | 'get_cloud' | 'get_local';
7
7
  onChange?: (...any: any) => void;
8
+ disabled?: boolean;
8
9
  client: APIClient;
9
10
  inputProps?: HTMLProps<HTMLInputElement>;
10
11
  }
@@ -1,5 +1,4 @@
1
1
  import React from 'react';
2
2
  import { ConfigureLocalRunProps } from './ConfigureLocalRun.types';
3
- import './ConfigureLocalRun.scss';
4
3
  export declare const ConfigureLocalRun: React.FC<ConfigureLocalRunProps>;
5
4
  export default ConfigureLocalRun;
@@ -1,3 +1,4 @@
1
1
  export interface ConfigureLocalRunProps {
2
2
  defaultOption?: 'cloud' | 'local';
3
+ disabled?: boolean;
3
4
  }
@@ -3,7 +3,7 @@ import { APIClient } from '../hooks';
3
3
  export interface SelectCloudArtifactsProps {
4
4
  projectOwner?: string;
5
5
  projectName?: string;
6
- fileExtensionMatch?: string;
6
+ fileNameMatch?: string;
7
7
  onChange?: (artifact: FileMeta) => void;
8
8
  client?: APIClient;
9
9
  }
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import { SelectLocalArtifactNativeProps } from './SelectLocalArtifactNative.types';
3
+ import './SelectLocalArtifactNative.scss';
4
+ declare const SelectLocalArtifactNative: React.FC<SelectLocalArtifactNativeProps>;
5
+ export default SelectLocalArtifactNative;
@@ -0,0 +1,3 @@
1
+ export interface SelectLocalArtifactNativeProps {
2
+ onChange?: (path: string) => void;
3
+ }
@@ -1,4 +1,4 @@
1
- import { Project, ProjectsApiListProjectsRequest, UserPrivate } from '@pollination-solutions/pollination-sdk';
1
+ import { Project, UserPrivate } from '@pollination-solutions/pollination-sdk';
2
2
  import { APIClient } from '../hooks';
3
3
  export interface SelectStudyProps {
4
4
  projectName?: string;
@@ -6,5 +6,4 @@ export interface SelectStudyProps {
6
6
  authUser?: UserPrivate;
7
7
  client?: APIClient;
8
8
  setSelStudy?: (project: Project) => void;
9
- queryConfig?: Partial<ProjectsApiListProjectsRequest>;
10
9
  }
@@ -1,5 +1,5 @@
1
1
  import React, { CSSProperties } from 'react';
2
- interface AvatarProps {
2
+ export interface AvatarProps {
3
3
  alt?: string;
4
4
  fallback?: string;
5
5
  href?: string;
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import { ButtonGroupProps } from './ButtonGroup.types';
3
+ import './ButtonGroup.scss';
4
+ declare const ButtonGroup: React.FC<ButtonGroupProps>;
5
+ export default ButtonGroup;
@@ -0,0 +1,5 @@
1
+ import { HTMLProps } from 'react';
2
+ export interface ButtonGroupProps {
3
+ wrapperProps?: HTMLProps<HTMLDivElement>;
4
+ disabled?: boolean;
5
+ }
@@ -16,7 +16,7 @@ export declare type OptionGroup = {
16
16
  type?: 'radio' | 'default';
17
17
  value?: string;
18
18
  };
19
- interface DropdownProps {
19
+ export interface DropdownProps {
20
20
  optionGroups: OptionGroup[];
21
21
  trigger: React.ReactNode;
22
22
  open?: boolean;
@@ -26,4 +26,4 @@ interface DropdownProps {
26
26
  disabled?: boolean;
27
27
  }
28
28
  export declare const Dropdown: FC<DropdownProps>;
29
- export {};
29
+ export default Dropdown;
@@ -1,2 +1,6 @@
1
- /// <reference types="react" />
2
- export declare const Logo: () => JSX.Element;
1
+ import React from 'react';
2
+ export interface LogoProps {
3
+ size?: number;
4
+ }
5
+ export declare const Logo: React.FC<LogoProps>;
6
+ export default Logo;
@@ -1,7 +1,6 @@
1
1
  export interface RadioListProps {
2
2
  items: string[];
3
3
  name: string;
4
- form: string;
5
4
  defaultValue: string;
6
5
  onChange: (any: any) => void;
7
6
  }
@@ -1,6 +1,5 @@
1
1
  import React, { FC, ReactNode } from 'react';
2
2
  import { OptionGroup } from '../Dropdown/Dropdown';
3
- import './SettingsButton.scss';
4
3
  export interface SettingsButtonProps {
5
4
  onClick: () => void;
6
5
  label: string | ReactNode;
@@ -12,3 +11,4 @@ export interface SettingsButtonProps {
12
11
  icon?: ReactNode;
13
12
  }
14
13
  export declare const SettingsButton: FC<SettingsButtonProps>;
14
+ export default SettingsButton;
@@ -11,6 +11,8 @@ export * from './NumberInput/NumberInput';
11
11
  export * from './SettingsButton';
12
12
  export * from './TextInput/TextInput';
13
13
  export * from './Tooltip';
14
+ export { AvatarProps } from './Avatar/Avatar';
15
+ export { ButtonProps } from './Button/Button.types';
14
16
  export { ComboBoxProps } from './ComboBox/ComboBox.types';
15
17
  export { FileInputProps } from './FileInput/FileInput.types';
16
18
  export { LabelProps } from './Label/Label.types';
@@ -1,10 +1,10 @@
1
- export type { Options, Message, Coordinates, SettingsOptions, } from './types';
1
+ export type { PanelMessageIn, PanelMessageOut, Coordinates, SettingsOptions, } from './types';
2
2
  export * from './useAPIClient';
3
3
  export * from './useCreateStudy';
4
4
  export * from './useGetHbjson';
5
5
  export * from './useGetGeometry';
6
6
  export * from './useSendHbjson';
7
- export * from './useSendGeometry';
7
+ export * from './useSendMessage';
8
8
  export * from './useRunCommand';
9
9
  export * from './useManageSettings';
10
10
  export * from './useHbjsontoVTK';
@@ -1,18 +1,20 @@
1
- export interface Options {
2
- layer?: string;
3
- units?: string;
4
- }
5
- export declare type GeometryAction = 'BakeGeometry' | 'ClearGeometry' | 'DrawGeometry' | 'DisableDraw' | 'CombinedRendering';
6
- export declare type ModelAction = 'BakePollinationModel' | 'DisableDrawPollinationModel' | 'DrawPollinationModel' | 'CombinedRenderingPollinationModel';
7
- export declare type ResultsAction = 'DrawResults' | 'ClearResults' | 'SubscribeDrawResults' | 'AddResults' | 'DeleteResults';
8
- export declare type StudyAction = 'CreateStudy';
9
- export declare type Action = GeometryAction | ModelAction | ResultsAction | StudyAction | 'RunCommand' | 'SetModelSettings';
10
- export interface Message {
1
+ export declare type GeometryAction = 'AddGeometry' | 'PreviewGeometry' | 'DeleteGeometry' | 'ClearGeometry' | 'SubscribePreviewGeometry';
2
+ export declare type ModelAction = 'AddHBJSON' | 'PreviewHBJSON' | 'DeleteHBJSON' | 'ClearHBJSON' | 'SubscribePreviewHBJSON';
3
+ export declare type SettingsAction = 'AddSettings' | 'PreviewSettings' | 'DeleteSettings' | 'ClearSettings' | 'SubscribePreviewSettings';
4
+ export declare type CommandAction = 'AddCommand' | 'PreviewCommand' | 'DeleteCommand' | 'ClearCommand' | 'SubscribePreviewCommand';
5
+ export declare type ResultsAction = 'AddResults' | 'PreviewResults' | 'DeleteResults' | 'ClearResults' | 'SubscribePreviewResults';
6
+ export declare type StudyAction = 'AddStudy' | 'PreviewStudy' | 'DeleteStudy' | 'ClearStudy' | 'SubscribePreviewStudy';
7
+ export declare type Action = GeometryAction | ModelAction | ResultsAction | StudyAction | CommandAction | SettingsAction;
8
+ export interface PanelMessageIn {
11
9
  action?: Action;
12
10
  data?: any;
13
11
  options?: any;
14
12
  uniqueId?: string;
15
13
  }
14
+ export interface PanelMessageOut {
15
+ data?: any;
16
+ identifier?: string;
17
+ }
16
18
  export interface Coordinates {
17
19
  lat: number;
18
20
  lon: number;
@@ -12,6 +12,6 @@ interface JobArgs {
12
12
  }
13
13
  export declare const useCreateStudy: (accountName: string, projectName: string, client: APIClient) => {
14
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>);
15
+ createStudy: (({ name, source, description }: JobArgs, data: object) => Promise<void>) | (({ name, source, description }: JobArgs, data: object, key?: string) => Promise<import("./types").PanelMessageIn>);
16
16
  };
17
17
  export {};
@@ -1,6 +1,6 @@
1
1
  import type { SettingsOptions } from '.';
2
2
  export declare const useManageSettings: () => {
3
3
  host: "web" | "rhino" | "revit" | "sketchup";
4
- sendSettings: (settings: SettingsOptions) => import("./types").Message;
4
+ sendSettings: (settings: SettingsOptions) => import("./types").PanelMessageIn;
5
5
  getSettings: () => any;
6
6
  };
@@ -4,7 +4,7 @@ declare global {
4
4
  chrome?: any;
5
5
  }
6
6
  }
7
- export declare const useRunCommand: () => {
7
+ export declare const useRunCommand: (defaultKey?: string) => {
8
8
  host: "web" | "rhino" | "revit" | "sketchup";
9
9
  runCommand: (commandString: string, commandOptions?: any) => void;
10
10
  };
@@ -1,16 +1,6 @@
1
- import { ModelAction, Message } from './types';
2
- interface SendGeometryOptions {
3
- layer: string;
4
- units: string;
5
- }
6
- interface SendGeometry {
7
- uniqueId: string;
8
- options?: SendGeometryOptions;
9
- }
10
- declare type SendGeometryMessage = Message & SendGeometry;
1
+ import { ModelAction, PanelMessageIn } from './types';
11
2
  export declare const useSendHbjson: () => {
12
3
  host: "web" | "rhino" | "revit" | "sketchup";
13
4
  state: {};
14
- sendHbjson: (action: ModelAction, message: SendGeometryMessage) => Message;
5
+ sendHbjson: (action: ModelAction, message: PanelMessageIn) => PanelMessageIn;
15
6
  };
16
- export {};
@@ -0,0 +1,6 @@
1
+ import { Action, PanelMessageIn, PanelMessageOut } from './types';
2
+ export declare const useSendMessage: () => {
3
+ host: "web" | "rhino" | "revit" | "sketchup";
4
+ state: PanelMessageOut;
5
+ sendMessage: (action: Action, message: PanelMessageIn) => PanelMessageIn;
6
+ };
@@ -1,6 +1,6 @@
1
- import type { Message } from './types';
1
+ import type { PanelMessageIn } from './types';
2
2
  export declare function checkDotNet(): boolean;
3
3
  export declare function checkRuby(): boolean;
4
- export declare function sendMessageDotNet(message: Message): Message;
5
- export declare function sendMessageRuby(message: Message): Message;
4
+ export declare function sendMessageDotNet(message: PanelMessageIn): PanelMessageIn;
5
+ export declare function sendMessageRuby(message: PanelMessageIn): PanelMessageIn;
6
6
  export declare function getHost(key?: string, defaultValue?: 'web' | 'rhino' | 'revit' | 'sketchup'): 'web' | 'rhino' | 'revit' | 'sketchup';