@abgov/jsonforms-components 1.33.2 → 1.34.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abgov/jsonforms-components",
3
- "version": "1.33.2",
3
+ "version": "1.34.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",
@@ -11,6 +11,7 @@ export interface enumerators {
11
11
  getFormContextData: (key: string) => Record<string, any>;
12
12
  getAllFormContextData: () => AllData;
13
13
  isFormSubmitted: boolean;
14
+ formUrl: string;
14
15
  }
15
16
  interface FileManagement {
16
17
  fileList?: any;
@@ -27,6 +28,7 @@ type Props = {
27
28
  submit?: SubmitManagement;
28
29
  isFormSubmitted?: boolean;
29
30
  data?: any;
31
+ formUrl?: string | null | undefined;
30
32
  };
31
33
  export declare class ContextProviderClass {
32
34
  selfProps: Props | undefined;
@@ -41,12 +43,14 @@ export declare class ContextProviderClass {
41
43
  getFormContextData: (key: string) => Record<string, any> | undefined;
42
44
  getAllFormContextData: () => AllData;
43
45
  isFormSubmitted?: boolean;
46
+ formUrl: string | null | undefined;
44
47
  };
45
48
  addFormContextData: (key: string, data: Record<string, unknown> | unknown[]) => void;
46
49
  addDataByUrl(key: string, url: string, processDataFunction: (data: object) => string[], token?: string): Promise<void>;
47
50
  constructor();
48
51
  setup: (props: Props) => import("react/jsx-runtime").JSX.Element | null;
49
52
  getContextProvider: () => import("react/jsx-runtime").JSX.Element;
53
+ getFormUrl: () => string | null | undefined;
50
54
  getAxiosInterceptorConfig: (axios: AxiosStatic) => [number, AxiosStatic];
51
55
  /**
52
56
  * Grabs data stored under a given key
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import { Address } from './types';
3
+ interface AddressInputsProps {
4
+ address: Address;
5
+ handleInputChange: (field: string, value: string) => void;
6
+ isAlbertaAddress?: boolean;
7
+ }
8
+ export declare const AddressInputs: React.FC<AddressInputsProps>;
9
+ export {};
@@ -0,0 +1,4 @@
1
+ import { ControlProps } from '@jsonforms/core';
2
+ type AddressLookUpProps = ControlProps;
3
+ export declare const AddressLookUpControl: (props: AddressLookUpProps) => JSX.Element;
4
+ export {};
@@ -0,0 +1,2 @@
1
+ import { RankedTester } from '@jsonforms/core';
2
+ export declare const AddressLookUpTester: RankedTester;
@@ -0,0 +1,2 @@
1
+ export * from './AddressLookUpControl';
2
+ export * from './AddressLookupTester';
@@ -0,0 +1 @@
1
+ export declare const AddressSearch: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -0,0 +1,16 @@
1
+ export interface Address {
2
+ addressLine1: string;
3
+ addressLine2: string;
4
+ city: string;
5
+ province: string;
6
+ postalCode: string;
7
+ country: string;
8
+ }
9
+ export interface Suggestion {
10
+ Id: string;
11
+ Text: string;
12
+ Highlight: string;
13
+ Cursor: number;
14
+ Description: string;
15
+ Next: string;
16
+ }
@@ -0,0 +1,4 @@
1
+ import { Address, Suggestion } from './types';
2
+ export declare const fetchAddressSuggestions: (formUrl: string, searchTerm: string, isAlbertaAddress?: boolean) => Promise<Suggestion[]>;
3
+ export declare const filterAlbertaAddresses: (suggestions: Suggestion[]) => Suggestion[];
4
+ export declare const mapSuggestionToAddress: (suggestion: Suggestion) => Address;
@@ -2,3 +2,4 @@ export * from './Inputs';
2
2
  export * from './FormStepper';
3
3
  export * from './FileUploader';
4
4
  export * from './ObjectArray';
5
+ export * from './AddressLookup';