@jsonui/react 0.7.0 → 0.7.1

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.
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
- import { ChangeDefaultValueFuncProp, JSONValue, ViewerProps } from 'types';
3
2
  import { JsonUIComponentsType, JsonUIFunctions, JsonUIFunctionType } from '@jsonui/core';
3
+ import { ChangeDefaultValueFuncProp, JSONValue, ViewerProps } from './types';
4
4
  import { MessageHandlerContext, MessageHandler } from './MessageReceiverContext';
5
5
  declare const JsonUI: (props: ViewerProps) => JSX.Element;
6
6
  export { JsonUI, MessageHandlerContext, MessageHandler };
package/dist/index.d.ts CHANGED
@@ -1,8 +1,31 @@
1
1
  /// <reference types="react" />
2
- import { ChangeDefaultValueFunc, ViewerProps } from 'types';
3
- export { ChangeDefaultValueFuncProp, JSONValue, ViewerProps as JsonUIProps } from 'types';
2
+ import { JsonUIComponentsType, JsonUIFunctions } from '@jsonui/core';
4
3
  export { JsonUIComponentsType, JsonUIFunctionType, JsonUIFunctions } from '@jsonui/core';
5
4
  import * as react from 'react';
5
+ import { ChangeDefaultValueFunc } from 'types';
6
+
7
+ declare type JSONPrimitive = string | number | boolean | null;
8
+ declare type JSONValue = JSONPrimitive | JSONObject | JSONArray;
9
+ declare type JSONObject = {
10
+ [member: string]: JSONValue;
11
+ };
12
+ declare type JSONArray = Array<JSONValue>;
13
+ interface ChangeDefaultValueFuncProp {
14
+ store: string;
15
+ path: string;
16
+ value: JSONValue;
17
+ }
18
+ interface DefaultValues {
19
+ [key: string]: JSONValue;
20
+ }
21
+ declare type GetFormState = React.MutableRefObject<(() => DefaultValues) | undefined>;
22
+ interface ViewerProps {
23
+ model: any;
24
+ defaultValues?: DefaultValues;
25
+ components?: JsonUIComponentsType;
26
+ functions?: JsonUIFunctions;
27
+ getFormState?: GetFormState;
28
+ }
6
29
 
7
30
  declare class MessageHandler {
8
31
  updateDefaultValueHandler?: ChangeDefaultValueFunc;
@@ -13,4 +36,4 @@ declare const MessageHandlerContext: react.Context<MessageHandler | null>;
13
36
 
14
37
  declare const JsonUI: (props: ViewerProps) => JSX.Element;
15
38
 
16
- export { JsonUI, MessageHandler, MessageHandlerContext };
39
+ export { ChangeDefaultValueFuncProp, JSONValue, JsonUI, ViewerProps as JsonUIProps, MessageHandler, MessageHandlerContext };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jsonui/react",
3
- "version": "0.7.0",
3
+ "version": "0.7.1",
4
4
  "author": "Istvan Fodor <fodori@jsonui.org>",
5
5
  "contributors": [],
6
6
  "bugs": {
@@ -36,8 +36,8 @@
36
36
  "test": "jest"
37
37
  },
38
38
  "dependencies": {
39
- "@emotion/react": "^11.7.1",
40
- "@jsonui/core": "^0.7.0",
39
+ "@emotion/react": "^11.13.3",
40
+ "@jsonui/core": "^0.7.1",
41
41
  "batchflow": "^0.4.0",
42
42
  "jsonata": "^1.8.5",
43
43
  "lodash": "^4.17.21",
@@ -49,7 +49,7 @@
49
49
  "@babel/core": "^7.17.5",
50
50
  "@babel/preset-env": "^7.16.11",
51
51
  "@babel/preset-react": "^7.16.7",
52
- "@emotion/jest": "^11.9.1",
52
+ "@emotion/jest": "^11.13.0",
53
53
  "@rollup/plugin-commonjs": "^21.0.1",
54
54
  "@rollup/plugin-json": "^4.1.0",
55
55
  "@rollup/plugin-node-resolve": "^13.1.3",
@@ -112,5 +112,5 @@
112
112
  "last 1 safari version"
113
113
  ]
114
114
  },
115
- "gitHead": "d1f5846702fd08fe465648dac4daead47ab50279"
115
+ "gitHead": "8b9b046e117f9ca14f3b9750fccad1be4de785a9"
116
116
  }