@abgov/jsonforms-components 1.16.11 → 1.17.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/index.esm.js +1100 -1070
- package/package.json +1 -1
- package/src/index.d.ts +1 -0
- package/src/lib/Context/ContextProvider.d.ts +0 -5
- package/src/lib/Context/register/actions.d.ts +22 -0
- package/src/lib/Context/register/index.d.ts +3 -0
- package/src/lib/Context/register/reducer.d.ts +2 -0
- package/src/lib/Context/register/registerContext.d.ts +15 -0
- package/src/lib/Context/register/util.d.ts +2 -0
- package/src/lib/Controls/Inputs/InputEnum.d.ts +3 -3
- package/src/lib/Controls/Inputs/index.d.ts +0 -1
- package/src/lib/Controls/Inputs/InputEnumAutoComplete.d.ts +0 -10
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abgov/jsonforms-components",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.17.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "Government of Alberta - React renderers for JSON Forms based on the design system.",
|
|
6
6
|
"repository": "https://github.com/GovAlta/adsp-monorepo",
|
package/src/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { JsonFormsCellRendererRegistryEntry, JsonFormsRendererRegistryEntry } from '@jsonforms/core';
|
|
2
2
|
export * from './lib/Context';
|
|
3
3
|
export * from './lib/common';
|
|
4
|
+
export * from './lib/Context/register';
|
|
4
5
|
export declare const GoABaseRenderers: JsonFormsRendererRegistryEntry[];
|
|
5
6
|
export declare const GoARenderers: JsonFormsRendererRegistryEntry[];
|
|
6
7
|
export declare const GoACells: JsonFormsCellRendererRegistryEntry[];
|
|
@@ -8,8 +8,6 @@ export interface enumerators {
|
|
|
8
8
|
functions: Map<string, () => (file: File, propertyId: string) => void | undefined>;
|
|
9
9
|
submitFunction: Map<string, () => (id: string) => void | undefined>;
|
|
10
10
|
addFormContextData: (key: string, data: Record<string, unknown> | unknown[]) => void;
|
|
11
|
-
addDataByOptions: (key: string, url: string, location: string[] | string, type: string, values?: string[] | string) => string[];
|
|
12
|
-
addDataByUrl: (key: string, url: string, processDataFunction: (data: object) => string[], token?: string) => void;
|
|
13
11
|
getFormContextData: (key: string) => Record<string, any>;
|
|
14
12
|
getAllFormContextData: () => AllData;
|
|
15
13
|
isFormSubmitted: boolean;
|
|
@@ -40,8 +38,6 @@ export declare class ContextProviderClass {
|
|
|
40
38
|
functions: Map<string, () => ((file: File, propertyId: string) => void) | undefined>;
|
|
41
39
|
submitFunction: Map<string, () => ((data: any) => void) | undefined>;
|
|
42
40
|
addFormContextData: (key: string, data: Record<string, unknown> | unknown[]) => void;
|
|
43
|
-
addDataByOptions: (key: string, url: string, location: string[] | string, type: string, values?: string[] | string) => void;
|
|
44
|
-
addDataByUrl: (key: string, url: string, processDataFunction: (data: object) => string[], token?: string) => void;
|
|
45
41
|
getFormContextData: (key: string) => Record<string, any> | undefined;
|
|
46
42
|
getAllFormContextData: () => AllData;
|
|
47
43
|
isFormSubmitted?: boolean;
|
|
@@ -52,7 +48,6 @@ export declare class ContextProviderClass {
|
|
|
52
48
|
setup: (props: Props) => import("react/jsx-runtime").JSX.Element | null;
|
|
53
49
|
getContextProvider: () => import("react/jsx-runtime").JSX.Element;
|
|
54
50
|
getAxiosInterceptorConfig: (axios: AxiosStatic) => [number, AxiosStatic];
|
|
55
|
-
addDataByOptions: (key: string, url: string, location: string[] | string, type: string, values?: string[] | string) => void;
|
|
56
51
|
/**
|
|
57
52
|
* Grabs data stored under a given key
|
|
58
53
|
*
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Dispatch } from 'react';
|
|
2
|
+
export declare const ADD_REGISTER_DATA_ACTION = "jsonforms/register/data/add";
|
|
3
|
+
export interface RegisterConfig {
|
|
4
|
+
urn?: string;
|
|
5
|
+
url?: string;
|
|
6
|
+
name?: string;
|
|
7
|
+
env?: string;
|
|
8
|
+
token?: string;
|
|
9
|
+
responsePrefixPath?: string;
|
|
10
|
+
objectPathInArray?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface RegisterConfigData extends RegisterConfig {
|
|
13
|
+
data?: string[];
|
|
14
|
+
}
|
|
15
|
+
export type RegisterData = RegisterConfigData[];
|
|
16
|
+
type AddDataAction = {
|
|
17
|
+
type: string;
|
|
18
|
+
payload: RegisterConfigData;
|
|
19
|
+
};
|
|
20
|
+
export type RegisterActions = AddDataAction;
|
|
21
|
+
export type JsonFormRegisterDispatch = Dispatch<RegisterActions>;
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { RegisterConfig, RegisterData, JsonFormRegisterDispatch } from './actions';
|
|
3
|
+
interface JsonFormsRegisterContextProps {
|
|
4
|
+
registerDispatch: JsonFormRegisterDispatch;
|
|
5
|
+
fetchRegisterByUrl: (registerConfig: RegisterConfig) => Promise<void>;
|
|
6
|
+
selectRegisterDataByUrl: (url: string) => string[];
|
|
7
|
+
isProvided: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare const JsonFormsRegisterContext: import("react").Context<JsonFormsRegisterContextProps | undefined>;
|
|
10
|
+
interface JsonFormsRegisterProviderProps {
|
|
11
|
+
children: ReactNode;
|
|
12
|
+
defaultRegisters: RegisterConfig[] | RegisterData | undefined;
|
|
13
|
+
}
|
|
14
|
+
export declare const JsonFormRegisterProvider: ({ children, defaultRegisters, }: JsonFormsRegisterProviderProps) => JSX.Element | ReactNode;
|
|
15
|
+
export {};
|
|
@@ -4,9 +4,9 @@ import { TranslateProps } from '@jsonforms/react';
|
|
|
4
4
|
import { WithInputProps } from './type';
|
|
5
5
|
import { WithOptionLabel } from '../../util';
|
|
6
6
|
import { EnumCellProps, WithClassname } from '@jsonforms/core';
|
|
7
|
-
type
|
|
8
|
-
export declare const EnumSelect: (props:
|
|
9
|
-
export declare const
|
|
7
|
+
type EnumSelectProps = EnumCellProps & WithClassname & TranslateProps & WithInputProps & ControlProps;
|
|
8
|
+
export declare const EnumSelect: (props: EnumSelectProps) => JSX.Element;
|
|
9
|
+
export declare const enumControl: (props: ControlProps & OwnPropsOfEnum & WithOptionLabel & TranslateProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
export declare const GoAEnumControlTester: RankedTester;
|
|
11
11
|
export declare const GoAEnumControl: React.ComponentType<import("@jsonforms/core").OwnPropsOfControl & OwnPropsOfEnum>;
|
|
12
12
|
export {};
|
|
@@ -7,7 +7,6 @@ export * from './InputIntegerControl';
|
|
|
7
7
|
export * from './InputDateTimeControl';
|
|
8
8
|
export * from './InputTimeControl';
|
|
9
9
|
export * from './InputEnum';
|
|
10
|
-
export * from './InputEnumAutoComplete';
|
|
11
10
|
export * from './InputEnumRadios';
|
|
12
11
|
export * from './InputBooleanControl';
|
|
13
12
|
export * from './InputBooleanRadioControl';
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { OwnPropsOfEnum, RankedTester } from '@jsonforms/core';
|
|
3
|
-
import { TranslateProps } from '@jsonforms/react';
|
|
4
|
-
import { WithInputProps } from './type';
|
|
5
|
-
import { EnumCellProps, WithClassname } from '@jsonforms/core';
|
|
6
|
-
type EnumSelectAutoCompleteProp = EnumCellProps & WithClassname & TranslateProps & WithInputProps;
|
|
7
|
-
export declare const EnumSelectAutoComplete: (props: EnumSelectAutoCompleteProp) => JSX.Element;
|
|
8
|
-
export declare const GoAEnumControlAutoCompleteTester: RankedTester;
|
|
9
|
-
export declare const GoAEnumAutoCompleteControl: import("react").ComponentType<import("@jsonforms/core").OwnPropsOfControl & OwnPropsOfEnum>;
|
|
10
|
-
export {};
|