@kanda-libs/ks-component-ts 0.3.51 → 0.3.53
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/dist/index.d.ts +13272 -13272
- package/dist/index.esm.js +4 -4
- package/dist/index.esm.js.map +3 -3
- package/package.json +1 -1
- package/src/field/components/CompanyLookupInput/SearchResults/useSearch.ts +10 -3
- package/src/field/components/FingerprintBooleanInput/FingerprintBooleanInputUncontrolled/useFingerprintBooleanInputUncontrolled.ts +9 -1
- package/src/generated/widget/index.tsx +64594 -64593
- package/src/hooks/useDownloadDocument/index.ts +10 -3
- package/src/hooks/useDownloadPdf/index.ts +24 -4
package/package.json
CHANGED
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
} from "@kanda-libs/ks-frontend-services";
|
|
8
8
|
import usePreviousValue from "~/hooks/usePreviousValue";
|
|
9
9
|
import { DEBOUNCE_INTERVAL, SKELETON_DATA } from "./constants";
|
|
10
|
+
import { InfoCompanyRequestFunction } from "~/generated/operations/infoCompany";
|
|
10
11
|
|
|
11
12
|
export interface SearchHook {
|
|
12
13
|
results: InfoCompany[];
|
|
@@ -20,10 +21,16 @@ const useSearch = (query = ""): SearchHook => {
|
|
|
20
21
|
const { previousValue: previousQuery, hasChanged: queryHasChanged } =
|
|
21
22
|
usePreviousValue(debouncedQuery);
|
|
22
23
|
|
|
24
|
+
const service = {
|
|
25
|
+
key: services.infoCompany.infoCompany.key,
|
|
26
|
+
method: (
|
|
27
|
+
services.infoCompany.infoCompany
|
|
28
|
+
.method as unknown as () => InfoCompanyRequestFunction
|
|
29
|
+
)(),
|
|
30
|
+
};
|
|
31
|
+
|
|
23
32
|
const { data, isValidating, mutate } = useLoadData(
|
|
24
|
-
|
|
25
|
-
services.infoCompany
|
|
26
|
-
.infoCompany) as typeof services.infoCompany.infoCompany,
|
|
33
|
+
debouncedQuery ? service : false,
|
|
27
34
|
{ shouldRetryOnError: false },
|
|
28
35
|
{
|
|
29
36
|
params: {
|
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
useSubmit,
|
|
14
14
|
} from "@kanda-libs/ks-frontend-services";
|
|
15
15
|
import { StringIndexedObject } from "~/types";
|
|
16
|
+
import { InfoIPRequestFunction } from "~/generated/operations/infoIP";
|
|
16
17
|
|
|
17
18
|
export interface Hook {
|
|
18
19
|
Handle: HandleComponent;
|
|
@@ -28,8 +29,15 @@ export default function useFingerprintBooleanInputUncontrolled(
|
|
|
28
29
|
|
|
29
30
|
const { setValue } = useFormContext();
|
|
30
31
|
|
|
32
|
+
const service = {
|
|
33
|
+
key: services.infoCompany.infoCompany.key,
|
|
34
|
+
method: (
|
|
35
|
+
services.infoIP.infoIP.method as unknown as () => InfoIPRequestFunction
|
|
36
|
+
)(),
|
|
37
|
+
};
|
|
38
|
+
|
|
31
39
|
const { submit: getIp } = useSubmit(
|
|
32
|
-
|
|
40
|
+
service as unknown as Service<
|
|
33
41
|
InfoIP,
|
|
34
42
|
StringIndexedObject,
|
|
35
43
|
StringIndexedObject
|