@jsonui/react 0.4.4 → 0.7.0
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/README.md +6 -10
- package/dist/cjs/index.js +36460 -19543
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/ReduxProviders.d.ts +5 -14
- package/dist/cjs/types/ViewerWeb.d.ts +1 -1
- package/dist/cjs/types/index.d.ts +3 -3
- package/dist/cjs/types/stock/stockToRenderer.d.ts +3 -3
- package/dist/cjs/types/stories/PerformansTest1.stories.d.ts +5 -0
- package/dist/cjs/types/stories/PerformansTest2.stories.d.ts +5 -0
- package/dist/cjs/types/stories/StateSaveTest/StateSaveTest.stories.d.ts +5 -0
- package/dist/cjs/types/stories/Validation.stories.d.ts +12 -0
- package/dist/cjs/types/tests/input.test.d.ts +0 -2
- package/dist/cjs/types/types.d.ts +7 -4
- package/dist/esm/index.js +36461 -19544
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/ReduxProviders.d.ts +5 -14
- package/dist/esm/types/ViewerWeb.d.ts +1 -1
- package/dist/esm/types/index.d.ts +3 -3
- package/dist/esm/types/stock/stockToRenderer.d.ts +3 -3
- package/dist/esm/types/stories/PerformansTest1.stories.d.ts +5 -0
- package/dist/esm/types/stories/PerformansTest2.stories.d.ts +5 -0
- package/dist/esm/types/stories/StateSaveTest/StateSaveTest.stories.d.ts +5 -0
- package/dist/esm/types/stories/Validation.stories.d.ts +12 -0
- package/dist/esm/types/tests/input.test.d.ts +0 -2
- package/dist/esm/types/types.d.ts +7 -4
- package/dist/index.d.ts +4 -4
- package/package.json +3 -4
|
@@ -1,18 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
import { Persistor } from 'redux-persist/es/types';
|
|
5
|
-
import { DefaultValues } from 'types';
|
|
6
|
-
declare type MyProps = {
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { DefaultValues, GetFormState } from 'types';
|
|
3
|
+
interface Props {
|
|
7
4
|
children: ReactNode;
|
|
8
5
|
defaultValues?: DefaultValues;
|
|
9
|
-
|
|
10
|
-
};
|
|
11
|
-
declare class Providers extends React.Component<MyProps> {
|
|
12
|
-
store: Store<any, AnyAction>;
|
|
13
|
-
persistor: Persistor;
|
|
14
|
-
disabledPersist: boolean;
|
|
15
|
-
constructor(props: MyProps);
|
|
16
|
-
render(): JSX.Element;
|
|
6
|
+
getFormState?: GetFormState;
|
|
17
7
|
}
|
|
8
|
+
declare const Providers: ({ children, defaultValues: root, getFormState: getState }: Props) => JSX.Element;
|
|
18
9
|
export default Providers;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ViewerProps } from 'types';
|
|
3
|
-
declare function ViewerWeb({ defaultValues,
|
|
3
|
+
declare function ViewerWeb({ defaultValues, getFormState, ...props }: ViewerProps): JSX.Element;
|
|
4
4
|
export default ViewerWeb;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ChangeDefaultValueFuncProp, JSONValue, ViewerProps } from 'types';
|
|
3
|
+
import { JsonUIComponentsType, JsonUIFunctions, JsonUIFunctionType } from '@jsonui/core';
|
|
3
4
|
import { MessageHandlerContext, MessageHandler } from './MessageReceiverContext';
|
|
4
|
-
declare
|
|
5
|
-
declare const JsonUI: (props: JsonUIProps) => JSX.Element;
|
|
5
|
+
declare const JsonUI: (props: ViewerProps) => JSX.Element;
|
|
6
6
|
export { JsonUI, MessageHandlerContext, MessageHandler };
|
|
7
|
-
export type { JsonUIProps, JSONValue, ChangeDefaultValueFuncProp };
|
|
7
|
+
export type { ViewerProps as JsonUIProps, JSONValue, ChangeDefaultValueFuncProp, JsonUIFunctions, JsonUIFunctionType, JsonUIComponentsType };
|
|
@@ -12,9 +12,9 @@ declare const stock: {
|
|
|
12
12
|
Edit: typeof import("./components/Edit").default;
|
|
13
13
|
};
|
|
14
14
|
functions: {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
get: import("@jsonui/core").JsonUIFunctionType;
|
|
16
|
+
set: import("@jsonui/core").JsonUIFunctionType;
|
|
17
|
+
jsonata: import("@jsonui/core").JsonUIFunctionType;
|
|
18
18
|
};
|
|
19
19
|
};
|
|
20
20
|
export default stock;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ComponentStory, ComponentMeta } from '@storybook/react';
|
|
3
|
+
declare const JsonUIStory: ComponentMeta<(props: import("../types").ViewerProps) => JSX.Element>;
|
|
4
|
+
export declare const InputTest: ComponentStory<any>;
|
|
5
|
+
export default JsonUIStory;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ComponentStory, ComponentMeta } from '@storybook/react';
|
|
3
|
+
declare const JsonUIStory: ComponentMeta<(props: import("../types").ViewerProps) => JSX.Element>;
|
|
4
|
+
export declare const BoxTest: ComponentStory<any>;
|
|
5
|
+
export default JsonUIStory;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ComponentStory, ComponentMeta } from '@storybook/react';
|
|
3
|
+
declare const JsonUIStory: ComponentMeta<(props: import("types").ViewerProps) => JSX.Element>;
|
|
4
|
+
export declare const StoreStateTest: ComponentStory<(props: import("types").ViewerProps) => JSX.Element>;
|
|
5
|
+
export default JsonUIStory;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ComponentStory, ComponentMeta } from '@storybook/react';
|
|
3
|
+
declare const JsonUIStory: ComponentMeta<(props: import("../types").ViewerProps) => JSX.Element>;
|
|
4
|
+
export declare const ValidationTest: ComponentStory<(props: import("../types").ViewerProps) => JSX.Element>;
|
|
5
|
+
export default JsonUIStory;
|
|
6
|
+
/**
|
|
7
|
+
* TODO:
|
|
8
|
+
* how is help submit to validate the whole form
|
|
9
|
+
* touch
|
|
10
|
+
* dirty
|
|
11
|
+
*
|
|
12
|
+
* */
|
|
@@ -7,8 +7,6 @@ export {};
|
|
|
7
7
|
* - check children and no children component with children prop
|
|
8
8
|
* - check data manipulation with mutability situation
|
|
9
9
|
* - check error boundary how works
|
|
10
|
-
* - check persistent data how works after reload
|
|
11
|
-
* - test with app id and multiple instance how the persistent can work
|
|
12
10
|
* Low:
|
|
13
11
|
* - check performance or memory leak???
|
|
14
12
|
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { JsonUIComponentsType, JsonUIFunctions } from '@jsonui/core';
|
|
1
3
|
export declare type JSONPrimitive = string | number | boolean | null;
|
|
2
4
|
export declare type JSONValue = JSONPrimitive | JSONObject | JSONArray;
|
|
3
5
|
export declare type JSONObject = {
|
|
@@ -10,14 +12,15 @@ export interface ChangeDefaultValueFuncProp {
|
|
|
10
12
|
value: JSONValue;
|
|
11
13
|
}
|
|
12
14
|
export declare type ChangeDefaultValueFunc = (arg: ChangeDefaultValueFuncProp) => void;
|
|
15
|
+
export declare type OnSubmitFunc = (arg: any) => void;
|
|
13
16
|
export interface DefaultValues {
|
|
14
17
|
[key: string]: JSONValue;
|
|
15
18
|
}
|
|
19
|
+
export declare type GetFormState = React.MutableRefObject<(() => DefaultValues) | undefined>;
|
|
16
20
|
export interface ViewerProps {
|
|
17
21
|
model: any;
|
|
18
22
|
defaultValues?: DefaultValues;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
disabledPersist?: boolean;
|
|
23
|
+
components?: JsonUIComponentsType;
|
|
24
|
+
functions?: JsonUIFunctions;
|
|
25
|
+
getFormState?: GetFormState;
|
|
23
26
|
}
|