@recruitnepal/shared-packages 1.6.0 → 1.7.1
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/components/common/NoData.d.ts +8 -0
- package/dist/components/common/NoData.d.ts.map +1 -0
- package/dist/components/common/NoData.js +4 -0
- package/dist/components/ui/BulletListTextarea.d.ts +19 -0
- package/dist/components/ui/BulletListTextarea.d.ts.map +1 -0
- package/dist/components/ui/BulletListTextarea.js +60 -0
- package/dist/components/ui/DesignationSelect.d.ts +13 -0
- package/dist/components/ui/DesignationSelect.d.ts.map +1 -0
- package/dist/components/ui/DesignationSelect.js +78 -0
- package/dist/components/ui/IndustrySelect.d.ts +13 -0
- package/dist/components/ui/IndustrySelect.d.ts.map +1 -0
- package/dist/components/ui/IndustrySelect.js +78 -0
- package/dist/components/ui/MultiSelectOptions.d.ts +18 -0
- package/dist/components/ui/MultiSelectOptions.d.ts.map +1 -0
- package/dist/components/ui/MultiSelectOptions.js +85 -0
- package/dist/components/ui/RatingStars.d.ts +10 -0
- package/dist/components/ui/RatingStars.d.ts.map +1 -0
- package/dist/components/ui/RatingStars.js +10 -0
- package/dist/components/ui/command.d.ts +68 -0
- package/dist/components/ui/command.d.ts.map +1 -0
- package/dist/components/ui/command.js +24 -0
- package/dist/components/ui/popover.d.ts +7 -0
- package/dist/components/ui/popover.d.ts.map +1 -0
- package/dist/components/ui/popover.js +10 -0
- package/dist/hooks/useDebounce.d.ts +2 -0
- package/dist/hooks/useDebounce.d.ts.map +1 -0
- package/dist/hooks/useDebounce.js +9 -0
- package/dist/hooks/useDesignations.d.ts +51 -0
- package/dist/hooks/useDesignations.d.ts.map +1 -0
- package/dist/hooks/useDesignations.js +117 -0
- package/dist/hooks/useIndustries.d.ts +51 -0
- package/dist/hooks/useIndustries.d.ts.map +1 -0
- package/dist/hooks/useIndustries.js +118 -0
- package/dist/hooks/useSkills.d.ts +19 -0
- package/dist/hooks/useSkills.d.ts.map +1 -0
- package/dist/hooks/useSkills.js +39 -0
- package/dist/index.d.ts +21 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +17 -0
- package/dist/utils/cn.d.ts +2 -0
- package/dist/utils/cn.d.ts.map +1 -0
- package/dist/utils/cn.js +3 -0
- package/dist/utils/commonDropdownOptions.d.ts +6 -0
- package/dist/utils/commonDropdownOptions.d.ts.map +1 -0
- package/dist/utils/commonDropdownOptions.js +15 -0
- package/dist/utils/generateSearchQuery.d.ts +2 -0
- package/dist/utils/generateSearchQuery.d.ts.map +1 -0
- package/dist/utils/generateSearchQuery.js +5 -0
- package/package.json +51 -1
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
export type Designation = {
|
|
2
|
+
id: string;
|
|
3
|
+
title?: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
department?: string;
|
|
6
|
+
level?: string;
|
|
7
|
+
};
|
|
8
|
+
export type DesignationPayload = {
|
|
9
|
+
title?: string;
|
|
10
|
+
description?: string;
|
|
11
|
+
department?: string;
|
|
12
|
+
level?: string;
|
|
13
|
+
};
|
|
14
|
+
export type UseDesignationsParams = {
|
|
15
|
+
limit?: number;
|
|
16
|
+
batchSize?: number;
|
|
17
|
+
queryObject?: Record<string, unknown>;
|
|
18
|
+
token?: string | null;
|
|
19
|
+
};
|
|
20
|
+
export declare const useDesignations: ({ limit, batchSize, queryObject, token, }?: UseDesignationsParams) => {
|
|
21
|
+
designations: Designation[];
|
|
22
|
+
pagination: {
|
|
23
|
+
total: number;
|
|
24
|
+
page: number;
|
|
25
|
+
pages: number;
|
|
26
|
+
} | undefined;
|
|
27
|
+
designationsQuery: import("@tanstack/react-query").UseInfiniteQueryResult<import("@tanstack/query-core").InfiniteData<{
|
|
28
|
+
data: Designation[];
|
|
29
|
+
nextPage: number | null;
|
|
30
|
+
totalPages: number;
|
|
31
|
+
}, unknown>, Error>;
|
|
32
|
+
isLoading: boolean;
|
|
33
|
+
isFetching: boolean;
|
|
34
|
+
isError: boolean;
|
|
35
|
+
error: Error | null;
|
|
36
|
+
refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<import("@tanstack/query-core").InfiniteData<{
|
|
37
|
+
data: Designation[];
|
|
38
|
+
nextPage: number | null;
|
|
39
|
+
totalPages: number;
|
|
40
|
+
}, unknown>, Error>>;
|
|
41
|
+
createDesignation: import("@tanstack/react-query").UseMutationResult<unknown, Error, DesignationPayload, unknown>;
|
|
42
|
+
updateDesignation: import("@tanstack/react-query").UseMutationResult<unknown, Error, {
|
|
43
|
+
id: string;
|
|
44
|
+
data: DesignationPayload;
|
|
45
|
+
}, unknown>;
|
|
46
|
+
deleteDesignation: import("@tanstack/react-query").UseMutationResult<unknown, Error, string, unknown>;
|
|
47
|
+
isCreating: boolean;
|
|
48
|
+
isUpdating: boolean;
|
|
49
|
+
isDeleting: boolean;
|
|
50
|
+
};
|
|
51
|
+
//# sourceMappingURL=useDesignations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDesignations.d.ts","sourceRoot":"","sources":["../../src/hooks/useDesignations.ts"],"names":[],"mappings":"AAMA,MAAM,MAAM,WAAW,GAAG;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAeF,MAAM,MAAM,qBAAqB,GAAG;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACtC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,4CAK7B,qBAA0B;;;;;;;;;;;;;;;;;;;;;;;YAsEc,MAAM;cAAQ,kBAAkB;;;;;;CAgD1E,CAAC"}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { useInfiniteQuery, useMutation, useQueryClient } from '@tanstack/react-query';
|
|
3
|
+
import { apiRequest } from '../utils/api-request';
|
|
4
|
+
import { generateSearchQuery } from '../utils/generateSearchQuery';
|
|
5
|
+
export const useDesignations = ({ limit = 50, batchSize = 1, queryObject = {}, token, } = {}) => {
|
|
6
|
+
const queryClient = useQueryClient();
|
|
7
|
+
const designationsQuery = useInfiniteQuery({
|
|
8
|
+
queryKey: ['designations', limit, batchSize, queryObject],
|
|
9
|
+
initialPageParam: 1,
|
|
10
|
+
enabled: true,
|
|
11
|
+
queryFn: async ({ pageParam = 1 }) => {
|
|
12
|
+
const pagesToFetch = Array.from({ length: batchSize }, (_, i) => pageParam + i);
|
|
13
|
+
const results = await Promise.all(pagesToFetch.map(async (page) => {
|
|
14
|
+
const q = {
|
|
15
|
+
...queryObject,
|
|
16
|
+
page,
|
|
17
|
+
limit,
|
|
18
|
+
};
|
|
19
|
+
if (q.search) {
|
|
20
|
+
q.query = q.search;
|
|
21
|
+
delete q.search;
|
|
22
|
+
}
|
|
23
|
+
const searchQuery = generateSearchQuery(q);
|
|
24
|
+
const res = await apiRequest({
|
|
25
|
+
endpoint: `/designations?${searchQuery}`,
|
|
26
|
+
method: 'GET',
|
|
27
|
+
token: token ?? undefined,
|
|
28
|
+
});
|
|
29
|
+
if (!res.success) {
|
|
30
|
+
const msg = (res.errors?.general?.[0]) || (res.errors && Object.values(res.errors)[0]?.[0]) || 'Failed to fetch designations';
|
|
31
|
+
throw new Error(String(msg));
|
|
32
|
+
}
|
|
33
|
+
const payload = res.data;
|
|
34
|
+
const pag = payload.pagination;
|
|
35
|
+
const pages = pag?.pages ?? 1;
|
|
36
|
+
const nextPage = pag?.nextPage ?? (pag && page < pages ? page + 1 : null);
|
|
37
|
+
return {
|
|
38
|
+
data: payload.data ?? [],
|
|
39
|
+
page,
|
|
40
|
+
pages,
|
|
41
|
+
nextPage,
|
|
42
|
+
};
|
|
43
|
+
}));
|
|
44
|
+
const merged = results.flatMap((r) => r.data);
|
|
45
|
+
const last = results[results.length - 1];
|
|
46
|
+
const nextPage = last.nextPage != null && last.page < last.pages
|
|
47
|
+
? last.nextPage
|
|
48
|
+
: last.page < last.pages
|
|
49
|
+
? last.page + 1
|
|
50
|
+
: null;
|
|
51
|
+
return { data: merged, nextPage, totalPages: last.pages };
|
|
52
|
+
},
|
|
53
|
+
getNextPageParam: (lastPage) => lastPage.nextPage ?? undefined,
|
|
54
|
+
});
|
|
55
|
+
const createDesignation = useMutation({
|
|
56
|
+
mutationFn: async (data) => {
|
|
57
|
+
const res = await apiRequest({
|
|
58
|
+
endpoint: '/designations',
|
|
59
|
+
method: 'POST',
|
|
60
|
+
data,
|
|
61
|
+
token: token ?? undefined,
|
|
62
|
+
});
|
|
63
|
+
if (!res.success)
|
|
64
|
+
throw new Error(String((res.errors?.general?.[0]) || 'Failed to create designation'));
|
|
65
|
+
return res.data;
|
|
66
|
+
},
|
|
67
|
+
onSuccess: () => queryClient.invalidateQueries({ queryKey: ['designations'] }),
|
|
68
|
+
});
|
|
69
|
+
const updateDesignation = useMutation({
|
|
70
|
+
mutationFn: async ({ id, data }) => {
|
|
71
|
+
const res = await apiRequest({
|
|
72
|
+
endpoint: `/designations/${id}`,
|
|
73
|
+
method: 'PUT',
|
|
74
|
+
data,
|
|
75
|
+
token: token ?? undefined,
|
|
76
|
+
});
|
|
77
|
+
if (!res.success)
|
|
78
|
+
throw new Error(String((res.errors?.general?.[0]) || 'Failed to update designation'));
|
|
79
|
+
return res.data;
|
|
80
|
+
},
|
|
81
|
+
onSuccess: () => queryClient.invalidateQueries({ queryKey: ['designations'] }),
|
|
82
|
+
});
|
|
83
|
+
const deleteDesignation = useMutation({
|
|
84
|
+
mutationFn: async (id) => {
|
|
85
|
+
const res = await apiRequest({
|
|
86
|
+
endpoint: `/designations/${id}`,
|
|
87
|
+
method: 'DELETE',
|
|
88
|
+
token: token ?? undefined,
|
|
89
|
+
});
|
|
90
|
+
if (!res.success)
|
|
91
|
+
throw new Error(String((res.errors?.general?.[0]) || 'Failed to delete designation'));
|
|
92
|
+
return res.data;
|
|
93
|
+
},
|
|
94
|
+
onSuccess: () => queryClient.invalidateQueries({ queryKey: ['designations'] }),
|
|
95
|
+
});
|
|
96
|
+
const designations = designationsQuery.data?.pages?.flatMap((p) => p.data) ?? [];
|
|
97
|
+
const lastPage = designationsQuery.data?.pages?.slice(-1)?.[0];
|
|
98
|
+
const pagination = lastPage
|
|
99
|
+
? { total: designations.length, page: 1, pages: lastPage.totalPages ?? 1 }
|
|
100
|
+
: undefined;
|
|
101
|
+
return {
|
|
102
|
+
designations,
|
|
103
|
+
pagination,
|
|
104
|
+
designationsQuery,
|
|
105
|
+
isLoading: designationsQuery.isLoading,
|
|
106
|
+
isFetching: designationsQuery.isFetching,
|
|
107
|
+
isError: designationsQuery.isError,
|
|
108
|
+
error: designationsQuery.error,
|
|
109
|
+
refetch: designationsQuery.refetch,
|
|
110
|
+
createDesignation,
|
|
111
|
+
updateDesignation,
|
|
112
|
+
deleteDesignation,
|
|
113
|
+
isCreating: createDesignation.isPending,
|
|
114
|
+
isUpdating: updateDesignation.isPending,
|
|
115
|
+
isDeleting: deleteDesignation.isPending,
|
|
116
|
+
};
|
|
117
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
export type Industry = {
|
|
2
|
+
id: string;
|
|
3
|
+
title?: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
category?: string;
|
|
6
|
+
status?: string;
|
|
7
|
+
};
|
|
8
|
+
export type IndustryPayload = {
|
|
9
|
+
title?: string;
|
|
10
|
+
description?: string;
|
|
11
|
+
category?: string;
|
|
12
|
+
status?: string;
|
|
13
|
+
};
|
|
14
|
+
export type UseIndustriesParams = {
|
|
15
|
+
limit?: number;
|
|
16
|
+
batchSize?: number;
|
|
17
|
+
queryObject?: Record<string, unknown>;
|
|
18
|
+
token?: string | null;
|
|
19
|
+
};
|
|
20
|
+
export declare const useIndustries: (params?: UseIndustriesParams) => {
|
|
21
|
+
industries: Industry[];
|
|
22
|
+
pagination: {
|
|
23
|
+
total: number;
|
|
24
|
+
page: number;
|
|
25
|
+
pages: number;
|
|
26
|
+
} | undefined;
|
|
27
|
+
industriesQuery: import("@tanstack/react-query").UseInfiniteQueryResult<import("@tanstack/query-core").InfiniteData<{
|
|
28
|
+
data: Industry[];
|
|
29
|
+
nextPage: number | null;
|
|
30
|
+
totalPages: number;
|
|
31
|
+
}, unknown>, Error>;
|
|
32
|
+
isLoading: boolean;
|
|
33
|
+
isFetching: boolean;
|
|
34
|
+
isError: boolean;
|
|
35
|
+
error: Error | null;
|
|
36
|
+
refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<import("@tanstack/query-core").InfiniteData<{
|
|
37
|
+
data: Industry[];
|
|
38
|
+
nextPage: number | null;
|
|
39
|
+
totalPages: number;
|
|
40
|
+
}, unknown>, Error>>;
|
|
41
|
+
createIndustry: import("@tanstack/react-query").UseMutationResult<unknown, Error, IndustryPayload, unknown>;
|
|
42
|
+
updateIndustry: import("@tanstack/react-query").UseMutationResult<unknown, Error, {
|
|
43
|
+
id: string;
|
|
44
|
+
data: IndustryPayload;
|
|
45
|
+
}, unknown>;
|
|
46
|
+
deleteIndustry: import("@tanstack/react-query").UseMutationResult<unknown, Error, string, unknown>;
|
|
47
|
+
isCreating: boolean;
|
|
48
|
+
isUpdating: boolean;
|
|
49
|
+
isDeleting: boolean;
|
|
50
|
+
};
|
|
51
|
+
//# sourceMappingURL=useIndustries.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useIndustries.d.ts","sourceRoot":"","sources":["../../src/hooks/useIndustries.ts"],"names":[],"mappings":"AAMA,MAAM,MAAM,QAAQ,GAAG;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAeF,MAAM,MAAM,mBAAmB,GAAG;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACtC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,SAAQ,mBAAwB;;;;;;;;;;;;;;;;;;;;;;;YAuEnB,MAAM;cAAQ,eAAe;;;;;;CAgDvE,CAAC"}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { useInfiniteQuery, useMutation, useQueryClient } from '@tanstack/react-query';
|
|
3
|
+
import { apiRequest } from '../utils/api-request';
|
|
4
|
+
import { generateSearchQuery } from '../utils/generateSearchQuery';
|
|
5
|
+
export const useIndustries = (params = {}) => {
|
|
6
|
+
const { limit = 50, batchSize = 1, queryObject = {}, token } = params;
|
|
7
|
+
const queryClient = useQueryClient();
|
|
8
|
+
const industriesQuery = useInfiniteQuery({
|
|
9
|
+
queryKey: ['industries', limit, batchSize, queryObject],
|
|
10
|
+
initialPageParam: 1,
|
|
11
|
+
enabled: true,
|
|
12
|
+
queryFn: async ({ pageParam = 1 }) => {
|
|
13
|
+
const pagesToFetch = Array.from({ length: batchSize }, (_, i) => pageParam + i);
|
|
14
|
+
const results = await Promise.all(pagesToFetch.map(async (page) => {
|
|
15
|
+
const q = {
|
|
16
|
+
...queryObject,
|
|
17
|
+
page,
|
|
18
|
+
limit,
|
|
19
|
+
};
|
|
20
|
+
if (q.search) {
|
|
21
|
+
q.query = q.search;
|
|
22
|
+
delete q.search;
|
|
23
|
+
}
|
|
24
|
+
const searchQuery = generateSearchQuery(q);
|
|
25
|
+
const res = await apiRequest({
|
|
26
|
+
endpoint: `/industries?${searchQuery}`,
|
|
27
|
+
method: 'GET',
|
|
28
|
+
token: token ?? undefined,
|
|
29
|
+
});
|
|
30
|
+
if (!res.success) {
|
|
31
|
+
const msg = (res.errors?.general?.[0]) || (res.errors && Object.values(res.errors)[0]?.[0]) || 'Failed to fetch industries';
|
|
32
|
+
throw new Error(String(msg));
|
|
33
|
+
}
|
|
34
|
+
const payload = res.data;
|
|
35
|
+
const pag = payload.pagination;
|
|
36
|
+
const pages = pag?.pages ?? 1;
|
|
37
|
+
const nextPage = pag?.nextPage ?? (pag && page < pages ? page + 1 : null);
|
|
38
|
+
return {
|
|
39
|
+
data: payload.data ?? [],
|
|
40
|
+
page,
|
|
41
|
+
pages,
|
|
42
|
+
nextPage,
|
|
43
|
+
};
|
|
44
|
+
}));
|
|
45
|
+
const merged = results.flatMap((r) => r.data);
|
|
46
|
+
const last = results[results.length - 1];
|
|
47
|
+
const nextPage = last.nextPage != null && last.page < last.pages
|
|
48
|
+
? last.nextPage
|
|
49
|
+
: last.page < last.pages
|
|
50
|
+
? last.page + 1
|
|
51
|
+
: null;
|
|
52
|
+
return { data: merged, nextPage, totalPages: last.pages };
|
|
53
|
+
},
|
|
54
|
+
getNextPageParam: (lastPage) => lastPage.nextPage ?? undefined,
|
|
55
|
+
});
|
|
56
|
+
const createIndustry = useMutation({
|
|
57
|
+
mutationFn: async (data) => {
|
|
58
|
+
const res = await apiRequest({
|
|
59
|
+
endpoint: '/industries',
|
|
60
|
+
method: 'POST',
|
|
61
|
+
data,
|
|
62
|
+
token: token ?? undefined,
|
|
63
|
+
});
|
|
64
|
+
if (!res.success)
|
|
65
|
+
throw new Error(String((res.errors?.general?.[0]) || 'Failed to create industry'));
|
|
66
|
+
return res.data;
|
|
67
|
+
},
|
|
68
|
+
onSuccess: () => queryClient.invalidateQueries({ queryKey: ['industries'] }),
|
|
69
|
+
});
|
|
70
|
+
const updateIndustry = useMutation({
|
|
71
|
+
mutationFn: async ({ id, data }) => {
|
|
72
|
+
const res = await apiRequest({
|
|
73
|
+
endpoint: `/industries/${id}`,
|
|
74
|
+
method: 'PUT',
|
|
75
|
+
data,
|
|
76
|
+
token: token ?? undefined,
|
|
77
|
+
});
|
|
78
|
+
if (!res.success)
|
|
79
|
+
throw new Error(String((res.errors?.general?.[0]) || 'Failed to update industry'));
|
|
80
|
+
return res.data;
|
|
81
|
+
},
|
|
82
|
+
onSuccess: () => queryClient.invalidateQueries({ queryKey: ['industries'] }),
|
|
83
|
+
});
|
|
84
|
+
const deleteIndustry = useMutation({
|
|
85
|
+
mutationFn: async (id) => {
|
|
86
|
+
const res = await apiRequest({
|
|
87
|
+
endpoint: `/industries/${id}`,
|
|
88
|
+
method: 'DELETE',
|
|
89
|
+
token: token ?? undefined,
|
|
90
|
+
});
|
|
91
|
+
if (!res.success)
|
|
92
|
+
throw new Error(String((res.errors?.general?.[0]) || 'Failed to delete industry'));
|
|
93
|
+
return res.data;
|
|
94
|
+
},
|
|
95
|
+
onSuccess: () => queryClient.invalidateQueries({ queryKey: ['industries'] }),
|
|
96
|
+
});
|
|
97
|
+
const industries = industriesQuery.data?.pages?.flatMap((p) => p.data) ?? [];
|
|
98
|
+
const lastPage = industriesQuery.data?.pages?.slice(-1)?.[0];
|
|
99
|
+
const pagination = lastPage
|
|
100
|
+
? { total: industries.length, page: 1, pages: lastPage.totalPages ?? 1 }
|
|
101
|
+
: undefined;
|
|
102
|
+
return {
|
|
103
|
+
industries,
|
|
104
|
+
pagination,
|
|
105
|
+
industriesQuery,
|
|
106
|
+
isLoading: industriesQuery.isLoading,
|
|
107
|
+
isFetching: industriesQuery.isFetching,
|
|
108
|
+
isError: industriesQuery.isError,
|
|
109
|
+
error: industriesQuery.error,
|
|
110
|
+
refetch: industriesQuery.refetch,
|
|
111
|
+
createIndustry,
|
|
112
|
+
updateIndustry,
|
|
113
|
+
deleteIndustry,
|
|
114
|
+
isCreating: createIndustry.isPending,
|
|
115
|
+
isUpdating: updateIndustry.isPending,
|
|
116
|
+
isDeleting: deleteIndustry.isPending,
|
|
117
|
+
};
|
|
118
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export type Skill = {
|
|
2
|
+
id: string;
|
|
3
|
+
skill: string;
|
|
4
|
+
};
|
|
5
|
+
export type UseSkillsParams = {
|
|
6
|
+
limit?: number;
|
|
7
|
+
batchSize?: number;
|
|
8
|
+
queryObject?: Record<string, unknown>;
|
|
9
|
+
/** Optional auth token (e.g. from useSessionStore) */
|
|
10
|
+
token?: string | null;
|
|
11
|
+
};
|
|
12
|
+
export declare const useSkills: ({ limit, batchSize, queryObject, token, }?: UseSkillsParams) => {
|
|
13
|
+
skillsQuery: import("@tanstack/react-query").UseInfiniteQueryResult<import("@tanstack/query-core").InfiniteData<{
|
|
14
|
+
data: Skill[];
|
|
15
|
+
nextPage: number | null;
|
|
16
|
+
totalPages: number;
|
|
17
|
+
}, unknown>, Error>;
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=useSkills.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSkills.d.ts","sourceRoot":"","sources":["../../src/hooks/useSkills.ts"],"names":[],"mappings":"AAMA,MAAM,MAAM,KAAK,GAAG;IAClB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAYF,MAAM,MAAM,eAAe,GAAG;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACtC,sDAAsD;IACtD,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB,CAAC;AAEF,eAAO,MAAM,SAAS,GAAI,4CAKvB,eAAoB;;;;;;CAqCtB,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { useInfiniteQuery } from '@tanstack/react-query';
|
|
3
|
+
import { apiRequest } from '../utils/api-request';
|
|
4
|
+
import { generateSearchQuery } from '../utils/generateSearchQuery';
|
|
5
|
+
export const useSkills = ({ limit = 50, batchSize = 1, queryObject = {}, token, } = {}) => {
|
|
6
|
+
const skillsQuery = useInfiniteQuery({
|
|
7
|
+
queryKey: ['skills', limit, batchSize, queryObject],
|
|
8
|
+
initialPageParam: 1,
|
|
9
|
+
enabled: true,
|
|
10
|
+
queryFn: async ({ pageParam = 1 }) => {
|
|
11
|
+
const pagesToFetch = Array.from({ length: batchSize }, (_, i) => pageParam + i);
|
|
12
|
+
const results = await Promise.all(pagesToFetch.map(async (page) => {
|
|
13
|
+
const searchQuery = generateSearchQuery({ ...queryObject, page, limit });
|
|
14
|
+
const res = await apiRequest({
|
|
15
|
+
endpoint: `/skills?${searchQuery}`,
|
|
16
|
+
method: 'GET',
|
|
17
|
+
token: token ?? undefined,
|
|
18
|
+
});
|
|
19
|
+
if (!res.success) {
|
|
20
|
+
const msg = (res.errors?.general?.[0]) || (res.errors && Object.values(res.errors)[0]?.[0]) || 'Failed to fetch skills';
|
|
21
|
+
throw new Error(String(msg));
|
|
22
|
+
}
|
|
23
|
+
const payload = res.data;
|
|
24
|
+
return {
|
|
25
|
+
data: payload.data ?? [],
|
|
26
|
+
page,
|
|
27
|
+
pages: payload.pagination?.pages ?? 1,
|
|
28
|
+
nextPage: payload.pagination?.nextPage ?? null,
|
|
29
|
+
};
|
|
30
|
+
}));
|
|
31
|
+
const merged = results.flatMap((r) => r.data);
|
|
32
|
+
const last = results[results.length - 1];
|
|
33
|
+
const nextPage = last.nextPage != null && last.page < last.pages ? last.nextPage : null;
|
|
34
|
+
return { data: merged, nextPage, totalPages: last.pages };
|
|
35
|
+
},
|
|
36
|
+
getNextPageParam: (lastPage) => lastPage.nextPage ?? undefined,
|
|
37
|
+
});
|
|
38
|
+
return { skillsQuery };
|
|
39
|
+
};
|
package/dist/index.d.ts
CHANGED
|
@@ -7,6 +7,9 @@ export { WORKSTATUS, WORK_STATUS_VALUES, } from './types/easy-apply';
|
|
|
7
7
|
export type { WorkStatusValue, QuestionsAPIRes, ScreeningAnswersApiResNew, } from './types/easy-apply';
|
|
8
8
|
export { apiRequest } from './utils/api-request';
|
|
9
9
|
export type { ApiResponse } from './utils/api-request';
|
|
10
|
+
export { generateSearchQuery } from './utils/generateSearchQuery';
|
|
11
|
+
export { monthsDropdown, yearsDropdown } from './utils/commonDropdownOptions';
|
|
12
|
+
export { cn } from './utils/cn';
|
|
10
13
|
export { useGetAllVacancy } from './hooks/useGetAllVacancy';
|
|
11
14
|
export { default as useGetAllVacancyDefault } from './hooks/useGetAllVacancy';
|
|
12
15
|
export { useSavedVacancyMutations } from './hooks/useSavedVacancyMutations';
|
|
@@ -19,6 +22,13 @@ export { useEasyApplyMutations } from './hooks/useEasyApplyMutations';
|
|
|
19
22
|
export type { UseEasyApplyMutationsParams } from './hooks/useEasyApplyMutations';
|
|
20
23
|
export { useEasyApplyFormHook, easyApplyUserSchema, screeningAnswerSchema, screeningAnswersSchema, } from './hooks/useEasyApplyFormHook';
|
|
21
24
|
export type { EasyApplyFormValues, EasyApplyScreeningAnswer, EasyApplyScreeningAnswers, UseEasyApplyFormHookParams, } from './hooks/useEasyApplyFormHook';
|
|
25
|
+
export { useDebounce } from './hooks/useDebounce';
|
|
26
|
+
export { useSkills } from './hooks/useSkills';
|
|
27
|
+
export type { Skill, UseSkillsParams } from './hooks/useSkills';
|
|
28
|
+
export { useIndustries } from './hooks/useIndustries';
|
|
29
|
+
export type { Industry, IndustryPayload, UseIndustriesParams } from './hooks/useIndustries';
|
|
30
|
+
export { useDesignations } from './hooks/useDesignations';
|
|
31
|
+
export type { Designation, DesignationPayload, UseDesignationsParams } from './hooks/useDesignations';
|
|
22
32
|
export { default as JobsClient } from './components/JobsClient';
|
|
23
33
|
export type { JobsClientProps } from './components/JobsClient';
|
|
24
34
|
export { default as JobDescriptionClient } from './components/JobDescriptionClient';
|
|
@@ -36,4 +46,15 @@ export type { CvTemplateRegistry, TemplateRendererProps } from './components/cv/
|
|
|
36
46
|
export { default as TemplatePicker } from './components/cv/TemplatePicker';
|
|
37
47
|
export type { TemplatePickerProps } from './components/cv/TemplatePicker';
|
|
38
48
|
export { generateSampleTemplateData } from './components/cv/TemplatePicker';
|
|
49
|
+
export { RatingStars } from './components/ui/RatingStars';
|
|
50
|
+
export { BulletListTextarea } from './components/ui/BulletListTextarea';
|
|
51
|
+
export type { BulletListTextareaProps } from './components/ui/BulletListTextarea';
|
|
52
|
+
export { default as IndustrySelect } from './components/ui/IndustrySelect';
|
|
53
|
+
export type { IndustrySelectProps } from './components/ui/IndustrySelect';
|
|
54
|
+
export { default as DesignationSelect } from './components/ui/DesignationSelect';
|
|
55
|
+
export type { DesignationSelectProps } from './components/ui/DesignationSelect';
|
|
56
|
+
export { MultiSelectOptions } from './components/ui/MultiSelectOptions';
|
|
57
|
+
export { NoData } from './components/common/NoData';
|
|
58
|
+
export { Popover, PopoverTrigger, PopoverContent } from './components/ui/popover';
|
|
59
|
+
export { Command, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, } from './components/ui/command';
|
|
39
60
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAGxD,YAAY,EACV,gBAAgB,EAChB,aAAa,EACb,UAAU,EACV,eAAe,GAChB,MAAM,SAAS,CAAC;AACjB,YAAY,EACV,aAAa,EACb,oBAAoB,EACpB,gBAAgB,GACjB,MAAM,mBAAmB,CAAC;AAC3B,YAAY,EACV,gBAAgB,EAChB,uBAAuB,EACvB,mBAAmB,GACpB,MAAM,uBAAuB,CAAC;AAC/B,YAAY,EACV,QAAQ,EACR,YAAY,EACZ,wBAAwB,GACzB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,UAAU,EACV,kBAAkB,GACnB,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EACV,eAAe,EACf,eAAe,EACf,yBAAyB,GAC1B,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,YAAY,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"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"}
|
package/dist/index.js
CHANGED
|
@@ -3,6 +3,9 @@ export { initApi, getBaseURL, API } from './api-client';
|
|
|
3
3
|
export { WORKSTATUS, WORK_STATUS_VALUES, } from './types/easy-apply';
|
|
4
4
|
// Utils
|
|
5
5
|
export { apiRequest } from './utils/api-request';
|
|
6
|
+
export { generateSearchQuery } from './utils/generateSearchQuery';
|
|
7
|
+
export { monthsDropdown, yearsDropdown } from './utils/commonDropdownOptions';
|
|
8
|
+
export { cn } from './utils/cn';
|
|
6
9
|
// Hooks
|
|
7
10
|
export { useGetAllVacancy } from './hooks/useGetAllVacancy';
|
|
8
11
|
export { default as useGetAllVacancyDefault } from './hooks/useGetAllVacancy';
|
|
@@ -14,6 +17,10 @@ export { useVacancyQuestions } from './hooks/useVacancyQuestions';
|
|
|
14
17
|
export { useShareJob } from './hooks/useShareJob';
|
|
15
18
|
export { useEasyApplyMutations } from './hooks/useEasyApplyMutations';
|
|
16
19
|
export { useEasyApplyFormHook, easyApplyUserSchema, screeningAnswerSchema, screeningAnswersSchema, } from './hooks/useEasyApplyFormHook';
|
|
20
|
+
export { useDebounce } from './hooks/useDebounce';
|
|
21
|
+
export { useSkills } from './hooks/useSkills';
|
|
22
|
+
export { useIndustries } from './hooks/useIndustries';
|
|
23
|
+
export { useDesignations } from './hooks/useDesignations';
|
|
17
24
|
// Components
|
|
18
25
|
export { default as JobsClient } from './components/JobsClient';
|
|
19
26
|
export { default as JobDescriptionClient } from './components/JobDescriptionClient';
|
|
@@ -28,3 +35,13 @@ export { useCvDraftsStore } from './stores/cvDrafts.store';
|
|
|
28
35
|
export { default as TemplateRenderer } from './components/cv/TemplateRenderer';
|
|
29
36
|
export { default as TemplatePicker } from './components/cv/TemplatePicker';
|
|
30
37
|
export { generateSampleTemplateData } from './components/cv/TemplatePicker';
|
|
38
|
+
// UI Components
|
|
39
|
+
export { RatingStars } from './components/ui/RatingStars';
|
|
40
|
+
export { BulletListTextarea } from './components/ui/BulletListTextarea';
|
|
41
|
+
export { default as IndustrySelect } from './components/ui/IndustrySelect';
|
|
42
|
+
export { default as DesignationSelect } from './components/ui/DesignationSelect';
|
|
43
|
+
export { MultiSelectOptions } from './components/ui/MultiSelectOptions';
|
|
44
|
+
export { NoData } from './components/common/NoData';
|
|
45
|
+
// UI Primitives (Popover, Command)
|
|
46
|
+
export { Popover, PopoverTrigger, PopoverContent } from './components/ui/popover';
|
|
47
|
+
export { Command, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, } from './components/ui/command';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cn.d.ts","sourceRoot":"","sources":["../../src/utils/cn.ts"],"names":[],"mappings":"AAAA,wBAAgB,EAAE,CAAC,GAAG,OAAO,EAAE,CAAC,MAAM,GAAG,SAAS,GAAG,KAAK,GAAG,IAAI,CAAC,EAAE,GAAG,MAAM,CAE5E"}
|
package/dist/utils/cn.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commonDropdownOptions.d.ts","sourceRoot":"","sources":["../../src/utils/commonDropdownOptions.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc;;;GAa1B,CAAC;AAEF,eAAO,MAAM,aAAa,UAGzB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export const monthsDropdown = [
|
|
2
|
+
{ value: 1, label: 'January' },
|
|
3
|
+
{ value: 2, label: 'February' },
|
|
4
|
+
{ value: 3, label: 'March' },
|
|
5
|
+
{ value: 4, label: 'April' },
|
|
6
|
+
{ value: 5, label: 'May' },
|
|
7
|
+
{ value: 6, label: 'June' },
|
|
8
|
+
{ value: 7, label: 'July' },
|
|
9
|
+
{ value: 8, label: 'August' },
|
|
10
|
+
{ value: 9, label: 'September' },
|
|
11
|
+
{ value: 10, label: 'October' },
|
|
12
|
+
{ value: 11, label: 'November' },
|
|
13
|
+
{ value: 12, label: 'December' },
|
|
14
|
+
];
|
|
15
|
+
export const yearsDropdown = Array.from({ length: 50 }, (_, i) => `${new Date().getFullYear() - i}`);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generateSearchQuery.d.ts","sourceRoot":"","sources":["../../src/utils/generateSearchQuery.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mBAAmB,GAC9B,KAAK,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,SAAS,CAAC,KAChE,MAMF,CAAC"}
|
package/package.json
CHANGED
|
@@ -1 +1,51 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"name": "@recruitnepal/shared-packages",
|
|
3
|
+
"version": "1.7.1",
|
|
4
|
+
"description": "Shared UI components and hooks for Recruit Nepal projects",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"build": "tsc",
|
|
9
|
+
"dev": "tsc --watch",
|
|
10
|
+
"prepublishOnly": "npm run build"
|
|
11
|
+
},
|
|
12
|
+
"keywords": [
|
|
13
|
+
"react",
|
|
14
|
+
"nextjs",
|
|
15
|
+
"recruit-nepal",
|
|
16
|
+
"shared-components",
|
|
17
|
+
"cv-builder"
|
|
18
|
+
],
|
|
19
|
+
"author": "",
|
|
20
|
+
"license": "MIT",
|
|
21
|
+
"peerDependencies": {
|
|
22
|
+
"react": "^18.2.0",
|
|
23
|
+
"react-dom": "^18.2.0",
|
|
24
|
+
"@tanstack/react-query": "^5.50.0",
|
|
25
|
+
"zod": "^3.22.0",
|
|
26
|
+
"react-hook-form": "^7.49.0",
|
|
27
|
+
"@hookform/resolvers": "^3.3.0",
|
|
28
|
+
"zustand": "^4.5.0 || ^5.0.0",
|
|
29
|
+
"lucide-react": ">=0.263.0",
|
|
30
|
+
"@radix-ui/react-popover": "^1.0.0",
|
|
31
|
+
"cmdk": "^1.0.0"
|
|
32
|
+
},
|
|
33
|
+
"dependencies": {
|
|
34
|
+
"axios": "^1.7.8"
|
|
35
|
+
},
|
|
36
|
+
"devDependencies": {
|
|
37
|
+
"@types/node": "^20.11.17",
|
|
38
|
+
"@types/react": "^18.2.55",
|
|
39
|
+
"@types/react-dom": "^18.2.19",
|
|
40
|
+
"typescript": "^5.3.3",
|
|
41
|
+
"zod": "^3.22.0",
|
|
42
|
+
"react-hook-form": "^7.49.0",
|
|
43
|
+
"@hookform/resolvers": "^3.3.0",
|
|
44
|
+
"zustand": "^4.5.0"
|
|
45
|
+
},
|
|
46
|
+
"files": [
|
|
47
|
+
"dist",
|
|
48
|
+
"README.md"
|
|
49
|
+
]
|
|
50
|
+
}
|
|
51
|
+
|