@fabriciogferreira/use-url-query 0.1.0 → 0.1.2
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/combine.d.ts +26 -0
- package/dist/combine.js +71 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/use-url-query.d.ts +74 -0
- package/dist/use-url-query.js +285 -0
- package/package.json +1 -1
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
type ConfigBase = {
|
|
2
|
+
withEmpty?: boolean;
|
|
3
|
+
isOrderMatter?: boolean;
|
|
4
|
+
};
|
|
5
|
+
type ConfigGrouped = ConfigBase & {
|
|
6
|
+
group: true;
|
|
7
|
+
};
|
|
8
|
+
type ConfigUngrouped = ConfigBase & {
|
|
9
|
+
group?: false;
|
|
10
|
+
};
|
|
11
|
+
export declare function combinations<F, S>(arry: [F[], S[]], config: ConfigGrouped): (F | S)[][][];
|
|
12
|
+
export declare function combinations<F, S>(arry: [F[], S[]], config?: ConfigUngrouped): (F | S)[][];
|
|
13
|
+
type configPowerSet = {
|
|
14
|
+
removeEmpty?: boolean;
|
|
15
|
+
withSizes?: number | Array<number> | {
|
|
16
|
+
min: number;
|
|
17
|
+
max: number;
|
|
18
|
+
} | {
|
|
19
|
+
min: number;
|
|
20
|
+
} | {
|
|
21
|
+
max: number;
|
|
22
|
+
};
|
|
23
|
+
isOrderMatter?: boolean;
|
|
24
|
+
};
|
|
25
|
+
export declare function powerSet<T>(array: T[], config?: configPowerSet): T[][];
|
|
26
|
+
export {};
|
package/dist/combine.js
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
export function combinations(arry, config) {
|
|
2
|
+
const results = [];
|
|
3
|
+
const first = arry[0];
|
|
4
|
+
const second = arry[1];
|
|
5
|
+
first.forEach(fItem => {
|
|
6
|
+
const groped = [];
|
|
7
|
+
second.forEach(sItem => {
|
|
8
|
+
if (config?.isOrderMatter) {
|
|
9
|
+
groped.push([sItem, fItem]);
|
|
10
|
+
}
|
|
11
|
+
groped.push([fItem, sItem]);
|
|
12
|
+
});
|
|
13
|
+
if (config?.group) {
|
|
14
|
+
results.push(groped);
|
|
15
|
+
}
|
|
16
|
+
else {
|
|
17
|
+
results.push(...groped);
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
if (config?.withEmpty) {
|
|
21
|
+
results.push([]);
|
|
22
|
+
}
|
|
23
|
+
return results;
|
|
24
|
+
}
|
|
25
|
+
export function powerSet(array, config) {
|
|
26
|
+
let results = [[]];
|
|
27
|
+
if (config?.isOrderMatter) {
|
|
28
|
+
for (const item of array) {
|
|
29
|
+
const snapshot = [...results];
|
|
30
|
+
for (const subset of snapshot) {
|
|
31
|
+
for (let i = 0; i <= subset.length; i++) {
|
|
32
|
+
const copy = [...subset];
|
|
33
|
+
copy.splice(i, 0, item);
|
|
34
|
+
results.push(copy);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
array.forEach(item => {
|
|
41
|
+
const length = results.length;
|
|
42
|
+
for (let i = 0; i < length; i++) {
|
|
43
|
+
results.push([...results[i], item]);
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
if (config?.removeEmpty) {
|
|
48
|
+
results.shift();
|
|
49
|
+
}
|
|
50
|
+
if (config?.withSizes !== undefined) {
|
|
51
|
+
const withSizes = config.withSizes;
|
|
52
|
+
if (typeof withSizes === 'number') {
|
|
53
|
+
results = results.filter(item => item.length === withSizes);
|
|
54
|
+
}
|
|
55
|
+
else if (Array.isArray(withSizes)) {
|
|
56
|
+
results = results.filter(item => withSizes.includes(item.length));
|
|
57
|
+
}
|
|
58
|
+
else if (typeof withSizes === 'object') {
|
|
59
|
+
if ('min' in withSizes && 'max' in withSizes) {
|
|
60
|
+
results = results.filter(item => item.length >= withSizes.min && item.length <= withSizes.max);
|
|
61
|
+
}
|
|
62
|
+
else if ('min' in withSizes) {
|
|
63
|
+
results = results.filter(item => item.length >= withSizes.min);
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
results = results.filter(item => item.length <= withSizes.max);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
return results;
|
|
71
|
+
}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { useUrlQuery, Sort, } from './use-url-query';
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { useUrlQuery, } from './use-url-query';
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { SchemaToQueryStringConfig } from "@fabriciogferreira/schema-to-query-string";
|
|
2
|
+
import { SingleParserBuilder } from 'nuqs';
|
|
3
|
+
type InferParser<P> = P extends SingleParserBuilder<infer T> ? T : number;
|
|
4
|
+
type FiltersFromConfig<C extends FiltersConfig> = {
|
|
5
|
+
[K in keyof C]?: InferParser<C[K]>;
|
|
6
|
+
};
|
|
7
|
+
type FiltersConfig = Record<string, SingleParserBuilder<any>>;
|
|
8
|
+
type Params<S extends FiltersConfig> = {
|
|
9
|
+
sorts?: SortParam;
|
|
10
|
+
normalizeFromUrl?: boolean;
|
|
11
|
+
filters?: S;
|
|
12
|
+
schemaToQueryString?: SchemaToQueryStringConfig;
|
|
13
|
+
filterParamAs?: string;
|
|
14
|
+
includeParamAs?: string;
|
|
15
|
+
sortParamAs?: string;
|
|
16
|
+
};
|
|
17
|
+
type Direction = '-' | '';
|
|
18
|
+
export type Sort = {
|
|
19
|
+
column: string;
|
|
20
|
+
label: string;
|
|
21
|
+
direction: Direction;
|
|
22
|
+
include: boolean;
|
|
23
|
+
};
|
|
24
|
+
export type SortParam = Pick<Sort, 'column' | 'label'>[] | Sort['column'][];
|
|
25
|
+
type AddFilter<C extends FiltersConfig> = <K extends keyof C>(key: K, value: InferParser<C[K]> | null) => void;
|
|
26
|
+
type RemoveFilter<C extends FiltersConfig> = <K extends keyof C>(key: K, value: InferParser<C[K]> | null) => void;
|
|
27
|
+
type AddFilterDebounced<C extends FiltersConfig> = <K extends keyof C>(key: K, value: InferParser<C[K]> | null, timeout?: number) => void;
|
|
28
|
+
type AddInclude = (includes: string | string[]) => void;
|
|
29
|
+
type RemoveInclude = (includes: string | string[]) => void;
|
|
30
|
+
type Page = number | null;
|
|
31
|
+
type RemovePage = () => void;
|
|
32
|
+
type PerPage = number | null;
|
|
33
|
+
type RemovePerPage = () => void;
|
|
34
|
+
type HasSort = (column: string) => boolean | undefined;
|
|
35
|
+
type IsSortAsc = (column: string) => boolean | void;
|
|
36
|
+
type IsSortDesc = (column: string) => boolean | void;
|
|
37
|
+
type MoveSortUp = (column: string) => void;
|
|
38
|
+
type MoveSortDown = (column: string) => void;
|
|
39
|
+
type ToggleSort = (column: string) => void;
|
|
40
|
+
type ToggleSortDirection = (column: string) => void;
|
|
41
|
+
export declare function useUrlQuery<T extends FiltersConfig>({ normalizeFromUrl, schemaToQueryString, sorts: allowedSorts, filters: allowedFilters, filterParamAs: filterParam, includeParamAs: includeParam, sortParamAs: sortParam, }?: Params<T>): {
|
|
42
|
+
filters: FiltersFromConfig<T>;
|
|
43
|
+
filtersQueryString: string;
|
|
44
|
+
addFilter: AddFilter<T>;
|
|
45
|
+
removeFilter: RemoveFilter<T>;
|
|
46
|
+
addFilterDebounced: AddFilterDebounced<T>;
|
|
47
|
+
includes: string[];
|
|
48
|
+
includeString: string;
|
|
49
|
+
includeQueryString: string;
|
|
50
|
+
addInclude: AddInclude;
|
|
51
|
+
removeInclude: RemoveInclude;
|
|
52
|
+
page: Page;
|
|
53
|
+
pageString: string;
|
|
54
|
+
pageQueryString: string;
|
|
55
|
+
removePage: RemovePage;
|
|
56
|
+
setPage: import("react").Dispatch<import("react").SetStateAction<Page>>;
|
|
57
|
+
perPage: PerPage;
|
|
58
|
+
perPageString: string;
|
|
59
|
+
perPageQueryString: string;
|
|
60
|
+
removePerPage: RemovePerPage;
|
|
61
|
+
setPerPage: import("react").Dispatch<import("react").SetStateAction<PerPage>>;
|
|
62
|
+
sorts: Sort[];
|
|
63
|
+
sortString: string;
|
|
64
|
+
sortQueryString: string;
|
|
65
|
+
hasSort: HasSort;
|
|
66
|
+
isSortAsc: IsSortAsc;
|
|
67
|
+
isSortDesc: IsSortDesc;
|
|
68
|
+
moveSortUp: MoveSortUp;
|
|
69
|
+
moveSortDown: MoveSortDown;
|
|
70
|
+
toggleSort: ToggleSort;
|
|
71
|
+
toggleSortDirection: ToggleSortDirection;
|
|
72
|
+
queryString: string;
|
|
73
|
+
};
|
|
74
|
+
export {};
|
|
@@ -0,0 +1,285 @@
|
|
|
1
|
+
import { useMemo, useState, useEffect, useRef } from "react";
|
|
2
|
+
import { useRouter } from 'next/router';
|
|
3
|
+
import { useSearchParams } from "next/navigation";
|
|
4
|
+
import { schemaToQueryString as fnSchemaToQueryString } from "@fabriciogferreira/schema-to-query-string";
|
|
5
|
+
//QUERY STRING
|
|
6
|
+
export function useUrlQuery({ normalizeFromUrl = true, schemaToQueryString, sorts: allowedSorts = [], filters: allowedFilters, filterParamAs: filterParam = 'filter', includeParamAs: includeParam = 'include', sortParamAs: sortParam = 'sort', } = {}) {
|
|
7
|
+
const router = useRouter();
|
|
8
|
+
const filterDebouncedTimeoutId = useRef(undefined);
|
|
9
|
+
const [filters, setFilters] = useState({});
|
|
10
|
+
const filtersQueryString = useMemo(() => {
|
|
11
|
+
if (allowedFilters === undefined)
|
|
12
|
+
return '';
|
|
13
|
+
return Object.entries(allowedFilters)
|
|
14
|
+
.filter(([key]) => filters[key])
|
|
15
|
+
.map(([key, value]) => {
|
|
16
|
+
return filterParam + `[${key}]=${value.serialize(filters[key])}`;
|
|
17
|
+
})
|
|
18
|
+
.join('&');
|
|
19
|
+
}, [filters, allowedFilters]);
|
|
20
|
+
const addFilter = (column, value) => {
|
|
21
|
+
setFilters(prevFilters => ({
|
|
22
|
+
...prevFilters,
|
|
23
|
+
[column]: value
|
|
24
|
+
}));
|
|
25
|
+
};
|
|
26
|
+
const removeFilter = (column) => {
|
|
27
|
+
setFilters(prevFilters => {
|
|
28
|
+
const newFilters = { ...prevFilters };
|
|
29
|
+
delete newFilters[column];
|
|
30
|
+
return newFilters;
|
|
31
|
+
});
|
|
32
|
+
};
|
|
33
|
+
const addFilterDebounced = (column, value, timeout = 300) => {
|
|
34
|
+
clearTimeout(filterDebouncedTimeoutId.current);
|
|
35
|
+
filterDebouncedTimeoutId.current = setTimeout(() => {
|
|
36
|
+
addFilter(column, value);
|
|
37
|
+
}, timeout);
|
|
38
|
+
};
|
|
39
|
+
//INCLUDE
|
|
40
|
+
const [includes, setIncludes] = useState([]);
|
|
41
|
+
const includeString = useMemo(() => {
|
|
42
|
+
return includes.join(',');
|
|
43
|
+
}, [includes]);
|
|
44
|
+
const includeQueryString = useMemo(() => {
|
|
45
|
+
return includeString ? includeParam + '=' + includeString : '';
|
|
46
|
+
}, [includeString]);
|
|
47
|
+
const addInclude = (includes) => {
|
|
48
|
+
const newIncludes = Array.isArray(includes) ? includes : [includes];
|
|
49
|
+
setIncludes(newIncludes);
|
|
50
|
+
};
|
|
51
|
+
const removeInclude = (includesParam) => {
|
|
52
|
+
const removeIncludes = Array.isArray(includesParam) ? includesParam : [includesParam];
|
|
53
|
+
const newIncludes = includes.filter(inc => !removeIncludes.includes(inc));
|
|
54
|
+
setIncludes(newIncludes);
|
|
55
|
+
};
|
|
56
|
+
//PAGE
|
|
57
|
+
const [page, setPage] = useState(null);
|
|
58
|
+
const pageString = useMemo(() => {
|
|
59
|
+
return page ? page.toString() : '';
|
|
60
|
+
}, [page]);
|
|
61
|
+
const pageQueryString = useMemo(() => {
|
|
62
|
+
return pageString ? 'page=' + pageString : '';
|
|
63
|
+
}, [pageString]);
|
|
64
|
+
const removePage = () => {
|
|
65
|
+
setPage(null);
|
|
66
|
+
};
|
|
67
|
+
//PER PAGE
|
|
68
|
+
const [perPage, setPerPage] = useState(null);
|
|
69
|
+
const perPageString = useMemo(() => {
|
|
70
|
+
return perPage ? perPage.toString() : '';
|
|
71
|
+
}, [perPage]);
|
|
72
|
+
const perPageQueryString = useMemo(() => {
|
|
73
|
+
return perPageString ? 'perPage=' + perPageString : '';
|
|
74
|
+
}, [perPageString]);
|
|
75
|
+
const removePerPage = () => {
|
|
76
|
+
setPerPage(null);
|
|
77
|
+
};
|
|
78
|
+
//SORT
|
|
79
|
+
const normalizedSorts = allowedSorts.map(allowedSort => {
|
|
80
|
+
const restItem = typeof allowedSort === 'string'
|
|
81
|
+
? { column: allowedSort, label: allowedSort }
|
|
82
|
+
: allowedSort;
|
|
83
|
+
return {
|
|
84
|
+
...restItem,
|
|
85
|
+
direction: '',
|
|
86
|
+
include: false
|
|
87
|
+
};
|
|
88
|
+
});
|
|
89
|
+
const [sorts, setSorts] = useState(normalizedSorts);
|
|
90
|
+
const sortString = useMemo(() => {
|
|
91
|
+
return sorts.filter(sort => sort.include)
|
|
92
|
+
.map(sort => sort.direction + sort.column)
|
|
93
|
+
.join(',');
|
|
94
|
+
}, [sorts]);
|
|
95
|
+
const sortQueryString = useMemo(() => {
|
|
96
|
+
return sortString ? sortParam + '=' + sortString : '';
|
|
97
|
+
}, [sortString]);
|
|
98
|
+
const findSort = (column) => {
|
|
99
|
+
return sorts.find(sort => sort.column === column);
|
|
100
|
+
};
|
|
101
|
+
const hasSort = (column) => {
|
|
102
|
+
return findSort(column) !== undefined;
|
|
103
|
+
};
|
|
104
|
+
const isSortAscOrDesc = (column, direction) => {
|
|
105
|
+
const sort = findSort(column);
|
|
106
|
+
if (sort === undefined)
|
|
107
|
+
return sort;
|
|
108
|
+
return sort.direction === direction;
|
|
109
|
+
};
|
|
110
|
+
const isSortAsc = (column) => {
|
|
111
|
+
return isSortAscOrDesc(column, '');
|
|
112
|
+
};
|
|
113
|
+
const isSortDesc = (column) => {
|
|
114
|
+
return isSortAscOrDesc(column, '-');
|
|
115
|
+
};
|
|
116
|
+
const moveSortUp = (column) => {
|
|
117
|
+
let index = sorts.findIndex(sort => sort.column === column);
|
|
118
|
+
if (index <= 0)
|
|
119
|
+
return;
|
|
120
|
+
const newSorts = [...sorts];
|
|
121
|
+
if (index >= 1) {
|
|
122
|
+
const from = index;
|
|
123
|
+
const to = index - 1;
|
|
124
|
+
[newSorts[from], newSorts[to]] = [newSorts[to], newSorts[from]];
|
|
125
|
+
index = to;
|
|
126
|
+
}
|
|
127
|
+
setSorts(newSorts);
|
|
128
|
+
};
|
|
129
|
+
const moveSortDown = (column) => {
|
|
130
|
+
let index = sorts.findIndex(sort => sort.column === column);
|
|
131
|
+
if (index < 0 || index === sorts.length - 1)
|
|
132
|
+
return;
|
|
133
|
+
const newSorts = [...sorts];
|
|
134
|
+
if (index < sorts.length - 1) {
|
|
135
|
+
const from = index;
|
|
136
|
+
const to = index + 1;
|
|
137
|
+
[newSorts[from], newSorts[to]] = [newSorts[to], newSorts[from]];
|
|
138
|
+
index = to;
|
|
139
|
+
}
|
|
140
|
+
setSorts(newSorts);
|
|
141
|
+
};
|
|
142
|
+
const toggleSort = (column) => {
|
|
143
|
+
const index = sorts.findIndex(sort => sort.column === column);
|
|
144
|
+
if (index === -1)
|
|
145
|
+
return;
|
|
146
|
+
const newSorts = [...sorts];
|
|
147
|
+
newSorts[index].include = !newSorts[index].include;
|
|
148
|
+
setSorts(newSorts);
|
|
149
|
+
};
|
|
150
|
+
const toggleSortDirection = (column) => {
|
|
151
|
+
const index = sorts.findIndex(s => s.column === column);
|
|
152
|
+
if (index === -1)
|
|
153
|
+
return;
|
|
154
|
+
const newSorts = [...sorts];
|
|
155
|
+
newSorts[index].direction = newSorts[index].direction === '' ? '-' : '';
|
|
156
|
+
setSorts(newSorts);
|
|
157
|
+
};
|
|
158
|
+
// function sortToEnd() { };
|
|
159
|
+
// function sortToBegin() { };
|
|
160
|
+
// function swapSorts() { };
|
|
161
|
+
// function moveSortTo() { };
|
|
162
|
+
// function disableSort() { };
|
|
163
|
+
// function enableSort() { }
|
|
164
|
+
// function disableSorts() { };
|
|
165
|
+
// function enableSorts() { }
|
|
166
|
+
//QUERY STRING
|
|
167
|
+
let schemaConverted = '';
|
|
168
|
+
if (schemaToQueryString) {
|
|
169
|
+
const { string: resultSchemaConverted, } = fnSchemaToQueryString(schemaToQueryString.schema, schemaToQueryString.rootResource, schemaToQueryString.includeKey, schemaToQueryString.fieldsKey);
|
|
170
|
+
schemaConverted = resultSchemaConverted;
|
|
171
|
+
}
|
|
172
|
+
const queryString = useMemo(() => {
|
|
173
|
+
const parts = [filtersQueryString, sortQueryString, includeQueryString, pageQueryString, perPageQueryString, schemaConverted].filter(Boolean);
|
|
174
|
+
return parts.length ? '?' + parts.join('&') : '';
|
|
175
|
+
}, [filtersQueryString, sortQueryString, includeQueryString, pageQueryString, perPageQueryString]);
|
|
176
|
+
useEffect(() => {
|
|
177
|
+
router.push(queryString);
|
|
178
|
+
}, [queryString, router]);
|
|
179
|
+
//LIFECYCLE
|
|
180
|
+
useEffect(() => {
|
|
181
|
+
if (!normalizeFromUrl)
|
|
182
|
+
return;
|
|
183
|
+
const searchParams = useSearchParams();
|
|
184
|
+
if (searchParams == undefined)
|
|
185
|
+
return;
|
|
186
|
+
const newFilters = {};
|
|
187
|
+
for (const key in allowedFilters) {
|
|
188
|
+
const paramValue = searchParams.get(filterParam + `[${key}]`);
|
|
189
|
+
const parser = allowedFilters[key];
|
|
190
|
+
//TODO: test what happens if paramValue is null, because parser.parse(null) non accepts null
|
|
191
|
+
if (paramValue === null) {
|
|
192
|
+
continue;
|
|
193
|
+
}
|
|
194
|
+
const filterValue = parser.parse(paramValue);
|
|
195
|
+
newFilters[key] = filterValue;
|
|
196
|
+
}
|
|
197
|
+
const newSorts = [...sorts];
|
|
198
|
+
searchParams.forEach((value, key) => {
|
|
199
|
+
const sortMatch = key.match(`^${sortParam}$`);
|
|
200
|
+
if (sortMatch) {
|
|
201
|
+
const sortings = value.split(',');
|
|
202
|
+
const orderingMap = new Map();
|
|
203
|
+
sortings.forEach((sorting, index) => {
|
|
204
|
+
const column = sorting.replace(/^-/, '');
|
|
205
|
+
const newSortIndex = newSorts.findIndex(newSort => newSort.column === column);
|
|
206
|
+
if (newSortIndex < 0)
|
|
207
|
+
return;
|
|
208
|
+
orderingMap.set(column, index);
|
|
209
|
+
if (sorting.startsWith('-')) {
|
|
210
|
+
newSorts[newSortIndex].direction = '-';
|
|
211
|
+
}
|
|
212
|
+
newSorts[newSortIndex].include = true;
|
|
213
|
+
});
|
|
214
|
+
newSorts.sort((a, b) => {
|
|
215
|
+
const aIndex = orderingMap.get(a.column);
|
|
216
|
+
const bIndex = orderingMap.get(b.column);
|
|
217
|
+
if (aIndex === undefined && bIndex === undefined)
|
|
218
|
+
return 0;
|
|
219
|
+
if (aIndex === undefined)
|
|
220
|
+
return 1;
|
|
221
|
+
if (bIndex === undefined)
|
|
222
|
+
return -1;
|
|
223
|
+
return aIndex - bIndex;
|
|
224
|
+
});
|
|
225
|
+
return;
|
|
226
|
+
}
|
|
227
|
+
});
|
|
228
|
+
setFilters(newFilters);
|
|
229
|
+
setSorts(newSorts);
|
|
230
|
+
}, [normalizeFromUrl]);
|
|
231
|
+
return {
|
|
232
|
+
//FIELDS
|
|
233
|
+
// fields
|
|
234
|
+
// fieldsString
|
|
235
|
+
// fieldsQueryString
|
|
236
|
+
// addField,
|
|
237
|
+
// removeField,
|
|
238
|
+
// toggleField,
|
|
239
|
+
//FILTER
|
|
240
|
+
filters,
|
|
241
|
+
filtersQueryString,
|
|
242
|
+
addFilter,
|
|
243
|
+
removeFilter,
|
|
244
|
+
addFilterDebounced,
|
|
245
|
+
//INCLUDE
|
|
246
|
+
includes,
|
|
247
|
+
includeString,
|
|
248
|
+
includeQueryString,
|
|
249
|
+
addInclude,
|
|
250
|
+
removeInclude,
|
|
251
|
+
//PAGE
|
|
252
|
+
page,
|
|
253
|
+
pageString,
|
|
254
|
+
pageQueryString,
|
|
255
|
+
removePage,
|
|
256
|
+
setPage,
|
|
257
|
+
//PER PAGE
|
|
258
|
+
perPage,
|
|
259
|
+
perPageString,
|
|
260
|
+
perPageQueryString,
|
|
261
|
+
removePerPage,
|
|
262
|
+
setPerPage,
|
|
263
|
+
//SORT
|
|
264
|
+
sorts,
|
|
265
|
+
sortString,
|
|
266
|
+
sortQueryString,
|
|
267
|
+
hasSort,
|
|
268
|
+
isSortAsc,
|
|
269
|
+
isSortDesc,
|
|
270
|
+
moveSortUp,
|
|
271
|
+
moveSortDown,
|
|
272
|
+
toggleSort,
|
|
273
|
+
toggleSortDirection,
|
|
274
|
+
// sortToEnd,
|
|
275
|
+
// sortToBegin,
|
|
276
|
+
// swapSorts,
|
|
277
|
+
// moveSortTo,
|
|
278
|
+
// disableSort,
|
|
279
|
+
// enableSort,
|
|
280
|
+
// disableSorts,
|
|
281
|
+
// enableSorts,
|
|
282
|
+
//QUERY STRING
|
|
283
|
+
queryString,
|
|
284
|
+
};
|
|
285
|
+
}
|