@abgov/jsonforms-components 1.1.0 → 1.2.1
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 +336 -225
- package/package.json +4 -1
- package/src/lib/Controls/FormStepper/FormStepperControl.d.ts +5 -1
- package/src/lib/Controls/FormStepper/styled-components.d.ts +4 -0
- package/src/lib/Controls/Inputs/InputDateTimeControl.d.ts +1 -2
- package/src/lib/Controls/Inputs/InputIntegerControl.d.ts +1 -2
- package/src/lib/Controls/Inputs/InputNumberControl.d.ts +1 -2
- package/src/lib/Controls/Inputs/InputTextControl.d.ts +1 -2
- package/src/lib/Controls/Inputs/InputTimeControl.d.ts +1 -2
- package/src/lib/util/inputControlUtils.d.ts +13 -0
- package/src/lib/util/stringUtils.d.ts +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abgov/jsonforms-components",
|
|
3
|
-
"version": "1.1
|
|
3
|
+
"version": "1.2.1",
|
|
4
|
+
"license": "Apache-2.0",
|
|
5
|
+
"description": "Government of Alberta - React renderers for JSON Forms based on the design system.",
|
|
6
|
+
"repository": "https://github.com/GovAlta/adsp-monorepo",
|
|
4
7
|
"peerDependencies": {
|
|
5
8
|
"@abgov/react-components": "^4.18.1",
|
|
6
9
|
"@jsonforms/core": "^3.1.0",
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { StatePropsOfLayout } from '@jsonforms/core';
|
|
2
|
+
import { Categorization, UISchemaElement, Category, StatePropsOfLayout } from '@jsonforms/core';
|
|
3
3
|
import { TranslateProps } from '@jsonforms/react';
|
|
4
4
|
import { AjvProps } from '@jsonforms/material-renderers';
|
|
5
5
|
export interface CategorizationStepperLayoutRendererProps extends StatePropsOfLayout, AjvProps, TranslateProps {
|
|
6
6
|
data: any;
|
|
7
7
|
}
|
|
8
|
+
export declare const resolveLabelFromScope: (scope: string) => string | null;
|
|
9
|
+
export declare const getFormFieldValue: (scope: string, data: object) => any;
|
|
10
|
+
export declare const renderFormFields: (elements: UISchemaElement[] | (Category | Categorization)[], data: object) => (import("react/jsx-runtime").JSX.Element | null)[];
|
|
8
11
|
export declare const FormStepper: ({ uischema, data, schema, ajv, path, cells, renderers, config, visible, enabled, t, }: CategorizationStepperLayoutRendererProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
12
|
export declare const flattenObject: (obj: Record<string, string>) => Record<string, string>;
|
|
10
13
|
export declare const FormStepperControl: (props: CategorizationStepperLayoutRendererProps & import("@jsonforms/core").OwnPropsOfLayout) => React.JSX.Element;
|
|
14
|
+
export default FormStepper;
|
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
export declare const ReviewItem: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
2
|
+
export declare const ReviewItemSection: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
3
|
+
export declare const ReviewItemHeader: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
4
|
+
export declare const ReviewItemTitle: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
5
|
+
export declare const Anchor: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
2
6
|
export declare const ReviewListItem: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
3
7
|
export declare const ReviewListWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { CellProps, WithClassname, ControlProps, RankedTester } from '@jsonforms/core';
|
|
3
3
|
import { WithInputProps } from './type';
|
|
4
|
-
type GoAInputDateTimeProps = CellProps & WithClassname & WithInputProps;
|
|
4
|
+
export type GoAInputDateTimeProps = CellProps & WithClassname & WithInputProps;
|
|
5
5
|
export declare const GoADateTimeInput: (props: GoAInputDateTimeProps) => JSX.Element;
|
|
6
6
|
export declare const GoADateTimeControl: (props: ControlProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
export declare const GoADateTimeControlTester: RankedTester;
|
|
8
8
|
export declare const GoAInputDateTimeControl: React.ComponentType<import("@jsonforms/core").OwnPropsOfControl>;
|
|
9
|
-
export {};
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { CellProps, WithClassname, ControlProps, RankedTester } from '@jsonforms/core';
|
|
3
3
|
import { WithInputProps } from './type';
|
|
4
|
-
type GoAInputIntegerProps = CellProps & WithClassname & WithInputProps;
|
|
4
|
+
export type GoAInputIntegerProps = CellProps & WithClassname & WithInputProps;
|
|
5
5
|
export declare const GoAInputInteger: (props: GoAInputIntegerProps) => JSX.Element;
|
|
6
6
|
export declare const GoAIntegerControl: (props: ControlProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
export declare const GoAIntegerControlTester: RankedTester;
|
|
8
8
|
export declare const GoAInputIntegerControl: React.ComponentType<import("@jsonforms/core").OwnPropsOfControl>;
|
|
9
|
-
export {};
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { CellProps, WithClassname, ControlProps, RankedTester } from '@jsonforms/core';
|
|
3
3
|
import { WithInputProps } from './type';
|
|
4
|
-
type GoAInputNumberProps = CellProps & WithClassname & WithInputProps;
|
|
4
|
+
export type GoAInputNumberProps = CellProps & WithClassname & WithInputProps;
|
|
5
5
|
export declare const GoANumberInput: (props: GoAInputNumberProps) => JSX.Element;
|
|
6
6
|
export declare const GoANumberControl: (props: ControlProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
export declare const GoANumberControlTester: RankedTester;
|
|
8
8
|
export declare const GoAInputNumberControl: React.ComponentType<import("@jsonforms/core").OwnPropsOfControl>;
|
|
9
|
-
export {};
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { CellProps, WithClassname, ControlProps, RankedTester } from '@jsonforms/core';
|
|
3
3
|
import { WithInputProps } from './type';
|
|
4
|
-
type GoAInputTextProps = CellProps & WithClassname & WithInputProps;
|
|
4
|
+
export type GoAInputTextProps = CellProps & WithClassname & WithInputProps;
|
|
5
5
|
export declare const GoAInputText: (props: GoAInputTextProps) => JSX.Element;
|
|
6
6
|
export declare const GoATextControl: (props: ControlProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
export declare const GoATextControlTester: RankedTester;
|
|
8
8
|
export declare const GoAInputTextControl: React.ComponentType<import("@jsonforms/core").OwnPropsOfControl>;
|
|
9
|
-
export {};
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { CellProps, WithClassname, ControlProps, RankedTester } from '@jsonforms/core';
|
|
3
3
|
import { WithInputProps } from './type';
|
|
4
|
-
type GoAInputTimeProps = CellProps & WithClassname & WithInputProps;
|
|
4
|
+
export type GoAInputTimeProps = CellProps & WithClassname & WithInputProps;
|
|
5
5
|
export declare const GoATimeInput: (props: GoAInputTimeProps) => JSX.Element;
|
|
6
6
|
export declare const GoATimeControl: (props: ControlProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
export declare const GoATimeControlTester: RankedTester;
|
|
8
8
|
export declare const GoAInputTimeControl: React.ComponentType<import("@jsonforms/core").OwnPropsOfControl>;
|
|
9
|
-
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ControlProps } from '@jsonforms/core';
|
|
2
|
+
/**
|
|
3
|
+
* Checks input controls data value to determine is required and has any data.
|
|
4
|
+
* @param props - The JsonForm control props
|
|
5
|
+
* @returns true if there is no data and is a required field
|
|
6
|
+
*/
|
|
7
|
+
export declare const isRequiredAndHasNoData: (props: ControlProps) => boolean | undefined;
|
|
8
|
+
/**
|
|
9
|
+
* Checks the key press value to determine if the key press is a 'Shift' or 'Tab'.
|
|
10
|
+
* @param key - The key press value
|
|
11
|
+
* @returns true if the key pressed is not a shift or tab key being pressed, otherwise false
|
|
12
|
+
*/
|
|
13
|
+
export declare const isNotKeyPressTabOrShift: (key: string) => boolean;
|
|
@@ -19,7 +19,6 @@ export declare const controlScopeMatchesLabel: (scope: string, label: string) =>
|
|
|
19
19
|
* @returns
|
|
20
20
|
*/
|
|
21
21
|
export declare const getLabelText: (scope: string, label: string) => string;
|
|
22
|
-
export declare const FIELD_REQUIRED = "data should pass \"isNotEmpty\" keyword validation";
|
|
23
22
|
/**
|
|
24
23
|
* Check if a required, defined input value is valid. Returns an appropriate
|
|
25
24
|
* error message if not.
|