@jsonui/react 0.3.0 → 0.4.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/dist/cjs/index.js +787 -1709
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/MessageReceiver.d.ts +2 -0
- package/dist/cjs/types/MessageReceiverContext.d.ts +8 -0
- package/dist/cjs/types/ReduxProviders.d.ts +1 -9
- package/dist/cjs/types/ViewerWeb.d.ts +2 -10
- package/dist/cjs/types/Wrapper.d.ts +5 -3
- package/dist/cjs/types/index.d.ts +4 -3
- package/dist/cjs/types/stock/components/Fragment.d.ts +5 -3
- package/dist/cjs/types/stock/components/PrimitiveProp.d.ts +3 -2
- package/dist/cjs/types/stock/components/Text.d.ts +1 -1
- package/dist/cjs/types/stock/components/View.d.ts +1 -1
- package/dist/cjs/types/stories/JsonUI.stories.d.ts +3 -3
- package/dist/cjs/types/stories/MultiChild.stories.d.ts +5 -0
- package/dist/cjs/types/stories/PartialValueUpdateTest/PushNotificationTest.stories.d.ts +5 -0
- package/dist/cjs/types/stories/ReduxTest.stories.d.ts +6 -0
- package/dist/cjs/types/stories/Simple.stories.d.ts +5 -0
- package/dist/cjs/types/stories/Table.stories.d.ts +5 -0
- package/dist/cjs/types/types.d.ts +23 -0
- package/dist/esm/index.js +787 -1711
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/MessageReceiver.d.ts +2 -0
- package/dist/esm/types/MessageReceiverContext.d.ts +8 -0
- package/dist/esm/types/ReduxProviders.d.ts +1 -9
- package/dist/esm/types/ViewerWeb.d.ts +2 -10
- package/dist/esm/types/Wrapper.d.ts +5 -3
- package/dist/esm/types/index.d.ts +4 -3
- package/dist/esm/types/stock/components/Fragment.d.ts +5 -3
- package/dist/esm/types/stock/components/PrimitiveProp.d.ts +3 -2
- package/dist/esm/types/stock/components/Text.d.ts +1 -1
- package/dist/esm/types/stock/components/View.d.ts +1 -1
- package/dist/esm/types/stories/JsonUI.stories.d.ts +3 -3
- package/dist/esm/types/stories/MultiChild.stories.d.ts +5 -0
- package/dist/esm/types/stories/PartialValueUpdateTest/PushNotificationTest.stories.d.ts +5 -0
- package/dist/esm/types/stories/ReduxTest.stories.d.ts +6 -0
- package/dist/esm/types/stories/Simple.stories.d.ts +5 -0
- package/dist/esm/types/stories/Table.stories.d.ts +5 -0
- package/dist/esm/types/types.d.ts +23 -0
- package/dist/index.d.ts +9 -18
- package/package.json +4 -4
- package/dist/cjs/types/indexModule.d.ts +0 -6
- package/dist/cjs/types/stock/components/FieldEdit.d.ts +0 -3
- package/dist/cjs/types/stock/components.d.ts +0 -20
- package/dist/cjs/types/stock/stockToRenderer.d.ts +0 -22
- package/dist/cjs/types/store/store.d.ts +0 -7
- package/dist/cjs/types/stories/Button.d.ts +0 -28
- package/dist/cjs/types/stories/Button.stories.d.ts +0 -8
- package/dist/cjs/types/stories/Header.d.ts +0 -12
- package/dist/cjs/types/stories/Header.stories.d.ts +0 -6
- package/dist/cjs/types/stories/Page.d.ts +0 -3
- package/dist/cjs/types/stories/Page.stories.d.ts +0 -6
- package/dist/esm/types/indexModule.d.ts +0 -6
- package/dist/esm/types/stock/components/FieldEdit.d.ts +0 -3
- package/dist/esm/types/stock/components.d.ts +0 -20
- package/dist/esm/types/stock/stockToRenderer.d.ts +0 -22
- package/dist/esm/types/store/store.d.ts +0 -7
- package/dist/esm/types/stories/Button.d.ts +0 -28
- package/dist/esm/types/stories/Button.stories.d.ts +0 -8
- package/dist/esm/types/stories/Header.d.ts +0 -12
- package/dist/esm/types/stories/Header.stories.d.ts +0 -6
- package/dist/esm/types/stories/Page.d.ts +0 -3
- package/dist/esm/types/stories/Page.stories.d.ts +0 -6
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ChangeDefaultValueFunc } from 'types';
|
|
3
|
+
export declare class MessageHandler {
|
|
4
|
+
updateDefaultValueHandler?: ChangeDefaultValueFunc;
|
|
5
|
+
set: (newFunc: ChangeDefaultValueFunc) => void;
|
|
6
|
+
get: () => ChangeDefaultValueFunc | undefined;
|
|
7
|
+
}
|
|
8
|
+
export declare const MessageHandlerContext: import("react").Context<MessageHandler | null>;
|
|
@@ -2,15 +2,7 @@
|
|
|
2
2
|
import React, { ReactNode } from 'react';
|
|
3
3
|
import { Store, AnyAction } from 'redux';
|
|
4
4
|
import { Persistor } from 'redux-persist/es/types';
|
|
5
|
-
|
|
6
|
-
export declare type JSONValue = JSONPrimitive | JSONObject | JSONArray;
|
|
7
|
-
export declare type JSONObject = {
|
|
8
|
-
[member: string]: JSONValue;
|
|
9
|
-
};
|
|
10
|
-
export declare type JSONArray = Array<JSONValue>;
|
|
11
|
-
export interface DefaultValues {
|
|
12
|
-
[key: string]: JSONValue;
|
|
13
|
-
}
|
|
5
|
+
import { DefaultValues } from 'types';
|
|
14
6
|
declare type MyProps = {
|
|
15
7
|
children: ReactNode;
|
|
16
8
|
defaultValues?: DefaultValues;
|
|
@@ -1,12 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
model: any;
|
|
5
|
-
defaultValues?: DefaultValues;
|
|
6
|
-
id?: string;
|
|
7
|
-
components?: any;
|
|
8
|
-
functions?: any;
|
|
9
|
-
disabledPersist?: boolean;
|
|
10
|
-
}
|
|
11
|
-
declare function ViewerWeb(props: ViewerProps): JSX.Element;
|
|
2
|
+
import { ViewerProps } from 'types';
|
|
3
|
+
declare function ViewerWeb({ defaultValues, disabledPersist, ...props }: ViewerProps): JSX.Element;
|
|
12
4
|
export default ViewerWeb;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { PropsType } from '@jsonui/core';
|
|
3
|
-
export declare const
|
|
4
|
-
declare function
|
|
5
|
-
|
|
3
|
+
export declare const getStyle: (props: PropsType | undefined, component: string) => any;
|
|
4
|
+
declare function Wrapper({ props: origProps }: {
|
|
5
|
+
props: any;
|
|
6
|
+
}): JSX.Element | null;
|
|
7
|
+
export default Wrapper;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { ViewerProps } from '
|
|
2
|
+
import { ChangeDefaultValueFuncProp, JSONValue, ViewerProps } from 'types';
|
|
3
|
+
import { MessageHandlerContext, MessageHandler } from './MessageReceiverContext';
|
|
3
4
|
declare type JsonUIProps = ViewerProps;
|
|
4
5
|
declare const JsonUI: (props: JsonUIProps) => JSX.Element;
|
|
5
|
-
export { JsonUI };
|
|
6
|
-
export type { JsonUIProps };
|
|
6
|
+
export { JsonUI, MessageHandlerContext, MessageHandler };
|
|
7
|
+
export type { JsonUIProps, JSONValue, ChangeDefaultValueFuncProp };
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
}
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { constants as c } from '@jsonui/core';
|
|
3
|
+
declare const Fragment: ({ [c.V_CHILDREN_NAME]: props, ...a }: {
|
|
4
|
+
[c.V_CHILDREN_NAME]: any;
|
|
5
|
+
}) => JSX.Element;
|
|
4
6
|
export default Fragment;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
import { constants as c } from '@jsonui/core';
|
|
3
|
+
declare function PrimitiveProp({ [c.V_CHILDREN_NAME]: children }: {
|
|
4
|
+
[c.V_CHILDREN_NAME]: any;
|
|
4
5
|
}): JSX.Element;
|
|
5
6
|
export default PrimitiveProp;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ComponentStory, ComponentMeta } from '@storybook/react';
|
|
3
|
-
declare const JsonUIStory: ComponentMeta<(props: import("../
|
|
4
|
-
export declare const TableTest: ComponentStory<(props: import("../
|
|
5
|
-
export declare const InputTest: ComponentStory<(props: import("../
|
|
3
|
+
declare const JsonUIStory: ComponentMeta<(props: import("../types").ViewerProps) => JSX.Element>;
|
|
4
|
+
export declare const TableTest: ComponentStory<(props: import("../types").ViewerProps) => JSX.Element>;
|
|
5
|
+
export declare const InputTest: ComponentStory<(props: import("../types").ViewerProps) => JSX.Element>;
|
|
6
6
|
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 MultiChild: ComponentStory<(props: import("../types").ViewerProps) => JSX.Element>;
|
|
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 PartialValueUpdateTest: ComponentStory<(props: import("../../types").ViewerProps) => JSX.Element>;
|
|
5
|
+
export default JsonUIStory;
|
|
@@ -0,0 +1,6 @@
|
|
|
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 TwoEditAnd1Modifier: ComponentStory<(props: import("../types").ViewerProps) => JSX.Element>;
|
|
5
|
+
export declare const PathModifierTest: ComponentStory<(props: import("../types").ViewerProps) => JSX.Element>;
|
|
6
|
+
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 PrimitivesTest: ComponentStory<(props: import("../types").ViewerProps) => JSX.Element>;
|
|
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 TableTest: ComponentStory<(props: import("../types").ViewerProps) => JSX.Element>;
|
|
5
|
+
export default JsonUIStory;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export declare type JSONPrimitive = string | number | boolean | null;
|
|
2
|
+
export declare type JSONValue = JSONPrimitive | JSONObject | JSONArray;
|
|
3
|
+
export declare type JSONObject = {
|
|
4
|
+
[member: string]: JSONValue;
|
|
5
|
+
};
|
|
6
|
+
export declare type JSONArray = Array<JSONValue>;
|
|
7
|
+
export interface ChangeDefaultValueFuncProp {
|
|
8
|
+
store: string;
|
|
9
|
+
path: string;
|
|
10
|
+
value: JSONValue;
|
|
11
|
+
}
|
|
12
|
+
export declare type ChangeDefaultValueFunc = (arg: ChangeDefaultValueFuncProp) => void;
|
|
13
|
+
export interface DefaultValues {
|
|
14
|
+
[key: string]: JSONValue;
|
|
15
|
+
}
|
|
16
|
+
export interface ViewerProps {
|
|
17
|
+
model: any;
|
|
18
|
+
defaultValues?: DefaultValues;
|
|
19
|
+
id?: string;
|
|
20
|
+
components?: any;
|
|
21
|
+
functions?: any;
|
|
22
|
+
disabledPersist?: boolean;
|
|
23
|
+
}
|