graphand-react
Advanced tools
Comparing version 0.4.30-beta to 0.4.31-beta
import { GraphandModel, GraphandValidationError } from "graphand-js"; | ||
import React from "react"; | ||
import { GraphandFormOptions } from "../lib/renderForm"; | ||
export declare type GraphandFormTemplateParamsBase<T extends GraphandModel = GraphandModel> = { | ||
export type GraphandFormTemplateParamsBase<T extends GraphandModel = GraphandModel> = { | ||
id: string; | ||
@@ -18,3 +18,3 @@ values: any; | ||
}; | ||
export declare type GraphandFormTemplateParams<T extends GraphandModel = GraphandModel> = GraphandFormTemplateParamsBase<T> & { | ||
export type GraphandFormTemplateParams<T extends GraphandModel = GraphandModel> = GraphandFormTemplateParamsBase<T> & { | ||
fields: { | ||
@@ -26,4 +26,4 @@ [slug: string]: (options?: any) => React.ReactNode; | ||
}; | ||
export declare type GraphandFormTemplate = JSX.Element | string | React.FunctionComponent<GraphandFormTemplateParams> | React.ComponentClass<GraphandFormTemplateParams, any>; | ||
export type GraphandFormTemplate = JSX.Element | string | React.FunctionComponent<GraphandFormTemplateParams> | React.ComponentClass<GraphandFormTemplateParams, any>; | ||
declare const GraphandForm: React.FunctionComponent<GraphandFormOptions>; | ||
export default GraphandForm; |
import { GraphandModel, GraphandModelList } from "graphand-js"; | ||
import React, { FunctionComponent } from "react"; | ||
export declare type InfiniteListPageProps = { | ||
export type InfiniteListPageProps = { | ||
list: GraphandModel[] | GraphandModelList<GraphandModel>; | ||
@@ -15,11 +15,11 @@ count: number; | ||
}; | ||
export declare type InfiniteListContainerProps = { | ||
export type InfiniteListContainerProps = { | ||
children: React.ReactNode; | ||
count: number; | ||
}; | ||
export declare type InfiniteListLoadingProps = { | ||
export type InfiniteListLoadingProps = { | ||
list: GraphandModel[] | null; | ||
pageIndex: number; | ||
}; | ||
export declare type InfiniteListItemProps<T extends any = any> = { | ||
export type InfiniteListItemProps<T extends any = any> = { | ||
item: GraphandModel; | ||
@@ -32,3 +32,3 @@ index: number; | ||
} & T; | ||
export declare type InfiniteListProps = { | ||
export type InfiniteListProps = { | ||
model: typeof GraphandModel; | ||
@@ -35,0 +35,0 @@ activeFn?: (index: number) => number; |
import React from "react"; | ||
import { PromiseSuspenseOptions } from "../lib/suspense"; | ||
export declare type PromiseSuspenseState = { | ||
export type PromiseSuspenseState = { | ||
res: any; | ||
@@ -5,0 +5,0 @@ loading: boolean; |
import { GraphandError, GraphandModel } from "graphand-js"; | ||
import React from "react"; | ||
import { GraphandFormTemplate, GraphandFormTemplateParamsBase } from "../components/GraphandForm"; | ||
export declare type GraphandFormOptions = { | ||
export type GraphandFormOptions = { | ||
template?: GraphandFormTemplate; | ||
@@ -6,0 +6,0 @@ children?: GraphandFormTemplate; |
import { GraphandModelListPromise, GraphandModelPromise } from "graphand-js"; | ||
import React from "react"; | ||
export declare type PromiseSuspenseCallback<T> = React.ReactNode | ((res: T, loading: boolean, error: Error) => React.ReactNode); | ||
export declare type PromiseSuspenseFallback<T> = React.ReactNode | ((res: T, loading: boolean, error: Error) => React.ReactNode); | ||
export declare type PromiseSuspenseOptions<T> = { | ||
export type PromiseSuspenseCallback<T> = React.ReactNode | ((res: T, loading: boolean, error: Error) => React.ReactNode); | ||
export type PromiseSuspenseFallback<T> = React.ReactNode | ((res: T, loading: boolean, error: Error) => React.ReactNode); | ||
export type PromiseSuspenseOptions<T> = { | ||
promise?: GraphandModelPromise<any> | GraphandModelListPromise<any>; | ||
@@ -17,4 +17,4 @@ callback?: PromiseSuspenseCallback<T>; | ||
}; | ||
export declare type SuspenseDefinition<T> = (callback: PromiseSuspenseCallback<T>, optionsOrFallback?: PromiseSuspenseOptions<T> | PromiseSuspenseFallback<T>, options?: PromiseSuspenseOptions<T>) => React.ReactNode; | ||
export type SuspenseDefinition<T> = (callback: PromiseSuspenseCallback<T>, optionsOrFallback?: PromiseSuspenseOptions<T> | PromiseSuspenseFallback<T>, options?: PromiseSuspenseOptions<T>) => React.ReactNode; | ||
declare function suspense<T>(callback: PromiseSuspenseCallback<T>, optionsOrFallback?: PromiseSuspenseOptions<T> | PromiseSuspenseFallback<T>, options?: PromiseSuspenseOptions<T>): React.ReactNode; | ||
export default suspense; |
import { GraphandModel, GraphandModelList } from "graphand-js"; | ||
declare type useListOptions = { | ||
type useListOptions = { | ||
subscribe?: boolean; | ||
@@ -4,0 +4,0 @@ modelListOptions?: any; |
import { GraphandModel } from "graphand-js"; | ||
declare type usePageOptions = { | ||
type usePageOptions = { | ||
subscribe?: boolean; | ||
@@ -4,0 +4,0 @@ getOptions?: any; |
@@ -6,3 +6,3 @@ import { GraphandModel, GraphandPlugin, GraphandField, DataFieldTypes, GraphandValidationError } from "graphand-js"; | ||
import { SuspenseDefinition } from "./lib/suspense"; | ||
declare type GraphandReactItemBaseProps<T extends any> = { | ||
type GraphandReactItemBaseProps<T extends any> = { | ||
field: GraphandField; | ||
@@ -14,3 +14,3 @@ options: any; | ||
}; | ||
export declare type InputComponentProps<T extends any = any> = GraphandReactItemBaseProps<T> & { | ||
export type InputComponentProps<T extends any = any> = GraphandReactItemBaseProps<T> & { | ||
form: GraphandFormTemplateParamsBase; | ||
@@ -23,3 +23,3 @@ errors: GraphandValidationError[]; | ||
}; | ||
export declare type ViewComponentProps<T extends any = any> = GraphandReactItemBaseProps<T> & {}; | ||
export type ViewComponentProps<T extends any = any> = GraphandReactItemBaseProps<T> & {}; | ||
declare module "graphand-js" { | ||
@@ -55,3 +55,3 @@ class GraphandModel { | ||
} | ||
export declare type GraphandPluginReactOpts = { | ||
export type GraphandPluginReactOpts = { | ||
fields: { | ||
@@ -58,0 +58,0 @@ [fieldType in DataFieldTypes]?: { |
{ | ||
"name": "graphand-react", | ||
"version": "0.4.30-beta", | ||
"version": "0.4.31-beta", | ||
"description": "", | ||
@@ -43,3 +43,2 @@ "homepage": "https://github.com/pierrecabriere/graphand-react", | ||
"eslint-plugin-prettier": "^3.1.4", | ||
"graphand-js": "file:../graphand-js", | ||
"jest": "^27.5.1", | ||
@@ -49,4 +48,4 @@ "jest-circus": "^27.5.1", | ||
"prettier": "^2.6.2", | ||
"react": "file:../graphand-app/node_modules/react", | ||
"react-dom": "file:../graphand-app/node_modules/react-dom", | ||
"react": "^17.0.2", | ||
"react-dom": "^17.0.2", | ||
"ts-jest": "^27.1.4", | ||
@@ -53,0 +52,0 @@ "ts-loader": "^9.2.8", |
Sorry, the diff of this file is too big to display
25
2487
595452