@griddo/core 10.4.37 → 10.5.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/hooks/useDataFilters.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/types/global.d.ts +25 -2
- package/package.json +2 -2
package/dist/types/global.d.ts
CHANGED
|
@@ -37,6 +37,20 @@ export interface SetQueryProps<ContentType> {
|
|
|
37
37
|
includePending?: boolean;
|
|
38
38
|
/** The id of a ContentType */
|
|
39
39
|
referenceId?: number;
|
|
40
|
+
/** Grouping Categories */
|
|
41
|
+
groupingCategories?: boolean;
|
|
42
|
+
}
|
|
43
|
+
export interface Category {
|
|
44
|
+
id: number;
|
|
45
|
+
title: string;
|
|
46
|
+
code: string;
|
|
47
|
+
type: "category";
|
|
48
|
+
}
|
|
49
|
+
export interface CategoryGroup {
|
|
50
|
+
id: number;
|
|
51
|
+
title: string;
|
|
52
|
+
type: "group";
|
|
53
|
+
children: Array<Category | CategoryGroup>;
|
|
40
54
|
}
|
|
41
55
|
export interface ListApiQueryResponseProps<ContentTypeFields> {
|
|
42
56
|
page?: number;
|
|
@@ -44,17 +58,26 @@ export interface ListApiQueryResponseProps<ContentTypeFields> {
|
|
|
44
58
|
totalItems?: number;
|
|
45
59
|
totalPages?: number;
|
|
46
60
|
}
|
|
47
|
-
type
|
|
61
|
+
export type FilterDataGroup = {
|
|
62
|
+
label: string;
|
|
63
|
+
id: number;
|
|
64
|
+
language: number;
|
|
65
|
+
type: "group";
|
|
66
|
+
selectable: boolean;
|
|
67
|
+
children: Array<FilterDataItem | FilterDataGroup>;
|
|
68
|
+
};
|
|
69
|
+
export type FilterDataItem = {
|
|
48
70
|
label: string;
|
|
49
71
|
id: number;
|
|
50
72
|
language: number;
|
|
73
|
+
type: "category";
|
|
51
74
|
};
|
|
52
75
|
export type FiltersDataApiQueryResponseProps<ContentType> = ContentType extends {
|
|
53
76
|
__relatedContentTypeNames: Array<string>;
|
|
54
77
|
} ? {
|
|
55
78
|
[P in ContentType["__relatedContentTypeNames"][number]]: {
|
|
56
79
|
label: string;
|
|
57
|
-
items: Array<FilterDataItem>;
|
|
80
|
+
items: Array<FilterDataItem | FilterDataGroup>;
|
|
58
81
|
};
|
|
59
82
|
} : never;
|
|
60
83
|
/** Rename a prop in a type while picking it
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@griddo/core",
|
|
3
3
|
"description": "Reload version of Griddo Core",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
|
-
"version": "10.
|
|
5
|
+
"version": "10.5.1",
|
|
6
6
|
"authors": [
|
|
7
7
|
"Álvaro Sánchez' <alvaro.sanches@secuoyas.com>",
|
|
8
8
|
"Diego M. Béjar <diego.bejar@secuoyas.com>",
|
|
@@ -74,5 +74,5 @@
|
|
|
74
74
|
"publishConfig": {
|
|
75
75
|
"access": "public"
|
|
76
76
|
},
|
|
77
|
-
"gitHead": "
|
|
77
|
+
"gitHead": "f842edf11120496e8a25aa8b5e75b3fb0d9f1225"
|
|
78
78
|
}
|