@omniumretail/shared-resources 0.0.3 → 0.0.5
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/bundle.js +465 -1209
- package/dist/types/hooks/useEvaluationCycleQuery.hook.d.ts +2 -1
- package/dist/types/hooks/useQuestionnaireQuery.hook.d.ts +2 -1
- package/dist/types/interfaces/EvaluationCycle.d.ts +1 -0
- package/dist/types/interfaces/ResponseList.d.ts +1 -1
- package/package.json +1 -1
- package/src/hooks/useEvaluationCycleQuery.hook.ts +4 -3
- package/src/hooks/useQuestionnaireQuery.hook.ts +4 -3
- package/src/interfaces/EvaluationCycle.ts +1 -0
|
@@ -2,5 +2,6 @@ import { UseQueryOptions } from "@tanstack/react-query";
|
|
|
2
2
|
import { EvaluationCycle, ResponseList } from "../interfaces";
|
|
3
3
|
export interface EvaluationCycleProps extends UseQueryOptions<ResponseList<"EvaluationCycles", EvaluationCycle>> {
|
|
4
4
|
tags?: string;
|
|
5
|
+
limit?: number;
|
|
5
6
|
}
|
|
6
|
-
export declare const useEvaluationCycleQueryHook: ({ tags }: EvaluationCycleProps) => import("@tanstack/react-query").UseQueryResult<ResponseList<"EvaluationCycles", EvaluationCycle>, unknown>;
|
|
7
|
+
export declare const useEvaluationCycleQueryHook: ({ tags, limit }: EvaluationCycleProps) => import("@tanstack/react-query").UseQueryResult<ResponseList<"EvaluationCycles", EvaluationCycle>, unknown>;
|
|
@@ -2,5 +2,6 @@ import { UseQueryOptions } from "@tanstack/react-query";
|
|
|
2
2
|
import { Questionnaire, ResponseList } from "../interfaces";
|
|
3
3
|
export interface QuestionnaireQuery extends UseQueryOptions<ResponseList<"Questionnairezes", Questionnaire>> {
|
|
4
4
|
tags?: string;
|
|
5
|
+
limit?: number;
|
|
5
6
|
}
|
|
6
|
-
export declare const useQuestionnaireQueryHook: ({ tags }: QuestionnaireQuery) => import("@tanstack/react-query").UseQueryResult<ResponseList<"Questionnairezes", Questionnaire>, unknown>;
|
|
7
|
+
export declare const useQuestionnaireQueryHook: ({ tags, limit }: QuestionnaireQuery) => import("@tanstack/react-query").UseQueryResult<ResponseList<"Questionnairezes", Questionnaire>, unknown>;
|
package/package.json
CHANGED
|
@@ -4,14 +4,15 @@ import { get } from "../services/ApiService";
|
|
|
4
4
|
|
|
5
5
|
export interface EvaluationCycleProps extends UseQueryOptions<ResponseList<"EvaluationCycles", EvaluationCycle>> {
|
|
6
6
|
tags?: string;
|
|
7
|
+
limit?: number;
|
|
7
8
|
}
|
|
8
9
|
|
|
9
|
-
export const useEvaluationCycleQueryHook = ({ tags }: EvaluationCycleProps) => {
|
|
10
|
+
export const useEvaluationCycleQueryHook = ({ tags, limit }: EvaluationCycleProps) => {
|
|
10
11
|
return useQuery(
|
|
11
|
-
['EVALUATION_CYCLE_QUERY', tags],
|
|
12
|
+
['EVALUATION_CYCLE_QUERY', tags, limit],
|
|
12
13
|
() => get<ResponseList<"EvaluationCycles", EvaluationCycle>>('/EvaluationCycle', {
|
|
13
14
|
pPage: 1,
|
|
14
|
-
pRecords: 50,
|
|
15
|
+
pRecords: limit || 50,
|
|
15
16
|
pSortBy: 'Type',
|
|
16
17
|
pSortDirection: 'asc',
|
|
17
18
|
pTerms: tags,
|
|
@@ -4,14 +4,15 @@ import { get } from "../services/ApiService";
|
|
|
4
4
|
|
|
5
5
|
export interface QuestionnaireQuery extends UseQueryOptions<ResponseList<"Questionnairezes", Questionnaire>> {
|
|
6
6
|
tags?: string;
|
|
7
|
+
limit?: number;
|
|
7
8
|
}
|
|
8
9
|
|
|
9
|
-
export const useQuestionnaireQueryHook = ({ tags }: QuestionnaireQuery) => {
|
|
10
|
+
export const useQuestionnaireQueryHook = ({ tags, limit }: QuestionnaireQuery) => {
|
|
10
11
|
return useQuery(
|
|
11
|
-
['QUESTIONNAIRE_QUERY', tags],
|
|
12
|
+
['QUESTIONNAIRE_QUERY', tags, limit],
|
|
12
13
|
() => get<ResponseList<"Questionnairezes", Questionnaire>>('/Questionnaire', {
|
|
13
14
|
pPage: 1,
|
|
14
|
-
pRecords: 50,
|
|
15
|
+
pRecords: limit || 50,
|
|
15
16
|
pSortBy: 'Type',
|
|
16
17
|
pSortDirection: 'asc',
|
|
17
18
|
pTerms: tags
|