@doreamonjs/page-creator
Version:
page-creator for doreamonjs
360 lines (359 loc) • 11.6 kB
TypeScript
/// <reference types="react" />
import * as manifest from './manifest';
import * as page from './page';
export interface Manifest extends manifest.Manifest {
}
export interface PageProps extends page.PageProps {
}
export interface CreatePageOptions extends page.CreateOptions {
}
export interface LoadOptions extends CreatePageOptions {
}
export declare function createManifest(manifest_: Manifest): Manifest;
export declare function createPage(namespace: string, options?: CreatePageOptions): import("react").FC<any>;
export declare function createModel(manifest: Manifest): {
namespace: string;
state: {
attributes: {
title: string;
description: string;
configs: manifest.ManifestConfigs;
apis: Record<string, manifest.ManifestApi>;
actions: any[];
filters: any[];
columns: any[];
pagination: {
pageSize: number;
pageSizeOptions: number[];
current: number;
total: number;
};
table: {
defaultPageSize?: number;
defaultPageSizeOptions?: number[];
disablePagination?: boolean;
disableColumnFieldsSetting?: boolean;
disableHeader?: boolean;
operatorColumnWidth?: number;
type?: "card";
card?: {
columns?: number;
renderItem?: (item: any, index: number, onClick: () => void) => JSX.Element;
renderFirstItem?: () => JSX.Element;
renderLastItem?: () => JSX.Element;
};
};
categories: {
enable: boolean;
current: string;
items: manifest.ManifestCategory[];
};
detail: manifest.ManifestDetail;
config: import("./config").Config;
manifest: manifest.Manifest;
};
datasets: {
values: any;
table: any;
};
constraints: {
where: any;
orderBy: any[];
};
};
reducers: {
save: (state: any, { payload }: {
payload: any;
}) => any;
};
effects: {
dispatcher({ payload }: {
payload: any;
}, { call, select, put }: {
call: any;
select: any;
put: any;
}): Generator<any, any, unknown>;
'pipeline/step'({ steps, pipeline, action, payload, target }: {
steps: any;
pipeline: any;
action: any;
payload: any;
target: any;
}, { put, call, take, race }: {
put: any;
call: any;
take: any;
race: any;
}): Generator<any, any, boolean>;
'pipeline/type/form'({ current, steps, pipeline, action, payload, target }: {
current: any;
steps: any;
pipeline: any;
action: any;
payload: any;
target: any;
}, { put, call, select }: {
put: any;
call: any;
select: any;
}): Generator<any, void, {
query: Record<string, string>;
params: Record<string, string>;
body: any;
}>;
'pipeline/type/confirm'({ current, steps, pipeline, action, payload, target }: {
current: any;
steps: any;
pipeline: any;
action: any;
payload: any;
target: any;
}, { put, take }: {
put: any;
take: any;
}): Generator<any, void, unknown>;
'pipeline/type/service'({ current, steps, pipeline, action, payload, target }: {
current: any;
steps: any;
pipeline: any;
action: any;
payload: any;
target: any;
}, { select, put, race, call }: {
select: any;
put: any;
race: any;
call: any;
}): Generator<any, boolean, any>;
'pipeline/type/navigate'({ current, steps, pipeline, action, payload, target }: {
current: any;
steps: any;
pipeline: any;
action: any;
payload: any;
target: any;
}, { select, put, race, call }: {
select: any;
put: any;
race: any;
call: any;
}): Generator<any, void, unknown>;
'pipeline/type/copy'({ current, steps, pipeline, action, payload, target }: {
current: any;
steps: any;
pipeline: any;
action: any;
payload: any;
target: any;
}, { put, call }: {
put: any;
call: any;
}): Generator<any, void, unknown>;
'pipeline/type/terminal'({ current, steps, pipeline, action, payload }: {
current: any;
steps: any;
pipeline: any;
action: any;
payload: any;
}, { put, select }: {
put: any;
select: any;
}): Generator<any, void, unknown>;
'pipeline/type/iframe'({ current, steps, pipeline, action, payload }: {
current: any;
steps: any;
pipeline: any;
action: any;
payload: any;
}, { put, select }: {
put: any;
select: any;
}): Generator<any, void, unknown>;
'pipeline/type/transfer'({ current, steps, pipeline, action, payload, target }: {
current: any;
steps: any;
pipeline: any;
action: any;
payload: any;
target: any;
}, { put, select }: {
put: any;
select: any;
}): Generator<any, void, unknown>;
'pipeline/type/treeselect'({ current, steps, pipeline, action, payload, target }: {
current: any;
steps: any;
pipeline: any;
action: any;
payload: any;
target: any;
}, { put, select }: {
put: any;
select: any;
}): Generator<any, void, unknown>;
'pipeline/type/values'({ current, steps, pipeline, action, payload, target }: {
current: any;
steps: any;
pipeline: any;
action: any;
payload: any;
target: any;
}, { put, select }: {
put: any;
select: any;
}): Generator<any, void, unknown>;
'pipeline/type/preview'({ current, steps, pipeline, action, payload, target }: {
current: any;
steps: any;
pipeline: any;
action: any;
payload: any;
target: any;
}, { put, select }: {
put: any;
select: any;
}): Generator<any, void, unknown>;
'pipeline/type/dialog'({ current, steps, pipeline, action, payload, target }: {
current: any;
steps: any;
pipeline: any;
action: any;
payload: any;
target: any;
}, { put, select }: {
put: any;
select: any;
}): Generator<any, void, unknown>;
'pipeline/type/popup'({ current, steps, pipeline, action, payload, target }: {
current: any;
steps: any;
pipeline: any;
action: any;
payload: any;
target: any;
}, { put, select }: {
put: any;
select: any;
}): Generator<any, void, unknown>;
'pipeline/type/action'({ current, steps, pipeline, action, payload, target }: {
current: any;
steps: any;
pipeline: any;
action: any;
payload: any;
target: any;
}, { call, put, select }: {
call: any;
put: any;
select: any;
}): Generator<any, void, unknown>;
'pipeline/type/logs'({ current, steps, pipeline, action, payload }: {
current: any;
steps: any;
pipeline: any;
action: any;
payload: any;
}, { put, select }: {
put: any;
select: any;
}): Generator<any, void, unknown>;
'pipeline/type/message'({ current, steps, pipeline, action, payload }: {
current: any;
steps: any;
pipeline: any;
action: any;
payload: any;
}, { put, select }: {
put: any;
select: any;
}): Generator<any, void, unknown>;
'pipeline/type/download'({ current, steps, pipeline, action, payload, target }: {
current: any;
steps: any;
pipeline: any;
action: any;
payload: any;
target: any;
}, { put, select, call }: {
put: any;
select: any;
call: any;
}): Generator<any, void, unknown>;
'service/query'({ payload: { page, pageSize, where, orderBy } }: {
payload: {
page: any;
pageSize: any;
where: any;
orderBy: any;
};
}, { select, race, call, put }: {
select: any;
race: any;
call: any;
put: any;
}): Generator<any, boolean, {
attributes: any;
datasets: any;
constraints: any;
} & {
data: any;
timeout: any;
}>;
'service/query/refresh'(action: any, { select, put }: {
select: any;
put: any;
}): Generator<any, void, {
attributes: any;
}>;
'category/switch'(action: any, { put, select, take }: {
put: any;
select: any;
take: any;
}): Generator<any, void, unknown>;
'category/reset'(action: any, { put, select }: {
put: any;
select: any;
}): Generator<any, void, unknown>;
'support/urlSearchUsedForListAPI'(action: any, { select, put }: {
select: any;
put: any;
}): Generator<any, void, unknown>;
initialize(action: any, { select, put, take }: {
select: any;
put: any;
take: any;
}): Generator<any, void, unknown>;
cleanup(action: any, { select, put }: {
select: any;
put: any;
}): Generator<any, void, unknown>;
reset(action: any, { put, take, call }: {
put: any;
take: any;
call: any;
}): Generator<any, void, unknown>;
refresh(action: any, { put, take, call }: {
put: any;
take: any;
call: any;
}): Generator<any, void, unknown>;
scheduler(action: any, { select, put }: {
select: any;
put: any;
}): Generator<any, void, unknown>;
};
subscriptions: {
onSetup({ dispatch, history }: {
dispatch: any;
history: any;
}): void;
onRouteChange({ dispatch, history }: {
dispatch: any;
history: any;
}): any;
onPageShow({ dispatch }: {
dispatch: any;
}): void;
};
};