pollination-react-io 1.15.0 → 1.16.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 './RunCard.scss';
4
+ declare const RunCard: React.FC<RunCardProps>;
5
+ export default RunCard;
@@ -0,0 +1,10 @@
1
+ import { Run, UserPrivate } from '@pollination-solutions/pollination-sdk';
2
+ import { APIClient } from '../hooks';
3
+ export interface RunCardProps {
4
+ projectOwner: string;
5
+ projectName: string;
6
+ jobId: string;
7
+ run: Run;
8
+ client?: APIClient;
9
+ authUser?: UserPrivate;
10
+ }
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import { RunsListProps } from './RunsList.types';
3
+ import './RunsList.scss';
4
+ declare const RunsList: React.FC<RunsListProps>;
5
+ export default RunsList;
@@ -0,0 +1,10 @@
1
+ import { UserPrivate } from '@pollination-solutions/pollination-sdk';
2
+ import { APIClient } from '../hooks';
3
+ export interface RunsListProps {
4
+ projectOwner: string;
5
+ projectName: string;
6
+ jobId: string[];
7
+ subscribe: boolean;
8
+ client: APIClient;
9
+ authUser?: UserPrivate;
10
+ }
@@ -1,11 +1,10 @@
1
1
  import { Run, UserPrivate } from '@pollination-solutions/pollination-sdk';
2
2
  import { APIClient } from '../hooks';
3
3
  export interface SelectRunProps {
4
- authUser?: UserPrivate;
5
- client?: APIClient;
6
4
  projectOwner?: string;
7
5
  projectName?: string;
8
6
  jobId?: string[];
9
7
  setSelRun?: (recipe: Run) => void;
10
- environment?: Window;
8
+ authUser?: UserPrivate;
9
+ client?: APIClient;
11
10
  }
@@ -1,5 +1,4 @@
1
1
  import React from 'react';
2
- import 'react-perfect-scrollbar/dist/css/styles.css';
3
2
  import { ComboBoxProps } from './ComboBox.types';
4
3
  import './ComboBox.scss';
5
4
  export declare const ComboBox: React.ForwardRefExoticComponent<ComboBoxProps>;
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import 'react-perfect-scrollbar/dist/css/styles.css';
3
+ import { ScrollZoneProps } from './ScrollZone.types';
4
+ import './ScrollZone.scss';
5
+ declare const ScrollZone: React.FC<ScrollZoneProps>;
6
+ export default ScrollZone;
@@ -0,0 +1,16 @@
1
+ import { GetPropsCommonOptions, UseComboboxGetItemPropsOptions, UseComboboxGetMenuPropsOptions } from 'downshift';
2
+ import { CSSProperties, ReactNode } from 'react';
3
+ export interface ScrollZoneProps {
4
+ isOpen: boolean;
5
+ items: any[];
6
+ highlightedIndex?: number;
7
+ menuStyle?: CSSProperties;
8
+ renderItem?: (item: any, i?: number, arr?: any[]) => ReactNode;
9
+ getMenuProps?: (options?: UseComboboxGetMenuPropsOptions, otherOptions?: GetPropsCommonOptions) => any;
10
+ getItemProps?: (options: UseComboboxGetItemPropsOptions<{
11
+ id: string;
12
+ name: string;
13
+ disabled?: boolean;
14
+ }>) => any;
15
+ onScrollEnd?: (...args: any[]) => void;
16
+ }
@@ -6,6 +6,7 @@ export * from './useGetGeometry';
6
6
  export * from './useSendHbjson';
7
7
  export * from './useSendMessage';
8
8
  export * from './useRunCommand';
9
+ export * from './useRuns';
9
10
  export * from './useManageSettings';
10
11
  export * from './useHbjsontoVTK';
11
12
  export * from './useArtifacts';
@@ -0,0 +1,54 @@
1
+ import duration from 'dayjs/plugin/duration';
2
+ import { Run, RunStatusEnum } from '@pollination-solutions/pollination-sdk';
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: (run?: Run) => duration.Duration;
50
+ export declare const useRuns: (client: APIClient) => {
51
+ listRuns: (projectOwner: string, projectName: string, jobId?: string[], page?: number, perPage?: number, statusFilter?: RunStatusEnum) => Promise<import("@pollination-solutions/pollination-sdk").RunList>;
52
+ fetchRun: (projectOwner: string, projectName: string, runId: string) => Promise<Run>;
53
+ cancelRun: (projectOwner: string, projectName: string, runId: string) => Promise<any>;
54
+ };
@@ -4,3 +4,5 @@ export declare function checkRuby(): boolean;
4
4
  export declare function sendMessageDotNet(message: PanelMessageIn): PanelMessageIn;
5
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';
7
+ export declare const recipeLinkFromSource: (source: string) => string;
8
+ export declare function formatBytes(bytes: any, decimals?: number): string;