@abgov/jsonforms-components 1.35.3 → 1.35.4
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 +841 -566
- package/package.json +1 -1
- package/src/lib/Controls/AddressLookup/AddressInputs.d.ts +1 -0
- package/src/lib/Controls/AddressLookup/types.d.ts +3 -3
- package/src/lib/Controls/AddressLookup/utils.d.ts +1 -0
- package/src/lib/Controls/ObjectArray/DeleteDialog.d.ts +3 -0
- package/src/lib/Controls/ObjectArray/ObjectArray.d.ts +5 -3
- package/src/lib/Controls/ObjectArray/ObjectListControl.d.ts +16 -9
- package/src/lib/Controls/ObjectArray/arrayData/actions.d.ts +59 -0
- package/src/lib/Controls/ObjectArray/arrayData/index.d.ts +2 -0
- package/src/lib/Controls/ObjectArray/arrayData/reducer.d.ts +4 -0
- package/src/lib/Controls/ObjectArray/styled-components.d.ts +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abgov/jsonforms-components",
|
|
3
|
-
"version": "1.35.
|
|
3
|
+
"version": "1.35.4",
|
|
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",
|
|
@@ -7,3 +7,4 @@ export declare const validatePostalCode: (values: string) => boolean;
|
|
|
7
7
|
export declare const handlePostalCodeValidation: (validatePc: boolean, message: string, value: string, errors: Record<string, string>) => {
|
|
8
8
|
[x: string]: string;
|
|
9
9
|
};
|
|
10
|
+
export declare const formatPostalCode: (value: string) => string;
|
|
@@ -9,4 +9,7 @@ export interface DeleteDialogProps {
|
|
|
9
9
|
export interface WithDeleteDialogSupport {
|
|
10
10
|
openDeleteDialog(path: string, data: number, name?: string): void;
|
|
11
11
|
}
|
|
12
|
+
export interface WithBasicDeleteDialogSupport {
|
|
13
|
+
openDeleteDialog(data: number, name?: string): void;
|
|
14
|
+
}
|
|
12
15
|
export declare const DeleteDialog: React.NamedExoticComponent<DeleteDialogProps>;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { ArrayLayoutProps, RankedTester } from '@jsonforms/core';
|
|
3
|
-
export
|
|
4
|
-
export declare const
|
|
2
|
+
import { ArrayLayoutProps, RankedTester, ControlProps } from '@jsonforms/core';
|
|
3
|
+
export type CombinedProps = ControlProps & ArrayLayoutProps;
|
|
4
|
+
export declare const ArrayControl: (props: CombinedProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
export declare const GoAArrayControlTester: RankedTester;
|
|
6
|
+
export declare const ArrayControlBase: (props: ControlProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare const ArrayControlReview: (props: ControlProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
8
|
export declare const GoAArrayControlRenderer: React.ComponentType<import("@jsonforms/core").OwnPropsOfControl>;
|
|
7
9
|
export declare const GoAArrayControlReviewRenderer: React.ComponentType<import("@jsonforms/core").OwnPropsOfControl>;
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { ArrayLayoutProps, ControlElement, JsonSchema, JsonFormsRendererRegistryEntry, JsonFormsCellRendererRegistryEntry, ArrayTranslations, Layout } from '@jsonforms/core';
|
|
3
|
-
import {
|
|
2
|
+
import { ArrayLayoutProps, ControlElement, JsonSchema, JsonFormsRendererRegistryEntry, JsonFormsCellRendererRegistryEntry, ArrayTranslations, Layout, ControlProps } from '@jsonforms/core';
|
|
3
|
+
import { WithBasicDeleteDialogSupport } from './DeleteDialog';
|
|
4
|
+
import { StateData } from './arrayData';
|
|
4
5
|
interface ArrayLayoutExtProps {
|
|
5
6
|
isStepperReview?: boolean;
|
|
6
7
|
}
|
|
7
|
-
|
|
8
|
+
interface HandleChangeProps {
|
|
9
|
+
handleChange(path: string, value: any): void;
|
|
10
|
+
}
|
|
11
|
+
export type ObjectArrayControlProps = ArrayLayoutProps & ArrayLayoutExtProps & ControlProps;
|
|
8
12
|
export interface EmptyListProps {
|
|
9
13
|
numColumns: number;
|
|
10
14
|
translations: ArrayTranslations;
|
|
@@ -21,8 +25,12 @@ interface NonEmptyRowComponentProps {
|
|
|
21
25
|
isValid: boolean;
|
|
22
26
|
uischema?: ControlElement | Layout;
|
|
23
27
|
isInReview?: boolean;
|
|
28
|
+
count?: number;
|
|
29
|
+
data: StateData | undefined;
|
|
30
|
+
handleChange(path: string, value: string): void;
|
|
31
|
+
openDeleteDialog(rowIndex: number): void;
|
|
24
32
|
}
|
|
25
|
-
export declare const NonEmptyCellComponent: React.NamedExoticComponent<NonEmptyRowComponentProps>;
|
|
33
|
+
export declare const NonEmptyCellComponent: React.NamedExoticComponent<NonEmptyRowComponentProps & HandleChangeProps>;
|
|
26
34
|
interface NonEmptyRowProps {
|
|
27
35
|
childPath: string;
|
|
28
36
|
schema: JsonSchema;
|
|
@@ -34,10 +42,9 @@ interface NonEmptyRowProps {
|
|
|
34
42
|
translations: ArrayTranslations;
|
|
35
43
|
uischema: ControlElement;
|
|
36
44
|
isInReview?: boolean;
|
|
45
|
+
data?: StateData;
|
|
46
|
+
count: number;
|
|
37
47
|
}
|
|
38
|
-
export declare const NonEmptyList: React.MemoExoticComponent<({ childPath, schema,
|
|
39
|
-
export declare
|
|
40
|
-
addItem: (path: string, value: any) => () => void;
|
|
41
|
-
render(): import("react/jsx-runtime").JSX.Element;
|
|
42
|
-
}
|
|
48
|
+
export declare const NonEmptyList: React.MemoExoticComponent<({ childPath, schema, openDeleteDialog, enabled, cells, uischema, isInReview, data, count, handleChange, }: NonEmptyRowProps & WithBasicDeleteDialogSupport & HandleChangeProps) => import("react/jsx-runtime").JSX.Element>;
|
|
49
|
+
export declare const ObjectArrayControl: (props: ObjectArrayControlProps) => JSX.Element;
|
|
43
50
|
export {};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { Dispatch } from 'react';
|
|
2
|
+
export declare const ADD_DATA_ACTION = "jsonforms/register/add_data_action";
|
|
3
|
+
export declare const SET_DATA_ACTION = "jsonforms/register/set_data_action";
|
|
4
|
+
export declare const INCREMENT_ACTION = "jsonforms/register/increment_action";
|
|
5
|
+
export declare const DELETE_ACTION = "jsonforms/register/delete_action";
|
|
6
|
+
export interface Categories {
|
|
7
|
+
[category: string]: Category;
|
|
8
|
+
}
|
|
9
|
+
interface Category {
|
|
10
|
+
count: number;
|
|
11
|
+
data: StateData;
|
|
12
|
+
}
|
|
13
|
+
interface Value {
|
|
14
|
+
[key: string]: string;
|
|
15
|
+
}
|
|
16
|
+
interface NumObject {
|
|
17
|
+
[name: string]: Value;
|
|
18
|
+
}
|
|
19
|
+
export interface StateData {
|
|
20
|
+
[num: string]: NumObject;
|
|
21
|
+
}
|
|
22
|
+
export interface ObjectArrayData {
|
|
23
|
+
categories: Categories;
|
|
24
|
+
}
|
|
25
|
+
export interface AddData {
|
|
26
|
+
name: string;
|
|
27
|
+
category: StateData;
|
|
28
|
+
}
|
|
29
|
+
export interface RemoveData {
|
|
30
|
+
name: string;
|
|
31
|
+
category: Category;
|
|
32
|
+
}
|
|
33
|
+
export interface DeleteData {
|
|
34
|
+
path: string;
|
|
35
|
+
value: number;
|
|
36
|
+
}
|
|
37
|
+
export type RegisterDataResponse = {
|
|
38
|
+
categories: Categories;
|
|
39
|
+
};
|
|
40
|
+
type AddDataAction = {
|
|
41
|
+
type: string;
|
|
42
|
+
payload: AddData;
|
|
43
|
+
};
|
|
44
|
+
type SetDataAction = {
|
|
45
|
+
type: string;
|
|
46
|
+
payload: Categories;
|
|
47
|
+
};
|
|
48
|
+
type IncrementAction = {
|
|
49
|
+
type: string;
|
|
50
|
+
payload: string;
|
|
51
|
+
};
|
|
52
|
+
type DeleteAction = {
|
|
53
|
+
type: string;
|
|
54
|
+
payload: RemoveData;
|
|
55
|
+
};
|
|
56
|
+
export type ObjectArrayActions = AddDataAction | IncrementAction | DeleteAction | SetDataAction;
|
|
57
|
+
export type ArrayDataDispatch = Dispatch<ObjectArrayActions>;
|
|
58
|
+
export declare const initialState: ObjectArrayData;
|
|
59
|
+
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export declare const DeleteDialogContent: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
2
|
+
export declare const NonEmptyCellStyle: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
2
3
|
export declare const ToolBarHeader: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
3
4
|
export declare const ObjectArrayTitle: import("styled-components").StyledComponent<"h2", any, {}, never>;
|
|
4
5
|
export declare const TextCenter: import("styled-components").StyledComponent<"div", any, {}, never>;
|