shelving 1.191.2 → 1.192.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,5 +1,7 @@
|
|
|
1
|
-
import { type AddressData } from "../util/geo.js";
|
|
1
|
+
import { type AddressData, formatAddress } from "../util/geo.js";
|
|
2
2
|
import { DataSchema, type DataSchemaOptions } from "./DataSchema.js";
|
|
3
|
+
export type { AddressData };
|
|
4
|
+
export { formatAddress };
|
|
3
5
|
/** Allowed options for `AddressSchema` */
|
|
4
6
|
export interface AddressSchemaOptions extends Omit<DataSchemaOptions<AddressData>, "props"> {
|
|
5
7
|
}
|
package/schema/AddressSchema.js
CHANGED
|
@@ -3,11 +3,12 @@ import { COUNTRY } from "./CountrySchema.js";
|
|
|
3
3
|
import { DataSchema } from "./DataSchema.js";
|
|
4
4
|
import { NULLABLE } from "./NullableSchema.js";
|
|
5
5
|
import { StringSchema } from "./StringSchema.js";
|
|
6
|
+
export { formatAddress };
|
|
6
7
|
const ADDRESS_PROPS = {
|
|
7
8
|
address1: new StringSchema({ title: "Address 1", max: 60, min: 1 }),
|
|
8
9
|
address2: new StringSchema({ title: "Address 2", max: 60, min: 0 }),
|
|
9
10
|
city: new StringSchema({ title: "City", min: 1, max: 60 }),
|
|
10
|
-
state: new StringSchema({ title: "State", min:
|
|
11
|
+
state: new StringSchema({ title: "State", min: 0, max: 60 }),
|
|
11
12
|
postcode: new StringSchema({ title: "Postcode", min: 1, max: 12, case: "upper" }),
|
|
12
13
|
country: COUNTRY,
|
|
13
14
|
};
|