@abgov/jsonforms-components 1.24.12 → 1.25.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 +407 -653
- package/package.json +1 -1
- package/src/index.d.ts +2 -0
- package/src/lib/Additional/HelpContent.d.ts +1 -0
- package/src/lib/Controls/FileUploader/FileUploaderControl.d.ts +6 -1
- package/src/lib/Controls/Inputs/InputBaseControl.d.ts +1 -0
- package/src/lib/Controls/Inputs/InputBaseReviewControl.d.ts +7 -0
- package/src/lib/Controls/Inputs/index.d.ts +1 -0
- package/src/lib/Controls/ObjectArray/ObjectArray.d.ts +2 -0
- package/src/lib/Controls/ObjectArray/ObjectListControl.d.ts +7 -2
- package/src/lib/common/Ajv.d.ts +1 -1
- package/src/lib/layouts/HorizontalLayoutControl.d.ts +2 -0
- package/src/lib/util/layout.d.ts +2 -1
- package/src/lib/Controls/FormStepper/util/GenerateFormFields.d.ts +0 -11
- package/src/lib/Controls/FormStepper/util/RenderFormReviewFields.d.ts +0 -10
- package/src/lib/Controls/FormStepper/util/getRequiredFields.d.ts +0 -2
- package/src/lib/Controls/FormStepper/util/renderReviewControl.d.ts +0 -8
- package/src/lib/Controls/FormStepper/util/renderReviewLIstWithDetail.d.ts +0 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abgov/jsonforms-components",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.25.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
|
@@ -3,5 +3,7 @@ export * from './lib/Context';
|
|
|
3
3
|
export * from './lib/common';
|
|
4
4
|
export * from './lib/Context/register';
|
|
5
5
|
export declare const GoABaseRenderers: JsonFormsRendererRegistryEntry[];
|
|
6
|
+
export declare const GoABaseReviewRenderers: JsonFormsRendererRegistryEntry[];
|
|
7
|
+
export declare const GoAReviewRenderers: JsonFormsRendererRegistryEntry[];
|
|
6
8
|
export declare const GoARenderers: JsonFormsRendererRegistryEntry[];
|
|
7
9
|
export declare const GoACells: JsonFormsCellRendererRegistryEntry[];
|
|
@@ -23,4 +23,5 @@ export declare const HelpContentComponent: ({ isParent, ...props }: CustomContro
|
|
|
23
23
|
}) => JSX.Element;
|
|
24
24
|
export declare const HelpContentTester: RankedTester;
|
|
25
25
|
export declare const HelpContent: React.ComponentType<import("@jsonforms/core").OwnPropsOfControl>;
|
|
26
|
+
export declare const HelpReviewContent: React.ComponentType<import("@jsonforms/core").OwnPropsOfControl>;
|
|
26
27
|
export {};
|
|
@@ -1,3 +1,8 @@
|
|
|
1
1
|
import { WithClassname, ControlProps } from '@jsonforms/core';
|
|
2
|
-
|
|
2
|
+
interface FileUploadAdditionalProps {
|
|
3
|
+
isStepperReview?: boolean;
|
|
4
|
+
}
|
|
5
|
+
export type FileUploaderLayoutRendererProps = ControlProps & WithClassname & FileUploadAdditionalProps;
|
|
6
|
+
export declare const FileUploaderReview: (props: FileUploaderLayoutRendererProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
7
|
export declare const FileUploader: ({ data, path, handleChange, uischema, ...props }: FileUploaderLayoutRendererProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -3,5 +3,6 @@ export type GoAInputType = 'text' | 'password' | 'email' | 'number' | 'date' | '
|
|
|
3
3
|
export interface WithInput {
|
|
4
4
|
input: any;
|
|
5
5
|
noLabel?: boolean;
|
|
6
|
+
isStepperReview?: boolean;
|
|
6
7
|
}
|
|
7
8
|
export declare const GoAInputBaseControl: (props: ControlProps & WithInput) => JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { CellProps, WithClassname, ControlProps } from '@jsonforms/core';
|
|
3
|
+
import { WithInputProps } from './type';
|
|
4
|
+
export type WithBaseInputReviewProps = CellProps & WithClassname & WithInputProps;
|
|
5
|
+
export declare const GoABaseInputReviewComponent: (props: WithBaseInputReviewProps) => JSX.Element;
|
|
6
|
+
export declare const GoInputBaseReview: (props: ControlProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare const GoInputBaseReviewControl: import("react").ComponentType<import("@jsonforms/core").OwnPropsOfControl>;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ArrayLayoutProps, RankedTester } from '@jsonforms/core';
|
|
3
3
|
export declare const ArrayControl: (props: ArrayLayoutProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export declare const ArrayBaseReviewControl: (props: ArrayLayoutProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
5
|
export declare const GoAArrayControlTester: RankedTester;
|
|
5
6
|
export declare const GoAArrayControlRenderer: React.ComponentType<import("@jsonforms/core").OwnPropsOfControl>;
|
|
7
|
+
export declare const GoAArrayControlReviewRenderer: React.ComponentType<import("@jsonforms/core").OwnPropsOfControl>;
|
|
6
8
|
export declare const GoAListWithDetailsTester: RankedTester;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ArrayLayoutProps, ControlElement, JsonSchema, JsonFormsRendererRegistryEntry, JsonFormsCellRendererRegistryEntry, ArrayTranslations, Layout } from '@jsonforms/core';
|
|
3
3
|
import { WithDeleteDialogSupport } from './DeleteDialog';
|
|
4
|
-
|
|
4
|
+
interface ArrayLayoutExtProps {
|
|
5
|
+
isStepperReview?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export type ObjectArrayControlProps = ArrayLayoutProps & WithDeleteDialogSupport & ArrayLayoutExtProps;
|
|
5
8
|
export interface EmptyListProps {
|
|
6
9
|
numColumns: number;
|
|
7
10
|
translations: ArrayTranslations;
|
|
@@ -17,6 +20,7 @@ interface NonEmptyRowComponentProps {
|
|
|
17
20
|
cells?: JsonFormsCellRendererRegistryEntry[];
|
|
18
21
|
isValid: boolean;
|
|
19
22
|
uischema?: ControlElement | Layout;
|
|
23
|
+
isInReview?: boolean;
|
|
20
24
|
}
|
|
21
25
|
export declare const NonEmptyCellComponent: React.NamedExoticComponent<NonEmptyRowComponentProps>;
|
|
22
26
|
interface NonEmptyRowProps {
|
|
@@ -29,8 +33,9 @@ interface NonEmptyRowProps {
|
|
|
29
33
|
path: string;
|
|
30
34
|
translations: ArrayTranslations;
|
|
31
35
|
uischema: ControlElement;
|
|
36
|
+
isInReview?: boolean;
|
|
32
37
|
}
|
|
33
|
-
export declare const NonEmptyList: React.MemoExoticComponent<({ childPath, schema, rowIndex, openDeleteDialog, enabled, cells, path, translations, uischema, }: NonEmptyRowProps & WithDeleteDialogSupport) => import("react/jsx-runtime").JSX.Element>;
|
|
38
|
+
export declare const NonEmptyList: React.MemoExoticComponent<({ childPath, schema, rowIndex, openDeleteDialog, enabled, cells, path, translations, uischema, isInReview, }: NonEmptyRowProps & WithDeleteDialogSupport) => import("react/jsx-runtime").JSX.Element>;
|
|
34
39
|
export declare class ObjectArrayControl extends React.Component<ObjectArrayControlProps, any> {
|
|
35
40
|
addItem: (path: string, value: any) => () => void;
|
|
36
41
|
render(): import("react/jsx-runtime").JSX.Element;
|
package/src/lib/common/Ajv.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import Ajv from 'ajv';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const createDefaultAjv: () => Ajv;
|
|
@@ -2,4 +2,6 @@ import React from 'react';
|
|
|
2
2
|
import { LayoutProps, RankedTester } from '@jsonforms/core';
|
|
3
3
|
export declare const GoAHorizontalLayoutTester: RankedTester;
|
|
4
4
|
export declare const GoAHorizontalLayoutComponent: ({ uischema, renderers, cells, schema, path, enabled, visible, }: LayoutProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export declare const GoAHorizontalReviewLayoutComponent: ({ uischema, renderers, cells, schema, path, enabled, visible, }: LayoutProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
6
|
export declare const GoAHorizontalLayout: React.ComponentType<LayoutProps & import("@jsonforms/core").OwnPropsOfLayout>;
|
|
7
|
+
export declare const GoAHorizontalReviewLayout: React.ComponentType<LayoutProps & import("@jsonforms/core").OwnPropsOfLayout>;
|
package/src/lib/util/layout.d.ts
CHANGED
|
@@ -7,9 +7,10 @@ export declare const renderLayoutElements: (elements: UISchemaElement[], schema?
|
|
|
7
7
|
export interface LayoutRendererProps extends OwnPropsOfRenderer {
|
|
8
8
|
elements: UISchemaElement[];
|
|
9
9
|
direction: 'row' | 'column';
|
|
10
|
+
width?: string;
|
|
10
11
|
}
|
|
11
12
|
export interface AjvProps {
|
|
12
13
|
ajv: Ajv;
|
|
13
14
|
}
|
|
14
15
|
export declare const withAjvProps: <P extends object>(Component: ComponentType<AjvProps & P>) => (props: P) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
-
export declare const LayoutRenderer: ({ elements, schema, path, enabled, direction, renderers, cells, visible, }: LayoutRendererProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
16
|
+
export declare const LayoutRenderer: ({ elements, schema, path, enabled, direction, renderers, cells, visible, width, }: LayoutRendererProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { JsonSchema, LabelDescription } from '@jsonforms/core';
|
|
2
|
-
type jsonformsLabel = string | boolean | LabelDescription | undefined;
|
|
3
|
-
export declare const labelToString: (label: jsonformsLabel, scope: string) => string;
|
|
4
|
-
export declare const resolveLabelFromScope: (scope: string) => string;
|
|
5
|
-
export interface InputValue {
|
|
6
|
-
type: 'primitive' | 'object' | 'array';
|
|
7
|
-
value?: string | NestedStringArray;
|
|
8
|
-
}
|
|
9
|
-
export type NestedStringArray = (string | undefined | NestedStringArray)[];
|
|
10
|
-
export declare const getFormFieldValue: (schema: JsonSchema, scope: string, data: unknown) => InputValue;
|
|
11
|
-
export {};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Categorization, Category, JsonSchema, UISchemaElement } from '@jsonforms/core';
|
|
3
|
-
interface RenderFormReviewFieldsProps {
|
|
4
|
-
elements: UISchemaElement[] | (Category | Categorization)[];
|
|
5
|
-
data: any;
|
|
6
|
-
requiredFields: string[];
|
|
7
|
-
schema: JsonSchema;
|
|
8
|
-
}
|
|
9
|
-
export declare const RenderFormReviewFields: React.FC<RenderFormReviewFieldsProps>;
|
|
10
|
-
export {};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { ControlElement, JsonSchema } from '@jsonforms/core';
|
|
2
|
-
import { NestedStringArray } from './GenerateFormFields';
|
|
3
|
-
export interface FileElement extends File {
|
|
4
|
-
filename: string;
|
|
5
|
-
propertyId: string;
|
|
6
|
-
}
|
|
7
|
-
export declare const renderReviewControl: (schema: JsonSchema, data: unknown, element: ControlElement, requiredFields: string[], index: number, fileList: Record<string, any>, downloadFile: (file: File, propertyId: string) => void) => JSX.Element | null;
|
|
8
|
-
export declare const renderList: (items: NestedStringArray) => JSX.Element;
|