@jsonui/react 0.0.6

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 (51) hide show
  1. package/README.md +206 -0
  2. package/dist/cjs/index.js +39105 -0
  3. package/dist/cjs/index.js.map +1 -0
  4. package/dist/cjs/types/ErrorBoundary.d.ts +21 -0
  5. package/dist/cjs/types/ReduxProviders.d.ts +5 -0
  6. package/dist/cjs/types/Renderer.d.ts +7 -0
  7. package/dist/cjs/types/ViewerWeb.d.ts +13 -0
  8. package/dist/cjs/types/Wrapper.d.ts +3 -0
  9. package/dist/cjs/types/index.d.ts +6 -0
  10. package/dist/cjs/types/indexModule.d.ts +6 -0
  11. package/dist/cjs/types/indexWeb.d.ts +1 -0
  12. package/dist/cjs/types/stock/components/Button.d.ts +3 -0
  13. package/dist/cjs/types/stock/components/FieldEdit.d.ts +3 -0
  14. package/dist/cjs/types/stock/components/FormResult.d.ts +5 -0
  15. package/dist/cjs/types/stock/components/Fragment.d.ts +4 -0
  16. package/dist/cjs/types/stock/components/HelperText.d.ts +3 -0
  17. package/dist/cjs/types/stock/components/Image.d.ts +3 -0
  18. package/dist/cjs/types/stock/components/Label.d.ts +9 -0
  19. package/dist/cjs/types/stock/components/PrimitiveProp.d.ts +5 -0
  20. package/dist/cjs/types/stock/components/Text.d.ts +3 -0
  21. package/dist/cjs/types/stock/components/Undefined.d.ts +3 -0
  22. package/dist/cjs/types/stock/components/View.d.ts +3 -0
  23. package/dist/cjs/types/stock/components.d.ts +20 -0
  24. package/dist/cjs/types/stock/stockToRenderer.d.ts +22 -0
  25. package/dist/cjs/types/store/store.d.ts +7 -0
  26. package/dist/esm/index.js +39097 -0
  27. package/dist/esm/index.js.map +1 -0
  28. package/dist/esm/types/ErrorBoundary.d.ts +21 -0
  29. package/dist/esm/types/ReduxProviders.d.ts +5 -0
  30. package/dist/esm/types/Renderer.d.ts +7 -0
  31. package/dist/esm/types/ViewerWeb.d.ts +13 -0
  32. package/dist/esm/types/Wrapper.d.ts +3 -0
  33. package/dist/esm/types/index.d.ts +6 -0
  34. package/dist/esm/types/indexModule.d.ts +6 -0
  35. package/dist/esm/types/indexWeb.d.ts +1 -0
  36. package/dist/esm/types/stock/components/Button.d.ts +3 -0
  37. package/dist/esm/types/stock/components/FieldEdit.d.ts +3 -0
  38. package/dist/esm/types/stock/components/FormResult.d.ts +5 -0
  39. package/dist/esm/types/stock/components/Fragment.d.ts +4 -0
  40. package/dist/esm/types/stock/components/HelperText.d.ts +3 -0
  41. package/dist/esm/types/stock/components/Image.d.ts +3 -0
  42. package/dist/esm/types/stock/components/Label.d.ts +9 -0
  43. package/dist/esm/types/stock/components/PrimitiveProp.d.ts +5 -0
  44. package/dist/esm/types/stock/components/Text.d.ts +3 -0
  45. package/dist/esm/types/stock/components/Undefined.d.ts +3 -0
  46. package/dist/esm/types/stock/components/View.d.ts +3 -0
  47. package/dist/esm/types/stock/components.d.ts +20 -0
  48. package/dist/esm/types/stock/stockToRenderer.d.ts +22 -0
  49. package/dist/esm/types/store/store.d.ts +7 -0
  50. package/dist/index.d.ts +16 -0
  51. package/package.json +102 -0
@@ -0,0 +1,21 @@
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;
@@ -0,0 +1,5 @@
1
+ import { ReactNode } from 'react';
2
+ declare function Providers({ children }: {
3
+ children: ReactNode;
4
+ }): JSX.Element;
5
+ export default Providers;
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ interface RendererFuncProps {
3
+ viewDef: any;
4
+ stockInit: any;
5
+ }
6
+ declare const rendererFunc: (props: RendererFuncProps) => JSX.Element;
7
+ export default rendererFunc;
@@ -0,0 +1,13 @@
1
+ /// <reference types="react" />
2
+ export interface DefaultValues {
3
+ [key: string]: Record<string, object>;
4
+ }
5
+ export interface ViewerProps {
6
+ viewDef: any;
7
+ defaultValues?: DefaultValues;
8
+ id?: string;
9
+ components?: any;
10
+ functions?: any;
11
+ }
12
+ declare function ViewerWeb(props: ViewerProps): JSX.Element;
13
+ export default ViewerWeb;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ declare function WrapperOuter(props: any): JSX.Element;
3
+ export default WrapperOuter;
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ import { ViewerProps } from './ViewerWeb';
3
+ declare type JsonUIProps = ViewerProps;
4
+ declare const JsonUI: (props: JsonUIProps) => JSX.Element;
5
+ export { JsonUI };
6
+ export type { JsonUIProps };
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ import { ViewerProps } from './ViewerWeb';
3
+ declare type JsonUIProps = ViewerProps;
4
+ declare const JsonUI: (props: JsonUIProps) => JSX.Element;
5
+ export { JsonUI };
6
+ export type { JsonUIProps };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ declare function CButton(props: any): JSX.Element;
3
+ export default CButton;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ declare function CFieldEdit(props: any): JSX.Element;
3
+ export default CFieldEdit;
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ declare function CFormResult({ value }: {
3
+ value: any;
4
+ }): JSX.Element;
5
+ export default CFormResult;
@@ -0,0 +1,4 @@
1
+ declare const CFragment: ({ children }: {
2
+ children: any;
3
+ }) => any;
4
+ export default CFragment;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ declare function UHelperText(props: any): JSX.Element | null;
3
+ export default UHelperText;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ declare function CImage(props: any): JSX.Element;
3
+ export default CImage;
@@ -0,0 +1,9 @@
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
+ }
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ declare function Primitive({ children }: {
3
+ children: any;
4
+ }): JSX.Element;
5
+ export default Primitive;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ declare function CText(props: any): JSX.Element;
3
+ export default CText;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ declare function Undefined(props: any): JSX.Element;
3
+ export default Undefined;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ declare function CView(props: any): JSX.Element;
3
+ export default CView;
@@ -0,0 +1,20 @@
1
+ import Text from './components/Text';
2
+ import Button from './components/Button';
3
+ import Edit from './components/FieldEdit';
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 }: {
13
+ children: any;
14
+ }) => any;
15
+ Image: typeof Image;
16
+ Text: typeof Text;
17
+ Button: typeof Button;
18
+ Edit: typeof Edit;
19
+ };
20
+ export default Components;
@@ -0,0 +1,22 @@
1
+ import { Stock } from '@jsonui/core';
2
+ export declare const getStock: (stockInit: any, viewDef: 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 }: {
9
+ children: any;
10
+ }) => any;
11
+ Image: typeof import("./components/Image").default;
12
+ Text: typeof import("./components/Text").default;
13
+ Button: typeof import("./components/Button").default;
14
+ Edit: typeof import("./components/FieldEdit").default;
15
+ };
16
+ functions: {
17
+ getStateValue: import("@jsonui/core/dist/stock/appRootFunctions").JsonUIFunctionType;
18
+ get: import("@jsonui/core/dist/stock/appRootFunctions").JsonUIFunctionType;
19
+ set: import("@jsonui/core/dist/stock/appRootFunctions").JsonUIFunctionType;
20
+ };
21
+ };
22
+ export default stock;
@@ -0,0 +1,7 @@
1
+ /// <reference types="redux-persist/types/types" />
2
+ /// <reference types="redux-persist" />
3
+ declare const storeObj: {
4
+ store: import("redux").Store<any, import("redux").AnyAction>;
5
+ persistor: import("redux-persist").Persistor;
6
+ };
7
+ export default storeObj;
@@ -0,0 +1,16 @@
1
+ /// <reference types="react" />
2
+ interface DefaultValues {
3
+ [key: string]: Record<string, object>;
4
+ }
5
+ interface ViewerProps {
6
+ viewDef: any;
7
+ defaultValues?: DefaultValues;
8
+ id?: string;
9
+ components?: any;
10
+ functions?: any;
11
+ }
12
+
13
+ declare type JsonUIProps = ViewerProps;
14
+ declare const JsonUI: (props: JsonUIProps) => JSX.Element;
15
+
16
+ export { JsonUI, JsonUIProps };
package/package.json ADDED
@@ -0,0 +1,102 @@
1
+ {
2
+ "name": "@jsonui/react",
3
+ "version": "0.0.6",
4
+ "author": "Istvan Fodor <fodori@jsonui.org>",
5
+ "contributors": [],
6
+ "bugs": {
7
+ "url": "https://github.com/fodori/jsonui/issues"
8
+ },
9
+ "homepage": "https://github.com/fodori/jsonui#readme",
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "git+https://github.com/fodori/jsonui.git"
13
+ },
14
+ "description": "Json markup language to define User Interface",
15
+ "keywords": [
16
+ "react",
17
+ "react-component",
18
+ "ui",
19
+ "json"
20
+ ],
21
+ "publishConfig": {
22
+ "access": "public"
23
+ },
24
+ "license": "MIT",
25
+ "main": "dist/cjs/index.js",
26
+ "module": "dist/esm/index.js",
27
+ "files": [
28
+ "dist"
29
+ ],
30
+ "types": "dist/index.d.ts",
31
+ "scripts": {
32
+ "rollup": "rollup -c",
33
+ "start-module": "microbundle watch --jsx React.createElement --external none",
34
+ "build-module": "microbundle build --jsx React.createElement --external none",
35
+ "lint": "eslint src --ext .jsx,.js,.tsx,.ts",
36
+ "start": "react-scripts start",
37
+ "build": "react-scripts build",
38
+ "test": "react-scripts test",
39
+ "eject": "react-scripts eject"
40
+ },
41
+ "dependencies": {
42
+ "@emotion/react": "^11.7.1",
43
+ "@jsonui/core": "^0.0.2",
44
+ "batchflow": "^0.4.0",
45
+ "jsonata": "^1.8.5",
46
+ "lodash": "^4.17.21",
47
+ "react-redux": "^7.2.6",
48
+ "react-router-dom": "^6.2.1",
49
+ "redux": "^4.1.2",
50
+ "redux-persist": "^6.0.0",
51
+ "typescript": "^4.5.4",
52
+ "web-vitals": "^2.1.4"
53
+ },
54
+ "devDependencies": {
55
+ "@rollup/plugin-commonjs": "^21.0.1",
56
+ "@rollup/plugin-json": "^4.1.0",
57
+ "@rollup/plugin-node-resolve": "^13.1.3",
58
+ "@rollup/plugin-typescript": "^8.3.0",
59
+ "@testing-library/jest-dom": "^5.16.1",
60
+ "@testing-library/react": "^12.1.2",
61
+ "@testing-library/user-event": "^13.5.0",
62
+ "@types/jest": "^27.4.0",
63
+ "@types/lodash": "^4.14.178",
64
+ "@types/node": "^16.11.19",
65
+ "@types/react": "^17.0.38",
66
+ "@types/react-dom": "^17.0.11",
67
+ "@typescript-eslint/eslint-plugin": "^5.10.0",
68
+ "@typescript-eslint/parser": "^5.10.0",
69
+ "eslint": "^8.2.0",
70
+ "eslint-config-airbnb": "^19.0.4",
71
+ "eslint-config-prettier": "^8.3.0",
72
+ "eslint-plugin-import": "^2.25.4",
73
+ "eslint-plugin-jsx-a11y": "^6.5.1",
74
+ "eslint-plugin-prettier": "^4.0.0",
75
+ "eslint-plugin-react": "^7.28.0",
76
+ "eslint-plugin-react-hooks": "^4.3.0",
77
+ "husky": "^7.0.4",
78
+ "lint-staged": "^12.2.1",
79
+ "prettier": "^2.5.1",
80
+ "react-scripts": "5.0.0",
81
+ "redux-devtools": "^3.7.0",
82
+ "rollup": "^2.66.1",
83
+ "rollup-plugin-dts": "^4.1.0"
84
+ },
85
+ "peerDependencies": {
86
+ "react": "^17.0.2",
87
+ "react-dom": "^17.0.2"
88
+ },
89
+ "browserslist": {
90
+ "production": [
91
+ ">0.2%",
92
+ "not dead",
93
+ "not op_mini all"
94
+ ],
95
+ "development": [
96
+ "last 1 chrome version",
97
+ "last 1 firefox version",
98
+ "last 1 safari version"
99
+ ]
100
+ },
101
+ "gitHead": "9f589c3715ecde529bf062c361243d3069b9a4fc"
102
+ }