@uxf/smart-address 10.8.1 → 11.32.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 +1 -1
- package/v1/create-address-loader.d.ts +1 -1
- package/v1/create-zip-loader.d.ts +1 -1
- package/v1/index.d.ts +12 -12
- package/v1/types.d.ts +22 -22
- package/v1/v1.stories.js +4 -5
package/package.json
CHANGED
|
@@ -5,5 +5,5 @@ type Params = {
|
|
|
5
5
|
zip?: number;
|
|
6
6
|
getLabel?: (address: Location) => string;
|
|
7
7
|
};
|
|
8
|
-
export declare const createAddressLoader: (params: Params) => (term: string) => Promise<Option[]
|
|
8
|
+
export declare const createAddressLoader: (params: Params) => ((term: string) => Promise<Option[]>);
|
|
9
9
|
export {};
|
|
@@ -2,5 +2,5 @@ import { Location, Option } from "./types";
|
|
|
2
2
|
type Params = {
|
|
3
3
|
getLabel?: (address: Location) => string;
|
|
4
4
|
};
|
|
5
|
-
export declare const createZipLoader: (params: Params) => (term: string) => Promise<Option[]
|
|
5
|
+
export declare const createZipLoader: (params: Params) => ((term: string) => Promise<Option[]>);
|
|
6
6
|
export {};
|
package/v1/index.d.ts
CHANGED
|
@@ -2,13 +2,13 @@ export type { BuildingType, BuildingUsageType, ConstructionType, ElevatorType, G
|
|
|
2
2
|
export declare const SmartAddress: {
|
|
3
3
|
createAddressLoader: (params: {
|
|
4
4
|
level: number;
|
|
5
|
-
limit?: number
|
|
6
|
-
zip?: number
|
|
7
|
-
getLabel?: (
|
|
8
|
-
}) => (term: string) => Promise<import("./types").Option[]
|
|
5
|
+
limit?: number;
|
|
6
|
+
zip?: number;
|
|
7
|
+
getLabel?: (address: import("./types").Location) => string;
|
|
8
|
+
}) => ((term: string) => Promise<import("./types").Option[]>);
|
|
9
9
|
createZipLoader: (params: {
|
|
10
|
-
getLabel?: (
|
|
11
|
-
}) => (term: string) => Promise<import("./types").Option[]
|
|
10
|
+
getLabel?: (address: import("./types").Location) => string;
|
|
11
|
+
}) => ((term: string) => Promise<import("./types").Option[]>);
|
|
12
12
|
getAddress: (id: number) => Promise<import("./types").Location>;
|
|
13
13
|
getAddressExtended: (id: number) => Promise<import("./types").LocationExtended>;
|
|
14
14
|
getCity: (id: number) => Promise<import("./types").Location>;
|
|
@@ -19,19 +19,19 @@ export declare const SmartAddress: {
|
|
|
19
19
|
loadAddressOptions: (params: {
|
|
20
20
|
term: string;
|
|
21
21
|
level: number;
|
|
22
|
-
limit?: number
|
|
23
|
-
zip?: number
|
|
24
|
-
getLabel?: (
|
|
22
|
+
limit?: number;
|
|
23
|
+
zip?: number;
|
|
24
|
+
getLabel?: (address: import("./types").Location) => string;
|
|
25
25
|
}) => Promise<import("./types").Option[]>;
|
|
26
26
|
loadZipOptions: (params: {
|
|
27
27
|
term: string;
|
|
28
|
-
getLabel?: (
|
|
28
|
+
getLabel?: (address: import("./types").Location) => string;
|
|
29
29
|
}) => Promise<import("./types").Option[]>;
|
|
30
30
|
search: (props: {
|
|
31
31
|
term: string;
|
|
32
32
|
level: number;
|
|
33
|
-
limit?: number
|
|
34
|
-
zip?: number
|
|
33
|
+
limit?: number;
|
|
34
|
+
zip?: number;
|
|
35
35
|
}) => Promise<import("./types").Location[]>;
|
|
36
36
|
searchZip: (term: string) => Promise<import("./types").Location[]>;
|
|
37
37
|
};
|
package/v1/types.d.ts
CHANGED
|
@@ -1,3 +1,25 @@
|
|
|
1
|
+
type BasicType = {
|
|
2
|
+
id: number;
|
|
3
|
+
nazev: string | null;
|
|
4
|
+
};
|
|
5
|
+
type Type = {
|
|
6
|
+
id: number;
|
|
7
|
+
nazev: string | null;
|
|
8
|
+
popis: string | null;
|
|
9
|
+
zkracenyNazev: string | null;
|
|
10
|
+
zacatekPlatnosti: string | null;
|
|
11
|
+
konecPlatnosti: string | null;
|
|
12
|
+
};
|
|
13
|
+
export type ObjectType = BasicType;
|
|
14
|
+
export type ObjectTypeBasic = BasicType;
|
|
15
|
+
export type BuildingType = Type;
|
|
16
|
+
export type ConstructionType = Type;
|
|
17
|
+
export type SewerConnectionType = Type;
|
|
18
|
+
export type GasConnectionType = Type;
|
|
19
|
+
export type WaterConnectionType = Type;
|
|
20
|
+
export type ElevatorType = Type;
|
|
21
|
+
export type HeatingType = Type;
|
|
22
|
+
export type BuildingUsageType = Type;
|
|
1
23
|
export type Option = {
|
|
2
24
|
id: number;
|
|
3
25
|
label: string;
|
|
@@ -64,26 +86,4 @@ export type LocationExtended = {
|
|
|
64
86
|
objectSize: string | null;
|
|
65
87
|
objectSizeSquare: number | null;
|
|
66
88
|
};
|
|
67
|
-
type BasicType = {
|
|
68
|
-
id: number;
|
|
69
|
-
nazev: string | null;
|
|
70
|
-
};
|
|
71
|
-
type Type = {
|
|
72
|
-
id: number;
|
|
73
|
-
nazev: string | null;
|
|
74
|
-
popis: string | null;
|
|
75
|
-
zkracenyNazev: string | null;
|
|
76
|
-
zacatekPlatnosti: string | null;
|
|
77
|
-
konecPlatnosti: string | null;
|
|
78
|
-
};
|
|
79
|
-
export type ObjectType = BasicType;
|
|
80
|
-
export type ObjectTypeBasic = BasicType;
|
|
81
|
-
export type BuildingType = Type;
|
|
82
|
-
export type ConstructionType = Type;
|
|
83
|
-
export type SewerConnectionType = Type;
|
|
84
|
-
export type GasConnectionType = Type;
|
|
85
|
-
export type WaterConnectionType = Type;
|
|
86
|
-
export type ElevatorType = Type;
|
|
87
|
-
export type HeatingType = Type;
|
|
88
|
-
export type BuildingUsageType = Type;
|
|
89
89
|
export {};
|
package/v1/v1.stories.js
CHANGED
|
@@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.Default =
|
|
26
|
+
exports.Default = Default;
|
|
27
27
|
const button_1 = require("@uxf/ui/button");
|
|
28
28
|
const combobox_1 = require("@uxf/ui/combobox");
|
|
29
29
|
const text_input_1 = require("@uxf/ui/text-input");
|
|
@@ -69,9 +69,9 @@ function Default() {
|
|
|
69
69
|
}
|
|
70
70
|
};
|
|
71
71
|
return (react_1.default.createElement("div", { className: "mx-auto max-w-3xl space-y-4 rounded border bg-white p-4" },
|
|
72
|
-
react_1.default.createElement(combobox_1.Combobox, { label: "Address combobox",
|
|
73
|
-
react_1.default.createElement(combobox_1.Combobox, { label: "Zip combobox",
|
|
74
|
-
react_1.default.createElement(text_input_1.TextInput, {
|
|
72
|
+
react_1.default.createElement(combobox_1.Combobox, { label: "Address combobox", loadOptions: index_1.SmartAddress.createAddressLoader({ level: 1 }), name: "combobox", onChange: setAddressValue, value: addressValue }),
|
|
73
|
+
react_1.default.createElement(combobox_1.Combobox, { label: "Zip combobox", loadOptions: index_1.SmartAddress.createZipLoader({}), name: "combobox-smart-address", onChange: setZipValue, value: zipValue }),
|
|
74
|
+
react_1.default.createElement(text_input_1.TextInput, { label: "Text input", name: "text-input", onChange: setTextValue, type: "text", value: textValue }),
|
|
75
75
|
react_1.default.createElement("div", { className: "grid grid-cols-2 gap-4" },
|
|
76
76
|
react_1.default.createElement(button_1.Button, { onClick: load("load-address") }, "Load Address Options"),
|
|
77
77
|
react_1.default.createElement(button_1.Button, { onClick: load("load-zip") }, "Load Zip Options"),
|
|
@@ -84,4 +84,3 @@ function Default() {
|
|
|
84
84
|
react_1.default.createElement(button_1.Button, { onClick: load("get-street") }, "Get Street")),
|
|
85
85
|
react_1.default.createElement("pre", { className: "bg-gray-100 p-2 text-sm" }, JSON.stringify(content, null, 4))));
|
|
86
86
|
}
|
|
87
|
-
exports.Default = Default;
|