pollination-react-io 1.6.1 → 1.7.2
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/README.md +0 -17
- package/build/AuthUser/AuthUser.d.ts +0 -1
- package/build/CreateStudy/CreateStudy.d.ts +1 -2
- package/build/CreateStudy/CreateStudy.types.d.ts +8 -2
- package/build/GetModel/GetModel.types.d.ts +1 -0
- package/build/RecipeInputsForm/RecipeInputsForm.d.ts +0 -1
- package/build/RecipeInputsForm/RecipeInputsForm.types.d.ts +4 -1
- package/build/RunCommand/RunCommand.d.ts +0 -1
- package/build/SelectAccount/SelectAccount.d.ts +0 -2
- 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/SelectProject/SelectProject.d.ts +0 -2
- package/build/SelectStudy/SelectStudy.d.ts +0 -2
- package/build/SendResults/SendResults.d.ts +0 -1
- package/build/atoms/Button/Button.d.ts +1 -2
- package/build/atoms/ComboBox/ComboBox.d.ts +0 -1
- package/build/atoms/ComboBox/ComboBox.types.d.ts +14 -1
- package/build/atoms/Dropdown/Dropdown.d.ts +0 -1
- package/build/atoms/FileInput/FileInput.d.ts +0 -1
- package/build/atoms/NumberInput/NumberInput.types.d.ts +1 -0
- package/build/atoms/RadioList/RadioList.d.ts +0 -1
- package/build/atoms/SettingsButton/index.d.ts +1 -1
- package/build/atoms/TextInput/TextInput.d.ts +0 -1
- package/build/atoms/TextInput/TextInput.types.d.ts +3 -2
- package/build/atoms/Tooltip/index.d.ts +0 -1
- 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.d.ts +1 -2
- package/build/index.esm.js +6062 -1351
- package/build/index.esm.js.map +1 -1
- package/build/index.js +6063 -1352
- package/build/index.js.map +1 -1
- package/build/variables.css +12 -0
- package/package.json +7 -10
- package/build/PreviewBakeGeometry/PreviewBakeGeometry.d.ts +0 -4
- package/build/PreviewBakeGeometry/PreviewBakeGeometry.types.d.ts +0 -4
- package/build/PreviewBakeModel/PreviewBakeModel.d.ts +0 -4
- package/build/PreviewBakeModel/PreviewBakeModel.types.d.ts +0 -4
- package/build/hooks/hooks.types.d.ts +0 -5
package/README.md
CHANGED
|
@@ -75,22 +75,6 @@ which will install the local component library as a dependency in `test-app`. It
|
|
|
75
75
|
```
|
|
76
76
|
|
|
77
77
|
Your components can then be imported and used in that project.
|
|
78
|
-
### Using Component Library SASS Variables
|
|
79
|
-
|
|
80
|
-
I've found that it's helpful to export SASS variables to projects consuming the library. As such, I've added the `rollup-plugin-copy` NPM package and used it to copy the [`src/typography.scss`](src/typography.scss) and [`variables.scss`](src/variables.scss) into the `build` directory as part of the Rollup bundle process. This allows you to use these variables in your projects consuming the component library.
|
|
81
|
-
|
|
82
|
-
For example, let's say you installed `harvey-component-library` into your project. To use the exported variables/mixins, in a SASS file you would do the following:
|
|
83
|
-
|
|
84
|
-
```Sass
|
|
85
|
-
@import '~harvey-component-library/build/typography';
|
|
86
|
-
|
|
87
|
-
.example-container {
|
|
88
|
-
@include heading;
|
|
89
|
-
|
|
90
|
-
color: $harvey-white;
|
|
91
|
-
}
|
|
92
|
-
```
|
|
93
|
-
|
|
94
78
|
## Additional Help
|
|
95
79
|
|
|
96
80
|
### Dark Mode
|
|
@@ -105,7 +89,6 @@ Read https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-schem
|
|
|
105
89
|
[Built with react-component-library](https://blog.harveydelaney.com/creating-your-own-react-component-library/)
|
|
106
90
|
|
|
107
91
|
- [Rollup](https://github.com/rollup/rollup)
|
|
108
|
-
- [Sass](https://sass-lang.com/)
|
|
109
92
|
- [TypeScript](https://www.typescriptlang.org/)
|
|
110
93
|
- [Storybook](https://storybook.js.org/)
|
|
111
94
|
- [Jest](https://jestjs.io/) and [React Testing Library](https://github.com/testing-library/react-testing-library)
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import 'react-tabs/style/react-tabs.css';
|
|
3
3
|
import { CreateStudyProps } from './CreateStudy.types';
|
|
4
|
-
|
|
5
|
-
declare const CreateStudy: React.FC<CreateStudyProps>;
|
|
4
|
+
export declare const CreateStudy: React.FC<CreateStudyProps>;
|
|
6
5
|
export default CreateStudy;
|
|
@@ -1,2 +1,8 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
1
|
+
import type { UserPrivate } from '@pollination-solutions/pollination-sdk';
|
|
2
|
+
import { CSSProperties } from 'react';
|
|
3
|
+
import { APIClient } from '../hooks';
|
|
4
|
+
export declare type CreateStudyProps = {
|
|
5
|
+
authUser?: UserPrivate;
|
|
6
|
+
client?: APIClient;
|
|
7
|
+
style?: CSSProperties;
|
|
8
|
+
};
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { RecipeInterface } from '@pollination-solutions/pollination-sdk';
|
|
2
|
+
import { CSSProperties } from 'react';
|
|
3
|
+
import { Message } from '../hooks';
|
|
2
4
|
export interface RecipeInputsFormProps {
|
|
3
5
|
recipe: RecipeInterface;
|
|
4
|
-
onSubmit?: (data: any) => Promise<void
|
|
6
|
+
onSubmit?: (data: any) => Promise<void> | Promise<Message> | void;
|
|
5
7
|
disabled?: boolean;
|
|
8
|
+
labelStyle?: CSSProperties;
|
|
6
9
|
}
|
|
@@ -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,6 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import 'react-perfect-scrollbar/dist/css/styles.css';
|
|
3
3
|
import { ComboBoxProps } from './ComboBox.types';
|
|
4
|
-
import './ComboBox.scss';
|
|
5
4
|
export declare const ComboBox: React.ForwardRefExoticComponent<ComboBoxProps>;
|
|
6
5
|
export default ComboBox;
|
|
@@ -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
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React, { FC, ReactNode } from 'react';
|
|
2
2
|
import { OptionGroup } from '../Dropdown/Dropdown';
|
|
3
|
-
import '../../styles/buttons-group.scss';
|
|
4
3
|
export interface SettingsButtonProps {
|
|
5
4
|
onClick: () => void;
|
|
6
5
|
label: string | ReactNode;
|
|
@@ -9,5 +8,6 @@ export interface SettingsButtonProps {
|
|
|
9
8
|
disabled?: boolean;
|
|
10
9
|
triggerIcon?: React.ReactNode;
|
|
11
10
|
helpText?: string;
|
|
11
|
+
icon?: ReactNode;
|
|
12
12
|
}
|
|
13
13
|
export declare const SettingsButton: FC<SettingsButtonProps>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { CSSProperties, HTMLProps,
|
|
1
|
+
import { CSSProperties, HTMLProps, ReactElement } from 'react';
|
|
2
2
|
export interface TextInputProps {
|
|
3
3
|
inputProps?: HTMLProps<HTMLInputElement>;
|
|
4
|
-
icon?:
|
|
4
|
+
icon?: ReactElement;
|
|
5
5
|
style?: CSSProperties;
|
|
6
|
+
reset?: any;
|
|
6
7
|
}
|
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 {};
|
package/build/index.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
export * from './hooks';
|
|
2
2
|
export * from './AuthUser/AuthUser';
|
|
3
|
+
export * from './CreateStudy/CreateStudy';
|
|
3
4
|
export * from './GetGeometry/GetGeometry';
|
|
4
5
|
export * from './GetModel/GetModel';
|
|
5
|
-
export * from './PreviewBakeGeometry/PreviewBakeGeometry';
|
|
6
|
-
export * from './PreviewBakeModel/PreviewBakeModel';
|
|
7
6
|
export * from './RunCommand/RunCommand';
|
|
8
7
|
export * from './SelectAccount/SelectAccount';
|
|
9
8
|
export * from './SelectStudy/SelectStudy';
|