Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 | // @flow
import type {Action, ActionType} from '../action/types';
import type {Query} from '../query';
import type RefId from 'canner-ref-id';
import * as React from 'react';
export type Args = Object;
export type Fetch = (key: string, id: ?string) => Promise<*>
export type RequestWithAction = (action: Action<ActionType>, options: {write: boolean}) => Promise<*>;
export type RequestWithActions = (action: Array<Action<ActionType>>, options: {write: boolean}) => Promise<*>;
export type Request = RequestWithAction | RequestWithActions;
export type UpdateQuery = (paths: Array<string>, args: Args) => void;
export type Reset = (key?: string, id?: string) => Promise<*>;
export type Subscription = any;
export type Subscribe = (key: string, callback: (data: any) => void) => Subscription
export type Deploy = (key: string, id?: string) => Promise<*>;
export type OnDeploy = (key: string, callback: Function) => Object => void;
export type RemoveOnDeploy = (key: string, callbackId: string) => void;
export type Validation = Object;
export type UIParams = Object;
export type Relation = Object;
export type RenderChildren = any => React.Node
export type Toolbar = {
sort?: {
component?: React.ComponentType<*>,
[string]: *
},
pagination?: {
component?: React.ComponentType<*>,
[string]: *
},
filter?: {
component?: React.ComponentType<*>,
[string]: *
},
toolbarLayout?: {
component?: React.ComponentType<*>,
[string]: *
}
};
export type HOCProps = {
refId: RefId,
keyName: string,
routes: Array<string>,
pattern: string,
path: string,
type: string,
cacheActions: boolean,
controlDeployAndResetButtons: boolean,
hideButtons: boolean,
validation: Validation,
required: boolean,
disabled: boolean,
uiParams: UIParams,
ui: string,
relation: Relation,
nodeType: string,
rootValue: any,
value: any,
routerParams: Object,
items: Object,
toolbar: Toolbar,
schema: any,
goTo: Object => void,
query: Query,
reset: Reset,
fetch: Fetch,
subscribe: Subscribe,
request: Request,
deploy: Deploy,
updateQuery: UpdateQuery,
onDeploy: OnDeploy,
removeOnDeploy: RemoveOnDeploy,
title: string,
layout: 'inline' | 'vertical' | 'horizontal',
description: string,
hideTitle: boolean,
renderChildren: RenderChildren,
imageServiceConfig: Object,
renderComponent: (refId: RefId, props: Object) => React.Node,
renderConfirmButton: Object => React.Node,
renderCancelButton: Object => React.Node,
} |