@dappworks/kit 0.5.37 → 0.5.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/aiem.mjs +5 -5
- package/dist/{chunk-SPFKGNUY.mjs → chunk-2HNXZE3X.mjs} +396 -373
- package/dist/chunk-2HNXZE3X.mjs.map +1 -0
- package/dist/{chunk-2BZKMJZX.mjs → chunk-2N4HH4ZF.mjs} +1 -1
- package/dist/chunk-2N4HH4ZF.mjs.map +1 -0
- package/dist/{chunk-72E76L6J.mjs → chunk-B7RV4C5E.mjs} +3 -3
- package/dist/chunk-B7RV4C5E.mjs.map +1 -0
- package/dist/{chunk-WMV5O3PI.mjs → chunk-DTCEVRDM.mjs} +33 -6
- package/dist/chunk-DTCEVRDM.mjs.map +1 -0
- package/dist/{chunk-R66SHRQE.mjs → chunk-GKAU4P5I.mjs} +2 -2
- package/dist/chunk-GKAU4P5I.mjs.map +1 -0
- package/dist/{chunk-7EL2RQI7.mjs → chunk-IMOLRP7I.mjs} +1 -1
- package/dist/chunk-IMOLRP7I.mjs.map +1 -0
- package/dist/{chunk-2PD23V7H.mjs → chunk-K7LFG5BA.mjs} +1 -1
- package/dist/{chunk-2PD23V7H.mjs.map → chunk-K7LFG5BA.mjs.map} +1 -1
- package/dist/{chunk-AVG4JG4V.mjs → chunk-MPNSYZJU.mjs} +6 -6
- package/dist/chunk-MPNSYZJU.mjs.map +1 -0
- package/dist/{chunk-Z3LJE5QF.mjs → chunk-ONVPCAMQ.mjs} +1 -1
- package/dist/chunk-ONVPCAMQ.mjs.map +1 -0
- package/dist/{chunk-NKGQRF5D.mjs → chunk-PZ3VSAOC.mjs} +4 -4
- package/dist/chunk-PZ3VSAOC.mjs.map +1 -0
- package/dist/{chunk-5BTB7HRK.mjs → chunk-QA3E2PJT.mjs} +2 -2
- package/dist/chunk-QA3E2PJT.mjs.map +1 -0
- package/dist/{chunk-7WJMHFRA.mjs → chunk-R4N52NI2.mjs} +2 -2
- package/dist/chunk-R4N52NI2.mjs.map +1 -0
- package/dist/{chunk-6F7H4PAA.mjs → chunk-R4SQKVDQ.mjs} +1 -1
- package/dist/{chunk-7LPSHBBI.mjs → chunk-WKE3FSON.mjs} +13 -9
- package/dist/chunk-WKE3FSON.mjs.map +1 -0
- package/dist/{chunk-KIS52LFU.mjs → chunk-XSGTWROT.mjs} +7 -7
- package/dist/chunk-XSGTWROT.mjs.map +1 -0
- package/dist/dev.mjs +4 -4
- package/dist/dev.mjs.map +1 -1
- package/dist/experimental.mjs +5 -5
- package/dist/experimental.mjs.map +1 -1
- package/dist/form.mjs +6 -6
- package/dist/form.mjs.map +1 -1
- package/dist/index.mjs +12 -12
- package/dist/inspector.mjs +1 -1
- package/dist/inspector.mjs.map +1 -1
- package/dist/jsoncomponent.mjs +1 -1
- package/dist/jsoncomponent.mjs.map +1 -1
- package/dist/jsontable.mjs +6 -6
- package/dist/metrics.mjs +6 -6
- package/dist/metrics.mjs.map +1 -1
- package/dist/plugins.mjs +9 -9
- package/dist/plugins.mjs.map +1 -1
- package/dist/ui.mjs +3 -3
- package/dist/ui.mjs.map +1 -1
- package/dist/utils.mjs +4 -4
- package/dist/wallet.mjs +13 -13
- package/dist/wallet.mjs.map +1 -1
- package/package.json +3 -3
- package/dist/PaginationState-c19e621a.d.ts +0 -17
- package/dist/PromiseState-e64b3707.d.ts +0 -57
- package/dist/StorageState-cfd942cb.d.ts +0 -48
- package/dist/aiem.d.mts +0 -124
- package/dist/chunk-2BZKMJZX.mjs.map +0 -1
- package/dist/chunk-5BTB7HRK.mjs.map +0 -1
- package/dist/chunk-72E76L6J.mjs.map +0 -1
- package/dist/chunk-7EL2RQI7.mjs.map +0 -1
- package/dist/chunk-7LPSHBBI.mjs.map +0 -1
- package/dist/chunk-7WJMHFRA.mjs.map +0 -1
- package/dist/chunk-AVG4JG4V.mjs.map +0 -1
- package/dist/chunk-KIS52LFU.mjs.map +0 -1
- package/dist/chunk-NKGQRF5D.mjs.map +0 -1
- package/dist/chunk-R66SHRQE.mjs.map +0 -1
- package/dist/chunk-SPFKGNUY.mjs.map +0 -1
- package/dist/chunk-WMV5O3PI.mjs.map +0 -1
- package/dist/chunk-Z3LJE5QF.mjs.map +0 -1
- package/dist/dev.d.mts +0 -26
- package/dist/experimental.d.mts +0 -190
- package/dist/form.d.mts +0 -384
- package/dist/index-38be834f.d.ts +0 -3
- package/dist/index.d.mts +0 -90
- package/dist/inspector.d.mts +0 -15
- package/dist/jsoncomponent.d.mts +0 -22
- package/dist/jsontable.d.mts +0 -126
- package/dist/metrics.d.mts +0 -121
- package/dist/plugins.d.mts +0 -118
- package/dist/root-218afa4f.d.ts +0 -111
- package/dist/ui.d.mts +0 -29
- package/dist/utils.d.mts +0 -148
- package/dist/wallet.d.mts +0 -193
- /package/dist/{chunk-6F7H4PAA.mjs.map → chunk-R4SQKVDQ.mjs.map} +0 -0
package/dist/experimental.d.mts
DELETED
|
@@ -1,190 +0,0 @@
|
|
|
1
|
-
import { S as Store, R as RootStore } from './root-218afa4f.js';
|
|
2
|
-
import React, { ReactNode, HTMLAttributeAnchorTarget } from 'react';
|
|
3
|
-
import 'typed-emitter';
|
|
4
|
-
|
|
5
|
-
declare class SlotPlugin implements Store {
|
|
6
|
-
sid: string;
|
|
7
|
-
stype: string;
|
|
8
|
-
autoObservable?: boolean;
|
|
9
|
-
slotMap: Store["slots"];
|
|
10
|
-
onNewStore({ rootStore }: {
|
|
11
|
-
rootStore: RootStore;
|
|
12
|
-
}): void;
|
|
13
|
-
toJSON(): Record<string, {
|
|
14
|
-
name?: string;
|
|
15
|
-
input?: Record<string, any>;
|
|
16
|
-
render: React.FC;
|
|
17
|
-
}>;
|
|
18
|
-
static Slot: ({ name, ...props }: {
|
|
19
|
-
name: any;
|
|
20
|
-
} & any) => ReactNode;
|
|
21
|
-
constructor(args?: Partial<SlotPlugin>);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
type Engine = {
|
|
25
|
-
name: string;
|
|
26
|
-
get(key: any): any;
|
|
27
|
-
set(key: any, value: any): any;
|
|
28
|
-
remove(key: any): any;
|
|
29
|
-
};
|
|
30
|
-
type DataGroup = Record<string, {
|
|
31
|
-
index: StorageParams<any>;
|
|
32
|
-
children: Record<string, DataGroup>;
|
|
33
|
-
}>;
|
|
34
|
-
type StorageParams<T> = {
|
|
35
|
-
key: string;
|
|
36
|
-
value?: T;
|
|
37
|
-
engine?: Engine;
|
|
38
|
-
_value?: T;
|
|
39
|
-
defaultValue?: T;
|
|
40
|
-
debounce?: number;
|
|
41
|
-
onInit?(value: T): void;
|
|
42
|
-
debounceFn?: any;
|
|
43
|
-
onDebounce?(value: T): void;
|
|
44
|
-
onSet?(value: T): void;
|
|
45
|
-
set?: (value: T) => void;
|
|
46
|
-
setValue?: (value: T) => void;
|
|
47
|
-
reset?: () => void;
|
|
48
|
-
listen?: (func?: (args: {
|
|
49
|
-
key: string;
|
|
50
|
-
value: any;
|
|
51
|
-
}) => void) => void;
|
|
52
|
-
};
|
|
53
|
-
declare class StoragePlugin implements Store {
|
|
54
|
-
sid: string;
|
|
55
|
-
stype: string;
|
|
56
|
-
autoObservable?: boolean;
|
|
57
|
-
static engines: {
|
|
58
|
-
memory: {
|
|
59
|
-
name: string;
|
|
60
|
-
get(key: any): any;
|
|
61
|
-
set(key: any, value: any): any;
|
|
62
|
-
remove(key: any): void;
|
|
63
|
-
};
|
|
64
|
-
localStorage: {
|
|
65
|
-
name: string;
|
|
66
|
-
get(key: any): any;
|
|
67
|
-
set(key: any, value: any): void;
|
|
68
|
-
remove(key: any): void;
|
|
69
|
-
};
|
|
70
|
-
};
|
|
71
|
-
engines: {
|
|
72
|
-
memory: {
|
|
73
|
-
name: string;
|
|
74
|
-
get(key: any): any;
|
|
75
|
-
set(key: any, value: any): any;
|
|
76
|
-
remove(key: any): void;
|
|
77
|
-
};
|
|
78
|
-
localStorage: {
|
|
79
|
-
name: string;
|
|
80
|
-
get(key: any): any;
|
|
81
|
-
set(key: any, value: any): void;
|
|
82
|
-
remove(key: any): void;
|
|
83
|
-
};
|
|
84
|
-
};
|
|
85
|
-
dataMeta: Record<string, StorageParams<any>>;
|
|
86
|
-
get dataGroup(): {};
|
|
87
|
-
static safeParse(val: any): any;
|
|
88
|
-
set: ({ key, value, engine }: {
|
|
89
|
-
key: string;
|
|
90
|
-
value: any;
|
|
91
|
-
engine?: Engine;
|
|
92
|
-
}) => any;
|
|
93
|
-
get: <T>({ key, value, defaultValue, engine, ...other }: StorageParams<T>) => StorageParams<T>;
|
|
94
|
-
remove: ({ key, engine }: {
|
|
95
|
-
key?: string;
|
|
96
|
-
engine?: Engine;
|
|
97
|
-
}) => void;
|
|
98
|
-
static Get<T>(args: StorageParams<T>): StorageParams<T>;
|
|
99
|
-
static Input<T, U extends StorageParams<T>>(args: U): U;
|
|
100
|
-
static Custom<T, U extends StorageParams<T>>(args: U): U & StorageParams<T>;
|
|
101
|
-
constructor(args?: Partial<StoragePlugin>);
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
declare const jwt: StorageParams<string>;
|
|
105
|
-
declare class AsyncStorage implements Store {
|
|
106
|
-
sid: string;
|
|
107
|
-
stype: string;
|
|
108
|
-
url: string;
|
|
109
|
-
forceUpdate: boolean;
|
|
110
|
-
autoObservable?: boolean;
|
|
111
|
-
data: any;
|
|
112
|
-
syncStorage(): void;
|
|
113
|
-
constructor(args?: Partial<AsyncStorage>);
|
|
114
|
-
get(key: any): any;
|
|
115
|
-
set(key: any, value: any): Promise<void>;
|
|
116
|
-
remove(key: any): Promise<void>;
|
|
117
|
-
onNewStore: ({ rootStore, store, }: {
|
|
118
|
-
rootStore: RootStore;
|
|
119
|
-
store: Store;
|
|
120
|
-
}) => void;
|
|
121
|
-
makeAutoAsyncAble(instance: any): Promise<void>;
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
declare class Collection<T = any> implements Store {
|
|
125
|
-
sid: string;
|
|
126
|
-
autoObservable: boolean;
|
|
127
|
-
key: string;
|
|
128
|
-
data: {
|
|
129
|
-
[key: string]: T;
|
|
130
|
-
};
|
|
131
|
-
constructor(args: Partial<Collection<T>>);
|
|
132
|
-
get current(): T;
|
|
133
|
-
setKey(key: string): void;
|
|
134
|
-
setValue(key: string, value: T): void;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
type JSONViewType = {
|
|
138
|
-
className?: string;
|
|
139
|
-
children?: any;
|
|
140
|
-
data?: Record<string, JSONDataType>;
|
|
141
|
-
datas?: Record<string, Record<string, JSONDataType> | JSONDataType[]>;
|
|
142
|
-
uiConfig?: {
|
|
143
|
-
type: string;
|
|
144
|
-
className?: Record<string, string>;
|
|
145
|
-
slots?: Record<string, any>;
|
|
146
|
-
[key: string]: any;
|
|
147
|
-
};
|
|
148
|
-
uiConfigs?: Record<string, JSONViewType['uiConfig']>;
|
|
149
|
-
};
|
|
150
|
-
type JSONDataType = {
|
|
151
|
-
title?: string;
|
|
152
|
-
icon?: any;
|
|
153
|
-
render?: any;
|
|
154
|
-
className?: string;
|
|
155
|
-
type?: 'divider' | 'checkbox' | 'label' | 'radio';
|
|
156
|
-
shortcut?: string;
|
|
157
|
-
disabled?: boolean;
|
|
158
|
-
children?: Record<string, JSONDataType>;
|
|
159
|
-
value?: any;
|
|
160
|
-
link?: any;
|
|
161
|
-
target?: HTMLAttributeAnchorTarget;
|
|
162
|
-
needAuth?: boolean;
|
|
163
|
-
events?: Record<string, any>;
|
|
164
|
-
onChange?: (args: {
|
|
165
|
-
e: any;
|
|
166
|
-
v: any;
|
|
167
|
-
}) => void;
|
|
168
|
-
onClick?: (args: {
|
|
169
|
-
e: any;
|
|
170
|
-
v: any;
|
|
171
|
-
}) => void;
|
|
172
|
-
};
|
|
173
|
-
declare class JSONViewPlugin implements Store {
|
|
174
|
-
sid: string;
|
|
175
|
-
autoObservable?: boolean;
|
|
176
|
-
JSONView: {
|
|
177
|
-
Test: {
|
|
178
|
-
name: string;
|
|
179
|
-
render: () => React.JSX.Element;
|
|
180
|
-
};
|
|
181
|
-
};
|
|
182
|
-
onNewStore({ rootStore, store }: {
|
|
183
|
-
rootStore: RootStore<any>;
|
|
184
|
-
store: Store;
|
|
185
|
-
}): void;
|
|
186
|
-
crawl(store: Store): void;
|
|
187
|
-
static JSONView: (props: JSONViewType) => React.JSX.Element;
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
export { AsyncStorage, Collection, DataGroup, Engine, JSONDataType, JSONViewPlugin, JSONViewType, SlotPlugin, StorageParams, StoragePlugin, jwt };
|
package/dist/form.d.mts
DELETED
|
@@ -1,384 +0,0 @@
|
|
|
1
|
-
import React$1, { Dispatch, SetStateAction, JSX as JSX$1, ReactNode } from 'react';
|
|
2
|
-
import { ButtonProps, TabsProps, CheckboxProps, SlotsToClasses, InputSlots, InputProps, SelectSlots, SelectProps, SelectedItems, DatePickerProps, ModalSlots } from '@nextui-org/react';
|
|
3
|
-
import { UiSchema, RJSFSchema, WidgetProps, Widget } from '@rjsf/utils';
|
|
4
|
-
import * as _rjsf_validator_ajv8_lib_validator from '@rjsf/validator-ajv8/lib/validator';
|
|
5
|
-
import Form, { IChangeEvent } from '@rjsf/core';
|
|
6
|
-
import { T as ThemeType } from './index-38be834f.js';
|
|
7
|
-
import { EditorProps } from '@monaco-editor/react';
|
|
8
|
-
import { S as Store } from './root-218afa4f.js';
|
|
9
|
-
import EventEmitter from 'events';
|
|
10
|
-
import 'typed-emitter';
|
|
11
|
-
|
|
12
|
-
declare class JSONSchemaFormState<T, U = UiSchema> {
|
|
13
|
-
value: JSONSchemaValue<T>;
|
|
14
|
-
schema: RJSFSchema;
|
|
15
|
-
uiSchema: U;
|
|
16
|
-
reactive: boolean;
|
|
17
|
-
readonly: boolean;
|
|
18
|
-
liveValidate: boolean;
|
|
19
|
-
validator: _rjsf_validator_ajv8_lib_validator.default<any, RJSFSchema, any>;
|
|
20
|
-
formRef: React.RefObject<Form>;
|
|
21
|
-
get formData(): T;
|
|
22
|
-
set formData(value: T);
|
|
23
|
-
get dynamicData(): {
|
|
24
|
-
ready: boolean;
|
|
25
|
-
};
|
|
26
|
-
getDymaicData: () => {
|
|
27
|
-
ready: boolean;
|
|
28
|
-
};
|
|
29
|
-
onChange: (e: IChangeEvent<T>, id?: string) => void;
|
|
30
|
-
onSubmit: (e: IChangeEvent<T>) => void;
|
|
31
|
-
afterSubmit: (e: IChangeEvent<T>) => void;
|
|
32
|
-
afterChange: (e: IChangeEvent<T>, id?: string) => void;
|
|
33
|
-
reset({ force }?: {
|
|
34
|
-
force?: boolean;
|
|
35
|
-
}): this;
|
|
36
|
-
customValidate: (formData: T, errors: any) => any;
|
|
37
|
-
constructor(args?: Partial<JSONSchemaFormState<T, U>>);
|
|
38
|
-
}
|
|
39
|
-
declare class JSONSchemaValue<T> {
|
|
40
|
-
value?: T;
|
|
41
|
-
default?: T;
|
|
42
|
-
constructor(args?: Partial<JSONSchemaValue<T>>);
|
|
43
|
-
set(value: Partial<T>): T;
|
|
44
|
-
onSet(value: Partial<T>): Partial<T>;
|
|
45
|
-
get(): T;
|
|
46
|
-
getFormat(value: T): T;
|
|
47
|
-
reset(): void;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
declare const COMPONENTS: {
|
|
51
|
-
GridLayout: <T extends FormDataType>(props: JSONFormProps<T>) => React$1.JSX.Element;
|
|
52
|
-
TabLayout: <T extends FormDataType>(props: JSONFormProps<T>) => React$1.JSX.Element;
|
|
53
|
-
ListLayout: <T extends FormDataType>(props: JSONFormProps<T>) => React$1.JSX.Element;
|
|
54
|
-
SimpleLayout: <T extends FormDataType>(props: JSONFormProps<T>) => React$1.JSX.Element;
|
|
55
|
-
};
|
|
56
|
-
type FormDataType = {
|
|
57
|
-
[key: string]: {
|
|
58
|
-
[key: string]: string | number | boolean | Record<string, string | number | boolean>;
|
|
59
|
-
};
|
|
60
|
-
};
|
|
61
|
-
type FormConfigType<T extends FormDataType> = {
|
|
62
|
-
[F in keyof T]?: {
|
|
63
|
-
[X in keyof T[F]]?: {
|
|
64
|
-
title?: string;
|
|
65
|
-
required?: boolean;
|
|
66
|
-
requiredErrMsg?: string;
|
|
67
|
-
validate?: (v: any) => string | void;
|
|
68
|
-
selectOptions?: {
|
|
69
|
-
label: string;
|
|
70
|
-
value: string;
|
|
71
|
-
}[];
|
|
72
|
-
isMultipleSelect?: boolean;
|
|
73
|
-
} & UiSchema;
|
|
74
|
-
};
|
|
75
|
-
};
|
|
76
|
-
type SubmitButtonProps<T extends FormDataType> = ButtonProps & {
|
|
77
|
-
onAfterSubmit?: (formKey: FormKey<T>, data: FormDataOfKey<T>, setLoading: Dispatch<SetStateAction<boolean>>) => void;
|
|
78
|
-
};
|
|
79
|
-
type CombFormsCustomRender<T extends FormDataType> = (formStates: {
|
|
80
|
-
[F in keyof T]?: JSONSchemaFormState<FormDataOfKey<T>, UiSchema>;
|
|
81
|
-
}) => React$1.ReactNode;
|
|
82
|
-
type CombFormsCustomRenderMap<T extends FormDataType> = {
|
|
83
|
-
Top?: CombFormsCustomRender<T>;
|
|
84
|
-
SubmitButtonBefore?: CombFormsCustomRender<T>;
|
|
85
|
-
SubmitButtonAfter?: CombFormsCustomRender<T>;
|
|
86
|
-
};
|
|
87
|
-
type SubformCustomRender<T extends FormDataType> = (formKey: FormKey<T>, formState: JSONSchemaFormState<FormDataOfKey<T>, UiSchema>) => React$1.ReactNode;
|
|
88
|
-
type SubformCustomRenderMap<T extends FormDataType> = {
|
|
89
|
-
Top?: SubformCustomRender<T>;
|
|
90
|
-
SubmitButtonBefore?: SubformCustomRender<T>;
|
|
91
|
-
SubmitButtonAfter?: SubformCustomRender<T>;
|
|
92
|
-
};
|
|
93
|
-
type SubformLayoutBaseConfig<T extends FormDataType, F extends keyof T> = {
|
|
94
|
-
title?: string;
|
|
95
|
-
titleBoxCss?: string;
|
|
96
|
-
fieldLayout?: Array<keyof NonNullable<T[F]>> | Array<Array<keyof NonNullable<T[F]>> | keyof NonNullable<T[F]>>;
|
|
97
|
-
submitButtonProps?: SubmitButtonProps<T>;
|
|
98
|
-
customRender?: SubformCustomRenderMap<T>;
|
|
99
|
-
};
|
|
100
|
-
interface LayoutConfigMap<T extends FormDataType> {
|
|
101
|
-
GridLayout: {
|
|
102
|
-
$type: 'GridLayout';
|
|
103
|
-
$gridColumn?: number;
|
|
104
|
-
$combFormsCustomRender?: CombFormsCustomRenderMap<T>;
|
|
105
|
-
} & {
|
|
106
|
-
[F in keyof T]?: SubformLayoutBaseConfig<T, F> & {
|
|
107
|
-
colSpan?: number;
|
|
108
|
-
cardCss?: string;
|
|
109
|
-
};
|
|
110
|
-
};
|
|
111
|
-
TabLayout: {
|
|
112
|
-
$type: 'TabLayout';
|
|
113
|
-
$tabsProps?: TabsProps;
|
|
114
|
-
$combFormsCustomRender?: CombFormsCustomRenderMap<T>;
|
|
115
|
-
} & {
|
|
116
|
-
[F in keyof T]?: SubformLayoutBaseConfig<T, F>;
|
|
117
|
-
};
|
|
118
|
-
ListLayout: {
|
|
119
|
-
$type: 'ListLayout';
|
|
120
|
-
$combFormsCustomRender?: CombFormsCustomRenderMap<T>;
|
|
121
|
-
} & {
|
|
122
|
-
[F in keyof T]?: SubformLayoutBaseConfig<T, F>;
|
|
123
|
-
};
|
|
124
|
-
SimpleLayout: {
|
|
125
|
-
$type: 'SimpleLayout';
|
|
126
|
-
$combFormsCustomRender?: CombFormsCustomRenderMap<T>;
|
|
127
|
-
} & {
|
|
128
|
-
[F in keyof T]?: SubformLayoutBaseConfig<T, F>;
|
|
129
|
-
};
|
|
130
|
-
}
|
|
131
|
-
type LayoutType = keyof typeof COMPONENTS;
|
|
132
|
-
type LayoutConfigType<T extends FormDataType, L extends LayoutType> = LayoutConfigMap<T>[L];
|
|
133
|
-
type FormKey<T extends FormDataType> = keyof T;
|
|
134
|
-
type FormDataOfKey<T extends FormDataType> = T[FormKey<T>];
|
|
135
|
-
type JSONFormProps<T extends FormDataType> = {
|
|
136
|
-
className?: string;
|
|
137
|
-
theme?: ThemeType;
|
|
138
|
-
formData: T;
|
|
139
|
-
formConfig?: FormConfigType<T>;
|
|
140
|
-
layoutConfig?: LayoutConfigType<T, LayoutType>;
|
|
141
|
-
onBatchSubmit?: (data: T, setLoading: Dispatch<SetStateAction<boolean>>) => void;
|
|
142
|
-
onSet?: (v: FormDataOfKey<T>, form: JSONSchemaFormState<FormDataOfKey<T>, UiSchema>) => FormDataOfKey<T>;
|
|
143
|
-
onChange?: (data: Partial<T>) => void;
|
|
144
|
-
onReady?: (formStates: {
|
|
145
|
-
[F in keyof T]?: JSONSchemaFormState<FormDataOfKey<T>, UiSchema>;
|
|
146
|
-
}) => void;
|
|
147
|
-
batchSubmitButtonProps?: ButtonProps & {
|
|
148
|
-
onBatchSubmit?: (formData: T, setLoading: Dispatch<SetStateAction<boolean>>) => void;
|
|
149
|
-
};
|
|
150
|
-
};
|
|
151
|
-
declare const JSONForm: <T extends FormDataType>(props: JSONFormProps<T>) => React$1.JSX.Element;
|
|
152
|
-
|
|
153
|
-
type Options$6 = {
|
|
154
|
-
className?: string;
|
|
155
|
-
nextuiClassNames?: CheckboxProps["classNames"];
|
|
156
|
-
size: CheckboxProps["size"];
|
|
157
|
-
color: CheckboxProps["color"];
|
|
158
|
-
description?: string;
|
|
159
|
-
descriptionClassName?: string;
|
|
160
|
-
};
|
|
161
|
-
interface CheckboxWidgetProps extends WidgetProps {
|
|
162
|
-
options: Options$6;
|
|
163
|
-
}
|
|
164
|
-
interface CheckboxWidgetUIOptions {
|
|
165
|
-
"ui:widget": (props: CheckboxWidgetProps) => JSX$1.Element;
|
|
166
|
-
"ui:options": Options$6;
|
|
167
|
-
}
|
|
168
|
-
declare function CheckboxWidget({ onChange, options, label, value, disabled, uiSchema }: CheckboxWidgetProps): JSX$1.Element;
|
|
169
|
-
|
|
170
|
-
type Options$5 = {
|
|
171
|
-
editorHeight?: string;
|
|
172
|
-
readOnly?: boolean;
|
|
173
|
-
language?: string;
|
|
174
|
-
languageSelectorOptions?: {
|
|
175
|
-
label: string;
|
|
176
|
-
value: string;
|
|
177
|
-
}[];
|
|
178
|
-
onChangeLanguage?: (v: string) => void;
|
|
179
|
-
onRun?: (v: string) => void;
|
|
180
|
-
onMount?: EditorProps['onMount'];
|
|
181
|
-
jsonStrSpace?: number;
|
|
182
|
-
labelClassName?: string;
|
|
183
|
-
description?: string;
|
|
184
|
-
descriptionClassName?: string;
|
|
185
|
-
editorBoxClassName?: string;
|
|
186
|
-
errMsgClassName?: string;
|
|
187
|
-
};
|
|
188
|
-
interface EditorWidgetProps extends WidgetProps {
|
|
189
|
-
options: Options$5;
|
|
190
|
-
}
|
|
191
|
-
type EditorWidgetUIOptions = {
|
|
192
|
-
"ui:widget": (props: EditorWidgetProps) => JSX$1.Element;
|
|
193
|
-
"ui:options": Options$5;
|
|
194
|
-
};
|
|
195
|
-
declare const EditorWidget: ({ label, options, value, required, uiSchema, disabled, onChange }: EditorWidgetProps) => JSX$1.Element;
|
|
196
|
-
|
|
197
|
-
type Options$4 = {
|
|
198
|
-
className?: string;
|
|
199
|
-
nextuiClassNames?: SlotsToClasses<InputSlots>;
|
|
200
|
-
labelPlacement?: InputProps["labelPlacement"];
|
|
201
|
-
size: InputProps["size"];
|
|
202
|
-
placeholder?: string;
|
|
203
|
-
inputType?: 'text' | 'number' | 'password';
|
|
204
|
-
color?: InputProps["color"];
|
|
205
|
-
variant?: InputProps["variant"];
|
|
206
|
-
radius?: InputProps["radius"];
|
|
207
|
-
startContent?: ReactNode;
|
|
208
|
-
endContent?: ReactNode;
|
|
209
|
-
description?: string;
|
|
210
|
-
min?: number;
|
|
211
|
-
max?: number;
|
|
212
|
-
};
|
|
213
|
-
interface InputWidgetProps extends WidgetProps {
|
|
214
|
-
options: Options$4;
|
|
215
|
-
}
|
|
216
|
-
interface InputWidgetUIOptions {
|
|
217
|
-
"ui:widget": (props: InputWidgetProps) => JSX.Element;
|
|
218
|
-
"ui:options": Options$4;
|
|
219
|
-
}
|
|
220
|
-
declare function InputWidget(props: InputWidgetProps): React$1.JSX.Element;
|
|
221
|
-
|
|
222
|
-
type Options$3 = {
|
|
223
|
-
className?: string;
|
|
224
|
-
nextuiClassNames?: SlotsToClasses<SelectSlots>;
|
|
225
|
-
listboxProps?: SelectProps['listboxProps'];
|
|
226
|
-
labelPlacement?: SelectProps["labelPlacement"];
|
|
227
|
-
placeholder?: string;
|
|
228
|
-
size: SelectProps["size"];
|
|
229
|
-
color?: SelectProps["color"];
|
|
230
|
-
variant?: SelectProps["variant"];
|
|
231
|
-
radius?: SelectProps["radius"];
|
|
232
|
-
description?: string;
|
|
233
|
-
};
|
|
234
|
-
interface SelectWidgetProps extends WidgetProps {
|
|
235
|
-
options: Options$3;
|
|
236
|
-
}
|
|
237
|
-
interface SelectWidgetUIOptions {
|
|
238
|
-
"ui:widget": (props: SelectWidgetProps) => JSX$1.Element;
|
|
239
|
-
"ui:options": Options$3;
|
|
240
|
-
}
|
|
241
|
-
declare function SelectWidget(props: SelectWidgetProps): JSX$1.Element;
|
|
242
|
-
|
|
243
|
-
type Options$2 = {
|
|
244
|
-
className?: string;
|
|
245
|
-
nextuiClassNames?: SelectProps['classNames'];
|
|
246
|
-
labelPlacement?: SelectProps['labelPlacement'];
|
|
247
|
-
listboxProps?: SelectProps['listboxProps'];
|
|
248
|
-
size: SelectProps['size'];
|
|
249
|
-
color?: SelectProps['color'];
|
|
250
|
-
placeholder?: string;
|
|
251
|
-
description?: string;
|
|
252
|
-
renderValue?: (items: SelectedItems<{
|
|
253
|
-
label: string;
|
|
254
|
-
value: string;
|
|
255
|
-
}>) => React$1.ReactNode;
|
|
256
|
-
};
|
|
257
|
-
interface MultipleSelectWidgetProps extends WidgetProps {
|
|
258
|
-
options: Options$2;
|
|
259
|
-
}
|
|
260
|
-
interface MultipleSelectWidgetUIOptions {
|
|
261
|
-
'ui:widget': (props: MultipleSelectWidgetProps) => JSX$1.Element;
|
|
262
|
-
'ui:options': Options$2;
|
|
263
|
-
}
|
|
264
|
-
declare function MultipleSelectWidget(props: MultipleSelectWidgetProps): JSX$1.Element;
|
|
265
|
-
|
|
266
|
-
type Options$1 = {
|
|
267
|
-
className?: string;
|
|
268
|
-
nextuiClassNames?: SlotsToClasses<InputSlots>;
|
|
269
|
-
labelPlacement?: InputProps['labelPlacement'];
|
|
270
|
-
size: InputProps['size'];
|
|
271
|
-
minRows?: number;
|
|
272
|
-
maxRows?: number;
|
|
273
|
-
placeholder?: string;
|
|
274
|
-
color?: InputProps["color"];
|
|
275
|
-
variant?: InputProps["variant"];
|
|
276
|
-
radius?: InputProps["radius"];
|
|
277
|
-
startContent?: ReactNode;
|
|
278
|
-
endContent?: ReactNode;
|
|
279
|
-
description?: string;
|
|
280
|
-
};
|
|
281
|
-
interface TextareaWidgetProps extends WidgetProps {
|
|
282
|
-
options: Options$1;
|
|
283
|
-
}
|
|
284
|
-
interface TextareaWidgetUIOptions {
|
|
285
|
-
'ui:widget': (props: TextareaWidgetProps) => JSX$1.Element;
|
|
286
|
-
'ui:options': Options$1;
|
|
287
|
-
}
|
|
288
|
-
declare function TextareaWidget(props: TextareaWidgetProps): JSX$1.Element;
|
|
289
|
-
|
|
290
|
-
type Options = {
|
|
291
|
-
className?: string;
|
|
292
|
-
nextuiClassNames?: Record<"base" | "selectorButton" | "selectorIcon" | "popoverContent" | "calendar" | "calendarContent" | "timeInputLabel" | "timeInput", string>;
|
|
293
|
-
dateInputClassNames?: Record<"base" | "label" | "inputWrapper" | "innerWrapper" | "input" | "helperWrapper" | "description" | "errorMessage", string>;
|
|
294
|
-
size: DatePickerProps["size"];
|
|
295
|
-
labelPlacement?: DatePickerProps["labelPlacement"];
|
|
296
|
-
color: DatePickerProps["color"];
|
|
297
|
-
granularity?: DatePickerProps["granularity"];
|
|
298
|
-
variant?: DatePickerProps['variant'];
|
|
299
|
-
description?: string;
|
|
300
|
-
};
|
|
301
|
-
interface DatePickerWidgetProps extends WidgetProps {
|
|
302
|
-
options: Options;
|
|
303
|
-
}
|
|
304
|
-
interface DatePickerWidgetUIOptions {
|
|
305
|
-
'ui:widget': (props: DatePickerWidgetProps) => string | Widget<any, RJSFSchema, any> | undefined;
|
|
306
|
-
'ui:options': Options;
|
|
307
|
-
}
|
|
308
|
-
declare function DatePickerWidget({ label, options, value, required, disabled, uiSchema, onChange }: DatePickerWidgetProps): React$1.JSX.Element;
|
|
309
|
-
|
|
310
|
-
interface Props {
|
|
311
|
-
formState: JSONSchemaFormState<any>;
|
|
312
|
-
children?: any;
|
|
313
|
-
}
|
|
314
|
-
declare const JSONSchemaForm: (({ children, formState }: Props) => React$1.JSX.Element) & {
|
|
315
|
-
displayName: string;
|
|
316
|
-
};
|
|
317
|
-
|
|
318
|
-
declare class ComplexFormModalStore<T extends FormDataType> implements Store {
|
|
319
|
-
sid: string;
|
|
320
|
-
provider: () => React$1.JSX.Element;
|
|
321
|
-
isOpen: boolean;
|
|
322
|
-
title: string;
|
|
323
|
-
formData?: T;
|
|
324
|
-
formConfig?: FormConfigType<T>;
|
|
325
|
-
layoutConfig?: LayoutConfigType<T, LayoutType>;
|
|
326
|
-
className: string;
|
|
327
|
-
classNames?: SlotsToClasses<ModalSlots>;
|
|
328
|
-
theme: ThemeType;
|
|
329
|
-
modalSize: 'sm' | 'md' | 'lg' | 'xl' | '2xl' | 'full' | 'xs' | '3xl' | '4xl' | '5xl';
|
|
330
|
-
scrollBehavior?: 'normal' | 'inside' | 'outside';
|
|
331
|
-
isDismissable: boolean;
|
|
332
|
-
event: EventEmitter<[never]>;
|
|
333
|
-
onBatchSubmit?: (data: T, setLoading?: Dispatch<SetStateAction<boolean>>) => void;
|
|
334
|
-
onSet?: (v: FormDataOfKey<T>, form: JSONSchemaFormState<FormDataOfKey<T>, UiSchema>) => FormDataOfKey<T>;
|
|
335
|
-
onChange?: (data: Partial<T>) => void;
|
|
336
|
-
onReady?: (formStates: {
|
|
337
|
-
[F in keyof T]?: JSONSchemaFormState<FormDataOfKey<T>, UiSchema>;
|
|
338
|
-
}) => void;
|
|
339
|
-
batchSubmitButtonProps?: ButtonProps & {
|
|
340
|
-
onBatchSubmit?: (formData: T, setLoading: Dispatch<SetStateAction<boolean>>) => void;
|
|
341
|
-
};
|
|
342
|
-
constructor(args?: Partial<ComplexFormModalStore<T>>);
|
|
343
|
-
setData(v: Partial<ComplexFormModalStore<T>>): void;
|
|
344
|
-
close(): void;
|
|
345
|
-
}
|
|
346
|
-
declare function getComplexFormData<T extends FormDataType>(v: Partial<ComplexFormModalStore<T>>): Promise<T>;
|
|
347
|
-
|
|
348
|
-
declare class FormModalStore<T = {
|
|
349
|
-
[key: string]: any;
|
|
350
|
-
}> implements Store {
|
|
351
|
-
sid: string;
|
|
352
|
-
provider: () => React$1.JSX.Element;
|
|
353
|
-
isOpen: boolean;
|
|
354
|
-
title: string;
|
|
355
|
-
form: JSONSchemaFormState<T>;
|
|
356
|
-
className: string;
|
|
357
|
-
classNames?: SlotsToClasses<ModalSlots>;
|
|
358
|
-
theme: ThemeType;
|
|
359
|
-
modalSize: 'sm' | 'md' | 'lg' | 'xl' | '2xl' | 'full' | 'xs' | '3xl' | '4xl' | '5xl';
|
|
360
|
-
scrollBehavior?: 'normal' | 'inside' | 'outside';
|
|
361
|
-
closeOnOverlayClick: boolean;
|
|
362
|
-
event: EventEmitter<[never]>;
|
|
363
|
-
onAfterSubmit?: (data: T) => void;
|
|
364
|
-
constructor(args?: Partial<FormModalStore>);
|
|
365
|
-
setData(v: Partial<FormModalStore>): void;
|
|
366
|
-
close(): void;
|
|
367
|
-
}
|
|
368
|
-
declare function getFormData<T = {
|
|
369
|
-
[key: string]: any;
|
|
370
|
-
}>(v: Partial<FormModalStore>): Promise<T>;
|
|
371
|
-
declare function getFormState<T>({ data, metadata, onSet, onSubmit, theme, }: {
|
|
372
|
-
data: T;
|
|
373
|
-
metadata?: {
|
|
374
|
-
[key: string]: any;
|
|
375
|
-
} & Partial<JSONSchemaFormState<any>>;
|
|
376
|
-
onSet?: (v: T, form: JSONSchemaFormState<T, UiSchema>) => T;
|
|
377
|
-
onSubmit?: (data: T) => void;
|
|
378
|
-
theme: ThemeType;
|
|
379
|
-
}): JSONSchemaFormState<T, UiSchema>;
|
|
380
|
-
declare function getSimpleFormData<T>(data: T, metadata: {
|
|
381
|
-
[key: string]: any;
|
|
382
|
-
} & Partial<JSONSchemaFormState<any>>, config: Partial<FormModalStore>, onSet?: (v: T, form: JSONSchemaFormState<T, UiSchema>) => T, theme?: ThemeType): Promise<T>;
|
|
383
|
-
|
|
384
|
-
export { CheckboxWidget, CheckboxWidgetProps, CheckboxWidgetUIOptions, ComplexFormModalStore, DatePickerWidget, DatePickerWidgetProps, DatePickerWidgetUIOptions, EditorWidget, EditorWidgetProps, EditorWidgetUIOptions, FormConfigType, FormDataOfKey, FormDataType, FormKey, FormModalStore, InputWidget, InputWidgetProps, InputWidgetUIOptions, JSONForm, JSONFormProps, JSONSchemaForm, LayoutConfigType, LayoutType, MultipleSelectWidget, MultipleSelectWidgetProps, MultipleSelectWidgetUIOptions, SelectWidget, SelectWidgetProps, SelectWidgetUIOptions, TextareaWidget, TextareaWidgetProps, TextareaWidgetUIOptions, getComplexFormData, getFormData, getFormState, getSimpleFormData };
|
package/dist/index-38be834f.d.ts
DELETED
package/dist/index.d.mts
DELETED
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import { R as RootStore, E as EventMap, S as Store } from './root-218afa4f.js';
|
|
2
|
-
export { B as BaseState, c as BooleanState, N as NumberState, a as StoreClass, b as StringState, V as ValueState } from './root-218afa4f.js';
|
|
3
|
-
export { P as PromiseState } from './PromiseState-e64b3707.js';
|
|
4
|
-
export { P as PromiseHook, S as StorageState } from './StorageState-cfd942cb.js';
|
|
5
|
-
import BigNumber from 'bignumber.js';
|
|
6
|
-
export { P as PaginationState } from './PaginationState-c19e621a.js';
|
|
7
|
-
import React from 'react';
|
|
8
|
-
import 'typed-emitter';
|
|
9
|
-
import 'events';
|
|
10
|
-
import 'mobx';
|
|
11
|
-
|
|
12
|
-
declare const rootStore: RootStore<EventMap>;
|
|
13
|
-
declare const useStore: () => RootStore<EventMap>;
|
|
14
|
-
|
|
15
|
-
declare class BigNumberState {
|
|
16
|
-
value: BigNumber;
|
|
17
|
-
loading: boolean;
|
|
18
|
-
decimals: number;
|
|
19
|
-
fixed: number;
|
|
20
|
-
formatter?: Function;
|
|
21
|
-
constructor(args: Partial<BigNumberState>);
|
|
22
|
-
get format(): any;
|
|
23
|
-
getFormat({ decimals, fixed }?: {
|
|
24
|
-
decimals?: number;
|
|
25
|
-
fixed?: number;
|
|
26
|
-
}): any;
|
|
27
|
-
setDecimals(decimals: number): void;
|
|
28
|
-
setValue(value: BigNumber): void;
|
|
29
|
-
setLoading(val: any): void;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
declare class BigNumberInputState {
|
|
33
|
-
value: BigNumber;
|
|
34
|
-
format: string;
|
|
35
|
-
loading: boolean;
|
|
36
|
-
decimals: number;
|
|
37
|
-
formatter?: Function;
|
|
38
|
-
constructor(args: Partial<BigNumberInputState>);
|
|
39
|
-
get noDecimasValue(): BigNumber;
|
|
40
|
-
setValue(value: any): void;
|
|
41
|
-
setFormat(val: any): void;
|
|
42
|
-
setLoading(val: boolean): void;
|
|
43
|
-
setDecimals(val: number): void;
|
|
44
|
-
get isZero(): boolean;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
declare class StorageListState<T = any> {
|
|
48
|
-
key: string;
|
|
49
|
-
list: T[];
|
|
50
|
-
static safeParse(val: any): any;
|
|
51
|
-
constructor(args: {
|
|
52
|
-
key: string;
|
|
53
|
-
});
|
|
54
|
-
load(): any;
|
|
55
|
-
push(value: T): void;
|
|
56
|
-
remove(index: number): void;
|
|
57
|
-
private save;
|
|
58
|
-
clear(): void;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
declare class ObjectPool {
|
|
62
|
-
static pool: {
|
|
63
|
-
[key: string]: any;
|
|
64
|
-
};
|
|
65
|
-
static get<T extends (...args: any[]) => any, U = ReturnType<T>>(key: string, func: T): U;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
declare class AutoMan implements Store {
|
|
69
|
-
sid: string;
|
|
70
|
-
stype: string;
|
|
71
|
-
autoObservable?: boolean | undefined;
|
|
72
|
-
provider: (() => React.JSX.Element) & {
|
|
73
|
-
displayName: string;
|
|
74
|
-
};
|
|
75
|
-
static use<T extends {
|
|
76
|
-
[Key in keyof T]: Store;
|
|
77
|
-
}, U extends {
|
|
78
|
-
[Key in keyof T]: T[Key] extends Store ? {
|
|
79
|
-
[K in keyof T[Key]]?: any;
|
|
80
|
-
} : never;
|
|
81
|
-
}>(stores: T, promises?: U): T;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
declare const AppProvider: (({ children }: {
|
|
85
|
-
children?: React.ReactNode;
|
|
86
|
-
}) => React.JSX.Element) & {
|
|
87
|
-
displayName: string;
|
|
88
|
-
};
|
|
89
|
-
|
|
90
|
-
export { AppProvider, AutoMan, BigNumberInputState, BigNumberState, EventMap, ObjectPool, RootStore, StorageListState, Store, rootStore, useStore };
|
package/dist/inspector.d.mts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { S as Store } from './root-218afa4f.js';
|
|
3
|
-
import 'typed-emitter';
|
|
4
|
-
|
|
5
|
-
declare class DevInspectorPlugin implements Store {
|
|
6
|
-
sid: string;
|
|
7
|
-
stype: string;
|
|
8
|
-
autoObservable: boolean;
|
|
9
|
-
disabled: boolean;
|
|
10
|
-
editor: 'vscode' | 'cursor';
|
|
11
|
-
constructor(args?: Partial<DevInspectorPlugin>);
|
|
12
|
-
provider: () => React.JSX.Element;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export { DevInspectorPlugin };
|