@jsonui/core 0.6.0 → 0.7.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 +115 -376
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/index.d.ts +1 -3
- package/dist/cjs/types/store/root/actions.d.ts +0 -5
- package/dist/cjs/types/utils/constants.d.ts +0 -2
- package/dist/cjs/types/utils/types.d.ts +1 -1
- package/dist/cjs/types/utils/util.d.ts +1 -1
- package/dist/esm/index.js +115 -376
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/index.d.ts +1 -3
- package/dist/esm/types/store/root/actions.d.ts +0 -5
- package/dist/esm/types/utils/constants.d.ts +0 -2
- package/dist/esm/types/utils/types.d.ts +1 -1
- package/dist/esm/types/utils/util.d.ts +1 -1
- package/dist/index.d.ts +47 -65
- package/package.json +2 -3
|
@@ -6,8 +6,6 @@ import I18n from './utils/I18n';
|
|
|
6
6
|
import { StockContext, PathModifierContext } from './utils/contextHandler';
|
|
7
7
|
import { compSelectorHook } from './store/root/selectors';
|
|
8
8
|
import stockFunctions from './stock/functions';
|
|
9
|
-
import persistConfig from './store/persistConfig';
|
|
10
9
|
import storeReducers from './store/reducers';
|
|
11
|
-
import appRootFunctions from './stock/appRootFunctions';
|
|
12
10
|
export type * from './utils/types';
|
|
13
|
-
export { Stock, I18n, wrapperUtil, util, constants, StockContext, PathModifierContext,
|
|
11
|
+
export { Stock, I18n, wrapperUtil, util, constants, StockContext, PathModifierContext, compSelectorHook, stockFunctions, storeReducers };
|
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
export declare const DATA_UPDATE = "DATA_UPDATE";
|
|
2
|
-
export declare const PURGE = "PURGE";
|
|
3
2
|
export declare const set: (payload: any) => {
|
|
4
3
|
type: string;
|
|
5
4
|
payload: any;
|
|
6
5
|
};
|
|
7
|
-
export declare const purge: (payload: any) => {
|
|
8
|
-
type: string;
|
|
9
|
-
payload: any;
|
|
10
|
-
};
|
|
@@ -4,8 +4,6 @@ export declare const STORE_TOUCH_POSTFIX = ".touch";
|
|
|
4
4
|
export declare const PATH_MODIFIERS_KEY = "$pathModifiers";
|
|
5
5
|
export declare const MODIFIER_KEY = "$modifier";
|
|
6
6
|
export declare const ACTION_KEY = "$action";
|
|
7
|
-
export declare const PERSIST_STORAGE_KEY = "$persistStores";
|
|
8
|
-
export declare const PERSIST_STORAGE_NAMES: string[];
|
|
9
7
|
export declare const REF_ASSETS = "$assetsRef";
|
|
10
8
|
export declare const REF_LOCALES = "$locales";
|
|
11
9
|
export declare const REF_VALIDATES = "$validations";
|
|
@@ -19,4 +19,4 @@ export declare const collectObjMerge: (refConst: string, json: any) => {};
|
|
|
19
19
|
export declare const collectObjToArray: (refConst: string, json: any, flatten?: boolean) => any[];
|
|
20
20
|
export declare const isValidJson: (d: any) => boolean;
|
|
21
21
|
export declare const isPrimitiveValue: (value: any, emptyStringAllowed?: boolean) => boolean;
|
|
22
|
-
export declare const hasLeaf: (obj: any, emptyStringAllowed?: boolean) => boolean;
|
|
22
|
+
export declare const hasLeaf: (obj: any, emptyStringAllowed?: boolean | undefined) => boolean;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
/// <reference types="redux-persist/types/types" />
|
|
3
|
-
/// <reference types="redux-persist" />
|
|
4
2
|
import * as react from 'react';
|
|
5
3
|
import react__default, { ReactNode } from 'react';
|
|
6
4
|
import { JsonUIComponentsType as JsonUIComponentsType$1, JsonUIFunctions as JsonUIFunctions$1, JsonUIFunctionType as JsonUIFunctionType$1 } from 'utils/types';
|
|
7
|
-
import * as c from 'utils/constants';
|
|
8
5
|
import Stock$1 from 'stock/Stock';
|
|
9
|
-
import * as redux_persist from 'redux-persist';
|
|
10
6
|
import * as redux from 'redux';
|
|
11
7
|
|
|
12
8
|
interface NewStockType {
|
|
@@ -31,58 +27,12 @@ declare class Stock {
|
|
|
31
27
|
getComponent: GetComponentType;
|
|
32
28
|
}
|
|
33
29
|
|
|
34
|
-
declare type UIDefinition = any;
|
|
35
|
-
declare type Path = string;
|
|
36
|
-
declare type ArraysType = any[];
|
|
37
|
-
declare type WrapperType = react__default.ElementType;
|
|
38
|
-
declare type PropValue = PropsType | ArraysType | string | null | boolean | number | undefined | PathModifiersType;
|
|
39
|
-
interface PathModifierType {
|
|
40
|
-
path: string;
|
|
41
|
-
}
|
|
42
|
-
interface PathModifiersType {
|
|
43
|
-
[key: string]: PathModifierType;
|
|
44
|
-
}
|
|
45
|
-
interface PropsType {
|
|
46
|
-
[key: string]: PropValue;
|
|
47
|
-
[c.PATH_MODIFIERS_KEY]?: PathModifiersType;
|
|
48
|
-
}
|
|
49
|
-
interface PathType {
|
|
50
|
-
path: string[];
|
|
51
|
-
level: number;
|
|
52
|
-
}
|
|
53
|
-
declare type PathsType = PathType[];
|
|
54
|
-
interface ValidationType {
|
|
55
|
-
store: string;
|
|
56
|
-
path: string;
|
|
57
|
-
schema: any;
|
|
58
|
-
}
|
|
59
|
-
declare enum ReduxPathTypeEnum {
|
|
60
|
-
ERROR = "ERROR",
|
|
61
|
-
TOUCH = "TOUCH",
|
|
62
|
-
NORMAL = "NORMAL"
|
|
63
|
-
}
|
|
64
|
-
interface ReduxPath {
|
|
65
|
-
store?: string;
|
|
66
|
-
path?: string;
|
|
67
|
-
type?: ReduxPathTypeEnum;
|
|
68
|
-
jsonataDef?: string;
|
|
69
|
-
}
|
|
70
|
-
interface JsonUIComponentsType {
|
|
71
|
-
[key: string]: ReactNode;
|
|
72
|
-
}
|
|
73
|
-
declare type JsonUIFunctionType = (attr: any, props: any, callerArgs: any, stock: any) => Promise<void> | void | any;
|
|
74
|
-
interface JsonUIFunctions {
|
|
75
|
-
[key: string]: JsonUIFunctionType;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
30
|
declare const SEPARATOR = "/";
|
|
79
31
|
declare const STORE_ERROR_POSTFIX = ".error";
|
|
80
32
|
declare const STORE_TOUCH_POSTFIX = ".touch";
|
|
81
33
|
declare const PATH_MODIFIERS_KEY = "$pathModifiers";
|
|
82
34
|
declare const MODIFIER_KEY = "$modifier";
|
|
83
35
|
declare const ACTION_KEY = "$action";
|
|
84
|
-
declare const PERSIST_STORAGE_KEY = "$persistStores";
|
|
85
|
-
declare const PERSIST_STORAGE_NAMES: string[];
|
|
86
36
|
declare const REF_ASSETS = "$assetsRef";
|
|
87
37
|
declare const REF_LOCALES = "$locales";
|
|
88
38
|
declare const REF_VALIDATES = "$validations";
|
|
@@ -116,8 +66,6 @@ declare const constants_d_STORE_TOUCH_POSTFIX: typeof STORE_TOUCH_POSTFIX;
|
|
|
116
66
|
declare const constants_d_PATH_MODIFIERS_KEY: typeof PATH_MODIFIERS_KEY;
|
|
117
67
|
declare const constants_d_MODIFIER_KEY: typeof MODIFIER_KEY;
|
|
118
68
|
declare const constants_d_ACTION_KEY: typeof ACTION_KEY;
|
|
119
|
-
declare const constants_d_PERSIST_STORAGE_KEY: typeof PERSIST_STORAGE_KEY;
|
|
120
|
-
declare const constants_d_PERSIST_STORAGE_NAMES: typeof PERSIST_STORAGE_NAMES;
|
|
121
69
|
declare const constants_d_REF_ASSETS: typeof REF_ASSETS;
|
|
122
70
|
declare const constants_d_REF_LOCALES: typeof REF_LOCALES;
|
|
123
71
|
declare const constants_d_REF_VALIDATES: typeof REF_VALIDATES;
|
|
@@ -152,8 +100,6 @@ declare namespace constants_d {
|
|
|
152
100
|
constants_d_PATH_MODIFIERS_KEY as PATH_MODIFIERS_KEY,
|
|
153
101
|
constants_d_MODIFIER_KEY as MODIFIER_KEY,
|
|
154
102
|
constants_d_ACTION_KEY as ACTION_KEY,
|
|
155
|
-
constants_d_PERSIST_STORAGE_KEY as PERSIST_STORAGE_KEY,
|
|
156
|
-
constants_d_PERSIST_STORAGE_NAMES as PERSIST_STORAGE_NAMES,
|
|
157
103
|
constants_d_REF_ASSETS as REF_ASSETS,
|
|
158
104
|
constants_d_REF_LOCALES as REF_LOCALES,
|
|
159
105
|
constants_d_REF_VALIDATES as REF_VALIDATES,
|
|
@@ -183,6 +129,50 @@ declare namespace constants_d {
|
|
|
183
129
|
};
|
|
184
130
|
}
|
|
185
131
|
|
|
132
|
+
declare type UIDefinition = any;
|
|
133
|
+
declare type Path = string;
|
|
134
|
+
declare type ArraysType = any[];
|
|
135
|
+
declare type WrapperType = react__default.ElementType;
|
|
136
|
+
declare type PropValue = PropsType | ArraysType | string | null | boolean | number | undefined | PathModifiersType;
|
|
137
|
+
interface PathModifierType {
|
|
138
|
+
path: string;
|
|
139
|
+
}
|
|
140
|
+
interface PathModifiersType {
|
|
141
|
+
[key: string]: PathModifierType;
|
|
142
|
+
}
|
|
143
|
+
interface PropsType {
|
|
144
|
+
[key: string]: PropValue;
|
|
145
|
+
[PATH_MODIFIERS_KEY]?: PathModifiersType;
|
|
146
|
+
}
|
|
147
|
+
interface PathType {
|
|
148
|
+
path: string[];
|
|
149
|
+
level: number;
|
|
150
|
+
}
|
|
151
|
+
declare type PathsType = PathType[];
|
|
152
|
+
interface ValidationType {
|
|
153
|
+
store: string;
|
|
154
|
+
path: string;
|
|
155
|
+
schema: any;
|
|
156
|
+
}
|
|
157
|
+
declare enum ReduxPathTypeEnum {
|
|
158
|
+
ERROR = "ERROR",
|
|
159
|
+
TOUCH = "TOUCH",
|
|
160
|
+
NORMAL = "NORMAL"
|
|
161
|
+
}
|
|
162
|
+
interface ReduxPath {
|
|
163
|
+
store?: string;
|
|
164
|
+
path?: string;
|
|
165
|
+
type?: ReduxPathTypeEnum;
|
|
166
|
+
jsonataDef?: string;
|
|
167
|
+
}
|
|
168
|
+
interface JsonUIComponentsType {
|
|
169
|
+
[key: string]: ReactNode;
|
|
170
|
+
}
|
|
171
|
+
declare type JsonUIFunctionType = (attr: any, props: any, callerArgs: any, stock: any) => Promise<void> | void | any;
|
|
172
|
+
interface JsonUIFunctions {
|
|
173
|
+
[key: string]: JsonUIFunctionType;
|
|
174
|
+
}
|
|
175
|
+
|
|
186
176
|
interface OwnTraverse {
|
|
187
177
|
key: string;
|
|
188
178
|
value: PropsType;
|
|
@@ -262,7 +252,7 @@ declare const collectObjMerge: (refConst: string, json: any) => {};
|
|
|
262
252
|
declare const collectObjToArray: (refConst: string, json: any, flatten?: boolean) => any[];
|
|
263
253
|
declare const isValidJson: (d: any) => boolean;
|
|
264
254
|
declare const isPrimitiveValue: (value: any, emptyStringAllowed?: boolean) => boolean;
|
|
265
|
-
declare const hasLeaf: (obj: any, emptyStringAllowed?: boolean) => boolean;
|
|
255
|
+
declare const hasLeaf: (obj: any, emptyStringAllowed?: boolean | undefined) => boolean;
|
|
266
256
|
|
|
267
257
|
declare const util_d_findLastIndex: typeof findLastIndex;
|
|
268
258
|
declare const util_d_drop: typeof drop;
|
|
@@ -335,22 +325,14 @@ declare const PathModifierContext: react.Context<{}>;
|
|
|
335
325
|
|
|
336
326
|
declare const compSelectorHook: (currentPaths: PathModifiersType, subscriberPaths: ReduxPath[]) => (state: any) => any[] | undefined;
|
|
337
327
|
|
|
338
|
-
declare const _default
|
|
328
|
+
declare const _default: {
|
|
339
329
|
get: JsonUIFunctionType;
|
|
340
330
|
set: JsonUIFunctionType;
|
|
341
331
|
jsonata: JsonUIFunctionType;
|
|
342
332
|
};
|
|
343
333
|
|
|
344
|
-
declare const _default: {
|
|
345
|
-
key: string;
|
|
346
|
-
whitelist: string[];
|
|
347
|
-
transforms: redux_persist.Transform<unknown, unknown, any, any>[];
|
|
348
|
-
};
|
|
349
|
-
|
|
350
334
|
declare const rootReducer: redux.Reducer<redux.CombinedState<{
|
|
351
335
|
root: any;
|
|
352
336
|
}>, redux.AnyAction>;
|
|
353
337
|
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
export { ArraysType, I18n, JsonUIComponentsType, JsonUIFunctionType, JsonUIFunctions, Path, PathModifierContext, PathModifierType, PathModifiersType, PathType, PathsType, PropValue, PropsType, ReduxPath, ReduxPathTypeEnum, Stock, StockContext, UIDefinition, ValidationType, WrapperType, appRootFunctions, compSelectorHook, constants_d as constants, _default as persistConfig, _default$1 as stockFunctions, rootReducer as storeReducers, util_d as util, wrapperUtil_d as wrapperUtil };
|
|
338
|
+
export { ArraysType, I18n, JsonUIComponentsType, JsonUIFunctionType, JsonUIFunctions, Path, PathModifierContext, PathModifierType, PathModifiersType, PathType, PathsType, PropValue, PropsType, ReduxPath, ReduxPathTypeEnum, Stock, StockContext, UIDefinition, ValidationType, WrapperType, compSelectorHook, constants_d as constants, _default as stockFunctions, rootReducer as storeReducers, util_d as util, wrapperUtil_d as wrapperUtil };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jsonui/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"source": "src/index.ts",
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
@@ -30,7 +30,6 @@
|
|
|
30
30
|
"key-value-replace": "^3.0.0",
|
|
31
31
|
"lodash": "^4.17.21",
|
|
32
32
|
"redux": "^4.1.2",
|
|
33
|
-
"redux-persist": "^6.0.0",
|
|
34
33
|
"traverse": "^0.6.6"
|
|
35
34
|
},
|
|
36
35
|
"peerDependencies": {
|
|
@@ -58,5 +57,5 @@
|
|
|
58
57
|
"rollup-plugin-visualizer": "^5.5.4",
|
|
59
58
|
"ts-jest": "^27.1.3"
|
|
60
59
|
},
|
|
61
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "d1f5846702fd08fe465648dac4daead47ab50279"
|
|
62
61
|
}
|