-
Notifications
You must be signed in to change notification settings - Fork 40
/
ui-web.generated.d.ts
523 lines (456 loc) · 15.5 KB
/
ui-web.generated.d.ts
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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
declare module '@yuants/ui-web' {
import * as react_jsx_runtime from 'react/jsx-runtime';
import React, { ComponentType } from 'react';
import * as rxjs from 'rxjs';
import { BehaviorSubject, ReplaySubject, Subject, Observable } from 'rxjs';
import * as _yuants_data_model from '@yuants/data-model';
import { IDataRecord, IProduct } from '@yuants/data-model';
import { ColumnDef, Table } from '@tanstack/react-table';
import { JSONSchema7 } from 'json-schema';
import { ThemeProps, FormProps } from '@rjsf/core';
import {
StrictRJSFSchema,
RJSFSchema,
FormContextType,
TemplatesType,
RegistryWidgetsType,
} from '@rjsf/utils';
import { ButtonProps } from '@douyinfe/semi-ui/lib/es/button';
import * as _supabase_supabase_js from '@supabase/supabase-js';
import { User } from '@supabase/supabase-js';
import { Terminal } from '@yuants/protocol';
namespace index_d$w {
export {};
}
const AccountSelector: (props: {
value: string;
onChange: (v: string) => void;
candidates: string[];
}) => react_jsx_runtime.JSX.Element;
const InlineAccountId: React.MemoExoticComponent<
(props: { account_id: string }) => react_jsx_runtime.JSX.Element
>;
const useAccountInfo: (account_id: string) => rxjs.Observable<_yuants_data_model.IAccountInfo>;
const index_d$v_AccountSelector: typeof AccountSelector;
const index_d$v_InlineAccountId: typeof InlineAccountId;
const index_d$v_useAccountInfo: typeof useAccountInfo;
namespace index_d$v {
export {
index_d$v_AccountSelector as AccountSelector,
index_d$v_InlineAccountId as InlineAccountId,
index_d$v_useAccountInfo as useAccountInfo,
};
}
namespace index_d$u {
export {};
}
namespace index_d$t {
export {};
}
/**
* BIOS Status Component
* @public
*/
const BIOS: React.MemoExoticComponent<() => react_jsx_runtime.JSX.Element>;
const createPersistBehaviorSubject: <T>(key: string, initialValue: T) => BehaviorSubject<T | undefined>;
/**
* A subject that emits a single value when the workspace is ready.
* @public
*/
const ready$: ReplaySubject<unknown>;
const index_d$s_BIOS: typeof BIOS;
const index_d$s_createPersistBehaviorSubject: typeof createPersistBehaviorSubject;
const index_d$s_ready$: typeof ready$;
namespace index_d$s {
export {
index_d$s_BIOS as BIOS,
index_d$s_createPersistBehaviorSubject as createPersistBehaviorSubject,
index_d$s_ready$ as ready$,
};
}
namespace index_d$r {
export {};
}
const registerCommand: (id: string, handler: (params: any) => void) => void;
const executeCommand: (id: string, params?: {}) => Promise<void>;
const CommandCenter: React.MemoExoticComponent<() => react_jsx_runtime.JSX.Element>;
const index_d$q_CommandCenter: typeof CommandCenter;
const index_d$q_executeCommand: typeof executeCommand;
const index_d$q_registerCommand: typeof registerCommand;
namespace index_d$q {
export {
index_d$q_CommandCenter as CommandCenter,
index_d$q_executeCommand as executeCommand,
index_d$q_registerCommand as registerCommand,
};
}
namespace index_d$p {
export {};
}
namespace index_d$o {
export {};
}
const useValue: <T>(id: string, initialValue: T) => [T, (v: T) => void];
const index_d$n_useValue: typeof useValue;
namespace index_d$n {
export { index_d$n_useValue as useValue };
}
interface IDataRecordViewDef<T> {
TYPE: string;
columns: (ctx: { reloadData: () => Promise<void> }) => ColumnDef<IDataRecord<T>, any>[];
extraRecordActions?: React.ComponentType<{
reloadData: () => Promise<void>;
record: IDataRecord<T>;
}>;
extraHeaderActions?: React.ComponentType<{}>;
newRecord: () => Partial<T>;
mapOriginToDataRecord?: (x: T) => IDataRecord<T>;
beforeUpdateTrigger?: (x: T) => void | Promise<void>;
schema?: JSONSchema7;
}
/**
* General Data Record View
*/
function DataRecordView<T>(props: IDataRecordViewDef<T>): react_jsx_runtime.JSX.Element;
const index_d$m_DataRecordView: typeof DataRecordView;
namespace index_d$m {
export { index_d$m_DataRecordView as DataRecordView };
}
namespace index_d$l {
export {};
}
const DesktopLayout: () => react_jsx_runtime.JSX.Element | null;
const index_d$k_DesktopLayout: typeof DesktopLayout;
namespace index_d$k {
export { index_d$k_DesktopLayout as DesktopLayout };
}
namespace index_d$j {
export {};
}
const loadTgzBlob: (tgzBlob: Blob) => Promise<
{
filename: string;
blob: Blob;
}[]
>;
function resolveVersion(
packageName: string,
ver?: string,
): Promise<{
meta: any;
version: string;
}>;
const index_d$i_loadTgzBlob: typeof loadTgzBlob;
const index_d$i_resolveVersion: typeof resolveVersion;
namespace index_d$i {
export { index_d$i_loadTgzBlob as loadTgzBlob, index_d$i_resolveVersion as resolveVersion };
}
interface IFileSystemStatResult {
isFile: () => boolean;
isDirectory: () => boolean;
}
interface IFileSystemBackend {
name: string;
readdir(path: string): Promise<string[]>;
stat(path: string): Promise<IFileSystemStatResult>;
readFile(path: string): Promise<string>;
readFileAsBase64(path: string): Promise<string>;
readFileAsBlob(path: string): Promise<Blob>;
writeFile(path: string, content: FileSystemWriteChunkType): Promise<void>;
mkdir(path: string): Promise<void>;
rm(path: string): Promise<void>;
exists(path: string): Promise<boolean>;
}
const FsBackend$: ReplaySubject<IFileSystemBackend>;
const workspaceRoot$: BehaviorSubject<FileSystemDirectoryHandle | null | undefined>;
const historyWorkspaceRoot$: BehaviorSubject<FileSystemDirectoryHandle[] | undefined>;
const replaceWorkspaceRoot: (root?: FileSystemDirectoryHandle) => Promise<void>;
const fs: IFileSystemBackend & {
ensureDir: (path: string) => Promise<void>;
};
/**
* Bundle code from entry
* @param entry entry filename
* @returns IIFE-formatted code
* @public
*/
const bundleCode: (entry: string) => Promise<string>;
const index_d$h_FsBackend$: typeof FsBackend$;
const index_d$h_bundleCode: typeof bundleCode;
const index_d$h_fs: typeof fs;
const index_d$h_historyWorkspaceRoot$: typeof historyWorkspaceRoot$;
const index_d$h_replaceWorkspaceRoot: typeof replaceWorkspaceRoot;
const index_d$h_workspaceRoot$: typeof workspaceRoot$;
namespace index_d$h {
export {
index_d$h_FsBackend$ as FsBackend$,
index_d$h_bundleCode as bundleCode,
index_d$h_fs as fs,
index_d$h_historyWorkspaceRoot$ as historyWorkspaceRoot$,
index_d$h_replaceWorkspaceRoot as replaceWorkspaceRoot,
index_d$h_workspaceRoot$ as workspaceRoot$,
};
}
function generateTemplates<
T = any,
S extends StrictRJSFSchema = RJSFSchema,
F extends FormContextType = any,
>(): Partial<TemplatesType<T, S, F>>;
const _default$1: Partial<TemplatesType<any, RJSFSchema, any>>;
function generateWidgets<
T = any,
S extends StrictRJSFSchema = RJSFSchema,
F extends FormContextType = any,
>(): RegistryWidgetsType<T, S, F>;
const _default: RegistryWidgetsType<any, RJSFSchema, any>;
function generateTheme<
T = any,
S extends StrictRJSFSchema = RJSFSchema,
F extends FormContextType = any,
>(): ThemeProps<T, S, F>;
const Theme: ThemeProps<any, RJSFSchema, any>;
function generateForm<
T = any,
S extends StrictRJSFSchema = RJSFSchema,
F extends FormContextType = any,
>(): ComponentType<FormProps<T, S, F>>;
const Form: (
props: Omit<FormProps<any, any, any>, 'validator'>,
) => React.ReactElement<FormProps<any, RJSFSchema, any>, string | React.JSXElementConstructor<any>>;
/**
* Request user to input data according to the schema.
* @param schema - JSON Schema (https://json-schema.org/)
* @param initialData - Initial data to be filled in the form
* @returns Promise of user input data
*/
const showForm: <T>(schema: JSONSchema7, initialData?: any) => Promise<T>;
const index_d$g_Form: typeof Form;
const index_d$g_Theme: typeof Theme;
const index_d$g_generateForm: typeof generateForm;
const index_d$g_generateTemplates: typeof generateTemplates;
const index_d$g_generateTheme: typeof generateTheme;
const index_d$g_generateWidgets: typeof generateWidgets;
const index_d$g_showForm: typeof showForm;
namespace index_d$g {
export {
index_d$g_Form as Form,
_default$1 as Templates,
index_d$g_Theme as Theme,
_default as Widgets,
Form as default,
index_d$g_generateForm as generateForm,
index_d$g_generateTemplates as generateTemplates,
index_d$g_generateTheme as generateTheme,
index_d$g_generateWidgets as generateWidgets,
index_d$g_showForm as showForm,
};
}
namespace index_d$f {
export {};
}
namespace index_d$e {
export {};
}
/**
* Yuan Button Component
*
* - Button must display loading status after clicking
* - Button displays loading if and only if click event processing
* - We need to know whether the backend click event is processing or not.
*/
const Button: React.MemoExoticComponent<
(
props: Omit<ButtonProps, 'onClick' | 'loading'> & {
onClick: () => Promise<void>;
},
) => react_jsx_runtime.JSX.Element
>;
function DataView<T>(props: { table: Table<T> }): react_jsx_runtime.JSX.Element;
function ListView<T>(props: { table: Table<T> }): react_jsx_runtime.JSX.Element;
function TableView<T>(props: { table: Table<T> }): react_jsx_runtime.JSX.Element;
const index_d$d_Button: typeof Button;
const index_d$d_DataView: typeof DataView;
const index_d$d_ListView: typeof ListView;
const index_d$d_TableView: typeof TableView;
namespace index_d$d {
export {
index_d$d_Button as Button,
index_d$d_DataView as DataView,
index_d$d_ListView as ListView,
index_d$d_TableView as TableView,
};
}
namespace index_d$c {
export {};
}
namespace index_d$b {
export {};
}
namespace index_d$a {
export {};
}
const LocalizePageTitle: React.ComponentType<{
type: string;
params?: any;
}>;
interface IPage {
id: string;
type: string;
params: any;
viewport: {
w: number;
h: number;
x: number;
y: number;
};
}
const Page: React.MemoExoticComponent<(props: { page: IPage }) => react_jsx_runtime.JSX.Element>;
const usePageParams: () => any;
const usePageTitle: (title: string) => void;
const usePageType: () => string;
const usePageViewport: () =>
| {
w: number;
h: number;
x: number;
y: number;
}
| undefined;
const usePageId: () => string;
const AvailableComponents: Record<string, React.ComponentType>;
const pageRegistered$: Subject<string>;
const registerPage: (type: string, component: React.ComponentType) => void;
const index_d$9_AvailableComponents: typeof AvailableComponents;
const index_d$9_LocalizePageTitle: typeof LocalizePageTitle;
const index_d$9_Page: typeof Page;
const index_d$9_pageRegistered$: typeof pageRegistered$;
const index_d$9_registerPage: typeof registerPage;
const index_d$9_usePageId: typeof usePageId;
const index_d$9_usePageParams: typeof usePageParams;
const index_d$9_usePageTitle: typeof usePageTitle;
const index_d$9_usePageType: typeof usePageType;
const index_d$9_usePageViewport: typeof usePageViewport;
namespace index_d$9 {
export {
index_d$9_AvailableComponents as AvailableComponents,
index_d$9_LocalizePageTitle as LocalizePageTitle,
index_d$9_Page as Page,
index_d$9_pageRegistered$ as pageRegistered$,
index_d$9_registerPage as registerPage,
index_d$9_usePageId as usePageId,
index_d$9_usePageParams as usePageParams,
index_d$9_usePageTitle as usePageTitle,
index_d$9_usePageType as usePageType,
index_d$9_usePageViewport as usePageViewport,
};
}
const useProducts: (datasource_id: string) => Observable<IProduct[]>;
const index_d$8_useProducts: typeof useProducts;
namespace index_d$8 {
export { index_d$8_useProducts as useProducts };
}
namespace index_d$7 {
export {};
}
const supabase: _supabase_supabase_js.SupabaseClient<any, 'public', any>;
const authState$: BehaviorSubject<
| {
user: User;
refresh_token: string;
access_token: string;
}
| undefined
>;
const index_d$6_authState$: typeof authState$;
const index_d$6_supabase: typeof supabase;
namespace index_d$6 {
export { index_d$6_authState$ as authState$, index_d$6_supabase as supabase };
}
const terminal$: Observable<Terminal | null>;
const useTick: (datasource_id: string, product_id: string) => rxjs.Observable<_yuants_data_model.ITick>;
const index_d$5_terminal$: typeof terminal$;
const index_d$5_useTick: typeof useTick;
namespace index_d$5 {
export { index_d$5_terminal$ as terminal$, index_d$5_useTick as useTick };
}
namespace index_d$4 {
export {};
}
namespace index_d$3 {
export {};
}
const ensureAuthenticated: () => Promise<void>;
const index_d$2_ensureAuthenticated: typeof ensureAuthenticated;
namespace index_d$2 {
export { index_d$2_ensureAuthenticated as ensureAuthenticated };
}
const isShowHome$: rxjs.BehaviorSubject<boolean | undefined>;
const toggleShowHome: () => void;
const HomePage: React.MemoExoticComponent<() => react_jsx_runtime.JSX.Element | null>;
const isDarkMode$: rxjs.BehaviorSubject<boolean | undefined>;
const useIsDarkMode: () => boolean;
/**
* Hook to use the page closing confirm
*
* usePageClosingConfirm hook is used to show a confirmation dialog when the user tries to close/refresh the page.
*
* recommend to use this hook in the component where you want to show the confirmation dialog.
*
* for example, some component with complex form data that the user might lose if they close the page.
*/
const usePageClosingConfirm: (disabled?: boolean) => void;
const index_d$1_HomePage: typeof HomePage;
const index_d$1_isDarkMode$: typeof isDarkMode$;
const index_d$1_isShowHome$: typeof isShowHome$;
const index_d$1_toggleShowHome: typeof toggleShowHome;
const index_d$1_useIsDarkMode: typeof useIsDarkMode;
const index_d$1_usePageClosingConfirm: typeof usePageClosingConfirm;
namespace index_d$1 {
export {
index_d$1_HomePage as HomePage,
index_d$1_isDarkMode$ as isDarkMode$,
index_d$1_isShowHome$ as isShowHome$,
index_d$1_toggleShowHome as toggleShowHome,
index_d$1_useIsDarkMode as useIsDarkMode,
index_d$1_usePageClosingConfirm as usePageClosingConfirm,
};
}
namespace index_d {
export {};
}
export {
index_d$w as AccountComposition,
index_d$v as AccountInfo,
index_d$u as AccountRiskInfo,
index_d$t as Agent,
index_d$s as BIOS,
index_d$r as Chart,
index_d$q as CommandCenter,
index_d$p as Copilot,
index_d$o as CopyDataRelation,
index_d$n as Data,
index_d$m as DataRecord,
index_d$l as Deploy,
index_d$k as DesktopLayout,
index_d$j as Editor,
index_d$i as Extensions,
index_d$h as FileSystem,
index_d$g as Form,
index_d$f as Fund,
index_d$e as GeneralSpecificRelations,
index_d$d as Interactive,
index_d$c as Kernel,
index_d$b as Market,
index_d$a as Order,
index_d$9 as Pages,
index_d$8 as Products,
index_d$7 as PullSourceRelations,
index_d$6 as SupaBase,
index_d$5 as Terminals,
index_d$4 as TradeCopier,
index_d$3 as TransferOrder,
index_d$2 as User,
index_d$1 as Workbench,
index_d as Workspace,
};
}