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 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 | // @flow
import type {ApolloClient} from "apollo-boost";
import * as React from 'react';
export type CannerSchema = {
[string]: any
};
export type LoadedSchema = {
schema: CannerSchema,
pageSchema: CannerSchema,
sidebar: Sidebar,
visitors: Array<Object>,
client: ApolloClient,
connectors: {[string]: any},
connector: any,
resolvers: {[string]: any},
graphqlClient: any,
imageStorages: {[key: string]: any},
fileStorages: {[key: string]: any},
dict: Object
};
export type ComponentNode = any;
export type ComponentTree = {
[string]: ComponentNode
}
export type DataDidChange = ({
[key: string]: boolean | {[id: string]: any}
}) => void;
export type AfterDeploy = ({
key: string,
id: string,
result: any
}) => void;
export type History ={
push: (path: string) => void,
location: Object
};
export type Intl = {
locale: string,
defaultLocale: string,
messages: Object
};
export type HideButtons = boolean;
export type BaseUrl = string;
export type CMSProps = {
schema: LoadedSchema,
dataDidChange: DataDidChange,
afterDeploy: AfterDeploy,
baseUrl: BaseUrl,
goTo: Object => void,
routes: Array<string>,
routerParams: Object,
intl: Intl,
hideButtons: HideButtons,
errorHandler: Error => any
}
export type GeneratorProps = {
componentTree: ComponentTree,
layouts: {[string]: React.ComponentType<*>},
imageStorages: Object,
fileStorages: Object,
goTo: Object => void,
baseUrl: string,
routes: Array<string>,
routerParams: {[string]: string},
refresh?: boolean,
deploy?: Function,
reset?: Function,
onDeploy?: Function,
updateQuery: Function,
removeOnDeploy?: Function,
hideButtons: boolean,
schema: Object
}
export type ProviderProps = {
schema: CannerSchema,
dataDidChange: DataDidChange,
afterDeploy: AfterDeploy,
children: React.Element<*>,
client: ApolloClient,
rootKey: string,
errorHandler: Error => any
};
export type Submenu = {
title: string,
items: Sidebar,
}
export type MenuItem = {
title: string,
to: string
}
export type Sidebar = ?Array<Submenu | MenuItem>
export type SidebarProps = {
schema: CannerSchema,
sidebar: Sidebar,
goTo: Function,
dataChanged: Object,
reset: Function,
routes: Array<string>
} |