@jsonui/react 0.7.5 → 0.8.2

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.
Files changed (89) hide show
  1. package/README.md +4 -2
  2. package/dist/cjs/index.js +68 -19711
  3. package/dist/cjs/index.js.map +1 -1
  4. package/dist/esm/index.js +45 -19684
  5. package/dist/esm/index.js.map +1 -1
  6. package/dist/index.d.ts +10 -9
  7. package/package.json +49 -46
  8. package/dist/cjs/types/ErrorBoundary.d.ts +0 -21
  9. package/dist/cjs/types/MessageReceiver.d.ts +0 -2
  10. package/dist/cjs/types/MessageReceiverContext.d.ts +0 -8
  11. package/dist/cjs/types/ReduxProviders.d.ts +0 -9
  12. package/dist/cjs/types/Renderer.d.ts +0 -7
  13. package/dist/cjs/types/ViewerWeb.d.ts +0 -4
  14. package/dist/cjs/types/Wrapper.d.ts +0 -7
  15. package/dist/cjs/types/index.d.ts +0 -8
  16. package/dist/cjs/types/indexWeb.d.ts +0 -1
  17. package/dist/cjs/types/stock/components/Button.d.ts +0 -3
  18. package/dist/cjs/types/stock/components/Edit.d.ts +0 -3
  19. package/dist/cjs/types/stock/components/FormResult.d.ts +0 -5
  20. package/dist/cjs/types/stock/components/Fragment.d.ts +0 -2
  21. package/dist/cjs/types/stock/components/HelperText.d.ts +0 -3
  22. package/dist/cjs/types/stock/components/Image.d.ts +0 -3
  23. package/dist/cjs/types/stock/components/Label.d.ts +0 -9
  24. package/dist/cjs/types/stock/components/PrimitiveProp.d.ts +0 -3
  25. package/dist/cjs/types/stock/components/Text.d.ts +0 -3
  26. package/dist/cjs/types/stock/components/Undefined.d.ts +0 -3
  27. package/dist/cjs/types/stock/components/View.d.ts +0 -3
  28. package/dist/cjs/types/stock/components.d.ts +0 -18
  29. package/dist/cjs/types/stock/stockToRenderer.d.ts +0 -20
  30. package/dist/cjs/types/stories/JsonUI.stories.d.ts +0 -6
  31. package/dist/cjs/types/stories/MultiChild.stories.d.ts +0 -5
  32. package/dist/cjs/types/stories/PartialValueUpdateTest/PushNotificationTest.stories.d.ts +0 -5
  33. package/dist/cjs/types/stories/PerformansTest1.stories.d.ts +0 -5
  34. package/dist/cjs/types/stories/PerformansTest2.stories.d.ts +0 -5
  35. package/dist/cjs/types/stories/ReduxTest.stories.d.ts +0 -6
  36. package/dist/cjs/types/stories/Simple.stories.d.ts +0 -5
  37. package/dist/cjs/types/stories/StateSaveTest/StateSaveTest.stories.d.ts +0 -5
  38. package/dist/cjs/types/stories/Table.stories.d.ts +0 -5
  39. package/dist/cjs/types/stories/Validation.stories.d.ts +0 -12
  40. package/dist/cjs/types/tests/action.test.d.ts +0 -1
  41. package/dist/cjs/types/tests/button.test.d.ts +0 -1
  42. package/dist/cjs/types/tests/input.test.d.ts +0 -13
  43. package/dist/cjs/types/tests/modifier.test.d.ts +0 -1
  44. package/dist/cjs/types/tests/pathModifier.test.d.ts +0 -1
  45. package/dist/cjs/types/tests/primitive_simple.test.d.ts +0 -1
  46. package/dist/cjs/types/tests/redux.test.d.ts +0 -13
  47. package/dist/cjs/types/tests/simple.test.d.ts +0 -1
  48. package/dist/cjs/types/types.d.ts +0 -26
  49. package/dist/esm/types/ErrorBoundary.d.ts +0 -21
  50. package/dist/esm/types/MessageReceiver.d.ts +0 -2
  51. package/dist/esm/types/MessageReceiverContext.d.ts +0 -8
  52. package/dist/esm/types/ReduxProviders.d.ts +0 -9
  53. package/dist/esm/types/Renderer.d.ts +0 -7
  54. package/dist/esm/types/ViewerWeb.d.ts +0 -4
  55. package/dist/esm/types/Wrapper.d.ts +0 -7
  56. package/dist/esm/types/index.d.ts +0 -8
  57. package/dist/esm/types/indexWeb.d.ts +0 -1
  58. package/dist/esm/types/stock/components/Button.d.ts +0 -3
  59. package/dist/esm/types/stock/components/Edit.d.ts +0 -3
  60. package/dist/esm/types/stock/components/FormResult.d.ts +0 -5
  61. package/dist/esm/types/stock/components/Fragment.d.ts +0 -2
  62. package/dist/esm/types/stock/components/HelperText.d.ts +0 -3
  63. package/dist/esm/types/stock/components/Image.d.ts +0 -3
  64. package/dist/esm/types/stock/components/Label.d.ts +0 -9
  65. package/dist/esm/types/stock/components/PrimitiveProp.d.ts +0 -3
  66. package/dist/esm/types/stock/components/Text.d.ts +0 -3
  67. package/dist/esm/types/stock/components/Undefined.d.ts +0 -3
  68. package/dist/esm/types/stock/components/View.d.ts +0 -3
  69. package/dist/esm/types/stock/components.d.ts +0 -18
  70. package/dist/esm/types/stock/stockToRenderer.d.ts +0 -20
  71. package/dist/esm/types/stories/JsonUI.stories.d.ts +0 -6
  72. package/dist/esm/types/stories/MultiChild.stories.d.ts +0 -5
  73. package/dist/esm/types/stories/PartialValueUpdateTest/PushNotificationTest.stories.d.ts +0 -5
  74. package/dist/esm/types/stories/PerformansTest1.stories.d.ts +0 -5
  75. package/dist/esm/types/stories/PerformansTest2.stories.d.ts +0 -5
  76. package/dist/esm/types/stories/ReduxTest.stories.d.ts +0 -6
  77. package/dist/esm/types/stories/Simple.stories.d.ts +0 -5
  78. package/dist/esm/types/stories/StateSaveTest/StateSaveTest.stories.d.ts +0 -5
  79. package/dist/esm/types/stories/Table.stories.d.ts +0 -5
  80. package/dist/esm/types/stories/Validation.stories.d.ts +0 -12
  81. package/dist/esm/types/tests/action.test.d.ts +0 -1
  82. package/dist/esm/types/tests/button.test.d.ts +0 -1
  83. package/dist/esm/types/tests/input.test.d.ts +0 -13
  84. package/dist/esm/types/tests/modifier.test.d.ts +0 -1
  85. package/dist/esm/types/tests/pathModifier.test.d.ts +0 -1
  86. package/dist/esm/types/tests/primitive_simple.test.d.ts +0 -1
  87. package/dist/esm/types/tests/redux.test.d.ts +0 -13
  88. package/dist/esm/types/tests/simple.test.d.ts +0 -1
  89. package/dist/esm/types/types.d.ts +0 -26
package/dist/index.d.ts CHANGED
@@ -1,24 +1,24 @@
1
- /// <reference types="react" />
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { JsonUIComponentsType, JsonUIFunctions } from '@jsonui/core';
3
3
  export { JsonUIComponentsType, JsonUIFunctionType, JsonUIFunctions } from '@jsonui/core';
4
4
  import * as react from 'react';
5
- import { ChangeDefaultValueFunc } from 'types';
6
5
 
7
- declare type JSONPrimitive = string | number | boolean | null;
8
- declare type JSONObject = {
6
+ type JSONPrimitive = string | number | boolean | null;
7
+ type JSONObject = {
9
8
  [member: string]: any;
10
9
  };
11
- declare type JSONArray = Array<any>;
12
- declare type JSONValue = JSONPrimitive | JSONObject | JSONArray | undefined;
10
+ type JSONArray = Array<any>;
11
+ type JSONValue = JSONPrimitive | JSONObject | JSONArray | undefined;
13
12
  interface ChangeDefaultValueFuncProp {
14
13
  store: string;
15
14
  path: string;
16
15
  value: JSONValue;
17
16
  }
17
+ type ChangeDefaultValueFunc = (arg: ChangeDefaultValueFuncProp) => void;
18
18
  interface DefaultValues {
19
19
  [key: string]: JSONValue;
20
20
  }
21
- declare type GetFormState = React.MutableRefObject<(() => DefaultValues) | undefined>;
21
+ type GetFormState = React.MutableRefObject<(() => DefaultValues) | undefined>;
22
22
  interface ViewerProps {
23
23
  model: any;
24
24
  defaultValues?: DefaultValues;
@@ -34,6 +34,7 @@ declare class MessageHandler {
34
34
  }
35
35
  declare const MessageHandlerContext: react.Context<MessageHandler | null>;
36
36
 
37
- declare const JsonUI: (props: ViewerProps) => JSX.Element;
37
+ declare const JsonUI: (props: ViewerProps) => react_jsx_runtime.JSX.Element;
38
38
 
39
- export { ChangeDefaultValueFuncProp, JSONValue, JsonUI, ViewerProps as JsonUIProps, MessageHandler, MessageHandlerContext, JsonUI as default };
39
+ export { JsonUI, MessageHandler, MessageHandlerContext, JsonUI as default };
40
+ export type { ChangeDefaultValueFuncProp, JSONValue, ViewerProps as JsonUIProps };
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@jsonui/react",
3
- "version": "0.7.5",
3
+ "version": "0.8.2",
4
+ "type": "module",
4
5
  "author": "Istvan Fodor <fodori@jsonui.org>",
5
6
  "contributors": [],
6
7
  "bugs": {
@@ -22,59 +23,55 @@
22
23
  "access": "public"
23
24
  },
24
25
  "license": "MIT",
25
- "main": "dist/cjs/index.js",
26
- "module": "dist/esm/index.js",
27
26
  "files": [
28
27
  "dist"
29
28
  ],
29
+ "main": "dist/cjs/index.js",
30
+ "module": "dist/esm/index.js",
30
31
  "types": "dist/index.d.ts",
32
+ "exports": {
33
+ ".": {
34
+ "types": "./dist/index.d.ts",
35
+ "import": "./dist/esm/index.js",
36
+ "require": "./dist/cjs/index.js"
37
+ }
38
+ },
31
39
  "scripts": {
32
40
  "build": "rollup -c",
33
41
  "lint": "eslint src --ext .jsx,.js,.tsx,.ts",
34
- "storybook": "export SET NODE_OPTIONS=--openssl-legacy-provider && start-storybook -p 6006",
35
- "build-storybook": "build-storybook",
42
+ "storybook": "storybook dev -p 6006",
43
+ "build-storybook": "storybook build",
36
44
  "test": "jest"
37
45
  },
38
46
  "dependencies": {
39
- "@emotion/react": "^11.13.3",
40
- "@jsonui/core": "^0.7.5",
47
+ "@emotion/react": "^11.14.0",
48
+ "@jsonui/core": "^0.8.1",
41
49
  "batchflow": "^0.4.0",
42
- "jsonata": "^1.8.5",
43
- "lodash": "^4.17.21",
44
- "react-redux": "^7.2.6",
45
- "redux": "^4.1.2",
46
- "typescript": "^4.5.4"
50
+ "jsonata": "^2.1.0"
47
51
  },
48
52
  "devDependencies": {
49
53
  "@babel/core": "^7.17.5",
50
54
  "@babel/preset-env": "^7.16.11",
51
55
  "@babel/preset-react": "^7.16.7",
52
- "@emotion/jest": "^11.13.0",
53
- "@rollup/plugin-commonjs": "^21.0.1",
54
- "@rollup/plugin-json": "^4.1.0",
55
- "@rollup/plugin-node-resolve": "^13.1.3",
56
- "@rollup/plugin-typescript": "^8.3.0",
57
- "@storybook/addon-actions": "^6.4.19",
58
- "@storybook/addon-essentials": "^6.4.19",
59
- "@storybook/addon-interactions": "^6.4.19",
60
- "@storybook/addon-links": "^6.4.19",
61
- "@storybook/react": "^6.4.19",
62
- "@storybook/testing-library": "^0.0.9",
63
- "@testing-library/jest-dom": "^5.16.1",
64
- "@testing-library/react": "^12.1.2",
65
- "@testing-library/user-event": "^13.5.0",
66
- "@types/enzyme": "^3.10.11",
67
- "@types/jest": "^27.4.0",
68
- "@types/lodash": "^4.14.178",
69
- "@types/node": "^16.11.19",
70
- "@types/react": "^17.0.38",
71
- "@types/react-dom": "^17.0.11",
56
+ "@emotion/jest": "^11.14.2",
57
+ "@rollup/plugin-commonjs": "^29.0.0",
58
+ "@rollup/plugin-json": "^6.1.0",
59
+ "@rollup/plugin-node-resolve": "^16.0.3",
60
+ "@rollup/plugin-typescript": "^12.3.0",
61
+ "@storybook/react-vite": "^10.0.7",
62
+ "@storybook/testing-library": "^0.2.2",
63
+ "@testing-library/jest-dom": "^6.9.1",
64
+ "@testing-library/react": "^16.3.0",
65
+ "@testing-library/user-event": "^14.6.1",
66
+ "@types/jest": "^30.0.0",
67
+ "@types/lodash": "^4.17.20",
68
+ "@types/node": "^24.10.00",
69
+ "@types/react": "^19.2.3",
70
+ "@types/react-dom": "^19.2.2",
72
71
  "@typescript-eslint/eslint-plugin": "^5.10.0",
73
72
  "@typescript-eslint/parser": "^5.10.0",
74
- "@wojtekmaj/enzyme-adapter-react-17": "^0.6.7",
75
73
  "babel-jest": "^27.5.1",
76
74
  "babel-loader": "^8.2.3",
77
- "enzyme": "^3.11.0",
78
75
  "eslint": "^8.2.0",
79
76
  "eslint-config-airbnb": "^19.0.4",
80
77
  "eslint-config-prettier": "^8.3.0",
@@ -84,21 +81,27 @@
84
81
  "eslint-plugin-react": "^7.28.0",
85
82
  "eslint-plugin-react-hooks": "^4.3.0",
86
83
  "eslint-plugin-storybook": "^0.5.7",
87
- "husky": "^7.0.4",
88
- "jest": "^27.5.1",
89
- "lint-staged": "^12.2.1",
84
+ "husky": "^9.1.7",
85
+ "jest": "^30.2.0",
86
+ "jest-environment-jsdom": "^30.0.0",
87
+ "lint-staged": "^16.2.6",
88
+ "lodash": "^4.17.21",
90
89
  "prettier": "^2.5.1",
91
- "react-test-renderer": "^17.0.2",
90
+ "react-redux": "^9.2.0",
91
+ "react-test-renderer": "^19.2.0",
92
+ "redux": "^5.0.1",
92
93
  "redux-devtools": "^3.7.0",
93
- "rollup": "^2.66.1",
94
- "rollup-plugin-dts": "^4.1.0",
95
- "rollup-plugin-visualizer": "^5.5.4",
96
- "ts-jest": "^27.1.4",
97
- "ts-node": "^10.7.0"
94
+ "rollup": "^4.53.2",
95
+ "rollup-plugin-dts": "^6.2.3",
96
+ "rollup-plugin-visualizer": "^6.0.5",
97
+ "storybook": "^10.0.7",
98
+ "ts-jest": "^29.4.5",
99
+ "ts-node": "^10.9.2",
100
+ "typescript": "^5.9.3",
101
+ "vite": "^7.2.2"
98
102
  },
99
103
  "peerDependencies": {
100
- "react": "^17.0.2",
101
- "react-dom": "^17.0.2"
104
+ "react-redux": "^9.2.0"
102
105
  },
103
106
  "browserslist": {
104
107
  "production": [
@@ -112,5 +115,5 @@
112
115
  "last 1 safari version"
113
116
  ]
114
117
  },
115
- "gitHead": "6d81d8253ba84681a5b3c832dee1084cd2e5d26f"
118
+ "gitHead": "aac0d89b4cf6116cebea7d4fbdc49ea39637da2f"
116
119
  }
@@ -1,21 +0,0 @@
1
- import React from 'react';
2
- export interface ErrorBoundaryProps extends React.Props<any> {
3
- type?: string;
4
- id?: string;
5
- }
6
- declare type errorType = any;
7
- export interface ErrorBoundaryState {
8
- hasError: boolean;
9
- error?: errorType;
10
- didInfo?: any;
11
- }
12
- declare class ErrorBoundary extends React.Component<ErrorBoundaryProps, ErrorBoundaryState> {
13
- constructor(props: ErrorBoundaryProps);
14
- static getDerivedStateFromError(error: errorType): {
15
- hasError: boolean;
16
- error: any;
17
- };
18
- componentDidCatch(error: errorType, info: any): void;
19
- render(): React.ReactNode;
20
- }
21
- export default ErrorBoundary;
@@ -1,2 +0,0 @@
1
- declare const MessageReceiver: () => null;
2
- export default MessageReceiver;
@@ -1,8 +0,0 @@
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>;
@@ -1,9 +0,0 @@
1
- import { ReactNode } from 'react';
2
- import { DefaultValues, GetFormState } from 'types';
3
- interface Props {
4
- children: ReactNode;
5
- defaultValues?: DefaultValues;
6
- getFormState?: GetFormState;
7
- }
8
- declare const Providers: ({ children, defaultValues: root, getFormState: getState }: Props) => JSX.Element;
9
- export default Providers;
@@ -1,7 +0,0 @@
1
- /// <reference types="react" />
2
- interface RendererFuncProps {
3
- model: any;
4
- stockInit: any;
5
- }
6
- declare const rendererFunc: (props: RendererFuncProps) => JSX.Element;
7
- export default rendererFunc;
@@ -1,4 +0,0 @@
1
- /// <reference types="react" />
2
- import { ViewerProps } from 'types';
3
- declare function ViewerWeb({ defaultValues, getFormState, ...props }: ViewerProps): JSX.Element;
4
- export default ViewerWeb;
@@ -1,7 +0,0 @@
1
- /// <reference types="react" />
2
- import { PropsType } from '@jsonui/core';
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,8 +0,0 @@
1
- /// <reference types="react" />
2
- import { JsonUIComponentsType, JsonUIFunctions, JsonUIFunctionType } from '@jsonui/core';
3
- import { ChangeDefaultValueFuncProp, JSONValue, ViewerProps } from './types';
4
- import { MessageHandlerContext, MessageHandler } from './MessageReceiverContext';
5
- declare const JsonUI: (props: ViewerProps) => JSX.Element;
6
- export { JsonUI, MessageHandlerContext, MessageHandler };
7
- export type { ViewerProps as JsonUIProps, JSONValue, ChangeDefaultValueFuncProp, JsonUIFunctions, JsonUIFunctionType, JsonUIComponentsType };
8
- export default JsonUI;
@@ -1 +0,0 @@
1
- export {};
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- declare function Button({ children, type, ...props }: any): JSX.Element;
3
- export default Button;
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- declare function Edit(props: any): JSX.Element;
3
- export default Edit;
@@ -1,5 +0,0 @@
1
- /// <reference types="react" />
2
- declare function FormResult({ value }: {
3
- value: any;
4
- }): JSX.Element;
5
- export default FormResult;
@@ -1,2 +0,0 @@
1
- declare const Fragment: ({ children }: any) => any;
2
- export default Fragment;
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- declare function HelperText(props: any): JSX.Element | null;
3
- export default HelperText;
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- declare function Image(props: any): JSX.Element;
3
- export default Image;
@@ -1,9 +0,0 @@
1
- import React from 'react';
2
- export declare const getLabel: (props: any) => JSX.Element;
3
- export declare class InfoBox extends React.PureComponent {
4
- counter: number;
5
- constructor(props: any);
6
- componentDidMount(): void;
7
- componentDidUpdate(): void;
8
- render(): JSX.Element | null;
9
- }
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- declare function PrimitiveProp({ children }: any): JSX.Element;
3
- export default PrimitiveProp;
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- declare function Text({ value, children, ...props }: any): JSX.Element;
3
- export default Text;
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- declare function Undefined(props: any): JSX.Element;
3
- export default Undefined;
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- declare function View(props: any): JSX.Element;
3
- export default View;
@@ -1,18 +0,0 @@
1
- import Text from './components/Text';
2
- import Button from './components/Button';
3
- import Edit from './components/Edit';
4
- import View from './components/View';
5
- import Image from './components/Image';
6
- import _Undefined from './components/Undefined';
7
- import _PrimitiveProp from './components/PrimitiveProp';
8
- declare const Components: {
9
- View: typeof View;
10
- _PrimitiveProp: typeof _PrimitiveProp;
11
- _Undefined: typeof _Undefined;
12
- Fragment: ({ children }: any) => any;
13
- Image: typeof Image;
14
- Text: typeof Text;
15
- Button: typeof Button;
16
- Edit: typeof Edit;
17
- };
18
- export default Components;
@@ -1,20 +0,0 @@
1
- import { Stock } from '@jsonui/core';
2
- export declare const getStock: (stockInit: any, model: any, Wrapper: any, reduxStore: any) => Stock;
3
- declare const stock: {
4
- components: {
5
- View: typeof import("./components/View").default;
6
- _PrimitiveProp: typeof import("./components/PrimitiveProp").default;
7
- _Undefined: typeof import("./components/Undefined").default;
8
- Fragment: ({ children }: any) => any;
9
- Image: typeof import("./components/Image").default;
10
- Text: typeof import("./components/Text").default;
11
- Button: typeof import("./components/Button").default;
12
- Edit: typeof import("./components/Edit").default;
13
- };
14
- functions: {
15
- get: import("@jsonui/core").JsonUIFunctionType;
16
- set: import("@jsonui/core").JsonUIFunctionType;
17
- jsonata: import("@jsonui/core").JsonUIFunctionType;
18
- };
19
- };
20
- export default stock;
@@ -1,6 +0,0 @@
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 declare const InputTest: ComponentStory<(props: import("../types").ViewerProps) => JSX.Element>;
6
- export default JsonUIStory;
@@ -1,5 +0,0 @@
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;
@@ -1,5 +0,0 @@
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;
@@ -1,5 +0,0 @@
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;
@@ -1,5 +0,0 @@
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;
@@ -1,6 +0,0 @@
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;
@@ -1,5 +0,0 @@
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;
@@ -1,5 +0,0 @@
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;
@@ -1,5 +0,0 @@
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;
@@ -1,12 +0,0 @@
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
- * */
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1,13 +0,0 @@
1
- export {};
2
- /**
3
- * TODO:
4
- * - check actions (with nested ,promise and sync )
5
- * - check modification (with nested ,promise and sync )
6
- * - check modification order for example redux vs. simple function
7
- * - check children and no children component with children prop
8
- * - check data manipulation with mutability situation
9
- * - check error boundary how works
10
- * Low:
11
- * - check performance or memory leak???
12
-
13
- * */
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1,13 +0,0 @@
1
- export {};
2
- /**
3
- * TODO:
4
- * - check actions (with nested ,promise and sync )
5
- * - check modification (with nested ,promise and sync )
6
- * - check modification order for example redux vs. simple function
7
- * - check children and no children component with children prop
8
- * - check data manipulation with mutability situation
9
- * - check error boundary how works
10
- * Low:
11
- * - check performance or memory leak???
12
-
13
- * */
@@ -1 +0,0 @@
1
- export {};
@@ -1,26 +0,0 @@
1
- /// <reference types="react" />
2
- import { JsonUIComponentsType, JsonUIFunctions } from '@jsonui/core';
3
- export declare type JSONPrimitive = string | number | boolean | null;
4
- export declare type JSONObject = {
5
- [member: string]: any;
6
- };
7
- export declare type JSONArray = Array<any>;
8
- export declare type JSONValue = JSONPrimitive | JSONObject | JSONArray | undefined;
9
- export interface ChangeDefaultValueFuncProp {
10
- store: string;
11
- path: string;
12
- value: JSONValue;
13
- }
14
- export declare type ChangeDefaultValueFunc = (arg: ChangeDefaultValueFuncProp) => void;
15
- export declare type OnSubmitFunc = (arg: any) => void;
16
- export interface DefaultValues {
17
- [key: string]: JSONValue;
18
- }
19
- export declare type GetFormState = React.MutableRefObject<(() => DefaultValues) | undefined>;
20
- export interface ViewerProps {
21
- model: any;
22
- defaultValues?: DefaultValues;
23
- components?: JsonUIComponentsType;
24
- functions?: JsonUIFunctions;
25
- getFormState?: GetFormState;
26
- }
@@ -1,21 +0,0 @@
1
- import React from 'react';
2
- export interface ErrorBoundaryProps extends React.Props<any> {
3
- type?: string;
4
- id?: string;
5
- }
6
- declare type errorType = any;
7
- export interface ErrorBoundaryState {
8
- hasError: boolean;
9
- error?: errorType;
10
- didInfo?: any;
11
- }
12
- declare class ErrorBoundary extends React.Component<ErrorBoundaryProps, ErrorBoundaryState> {
13
- constructor(props: ErrorBoundaryProps);
14
- static getDerivedStateFromError(error: errorType): {
15
- hasError: boolean;
16
- error: any;
17
- };
18
- componentDidCatch(error: errorType, info: any): void;
19
- render(): React.ReactNode;
20
- }
21
- export default ErrorBoundary;
@@ -1,2 +0,0 @@
1
- declare const MessageReceiver: () => null;
2
- export default MessageReceiver;
@@ -1,8 +0,0 @@
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>;
@@ -1,9 +0,0 @@
1
- import { ReactNode } from 'react';
2
- import { DefaultValues, GetFormState } from 'types';
3
- interface Props {
4
- children: ReactNode;
5
- defaultValues?: DefaultValues;
6
- getFormState?: GetFormState;
7
- }
8
- declare const Providers: ({ children, defaultValues: root, getFormState: getState }: Props) => JSX.Element;
9
- export default Providers;
@@ -1,7 +0,0 @@
1
- /// <reference types="react" />
2
- interface RendererFuncProps {
3
- model: any;
4
- stockInit: any;
5
- }
6
- declare const rendererFunc: (props: RendererFuncProps) => JSX.Element;
7
- export default rendererFunc;
@@ -1,4 +0,0 @@
1
- /// <reference types="react" />
2
- import { ViewerProps } from 'types';
3
- declare function ViewerWeb({ defaultValues, getFormState, ...props }: ViewerProps): JSX.Element;
4
- export default ViewerWeb;
@@ -1,7 +0,0 @@
1
- /// <reference types="react" />
2
- import { PropsType } from '@jsonui/core';
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,8 +0,0 @@
1
- /// <reference types="react" />
2
- import { JsonUIComponentsType, JsonUIFunctions, JsonUIFunctionType } from '@jsonui/core';
3
- import { ChangeDefaultValueFuncProp, JSONValue, ViewerProps } from './types';
4
- import { MessageHandlerContext, MessageHandler } from './MessageReceiverContext';
5
- declare const JsonUI: (props: ViewerProps) => JSX.Element;
6
- export { JsonUI, MessageHandlerContext, MessageHandler };
7
- export type { ViewerProps as JsonUIProps, JSONValue, ChangeDefaultValueFuncProp, JsonUIFunctions, JsonUIFunctionType, JsonUIComponentsType };
8
- export default JsonUI;
@@ -1 +0,0 @@
1
- export {};
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- declare function Button({ children, type, ...props }: any): JSX.Element;
3
- export default Button;
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- declare function Edit(props: any): JSX.Element;
3
- export default Edit;