@jsonui/core 0.7.5 → 0.8.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 +22416 -5650
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +22406 -5640
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +175 -176
- package/package.json +34 -24
- package/dist/cjs/types/index.d.ts +0 -12
- package/dist/cjs/types/stock/Stock.d.ts +0 -24
- package/dist/cjs/types/stock/Stock.test.d.ts +0 -1
- package/dist/cjs/types/stock/appRootFunctions.d.ts +0 -4
- package/dist/cjs/types/stock/functions.d.ts +0 -7
- package/dist/cjs/types/stock/validation.d.ts +0 -11
- package/dist/cjs/types/store/persistConfig.d.ts +0 -8
- package/dist/cjs/types/store/reducers.d.ts +0 -4
- package/dist/cjs/types/store/root/actions.d.ts +0 -5
- package/dist/cjs/types/store/root/reducer.d.ts +0 -4
- package/dist/cjs/types/store/root/reducer.test.d.ts +0 -1
- package/dist/cjs/types/store/root/selector.test.d.ts +0 -1
- package/dist/cjs/types/store/root/selectors.d.ts +0 -7
- package/dist/cjs/types/utils/I18n.d.ts +0 -27
- package/dist/cjs/types/utils/I18n.test.d.ts +0 -1
- package/dist/cjs/types/utils/constants.d.ts +0 -32
- package/dist/cjs/types/utils/contextHandler.d.ts +0 -4
- package/dist/cjs/types/utils/types.d.ts +0 -46
- package/dist/cjs/types/utils/util.d.ts +0 -22
- package/dist/cjs/types/utils/util.test.d.ts +0 -1
- package/dist/cjs/types/wrapper/wrapperUtil.d.ts +0 -29
- package/dist/cjs/types/wrapper/wrapperUtil.test.d.ts +0 -1
- package/dist/esm/types/index.d.ts +0 -12
- package/dist/esm/types/stock/Stock.d.ts +0 -24
- package/dist/esm/types/stock/Stock.test.d.ts +0 -1
- package/dist/esm/types/stock/appRootFunctions.d.ts +0 -4
- package/dist/esm/types/stock/functions.d.ts +0 -7
- package/dist/esm/types/stock/validation.d.ts +0 -11
- package/dist/esm/types/store/persistConfig.d.ts +0 -8
- package/dist/esm/types/store/reducers.d.ts +0 -4
- package/dist/esm/types/store/root/actions.d.ts +0 -5
- package/dist/esm/types/store/root/reducer.d.ts +0 -4
- package/dist/esm/types/store/root/reducer.test.d.ts +0 -1
- package/dist/esm/types/store/root/selector.test.d.ts +0 -1
- package/dist/esm/types/store/root/selectors.d.ts +0 -7
- package/dist/esm/types/utils/I18n.d.ts +0 -27
- package/dist/esm/types/utils/I18n.test.d.ts +0 -1
- package/dist/esm/types/utils/constants.d.ts +0 -32
- package/dist/esm/types/utils/contextHandler.d.ts +0 -4
- package/dist/esm/types/utils/types.d.ts +0 -46
- package/dist/esm/types/utils/util.d.ts +0 -22
- package/dist/esm/types/utils/util.test.d.ts +0 -1
- package/dist/esm/types/wrapper/wrapperUtil.d.ts +0 -29
- package/dist/esm/types/wrapper/wrapperUtil.test.d.ts +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,32 +1,8 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import * as React$1 from 'react';
|
|
3
|
-
import React__default
|
|
4
|
-
import
|
|
5
|
-
import Stock$1 from 'stock/Stock';
|
|
2
|
+
import React__default from 'react';
|
|
3
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
6
4
|
import * as redux from 'redux';
|
|
7
5
|
|
|
8
|
-
interface NewStockType {
|
|
9
|
-
components: JsonUIComponentsType$1;
|
|
10
|
-
functions: JsonUIFunctions$1;
|
|
11
|
-
}
|
|
12
|
-
declare type InitType = (prop: NewStockType) => void;
|
|
13
|
-
declare type RegisterFunctionType = (key: string, value: JsonUIFunctionType$1) => void;
|
|
14
|
-
declare type RegisterComponentType = (key: string, value: JsonUIComponentType$1) => void;
|
|
15
|
-
declare type CallFunctionType = (name: string, attr?: any, props?: any, callerArgs?: any) => any;
|
|
16
|
-
declare type GetComponentType = (componentName: string) => ReactNode;
|
|
17
|
-
declare class Stock {
|
|
18
|
-
stock: NewStockType;
|
|
19
|
-
Wrapper: React.ElementType;
|
|
20
|
-
reduxStore: any;
|
|
21
|
-
validations: any;
|
|
22
|
-
constructor(newStock: NewStockType, Wrapper: React.ElementType, reduxStore: any);
|
|
23
|
-
init: InitType;
|
|
24
|
-
registerComponent: RegisterComponentType;
|
|
25
|
-
registerFunction: RegisterFunctionType;
|
|
26
|
-
callFunction: CallFunctionType;
|
|
27
|
-
getComponent: GetComponentType;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
6
|
declare const SEPARATOR = "/";
|
|
31
7
|
declare const STORE_ERROR_POSTFIX = ".error";
|
|
32
8
|
declare const STORE_TOUCH_POSTFIX = ".touch";
|
|
@@ -60,80 +36,80 @@ declare const UNDEFINED_COMP_NAME = "_Undefined";
|
|
|
60
36
|
declare const PRIMITIVE_COMP_NAME = "_PrimitiveProp";
|
|
61
37
|
declare const FRAGMENT_COMP_NAME = "Fragment";
|
|
62
38
|
|
|
63
|
-
declare const
|
|
64
|
-
declare const
|
|
65
|
-
declare const
|
|
66
|
-
declare const
|
|
67
|
-
declare const
|
|
68
|
-
declare const
|
|
69
|
-
declare const
|
|
70
|
-
declare const
|
|
71
|
-
declare const
|
|
72
|
-
declare const
|
|
73
|
-
declare const
|
|
74
|
-
declare const
|
|
75
|
-
declare const
|
|
76
|
-
declare const
|
|
77
|
-
declare const
|
|
78
|
-
declare const
|
|
79
|
-
declare const
|
|
80
|
-
declare const
|
|
81
|
-
declare const
|
|
82
|
-
declare const
|
|
83
|
-
declare const
|
|
84
|
-
declare const
|
|
85
|
-
declare const
|
|
86
|
-
declare const
|
|
87
|
-
declare const
|
|
88
|
-
declare const
|
|
89
|
-
declare const
|
|
90
|
-
declare const
|
|
91
|
-
declare const
|
|
92
|
-
declare const
|
|
93
|
-
declare const
|
|
94
|
-
declare const
|
|
95
|
-
declare namespace
|
|
39
|
+
declare const constants_ACTION_KEY: typeof ACTION_KEY;
|
|
40
|
+
declare const constants_CURRENT_PATH_NAME: typeof CURRENT_PATH_NAME;
|
|
41
|
+
declare const constants_FRAGMENT_COMP_NAME: typeof FRAGMENT_COMP_NAME;
|
|
42
|
+
declare const constants_LIST_ITEM: typeof LIST_ITEM;
|
|
43
|
+
declare const constants_LIST_ITEM_PER_PAGE: typeof LIST_ITEM_PER_PAGE;
|
|
44
|
+
declare const constants_LIST_ITEM_PER_PAGE_DEFAULT: typeof LIST_ITEM_PER_PAGE_DEFAULT;
|
|
45
|
+
declare const constants_LIST_LENGTH: typeof LIST_LENGTH;
|
|
46
|
+
declare const constants_LIST_PAGE: typeof LIST_PAGE;
|
|
47
|
+
declare const constants_LIST_SEMAPHORE: typeof LIST_SEMAPHORE;
|
|
48
|
+
declare const constants_MODIFIER_KEY: typeof MODIFIER_KEY;
|
|
49
|
+
declare const constants_PARENT_PROP_NAME: typeof PARENT_PROP_NAME;
|
|
50
|
+
declare const constants_PATHNAME: typeof PATHNAME;
|
|
51
|
+
declare const constants_PATH_MODIFIERS_KEY: typeof PATH_MODIFIERS_KEY;
|
|
52
|
+
declare const constants_PRIMITIVE_COMP_NAME: typeof PRIMITIVE_COMP_NAME;
|
|
53
|
+
declare const constants_REDUX_FUNCTIONS: typeof REDUX_FUNCTIONS;
|
|
54
|
+
declare const constants_REDUX_GET_FUNCTION: typeof REDUX_GET_FUNCTION;
|
|
55
|
+
declare const constants_REDUX_GET_SUBSCRIBERS_NAME: typeof REDUX_GET_SUBSCRIBERS_NAME;
|
|
56
|
+
declare const constants_REDUX_PATHS: typeof REDUX_PATHS;
|
|
57
|
+
declare const constants_REDUX_SET_FUNCTION: typeof REDUX_SET_FUNCTION;
|
|
58
|
+
declare const constants_REF_ASSETS: typeof REF_ASSETS;
|
|
59
|
+
declare const constants_REF_LOCALES: typeof REF_LOCALES;
|
|
60
|
+
declare const constants_REF_VALIDATES: typeof REF_VALIDATES;
|
|
61
|
+
declare const constants_SEPARATOR: typeof SEPARATOR;
|
|
62
|
+
declare const constants_SIMPLE_DATA_TYPES: typeof SIMPLE_DATA_TYPES;
|
|
63
|
+
declare const constants_STORE_ERROR_POSTFIX: typeof STORE_ERROR_POSTFIX;
|
|
64
|
+
declare const constants_STORE_TOUCH_POSTFIX: typeof STORE_TOUCH_POSTFIX;
|
|
65
|
+
declare const constants_STYLE_RN_NAME: typeof STYLE_RN_NAME;
|
|
66
|
+
declare const constants_STYLE_WEB_NAME: typeof STYLE_WEB_NAME;
|
|
67
|
+
declare const constants_UNDEFINED_COMP_NAME: typeof UNDEFINED_COMP_NAME;
|
|
68
|
+
declare const constants_V_CHILDREN_NAME: typeof V_CHILDREN_NAME;
|
|
69
|
+
declare const constants_V_CHILDREN_PREFIX: typeof V_CHILDREN_PREFIX;
|
|
70
|
+
declare const constants_V_COMP_NAME: typeof V_COMP_NAME;
|
|
71
|
+
declare namespace constants {
|
|
96
72
|
export {
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
73
|
+
constants_ACTION_KEY as ACTION_KEY,
|
|
74
|
+
constants_CURRENT_PATH_NAME as CURRENT_PATH_NAME,
|
|
75
|
+
constants_FRAGMENT_COMP_NAME as FRAGMENT_COMP_NAME,
|
|
76
|
+
constants_LIST_ITEM as LIST_ITEM,
|
|
77
|
+
constants_LIST_ITEM_PER_PAGE as LIST_ITEM_PER_PAGE,
|
|
78
|
+
constants_LIST_ITEM_PER_PAGE_DEFAULT as LIST_ITEM_PER_PAGE_DEFAULT,
|
|
79
|
+
constants_LIST_LENGTH as LIST_LENGTH,
|
|
80
|
+
constants_LIST_PAGE as LIST_PAGE,
|
|
81
|
+
constants_LIST_SEMAPHORE as LIST_SEMAPHORE,
|
|
82
|
+
constants_MODIFIER_KEY as MODIFIER_KEY,
|
|
83
|
+
constants_PARENT_PROP_NAME as PARENT_PROP_NAME,
|
|
84
|
+
constants_PATHNAME as PATHNAME,
|
|
85
|
+
constants_PATH_MODIFIERS_KEY as PATH_MODIFIERS_KEY,
|
|
86
|
+
constants_PRIMITIVE_COMP_NAME as PRIMITIVE_COMP_NAME,
|
|
87
|
+
constants_REDUX_FUNCTIONS as REDUX_FUNCTIONS,
|
|
88
|
+
constants_REDUX_GET_FUNCTION as REDUX_GET_FUNCTION,
|
|
89
|
+
constants_REDUX_GET_SUBSCRIBERS_NAME as REDUX_GET_SUBSCRIBERS_NAME,
|
|
90
|
+
constants_REDUX_PATHS as REDUX_PATHS,
|
|
91
|
+
constants_REDUX_SET_FUNCTION as REDUX_SET_FUNCTION,
|
|
92
|
+
constants_REF_ASSETS as REF_ASSETS,
|
|
93
|
+
constants_REF_LOCALES as REF_LOCALES,
|
|
94
|
+
constants_REF_VALIDATES as REF_VALIDATES,
|
|
95
|
+
constants_SEPARATOR as SEPARATOR,
|
|
96
|
+
constants_SIMPLE_DATA_TYPES as SIMPLE_DATA_TYPES,
|
|
97
|
+
constants_STORE_ERROR_POSTFIX as STORE_ERROR_POSTFIX,
|
|
98
|
+
constants_STORE_TOUCH_POSTFIX as STORE_TOUCH_POSTFIX,
|
|
99
|
+
constants_STYLE_RN_NAME as STYLE_RN_NAME,
|
|
100
|
+
constants_STYLE_WEB_NAME as STYLE_WEB_NAME,
|
|
101
|
+
constants_UNDEFINED_COMP_NAME as UNDEFINED_COMP_NAME,
|
|
102
|
+
constants_V_CHILDREN_NAME as V_CHILDREN_NAME,
|
|
103
|
+
constants_V_CHILDREN_PREFIX as V_CHILDREN_PREFIX,
|
|
104
|
+
constants_V_COMP_NAME as V_COMP_NAME,
|
|
129
105
|
};
|
|
130
106
|
}
|
|
131
107
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
108
|
+
type UIDefinition = any;
|
|
109
|
+
type Path = string;
|
|
110
|
+
type ArraysType = any[];
|
|
111
|
+
type WrapperType = React__default.ElementType;
|
|
112
|
+
type PropValue = PropsType | ArraysType | string | null | boolean | number | undefined | PathModifiersType;
|
|
137
113
|
interface PathModifierType {
|
|
138
114
|
path: string;
|
|
139
115
|
}
|
|
@@ -148,7 +124,7 @@ interface PathType {
|
|
|
148
124
|
path: string[];
|
|
149
125
|
level: number;
|
|
150
126
|
}
|
|
151
|
-
|
|
127
|
+
type PathsType = PathType[];
|
|
152
128
|
interface ValidationType {
|
|
153
129
|
store: string;
|
|
154
130
|
path: string;
|
|
@@ -165,15 +141,37 @@ interface ReduxPath {
|
|
|
165
141
|
type?: ReduxPathTypeEnum;
|
|
166
142
|
jsonataDef?: string;
|
|
167
143
|
}
|
|
168
|
-
|
|
144
|
+
type JsonUIComponentType = React__default.FC<any> | typeof React__default.Component | ((prop: any) => number | null | undefined | string);
|
|
169
145
|
interface JsonUIComponentsType {
|
|
170
146
|
[key: string]: JsonUIComponentType;
|
|
171
147
|
}
|
|
172
|
-
|
|
148
|
+
type JsonUIFunctionType = (attr: any, props: any, callerArgs: any, stock: any) => Promise<void> | void | any;
|
|
173
149
|
interface JsonUIFunctions {
|
|
174
150
|
[key: string]: JsonUIFunctionType;
|
|
175
151
|
}
|
|
176
152
|
|
|
153
|
+
interface NewStockType {
|
|
154
|
+
components: JsonUIComponentsType;
|
|
155
|
+
functions: JsonUIFunctions;
|
|
156
|
+
}
|
|
157
|
+
type InitType = (prop: NewStockType) => void;
|
|
158
|
+
type RegisterFunctionType = (key: string, value: JsonUIFunctionType) => void;
|
|
159
|
+
type RegisterComponentType = (key: string, value: JsonUIComponentType) => void;
|
|
160
|
+
type CallFunctionType = (name: string, attr?: any, props?: any, callerArgs?: any) => any;
|
|
161
|
+
type GetComponentType = (componentName: string) => JsonUIComponentType;
|
|
162
|
+
declare class Stock {
|
|
163
|
+
stock: NewStockType;
|
|
164
|
+
Wrapper: React.ElementType;
|
|
165
|
+
reduxStore: any;
|
|
166
|
+
validations: any;
|
|
167
|
+
constructor(newStock: NewStockType, Wrapper: React.ElementType, reduxStore: any);
|
|
168
|
+
init: InitType;
|
|
169
|
+
registerComponent: RegisterComponentType;
|
|
170
|
+
registerFunction: RegisterFunctionType;
|
|
171
|
+
callFunction: CallFunctionType;
|
|
172
|
+
getComponent: GetComponentType;
|
|
173
|
+
}
|
|
174
|
+
|
|
177
175
|
interface OwnTraverse {
|
|
178
176
|
key: string;
|
|
179
177
|
value: PropsType;
|
|
@@ -187,57 +185,57 @@ declare const calculatePropsFromModifier: (props: PropsType, stock: InstanceType
|
|
|
187
185
|
declare const getCurrentPaths: (props: PropsType, pathModifier: PathModifiersType) => PathModifiersType;
|
|
188
186
|
declare const normalisePrimitives: (props: PropsType, parentComp?: any) => any;
|
|
189
187
|
declare const getRootWrapperProps: (props: PropsType, stock: InstanceType<typeof Stock>) => void;
|
|
190
|
-
declare const isChildrenProp: (propName?: string
|
|
188
|
+
declare const isChildrenProp: (propName?: string) => boolean;
|
|
191
189
|
declare const getParentProps: (props: PropsType) => PropsType;
|
|
192
190
|
declare const getPropsChildrenFilter: ({ props, filter }: {
|
|
193
191
|
props: PropsType;
|
|
194
|
-
filter:
|
|
192
|
+
filter: "onlyChildren" | "withoutChildren";
|
|
195
193
|
}) => PropsType;
|
|
196
|
-
declare const getChildrensForRoot: (props: PropsType, children: any, Wrapper: WrapperType) => JSX.Element | JSX.Element[] | undefined;
|
|
197
|
-
declare const generateChildren: (props: PropsType, { Wrapper }: InstanceType<typeof Stock>) => PropValue | JSX.Element;
|
|
198
|
-
declare const generateNewChildren: (props: PropsType, { Wrapper }: InstanceType<typeof Stock>) => JSX.Element | JSX.Element[] | undefined;
|
|
194
|
+
declare const getChildrensForRoot: (props: PropsType, children: any, Wrapper: WrapperType) => react_jsx_runtime.JSX.Element | react_jsx_runtime.JSX.Element[] | undefined;
|
|
195
|
+
declare const generateChildren: (props: PropsType, { Wrapper }: InstanceType<typeof Stock>) => PropValue | react_jsx_runtime.JSX.Element;
|
|
196
|
+
declare const generateNewChildren: (props: PropsType, { Wrapper }: InstanceType<typeof Stock>) => react_jsx_runtime.JSX.Element | react_jsx_runtime.JSX.Element[] | undefined;
|
|
199
197
|
declare const isTechnicalProp: (propName: string) => boolean;
|
|
200
198
|
declare const removeTechnicalProps: (changeableProps: any) => any;
|
|
201
199
|
|
|
202
|
-
declare const
|
|
203
|
-
declare const
|
|
204
|
-
declare const
|
|
205
|
-
declare const
|
|
206
|
-
declare const
|
|
207
|
-
declare const
|
|
208
|
-
declare const
|
|
209
|
-
declare const
|
|
210
|
-
declare const
|
|
211
|
-
declare const
|
|
212
|
-
declare const
|
|
213
|
-
declare const
|
|
214
|
-
declare const
|
|
215
|
-
declare const
|
|
216
|
-
declare namespace
|
|
200
|
+
declare const wrapperUtil_actionBuilder: typeof actionBuilder;
|
|
201
|
+
declare const wrapperUtil_calculatePropsFromModifier: typeof calculatePropsFromModifier;
|
|
202
|
+
declare const wrapperUtil_generateChildren: typeof generateChildren;
|
|
203
|
+
declare const wrapperUtil_generateNewChildren: typeof generateNewChildren;
|
|
204
|
+
declare const wrapperUtil_getChildrensForRoot: typeof getChildrensForRoot;
|
|
205
|
+
declare const wrapperUtil_getCurrentPaths: typeof getCurrentPaths;
|
|
206
|
+
declare const wrapperUtil_getFilteredPath: typeof getFilteredPath;
|
|
207
|
+
declare const wrapperUtil_getParentProps: typeof getParentProps;
|
|
208
|
+
declare const wrapperUtil_getPropsChildrenFilter: typeof getPropsChildrenFilter;
|
|
209
|
+
declare const wrapperUtil_getRootWrapperProps: typeof getRootWrapperProps;
|
|
210
|
+
declare const wrapperUtil_isChildrenProp: typeof isChildrenProp;
|
|
211
|
+
declare const wrapperUtil_isTechnicalProp: typeof isTechnicalProp;
|
|
212
|
+
declare const wrapperUtil_normalisePrimitives: typeof normalisePrimitives;
|
|
213
|
+
declare const wrapperUtil_removeTechnicalProps: typeof removeTechnicalProps;
|
|
214
|
+
declare namespace wrapperUtil {
|
|
217
215
|
export {
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
216
|
+
wrapperUtil_actionBuilder as actionBuilder,
|
|
217
|
+
wrapperUtil_calculatePropsFromModifier as calculatePropsFromModifier,
|
|
218
|
+
wrapperUtil_generateChildren as generateChildren,
|
|
219
|
+
wrapperUtil_generateNewChildren as generateNewChildren,
|
|
220
|
+
wrapperUtil_getChildrensForRoot as getChildrensForRoot,
|
|
221
|
+
wrapperUtil_getCurrentPaths as getCurrentPaths,
|
|
222
|
+
wrapperUtil_getFilteredPath as getFilteredPath,
|
|
223
|
+
wrapperUtil_getParentProps as getParentProps,
|
|
224
|
+
wrapperUtil_getPropsChildrenFilter as getPropsChildrenFilter,
|
|
225
|
+
wrapperUtil_getRootWrapperProps as getRootWrapperProps,
|
|
226
|
+
wrapperUtil_isChildrenProp as isChildrenProp,
|
|
227
|
+
wrapperUtil_isTechnicalProp as isTechnicalProp,
|
|
228
|
+
wrapperUtil_normalisePrimitives as normalisePrimitives,
|
|
229
|
+
wrapperUtil_removeTechnicalProps as removeTechnicalProps,
|
|
232
230
|
};
|
|
233
231
|
}
|
|
234
232
|
|
|
235
233
|
declare const findLastIndex: (arr: any[], func: any) => number;
|
|
236
234
|
declare const drop: (arr: any[], n?: number) => any[];
|
|
237
|
-
declare const isNumber: (a: any) =>
|
|
238
|
-
declare const jsonPointerFix: (path?: string
|
|
239
|
-
declare const jsonPointerGet: (json: any, path?: string
|
|
240
|
-
declare const jsonPointerSet: (json: any, path?: string
|
|
235
|
+
declare const isNumber: (a: any) => a is number;
|
|
236
|
+
declare const jsonPointerFix: (path?: string) => string;
|
|
237
|
+
declare const jsonPointerGet: (json: any, path?: string) => any;
|
|
238
|
+
declare const jsonPointerSet: (json: any, path?: string, value?: any) => any;
|
|
241
239
|
declare const pathArrayToPathString: (array: (string | number)[]) => string;
|
|
242
240
|
declare const pathArrayToJsonPointer: (array: (string | number)[]) => string;
|
|
243
241
|
declare function isOnlyObject(item: any): boolean;
|
|
@@ -253,44 +251,44 @@ declare const collectObjMerge: (refConst: string, json: any) => {};
|
|
|
253
251
|
declare const collectObjToArray: (refConst: string, json: any, flatten?: boolean) => any[];
|
|
254
252
|
declare const isValidJson: (d: any) => boolean;
|
|
255
253
|
declare const isPrimitiveValue: (value: any, emptyStringAllowed?: boolean) => boolean;
|
|
256
|
-
declare const hasLeaf: (obj: any, emptyStringAllowed?: boolean
|
|
254
|
+
declare const hasLeaf: (obj: any, emptyStringAllowed?: boolean) => boolean;
|
|
257
255
|
|
|
258
|
-
declare const
|
|
259
|
-
declare const
|
|
260
|
-
declare const
|
|
261
|
-
declare const
|
|
262
|
-
declare const
|
|
263
|
-
declare const
|
|
264
|
-
declare const
|
|
265
|
-
declare const
|
|
266
|
-
declare const
|
|
267
|
-
declare const
|
|
268
|
-
declare const
|
|
269
|
-
declare const
|
|
270
|
-
declare const
|
|
271
|
-
declare const
|
|
272
|
-
declare const
|
|
273
|
-
declare const
|
|
274
|
-
declare const
|
|
275
|
-
declare namespace
|
|
256
|
+
declare const jsonUtils_changeRelativePath: typeof changeRelativePath;
|
|
257
|
+
declare const jsonUtils_collectObjMerge: typeof collectObjMerge;
|
|
258
|
+
declare const jsonUtils_collectObjToArray: typeof collectObjToArray;
|
|
259
|
+
declare const jsonUtils_drop: typeof drop;
|
|
260
|
+
declare const jsonUtils_findLastIndex: typeof findLastIndex;
|
|
261
|
+
declare const jsonUtils_hasLeaf: typeof hasLeaf;
|
|
262
|
+
declare const jsonUtils_isNumber: typeof isNumber;
|
|
263
|
+
declare const jsonUtils_isOnlyObject: typeof isOnlyObject;
|
|
264
|
+
declare const jsonUtils_isPrimitiveValue: typeof isPrimitiveValue;
|
|
265
|
+
declare const jsonUtils_isValidJson: typeof isValidJson;
|
|
266
|
+
declare const jsonUtils_jsonPointerFix: typeof jsonPointerFix;
|
|
267
|
+
declare const jsonUtils_jsonPointerGet: typeof jsonPointerGet;
|
|
268
|
+
declare const jsonUtils_jsonPointerSet: typeof jsonPointerSet;
|
|
269
|
+
declare const jsonUtils_mergeDeep: typeof mergeDeep;
|
|
270
|
+
declare const jsonUtils_mergePath: typeof mergePath;
|
|
271
|
+
declare const jsonUtils_pathArrayToJsonPointer: typeof pathArrayToJsonPointer;
|
|
272
|
+
declare const jsonUtils_pathArrayToPathString: typeof pathArrayToPathString;
|
|
273
|
+
declare namespace jsonUtils {
|
|
276
274
|
export {
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
275
|
+
jsonUtils_changeRelativePath as changeRelativePath,
|
|
276
|
+
jsonUtils_collectObjMerge as collectObjMerge,
|
|
277
|
+
jsonUtils_collectObjToArray as collectObjToArray,
|
|
278
|
+
jsonUtils_drop as drop,
|
|
279
|
+
jsonUtils_findLastIndex as findLastIndex,
|
|
280
|
+
jsonUtils_hasLeaf as hasLeaf,
|
|
281
|
+
jsonUtils_isNumber as isNumber,
|
|
282
|
+
jsonUtils_isOnlyObject as isOnlyObject,
|
|
283
|
+
jsonUtils_isPrimitiveValue as isPrimitiveValue,
|
|
284
|
+
jsonUtils_isValidJson as isValidJson,
|
|
285
|
+
jsonUtils_jsonPointerFix as jsonPointerFix,
|
|
286
|
+
jsonUtils_jsonPointerGet as jsonPointerGet,
|
|
287
|
+
jsonUtils_jsonPointerSet as jsonPointerSet,
|
|
288
|
+
jsonUtils_mergeDeep as mergeDeep,
|
|
289
|
+
jsonUtils_mergePath as mergePath,
|
|
290
|
+
jsonUtils_pathArrayToJsonPointer as pathArrayToJsonPointer,
|
|
291
|
+
jsonUtils_pathArrayToPathString as pathArrayToPathString,
|
|
294
292
|
};
|
|
295
293
|
}
|
|
296
294
|
|
|
@@ -318,10 +316,10 @@ declare class I18n {
|
|
|
318
316
|
availableLanguageKey?: string;
|
|
319
317
|
constructor({ language, resources, nonExistsHandler, keyPrefix, keyPostfix }: I18nProps);
|
|
320
318
|
getLocales: () => string;
|
|
321
|
-
t: (key: any, options?: any, language?: string | null
|
|
319
|
+
t: (key: any, options?: any, language?: string | null) => any;
|
|
322
320
|
}
|
|
323
321
|
|
|
324
|
-
declare const StockContext: React$1.Context<Stock
|
|
322
|
+
declare const StockContext: React$1.Context<Stock | null>;
|
|
325
323
|
declare const PathModifierContext: React$1.Context<{}>;
|
|
326
324
|
|
|
327
325
|
declare const compSelectorHook: (currentPaths: PathModifiersType, subscriberPaths: ReduxPath[]) => (state: any) => any[] | undefined;
|
|
@@ -336,4 +334,5 @@ declare const rootReducer: redux.Reducer<redux.CombinedState<{
|
|
|
336
334
|
root: any;
|
|
337
335
|
}>, redux.AnyAction>;
|
|
338
336
|
|
|
339
|
-
export {
|
|
337
|
+
export { I18n, PathModifierContext, ReduxPathTypeEnum, Stock, StockContext, compSelectorHook, constants, _default as stockFunctions, rootReducer as storeReducers, jsonUtils as util, wrapperUtil };
|
|
338
|
+
export type { ArraysType, JsonUIComponentsType, JsonUIFunctionType, JsonUIFunctions, Path, PathModifierType, PathModifiersType, PathType, PathsType, PropValue, PropsType, ReduxPath, UIDefinition, ValidationType, WrapperType };
|
package/package.json
CHANGED
|
@@ -1,16 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jsonui/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"source": "src/index.ts",
|
|
6
|
-
"main": "dist/cjs/index.js",
|
|
7
|
-
"module": "dist/esm/index.js",
|
|
8
6
|
"homepage": "http://www.jsonui.org/",
|
|
9
7
|
"files": [
|
|
10
8
|
"dist"
|
|
11
9
|
],
|
|
10
|
+
"main": "dist/cjs/index.js",
|
|
11
|
+
"module": "dist/esm/index.js",
|
|
12
12
|
"types": "dist/index.d.ts",
|
|
13
13
|
"type": "module",
|
|
14
|
+
"exports": {
|
|
15
|
+
".": {
|
|
16
|
+
"import": "./dist/esm/index.js",
|
|
17
|
+
"require": "./dist/cjs/index.js",
|
|
18
|
+
"types": "./dist/index.d.ts"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
14
21
|
"scripts": {
|
|
15
22
|
"lint": "eslint src --ext .jsx,.js,.tsx,.ts",
|
|
16
23
|
"test": "jest",
|
|
@@ -21,28 +28,30 @@
|
|
|
21
28
|
"access": "public"
|
|
22
29
|
},
|
|
23
30
|
"dependencies": {
|
|
24
|
-
"ajv": "^8.
|
|
31
|
+
"ajv": "^8.17.1",
|
|
25
32
|
"ajv-errors": "^3.0.0",
|
|
26
33
|
"ajv-formats": "^3.0.1",
|
|
27
|
-
"immer": "^
|
|
28
|
-
"jsonata": "^1.
|
|
29
|
-
"jsonpointer": "^5.0.
|
|
34
|
+
"immer": "^10.2.0",
|
|
35
|
+
"jsonata": "^2.1.0",
|
|
36
|
+
"jsonpointer": "^5.0.1",
|
|
30
37
|
"key-value-replace": "^3.0.0",
|
|
31
|
-
"
|
|
32
|
-
"redux": "^4.1.2",
|
|
33
|
-
"traverse": "^0.6.6"
|
|
38
|
+
"traverse": "^0.6.11"
|
|
34
39
|
},
|
|
35
40
|
"peerDependencies": {
|
|
36
|
-
"
|
|
37
|
-
"react
|
|
41
|
+
"lodash": "^4.17.21",
|
|
42
|
+
"react": "^19.2.0",
|
|
43
|
+
"react-dom": "^19.2.0",
|
|
44
|
+
"redux": "^5.0.1"
|
|
38
45
|
},
|
|
39
46
|
"devDependencies": {
|
|
40
|
-
"@rollup/plugin-commonjs": "^
|
|
41
|
-
"@rollup/plugin-json": "^
|
|
42
|
-
"@rollup/plugin-node-resolve": "^
|
|
43
|
-
"@rollup/plugin-typescript": "^
|
|
44
|
-
"@types/jest": "^
|
|
45
|
-
"@types/
|
|
47
|
+
"@rollup/plugin-commonjs": "^29.0.0",
|
|
48
|
+
"@rollup/plugin-json": "^6.1.0",
|
|
49
|
+
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
50
|
+
"@rollup/plugin-typescript": "^12.3.0",
|
|
51
|
+
"@types/jest": "^30.0.0",
|
|
52
|
+
"@types/react": "^19.2.3",
|
|
53
|
+
"@types/react-dom": "^19.2.2",
|
|
54
|
+
"@types/traverse": "^0.6.37",
|
|
46
55
|
"@typescript-eslint/eslint-plugin": "^5.10.0",
|
|
47
56
|
"@typescript-eslint/parser": "^5.10.0",
|
|
48
57
|
"eslint": "^8.2.0",
|
|
@@ -51,11 +60,12 @@
|
|
|
51
60
|
"eslint-plugin-jsx-a11y": "^6.5.1",
|
|
52
61
|
"eslint-plugin-react": "^7.28.0",
|
|
53
62
|
"eslint-plugin-react-hooks": "^4.3.0",
|
|
54
|
-
"jest": "^
|
|
55
|
-
"rollup": "^
|
|
56
|
-
"rollup-plugin-dts": "^
|
|
57
|
-
"rollup-plugin-visualizer": "^
|
|
58
|
-
"ts-jest": "^
|
|
63
|
+
"jest": "^30.2.0",
|
|
64
|
+
"rollup": "^4.53.2",
|
|
65
|
+
"rollup-plugin-dts": "^6.2.3",
|
|
66
|
+
"rollup-plugin-visualizer": "^6.0.5",
|
|
67
|
+
"ts-jest": "^29.4.5",
|
|
68
|
+
"typescript": "^5.9.3"
|
|
59
69
|
},
|
|
60
|
-
"gitHead": "
|
|
70
|
+
"gitHead": "743c310a80c03af33b3e6e40f3c4b0b6dd62c6a0"
|
|
61
71
|
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import Stock from './stock/Stock';
|
|
2
|
-
import * as wrapperUtil from './wrapper/wrapperUtil';
|
|
3
|
-
import * as constants from './utils/constants';
|
|
4
|
-
import * as util from './utils/util';
|
|
5
|
-
import I18n from './utils/I18n';
|
|
6
|
-
import { StockContext, PathModifierContext } from './utils/contextHandler';
|
|
7
|
-
import { compSelectorHook } from './store/root/selectors';
|
|
8
|
-
import stockFunctions from './stock/functions';
|
|
9
|
-
import storeReducers from './store/reducers';
|
|
10
|
-
import { UIDefinition, Path, ArraysType, WrapperType, PropValue, PathModifierType, PathModifiersType, PropsType, PathType, PathsType, ValidationType, ReduxPathTypeEnum, ReduxPath, JsonUIComponentsType, JsonUIFunctionType, JsonUIFunctions } from './utils/types';
|
|
11
|
-
export { Stock, I18n, wrapperUtil, util, constants, StockContext, PathModifierContext, compSelectorHook, stockFunctions, storeReducers };
|
|
12
|
-
export type { UIDefinition, Path, ArraysType, WrapperType, PropValue, PathModifierType, PathModifiersType, PropsType, PathType, PathsType, ValidationType, ReduxPathTypeEnum, ReduxPath, JsonUIComponentsType, JsonUIFunctionType, JsonUIFunctions, };
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import { JsonUIComponentsType, JsonUIComponentType, JsonUIFunctions, JsonUIFunctionType } from 'utils/types';
|
|
3
|
-
interface NewStockType {
|
|
4
|
-
components: JsonUIComponentsType;
|
|
5
|
-
functions: JsonUIFunctions;
|
|
6
|
-
}
|
|
7
|
-
declare type InitType = (prop: NewStockType) => void;
|
|
8
|
-
declare type RegisterFunctionType = (key: string, value: JsonUIFunctionType) => void;
|
|
9
|
-
declare type RegisterComponentType = (key: string, value: JsonUIComponentType) => void;
|
|
10
|
-
declare type CallFunctionType = (name: string, attr?: any, props?: any, callerArgs?: any) => any;
|
|
11
|
-
declare type GetComponentType = (componentName: string) => ReactNode;
|
|
12
|
-
export default class Stock {
|
|
13
|
-
stock: NewStockType;
|
|
14
|
-
Wrapper: React.ElementType;
|
|
15
|
-
reduxStore: any;
|
|
16
|
-
validations: any;
|
|
17
|
-
constructor(newStock: NewStockType, Wrapper: React.ElementType, reduxStore: any);
|
|
18
|
-
init: InitType;
|
|
19
|
-
registerComponent: RegisterComponentType;
|
|
20
|
-
registerFunction: RegisterFunctionType;
|
|
21
|
-
callFunction: CallFunctionType;
|
|
22
|
-
getComponent: GetComponentType;
|
|
23
|
-
}
|
|
24
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { ErrorObject } from 'ajv';
|
|
2
|
-
export declare const errorConverter: (errors: ErrorObject<string, Record<string, any>, unknown>[] | null | undefined) => any;
|
|
3
|
-
export declare const validateJSON: (schema: any, data: any) => {
|
|
4
|
-
valid: boolean;
|
|
5
|
-
error: any;
|
|
6
|
-
};
|
|
7
|
-
export declare const validateJSONAndStore: (schema: any, store: string, data: any) => {
|
|
8
|
-
store: string;
|
|
9
|
-
valid: boolean;
|
|
10
|
-
value: any;
|
|
11
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/// <reference types="redux-persist/types/types" />
|
|
2
|
-
/// <reference types="redux-persist" />
|
|
3
|
-
declare const _default: {
|
|
4
|
-
key: string;
|
|
5
|
-
whitelist: string[];
|
|
6
|
-
transforms: import("redux-persist").Transform<unknown, unknown, any, any>[];
|
|
7
|
-
};
|
|
8
|
-
export default _default;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|