@open-tender/utils 0.1.13 → 0.1.14

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.
@@ -1,14 +1,7 @@
1
1
  /// <reference types="react" />
2
- import { Address, FieldType, RequestStatus } from '@open-tender/types';
3
- interface AddressFormField {
4
- label: string;
5
- name: string;
6
- type: string;
7
- required?: boolean;
8
- fieldType: FieldType;
9
- }
2
+ import { Address, FormFieldType, RequestStatus } from '@open-tender/types';
10
3
  export declare const useAddressForm: (address: Address, loading: RequestStatus, error: any, update: (addressId: number, updatedData: Address, callback: () => void) => void, callback: () => void) => {
11
- fields: AddressFormField[];
4
+ fields: FormFieldType[];
12
5
  data: Address;
13
6
  errors: any;
14
7
  submitting: boolean;
@@ -17,4 +10,3 @@ export declare const useAddressForm: (address: Address, loading: RequestStatus,
17
10
  submitRef: import("react").MutableRefObject<HTMLButtonElement | null>;
18
11
  inputRef: import("react").MutableRefObject<HTMLInputElement | null>;
19
12
  };
20
- export {};
@@ -17,7 +17,12 @@ const useAddressForm = (address, loading, error, update, callback) => {
17
17
  type: 'text',
18
18
  fieldType: 'Input'
19
19
  },
20
- { label: 'Contact Phone', name: 'phone', type: 'tel', fieldType: 'Input' },
20
+ {
21
+ label: 'Contact Phone',
22
+ name: 'phone',
23
+ type: 'tel',
24
+ fieldType: 'Input'
25
+ },
21
26
  {
22
27
  label: 'Description',
23
28
  name: 'description',
@@ -1,14 +1,7 @@
1
1
  /// <reference types="react" />
2
- import { Address, FieldType, RequestStatus } from '@open-tender/types';
3
- interface AddressFormField {
4
- label: string;
5
- name: string;
6
- type: string;
7
- required?: boolean;
8
- fieldType: FieldType;
9
- }
2
+ import { Address, FormFieldType, RequestStatus } from '@open-tender/types';
10
3
  export declare const useAddressForm: (address: Address, loading: RequestStatus, error: any, update: (addressId: number, updatedData: Address, callback: () => void) => void, callback: () => void) => {
11
- fields: AddressFormField[];
4
+ fields: FormFieldType[];
12
5
  data: Address;
13
6
  errors: any;
14
7
  submitting: boolean;
@@ -17,4 +10,3 @@ export declare const useAddressForm: (address: Address, loading: RequestStatus,
17
10
  submitRef: import("react").MutableRefObject<HTMLButtonElement | null>;
18
11
  inputRef: import("react").MutableRefObject<HTMLInputElement | null>;
19
12
  };
20
- export {};
@@ -14,7 +14,12 @@ export const useAddressForm = (address, loading, error, update, callback) => {
14
14
  type: 'text',
15
15
  fieldType: 'Input'
16
16
  },
17
- { label: 'Contact Phone', name: 'phone', type: 'tel', fieldType: 'Input' },
17
+ {
18
+ label: 'Contact Phone',
19
+ name: 'phone',
20
+ type: 'tel',
21
+ fieldType: 'Input'
22
+ },
18
23
  {
19
24
  label: 'Description',
20
25
  name: 'description',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-tender/utils",
3
- "version": "0.1.13",
3
+ "version": "0.1.14",
4
4
  "description": "A library of utils for use with Open Tender applications that utilize our cloud-based Order API.",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "module": "./dist/esm/index.js",