@jsonui/core 0.7.1 → 0.7.3

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,12 +1,12 @@
1
1
  import { ReactNode } from 'react';
2
- import { JsonUIComponentsType, JsonUIFunctions, JsonUIFunctionType } from 'utils/types';
2
+ import { JsonUIComponentsType, JsonUIComponentType, JsonUIFunctions, JsonUIFunctionType } from 'utils/types';
3
3
  interface NewStockType {
4
4
  components: JsonUIComponentsType;
5
5
  functions: JsonUIFunctions;
6
6
  }
7
7
  declare type InitType = (prop: NewStockType) => void;
8
8
  declare type RegisterFunctionType = (key: string, value: JsonUIFunctionType) => void;
9
- declare type RegisterComponentType = (key: string, value: ReactNode) => void;
9
+ declare type RegisterComponentType = (key: string, value: JsonUIComponentType) => void;
10
10
  declare type CallFunctionType = (name: string, attr?: any, props?: any, callerArgs?: any) => any;
11
11
  declare type GetComponentType = (componentName: string) => ReactNode;
12
12
  export default class Stock {
@@ -1,4 +1,4 @@
1
- import React, { ReactNode } from 'react';
1
+ import React from 'react';
2
2
  import * as c from './constants';
3
3
  export declare type UIDefinition = any;
4
4
  export declare type Path = string;
@@ -36,8 +36,9 @@ export interface ReduxPath {
36
36
  type?: ReduxPathTypeEnum;
37
37
  jsonataDef?: string;
38
38
  }
39
+ export declare type JsonUIComponentType = React.FC<any> | typeof React.Component | ((prop: any) => number | null | undefined | string);
39
40
  export interface JsonUIComponentsType {
40
- [key: string]: ReactNode;
41
+ [key: string]: JsonUIComponentType;
41
42
  }
42
43
  export declare type JsonUIFunctionType = (attr: any, props: any, callerArgs: any, stock: any) => Promise<void> | void | any;
43
44
  export interface JsonUIFunctions {
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
- import * as react from 'react';
3
- import react__default, { ReactNode } from 'react';
4
- import { JsonUIComponentsType as JsonUIComponentsType$1, JsonUIFunctions as JsonUIFunctions$1, JsonUIFunctionType as JsonUIFunctionType$1 } from 'utils/types';
2
+ import * as React$1 from 'react';
3
+ import React__default, { ReactNode } from 'react';
4
+ import { JsonUIComponentsType as JsonUIComponentsType$1, JsonUIFunctions as JsonUIFunctions$1, JsonUIFunctionType as JsonUIFunctionType$1, JsonUIComponentType as JsonUIComponentType$1 } from 'utils/types';
5
5
  import Stock$1 from 'stock/Stock';
6
6
  import * as redux from 'redux';
7
7
 
@@ -11,7 +11,7 @@ interface NewStockType {
11
11
  }
12
12
  declare type InitType = (prop: NewStockType) => void;
13
13
  declare type RegisterFunctionType = (key: string, value: JsonUIFunctionType$1) => void;
14
- declare type RegisterComponentType = (key: string, value: ReactNode) => void;
14
+ declare type RegisterComponentType = (key: string, value: JsonUIComponentType$1) => void;
15
15
  declare type CallFunctionType = (name: string, attr?: any, props?: any, callerArgs?: any) => any;
16
16
  declare type GetComponentType = (componentName: string) => ReactNode;
17
17
  declare class Stock {
@@ -132,7 +132,7 @@ declare namespace constants_d {
132
132
  declare type UIDefinition = any;
133
133
  declare type Path = string;
134
134
  declare type ArraysType = any[];
135
- declare type WrapperType = react__default.ElementType;
135
+ declare type WrapperType = React__default.ElementType;
136
136
  declare type PropValue = PropsType | ArraysType | string | null | boolean | number | undefined | PathModifiersType;
137
137
  interface PathModifierType {
138
138
  path: string;
@@ -165,8 +165,9 @@ interface ReduxPath {
165
165
  type?: ReduxPathTypeEnum;
166
166
  jsonataDef?: string;
167
167
  }
168
+ declare type JsonUIComponentType = React__default.FC<any> | typeof React__default.Component | ((prop: any) => number | null | undefined | string);
168
169
  interface JsonUIComponentsType {
169
- [key: string]: ReactNode;
170
+ [key: string]: JsonUIComponentType;
170
171
  }
171
172
  declare type JsonUIFunctionType = (attr: any, props: any, callerArgs: any, stock: any) => Promise<void> | void | any;
172
173
  interface JsonUIFunctions {
@@ -320,8 +321,8 @@ declare class I18n {
320
321
  t: (key: any, options?: any, language?: string | null | undefined) => any;
321
322
  }
322
323
 
323
- declare const StockContext: react.Context<Stock$1 | null>;
324
- declare const PathModifierContext: react.Context<{}>;
324
+ declare const StockContext: React$1.Context<Stock$1 | null>;
325
+ declare const PathModifierContext: React$1.Context<{}>;
325
326
 
326
327
  declare const compSelectorHook: (currentPaths: PathModifiersType, subscriberPaths: ReduxPath[]) => (state: any) => any[] | undefined;
327
328
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jsonui/core",
3
- "version": "0.7.1",
3
+ "version": "0.7.3",
4
4
  "license": "MIT",
5
5
  "source": "src/index.ts",
6
6
  "main": "dist/cjs/index.js",
@@ -57,5 +57,5 @@
57
57
  "rollup-plugin-visualizer": "^5.5.4",
58
58
  "ts-jest": "^27.1.3"
59
59
  },
60
- "gitHead": "8b9b046e117f9ca14f3b9750fccad1be4de785a9"
60
+ "gitHead": "136965af95ea9c92991ad247d36d3941140f024f"
61
61
  }