@comms-id/abn-react 0.2.2 → 1.0.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/README.md +3 -3
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @comms-id/abn-react
|
|
2
2
|
|
|
3
|
-
A React hook and a finished component for Comms.ID ABN search. The user types a business name, or an ABN or ACN. Accessible, no layout shift, with the data attribution always shown. React 18 or later; it depends on `@comms-id/abn` and nothing else.
|
|
3
|
+
A React hook and a finished component for Comms.ID ABN search. The user types a business name, or an ABN or ASIC number (ACN, ARBN). Accessible, no layout shift, with the data attribution always shown. React 18 or later; it depends on `@comms-id/abn` and nothing else.
|
|
4
4
|
|
|
5
5
|
```tsx
|
|
6
6
|
import { createAbnBrowserClient } from "@comms-id/abn/browser";
|
|
@@ -22,10 +22,10 @@ export const Supplier = () => (
|
|
|
22
22
|
## What the field does
|
|
23
23
|
|
|
24
24
|
- **A name:** after the user pauses, it suggests businesses (name, ABN, state and postcode). Choosing one looks it up and calls `onSelect`.
|
|
25
|
-
- **An ABN or ACN:** a whole number (9 or 11 digits, spaces and hyphens allowed) is checked in the browser first. An invalid number sends nothing, and the field says why ("This is not a valid ABN: the check digits do not match."). A valid number is looked up.
|
|
25
|
+
- **An ABN or ASIC number (ACN, ARBN):** a whole number (9 or 11 digits, spaces and hyphens allowed) is checked in the browser first. An invalid number sends nothing, and the field says why ("This is not a valid ABN: the check digits do not match."). A valid number is looked up.
|
|
26
26
|
- **No match is not an outage.** "No business found." and "Business search is unavailable" are different messages; an outage offers "Try again".
|
|
27
27
|
|
|
28
|
-
`onSelect(business, timing)` gets one `AbnBusiness` whichever source answered the lookup: `abn`, `formattedAbn`, `
|
|
28
|
+
`onSelect(business, timing)` gets one `AbnBusiness` whichever source answered the lookup: `abn`, `formattedAbn`, `asicNumber` with `asicNumberType` (`ACN`, `ARBN`, `ARSN` or `undetermined`: ABR never states the kind; v2, #714), `name`, `status`, `entityType`, `gstRegistered`, `state`, `postcode`, `source` (`live` or `snapshot`), `asAt` and `attribution`.
|
|
29
29
|
|
|
30
30
|
## Your own markup: `useAbn`
|
|
31
31
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@comms-id/abn-react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "React hook and component for Comms.ID ABN search: a name or an ABN or ACN, accessible, no layout shift, with the data attribution",
|
|
5
5
|
"homepage": "https://comms.id",
|
|
6
6
|
"bugs": {
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"registry": "https://registry.npmjs.org"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@comms-id/abn": "0.
|
|
36
|
+
"@comms-id/abn": "1.0.0"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
39
|
"react": ">=18"
|